Merge
diff --git a/.hgtags-top-repo b/.hgtags-top-repo
index 959ca07..a9a38f9 100644
--- a/.hgtags-top-repo
+++ b/.hgtags-top-repo
@@ -232,3 +232,4 @@
 9286a6e61291246d88af713f1ef79adeea30fe2e jdk8-b108
 91f47e8da5c60de58ed195e9b57f3bf192a18f83 jdk8-b109
 4faa09c7fe555de086dd9048d3c5cc92317d6f45 jdk8-b110
+d086227bfc45d124f09b3bd72a07956b4073bf71 jdk8-b111
diff --git a/NewMakefile.gmk b/NewMakefile.gmk
index 030675e..366a3b9 100644
--- a/NewMakefile.gmk
+++ b/NewMakefile.gmk
@@ -37,16 +37,16 @@
 
 # Assume we have GNU make, but check version.
 ifeq (,$(findstring 3.81,$(MAKE_VERSION)))
-    ifeq (,$(findstring 3.82,$(MAKE_VERSION)))
-        $(error This version of GNU Make is too low ($(MAKE_VERSION)). Check your path, or upgrade to 3.81 or newer.)
-    endif
+  ifeq (,$(findstring 3.82,$(MAKE_VERSION)))
+    $(error This version of GNU Make is too low ($(MAKE_VERSION)). Check your path, or upgrade to 3.81 or newer.)
+  endif
 endif
 
 # Locate this Makefile
 ifeq ($(filter /%,$(lastword $(MAKEFILE_LIST))),)
-    makefile_path:=$(CURDIR)/$(lastword $(MAKEFILE_LIST))
+  makefile_path:=$(CURDIR)/$(lastword $(MAKEFILE_LIST))
 else
-    makefile_path:=$(lastword $(MAKEFILE_LIST))
+  makefile_path:=$(lastword $(MAKEFILE_LIST))
 endif
 root_dir:=$(dir $(makefile_path))
 
@@ -58,27 +58,27 @@
 
 # Now determine if we have zero, one or several configurations to build.
 ifeq ($(SPEC),)
-    # Since we got past ParseConfAndSpec, we must be building a global target. Do nothing.
+  # Since we got past ParseConfAndSpec, we must be building a global target. Do nothing.
 else
-    ifeq ($(words $(SPEC)),1)
-        # We are building a single configuration. This is the normal case. Execute the Main.gmk file.
-        include $(root_dir)/common/makefiles/Main.gmk
-    else
-        # We are building multiple configurations.
-        # First, find out the valid targets
-        # Run the makefile with an arbitrary SPEC using -p -q (quiet dry-run and dump rules) to find
-        # available PHONY targets. Use this list as valid targets to pass on to the repeated calls.
-        all_phony_targets=$(filter-out $(global_targets) bundles-only, $(strip $(shell \
-            $(MAKE) -p -q -f common/makefiles/Main.gmk FRC SPEC=$(firstword $(SPEC)) | \
-            grep ^.PHONY: | head -n 1 | cut -d " " -f 2-)))
+  ifeq ($(words $(SPEC)),1)
+    # We are building a single configuration. This is the normal case. Execute the Main.gmk file.
+    include $(root_dir)/common/makefiles/Main.gmk
+  else
+    # We are building multiple configurations.
+    # First, find out the valid targets
+    # Run the makefile with an arbitrary SPEC using -p -q (quiet dry-run and dump rules) to find
+    # available PHONY targets. Use this list as valid targets to pass on to the repeated calls.
+    all_phony_targets=$(filter-out $(global_targets) bundles-only, $(strip $(shell \
+        $(MAKE) -p -q -f common/makefiles/Main.gmk FRC SPEC=$(firstword $(SPEC)) | \
+        grep ^.PHONY: | head -n 1 | cut -d " " -f 2-)))
 
-        $(all_phony_targets):
-		@$(foreach spec,$(SPEC),($(MAKE) -f NewMakefile.gmk SPEC=$(spec) \
-			$(VERBOSE) VERBOSE=$(VERBOSE) LOG_LEVEL=$(LOG_LEVEL) $@) &&) true
+    $(all_phony_targets):
+	@$(foreach spec,$(SPEC),($(MAKE) -f NewMakefile.gmk SPEC=$(spec) \
+	    $(VERBOSE) VERBOSE=$(VERBOSE) LOG_LEVEL=$(LOG_LEVEL) $@) &&) true
 
-        .PHONY: $(all_phony_targets)
+    .PHONY: $(all_phony_targets)
 
-    endif
+  endif
 endif
 
 # Include this after a potential spec file has been included so that the bundles target
diff --git a/common/autoconf/autogen.sh b/common/autoconf/autogen.sh
index 96768aa..69bb67e 100644
--- a/common/autoconf/autogen.sh
+++ b/common/autoconf/autogen.sh
@@ -62,7 +62,7 @@
   # We have custom sources available; also generate configure script
   # with custom hooks compiled in.
   cat $script_dir/configure.ac | sed -e "s|@DATE_WHEN_GENERATED@|$TIMESTAMP|" | \
-    sed -e "s|#CUSTOM_AUTOCONF_INCLUDE|m4_include([$custom_hook])|" | ${AUTOCONF} -W all -I$script_dir - > $custom_script_dir/generated-configure.sh
+      sed -e "s|#CUSTOM_AUTOCONF_INCLUDE|m4_include([$custom_hook])|" | ${AUTOCONF} -W all -I$script_dir - > $custom_script_dir/generated-configure.sh
   rm -rf autom4te.cache
 else
   echo No custom hook found:  $custom_hook
diff --git a/common/autoconf/basics.m4 b/common/autoconf/basics.m4
index f3911ff9..464f68f 100644
--- a/common/autoconf/basics.m4
+++ b/common/autoconf/basics.m4
@@ -24,23 +24,23 @@
 #
 
 # Test if $1 is a valid argument to $3 (often is $JAVA passed as $3)
-# If so, then append $1 to $2\
+# If so, then append $1 to $2 \
 # Also set JVM_ARG_OK to true/false depending on outcome.
 AC_DEFUN([ADD_JVM_ARG_IF_OK],
 [
-    $ECHO "Check if jvm arg is ok: $1" >&AS_MESSAGE_LOG_FD
-    $ECHO "Command: $3 $1 -version" >&AS_MESSAGE_LOG_FD
-    OUTPUT=`$3 $1 -version 2>&1`
-    FOUND_WARN=`$ECHO "$OUTPUT" | grep -i warn`
-    FOUND_VERSION=`$ECHO $OUTPUT | grep " version \""`
-    if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
-        $2="[$]$2 $1"
-	JVM_ARG_OK=true
-    else
-	$ECHO "Arg failed:" >&AS_MESSAGE_LOG_FD
-	$ECHO "$OUTPUT" >&AS_MESSAGE_LOG_FD
-	JVM_ARG_OK=false
-    fi
+  $ECHO "Check if jvm arg is ok: $1" >&AS_MESSAGE_LOG_FD
+  $ECHO "Command: $3 $1 -version" >&AS_MESSAGE_LOG_FD
+  OUTPUT=`$3 $1 -version 2>&1`
+  FOUND_WARN=`$ECHO "$OUTPUT" | grep -i warn`
+  FOUND_VERSION=`$ECHO $OUTPUT | grep " version \""`
+  if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
+    $2="[$]$2 $1"
+    JVM_ARG_OK=true
+  else
+    $ECHO "Arg failed:" >&AS_MESSAGE_LOG_FD
+    $ECHO "$OUTPUT" >&AS_MESSAGE_LOG_FD
+    JVM_ARG_OK=false
+  fi
 ])
 
 # Appends a string to a path variable, only adding the : when needed.
@@ -82,7 +82,7 @@
       AC_MSG_ERROR([The path of $1, which resolves as "$path", is not found.])
     fi
 
-    $1="`cd "$path"; $THEPWDCMD -L`" 
+    $1="`cd "$path"; $THEPWDCMD -L`"
   fi
 ])
 
@@ -129,78 +129,78 @@
       AC_MSG_NOTICE([Resolving $1 (as $path) failed, using $path directly.])
       new_path="$path"
     fi
-    
+
     if test "x$new_path" = x; then
-        AC_MSG_NOTICE([The path of $1, which resolves as "$complete", is not found.])
-        has_space=`$ECHO "$complete" | $GREP " "`
-        if test "x$has_space" != x; then
-          AC_MSG_NOTICE([This might be caused by spaces in the path, which is not allowed.])
-        fi
-        AC_MSG_ERROR([Cannot locate the the path of $1])
+      AC_MSG_NOTICE([The path of $1, which resolves as "$complete", is not found.])
+      has_space=`$ECHO "$complete" | $GREP " "`
+      if test "x$has_space" != x; then
+        AC_MSG_NOTICE([This might be caused by spaces in the path, which is not allowed.])
       fi
+      AC_MSG_ERROR([Cannot locate the the path of $1])
+    fi
   fi
 
-      # Now join together the path and the arguments once again
-      if test "x$arguments" != xEOL; then
-        new_complete="$new_path ${arguments% *}"
-      else
-        new_complete="$new_path"
-      fi
+  # Now join together the path and the arguments once again
+  if test "x$arguments" != xEOL; then
+    new_complete="$new_path ${arguments% *}"
+  else
+    new_complete="$new_path"
+  fi
 
   if test "x$complete" != "x$new_complete"; then
-      $1="$new_complete"
-      AC_MSG_NOTICE([Rewriting $1 to "$new_complete"])
-    fi
+    $1="$new_complete"
+    AC_MSG_NOTICE([Rewriting $1 to "$new_complete"])
+  fi
 ])
 
 AC_DEFUN([BASIC_REMOVE_SYMBOLIC_LINKS],
 [
-    if test "x$OPENJDK_BUILD_OS" != xwindows; then
-        # Follow a chain of symbolic links. Use readlink
-        # where it exists, else fall back to horribly
-        # complicated shell code.
-        if test "x$READLINK_TESTED" != yes; then
-            # On MacOSX there is a readlink tool with a different
-            # purpose than the GNU readlink tool. Check the found readlink.
-            ISGNU=`$READLINK --version 2>&1 | $GREP GNU`
-            if test "x$ISGNU" = x; then
-                 # A readlink that we do not know how to use.
-                 # Are there other non-GNU readlinks out there?
-                 READLINK_TESTED=yes
-                 READLINK=
-            fi
-        fi
-
-        if test "x$READLINK" != x; then
-            $1=`$READLINK -f [$]$1`
-        else
-            # Save the current directory for restoring afterwards
-            STARTDIR=$PWD
-            COUNTER=0
-            sym_link_dir=`$DIRNAME [$]$1`
-            sym_link_file=`$BASENAME [$]$1`
-            cd $sym_link_dir
-            # Use -P flag to resolve symlinks in directories.
-            cd `$THEPWDCMD -P`
-            sym_link_dir=`$THEPWDCMD -P`
-            # Resolve file symlinks
-            while test $COUNTER -lt 20; do
-                ISLINK=`$LS -l $sym_link_dir/$sym_link_file | $GREP '\->' | $SED -e 's/.*-> \(.*\)/\1/'`
-                if test "x$ISLINK" == x; then
-                    # This is not a symbolic link! We are done!
-                    break
-                fi
-                # Again resolve directory symlinks since the target of the just found
-                # link could be in a different directory
-                cd `$DIRNAME $ISLINK`
-                sym_link_dir=`$THEPWDCMD -P`
-                sym_link_file=`$BASENAME $ISLINK`
-                let COUNTER=COUNTER+1
-            done
-            cd $STARTDIR
-            $1=$sym_link_dir/$sym_link_file
-        fi
+  if test "x$OPENJDK_BUILD_OS" != xwindows; then
+    # Follow a chain of symbolic links. Use readlink
+    # where it exists, else fall back to horribly
+    # complicated shell code.
+    if test "x$READLINK_TESTED" != yes; then
+      # On MacOSX there is a readlink tool with a different
+      # purpose than the GNU readlink tool. Check the found readlink.
+      ISGNU=`$READLINK --version 2>&1 | $GREP GNU`
+      if test "x$ISGNU" = x; then
+        # A readlink that we do not know how to use.
+        # Are there other non-GNU readlinks out there?
+        READLINK_TESTED=yes
+        READLINK=
+      fi
     fi
+
+    if test "x$READLINK" != x; then
+      $1=`$READLINK -f [$]$1`
+    else
+      # Save the current directory for restoring afterwards
+      STARTDIR=$PWD
+      COUNTER=0
+      sym_link_dir=`$DIRNAME [$]$1`
+      sym_link_file=`$BASENAME [$]$1`
+      cd $sym_link_dir
+      # Use -P flag to resolve symlinks in directories.
+      cd `$THEPWDCMD -P`
+      sym_link_dir=`$THEPWDCMD -P`
+      # Resolve file symlinks
+      while test $COUNTER -lt 20; do
+        ISLINK=`$LS -l $sym_link_dir/$sym_link_file | $GREP '\->' | $SED -e 's/.*-> \(.*\)/\1/'`
+        if test "x$ISLINK" == x; then
+          # This is not a symbolic link! We are done!
+          break
+        fi
+        # Again resolve directory symlinks since the target of the just found
+        # link could be in a different directory
+        cd `$DIRNAME $ISLINK`
+        sym_link_dir=`$THEPWDCMD -P`
+        sym_link_file=`$BASENAME $ISLINK`
+        let COUNTER=COUNTER+1
+      done
+      cd $STARTDIR
+      $1=$sym_link_dir/$sym_link_file
+    fi
+  fi
 ])
 
 # Register a --with argument but mark it as deprecated
@@ -214,12 +214,12 @@
 
 AC_DEFUN_ONCE([BASIC_INIT],
 [
-# Save the original command line. This is passed to us by the wrapper configure script.
-AC_SUBST(CONFIGURE_COMMAND_LINE)
-DATE_WHEN_CONFIGURED=`LANG=C date`
-AC_SUBST(DATE_WHEN_CONFIGURED)
-AC_MSG_NOTICE([Configuration created at $DATE_WHEN_CONFIGURED.])
-AC_MSG_NOTICE([configure script generated at timestamp $DATE_WHEN_GENERATED.])
+  # Save the original command line. This is passed to us by the wrapper configure script.
+  AC_SUBST(CONFIGURE_COMMAND_LINE)
+  DATE_WHEN_CONFIGURED=`LANG=C date`
+  AC_SUBST(DATE_WHEN_CONFIGURED)
+  AC_MSG_NOTICE([Configuration created at $DATE_WHEN_CONFIGURED.])
+  AC_MSG_NOTICE([configure script generated at timestamp $DATE_WHEN_GENERATED.])
 ])
 
 # Test that variable $1 denoting a program is not empty. If empty, exit with an error.
@@ -227,15 +227,15 @@
 # $2: executable name to print in warning (optional)
 AC_DEFUN([BASIC_CHECK_NONEMPTY],
 [
-    if test "x[$]$1" = x; then
-        if test "x$2" = x; then
-          PROG_NAME=translit($1,A-Z,a-z)
-        else
-          PROG_NAME=$2
-        fi
-        AC_MSG_NOTICE([Could not find $PROG_NAME!])
-        AC_MSG_ERROR([Cannot continue])
+  if test "x[$]$1" = x; then
+    if test "x$2" = x; then
+      PROG_NAME=translit($1,A-Z,a-z)
+    else
+      PROG_NAME=$2
     fi
+    AC_MSG_NOTICE([Could not find $PROG_NAME!])
+    AC_MSG_ERROR([Cannot continue])
+  fi
 ])
 
 # Does AC_PATH_PROG followed by BASIC_CHECK_NONEMPTY.
@@ -244,8 +244,8 @@
 # $2: executable name to look for
 AC_DEFUN([BASIC_REQUIRE_PROG],
 [
-    AC_PATH_PROGS($1, $2)
-    BASIC_CHECK_NONEMPTY($1, $2)
+  AC_PATH_PROGS($1, $2)
+  BASIC_CHECK_NONEMPTY($1, $2)
 ])
 
 # Setup the most fundamental tools that relies on not much else to set up,
@@ -253,171 +253,171 @@
 AC_DEFUN_ONCE([BASIC_SETUP_FUNDAMENTAL_TOOLS],
 [
 
-# Start with tools that do not need have cross compilation support
-# and can be expected to be found in the default PATH. These tools are
-# used by configure. Nor are these tools expected to be found in the
-# devkit from the builddeps server either, since they are
-# needed to download the devkit.
+  # Start with tools that do not need have cross compilation support
+  # and can be expected to be found in the default PATH. These tools are
+  # used by configure. Nor are these tools expected to be found in the
+  # devkit from the builddeps server either, since they are
+  # needed to download the devkit.
 
-# First are all the simple required tools.
-BASIC_REQUIRE_PROG(BASENAME, basename)
-BASIC_REQUIRE_PROG(BASH, bash)
-BASIC_REQUIRE_PROG(CAT, cat)
-BASIC_REQUIRE_PROG(CHMOD, chmod)
-BASIC_REQUIRE_PROG(CMP, cmp)
-BASIC_REQUIRE_PROG(COMM, comm)
-BASIC_REQUIRE_PROG(CP, cp)
-BASIC_REQUIRE_PROG(CPIO, cpio)
-BASIC_REQUIRE_PROG(CUT, cut)
-BASIC_REQUIRE_PROG(DATE, date)
-BASIC_REQUIRE_PROG(DIFF, [gdiff diff])
-BASIC_REQUIRE_PROG(DIRNAME, dirname)
-BASIC_REQUIRE_PROG(ECHO, echo)
-BASIC_REQUIRE_PROG(EXPR, expr)
-BASIC_REQUIRE_PROG(FILE, file)
-BASIC_REQUIRE_PROG(FIND, find)
-BASIC_REQUIRE_PROG(HEAD, head)
-BASIC_REQUIRE_PROG(LN, ln)
-BASIC_REQUIRE_PROG(LS, ls)
-BASIC_REQUIRE_PROG(MKDIR, mkdir)
-BASIC_REQUIRE_PROG(MKTEMP, mktemp)
-BASIC_REQUIRE_PROG(MV, mv)
-BASIC_REQUIRE_PROG(PRINTF, printf)
-BASIC_REQUIRE_PROG(RM, rm)
-BASIC_REQUIRE_PROG(SH, sh)
-BASIC_REQUIRE_PROG(SORT, sort)
-BASIC_REQUIRE_PROG(TAIL, tail)
-BASIC_REQUIRE_PROG(TAR, tar)
-BASIC_REQUIRE_PROG(TEE, tee)
-BASIC_REQUIRE_PROG(TOUCH, touch)
-BASIC_REQUIRE_PROG(TR, tr)
-BASIC_REQUIRE_PROG(UNAME, uname)
-BASIC_REQUIRE_PROG(UNIQ, uniq)
-BASIC_REQUIRE_PROG(WC, wc)
-BASIC_REQUIRE_PROG(WHICH, which)
-BASIC_REQUIRE_PROG(XARGS, xargs)
+  # First are all the simple required tools.
+  BASIC_REQUIRE_PROG(BASENAME, basename)
+  BASIC_REQUIRE_PROG(BASH, bash)
+  BASIC_REQUIRE_PROG(CAT, cat)
+  BASIC_REQUIRE_PROG(CHMOD, chmod)
+  BASIC_REQUIRE_PROG(CMP, cmp)
+  BASIC_REQUIRE_PROG(COMM, comm)
+  BASIC_REQUIRE_PROG(CP, cp)
+  BASIC_REQUIRE_PROG(CPIO, cpio)
+  BASIC_REQUIRE_PROG(CUT, cut)
+  BASIC_REQUIRE_PROG(DATE, date)
+  BASIC_REQUIRE_PROG(DIFF, [gdiff diff])
+  BASIC_REQUIRE_PROG(DIRNAME, dirname)
+  BASIC_REQUIRE_PROG(ECHO, echo)
+  BASIC_REQUIRE_PROG(EXPR, expr)
+  BASIC_REQUIRE_PROG(FILE, file)
+  BASIC_REQUIRE_PROG(FIND, find)
+  BASIC_REQUIRE_PROG(HEAD, head)
+  BASIC_REQUIRE_PROG(LN, ln)
+  BASIC_REQUIRE_PROG(LS, ls)
+  BASIC_REQUIRE_PROG(MKDIR, mkdir)
+  BASIC_REQUIRE_PROG(MKTEMP, mktemp)
+  BASIC_REQUIRE_PROG(MV, mv)
+  BASIC_REQUIRE_PROG(PRINTF, printf)
+  BASIC_REQUIRE_PROG(RM, rm)
+  BASIC_REQUIRE_PROG(SH, sh)
+  BASIC_REQUIRE_PROG(SORT, sort)
+  BASIC_REQUIRE_PROG(TAIL, tail)
+  BASIC_REQUIRE_PROG(TAR, tar)
+  BASIC_REQUIRE_PROG(TEE, tee)
+  BASIC_REQUIRE_PROG(TOUCH, touch)
+  BASIC_REQUIRE_PROG(TR, tr)
+  BASIC_REQUIRE_PROG(UNAME, uname)
+  BASIC_REQUIRE_PROG(UNIQ, uniq)
+  BASIC_REQUIRE_PROG(WC, wc)
+  BASIC_REQUIRE_PROG(WHICH, which)
+  BASIC_REQUIRE_PROG(XARGS, xargs)
 
-# Then required tools that require some special treatment.
-AC_PROG_AWK
-BASIC_CHECK_NONEMPTY(AWK)
-AC_PROG_GREP
-BASIC_CHECK_NONEMPTY(GREP)
-AC_PROG_EGREP
-BASIC_CHECK_NONEMPTY(EGREP)
-AC_PROG_FGREP
-BASIC_CHECK_NONEMPTY(FGREP)
-AC_PROG_SED
-BASIC_CHECK_NONEMPTY(SED)
+  # Then required tools that require some special treatment.
+  AC_PROG_AWK
+  BASIC_CHECK_NONEMPTY(AWK)
+  AC_PROG_GREP
+  BASIC_CHECK_NONEMPTY(GREP)
+  AC_PROG_EGREP
+  BASIC_CHECK_NONEMPTY(EGREP)
+  AC_PROG_FGREP
+  BASIC_CHECK_NONEMPTY(FGREP)
+  AC_PROG_SED
+  BASIC_CHECK_NONEMPTY(SED)
 
-AC_PATH_PROGS(NAWK, [nawk gawk awk])
-BASIC_CHECK_NONEMPTY(NAWK)
+  AC_PATH_PROGS(NAWK, [nawk gawk awk])
+  BASIC_CHECK_NONEMPTY(NAWK)
 
-# Always force rm.
-RM="$RM -f"
+  # Always force rm.
+  RM="$RM -f"
 
-# pwd behaves differently on various platforms and some don't support the -L flag.
-# Always use the bash builtin pwd to get uniform behavior.
-THEPWDCMD=pwd
+  # pwd behaves differently on various platforms and some don't support the -L flag.
+  # Always use the bash builtin pwd to get uniform behavior.
+  THEPWDCMD=pwd
 
-# These are not required on all platforms
-AC_PATH_PROG(CYGPATH, cygpath)
-AC_PATH_PROG(READLINK, readlink)
-AC_PATH_PROG(DF, df)
-AC_PATH_PROG(SETFILE, SetFile)
+  # These are not required on all platforms
+  AC_PATH_PROG(CYGPATH, cygpath)
+  AC_PATH_PROG(READLINK, readlink)
+  AC_PATH_PROG(DF, df)
+  AC_PATH_PROG(SETFILE, SetFile)
 ])
 
 # Setup basic configuration paths, and platform-specific stuff related to PATHs.
 AC_DEFUN_ONCE([BASIC_SETUP_PATHS],
 [
-# Locate the directory of this script.
-SCRIPT="[$]0"
-AUTOCONF_DIR=`cd \`$DIRNAME $SCRIPT\`; $THEPWDCMD -L`
+  # Locate the directory of this script.
+  SCRIPT="[$]0"
+  AUTOCONF_DIR=`cd \`$DIRNAME $SCRIPT\`; $THEPWDCMD -L`
 
-# Where is the source? It is located two levels above the configure script.
-CURDIR="$PWD"
-cd "$AUTOCONF_DIR/../.."
-SRC_ROOT="`$THEPWDCMD -L`"
+  # Where is the source? It is located two levels above the configure script.
+  CURDIR="$PWD"
+  cd "$AUTOCONF_DIR/../.."
+  SRC_ROOT="`$THEPWDCMD -L`"
 
-if test "x$OPENJDK_TARGET_OS" = "xwindows"; then
-  PATH_SEP=";"
-  BASIC_CHECK_PATHS_WINDOWS
-else
-  PATH_SEP=":"
-fi
+  if test "x$OPENJDK_TARGET_OS" = "xwindows"; then
+    PATH_SEP=";"
+    BASIC_CHECK_PATHS_WINDOWS
+  else
+    PATH_SEP=":"
+  fi
 
-AC_SUBST(SRC_ROOT)
-AC_SUBST(PATH_SEP)
-cd "$CURDIR"
+  AC_SUBST(SRC_ROOT)
+  AC_SUBST(PATH_SEP)
+  cd "$CURDIR"
 
-BASIC_FIXUP_PATH(SRC_ROOT)
-BASIC_FIXUP_PATH(CURDIR)
+  BASIC_FIXUP_PATH(SRC_ROOT)
+  BASIC_FIXUP_PATH(CURDIR)
 
-if test "x$OPENJDK_BUILD_OS" = "xsolaris"; then
+  if test "x$OPENJDK_BUILD_OS" = "xsolaris"; then
     # Add extra search paths on solaris for utilities like ar and as etc...
     PATH="$PATH:/usr/ccs/bin:/usr/sfw/bin:/opt/csw/bin"
-fi
+  fi
 
-# You can force the sys-root if the sys-root encoded into the cross compiler tools
-# is not correct.
-AC_ARG_WITH(sys-root, [AS_HELP_STRING([--with-sys-root],
-  [pass this sys-root to the compilers and tools (for cross-compiling)])])
+  # You can force the sys-root if the sys-root encoded into the cross compiler tools
+  # is not correct.
+  AC_ARG_WITH(sys-root, [AS_HELP_STRING([--with-sys-root],
+      [pass this sys-root to the compilers and tools (for cross-compiling)])])
 
-if test "x$with_sys_root" != x; then
-  SYS_ROOT=$with_sys_root
-else
-  SYS_ROOT=/
-fi
-AC_SUBST(SYS_ROOT)
+  if test "x$with_sys_root" != x; then
+    SYS_ROOT=$with_sys_root
+  else
+    SYS_ROOT=/
+  fi
+  AC_SUBST(SYS_ROOT)
 
-AC_ARG_WITH([tools-dir], [AS_HELP_STRING([--with-tools-dir],
-  [search this directory for compilers and tools (for cross-compiling)])], 
-  [TOOLS_DIR=$with_tools_dir]
-)
+  AC_ARG_WITH([tools-dir], [AS_HELP_STRING([--with-tools-dir],
+      [search this directory for compilers and tools (for cross-compiling)])],
+      [TOOLS_DIR=$with_tools_dir]
+  )
 
-AC_ARG_WITH([devkit], [AS_HELP_STRING([--with-devkit],
-  [use this directory as base for tools-dir and sys-root (for cross-compiling)])],
-  [
-    if test "x$with_sys_root" != x; then
-      AC_MSG_ERROR([Cannot specify both --with-devkit and --with-sys-root at the same time])
-    fi
-    BASIC_FIXUP_PATH([with_devkit])
-    BASIC_APPEND_TO_PATH([TOOLS_DIR],$with_devkit/bin)
-    if test -d "$with_devkit/$host_alias/libc"; then
-      SYS_ROOT=$with_devkit/$host_alias/libc
-    elif test -d "$with_devkit/$host/sys-root"; then
-      SYS_ROOT=$with_devkit/$host/sys-root
-    fi
-  ])
+  AC_ARG_WITH([devkit], [AS_HELP_STRING([--with-devkit],
+      [use this directory as base for tools-dir and sys-root (for cross-compiling)])],
+      [
+        if test "x$with_sys_root" != x; then
+          AC_MSG_ERROR([Cannot specify both --with-devkit and --with-sys-root at the same time])
+        fi
+        BASIC_FIXUP_PATH([with_devkit])
+        BASIC_APPEND_TO_PATH([TOOLS_DIR],$with_devkit/bin)
+        if test -d "$with_devkit/$host_alias/libc"; then
+          SYS_ROOT=$with_devkit/$host_alias/libc
+        elif test -d "$with_devkit/$host/sys-root"; then
+          SYS_ROOT=$with_devkit/$host/sys-root
+        fi
+      ])
 ])
 
 AC_DEFUN_ONCE([BASIC_SETUP_OUTPUT_DIR],
 [
 
-AC_ARG_WITH(conf-name, [AS_HELP_STRING([--with-conf-name],
-	[use this as the name of the configuration @<:@generated from important configuration options@:>@])],
-        [ CONF_NAME=${with_conf_name} ])
+  AC_ARG_WITH(conf-name, [AS_HELP_STRING([--with-conf-name],
+      [use this as the name of the configuration @<:@generated from important configuration options@:>@])],
+      [ CONF_NAME=${with_conf_name} ])
 
-# Test from where we are running configure, in or outside of src root.
-if test "x$CURDIR" = "x$SRC_ROOT" || test "x$CURDIR" = "x$SRC_ROOT/common" \
-        || test "x$CURDIR" = "x$SRC_ROOT/common/autoconf" \
-        || test "x$CURDIR" = "x$SRC_ROOT/common/makefiles" ; then
+  # Test from where we are running configure, in or outside of src root.
+  if test "x$CURDIR" = "x$SRC_ROOT" || test "x$CURDIR" = "x$SRC_ROOT/common" \
+      || test "x$CURDIR" = "x$SRC_ROOT/common/autoconf" \
+      || test "x$CURDIR" = "x$SRC_ROOT/common/makefiles" ; then
     # We are running configure from the src root.
     # Create a default ./build/target-variant-debuglevel output root.
     if test "x${CONF_NAME}" = x; then
-        CONF_NAME="${OPENJDK_TARGET_OS}-${OPENJDK_TARGET_CPU}-${JDK_VARIANT}-${ANDED_JVM_VARIANTS}-${DEBUG_LEVEL}"
+      CONF_NAME="${OPENJDK_TARGET_OS}-${OPENJDK_TARGET_CPU}-${JDK_VARIANT}-${ANDED_JVM_VARIANTS}-${DEBUG_LEVEL}"
     fi
     OUTPUT_ROOT="$SRC_ROOT/build/${CONF_NAME}"
     $MKDIR -p "$OUTPUT_ROOT"
     if test ! -d "$OUTPUT_ROOT"; then
-        AC_MSG_ERROR([Could not create build directory $OUTPUT_ROOT])
+      AC_MSG_ERROR([Could not create build directory $OUTPUT_ROOT])
     fi
-else
+  else
     # We are running configure from outside of the src dir.
     # Then use the current directory as output dir!
     # If configuration is situated in normal build directory, just use the build
     # directory name as configuration name, otherwise use the complete path.
     if test "x${CONF_NAME}" = x; then
-        CONF_NAME=`$ECHO $CURDIR | $SED -e "s!^${SRC_ROOT}/build/!!"`
+      CONF_NAME=`$ECHO $CURDIR | $SED -e "s!^${SRC_ROOT}/build/!!"`
     fi
     OUTPUT_ROOT="$CURDIR"
 
@@ -428,10 +428,10 @@
       # If we have a spec.gmk, we have run here before and we are OK. Otherwise, check for
       # other files
       files_present=`$LS $OUTPUT_ROOT`
-      # Configure has already touched config.log and confdefs.h in the current dir when this check 
+      # Configure has already touched config.log and confdefs.h in the current dir when this check
       # is performed.
       filtered_files=`$ECHO "$files_present" | $SED -e 's/config.log//g' -e 's/confdefs.h//g' -e 's/ //g' \
-                                             | $TR -d '\n'`
+      | $TR -d '\n'`
       if test "x$filtered_files" != x; then
         AC_MSG_NOTICE([Current directory is $CURDIR.])
         AC_MSG_NOTICE([Since this is not the source root, configure will output the configuration here])
@@ -443,46 +443,46 @@
         AC_MSG_ERROR([Will not continue creating configuration in $CURDIR])
       fi
     fi
-fi
-AC_MSG_CHECKING([what configuration name to use])
-AC_MSG_RESULT([$CONF_NAME])
+  fi
+  AC_MSG_CHECKING([what configuration name to use])
+  AC_MSG_RESULT([$CONF_NAME])
 
-BASIC_FIXUP_PATH(OUTPUT_ROOT)
+  BASIC_FIXUP_PATH(OUTPUT_ROOT)
 
-AC_SUBST(SPEC, $OUTPUT_ROOT/spec.gmk)
-AC_SUBST(CONF_NAME, $CONF_NAME)
-AC_SUBST(OUTPUT_ROOT, $OUTPUT_ROOT)
+  AC_SUBST(SPEC, $OUTPUT_ROOT/spec.gmk)
+  AC_SUBST(CONF_NAME, $CONF_NAME)
+  AC_SUBST(OUTPUT_ROOT, $OUTPUT_ROOT)
 
-# Most of the probed defines are put into config.h
-AC_CONFIG_HEADERS([$OUTPUT_ROOT/config.h:$AUTOCONF_DIR/config.h.in])
-# The spec.gmk file contains all variables for the make system.
-AC_CONFIG_FILES([$OUTPUT_ROOT/spec.gmk:$AUTOCONF_DIR/spec.gmk.in])
-# The hotspot-spec.gmk file contains legacy variables for the hotspot make system.
-AC_CONFIG_FILES([$OUTPUT_ROOT/hotspot-spec.gmk:$AUTOCONF_DIR/hotspot-spec.gmk.in])
-# The bootcycle-spec.gmk file contains support for boot cycle builds.
-AC_CONFIG_FILES([$OUTPUT_ROOT/bootcycle-spec.gmk:$AUTOCONF_DIR/bootcycle-spec.gmk.in])
-# The compare.sh is used to compare the build output to other builds.
-AC_CONFIG_FILES([$OUTPUT_ROOT/compare.sh:$AUTOCONF_DIR/compare.sh.in])
-# Spec.sh is currently used by compare-objects.sh
-AC_CONFIG_FILES([$OUTPUT_ROOT/spec.sh:$AUTOCONF_DIR/spec.sh.in])
-# The generated Makefile knows where the spec.gmk is and where the source is.
-# You can run make from the OUTPUT_ROOT, or from the top-level Makefile
-# which will look for generated configurations
-AC_CONFIG_FILES([$OUTPUT_ROOT/Makefile:$AUTOCONF_DIR/Makefile.in])
+  # Most of the probed defines are put into config.h
+  AC_CONFIG_HEADERS([$OUTPUT_ROOT/config.h:$AUTOCONF_DIR/config.h.in])
+  # The spec.gmk file contains all variables for the make system.
+  AC_CONFIG_FILES([$OUTPUT_ROOT/spec.gmk:$AUTOCONF_DIR/spec.gmk.in])
+  # The hotspot-spec.gmk file contains legacy variables for the hotspot make system.
+  AC_CONFIG_FILES([$OUTPUT_ROOT/hotspot-spec.gmk:$AUTOCONF_DIR/hotspot-spec.gmk.in])
+  # The bootcycle-spec.gmk file contains support for boot cycle builds.
+  AC_CONFIG_FILES([$OUTPUT_ROOT/bootcycle-spec.gmk:$AUTOCONF_DIR/bootcycle-spec.gmk.in])
+  # The compare.sh is used to compare the build output to other builds.
+  AC_CONFIG_FILES([$OUTPUT_ROOT/compare.sh:$AUTOCONF_DIR/compare.sh.in])
+  # Spec.sh is currently used by compare-objects.sh
+  AC_CONFIG_FILES([$OUTPUT_ROOT/spec.sh:$AUTOCONF_DIR/spec.sh.in])
+  # The generated Makefile knows where the spec.gmk is and where the source is.
+  # You can run make from the OUTPUT_ROOT, or from the top-level Makefile
+  # which will look for generated configurations
+  AC_CONFIG_FILES([$OUTPUT_ROOT/Makefile:$AUTOCONF_DIR/Makefile.in])
 
-# Save the arguments given to us
-echo "$CONFIGURE_COMMAND_LINE" > $OUTPUT_ROOT/configure-arguments
+  # Save the arguments given to us
+  echo "$CONFIGURE_COMMAND_LINE" > $OUTPUT_ROOT/configure-arguments
 ])
 
 AC_DEFUN_ONCE([BASIC_SETUP_LOGGING],
 [
-# Setup default logging of stdout and stderr to build.log in the output root.
-BUILD_LOG='$(OUTPUT_ROOT)/build.log'
-BUILD_LOG_PREVIOUS='$(OUTPUT_ROOT)/build.log.old'
-BUILD_LOG_WRAPPER='$(BASH) $(SRC_ROOT)/common/bin/logger.sh $(BUILD_LOG)'
-AC_SUBST(BUILD_LOG)
-AC_SUBST(BUILD_LOG_PREVIOUS)
-AC_SUBST(BUILD_LOG_WRAPPER)
+  # Setup default logging of stdout and stderr to build.log in the output root.
+  BUILD_LOG='$(OUTPUT_ROOT)/build.log'
+  BUILD_LOG_PREVIOUS='$(OUTPUT_ROOT)/build.log.old'
+  BUILD_LOG_WRAPPER='$(BASH) $(SRC_ROOT)/common/bin/logger.sh $(BUILD_LOG)'
+  AC_SUBST(BUILD_LOG)
+  AC_SUBST(BUILD_LOG_PREVIOUS)
+  AC_SUBST(BUILD_LOG_WRAPPER)
 ])
 
 
@@ -581,85 +581,85 @@
 
 AC_DEFUN([BASIC_CHECK_FIND_DELETE],
 [
-    # Test if find supports -delete
-    AC_MSG_CHECKING([if find supports -delete])
-    FIND_DELETE="-delete"
+  # Test if find supports -delete
+  AC_MSG_CHECKING([if find supports -delete])
+  FIND_DELETE="-delete"
 
-    DELETEDIR=`$MKTEMP -d tmp.XXXXXXXXXX` || (echo Could not create temporary directory!; exit $?)
+  DELETEDIR=`$MKTEMP -d tmp.XXXXXXXXXX` || (echo Could not create temporary directory!; exit $?)
 
-    echo Hejsan > $DELETEDIR/TestIfFindSupportsDelete
+  echo Hejsan > $DELETEDIR/TestIfFindSupportsDelete
 
-    TEST_DELETE=`$FIND "$DELETEDIR" -name TestIfFindSupportsDelete $FIND_DELETE 2>&1`
-    if test -f $DELETEDIR/TestIfFindSupportsDelete; then
-        # No, it does not.
-        rm $DELETEDIR/TestIfFindSupportsDelete
-        FIND_DELETE="-exec rm \{\} \+"
-        AC_MSG_RESULT([no])    
-    else
-        AC_MSG_RESULT([yes])    
-    fi
-    rmdir $DELETEDIR
-    AC_SUBST(FIND_DELETE)
+  TEST_DELETE=`$FIND "$DELETEDIR" -name TestIfFindSupportsDelete $FIND_DELETE 2>&1`
+  if test -f $DELETEDIR/TestIfFindSupportsDelete; then
+    # No, it does not.
+    rm $DELETEDIR/TestIfFindSupportsDelete
+    FIND_DELETE="-exec rm \{\} \+"
+    AC_MSG_RESULT([no])
+  else
+    AC_MSG_RESULT([yes])
+  fi
+  rmdir $DELETEDIR
+  AC_SUBST(FIND_DELETE)
 ])
 
 AC_DEFUN_ONCE([BASIC_SETUP_COMPLEX_TOOLS],
 [
-BASIC_CHECK_GNU_MAKE
+  BASIC_CHECK_GNU_MAKE
 
-BASIC_CHECK_FIND_DELETE
+  BASIC_CHECK_FIND_DELETE
 
-# These tools might not be installed by default, 
-# need hint on how to install them.
-BASIC_REQUIRE_PROG(UNZIP, unzip)
-BASIC_REQUIRE_PROG(ZIP, zip)
+  # These tools might not be installed by default,
+  # need hint on how to install them.
+  BASIC_REQUIRE_PROG(UNZIP, unzip)
+  BASIC_REQUIRE_PROG(ZIP, zip)
 
-# Non-required basic tools
+  # Non-required basic tools
 
-AC_PATH_PROG(LDD, ldd)
-if test "x$LDD" = "x"; then
+  AC_PATH_PROG(LDD, ldd)
+  if test "x$LDD" = "x"; then
     # List shared lib dependencies is used for
     # debug output and checking for forbidden dependencies.
     # We can build without it.
     LDD="true"
-fi
-AC_PATH_PROG(OTOOL, otool)
-if test "x$OTOOL" = "x"; then
-   OTOOL="true"
-fi
-AC_PATH_PROGS(READELF, [readelf greadelf])
-AC_PATH_PROG(HG, hg)
-AC_PATH_PROG(STAT, stat)
-AC_PATH_PROG(TIME, time)
-# Check if it's GNU time
-IS_GNU_TIME=`$TIME --version 2>&1 | $GREP 'GNU time'`
-if test "x$IS_GNU_TIME" != x; then
-  IS_GNU_TIME=yes
-else
-  IS_GNU_TIME=no
-fi
-AC_SUBST(IS_GNU_TIME)
+  fi
+  AC_PATH_PROG(OTOOL, otool)
+  if test "x$OTOOL" = "x"; then
+    OTOOL="true"
+  fi
+  AC_PATH_PROGS(READELF, [readelf greadelf])
+  AC_PATH_PROG(HG, hg)
+  AC_PATH_PROG(STAT, stat)
+  AC_PATH_PROG(TIME, time)
+  # Check if it's GNU time
+  IS_GNU_TIME=`$TIME --version 2>&1 | $GREP 'GNU time'`
+  if test "x$IS_GNU_TIME" != x; then
+    IS_GNU_TIME=yes
+  else
+    IS_GNU_TIME=no
+  fi
+  AC_SUBST(IS_GNU_TIME)
 
-if test "x$OPENJDK_TARGET_OS" = "xwindows"; then
-  BASIC_REQUIRE_PROG(COMM, comm)
-fi
+  if test "x$OPENJDK_TARGET_OS" = "xwindows"; then
+    BASIC_REQUIRE_PROG(COMM, comm)
+  fi
 
-if test "x$OPENJDK_TARGET_OS" = "xmacosx"; then
-  BASIC_REQUIRE_PROG(XATTR, xattr)
-  AC_PATH_PROG(CODESIGN, codesign)
-  if test "x$CODESIGN" != "x"; then
-    # Verify that the openjdk_codesign certificate is present
-    AC_MSG_CHECKING([if openjdk_codesign certificate is present])
-    rm -f codesign-testfile
-    touch codesign-testfile
-    codesign -s openjdk_codesign codesign-testfile 2>&AS_MESSAGE_LOG_FD >&AS_MESSAGE_LOG_FD || CODESIGN=
-    rm -f codesign-testfile
-    if test "x$CODESIGN" = x; then
-      AC_MSG_RESULT([no])
-    else
-      AC_MSG_RESULT([yes])
+  if test "x$OPENJDK_TARGET_OS" = "xmacosx"; then
+    BASIC_REQUIRE_PROG(XATTR, xattr)
+    AC_PATH_PROG(CODESIGN, codesign)
+    if test "x$CODESIGN" != "x"; then
+      # Verify that the openjdk_codesign certificate is present
+      AC_MSG_CHECKING([if openjdk_codesign certificate is present])
+      rm -f codesign-testfile
+      touch codesign-testfile
+      codesign -s openjdk_codesign codesign-testfile 2>&AS_MESSAGE_LOG_FD >&AS_MESSAGE_LOG_FD || CODESIGN=
+      rm -f codesign-testfile
+      if test "x$CODESIGN" = x; then
+        AC_MSG_RESULT([no])
+      else
+        AC_MSG_RESULT([yes])
+      fi
     fi
   fi
-fi
 ])
 
 # Check if build directory is on local disk. If not possible to determine,
@@ -669,8 +669,8 @@
 # Argument 3: what to do otherwise (remote disk or failure)
 AC_DEFUN([BASIC_CHECK_DIR_ON_LOCAL_DISK],
 [
-	# df -l lists only local disks; if the given directory is not found then
-	# a non-zero exit code is given
+  # df -l lists only local disks; if the given directory is not found then
+  # a non-zero exit code is given
   if test "x$DF" = x; then
     if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
       # msys does not have df; use Windows "net use" instead.
@@ -707,32 +707,30 @@
 
 AC_DEFUN_ONCE([BASIC_TEST_USABILITY_ISSUES],
 [
+  AC_MSG_CHECKING([if build directory is on local disk])
+  BASIC_CHECK_DIR_ON_LOCAL_DISK($OUTPUT_ROOT,
+      [OUTPUT_DIR_IS_LOCAL="yes"],
+      [OUTPUT_DIR_IS_LOCAL="no"])
+  AC_MSG_RESULT($OUTPUT_DIR_IS_LOCAL)
 
-AC_MSG_CHECKING([if build directory is on local disk])
-BASIC_CHECK_DIR_ON_LOCAL_DISK($OUTPUT_ROOT,
-  [OUTPUT_DIR_IS_LOCAL="yes"],
-  [OUTPUT_DIR_IS_LOCAL="no"])
-AC_MSG_RESULT($OUTPUT_DIR_IS_LOCAL)
+  BASIC_CHECK_SRC_PERMS
 
-BASIC_CHECK_SRC_PERMS
+  # Check if the user has any old-style ALT_ variables set.
+  FOUND_ALT_VARIABLES=`env | grep ^ALT_`
 
-# Check if the user has any old-style ALT_ variables set.
-FOUND_ALT_VARIABLES=`env | grep ^ALT_`
+  # Before generating output files, test if they exist. If they do, this is a reconfigure.
+  # Since we can't properly handle the dependencies for this, warn the user about the situation
+  if test -e $OUTPUT_ROOT/spec.gmk; then
+    IS_RECONFIGURE=yes
+  else
+    IS_RECONFIGURE=no
+  fi
 
-# Before generating output files, test if they exist. If they do, this is a reconfigure.
-# Since we can't properly handle the dependencies for this, warn the user about the situation
-if test -e $OUTPUT_ROOT/spec.gmk; then
-  IS_RECONFIGURE=yes
-else
-  IS_RECONFIGURE=no
-fi
-
-if test -e $SRC_ROOT/build/.hide-configure-performance-hints; then
-  HIDE_PERFORMANCE_HINTS=yes
-else
-  HIDE_PERFORMANCE_HINTS=no
-  # Hide it the next time around...
-  $TOUCH $SRC_ROOT/build/.hide-configure-performance-hints > /dev/null 2>&1
-fi
-
+  if test -e $SRC_ROOT/build/.hide-configure-performance-hints; then
+    HIDE_PERFORMANCE_HINTS=yes
+  else
+    HIDE_PERFORMANCE_HINTS=no
+    # Hide it the next time around...
+    $TOUCH $SRC_ROOT/build/.hide-configure-performance-hints > /dev/null 2>&1
+  fi
 ])
diff --git a/common/autoconf/basics_windows.m4 b/common/autoconf/basics_windows.m4
index 0a26d83..0d43553 100644
--- a/common/autoconf/basics_windows.m4
+++ b/common/autoconf/basics_windows.m4
@@ -145,7 +145,7 @@
     # Not in mixed or Windows style, start by that.
     new_path=`cmd //c echo $path`
   fi
-  
+
   BASIC_MAKE_WINDOWS_SPACE_SAFE_MSYS([$new_path])
   BASIC_WINDOWS_REWRITE_AS_UNIX_PATH(new_path)
   if test "x$path" != "x$new_path"; then
@@ -175,8 +175,8 @@
   # bat and cmd files are not always considered executable in cygwin causing which
   # to not find them
   if test "x$new_path" = x \
-           && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
-           && test "x`$LS \"$path\" 2>/dev/null`" != x; then
+      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
+      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
     new_path=`$CYGPATH -u "$path"`
   fi
   if test "x$new_path" = x; then
@@ -191,8 +191,8 @@
     # bat and cmd files are not always considered executable in cygwin causing which
     # to not find them
     if test "x$new_path" = x \
-             && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
-             && test "x`$LS \"$path\" 2>/dev/null`" != x; then
+        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
+        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
       new_path=`$CYGPATH -u "$path"`
     fi
     if test "x$new_path" = x; then
@@ -218,9 +218,9 @@
     # Short path failed, file does not exist as specified.
     # Try adding .exe or .cmd
     if test -f "${new_path}.exe"; then
-       input_to_shortpath="${new_path}.exe"
+      input_to_shortpath="${new_path}.exe"
     elif test -f "${new_path}.cmd"; then
-       input_to_shortpath="${new_path}.cmd"
+      input_to_shortpath="${new_path}.cmd"
     else
       AC_MSG_NOTICE([The path of $1, which resolves as "$new_path", is invalid.])
       AC_MSG_NOTICE([Neither "$new_path" nor "$new_path.exe/cmd" can be found])
@@ -254,7 +254,7 @@
 
   # Now try to locate executable using which
   new_path=`$WHICH "$new_path" 2> /dev/null`
-  
+
   if test "x$new_path" = x; then
     # Oops. Which didn't find the executable.
     # The splitting of arguments from the executable at a space might have been incorrect,
@@ -264,9 +264,9 @@
     arguments="EOL"
     new_path="$path"
     BASIC_WINDOWS_REWRITE_AS_UNIX_PATH(new_path)
-    
+
     new_path=`$WHICH "$new_path" 2> /dev/null`
-    
+
     if test "x$new_path" = x; then
       # It's still not found. Now this is an unrecoverable error.
       AC_MSG_NOTICE([The path of $1, which resolves as "$complete", is not found.])
@@ -302,7 +302,7 @@
 [
   SRC_ROOT_LENGTH=`$THEPWDCMD -L|$WC -m`
   if test $SRC_ROOT_LENGTH -gt 100; then
-      AC_MSG_ERROR([Your base path is too long. It is $SRC_ROOT_LENGTH characters long, but only 100 is supported])
+    AC_MSG_ERROR([Your base path is too long. It is $SRC_ROOT_LENGTH characters long, but only 100 is supported])
   fi
 
   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
@@ -311,14 +311,14 @@
     AC_MSG_RESULT([$CYGWIN_VERSION])
     WINDOWS_ENV_VENDOR='cygwin'
     WINDOWS_ENV_VERSION="$CYGWIN_VERSION"
-    
+
     CYGWIN_VERSION_OK=`$ECHO $CYGWIN_VERSION | $GREP ^1.7.`
     if test "x$CYGWIN_VERSION_OK" = x; then
       AC_MSG_NOTICE([Your cygwin is too old. You are running $CYGWIN_VERSION, but at least cygwin 1.7 is required. Please upgrade.])
       AC_MSG_ERROR([Cannot continue])
     fi
     if test "x$CYGPATH" = x; then
-        AC_MSG_ERROR([Something is wrong with your cygwin installation since I cannot find cygpath.exe in your path])
+      AC_MSG_ERROR([Something is wrong with your cygwin installation since I cannot find cygpath.exe in your path])
     fi
     AC_MSG_CHECKING([cygwin root directory as unix-style path])
     # The cmd output ends with Windows line endings (CR/LF), the grep command will strip that away
@@ -329,13 +329,13 @@
     WINDOWS_ENV_ROOT_PATH="$CYGWIN_ROOT_PATH"
     test_cygdrive_prefix=`$ECHO $CYGWIN_ROOT_PATH | $GREP ^/cygdrive/`
     if test "x$test_cygdrive_prefix" = x; then
-        AC_MSG_ERROR([Your cygdrive prefix is not /cygdrive. This is currently not supported. Change with mount -c.])
+      AC_MSG_ERROR([Your cygdrive prefix is not /cygdrive. This is currently not supported. Change with mount -c.])
     fi
   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
     AC_MSG_CHECKING([msys release])
     MSYS_VERSION=`$UNAME -r`
     AC_MSG_RESULT([$MSYS_VERSION])
-    
+
     WINDOWS_ENV_VENDOR='msys'
     WINDOWS_ENV_VERSION="$MSYS_VERSION"
 
@@ -367,12 +367,12 @@
 
 AC_DEFUN_ONCE([BASIC_COMPILE_FIXPATH],
 [
-# When using cygwin or msys, we need a wrapper binary that renames
-# /cygdrive/c/ arguments into c:/ arguments and peeks into
-# @files and rewrites these too! This wrapper binary is
-# called fixpath.
-FIXPATH=
-if test "x$OPENJDK_BUILD_OS" = xwindows; then
+  # When using cygwin or msys, we need a wrapper binary that renames
+  # /cygdrive/c/ arguments into c:/ arguments and peeks into
+  # @files and rewrites these too! This wrapper binary is
+  # called fixpath.
+  FIXPATH=
+  if test "x$OPENJDK_BUILD_OS" = xwindows; then
     AC_MSG_CHECKING([if fixpath can be created])
     FIXPATH_SRC="$SRC_ROOT/common/src/fixpath.c"
     FIXPATH_BIN="$OUTPUT_ROOT/fixpath.exe"
@@ -389,7 +389,7 @@
       # @ was chosen as separator to minimize risk of other tools messing around with it
       all_unique_prefixes=`echo "${all_fixpath_prefixes@<:@@@:>@}" | tr ' ' '\n' | grep '^/./' | sort | uniq`
       fixpath_argument_list=`echo $all_unique_prefixes  | tr ' ' '@'`
-      
+
       FIXPATH="$OUTPUT_ROOT/fixpath -m$fixpath_argument_list"
     fi
     rm -f $OUTPUT_ROOT/fixpath*
@@ -397,24 +397,24 @@
     $CC $FIXPATH_SRC -Fe$FIXPATH_BIN > $OUTPUT_ROOT/fixpath1.log 2>&1
     cd $CURDIR
 
-    if test ! -x $OUTPUT_ROOT/fixpath.exe; then 
-        AC_MSG_RESULT([no])
-        cat $OUTPUT_ROOT/fixpath1.log
-        AC_MSG_ERROR([Could not create $OUTPUT_ROOT/fixpath.exe])
+    if test ! -x $OUTPUT_ROOT/fixpath.exe; then
+      AC_MSG_RESULT([no])
+      cat $OUTPUT_ROOT/fixpath1.log
+      AC_MSG_ERROR([Could not create $OUTPUT_ROOT/fixpath.exe])
     fi
     AC_MSG_RESULT([yes])
     AC_MSG_CHECKING([if fixpath.exe works])
     cd $OUTPUT_ROOT
-    $FIXPATH $CC $SRC_ROOT/common/src/fixpath.c -Fe$OUTPUT_ROOT/fixpath2.exe > $OUTPUT_ROOT/fixpath2.log 2>&1 
+    $FIXPATH $CC $SRC_ROOT/common/src/fixpath.c -Fe$OUTPUT_ROOT/fixpath2.exe > $OUTPUT_ROOT/fixpath2.log 2>&1
     cd $CURDIR
-    if test ! -x $OUTPUT_ROOT/fixpath2.exe; then 
-        AC_MSG_RESULT([no])
-        cat $OUTPUT_ROOT/fixpath2.log
-        AC_MSG_ERROR([fixpath did not work!])
+    if test ! -x $OUTPUT_ROOT/fixpath2.exe; then
+      AC_MSG_RESULT([no])
+      cat $OUTPUT_ROOT/fixpath2.log
+      AC_MSG_ERROR([fixpath did not work!])
     fi
     AC_MSG_RESULT([yes])
     rm -f $OUTPUT_ROOT/fixpath?.??? $OUTPUT_ROOT/fixpath.obj
-fi
+  fi
 
-AC_SUBST(FIXPATH)
+  AC_SUBST(FIXPATH)
 ])
diff --git a/common/autoconf/boot-jdk.m4 b/common/autoconf/boot-jdk.m4
index 4a4ea36..2765295 100644
--- a/common/autoconf/boot-jdk.m4
+++ b/common/autoconf/boot-jdk.m4
@@ -44,7 +44,7 @@
           AC_MSG_NOTICE([Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring])
           AC_MSG_NOTICE([(This might be an JRE instead of an JDK)])
           BOOT_JDK_FOUND=no
-        else 
+        else
           # Do we have an rt.jar? (On MacOSX it is called classes.jar)
           if test ! -f "$BOOT_JDK/jre/lib/rt.jar" && test ! -f "$BOOT_JDK/../Classes/classes.jar"; then
             AC_MSG_NOTICE([Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring])
@@ -79,70 +79,70 @@
 # Test: Is bootjdk explicitely set by command line arguments?
 AC_DEFUN([BOOTJDK_CHECK_ARGUMENTS],
 [
-if test "x$with_boot_jdk" != x; then
+  if test "x$with_boot_jdk" != x; then
     BOOT_JDK=$with_boot_jdk
     BOOT_JDK_FOUND=maybe
     AC_MSG_NOTICE([Found potential Boot JDK using configure arguments])
-fi
+  fi
 ])
 
 # Test: Is bootjdk available from builddeps?
 AC_DEFUN([BOOTJDK_CHECK_BUILDDEPS],
 [
-    BDEPS_CHECK_MODULE(BOOT_JDK, bootjdk, xxx, [BOOT_JDK_FOUND=maybe], [BOOT_JDK_FOUND=no])
+  BDEPS_CHECK_MODULE(BOOT_JDK, bootjdk, xxx, [BOOT_JDK_FOUND=maybe], [BOOT_JDK_FOUND=no])
 ])
 
 # Test: Is $JAVA_HOME set?
 AC_DEFUN([BOOTJDK_CHECK_JAVA_HOME],
 [
-    if test "x$JAVA_HOME" != x; then
-        JAVA_HOME_PROCESSED="$JAVA_HOME"
-        BASIC_FIXUP_PATH(JAVA_HOME_PROCESSED)
-        if test ! -d "$JAVA_HOME_PROCESSED"; then
-            AC_MSG_NOTICE([Your JAVA_HOME points to a non-existing directory!])
-        else
-          # Aha, the user has set a JAVA_HOME
-          # let us use that as the Boot JDK.
-          BOOT_JDK="$JAVA_HOME_PROCESSED"
-          BOOT_JDK_FOUND=maybe
-          AC_MSG_NOTICE([Found potential Boot JDK using JAVA_HOME])
-        fi
+  if test "x$JAVA_HOME" != x; then
+    JAVA_HOME_PROCESSED="$JAVA_HOME"
+    BASIC_FIXUP_PATH(JAVA_HOME_PROCESSED)
+    if test ! -d "$JAVA_HOME_PROCESSED"; then
+      AC_MSG_NOTICE([Your JAVA_HOME points to a non-existing directory!])
+    else
+      # Aha, the user has set a JAVA_HOME
+      # let us use that as the Boot JDK.
+      BOOT_JDK="$JAVA_HOME_PROCESSED"
+      BOOT_JDK_FOUND=maybe
+      AC_MSG_NOTICE([Found potential Boot JDK using JAVA_HOME])
     fi
+  fi
 ])
 
 # Test: Is there a java or javac in the PATH, which is a symlink to the JDK?
 AC_DEFUN([BOOTJDK_CHECK_JAVA_IN_PATH_IS_SYMLINK],
 [
-    AC_PATH_PROG(JAVAC_CHECK, javac)
-    AC_PATH_PROG(JAVA_CHECK, java)
-    BINARY="$JAVAC_CHECK"
-    if test "x$JAVAC_CHECK" = x; then
-        BINARY="$JAVA_CHECK"
+  AC_PATH_PROG(JAVAC_CHECK, javac)
+  AC_PATH_PROG(JAVA_CHECK, java)
+  BINARY="$JAVAC_CHECK"
+  if test "x$JAVAC_CHECK" = x; then
+    BINARY="$JAVA_CHECK"
+  fi
+  if test "x$BINARY" != x; then
+    # So there is a java(c) binary, it might be part of a JDK.
+    # Lets find the JDK/JRE directory by following symbolic links.
+    # Linux/GNU systems often have links from /usr/bin/java to
+    # /etc/alternatives/java to the real JDK binary.
+    BASIC_REMOVE_SYMBOLIC_LINKS(BINARY)
+    BOOT_JDK=`dirname "$BINARY"`
+    BOOT_JDK=`cd "$BOOT_JDK/.."; pwd`
+    if test -x "$BOOT_JDK/bin/javac" && test -x "$BOOT_JDK/bin/java"; then
+      # Looks like we found ourselves an JDK
+      BOOT_JDK_FOUND=maybe
+      AC_MSG_NOTICE([Found potential Boot JDK using java(c) in PATH])
     fi
-    if test "x$BINARY" != x; then
-        # So there is a java(c) binary, it might be part of a JDK.
-        # Lets find the JDK/JRE directory by following symbolic links.
-        # Linux/GNU systems often have links from /usr/bin/java to 
-        # /etc/alternatives/java to the real JDK binary.
-        BASIC_REMOVE_SYMBOLIC_LINKS(BINARY)
-        BOOT_JDK=`dirname "$BINARY"`
-        BOOT_JDK=`cd "$BOOT_JDK/.."; pwd`
-        if test -x "$BOOT_JDK/bin/javac" && test -x "$BOOT_JDK/bin/java"; then
-            # Looks like we found ourselves an JDK
-            BOOT_JDK_FOUND=maybe
-            AC_MSG_NOTICE([Found potential Boot JDK using java(c) in PATH])
-        fi
-    fi
+  fi
 ])
 
 # Test: Is there a /usr/libexec/java_home? (Typically on MacOSX)
 AC_DEFUN([BOOTJDK_CHECK_LIBEXEC_JAVA_HOME],
 [
-    if test -x /usr/libexec/java_home; then
-        BOOT_JDK=`/usr/libexec/java_home`
-        BOOT_JDK_FOUND=maybe
-        AC_MSG_NOTICE([Found potential Boot JDK using /usr/libexec/java_home])
-    fi
+  if test -x /usr/libexec/java_home; then
+    BOOT_JDK=`/usr/libexec/java_home`
+    BOOT_JDK_FOUND=maybe
+    AC_MSG_NOTICE([Found potential Boot JDK using /usr/libexec/java_home])
+  fi
 ])
 
 # Look for a jdk in the given path. If there are multiple, try to select the newest.
@@ -204,123 +204,123 @@
   AC_MSG_CHECKING([for $2 in Boot JDK])
   $1=$BOOT_JDK/bin/$2
   if test ! -x [$]$1; then
-      AC_MSG_RESULT(not found)
-      AC_MSG_NOTICE([Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk])
-      AC_MSG_ERROR([Could not find $2 in the Boot JDK])
+    AC_MSG_RESULT(not found)
+    AC_MSG_NOTICE([Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk])
+    AC_MSG_ERROR([Could not find $2 in the Boot JDK])
   fi
   AC_MSG_RESULT(ok)
 ])
 
 ###############################################################################
 #
-# We need a Boot JDK to bootstrap the build. 
+# We need a Boot JDK to bootstrap the build.
 #
 
 AC_DEFUN_ONCE([BOOTJDK_SETUP_BOOT_JDK],
 [
-BOOT_JDK_FOUND=no
-AC_ARG_WITH(boot-jdk, [AS_HELP_STRING([--with-boot-jdk],
-    [path to Boot JDK (used to bootstrap build) @<:@probed@:>@])])
+  BOOT_JDK_FOUND=no
+  AC_ARG_WITH(boot-jdk, [AS_HELP_STRING([--with-boot-jdk],
+      [path to Boot JDK (used to bootstrap build) @<:@probed@:>@])])
 
-# We look for the Boot JDK through various means, going from more certain to
-# more of a guess-work. After each test, BOOT_JDK_FOUND is set to "yes" if
-# we detected something (if so, the path to the jdk is in BOOT_JDK). But we 
-# must check if this is indeed valid; otherwise we'll continue looking.
+  # We look for the Boot JDK through various means, going from more certain to
+  # more of a guess-work. After each test, BOOT_JDK_FOUND is set to "yes" if
+  # we detected something (if so, the path to the jdk is in BOOT_JDK). But we
+  # must check if this is indeed valid; otherwise we'll continue looking.
 
-# Test: Is bootjdk explicitely set by command line arguments?
-BOOTJDK_DO_CHECK([BOOTJDK_CHECK_ARGUMENTS])
-if test "x$with_boot_jdk" != x && test "x$BOOT_JDK_FOUND" = xno; then
-  # Having specified an argument which is incorrect will produce an instant failure;
-  # we should not go on looking
-  AC_MSG_ERROR([The path given by --with-boot-jdk does not contain a valid Boot JDK])
-fi
+  # Test: Is bootjdk explicitely set by command line arguments?
+  BOOTJDK_DO_CHECK([BOOTJDK_CHECK_ARGUMENTS])
+  if test "x$with_boot_jdk" != x && test "x$BOOT_JDK_FOUND" = xno; then
+    # Having specified an argument which is incorrect will produce an instant failure;
+    # we should not go on looking
+    AC_MSG_ERROR([The path given by --with-boot-jdk does not contain a valid Boot JDK])
+  fi
 
-# Test: Is bootjdk available from builddeps?
-BOOTJDK_DO_CHECK([BOOTJDK_CHECK_BUILDDEPS])
+  # Test: Is bootjdk available from builddeps?
+  BOOTJDK_DO_CHECK([BOOTJDK_CHECK_BUILDDEPS])
 
-# Test: Is $JAVA_HOME set?
-BOOTJDK_DO_CHECK([BOOTJDK_CHECK_JAVA_HOME])
+  # Test: Is $JAVA_HOME set?
+  BOOTJDK_DO_CHECK([BOOTJDK_CHECK_JAVA_HOME])
 
-# Test: Is there a /usr/libexec/java_home? (Typically on MacOSX)
-BOOTJDK_DO_CHECK([BOOTJDK_CHECK_LIBEXEC_JAVA_HOME])
+  # Test: Is there a /usr/libexec/java_home? (Typically on MacOSX)
+  BOOTJDK_DO_CHECK([BOOTJDK_CHECK_LIBEXEC_JAVA_HOME])
 
-# Test: Is there a java or javac in the PATH, which is a symlink to the JDK?
-BOOTJDK_DO_CHECK([BOOTJDK_CHECK_JAVA_IN_PATH_IS_SYMLINK])
+  # Test: Is there a java or javac in the PATH, which is a symlink to the JDK?
+  BOOTJDK_DO_CHECK([BOOTJDK_CHECK_JAVA_IN_PATH_IS_SYMLINK])
 
-# Test: Is there a JDK installed in default, well-known locations?
-BOOTJDK_DO_CHECK([BOOTJDK_CHECK_WELL_KNOWN_LOCATIONS])
+  # Test: Is there a JDK installed in default, well-known locations?
+  BOOTJDK_DO_CHECK([BOOTJDK_CHECK_WELL_KNOWN_LOCATIONS])
 
-# If we haven't found anything yet, we've truly lost. Give up.
-if test "x$BOOT_JDK_FOUND" = xno; then
-  HELP_MSG_MISSING_DEPENDENCY([openjdk])
-  AC_MSG_NOTICE([Could not find a valid Boot JDK. $HELP_MSG])
-  AC_MSG_NOTICE([This might be fixed by explicitely setting --with-boot-jdk])
-  AC_MSG_ERROR([Cannot continue])
-fi
+  # If we haven't found anything yet, we've truly lost. Give up.
+  if test "x$BOOT_JDK_FOUND" = xno; then
+    HELP_MSG_MISSING_DEPENDENCY([openjdk])
+    AC_MSG_NOTICE([Could not find a valid Boot JDK. $HELP_MSG])
+    AC_MSG_NOTICE([This might be fixed by explicitely setting --with-boot-jdk])
+    AC_MSG_ERROR([Cannot continue])
+  fi
 
-# Setup proper paths for what we found
-BOOT_RTJAR="$BOOT_JDK/jre/lib/rt.jar"
-if test ! -f "$BOOT_RTJAR"; then
+  # Setup proper paths for what we found
+  BOOT_RTJAR="$BOOT_JDK/jre/lib/rt.jar"
+  if test ! -f "$BOOT_RTJAR"; then
     # On MacOSX it is called classes.jar
     BOOT_RTJAR="$BOOT_JDK/../Classes/classes.jar"
     if test -f "$BOOT_RTJAR"; then
-      # Remove the .. 
+      # Remove the ..
       BOOT_RTJAR="`cd ${BOOT_RTJAR%/*} && pwd`/${BOOT_RTJAR##*/}"
     fi
-fi
-BOOT_TOOLSJAR="$BOOT_JDK/lib/tools.jar"
-BOOT_JDK="$BOOT_JDK"
-AC_SUBST(BOOT_RTJAR)
-AC_SUBST(BOOT_TOOLSJAR)
-AC_SUBST(BOOT_JDK)
+  fi
+  BOOT_TOOLSJAR="$BOOT_JDK/lib/tools.jar"
+  BOOT_JDK="$BOOT_JDK"
+  AC_SUBST(BOOT_RTJAR)
+  AC_SUBST(BOOT_TOOLSJAR)
+  AC_SUBST(BOOT_JDK)
 
-# Setup tools from the Boot JDK.
-BOOTJDK_CHECK_TOOL_IN_BOOTJDK(JAVA,java)
-BOOTJDK_CHECK_TOOL_IN_BOOTJDK(JAVAC,javac)
-BOOTJDK_CHECK_TOOL_IN_BOOTJDK(JAVAH,javah)
-BOOTJDK_CHECK_TOOL_IN_BOOTJDK(JAVAP,javap)
-BOOTJDK_CHECK_TOOL_IN_BOOTJDK(JAR,jar)
-BOOTJDK_CHECK_TOOL_IN_BOOTJDK(RMIC,rmic)
-BOOTJDK_CHECK_TOOL_IN_BOOTJDK(NATIVE2ASCII,native2ascii)
+  # Setup tools from the Boot JDK.
+  BOOTJDK_CHECK_TOOL_IN_BOOTJDK(JAVA,java)
+  BOOTJDK_CHECK_TOOL_IN_BOOTJDK(JAVAC,javac)
+  BOOTJDK_CHECK_TOOL_IN_BOOTJDK(JAVAH,javah)
+  BOOTJDK_CHECK_TOOL_IN_BOOTJDK(JAVAP,javap)
+  BOOTJDK_CHECK_TOOL_IN_BOOTJDK(JAR,jar)
+  BOOTJDK_CHECK_TOOL_IN_BOOTJDK(RMIC,rmic)
+  BOOTJDK_CHECK_TOOL_IN_BOOTJDK(NATIVE2ASCII,native2ascii)
 
-# Finally, set some other options...
+  # Finally, set some other options...
 
-# When compiling code to be executed by the Boot JDK, force jdk7 compatibility.
-BOOT_JDK_SOURCETARGET="-source 7 -target 7"
-AC_SUBST(BOOT_JDK_SOURCETARGET)
-AC_SUBST(JAVAC_FLAGS)
+  # When compiling code to be executed by the Boot JDK, force jdk7 compatibility.
+  BOOT_JDK_SOURCETARGET="-source 7 -target 7"
+  AC_SUBST(BOOT_JDK_SOURCETARGET)
+  AC_SUBST(JAVAC_FLAGS)
 ])
 
 AC_DEFUN_ONCE([BOOTJDK_SETUP_BOOT_JDK_ARGUMENTS],
 [
-##############################################################################
-#
-# Specify options for anything that is run with the Boot JDK.
-#
-AC_ARG_WITH(boot-jdk-jvmargs, [AS_HELP_STRING([--with-boot-jdk-jvmargs],
-	[specify JVM arguments to be passed to all invocations of the Boot JDK, overriding the default values,
-     e.g --with-boot-jdk-jvmargs="-Xmx8G -enableassertions"])])
+  ##############################################################################
+  #
+  # Specify options for anything that is run with the Boot JDK.
+  #
+  AC_ARG_WITH(boot-jdk-jvmargs, [AS_HELP_STRING([--with-boot-jdk-jvmargs],
+  [specify JVM arguments to be passed to all invocations of the Boot JDK, overriding the default values,
+  e.g --with-boot-jdk-jvmargs="-Xmx8G -enableassertions"])])
 
-if test "x$with_boot_jdk_jvmargs" = x; then
+  if test "x$with_boot_jdk_jvmargs" = x; then
     # Not all JVM:s accept the same arguments on the command line.
     # OpenJDK specific increase in thread stack for JDK build,
     # well more specifically, when running javac.
     if test "x$BUILD_NUM_BITS" = x32; then
-       STACK_SIZE=768
+      STACK_SIZE=768
     else
-       # Running Javac on a JVM on a 64-bit machine, the stack takes more space
-       # since 64-bit pointers are pushed on the stach. Apparently, we need
-       # to increase the stack space when javacing the JDK....
-       STACK_SIZE=1536
+      # Running Javac on a JVM on a 64-bit machine, the stack takes more space
+      # since 64-bit pointers are pushed on the stach. Apparently, we need
+      # to increase the stack space when javacing the JDK....
+      STACK_SIZE=1536
     fi
 
     # Minimum amount of heap memory.
     ADD_JVM_ARG_IF_OK([-Xms64M],boot_jdk_jvmargs,[$JAVA])
     if test "x$OPENJDK_TARGET_OS" = "xmacosx"; then
-        # Why does macosx need more heap? Its the huge JDK batch.
-        ADD_JVM_ARG_IF_OK([-Xmx1600M],boot_jdk_jvmargs,[$JAVA])
+      # Why does macosx need more heap? Its the huge JDK batch.
+      ADD_JVM_ARG_IF_OK([-Xmx1600M],boot_jdk_jvmargs,[$JAVA])
     else
-        ADD_JVM_ARG_IF_OK([-Xmx1100M],boot_jdk_jvmargs,[$JAVA])
+      ADD_JVM_ARG_IF_OK([-Xmx1100M],boot_jdk_jvmargs,[$JAVA])
     fi
     # When is adding -client something that speeds up the JVM?
     # ADD_JVM_ARG_IF_OK([-client],boot_jdk_jvmargs,[$JAVA])
@@ -329,7 +329,7 @@
     ADD_JVM_ARG_IF_OK([-XX:ThreadStackSize=$STACK_SIZE],boot_jdk_jvmargs,[$JAVA])
     # Disable special log output when a debug build is used as Boot JDK...
     ADD_JVM_ARG_IF_OK([-XX:-PrintVMOptions -XX:-UnlockDiagnosticVMOptions -XX:-LogVMOutput],boot_jdk_jvmargs,[$JAVA])
-fi
+  fi
 
-AC_SUBST(BOOT_JDK_JVMARGS, $boot_jdk_jvmargs)
+  AC_SUBST(BOOT_JDK_JVMARGS, $boot_jdk_jvmargs)
 ])
diff --git a/common/autoconf/bootcycle-spec.gmk.in b/common/autoconf/bootcycle-spec.gmk.in
index 9bc4007..cecc647 100644
--- a/common/autoconf/bootcycle-spec.gmk.in
+++ b/common/autoconf/bootcycle-spec.gmk.in
@@ -36,7 +36,7 @@
   JAVA_EXEC_POS=1
 endif
 ifneq ($(word $(JAVA_EXEC_POS),$(SJAVAC_SERVER_JAVA)),$(word $(JAVA_EXEC_POS),$(JAVA)))
-    $(error Bootcycle builds are not possible if --with-sjavac-server-java is specified)
+  $(error Bootcycle builds are not possible if --with-sjavac-server-java is specified)
 endif
 
 
diff --git a/common/autoconf/build-aux/config.guess b/common/autoconf/build-aux/config.guess
index 572ed2b..bd41aec 100644
--- a/common/autoconf/build-aux/config.guess
+++ b/common/autoconf/build-aux/config.guess
@@ -58,6 +58,6 @@
       OUT=$REAL_CPU`echo $OUT | sed -e 's/[^-]*//'`
       ;;
   esac
-fi  
+fi
 
 echo $OUT
diff --git a/common/autoconf/build-performance.m4 b/common/autoconf/build-performance.m4
index 9c4868a..ff7b250 100644
--- a/common/autoconf/build-performance.m4
+++ b/common/autoconf/build-performance.m4
@@ -25,78 +25,77 @@
 
 AC_DEFUN([BPERF_CHECK_CORES],
 [
-    AC_MSG_CHECKING([for number of cores])
-    NUM_CORES=1
-    FOUND_CORES=no
-    
-    if test -f /proc/cpuinfo; then
-        # Looks like a Linux (or cygwin) system
-        NUM_CORES=`cat /proc/cpuinfo  | grep -c processor`
-        FOUND_CORES=yes
-    elif test -x /usr/sbin/psrinfo; then
-        # Looks like a Solaris system
-        NUM_CORES=`LC_MESSAGES=C /usr/sbin/psrinfo -v | grep -c on-line`
-        FOUND_CORES=yes
-    elif test -x /usr/sbin/system_profiler; then
-        # Looks like a MacOSX system
-        NUM_CORES=`/usr/sbin/system_profiler -detailLevel full SPHardwareDataType | grep 'Cores' | awk  '{print [$]5}'`
-        FOUND_CORES=yes
-    elif test -n "$NUMBER_OF_PROCESSORS"; then
-        # On windows, look in the env
-        NUM_CORES=$NUMBER_OF_PROCESSORS
-        FOUND_CORES=yes
-    fi
+  AC_MSG_CHECKING([for number of cores])
+  NUM_CORES=1
+  FOUND_CORES=no
 
-    if test "x$FOUND_CORES" = xyes; then
-        AC_MSG_RESULT([$NUM_CORES])
-    else
-        AC_MSG_RESULT([could not detect number of cores, defaulting to 1])
-        AC_MSG_WARN([This will disable all parallelism from build!])
-    fi 
+  if test -f /proc/cpuinfo; then
+    # Looks like a Linux (or cygwin) system
+    NUM_CORES=`cat /proc/cpuinfo  | grep -c processor`
+    FOUND_CORES=yes
+  elif test -x /usr/sbin/psrinfo; then
+    # Looks like a Solaris system
+    NUM_CORES=`LC_MESSAGES=C /usr/sbin/psrinfo -v | grep -c on-line`
+    FOUND_CORES=yes
+  elif test -x /usr/sbin/system_profiler; then
+    # Looks like a MacOSX system
+    NUM_CORES=`/usr/sbin/system_profiler -detailLevel full SPHardwareDataType | grep 'Cores' | awk  '{print [$]5}'`
+    FOUND_CORES=yes
+  elif test -n "$NUMBER_OF_PROCESSORS"; then
+    # On windows, look in the env
+    NUM_CORES=$NUMBER_OF_PROCESSORS
+    FOUND_CORES=yes
+  fi
 
+  if test "x$FOUND_CORES" = xyes; then
+    AC_MSG_RESULT([$NUM_CORES])
+  else
+    AC_MSG_RESULT([could not detect number of cores, defaulting to 1])
+    AC_MSG_WARN([This will disable all parallelism from build!])
+  fi
 ])
 
 AC_DEFUN([BPERF_CHECK_MEMORY_SIZE],
 [
-    AC_MSG_CHECKING([for memory size])
-    # Default to 1024 MB
-    MEMORY_SIZE=1024
-    FOUND_MEM=no
-    
-    if test -f /proc/meminfo; then
-        # Looks like a Linux (or cygwin) system
-        MEMORY_SIZE=`cat /proc/meminfo | grep MemTotal | awk '{print [$]2}'`
-        MEMORY_SIZE=`expr $MEMORY_SIZE / 1024`
-        FOUND_MEM=yes
-    elif test -x /usr/sbin/prtconf; then
-        # Looks like a Solaris system
-        MEMORY_SIZE=`/usr/sbin/prtconf | grep "Memory size" | awk '{ print [$]3 }'`
-        FOUND_MEM=yes
-    elif test -x /usr/sbin/system_profiler; then
-        # Looks like a MacOSX system
-        MEMORY_SIZE=`/usr/sbin/system_profiler -detailLevel full SPHardwareDataType | grep 'Memory' | awk  '{print [$]2}'`
-        MEMORY_SIZE=`expr $MEMORY_SIZE \* 1024`
-        FOUND_MEM=yes
-    elif test "x$OPENJDK_BUILD_OS" = xwindows; then
-        # Windows, but without cygwin
-        MEMORY_SIZE=`wmic computersystem get totalphysicalmemory -value | grep = | cut -d "=" -f 2-`
-        MEMORY_SIZE=`expr $MEMORY_SIZE / 1024 / 1024`
-        FOUND_MEM=yes    
-    fi
+  AC_MSG_CHECKING([for memory size])
+  # Default to 1024 MB
+  MEMORY_SIZE=1024
+  FOUND_MEM=no
 
-    if test "x$FOUND_MEM" = xyes; then
-        AC_MSG_RESULT([$MEMORY_SIZE MB])
-    else
-        AC_MSG_RESULT([could not detect memory size, defaulting to 1024 MB])
-        AC_MSG_WARN([This might seriously impact build performance!])
-    fi 
+  if test -f /proc/meminfo; then
+    # Looks like a Linux (or cygwin) system
+    MEMORY_SIZE=`cat /proc/meminfo | grep MemTotal | awk '{print [$]2}'`
+    MEMORY_SIZE=`expr $MEMORY_SIZE / 1024`
+    FOUND_MEM=yes
+  elif test -x /usr/sbin/prtconf; then
+    # Looks like a Solaris system
+    MEMORY_SIZE=`/usr/sbin/prtconf | grep "Memory size" | awk '{ print [$]3 }'`
+    FOUND_MEM=yes
+  elif test -x /usr/sbin/system_profiler; then
+    # Looks like a MacOSX system
+    MEMORY_SIZE=`/usr/sbin/system_profiler -detailLevel full SPHardwareDataType | grep 'Memory' | awk  '{print [$]2}'`
+    MEMORY_SIZE=`expr $MEMORY_SIZE \* 1024`
+    FOUND_MEM=yes
+  elif test "x$OPENJDK_BUILD_OS" = xwindows; then
+    # Windows, but without cygwin
+    MEMORY_SIZE=`wmic computersystem get totalphysicalmemory -value | grep = | cut -d "=" -f 2-`
+    MEMORY_SIZE=`expr $MEMORY_SIZE / 1024 / 1024`
+    FOUND_MEM=yes
+  fi
+
+  if test "x$FOUND_MEM" = xyes; then
+    AC_MSG_RESULT([$MEMORY_SIZE MB])
+  else
+    AC_MSG_RESULT([could not detect memory size, defaulting to 1024 MB])
+    AC_MSG_WARN([This might seriously impact build performance!])
+  fi
 ])
 
 AC_DEFUN_ONCE([BPERF_SETUP_BUILD_CORES],
 [
   # How many cores do we have on this build system?
   AC_ARG_WITH(num-cores, [AS_HELP_STRING([--with-num-cores],
-    [number of cores in the build system, e.g. --with-num-cores=8 @<:@probed@:>@])])
+      [number of cores in the build system, e.g. --with-num-cores=8 @<:@probed@:>@])])
   if test "x$with_num_cores" = x; then
     # The number of cores were not specified, try to probe them.
     BPERF_CHECK_CORES
@@ -110,7 +109,7 @@
 [
   # How much memory do we have on this build system?
   AC_ARG_WITH(memory-size, [AS_HELP_STRING([--with-memory-size],
-    [memory (in MB) available in the build system, e.g. --with-memory-size=1024 @<:@probed@:>@])])
+      [memory (in MB) available in the build system, e.g. --with-memory-size=1024 @<:@probed@:>@])])
   if test "x$with_memory_size" = x; then
     # The memory size was not specified, try to probe it.
     BPERF_CHECK_MEMORY_SIZE
@@ -122,10 +121,10 @@
 
 AC_DEFUN_ONCE([BPERF_SETUP_BUILD_JOBS],
 [
-  # Provide a decent default number of parallel jobs for make depending on 
+  # Provide a decent default number of parallel jobs for make depending on
   # number of cores, amount of memory and machine architecture.
   AC_ARG_WITH(jobs, [AS_HELP_STRING([--with-jobs],
-    [number of parallel jobs to let make run @<:@calculated based on cores and memory@:>@])])
+      [number of parallel jobs to let make run @<:@calculated based on cores and memory@:>@])])
   if test "x$with_jobs" = x; then
     # Number of jobs was not specified, calculate.
     AC_MSG_CHECKING([for appropriate number of jobs to run in parallel])
@@ -157,179 +156,178 @@
 
 AC_DEFUN([BPERF_SETUP_CCACHE],
 [
-    AC_ARG_ENABLE([ccache],
-	      [AS_HELP_STRING([--disable-ccache],
-	      		      [disable using ccache to speed up recompilations @<:@enabled@:>@])],
-              [ENABLE_CCACHE=${enable_ccache}], [ENABLE_CCACHE=yes])
-    if test "x$ENABLE_CCACHE" = xyes; then
-        OLD_PATH="$PATH"
-        if test "x$TOOLS_DIR" != x; then
-          PATH=$TOOLS_DIR:$PATH
-        fi
-        AC_PATH_PROG(CCACHE, ccache)
-        PATH="$OLD_PATH"
-    else
-        AC_MSG_CHECKING([for ccache])
-        AC_MSG_RESULT([explicitly disabled])    
-        CCACHE=
-    fi    
-    AC_SUBST(CCACHE)
-
-    AC_ARG_WITH([ccache-dir],
-	      [AS_HELP_STRING([--with-ccache-dir],
-	      		      [where to store ccache files @<:@~/.ccache@:>@])])
-
-    if test "x$with_ccache_dir" != x; then
-        # When using a non home ccache directory, assume the use is to share ccache files
-        # with other users. Thus change the umask.
-        SET_CCACHE_DIR="CCACHE_DIR=$with_ccache_dir CCACHE_UMASK=002"
+  AC_ARG_ENABLE([ccache],
+      [AS_HELP_STRING([--disable-ccache],
+      [disable using ccache to speed up recompilations @<:@enabled@:>@])],
+      [ENABLE_CCACHE=${enable_ccache}], [ENABLE_CCACHE=yes])
+  if test "x$ENABLE_CCACHE" = xyes; then
+    OLD_PATH="$PATH"
+    if test "x$TOOLS_DIR" != x; then
+      PATH=$TOOLS_DIR:$PATH
     fi
-    CCACHE_FOUND=""
-    if test "x$CCACHE" != x; then
-        BPERF_SETUP_CCACHE_USAGE
-    fi    
+    AC_PATH_PROG(CCACHE, ccache)
+    PATH="$OLD_PATH"
+  else
+    AC_MSG_CHECKING([for ccache])
+    AC_MSG_RESULT([explicitly disabled])
+    CCACHE=
+  fi
+  AC_SUBST(CCACHE)
+
+  AC_ARG_WITH([ccache-dir],
+      [AS_HELP_STRING([--with-ccache-dir],
+      [where to store ccache files @<:@~/.ccache@:>@])])
+
+  if test "x$with_ccache_dir" != x; then
+    # When using a non home ccache directory, assume the use is to share ccache files
+    # with other users. Thus change the umask.
+    SET_CCACHE_DIR="CCACHE_DIR=$with_ccache_dir CCACHE_UMASK=002"
+  fi
+  CCACHE_FOUND=""
+  if test "x$CCACHE" != x; then
+    BPERF_SETUP_CCACHE_USAGE
+  fi
 ])
 
 AC_DEFUN([BPERF_SETUP_CCACHE_USAGE],
 [
-    if test "x$CCACHE" != x; then
-        CCACHE_FOUND="true"
-        # Only use ccache if it is 3.1.4 or later, which supports
-        # precompiled headers.
-        AC_MSG_CHECKING([if ccache supports precompiled headers])
-        HAS_GOOD_CCACHE=`($CCACHE --version | head -n 1 | grep -E 3.1.@<:@456789@:>@) 2> /dev/null`
-        if test "x$HAS_GOOD_CCACHE" = x; then
-            AC_MSG_RESULT([no, disabling ccache])
-            CCACHE=
-        else
-            AC_MSG_RESULT([yes])
-            AC_MSG_CHECKING([if C-compiler supports ccache precompiled headers])
-            PUSHED_FLAGS="$CXXFLAGS"
-            CXXFLAGS="-fpch-preprocess $CXXFLAGS"
-            AC_COMPILE_IFELSE([AC_LANG_PROGRAM([], [])], [CC_KNOWS_CCACHE_TRICK=yes], [CC_KNOWS_CCACHE_TRICK=no])
-            CXXFLAGS="$PUSHED_FLAGS"
-            if test "x$CC_KNOWS_CCACHE_TRICK" = xyes; then
-                AC_MSG_RESULT([yes])
-            else
-                AC_MSG_RESULT([no, disabling ccaching of precompiled headers])
-                CCACHE=
-            fi
-        fi
+  if test "x$CCACHE" != x; then
+    CCACHE_FOUND="true"
+    # Only use ccache if it is 3.1.4 or later, which supports
+    # precompiled headers.
+    AC_MSG_CHECKING([if ccache supports precompiled headers])
+    HAS_GOOD_CCACHE=`($CCACHE --version | head -n 1 | grep -E 3.1.@<:@456789@:>@) 2> /dev/null`
+    if test "x$HAS_GOOD_CCACHE" = x; then
+      AC_MSG_RESULT([no, disabling ccache])
+      CCACHE=
+    else
+      AC_MSG_RESULT([yes])
+      AC_MSG_CHECKING([if C-compiler supports ccache precompiled headers])
+      PUSHED_FLAGS="$CXXFLAGS"
+      CXXFLAGS="-fpch-preprocess $CXXFLAGS"
+      AC_COMPILE_IFELSE([AC_LANG_PROGRAM([], [])], [CC_KNOWS_CCACHE_TRICK=yes], [CC_KNOWS_CCACHE_TRICK=no])
+      CXXFLAGS="$PUSHED_FLAGS"
+      if test "x$CC_KNOWS_CCACHE_TRICK" = xyes; then
+        AC_MSG_RESULT([yes])
+      else
+        AC_MSG_RESULT([no, disabling ccaching of precompiled headers])
+        CCACHE=
+      fi
     fi
+  fi
 
-    if test "x$CCACHE" != x; then
-        CCACHE_SLOPPINESS=time_macros
-        CCACHE="CCACHE_COMPRESS=1 $SET_CCACHE_DIR CCACHE_SLOPPINESS=$CCACHE_SLOPPINESS $CCACHE"
-        CCACHE_FLAGS=-fpch-preprocess
+  if test "x$CCACHE" != x; then
+    CCACHE_SLOPPINESS=time_macros
+    CCACHE="CCACHE_COMPRESS=1 $SET_CCACHE_DIR CCACHE_SLOPPINESS=$CCACHE_SLOPPINESS $CCACHE"
+    CCACHE_FLAGS=-fpch-preprocess
 
-        if test "x$SET_CCACHE_DIR" != x; then
-            mkdir -p $CCACHE_DIR > /dev/null 2>&1
-	    chmod a+rwxs $CCACHE_DIR > /dev/null 2>&1
-        fi
+    if test "x$SET_CCACHE_DIR" != x; then
+      mkdir -p $CCACHE_DIR > /dev/null 2>&1
+      chmod a+rwxs $CCACHE_DIR > /dev/null 2>&1
     fi
+  fi
 ])
 
 AC_DEFUN_ONCE([BPERF_SETUP_PRECOMPILED_HEADERS],
 [
-       
-###############################################################################
-#
-# Can the C/C++ compiler use precompiled headers?
-#
-AC_ARG_ENABLE([precompiled-headers], [AS_HELP_STRING([--disable-precompiled-headers],
-	[disable using precompiled headers when compiling C++ @<:@enabled@:>@])],
-    [ENABLE_PRECOMPH=${enable_precompiled_headers}], [ENABLE_PRECOMPH=yes])
 
-USE_PRECOMPILED_HEADER=1
-if test "x$ENABLE_PRECOMPH" = xno; then
+  ###############################################################################
+  #
+  # Can the C/C++ compiler use precompiled headers?
+  #
+  AC_ARG_ENABLE([precompiled-headers], [AS_HELP_STRING([--disable-precompiled-headers],
+      [disable using precompiled headers when compiling C++ @<:@enabled@:>@])],
+      [ENABLE_PRECOMPH=${enable_precompiled_headers}], [ENABLE_PRECOMPH=yes])
+
+  USE_PRECOMPILED_HEADER=1
+  if test "x$ENABLE_PRECOMPH" = xno; then
     USE_PRECOMPILED_HEADER=0
-fi
+  fi
 
-if test "x$ENABLE_PRECOMPH" = xyes; then
+  if test "x$ENABLE_PRECOMPH" = xyes; then
     # Check that the compiler actually supports precomp headers.
     if test "x$GCC" = xyes; then
-         AC_MSG_CHECKING([that precompiled headers work])
-         echo "int alfa();" > conftest.h
-         $CXX -x c++-header conftest.h -o conftest.hpp.gch 2>&AS_MESSAGE_LOG_FD >&AS_MESSAGE_LOG_FD
-         if test ! -f conftest.hpp.gch; then
-             USE_PRECOMPILED_HEADER=0
-             AC_MSG_RESULT([no])        
-         else
-             AC_MSG_RESULT([yes])
-         fi
-         rm -f conftest.h conftest.hpp.gch
+      AC_MSG_CHECKING([that precompiled headers work])
+      echo "int alfa();" > conftest.h
+      $CXX -x c++-header conftest.h -o conftest.hpp.gch 2>&AS_MESSAGE_LOG_FD >&AS_MESSAGE_LOG_FD
+      if test ! -f conftest.hpp.gch; then
+        USE_PRECOMPILED_HEADER=0
+        AC_MSG_RESULT([no])
+      else
+        AC_MSG_RESULT([yes])
+      fi
+      rm -f conftest.h conftest.hpp.gch
     fi
-fi
+  fi
 
-AC_SUBST(USE_PRECOMPILED_HEADER)
+  AC_SUBST(USE_PRECOMPILED_HEADER)
 ])
 
 
 AC_DEFUN_ONCE([BPERF_SETUP_SMART_JAVAC],
 [
-AC_ARG_WITH(sjavac-server-java, [AS_HELP_STRING([--with-sjavac-server-java],
-	[use this java binary for running the sjavac background server @<:@Boot JDK java@:>@])])
+  AC_ARG_WITH(sjavac-server-java, [AS_HELP_STRING([--with-sjavac-server-java],
+      [use this java binary for running the sjavac background server @<:@Boot JDK java@:>@])])
 
-if test "x$with_sjavac_server_java" != x; then
+  if test "x$with_sjavac_server_java" != x; then
     SJAVAC_SERVER_JAVA="$with_sjavac_server_java"
     FOUND_VERSION=`$SJAVAC_SERVER_JAVA -version 2>&1 | grep " version \""`
     if test "x$FOUND_VERSION" = x; then
-        AC_MSG_ERROR([Could not execute server java: $SJAVAC_SERVER_JAVA])
+      AC_MSG_ERROR([Could not execute server java: $SJAVAC_SERVER_JAVA])
     fi
-else
+  else
     SJAVAC_SERVER_JAVA=""
     # Hotspot specific options.
     ADD_JVM_ARG_IF_OK([-verbosegc],SJAVAC_SERVER_JAVA,[$JAVA])
     # JRockit specific options.
     ADD_JVM_ARG_IF_OK([-Xverbose:gc],SJAVAC_SERVER_JAVA,[$JAVA])
     SJAVAC_SERVER_JAVA="$JAVA $SJAVAC_SERVER_JAVA"
-fi                    
-AC_SUBST(SJAVAC_SERVER_JAVA)
+  fi
+  AC_SUBST(SJAVAC_SERVER_JAVA)
 
-if test "$MEMORY_SIZE" -gt "2500"; then
+  if test "$MEMORY_SIZE" -gt "2500"; then
     ADD_JVM_ARG_IF_OK([-d64],SJAVAC_SERVER_JAVA,[$SJAVAC_SERVER_JAVA])
     if test "$JVM_ARG_OK" = true; then
-        JVM_64BIT=true
-	JVM_ARG_OK=false
+      JVM_64BIT=true
+      JVM_ARG_OK=false
     fi
-    fi
+  fi
 
-if test "$JVM_64BIT" = true; then
+  if test "$JVM_64BIT" = true; then
     if test "$MEMORY_SIZE" -gt "17000"; then
-        ADD_JVM_ARG_IF_OK([-Xms10G -Xmx10G],SJAVAC_SERVER_JAVA,[$SJAVAC_SERVER_JAVA])
+      ADD_JVM_ARG_IF_OK([-Xms10G -Xmx10G],SJAVAC_SERVER_JAVA,[$SJAVAC_SERVER_JAVA])
     fi
     if test "$MEMORY_SIZE" -gt "10000" && test "$JVM_ARG_OK" = false; then
-        ADD_JVM_ARG_IF_OK([-Xms6G -Xmx6G],SJAVAC_SERVER_JAVA,[$SJAVAC_SERVER_JAVA])
+      ADD_JVM_ARG_IF_OK([-Xms6G -Xmx6G],SJAVAC_SERVER_JAVA,[$SJAVAC_SERVER_JAVA])
     fi
     if test "$MEMORY_SIZE" -gt "5000" && test "$JVM_ARG_OK" = false; then
-        ADD_JVM_ARG_IF_OK([-Xms1G -Xmx3G],SJAVAC_SERVER_JAVA,[$SJAVAC_SERVER_JAVA])
+      ADD_JVM_ARG_IF_OK([-Xms1G -Xmx3G],SJAVAC_SERVER_JAVA,[$SJAVAC_SERVER_JAVA])
     fi
     if test "$MEMORY_SIZE" -gt "3800" && test "$JVM_ARG_OK" = false; then
-        ADD_JVM_ARG_IF_OK([-Xms1G -Xmx2500M],SJAVAC_SERVER_JAVA,[$SJAVAC_SERVER_JAVA])
+      ADD_JVM_ARG_IF_OK([-Xms1G -Xmx2500M],SJAVAC_SERVER_JAVA,[$SJAVAC_SERVER_JAVA])
     fi
-fi
-if test "$MEMORY_SIZE" -gt "2500" && test "$JVM_ARG_OK" = false; then
+  fi
+  if test "$MEMORY_SIZE" -gt "2500" && test "$JVM_ARG_OK" = false; then
     ADD_JVM_ARG_IF_OK([-Xms1000M -Xmx1500M],SJAVAC_SERVER_JAVA,[$SJAVAC_SERVER_JAVA])
-fi
-if test "$MEMORY_SIZE" -gt "1000" && test "$JVM_ARG_OK" = false; then
+  fi
+  if test "$MEMORY_SIZE" -gt "1000" && test "$JVM_ARG_OK" = false; then
     ADD_JVM_ARG_IF_OK([-Xms400M -Xmx1100M],SJAVAC_SERVER_JAVA,[$SJAVAC_SERVER_JAVA])
-fi
-if test "$JVM_ARG_OK" = false; then
+  fi
+  if test "$JVM_ARG_OK" = false; then
     ADD_JVM_ARG_IF_OK([-Xms256M -Xmx512M],SJAVAC_SERVER_JAVA,[$SJAVAC_SERVER_JAVA])
-fi
+  fi
 
-AC_MSG_CHECKING([whether to use sjavac])
-AC_ARG_ENABLE([sjavac], [AS_HELP_STRING([--enable-sjavac],
-	[use sjavac to do fast incremental compiles @<:@disabled@:>@])],
-	[ENABLE_SJAVAC="${enableval}"], [ENABLE_SJAVAC='no'])
-AC_MSG_RESULT([$ENABLE_SJAVAC])
-AC_SUBST(ENABLE_SJAVAC)
+  AC_MSG_CHECKING([whether to use sjavac])
+  AC_ARG_ENABLE([sjavac], [AS_HELP_STRING([--enable-sjavac],
+      [use sjavac to do fast incremental compiles @<:@disabled@:>@])],
+      [ENABLE_SJAVAC="${enableval}"], [ENABLE_SJAVAC='no'])
+  AC_MSG_RESULT([$ENABLE_SJAVAC])
+  AC_SUBST(ENABLE_SJAVAC)
 
-if test "x$ENABLE_SJAVAC" = xyes; then
+  if test "x$ENABLE_SJAVAC" = xyes; then
     SJAVAC_SERVER_DIR="$OUTPUT_ROOT/javacservers"
-else
+  else
     SJAVAC_SERVER_DIR=
-fi
-AC_SUBST(SJAVAC_SERVER_DIR)
-
+  fi
+  AC_SUBST(SJAVAC_SERVER_DIR)
 ])
diff --git a/common/autoconf/builddeps.conf.example b/common/autoconf/builddeps.conf.example
index 4573aa2..f73bcb1 100644
--- a/common/autoconf/builddeps.conf.example
+++ b/common/autoconf/builddeps.conf.example
@@ -34,7 +34,7 @@
 # If no rewrite was found, then rewritten_target=${OPENJDK_TARGET_AUTOCONF_NAME}
 REWRITE_i686_pc_linux_gnu=i686-unknown-linux-gnu
 REWRITE_i386_pc_solaris2_10=i686-sun-solaris2_10
- 
+
 # The needed cups builddeps are platform independent header files.
 # I.e. they need not be part of the devkit.
 builddep_cups=lib/cups_1_3_9.zip
diff --git a/common/autoconf/builddeps.conf.nfs.example b/common/autoconf/builddeps.conf.nfs.example
index 200b650..1f9e16e 100644
--- a/common/autoconf/builddeps.conf.nfs.example
+++ b/common/autoconf/builddeps.conf.nfs.example
@@ -29,7 +29,7 @@
 
 REWRITE_i686_pc_linux_gnu=i686-unknown-linux-gnu
 REWRITE_i386_pc_solaris2_10=i686-sun-solaris2_10
- 
+
 DEVTOOLS=/java/devtools
 
 builddep_cups=${DEVTOOLS}/linux/cups/include
diff --git a/common/autoconf/builddeps.m4 b/common/autoconf/builddeps.m4
index 207be33..199b9e7 100644
--- a/common/autoconf/builddeps.m4
+++ b/common/autoconf/builddeps.m4
@@ -25,223 +25,223 @@
 
 AC_DEFUN_ONCE([BDEPS_SCAN_FOR_BUILDDEPS],
 [
-    define(LIST_OF_BUILD_DEPENDENCIES,)
-    if test "x$with_builddeps_server" != x || test "x$with_builddeps_conf" != x; then
-        if test "x$with_builddeps_conf" != x; then
-            AC_MSG_CHECKING([for supplied builddeps configuration file])
-            builddepsfile=$with_builddeps_conf        
-            if test -s $builddepsfile; then
-                . $builddepsfile
-                AC_MSG_RESULT([loaded!])
-            else
-               AC_MSG_ERROR([The given builddeps conf file $with_builddeps_conf could not be loaded!])
-           fi
-        else
-            AC_MSG_CHECKING([for builddeps.conf files in sources...])
-            builddepsfile=`mktemp`
-            touch $builddepsfile
-            # Put all found confs into a single file.
-            find ${SRC_ROOT} -name builddeps.conf -exec cat \{\} \; >> $builddepsfile
-            # Source the file to acquire the variables
-            if test -s $builddepsfile; then
-                . $builddepsfile
-                AC_MSG_RESULT([found at least one!])
-            else
-               AC_MSG_ERROR([Could not find any builddeps.conf at all!])
-           fi
-        fi
-        # Create build and target names that use _ instead of "-" and ".".
-        # This is necessary to use them in variable names.
-        build_var=`echo ${OPENJDK_BUILD_AUTOCONF_NAME} | tr '-' '_' | tr '.' '_'`
-        target_var=`echo ${OPENJDK_TARGET_AUTOCONF_NAME} | tr '-' '_' | tr '.' '_'`
-        # Extract rewrite information for build and target
-        eval rewritten_build=\${REWRITE_${build_var}}
-        if test "x$rewritten_build" = x; then
-            rewritten_build=${OPENJDK_BUILD_AUTOCONF_NAME}
-            echo Build stays the same $rewritten_build
-        else
-            echo Rewriting build for builddeps into $rewritten_build
-        fi
-        eval rewritten_target=\${REWRITE_${target_var}}
-        if test "x$rewritten_target" = x; then
-            rewritten_target=${OPENJDK_TARGET_AUTOCONF_NAME}
-            echo Target stays the same $rewritten_target
-        else
-            echo Rewriting target for builddeps into $rewritten_target
-        fi
-        rewritten_build_var=`echo ${rewritten_build} | tr '-' '_' | tr '.' '_'`
-        rewritten_target_var=`echo ${rewritten_target} | tr '-' '_' | tr '.' '_'`        
+  define(LIST_OF_BUILD_DEPENDENCIES,)
+  if test "x$with_builddeps_server" != x || test "x$with_builddeps_conf" != x; then
+    if test "x$with_builddeps_conf" != x; then
+      AC_MSG_CHECKING([for supplied builddeps configuration file])
+      builddepsfile=$with_builddeps_conf
+      if test -s $builddepsfile; then
+        . $builddepsfile
+        AC_MSG_RESULT([loaded!])
+      else
+        AC_MSG_ERROR([The given builddeps conf file $with_builddeps_conf could not be loaded!])
+      fi
+    else
+      AC_MSG_CHECKING([for builddeps.conf files in sources...])
+      builddepsfile=`mktemp`
+      touch $builddepsfile
+      # Put all found confs into a single file.
+      find ${SRC_ROOT} -name builddeps.conf -exec cat \{\} \; >> $builddepsfile
+      # Source the file to acquire the variables
+      if test -s $builddepsfile; then
+        . $builddepsfile
+        AC_MSG_RESULT([found at least one!])
+      else
+        AC_MSG_ERROR([Could not find any builddeps.conf at all!])
+      fi
     fi
-    AC_CHECK_PROGS(BDEPS_UNZIP, [7z unzip])
-    if test "x$BDEPS_UNZIP" = x7z; then
-        BDEPS_UNZIP="7z x"
+    # Create build and target names that use _ instead of "-" and ".".
+    # This is necessary to use them in variable names.
+    build_var=`echo ${OPENJDK_BUILD_AUTOCONF_NAME} | tr '-' '_' | tr '.' '_'`
+    target_var=`echo ${OPENJDK_TARGET_AUTOCONF_NAME} | tr '-' '_' | tr '.' '_'`
+    # Extract rewrite information for build and target
+    eval rewritten_build=\${REWRITE_${build_var}}
+    if test "x$rewritten_build" = x; then
+      rewritten_build=${OPENJDK_BUILD_AUTOCONF_NAME}
+      echo Build stays the same $rewritten_build
+    else
+      echo Rewriting build for builddeps into $rewritten_build
     fi
+    eval rewritten_target=\${REWRITE_${target_var}}
+    if test "x$rewritten_target" = x; then
+      rewritten_target=${OPENJDK_TARGET_AUTOCONF_NAME}
+      echo Target stays the same $rewritten_target
+    else
+      echo Rewriting target for builddeps into $rewritten_target
+    fi
+    rewritten_build_var=`echo ${rewritten_build} | tr '-' '_' | tr '.' '_'`
+    rewritten_target_var=`echo ${rewritten_target} | tr '-' '_' | tr '.' '_'`
+  fi
+  AC_CHECK_PROGS(BDEPS_UNZIP, [7z unzip])
+  if test "x$BDEPS_UNZIP" = x7z; then
+    BDEPS_UNZIP="7z x"
+  fi
 
-    AC_CHECK_PROGS(BDEPS_FTP, [wget lftp ftp]) 
+  AC_CHECK_PROGS(BDEPS_FTP, [wget lftp ftp])
 ])
 
 AC_DEFUN([BDEPS_FTPGET],
 [
-    # $1 is the ftp://abuilddeps.server.com/libs/cups.zip
-    # $2 is the local file name for the downloaded file.
-    VALID_TOOL=no
-    if test "x$BDEPS_FTP" = xwget; then
-       VALID_TOOL=yes
-       wget -O $2 $1
+  # $1 is the ftp://abuilddeps.server.com/libs/cups.zip
+  # $2 is the local file name for the downloaded file.
+  VALID_TOOL=no
+  if test "x$BDEPS_FTP" = xwget; then
+    VALID_TOOL=yes
+    wget -O $2 $1
+  fi
+  if test "x$BDEPS_FTP" = xlftp; then
+    VALID_TOOL=yes
+    lftp -c "get $1 -o $2"
+  fi
+  if test "x$BDEPS_FTP" = xftp; then
+    VALID_TOOL=yes
+    FTPSERVER=`echo $1 | cut -f 3 -d '/'`
+    FTPPATH=`echo $1 | cut -f 4- -d '/'`
+    FTPUSERPWD=${FTPSERVER%%@*}
+    if test "x$FTPSERVER" != "x$FTPUSERPWD"; then
+      FTPUSER=${userpwd%%:*}
+      FTPPWD=${userpwd#*@}
+      FTPSERVER=${FTPSERVER#*@}
+    else
+      FTPUSER=ftp
+      FTPPWD=ftp
     fi
-    if test "x$BDEPS_FTP" = xlftp; then
-       VALID_TOOL=yes
-       lftp -c "get $1 -o $2"
-    fi
-    if test "x$BDEPS_FTP" = xftp; then
-        VALID_TOOL=yes
-        FTPSERVER=`echo $1 | cut -f 3 -d '/'`
-        FTPPATH=`echo $1 | cut -f 4- -d '/'`
-        FTPUSERPWD=${FTPSERVER%%@*}
-        if test "x$FTPSERVER" != "x$FTPUSERPWD"; then
-            FTPUSER=${userpwd%%:*}
-            FTPPWD=${userpwd#*@}
-            FTPSERVER=${FTPSERVER#*@}
-        else
-            FTPUSER=ftp
-            FTPPWD=ftp
-        fi
-        # the "pass" command does not work on some
-        # ftp clients (read ftp.exe) but if it works,
-        # passive mode is better!
-        (\
-            echo "user $FTPUSER $FTPPWD"        ;\
-            echo "pass"                         ;\
-            echo "bin"                          ;\
-            echo "get $FTPPATH $2"              ;\
-        ) | ftp -in $FTPSERVER
-    fi
-    if test "x$VALID_TOOL" != xyes; then
-       AC_MSG_ERROR([I do not know how to use the tool: $BDEPS_FTP])
-    fi
+    # the "pass" command does not work on some
+    # ftp clients (read ftp.exe) but if it works,
+    # passive mode is better!
+    ( \
+        echo "user $FTPUSER $FTPPWD"        ; \
+        echo "pass"                         ; \
+        echo "bin"                          ; \
+        echo "get $FTPPATH $2"              ; \
+    ) | ftp -in $FTPSERVER
+  fi
+  if test "x$VALID_TOOL" != xyes; then
+    AC_MSG_ERROR([I do not know how to use the tool: $BDEPS_FTP])
+  fi
 ])
 
 AC_DEFUN([BDEPS_CHECK_MODULE],
 [
-    define([LIST_OF_BUILD_DEPENDENCIES],LIST_OF_BUILD_DEPENDENCIES[$2=$3'\n'])
-    if test "x$with_builddeps_server" != x || test "x$with_builddeps_conf" != x; then
-        # Source the builddeps file again, to make sure it uses the latest variables!
-        . $builddepsfile
-        # Look for a target and build machine specific resource!
-        eval resource=\${builddep_$2_BUILD_${rewritten_build_var}_TARGET_${rewritten_target_var}}
-        if test "x$resource" = x; then
-            # Ok, lets instead look for a target specific resource
-            eval resource=\${builddep_$2_TARGET_${rewritten_target_var}}
-        fi
-        if test "x$resource" = x; then
-            # Ok, lets instead look for a build specific resource
-            eval resource=\${builddep_$2_BUILD_${rewritten_build_var}}
-        fi
-        if test "x$resource" = x; then
-            # Ok, lets instead look for a generic resource
-            # (The $2 comes from M4 and not the shell, thus no need for eval here.)
-            resource=${builddep_$2}
-        fi
-        if test "x$resource" != x; then
-            AC_MSG_NOTICE([Using builddeps $resource for $2])
-	    # If the resource in the builddeps.conf file is an existing directory,
-	    # for example /java/linux/cups
-	    if test -d ${resource}; then
-	       depdir=${resource}
-	    else
-		BDEPS_FETCH($2, $resource, $with_builddeps_server, $with_builddeps_dir, depdir)
-	    fi
-            # Source the builddeps file again, because in the previous command, the depdir
-            # was updated to point at the current build dependency install directory.
-            . $builddepsfile
-            # Now extract variables from the builddeps.conf files.
-            theroot=${builddep_$2_ROOT}
-            thecflags=${builddep_$2_CFLAGS}
-            thelibs=${builddep_$2_LIBS}
-            if test "x$depdir" = x; then
-                AC_MSG_ERROR([Could not download build dependency $2])
-            fi
-            $1=$depdir
-            if test "x$theroot" != x; then
-               $1="$theroot"
-            fi
-            if test "x$thecflags" != x; then
-               $1_CFLAGS="$thecflags"
-            fi
-            if test "x$thelibs" != x; then
-               $1_LIBS="$thelibs"
-            fi
-            m4_default([$4], [:])
-            m4_ifvaln([$5], [else $5])
-        fi
-        m4_ifvaln([$5], [else $5])
+  define([LIST_OF_BUILD_DEPENDENCIES],LIST_OF_BUILD_DEPENDENCIES[$2=$3'\n'])
+  if test "x$with_builddeps_server" != x || test "x$with_builddeps_conf" != x; then
+    # Source the builddeps file again, to make sure it uses the latest variables!
+    . $builddepsfile
+    # Look for a target and build machine specific resource!
+    eval resource=\${builddep_$2_BUILD_${rewritten_build_var}_TARGET_${rewritten_target_var}}
+    if test "x$resource" = x; then
+      # Ok, lets instead look for a target specific resource
+      eval resource=\${builddep_$2_TARGET_${rewritten_target_var}}
     fi
+    if test "x$resource" = x; then
+      # Ok, lets instead look for a build specific resource
+      eval resource=\${builddep_$2_BUILD_${rewritten_build_var}}
+    fi
+    if test "x$resource" = x; then
+      # Ok, lets instead look for a generic resource
+      # (The $2 comes from M4 and not the shell, thus no need for eval here.)
+      resource=${builddep_$2}
+    fi
+    if test "x$resource" != x; then
+      AC_MSG_NOTICE([Using builddeps $resource for $2])
+      # If the resource in the builddeps.conf file is an existing directory,
+      # for example /java/linux/cups
+      if test -d ${resource}; then
+        depdir=${resource}
+      else
+        BDEPS_FETCH($2, $resource, $with_builddeps_server, $with_builddeps_dir, depdir)
+      fi
+      # Source the builddeps file again, because in the previous command, the depdir
+      # was updated to point at the current build dependency install directory.
+      . $builddepsfile
+      # Now extract variables from the builddeps.conf files.
+      theroot=${builddep_$2_ROOT}
+      thecflags=${builddep_$2_CFLAGS}
+      thelibs=${builddep_$2_LIBS}
+      if test "x$depdir" = x; then
+        AC_MSG_ERROR([Could not download build dependency $2])
+      fi
+      $1=$depdir
+      if test "x$theroot" != x; then
+        $1="$theroot"
+      fi
+      if test "x$thecflags" != x; then
+        $1_CFLAGS="$thecflags"
+      fi
+      if test "x$thelibs" != x; then
+        $1_LIBS="$thelibs"
+      fi
+      m4_default([$4], [:])
+      m4_ifvaln([$5], [else $5])
+    fi
+    m4_ifvaln([$5], [else $5])
+  fi
 ])
 
 AC_DEFUN([BDEPS_FETCH],
 [
-# $1 is for example mymodule
-# $2 is for example libs/general/libmymod_1_2_3.zip
-# $3 is for example ftp://mybuilddeps.myserver.com/builddeps
-# $4 is for example /localhome/builddeps
-# $5 is the name of the variable into which we store the depdir, eg MYMOD
-# Will download ftp://mybuilddeps.myserver.com/builddeps/libs/general/libmymod_1_2_3.zip and
-# unzip into the directory: /localhome/builddeps/libmymod_1_2_3
-    filename=`basename $2`
-    filebase=`echo $filename | sed 's/\.[[^\.]]*$//'`
-    filebase=${filename%%.*}
-    extension=${filename#*.}
-    installdir=$4/$filebase
-    if test ! -f $installdir/$filename.unpacked; then
-        AC_MSG_NOTICE([Downloading build dependency $1 from $3/$2 and installing into $installdir])
-        if test ! -d $installdir; then
-            mkdir -p $installdir
-        fi
-        if test ! -d $installdir; then
-            AC_MSG_ERROR([Could not create directory $installdir])
-        fi
-        tmpfile=`mktemp $installdir/$1.XXXXXXXXX`
-        touch $tmpfile    
-        if test ! -f $tmpfile; then
-            AC_MSG_ERROR([Could not create files in directory $installdir])
-        fi
-        BDEPS_FTPGET([$3/$2] , [$tmpfile])
-        mv $tmpfile $installdir/$filename
-        if test ! -s $installdir/$filename; then 
-            AC_MSG_ERROR([Could not download $3/$2])
-        fi
-        case "$extension" in
-            zip)  echo "Unzipping $installdir/$filename..."
-               (cd $installdir ; rm -f $installdir/$filename.unpacked ; $BDEPS_UNZIP $installdir/$filename > /dev/null && touch $installdir/$filename.unpacked)
-            ;;
-            tar.gz) echo "Untaring $installdir/$filename..."
-               (cd $installdir ; rm -f $installdir/$filename.unpacked ; tar xzf $installdir/$filename && touch $installdir/$filename.unpacked)
-            ;;
-            tgz) echo "Untaring $installdir/$filename..."
-               (cd $installdir ; rm -f $installdir/$filename.unpacked ; tar xzf $installdir/$filename && touch $installdir/$filename.unpacked)
-            ;;
-            *) AC_MSG_ERROR([Cannot handle build depency archive with extension $extension])
-            ;;
-        esac
+  # $1 is for example mymodule
+  # $2 is for example libs/general/libmymod_1_2_3.zip
+  # $3 is for example ftp://mybuilddeps.myserver.com/builddeps
+  # $4 is for example /localhome/builddeps
+  # $5 is the name of the variable into which we store the depdir, eg MYMOD
+  # Will download ftp://mybuilddeps.myserver.com/builddeps/libs/general/libmymod_1_2_3.zip and
+  # unzip into the directory: /localhome/builddeps/libmymod_1_2_3
+  filename=`basename $2`
+  filebase=`echo $filename | sed 's/\.[[^\.]]*$//'`
+  filebase=${filename%%.*}
+  extension=${filename#*.}
+  installdir=$4/$filebase
+  if test ! -f $installdir/$filename.unpacked; then
+    AC_MSG_NOTICE([Downloading build dependency $1 from $3/$2 and installing into $installdir])
+    if test ! -d $installdir; then
+      mkdir -p $installdir
     fi
-    if test -f $installdir/$filename.unpacked; then
-        $5=$installdir
+    if test ! -d $installdir; then
+      AC_MSG_ERROR([Could not create directory $installdir])
     fi
+    tmpfile=`mktemp $installdir/$1.XXXXXXXXX`
+    touch $tmpfile
+    if test ! -f $tmpfile; then
+      AC_MSG_ERROR([Could not create files in directory $installdir])
+    fi
+    BDEPS_FTPGET([$3/$2] , [$tmpfile])
+    mv $tmpfile $installdir/$filename
+    if test ! -s $installdir/$filename; then
+      AC_MSG_ERROR([Could not download $3/$2])
+    fi
+    case "$extension" in
+      zip)  echo "Unzipping $installdir/$filename..."
+        (cd $installdir ; rm -f $installdir/$filename.unpacked ; $BDEPS_UNZIP $installdir/$filename > /dev/null && touch $installdir/$filename.unpacked)
+        ;;
+      tar.gz) echo "Untaring $installdir/$filename..."
+        (cd $installdir ; rm -f $installdir/$filename.unpacked ; tar xzf $installdir/$filename && touch $installdir/$filename.unpacked)
+        ;;
+      tgz) echo "Untaring $installdir/$filename..."
+        (cd $installdir ; rm -f $installdir/$filename.unpacked ; tar xzf $installdir/$filename && touch $installdir/$filename.unpacked)
+        ;;
+      *) AC_MSG_ERROR([Cannot handle build depency archive with extension $extension])
+        ;;
+    esac
+  fi
+  if test -f $installdir/$filename.unpacked; then
+    $5=$installdir
+  fi
 ])
 
 AC_DEFUN_ONCE([BDEPS_CONFIGURE_BUILDDEPS],
 [
-AC_ARG_WITH(builddeps-conf, [AS_HELP_STRING([--with-builddeps-conf],
-    [use this configuration file for the builddeps])])
+  AC_ARG_WITH(builddeps-conf, [AS_HELP_STRING([--with-builddeps-conf],
+      [use this configuration file for the builddeps])])
 
-AC_ARG_WITH(builddeps-server, [AS_HELP_STRING([--with-builddeps-server],
-    [download and use build dependencies from this server url])])
+  AC_ARG_WITH(builddeps-server, [AS_HELP_STRING([--with-builddeps-server],
+      [download and use build dependencies from this server url])])
 
-AC_ARG_WITH(builddeps-dir, [AS_HELP_STRING([--with-builddeps-dir],
-    [store downloaded build dependencies here @<:@/localhome/builddeps@:>@])],
-    [],
-    [with_builddeps_dir=/localhome/builddeps])
+  AC_ARG_WITH(builddeps-dir, [AS_HELP_STRING([--with-builddeps-dir],
+      [store downloaded build dependencies here @<:@/localhome/builddeps@:>@])],
+      [],
+      [with_builddeps_dir=/localhome/builddeps])
 
-AC_ARG_WITH(builddeps-group, [AS_HELP_STRING([--with-builddeps-group],
-    [chgrp the downloaded build dependencies to this group])])
+  AC_ARG_WITH(builddeps-group, [AS_HELP_STRING([--with-builddeps-group],
+      [chgrp the downloaded build dependencies to this group])])
 ])
diff --git a/common/autoconf/compare.sh.in b/common/autoconf/compare.sh.in
index 1dd9583..eea3039 100644
--- a/common/autoconf/compare.sh.in
+++ b/common/autoconf/compare.sh.in
@@ -22,7 +22,7 @@
 # questions.
 #
 
-# This script is processed by configure before it's usable. It is run from 
+# This script is processed by configure before it's usable. It is run from
 # the root of the build directory.
 
 
@@ -67,14 +67,14 @@
 SRC_ROOT="@SRC_ROOT@"
 
 if [ "$OPENJDK_TARGET_OS" = "windows" ]; then
-    PATH="@VS_PATH@"
+  PATH="@VS_PATH@"
 fi
 
 # Now locate the main script and run it.
 REAL_COMPARE_SCRIPT="$SRC_ROOT/common/bin/compare.sh"
 if [ ! -e "$REAL_COMPARE_SCRIPT" ]; then
-    echo "Error: Cannot locate compare script, it should have been in $REAL_COMPARE_SCRIPT"
-    exit 1
+  echo "Error: Cannot locate compare script, it should have been in $REAL_COMPARE_SCRIPT"
+  exit 1
 fi
 
 . "$REAL_COMPARE_SCRIPT" "$@"
diff --git a/common/autoconf/config.h.in b/common/autoconf/config.h.in
index 275821d..89f4453 100644
--- a/common/autoconf/config.h.in
+++ b/common/autoconf/config.h.in
@@ -46,4 +46,4 @@
 #define HAVE_LIBGIF
 #define HAVE_LIBZ
 #define HAVE_LIBM
-#define HAVE_ALTZONE 
+#define HAVE_ALTZONE
diff --git a/common/autoconf/configure b/common/autoconf/configure
index 7378efe3..00a07fc 100644
--- a/common/autoconf/configure
+++ b/common/autoconf/configure
@@ -88,7 +88,6 @@
         check_autoconf_timestamps
       fi
     fi
-    
   fi
 }
 
@@ -106,7 +105,7 @@
   fi
 fi
 
-# Autoconf calls the configure script recursively sometimes. 
+# Autoconf calls the configure script recursively sometimes.
 # Don't start logging twice in that case
 if test "x$conf_debug_configure" = xtrue; then
   conf_debug_configure=recursive
@@ -120,28 +119,28 @@
 for conf_option
 do
   case $conf_option in
-  --openjdk-target=*)
-    conf_openjdk_target=`expr "X$conf_option" : '[^=]*=\(.*\)'`
-    continue ;;
-  --debug-configure)
-    if test "x$conf_debug_configure" != xrecursive; then
-      conf_debug_configure=true
-      export conf_debug_configure
-    fi
-    continue ;;
-  *)
-    conf_processed_arguments=("${conf_processed_arguments[@]}" "$conf_option") ;;
+    --openjdk-target=*)
+      conf_openjdk_target=`expr "X$conf_option" : '[^=]*=\(.*\)'`
+      continue ;;
+    --debug-configure)
+      if test "x$conf_debug_configure" != xrecursive; then
+        conf_debug_configure=true
+        export conf_debug_configure
+      fi
+      continue ;;
+    *)
+      conf_processed_arguments=("${conf_processed_arguments[@]}" "$conf_option") ;;
   esac
 
   case $conf_option in
-  -build | --build | --buil | --bui | --bu |-build=* | --build=* | --buil=* | --bui=* | --bu=*)
-    conf_legacy_crosscompile="$conf_legacy_crosscompile $conf_option" ;;
-  -target | --target | --targe | --targ | --tar | --ta | --t | -target=* | --target=* | --targe=* | --targ=* | --tar=* | --ta=* | --t=*)
-    conf_legacy_crosscompile="$conf_legacy_crosscompile $conf_option" ;;
-  -host | --host | --hos | --ho | -host=* | --host=* | --hos=* | --ho=*)
-    conf_legacy_crosscompile="$conf_legacy_crosscompile $conf_option" ;;
-  -help | --help | --hel | --he | -h)
-    conf_print_help=true ;;
+    -build | --build | --buil | --bui | --bu |-build=* | --build=* | --buil=* | --bui=* | --bu=*)
+      conf_legacy_crosscompile="$conf_legacy_crosscompile $conf_option" ;;
+    -target | --target | --targe | --targ | --tar | --ta | --t | -target=* | --target=* | --targe=* | --targ=* | --tar=* | --ta=* | --t=*)
+      conf_legacy_crosscompile="$conf_legacy_crosscompile $conf_option" ;;
+    -host | --host | --hos | --ho | -host=* | --host=* | --hos=* | --ho=*)
+      conf_legacy_crosscompile="$conf_legacy_crosscompile $conf_option" ;;
+    -help | --help | --hel | --he | -h)
+      conf_print_help=true ;;
   esac
 done
 
@@ -179,7 +178,7 @@
 else
   echo Running generated-configure.sh
   conf_script_to_run=$conf_script_dir/generated-configure.sh
-fi  
+fi
 
 if test "x$conf_debug_configure" != x; then
   # Turn on shell debug output if requested (initial or recursive)
diff --git a/common/autoconf/configure.ac b/common/autoconf/configure.ac
index ad8bd97..22f917b 100644
--- a/common/autoconf/configure.ac
+++ b/common/autoconf/configure.ac
@@ -236,7 +236,7 @@
 # Create the actual output files. Now the main work of configure is done.
 AC_OUTPUT
 
-# Try to move the config.log file to the output directory. 
+# Try to move the config.log file to the output directory.
 if test -e ./config.log; then
   $MV -f ./config.log "$OUTPUT_ROOT/config.log" 2> /dev/null
 fi
diff --git a/common/autoconf/generated-configure.sh b/common/autoconf/generated-configure.sh
index d099351..325cd79 100644
--- a/common/autoconf/generated-configure.sh
+++ b/common/autoconf/generated-configure.sh
@@ -3112,7 +3112,7 @@
 #
 
 # Test if $1 is a valid argument to $3 (often is $JAVA passed as $3)
-# If so, then append $1 to $2\
+# If so, then append $1 to $2 \
 # Also set JVM_ARG_OK to true/false depending on outcome.
 
 
@@ -3441,74 +3441,74 @@
 
 
 cygwin_help() {
-    case $1 in
+  case $1 in
     unzip)
-        PKGHANDLER_COMMAND="cd <location of cygwin setup.exe> && cmd /c setup -q -P unzip" ;;
+      PKGHANDLER_COMMAND="cd <location of cygwin setup.exe> && cmd /c setup -q -P unzip" ;;
     zip)
-        PKGHANDLER_COMMAND="cd <location of cygwin setup.exe> && cmd /c setup -q -P zip" ;;
+      PKGHANDLER_COMMAND="cd <location of cygwin setup.exe> && cmd /c setup -q -P zip" ;;
     make)
-        PKGHANDLER_COMMAND="cd <location of cygwin setup.exe> && cmd /c setup -q -P make" ;;
+      PKGHANDLER_COMMAND="cd <location of cygwin setup.exe> && cmd /c setup -q -P make" ;;
     * )
-       break ;;
-    esac
+      break ;;
+  esac
 }
 
 apt_help() {
-    case $1 in
+  case $1 in
     devkit)
-        PKGHANDLER_COMMAND="sudo apt-get install build-essential" ;;
+      PKGHANDLER_COMMAND="sudo apt-get install build-essential" ;;
     openjdk)
-        PKGHANDLER_COMMAND="sudo apt-get install openjdk-7-jdk" ;;
+      PKGHANDLER_COMMAND="sudo apt-get install openjdk-7-jdk" ;;
     alsa)
-        PKGHANDLER_COMMAND="sudo apt-get install libasound2-dev" ;;
+      PKGHANDLER_COMMAND="sudo apt-get install libasound2-dev" ;;
     cups)
-        PKGHANDLER_COMMAND="sudo apt-get install libcups2-dev" ;;
+      PKGHANDLER_COMMAND="sudo apt-get install libcups2-dev" ;;
     freetype2)
-        PKGHANDLER_COMMAND="sudo apt-get install libfreetype6-dev" ;;
+      PKGHANDLER_COMMAND="sudo apt-get install libfreetype6-dev" ;;
     pulse)
-        PKGHANDLER_COMMAND="sudo apt-get install libpulse-dev" ;;
+      PKGHANDLER_COMMAND="sudo apt-get install libpulse-dev" ;;
     x11)
-        PKGHANDLER_COMMAND="sudo apt-get install libX11-dev libxext-dev libxrender-dev libxtst-dev libxt-dev" ;;
+      PKGHANDLER_COMMAND="sudo apt-get install libX11-dev libxext-dev libxrender-dev libxtst-dev libxt-dev" ;;
     ccache)
-        PKGHANDLER_COMMAND="sudo apt-get install ccache" ;;
+      PKGHANDLER_COMMAND="sudo apt-get install ccache" ;;
     * )
-       break ;;
-    esac
+      break ;;
+  esac
 }
 
 yum_help() {
-    case $1 in
+  case $1 in
     devkit)
-        PKGHANDLER_COMMAND="sudo yum groupinstall \"Development Tools\"" ;;
+      PKGHANDLER_COMMAND="sudo yum groupinstall \"Development Tools\"" ;;
     openjdk)
-        PKGHANDLER_COMMAND="sudo yum install java-1.7.0-openjdk" ;;
+      PKGHANDLER_COMMAND="sudo yum install java-1.7.0-openjdk" ;;
     alsa)
-        PKGHANDLER_COMMAND="sudo yum install alsa-lib-devel" ;;
+      PKGHANDLER_COMMAND="sudo yum install alsa-lib-devel" ;;
     cups)
-        PKGHANDLER_COMMAND="sudo yum install cups-devel" ;;
+      PKGHANDLER_COMMAND="sudo yum install cups-devel" ;;
     freetype2)
-        PKGHANDLER_COMMAND="sudo yum install freetype-devel" ;;
+      PKGHANDLER_COMMAND="sudo yum install freetype-devel" ;;
     pulse)
-        PKGHANDLER_COMMAND="sudo yum install pulseaudio-libs-devel" ;;
+      PKGHANDLER_COMMAND="sudo yum install pulseaudio-libs-devel" ;;
     x11)
-        PKGHANDLER_COMMAND="sudo yum install libXtst-devel libXt-devel libXrender-devel" ;;
+      PKGHANDLER_COMMAND="sudo yum install libXtst-devel libXt-devel libXrender-devel" ;;
     ccache)
-        PKGHANDLER_COMMAND="sudo yum install ccache" ;;
+      PKGHANDLER_COMMAND="sudo yum install ccache" ;;
     * )
-       break ;;
-    esac
+      break ;;
+  esac
 }
 
 port_help() {
-    PKGHANDLER_COMMAND=""
+  PKGHANDLER_COMMAND=""
 }
 
 pkgutil_help() {
-    PKGHANDLER_COMMAND=""
+  PKGHANDLER_COMMAND=""
 }
 
 pkgadd_help() {
-    PKGHANDLER_COMMAND=""
+  PKGHANDLER_COMMAND=""
 }
 
 
@@ -3662,8 +3662,8 @@
 # doing anything else with these values.
 
 
-    # Setup the legacy variables, for controlling the old makefiles.
-    #
+# Setup the legacy variables, for controlling the old makefiles.
+#
 
 
 
@@ -3818,7 +3818,7 @@
 #CUSTOM_AUTOCONF_INCLUDE
 
 # Do not change or remove the following line, it is needed for consistency checks:
-DATE_WHEN_GENERATED=1381162713
+DATE_WHEN_GENERATED=1381407169
 
 ###############################################################################
 #
@@ -3831,26 +3831,26 @@
 
 # Basic initialization that must happen first of all
 
-# Save the original command line. This is passed to us by the wrapper configure script.
+  # Save the original command line. This is passed to us by the wrapper configure script.
 
-DATE_WHEN_CONFIGURED=`LANG=C date`
+  DATE_WHEN_CONFIGURED=`LANG=C date`
 
-{ $as_echo "$as_me:${as_lineno-$LINENO}: Configuration created at $DATE_WHEN_CONFIGURED." >&5
+  { $as_echo "$as_me:${as_lineno-$LINENO}: Configuration created at $DATE_WHEN_CONFIGURED." >&5
 $as_echo "$as_me: Configuration created at $DATE_WHEN_CONFIGURED." >&6;}
-{ $as_echo "$as_me:${as_lineno-$LINENO}: configure script generated at timestamp $DATE_WHEN_GENERATED." >&5
+  { $as_echo "$as_me:${as_lineno-$LINENO}: configure script generated at timestamp $DATE_WHEN_GENERATED." >&5
 $as_echo "$as_me: configure script generated at timestamp $DATE_WHEN_GENERATED." >&6;}
 
 
 
-# Start with tools that do not need have cross compilation support
-# and can be expected to be found in the default PATH. These tools are
-# used by configure. Nor are these tools expected to be found in the
-# devkit from the builddeps server either, since they are
-# needed to download the devkit.
+  # Start with tools that do not need have cross compilation support
+  # and can be expected to be found in the default PATH. These tools are
+  # used by configure. Nor are these tools expected to be found in the
+  # devkit from the builddeps server either, since they are
+  # needed to download the devkit.
 
-# First are all the simple required tools.
+  # First are all the simple required tools.
 
-    for ac_prog in basename
+  for ac_prog in basename
 do
   # Extract the first word of "$ac_prog", so it can be a program name with args.
 set dummy $ac_prog; ac_word=$2
@@ -3896,20 +3896,20 @@
 done
 
 
-    if test "x$BASENAME" = x; then
-        if test "xbasename" = x; then
-          PROG_NAME=basename
-        else
-          PROG_NAME=basename
-        fi
-        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
-$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
-        as_fn_error $? "Cannot continue" "$LINENO" 5
+  if test "x$BASENAME" = x; then
+    if test "xbasename" = x; then
+      PROG_NAME=basename
+    else
+      PROG_NAME=basename
     fi
+    { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
+$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
+    as_fn_error $? "Cannot continue" "$LINENO" 5
+  fi
 
 
 
-    for ac_prog in bash
+  for ac_prog in bash
 do
   # Extract the first word of "$ac_prog", so it can be a program name with args.
 set dummy $ac_prog; ac_word=$2
@@ -3955,20 +3955,20 @@
 done
 
 
-    if test "x$BASH" = x; then
-        if test "xbash" = x; then
-          PROG_NAME=bash
-        else
-          PROG_NAME=bash
-        fi
-        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
-$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
-        as_fn_error $? "Cannot continue" "$LINENO" 5
+  if test "x$BASH" = x; then
+    if test "xbash" = x; then
+      PROG_NAME=bash
+    else
+      PROG_NAME=bash
     fi
+    { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
+$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
+    as_fn_error $? "Cannot continue" "$LINENO" 5
+  fi
 
 
 
-    for ac_prog in cat
+  for ac_prog in cat
 do
   # Extract the first word of "$ac_prog", so it can be a program name with args.
 set dummy $ac_prog; ac_word=$2
@@ -4014,20 +4014,20 @@
 done
 
 
-    if test "x$CAT" = x; then
-        if test "xcat" = x; then
-          PROG_NAME=cat
-        else
-          PROG_NAME=cat
-        fi
-        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
-$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
-        as_fn_error $? "Cannot continue" "$LINENO" 5
+  if test "x$CAT" = x; then
+    if test "xcat" = x; then
+      PROG_NAME=cat
+    else
+      PROG_NAME=cat
     fi
+    { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
+$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
+    as_fn_error $? "Cannot continue" "$LINENO" 5
+  fi
 
 
 
-    for ac_prog in chmod
+  for ac_prog in chmod
 do
   # Extract the first word of "$ac_prog", so it can be a program name with args.
 set dummy $ac_prog; ac_word=$2
@@ -4073,20 +4073,20 @@
 done
 
 
-    if test "x$CHMOD" = x; then
-        if test "xchmod" = x; then
-          PROG_NAME=chmod
-        else
-          PROG_NAME=chmod
-        fi
-        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
-$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
-        as_fn_error $? "Cannot continue" "$LINENO" 5
+  if test "x$CHMOD" = x; then
+    if test "xchmod" = x; then
+      PROG_NAME=chmod
+    else
+      PROG_NAME=chmod
     fi
+    { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
+$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
+    as_fn_error $? "Cannot continue" "$LINENO" 5
+  fi
 
 
 
-    for ac_prog in cmp
+  for ac_prog in cmp
 do
   # Extract the first word of "$ac_prog", so it can be a program name with args.
 set dummy $ac_prog; ac_word=$2
@@ -4132,20 +4132,20 @@
 done
 
 
-    if test "x$CMP" = x; then
-        if test "xcmp" = x; then
-          PROG_NAME=cmp
-        else
-          PROG_NAME=cmp
-        fi
-        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
-$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
-        as_fn_error $? "Cannot continue" "$LINENO" 5
+  if test "x$CMP" = x; then
+    if test "xcmp" = x; then
+      PROG_NAME=cmp
+    else
+      PROG_NAME=cmp
     fi
+    { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
+$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
+    as_fn_error $? "Cannot continue" "$LINENO" 5
+  fi
 
 
 
-    for ac_prog in comm
+  for ac_prog in comm
 do
   # Extract the first word of "$ac_prog", so it can be a program name with args.
 set dummy $ac_prog; ac_word=$2
@@ -4191,20 +4191,20 @@
 done
 
 
-    if test "x$COMM" = x; then
-        if test "xcomm" = x; then
-          PROG_NAME=comm
-        else
-          PROG_NAME=comm
-        fi
-        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
-$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
-        as_fn_error $? "Cannot continue" "$LINENO" 5
+  if test "x$COMM" = x; then
+    if test "xcomm" = x; then
+      PROG_NAME=comm
+    else
+      PROG_NAME=comm
     fi
+    { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
+$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
+    as_fn_error $? "Cannot continue" "$LINENO" 5
+  fi
 
 
 
-    for ac_prog in cp
+  for ac_prog in cp
 do
   # Extract the first word of "$ac_prog", so it can be a program name with args.
 set dummy $ac_prog; ac_word=$2
@@ -4250,20 +4250,20 @@
 done
 
 
-    if test "x$CP" = x; then
-        if test "xcp" = x; then
-          PROG_NAME=cp
-        else
-          PROG_NAME=cp
-        fi
-        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
-$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
-        as_fn_error $? "Cannot continue" "$LINENO" 5
+  if test "x$CP" = x; then
+    if test "xcp" = x; then
+      PROG_NAME=cp
+    else
+      PROG_NAME=cp
     fi
+    { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
+$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
+    as_fn_error $? "Cannot continue" "$LINENO" 5
+  fi
 
 
 
-    for ac_prog in cpio
+  for ac_prog in cpio
 do
   # Extract the first word of "$ac_prog", so it can be a program name with args.
 set dummy $ac_prog; ac_word=$2
@@ -4309,20 +4309,20 @@
 done
 
 
-    if test "x$CPIO" = x; then
-        if test "xcpio" = x; then
-          PROG_NAME=cpio
-        else
-          PROG_NAME=cpio
-        fi
-        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
-$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
-        as_fn_error $? "Cannot continue" "$LINENO" 5
+  if test "x$CPIO" = x; then
+    if test "xcpio" = x; then
+      PROG_NAME=cpio
+    else
+      PROG_NAME=cpio
     fi
+    { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
+$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
+    as_fn_error $? "Cannot continue" "$LINENO" 5
+  fi
 
 
 
-    for ac_prog in cut
+  for ac_prog in cut
 do
   # Extract the first word of "$ac_prog", so it can be a program name with args.
 set dummy $ac_prog; ac_word=$2
@@ -4368,20 +4368,20 @@
 done
 
 
-    if test "x$CUT" = x; then
-        if test "xcut" = x; then
-          PROG_NAME=cut
-        else
-          PROG_NAME=cut
-        fi
-        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
-$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
-        as_fn_error $? "Cannot continue" "$LINENO" 5
+  if test "x$CUT" = x; then
+    if test "xcut" = x; then
+      PROG_NAME=cut
+    else
+      PROG_NAME=cut
     fi
+    { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
+$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
+    as_fn_error $? "Cannot continue" "$LINENO" 5
+  fi
 
 
 
-    for ac_prog in date
+  for ac_prog in date
 do
   # Extract the first word of "$ac_prog", so it can be a program name with args.
 set dummy $ac_prog; ac_word=$2
@@ -4427,20 +4427,20 @@
 done
 
 
-    if test "x$DATE" = x; then
-        if test "xdate" = x; then
-          PROG_NAME=date
-        else
-          PROG_NAME=date
-        fi
-        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
-$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
-        as_fn_error $? "Cannot continue" "$LINENO" 5
+  if test "x$DATE" = x; then
+    if test "xdate" = x; then
+      PROG_NAME=date
+    else
+      PROG_NAME=date
     fi
+    { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
+$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
+    as_fn_error $? "Cannot continue" "$LINENO" 5
+  fi
 
 
 
-    for ac_prog in gdiff diff
+  for ac_prog in gdiff diff
 do
   # Extract the first word of "$ac_prog", so it can be a program name with args.
 set dummy $ac_prog; ac_word=$2
@@ -4486,20 +4486,20 @@
 done
 
 
-    if test "x$DIFF" = x; then
-        if test "xgdiff diff" = x; then
-          PROG_NAME=diff
-        else
-          PROG_NAME=gdiff diff
-        fi
-        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
-$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
-        as_fn_error $? "Cannot continue" "$LINENO" 5
+  if test "x$DIFF" = x; then
+    if test "xgdiff diff" = x; then
+      PROG_NAME=diff
+    else
+      PROG_NAME=gdiff diff
     fi
+    { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
+$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
+    as_fn_error $? "Cannot continue" "$LINENO" 5
+  fi
 
 
 
-    for ac_prog in dirname
+  for ac_prog in dirname
 do
   # Extract the first word of "$ac_prog", so it can be a program name with args.
 set dummy $ac_prog; ac_word=$2
@@ -4545,20 +4545,20 @@
 done
 
 
-    if test "x$DIRNAME" = x; then
-        if test "xdirname" = x; then
-          PROG_NAME=dirname
-        else
-          PROG_NAME=dirname
-        fi
-        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
-$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
-        as_fn_error $? "Cannot continue" "$LINENO" 5
+  if test "x$DIRNAME" = x; then
+    if test "xdirname" = x; then
+      PROG_NAME=dirname
+    else
+      PROG_NAME=dirname
     fi
+    { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
+$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
+    as_fn_error $? "Cannot continue" "$LINENO" 5
+  fi
 
 
 
-    for ac_prog in echo
+  for ac_prog in echo
 do
   # Extract the first word of "$ac_prog", so it can be a program name with args.
 set dummy $ac_prog; ac_word=$2
@@ -4604,20 +4604,20 @@
 done
 
 
-    if test "x$ECHO" = x; then
-        if test "xecho" = x; then
-          PROG_NAME=echo
-        else
-          PROG_NAME=echo
-        fi
-        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
-$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
-        as_fn_error $? "Cannot continue" "$LINENO" 5
+  if test "x$ECHO" = x; then
+    if test "xecho" = x; then
+      PROG_NAME=echo
+    else
+      PROG_NAME=echo
     fi
+    { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
+$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
+    as_fn_error $? "Cannot continue" "$LINENO" 5
+  fi
 
 
 
-    for ac_prog in expr
+  for ac_prog in expr
 do
   # Extract the first word of "$ac_prog", so it can be a program name with args.
 set dummy $ac_prog; ac_word=$2
@@ -4663,20 +4663,20 @@
 done
 
 
-    if test "x$EXPR" = x; then
-        if test "xexpr" = x; then
-          PROG_NAME=expr
-        else
-          PROG_NAME=expr
-        fi
-        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
-$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
-        as_fn_error $? "Cannot continue" "$LINENO" 5
+  if test "x$EXPR" = x; then
+    if test "xexpr" = x; then
+      PROG_NAME=expr
+    else
+      PROG_NAME=expr
     fi
+    { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
+$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
+    as_fn_error $? "Cannot continue" "$LINENO" 5
+  fi
 
 
 
-    for ac_prog in file
+  for ac_prog in file
 do
   # Extract the first word of "$ac_prog", so it can be a program name with args.
 set dummy $ac_prog; ac_word=$2
@@ -4722,20 +4722,20 @@
 done
 
 
-    if test "x$FILE" = x; then
-        if test "xfile" = x; then
-          PROG_NAME=file
-        else
-          PROG_NAME=file
-        fi
-        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
-$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
-        as_fn_error $? "Cannot continue" "$LINENO" 5
+  if test "x$FILE" = x; then
+    if test "xfile" = x; then
+      PROG_NAME=file
+    else
+      PROG_NAME=file
     fi
+    { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
+$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
+    as_fn_error $? "Cannot continue" "$LINENO" 5
+  fi
 
 
 
-    for ac_prog in find
+  for ac_prog in find
 do
   # Extract the first word of "$ac_prog", so it can be a program name with args.
 set dummy $ac_prog; ac_word=$2
@@ -4781,20 +4781,20 @@
 done
 
 
-    if test "x$FIND" = x; then
-        if test "xfind" = x; then
-          PROG_NAME=find
-        else
-          PROG_NAME=find
-        fi
-        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
-$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
-        as_fn_error $? "Cannot continue" "$LINENO" 5
+  if test "x$FIND" = x; then
+    if test "xfind" = x; then
+      PROG_NAME=find
+    else
+      PROG_NAME=find
     fi
+    { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
+$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
+    as_fn_error $? "Cannot continue" "$LINENO" 5
+  fi
 
 
 
-    for ac_prog in head
+  for ac_prog in head
 do
   # Extract the first word of "$ac_prog", so it can be a program name with args.
 set dummy $ac_prog; ac_word=$2
@@ -4840,20 +4840,20 @@
 done
 
 
-    if test "x$HEAD" = x; then
-        if test "xhead" = x; then
-          PROG_NAME=head
-        else
-          PROG_NAME=head
-        fi
-        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
-$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
-        as_fn_error $? "Cannot continue" "$LINENO" 5
+  if test "x$HEAD" = x; then
+    if test "xhead" = x; then
+      PROG_NAME=head
+    else
+      PROG_NAME=head
     fi
+    { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
+$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
+    as_fn_error $? "Cannot continue" "$LINENO" 5
+  fi
 
 
 
-    for ac_prog in ln
+  for ac_prog in ln
 do
   # Extract the first word of "$ac_prog", so it can be a program name with args.
 set dummy $ac_prog; ac_word=$2
@@ -4899,20 +4899,20 @@
 done
 
 
-    if test "x$LN" = x; then
-        if test "xln" = x; then
-          PROG_NAME=ln
-        else
-          PROG_NAME=ln
-        fi
-        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
-$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
-        as_fn_error $? "Cannot continue" "$LINENO" 5
+  if test "x$LN" = x; then
+    if test "xln" = x; then
+      PROG_NAME=ln
+    else
+      PROG_NAME=ln
     fi
+    { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
+$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
+    as_fn_error $? "Cannot continue" "$LINENO" 5
+  fi
 
 
 
-    for ac_prog in ls
+  for ac_prog in ls
 do
   # Extract the first word of "$ac_prog", so it can be a program name with args.
 set dummy $ac_prog; ac_word=$2
@@ -4958,20 +4958,20 @@
 done
 
 
-    if test "x$LS" = x; then
-        if test "xls" = x; then
-          PROG_NAME=ls
-        else
-          PROG_NAME=ls
-        fi
-        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
-$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
-        as_fn_error $? "Cannot continue" "$LINENO" 5
+  if test "x$LS" = x; then
+    if test "xls" = x; then
+      PROG_NAME=ls
+    else
+      PROG_NAME=ls
     fi
+    { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
+$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
+    as_fn_error $? "Cannot continue" "$LINENO" 5
+  fi
 
 
 
-    for ac_prog in mkdir
+  for ac_prog in mkdir
 do
   # Extract the first word of "$ac_prog", so it can be a program name with args.
 set dummy $ac_prog; ac_word=$2
@@ -5017,20 +5017,20 @@
 done
 
 
-    if test "x$MKDIR" = x; then
-        if test "xmkdir" = x; then
-          PROG_NAME=mkdir
-        else
-          PROG_NAME=mkdir
-        fi
-        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
-$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
-        as_fn_error $? "Cannot continue" "$LINENO" 5
+  if test "x$MKDIR" = x; then
+    if test "xmkdir" = x; then
+      PROG_NAME=mkdir
+    else
+      PROG_NAME=mkdir
     fi
+    { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
+$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
+    as_fn_error $? "Cannot continue" "$LINENO" 5
+  fi
 
 
 
-    for ac_prog in mktemp
+  for ac_prog in mktemp
 do
   # Extract the first word of "$ac_prog", so it can be a program name with args.
 set dummy $ac_prog; ac_word=$2
@@ -5076,20 +5076,20 @@
 done
 
 
-    if test "x$MKTEMP" = x; then
-        if test "xmktemp" = x; then
-          PROG_NAME=mktemp
-        else
-          PROG_NAME=mktemp
-        fi
-        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
-$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
-        as_fn_error $? "Cannot continue" "$LINENO" 5
+  if test "x$MKTEMP" = x; then
+    if test "xmktemp" = x; then
+      PROG_NAME=mktemp
+    else
+      PROG_NAME=mktemp
     fi
+    { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
+$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
+    as_fn_error $? "Cannot continue" "$LINENO" 5
+  fi
 
 
 
-    for ac_prog in mv
+  for ac_prog in mv
 do
   # Extract the first word of "$ac_prog", so it can be a program name with args.
 set dummy $ac_prog; ac_word=$2
@@ -5135,20 +5135,20 @@
 done
 
 
-    if test "x$MV" = x; then
-        if test "xmv" = x; then
-          PROG_NAME=mv
-        else
-          PROG_NAME=mv
-        fi
-        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
-$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
-        as_fn_error $? "Cannot continue" "$LINENO" 5
+  if test "x$MV" = x; then
+    if test "xmv" = x; then
+      PROG_NAME=mv
+    else
+      PROG_NAME=mv
     fi
+    { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
+$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
+    as_fn_error $? "Cannot continue" "$LINENO" 5
+  fi
 
 
 
-    for ac_prog in printf
+  for ac_prog in printf
 do
   # Extract the first word of "$ac_prog", so it can be a program name with args.
 set dummy $ac_prog; ac_word=$2
@@ -5194,20 +5194,20 @@
 done
 
 
-    if test "x$PRINTF" = x; then
-        if test "xprintf" = x; then
-          PROG_NAME=printf
-        else
-          PROG_NAME=printf
-        fi
-        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
-$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
-        as_fn_error $? "Cannot continue" "$LINENO" 5
+  if test "x$PRINTF" = x; then
+    if test "xprintf" = x; then
+      PROG_NAME=printf
+    else
+      PROG_NAME=printf
     fi
+    { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
+$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
+    as_fn_error $? "Cannot continue" "$LINENO" 5
+  fi
 
 
 
-    for ac_prog in rm
+  for ac_prog in rm
 do
   # Extract the first word of "$ac_prog", so it can be a program name with args.
 set dummy $ac_prog; ac_word=$2
@@ -5253,20 +5253,20 @@
 done
 
 
-    if test "x$RM" = x; then
-        if test "xrm" = x; then
-          PROG_NAME=rm
-        else
-          PROG_NAME=rm
-        fi
-        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
-$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
-        as_fn_error $? "Cannot continue" "$LINENO" 5
+  if test "x$RM" = x; then
+    if test "xrm" = x; then
+      PROG_NAME=rm
+    else
+      PROG_NAME=rm
     fi
+    { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
+$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
+    as_fn_error $? "Cannot continue" "$LINENO" 5
+  fi
 
 
 
-    for ac_prog in sh
+  for ac_prog in sh
 do
   # Extract the first word of "$ac_prog", so it can be a program name with args.
 set dummy $ac_prog; ac_word=$2
@@ -5312,20 +5312,20 @@
 done
 
 
-    if test "x$SH" = x; then
-        if test "xsh" = x; then
-          PROG_NAME=sh
-        else
-          PROG_NAME=sh
-        fi
-        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
-$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
-        as_fn_error $? "Cannot continue" "$LINENO" 5
+  if test "x$SH" = x; then
+    if test "xsh" = x; then
+      PROG_NAME=sh
+    else
+      PROG_NAME=sh
     fi
+    { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
+$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
+    as_fn_error $? "Cannot continue" "$LINENO" 5
+  fi
 
 
 
-    for ac_prog in sort
+  for ac_prog in sort
 do
   # Extract the first word of "$ac_prog", so it can be a program name with args.
 set dummy $ac_prog; ac_word=$2
@@ -5371,20 +5371,20 @@
 done
 
 
-    if test "x$SORT" = x; then
-        if test "xsort" = x; then
-          PROG_NAME=sort
-        else
-          PROG_NAME=sort
-        fi
-        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
-$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
-        as_fn_error $? "Cannot continue" "$LINENO" 5
+  if test "x$SORT" = x; then
+    if test "xsort" = x; then
+      PROG_NAME=sort
+    else
+      PROG_NAME=sort
     fi
+    { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
+$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
+    as_fn_error $? "Cannot continue" "$LINENO" 5
+  fi
 
 
 
-    for ac_prog in tail
+  for ac_prog in tail
 do
   # Extract the first word of "$ac_prog", so it can be a program name with args.
 set dummy $ac_prog; ac_word=$2
@@ -5430,20 +5430,20 @@
 done
 
 
-    if test "x$TAIL" = x; then
-        if test "xtail" = x; then
-          PROG_NAME=tail
-        else
-          PROG_NAME=tail
-        fi
-        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
-$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
-        as_fn_error $? "Cannot continue" "$LINENO" 5
+  if test "x$TAIL" = x; then
+    if test "xtail" = x; then
+      PROG_NAME=tail
+    else
+      PROG_NAME=tail
     fi
+    { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
+$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
+    as_fn_error $? "Cannot continue" "$LINENO" 5
+  fi
 
 
 
-    for ac_prog in tar
+  for ac_prog in tar
 do
   # Extract the first word of "$ac_prog", so it can be a program name with args.
 set dummy $ac_prog; ac_word=$2
@@ -5489,20 +5489,20 @@
 done
 
 
-    if test "x$TAR" = x; then
-        if test "xtar" = x; then
-          PROG_NAME=tar
-        else
-          PROG_NAME=tar
-        fi
-        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
-$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
-        as_fn_error $? "Cannot continue" "$LINENO" 5
+  if test "x$TAR" = x; then
+    if test "xtar" = x; then
+      PROG_NAME=tar
+    else
+      PROG_NAME=tar
     fi
+    { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
+$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
+    as_fn_error $? "Cannot continue" "$LINENO" 5
+  fi
 
 
 
-    for ac_prog in tee
+  for ac_prog in tee
 do
   # Extract the first word of "$ac_prog", so it can be a program name with args.
 set dummy $ac_prog; ac_word=$2
@@ -5548,20 +5548,20 @@
 done
 
 
-    if test "x$TEE" = x; then
-        if test "xtee" = x; then
-          PROG_NAME=tee
-        else
-          PROG_NAME=tee
-        fi
-        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
-$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
-        as_fn_error $? "Cannot continue" "$LINENO" 5
+  if test "x$TEE" = x; then
+    if test "xtee" = x; then
+      PROG_NAME=tee
+    else
+      PROG_NAME=tee
     fi
+    { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
+$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
+    as_fn_error $? "Cannot continue" "$LINENO" 5
+  fi
 
 
 
-    for ac_prog in touch
+  for ac_prog in touch
 do
   # Extract the first word of "$ac_prog", so it can be a program name with args.
 set dummy $ac_prog; ac_word=$2
@@ -5607,20 +5607,20 @@
 done
 
 
-    if test "x$TOUCH" = x; then
-        if test "xtouch" = x; then
-          PROG_NAME=touch
-        else
-          PROG_NAME=touch
-        fi
-        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
-$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
-        as_fn_error $? "Cannot continue" "$LINENO" 5
+  if test "x$TOUCH" = x; then
+    if test "xtouch" = x; then
+      PROG_NAME=touch
+    else
+      PROG_NAME=touch
     fi
+    { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
+$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
+    as_fn_error $? "Cannot continue" "$LINENO" 5
+  fi
 
 
 
-    for ac_prog in tr
+  for ac_prog in tr
 do
   # Extract the first word of "$ac_prog", so it can be a program name with args.
 set dummy $ac_prog; ac_word=$2
@@ -5666,20 +5666,20 @@
 done
 
 
-    if test "x$TR" = x; then
-        if test "xtr" = x; then
-          PROG_NAME=tr
-        else
-          PROG_NAME=tr
-        fi
-        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
-$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
-        as_fn_error $? "Cannot continue" "$LINENO" 5
+  if test "x$TR" = x; then
+    if test "xtr" = x; then
+      PROG_NAME=tr
+    else
+      PROG_NAME=tr
     fi
+    { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
+$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
+    as_fn_error $? "Cannot continue" "$LINENO" 5
+  fi
 
 
 
-    for ac_prog in uname
+  for ac_prog in uname
 do
   # Extract the first word of "$ac_prog", so it can be a program name with args.
 set dummy $ac_prog; ac_word=$2
@@ -5725,20 +5725,20 @@
 done
 
 
-    if test "x$UNAME" = x; then
-        if test "xuname" = x; then
-          PROG_NAME=uname
-        else
-          PROG_NAME=uname
-        fi
-        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
-$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
-        as_fn_error $? "Cannot continue" "$LINENO" 5
+  if test "x$UNAME" = x; then
+    if test "xuname" = x; then
+      PROG_NAME=uname
+    else
+      PROG_NAME=uname
     fi
+    { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
+$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
+    as_fn_error $? "Cannot continue" "$LINENO" 5
+  fi
 
 
 
-    for ac_prog in uniq
+  for ac_prog in uniq
 do
   # Extract the first word of "$ac_prog", so it can be a program name with args.
 set dummy $ac_prog; ac_word=$2
@@ -5784,20 +5784,20 @@
 done
 
 
-    if test "x$UNIQ" = x; then
-        if test "xuniq" = x; then
-          PROG_NAME=uniq
-        else
-          PROG_NAME=uniq
-        fi
-        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
-$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
-        as_fn_error $? "Cannot continue" "$LINENO" 5
+  if test "x$UNIQ" = x; then
+    if test "xuniq" = x; then
+      PROG_NAME=uniq
+    else
+      PROG_NAME=uniq
     fi
+    { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
+$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
+    as_fn_error $? "Cannot continue" "$LINENO" 5
+  fi
 
 
 
-    for ac_prog in wc
+  for ac_prog in wc
 do
   # Extract the first word of "$ac_prog", so it can be a program name with args.
 set dummy $ac_prog; ac_word=$2
@@ -5843,20 +5843,20 @@
 done
 
 
-    if test "x$WC" = x; then
-        if test "xwc" = x; then
-          PROG_NAME=wc
-        else
-          PROG_NAME=wc
-        fi
-        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
-$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
-        as_fn_error $? "Cannot continue" "$LINENO" 5
+  if test "x$WC" = x; then
+    if test "xwc" = x; then
+      PROG_NAME=wc
+    else
+      PROG_NAME=wc
     fi
+    { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
+$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
+    as_fn_error $? "Cannot continue" "$LINENO" 5
+  fi
 
 
 
-    for ac_prog in which
+  for ac_prog in which
 do
   # Extract the first word of "$ac_prog", so it can be a program name with args.
 set dummy $ac_prog; ac_word=$2
@@ -5902,20 +5902,20 @@
 done
 
 
-    if test "x$WHICH" = x; then
-        if test "xwhich" = x; then
-          PROG_NAME=which
-        else
-          PROG_NAME=which
-        fi
-        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
-$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
-        as_fn_error $? "Cannot continue" "$LINENO" 5
+  if test "x$WHICH" = x; then
+    if test "xwhich" = x; then
+      PROG_NAME=which
+    else
+      PROG_NAME=which
     fi
+    { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
+$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
+    as_fn_error $? "Cannot continue" "$LINENO" 5
+  fi
 
 
 
-    for ac_prog in xargs
+  for ac_prog in xargs
 do
   # Extract the first word of "$ac_prog", so it can be a program name with args.
 set dummy $ac_prog; ac_word=$2
@@ -5961,21 +5961,21 @@
 done
 
 
-    if test "x$XARGS" = x; then
-        if test "xxargs" = x; then
-          PROG_NAME=xargs
-        else
-          PROG_NAME=xargs
-        fi
-        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
-$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
-        as_fn_error $? "Cannot continue" "$LINENO" 5
+  if test "x$XARGS" = x; then
+    if test "xxargs" = x; then
+      PROG_NAME=xargs
+    else
+      PROG_NAME=xargs
     fi
+    { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
+$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
+    as_fn_error $? "Cannot continue" "$LINENO" 5
+  fi
 
 
 
-# Then required tools that require some special treatment.
-for ac_prog in gawk mawk nawk awk
+  # Then required tools that require some special treatment.
+  for ac_prog in gawk mawk nawk awk
 do
   # Extract the first word of "$ac_prog", so it can be a program name with args.
 set dummy $ac_prog; ac_word=$2
@@ -6018,18 +6018,18 @@
 done
 
 
-    if test "x$AWK" = x; then
-        if test "x" = x; then
-          PROG_NAME=awk
-        else
-          PROG_NAME=
-        fi
-        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
-$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
-        as_fn_error $? "Cannot continue" "$LINENO" 5
+  if test "x$AWK" = x; then
+    if test "x" = x; then
+      PROG_NAME=awk
+    else
+      PROG_NAME=
     fi
+    { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
+$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
+    as_fn_error $? "Cannot continue" "$LINENO" 5
+  fi
 
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for grep that handles long lines and -e" >&5
+  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for grep that handles long lines and -e" >&5
 $as_echo_n "checking for grep that handles long lines and -e... " >&6; }
 if ${ac_cv_path_GREP+:} false; then :
   $as_echo_n "(cached) " >&6
@@ -6093,18 +6093,18 @@
 
 
 
-    if test "x$GREP" = x; then
-        if test "x" = x; then
-          PROG_NAME=grep
-        else
-          PROG_NAME=
-        fi
-        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
-$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
-        as_fn_error $? "Cannot continue" "$LINENO" 5
+  if test "x$GREP" = x; then
+    if test "x" = x; then
+      PROG_NAME=grep
+    else
+      PROG_NAME=
     fi
+    { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
+$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
+    as_fn_error $? "Cannot continue" "$LINENO" 5
+  fi
 
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for egrep" >&5
+  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for egrep" >&5
 $as_echo_n "checking for egrep... " >&6; }
 if ${ac_cv_path_EGREP+:} false; then :
   $as_echo_n "(cached) " >&6
@@ -6172,18 +6172,18 @@
 
 
 
-    if test "x$EGREP" = x; then
-        if test "x" = x; then
-          PROG_NAME=egrep
-        else
-          PROG_NAME=
-        fi
-        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
-$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
-        as_fn_error $? "Cannot continue" "$LINENO" 5
+  if test "x$EGREP" = x; then
+    if test "x" = x; then
+      PROG_NAME=egrep
+    else
+      PROG_NAME=
     fi
+    { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
+$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
+    as_fn_error $? "Cannot continue" "$LINENO" 5
+  fi
 
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for fgrep" >&5
+  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for fgrep" >&5
 $as_echo_n "checking for fgrep... " >&6; }
 if ${ac_cv_path_FGREP+:} false; then :
   $as_echo_n "(cached) " >&6
@@ -6251,18 +6251,18 @@
 
 
 
-    if test "x$FGREP" = x; then
-        if test "x" = x; then
-          PROG_NAME=fgrep
-        else
-          PROG_NAME=
-        fi
-        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
-$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
-        as_fn_error $? "Cannot continue" "$LINENO" 5
+  if test "x$FGREP" = x; then
+    if test "x" = x; then
+      PROG_NAME=fgrep
+    else
+      PROG_NAME=
     fi
+    { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
+$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
+    as_fn_error $? "Cannot continue" "$LINENO" 5
+  fi
 
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for a sed that does not truncate output" >&5
+  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for a sed that does not truncate output" >&5
 $as_echo_n "checking for a sed that does not truncate output... " >&6; }
 if ${ac_cv_path_SED+:} false; then :
   $as_echo_n "(cached) " >&6
@@ -6332,19 +6332,19 @@
   rm -f conftest.sed
 
 
-    if test "x$SED" = x; then
-        if test "x" = x; then
-          PROG_NAME=sed
-        else
-          PROG_NAME=
-        fi
-        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
-$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
-        as_fn_error $? "Cannot continue" "$LINENO" 5
+  if test "x$SED" = x; then
+    if test "x" = x; then
+      PROG_NAME=sed
+    else
+      PROG_NAME=
     fi
+    { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
+$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
+    as_fn_error $? "Cannot continue" "$LINENO" 5
+  fi
 
 
-for ac_prog in nawk gawk awk
+  for ac_prog in nawk gawk awk
 do
   # Extract the first word of "$ac_prog", so it can be a program name with args.
 set dummy $ac_prog; ac_word=$2
@@ -6390,27 +6390,27 @@
 done
 
 
-    if test "x$NAWK" = x; then
-        if test "x" = x; then
-          PROG_NAME=nawk
-        else
-          PROG_NAME=
-        fi
-        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
-$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
-        as_fn_error $? "Cannot continue" "$LINENO" 5
+  if test "x$NAWK" = x; then
+    if test "x" = x; then
+      PROG_NAME=nawk
+    else
+      PROG_NAME=
     fi
+    { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
+$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
+    as_fn_error $? "Cannot continue" "$LINENO" 5
+  fi
 
 
-# Always force rm.
-RM="$RM -f"
+  # Always force rm.
+  RM="$RM -f"
 
-# pwd behaves differently on various platforms and some don't support the -L flag.
-# Always use the bash builtin pwd to get uniform behavior.
-THEPWDCMD=pwd
+  # pwd behaves differently on various platforms and some don't support the -L flag.
+  # Always use the bash builtin pwd to get uniform behavior.
+  THEPWDCMD=pwd
 
-# These are not required on all platforms
-# Extract the first word of "cygpath", so it can be a program name with args.
+  # These are not required on all platforms
+  # Extract the first word of "cygpath", so it can be a program name with args.
 set dummy cygpath; ac_word=$2
 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
 $as_echo_n "checking for $ac_word... " >&6; }
@@ -6450,7 +6450,7 @@
 fi
 
 
-# Extract the first word of "readlink", so it can be a program name with args.
+  # Extract the first word of "readlink", so it can be a program name with args.
 set dummy readlink; ac_word=$2
 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
 $as_echo_n "checking for $ac_word... " >&6; }
@@ -6490,7 +6490,7 @@
 fi
 
 
-# Extract the first word of "df", so it can be a program name with args.
+  # Extract the first word of "df", so it can be a program name with args.
 set dummy df; ac_word=$2
 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
 $as_echo_n "checking for $ac_word... " >&6; }
@@ -6530,7 +6530,7 @@
 fi
 
 
-# Extract the first word of "SetFile", so it can be a program name with args.
+  # Extract the first word of "SetFile", so it can be a program name with args.
 set dummy SetFile; ac_word=$2
 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
 $as_echo_n "checking for $ac_word... " >&6; }
@@ -6685,26 +6685,26 @@
     NONENONEs,x,x, &&
   program_prefix=${target_alias}-
 
-# Figure out the build and target systems. # Note that in autoconf terminology, "build" is obvious, but "target"
-# is confusing; it assumes you are cross-compiling a cross-compiler (!)  and "target" is thus the target of the
-# product you're building. The target of this build is called "host". Since this is confusing to most people, we
-# have not adopted that system, but use "target" as the platform we are building for. In some places though we need
-# to use the configure naming style.
+  # Figure out the build and target systems. # Note that in autoconf terminology, "build" is obvious, but "target"
+  # is confusing; it assumes you are cross-compiling a cross-compiler (!)  and "target" is thus the target of the
+  # product you're building. The target of this build is called "host". Since this is confusing to most people, we
+  # have not adopted that system, but use "target" as the platform we are building for. In some places though we need
+  # to use the configure naming style.
 
 
 
 
 
-    # Copy the autoconf trip/quadruplet verbatim to OPENJDK_TARGET_AUTOCONF_NAME
-    # (from the autoconf "host") and OPENJDK_BUILD_AUTOCONF_NAME
-    # Note that we might later on rewrite e.g. OPENJDK_TARGET_CPU due to reduced build,
-    # but this will not change the value of OPENJDK_TARGET_AUTOCONF_NAME.
-    OPENJDK_TARGET_AUTOCONF_NAME="$host"
-    OPENJDK_BUILD_AUTOCONF_NAME="$build"
+  # Copy the autoconf trip/quadruplet verbatim to OPENJDK_TARGET_AUTOCONF_NAME
+  # (from the autoconf "host") and OPENJDK_BUILD_AUTOCONF_NAME
+  # Note that we might later on rewrite e.g. OPENJDK_TARGET_CPU due to reduced build,
+  # but this will not change the value of OPENJDK_TARGET_AUTOCONF_NAME.
+  OPENJDK_TARGET_AUTOCONF_NAME="$host"
+  OPENJDK_BUILD_AUTOCONF_NAME="$build"
 
 
 
-    # Convert the autoconf OS/CPU value to our own data, into the VAR_OS/CPU variables.
+  # Convert the autoconf OS/CPU value to our own data, into the VAR_OS/CPU variables.
 
   case "$build_os" in
     *linux*)
@@ -6768,50 +6768,50 @@
       VAR_CPU_ARCH=ppc
       VAR_CPU_BITS=32
       VAR_CPU_ENDIAN=big
-       ;;
+      ;;
     powerpc64)
       VAR_CPU=ppc64
       VAR_CPU_ARCH=ppc
       VAR_CPU_BITS=64
       VAR_CPU_ENDIAN=big
-       ;;
+      ;;
     s390)
       VAR_CPU=s390
       VAR_CPU_ARCH=s390
       VAR_CPU_BITS=32
       VAR_CPU_ENDIAN=big
-       ;;
+      ;;
     s390x)
       VAR_CPU=s390x
       VAR_CPU_ARCH=s390
       VAR_CPU_BITS=64
       VAR_CPU_ENDIAN=big
-       ;;
+      ;;
     sparc)
       VAR_CPU=sparc
       VAR_CPU_ARCH=sparc
       VAR_CPU_BITS=32
       VAR_CPU_ENDIAN=big
-       ;;
+      ;;
     sparcv9)
       VAR_CPU=sparcv9
       VAR_CPU_ARCH=sparc
       VAR_CPU_BITS=64
       VAR_CPU_ENDIAN=big
-       ;;
+      ;;
     *)
       as_fn_error $? "unsupported cpu $build_cpu" "$LINENO" 5
       ;;
   esac
 
-    # ..and setup our own variables. (Do this explicitely to facilitate searching)
-    OPENJDK_BUILD_OS="$VAR_OS"
-    OPENJDK_BUILD_OS_API="$VAR_OS_API"
-    OPENJDK_BUILD_OS_ENV="$VAR_OS_ENV"
-    OPENJDK_BUILD_CPU="$VAR_CPU"
-    OPENJDK_BUILD_CPU_ARCH="$VAR_CPU_ARCH"
-    OPENJDK_BUILD_CPU_BITS="$VAR_CPU_BITS"
-    OPENJDK_BUILD_CPU_ENDIAN="$VAR_CPU_ENDIAN"
+  # ..and setup our own variables. (Do this explicitely to facilitate searching)
+  OPENJDK_BUILD_OS="$VAR_OS"
+  OPENJDK_BUILD_OS_API="$VAR_OS_API"
+  OPENJDK_BUILD_OS_ENV="$VAR_OS_ENV"
+  OPENJDK_BUILD_CPU="$VAR_CPU"
+  OPENJDK_BUILD_CPU_ARCH="$VAR_CPU_ARCH"
+  OPENJDK_BUILD_CPU_BITS="$VAR_CPU_BITS"
+  OPENJDK_BUILD_CPU_ENDIAN="$VAR_CPU_ENDIAN"
 
 
 
@@ -6819,12 +6819,12 @@
 
 
 
-    { $as_echo "$as_me:${as_lineno-$LINENO}: checking openjdk-build os-cpu" >&5
+  { $as_echo "$as_me:${as_lineno-$LINENO}: checking openjdk-build os-cpu" >&5
 $as_echo_n "checking openjdk-build os-cpu... " >&6; }
-    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OPENJDK_BUILD_OS-$OPENJDK_BUILD_CPU" >&5
+  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OPENJDK_BUILD_OS-$OPENJDK_BUILD_CPU" >&5
 $as_echo "$OPENJDK_BUILD_OS-$OPENJDK_BUILD_CPU" >&6; }
 
-    # Convert the autoconf OS/CPU value to our own data, into the VAR_OS/CPU variables.
+  # Convert the autoconf OS/CPU value to our own data, into the VAR_OS/CPU variables.
 
   case "$host_os" in
     *linux*)
@@ -6888,50 +6888,50 @@
       VAR_CPU_ARCH=ppc
       VAR_CPU_BITS=32
       VAR_CPU_ENDIAN=big
-       ;;
+      ;;
     powerpc64)
       VAR_CPU=ppc64
       VAR_CPU_ARCH=ppc
       VAR_CPU_BITS=64
       VAR_CPU_ENDIAN=big
-       ;;
+      ;;
     s390)
       VAR_CPU=s390
       VAR_CPU_ARCH=s390
       VAR_CPU_BITS=32
       VAR_CPU_ENDIAN=big
-       ;;
+      ;;
     s390x)
       VAR_CPU=s390x
       VAR_CPU_ARCH=s390
       VAR_CPU_BITS=64
       VAR_CPU_ENDIAN=big
-       ;;
+      ;;
     sparc)
       VAR_CPU=sparc
       VAR_CPU_ARCH=sparc
       VAR_CPU_BITS=32
       VAR_CPU_ENDIAN=big
-       ;;
+      ;;
     sparcv9)
       VAR_CPU=sparcv9
       VAR_CPU_ARCH=sparc
       VAR_CPU_BITS=64
       VAR_CPU_ENDIAN=big
-       ;;
+      ;;
     *)
       as_fn_error $? "unsupported cpu $host_cpu" "$LINENO" 5
       ;;
   esac
 
-    # ... and setup our own variables. (Do this explicitely to facilitate searching)
-    OPENJDK_TARGET_OS="$VAR_OS"
-    OPENJDK_TARGET_OS_API="$VAR_OS_API"
-    OPENJDK_TARGET_OS_ENV="$VAR_OS_ENV"
-    OPENJDK_TARGET_CPU="$VAR_CPU"
-    OPENJDK_TARGET_CPU_ARCH="$VAR_CPU_ARCH"
-    OPENJDK_TARGET_CPU_BITS="$VAR_CPU_BITS"
-    OPENJDK_TARGET_CPU_ENDIAN="$VAR_CPU_ENDIAN"
+  # ... and setup our own variables. (Do this explicitely to facilitate searching)
+  OPENJDK_TARGET_OS="$VAR_OS"
+  OPENJDK_TARGET_OS_API="$VAR_OS_API"
+  OPENJDK_TARGET_OS_ENV="$VAR_OS_ENV"
+  OPENJDK_TARGET_CPU="$VAR_CPU"
+  OPENJDK_TARGET_CPU_ARCH="$VAR_CPU_ARCH"
+  OPENJDK_TARGET_CPU_BITS="$VAR_CPU_BITS"
+  OPENJDK_TARGET_CPU_ENDIAN="$VAR_CPU_ENDIAN"
 
 
 
@@ -6939,9 +6939,9 @@
 
 
 
-    { $as_echo "$as_me:${as_lineno-$LINENO}: checking openjdk-target os-cpu" >&5
+  { $as_echo "$as_me:${as_lineno-$LINENO}: checking openjdk-target os-cpu" >&5
 $as_echo_n "checking openjdk-target os-cpu... " >&6; }
-    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OPENJDK_TARGET_OS-$OPENJDK_TARGET_CPU" >&5
+  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OPENJDK_TARGET_OS-$OPENJDK_TARGET_CPU" >&5
 $as_echo "$OPENJDK_TARGET_OS-$OPENJDK_TARGET_CPU" >&6; }
 
 
@@ -6991,168 +6991,167 @@
   fi
 
 
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking compilation type" >&5
+  { $as_echo "$as_me:${as_lineno-$LINENO}: checking compilation type" >&5
 $as_echo_n "checking compilation type... " >&6; }
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $COMPILE_TYPE" >&5
+  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $COMPILE_TYPE" >&5
 $as_echo "$COMPILE_TYPE" >&6; }
 
 
-    if test "x$OPENJDK_TARGET_OS" = "xsolaris"; then
-       REQUIRED_OS_NAME=SunOS
-       REQUIRED_OS_VERSION=5.10
-    fi
-    if test "x$OPENJDK_TARGET_OS" = "xlinux"; then
-       REQUIRED_OS_NAME=Linux
-       REQUIRED_OS_VERSION=2.6
-    fi
-    if test "x$OPENJDK_TARGET_OS" = "xwindows"; then
-        REQUIRED_OS_NAME=Windows
-        if test "x$OPENJDK_TARGET_CPU_BITS" = "x64"; then
-            REQUIRED_OS_VERSION=5.2
-        else
-            REQUIRED_OS_VERSION=5.1
-        fi
-    fi
-    if test "x$OPENJDK_TARGET_OS" = "xmacosx"; then
-        REQUIRED_OS_NAME=Darwin
-        REQUIRED_OS_VERSION=11.2
-    fi
-
-
-
-
-
-    # Also store the legacy naming of the cpu.
-    # Ie i586 and amd64 instead of x86 and x86_64
-    OPENJDK_TARGET_CPU_LEGACY="$OPENJDK_TARGET_CPU"
-    if test "x$OPENJDK_TARGET_CPU" = xx86; then
-      OPENJDK_TARGET_CPU_LEGACY="i586"
-    elif test "x$OPENJDK_TARGET_OS" != xmacosx && test "x$OPENJDK_TARGET_CPU" = xx86_64; then
-      # On all platforms except MacOSX replace x86_64 with amd64.
-      OPENJDK_TARGET_CPU_LEGACY="amd64"
-    fi
-
-
-    # And the second legacy naming of the cpu.
-    # Ie i386 and amd64 instead of x86 and x86_64.
-    OPENJDK_TARGET_CPU_LEGACY_LIB="$OPENJDK_TARGET_CPU"
-    if test "x$OPENJDK_TARGET_CPU" = xx86; then
-      OPENJDK_TARGET_CPU_LEGACY_LIB="i386"
-    elif test "x$OPENJDK_TARGET_CPU" = xx86_64; then
-      OPENJDK_TARGET_CPU_LEGACY_LIB="amd64"
-    fi
-
-
-    # This is the name of the cpu (but using i386 and amd64 instead of
-    # x86 and x86_64, respectively), preceeded by a /, to be used when
-    # locating libraries. On macosx, it's empty, though.
-    OPENJDK_TARGET_CPU_LIBDIR="/$OPENJDK_TARGET_CPU_LEGACY_LIB"
-    if test "x$OPENJDK_TARGET_OS" = xmacosx; then
-        OPENJDK_TARGET_CPU_LIBDIR=""
-    fi
-
-
-    # OPENJDK_TARGET_CPU_ISADIR is normally empty. On 64-bit Solaris systems, it is set to
-    # /amd64 or /sparcv9. This string is appended to some library paths, like this:
-    # /usr/lib${OPENJDK_TARGET_CPU_ISADIR}/libexample.so
-    OPENJDK_TARGET_CPU_ISADIR=""
-    if test "x$OPENJDK_TARGET_OS" = xsolaris; then
-      if test "x$OPENJDK_TARGET_CPU" = xx86_64; then
-          OPENJDK_TARGET_CPU_ISADIR="/amd64"
-      elif test "x$OPENJDK_TARGET_CPU" = xsparcv9; then
-          OPENJDK_TARGET_CPU_ISADIR="/sparcv9"
-      fi
-    fi
-
-
-    # Setup OPENJDK_TARGET_CPU_OSARCH, which is used to set the os.arch Java system property
-    OPENJDK_TARGET_CPU_OSARCH="$OPENJDK_TARGET_CPU"
-    if test "x$OPENJDK_TARGET_OS" = xlinux && test "x$OPENJDK_TARGET_CPU" = xx86; then
-      # On linux only, we replace x86 with i386.
-      OPENJDK_TARGET_CPU_OSARCH="i386"
-    elif test "x$OPENJDK_TARGET_OS" != xmacosx && test "x$OPENJDK_TARGET_CPU" = xx86_64; then
-      # On all platforms except macosx, we replace x86_64 with amd64.
-      OPENJDK_TARGET_CPU_OSARCH="amd64"
-    fi
-
-
-    OPENJDK_TARGET_CPU_JLI="$OPENJDK_TARGET_CPU"
-    if test "x$OPENJDK_TARGET_CPU" = xx86; then
-      OPENJDK_TARGET_CPU_JLI="i386"
-    elif test "x$OPENJDK_TARGET_OS" != xmacosx && test "x$OPENJDK_TARGET_CPU" = xx86_64; then
-      # On all platforms except macosx, we replace x86_64 with amd64.
-      OPENJDK_TARGET_CPU_JLI="amd64"
-    fi
-    # Now setup the -D flags for building libjli.
-    OPENJDK_TARGET_CPU_JLI_CFLAGS="-DLIBARCHNAME='\"$OPENJDK_TARGET_CPU_JLI\"'"
-    if test "x$OPENJDK_TARGET_OS" = xsolaris; then
-      if test "x$OPENJDK_TARGET_CPU_ARCH" = xsparc; then
-        OPENJDK_TARGET_CPU_JLI_CFLAGS="$OPENJDK_TARGET_CPU_JLI_CFLAGS -DLIBARCH32NAME='\"sparc\"' -DLIBARCH64NAME='\"sparcv9\"'"
-      elif test "x$OPENJDK_TARGET_CPU_ARCH" = xx86; then
-        OPENJDK_TARGET_CPU_JLI_CFLAGS="$OPENJDK_TARGET_CPU_JLI_CFLAGS -DLIBARCH32NAME='\"i386\"' -DLIBARCH64NAME='\"amd64\"'"
-      fi
-    fi
-
-
-    # Setup OPENJDK_TARGET_OS_API_DIR, used in source paths.
-    if test "x$OPENJDK_TARGET_OS_API" = xposix; then
-        OPENJDK_TARGET_OS_API_DIR="solaris"
-    fi
-    if test "x$OPENJDK_TARGET_OS_API" = xwinapi; then
-        OPENJDK_TARGET_OS_API_DIR="windows"
-    fi
-
-
-    if test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
-        A_LP64="LP64:="
-        # -D_LP64=1 is only set on linux and mac. Setting on windows causes diff in
-        # unpack200.exe
-        if test "x$OPENJDK_TARGET_OS" = xlinux || test "x$OPENJDK_TARGET_OS" = xmacosx; then
-            ADD_LP64="-D_LP64=1"
-        fi
-    fi
-    LP64=$A_LP64
-
-
-    if test "x$COMPILE_TYPE" = "xcross"; then
-      # FIXME: ... or should this include reduced builds..?
-      DEFINE_CROSS_COMPILE_ARCH="CROSS_COMPILE_ARCH:=$OPENJDK_TARGET_CPU_LEGACY"
+  if test "x$OPENJDK_TARGET_OS" = "xsolaris"; then
+    REQUIRED_OS_NAME=SunOS
+    REQUIRED_OS_VERSION=5.10
+  fi
+  if test "x$OPENJDK_TARGET_OS" = "xlinux"; then
+    REQUIRED_OS_NAME=Linux
+    REQUIRED_OS_VERSION=2.6
+  fi
+  if test "x$OPENJDK_TARGET_OS" = "xwindows"; then
+    REQUIRED_OS_NAME=Windows
+    if test "x$OPENJDK_TARGET_CPU_BITS" = "x64"; then
+      REQUIRED_OS_VERSION=5.2
     else
-      DEFINE_CROSS_COMPILE_ARCH=""
+      REQUIRED_OS_VERSION=5.1
     fi
+  fi
+  if test "x$OPENJDK_TARGET_OS" = "xmacosx"; then
+    REQUIRED_OS_NAME=Darwin
+    REQUIRED_OS_VERSION=11.2
+  fi
 
 
-    # ZERO_ARCHDEF is used to enable architecture-specific code
-    case "${OPENJDK_TARGET_CPU}" in
-      ppc*)    ZERO_ARCHDEF=PPC   ;;
-      s390*)   ZERO_ARCHDEF=S390  ;;
-      sparc*)  ZERO_ARCHDEF=SPARC ;;
-      x86_64*) ZERO_ARCHDEF=AMD64 ;;
-      x86)     ZERO_ARCHDEF=IA32  ;;
-      *)      ZERO_ARCHDEF=$(echo "${OPENJDK_TARGET_CPU_LEGACY_LIB}" | tr a-z A-Z)
-    esac
 
 
 
+  # Also store the legacy naming of the cpu.
+  # Ie i586 and amd64 instead of x86 and x86_64
+  OPENJDK_TARGET_CPU_LEGACY="$OPENJDK_TARGET_CPU"
+  if test "x$OPENJDK_TARGET_CPU" = xx86; then
+    OPENJDK_TARGET_CPU_LEGACY="i586"
+  elif test "x$OPENJDK_TARGET_OS" != xmacosx && test "x$OPENJDK_TARGET_CPU" = xx86_64; then
+    # On all platforms except MacOSX replace x86_64 with amd64.
+    OPENJDK_TARGET_CPU_LEGACY="amd64"
+  fi
+
+
+  # And the second legacy naming of the cpu.
+  # Ie i386 and amd64 instead of x86 and x86_64.
+  OPENJDK_TARGET_CPU_LEGACY_LIB="$OPENJDK_TARGET_CPU"
+  if test "x$OPENJDK_TARGET_CPU" = xx86; then
+    OPENJDK_TARGET_CPU_LEGACY_LIB="i386"
+  elif test "x$OPENJDK_TARGET_CPU" = xx86_64; then
+    OPENJDK_TARGET_CPU_LEGACY_LIB="amd64"
+  fi
+
+
+  # This is the name of the cpu (but using i386 and amd64 instead of
+  # x86 and x86_64, respectively), preceeded by a /, to be used when
+  # locating libraries. On macosx, it's empty, though.
+  OPENJDK_TARGET_CPU_LIBDIR="/$OPENJDK_TARGET_CPU_LEGACY_LIB"
+  if test "x$OPENJDK_TARGET_OS" = xmacosx; then
+    OPENJDK_TARGET_CPU_LIBDIR=""
+  fi
+
+
+  # OPENJDK_TARGET_CPU_ISADIR is normally empty. On 64-bit Solaris systems, it is set to
+  # /amd64 or /sparcv9. This string is appended to some library paths, like this:
+  # /usr/lib${OPENJDK_TARGET_CPU_ISADIR}/libexample.so
+  OPENJDK_TARGET_CPU_ISADIR=""
+  if test "x$OPENJDK_TARGET_OS" = xsolaris; then
+    if test "x$OPENJDK_TARGET_CPU" = xx86_64; then
+      OPENJDK_TARGET_CPU_ISADIR="/amd64"
+    elif test "x$OPENJDK_TARGET_CPU" = xsparcv9; then
+      OPENJDK_TARGET_CPU_ISADIR="/sparcv9"
+    fi
+  fi
+
+
+  # Setup OPENJDK_TARGET_CPU_OSARCH, which is used to set the os.arch Java system property
+  OPENJDK_TARGET_CPU_OSARCH="$OPENJDK_TARGET_CPU"
+  if test "x$OPENJDK_TARGET_OS" = xlinux && test "x$OPENJDK_TARGET_CPU" = xx86; then
+    # On linux only, we replace x86 with i386.
+    OPENJDK_TARGET_CPU_OSARCH="i386"
+  elif test "x$OPENJDK_TARGET_OS" != xmacosx && test "x$OPENJDK_TARGET_CPU" = xx86_64; then
+    # On all platforms except macosx, we replace x86_64 with amd64.
+    OPENJDK_TARGET_CPU_OSARCH="amd64"
+  fi
+
+
+  OPENJDK_TARGET_CPU_JLI="$OPENJDK_TARGET_CPU"
+  if test "x$OPENJDK_TARGET_CPU" = xx86; then
+    OPENJDK_TARGET_CPU_JLI="i386"
+  elif test "x$OPENJDK_TARGET_OS" != xmacosx && test "x$OPENJDK_TARGET_CPU" = xx86_64; then
+    # On all platforms except macosx, we replace x86_64 with amd64.
+    OPENJDK_TARGET_CPU_JLI="amd64"
+  fi
+  # Now setup the -D flags for building libjli.
+  OPENJDK_TARGET_CPU_JLI_CFLAGS="-DLIBARCHNAME='\"$OPENJDK_TARGET_CPU_JLI\"'"
+  if test "x$OPENJDK_TARGET_OS" = xsolaris; then
+    if test "x$OPENJDK_TARGET_CPU_ARCH" = xsparc; then
+      OPENJDK_TARGET_CPU_JLI_CFLAGS="$OPENJDK_TARGET_CPU_JLI_CFLAGS -DLIBARCH32NAME='\"sparc\"' -DLIBARCH64NAME='\"sparcv9\"'"
+    elif test "x$OPENJDK_TARGET_CPU_ARCH" = xx86; then
+      OPENJDK_TARGET_CPU_JLI_CFLAGS="$OPENJDK_TARGET_CPU_JLI_CFLAGS -DLIBARCH32NAME='\"i386\"' -DLIBARCH64NAME='\"amd64\"'"
+    fi
+  fi
+
+
+  # Setup OPENJDK_TARGET_OS_API_DIR, used in source paths.
+  if test "x$OPENJDK_TARGET_OS_API" = xposix; then
+    OPENJDK_TARGET_OS_API_DIR="solaris"
+  fi
+  if test "x$OPENJDK_TARGET_OS_API" = xwinapi; then
+    OPENJDK_TARGET_OS_API_DIR="windows"
+  fi
+
+
+  if test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
+    A_LP64="LP64:="
+    # -D_LP64=1 is only set on linux and mac. Setting on windows causes diff in
+    # unpack200.exe
+    if test "x$OPENJDK_TARGET_OS" = xlinux || test "x$OPENJDK_TARGET_OS" = xmacosx; then
+      ADD_LP64="-D_LP64=1"
+    fi
+  fi
+  LP64=$A_LP64
+
+
+  if test "x$COMPILE_TYPE" = "xcross"; then
+    # FIXME: ... or should this include reduced builds..?
+    DEFINE_CROSS_COMPILE_ARCH="CROSS_COMPILE_ARCH:=$OPENJDK_TARGET_CPU_LEGACY"
+  else
+    DEFINE_CROSS_COMPILE_ARCH=""
+  fi
+
+
+  # ZERO_ARCHDEF is used to enable architecture-specific code
+  case "${OPENJDK_TARGET_CPU}" in
+    ppc*)    ZERO_ARCHDEF=PPC   ;;
+    s390*)   ZERO_ARCHDEF=S390  ;;
+    sparc*)  ZERO_ARCHDEF=SPARC ;;
+    x86_64*) ZERO_ARCHDEF=AMD64 ;;
+    x86)     ZERO_ARCHDEF=IA32  ;;
+    *)      ZERO_ARCHDEF=$(echo "${OPENJDK_TARGET_CPU_LEGACY_LIB}" | tr a-z A-Z)
+  esac
+
+
 
 
 # Continue setting up basic stuff. Most remaining code require fundamental tools.
 
-# Locate the directory of this script.
-SCRIPT="$0"
-AUTOCONF_DIR=`cd \`$DIRNAME $SCRIPT\`; $THEPWDCMD -L`
+  # Locate the directory of this script.
+  SCRIPT="$0"
+  AUTOCONF_DIR=`cd \`$DIRNAME $SCRIPT\`; $THEPWDCMD -L`
 
-# Where is the source? It is located two levels above the configure script.
-CURDIR="$PWD"
-cd "$AUTOCONF_DIR/../.."
-SRC_ROOT="`$THEPWDCMD -L`"
+  # Where is the source? It is located two levels above the configure script.
+  CURDIR="$PWD"
+  cd "$AUTOCONF_DIR/../.."
+  SRC_ROOT="`$THEPWDCMD -L`"
 
-if test "x$OPENJDK_TARGET_OS" = "xwindows"; then
-  PATH_SEP=";"
+  if test "x$OPENJDK_TARGET_OS" = "xwindows"; then
+    PATH_SEP=";"
 
   SRC_ROOT_LENGTH=`$THEPWDCMD -L|$WC -m`
   if test $SRC_ROOT_LENGTH -gt 100; then
-      as_fn_error $? "Your base path is too long. It is $SRC_ROOT_LENGTH characters long, but only 100 is supported" "$LINENO" 5
+    as_fn_error $? "Your base path is too long. It is $SRC_ROOT_LENGTH characters long, but only 100 is supported" "$LINENO" 5
   fi
 
   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
@@ -7171,7 +7170,7 @@
       as_fn_error $? "Cannot continue" "$LINENO" 5
     fi
     if test "x$CYGPATH" = x; then
-        as_fn_error $? "Something is wrong with your cygwin installation since I cannot find cygpath.exe in your path" "$LINENO" 5
+      as_fn_error $? "Something is wrong with your cygwin installation since I cannot find cygpath.exe in your path" "$LINENO" 5
     fi
     { $as_echo "$as_me:${as_lineno-$LINENO}: checking cygwin root directory as unix-style path" >&5
 $as_echo_n "checking cygwin root directory as unix-style path... " >&6; }
@@ -7184,7 +7183,7 @@
     WINDOWS_ENV_ROOT_PATH="$CYGWIN_ROOT_PATH"
     test_cygdrive_prefix=`$ECHO $CYGWIN_ROOT_PATH | $GREP ^/cygdrive/`
     if test "x$test_cygdrive_prefix" = x; then
-        as_fn_error $? "Your cygdrive prefix is not /cygdrive. This is currently not supported. Change with mount -c." "$LINENO" 5
+      as_fn_error $? "Your cygdrive prefix is not /cygdrive. This is currently not supported. Change with mount -c." "$LINENO" 5
     fi
   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
     { $as_echo "$as_me:${as_lineno-$LINENO}: checking msys release" >&5
@@ -7239,13 +7238,13 @@
 $as_echo "$as_me: WARNING: It seems that your find utility is non-standard." >&2;}
   fi
 
-else
-  PATH_SEP=":"
-fi
+  else
+    PATH_SEP=":"
+  fi
 
 
 
-cd "$CURDIR"
+  cd "$CURDIR"
 
 
   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
@@ -7492,13 +7491,13 @@
   fi
 
 
-if test "x$OPENJDK_BUILD_OS" = "xsolaris"; then
+  if test "x$OPENJDK_BUILD_OS" = "xsolaris"; then
     # Add extra search paths on solaris for utilities like ar and as etc...
     PATH="$PATH:/usr/ccs/bin:/usr/sfw/bin:/opt/csw/bin"
-fi
+  fi
 
-# You can force the sys-root if the sys-root encoded into the cross compiler tools
-# is not correct.
+  # You can force the sys-root if the sys-root encoded into the cross compiler tools
+  # is not correct.
 
 # Check whether --with-sys-root was given.
 if test "${with_sys_root+set}" = set; then :
@@ -7506,11 +7505,11 @@
 fi
 
 
-if test "x$with_sys_root" != x; then
-  SYS_ROOT=$with_sys_root
-else
-  SYS_ROOT=/
-fi
+  if test "x$with_sys_root" != x; then
+    SYS_ROOT=$with_sys_root
+  else
+    SYS_ROOT=/
+  fi
 
 
 
@@ -7525,9 +7524,9 @@
 # Check whether --with-devkit was given.
 if test "${with_devkit+set}" = set; then :
   withval=$with_devkit;
-    if test "x$with_sys_root" != x; then
-      as_fn_error $? "Cannot specify both --with-devkit and --with-sys-root at the same time" "$LINENO" 5
-    fi
+        if test "x$with_sys_root" != x; then
+          as_fn_error $? "Cannot specify both --with-devkit and --with-sys-root at the same time" "$LINENO" 5
+        fi
 
   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
 
@@ -7657,20 +7656,20 @@
     TOOLS_DIR="$TOOLS_DIR:$with_devkit/bin"
   fi
 
-    if test -d "$with_devkit/$host_alias/libc"; then
-      SYS_ROOT=$with_devkit/$host_alias/libc
-    elif test -d "$with_devkit/$host/sys-root"; then
-      SYS_ROOT=$with_devkit/$host/sys-root
-    fi
+        if test -d "$with_devkit/$host_alias/libc"; then
+          SYS_ROOT=$with_devkit/$host_alias/libc
+        elif test -d "$with_devkit/$host/sys-root"; then
+          SYS_ROOT=$with_devkit/$host/sys-root
+        fi
 
 fi
 
 
 
-# Setup default logging of stdout and stderr to build.log in the output root.
-BUILD_LOG='$(OUTPUT_ROOT)/build.log'
-BUILD_LOG_PREVIOUS='$(OUTPUT_ROOT)/build.log.old'
-BUILD_LOG_WRAPPER='$(BASH) $(SRC_ROOT)/common/bin/logger.sh $(BUILD_LOG)'
+  # Setup default logging of stdout and stderr to build.log in the output root.
+  BUILD_LOG='$(OUTPUT_ROOT)/build.log'
+  BUILD_LOG_PREVIOUS='$(OUTPUT_ROOT)/build.log.old'
+  BUILD_LOG_WRAPPER='$(BASH) $(SRC_ROOT)/common/bin/logger.sh $(BUILD_LOG)'
 
 
 
@@ -7725,18 +7724,18 @@
 
 # These are needed to be able to create a configuration name (and thus the output directory)
 
-###############################################################################
-#
-# Check which variant of the JDK that we want to build.
-# Currently we have:
-#    normal:   standard edition
-# but the custom make system may add other variants
-#
-# Effectively the JDK variant gives a name to a specific set of
-# modules to compile into the JDK. In the future, these modules
-# might even be Jigsaw modules.
-#
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking which variant of the JDK to build" >&5
+  ###############################################################################
+  #
+  # Check which variant of the JDK that we want to build.
+  # Currently we have:
+  #    normal:   standard edition
+  # but the custom make system may add other variants
+  #
+  # Effectively the JDK variant gives a name to a specific set of
+  # modules to compile into the JDK. In the future, these modules
+  # might even be Jigsaw modules.
+  #
+  { $as_echo "$as_me:${as_lineno-$LINENO}: checking which variant of the JDK to build" >&5
 $as_echo_n "checking which variant of the JDK to build... " >&6; }
 
 # Check whether --with-jdk-variant was given.
@@ -7745,31 +7744,31 @@
 fi
 
 
-if test "x$with_jdk_variant" = xnormal || test "x$with_jdk_variant" = x; then
+  if test "x$with_jdk_variant" = xnormal || test "x$with_jdk_variant" = x; then
     JDK_VARIANT="normal"
-else
+  else
     as_fn_error $? "The available JDK variants are: normal" "$LINENO" 5
-fi
+  fi
 
 
 
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $JDK_VARIANT" >&5
+  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $JDK_VARIANT" >&5
 $as_echo "$JDK_VARIANT" >&6; }
 
 
 
-###############################################################################
-#
-# Check which variants of the JVM that we want to build.
-# Currently we have:
-#    server: normal interpreter and a tiered C1/C2 compiler
-#    client: normal interpreter and C1 (no C2 compiler) (only 32-bit platforms)
-#    minimal1: reduced form of client with optional VM services and features stripped out
-#    kernel: kernel footprint JVM that passes the TCK without major performance problems,
-#             ie normal interpreter and C1, only the serial GC, kernel jvmti etc
-#    zero: no machine code interpreter, no compiler
-#    zeroshark: zero interpreter and shark/llvm compiler backend
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking which variants of the JVM to build" >&5
+  ###############################################################################
+  #
+  # Check which variants of the JVM that we want to build.
+  # Currently we have:
+  #    server: normal interpreter and a tiered C1/C2 compiler
+  #    client: normal interpreter and C1 (no C2 compiler) (only 32-bit platforms)
+  #    minimal1: reduced form of client with optional VM services and features stripped out
+  #    kernel: kernel footprint JVM that passes the TCK without major performance problems,
+  #             ie normal interpreter and C1, only the serial GC, kernel jvmti etc
+  #    zero: no machine code interpreter, no compiler
+  #    zeroshark: zero interpreter and shark/llvm compiler backend
+  { $as_echo "$as_me:${as_lineno-$LINENO}: checking which variants of the JVM to build" >&5
 $as_echo_n "checking which variants of the JVM to build... " >&6; }
 
 # Check whether --with-jvm-variants was given.
@@ -7778,50 +7777,50 @@
 fi
 
 
-if test "x$with_jvm_variants" = x; then
-     with_jvm_variants="server"
-fi
+  if test "x$with_jvm_variants" = x; then
+    with_jvm_variants="server"
+  fi
 
-JVM_VARIANTS=",$with_jvm_variants,"
-TEST_VARIANTS=`$ECHO "$JVM_VARIANTS" | $SED -e 's/server,//' -e 's/client,//'  -e 's/minimal1,//' -e 's/kernel,//' -e 's/zero,//' -e 's/zeroshark,//'`
+  JVM_VARIANTS=",$with_jvm_variants,"
+  TEST_VARIANTS=`$ECHO "$JVM_VARIANTS" | $SED -e 's/server,//' -e 's/client,//'  -e 's/minimal1,//' -e 's/kernel,//' -e 's/zero,//' -e 's/zeroshark,//'`
 
-if test "x$TEST_VARIANTS" != "x,"; then
-   as_fn_error $? "The available JVM variants are: server, client, minimal1, kernel, zero, zeroshark" "$LINENO" 5
-fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_jvm_variants" >&5
+  if test "x$TEST_VARIANTS" != "x,"; then
+    as_fn_error $? "The available JVM variants are: server, client, minimal1, kernel, zero, zeroshark" "$LINENO" 5
+  fi
+  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_jvm_variants" >&5
 $as_echo "$with_jvm_variants" >&6; }
 
-JVM_VARIANT_SERVER=`$ECHO "$JVM_VARIANTS" | $SED -e '/,server,/!s/.*/false/g' -e '/,server,/s/.*/true/g'`
-JVM_VARIANT_CLIENT=`$ECHO "$JVM_VARIANTS" | $SED -e '/,client,/!s/.*/false/g' -e '/,client,/s/.*/true/g'`
-JVM_VARIANT_MINIMAL1=`$ECHO "$JVM_VARIANTS" | $SED -e '/,minimal1,/!s/.*/false/g' -e '/,minimal1,/s/.*/true/g'`
-JVM_VARIANT_KERNEL=`$ECHO "$JVM_VARIANTS" | $SED -e '/,kernel,/!s/.*/false/g' -e '/,kernel,/s/.*/true/g'`
-JVM_VARIANT_ZERO=`$ECHO "$JVM_VARIANTS" | $SED -e '/,zero,/!s/.*/false/g' -e '/,zero,/s/.*/true/g'`
-JVM_VARIANT_ZEROSHARK=`$ECHO "$JVM_VARIANTS" | $SED -e '/,zeroshark,/!s/.*/false/g' -e '/,zeroshark,/s/.*/true/g'`
+  JVM_VARIANT_SERVER=`$ECHO "$JVM_VARIANTS" | $SED -e '/,server,/!s/.*/false/g' -e '/,server,/s/.*/true/g'`
+  JVM_VARIANT_CLIENT=`$ECHO "$JVM_VARIANTS" | $SED -e '/,client,/!s/.*/false/g' -e '/,client,/s/.*/true/g'`
+  JVM_VARIANT_MINIMAL1=`$ECHO "$JVM_VARIANTS" | $SED -e '/,minimal1,/!s/.*/false/g' -e '/,minimal1,/s/.*/true/g'`
+  JVM_VARIANT_KERNEL=`$ECHO "$JVM_VARIANTS" | $SED -e '/,kernel,/!s/.*/false/g' -e '/,kernel,/s/.*/true/g'`
+  JVM_VARIANT_ZERO=`$ECHO "$JVM_VARIANTS" | $SED -e '/,zero,/!s/.*/false/g' -e '/,zero,/s/.*/true/g'`
+  JVM_VARIANT_ZEROSHARK=`$ECHO "$JVM_VARIANTS" | $SED -e '/,zeroshark,/!s/.*/false/g' -e '/,zeroshark,/s/.*/true/g'`
 
-if test "x$JVM_VARIANT_CLIENT" = xtrue; then
+  if test "x$JVM_VARIANT_CLIENT" = xtrue; then
     if test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
-        as_fn_error $? "You cannot build a client JVM for a 64-bit machine." "$LINENO" 5
+      as_fn_error $? "You cannot build a client JVM for a 64-bit machine." "$LINENO" 5
     fi
-fi
-if test "x$JVM_VARIANT_KERNEL" = xtrue; then
+  fi
+  if test "x$JVM_VARIANT_KERNEL" = xtrue; then
     if test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
-        as_fn_error $? "You cannot build a kernel JVM for a 64-bit machine." "$LINENO" 5
+      as_fn_error $? "You cannot build a kernel JVM for a 64-bit machine." "$LINENO" 5
     fi
-fi
-if test "x$JVM_VARIANT_MINIMAL1" = xtrue; then
+  fi
+  if test "x$JVM_VARIANT_MINIMAL1" = xtrue; then
     if test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
-        as_fn_error $? "You cannot build a minimal JVM for a 64-bit machine." "$LINENO" 5
+      as_fn_error $? "You cannot build a minimal JVM for a 64-bit machine." "$LINENO" 5
     fi
-fi
+  fi
 
-# Replace the commas with AND for use in the build directory name.
-ANDED_JVM_VARIANTS=`$ECHO "$JVM_VARIANTS" | $SED -e 's/^,//' -e 's/,$//' -e 's/,/AND/'`
-COUNT_VARIANTS=`$ECHO "$JVM_VARIANTS" | $SED -e 's/server,/1/' -e 's/client,/1/' -e 's/minimal1,/1/' -e 's/kernel,/1/' -e 's/zero,/1/' -e 's/zeroshark,/1/'`
-if test "x$COUNT_VARIANTS" != "x,1"; then
+  # Replace the commas with AND for use in the build directory name.
+  ANDED_JVM_VARIANTS=`$ECHO "$JVM_VARIANTS" | $SED -e 's/^,//' -e 's/,$//' -e 's/,/AND/'`
+  COUNT_VARIANTS=`$ECHO "$JVM_VARIANTS" | $SED -e 's/server,/1/' -e 's/client,/1/' -e 's/minimal1,/1/' -e 's/kernel,/1/' -e 's/zero,/1/' -e 's/zeroshark,/1/'`
+  if test "x$COUNT_VARIANTS" != "x,1"; then
     BUILDING_MULTIPLE_JVM_VARIANTS=yes
-else
+  else
     BUILDING_MULTIPLE_JVM_VARIANTS=no
-fi
+  fi
 
 
 
@@ -7831,34 +7830,33 @@
 
 
 
-INCLUDE_SA=true
-if test "x$JVM_VARIANT_ZERO" = xtrue ; then
+  INCLUDE_SA=true
+  if test "x$JVM_VARIANT_ZERO" = xtrue ; then
     INCLUDE_SA=false
-fi
-if test "x$JVM_VARIANT_ZEROSHARK" = xtrue ; then
+  fi
+  if test "x$JVM_VARIANT_ZEROSHARK" = xtrue ; then
     INCLUDE_SA=false
-fi
+  fi
 
 
-if test "x$OPENJDK_TARGET_OS" = "xmacosx"; then
-   MACOSX_UNIVERSAL="true"
-fi
+  if test "x$OPENJDK_TARGET_OS" = "xmacosx"; then
+    MACOSX_UNIVERSAL="true"
+  fi
 
 
 
 
-
-###############################################################################
-#
-# Set the debug level
-#    release: no debug information, all optimizations, no asserts.
-#    fastdebug: debug information (-g), all optimizations, all asserts
-#    slowdebug: debug information (-g), no optimizations, all asserts
-#
-DEBUG_LEVEL="release"
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking which debug level to use" >&5
+  ###############################################################################
+  #
+  # Set the debug level
+  #    release: no debug information, all optimizations, no asserts.
+  #    fastdebug: debug information (-g), all optimizations, all asserts
+  #    slowdebug: debug information (-g), no optimizations, all asserts
+  #
+  DEBUG_LEVEL="release"
+  { $as_echo "$as_me:${as_lineno-$LINENO}: checking which debug level to use" >&5
 $as_echo_n "checking which debug level to use... " >&6; }
-# Check whether --enable-debug was given.
+  # Check whether --enable-debug was given.
 if test "${enable_debug+set}" = set; then :
   enableval=$enable_debug;
         ENABLE_DEBUG="${enableval}"
@@ -7875,96 +7873,96 @@
   withval=$with_debug_level;
         DEBUG_LEVEL="${withval}"
         if test "x$ENABLE_DEBUG" = xyes; then
-			as_fn_error $? "You cannot use both --enable-debug and --with-debug-level at the same time." "$LINENO" 5
+          as_fn_error $? "You cannot use both --enable-debug and --with-debug-level at the same time." "$LINENO" 5
         fi
 
 fi
 
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $DEBUG_LEVEL" >&5
+  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DEBUG_LEVEL" >&5
 $as_echo "$DEBUG_LEVEL" >&6; }
 
-if test "x$DEBUG_LEVEL" != xrelease && \
-   test "x$DEBUG_LEVEL" != xfastdebug && \
-   test "x$DEBUG_LEVEL" != xslowdebug; then
-   as_fn_error $? "Allowed debug levels are: release, fastdebug and slowdebug" "$LINENO" 5
-fi
+  if test "x$DEBUG_LEVEL" != xrelease && \
+      test "x$DEBUG_LEVEL" != xfastdebug && \
+      test "x$DEBUG_LEVEL" != xslowdebug; then
+    as_fn_error $? "Allowed debug levels are: release, fastdebug and slowdebug" "$LINENO" 5
+  fi
 
 
-###############################################################################
-#
-# Setup legacy vars/targets and new vars to deal with different debug levels.
-#
+  ###############################################################################
+  #
+  # Setup legacy vars/targets and new vars to deal with different debug levels.
+  #
 
-case $DEBUG_LEVEL in
-      release )
-          VARIANT="OPT"
-          FASTDEBUG="false"
-          DEBUG_CLASSFILES="false"
-          BUILD_VARIANT_RELEASE=""
-          HOTSPOT_DEBUG_LEVEL="product"
-          HOTSPOT_EXPORT="product"
-           ;;
-      fastdebug )
-          VARIANT="DBG"
-          FASTDEBUG="true"
-          DEBUG_CLASSFILES="true"
-          BUILD_VARIANT_RELEASE="-fastdebug"
-          HOTSPOT_DEBUG_LEVEL="fastdebug"
-          HOTSPOT_EXPORT="fastdebug"
-           ;;
-      slowdebug )
-          VARIANT="DBG"
-          FASTDEBUG="false"
-          DEBUG_CLASSFILES="true"
-          BUILD_VARIANT_RELEASE="-debug"
-          HOTSPOT_DEBUG_LEVEL="jvmg"
-          HOTSPOT_EXPORT="debug"
-           ;;
-esac
+  case $DEBUG_LEVEL in
+    release )
+      VARIANT="OPT"
+      FASTDEBUG="false"
+      DEBUG_CLASSFILES="false"
+      BUILD_VARIANT_RELEASE=""
+      HOTSPOT_DEBUG_LEVEL="product"
+      HOTSPOT_EXPORT="product"
+      ;;
+    fastdebug )
+      VARIANT="DBG"
+      FASTDEBUG="true"
+      DEBUG_CLASSFILES="true"
+      BUILD_VARIANT_RELEASE="-fastdebug"
+      HOTSPOT_DEBUG_LEVEL="fastdebug"
+      HOTSPOT_EXPORT="fastdebug"
+      ;;
+    slowdebug )
+      VARIANT="DBG"
+      FASTDEBUG="false"
+      DEBUG_CLASSFILES="true"
+      BUILD_VARIANT_RELEASE="-debug"
+      HOTSPOT_DEBUG_LEVEL="jvmg"
+      HOTSPOT_EXPORT="debug"
+      ;;
+  esac
 
-#####
-# Generate the legacy makefile targets for hotspot.
-# The hotspot api for selecting the build artifacts, really, needs to be improved.
-# JDK-7195896 will fix this on the hotspot side by using the JVM_VARIANT_* variables to
-# determine what needs to be built. All we will need to set here is all_product, all_fastdebug etc
-# But until then ...
-HOTSPOT_TARGET=""
+  #####
+  # Generate the legacy makefile targets for hotspot.
+  # The hotspot api for selecting the build artifacts, really, needs to be improved.
+  # JDK-7195896 will fix this on the hotspot side by using the JVM_VARIANT_* variables to
+  # determine what needs to be built. All we will need to set here is all_product, all_fastdebug etc
+  # But until then ...
+  HOTSPOT_TARGET=""
 
-if test "x$JVM_VARIANT_SERVER" = xtrue; then
+  if test "x$JVM_VARIANT_SERVER" = xtrue; then
     HOTSPOT_TARGET="$HOTSPOT_TARGET${HOTSPOT_DEBUG_LEVEL} "
-fi
+  fi
 
-if test "x$JVM_VARIANT_CLIENT" = xtrue; then
+  if test "x$JVM_VARIANT_CLIENT" = xtrue; then
     HOTSPOT_TARGET="$HOTSPOT_TARGET${HOTSPOT_DEBUG_LEVEL}1 "
-fi
+  fi
 
-if test "x$JVM_VARIANT_MINIMAL1" = xtrue; then
+  if test "x$JVM_VARIANT_MINIMAL1" = xtrue; then
     HOTSPOT_TARGET="$HOTSPOT_TARGET${HOTSPOT_DEBUG_LEVEL}minimal1 "
-fi
+  fi
 
-if test "x$JVM_VARIANT_KERNEL" = xtrue; then
+  if test "x$JVM_VARIANT_KERNEL" = xtrue; then
     HOTSPOT_TARGET="$HOTSPOT_TARGET${HOTSPOT_DEBUG_LEVEL}kernel "
-fi
+  fi
 
-if test "x$JVM_VARIANT_ZERO" = xtrue; then
+  if test "x$JVM_VARIANT_ZERO" = xtrue; then
     HOTSPOT_TARGET="$HOTSPOT_TARGET${HOTSPOT_DEBUG_LEVEL}zero "
-fi
+  fi
 
-if test "x$JVM_VARIANT_ZEROSHARK" = xtrue; then
+  if test "x$JVM_VARIANT_ZEROSHARK" = xtrue; then
     HOTSPOT_TARGET="$HOTSPOT_TARGET${HOTSPOT_DEBUG_LEVEL}shark "
-fi
+  fi
 
-HOTSPOT_TARGET="$HOTSPOT_TARGET docs export_$HOTSPOT_EXPORT"
+  HOTSPOT_TARGET="$HOTSPOT_TARGET docs export_$HOTSPOT_EXPORT"
 
-# On Macosx universal binaries are produced, but they only contain
-# 64 bit intel. This invalidates control of which jvms are built
-# from configure, but only server is valid anyway. Fix this
-# when hotspot makefiles are rewritten.
-if test "x$MACOSX_UNIVERSAL" = xtrue; then
+  # On Macosx universal binaries are produced, but they only contain
+  # 64 bit intel. This invalidates control of which jvms are built
+  # from configure, but only server is valid anyway. Fix this
+  # when hotspot makefiles are rewritten.
+  if test "x$MACOSX_UNIVERSAL" = xtrue; then
     HOTSPOT_TARGET=universal_${HOTSPOT_EXPORT}
-fi
+  fi
 
-#####
+  #####
 
 
 
@@ -7987,27 +7985,27 @@
 fi
 
 
-# Test from where we are running configure, in or outside of src root.
-if test "x$CURDIR" = "x$SRC_ROOT" || test "x$CURDIR" = "x$SRC_ROOT/common" \
-        || test "x$CURDIR" = "x$SRC_ROOT/common/autoconf" \
-        || test "x$CURDIR" = "x$SRC_ROOT/common/makefiles" ; then
+  # Test from where we are running configure, in or outside of src root.
+  if test "x$CURDIR" = "x$SRC_ROOT" || test "x$CURDIR" = "x$SRC_ROOT/common" \
+      || test "x$CURDIR" = "x$SRC_ROOT/common/autoconf" \
+      || test "x$CURDIR" = "x$SRC_ROOT/common/makefiles" ; then
     # We are running configure from the src root.
     # Create a default ./build/target-variant-debuglevel output root.
     if test "x${CONF_NAME}" = x; then
-        CONF_NAME="${OPENJDK_TARGET_OS}-${OPENJDK_TARGET_CPU}-${JDK_VARIANT}-${ANDED_JVM_VARIANTS}-${DEBUG_LEVEL}"
+      CONF_NAME="${OPENJDK_TARGET_OS}-${OPENJDK_TARGET_CPU}-${JDK_VARIANT}-${ANDED_JVM_VARIANTS}-${DEBUG_LEVEL}"
     fi
     OUTPUT_ROOT="$SRC_ROOT/build/${CONF_NAME}"
     $MKDIR -p "$OUTPUT_ROOT"
     if test ! -d "$OUTPUT_ROOT"; then
-        as_fn_error $? "Could not create build directory $OUTPUT_ROOT" "$LINENO" 5
+      as_fn_error $? "Could not create build directory $OUTPUT_ROOT" "$LINENO" 5
     fi
-else
+  else
     # We are running configure from outside of the src dir.
     # Then use the current directory as output dir!
     # If configuration is situated in normal build directory, just use the build
     # directory name as configuration name, otherwise use the complete path.
     if test "x${CONF_NAME}" = x; then
-        CONF_NAME=`$ECHO $CURDIR | $SED -e "s!^${SRC_ROOT}/build/!!"`
+      CONF_NAME=`$ECHO $CURDIR | $SED -e "s!^${SRC_ROOT}/build/!!"`
     fi
     OUTPUT_ROOT="$CURDIR"
 
@@ -8021,7 +8019,7 @@
       # Configure has already touched config.log and confdefs.h in the current dir when this check
       # is performed.
       filtered_files=`$ECHO "$files_present" | $SED -e 's/config.log//g' -e 's/confdefs.h//g' -e 's/ //g' \
-                                             | $TR -d '\n'`
+      | $TR -d '\n'`
       if test "x$filtered_files" != x; then
         { $as_echo "$as_me:${as_lineno-$LINENO}: Current directory is $CURDIR." >&5
 $as_echo "$as_me: Current directory is $CURDIR." >&6;}
@@ -8040,10 +8038,10 @@
         as_fn_error $? "Will not continue creating configuration in $CURDIR" "$LINENO" 5
       fi
     fi
-fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking what configuration name to use" >&5
+  fi
+  { $as_echo "$as_me:${as_lineno-$LINENO}: checking what configuration name to use" >&5
 $as_echo_n "checking what configuration name to use... " >&6; }
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $CONF_NAME" >&5
+  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CONF_NAME" >&5
 $as_echo "$CONF_NAME" >&6; }
 
 
@@ -8169,44 +8167,44 @@
   fi
 
 
-SPEC=$OUTPUT_ROOT/spec.gmk
+  SPEC=$OUTPUT_ROOT/spec.gmk
 
-CONF_NAME=$CONF_NAME
+  CONF_NAME=$CONF_NAME
 
-OUTPUT_ROOT=$OUTPUT_ROOT
+  OUTPUT_ROOT=$OUTPUT_ROOT
 
 
-# Most of the probed defines are put into config.h
-ac_config_headers="$ac_config_headers $OUTPUT_ROOT/config.h:$AUTOCONF_DIR/config.h.in"
+  # Most of the probed defines are put into config.h
+  ac_config_headers="$ac_config_headers $OUTPUT_ROOT/config.h:$AUTOCONF_DIR/config.h.in"
 
-# The spec.gmk file contains all variables for the make system.
-ac_config_files="$ac_config_files $OUTPUT_ROOT/spec.gmk:$AUTOCONF_DIR/spec.gmk.in"
+  # The spec.gmk file contains all variables for the make system.
+  ac_config_files="$ac_config_files $OUTPUT_ROOT/spec.gmk:$AUTOCONF_DIR/spec.gmk.in"
 
-# The hotspot-spec.gmk file contains legacy variables for the hotspot make system.
-ac_config_files="$ac_config_files $OUTPUT_ROOT/hotspot-spec.gmk:$AUTOCONF_DIR/hotspot-spec.gmk.in"
+  # The hotspot-spec.gmk file contains legacy variables for the hotspot make system.
+  ac_config_files="$ac_config_files $OUTPUT_ROOT/hotspot-spec.gmk:$AUTOCONF_DIR/hotspot-spec.gmk.in"
 
-# The bootcycle-spec.gmk file contains support for boot cycle builds.
-ac_config_files="$ac_config_files $OUTPUT_ROOT/bootcycle-spec.gmk:$AUTOCONF_DIR/bootcycle-spec.gmk.in"
+  # The bootcycle-spec.gmk file contains support for boot cycle builds.
+  ac_config_files="$ac_config_files $OUTPUT_ROOT/bootcycle-spec.gmk:$AUTOCONF_DIR/bootcycle-spec.gmk.in"
 
-# The compare.sh is used to compare the build output to other builds.
-ac_config_files="$ac_config_files $OUTPUT_ROOT/compare.sh:$AUTOCONF_DIR/compare.sh.in"
+  # The compare.sh is used to compare the build output to other builds.
+  ac_config_files="$ac_config_files $OUTPUT_ROOT/compare.sh:$AUTOCONF_DIR/compare.sh.in"
 
-# Spec.sh is currently used by compare-objects.sh
-ac_config_files="$ac_config_files $OUTPUT_ROOT/spec.sh:$AUTOCONF_DIR/spec.sh.in"
+  # Spec.sh is currently used by compare-objects.sh
+  ac_config_files="$ac_config_files $OUTPUT_ROOT/spec.sh:$AUTOCONF_DIR/spec.sh.in"
 
-# The generated Makefile knows where the spec.gmk is and where the source is.
-# You can run make from the OUTPUT_ROOT, or from the top-level Makefile
-# which will look for generated configurations
-ac_config_files="$ac_config_files $OUTPUT_ROOT/Makefile:$AUTOCONF_DIR/Makefile.in"
+  # The generated Makefile knows where the spec.gmk is and where the source is.
+  # You can run make from the OUTPUT_ROOT, or from the top-level Makefile
+  # which will look for generated configurations
+  ac_config_files="$ac_config_files $OUTPUT_ROOT/Makefile:$AUTOCONF_DIR/Makefile.in"
 
 
-# Save the arguments given to us
-echo "$CONFIGURE_COMMAND_LINE" > $OUTPUT_ROOT/configure-arguments
+  # Save the arguments given to us
+  echo "$CONFIGURE_COMMAND_LINE" > $OUTPUT_ROOT/configure-arguments
 
 
 # Must be done before we can call HELP_MSG_MISSING_DEPENDENCY.
 
-    for ac_prog in apt-get yum port pkgutil pkgadd
+  for ac_prog in apt-get yum port pkgutil pkgadd
 do
   # Extract the first word of "$ac_prog", so it can be a program name with args.
 set dummy $ac_prog; ac_word=$2
@@ -8314,8 +8312,8 @@
   # bat and cmd files are not always considered executable in cygwin causing which
   # to not find them
   if test "x$new_path" = x \
-           && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
-           && test "x`$LS \"$path\" 2>/dev/null`" != x; then
+      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
+      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
     new_path=`$CYGPATH -u "$path"`
   fi
   if test "x$new_path" = x; then
@@ -8330,8 +8328,8 @@
     # bat and cmd files are not always considered executable in cygwin causing which
     # to not find them
     if test "x$new_path" = x \
-             && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
-             && test "x`$LS \"$path\" 2>/dev/null`" != x; then
+        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
+        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
       new_path=`$CYGPATH -u "$path"`
     fi
     if test "x$new_path" = x; then
@@ -8359,9 +8357,9 @@
     # Short path failed, file does not exist as specified.
     # Try adding .exe or .cmd
     if test -f "${new_path}.exe"; then
-       input_to_shortpath="${new_path}.exe"
+      input_to_shortpath="${new_path}.exe"
     elif test -f "${new_path}.cmd"; then
-       input_to_shortpath="${new_path}.cmd"
+      input_to_shortpath="${new_path}.cmd"
     else
       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&5
 $as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&6;}
@@ -8537,29 +8535,29 @@
     fi
 
     if test "x$new_path" = x; then
-        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
+      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
 $as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
-        has_space=`$ECHO "$complete" | $GREP " "`
-        if test "x$has_space" != x; then
-          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
+      has_space=`$ECHO "$complete" | $GREP " "`
+      if test "x$has_space" != x; then
+        { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
 $as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
-        fi
-        as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
       fi
+      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
+    fi
   fi
 
-      # Now join together the path and the arguments once again
-      if test "x$arguments" != xEOL; then
-        new_complete="$new_path ${arguments% *}"
-      else
-        new_complete="$new_path"
-      fi
+  # Now join together the path and the arguments once again
+  if test "x$arguments" != xEOL; then
+    new_complete="$new_path ${arguments% *}"
+  else
+    new_complete="$new_path"
+  fi
 
   if test "x$complete" != "x$new_complete"; then
-      FOUND_MAKE="$new_complete"
-      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting FOUND_MAKE to \"$new_complete\"" >&5
+    FOUND_MAKE="$new_complete"
+    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting FOUND_MAKE to \"$new_complete\"" >&5
 $as_echo "$as_me: Rewriting FOUND_MAKE to \"$new_complete\"" >&6;}
-    fi
+  fi
 
         fi
       fi
@@ -8671,8 +8669,8 @@
   # bat and cmd files are not always considered executable in cygwin causing which
   # to not find them
   if test "x$new_path" = x \
-           && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
-           && test "x`$LS \"$path\" 2>/dev/null`" != x; then
+      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
+      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
     new_path=`$CYGPATH -u "$path"`
   fi
   if test "x$new_path" = x; then
@@ -8687,8 +8685,8 @@
     # bat and cmd files are not always considered executable in cygwin causing which
     # to not find them
     if test "x$new_path" = x \
-             && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
-             && test "x`$LS \"$path\" 2>/dev/null`" != x; then
+        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
+        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
       new_path=`$CYGPATH -u "$path"`
     fi
     if test "x$new_path" = x; then
@@ -8716,9 +8714,9 @@
     # Short path failed, file does not exist as specified.
     # Try adding .exe or .cmd
     if test -f "${new_path}.exe"; then
-       input_to_shortpath="${new_path}.exe"
+      input_to_shortpath="${new_path}.exe"
     elif test -f "${new_path}.cmd"; then
-       input_to_shortpath="${new_path}.cmd"
+      input_to_shortpath="${new_path}.cmd"
     else
       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&5
 $as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&6;}
@@ -8894,29 +8892,29 @@
     fi
 
     if test "x$new_path" = x; then
-        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
+      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
 $as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
-        has_space=`$ECHO "$complete" | $GREP " "`
-        if test "x$has_space" != x; then
-          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
+      has_space=`$ECHO "$complete" | $GREP " "`
+      if test "x$has_space" != x; then
+        { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
 $as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
-        fi
-        as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
       fi
+      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
+    fi
   fi
 
-      # Now join together the path and the arguments once again
-      if test "x$arguments" != xEOL; then
-        new_complete="$new_path ${arguments% *}"
-      else
-        new_complete="$new_path"
-      fi
+  # Now join together the path and the arguments once again
+  if test "x$arguments" != xEOL; then
+    new_complete="$new_path ${arguments% *}"
+  else
+    new_complete="$new_path"
+  fi
 
   if test "x$complete" != "x$new_complete"; then
-      FOUND_MAKE="$new_complete"
-      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting FOUND_MAKE to \"$new_complete\"" >&5
+    FOUND_MAKE="$new_complete"
+    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting FOUND_MAKE to \"$new_complete\"" >&5
 $as_echo "$as_me: Rewriting FOUND_MAKE to \"$new_complete\"" >&6;}
-    fi
+  fi
 
         fi
       fi
@@ -9025,8 +9023,8 @@
   # bat and cmd files are not always considered executable in cygwin causing which
   # to not find them
   if test "x$new_path" = x \
-           && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
-           && test "x`$LS \"$path\" 2>/dev/null`" != x; then
+      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
+      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
     new_path=`$CYGPATH -u "$path"`
   fi
   if test "x$new_path" = x; then
@@ -9041,8 +9039,8 @@
     # bat and cmd files are not always considered executable in cygwin causing which
     # to not find them
     if test "x$new_path" = x \
-             && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
-             && test "x`$LS \"$path\" 2>/dev/null`" != x; then
+        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
+        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
       new_path=`$CYGPATH -u "$path"`
     fi
     if test "x$new_path" = x; then
@@ -9070,9 +9068,9 @@
     # Short path failed, file does not exist as specified.
     # Try adding .exe or .cmd
     if test -f "${new_path}.exe"; then
-       input_to_shortpath="${new_path}.exe"
+      input_to_shortpath="${new_path}.exe"
     elif test -f "${new_path}.cmd"; then
-       input_to_shortpath="${new_path}.cmd"
+      input_to_shortpath="${new_path}.cmd"
     else
       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&5
 $as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&6;}
@@ -9248,29 +9246,29 @@
     fi
 
     if test "x$new_path" = x; then
-        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
+      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
 $as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
-        has_space=`$ECHO "$complete" | $GREP " "`
-        if test "x$has_space" != x; then
-          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
+      has_space=`$ECHO "$complete" | $GREP " "`
+      if test "x$has_space" != x; then
+        { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
 $as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
-        fi
-        as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
       fi
+      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
+    fi
   fi
 
-      # Now join together the path and the arguments once again
-      if test "x$arguments" != xEOL; then
-        new_complete="$new_path ${arguments% *}"
-      else
-        new_complete="$new_path"
-      fi
+  # Now join together the path and the arguments once again
+  if test "x$arguments" != xEOL; then
+    new_complete="$new_path ${arguments% *}"
+  else
+    new_complete="$new_path"
+  fi
 
   if test "x$complete" != "x$new_complete"; then
-      FOUND_MAKE="$new_complete"
-      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting FOUND_MAKE to \"$new_complete\"" >&5
+    FOUND_MAKE="$new_complete"
+    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting FOUND_MAKE to \"$new_complete\"" >&5
 $as_echo "$as_me: Rewriting FOUND_MAKE to \"$new_complete\"" >&6;}
-    fi
+  fi
 
         fi
       fi
@@ -9384,8 +9382,8 @@
   # bat and cmd files are not always considered executable in cygwin causing which
   # to not find them
   if test "x$new_path" = x \
-           && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
-           && test "x`$LS \"$path\" 2>/dev/null`" != x; then
+      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
+      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
     new_path=`$CYGPATH -u "$path"`
   fi
   if test "x$new_path" = x; then
@@ -9400,8 +9398,8 @@
     # bat and cmd files are not always considered executable in cygwin causing which
     # to not find them
     if test "x$new_path" = x \
-             && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
-             && test "x`$LS \"$path\" 2>/dev/null`" != x; then
+        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
+        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
       new_path=`$CYGPATH -u "$path"`
     fi
     if test "x$new_path" = x; then
@@ -9429,9 +9427,9 @@
     # Short path failed, file does not exist as specified.
     # Try adding .exe or .cmd
     if test -f "${new_path}.exe"; then
-       input_to_shortpath="${new_path}.exe"
+      input_to_shortpath="${new_path}.exe"
     elif test -f "${new_path}.cmd"; then
-       input_to_shortpath="${new_path}.cmd"
+      input_to_shortpath="${new_path}.cmd"
     else
       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&5
 $as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&6;}
@@ -9607,29 +9605,29 @@
     fi
 
     if test "x$new_path" = x; then
-        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
+      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
 $as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
-        has_space=`$ECHO "$complete" | $GREP " "`
-        if test "x$has_space" != x; then
-          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
+      has_space=`$ECHO "$complete" | $GREP " "`
+      if test "x$has_space" != x; then
+        { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
 $as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
-        fi
-        as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
       fi
+      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
+    fi
   fi
 
-      # Now join together the path and the arguments once again
-      if test "x$arguments" != xEOL; then
-        new_complete="$new_path ${arguments% *}"
-      else
-        new_complete="$new_path"
-      fi
+  # Now join together the path and the arguments once again
+  if test "x$arguments" != xEOL; then
+    new_complete="$new_path ${arguments% *}"
+  else
+    new_complete="$new_path"
+  fi
 
   if test "x$complete" != "x$new_complete"; then
-      FOUND_MAKE="$new_complete"
-      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting FOUND_MAKE to \"$new_complete\"" >&5
+    FOUND_MAKE="$new_complete"
+    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting FOUND_MAKE to \"$new_complete\"" >&5
 $as_echo "$as_me: Rewriting FOUND_MAKE to \"$new_complete\"" >&6;}
-    fi
+  fi
 
         fi
       fi
@@ -9737,8 +9735,8 @@
   # bat and cmd files are not always considered executable in cygwin causing which
   # to not find them
   if test "x$new_path" = x \
-           && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
-           && test "x`$LS \"$path\" 2>/dev/null`" != x; then
+      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
+      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
     new_path=`$CYGPATH -u "$path"`
   fi
   if test "x$new_path" = x; then
@@ -9753,8 +9751,8 @@
     # bat and cmd files are not always considered executable in cygwin causing which
     # to not find them
     if test "x$new_path" = x \
-             && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
-             && test "x`$LS \"$path\" 2>/dev/null`" != x; then
+        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
+        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
       new_path=`$CYGPATH -u "$path"`
     fi
     if test "x$new_path" = x; then
@@ -9782,9 +9780,9 @@
     # Short path failed, file does not exist as specified.
     # Try adding .exe or .cmd
     if test -f "${new_path}.exe"; then
-       input_to_shortpath="${new_path}.exe"
+      input_to_shortpath="${new_path}.exe"
     elif test -f "${new_path}.cmd"; then
-       input_to_shortpath="${new_path}.cmd"
+      input_to_shortpath="${new_path}.cmd"
     else
       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&5
 $as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&6;}
@@ -9960,29 +9958,29 @@
     fi
 
     if test "x$new_path" = x; then
-        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
+      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
 $as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
-        has_space=`$ECHO "$complete" | $GREP " "`
-        if test "x$has_space" != x; then
-          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
+      has_space=`$ECHO "$complete" | $GREP " "`
+      if test "x$has_space" != x; then
+        { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
 $as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
-        fi
-        as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
       fi
+      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
+    fi
   fi
 
-      # Now join together the path and the arguments once again
-      if test "x$arguments" != xEOL; then
-        new_complete="$new_path ${arguments% *}"
-      else
-        new_complete="$new_path"
-      fi
+  # Now join together the path and the arguments once again
+  if test "x$arguments" != xEOL; then
+    new_complete="$new_path ${arguments% *}"
+  else
+    new_complete="$new_path"
+  fi
 
   if test "x$complete" != "x$new_complete"; then
-      FOUND_MAKE="$new_complete"
-      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting FOUND_MAKE to \"$new_complete\"" >&5
+    FOUND_MAKE="$new_complete"
+    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting FOUND_MAKE to \"$new_complete\"" >&5
 $as_echo "$as_me: Rewriting FOUND_MAKE to \"$new_complete\"" >&6;}
-    fi
+  fi
 
         fi
       fi
@@ -10006,34 +10004,34 @@
 
 
 
-    # Test if find supports -delete
-    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if find supports -delete" >&5
+  # Test if find supports -delete
+  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if find supports -delete" >&5
 $as_echo_n "checking if find supports -delete... " >&6; }
-    FIND_DELETE="-delete"
+  FIND_DELETE="-delete"
 
-    DELETEDIR=`$MKTEMP -d tmp.XXXXXXXXXX` || (echo Could not create temporary directory!; exit $?)
+  DELETEDIR=`$MKTEMP -d tmp.XXXXXXXXXX` || (echo Could not create temporary directory!; exit $?)
 
-    echo Hejsan > $DELETEDIR/TestIfFindSupportsDelete
+  echo Hejsan > $DELETEDIR/TestIfFindSupportsDelete
 
-    TEST_DELETE=`$FIND "$DELETEDIR" -name TestIfFindSupportsDelete $FIND_DELETE 2>&1`
-    if test -f $DELETEDIR/TestIfFindSupportsDelete; then
-        # No, it does not.
-        rm $DELETEDIR/TestIfFindSupportsDelete
-        FIND_DELETE="-exec rm \{\} \+"
-        { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+  TEST_DELETE=`$FIND "$DELETEDIR" -name TestIfFindSupportsDelete $FIND_DELETE 2>&1`
+  if test -f $DELETEDIR/TestIfFindSupportsDelete; then
+    # No, it does not.
+    rm $DELETEDIR/TestIfFindSupportsDelete
+    FIND_DELETE="-exec rm \{\} \+"
+    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
 $as_echo "no" >&6; }
-    else
-        { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
+  else
+    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
 $as_echo "yes" >&6; }
-    fi
-    rmdir $DELETEDIR
+  fi
+  rmdir $DELETEDIR
 
 
 
-# These tools might not be installed by default,
-# need hint on how to install them.
+  # These tools might not be installed by default,
+  # need hint on how to install them.
 
-    for ac_prog in unzip
+  for ac_prog in unzip
 do
   # Extract the first word of "$ac_prog", so it can be a program name with args.
 set dummy $ac_prog; ac_word=$2
@@ -10079,20 +10077,20 @@
 done
 
 
-    if test "x$UNZIP" = x; then
-        if test "xunzip" = x; then
-          PROG_NAME=unzip
-        else
-          PROG_NAME=unzip
-        fi
-        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
-$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
-        as_fn_error $? "Cannot continue" "$LINENO" 5
+  if test "x$UNZIP" = x; then
+    if test "xunzip" = x; then
+      PROG_NAME=unzip
+    else
+      PROG_NAME=unzip
     fi
+    { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
+$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
+    as_fn_error $? "Cannot continue" "$LINENO" 5
+  fi
 
 
 
-    for ac_prog in zip
+  for ac_prog in zip
 do
   # Extract the first word of "$ac_prog", so it can be a program name with args.
 set dummy $ac_prog; ac_word=$2
@@ -10138,22 +10136,22 @@
 done
 
 
-    if test "x$ZIP" = x; then
-        if test "xzip" = x; then
-          PROG_NAME=zip
-        else
-          PROG_NAME=zip
-        fi
-        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
-$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
-        as_fn_error $? "Cannot continue" "$LINENO" 5
+  if test "x$ZIP" = x; then
+    if test "xzip" = x; then
+      PROG_NAME=zip
+    else
+      PROG_NAME=zip
     fi
+    { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
+$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
+    as_fn_error $? "Cannot continue" "$LINENO" 5
+  fi
 
 
 
-# Non-required basic tools
+  # Non-required basic tools
 
-# Extract the first word of "ldd", so it can be a program name with args.
+  # Extract the first word of "ldd", so it can be a program name with args.
 set dummy ldd; ac_word=$2
 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
 $as_echo_n "checking for $ac_word... " >&6; }
@@ -10193,13 +10191,13 @@
 fi
 
 
-if test "x$LDD" = "x"; then
+  if test "x$LDD" = "x"; then
     # List shared lib dependencies is used for
     # debug output and checking for forbidden dependencies.
     # We can build without it.
     LDD="true"
-fi
-# Extract the first word of "otool", so it can be a program name with args.
+  fi
+  # Extract the first word of "otool", so it can be a program name with args.
 set dummy otool; ac_word=$2
 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
 $as_echo_n "checking for $ac_word... " >&6; }
@@ -10239,10 +10237,10 @@
 fi
 
 
-if test "x$OTOOL" = "x"; then
-   OTOOL="true"
-fi
-for ac_prog in readelf greadelf
+  if test "x$OTOOL" = "x"; then
+    OTOOL="true"
+  fi
+  for ac_prog in readelf greadelf
 do
   # Extract the first word of "$ac_prog", so it can be a program name with args.
 set dummy $ac_prog; ac_word=$2
@@ -10287,7 +10285,7 @@
   test -n "$READELF" && break
 done
 
-# Extract the first word of "hg", so it can be a program name with args.
+  # Extract the first word of "hg", so it can be a program name with args.
 set dummy hg; ac_word=$2
 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
 $as_echo_n "checking for $ac_word... " >&6; }
@@ -10327,7 +10325,7 @@
 fi
 
 
-# Extract the first word of "stat", so it can be a program name with args.
+  # Extract the first word of "stat", so it can be a program name with args.
 set dummy stat; ac_word=$2
 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
 $as_echo_n "checking for $ac_word... " >&6; }
@@ -10367,7 +10365,7 @@
 fi
 
 
-# Extract the first word of "time", so it can be a program name with args.
+  # Extract the first word of "time", so it can be a program name with args.
 set dummy time; ac_word=$2
 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
 $as_echo_n "checking for $ac_word... " >&6; }
@@ -10407,18 +10405,18 @@
 fi
 
 
-# Check if it's GNU time
-IS_GNU_TIME=`$TIME --version 2>&1 | $GREP 'GNU time'`
-if test "x$IS_GNU_TIME" != x; then
-  IS_GNU_TIME=yes
-else
-  IS_GNU_TIME=no
-fi
+  # Check if it's GNU time
+  IS_GNU_TIME=`$TIME --version 2>&1 | $GREP 'GNU time'`
+  if test "x$IS_GNU_TIME" != x; then
+    IS_GNU_TIME=yes
+  else
+    IS_GNU_TIME=no
+  fi
 
 
-if test "x$OPENJDK_TARGET_OS" = "xwindows"; then
+  if test "x$OPENJDK_TARGET_OS" = "xwindows"; then
 
-    for ac_prog in comm
+  for ac_prog in comm
 do
   # Extract the first word of "$ac_prog", so it can be a program name with args.
 set dummy $ac_prog; ac_word=$2
@@ -10464,23 +10462,23 @@
 done
 
 
-    if test "x$COMM" = x; then
-        if test "xcomm" = x; then
-          PROG_NAME=comm
-        else
-          PROG_NAME=comm
-        fi
-        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
-$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
-        as_fn_error $? "Cannot continue" "$LINENO" 5
+  if test "x$COMM" = x; then
+    if test "xcomm" = x; then
+      PROG_NAME=comm
+    else
+      PROG_NAME=comm
     fi
+    { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
+$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
+    as_fn_error $? "Cannot continue" "$LINENO" 5
+  fi
 
 
-fi
+  fi
 
-if test "x$OPENJDK_TARGET_OS" = "xmacosx"; then
+  if test "x$OPENJDK_TARGET_OS" = "xmacosx"; then
 
-    for ac_prog in xattr
+  for ac_prog in xattr
 do
   # Extract the first word of "$ac_prog", so it can be a program name with args.
 set dummy $ac_prog; ac_word=$2
@@ -10526,19 +10524,19 @@
 done
 
 
-    if test "x$XATTR" = x; then
-        if test "xxattr" = x; then
-          PROG_NAME=xattr
-        else
-          PROG_NAME=xattr
-        fi
-        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
-$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
-        as_fn_error $? "Cannot continue" "$LINENO" 5
+  if test "x$XATTR" = x; then
+    if test "xxattr" = x; then
+      PROG_NAME=xattr
+    else
+      PROG_NAME=xattr
     fi
+    { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
+$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
+    as_fn_error $? "Cannot continue" "$LINENO" 5
+  fi
 
 
-  # Extract the first word of "codesign", so it can be a program name with args.
+    # Extract the first word of "codesign", so it can be a program name with args.
 set dummy codesign; ac_word=$2
 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
 $as_echo_n "checking for $ac_word... " >&6; }
@@ -10578,23 +10576,23 @@
 fi
 
 
-  if test "x$CODESIGN" != "x"; then
-    # Verify that the openjdk_codesign certificate is present
-    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if openjdk_codesign certificate is present" >&5
+    if test "x$CODESIGN" != "x"; then
+      # Verify that the openjdk_codesign certificate is present
+      { $as_echo "$as_me:${as_lineno-$LINENO}: checking if openjdk_codesign certificate is present" >&5
 $as_echo_n "checking if openjdk_codesign certificate is present... " >&6; }
-    rm -f codesign-testfile
-    touch codesign-testfile
-    codesign -s openjdk_codesign codesign-testfile 2>&5 >&5 || CODESIGN=
-    rm -f codesign-testfile
-    if test "x$CODESIGN" = x; then
-      { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+      rm -f codesign-testfile
+      touch codesign-testfile
+      codesign -s openjdk_codesign codesign-testfile 2>&5 >&5 || CODESIGN=
+      rm -f codesign-testfile
+      if test "x$CODESIGN" = x; then
+        { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
 $as_echo "no" >&6; }
-    else
-      { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
+      else
+        { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
 $as_echo "yes" >&6; }
+      fi
     fi
   fi
-fi
 
 
 # Check if pkg-config is available.
@@ -10717,14 +10715,14 @@
 
 # After basic tools have been setup, we can check build os specific details.
 
-###############################################################################
+  ###############################################################################
 
-# Note that this is the build platform OS version!
+  # Note that this is the build platform OS version!
 
-OS_VERSION="`uname -r | ${SED} 's!\.! !g' | ${SED} 's!-! !g'`"
-OS_VERSION_MAJOR="`${ECHO} ${OS_VERSION} | ${CUT} -f 1 -d ' '`"
-OS_VERSION_MINOR="`${ECHO} ${OS_VERSION} | ${CUT} -f 2 -d ' '`"
-OS_VERSION_MICRO="`${ECHO} ${OS_VERSION} | ${CUT} -f 3 -d ' '`"
+  OS_VERSION="`uname -r | ${SED} 's!\.! !g' | ${SED} 's!-! !g'`"
+  OS_VERSION_MAJOR="`${ECHO} ${OS_VERSION} | ${CUT} -f 1 -d ' '`"
+  OS_VERSION_MINOR="`${ECHO} ${OS_VERSION} | ${CUT} -f 2 -d ' '`"
+  OS_VERSION_MICRO="`${ECHO} ${OS_VERSION} | ${CUT} -f 3 -d ' '`"
 
 
 
@@ -10766,57 +10764,57 @@
 
 
 
-    if test "x$with_builddeps_server" != x || test "x$with_builddeps_conf" != x; then
-        if test "x$with_builddeps_conf" != x; then
-            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for supplied builddeps configuration file" >&5
+  if test "x$with_builddeps_server" != x || test "x$with_builddeps_conf" != x; then
+    if test "x$with_builddeps_conf" != x; then
+      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for supplied builddeps configuration file" >&5
 $as_echo_n "checking for supplied builddeps configuration file... " >&6; }
-            builddepsfile=$with_builddeps_conf
-            if test -s $builddepsfile; then
-                . $builddepsfile
-                { $as_echo "$as_me:${as_lineno-$LINENO}: result: loaded!" >&5
+      builddepsfile=$with_builddeps_conf
+      if test -s $builddepsfile; then
+        . $builddepsfile
+        { $as_echo "$as_me:${as_lineno-$LINENO}: result: loaded!" >&5
 $as_echo "loaded!" >&6; }
-            else
-               as_fn_error $? "The given builddeps conf file $with_builddeps_conf could not be loaded!" "$LINENO" 5
-           fi
-        else
-            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for builddeps.conf files in sources..." >&5
+      else
+        as_fn_error $? "The given builddeps conf file $with_builddeps_conf could not be loaded!" "$LINENO" 5
+      fi
+    else
+      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for builddeps.conf files in sources..." >&5
 $as_echo_n "checking for builddeps.conf files in sources...... " >&6; }
-            builddepsfile=`mktemp`
-            touch $builddepsfile
-            # Put all found confs into a single file.
-            find ${SRC_ROOT} -name builddeps.conf -exec cat \{\} \; >> $builddepsfile
-            # Source the file to acquire the variables
-            if test -s $builddepsfile; then
-                . $builddepsfile
-                { $as_echo "$as_me:${as_lineno-$LINENO}: result: found at least one!" >&5
+      builddepsfile=`mktemp`
+      touch $builddepsfile
+      # Put all found confs into a single file.
+      find ${SRC_ROOT} -name builddeps.conf -exec cat \{\} \; >> $builddepsfile
+      # Source the file to acquire the variables
+      if test -s $builddepsfile; then
+        . $builddepsfile
+        { $as_echo "$as_me:${as_lineno-$LINENO}: result: found at least one!" >&5
 $as_echo "found at least one!" >&6; }
-            else
-               as_fn_error $? "Could not find any builddeps.conf at all!" "$LINENO" 5
-           fi
-        fi
-        # Create build and target names that use _ instead of "-" and ".".
-        # This is necessary to use them in variable names.
-        build_var=`echo ${OPENJDK_BUILD_AUTOCONF_NAME} | tr '-' '_' | tr '.' '_'`
-        target_var=`echo ${OPENJDK_TARGET_AUTOCONF_NAME} | tr '-' '_' | tr '.' '_'`
-        # Extract rewrite information for build and target
-        eval rewritten_build=\${REWRITE_${build_var}}
-        if test "x$rewritten_build" = x; then
-            rewritten_build=${OPENJDK_BUILD_AUTOCONF_NAME}
-            echo Build stays the same $rewritten_build
-        else
-            echo Rewriting build for builddeps into $rewritten_build
-        fi
-        eval rewritten_target=\${REWRITE_${target_var}}
-        if test "x$rewritten_target" = x; then
-            rewritten_target=${OPENJDK_TARGET_AUTOCONF_NAME}
-            echo Target stays the same $rewritten_target
-        else
-            echo Rewriting target for builddeps into $rewritten_target
-        fi
-        rewritten_build_var=`echo ${rewritten_build} | tr '-' '_' | tr '.' '_'`
-        rewritten_target_var=`echo ${rewritten_target} | tr '-' '_' | tr '.' '_'`
+      else
+        as_fn_error $? "Could not find any builddeps.conf at all!" "$LINENO" 5
+      fi
     fi
-    for ac_prog in 7z unzip
+    # Create build and target names that use _ instead of "-" and ".".
+    # This is necessary to use them in variable names.
+    build_var=`echo ${OPENJDK_BUILD_AUTOCONF_NAME} | tr '-' '_' | tr '.' '_'`
+    target_var=`echo ${OPENJDK_TARGET_AUTOCONF_NAME} | tr '-' '_' | tr '.' '_'`
+    # Extract rewrite information for build and target
+    eval rewritten_build=\${REWRITE_${build_var}}
+    if test "x$rewritten_build" = x; then
+      rewritten_build=${OPENJDK_BUILD_AUTOCONF_NAME}
+      echo Build stays the same $rewritten_build
+    else
+      echo Rewriting build for builddeps into $rewritten_build
+    fi
+    eval rewritten_target=\${REWRITE_${target_var}}
+    if test "x$rewritten_target" = x; then
+      rewritten_target=${OPENJDK_TARGET_AUTOCONF_NAME}
+      echo Target stays the same $rewritten_target
+    else
+      echo Rewriting target for builddeps into $rewritten_target
+    fi
+    rewritten_build_var=`echo ${rewritten_build} | tr '-' '_' | tr '.' '_'`
+    rewritten_target_var=`echo ${rewritten_target} | tr '-' '_' | tr '.' '_'`
+  fi
+  for ac_prog in 7z unzip
 do
   # Extract the first word of "$ac_prog", so it can be a program name with args.
 set dummy $ac_prog; ac_word=$2
@@ -10858,11 +10856,11 @@
   test -n "$BDEPS_UNZIP" && break
 done
 
-    if test "x$BDEPS_UNZIP" = x7z; then
-        BDEPS_UNZIP="7z x"
-    fi
+  if test "x$BDEPS_UNZIP" = x7z; then
+    BDEPS_UNZIP="7z x"
+  fi
 
-    for ac_prog in wget lftp ftp
+  for ac_prog in wget lftp ftp
 do
   # Extract the first word of "$ac_prog", so it can be a program name with args.
 set dummy $ac_prog; ac_word=$2
@@ -10915,14 +10913,14 @@
 # We need build & target for this.
 
 
-###############################################################################
-#
-# Should we build a JDK/JVM with headful support (ie a graphical ui)?
-# We always build headless support.
-#
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking headful support" >&5
+  ###############################################################################
+  #
+  # Should we build a JDK/JVM with headful support (ie a graphical ui)?
+  # We always build headless support.
+  #
+  { $as_echo "$as_me:${as_lineno-$LINENO}: checking headful support" >&5
 $as_echo_n "checking headful support... " >&6; }
-# Check whether --enable-headful was given.
+  # Check whether --enable-headful was given.
 if test "${enable_headful+set}" = set; then :
   enableval=$enable_headful; SUPPORT_HEADFUL=${enable_headful}
 else
@@ -10930,110 +10928,110 @@
 fi
 
 
-SUPPORT_HEADLESS=yes
-BUILD_HEADLESS="BUILD_HEADLESS:=true"
+  SUPPORT_HEADLESS=yes
+  BUILD_HEADLESS="BUILD_HEADLESS:=true"
 
-if test "x$SUPPORT_HEADFUL" = xyes; then
+  if test "x$SUPPORT_HEADFUL" = xyes; then
     # We are building both headful and headless.
     headful_msg="include support for both headful and headless"
-fi
+  fi
 
-if test "x$SUPPORT_HEADFUL" = xno; then
+  if test "x$SUPPORT_HEADFUL" = xno; then
     # Thus we are building headless only.
     BUILD_HEADLESS="BUILD_HEADLESS:=true"
     headful_msg="headless only"
-fi
+  fi
 
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $headful_msg" >&5
+  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $headful_msg" >&5
 $as_echo "$headful_msg" >&6; }
 
 
 
 
 
-# Control wether Hotspot runs Queens test after build.
-# Check whether --enable-hotspot-test-in-build was given.
+  # Control wether Hotspot runs Queens test after build.
+  # Check whether --enable-hotspot-test-in-build was given.
 if test "${enable_hotspot_test_in_build+set}" = set; then :
   enableval=$enable_hotspot_test_in_build;
 else
   enable_hotspot_test_in_build=no
 fi
 
-if test "x$enable_hotspot_test_in_build" = "xyes"; then
+  if test "x$enable_hotspot_test_in_build" = "xyes"; then
     TEST_IN_BUILD=true
-else
+  else
     TEST_IN_BUILD=false
-fi
+  fi
 
 
-###############################################################################
-#
-# Choose cacerts source file
-#
+  ###############################################################################
+  #
+  # Choose cacerts source file
+  #
 
 # Check whether --with-cacerts-file was given.
 if test "${with_cacerts_file+set}" = set; then :
   withval=$with_cacerts_file;
 fi
 
-if test "x$with_cacerts_file" != x; then
+  if test "x$with_cacerts_file" != x; then
     CACERTS_FILE=$with_cacerts_file
-else
+  else
     CACERTS_FILE=${SRC_ROOT}/jdk/src/share/lib/security/cacerts
-fi
+  fi
 
 
-###############################################################################
-#
-# Enable or disable unlimited crypto
-#
-# Check whether --enable-unlimited-crypto was given.
+  ###############################################################################
+  #
+  # Enable or disable unlimited crypto
+  #
+  # Check whether --enable-unlimited-crypto was given.
 if test "${enable_unlimited_crypto+set}" = set; then :
   enableval=$enable_unlimited_crypto;
 else
   enable_unlimited_crypto=no
 fi
 
-if test "x$enable_unlimited_crypto" = "xyes"; then
+  if test "x$enable_unlimited_crypto" = "xyes"; then
     UNLIMITED_CRYPTO=true
-else
+  else
     UNLIMITED_CRYPTO=false
-fi
+  fi
 
 
-###############################################################################
-#
-# Enable or disable the elliptic curve crypto implementation
-#
+  ###############################################################################
+  #
+  # Enable or disable the elliptic curve crypto implementation
+  #
 
 
-###############################################################################
-#
-# Compress jars
-#
-COMPRESS_JARS=false
+  ###############################################################################
+  #
+  # Compress jars
+  #
+  COMPRESS_JARS=false
 
 
 
 
-# Source the version numbers
-. $AUTOCONF_DIR/version-numbers
+  # Source the version numbers
+  . $AUTOCONF_DIR/version-numbers
 
-# Get the settings from parameters
+  # Get the settings from parameters
 
 # Check whether --with-milestone was given.
 if test "${with_milestone+set}" = set; then :
   withval=$with_milestone;
 fi
 
-if test "x$with_milestone" = xyes; then
-  as_fn_error $? "Milestone must have a value" "$LINENO" 5
-elif test "x$with_milestone" != x; then
+  if test "x$with_milestone" = xyes; then
+    as_fn_error $? "Milestone must have a value" "$LINENO" 5
+  elif test "x$with_milestone" != x; then
     MILESTONE="$with_milestone"
-fi
-if test "x$MILESTONE" = x; then
-  MILESTONE=internal
-fi
+  fi
+  if test "x$MILESTONE" = x; then
+    MILESTONE=internal
+  fi
 
 
 # Check whether --with-update-version was given.
@@ -11041,11 +11039,11 @@
   withval=$with_update_version;
 fi
 
-if test "x$with_update_version" = xyes; then
-  as_fn_error $? "Update version must have a value" "$LINENO" 5
-elif test "x$with_update_version" != x; then
-  JDK_UPDATE_VERSION="$with_update_version"
-fi
+  if test "x$with_update_version" = xyes; then
+    as_fn_error $? "Update version must have a value" "$LINENO" 5
+  elif test "x$with_update_version" != x; then
+    JDK_UPDATE_VERSION="$with_update_version"
+  fi
 
 
 # Check whether --with-user-release-suffix was given.
@@ -11053,11 +11051,11 @@
   withval=$with_user_release_suffix;
 fi
 
-if test "x$with_user_release_suffix" = xyes; then
-  as_fn_error $? "Release suffix must have a value" "$LINENO" 5
-elif test "x$with_user_release_suffix" != x; then
-  USER_RELEASE_SUFFIX="$with_user_release_suffix"
-fi
+  if test "x$with_user_release_suffix" = xyes; then
+    as_fn_error $? "Release suffix must have a value" "$LINENO" 5
+  elif test "x$with_user_release_suffix" != x; then
+    USER_RELEASE_SUFFIX="$with_user_release_suffix"
+  fi
 
 
 # Check whether --with-build-number was given.
@@ -11065,23 +11063,23 @@
   withval=$with_build_number;
 fi
 
-if test "x$with_build_number" = xyes; then
-  as_fn_error $? "Build number must have a value" "$LINENO" 5
-elif test "x$with_build_number" != x; then
-  JDK_BUILD_NUMBER="$with_build_number"
-fi
-# Define default USER_RELEASE_SUFFIX if BUILD_NUMBER and USER_RELEASE_SUFFIX are not set
-if test "x$JDK_BUILD_NUMBER" = x; then
-  JDK_BUILD_NUMBER=b00
-  if test "x$USER_RELEASE_SUFFIX" = x; then
-    BUILD_DATE=`date '+%Y_%m_%d_%H_%M'`
-    # Avoid [:alnum:] since it depends on the locale.
-    CLEAN_USERNAME=`echo "$USER" | $TR -d -c 'abcdefghijklmnopqrstuvqxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789'`
-    USER_RELEASE_SUFFIX=`echo "${CLEAN_USERNAME}_${BUILD_DATE}" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
+  if test "x$with_build_number" = xyes; then
+    as_fn_error $? "Build number must have a value" "$LINENO" 5
+  elif test "x$with_build_number" != x; then
+    JDK_BUILD_NUMBER="$with_build_number"
   fi
-fi
+  # Define default USER_RELEASE_SUFFIX if BUILD_NUMBER and USER_RELEASE_SUFFIX are not set
+  if test "x$JDK_BUILD_NUMBER" = x; then
+    JDK_BUILD_NUMBER=b00
+    if test "x$USER_RELEASE_SUFFIX" = x; then
+      BUILD_DATE=`date '+%Y_%m_%d_%H_%M'`
+      # Avoid [:alnum:] since it depends on the locale.
+      CLEAN_USERNAME=`echo "$USER" | $TR -d -c 'abcdefghijklmnopqrstuvqxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789'`
+      USER_RELEASE_SUFFIX=`echo "${CLEAN_USERNAME}_${BUILD_DATE}" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
+    fi
+  fi
 
-# Now set the JDK version, milestone, build number etc.
+  # Now set the JDK version, milestone, build number etc.
 
 
 
@@ -11097,17 +11095,17 @@
 
 
 
-COPYRIGHT_YEAR=`date +'%Y'`
+  COPYRIGHT_YEAR=`date +'%Y'`
 
 
-if test "x$JDK_UPDATE_VERSION" != x; then
-  JDK_VERSION="${JDK_MAJOR_VERSION}.${JDK_MINOR_VERSION}.${JDK_MICRO_VERSION}_${JDK_UPDATE_VERSION}"
-else
-  JDK_VERSION="${JDK_MAJOR_VERSION}.${JDK_MINOR_VERSION}.${JDK_MICRO_VERSION}"
-fi
+  if test "x$JDK_UPDATE_VERSION" != x; then
+    JDK_VERSION="${JDK_MAJOR_VERSION}.${JDK_MINOR_VERSION}.${JDK_MICRO_VERSION}_${JDK_UPDATE_VERSION}"
+  else
+    JDK_VERSION="${JDK_MAJOR_VERSION}.${JDK_MINOR_VERSION}.${JDK_MICRO_VERSION}"
+  fi
 
 
-COOKED_BUILD_NUMBER=`$ECHO $JDK_BUILD_NUMBER | $SED -e 's/^b//' -e 's/^0//'`
+  COOKED_BUILD_NUMBER=`$ECHO $JDK_BUILD_NUMBER | $SED -e 's/^b//' -e 's/^0//'`
 
 
 
@@ -11118,7 +11116,7 @@
 ###############################################################################
 
 
-BOOT_JDK_FOUND=no
+  BOOT_JDK_FOUND=no
 
 # Check whether --with-boot-jdk was given.
 if test "${with_boot_jdk+set}" = set; then :
@@ -11126,22 +11124,22 @@
 fi
 
 
-# We look for the Boot JDK through various means, going from more certain to
-# more of a guess-work. After each test, BOOT_JDK_FOUND is set to "yes" if
-# we detected something (if so, the path to the jdk is in BOOT_JDK). But we
-# must check if this is indeed valid; otherwise we'll continue looking.
+  # We look for the Boot JDK through various means, going from more certain to
+  # more of a guess-work. After each test, BOOT_JDK_FOUND is set to "yes" if
+  # we detected something (if so, the path to the jdk is in BOOT_JDK). But we
+  # must check if this is indeed valid; otherwise we'll continue looking.
 
-# Test: Is bootjdk explicitely set by command line arguments?
+  # Test: Is bootjdk explicitely set by command line arguments?
 
   if test "x$BOOT_JDK_FOUND" = xno; then
     # Now execute the test
 
-if test "x$with_boot_jdk" != x; then
+  if test "x$with_boot_jdk" != x; then
     BOOT_JDK=$with_boot_jdk
     BOOT_JDK_FOUND=maybe
     { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using configure arguments" >&5
 $as_echo "$as_me: Found potential Boot JDK using configure arguments" >&6;}
-fi
+  fi
 
 
     # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
@@ -11318,161 +11316,161 @@
     fi # end check boot jdk found
   fi
 
-if test "x$with_boot_jdk" != x && test "x$BOOT_JDK_FOUND" = xno; then
-  # Having specified an argument which is incorrect will produce an instant failure;
-  # we should not go on looking
-  as_fn_error $? "The path given by --with-boot-jdk does not contain a valid Boot JDK" "$LINENO" 5
-fi
+  if test "x$with_boot_jdk" != x && test "x$BOOT_JDK_FOUND" = xno; then
+    # Having specified an argument which is incorrect will produce an instant failure;
+    # we should not go on looking
+    as_fn_error $? "The path given by --with-boot-jdk does not contain a valid Boot JDK" "$LINENO" 5
+  fi
 
-# Test: Is bootjdk available from builddeps?
+  # Test: Is bootjdk available from builddeps?
 
   if test "x$BOOT_JDK_FOUND" = xno; then
     # Now execute the test
 
 
 
-    if test "x$with_builddeps_server" != x || test "x$with_builddeps_conf" != x; then
-        # Source the builddeps file again, to make sure it uses the latest variables!
-        . $builddepsfile
-        # Look for a target and build machine specific resource!
-        eval resource=\${builddep_bootjdk_BUILD_${rewritten_build_var}_TARGET_${rewritten_target_var}}
-        if test "x$resource" = x; then
-            # Ok, lets instead look for a target specific resource
-            eval resource=\${builddep_bootjdk_TARGET_${rewritten_target_var}}
-        fi
-        if test "x$resource" = x; then
-            # Ok, lets instead look for a build specific resource
-            eval resource=\${builddep_bootjdk_BUILD_${rewritten_build_var}}
-        fi
-        if test "x$resource" = x; then
-            # Ok, lets instead look for a generic resource
-            # (The bootjdk comes from M4 and not the shell, thus no need for eval here.)
-            resource=${builddep_bootjdk}
-        fi
-        if test "x$resource" != x; then
-            { $as_echo "$as_me:${as_lineno-$LINENO}: Using builddeps $resource for bootjdk" >&5
+  if test "x$with_builddeps_server" != x || test "x$with_builddeps_conf" != x; then
+    # Source the builddeps file again, to make sure it uses the latest variables!
+    . $builddepsfile
+    # Look for a target and build machine specific resource!
+    eval resource=\${builddep_bootjdk_BUILD_${rewritten_build_var}_TARGET_${rewritten_target_var}}
+    if test "x$resource" = x; then
+      # Ok, lets instead look for a target specific resource
+      eval resource=\${builddep_bootjdk_TARGET_${rewritten_target_var}}
+    fi
+    if test "x$resource" = x; then
+      # Ok, lets instead look for a build specific resource
+      eval resource=\${builddep_bootjdk_BUILD_${rewritten_build_var}}
+    fi
+    if test "x$resource" = x; then
+      # Ok, lets instead look for a generic resource
+      # (The bootjdk comes from M4 and not the shell, thus no need for eval here.)
+      resource=${builddep_bootjdk}
+    fi
+    if test "x$resource" != x; then
+      { $as_echo "$as_me:${as_lineno-$LINENO}: Using builddeps $resource for bootjdk" >&5
 $as_echo "$as_me: Using builddeps $resource for bootjdk" >&6;}
-	    # If the resource in the builddeps.conf file is an existing directory,
-	    # for example /java/linux/cups
-	    if test -d ${resource}; then
-	       depdir=${resource}
-	    else
+      # If the resource in the builddeps.conf file is an existing directory,
+      # for example /java/linux/cups
+      if test -d ${resource}; then
+        depdir=${resource}
+      else
 
-# bootjdk is for example mymodule
-# $resource is for example libs/general/libmymod_1_2_3.zip
-# $with_builddeps_server is for example ftp://mybuilddeps.myserver.com/builddeps
-# $with_builddeps_dir is for example /localhome/builddeps
-# depdir is the name of the variable into which we store the depdir, eg MYMOD
-# Will download ftp://mybuilddeps.myserver.com/builddeps/libs/general/libmymod_1_2_3.zip and
-# unzip into the directory: /localhome/builddeps/libmymod_1_2_3
-    filename=`basename $resource`
-    filebase=`echo $filename | sed 's/\.[^\.]*$//'`
-    filebase=${filename%%.*}
-    extension=${filename#*.}
-    installdir=$with_builddeps_dir/$filebase
-    if test ! -f $installdir/$filename.unpacked; then
-        { $as_echo "$as_me:${as_lineno-$LINENO}: Downloading build dependency bootjdk from $with_builddeps_server/$resource and installing into $installdir" >&5
+  # bootjdk is for example mymodule
+  # $resource is for example libs/general/libmymod_1_2_3.zip
+  # $with_builddeps_server is for example ftp://mybuilddeps.myserver.com/builddeps
+  # $with_builddeps_dir is for example /localhome/builddeps
+  # depdir is the name of the variable into which we store the depdir, eg MYMOD
+  # Will download ftp://mybuilddeps.myserver.com/builddeps/libs/general/libmymod_1_2_3.zip and
+  # unzip into the directory: /localhome/builddeps/libmymod_1_2_3
+  filename=`basename $resource`
+  filebase=`echo $filename | sed 's/\.[^\.]*$//'`
+  filebase=${filename%%.*}
+  extension=${filename#*.}
+  installdir=$with_builddeps_dir/$filebase
+  if test ! -f $installdir/$filename.unpacked; then
+    { $as_echo "$as_me:${as_lineno-$LINENO}: Downloading build dependency bootjdk from $with_builddeps_server/$resource and installing into $installdir" >&5
 $as_echo "$as_me: Downloading build dependency bootjdk from $with_builddeps_server/$resource and installing into $installdir" >&6;}
-        if test ! -d $installdir; then
-            mkdir -p $installdir
-        fi
-        if test ! -d $installdir; then
-            as_fn_error $? "Could not create directory $installdir" "$LINENO" 5
-        fi
-        tmpfile=`mktemp $installdir/bootjdk.XXXXXXXXX`
-        touch $tmpfile
-        if test ! -f $tmpfile; then
-            as_fn_error $? "Could not create files in directory $installdir" "$LINENO" 5
-        fi
-
-    # $with_builddeps_server/$resource  is the ftp://abuilddeps.server.com/libs/cups.zip
-    # $tmpfile is the local file name for the downloaded file.
-    VALID_TOOL=no
-    if test "x$BDEPS_FTP" = xwget; then
-       VALID_TOOL=yes
-       wget -O $tmpfile $with_builddeps_server/$resource
+    if test ! -d $installdir; then
+      mkdir -p $installdir
     fi
-    if test "x$BDEPS_FTP" = xlftp; then
-       VALID_TOOL=yes
-       lftp -c "get $with_builddeps_server/$resource  -o $tmpfile"
+    if test ! -d $installdir; then
+      as_fn_error $? "Could not create directory $installdir" "$LINENO" 5
     fi
-    if test "x$BDEPS_FTP" = xftp; then
-        VALID_TOOL=yes
-        FTPSERVER=`echo $with_builddeps_server/$resource  | cut -f 3 -d '/'`
-        FTPPATH=`echo $with_builddeps_server/$resource  | cut -f 4- -d '/'`
-        FTPUSERPWD=${FTPSERVER%%@*}
-        if test "x$FTPSERVER" != "x$FTPUSERPWD"; then
-            FTPUSER=${userpwd%%:*}
-            FTPPWD=${userpwd#*@}
-            FTPSERVER=${FTPSERVER#*@}
-        else
-            FTPUSER=ftp
-            FTPPWD=ftp
-        fi
-        # the "pass" command does not work on some
-        # ftp clients (read ftp.exe) but if it works,
-        # passive mode is better!
-        (\
-            echo "user $FTPUSER $FTPPWD"        ;\
-            echo "pass"                         ;\
-            echo "bin"                          ;\
-            echo "get $FTPPATH $tmpfile"              ;\
-        ) | ftp -in $FTPSERVER
-    fi
-    if test "x$VALID_TOOL" != xyes; then
-       as_fn_error $? "I do not know how to use the tool: $BDEPS_FTP" "$LINENO" 5
+    tmpfile=`mktemp $installdir/bootjdk.XXXXXXXXX`
+    touch $tmpfile
+    if test ! -f $tmpfile; then
+      as_fn_error $? "Could not create files in directory $installdir" "$LINENO" 5
     fi
 
-        mv $tmpfile $installdir/$filename
-        if test ! -s $installdir/$filename; then
-            as_fn_error $? "Could not download $with_builddeps_server/$resource" "$LINENO" 5
-        fi
-        case "$extension" in
-            zip)  echo "Unzipping $installdir/$filename..."
-               (cd $installdir ; rm -f $installdir/$filename.unpacked ; $BDEPS_UNZIP $installdir/$filename > /dev/null && touch $installdir/$filename.unpacked)
-            ;;
-            tar.gz) echo "Untaring $installdir/$filename..."
-               (cd $installdir ; rm -f $installdir/$filename.unpacked ; tar xzf $installdir/$filename && touch $installdir/$filename.unpacked)
-            ;;
-            tgz) echo "Untaring $installdir/$filename..."
-               (cd $installdir ; rm -f $installdir/$filename.unpacked ; tar xzf $installdir/$filename && touch $installdir/$filename.unpacked)
-            ;;
-            *) as_fn_error $? "Cannot handle build depency archive with extension $extension" "$LINENO" 5
-            ;;
-        esac
+  # $with_builddeps_server/$resource  is the ftp://abuilddeps.server.com/libs/cups.zip
+  # $tmpfile is the local file name for the downloaded file.
+  VALID_TOOL=no
+  if test "x$BDEPS_FTP" = xwget; then
+    VALID_TOOL=yes
+    wget -O $tmpfile $with_builddeps_server/$resource
+  fi
+  if test "x$BDEPS_FTP" = xlftp; then
+    VALID_TOOL=yes
+    lftp -c "get $with_builddeps_server/$resource  -o $tmpfile"
+  fi
+  if test "x$BDEPS_FTP" = xftp; then
+    VALID_TOOL=yes
+    FTPSERVER=`echo $with_builddeps_server/$resource  | cut -f 3 -d '/'`
+    FTPPATH=`echo $with_builddeps_server/$resource  | cut -f 4- -d '/'`
+    FTPUSERPWD=${FTPSERVER%%@*}
+    if test "x$FTPSERVER" != "x$FTPUSERPWD"; then
+      FTPUSER=${userpwd%%:*}
+      FTPPWD=${userpwd#*@}
+      FTPSERVER=${FTPSERVER#*@}
+    else
+      FTPUSER=ftp
+      FTPPWD=ftp
     fi
-    if test -f $installdir/$filename.unpacked; then
-        depdir=$installdir
+    # the "pass" command does not work on some
+    # ftp clients (read ftp.exe) but if it works,
+    # passive mode is better!
+    ( \
+        echo "user $FTPUSER $FTPPWD"        ; \
+        echo "pass"                         ; \
+        echo "bin"                          ; \
+        echo "get $FTPPATH $tmpfile"              ; \
+    ) | ftp -in $FTPSERVER
+  fi
+  if test "x$VALID_TOOL" != xyes; then
+    as_fn_error $? "I do not know how to use the tool: $BDEPS_FTP" "$LINENO" 5
+  fi
+
+    mv $tmpfile $installdir/$filename
+    if test ! -s $installdir/$filename; then
+      as_fn_error $? "Could not download $with_builddeps_server/$resource" "$LINENO" 5
     fi
+    case "$extension" in
+      zip)  echo "Unzipping $installdir/$filename..."
+        (cd $installdir ; rm -f $installdir/$filename.unpacked ; $BDEPS_UNZIP $installdir/$filename > /dev/null && touch $installdir/$filename.unpacked)
+        ;;
+      tar.gz) echo "Untaring $installdir/$filename..."
+        (cd $installdir ; rm -f $installdir/$filename.unpacked ; tar xzf $installdir/$filename && touch $installdir/$filename.unpacked)
+        ;;
+      tgz) echo "Untaring $installdir/$filename..."
+        (cd $installdir ; rm -f $installdir/$filename.unpacked ; tar xzf $installdir/$filename && touch $installdir/$filename.unpacked)
+        ;;
+      *) as_fn_error $? "Cannot handle build depency archive with extension $extension" "$LINENO" 5
+        ;;
+    esac
+  fi
+  if test -f $installdir/$filename.unpacked; then
+    depdir=$installdir
+  fi
 
-	    fi
-            # Source the builddeps file again, because in the previous command, the depdir
-            # was updated to point at the current build dependency install directory.
-            . $builddepsfile
-            # Now extract variables from the builddeps.conf files.
-            theroot=${builddep_bootjdk_ROOT}
-            thecflags=${builddep_bootjdk_CFLAGS}
-            thelibs=${builddep_bootjdk_LIBS}
-            if test "x$depdir" = x; then
-                as_fn_error $? "Could not download build dependency bootjdk" "$LINENO" 5
-            fi
-            BOOT_JDK=$depdir
-            if test "x$theroot" != x; then
-               BOOT_JDK="$theroot"
-            fi
-            if test "x$thecflags" != x; then
-               BOOT_JDK_CFLAGS="$thecflags"
-            fi
-            if test "x$thelibs" != x; then
-               BOOT_JDK_LIBS="$thelibs"
-            fi
-            BOOT_JDK_FOUND=maybe
-            else BOOT_JDK_FOUND=no
-
-        fi
-        else BOOT_JDK_FOUND=no
+      fi
+      # Source the builddeps file again, because in the previous command, the depdir
+      # was updated to point at the current build dependency install directory.
+      . $builddepsfile
+      # Now extract variables from the builddeps.conf files.
+      theroot=${builddep_bootjdk_ROOT}
+      thecflags=${builddep_bootjdk_CFLAGS}
+      thelibs=${builddep_bootjdk_LIBS}
+      if test "x$depdir" = x; then
+        as_fn_error $? "Could not download build dependency bootjdk" "$LINENO" 5
+      fi
+      BOOT_JDK=$depdir
+      if test "x$theroot" != x; then
+        BOOT_JDK="$theroot"
+      fi
+      if test "x$thecflags" != x; then
+        BOOT_JDK_CFLAGS="$thecflags"
+      fi
+      if test "x$thelibs" != x; then
+        BOOT_JDK_LIBS="$thelibs"
+      fi
+      BOOT_JDK_FOUND=maybe
+      else BOOT_JDK_FOUND=no
 
     fi
+    else BOOT_JDK_FOUND=no
+
+  fi
 
 
 
@@ -11651,13 +11649,13 @@
   fi
 
 
-# Test: Is $JAVA_HOME set?
+  # Test: Is $JAVA_HOME set?
 
   if test "x$BOOT_JDK_FOUND" = xno; then
     # Now execute the test
 
-    if test "x$JAVA_HOME" != x; then
-        JAVA_HOME_PROCESSED="$JAVA_HOME"
+  if test "x$JAVA_HOME" != x; then
+    JAVA_HOME_PROCESSED="$JAVA_HOME"
 
   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
 
@@ -11780,18 +11778,18 @@
     JAVA_HOME_PROCESSED="`cd "$path"; $THEPWDCMD -L`"
   fi
 
-        if test ! -d "$JAVA_HOME_PROCESSED"; then
-            { $as_echo "$as_me:${as_lineno-$LINENO}: Your JAVA_HOME points to a non-existing directory!" >&5
+    if test ! -d "$JAVA_HOME_PROCESSED"; then
+      { $as_echo "$as_me:${as_lineno-$LINENO}: Your JAVA_HOME points to a non-existing directory!" >&5
 $as_echo "$as_me: Your JAVA_HOME points to a non-existing directory!" >&6;}
-        else
-          # Aha, the user has set a JAVA_HOME
-          # let us use that as the Boot JDK.
-          BOOT_JDK="$JAVA_HOME_PROCESSED"
-          BOOT_JDK_FOUND=maybe
-          { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using JAVA_HOME" >&5
+    else
+      # Aha, the user has set a JAVA_HOME
+      # let us use that as the Boot JDK.
+      BOOT_JDK="$JAVA_HOME_PROCESSED"
+      BOOT_JDK_FOUND=maybe
+      { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using JAVA_HOME" >&5
 $as_echo "$as_me: Found potential Boot JDK using JAVA_HOME" >&6;}
-        fi
     fi
+  fi
 
 
     # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
@@ -11969,17 +11967,17 @@
   fi
 
 
-# Test: Is there a /usr/libexec/java_home? (Typically on MacOSX)
+  # Test: Is there a /usr/libexec/java_home? (Typically on MacOSX)
 
   if test "x$BOOT_JDK_FOUND" = xno; then
     # Now execute the test
 
-    if test -x /usr/libexec/java_home; then
-        BOOT_JDK=`/usr/libexec/java_home`
-        BOOT_JDK_FOUND=maybe
-        { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using /usr/libexec/java_home" >&5
+  if test -x /usr/libexec/java_home; then
+    BOOT_JDK=`/usr/libexec/java_home`
+    BOOT_JDK_FOUND=maybe
+    { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using /usr/libexec/java_home" >&5
 $as_echo "$as_me: Found potential Boot JDK using /usr/libexec/java_home" >&6;}
-    fi
+  fi
 
 
     # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
@@ -12157,12 +12155,12 @@
   fi
 
 
-# Test: Is there a java or javac in the PATH, which is a symlink to the JDK?
+  # Test: Is there a java or javac in the PATH, which is a symlink to the JDK?
 
   if test "x$BOOT_JDK_FOUND" = xno; then
     # Now execute the test
 
-    # Extract the first word of "javac", so it can be a program name with args.
+  # Extract the first word of "javac", so it can be a program name with args.
 set dummy javac; ac_word=$2
 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
 $as_echo_n "checking for $ac_word... " >&6; }
@@ -12202,7 +12200,7 @@
 fi
 
 
-    # Extract the first word of "java", so it can be a program name with args.
+  # Extract the first word of "java", so it can be a program name with args.
 set dummy java; ac_word=$2
 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
 $as_echo_n "checking for $ac_word... " >&6; }
@@ -12242,72 +12240,72 @@
 fi
 
 
-    BINARY="$JAVAC_CHECK"
-    if test "x$JAVAC_CHECK" = x; then
-        BINARY="$JAVA_CHECK"
-    fi
-    if test "x$BINARY" != x; then
-        # So there is a java(c) binary, it might be part of a JDK.
-        # Lets find the JDK/JRE directory by following symbolic links.
-        # Linux/GNU systems often have links from /usr/bin/java to
-        # /etc/alternatives/java to the real JDK binary.
+  BINARY="$JAVAC_CHECK"
+  if test "x$JAVAC_CHECK" = x; then
+    BINARY="$JAVA_CHECK"
+  fi
+  if test "x$BINARY" != x; then
+    # So there is a java(c) binary, it might be part of a JDK.
+    # Lets find the JDK/JRE directory by following symbolic links.
+    # Linux/GNU systems often have links from /usr/bin/java to
+    # /etc/alternatives/java to the real JDK binary.
 
-    if test "x$OPENJDK_BUILD_OS" != xwindows; then
-        # Follow a chain of symbolic links. Use readlink
-        # where it exists, else fall back to horribly
-        # complicated shell code.
-        if test "x$READLINK_TESTED" != yes; then
-            # On MacOSX there is a readlink tool with a different
-            # purpose than the GNU readlink tool. Check the found readlink.
-            ISGNU=`$READLINK --version 2>&1 | $GREP GNU`
-            if test "x$ISGNU" = x; then
-                 # A readlink that we do not know how to use.
-                 # Are there other non-GNU readlinks out there?
-                 READLINK_TESTED=yes
-                 READLINK=
-            fi
-        fi
-
-        if test "x$READLINK" != x; then
-            BINARY=`$READLINK -f $BINARY`
-        else
-            # Save the current directory for restoring afterwards
-            STARTDIR=$PWD
-            COUNTER=0
-            sym_link_dir=`$DIRNAME $BINARY`
-            sym_link_file=`$BASENAME $BINARY`
-            cd $sym_link_dir
-            # Use -P flag to resolve symlinks in directories.
-            cd `$THEPWDCMD -P`
-            sym_link_dir=`$THEPWDCMD -P`
-            # Resolve file symlinks
-            while test $COUNTER -lt 20; do
-                ISLINK=`$LS -l $sym_link_dir/$sym_link_file | $GREP '\->' | $SED -e 's/.*-> \(.*\)/\1/'`
-                if test "x$ISLINK" == x; then
-                    # This is not a symbolic link! We are done!
-                    break
-                fi
-                # Again resolve directory symlinks since the target of the just found
-                # link could be in a different directory
-                cd `$DIRNAME $ISLINK`
-                sym_link_dir=`$THEPWDCMD -P`
-                sym_link_file=`$BASENAME $ISLINK`
-                let COUNTER=COUNTER+1
-            done
-            cd $STARTDIR
-            BINARY=$sym_link_dir/$sym_link_file
-        fi
+  if test "x$OPENJDK_BUILD_OS" != xwindows; then
+    # Follow a chain of symbolic links. Use readlink
+    # where it exists, else fall back to horribly
+    # complicated shell code.
+    if test "x$READLINK_TESTED" != yes; then
+      # On MacOSX there is a readlink tool with a different
+      # purpose than the GNU readlink tool. Check the found readlink.
+      ISGNU=`$READLINK --version 2>&1 | $GREP GNU`
+      if test "x$ISGNU" = x; then
+        # A readlink that we do not know how to use.
+        # Are there other non-GNU readlinks out there?
+        READLINK_TESTED=yes
+        READLINK=
+      fi
     fi
 
-        BOOT_JDK=`dirname "$BINARY"`
-        BOOT_JDK=`cd "$BOOT_JDK/.."; pwd`
-        if test -x "$BOOT_JDK/bin/javac" && test -x "$BOOT_JDK/bin/java"; then
-            # Looks like we found ourselves an JDK
-            BOOT_JDK_FOUND=maybe
-            { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using java(c) in PATH" >&5
+    if test "x$READLINK" != x; then
+      BINARY=`$READLINK -f $BINARY`
+    else
+      # Save the current directory for restoring afterwards
+      STARTDIR=$PWD
+      COUNTER=0
+      sym_link_dir=`$DIRNAME $BINARY`
+      sym_link_file=`$BASENAME $BINARY`
+      cd $sym_link_dir
+      # Use -P flag to resolve symlinks in directories.
+      cd `$THEPWDCMD -P`
+      sym_link_dir=`$THEPWDCMD -P`
+      # Resolve file symlinks
+      while test $COUNTER -lt 20; do
+        ISLINK=`$LS -l $sym_link_dir/$sym_link_file | $GREP '\->' | $SED -e 's/.*-> \(.*\)/\1/'`
+        if test "x$ISLINK" == x; then
+          # This is not a symbolic link! We are done!
+          break
+        fi
+        # Again resolve directory symlinks since the target of the just found
+        # link could be in a different directory
+        cd `$DIRNAME $ISLINK`
+        sym_link_dir=`$THEPWDCMD -P`
+        sym_link_file=`$BASENAME $ISLINK`
+        let COUNTER=COUNTER+1
+      done
+      cd $STARTDIR
+      BINARY=$sym_link_dir/$sym_link_file
+    fi
+  fi
+
+    BOOT_JDK=`dirname "$BINARY"`
+    BOOT_JDK=`cd "$BOOT_JDK/.."; pwd`
+    if test -x "$BOOT_JDK/bin/javac" && test -x "$BOOT_JDK/bin/java"; then
+      # Looks like we found ourselves an JDK
+      BOOT_JDK_FOUND=maybe
+      { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using java(c) in PATH" >&5
 $as_echo "$as_me: Found potential Boot JDK using java(c) in PATH" >&6;}
-        fi
     fi
+  fi
 
 
     # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
@@ -12485,7 +12483,7 @@
   fi
 
 
-# Test: Is there a JDK installed in default, well-known locations?
+  # Test: Is there a JDK installed in default, well-known locations?
 
   if test "x$BOOT_JDK_FOUND" = xno; then
     # Now execute the test
@@ -15715,67 +15713,67 @@
   fi
 
 
-# If we haven't found anything yet, we've truly lost. Give up.
-if test "x$BOOT_JDK_FOUND" = xno; then
+  # If we haven't found anything yet, we've truly lost. Give up.
+  if test "x$BOOT_JDK_FOUND" = xno; then
 
-    # Print a helpful message on how to acquire the necessary build dependency.
-    # openjdk is the help tag: freetyp2, cups, pulse, alsa etc
-    MISSING_DEPENDENCY=openjdk
-    PKGHANDLER_COMMAND=
+  # Print a helpful message on how to acquire the necessary build dependency.
+  # openjdk is the help tag: freetyp2, cups, pulse, alsa etc
+  MISSING_DEPENDENCY=openjdk
+  PKGHANDLER_COMMAND=
 
-    case $PKGHANDLER in
-	apt-get)
-                apt_help     $MISSING_DEPENDENCY ;;
+  case $PKGHANDLER in
+    apt-get)
+      apt_help     $MISSING_DEPENDENCY ;;
     yum)
-                yum_help     $MISSING_DEPENDENCY ;;
-	port)
-                port_help    $MISSING_DEPENDENCY ;;
-	pkgutil)
-                pkgutil_help $MISSING_DEPENDENCY ;;
-	pkgadd)
-                pkgadd_help  $MISSING_DEPENDENCY ;;
+      yum_help     $MISSING_DEPENDENCY ;;
+    port)
+      port_help    $MISSING_DEPENDENCY ;;
+    pkgutil)
+      pkgutil_help $MISSING_DEPENDENCY ;;
+    pkgadd)
+      pkgadd_help  $MISSING_DEPENDENCY ;;
     * )
       break ;;
-    esac
+  esac
 
-    if test "x$PKGHANDLER_COMMAND" != x; then
-        HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
-    fi
+  if test "x$PKGHANDLER_COMMAND" != x; then
+    HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
+  fi
 
-  { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find a valid Boot JDK. $HELP_MSG" >&5
+    { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find a valid Boot JDK. $HELP_MSG" >&5
 $as_echo "$as_me: Could not find a valid Boot JDK. $HELP_MSG" >&6;}
-  { $as_echo "$as_me:${as_lineno-$LINENO}: This might be fixed by explicitely setting --with-boot-jdk" >&5
+    { $as_echo "$as_me:${as_lineno-$LINENO}: This might be fixed by explicitely setting --with-boot-jdk" >&5
 $as_echo "$as_me: This might be fixed by explicitely setting --with-boot-jdk" >&6;}
-  as_fn_error $? "Cannot continue" "$LINENO" 5
-fi
+    as_fn_error $? "Cannot continue" "$LINENO" 5
+  fi
 
-# Setup proper paths for what we found
-BOOT_RTJAR="$BOOT_JDK/jre/lib/rt.jar"
-if test ! -f "$BOOT_RTJAR"; then
+  # Setup proper paths for what we found
+  BOOT_RTJAR="$BOOT_JDK/jre/lib/rt.jar"
+  if test ! -f "$BOOT_RTJAR"; then
     # On MacOSX it is called classes.jar
     BOOT_RTJAR="$BOOT_JDK/../Classes/classes.jar"
     if test -f "$BOOT_RTJAR"; then
       # Remove the ..
       BOOT_RTJAR="`cd ${BOOT_RTJAR%/*} && pwd`/${BOOT_RTJAR##*/}"
     fi
-fi
-BOOT_TOOLSJAR="$BOOT_JDK/lib/tools.jar"
-BOOT_JDK="$BOOT_JDK"
+  fi
+  BOOT_TOOLSJAR="$BOOT_JDK/lib/tools.jar"
+  BOOT_JDK="$BOOT_JDK"
 
 
 
 
-# Setup tools from the Boot JDK.
+  # Setup tools from the Boot JDK.
 
   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for java in Boot JDK" >&5
 $as_echo_n "checking for java in Boot JDK... " >&6; }
   JAVA=$BOOT_JDK/bin/java
   if test ! -x $JAVA; then
-      { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
+    { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
 $as_echo "not found" >&6; }
-      { $as_echo "$as_me:${as_lineno-$LINENO}: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&5
+    { $as_echo "$as_me:${as_lineno-$LINENO}: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&5
 $as_echo "$as_me: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&6;}
-      as_fn_error $? "Could not find java in the Boot JDK" "$LINENO" 5
+    as_fn_error $? "Could not find java in the Boot JDK" "$LINENO" 5
   fi
   { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
 $as_echo "ok" >&6; }
@@ -15785,11 +15783,11 @@
 $as_echo_n "checking for javac in Boot JDK... " >&6; }
   JAVAC=$BOOT_JDK/bin/javac
   if test ! -x $JAVAC; then
-      { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
+    { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
 $as_echo "not found" >&6; }
-      { $as_echo "$as_me:${as_lineno-$LINENO}: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&5
+    { $as_echo "$as_me:${as_lineno-$LINENO}: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&5
 $as_echo "$as_me: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&6;}
-      as_fn_error $? "Could not find javac in the Boot JDK" "$LINENO" 5
+    as_fn_error $? "Could not find javac in the Boot JDK" "$LINENO" 5
   fi
   { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
 $as_echo "ok" >&6; }
@@ -15799,11 +15797,11 @@
 $as_echo_n "checking for javah in Boot JDK... " >&6; }
   JAVAH=$BOOT_JDK/bin/javah
   if test ! -x $JAVAH; then
-      { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
+    { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
 $as_echo "not found" >&6; }
-      { $as_echo "$as_me:${as_lineno-$LINENO}: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&5
+    { $as_echo "$as_me:${as_lineno-$LINENO}: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&5
 $as_echo "$as_me: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&6;}
-      as_fn_error $? "Could not find javah in the Boot JDK" "$LINENO" 5
+    as_fn_error $? "Could not find javah in the Boot JDK" "$LINENO" 5
   fi
   { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
 $as_echo "ok" >&6; }
@@ -15813,11 +15811,11 @@
 $as_echo_n "checking for javap in Boot JDK... " >&6; }
   JAVAP=$BOOT_JDK/bin/javap
   if test ! -x $JAVAP; then
-      { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
+    { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
 $as_echo "not found" >&6; }
-      { $as_echo "$as_me:${as_lineno-$LINENO}: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&5
+    { $as_echo "$as_me:${as_lineno-$LINENO}: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&5
 $as_echo "$as_me: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&6;}
-      as_fn_error $? "Could not find javap in the Boot JDK" "$LINENO" 5
+    as_fn_error $? "Could not find javap in the Boot JDK" "$LINENO" 5
   fi
   { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
 $as_echo "ok" >&6; }
@@ -15827,11 +15825,11 @@
 $as_echo_n "checking for jar in Boot JDK... " >&6; }
   JAR=$BOOT_JDK/bin/jar
   if test ! -x $JAR; then
-      { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
+    { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
 $as_echo "not found" >&6; }
-      { $as_echo "$as_me:${as_lineno-$LINENO}: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&5
+    { $as_echo "$as_me:${as_lineno-$LINENO}: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&5
 $as_echo "$as_me: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&6;}
-      as_fn_error $? "Could not find jar in the Boot JDK" "$LINENO" 5
+    as_fn_error $? "Could not find jar in the Boot JDK" "$LINENO" 5
   fi
   { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
 $as_echo "ok" >&6; }
@@ -15841,11 +15839,11 @@
 $as_echo_n "checking for rmic in Boot JDK... " >&6; }
   RMIC=$BOOT_JDK/bin/rmic
   if test ! -x $RMIC; then
-      { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
+    { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
 $as_echo "not found" >&6; }
-      { $as_echo "$as_me:${as_lineno-$LINENO}: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&5
+    { $as_echo "$as_me:${as_lineno-$LINENO}: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&5
 $as_echo "$as_me: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&6;}
-      as_fn_error $? "Could not find rmic in the Boot JDK" "$LINENO" 5
+    as_fn_error $? "Could not find rmic in the Boot JDK" "$LINENO" 5
   fi
   { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
 $as_echo "ok" >&6; }
@@ -15855,28 +15853,28 @@
 $as_echo_n "checking for native2ascii in Boot JDK... " >&6; }
   NATIVE2ASCII=$BOOT_JDK/bin/native2ascii
   if test ! -x $NATIVE2ASCII; then
-      { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
+    { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
 $as_echo "not found" >&6; }
-      { $as_echo "$as_me:${as_lineno-$LINENO}: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&5
+    { $as_echo "$as_me:${as_lineno-$LINENO}: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&5
 $as_echo "$as_me: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&6;}
-      as_fn_error $? "Could not find native2ascii in the Boot JDK" "$LINENO" 5
+    as_fn_error $? "Could not find native2ascii in the Boot JDK" "$LINENO" 5
   fi
   { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
 $as_echo "ok" >&6; }
 
 
-# Finally, set some other options...
+  # Finally, set some other options...
 
-# When compiling code to be executed by the Boot JDK, force jdk7 compatibility.
-BOOT_JDK_SOURCETARGET="-source 7 -target 7"
+  # When compiling code to be executed by the Boot JDK, force jdk7 compatibility.
+  BOOT_JDK_SOURCETARGET="-source 7 -target 7"
 
 
 
 
-##############################################################################
-#
-# Specify options for anything that is run with the Boot JDK.
-#
+  ##############################################################################
+  #
+  # Specify options for anything that is run with the Boot JDK.
+  #
 
 # Check whether --with-boot-jdk-jvmargs was given.
 if test "${with_boot_jdk_jvmargs+set}" = set; then :
@@ -15884,135 +15882,135 @@
 fi
 
 
-if test "x$with_boot_jdk_jvmargs" = x; then
+  if test "x$with_boot_jdk_jvmargs" = x; then
     # Not all JVM:s accept the same arguments on the command line.
     # OpenJDK specific increase in thread stack for JDK build,
     # well more specifically, when running javac.
     if test "x$BUILD_NUM_BITS" = x32; then
-       STACK_SIZE=768
+      STACK_SIZE=768
     else
-       # Running Javac on a JVM on a 64-bit machine, the stack takes more space
-       # since 64-bit pointers are pushed on the stach. Apparently, we need
-       # to increase the stack space when javacing the JDK....
-       STACK_SIZE=1536
+      # Running Javac on a JVM on a 64-bit machine, the stack takes more space
+      # since 64-bit pointers are pushed on the stach. Apparently, we need
+      # to increase the stack space when javacing the JDK....
+      STACK_SIZE=1536
     fi
 
     # Minimum amount of heap memory.
 
-    $ECHO "Check if jvm arg is ok: -Xms64M" >&5
-    $ECHO "Command: $JAVA -Xms64M -version" >&5
-    OUTPUT=`$JAVA -Xms64M -version 2>&1`
-    FOUND_WARN=`$ECHO "$OUTPUT" | grep -i warn`
-    FOUND_VERSION=`$ECHO $OUTPUT | grep " version \""`
-    if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
-        boot_jdk_jvmargs="$boot_jdk_jvmargs -Xms64M"
-	JVM_ARG_OK=true
-    else
-	$ECHO "Arg failed:" >&5
-	$ECHO "$OUTPUT" >&5
-	JVM_ARG_OK=false
-    fi
+  $ECHO "Check if jvm arg is ok: -Xms64M" >&5
+  $ECHO "Command: $JAVA -Xms64M -version" >&5
+  OUTPUT=`$JAVA -Xms64M -version 2>&1`
+  FOUND_WARN=`$ECHO "$OUTPUT" | grep -i warn`
+  FOUND_VERSION=`$ECHO $OUTPUT | grep " version \""`
+  if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
+    boot_jdk_jvmargs="$boot_jdk_jvmargs -Xms64M"
+    JVM_ARG_OK=true
+  else
+    $ECHO "Arg failed:" >&5
+    $ECHO "$OUTPUT" >&5
+    JVM_ARG_OK=false
+  fi
 
     if test "x$OPENJDK_TARGET_OS" = "xmacosx"; then
-        # Why does macosx need more heap? Its the huge JDK batch.
+      # Why does macosx need more heap? Its the huge JDK batch.
 
-    $ECHO "Check if jvm arg is ok: -Xmx1600M" >&5
-    $ECHO "Command: $JAVA -Xmx1600M -version" >&5
-    OUTPUT=`$JAVA -Xmx1600M -version 2>&1`
-    FOUND_WARN=`$ECHO "$OUTPUT" | grep -i warn`
-    FOUND_VERSION=`$ECHO $OUTPUT | grep " version \""`
-    if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
-        boot_jdk_jvmargs="$boot_jdk_jvmargs -Xmx1600M"
-	JVM_ARG_OK=true
-    else
-	$ECHO "Arg failed:" >&5
-	$ECHO "$OUTPUT" >&5
-	JVM_ARG_OK=false
-    fi
+  $ECHO "Check if jvm arg is ok: -Xmx1600M" >&5
+  $ECHO "Command: $JAVA -Xmx1600M -version" >&5
+  OUTPUT=`$JAVA -Xmx1600M -version 2>&1`
+  FOUND_WARN=`$ECHO "$OUTPUT" | grep -i warn`
+  FOUND_VERSION=`$ECHO $OUTPUT | grep " version \""`
+  if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
+    boot_jdk_jvmargs="$boot_jdk_jvmargs -Xmx1600M"
+    JVM_ARG_OK=true
+  else
+    $ECHO "Arg failed:" >&5
+    $ECHO "$OUTPUT" >&5
+    JVM_ARG_OK=false
+  fi
 
     else
 
-    $ECHO "Check if jvm arg is ok: -Xmx1100M" >&5
-    $ECHO "Command: $JAVA -Xmx1100M -version" >&5
-    OUTPUT=`$JAVA -Xmx1100M -version 2>&1`
-    FOUND_WARN=`$ECHO "$OUTPUT" | grep -i warn`
-    FOUND_VERSION=`$ECHO $OUTPUT | grep " version \""`
-    if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
-        boot_jdk_jvmargs="$boot_jdk_jvmargs -Xmx1100M"
-	JVM_ARG_OK=true
-    else
-	$ECHO "Arg failed:" >&5
-	$ECHO "$OUTPUT" >&5
-	JVM_ARG_OK=false
-    fi
+  $ECHO "Check if jvm arg is ok: -Xmx1100M" >&5
+  $ECHO "Command: $JAVA -Xmx1100M -version" >&5
+  OUTPUT=`$JAVA -Xmx1100M -version 2>&1`
+  FOUND_WARN=`$ECHO "$OUTPUT" | grep -i warn`
+  FOUND_VERSION=`$ECHO $OUTPUT | grep " version \""`
+  if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
+    boot_jdk_jvmargs="$boot_jdk_jvmargs -Xmx1100M"
+    JVM_ARG_OK=true
+  else
+    $ECHO "Arg failed:" >&5
+    $ECHO "$OUTPUT" >&5
+    JVM_ARG_OK=false
+  fi
 
     fi
     # When is adding -client something that speeds up the JVM?
     # ADD_JVM_ARG_IF_OK([-client],boot_jdk_jvmargs,[$JAVA])
 
-    $ECHO "Check if jvm arg is ok: -XX:PermSize=32m" >&5
-    $ECHO "Command: $JAVA -XX:PermSize=32m -version" >&5
-    OUTPUT=`$JAVA -XX:PermSize=32m -version 2>&1`
-    FOUND_WARN=`$ECHO "$OUTPUT" | grep -i warn`
-    FOUND_VERSION=`$ECHO $OUTPUT | grep " version \""`
-    if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
-        boot_jdk_jvmargs="$boot_jdk_jvmargs -XX:PermSize=32m"
-	JVM_ARG_OK=true
-    else
-	$ECHO "Arg failed:" >&5
-	$ECHO "$OUTPUT" >&5
-	JVM_ARG_OK=false
-    fi
+  $ECHO "Check if jvm arg is ok: -XX:PermSize=32m" >&5
+  $ECHO "Command: $JAVA -XX:PermSize=32m -version" >&5
+  OUTPUT=`$JAVA -XX:PermSize=32m -version 2>&1`
+  FOUND_WARN=`$ECHO "$OUTPUT" | grep -i warn`
+  FOUND_VERSION=`$ECHO $OUTPUT | grep " version \""`
+  if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
+    boot_jdk_jvmargs="$boot_jdk_jvmargs -XX:PermSize=32m"
+    JVM_ARG_OK=true
+  else
+    $ECHO "Arg failed:" >&5
+    $ECHO "$OUTPUT" >&5
+    JVM_ARG_OK=false
+  fi
 
 
-    $ECHO "Check if jvm arg is ok: -XX:MaxPermSize=160m" >&5
-    $ECHO "Command: $JAVA -XX:MaxPermSize=160m -version" >&5
-    OUTPUT=`$JAVA -XX:MaxPermSize=160m -version 2>&1`
-    FOUND_WARN=`$ECHO "$OUTPUT" | grep -i warn`
-    FOUND_VERSION=`$ECHO $OUTPUT | grep " version \""`
-    if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
-        boot_jdk_jvmargs="$boot_jdk_jvmargs -XX:MaxPermSize=160m"
-	JVM_ARG_OK=true
-    else
-	$ECHO "Arg failed:" >&5
-	$ECHO "$OUTPUT" >&5
-	JVM_ARG_OK=false
-    fi
+  $ECHO "Check if jvm arg is ok: -XX:MaxPermSize=160m" >&5
+  $ECHO "Command: $JAVA -XX:MaxPermSize=160m -version" >&5
+  OUTPUT=`$JAVA -XX:MaxPermSize=160m -version 2>&1`
+  FOUND_WARN=`$ECHO "$OUTPUT" | grep -i warn`
+  FOUND_VERSION=`$ECHO $OUTPUT | grep " version \""`
+  if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
+    boot_jdk_jvmargs="$boot_jdk_jvmargs -XX:MaxPermSize=160m"
+    JVM_ARG_OK=true
+  else
+    $ECHO "Arg failed:" >&5
+    $ECHO "$OUTPUT" >&5
+    JVM_ARG_OK=false
+  fi
 
 
-    $ECHO "Check if jvm arg is ok: -XX:ThreadStackSize=$STACK_SIZE" >&5
-    $ECHO "Command: $JAVA -XX:ThreadStackSize=$STACK_SIZE -version" >&5
-    OUTPUT=`$JAVA -XX:ThreadStackSize=$STACK_SIZE -version 2>&1`
-    FOUND_WARN=`$ECHO "$OUTPUT" | grep -i warn`
-    FOUND_VERSION=`$ECHO $OUTPUT | grep " version \""`
-    if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
-        boot_jdk_jvmargs="$boot_jdk_jvmargs -XX:ThreadStackSize=$STACK_SIZE"
-	JVM_ARG_OK=true
-    else
-	$ECHO "Arg failed:" >&5
-	$ECHO "$OUTPUT" >&5
-	JVM_ARG_OK=false
-    fi
+  $ECHO "Check if jvm arg is ok: -XX:ThreadStackSize=$STACK_SIZE" >&5
+  $ECHO "Command: $JAVA -XX:ThreadStackSize=$STACK_SIZE -version" >&5
+  OUTPUT=`$JAVA -XX:ThreadStackSize=$STACK_SIZE -version 2>&1`
+  FOUND_WARN=`$ECHO "$OUTPUT" | grep -i warn`
+  FOUND_VERSION=`$ECHO $OUTPUT | grep " version \""`
+  if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
+    boot_jdk_jvmargs="$boot_jdk_jvmargs -XX:ThreadStackSize=$STACK_SIZE"
+    JVM_ARG_OK=true
+  else
+    $ECHO "Arg failed:" >&5
+    $ECHO "$OUTPUT" >&5
+    JVM_ARG_OK=false
+  fi
 
     # Disable special log output when a debug build is used as Boot JDK...
 
-    $ECHO "Check if jvm arg is ok: -XX:-PrintVMOptions -XX:-UnlockDiagnosticVMOptions -XX:-LogVMOutput" >&5
-    $ECHO "Command: $JAVA -XX:-PrintVMOptions -XX:-UnlockDiagnosticVMOptions -XX:-LogVMOutput -version" >&5
-    OUTPUT=`$JAVA -XX:-PrintVMOptions -XX:-UnlockDiagnosticVMOptions -XX:-LogVMOutput -version 2>&1`
-    FOUND_WARN=`$ECHO "$OUTPUT" | grep -i warn`
-    FOUND_VERSION=`$ECHO $OUTPUT | grep " version \""`
-    if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
-        boot_jdk_jvmargs="$boot_jdk_jvmargs -XX:-PrintVMOptions -XX:-UnlockDiagnosticVMOptions -XX:-LogVMOutput"
-	JVM_ARG_OK=true
-    else
-	$ECHO "Arg failed:" >&5
-	$ECHO "$OUTPUT" >&5
-	JVM_ARG_OK=false
-    fi
+  $ECHO "Check if jvm arg is ok: -XX:-PrintVMOptions -XX:-UnlockDiagnosticVMOptions -XX:-LogVMOutput" >&5
+  $ECHO "Command: $JAVA -XX:-PrintVMOptions -XX:-UnlockDiagnosticVMOptions -XX:-LogVMOutput -version" >&5
+  OUTPUT=`$JAVA -XX:-PrintVMOptions -XX:-UnlockDiagnosticVMOptions -XX:-LogVMOutput -version 2>&1`
+  FOUND_WARN=`$ECHO "$OUTPUT" | grep -i warn`
+  FOUND_VERSION=`$ECHO $OUTPUT | grep " version \""`
+  if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
+    boot_jdk_jvmargs="$boot_jdk_jvmargs -XX:-PrintVMOptions -XX:-UnlockDiagnosticVMOptions -XX:-LogVMOutput"
+    JVM_ARG_OK=true
+  else
+    $ECHO "Arg failed:" >&5
+    $ECHO "$OUTPUT" >&5
+    JVM_ARG_OK=false
+  fi
 
-fi
+  fi
 
-BOOT_JDK_JVMARGS=$boot_jdk_jvmargs
+  BOOT_JDK_JVMARGS=$boot_jdk_jvmargs
 
 
 
@@ -16023,16 +16021,15 @@
 ###############################################################################
 
 
-
-# Where are the sources. Any of these can be overridden
-# using --with-override-corba and the likes.
-LANGTOOLS_TOPDIR="$SRC_ROOT/langtools"
-CORBA_TOPDIR="$SRC_ROOT/corba"
-JAXP_TOPDIR="$SRC_ROOT/jaxp"
-JAXWS_TOPDIR="$SRC_ROOT/jaxws"
-HOTSPOT_TOPDIR="$SRC_ROOT/hotspot"
-NASHORN_TOPDIR="$SRC_ROOT/nashorn"
-JDK_TOPDIR="$SRC_ROOT/jdk"
+  # Where are the sources. Any of these can be overridden
+  # using --with-override-corba and the likes.
+  LANGTOOLS_TOPDIR="$SRC_ROOT/langtools"
+  CORBA_TOPDIR="$SRC_ROOT/corba"
+  JAXP_TOPDIR="$SRC_ROOT/jaxp"
+  JAXWS_TOPDIR="$SRC_ROOT/jaxws"
+  HOTSPOT_TOPDIR="$SRC_ROOT/hotspot"
+  NASHORN_TOPDIR="$SRC_ROOT/nashorn"
+  JDK_TOPDIR="$SRC_ROOT/jdk"
 
 
 
@@ -16043,11 +16040,11 @@
 
 
 
-###############################################################################
-#
-# Pickup additional source for a component from outside of the source root
-# or override source for a component.
-#
+  ###############################################################################
+  #
+  # Pickup additional source for a component from outside of the source root
+  # or override source for a component.
+  #
 
 # Check whether --with-add-source-root was given.
 if test "${with_add_source_root+set}" = set; then :
@@ -16069,14 +16066,14 @@
 fi
 
 
-if test "x$with_adds_and_overrides" != x; then
+  if test "x$with_adds_and_overrides" != x; then
     with_add_source_root="$with_adds_and_overrides/adds"
     with_override_source_root="$with_adds_and_overrides/overrides"
-fi
+  fi
 
-if test "x$with_add_source_root" != x; then
+  if test "x$with_add_source_root" != x; then
     if ! test -d $with_add_source_root; then
-       as_fn_error $? "Trying to use a non-existant add-source-root $with_add_source_root" "$LINENO" 5
+      as_fn_error $? "Trying to use a non-existant add-source-root $with_add_source_root" "$LINENO" 5
     fi
     CURDIR="$PWD"
     cd "$with_add_source_root"
@@ -16085,93 +16082,93 @@
     # Verify that the addon source root does not have any root makefiles.
     # If it does, then it is usually an error, prevent this.
     if test -f $with_add_source_root/langtools/makefiles/Makefile || \
-       test -f $with_add_source_root/langtools/make/Makefile; then
-        as_fn_error $? "Your add source root seems to contain a full langtools repo! An add source root should only contain additional sources." "$LINENO" 5
+      test -f $with_add_source_root/langtools/make/Makefile; then
+      as_fn_error $? "Your add source root seems to contain a full langtools repo! An add source root should only contain additional sources." "$LINENO" 5
     fi
     if test -f $with_add_source_root/corba/makefiles/Makefile || \
-       test -f $with_add_source_root/corba/make/Makefile; then
-        as_fn_error $? "Your add source root seems to contain a full corba repo! An add source root should only contain additional sources." "$LINENO" 5
+      test -f $with_add_source_root/corba/make/Makefile; then
+      as_fn_error $? "Your add source root seems to contain a full corba repo! An add source root should only contain additional sources." "$LINENO" 5
     fi
     if test -f $with_add_source_root/jaxp/makefiles/Makefile || \
-       test -f $with_add_source_root/jaxp/make/Makefile; then
-        as_fn_error $? "Your add source root seems to contain a full jaxp repo! An add source root should only contain additional sources." "$LINENO" 5
+      test -f $with_add_source_root/jaxp/make/Makefile; then
+      as_fn_error $? "Your add source root seems to contain a full jaxp repo! An add source root should only contain additional sources." "$LINENO" 5
     fi
     if test -f $with_add_source_root/jaxws/makefiles/Makefile || \
-       test -f $with_add_source_root/jaxws/make/Makefile; then
-        as_fn_error $? "Your add source root seems to contain a full jaxws repo! An add source root should only contain additional sources." "$LINENO" 5
+      test -f $with_add_source_root/jaxws/make/Makefile; then
+      as_fn_error $? "Your add source root seems to contain a full jaxws repo! An add source root should only contain additional sources." "$LINENO" 5
     fi
     if test -f $with_add_source_root/hotspot/makefiles/Makefile || \
-       test -f $with_add_source_root/hotspot/make/Makefile; then
-        as_fn_error $? "Your add source root seems to contain a full hotspot repo! An add source root should only contain additional sources." "$LINENO" 5
+      test -f $with_add_source_root/hotspot/make/Makefile; then
+      as_fn_error $? "Your add source root seems to contain a full hotspot repo! An add source root should only contain additional sources." "$LINENO" 5
     fi
     if test -f $with_add_source_root/nashorn/makefiles/Makefile || \
-       test -f $with_add_source_root/nashorn/make/Makefile; then
-        as_fn_error $? "Your add source root seems to contain a full nashorn repo! An add source root should only contain additional sources." "$LINENO" 5
+      test -f $with_add_source_root/nashorn/make/Makefile; then
+      as_fn_error $? "Your add source root seems to contain a full nashorn repo! An add source root should only contain additional sources." "$LINENO" 5
     fi
     if test -f $with_add_source_root/jdk/makefiles/Makefile || \
-       test -f $with_add_source_root/jdk/make/Makefile; then
-        as_fn_error $? "Your add source root seems to contain a full JDK repo! An add source root should only contain additional sources." "$LINENO" 5
+      test -f $with_add_source_root/jdk/make/Makefile; then
+      as_fn_error $? "Your add source root seems to contain a full JDK repo! An add source root should only contain additional sources." "$LINENO" 5
     fi
-fi
+  fi
 
 
-if test "x$with_override_source_root" != x; then
+  if test "x$with_override_source_root" != x; then
     if ! test -d $with_override_source_root; then
-       as_fn_error $? "Trying to use a non-existant override-source-root $with_override_source_root" "$LINENO" 5
+      as_fn_error $? "Trying to use a non-existant override-source-root $with_override_source_root" "$LINENO" 5
     fi
     CURDIR="$PWD"
     cd "$with_override_source_root"
     OVERRIDE_SRC_ROOT="`pwd`"
     cd "$CURDIR"
     if test -f $with_override_source_root/langtools/makefiles/Makefile || \
-       test -f $with_override_source_root/langtools/make/Makefile; then
-        as_fn_error $? "Your override source root seems to contain a full langtools repo! An override source root should only contain sources that override." "$LINENO" 5
+      test -f $with_override_source_root/langtools/make/Makefile; then
+      as_fn_error $? "Your override source root seems to contain a full langtools repo! An override source root should only contain sources that override." "$LINENO" 5
     fi
     if test -f $with_override_source_root/corba/makefiles/Makefile || \
-       test -f $with_override_source_root/corba/make/Makefile; then
-        as_fn_error $? "Your override source root seems to contain a full corba repo! An override source root should only contain sources that override." "$LINENO" 5
+      test -f $with_override_source_root/corba/make/Makefile; then
+      as_fn_error $? "Your override source root seems to contain a full corba repo! An override source root should only contain sources that override." "$LINENO" 5
     fi
     if test -f $with_override_source_root/jaxp/makefiles/Makefile || \
-       test -f $with_override_source_root/jaxp/make/Makefile; then
-        as_fn_error $? "Your override source root seems to contain a full jaxp repo! An override source root should only contain sources that override." "$LINENO" 5
+      test -f $with_override_source_root/jaxp/make/Makefile; then
+      as_fn_error $? "Your override source root seems to contain a full jaxp repo! An override source root should only contain sources that override." "$LINENO" 5
     fi
     if test -f $with_override_source_root/jaxws/makefiles/Makefile || \
-       test -f $with_override_source_root/jaxws/make/Makefile; then
-        as_fn_error $? "Your override source root seems to contain a full jaxws repo! An override source root should only contain sources that override." "$LINENO" 5
+      test -f $with_override_source_root/jaxws/make/Makefile; then
+      as_fn_error $? "Your override source root seems to contain a full jaxws repo! An override source root should only contain sources that override." "$LINENO" 5
     fi
     if test -f $with_override_source_root/hotspot/makefiles/Makefile || \
-       test -f $with_override_source_root/hotspot/make/Makefile; then
-        as_fn_error $? "Your override source root seems to contain a full hotspot repo! An override source root should only contain sources that override." "$LINENO" 5
+      test -f $with_override_source_root/hotspot/make/Makefile; then
+      as_fn_error $? "Your override source root seems to contain a full hotspot repo! An override source root should only contain sources that override." "$LINENO" 5
     fi
     if test -f $with_override_source_root/nashorn/makefiles/Makefile || \
-       test -f $with_override_source_root/nashorn/make/Makefile; then
-        as_fn_error $? "Your override source root seems to contain a full nashorn repo! An override source root should only contain sources that override." "$LINENO" 5
+      test -f $with_override_source_root/nashorn/make/Makefile; then
+      as_fn_error $? "Your override source root seems to contain a full nashorn repo! An override source root should only contain sources that override." "$LINENO" 5
     fi
     if test -f $with_override_source_root/jdk/makefiles/Makefile || \
-       test -f $with_override_source_root/jdk/make/Makefile; then
-        as_fn_error $? "Your override source root seems to contain a full JDK repo! An override source root should only contain sources that override." "$LINENO" 5
+      test -f $with_override_source_root/jdk/make/Makefile; then
+      as_fn_error $? "Your override source root seems to contain a full JDK repo! An override source root should only contain sources that override." "$LINENO" 5
     fi
-fi
+  fi
 
 
-###############################################################################
-#
-# Override a repo completely, this is used for example when you have 3 small
-# development sandboxes of the langtools sources and want to avoid having 3 full
-# OpenJDK sources checked out on disk.
-#
-# Assuming that the 3 langtools sandboxes are located here:
-# /home/fredrik/sandbox1/langtools
-# /home/fredrik/sandbox2/langtools
-# /home/fredrik/sandbox3/langtools
-#
-# From the source root you create build subdirs manually:
-#     mkdir -p build1 build2 build3
-# in each build directory run:
-#     (cd build1 && ../configure --with-override-langtools=/home/fredrik/sandbox1 && make)
-#     (cd build2 && ../configure --with-override-langtools=/home/fredrik/sandbox2 && make)
-#     (cd build3 && ../configure --with-override-langtools=/home/fredrik/sandbox3 && make)
-#
+  ###############################################################################
+  #
+  # Override a repo completely, this is used for example when you have 3 small
+  # development sandboxes of the langtools sources and want to avoid having 3 full
+  # OpenJDK sources checked out on disk.
+  #
+  # Assuming that the 3 langtools sandboxes are located here:
+  # /home/fredrik/sandbox1/langtools
+  # /home/fredrik/sandbox2/langtools
+  # /home/fredrik/sandbox3/langtools
+  #
+  # From the source root you create build subdirs manually:
+  #     mkdir -p build1 build2 build3
+  # in each build directory run:
+  #     (cd build1 && ../configure --with-override-langtools=/home/fredrik/sandbox1 && make)
+  #     (cd build2 && ../configure --with-override-langtools=/home/fredrik/sandbox2 && make)
+  #     (cd build3 && ../configure --with-override-langtools=/home/fredrik/sandbox3 && make)
+  #
 
 
 # Check whether --with-override-langtools was given.
@@ -16222,106 +16219,105 @@
 fi
 
 
-if test "x$with_override_langtools" != x; then
+  if test "x$with_override_langtools" != x; then
     CURDIR="$PWD"
     cd "$with_override_langtools"
     LANGTOOLS_TOPDIR="`pwd`"
     cd "$CURDIR"
     if ! test -f $LANGTOOLS_TOPDIR/makefiles/Makefile; then
-        as_fn_error $? "You have to override langtools with a full langtools repo!" "$LINENO" 5
+      as_fn_error $? "You have to override langtools with a full langtools repo!" "$LINENO" 5
     fi
     { $as_echo "$as_me:${as_lineno-$LINENO}: checking if langtools should be overridden" >&5
 $as_echo_n "checking if langtools should be overridden... " >&6; }
     { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes with $LANGTOOLS_TOPDIR" >&5
 $as_echo "yes with $LANGTOOLS_TOPDIR" >&6; }
-fi
-if test "x$with_override_corba" != x; then
+  fi
+  if test "x$with_override_corba" != x; then
     CURDIR="$PWD"
     cd "$with_override_corba"
     CORBA_TOPDIR="`pwd`"
     cd "$CURDIR"
     if ! test -f $CORBA_TOPDIR/makefiles/Makefile; then
-        as_fn_error $? "You have to override corba with a full corba repo!" "$LINENO" 5
+      as_fn_error $? "You have to override corba with a full corba repo!" "$LINENO" 5
     fi
     { $as_echo "$as_me:${as_lineno-$LINENO}: checking if corba should be overridden" >&5
 $as_echo_n "checking if corba should be overridden... " >&6; }
     { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes with $CORBA_TOPDIR" >&5
 $as_echo "yes with $CORBA_TOPDIR" >&6; }
-fi
-if test "x$with_override_jaxp" != x; then
+  fi
+  if test "x$with_override_jaxp" != x; then
     CURDIR="$PWD"
     cd "$with_override_jaxp"
     JAXP_TOPDIR="`pwd`"
     cd "$CURDIR"
     if ! test -f $JAXP_TOPDIR/makefiles/Makefile; then
-        as_fn_error $? "You have to override jaxp with a full jaxp repo!" "$LINENO" 5
+      as_fn_error $? "You have to override jaxp with a full jaxp repo!" "$LINENO" 5
     fi
     { $as_echo "$as_me:${as_lineno-$LINENO}: checking if jaxp should be overridden" >&5
 $as_echo_n "checking if jaxp should be overridden... " >&6; }
     { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes with $JAXP_TOPDIR" >&5
 $as_echo "yes with $JAXP_TOPDIR" >&6; }
-fi
-if test "x$with_override_jaxws" != x; then
+  fi
+  if test "x$with_override_jaxws" != x; then
     CURDIR="$PWD"
     cd "$with_override_jaxws"
     JAXWS_TOPDIR="`pwd`"
     cd "$CURDIR"
     if ! test -f $JAXWS_TOPDIR/makefiles/Makefile; then
-        as_fn_error $? "You have to override jaxws with a full jaxws repo!" "$LINENO" 5
+      as_fn_error $? "You have to override jaxws with a full jaxws repo!" "$LINENO" 5
     fi
     { $as_echo "$as_me:${as_lineno-$LINENO}: checking if jaxws should be overridden" >&5
 $as_echo_n "checking if jaxws should be overridden... " >&6; }
     { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes with $JAXWS_TOPDIR" >&5
 $as_echo "yes with $JAXWS_TOPDIR" >&6; }
-fi
-if test "x$with_override_hotspot" != x; then
+  fi
+  if test "x$with_override_hotspot" != x; then
     CURDIR="$PWD"
     cd "$with_override_hotspot"
     HOTSPOT_TOPDIR="`pwd`"
     cd "$CURDIR"
     if ! test -f $HOTSPOT_TOPDIR/make/Makefile && \
-       ! test -f $HOTSPOT_TOPDIR/makefiles/Makefile; then
-        as_fn_error $? "You have to override hotspot with a full hotspot repo!" "$LINENO" 5
+        ! test -f $HOTSPOT_TOPDIR/makefiles/Makefile; then
+      as_fn_error $? "You have to override hotspot with a full hotspot repo!" "$LINENO" 5
     fi
     { $as_echo "$as_me:${as_lineno-$LINENO}: checking if hotspot should be overridden" >&5
 $as_echo_n "checking if hotspot should be overridden... " >&6; }
     { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes with $HOTSPOT_TOPDIR" >&5
 $as_echo "yes with $HOTSPOT_TOPDIR" >&6; }
-fi
-if test "x$with_override_nashorn" != x; then
+  fi
+  if test "x$with_override_nashorn" != x; then
     CURDIR="$PWD"
     cd "$with_override_nashorn"
     NASHORN_TOPDIR="`pwd`"
     cd "$CURDIR"
     if ! test -f $NASHORN_TOPDIR/makefiles/Makefile; then
-        as_fn_error $? "You have to override nashorn with a full nashorn repo!" "$LINENO" 5
+      as_fn_error $? "You have to override nashorn with a full nashorn repo!" "$LINENO" 5
     fi
     { $as_echo "$as_me:${as_lineno-$LINENO}: checking if nashorn should be overridden" >&5
 $as_echo_n "checking if nashorn should be overridden... " >&6; }
     { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes with $NASHORN_TOPDIR" >&5
 $as_echo "yes with $NASHORN_TOPDIR" >&6; }
-fi
-if test "x$with_override_jdk" != x; then
+  fi
+  if test "x$with_override_jdk" != x; then
     CURDIR="$PWD"
     cd "$with_override_jdk"
     JDK_TOPDIR="`pwd`"
     cd "$CURDIR"
     if ! test -f $JDK_TOPDIR/makefiles/Makefile; then
-        as_fn_error $? "You have to override JDK with a full JDK repo!" "$LINENO" 5
+      as_fn_error $? "You have to override JDK with a full JDK repo!" "$LINENO" 5
     fi
     { $as_echo "$as_me:${as_lineno-$LINENO}: checking if JDK should be overridden" >&5
 $as_echo_n "checking if JDK should be overridden... " >&6; }
     { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes with $JDK_TOPDIR" >&5
 $as_echo "yes with $JDK_TOPDIR" >&6; }
-fi
+  fi
 
 
-
-BUILD_OUTPUT="$OUTPUT_ROOT"
+  BUILD_OUTPUT="$OUTPUT_ROOT"
 
 
-HOTSPOT_DIST="$OUTPUT_ROOT/hotspot/dist"
-BUILD_HOTSPOT=true
+  HOTSPOT_DIST="$OUTPUT_ROOT/hotspot/dist"
+  BUILD_HOTSPOT=true
 
 
 
@@ -16330,22 +16326,22 @@
   withval=$with_import_hotspot;
 fi
 
-if test "x$with_import_hotspot" != x; then
+  if test "x$with_import_hotspot" != x; then
     CURDIR="$PWD"
     cd "$with_import_hotspot"
     HOTSPOT_DIST="`pwd`"
     cd "$CURDIR"
     if ! (test -d $HOTSPOT_DIST/lib && test -d $HOTSPOT_DIST/jre/lib); then
-        as_fn_error $? "You have to import hotspot from a full jdk image or hotspot build dist dir!" "$LINENO" 5
+      as_fn_error $? "You have to import hotspot from a full jdk image or hotspot build dist dir!" "$LINENO" 5
     fi
     { $as_echo "$as_me:${as_lineno-$LINENO}: checking if hotspot should be imported" >&5
 $as_echo_n "checking if hotspot should be imported... " >&6; }
     { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes from $HOTSPOT_DIST" >&5
 $as_echo "yes from $HOTSPOT_DIST" >&6; }
     BUILD_HOTSPOT=false
-fi
+  fi
 
-JDK_OUTPUTDIR="$OUTPUT_ROOT/jdk"
+  JDK_OUTPUTDIR="$OUTPUT_ROOT/jdk"
 
 
 ###############################################################################
@@ -16356,26 +16352,26 @@
 ###############################################################################
 
 
-###############################################################################
-#
-# Configure the development tool paths and potential sysroot.
-#
-ac_ext=cpp
+  ###############################################################################
+  #
+  # Configure the development tool paths and potential sysroot.
+  #
+  ac_ext=cpp
 ac_cpp='$CXXCPP $CPPFLAGS'
 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
 
 
-# The option used to specify the target .o,.a or .so file.
-# When compiling, how to specify the to be created object file.
-CC_OUT_OPTION='-o$(SPACE)'
-# When linking, how to specify the to be created executable.
-EXE_OUT_OPTION='-o$(SPACE)'
-# When linking, how to specify the to be created dynamically linkable library.
-LD_OUT_OPTION='-o$(SPACE)'
-# When archiving, how to specify the to be create static archive for object files.
-AR_OUT_OPTION='rcs$(SPACE)'
+  # The option used to specify the target .o,.a or .so file.
+  # When compiling, how to specify the to be created object file.
+  CC_OUT_OPTION='-o$(SPACE)'
+  # When linking, how to specify the to be created executable.
+  EXE_OUT_OPTION='-o$(SPACE)'
+  # When linking, how to specify the to be created dynamically linkable library.
+  LD_OUT_OPTION='-o$(SPACE)'
+  # When archiving, how to specify the to be create static archive for object files.
+  AR_OUT_OPTION='rcs$(SPACE)'
 
 
 
@@ -16544,7 +16540,7 @@
     else
       # try to find jtreg on path
 
-    for ac_prog in jtreg
+  for ac_prog in jtreg
 do
   # Extract the first word of "$ac_prog", so it can be a program name with args.
 set dummy $ac_prog; ac_word=$2
@@ -16590,16 +16586,16 @@
 done
 
 
-    if test "x$JTREGEXE" = x; then
-        if test "xjtreg" = x; then
-          PROG_NAME=jtregexe
-        else
-          PROG_NAME=jtreg
-        fi
-        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
-$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
-        as_fn_error $? "Cannot continue" "$LINENO" 5
+  if test "x$JTREGEXE" = x; then
+    if test "xjtreg" = x; then
+      PROG_NAME=jtregexe
+    else
+      PROG_NAME=jtreg
     fi
+    { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
+$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
+    as_fn_error $? "Cannot continue" "$LINENO" 5
+  fi
 
 
       JT_HOME="`$DIRNAME $JTREGEXE`"
@@ -16610,7 +16606,7 @@
 
 
 
-if test "x$OPENJDK_TARGET_OS" = "xwindows"; then
+  if test "x$OPENJDK_TARGET_OS" = "xwindows"; then
 
   # Store path to cygwin link.exe to help excluding it when searching for
   # VS linker. This must be done before changing the PATH when looking for VS.
@@ -17065,8 +17061,8 @@
   # bat and cmd files are not always considered executable in cygwin causing which
   # to not find them
   if test "x$new_path" = x \
-           && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
-           && test "x`$LS \"$path\" 2>/dev/null`" != x; then
+      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
+      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
     new_path=`$CYGPATH -u "$path"`
   fi
   if test "x$new_path" = x; then
@@ -17081,8 +17077,8 @@
     # bat and cmd files are not always considered executable in cygwin causing which
     # to not find them
     if test "x$new_path" = x \
-             && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
-             && test "x`$LS \"$path\" 2>/dev/null`" != x; then
+        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
+        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
       new_path=`$CYGPATH -u "$path"`
     fi
     if test "x$new_path" = x; then
@@ -17110,9 +17106,9 @@
     # Short path failed, file does not exist as specified.
     # Try adding .exe or .cmd
     if test -f "${new_path}.exe"; then
-       input_to_shortpath="${new_path}.exe"
+      input_to_shortpath="${new_path}.exe"
     elif test -f "${new_path}.cmd"; then
-       input_to_shortpath="${new_path}.cmd"
+      input_to_shortpath="${new_path}.cmd"
     else
       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of VS_ENV_CMD, which resolves as \"$new_path\", is invalid." >&5
 $as_echo "$as_me: The path of VS_ENV_CMD, which resolves as \"$new_path\", is invalid." >&6;}
@@ -17288,29 +17284,29 @@
     fi
 
     if test "x$new_path" = x; then
-        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of VS_ENV_CMD, which resolves as \"$complete\", is not found." >&5
+      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of VS_ENV_CMD, which resolves as \"$complete\", is not found." >&5
 $as_echo "$as_me: The path of VS_ENV_CMD, which resolves as \"$complete\", is not found." >&6;}
-        has_space=`$ECHO "$complete" | $GREP " "`
-        if test "x$has_space" != x; then
-          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
+      has_space=`$ECHO "$complete" | $GREP " "`
+      if test "x$has_space" != x; then
+        { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
 $as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
-        fi
-        as_fn_error $? "Cannot locate the the path of VS_ENV_CMD" "$LINENO" 5
       fi
+      as_fn_error $? "Cannot locate the the path of VS_ENV_CMD" "$LINENO" 5
+    fi
   fi
 
-      # Now join together the path and the arguments once again
-      if test "x$arguments" != xEOL; then
-        new_complete="$new_path ${arguments% *}"
-      else
-        new_complete="$new_path"
-      fi
+  # Now join together the path and the arguments once again
+  if test "x$arguments" != xEOL; then
+    new_complete="$new_path ${arguments% *}"
+  else
+    new_complete="$new_path"
+  fi
 
   if test "x$complete" != "x$new_complete"; then
-      VS_ENV_CMD="$new_complete"
-      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting VS_ENV_CMD to \"$new_complete\"" >&5
+    VS_ENV_CMD="$new_complete"
+    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting VS_ENV_CMD to \"$new_complete\"" >&5
 $as_echo "$as_me: Rewriting VS_ENV_CMD to \"$new_complete\"" >&6;}
-    fi
+  fi
 
 
     # Lets extract the variables that are set by vcvarsall.bat/vsvars32.bat/vsvars64.bat
@@ -17626,21 +17622,21 @@
 fi
 
 
-fi
+  fi
 
 
 
-# If --build AND --host is set, then the configure script will find any
-# cross compilation tools in the PATH. Cross compilation tools
-# follows the cross compilation standard where they are prefixed with ${host}.
-# For example the binary i686-sun-solaris2.10-gcc
-# will cross compile for i686-sun-solaris2.10
-# If neither of build and host is not set, then build=host and the
-# default compiler found in the path will be used.
-# Setting only --host, does not seem to be really supported.
-# Please set both --build and --host if you want to cross compile.
+  # If --build AND --host is set, then the configure script will find any
+  # cross compilation tools in the PATH. Cross compilation tools
+  # follows the cross compilation standard where they are prefixed with ${host}.
+  # For example the binary i686-sun-solaris2.10-gcc
+  # will cross compile for i686-sun-solaris2.10
+  # If neither of build and host is not set, then build=host and the
+  # default compiler found in the path will be used.
+  # Setting only --host, does not seem to be really supported.
+  # Please set both --build and --host if you want to cross compile.
 
-if test "x$COMPILE_TYPE" = "xcross"; then
+  if test "x$COMPILE_TYPE" = "xcross"; then
     # Now we to find a C/C++ compiler that can build executables for the build
     # platform. We can't use the AC_PROG_CC macro, since it can only be used
     # once. Also, we need to do this before adding a tools dir to the path,
@@ -17711,8 +17707,8 @@
   # bat and cmd files are not always considered executable in cygwin causing which
   # to not find them
   if test "x$new_path" = x \
-           && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
-           && test "x`$LS \"$path\" 2>/dev/null`" != x; then
+      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
+      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
     new_path=`$CYGPATH -u "$path"`
   fi
   if test "x$new_path" = x; then
@@ -17727,8 +17723,8 @@
     # bat and cmd files are not always considered executable in cygwin causing which
     # to not find them
     if test "x$new_path" = x \
-             && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
-             && test "x`$LS \"$path\" 2>/dev/null`" != x; then
+        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
+        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
       new_path=`$CYGPATH -u "$path"`
     fi
     if test "x$new_path" = x; then
@@ -17756,9 +17752,9 @@
     # Short path failed, file does not exist as specified.
     # Try adding .exe or .cmd
     if test -f "${new_path}.exe"; then
-       input_to_shortpath="${new_path}.exe"
+      input_to_shortpath="${new_path}.exe"
     elif test -f "${new_path}.cmd"; then
-       input_to_shortpath="${new_path}.cmd"
+      input_to_shortpath="${new_path}.cmd"
     else
       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_CC, which resolves as \"$new_path\", is invalid." >&5
 $as_echo "$as_me: The path of BUILD_CC, which resolves as \"$new_path\", is invalid." >&6;}
@@ -17934,29 +17930,29 @@
     fi
 
     if test "x$new_path" = x; then
-        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_CC, which resolves as \"$complete\", is not found." >&5
+      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_CC, which resolves as \"$complete\", is not found." >&5
 $as_echo "$as_me: The path of BUILD_CC, which resolves as \"$complete\", is not found." >&6;}
-        has_space=`$ECHO "$complete" | $GREP " "`
-        if test "x$has_space" != x; then
-          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
+      has_space=`$ECHO "$complete" | $GREP " "`
+      if test "x$has_space" != x; then
+        { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
 $as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
-        fi
-        as_fn_error $? "Cannot locate the the path of BUILD_CC" "$LINENO" 5
       fi
+      as_fn_error $? "Cannot locate the the path of BUILD_CC" "$LINENO" 5
+    fi
   fi
 
-      # Now join together the path and the arguments once again
-      if test "x$arguments" != xEOL; then
-        new_complete="$new_path ${arguments% *}"
-      else
-        new_complete="$new_path"
-      fi
+  # Now join together the path and the arguments once again
+  if test "x$arguments" != xEOL; then
+    new_complete="$new_path ${arguments% *}"
+  else
+    new_complete="$new_path"
+  fi
 
   if test "x$complete" != "x$new_complete"; then
-      BUILD_CC="$new_complete"
-      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BUILD_CC to \"$new_complete\"" >&5
+    BUILD_CC="$new_complete"
+    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BUILD_CC to \"$new_complete\"" >&5
 $as_echo "$as_me: Rewriting BUILD_CC to \"$new_complete\"" >&6;}
-    fi
+  fi
 
     for ac_prog in cl CC g++
 do
@@ -18022,8 +18018,8 @@
   # bat and cmd files are not always considered executable in cygwin causing which
   # to not find them
   if test "x$new_path" = x \
-           && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
-           && test "x`$LS \"$path\" 2>/dev/null`" != x; then
+      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
+      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
     new_path=`$CYGPATH -u "$path"`
   fi
   if test "x$new_path" = x; then
@@ -18038,8 +18034,8 @@
     # bat and cmd files are not always considered executable in cygwin causing which
     # to not find them
     if test "x$new_path" = x \
-             && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
-             && test "x`$LS \"$path\" 2>/dev/null`" != x; then
+        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
+        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
       new_path=`$CYGPATH -u "$path"`
     fi
     if test "x$new_path" = x; then
@@ -18067,9 +18063,9 @@
     # Short path failed, file does not exist as specified.
     # Try adding .exe or .cmd
     if test -f "${new_path}.exe"; then
-       input_to_shortpath="${new_path}.exe"
+      input_to_shortpath="${new_path}.exe"
     elif test -f "${new_path}.cmd"; then
-       input_to_shortpath="${new_path}.cmd"
+      input_to_shortpath="${new_path}.cmd"
     else
       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_CXX, which resolves as \"$new_path\", is invalid." >&5
 $as_echo "$as_me: The path of BUILD_CXX, which resolves as \"$new_path\", is invalid." >&6;}
@@ -18245,29 +18241,29 @@
     fi
 
     if test "x$new_path" = x; then
-        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_CXX, which resolves as \"$complete\", is not found." >&5
+      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_CXX, which resolves as \"$complete\", is not found." >&5
 $as_echo "$as_me: The path of BUILD_CXX, which resolves as \"$complete\", is not found." >&6;}
-        has_space=`$ECHO "$complete" | $GREP " "`
-        if test "x$has_space" != x; then
-          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
+      has_space=`$ECHO "$complete" | $GREP " "`
+      if test "x$has_space" != x; then
+        { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
 $as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
-        fi
-        as_fn_error $? "Cannot locate the the path of BUILD_CXX" "$LINENO" 5
       fi
+      as_fn_error $? "Cannot locate the the path of BUILD_CXX" "$LINENO" 5
+    fi
   fi
 
-      # Now join together the path and the arguments once again
-      if test "x$arguments" != xEOL; then
-        new_complete="$new_path ${arguments% *}"
-      else
-        new_complete="$new_path"
-      fi
+  # Now join together the path and the arguments once again
+  if test "x$arguments" != xEOL; then
+    new_complete="$new_path ${arguments% *}"
+  else
+    new_complete="$new_path"
+  fi
 
   if test "x$complete" != "x$new_complete"; then
-      BUILD_CXX="$new_complete"
-      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BUILD_CXX to \"$new_complete\"" >&5
+    BUILD_CXX="$new_complete"
+    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BUILD_CXX to \"$new_complete\"" >&5
 $as_echo "$as_me: Rewriting BUILD_CXX to \"$new_complete\"" >&6;}
-    fi
+  fi
 
     # Extract the first word of "ld", so it can be a program name with args.
 set dummy ld; ac_word=$2
@@ -18328,8 +18324,8 @@
   # bat and cmd files are not always considered executable in cygwin causing which
   # to not find them
   if test "x$new_path" = x \
-           && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
-           && test "x`$LS \"$path\" 2>/dev/null`" != x; then
+      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
+      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
     new_path=`$CYGPATH -u "$path"`
   fi
   if test "x$new_path" = x; then
@@ -18344,8 +18340,8 @@
     # bat and cmd files are not always considered executable in cygwin causing which
     # to not find them
     if test "x$new_path" = x \
-             && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
-             && test "x`$LS \"$path\" 2>/dev/null`" != x; then
+        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
+        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
       new_path=`$CYGPATH -u "$path"`
     fi
     if test "x$new_path" = x; then
@@ -18373,9 +18369,9 @@
     # Short path failed, file does not exist as specified.
     # Try adding .exe or .cmd
     if test -f "${new_path}.exe"; then
-       input_to_shortpath="${new_path}.exe"
+      input_to_shortpath="${new_path}.exe"
     elif test -f "${new_path}.cmd"; then
-       input_to_shortpath="${new_path}.cmd"
+      input_to_shortpath="${new_path}.cmd"
     else
       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_LD, which resolves as \"$new_path\", is invalid." >&5
 $as_echo "$as_me: The path of BUILD_LD, which resolves as \"$new_path\", is invalid." >&6;}
@@ -18551,219 +18547,220 @@
     fi
 
     if test "x$new_path" = x; then
-        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_LD, which resolves as \"$complete\", is not found." >&5
+      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_LD, which resolves as \"$complete\", is not found." >&5
 $as_echo "$as_me: The path of BUILD_LD, which resolves as \"$complete\", is not found." >&6;}
-        has_space=`$ECHO "$complete" | $GREP " "`
-        if test "x$has_space" != x; then
-          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
+      has_space=`$ECHO "$complete" | $GREP " "`
+      if test "x$has_space" != x; then
+        { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
 $as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
-        fi
-        as_fn_error $? "Cannot locate the the path of BUILD_LD" "$LINENO" 5
       fi
+      as_fn_error $? "Cannot locate the the path of BUILD_LD" "$LINENO" 5
+    fi
   fi
 
-      # Now join together the path and the arguments once again
-      if test "x$arguments" != xEOL; then
-        new_complete="$new_path ${arguments% *}"
-      else
-        new_complete="$new_path"
-      fi
+  # Now join together the path and the arguments once again
+  if test "x$arguments" != xEOL; then
+    new_complete="$new_path ${arguments% *}"
+  else
+    new_complete="$new_path"
+  fi
 
   if test "x$complete" != "x$new_complete"; then
-      BUILD_LD="$new_complete"
-      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BUILD_LD to \"$new_complete\"" >&5
+    BUILD_LD="$new_complete"
+    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BUILD_LD to \"$new_complete\"" >&5
 $as_echo "$as_me: Rewriting BUILD_LD to \"$new_complete\"" >&6;}
+  fi
+
+  fi
+
+
+
+
+  # If a devkit is found on the builddeps server, then prepend its path to the
+  # PATH variable. If there are cross compilers available in the devkit, these
+  # will be found by AC_PROG_CC et al.
+  DEVKIT=
+
+
+  if test "x$with_builddeps_server" != x || test "x$with_builddeps_conf" != x; then
+    # Source the builddeps file again, to make sure it uses the latest variables!
+    . $builddepsfile
+    # Look for a target and build machine specific resource!
+    eval resource=\${builddep_devkit_BUILD_${rewritten_build_var}_TARGET_${rewritten_target_var}}
+    if test "x$resource" = x; then
+      # Ok, lets instead look for a target specific resource
+      eval resource=\${builddep_devkit_TARGET_${rewritten_target_var}}
     fi
-
-fi
-
-
-
-
-# If a devkit is found on the builddeps server, then prepend its path to the
-# PATH variable. If there are cross compilers available in the devkit, these
-# will be found by AC_PROG_CC et al.
-DEVKIT=
-
-
-    if test "x$with_builddeps_server" != x || test "x$with_builddeps_conf" != x; then
-        # Source the builddeps file again, to make sure it uses the latest variables!
-        . $builddepsfile
-        # Look for a target and build machine specific resource!
-        eval resource=\${builddep_devkit_BUILD_${rewritten_build_var}_TARGET_${rewritten_target_var}}
-        if test "x$resource" = x; then
-            # Ok, lets instead look for a target specific resource
-            eval resource=\${builddep_devkit_TARGET_${rewritten_target_var}}
-        fi
-        if test "x$resource" = x; then
-            # Ok, lets instead look for a build specific resource
-            eval resource=\${builddep_devkit_BUILD_${rewritten_build_var}}
-        fi
-        if test "x$resource" = x; then
-            # Ok, lets instead look for a generic resource
-            # (The devkit comes from M4 and not the shell, thus no need for eval here.)
-            resource=${builddep_devkit}
-        fi
-        if test "x$resource" != x; then
-            { $as_echo "$as_me:${as_lineno-$LINENO}: Using builddeps $resource for devkit" >&5
+    if test "x$resource" = x; then
+      # Ok, lets instead look for a build specific resource
+      eval resource=\${builddep_devkit_BUILD_${rewritten_build_var}}
+    fi
+    if test "x$resource" = x; then
+      # Ok, lets instead look for a generic resource
+      # (The devkit comes from M4 and not the shell, thus no need for eval here.)
+      resource=${builddep_devkit}
+    fi
+    if test "x$resource" != x; then
+      { $as_echo "$as_me:${as_lineno-$LINENO}: Using builddeps $resource for devkit" >&5
 $as_echo "$as_me: Using builddeps $resource for devkit" >&6;}
-	    # If the resource in the builddeps.conf file is an existing directory,
-	    # for example /java/linux/cups
-	    if test -d ${resource}; then
-	       depdir=${resource}
-	    else
+      # If the resource in the builddeps.conf file is an existing directory,
+      # for example /java/linux/cups
+      if test -d ${resource}; then
+        depdir=${resource}
+      else
 
-# devkit is for example mymodule
-# $resource is for example libs/general/libmymod_1_2_3.zip
-# $with_builddeps_server is for example ftp://mybuilddeps.myserver.com/builddeps
-# $with_builddeps_dir is for example /localhome/builddeps
-# depdir is the name of the variable into which we store the depdir, eg MYMOD
-# Will download ftp://mybuilddeps.myserver.com/builddeps/libs/general/libmymod_1_2_3.zip and
-# unzip into the directory: /localhome/builddeps/libmymod_1_2_3
-    filename=`basename $resource`
-    filebase=`echo $filename | sed 's/\.[^\.]*$//'`
-    filebase=${filename%%.*}
-    extension=${filename#*.}
-    installdir=$with_builddeps_dir/$filebase
-    if test ! -f $installdir/$filename.unpacked; then
-        { $as_echo "$as_me:${as_lineno-$LINENO}: Downloading build dependency devkit from $with_builddeps_server/$resource and installing into $installdir" >&5
+  # devkit is for example mymodule
+  # $resource is for example libs/general/libmymod_1_2_3.zip
+  # $with_builddeps_server is for example ftp://mybuilddeps.myserver.com/builddeps
+  # $with_builddeps_dir is for example /localhome/builddeps
+  # depdir is the name of the variable into which we store the depdir, eg MYMOD
+  # Will download ftp://mybuilddeps.myserver.com/builddeps/libs/general/libmymod_1_2_3.zip and
+  # unzip into the directory: /localhome/builddeps/libmymod_1_2_3
+  filename=`basename $resource`
+  filebase=`echo $filename | sed 's/\.[^\.]*$//'`
+  filebase=${filename%%.*}
+  extension=${filename#*.}
+  installdir=$with_builddeps_dir/$filebase
+  if test ! -f $installdir/$filename.unpacked; then
+    { $as_echo "$as_me:${as_lineno-$LINENO}: Downloading build dependency devkit from $with_builddeps_server/$resource and installing into $installdir" >&5
 $as_echo "$as_me: Downloading build dependency devkit from $with_builddeps_server/$resource and installing into $installdir" >&6;}
-        if test ! -d $installdir; then
-            mkdir -p $installdir
+    if test ! -d $installdir; then
+      mkdir -p $installdir
+    fi
+    if test ! -d $installdir; then
+      as_fn_error $? "Could not create directory $installdir" "$LINENO" 5
+    fi
+    tmpfile=`mktemp $installdir/devkit.XXXXXXXXX`
+    touch $tmpfile
+    if test ! -f $tmpfile; then
+      as_fn_error $? "Could not create files in directory $installdir" "$LINENO" 5
+    fi
+
+  # $with_builddeps_server/$resource  is the ftp://abuilddeps.server.com/libs/cups.zip
+  # $tmpfile is the local file name for the downloaded file.
+  VALID_TOOL=no
+  if test "x$BDEPS_FTP" = xwget; then
+    VALID_TOOL=yes
+    wget -O $tmpfile $with_builddeps_server/$resource
+  fi
+  if test "x$BDEPS_FTP" = xlftp; then
+    VALID_TOOL=yes
+    lftp -c "get $with_builddeps_server/$resource  -o $tmpfile"
+  fi
+  if test "x$BDEPS_FTP" = xftp; then
+    VALID_TOOL=yes
+    FTPSERVER=`echo $with_builddeps_server/$resource  | cut -f 3 -d '/'`
+    FTPPATH=`echo $with_builddeps_server/$resource  | cut -f 4- -d '/'`
+    FTPUSERPWD=${FTPSERVER%%@*}
+    if test "x$FTPSERVER" != "x$FTPUSERPWD"; then
+      FTPUSER=${userpwd%%:*}
+      FTPPWD=${userpwd#*@}
+      FTPSERVER=${FTPSERVER#*@}
+    else
+      FTPUSER=ftp
+      FTPPWD=ftp
+    fi
+    # the "pass" command does not work on some
+    # ftp clients (read ftp.exe) but if it works,
+    # passive mode is better!
+    ( \
+        echo "user $FTPUSER $FTPPWD"        ; \
+        echo "pass"                         ; \
+        echo "bin"                          ; \
+        echo "get $FTPPATH $tmpfile"              ; \
+    ) | ftp -in $FTPSERVER
+  fi
+  if test "x$VALID_TOOL" != xyes; then
+    as_fn_error $? "I do not know how to use the tool: $BDEPS_FTP" "$LINENO" 5
+  fi
+
+    mv $tmpfile $installdir/$filename
+    if test ! -s $installdir/$filename; then
+      as_fn_error $? "Could not download $with_builddeps_server/$resource" "$LINENO" 5
+    fi
+    case "$extension" in
+      zip)  echo "Unzipping $installdir/$filename..."
+        (cd $installdir ; rm -f $installdir/$filename.unpacked ; $BDEPS_UNZIP $installdir/$filename > /dev/null && touch $installdir/$filename.unpacked)
+        ;;
+      tar.gz) echo "Untaring $installdir/$filename..."
+        (cd $installdir ; rm -f $installdir/$filename.unpacked ; tar xzf $installdir/$filename && touch $installdir/$filename.unpacked)
+        ;;
+      tgz) echo "Untaring $installdir/$filename..."
+        (cd $installdir ; rm -f $installdir/$filename.unpacked ; tar xzf $installdir/$filename && touch $installdir/$filename.unpacked)
+        ;;
+      *) as_fn_error $? "Cannot handle build depency archive with extension $extension" "$LINENO" 5
+        ;;
+    esac
+  fi
+  if test -f $installdir/$filename.unpacked; then
+    depdir=$installdir
+  fi
+
+      fi
+      # Source the builddeps file again, because in the previous command, the depdir
+      # was updated to point at the current build dependency install directory.
+      . $builddepsfile
+      # Now extract variables from the builddeps.conf files.
+      theroot=${builddep_devkit_ROOT}
+      thecflags=${builddep_devkit_CFLAGS}
+      thelibs=${builddep_devkit_LIBS}
+      if test "x$depdir" = x; then
+        as_fn_error $? "Could not download build dependency devkit" "$LINENO" 5
+      fi
+      DEVKIT=$depdir
+      if test "x$theroot" != x; then
+        DEVKIT="$theroot"
+      fi
+      if test "x$thecflags" != x; then
+        DEVKIT_CFLAGS="$thecflags"
+      fi
+      if test "x$thelibs" != x; then
+        DEVKIT_LIBS="$thelibs"
+      fi
+
+        # Found devkit
+        PATH="$DEVKIT/bin:$PATH"
+        SYS_ROOT="$DEVKIT/${rewritten_target}/sys-root"
+        if test "x$x_includes" = "xNONE"; then
+          x_includes="$SYS_ROOT/usr/include/X11"
         fi
-        if test ! -d $installdir; then
-            as_fn_error $? "Could not create directory $installdir" "$LINENO" 5
-        fi
-        tmpfile=`mktemp $installdir/devkit.XXXXXXXXX`
-        touch $tmpfile
-        if test ! -f $tmpfile; then
-            as_fn_error $? "Could not create files in directory $installdir" "$LINENO" 5
+        if test "x$x_libraries" = "xNONE"; then
+          x_libraries="$SYS_ROOT/usr/lib"
         fi
 
-    # $with_builddeps_server/$resource  is the ftp://abuilddeps.server.com/libs/cups.zip
-    # $tmpfile is the local file name for the downloaded file.
-    VALID_TOOL=no
-    if test "x$BDEPS_FTP" = xwget; then
-       VALID_TOOL=yes
-       wget -O $tmpfile $with_builddeps_server/$resource
-    fi
-    if test "x$BDEPS_FTP" = xlftp; then
-       VALID_TOOL=yes
-       lftp -c "get $with_builddeps_server/$resource  -o $tmpfile"
-    fi
-    if test "x$BDEPS_FTP" = xftp; then
-        VALID_TOOL=yes
-        FTPSERVER=`echo $with_builddeps_server/$resource  | cut -f 3 -d '/'`
-        FTPPATH=`echo $with_builddeps_server/$resource  | cut -f 4- -d '/'`
-        FTPUSERPWD=${FTPSERVER%%@*}
-        if test "x$FTPSERVER" != "x$FTPUSERPWD"; then
-            FTPUSER=${userpwd%%:*}
-            FTPPWD=${userpwd#*@}
-            FTPSERVER=${FTPSERVER#*@}
-        else
-            FTPUSER=ftp
-            FTPPWD=ftp
-        fi
-        # the "pass" command does not work on some
-        # ftp clients (read ftp.exe) but if it works,
-        # passive mode is better!
-        (\
-            echo "user $FTPUSER $FTPPWD"        ;\
-            echo "pass"                         ;\
-            echo "bin"                          ;\
-            echo "get $FTPPATH $tmpfile"              ;\
-        ) | ftp -in $FTPSERVER
-    fi
-    if test "x$VALID_TOOL" != xyes; then
-       as_fn_error $? "I do not know how to use the tool: $BDEPS_FTP" "$LINENO" 5
-    fi
-
-        mv $tmpfile $installdir/$filename
-        if test ! -s $installdir/$filename; then
-            as_fn_error $? "Could not download $with_builddeps_server/$resource" "$LINENO" 5
-        fi
-        case "$extension" in
-            zip)  echo "Unzipping $installdir/$filename..."
-               (cd $installdir ; rm -f $installdir/$filename.unpacked ; $BDEPS_UNZIP $installdir/$filename > /dev/null && touch $installdir/$filename.unpacked)
-            ;;
-            tar.gz) echo "Untaring $installdir/$filename..."
-               (cd $installdir ; rm -f $installdir/$filename.unpacked ; tar xzf $installdir/$filename && touch $installdir/$filename.unpacked)
-            ;;
-            tgz) echo "Untaring $installdir/$filename..."
-               (cd $installdir ; rm -f $installdir/$filename.unpacked ; tar xzf $installdir/$filename && touch $installdir/$filename.unpacked)
-            ;;
-            *) as_fn_error $? "Cannot handle build depency archive with extension $extension" "$LINENO" 5
-            ;;
-        esac
-    fi
-    if test -f $installdir/$filename.unpacked; then
-        depdir=$installdir
-    fi
-
-	    fi
-            # Source the builddeps file again, because in the previous command, the depdir
-            # was updated to point at the current build dependency install directory.
-            . $builddepsfile
-            # Now extract variables from the builddeps.conf files.
-            theroot=${builddep_devkit_ROOT}
-            thecflags=${builddep_devkit_CFLAGS}
-            thelibs=${builddep_devkit_LIBS}
-            if test "x$depdir" = x; then
-                as_fn_error $? "Could not download build dependency devkit" "$LINENO" 5
-            fi
-            DEVKIT=$depdir
-            if test "x$theroot" != x; then
-               DEVKIT="$theroot"
-            fi
-            if test "x$thecflags" != x; then
-               DEVKIT_CFLAGS="$thecflags"
-            fi
-            if test "x$thelibs" != x; then
-               DEVKIT_LIBS="$thelibs"
-            fi
-            # Found devkit
-                     PATH="$DEVKIT/bin:$PATH"
-                     SYS_ROOT="$DEVKIT/${rewritten_target}/sys-root"
-                     if test "x$x_includes" = "xNONE"; then
-                         x_includes="$SYS_ROOT/usr/include/X11"
-                     fi
-                     if test "x$x_libraries" = "xNONE"; then
-                         x_libraries="$SYS_ROOT/usr/lib"
-                     fi
-
-
-        fi
 
     fi
 
-
-# Store the CFLAGS etal passed to the configure script.
-ORG_CFLAGS="$CFLAGS"
-ORG_CXXFLAGS="$CXXFLAGS"
-ORG_OBJCFLAGS="$OBJCFLAGS"
-
-# autoconf magic only relies on PATH, so update it if tools dir is specified
-OLD_PATH="$PATH"
-if test "x$TOOLS_DIR" != x; then
-  PATH=$TOOLS_DIR:$PATH
-fi
+  fi
 
 
-### Locate C compiler (CC)
+  # Store the CFLAGS etal passed to the configure script.
+  ORG_CFLAGS="$CFLAGS"
+  ORG_CXXFLAGS="$CXXFLAGS"
+  ORG_OBJCFLAGS="$OBJCFLAGS"
 
-# On windows, only cl.exe is supported.
-# On Solaris, cc is preferred to gcc.
-# Elsewhere, gcc is preferred to cc.
+  # autoconf magic only relies on PATH, so update it if tools dir is specified
+  OLD_PATH="$PATH"
+  if test "x$TOOLS_DIR" != x; then
+    PATH=$TOOLS_DIR:$PATH
+  fi
 
-if test "x$CC" != x; then
-  COMPILER_CHECK_LIST="$CC"
-elif test "x$OPENJDK_TARGET_OS" = "xwindows"; then
-  COMPILER_CHECK_LIST="cl"
-elif test "x$OPENJDK_TARGET_OS" = "xsolaris"; then
-  COMPILER_CHECK_LIST="cc gcc"
-else
-  COMPILER_CHECK_LIST="gcc cc"
-fi
+
+  ### Locate C compiler (CC)
+
+  # On windows, only cl.exe is supported.
+  # On Solaris, cc is preferred to gcc.
+  # Elsewhere, gcc is preferred to cc.
+
+  if test "x$CC" != x; then
+    COMPILER_CHECK_LIST="$CC"
+  elif test "x$OPENJDK_TARGET_OS" = "xwindows"; then
+    COMPILER_CHECK_LIST="cl"
+  elif test "x$OPENJDK_TARGET_OS" = "xsolaris"; then
+    COMPILER_CHECK_LIST="cc gcc"
+  else
+    COMPILER_CHECK_LIST="gcc cc"
+  fi
 
 
   COMPILER_NAME=C
@@ -18876,31 +18873,31 @@
 
   if test "x$CC" = x; then
 
-    # Print a helpful message on how to acquire the necessary build dependency.
-    # devkit is the help tag: freetyp2, cups, pulse, alsa etc
-    MISSING_DEPENDENCY=devkit
-    PKGHANDLER_COMMAND=
+  # Print a helpful message on how to acquire the necessary build dependency.
+  # devkit is the help tag: freetyp2, cups, pulse, alsa etc
+  MISSING_DEPENDENCY=devkit
+  PKGHANDLER_COMMAND=
 
-    case $PKGHANDLER in
-	apt-get)
-                apt_help     $MISSING_DEPENDENCY ;;
+  case $PKGHANDLER in
+    apt-get)
+      apt_help     $MISSING_DEPENDENCY ;;
     yum)
-                yum_help     $MISSING_DEPENDENCY ;;
-	port)
-                port_help    $MISSING_DEPENDENCY ;;
-	pkgutil)
-                pkgutil_help $MISSING_DEPENDENCY ;;
-	pkgadd)
-                pkgadd_help  $MISSING_DEPENDENCY ;;
+      yum_help     $MISSING_DEPENDENCY ;;
+    port)
+      port_help    $MISSING_DEPENDENCY ;;
+    pkgutil)
+      pkgutil_help $MISSING_DEPENDENCY ;;
+    pkgadd)
+      pkgadd_help  $MISSING_DEPENDENCY ;;
     * )
       break ;;
-    esac
+  esac
 
-    if test "x$PKGHANDLER_COMMAND" != x; then
-        HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
-    fi
+  if test "x$PKGHANDLER_COMMAND" != x; then
+    HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
+  fi
 
-      as_fn_error $? "Could not find a $COMPILER_NAME compiler. $HELP_MSG" "$LINENO" 5
+    as_fn_error $? "Could not find a $COMPILER_NAME compiler. $HELP_MSG" "$LINENO" 5
   fi
 
   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
@@ -18921,8 +18918,8 @@
   # bat and cmd files are not always considered executable in cygwin causing which
   # to not find them
   if test "x$new_path" = x \
-           && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
-           && test "x`$LS \"$path\" 2>/dev/null`" != x; then
+      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
+      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
     new_path=`$CYGPATH -u "$path"`
   fi
   if test "x$new_path" = x; then
@@ -18937,8 +18934,8 @@
     # bat and cmd files are not always considered executable in cygwin causing which
     # to not find them
     if test "x$new_path" = x \
-             && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
-             && test "x`$LS \"$path\" 2>/dev/null`" != x; then
+        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
+        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
       new_path=`$CYGPATH -u "$path"`
     fi
     if test "x$new_path" = x; then
@@ -18966,9 +18963,9 @@
     # Short path failed, file does not exist as specified.
     # Try adding .exe or .cmd
     if test -f "${new_path}.exe"; then
-       input_to_shortpath="${new_path}.exe"
+      input_to_shortpath="${new_path}.exe"
     elif test -f "${new_path}.cmd"; then
-       input_to_shortpath="${new_path}.cmd"
+      input_to_shortpath="${new_path}.cmd"
     else
       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CC, which resolves as \"$new_path\", is invalid." >&5
 $as_echo "$as_me: The path of CC, which resolves as \"$new_path\", is invalid." >&6;}
@@ -19144,81 +19141,81 @@
     fi
 
     if test "x$new_path" = x; then
-        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CC, which resolves as \"$complete\", is not found." >&5
+      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CC, which resolves as \"$complete\", is not found." >&5
 $as_echo "$as_me: The path of CC, which resolves as \"$complete\", is not found." >&6;}
-        has_space=`$ECHO "$complete" | $GREP " "`
-        if test "x$has_space" != x; then
-          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
+      has_space=`$ECHO "$complete" | $GREP " "`
+      if test "x$has_space" != x; then
+        { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
 $as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
-        fi
-        as_fn_error $? "Cannot locate the the path of CC" "$LINENO" 5
       fi
+      as_fn_error $? "Cannot locate the the path of CC" "$LINENO" 5
+    fi
   fi
 
-      # Now join together the path and the arguments once again
-      if test "x$arguments" != xEOL; then
-        new_complete="$new_path ${arguments% *}"
-      else
-        new_complete="$new_path"
-      fi
+  # Now join together the path and the arguments once again
+  if test "x$arguments" != xEOL; then
+    new_complete="$new_path ${arguments% *}"
+  else
+    new_complete="$new_path"
+  fi
 
   if test "x$complete" != "x$new_complete"; then
-      CC="$new_complete"
-      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting CC to \"$new_complete\"" >&5
+    CC="$new_complete"
+    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting CC to \"$new_complete\"" >&5
 $as_echo "$as_me: Rewriting CC to \"$new_complete\"" >&6;}
-    fi
+  fi
 
   { $as_echo "$as_me:${as_lineno-$LINENO}: checking resolved symbolic links for CC" >&5
 $as_echo_n "checking resolved symbolic links for CC... " >&6; }
   TEST_COMPILER="$CC"
 
-    if test "x$OPENJDK_BUILD_OS" != xwindows; then
-        # Follow a chain of symbolic links. Use readlink
-        # where it exists, else fall back to horribly
-        # complicated shell code.
-        if test "x$READLINK_TESTED" != yes; then
-            # On MacOSX there is a readlink tool with a different
-            # purpose than the GNU readlink tool. Check the found readlink.
-            ISGNU=`$READLINK --version 2>&1 | $GREP GNU`
-            if test "x$ISGNU" = x; then
-                 # A readlink that we do not know how to use.
-                 # Are there other non-GNU readlinks out there?
-                 READLINK_TESTED=yes
-                 READLINK=
-            fi
-        fi
-
-        if test "x$READLINK" != x; then
-            TEST_COMPILER=`$READLINK -f $TEST_COMPILER`
-        else
-            # Save the current directory for restoring afterwards
-            STARTDIR=$PWD
-            COUNTER=0
-            sym_link_dir=`$DIRNAME $TEST_COMPILER`
-            sym_link_file=`$BASENAME $TEST_COMPILER`
-            cd $sym_link_dir
-            # Use -P flag to resolve symlinks in directories.
-            cd `$THEPWDCMD -P`
-            sym_link_dir=`$THEPWDCMD -P`
-            # Resolve file symlinks
-            while test $COUNTER -lt 20; do
-                ISLINK=`$LS -l $sym_link_dir/$sym_link_file | $GREP '\->' | $SED -e 's/.*-> \(.*\)/\1/'`
-                if test "x$ISLINK" == x; then
-                    # This is not a symbolic link! We are done!
-                    break
-                fi
-                # Again resolve directory symlinks since the target of the just found
-                # link could be in a different directory
-                cd `$DIRNAME $ISLINK`
-                sym_link_dir=`$THEPWDCMD -P`
-                sym_link_file=`$BASENAME $ISLINK`
-                let COUNTER=COUNTER+1
-            done
-            cd $STARTDIR
-            TEST_COMPILER=$sym_link_dir/$sym_link_file
-        fi
+  if test "x$OPENJDK_BUILD_OS" != xwindows; then
+    # Follow a chain of symbolic links. Use readlink
+    # where it exists, else fall back to horribly
+    # complicated shell code.
+    if test "x$READLINK_TESTED" != yes; then
+      # On MacOSX there is a readlink tool with a different
+      # purpose than the GNU readlink tool. Check the found readlink.
+      ISGNU=`$READLINK --version 2>&1 | $GREP GNU`
+      if test "x$ISGNU" = x; then
+        # A readlink that we do not know how to use.
+        # Are there other non-GNU readlinks out there?
+        READLINK_TESTED=yes
+        READLINK=
+      fi
     fi
 
+    if test "x$READLINK" != x; then
+      TEST_COMPILER=`$READLINK -f $TEST_COMPILER`
+    else
+      # Save the current directory for restoring afterwards
+      STARTDIR=$PWD
+      COUNTER=0
+      sym_link_dir=`$DIRNAME $TEST_COMPILER`
+      sym_link_file=`$BASENAME $TEST_COMPILER`
+      cd $sym_link_dir
+      # Use -P flag to resolve symlinks in directories.
+      cd `$THEPWDCMD -P`
+      sym_link_dir=`$THEPWDCMD -P`
+      # Resolve file symlinks
+      while test $COUNTER -lt 20; do
+        ISLINK=`$LS -l $sym_link_dir/$sym_link_file | $GREP '\->' | $SED -e 's/.*-> \(.*\)/\1/'`
+        if test "x$ISLINK" == x; then
+          # This is not a symbolic link! We are done!
+          break
+        fi
+        # Again resolve directory symlinks since the target of the just found
+        # link could be in a different directory
+        cd `$DIRNAME $ISLINK`
+        sym_link_dir=`$THEPWDCMD -P`
+        sym_link_file=`$BASENAME $ISLINK`
+        let COUNTER=COUNTER+1
+      done
+      cd $STARTDIR
+      TEST_COMPILER=$sym_link_dir/$sym_link_file
+    fi
+  fi
+
   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TEST_COMPILER" >&5
 $as_echo "$TEST_COMPILER" >&6; }
   { $as_echo "$as_me:${as_lineno-$LINENO}: checking if CC is disguised ccache" >&5
@@ -19357,8 +19354,8 @@
   # bat and cmd files are not always considered executable in cygwin causing which
   # to not find them
   if test "x$new_path" = x \
-           && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
-           && test "x`$LS \"$path\" 2>/dev/null`" != x; then
+      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
+      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
     new_path=`$CYGPATH -u "$path"`
   fi
   if test "x$new_path" = x; then
@@ -19373,8 +19370,8 @@
     # bat and cmd files are not always considered executable in cygwin causing which
     # to not find them
     if test "x$new_path" = x \
-             && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
-             && test "x`$LS \"$path\" 2>/dev/null`" != x; then
+        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
+        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
       new_path=`$CYGPATH -u "$path"`
     fi
     if test "x$new_path" = x; then
@@ -19402,9 +19399,9 @@
     # Short path failed, file does not exist as specified.
     # Try adding .exe or .cmd
     if test -f "${new_path}.exe"; then
-       input_to_shortpath="${new_path}.exe"
+      input_to_shortpath="${new_path}.exe"
     elif test -f "${new_path}.cmd"; then
-       input_to_shortpath="${new_path}.cmd"
+      input_to_shortpath="${new_path}.cmd"
     else
       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of PROPER_COMPILER_CC, which resolves as \"$new_path\", is invalid." >&5
 $as_echo "$as_me: The path of PROPER_COMPILER_CC, which resolves as \"$new_path\", is invalid." >&6;}
@@ -19580,82 +19577,82 @@
     fi
 
     if test "x$new_path" = x; then
-        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of PROPER_COMPILER_CC, which resolves as \"$complete\", is not found." >&5
+      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of PROPER_COMPILER_CC, which resolves as \"$complete\", is not found." >&5
 $as_echo "$as_me: The path of PROPER_COMPILER_CC, which resolves as \"$complete\", is not found." >&6;}
-        has_space=`$ECHO "$complete" | $GREP " "`
-        if test "x$has_space" != x; then
-          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
+      has_space=`$ECHO "$complete" | $GREP " "`
+      if test "x$has_space" != x; then
+        { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
 $as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
-        fi
-        as_fn_error $? "Cannot locate the the path of PROPER_COMPILER_CC" "$LINENO" 5
       fi
+      as_fn_error $? "Cannot locate the the path of PROPER_COMPILER_CC" "$LINENO" 5
+    fi
   fi
 
-      # Now join together the path and the arguments once again
-      if test "x$arguments" != xEOL; then
-        new_complete="$new_path ${arguments% *}"
-      else
-        new_complete="$new_path"
-      fi
+  # Now join together the path and the arguments once again
+  if test "x$arguments" != xEOL; then
+    new_complete="$new_path ${arguments% *}"
+  else
+    new_complete="$new_path"
+  fi
 
   if test "x$complete" != "x$new_complete"; then
-      PROPER_COMPILER_CC="$new_complete"
-      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting PROPER_COMPILER_CC to \"$new_complete\"" >&5
+    PROPER_COMPILER_CC="$new_complete"
+    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting PROPER_COMPILER_CC to \"$new_complete\"" >&5
 $as_echo "$as_me: Rewriting PROPER_COMPILER_CC to \"$new_complete\"" >&6;}
-    fi
+  fi
 
     PATH="$RETRY_COMPILER_SAVED_PATH"
 
     { $as_echo "$as_me:${as_lineno-$LINENO}: checking for resolved symbolic links for CC" >&5
 $as_echo_n "checking for resolved symbolic links for CC... " >&6; }
 
-    if test "x$OPENJDK_BUILD_OS" != xwindows; then
-        # Follow a chain of symbolic links. Use readlink
-        # where it exists, else fall back to horribly
-        # complicated shell code.
-        if test "x$READLINK_TESTED" != yes; then
-            # On MacOSX there is a readlink tool with a different
-            # purpose than the GNU readlink tool. Check the found readlink.
-            ISGNU=`$READLINK --version 2>&1 | $GREP GNU`
-            if test "x$ISGNU" = x; then
-                 # A readlink that we do not know how to use.
-                 # Are there other non-GNU readlinks out there?
-                 READLINK_TESTED=yes
-                 READLINK=
-            fi
-        fi
-
-        if test "x$READLINK" != x; then
-            PROPER_COMPILER_CC=`$READLINK -f $PROPER_COMPILER_CC`
-        else
-            # Save the current directory for restoring afterwards
-            STARTDIR=$PWD
-            COUNTER=0
-            sym_link_dir=`$DIRNAME $PROPER_COMPILER_CC`
-            sym_link_file=`$BASENAME $PROPER_COMPILER_CC`
-            cd $sym_link_dir
-            # Use -P flag to resolve symlinks in directories.
-            cd `$THEPWDCMD -P`
-            sym_link_dir=`$THEPWDCMD -P`
-            # Resolve file symlinks
-            while test $COUNTER -lt 20; do
-                ISLINK=`$LS -l $sym_link_dir/$sym_link_file | $GREP '\->' | $SED -e 's/.*-> \(.*\)/\1/'`
-                if test "x$ISLINK" == x; then
-                    # This is not a symbolic link! We are done!
-                    break
-                fi
-                # Again resolve directory symlinks since the target of the just found
-                # link could be in a different directory
-                cd `$DIRNAME $ISLINK`
-                sym_link_dir=`$THEPWDCMD -P`
-                sym_link_file=`$BASENAME $ISLINK`
-                let COUNTER=COUNTER+1
-            done
-            cd $STARTDIR
-            PROPER_COMPILER_CC=$sym_link_dir/$sym_link_file
-        fi
+  if test "x$OPENJDK_BUILD_OS" != xwindows; then
+    # Follow a chain of symbolic links. Use readlink
+    # where it exists, else fall back to horribly
+    # complicated shell code.
+    if test "x$READLINK_TESTED" != yes; then
+      # On MacOSX there is a readlink tool with a different
+      # purpose than the GNU readlink tool. Check the found readlink.
+      ISGNU=`$READLINK --version 2>&1 | $GREP GNU`
+      if test "x$ISGNU" = x; then
+        # A readlink that we do not know how to use.
+        # Are there other non-GNU readlinks out there?
+        READLINK_TESTED=yes
+        READLINK=
+      fi
     fi
 
+    if test "x$READLINK" != x; then
+      PROPER_COMPILER_CC=`$READLINK -f $PROPER_COMPILER_CC`
+    else
+      # Save the current directory for restoring afterwards
+      STARTDIR=$PWD
+      COUNTER=0
+      sym_link_dir=`$DIRNAME $PROPER_COMPILER_CC`
+      sym_link_file=`$BASENAME $PROPER_COMPILER_CC`
+      cd $sym_link_dir
+      # Use -P flag to resolve symlinks in directories.
+      cd `$THEPWDCMD -P`
+      sym_link_dir=`$THEPWDCMD -P`
+      # Resolve file symlinks
+      while test $COUNTER -lt 20; do
+        ISLINK=`$LS -l $sym_link_dir/$sym_link_file | $GREP '\->' | $SED -e 's/.*-> \(.*\)/\1/'`
+        if test "x$ISLINK" == x; then
+          # This is not a symbolic link! We are done!
+          break
+        fi
+        # Again resolve directory symlinks since the target of the just found
+        # link could be in a different directory
+        cd `$DIRNAME $ISLINK`
+        sym_link_dir=`$THEPWDCMD -P`
+        sym_link_file=`$BASENAME $ISLINK`
+        let COUNTER=COUNTER+1
+      done
+      cd $STARTDIR
+      PROPER_COMPILER_CC=$sym_link_dir/$sym_link_file
+    fi
+  fi
+
     { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PROPER_COMPILER_CC" >&5
 $as_echo "$PROPER_COMPILER_CC" >&6; }
     CC="$PROPER_COMPILER_CC"
@@ -19686,7 +19683,7 @@
     fi
   elif test  "x$OPENJDK_TARGET_OS" = xwindows; then
     # First line typically looks something like:
-    # Microsoft (R) 32-bit C/C++ Optimizing Compiler Version 16.00.30319.01 for 80x86
+    # Microsoft (R) 32-bit C/C++ Optimizing Compiler Version 16.00.40219.01 for 80x86
     COMPILER_VERSION_TEST=`$COMPILER 2>&1 | $HEAD -n 1 | $TR -d '\r'`
     COMPILER_VERSION=`$ECHO $COMPILER_VERSION_TEST | $SED -n "s/^.*Version \([1-9][0-9.]*\) .*/\1/p"`
     COMPILER_VENDOR="Microsoft CL.EXE"
@@ -19726,8 +19723,8 @@
 $as_echo "$as_me: Using $COMPILER_VENDOR $COMPILER_NAME compiler version $COMPILER_VERSION (located at $COMPILER)" >&6;}
 
 
-# Now that we have resolved CC ourself, let autoconf have its go at it
-ac_ext=c
+  # Now that we have resolved CC ourself, let autoconf have its go at it
+  ac_ext=c
 ac_cpp='$CPP $CPPFLAGS'
 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
@@ -20325,17 +20322,17 @@
 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
 
 
-### Locate C++ compiler (CXX)
+  ### Locate C++ compiler (CXX)
 
-if test "x$CXX" != x; then
-  COMPILER_CHECK_LIST="$CXX"
-elif test "x$OPENJDK_TARGET_OS" = "xwindows"; then
-  COMPILER_CHECK_LIST="cl"
-elif test "x$OPENJDK_TARGET_OS" = "xsolaris"; then
-  COMPILER_CHECK_LIST="CC g++"
-else
-  COMPILER_CHECK_LIST="g++ CC"
-fi
+  if test "x$CXX" != x; then
+    COMPILER_CHECK_LIST="$CXX"
+  elif test "x$OPENJDK_TARGET_OS" = "xwindows"; then
+    COMPILER_CHECK_LIST="cl"
+  elif test "x$OPENJDK_TARGET_OS" = "xsolaris"; then
+    COMPILER_CHECK_LIST="CC g++"
+  else
+    COMPILER_CHECK_LIST="g++ CC"
+  fi
 
 
   COMPILER_NAME=C++
@@ -20448,31 +20445,31 @@
 
   if test "x$CXX" = x; then
 
-    # Print a helpful message on how to acquire the necessary build dependency.
-    # devkit is the help tag: freetyp2, cups, pulse, alsa etc
-    MISSING_DEPENDENCY=devkit
-    PKGHANDLER_COMMAND=
+  # Print a helpful message on how to acquire the necessary build dependency.
+  # devkit is the help tag: freetyp2, cups, pulse, alsa etc
+  MISSING_DEPENDENCY=devkit
+  PKGHANDLER_COMMAND=
 
-    case $PKGHANDLER in
-	apt-get)
-                apt_help     $MISSING_DEPENDENCY ;;
+  case $PKGHANDLER in
+    apt-get)
+      apt_help     $MISSING_DEPENDENCY ;;
     yum)
-                yum_help     $MISSING_DEPENDENCY ;;
-	port)
-                port_help    $MISSING_DEPENDENCY ;;
-	pkgutil)
-                pkgutil_help $MISSING_DEPENDENCY ;;
-	pkgadd)
-                pkgadd_help  $MISSING_DEPENDENCY ;;
+      yum_help     $MISSING_DEPENDENCY ;;
+    port)
+      port_help    $MISSING_DEPENDENCY ;;
+    pkgutil)
+      pkgutil_help $MISSING_DEPENDENCY ;;
+    pkgadd)
+      pkgadd_help  $MISSING_DEPENDENCY ;;
     * )
       break ;;
-    esac
+  esac
 
-    if test "x$PKGHANDLER_COMMAND" != x; then
-        HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
-    fi
+  if test "x$PKGHANDLER_COMMAND" != x; then
+    HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
+  fi
 
-      as_fn_error $? "Could not find a $COMPILER_NAME compiler. $HELP_MSG" "$LINENO" 5
+    as_fn_error $? "Could not find a $COMPILER_NAME compiler. $HELP_MSG" "$LINENO" 5
   fi
 
   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
@@ -20493,8 +20490,8 @@
   # bat and cmd files are not always considered executable in cygwin causing which
   # to not find them
   if test "x$new_path" = x \
-           && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
-           && test "x`$LS \"$path\" 2>/dev/null`" != x; then
+      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
+      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
     new_path=`$CYGPATH -u "$path"`
   fi
   if test "x$new_path" = x; then
@@ -20509,8 +20506,8 @@
     # bat and cmd files are not always considered executable in cygwin causing which
     # to not find them
     if test "x$new_path" = x \
-             && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
-             && test "x`$LS \"$path\" 2>/dev/null`" != x; then
+        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
+        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
       new_path=`$CYGPATH -u "$path"`
     fi
     if test "x$new_path" = x; then
@@ -20538,9 +20535,9 @@
     # Short path failed, file does not exist as specified.
     # Try adding .exe or .cmd
     if test -f "${new_path}.exe"; then
-       input_to_shortpath="${new_path}.exe"
+      input_to_shortpath="${new_path}.exe"
     elif test -f "${new_path}.cmd"; then
-       input_to_shortpath="${new_path}.cmd"
+      input_to_shortpath="${new_path}.cmd"
     else
       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CXX, which resolves as \"$new_path\", is invalid." >&5
 $as_echo "$as_me: The path of CXX, which resolves as \"$new_path\", is invalid." >&6;}
@@ -20716,81 +20713,81 @@
     fi
 
     if test "x$new_path" = x; then
-        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CXX, which resolves as \"$complete\", is not found." >&5
+      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CXX, which resolves as \"$complete\", is not found." >&5
 $as_echo "$as_me: The path of CXX, which resolves as \"$complete\", is not found." >&6;}
-        has_space=`$ECHO "$complete" | $GREP " "`
-        if test "x$has_space" != x; then
-          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
+      has_space=`$ECHO "$complete" | $GREP " "`
+      if test "x$has_space" != x; then
+        { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
 $as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
-        fi
-        as_fn_error $? "Cannot locate the the path of CXX" "$LINENO" 5
       fi
+      as_fn_error $? "Cannot locate the the path of CXX" "$LINENO" 5
+    fi
   fi
 
-      # Now join together the path and the arguments once again
-      if test "x$arguments" != xEOL; then
-        new_complete="$new_path ${arguments% *}"
-      else
-        new_complete="$new_path"
-      fi
+  # Now join together the path and the arguments once again
+  if test "x$arguments" != xEOL; then
+    new_complete="$new_path ${arguments% *}"
+  else
+    new_complete="$new_path"
+  fi
 
   if test "x$complete" != "x$new_complete"; then
-      CXX="$new_complete"
-      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting CXX to \"$new_complete\"" >&5
+    CXX="$new_complete"
+    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting CXX to \"$new_complete\"" >&5
 $as_echo "$as_me: Rewriting CXX to \"$new_complete\"" >&6;}
-    fi
+  fi
 
   { $as_echo "$as_me:${as_lineno-$LINENO}: checking resolved symbolic links for CXX" >&5
 $as_echo_n "checking resolved symbolic links for CXX... " >&6; }
   TEST_COMPILER="$CXX"
 
-    if test "x$OPENJDK_BUILD_OS" != xwindows; then
-        # Follow a chain of symbolic links. Use readlink
-        # where it exists, else fall back to horribly
-        # complicated shell code.
-        if test "x$READLINK_TESTED" != yes; then
-            # On MacOSX there is a readlink tool with a different
-            # purpose than the GNU readlink tool. Check the found readlink.
-            ISGNU=`$READLINK --version 2>&1 | $GREP GNU`
-            if test "x$ISGNU" = x; then
-                 # A readlink that we do not know how to use.
-                 # Are there other non-GNU readlinks out there?
-                 READLINK_TESTED=yes
-                 READLINK=
-            fi
-        fi
-
-        if test "x$READLINK" != x; then
-            TEST_COMPILER=`$READLINK -f $TEST_COMPILER`
-        else
-            # Save the current directory for restoring afterwards
-            STARTDIR=$PWD
-            COUNTER=0
-            sym_link_dir=`$DIRNAME $TEST_COMPILER`
-            sym_link_file=`$BASENAME $TEST_COMPILER`
-            cd $sym_link_dir
-            # Use -P flag to resolve symlinks in directories.
-            cd `$THEPWDCMD -P`
-            sym_link_dir=`$THEPWDCMD -P`
-            # Resolve file symlinks
-            while test $COUNTER -lt 20; do
-                ISLINK=`$LS -l $sym_link_dir/$sym_link_file | $GREP '\->' | $SED -e 's/.*-> \(.*\)/\1/'`
-                if test "x$ISLINK" == x; then
-                    # This is not a symbolic link! We are done!
-                    break
-                fi
-                # Again resolve directory symlinks since the target of the just found
-                # link could be in a different directory
-                cd `$DIRNAME $ISLINK`
-                sym_link_dir=`$THEPWDCMD -P`
-                sym_link_file=`$BASENAME $ISLINK`
-                let COUNTER=COUNTER+1
-            done
-            cd $STARTDIR
-            TEST_COMPILER=$sym_link_dir/$sym_link_file
-        fi
+  if test "x$OPENJDK_BUILD_OS" != xwindows; then
+    # Follow a chain of symbolic links. Use readlink
+    # where it exists, else fall back to horribly
+    # complicated shell code.
+    if test "x$READLINK_TESTED" != yes; then
+      # On MacOSX there is a readlink tool with a different
+      # purpose than the GNU readlink tool. Check the found readlink.
+      ISGNU=`$READLINK --version 2>&1 | $GREP GNU`
+      if test "x$ISGNU" = x; then
+        # A readlink that we do not know how to use.
+        # Are there other non-GNU readlinks out there?
+        READLINK_TESTED=yes
+        READLINK=
+      fi
     fi
 
+    if test "x$READLINK" != x; then
+      TEST_COMPILER=`$READLINK -f $TEST_COMPILER`
+    else
+      # Save the current directory for restoring afterwards
+      STARTDIR=$PWD
+      COUNTER=0
+      sym_link_dir=`$DIRNAME $TEST_COMPILER`
+      sym_link_file=`$BASENAME $TEST_COMPILER`
+      cd $sym_link_dir
+      # Use -P flag to resolve symlinks in directories.
+      cd `$THEPWDCMD -P`
+      sym_link_dir=`$THEPWDCMD -P`
+      # Resolve file symlinks
+      while test $COUNTER -lt 20; do
+        ISLINK=`$LS -l $sym_link_dir/$sym_link_file | $GREP '\->' | $SED -e 's/.*-> \(.*\)/\1/'`
+        if test "x$ISLINK" == x; then
+          # This is not a symbolic link! We are done!
+          break
+        fi
+        # Again resolve directory symlinks since the target of the just found
+        # link could be in a different directory
+        cd `$DIRNAME $ISLINK`
+        sym_link_dir=`$THEPWDCMD -P`
+        sym_link_file=`$BASENAME $ISLINK`
+        let COUNTER=COUNTER+1
+      done
+      cd $STARTDIR
+      TEST_COMPILER=$sym_link_dir/$sym_link_file
+    fi
+  fi
+
   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TEST_COMPILER" >&5
 $as_echo "$TEST_COMPILER" >&6; }
   { $as_echo "$as_me:${as_lineno-$LINENO}: checking if CXX is disguised ccache" >&5
@@ -20929,8 +20926,8 @@
   # bat and cmd files are not always considered executable in cygwin causing which
   # to not find them
   if test "x$new_path" = x \
-           && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
-           && test "x`$LS \"$path\" 2>/dev/null`" != x; then
+      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
+      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
     new_path=`$CYGPATH -u "$path"`
   fi
   if test "x$new_path" = x; then
@@ -20945,8 +20942,8 @@
     # bat and cmd files are not always considered executable in cygwin causing which
     # to not find them
     if test "x$new_path" = x \
-             && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
-             && test "x`$LS \"$path\" 2>/dev/null`" != x; then
+        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
+        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
       new_path=`$CYGPATH -u "$path"`
     fi
     if test "x$new_path" = x; then
@@ -20974,9 +20971,9 @@
     # Short path failed, file does not exist as specified.
     # Try adding .exe or .cmd
     if test -f "${new_path}.exe"; then
-       input_to_shortpath="${new_path}.exe"
+      input_to_shortpath="${new_path}.exe"
     elif test -f "${new_path}.cmd"; then
-       input_to_shortpath="${new_path}.cmd"
+      input_to_shortpath="${new_path}.cmd"
     else
       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of PROPER_COMPILER_CXX, which resolves as \"$new_path\", is invalid." >&5
 $as_echo "$as_me: The path of PROPER_COMPILER_CXX, which resolves as \"$new_path\", is invalid." >&6;}
@@ -21152,82 +21149,82 @@
     fi
 
     if test "x$new_path" = x; then
-        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of PROPER_COMPILER_CXX, which resolves as \"$complete\", is not found." >&5
+      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of PROPER_COMPILER_CXX, which resolves as \"$complete\", is not found." >&5
 $as_echo "$as_me: The path of PROPER_COMPILER_CXX, which resolves as \"$complete\", is not found." >&6;}
-        has_space=`$ECHO "$complete" | $GREP " "`
-        if test "x$has_space" != x; then
-          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
+      has_space=`$ECHO "$complete" | $GREP " "`
+      if test "x$has_space" != x; then
+        { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
 $as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
-        fi
-        as_fn_error $? "Cannot locate the the path of PROPER_COMPILER_CXX" "$LINENO" 5
       fi
+      as_fn_error $? "Cannot locate the the path of PROPER_COMPILER_CXX" "$LINENO" 5
+    fi
   fi
 
-      # Now join together the path and the arguments once again
-      if test "x$arguments" != xEOL; then
-        new_complete="$new_path ${arguments% *}"
-      else
-        new_complete="$new_path"
-      fi
+  # Now join together the path and the arguments once again
+  if test "x$arguments" != xEOL; then
+    new_complete="$new_path ${arguments% *}"
+  else
+    new_complete="$new_path"
+  fi
 
   if test "x$complete" != "x$new_complete"; then
-      PROPER_COMPILER_CXX="$new_complete"
-      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting PROPER_COMPILER_CXX to \"$new_complete\"" >&5
+    PROPER_COMPILER_CXX="$new_complete"
+    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting PROPER_COMPILER_CXX to \"$new_complete\"" >&5
 $as_echo "$as_me: Rewriting PROPER_COMPILER_CXX to \"$new_complete\"" >&6;}
-    fi
+  fi
 
     PATH="$RETRY_COMPILER_SAVED_PATH"
 
     { $as_echo "$as_me:${as_lineno-$LINENO}: checking for resolved symbolic links for CXX" >&5
 $as_echo_n "checking for resolved symbolic links for CXX... " >&6; }
 
-    if test "x$OPENJDK_BUILD_OS" != xwindows; then
-        # Follow a chain of symbolic links. Use readlink
-        # where it exists, else fall back to horribly
-        # complicated shell code.
-        if test "x$READLINK_TESTED" != yes; then
-            # On MacOSX there is a readlink tool with a different
-            # purpose than the GNU readlink tool. Check the found readlink.
-            ISGNU=`$READLINK --version 2>&1 | $GREP GNU`
-            if test "x$ISGNU" = x; then
-                 # A readlink that we do not know how to use.
-                 # Are there other non-GNU readlinks out there?
-                 READLINK_TESTED=yes
-                 READLINK=
-            fi
-        fi
-
-        if test "x$READLINK" != x; then
-            PROPER_COMPILER_CXX=`$READLINK -f $PROPER_COMPILER_CXX`
-        else
-            # Save the current directory for restoring afterwards
-            STARTDIR=$PWD
-            COUNTER=0
-            sym_link_dir=`$DIRNAME $PROPER_COMPILER_CXX`
-            sym_link_file=`$BASENAME $PROPER_COMPILER_CXX`
-            cd $sym_link_dir
-            # Use -P flag to resolve symlinks in directories.
-            cd `$THEPWDCMD -P`
-            sym_link_dir=`$THEPWDCMD -P`
-            # Resolve file symlinks
-            while test $COUNTER -lt 20; do
-                ISLINK=`$LS -l $sym_link_dir/$sym_link_file | $GREP '\->' | $SED -e 's/.*-> \(.*\)/\1/'`
-                if test "x$ISLINK" == x; then
-                    # This is not a symbolic link! We are done!
-                    break
-                fi
-                # Again resolve directory symlinks since the target of the just found
-                # link could be in a different directory
-                cd `$DIRNAME $ISLINK`
-                sym_link_dir=`$THEPWDCMD -P`
-                sym_link_file=`$BASENAME $ISLINK`
-                let COUNTER=COUNTER+1
-            done
-            cd $STARTDIR
-            PROPER_COMPILER_CXX=$sym_link_dir/$sym_link_file
-        fi
+  if test "x$OPENJDK_BUILD_OS" != xwindows; then
+    # Follow a chain of symbolic links. Use readlink
+    # where it exists, else fall back to horribly
+    # complicated shell code.
+    if test "x$READLINK_TESTED" != yes; then
+      # On MacOSX there is a readlink tool with a different
+      # purpose than the GNU readlink tool. Check the found readlink.
+      ISGNU=`$READLINK --version 2>&1 | $GREP GNU`
+      if test "x$ISGNU" = x; then
+        # A readlink that we do not know how to use.
+        # Are there other non-GNU readlinks out there?
+        READLINK_TESTED=yes
+        READLINK=
+      fi
     fi
 
+    if test "x$READLINK" != x; then
+      PROPER_COMPILER_CXX=`$READLINK -f $PROPER_COMPILER_CXX`
+    else
+      # Save the current directory for restoring afterwards
+      STARTDIR=$PWD
+      COUNTER=0
+      sym_link_dir=`$DIRNAME $PROPER_COMPILER_CXX`
+      sym_link_file=`$BASENAME $PROPER_COMPILER_CXX`
+      cd $sym_link_dir
+      # Use -P flag to resolve symlinks in directories.
+      cd `$THEPWDCMD -P`
+      sym_link_dir=`$THEPWDCMD -P`
+      # Resolve file symlinks
+      while test $COUNTER -lt 20; do
+        ISLINK=`$LS -l $sym_link_dir/$sym_link_file | $GREP '\->' | $SED -e 's/.*-> \(.*\)/\1/'`
+        if test "x$ISLINK" == x; then
+          # This is not a symbolic link! We are done!
+          break
+        fi
+        # Again resolve directory symlinks since the target of the just found
+        # link could be in a different directory
+        cd `$DIRNAME $ISLINK`
+        sym_link_dir=`$THEPWDCMD -P`
+        sym_link_file=`$BASENAME $ISLINK`
+        let COUNTER=COUNTER+1
+      done
+      cd $STARTDIR
+      PROPER_COMPILER_CXX=$sym_link_dir/$sym_link_file
+    fi
+  fi
+
     { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PROPER_COMPILER_CXX" >&5
 $as_echo "$PROPER_COMPILER_CXX" >&6; }
     CXX="$PROPER_COMPILER_CXX"
@@ -21258,7 +21255,7 @@
     fi
   elif test  "x$OPENJDK_TARGET_OS" = xwindows; then
     # First line typically looks something like:
-    # Microsoft (R) 32-bit C/C++ Optimizing Compiler Version 16.00.30319.01 for 80x86
+    # Microsoft (R) 32-bit C/C++ Optimizing Compiler Version 16.00.40219.01 for 80x86
     COMPILER_VERSION_TEST=`$COMPILER 2>&1 | $HEAD -n 1 | $TR -d '\r'`
     COMPILER_VERSION=`$ECHO $COMPILER_VERSION_TEST | $SED -n "s/^.*Version \([1-9][0-9.]*\) .*/\1/p"`
     COMPILER_VENDOR="Microsoft CL.EXE"
@@ -21298,8 +21295,8 @@
 $as_echo "$as_me: Using $COMPILER_VENDOR $COMPILER_NAME compiler version $COMPILER_VERSION (located at $COMPILER)" >&6;}
 
 
-# Now that we have resolved CXX ourself, let autoconf have its go at it
-ac_ext=cpp
+  # Now that we have resolved CXX ourself, let autoconf have its go at it
+  ac_ext=cpp
 ac_cpp='$CXXCPP $CPPFLAGS'
 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
@@ -21557,9 +21554,9 @@
 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
 
 
-### Locate other tools
+  ### Locate other tools
 
-if test "x$OPENJDK_TARGET_OS" = xmacosx; then
+  if test "x$OPENJDK_TARGET_OS" = xmacosx; then
     ac_ext=m
 ac_cpp='$OBJCPP $CPPFLAGS'
 ac_compile='$OBJC -c $OBJCFLAGS $CPPFLAGS conftest.$ac_ext >&5'
@@ -21830,8 +21827,8 @@
   # bat and cmd files are not always considered executable in cygwin causing which
   # to not find them
   if test "x$new_path" = x \
-           && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
-           && test "x`$LS \"$path\" 2>/dev/null`" != x; then
+      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
+      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
     new_path=`$CYGPATH -u "$path"`
   fi
   if test "x$new_path" = x; then
@@ -21846,8 +21843,8 @@
     # bat and cmd files are not always considered executable in cygwin causing which
     # to not find them
     if test "x$new_path" = x \
-             && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
-             && test "x`$LS \"$path\" 2>/dev/null`" != x; then
+        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
+        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
       new_path=`$CYGPATH -u "$path"`
     fi
     if test "x$new_path" = x; then
@@ -21875,9 +21872,9 @@
     # Short path failed, file does not exist as specified.
     # Try adding .exe or .cmd
     if test -f "${new_path}.exe"; then
-       input_to_shortpath="${new_path}.exe"
+      input_to_shortpath="${new_path}.exe"
     elif test -f "${new_path}.cmd"; then
-       input_to_shortpath="${new_path}.cmd"
+      input_to_shortpath="${new_path}.cmd"
     else
       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OBJC, which resolves as \"$new_path\", is invalid." >&5
 $as_echo "$as_me: The path of OBJC, which resolves as \"$new_path\", is invalid." >&6;}
@@ -22053,53 +22050,53 @@
     fi
 
     if test "x$new_path" = x; then
-        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OBJC, which resolves as \"$complete\", is not found." >&5
+      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OBJC, which resolves as \"$complete\", is not found." >&5
 $as_echo "$as_me: The path of OBJC, which resolves as \"$complete\", is not found." >&6;}
-        has_space=`$ECHO "$complete" | $GREP " "`
-        if test "x$has_space" != x; then
-          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
+      has_space=`$ECHO "$complete" | $GREP " "`
+      if test "x$has_space" != x; then
+        { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
 $as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
-        fi
-        as_fn_error $? "Cannot locate the the path of OBJC" "$LINENO" 5
       fi
+      as_fn_error $? "Cannot locate the the path of OBJC" "$LINENO" 5
+    fi
   fi
 
-      # Now join together the path and the arguments once again
-      if test "x$arguments" != xEOL; then
-        new_complete="$new_path ${arguments% *}"
-      else
-        new_complete="$new_path"
-      fi
+  # Now join together the path and the arguments once again
+  if test "x$arguments" != xEOL; then
+    new_complete="$new_path ${arguments% *}"
+  else
+    new_complete="$new_path"
+  fi
 
   if test "x$complete" != "x$new_complete"; then
-      OBJC="$new_complete"
-      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting OBJC to \"$new_complete\"" >&5
+    OBJC="$new_complete"
+    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting OBJC to \"$new_complete\"" >&5
 $as_echo "$as_me: Rewriting OBJC to \"$new_complete\"" >&6;}
-    fi
+  fi
 
-else
+  else
     OBJC=
-fi
+  fi
 
-# Restore the flags to the user specified values.
-# This is necessary since AC_PROG_CC defaults CFLAGS to "-g -O2"
-CFLAGS="$ORG_CFLAGS"
-CXXFLAGS="$ORG_CXXFLAGS"
-OBJCFLAGS="$ORG_OBJCFLAGS"
+  # Restore the flags to the user specified values.
+  # This is necessary since AC_PROG_CC defaults CFLAGS to "-g -O2"
+  CFLAGS="$ORG_CFLAGS"
+  CXXFLAGS="$ORG_CXXFLAGS"
+  OBJCFLAGS="$ORG_OBJCFLAGS"
 
-LD="$CC"
-LDEXE="$CC"
-LDCXX="$CXX"
-LDEXECXX="$CXX"
+  LD="$CC"
+  LDEXE="$CC"
+  LDCXX="$CXX"
+  LDEXECXX="$CXX"
 
-# LDEXE is the linker to use, when creating executables.
+  # LDEXE is the linker to use, when creating executables.
 
-# Linking C++ libraries.
+  # Linking C++ libraries.
 
-# Linking C++ executables.
+  # Linking C++ executables.
 
 
-if test "x$OPENJDK_TARGET_OS" != xwindows; then
+  if test "x$OPENJDK_TARGET_OS" != xwindows; then
     if test -n "$ac_tool_prefix"; then
   # Extract the first word of "${ac_tool_prefix}ar", so it can be a program name with args.
 set dummy ${ac_tool_prefix}ar; ac_word=$2
@@ -22211,8 +22208,8 @@
   # bat and cmd files are not always considered executable in cygwin causing which
   # to not find them
   if test "x$new_path" = x \
-           && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
-           && test "x`$LS \"$path\" 2>/dev/null`" != x; then
+      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
+      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
     new_path=`$CYGPATH -u "$path"`
   fi
   if test "x$new_path" = x; then
@@ -22227,8 +22224,8 @@
     # bat and cmd files are not always considered executable in cygwin causing which
     # to not find them
     if test "x$new_path" = x \
-             && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
-             && test "x`$LS \"$path\" 2>/dev/null`" != x; then
+        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
+        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
       new_path=`$CYGPATH -u "$path"`
     fi
     if test "x$new_path" = x; then
@@ -22256,9 +22253,9 @@
     # Short path failed, file does not exist as specified.
     # Try adding .exe or .cmd
     if test -f "${new_path}.exe"; then
-       input_to_shortpath="${new_path}.exe"
+      input_to_shortpath="${new_path}.exe"
     elif test -f "${new_path}.cmd"; then
-       input_to_shortpath="${new_path}.cmd"
+      input_to_shortpath="${new_path}.cmd"
     else
       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of AR, which resolves as \"$new_path\", is invalid." >&5
 $as_echo "$as_me: The path of AR, which resolves as \"$new_path\", is invalid." >&6;}
@@ -22434,47 +22431,47 @@
     fi
 
     if test "x$new_path" = x; then
-        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of AR, which resolves as \"$complete\", is not found." >&5
+      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of AR, which resolves as \"$complete\", is not found." >&5
 $as_echo "$as_me: The path of AR, which resolves as \"$complete\", is not found." >&6;}
-        has_space=`$ECHO "$complete" | $GREP " "`
-        if test "x$has_space" != x; then
-          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
+      has_space=`$ECHO "$complete" | $GREP " "`
+      if test "x$has_space" != x; then
+        { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
 $as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
-        fi
-        as_fn_error $? "Cannot locate the the path of AR" "$LINENO" 5
       fi
+      as_fn_error $? "Cannot locate the the path of AR" "$LINENO" 5
+    fi
   fi
 
-      # Now join together the path and the arguments once again
-      if test "x$arguments" != xEOL; then
-        new_complete="$new_path ${arguments% *}"
-      else
-        new_complete="$new_path"
-      fi
+  # Now join together the path and the arguments once again
+  if test "x$arguments" != xEOL; then
+    new_complete="$new_path ${arguments% *}"
+  else
+    new_complete="$new_path"
+  fi
 
   if test "x$complete" != "x$new_complete"; then
-      AR="$new_complete"
-      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting AR to \"$new_complete\"" >&5
+    AR="$new_complete"
+    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting AR to \"$new_complete\"" >&5
 $as_echo "$as_me: Rewriting AR to \"$new_complete\"" >&6;}
-    fi
+  fi
 
-fi
-if test "x$OPENJDK_TARGET_OS" = xmacosx; then
+  fi
+  if test "x$OPENJDK_TARGET_OS" = xmacosx; then
     ARFLAGS="-r"
-else
+  else
     ARFLAGS=""
-fi
+  fi
 
 
-# For hotspot, we need these in Windows mixed path; other platforms keep them the same
-HOTSPOT_CXX="$CXX"
-HOTSPOT_LD="$LD"
+  # For hotspot, we need these in Windows mixed path; other platforms keep them the same
+  HOTSPOT_CXX="$CXX"
+  HOTSPOT_LD="$LD"
 
 
 
-COMPILER_NAME=gcc
-COMPILER_TYPE=CC
-if test "x$OPENJDK_TARGET_OS" = xwindows; then :
+  COMPILER_NAME=gcc
+  COMPILER_TYPE=CC
+  if test "x$OPENJDK_TARGET_OS" = xwindows; then :
 
     # For now, assume that we are always compiling using cl.exe.
     CC_OUT_OPTION=-Fo
@@ -22558,8 +22555,8 @@
   # bat and cmd files are not always considered executable in cygwin causing which
   # to not find them
   if test "x$new_path" = x \
-           && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
-           && test "x`$LS \"$path\" 2>/dev/null`" != x; then
+      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
+      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
     new_path=`$CYGPATH -u "$path"`
   fi
   if test "x$new_path" = x; then
@@ -22574,8 +22571,8 @@
     # bat and cmd files are not always considered executable in cygwin causing which
     # to not find them
     if test "x$new_path" = x \
-             && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
-             && test "x`$LS \"$path\" 2>/dev/null`" != x; then
+        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
+        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
       new_path=`$CYGPATH -u "$path"`
     fi
     if test "x$new_path" = x; then
@@ -22603,9 +22600,9 @@
     # Short path failed, file does not exist as specified.
     # Try adding .exe or .cmd
     if test -f "${new_path}.exe"; then
-       input_to_shortpath="${new_path}.exe"
+      input_to_shortpath="${new_path}.exe"
     elif test -f "${new_path}.cmd"; then
-       input_to_shortpath="${new_path}.cmd"
+      input_to_shortpath="${new_path}.cmd"
     else
       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of WINLD, which resolves as \"$new_path\", is invalid." >&5
 $as_echo "$as_me: The path of WINLD, which resolves as \"$new_path\", is invalid." >&6;}
@@ -22781,29 +22778,29 @@
     fi
 
     if test "x$new_path" = x; then
-        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of WINLD, which resolves as \"$complete\", is not found." >&5
+      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of WINLD, which resolves as \"$complete\", is not found." >&5
 $as_echo "$as_me: The path of WINLD, which resolves as \"$complete\", is not found." >&6;}
-        has_space=`$ECHO "$complete" | $GREP " "`
-        if test "x$has_space" != x; then
-          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
+      has_space=`$ECHO "$complete" | $GREP " "`
+      if test "x$has_space" != x; then
+        { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
 $as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
-        fi
-        as_fn_error $? "Cannot locate the the path of WINLD" "$LINENO" 5
       fi
+      as_fn_error $? "Cannot locate the the path of WINLD" "$LINENO" 5
+    fi
   fi
 
-      # Now join together the path and the arguments once again
-      if test "x$arguments" != xEOL; then
-        new_complete="$new_path ${arguments% *}"
-      else
-        new_complete="$new_path"
-      fi
+  # Now join together the path and the arguments once again
+  if test "x$arguments" != xEOL; then
+    new_complete="$new_path ${arguments% *}"
+  else
+    new_complete="$new_path"
+  fi
 
   if test "x$complete" != "x$new_complete"; then
-      WINLD="$new_complete"
-      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting WINLD to \"$new_complete\"" >&5
+    WINLD="$new_complete"
+    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting WINLD to \"$new_complete\"" >&5
 $as_echo "$as_me: Rewriting WINLD to \"$new_complete\"" >&6;}
-    fi
+  fi
 
     printf "Windows linker was found at $WINLD\n"
     { $as_echo "$as_me:${as_lineno-$LINENO}: checking if the found link.exe is actually the Visual Studio linker" >&5
@@ -22895,8 +22892,8 @@
   # bat and cmd files are not always considered executable in cygwin causing which
   # to not find them
   if test "x$new_path" = x \
-           && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
-           && test "x`$LS \"$path\" 2>/dev/null`" != x; then
+      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
+      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
     new_path=`$CYGPATH -u "$path"`
   fi
   if test "x$new_path" = x; then
@@ -22911,8 +22908,8 @@
     # bat and cmd files are not always considered executable in cygwin causing which
     # to not find them
     if test "x$new_path" = x \
-             && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
-             && test "x`$LS \"$path\" 2>/dev/null`" != x; then
+        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
+        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
       new_path=`$CYGPATH -u "$path"`
     fi
     if test "x$new_path" = x; then
@@ -22940,9 +22937,9 @@
     # Short path failed, file does not exist as specified.
     # Try adding .exe or .cmd
     if test -f "${new_path}.exe"; then
-       input_to_shortpath="${new_path}.exe"
+      input_to_shortpath="${new_path}.exe"
     elif test -f "${new_path}.cmd"; then
-       input_to_shortpath="${new_path}.cmd"
+      input_to_shortpath="${new_path}.cmd"
     else
       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MT, which resolves as \"$new_path\", is invalid." >&5
 $as_echo "$as_me: The path of MT, which resolves as \"$new_path\", is invalid." >&6;}
@@ -23118,29 +23115,29 @@
     fi
 
     if test "x$new_path" = x; then
-        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MT, which resolves as \"$complete\", is not found." >&5
+      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MT, which resolves as \"$complete\", is not found." >&5
 $as_echo "$as_me: The path of MT, which resolves as \"$complete\", is not found." >&6;}
-        has_space=`$ECHO "$complete" | $GREP " "`
-        if test "x$has_space" != x; then
-          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
+      has_space=`$ECHO "$complete" | $GREP " "`
+      if test "x$has_space" != x; then
+        { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
 $as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
-        fi
-        as_fn_error $? "Cannot locate the the path of MT" "$LINENO" 5
       fi
+      as_fn_error $? "Cannot locate the the path of MT" "$LINENO" 5
+    fi
   fi
 
-      # Now join together the path and the arguments once again
-      if test "x$arguments" != xEOL; then
-        new_complete="$new_path ${arguments% *}"
-      else
-        new_complete="$new_path"
-      fi
+  # Now join together the path and the arguments once again
+  if test "x$arguments" != xEOL; then
+    new_complete="$new_path ${arguments% *}"
+  else
+    new_complete="$new_path"
+  fi
 
   if test "x$complete" != "x$new_complete"; then
-      MT="$new_complete"
-      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MT to \"$new_complete\"" >&5
+    MT="$new_complete"
+    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MT to \"$new_complete\"" >&5
 $as_echo "$as_me: Rewriting MT to \"$new_complete\"" >&6;}
-    fi
+  fi
 
     # The resource compiler
     # Extract the first word of "rc", so it can be a program name with args.
@@ -23216,8 +23213,8 @@
   # bat and cmd files are not always considered executable in cygwin causing which
   # to not find them
   if test "x$new_path" = x \
-           && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
-           && test "x`$LS \"$path\" 2>/dev/null`" != x; then
+      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
+      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
     new_path=`$CYGPATH -u "$path"`
   fi
   if test "x$new_path" = x; then
@@ -23232,8 +23229,8 @@
     # bat and cmd files are not always considered executable in cygwin causing which
     # to not find them
     if test "x$new_path" = x \
-             && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
-             && test "x`$LS \"$path\" 2>/dev/null`" != x; then
+        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
+        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
       new_path=`$CYGPATH -u "$path"`
     fi
     if test "x$new_path" = x; then
@@ -23261,9 +23258,9 @@
     # Short path failed, file does not exist as specified.
     # Try adding .exe or .cmd
     if test -f "${new_path}.exe"; then
-       input_to_shortpath="${new_path}.exe"
+      input_to_shortpath="${new_path}.exe"
     elif test -f "${new_path}.cmd"; then
-       input_to_shortpath="${new_path}.cmd"
+      input_to_shortpath="${new_path}.cmd"
     else
       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of RC, which resolves as \"$new_path\", is invalid." >&5
 $as_echo "$as_me: The path of RC, which resolves as \"$new_path\", is invalid." >&6;}
@@ -23439,29 +23436,29 @@
     fi
 
     if test "x$new_path" = x; then
-        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of RC, which resolves as \"$complete\", is not found." >&5
+      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of RC, which resolves as \"$complete\", is not found." >&5
 $as_echo "$as_me: The path of RC, which resolves as \"$complete\", is not found." >&6;}
-        has_space=`$ECHO "$complete" | $GREP " "`
-        if test "x$has_space" != x; then
-          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
+      has_space=`$ECHO "$complete" | $GREP " "`
+      if test "x$has_space" != x; then
+        { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
 $as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
-        fi
-        as_fn_error $? "Cannot locate the the path of RC" "$LINENO" 5
       fi
+      as_fn_error $? "Cannot locate the the path of RC" "$LINENO" 5
+    fi
   fi
 
-      # Now join together the path and the arguments once again
-      if test "x$arguments" != xEOL; then
-        new_complete="$new_path ${arguments% *}"
-      else
-        new_complete="$new_path"
-      fi
+  # Now join together the path and the arguments once again
+  if test "x$arguments" != xEOL; then
+    new_complete="$new_path ${arguments% *}"
+  else
+    new_complete="$new_path"
+  fi
 
   if test "x$complete" != "x$new_complete"; then
-      RC="$new_complete"
-      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting RC to \"$new_complete\"" >&5
+    RC="$new_complete"
+    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting RC to \"$new_complete\"" >&5
 $as_echo "$as_me: Rewriting RC to \"$new_complete\"" >&6;}
-    fi
+  fi
 
 
     # For hotspot, we need these in Windows mixed path,
@@ -23516,26 +23513,26 @@
     RC_FLAGS="-nologo -l 0x409 -r"
     if test "x$VARIANT" = xOPT; then :
 
-        RC_FLAGS="$RC_FLAGS -d NDEBUG"
+    RC_FLAGS="$RC_FLAGS -d NDEBUG"
 
 fi
 
-    # The version variables used to create RC_FLAGS may be overridden
-    # in a custom configure script, or possibly the command line.
-    # Let those variables be expanded at make time in spec.gmk.
-    # The \$ are escaped to the shell, and the $(...) variables
-    # are evaluated by make.
-    RC_FLAGS="$RC_FLAGS \
-        -d \"JDK_BUILD_ID=\$(FULL_VERSION)\" \
-        -d \"JDK_COMPANY=\$(COMPANY_NAME)\" \
-        -d \"JDK_COMPONENT=\$(PRODUCT_NAME) \$(JDK_RC_PLATFORM_NAME) binary\" \
-        -d \"JDK_VER=\$(JDK_MINOR_VERSION).\$(JDK_MICRO_VERSION).\$(if \$(JDK_UPDATE_VERSION),\$(JDK_UPDATE_VERSION),0).\$(COOKED_BUILD_NUMBER)\" \
-        -d \"JDK_COPYRIGHT=Copyright \xA9 $COPYRIGHT_YEAR\" \
-        -d \"JDK_NAME=\$(PRODUCT_NAME) \$(JDK_RC_PLATFORM_NAME) \$(JDK_MINOR_VERSION) \$(JDK_UPDATE_META_TAG)\" \
-        -d \"JDK_FVER=\$(JDK_MINOR_VERSION),\$(JDK_MICRO_VERSION),\$(if \$(JDK_UPDATE_VERSION),\$(JDK_UPDATE_VERSION),0),\$(COOKED_BUILD_NUMBER)\""
+  # The version variables used to create RC_FLAGS may be overridden
+  # in a custom configure script, or possibly the command line.
+  # Let those variables be expanded at make time in spec.gmk.
+  # The \$ are escaped to the shell, and the $(...) variables
+  # are evaluated by make.
+  RC_FLAGS="$RC_FLAGS \
+      -d \"JDK_BUILD_ID=\$(FULL_VERSION)\" \
+      -d \"JDK_COMPANY=\$(COMPANY_NAME)\" \
+      -d \"JDK_COMPONENT=\$(PRODUCT_NAME) \$(JDK_RC_PLATFORM_NAME) binary\" \
+      -d \"JDK_VER=\$(JDK_MINOR_VERSION).\$(JDK_MICRO_VERSION).\$(if \$(JDK_UPDATE_VERSION),\$(JDK_UPDATE_VERSION),0).\$(COOKED_BUILD_NUMBER)\" \
+      -d \"JDK_COPYRIGHT=Copyright \xA9 $COPYRIGHT_YEAR\" \
+      -d \"JDK_NAME=\$(PRODUCT_NAME) \$(JDK_RC_PLATFORM_NAME) \$(JDK_MINOR_VERSION) \$(JDK_UPDATE_META_TAG)\" \
+      -d \"JDK_FVER=\$(JDK_MINOR_VERSION),\$(JDK_MICRO_VERSION),\$(if \$(JDK_UPDATE_VERSION),\$(JDK_UPDATE_VERSION),0),\$(COOKED_BUILD_NUMBER)\""
 
-    # lib.exe is used to create static libraries.
-    # Extract the first word of "lib", so it can be a program name with args.
+  # lib.exe is used to create static libraries.
+  # Extract the first word of "lib", so it can be a program name with args.
 set dummy lib; ac_word=$2
 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
 $as_echo_n "checking for $ac_word... " >&6; }
@@ -23591,8 +23588,8 @@
   # bat and cmd files are not always considered executable in cygwin causing which
   # to not find them
   if test "x$new_path" = x \
-           && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
-           && test "x`$LS \"$path\" 2>/dev/null`" != x; then
+      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
+      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
     new_path=`$CYGPATH -u "$path"`
   fi
   if test "x$new_path" = x; then
@@ -23607,8 +23604,8 @@
     # bat and cmd files are not always considered executable in cygwin causing which
     # to not find them
     if test "x$new_path" = x \
-             && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
-             && test "x`$LS \"$path\" 2>/dev/null`" != x; then
+        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
+        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
       new_path=`$CYGPATH -u "$path"`
     fi
     if test "x$new_path" = x; then
@@ -23636,9 +23633,9 @@
     # Short path failed, file does not exist as specified.
     # Try adding .exe or .cmd
     if test -f "${new_path}.exe"; then
-       input_to_shortpath="${new_path}.exe"
+      input_to_shortpath="${new_path}.exe"
     elif test -f "${new_path}.cmd"; then
-       input_to_shortpath="${new_path}.cmd"
+      input_to_shortpath="${new_path}.cmd"
     else
       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of WINAR, which resolves as \"$new_path\", is invalid." >&5
 $as_echo "$as_me: The path of WINAR, which resolves as \"$new_path\", is invalid." >&6;}
@@ -23814,34 +23811,34 @@
     fi
 
     if test "x$new_path" = x; then
-        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of WINAR, which resolves as \"$complete\", is not found." >&5
+      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of WINAR, which resolves as \"$complete\", is not found." >&5
 $as_echo "$as_me: The path of WINAR, which resolves as \"$complete\", is not found." >&6;}
-        has_space=`$ECHO "$complete" | $GREP " "`
-        if test "x$has_space" != x; then
-          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
+      has_space=`$ECHO "$complete" | $GREP " "`
+      if test "x$has_space" != x; then
+        { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
 $as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
-        fi
-        as_fn_error $? "Cannot locate the the path of WINAR" "$LINENO" 5
       fi
+      as_fn_error $? "Cannot locate the the path of WINAR" "$LINENO" 5
+    fi
   fi
 
-      # Now join together the path and the arguments once again
-      if test "x$arguments" != xEOL; then
-        new_complete="$new_path ${arguments% *}"
-      else
-        new_complete="$new_path"
-      fi
+  # Now join together the path and the arguments once again
+  if test "x$arguments" != xEOL; then
+    new_complete="$new_path ${arguments% *}"
+  else
+    new_complete="$new_path"
+  fi
 
   if test "x$complete" != "x$new_complete"; then
-      WINAR="$new_complete"
-      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting WINAR to \"$new_complete\"" >&5
+    WINAR="$new_complete"
+    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting WINAR to \"$new_complete\"" >&5
 $as_echo "$as_me: Rewriting WINAR to \"$new_complete\"" >&6;}
-    fi
+  fi
 
-    AR="$WINAR"
-    ARFLAGS="-nologo -NODEFAULTLIB:MSVCRT"
+  AR="$WINAR"
+  ARFLAGS="-nologo -NODEFAULTLIB:MSVCRT"
 
-    # Extract the first word of "dumpbin", so it can be a program name with args.
+  # Extract the first word of "dumpbin", so it can be a program name with args.
 set dummy dumpbin; ac_word=$2
 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
 $as_echo_n "checking for $ac_word... " >&6; }
@@ -23897,8 +23894,8 @@
   # bat and cmd files are not always considered executable in cygwin causing which
   # to not find them
   if test "x$new_path" = x \
-           && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
-           && test "x`$LS \"$path\" 2>/dev/null`" != x; then
+      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
+      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
     new_path=`$CYGPATH -u "$path"`
   fi
   if test "x$new_path" = x; then
@@ -23913,8 +23910,8 @@
     # bat and cmd files are not always considered executable in cygwin causing which
     # to not find them
     if test "x$new_path" = x \
-             && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
-             && test "x`$LS \"$path\" 2>/dev/null`" != x; then
+        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
+        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
       new_path=`$CYGPATH -u "$path"`
     fi
     if test "x$new_path" = x; then
@@ -23942,9 +23939,9 @@
     # Short path failed, file does not exist as specified.
     # Try adding .exe or .cmd
     if test -f "${new_path}.exe"; then
-       input_to_shortpath="${new_path}.exe"
+      input_to_shortpath="${new_path}.exe"
     elif test -f "${new_path}.cmd"; then
-       input_to_shortpath="${new_path}.cmd"
+      input_to_shortpath="${new_path}.cmd"
     else
       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of DUMPBIN, which resolves as \"$new_path\", is invalid." >&5
 $as_echo "$as_me: The path of DUMPBIN, which resolves as \"$new_path\", is invalid." >&6;}
@@ -24120,39 +24117,39 @@
     fi
 
     if test "x$new_path" = x; then
-        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of DUMPBIN, which resolves as \"$complete\", is not found." >&5
+      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of DUMPBIN, which resolves as \"$complete\", is not found." >&5
 $as_echo "$as_me: The path of DUMPBIN, which resolves as \"$complete\", is not found." >&6;}
-        has_space=`$ECHO "$complete" | $GREP " "`
-        if test "x$has_space" != x; then
-          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
+      has_space=`$ECHO "$complete" | $GREP " "`
+      if test "x$has_space" != x; then
+        { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
 $as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
-        fi
-        as_fn_error $? "Cannot locate the the path of DUMPBIN" "$LINENO" 5
       fi
+      as_fn_error $? "Cannot locate the the path of DUMPBIN" "$LINENO" 5
+    fi
   fi
 
-      # Now join together the path and the arguments once again
-      if test "x$arguments" != xEOL; then
-        new_complete="$new_path ${arguments% *}"
-      else
-        new_complete="$new_path"
-      fi
+  # Now join together the path and the arguments once again
+  if test "x$arguments" != xEOL; then
+    new_complete="$new_path ${arguments% *}"
+  else
+    new_complete="$new_path"
+  fi
 
   if test "x$complete" != "x$new_complete"; then
-      DUMPBIN="$new_complete"
-      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting DUMPBIN to \"$new_complete\"" >&5
+    DUMPBIN="$new_complete"
+    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting DUMPBIN to \"$new_complete\"" >&5
 $as_echo "$as_me: Rewriting DUMPBIN to \"$new_complete\"" >&6;}
-    fi
+  fi
 
 
-    COMPILER_TYPE=CL
-    CCXXFLAGS="$CCXXFLAGS -nologo"
+      COMPILER_TYPE=CL
+      CCXXFLAGS="$CCXXFLAGS -nologo"
 
 fi
 
 
 
-ac_ext=c
+  ac_ext=c
 ac_cpp='$CPP $CPPFLAGS'
 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
@@ -24308,8 +24305,8 @@
   # bat and cmd files are not always considered executable in cygwin causing which
   # to not find them
   if test "x$new_path" = x \
-           && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
-           && test "x`$LS \"$path\" 2>/dev/null`" != x; then
+      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
+      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
     new_path=`$CYGPATH -u "$path"`
   fi
   if test "x$new_path" = x; then
@@ -24324,8 +24321,8 @@
     # bat and cmd files are not always considered executable in cygwin causing which
     # to not find them
     if test "x$new_path" = x \
-             && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
-             && test "x`$LS \"$path\" 2>/dev/null`" != x; then
+        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
+        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
       new_path=`$CYGPATH -u "$path"`
     fi
     if test "x$new_path" = x; then
@@ -24353,9 +24350,9 @@
     # Short path failed, file does not exist as specified.
     # Try adding .exe or .cmd
     if test -f "${new_path}.exe"; then
-       input_to_shortpath="${new_path}.exe"
+      input_to_shortpath="${new_path}.exe"
     elif test -f "${new_path}.cmd"; then
-       input_to_shortpath="${new_path}.cmd"
+      input_to_shortpath="${new_path}.cmd"
     else
       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CPP, which resolves as \"$new_path\", is invalid." >&5
 $as_echo "$as_me: The path of CPP, which resolves as \"$new_path\", is invalid." >&6;}
@@ -24531,32 +24528,32 @@
     fi
 
     if test "x$new_path" = x; then
-        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CPP, which resolves as \"$complete\", is not found." >&5
+      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CPP, which resolves as \"$complete\", is not found." >&5
 $as_echo "$as_me: The path of CPP, which resolves as \"$complete\", is not found." >&6;}
-        has_space=`$ECHO "$complete" | $GREP " "`
-        if test "x$has_space" != x; then
-          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
+      has_space=`$ECHO "$complete" | $GREP " "`
+      if test "x$has_space" != x; then
+        { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
 $as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
-        fi
-        as_fn_error $? "Cannot locate the the path of CPP" "$LINENO" 5
       fi
+      as_fn_error $? "Cannot locate the the path of CPP" "$LINENO" 5
+    fi
   fi
 
-      # Now join together the path and the arguments once again
-      if test "x$arguments" != xEOL; then
-        new_complete="$new_path ${arguments% *}"
-      else
-        new_complete="$new_path"
-      fi
+  # Now join together the path and the arguments once again
+  if test "x$arguments" != xEOL; then
+    new_complete="$new_path ${arguments% *}"
+  else
+    new_complete="$new_path"
+  fi
 
   if test "x$complete" != "x$new_complete"; then
-      CPP="$new_complete"
-      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting CPP to \"$new_complete\"" >&5
+    CPP="$new_complete"
+    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting CPP to \"$new_complete\"" >&5
 $as_echo "$as_me: Rewriting CPP to \"$new_complete\"" >&6;}
-    fi
+  fi
 
 
-ac_ext=cpp
+  ac_ext=cpp
 ac_cpp='$CXXCPP $CPPFLAGS'
 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
@@ -24708,8 +24705,8 @@
   # bat and cmd files are not always considered executable in cygwin causing which
   # to not find them
   if test "x$new_path" = x \
-           && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
-           && test "x`$LS \"$path\" 2>/dev/null`" != x; then
+      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
+      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
     new_path=`$CYGPATH -u "$path"`
   fi
   if test "x$new_path" = x; then
@@ -24724,8 +24721,8 @@
     # bat and cmd files are not always considered executable in cygwin causing which
     # to not find them
     if test "x$new_path" = x \
-             && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
-             && test "x`$LS \"$path\" 2>/dev/null`" != x; then
+        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
+        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
       new_path=`$CYGPATH -u "$path"`
     fi
     if test "x$new_path" = x; then
@@ -24753,9 +24750,9 @@
     # Short path failed, file does not exist as specified.
     # Try adding .exe or .cmd
     if test -f "${new_path}.exe"; then
-       input_to_shortpath="${new_path}.exe"
+      input_to_shortpath="${new_path}.exe"
     elif test -f "${new_path}.cmd"; then
-       input_to_shortpath="${new_path}.cmd"
+      input_to_shortpath="${new_path}.cmd"
     else
       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CXXCPP, which resolves as \"$new_path\", is invalid." >&5
 $as_echo "$as_me: The path of CXXCPP, which resolves as \"$new_path\", is invalid." >&6;}
@@ -24931,32 +24928,32 @@
     fi
 
     if test "x$new_path" = x; then
-        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CXXCPP, which resolves as \"$complete\", is not found." >&5
+      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CXXCPP, which resolves as \"$complete\", is not found." >&5
 $as_echo "$as_me: The path of CXXCPP, which resolves as \"$complete\", is not found." >&6;}
-        has_space=`$ECHO "$complete" | $GREP " "`
-        if test "x$has_space" != x; then
-          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
+      has_space=`$ECHO "$complete" | $GREP " "`
+      if test "x$has_space" != x; then
+        { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
 $as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
-        fi
-        as_fn_error $? "Cannot locate the the path of CXXCPP" "$LINENO" 5
       fi
+      as_fn_error $? "Cannot locate the the path of CXXCPP" "$LINENO" 5
+    fi
   fi
 
-      # Now join together the path and the arguments once again
-      if test "x$arguments" != xEOL; then
-        new_complete="$new_path ${arguments% *}"
-      else
-        new_complete="$new_path"
-      fi
+  # Now join together the path and the arguments once again
+  if test "x$arguments" != xEOL; then
+    new_complete="$new_path ${arguments% *}"
+  else
+    new_complete="$new_path"
+  fi
 
   if test "x$complete" != "x$new_complete"; then
-      CXXCPP="$new_complete"
-      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting CXXCPP to \"$new_complete\"" >&5
+    CXXCPP="$new_complete"
+    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting CXXCPP to \"$new_complete\"" >&5
 $as_echo "$as_me: Rewriting CXXCPP to \"$new_complete\"" >&6;}
-    fi
+  fi
 
 
-if test "x$COMPILE_TYPE" != "xcross"; then
+  if test "x$COMPILE_TYPE" != "xcross"; then
     # If we are not cross compiling, use the same compilers for
     # building the build platform executables. The cross-compilation
     # case needed to be done earlier, but this can only be done after
@@ -24964,20 +24961,20 @@
     BUILD_CC="$CC"
     BUILD_CXX="$CXX"
     BUILD_LD="$LD"
-fi
+  fi
 
-# for solaris we really need solaris tools, and not gnu equivalent
-#   these seems to normally reside in /usr/ccs/bin so add that to path before
-#   starting to probe
-#
-#   NOTE: I add this /usr/ccs/bin after TOOLS but before OLD_PATH
-#         so that it can be overriden --with-tools-dir
-if test "x$OPENJDK_BUILD_OS" = xsolaris; then
+  # for solaris we really need solaris tools, and not gnu equivalent
+  #   these seems to normally reside in /usr/ccs/bin so add that to path before
+  #   starting to probe
+  #
+  #   NOTE: I add this /usr/ccs/bin after TOOLS but before OLD_PATH
+  #         so that it can be overriden --with-tools-dir
+  if test "x$OPENJDK_BUILD_OS" = xsolaris; then
     PATH="${TOOLS_DIR}:/usr/ccs/bin:${OLD_PATH}"
-fi
+  fi
 
-# Find the right assembler.
-if test "x$OPENJDK_TARGET_OS" = xsolaris; then
+  # Find the right assembler.
+  if test "x$OPENJDK_TARGET_OS" = xsolaris; then
     # Extract the first word of "as", so it can be a program name with args.
 set dummy as; ac_word=$2
 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
@@ -25037,8 +25034,8 @@
   # bat and cmd files are not always considered executable in cygwin causing which
   # to not find them
   if test "x$new_path" = x \
-           && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
-           && test "x`$LS \"$path\" 2>/dev/null`" != x; then
+      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
+      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
     new_path=`$CYGPATH -u "$path"`
   fi
   if test "x$new_path" = x; then
@@ -25053,8 +25050,8 @@
     # bat and cmd files are not always considered executable in cygwin causing which
     # to not find them
     if test "x$new_path" = x \
-             && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
-             && test "x`$LS \"$path\" 2>/dev/null`" != x; then
+        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
+        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
       new_path=`$CYGPATH -u "$path"`
     fi
     if test "x$new_path" = x; then
@@ -25082,9 +25079,9 @@
     # Short path failed, file does not exist as specified.
     # Try adding .exe or .cmd
     if test -f "${new_path}.exe"; then
-       input_to_shortpath="${new_path}.exe"
+      input_to_shortpath="${new_path}.exe"
     elif test -f "${new_path}.cmd"; then
-       input_to_shortpath="${new_path}.cmd"
+      input_to_shortpath="${new_path}.cmd"
     else
       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of AS, which resolves as \"$new_path\", is invalid." >&5
 $as_echo "$as_me: The path of AS, which resolves as \"$new_path\", is invalid." >&6;}
@@ -25260,36 +25257,36 @@
     fi
 
     if test "x$new_path" = x; then
-        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of AS, which resolves as \"$complete\", is not found." >&5
+      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of AS, which resolves as \"$complete\", is not found." >&5
 $as_echo "$as_me: The path of AS, which resolves as \"$complete\", is not found." >&6;}
-        has_space=`$ECHO "$complete" | $GREP " "`
-        if test "x$has_space" != x; then
-          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
+      has_space=`$ECHO "$complete" | $GREP " "`
+      if test "x$has_space" != x; then
+        { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
 $as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
-        fi
-        as_fn_error $? "Cannot locate the the path of AS" "$LINENO" 5
       fi
+      as_fn_error $? "Cannot locate the the path of AS" "$LINENO" 5
+    fi
   fi
 
-      # Now join together the path and the arguments once again
-      if test "x$arguments" != xEOL; then
-        new_complete="$new_path ${arguments% *}"
-      else
-        new_complete="$new_path"
-      fi
+  # Now join together the path and the arguments once again
+  if test "x$arguments" != xEOL; then
+    new_complete="$new_path ${arguments% *}"
+  else
+    new_complete="$new_path"
+  fi
 
   if test "x$complete" != "x$new_complete"; then
-      AS="$new_complete"
-      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting AS to \"$new_complete\"" >&5
+    AS="$new_complete"
+    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting AS to \"$new_complete\"" >&5
 $as_echo "$as_me: Rewriting AS to \"$new_complete\"" >&6;}
-    fi
+  fi
 
-else
+  else
     AS="$CC -c"
-fi
+  fi
 
 
-if test "x$OPENJDK_TARGET_OS" = xsolaris; then
+  if test "x$OPENJDK_TARGET_OS" = xsolaris; then
     # Extract the first word of "nm", so it can be a program name with args.
 set dummy nm; ac_word=$2
 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
@@ -25349,8 +25346,8 @@
   # bat and cmd files are not always considered executable in cygwin causing which
   # to not find them
   if test "x$new_path" = x \
-           && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
-           && test "x`$LS \"$path\" 2>/dev/null`" != x; then
+      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
+      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
     new_path=`$CYGPATH -u "$path"`
   fi
   if test "x$new_path" = x; then
@@ -25365,8 +25362,8 @@
     # bat and cmd files are not always considered executable in cygwin causing which
     # to not find them
     if test "x$new_path" = x \
-             && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
-             && test "x`$LS \"$path\" 2>/dev/null`" != x; then
+        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
+        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
       new_path=`$CYGPATH -u "$path"`
     fi
     if test "x$new_path" = x; then
@@ -25394,9 +25391,9 @@
     # Short path failed, file does not exist as specified.
     # Try adding .exe or .cmd
     if test -f "${new_path}.exe"; then
-       input_to_shortpath="${new_path}.exe"
+      input_to_shortpath="${new_path}.exe"
     elif test -f "${new_path}.cmd"; then
-       input_to_shortpath="${new_path}.cmd"
+      input_to_shortpath="${new_path}.cmd"
     else
       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of NM, which resolves as \"$new_path\", is invalid." >&5
 $as_echo "$as_me: The path of NM, which resolves as \"$new_path\", is invalid." >&6;}
@@ -25572,29 +25569,29 @@
     fi
 
     if test "x$new_path" = x; then
-        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of NM, which resolves as \"$complete\", is not found." >&5
+      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of NM, which resolves as \"$complete\", is not found." >&5
 $as_echo "$as_me: The path of NM, which resolves as \"$complete\", is not found." >&6;}
-        has_space=`$ECHO "$complete" | $GREP " "`
-        if test "x$has_space" != x; then
-          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
+      has_space=`$ECHO "$complete" | $GREP " "`
+      if test "x$has_space" != x; then
+        { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
 $as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
-        fi
-        as_fn_error $? "Cannot locate the the path of NM" "$LINENO" 5
       fi
+      as_fn_error $? "Cannot locate the the path of NM" "$LINENO" 5
+    fi
   fi
 
-      # Now join together the path and the arguments once again
-      if test "x$arguments" != xEOL; then
-        new_complete="$new_path ${arguments% *}"
-      else
-        new_complete="$new_path"
-      fi
+  # Now join together the path and the arguments once again
+  if test "x$arguments" != xEOL; then
+    new_complete="$new_path ${arguments% *}"
+  else
+    new_complete="$new_path"
+  fi
 
   if test "x$complete" != "x$new_complete"; then
-      NM="$new_complete"
-      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting NM to \"$new_complete\"" >&5
+    NM="$new_complete"
+    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting NM to \"$new_complete\"" >&5
 $as_echo "$as_me: Rewriting NM to \"$new_complete\"" >&6;}
-    fi
+  fi
 
     # Extract the first word of "gnm", so it can be a program name with args.
 set dummy gnm; ac_word=$2
@@ -25655,8 +25652,8 @@
   # bat and cmd files are not always considered executable in cygwin causing which
   # to not find them
   if test "x$new_path" = x \
-           && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
-           && test "x`$LS \"$path\" 2>/dev/null`" != x; then
+      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
+      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
     new_path=`$CYGPATH -u "$path"`
   fi
   if test "x$new_path" = x; then
@@ -25671,8 +25668,8 @@
     # bat and cmd files are not always considered executable in cygwin causing which
     # to not find them
     if test "x$new_path" = x \
-             && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
-             && test "x`$LS \"$path\" 2>/dev/null`" != x; then
+        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
+        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
       new_path=`$CYGPATH -u "$path"`
     fi
     if test "x$new_path" = x; then
@@ -25700,9 +25697,9 @@
     # Short path failed, file does not exist as specified.
     # Try adding .exe or .cmd
     if test -f "${new_path}.exe"; then
-       input_to_shortpath="${new_path}.exe"
+      input_to_shortpath="${new_path}.exe"
     elif test -f "${new_path}.cmd"; then
-       input_to_shortpath="${new_path}.cmd"
+      input_to_shortpath="${new_path}.cmd"
     else
       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of GNM, which resolves as \"$new_path\", is invalid." >&5
 $as_echo "$as_me: The path of GNM, which resolves as \"$new_path\", is invalid." >&6;}
@@ -25878,29 +25875,29 @@
     fi
 
     if test "x$new_path" = x; then
-        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of GNM, which resolves as \"$complete\", is not found." >&5
+      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of GNM, which resolves as \"$complete\", is not found." >&5
 $as_echo "$as_me: The path of GNM, which resolves as \"$complete\", is not found." >&6;}
-        has_space=`$ECHO "$complete" | $GREP " "`
-        if test "x$has_space" != x; then
-          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
+      has_space=`$ECHO "$complete" | $GREP " "`
+      if test "x$has_space" != x; then
+        { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
 $as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
-        fi
-        as_fn_error $? "Cannot locate the the path of GNM" "$LINENO" 5
       fi
+      as_fn_error $? "Cannot locate the the path of GNM" "$LINENO" 5
+    fi
   fi
 
-      # Now join together the path and the arguments once again
-      if test "x$arguments" != xEOL; then
-        new_complete="$new_path ${arguments% *}"
-      else
-        new_complete="$new_path"
-      fi
+  # Now join together the path and the arguments once again
+  if test "x$arguments" != xEOL; then
+    new_complete="$new_path ${arguments% *}"
+  else
+    new_complete="$new_path"
+  fi
 
   if test "x$complete" != "x$new_complete"; then
-      GNM="$new_complete"
-      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting GNM to \"$new_complete\"" >&5
+    GNM="$new_complete"
+    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting GNM to \"$new_complete\"" >&5
 $as_echo "$as_me: Rewriting GNM to \"$new_complete\"" >&6;}
-    fi
+  fi
 
     # Extract the first word of "strip", so it can be a program name with args.
 set dummy strip; ac_word=$2
@@ -25961,8 +25958,8 @@
   # bat and cmd files are not always considered executable in cygwin causing which
   # to not find them
   if test "x$new_path" = x \
-           && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
-           && test "x`$LS \"$path\" 2>/dev/null`" != x; then
+      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
+      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
     new_path=`$CYGPATH -u "$path"`
   fi
   if test "x$new_path" = x; then
@@ -25977,8 +25974,8 @@
     # bat and cmd files are not always considered executable in cygwin causing which
     # to not find them
     if test "x$new_path" = x \
-             && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
-             && test "x`$LS \"$path\" 2>/dev/null`" != x; then
+        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
+        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
       new_path=`$CYGPATH -u "$path"`
     fi
     if test "x$new_path" = x; then
@@ -26006,9 +26003,9 @@
     # Short path failed, file does not exist as specified.
     # Try adding .exe or .cmd
     if test -f "${new_path}.exe"; then
-       input_to_shortpath="${new_path}.exe"
+      input_to_shortpath="${new_path}.exe"
     elif test -f "${new_path}.cmd"; then
-       input_to_shortpath="${new_path}.cmd"
+      input_to_shortpath="${new_path}.cmd"
     else
       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of STRIP, which resolves as \"$new_path\", is invalid." >&5
 $as_echo "$as_me: The path of STRIP, which resolves as \"$new_path\", is invalid." >&6;}
@@ -26184,29 +26181,29 @@
     fi
 
     if test "x$new_path" = x; then
-        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of STRIP, which resolves as \"$complete\", is not found." >&5
+      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of STRIP, which resolves as \"$complete\", is not found." >&5
 $as_echo "$as_me: The path of STRIP, which resolves as \"$complete\", is not found." >&6;}
-        has_space=`$ECHO "$complete" | $GREP " "`
-        if test "x$has_space" != x; then
-          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
+      has_space=`$ECHO "$complete" | $GREP " "`
+      if test "x$has_space" != x; then
+        { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
 $as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
-        fi
-        as_fn_error $? "Cannot locate the the path of STRIP" "$LINENO" 5
       fi
+      as_fn_error $? "Cannot locate the the path of STRIP" "$LINENO" 5
+    fi
   fi
 
-      # Now join together the path and the arguments once again
-      if test "x$arguments" != xEOL; then
-        new_complete="$new_path ${arguments% *}"
-      else
-        new_complete="$new_path"
-      fi
+  # Now join together the path and the arguments once again
+  if test "x$arguments" != xEOL; then
+    new_complete="$new_path ${arguments% *}"
+  else
+    new_complete="$new_path"
+  fi
 
   if test "x$complete" != "x$new_complete"; then
-      STRIP="$new_complete"
-      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting STRIP to \"$new_complete\"" >&5
+    STRIP="$new_complete"
+    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting STRIP to \"$new_complete\"" >&5
 $as_echo "$as_me: Rewriting STRIP to \"$new_complete\"" >&6;}
-    fi
+  fi
 
     # Extract the first word of "mcs", so it can be a program name with args.
 set dummy mcs; ac_word=$2
@@ -26267,8 +26264,8 @@
   # bat and cmd files are not always considered executable in cygwin causing which
   # to not find them
   if test "x$new_path" = x \
-           && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
-           && test "x`$LS \"$path\" 2>/dev/null`" != x; then
+      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
+      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
     new_path=`$CYGPATH -u "$path"`
   fi
   if test "x$new_path" = x; then
@@ -26283,8 +26280,8 @@
     # bat and cmd files are not always considered executable in cygwin causing which
     # to not find them
     if test "x$new_path" = x \
-             && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
-             && test "x`$LS \"$path\" 2>/dev/null`" != x; then
+        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
+        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
       new_path=`$CYGPATH -u "$path"`
     fi
     if test "x$new_path" = x; then
@@ -26312,9 +26309,9 @@
     # Short path failed, file does not exist as specified.
     # Try adding .exe or .cmd
     if test -f "${new_path}.exe"; then
-       input_to_shortpath="${new_path}.exe"
+      input_to_shortpath="${new_path}.exe"
     elif test -f "${new_path}.cmd"; then
-       input_to_shortpath="${new_path}.cmd"
+      input_to_shortpath="${new_path}.cmd"
     else
       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MCS, which resolves as \"$new_path\", is invalid." >&5
 $as_echo "$as_me: The path of MCS, which resolves as \"$new_path\", is invalid." >&6;}
@@ -26490,31 +26487,31 @@
     fi
 
     if test "x$new_path" = x; then
-        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MCS, which resolves as \"$complete\", is not found." >&5
+      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MCS, which resolves as \"$complete\", is not found." >&5
 $as_echo "$as_me: The path of MCS, which resolves as \"$complete\", is not found." >&6;}
-        has_space=`$ECHO "$complete" | $GREP " "`
-        if test "x$has_space" != x; then
-          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
+      has_space=`$ECHO "$complete" | $GREP " "`
+      if test "x$has_space" != x; then
+        { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
 $as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
-        fi
-        as_fn_error $? "Cannot locate the the path of MCS" "$LINENO" 5
       fi
+      as_fn_error $? "Cannot locate the the path of MCS" "$LINENO" 5
+    fi
   fi
 
-      # Now join together the path and the arguments once again
-      if test "x$arguments" != xEOL; then
-        new_complete="$new_path ${arguments% *}"
-      else
-        new_complete="$new_path"
-      fi
+  # Now join together the path and the arguments once again
+  if test "x$arguments" != xEOL; then
+    new_complete="$new_path ${arguments% *}"
+  else
+    new_complete="$new_path"
+  fi
 
   if test "x$complete" != "x$new_complete"; then
-      MCS="$new_complete"
-      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MCS to \"$new_complete\"" >&5
+    MCS="$new_complete"
+    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MCS to \"$new_complete\"" >&5
 $as_echo "$as_me: Rewriting MCS to \"$new_complete\"" >&6;}
-    fi
+  fi
 
-elif test "x$OPENJDK_TARGET_OS" != xwindows; then
+  elif test "x$OPENJDK_TARGET_OS" != xwindows; then
     if test -n "$ac_tool_prefix"; then
   # Extract the first word of "${ac_tool_prefix}nm", so it can be a program name with args.
 set dummy ${ac_tool_prefix}nm; ac_word=$2
@@ -26626,8 +26623,8 @@
   # bat and cmd files are not always considered executable in cygwin causing which
   # to not find them
   if test "x$new_path" = x \
-           && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
-           && test "x`$LS \"$path\" 2>/dev/null`" != x; then
+      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
+      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
     new_path=`$CYGPATH -u "$path"`
   fi
   if test "x$new_path" = x; then
@@ -26642,8 +26639,8 @@
     # bat and cmd files are not always considered executable in cygwin causing which
     # to not find them
     if test "x$new_path" = x \
-             && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
-             && test "x`$LS \"$path\" 2>/dev/null`" != x; then
+        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
+        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
       new_path=`$CYGPATH -u "$path"`
     fi
     if test "x$new_path" = x; then
@@ -26671,9 +26668,9 @@
     # Short path failed, file does not exist as specified.
     # Try adding .exe or .cmd
     if test -f "${new_path}.exe"; then
-       input_to_shortpath="${new_path}.exe"
+      input_to_shortpath="${new_path}.exe"
     elif test -f "${new_path}.cmd"; then
-       input_to_shortpath="${new_path}.cmd"
+      input_to_shortpath="${new_path}.cmd"
     else
       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of NM, which resolves as \"$new_path\", is invalid." >&5
 $as_echo "$as_me: The path of NM, which resolves as \"$new_path\", is invalid." >&6;}
@@ -26849,29 +26846,29 @@
     fi
 
     if test "x$new_path" = x; then
-        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of NM, which resolves as \"$complete\", is not found." >&5
+      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of NM, which resolves as \"$complete\", is not found." >&5
 $as_echo "$as_me: The path of NM, which resolves as \"$complete\", is not found." >&6;}
-        has_space=`$ECHO "$complete" | $GREP " "`
-        if test "x$has_space" != x; then
-          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
+      has_space=`$ECHO "$complete" | $GREP " "`
+      if test "x$has_space" != x; then
+        { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
 $as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
-        fi
-        as_fn_error $? "Cannot locate the the path of NM" "$LINENO" 5
       fi
+      as_fn_error $? "Cannot locate the the path of NM" "$LINENO" 5
+    fi
   fi
 
-      # Now join together the path and the arguments once again
-      if test "x$arguments" != xEOL; then
-        new_complete="$new_path ${arguments% *}"
-      else
-        new_complete="$new_path"
-      fi
+  # Now join together the path and the arguments once again
+  if test "x$arguments" != xEOL; then
+    new_complete="$new_path ${arguments% *}"
+  else
+    new_complete="$new_path"
+  fi
 
   if test "x$complete" != "x$new_complete"; then
-      NM="$new_complete"
-      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting NM to \"$new_complete\"" >&5
+    NM="$new_complete"
+    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting NM to \"$new_complete\"" >&5
 $as_echo "$as_me: Rewriting NM to \"$new_complete\"" >&6;}
-    fi
+  fi
 
     GNM="$NM"
 
@@ -26986,8 +26983,8 @@
   # bat and cmd files are not always considered executable in cygwin causing which
   # to not find them
   if test "x$new_path" = x \
-           && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
-           && test "x`$LS \"$path\" 2>/dev/null`" != x; then
+      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
+      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
     new_path=`$CYGPATH -u "$path"`
   fi
   if test "x$new_path" = x; then
@@ -27002,8 +26999,8 @@
     # bat and cmd files are not always considered executable in cygwin causing which
     # to not find them
     if test "x$new_path" = x \
-             && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
-             && test "x`$LS \"$path\" 2>/dev/null`" != x; then
+        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
+        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
       new_path=`$CYGPATH -u "$path"`
     fi
     if test "x$new_path" = x; then
@@ -27031,9 +27028,9 @@
     # Short path failed, file does not exist as specified.
     # Try adding .exe or .cmd
     if test -f "${new_path}.exe"; then
-       input_to_shortpath="${new_path}.exe"
+      input_to_shortpath="${new_path}.exe"
     elif test -f "${new_path}.cmd"; then
-       input_to_shortpath="${new_path}.cmd"
+      input_to_shortpath="${new_path}.cmd"
     else
       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of STRIP, which resolves as \"$new_path\", is invalid." >&5
 $as_echo "$as_me: The path of STRIP, which resolves as \"$new_path\", is invalid." >&6;}
@@ -27209,35 +27206,35 @@
     fi
 
     if test "x$new_path" = x; then
-        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of STRIP, which resolves as \"$complete\", is not found." >&5
+      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of STRIP, which resolves as \"$complete\", is not found." >&5
 $as_echo "$as_me: The path of STRIP, which resolves as \"$complete\", is not found." >&6;}
-        has_space=`$ECHO "$complete" | $GREP " "`
-        if test "x$has_space" != x; then
-          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
+      has_space=`$ECHO "$complete" | $GREP " "`
+      if test "x$has_space" != x; then
+        { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
 $as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
-        fi
-        as_fn_error $? "Cannot locate the the path of STRIP" "$LINENO" 5
       fi
+      as_fn_error $? "Cannot locate the the path of STRIP" "$LINENO" 5
+    fi
   fi
 
-      # Now join together the path and the arguments once again
-      if test "x$arguments" != xEOL; then
-        new_complete="$new_path ${arguments% *}"
-      else
-        new_complete="$new_path"
-      fi
+  # Now join together the path and the arguments once again
+  if test "x$arguments" != xEOL; then
+    new_complete="$new_path ${arguments% *}"
+  else
+    new_complete="$new_path"
+  fi
 
   if test "x$complete" != "x$new_complete"; then
-      STRIP="$new_complete"
-      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting STRIP to \"$new_complete\"" >&5
+    STRIP="$new_complete"
+    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting STRIP to \"$new_complete\"" >&5
 $as_echo "$as_me: Rewriting STRIP to \"$new_complete\"" >&6;}
-    fi
+  fi
 
-fi
+  fi
 
-# objcopy is used for moving debug symbols to separate files when
-# full debug symbols are enabled.
-if test "x$OPENJDK_TARGET_OS" = xsolaris || test "x$OPENJDK_TARGET_OS" = xlinux; then
+  # objcopy is used for moving debug symbols to separate files when
+  # full debug symbols are enabled.
+  if test "x$OPENJDK_TARGET_OS" = xsolaris || test "x$OPENJDK_TARGET_OS" = xlinux; then
     if test -n "$ac_tool_prefix"; then
   for ac_prog in gobjcopy objcopy
   do
@@ -27359,8 +27356,8 @@
   # bat and cmd files are not always considered executable in cygwin causing which
   # to not find them
   if test "x$new_path" = x \
-           && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
-           && test "x`$LS \"$path\" 2>/dev/null`" != x; then
+      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
+      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
     new_path=`$CYGPATH -u "$path"`
   fi
   if test "x$new_path" = x; then
@@ -27375,8 +27372,8 @@
     # bat and cmd files are not always considered executable in cygwin causing which
     # to not find them
     if test "x$new_path" = x \
-             && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
-             && test "x`$LS \"$path\" 2>/dev/null`" != x; then
+        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
+        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
       new_path=`$CYGPATH -u "$path"`
     fi
     if test "x$new_path" = x; then
@@ -27404,9 +27401,9 @@
     # Short path failed, file does not exist as specified.
     # Try adding .exe or .cmd
     if test -f "${new_path}.exe"; then
-       input_to_shortpath="${new_path}.exe"
+      input_to_shortpath="${new_path}.exe"
     elif test -f "${new_path}.cmd"; then
-       input_to_shortpath="${new_path}.cmd"
+      input_to_shortpath="${new_path}.cmd"
     else
       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OBJCOPY, which resolves as \"$new_path\", is invalid." >&5
 $as_echo "$as_me: The path of OBJCOPY, which resolves as \"$new_path\", is invalid." >&6;}
@@ -27582,34 +27579,34 @@
     fi
 
     if test "x$new_path" = x; then
-        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OBJCOPY, which resolves as \"$complete\", is not found." >&5
+      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OBJCOPY, which resolves as \"$complete\", is not found." >&5
 $as_echo "$as_me: The path of OBJCOPY, which resolves as \"$complete\", is not found." >&6;}
-        has_space=`$ECHO "$complete" | $GREP " "`
-        if test "x$has_space" != x; then
-          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
+      has_space=`$ECHO "$complete" | $GREP " "`
+      if test "x$has_space" != x; then
+        { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
 $as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
-        fi
-        as_fn_error $? "Cannot locate the the path of OBJCOPY" "$LINENO" 5
       fi
+      as_fn_error $? "Cannot locate the the path of OBJCOPY" "$LINENO" 5
+    fi
   fi
 
-      # Now join together the path and the arguments once again
-      if test "x$arguments" != xEOL; then
-        new_complete="$new_path ${arguments% *}"
-      else
-        new_complete="$new_path"
-      fi
+  # Now join together the path and the arguments once again
+  if test "x$arguments" != xEOL; then
+    new_complete="$new_path ${arguments% *}"
+  else
+    new_complete="$new_path"
+  fi
 
   if test "x$complete" != "x$new_complete"; then
-      OBJCOPY="$new_complete"
-      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting OBJCOPY to \"$new_complete\"" >&5
+    OBJCOPY="$new_complete"
+    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting OBJCOPY to \"$new_complete\"" >&5
 $as_echo "$as_me: Rewriting OBJCOPY to \"$new_complete\"" >&6;}
-    fi
+  fi
 
     fi
-fi
+  fi
 
-if test -n "$ac_tool_prefix"; then
+  if test -n "$ac_tool_prefix"; then
   for ac_prog in gobjdump objdump
   do
     # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
@@ -27709,8 +27706,8 @@
   fi
 fi
 
-if test "x$OBJDUMP" != x; then
-  # Only used for compare.sh; we can live without it. BASIC_FIXUP_EXECUTABLE bails if argument is missing.
+  if test "x$OBJDUMP" != x; then
+    # Only used for compare.sh; we can live without it. BASIC_FIXUP_EXECUTABLE bails if argument is missing.
 
   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
 
@@ -27730,8 +27727,8 @@
   # bat and cmd files are not always considered executable in cygwin causing which
   # to not find them
   if test "x$new_path" = x \
-           && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
-           && test "x`$LS \"$path\" 2>/dev/null`" != x; then
+      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
+      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
     new_path=`$CYGPATH -u "$path"`
   fi
   if test "x$new_path" = x; then
@@ -27746,8 +27743,8 @@
     # bat and cmd files are not always considered executable in cygwin causing which
     # to not find them
     if test "x$new_path" = x \
-             && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
-             && test "x`$LS \"$path\" 2>/dev/null`" != x; then
+        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
+        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
       new_path=`$CYGPATH -u "$path"`
     fi
     if test "x$new_path" = x; then
@@ -27775,9 +27772,9 @@
     # Short path failed, file does not exist as specified.
     # Try adding .exe or .cmd
     if test -f "${new_path}.exe"; then
-       input_to_shortpath="${new_path}.exe"
+      input_to_shortpath="${new_path}.exe"
     elif test -f "${new_path}.cmd"; then
-       input_to_shortpath="${new_path}.cmd"
+      input_to_shortpath="${new_path}.cmd"
     else
       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OBJDUMP, which resolves as \"$new_path\", is invalid." >&5
 $as_echo "$as_me: The path of OBJDUMP, which resolves as \"$new_path\", is invalid." >&6;}
@@ -27953,34 +27950,34 @@
     fi
 
     if test "x$new_path" = x; then
-        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OBJDUMP, which resolves as \"$complete\", is not found." >&5
+      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OBJDUMP, which resolves as \"$complete\", is not found." >&5
 $as_echo "$as_me: The path of OBJDUMP, which resolves as \"$complete\", is not found." >&6;}
-        has_space=`$ECHO "$complete" | $GREP " "`
-        if test "x$has_space" != x; then
-          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
+      has_space=`$ECHO "$complete" | $GREP " "`
+      if test "x$has_space" != x; then
+        { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
 $as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
-        fi
-        as_fn_error $? "Cannot locate the the path of OBJDUMP" "$LINENO" 5
       fi
+      as_fn_error $? "Cannot locate the the path of OBJDUMP" "$LINENO" 5
+    fi
   fi
 
-      # Now join together the path and the arguments once again
-      if test "x$arguments" != xEOL; then
-        new_complete="$new_path ${arguments% *}"
-      else
-        new_complete="$new_path"
-      fi
+  # Now join together the path and the arguments once again
+  if test "x$arguments" != xEOL; then
+    new_complete="$new_path ${arguments% *}"
+  else
+    new_complete="$new_path"
+  fi
 
   if test "x$complete" != "x$new_complete"; then
-      OBJDUMP="$new_complete"
-      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting OBJDUMP to \"$new_complete\"" >&5
+    OBJDUMP="$new_complete"
+    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting OBJDUMP to \"$new_complete\"" >&5
 $as_echo "$as_me: Rewriting OBJDUMP to \"$new_complete\"" >&6;}
-    fi
+  fi
 
-fi
+  fi
 
-if test "x$OPENJDK_TARGET_OS" = "xmacosx"; then
-   # Extract the first word of "lipo", so it can be a program name with args.
+  if test "x$OPENJDK_TARGET_OS" = "xmacosx"; then
+    # Extract the first word of "lipo", so it can be a program name with args.
 set dummy lipo; ac_word=$2
 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
 $as_echo_n "checking for $ac_word... " >&6; }
@@ -28039,8 +28036,8 @@
   # bat and cmd files are not always considered executable in cygwin causing which
   # to not find them
   if test "x$new_path" = x \
-           && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
-           && test "x`$LS \"$path\" 2>/dev/null`" != x; then
+      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
+      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
     new_path=`$CYGPATH -u "$path"`
   fi
   if test "x$new_path" = x; then
@@ -28055,8 +28052,8 @@
     # bat and cmd files are not always considered executable in cygwin causing which
     # to not find them
     if test "x$new_path" = x \
-             && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
-             && test "x`$LS \"$path\" 2>/dev/null`" != x; then
+        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
+        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
       new_path=`$CYGPATH -u "$path"`
     fi
     if test "x$new_path" = x; then
@@ -28084,9 +28081,9 @@
     # Short path failed, file does not exist as specified.
     # Try adding .exe or .cmd
     if test -f "${new_path}.exe"; then
-       input_to_shortpath="${new_path}.exe"
+      input_to_shortpath="${new_path}.exe"
     elif test -f "${new_path}.cmd"; then
-       input_to_shortpath="${new_path}.cmd"
+      input_to_shortpath="${new_path}.cmd"
     else
       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of LIPO, which resolves as \"$new_path\", is invalid." >&5
 $as_echo "$as_me: The path of LIPO, which resolves as \"$new_path\", is invalid." >&6;}
@@ -28262,36 +28259,36 @@
     fi
 
     if test "x$new_path" = x; then
-        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of LIPO, which resolves as \"$complete\", is not found." >&5
+      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of LIPO, which resolves as \"$complete\", is not found." >&5
 $as_echo "$as_me: The path of LIPO, which resolves as \"$complete\", is not found." >&6;}
-        has_space=`$ECHO "$complete" | $GREP " "`
-        if test "x$has_space" != x; then
-          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
+      has_space=`$ECHO "$complete" | $GREP " "`
+      if test "x$has_space" != x; then
+        { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
 $as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
-        fi
-        as_fn_error $? "Cannot locate the the path of LIPO" "$LINENO" 5
       fi
+      as_fn_error $? "Cannot locate the the path of LIPO" "$LINENO" 5
+    fi
   fi
 
-      # Now join together the path and the arguments once again
-      if test "x$arguments" != xEOL; then
-        new_complete="$new_path ${arguments% *}"
-      else
-        new_complete="$new_path"
-      fi
+  # Now join together the path and the arguments once again
+  if test "x$arguments" != xEOL; then
+    new_complete="$new_path ${arguments% *}"
+  else
+    new_complete="$new_path"
+  fi
 
   if test "x$complete" != "x$new_complete"; then
-      LIPO="$new_complete"
-      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting LIPO to \"$new_complete\"" >&5
+    LIPO="$new_complete"
+    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting LIPO to \"$new_complete\"" >&5
 $as_echo "$as_me: Rewriting LIPO to \"$new_complete\"" >&6;}
-    fi
+  fi
 
-fi
+  fi
 
 
 
-# Restore old path without tools dir
-PATH="$OLD_PATH"
+  # Restore old path without tools dir
+  PATH="$OLD_PATH"
 
 
 # FIXME: Currently we must test this after paths but before flags. Fix!
@@ -28429,15 +28426,15 @@
 
 
 
-###############################################################################
-#
-# Now we check if libjvm.so will use 32 or 64 bit pointers for the C/C++ code.
-# (The JVM can use 32 or 64 bit Java pointers but that decision
-# is made at runtime.)
-#
+  ###############################################################################
+  #
+  # Now we check if libjvm.so will use 32 or 64 bit pointers for the C/C++ code.
+  # (The JVM can use 32 or 64 bit Java pointers but that decision
+  # is made at runtime.)
+  #
 
-if test "x$OPENJDK_TARGET_OS" = xsolaris; then
-  # Always specify -m flags on Solaris
+  if test "x$OPENJDK_TARGET_OS" = xsolaris; then
+    # Always specify -m flags on Solaris
 
   # When we add flags to the "official" CFLAGS etc, we need to
   # keep track of these additions in ADDED_CFLAGS etc. These
@@ -28455,9 +28452,9 @@
   CXXFLAGS_JDK="${CXXFLAGS_JDK}${ADDED_CXXFLAGS}"
   LDFLAGS_JDK="${LDFLAGS_JDK}${ADDED_LDFLAGS}"
 
-elif test "x$COMPILE_TYPE" = xreduced; then
-  if test "x$OPENJDK_TARGET_OS" != xwindows; then
-    # Specify -m if running reduced on other Posix platforms
+  elif test "x$COMPILE_TYPE" = xreduced; then
+    if test "x$OPENJDK_TARGET_OS" != xwindows; then
+      # Specify -m if running reduced on other Posix platforms
 
   # When we add flags to the "official" CFLAGS etc, we need to
   # keep track of these additions in ADDED_CFLAGS etc. These
@@ -28475,11 +28472,11 @@
   CXXFLAGS_JDK="${CXXFLAGS_JDK}${ADDED_CXXFLAGS}"
   LDFLAGS_JDK="${LDFLAGS_JDK}${ADDED_LDFLAGS}"
 
+    fi
   fi
-fi
 
-# Make compilation sanity check
-for ac_header in stdio.h
+  # Make compilation sanity check
+  for ac_header in stdio.h
 do :
   ac_fn_cxx_check_header_mongrel "$LINENO" "stdio.h" "ac_cv_header_stdio_h" "$ac_includes_default"
 if test "x$ac_cv_header_stdio_h" = xyes; then :
@@ -28489,23 +28486,23 @@
 
 else
 
-  { $as_echo "$as_me:${as_lineno-$LINENO}: Failed to compile stdio.h. This likely implies missing compile dependencies." >&5
+    { $as_echo "$as_me:${as_lineno-$LINENO}: Failed to compile stdio.h. This likely implies missing compile dependencies." >&5
 $as_echo "$as_me: Failed to compile stdio.h. This likely implies missing compile dependencies." >&6;}
-  if test "x$COMPILE_TYPE" = xreduced; then
-    { $as_echo "$as_me:${as_lineno-$LINENO}: You are doing a reduced build. Check that you have 32-bit libraries installed." >&5
+    if test "x$COMPILE_TYPE" = xreduced; then
+      { $as_echo "$as_me:${as_lineno-$LINENO}: You are doing a reduced build. Check that you have 32-bit libraries installed." >&5
 $as_echo "$as_me: You are doing a reduced build. Check that you have 32-bit libraries installed." >&6;}
-  elif test "x$COMPILE_TYPE" = xcross; then
-    { $as_echo "$as_me:${as_lineno-$LINENO}: You are doing a cross-compilation. Check that you have all target platform libraries installed." >&5
+    elif test "x$COMPILE_TYPE" = xcross; then
+      { $as_echo "$as_me:${as_lineno-$LINENO}: You are doing a cross-compilation. Check that you have all target platform libraries installed." >&5
 $as_echo "$as_me: You are doing a cross-compilation. Check that you have all target platform libraries installed." >&6;}
-  fi
-  as_fn_error $? "Cannot continue." "$LINENO" 5
+    fi
+    as_fn_error $? "Cannot continue." "$LINENO" 5
 
 fi
 
 done
 
 
-# The cast to long int works around a bug in the HP C Compiler
+  # The cast to long int works around a bug in the HP C Compiler
 # version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
 # declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
 # This bug is HP SR number 8606223364.
@@ -28539,34 +28536,34 @@
 
 
 
-if test "x$SIZEOF_INT_P" != "x$ac_cv_sizeof_int_p"; then
-  # Workaround autoconf bug, see http://lists.gnu.org/archive/html/autoconf/2010-07/msg00004.html
-  SIZEOF_INT_P="$ac_cv_sizeof_int_p"
-fi
+  if test "x$SIZEOF_INT_P" != "x$ac_cv_sizeof_int_p"; then
+    # Workaround autoconf bug, see http://lists.gnu.org/archive/html/autoconf/2010-07/msg00004.html
+    SIZEOF_INT_P="$ac_cv_sizeof_int_p"
+  fi
 
-if test "x$SIZEOF_INT_P" = x; then
+  if test "x$SIZEOF_INT_P" = x; then
     # The test failed, lets stick to the assumed value.
     { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: The number of bits in the target could not be determined, using $OPENJDK_TARGET_CPU_BITS." >&5
 $as_echo "$as_me: WARNING: The number of bits in the target could not be determined, using $OPENJDK_TARGET_CPU_BITS." >&2;}
-else
+  else
     TESTED_TARGET_CPU_BITS=`expr 8 \* $SIZEOF_INT_P`
 
     if test "x$TESTED_TARGET_CPU_BITS" != "x$OPENJDK_TARGET_CPU_BITS"; then
-        as_fn_error $? "The tested number of bits in the target ($TESTED_TARGET_CPU_BITS) differs from the number of bits expected to be found in the target ($OPENJDK_TARGET_CPU_BITS)" "$LINENO" 5
+      as_fn_error $? "The tested number of bits in the target ($TESTED_TARGET_CPU_BITS) differs from the number of bits expected to be found in the target ($OPENJDK_TARGET_CPU_BITS)" "$LINENO" 5
     fi
-fi
+  fi
 
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for target address size" >&5
+  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for target address size" >&5
 $as_echo_n "checking for target address size... " >&6; }
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $OPENJDK_TARGET_CPU_BITS bits" >&5
+  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OPENJDK_TARGET_CPU_BITS bits" >&5
 $as_echo "$OPENJDK_TARGET_CPU_BITS bits" >&6; }
 
 
-###############################################################################
-#
-# Is the target little of big endian?
-#
- { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether byte ordering is bigendian" >&5
+  ###############################################################################
+  #
+  # Is the target little of big endian?
+  #
+   { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether byte ordering is bigendian" >&5
 $as_echo_n "checking whether byte ordering is bigendian... " >&6; }
 if ${ac_cv_c_bigendian+:} false; then :
   $as_echo_n "(cached) " >&6
@@ -28787,23 +28784,23 @@
  esac
 
 
-if test "x$ENDIAN" = xuniversal_endianness; then
+  if test "x$ENDIAN" = xuniversal_endianness; then
     as_fn_error $? "Building with both big and little endianness is not supported" "$LINENO" 5
-fi
-if test "x$ENDIAN" != "x$OPENJDK_TARGET_CPU_ENDIAN"; then
+  fi
+  if test "x$ENDIAN" != "x$OPENJDK_TARGET_CPU_ENDIAN"; then
     as_fn_error $? "The tested endian in the target ($ENDIAN) differs from the endian expected to be found in the target ($OPENJDK_TARGET_CPU_ENDIAN)" "$LINENO" 5
-fi
+  fi
 
 
 # Configure flags for the tools
 
 
-###############################################################################
-#
-# How to compile shared libraries.
-#
+  ###############################################################################
+  #
+  # How to compile shared libraries.
+  #
 
-if test "x$GCC" = xyes; then
+  if test "x$GCC" = xyes; then
     COMPILER_NAME=gcc
     PICFLAG="-fPIC"
     LIBRARY_PREFIX=lib
@@ -28828,61 +28825,61 @@
 
     # Linking is different on MacOSX
     if test "x$OPENJDK_TARGET_OS" = xmacosx; then
-        # Might change in the future to clang.
-        COMPILER_NAME=gcc
-        SHARED_LIBRARY='lib$1.dylib'
-        SHARED_LIBRARY_FLAGS="-dynamiclib -compatibility_version 1.0.0 -current_version 1.0.0 $PICFLAG"
-        SHARED_LIBRARY_SUFFIX='.dylib'
-        EXE_SUFFIX=''
-        SET_SHARED_LIBRARY_NAME='-Xlinker -install_name -Xlinker @rpath/$1'
-        SET_SHARED_LIBRARY_MAPFILE=''
-        SET_SHARED_LIBRARY_ORIGIN='-Xlinker -rpath -Xlinker @loader_path/.'
-        SET_EXECUTABLE_ORIGIN="$SET_SHARED_LIBRARY_ORIGIN"
-        POST_STRIP_CMD="$STRIP -S"
+      # Might change in the future to clang.
+      COMPILER_NAME=gcc
+      SHARED_LIBRARY='lib$1.dylib'
+      SHARED_LIBRARY_FLAGS="-dynamiclib -compatibility_version 1.0.0 -current_version 1.0.0 $PICFLAG"
+      SHARED_LIBRARY_SUFFIX='.dylib'
+      EXE_SUFFIX=''
+      SET_SHARED_LIBRARY_NAME='-Xlinker -install_name -Xlinker @rpath/$1'
+      SET_SHARED_LIBRARY_MAPFILE=''
+      SET_SHARED_LIBRARY_ORIGIN='-Xlinker -rpath -Xlinker @loader_path/.'
+      SET_EXECUTABLE_ORIGIN="$SET_SHARED_LIBRARY_ORIGIN"
+      POST_STRIP_CMD="$STRIP -S"
     fi
-else
+  else
     if test "x$OPENJDK_TARGET_OS" = xsolaris; then
-        # If it is not gcc, then assume it is the Oracle Solaris Studio Compiler
-        COMPILER_NAME=ossc
-        PICFLAG="-KPIC"
-        LIBRARY_PREFIX=lib
-        SHARED_LIBRARY='lib$1.so'
-        STATIC_LIBRARY='lib$1.a'
-        SHARED_LIBRARY_FLAGS="-G"
-        SHARED_LIBRARY_SUFFIX='.so'
-        STATIC_LIBRARY_SUFFIX='.a'
-        OBJ_SUFFIX='.o'
-        EXE_SUFFIX=''
-        SET_SHARED_LIBRARY_NAME=''
-        SET_SHARED_LIBRARY_MAPFILE='-M$1'
-	C_FLAG_REORDER='-xF'
-	CXX_FLAG_REORDER='-xF'
-        SET_SHARED_LIBRARY_ORIGIN='-R\$$$$ORIGIN$1'
-        SET_EXECUTABLE_ORIGIN="$SET_SHARED_LIBRARY_ORIGIN"
-        CFLAGS_JDK="${CFLAGS_JDK} -D__solaris__"
-        CXXFLAGS_JDK="${CXXFLAGS_JDK} -D__solaris__"
-        CFLAGS_JDKLIB_EXTRA='-xstrconst'
-        POST_STRIP_CMD="$STRIP -x"
-        POST_MCS_CMD="$MCS -d -a \"JDK $FULL_VERSION\""
+      # If it is not gcc, then assume it is the Oracle Solaris Studio Compiler
+      COMPILER_NAME=ossc
+      PICFLAG="-KPIC"
+      LIBRARY_PREFIX=lib
+      SHARED_LIBRARY='lib$1.so'
+      STATIC_LIBRARY='lib$1.a'
+      SHARED_LIBRARY_FLAGS="-G"
+      SHARED_LIBRARY_SUFFIX='.so'
+      STATIC_LIBRARY_SUFFIX='.a'
+      OBJ_SUFFIX='.o'
+      EXE_SUFFIX=''
+      SET_SHARED_LIBRARY_NAME=''
+      SET_SHARED_LIBRARY_MAPFILE='-M$1'
+      C_FLAG_REORDER='-xF'
+      CXX_FLAG_REORDER='-xF'
+      SET_SHARED_LIBRARY_ORIGIN='-R\$$$$ORIGIN$1'
+      SET_EXECUTABLE_ORIGIN="$SET_SHARED_LIBRARY_ORIGIN"
+      CFLAGS_JDK="${CFLAGS_JDK} -D__solaris__"
+      CXXFLAGS_JDK="${CXXFLAGS_JDK} -D__solaris__"
+      CFLAGS_JDKLIB_EXTRA='-xstrconst'
+      POST_STRIP_CMD="$STRIP -x"
+      POST_MCS_CMD="$MCS -d -a \"JDK $FULL_VERSION\""
     fi
     if test "x$OPENJDK_TARGET_OS" = xwindows; then
-        # If it is not gcc, then assume it is the MS Visual Studio compiler
-        COMPILER_NAME=cl
-        PICFLAG=""
-        LIBRARY_PREFIX=
-        SHARED_LIBRARY='$1.dll'
-        STATIC_LIBRARY='$1.lib'
-        SHARED_LIBRARY_FLAGS="-LD"
-        SHARED_LIBRARY_SUFFIX='.dll'
-        STATIC_LIBRARY_SUFFIX='.lib'
-        OBJ_SUFFIX='.obj'
-        EXE_SUFFIX='.exe'
-        SET_SHARED_LIBRARY_NAME=''
-        SET_SHARED_LIBRARY_MAPFILE=''
-        SET_SHARED_LIBRARY_ORIGIN=''
-        SET_EXECUTABLE_ORIGIN=''
+      # If it is not gcc, then assume it is the MS Visual Studio compiler
+      COMPILER_NAME=cl
+      PICFLAG=""
+      LIBRARY_PREFIX=
+      SHARED_LIBRARY='$1.dll'
+      STATIC_LIBRARY='$1.lib'
+      SHARED_LIBRARY_FLAGS="-LD"
+      SHARED_LIBRARY_SUFFIX='.dll'
+      STATIC_LIBRARY_SUFFIX='.lib'
+      OBJ_SUFFIX='.obj'
+      EXE_SUFFIX='.exe'
+      SET_SHARED_LIBRARY_NAME=''
+      SET_SHARED_LIBRARY_MAPFILE=''
+      SET_SHARED_LIBRARY_ORIGIN=''
+      SET_EXECUTABLE_ORIGIN=''
     fi
-fi
+  fi
 
 
 
@@ -28902,21 +28899,21 @@
 
 
 
-# The (cross) compiler is now configured, we can now test capabilities
-# of the target platform.
+  # The (cross) compiler is now configured, we can now test capabilities
+  # of the target platform.
 
 
 
-###############################################################################
-#
-# Setup the opt flags for different compilers
-# and different operating systems.
-#
+  ###############################################################################
+  #
+  # Setup the opt flags for different compilers
+  # and different operating systems.
+  #
 
-#
-# NOTE: check for -mstackrealign needs to be below potential addition of -m32
-#
-if test "x$OPENJDK_TARGET_CPU_BITS" = x32 && test "x$OPENJDK_TARGET_OS" = xmacosx; then
+  #
+  # NOTE: check for -mstackrealign needs to be below potential addition of -m32
+  #
+  if test "x$OPENJDK_TARGET_CPU_BITS" = x32 && test "x$OPENJDK_TARGET_OS" = xmacosx; then
     # On 32-bit MacOSX the OS requires C-entry points to be 16 byte aligned.
     # While waiting for a better solution, the current workaround is to use -mstackrealign.
     CFLAGS="$CFLAGS -mstackrealign"
@@ -28928,148 +28925,149 @@
 _ACEOF
 if ac_fn_cxx_try_link "$LINENO"; then :
 
-		        { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
+          { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
 $as_echo "yes" >&6; }
 
 else
 
-		        { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+          { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
 $as_echo "no" >&6; }
-	                as_fn_error $? "The selected compiler $CXX does not support -mstackrealign! Try to put another compiler in the path." "$LINENO" 5
+          as_fn_error $? "The selected compiler $CXX does not support -mstackrealign! Try to put another compiler in the path." "$LINENO" 5
+
 
 fi
 rm -f core conftest.err conftest.$ac_objext \
     conftest$ac_exeext conftest.$ac_ext
-fi
+  fi
 
-C_FLAG_DEPS="-MMD -MF"
-CXX_FLAG_DEPS="-MMD -MF"
+  C_FLAG_DEPS="-MMD -MF"
+  CXX_FLAG_DEPS="-MMD -MF"
 
-case $COMPILER_TYPE in
-  CC )
-    case $COMPILER_NAME in
-      gcc )
-      	case $OPENJDK_TARGET_OS in
-	  macosx )
-	    # On MacOSX we optimize for size, something
-	    # we should do for all platforms?
-	    C_O_FLAG_HI="-Os"
-	    C_O_FLAG_NORM="-Os"
-	    C_O_FLAG_NONE=""
-	    ;;
-	  *)
-	    C_O_FLAG_HI="-O3"
-	    C_O_FLAG_NORM="-O2"
-	    C_O_FLAG_NONE="-O0"
-	    ;;
-	esac
-        CXX_O_FLAG_HI="$C_O_FLAG_HI"
-        CXX_O_FLAG_NORM="$C_O_FLAG_NORM"
-        CXX_O_FLAG_NONE="$C_O_FLAG_NONE"
-        CFLAGS_DEBUG_SYMBOLS="-g"
-        CXXFLAGS_DEBUG_SYMBOLS="-g"
-        if test "x$OPENJDK_TARGET_CPU_BITS" = "x64" && test "x$DEBUG_LEVEL" = "xfastdebug"; then
+  case $COMPILER_TYPE in
+    CC )
+      case $COMPILER_NAME in
+        gcc )
+          case $OPENJDK_TARGET_OS in
+            macosx )
+              # On MacOSX we optimize for size, something
+              # we should do for all platforms?
+              C_O_FLAG_HI="-Os"
+              C_O_FLAG_NORM="-Os"
+              C_O_FLAG_NONE=""
+              ;;
+            *)
+              C_O_FLAG_HI="-O3"
+              C_O_FLAG_NORM="-O2"
+              C_O_FLAG_NONE="-O0"
+              ;;
+          esac
+          CXX_O_FLAG_HI="$C_O_FLAG_HI"
+          CXX_O_FLAG_NORM="$C_O_FLAG_NORM"
+          CXX_O_FLAG_NONE="$C_O_FLAG_NONE"
+          CFLAGS_DEBUG_SYMBOLS="-g"
+          CXXFLAGS_DEBUG_SYMBOLS="-g"
+          if test "x$OPENJDK_TARGET_CPU_BITS" = "x64" && test "x$DEBUG_LEVEL" = "xfastdebug"; then
             CFLAGS_DEBUG_SYMBOLS="-g1"
             CXXFLAGS_DEBUG_SYMBOLS="-g1"
-        fi
-        ;;
-      ossc )
-        #
-        # Forte has different names for this with their C++ compiler...
-        #
-        C_FLAG_DEPS="-xMMD -xMF"
-        CXX_FLAG_DEPS="-xMMD -xMF"
+          fi
+          ;;
+        ossc )
+          #
+          # Forte has different names for this with their C++ compiler...
+          #
+          C_FLAG_DEPS="-xMMD -xMF"
+          CXX_FLAG_DEPS="-xMMD -xMF"
 
-        # Extra options used with HIGHEST
-        #
-        # WARNING: Use of OPTIMIZATION_LEVEL=HIGHEST in your Makefile needs to be
-        #          done with care, there are some assumptions below that need to
-        #          be understood about the use of pointers, and IEEE behavior.
-        #
-        # Use non-standard floating point mode (not IEEE 754)
-        CC_HIGHEST="$CC_HIGHEST -fns"
-        # Do some simplification of floating point arithmetic (not IEEE 754)
-        CC_HIGHEST="$CC_HIGHEST -fsimple"
-        # Use single precision floating point with 'float'
-        CC_HIGHEST="$CC_HIGHEST -fsingle"
-        # Assume memory references via basic pointer types do not alias
-        #   (Source with excessing pointer casting and data access with mixed
-        #    pointer types are not recommended)
-        CC_HIGHEST="$CC_HIGHEST -xalias_level=basic"
-        # Use intrinsic or inline versions for math/std functions
-        #   (If you expect perfect errno behavior, do not use this)
-        CC_HIGHEST="$CC_HIGHEST -xbuiltin=%all"
-        # Loop data dependency optimizations (need -xO3 or higher)
-        CC_HIGHEST="$CC_HIGHEST -xdepend"
-        # Pointer parameters to functions do not overlap
-        #   (Similar to -xalias_level=basic usage, but less obvious sometimes.
-        #    If you pass in multiple pointers to the same data, do not use this)
-        CC_HIGHEST="$CC_HIGHEST -xrestrict"
-        # Inline some library routines
-        #   (If you expect perfect errno behavior, do not use this)
-        CC_HIGHEST="$CC_HIGHEST -xlibmil"
-        # Use optimized math routines
-        #   (If you expect perfect errno behavior, do not use this)
-        #  Can cause undefined external on Solaris 8 X86 on __sincos, removing for now
-        #CC_HIGHEST="$CC_HIGHEST -xlibmopt"
+          # Extra options used with HIGHEST
+          #
+          # WARNING: Use of OPTIMIZATION_LEVEL=HIGHEST in your Makefile needs to be
+          #          done with care, there are some assumptions below that need to
+          #          be understood about the use of pointers, and IEEE behavior.
+          #
+          # Use non-standard floating point mode (not IEEE 754)
+          CC_HIGHEST="$CC_HIGHEST -fns"
+          # Do some simplification of floating point arithmetic (not IEEE 754)
+          CC_HIGHEST="$CC_HIGHEST -fsimple"
+          # Use single precision floating point with 'float'
+          CC_HIGHEST="$CC_HIGHEST -fsingle"
+          # Assume memory references via basic pointer types do not alias
+          #   (Source with excessing pointer casting and data access with mixed
+          #    pointer types are not recommended)
+          CC_HIGHEST="$CC_HIGHEST -xalias_level=basic"
+          # Use intrinsic or inline versions for math/std functions
+          #   (If you expect perfect errno behavior, do not use this)
+          CC_HIGHEST="$CC_HIGHEST -xbuiltin=%all"
+          # Loop data dependency optimizations (need -xO3 or higher)
+          CC_HIGHEST="$CC_HIGHEST -xdepend"
+          # Pointer parameters to functions do not overlap
+          #   (Similar to -xalias_level=basic usage, but less obvious sometimes.
+          #    If you pass in multiple pointers to the same data, do not use this)
+          CC_HIGHEST="$CC_HIGHEST -xrestrict"
+          # Inline some library routines
+          #   (If you expect perfect errno behavior, do not use this)
+          CC_HIGHEST="$CC_HIGHEST -xlibmil"
+          # Use optimized math routines
+          #   (If you expect perfect errno behavior, do not use this)
+          #  Can cause undefined external on Solaris 8 X86 on __sincos, removing for now
+          #CC_HIGHEST="$CC_HIGHEST -xlibmopt"
 
-        if test "x$OPENJDK_TARGET_CPU" = xsparc; then
-          CFLAGS_JDK="${CFLAGS_JDK} -xmemalign=4s"
-          CXXFLAGS_JDK="${CXXFLAGS_JDK} -xmemalign=4s"
-        fi
+          if test "x$OPENJDK_TARGET_CPU" = xsparc; then
+            CFLAGS_JDK="${CFLAGS_JDK} -xmemalign=4s"
+            CXXFLAGS_JDK="${CXXFLAGS_JDK} -xmemalign=4s"
+          fi
 
-        case $OPENJDK_TARGET_CPU_ARCH in
-          x86)
-            C_O_FLAG_HIGHEST="-xO4 -Wu,-O4~yz $CC_HIGHEST -xregs=no%frameptr"
-            C_O_FLAG_HI="-xO4 -Wu,-O4~yz -xregs=no%frameptr"
-            C_O_FLAG_NORM="-xO2 -Wu,-O2~yz -xregs=no%frameptr"
-            C_O_FLAG_NONE="-xregs=no%frameptr"
-            CXX_O_FLAG_HIGHEST="-xO4 -Qoption ube -O4~yz $CC_HIGHEST -xregs=no%frameptr"
-            CXX_O_FLAG_HI="-xO4 -Qoption ube -O4~yz -xregs=no%frameptr"
-            CXX_O_FLAG_NORM="-xO2 -Qoption ube -O2~yz -xregs=no%frameptr"
-            CXX_O_FLAG_NONE="-xregs=no%frameptr"
-            if test "x$OPENJDK_TARGET_CPU" = xx86; then
-               C_O_FLAG_HIGHEST="$C_O_FLAG_HIGHEST -xchip=pentium"
-               CXX_O_FLAG_HIGHEST="$CXX_O_FLAG_HIGHEST -xchip=pentium"
-            fi
-            ;;
-          sparc)
-            CFLAGS_JDKLIB_EXTRA="${CFLAGS_JDKLIB_EXTRA} -xregs=no%appl"
-            CXXFLAGS_JDKLIB_EXTRA="${CXXFLAGS_JDKLIB_EXTRA} -xregs=no%appl"
-            C_O_FLAG_HIGHEST="-xO4 -Wc,-Qrm-s -Wc,-Qiselect-T0 $CC_HIGHEST -xprefetch=auto,explicit -xchip=ultra"
-            C_O_FLAG_HI="-xO4 -Wc,-Qrm-s -Wc,-Qiselect-T0"
-            C_O_FLAG_NORM="-xO2 -Wc,-Qrm-s -Wc,-Qiselect-T0"
-            C_O_FLAG_NONE=""
-            CXX_O_FLAG_HIGHEST="-xO4 -Qoption cg -Qrm-s -Qoption cg -Qiselect-T0 $CC_HIGHEST -xprefetch=auto,explicit -xchip=ultra"
-            CXX_O_FLAG_HI="-xO4 -Qoption cg -Qrm-s -Qoption cg -Qiselect-T0"
-            CXX_O_FLAG_NORM="-xO2 -Qoption cg -Qrm-s -Qoption cg -Qiselect-T0"
-            CXX_O_FLAG_NONE=""
-            ;;
-        esac
+          case $OPENJDK_TARGET_CPU_ARCH in
+            x86)
+              C_O_FLAG_HIGHEST="-xO4 -Wu,-O4~yz $CC_HIGHEST -xregs=no%frameptr"
+              C_O_FLAG_HI="-xO4 -Wu,-O4~yz -xregs=no%frameptr"
+              C_O_FLAG_NORM="-xO2 -Wu,-O2~yz -xregs=no%frameptr"
+              C_O_FLAG_NONE="-xregs=no%frameptr"
+              CXX_O_FLAG_HIGHEST="-xO4 -Qoption ube -O4~yz $CC_HIGHEST -xregs=no%frameptr"
+              CXX_O_FLAG_HI="-xO4 -Qoption ube -O4~yz -xregs=no%frameptr"
+              CXX_O_FLAG_NORM="-xO2 -Qoption ube -O2~yz -xregs=no%frameptr"
+              CXX_O_FLAG_NONE="-xregs=no%frameptr"
+              if test "x$OPENJDK_TARGET_CPU" = xx86; then
+                C_O_FLAG_HIGHEST="$C_O_FLAG_HIGHEST -xchip=pentium"
+                CXX_O_FLAG_HIGHEST="$CXX_O_FLAG_HIGHEST -xchip=pentium"
+              fi
+              ;;
+            sparc)
+              CFLAGS_JDKLIB_EXTRA="${CFLAGS_JDKLIB_EXTRA} -xregs=no%appl"
+              CXXFLAGS_JDKLIB_EXTRA="${CXXFLAGS_JDKLIB_EXTRA} -xregs=no%appl"
+              C_O_FLAG_HIGHEST="-xO4 -Wc,-Qrm-s -Wc,-Qiselect-T0 $CC_HIGHEST -xprefetch=auto,explicit -xchip=ultra"
+              C_O_FLAG_HI="-xO4 -Wc,-Qrm-s -Wc,-Qiselect-T0"
+              C_O_FLAG_NORM="-xO2 -Wc,-Qrm-s -Wc,-Qiselect-T0"
+              C_O_FLAG_NONE=""
+              CXX_O_FLAG_HIGHEST="-xO4 -Qoption cg -Qrm-s -Qoption cg -Qiselect-T0 $CC_HIGHEST -xprefetch=auto,explicit -xchip=ultra"
+              CXX_O_FLAG_HI="-xO4 -Qoption cg -Qrm-s -Qoption cg -Qiselect-T0"
+              CXX_O_FLAG_NORM="-xO2 -Qoption cg -Qrm-s -Qoption cg -Qiselect-T0"
+              CXX_O_FLAG_NONE=""
+              ;;
+          esac
 
-    CFLAGS_DEBUG_SYMBOLS="-g -xs"
-    CXXFLAGS_DEBUG_SYMBOLS="-g0 -xs"
-    esac
-    ;;
-  CL )
-    C_O_FLAG_HIGHEST="-O2"
-    C_O_FLAG_HI="-O1"
-    C_O_FLAG_NORM="-O1"
-    C_O_FLAG_NONE="-Od"
-    CXX_O_FLAG_HIGHEST="$C_O_FLAG_HIGHEST"
-    CXX_O_FLAG_HI="$C_O_FLAG_HI"
-    CXX_O_FLAG_NORM="$C_O_FLAG_NORM"
-    CXX_O_FLAG_NONE="$C_O_FLAG_NONE"
-    ;;
-esac
+          CFLAGS_DEBUG_SYMBOLS="-g -xs"
+          CXXFLAGS_DEBUG_SYMBOLS="-g0 -xs"
+      esac
+      ;;
+    CL )
+      C_O_FLAG_HIGHEST="-O2"
+      C_O_FLAG_HI="-O1"
+      C_O_FLAG_NORM="-O1"
+      C_O_FLAG_NONE="-Od"
+      CXX_O_FLAG_HIGHEST="$C_O_FLAG_HIGHEST"
+      CXX_O_FLAG_HI="$C_O_FLAG_HI"
+      CXX_O_FLAG_NORM="$C_O_FLAG_NORM"
+      CXX_O_FLAG_NONE="$C_O_FLAG_NONE"
+      ;;
+  esac
 
-if test -z "$C_O_FLAG_HIGHEST"; then
-   C_O_FLAG_HIGHEST="$C_O_FLAG_HI"
-fi
+  if test -z "$C_O_FLAG_HIGHEST"; then
+    C_O_FLAG_HIGHEST="$C_O_FLAG_HI"
+  fi
 
-if test -z "$CXX_O_FLAG_HIGHEST"; then
-   CXX_O_FLAG_HIGHEST="$CXX_O_FLAG_HI"
-fi
+  if test -z "$CXX_O_FLAG_HIGHEST"; then
+    CXX_O_FLAG_HIGHEST="$CXX_O_FLAG_HI"
+  fi
 
 
 
@@ -29084,20 +29082,20 @@
 
 
 
-if test "x$CFLAGS" != "x${ADDED_CFLAGS}"; then
-   { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring CFLAGS($CFLAGS) found in environment. Use --with-extra-cflags" >&5
+  if test "x$CFLAGS" != "x${ADDED_CFLAGS}"; then
+    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring CFLAGS($CFLAGS) found in environment. Use --with-extra-cflags" >&5
 $as_echo "$as_me: WARNING: Ignoring CFLAGS($CFLAGS) found in environment. Use --with-extra-cflags" >&2;}
-fi
+  fi
 
-if test "x$CXXFLAGS" != "x${ADDED_CXXFLAGS}"; then
-   { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring CXXFLAGS($CXXFLAGS) found in environment. Use --with-extra-cxxflags" >&5
+  if test "x$CXXFLAGS" != "x${ADDED_CXXFLAGS}"; then
+    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring CXXFLAGS($CXXFLAGS) found in environment. Use --with-extra-cxxflags" >&5
 $as_echo "$as_me: WARNING: Ignoring CXXFLAGS($CXXFLAGS) found in environment. Use --with-extra-cxxflags" >&2;}
-fi
+  fi
 
-if test "x$LDFLAGS" != "x${ADDED_LDFLAGS}"; then
-   { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring LDFLAGS($LDFLAGS) found in environment. Use --with-extra-ldflags" >&5
+  if test "x$LDFLAGS" != "x${ADDED_LDFLAGS}"; then
+    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring LDFLAGS($LDFLAGS) found in environment. Use --with-extra-ldflags" >&5
 $as_echo "$as_me: WARNING: Ignoring LDFLAGS($LDFLAGS) found in environment. Use --with-extra-ldflags" >&2;}
-fi
+  fi
 
 
 # Check whether --with-extra-cflags was given.
@@ -29120,128 +29118,128 @@
 fi
 
 
-CFLAGS_JDK="${CFLAGS_JDK} $with_extra_cflags"
-CXXFLAGS_JDK="${CXXFLAGS_JDK} $with_extra_cxxflags"
-LDFLAGS_JDK="${LDFLAGS_JDK} $with_extra_ldflags"
+  CFLAGS_JDK="${CFLAGS_JDK} $with_extra_cflags"
+  CXXFLAGS_JDK="${CXXFLAGS_JDK} $with_extra_cxxflags"
+  LDFLAGS_JDK="${LDFLAGS_JDK} $with_extra_ldflags"
 
-# Hotspot needs these set in their legacy form
-LEGACY_EXTRA_CFLAGS=$with_extra_cflags
-LEGACY_EXTRA_CXXFLAGS=$with_extra_cxxflags
-LEGACY_EXTRA_LDFLAGS=$with_extra_ldflags
+  # Hotspot needs these set in their legacy form
+  LEGACY_EXTRA_CFLAGS=$with_extra_cflags
+  LEGACY_EXTRA_CXXFLAGS=$with_extra_cxxflags
+  LEGACY_EXTRA_LDFLAGS=$with_extra_ldflags
 
 
 
 
 
-###############################################################################
-#
-# Now setup the CFLAGS and LDFLAGS for the JDK build.
-# Later we will also have CFLAGS and LDFLAGS for the hotspot subrepo build.
-#
-case $COMPILER_NAME in
-      gcc )
-      	  CCXXFLAGS_JDK="$CCXXFLAGS $CCXXFLAGS_JDK -W -Wall -Wno-unused -Wno-parentheses \
-                          -pipe \
-                          -D_GNU_SOURCE -D_REENTRANT -D_LARGEFILE64_SOURCE"
-	  case $OPENJDK_TARGET_CPU_ARCH in
-	  arm )
-            # on arm we don't prevent gcc to omit frame pointer but do prevent strict aliasing
-	    CFLAGS_JDK="${CFLAGS_JDK} -fno-strict-aliasing"
-	  ;;
-	  ppc )
-            # on ppc we don't prevent gcc to omit frame pointer nor strict-aliasing
-	  ;;
-	  * )
-	    CCXXFLAGS_JDK="$CCXXFLAGS_JDK -fno-omit-frame-pointer"
-	    CFLAGS_JDK="${CFLAGS_JDK} -fno-strict-aliasing"
+  ###############################################################################
+  #
+  # Now setup the CFLAGS and LDFLAGS for the JDK build.
+  # Later we will also have CFLAGS and LDFLAGS for the hotspot subrepo build.
+  #
+  case $COMPILER_NAME in
+    gcc )
+      CCXXFLAGS_JDK="$CCXXFLAGS $CCXXFLAGS_JDK -W -Wall -Wno-unused -Wno-parentheses \
+      -pipe \
+      -D_GNU_SOURCE -D_REENTRANT -D_LARGEFILE64_SOURCE"
+      case $OPENJDK_TARGET_CPU_ARCH in
+        arm )
+          # on arm we don't prevent gcc to omit frame pointer but do prevent strict aliasing
+          CFLAGS_JDK="${CFLAGS_JDK} -fno-strict-aliasing"
           ;;
-	  esac
+        ppc )
+          # on ppc we don't prevent gcc to omit frame pointer nor strict-aliasing
           ;;
-      ossc )
-          CCXXFLAGS_JDK="$CCXXFLAGS $CCXXFLAGS_JDK -DTRACING -DMACRO_MEMSYS_OPS -DBREAKPTS"
-          case $OPENJDK_TARGET_CPU_ARCH in
-          x86 )
-            CCXXFLAGS_JDK="$CCXXFLAGS_JDK -DcpuIntel -Di586 -D$OPENJDK_TARGET_CPU_LEGACY_LIB"
-       	    CFLAGS_JDK="$CFLAGS_JDK -erroff=E_BAD_PRAGMA_PACK_VALUE"
+        * )
+          CCXXFLAGS_JDK="$CCXXFLAGS_JDK -fno-omit-frame-pointer"
+          CFLAGS_JDK="${CFLAGS_JDK} -fno-strict-aliasing"
           ;;
-          esac
-
-      	  CFLAGS_JDK="$CFLAGS_JDK -xc99=%none -xCC -errshort=tags -Xa -v -mt -W0,-noglobal"
-      	  CXXFLAGS_JDK="$CXXFLAGS_JDK -errtags=yes +w -mt -features=no%except -DCC_NOEX -norunpath -xnolib"
-
-          LDFLAGS_JDK="$LDFLAGS_JDK -z defs -xildoff -ztext"
-          LDFLAGS_CXX_JDK="$LDFLAGS_CXX_JDK -norunpath -xnolib"
+      esac
+      ;;
+    ossc )
+      CCXXFLAGS_JDK="$CCXXFLAGS $CCXXFLAGS_JDK -DTRACING -DMACRO_MEMSYS_OPS -DBREAKPTS"
+      case $OPENJDK_TARGET_CPU_ARCH in
+        x86 )
+          CCXXFLAGS_JDK="$CCXXFLAGS_JDK -DcpuIntel -Di586 -D$OPENJDK_TARGET_CPU_LEGACY_LIB"
+          CFLAGS_JDK="$CFLAGS_JDK -erroff=E_BAD_PRAGMA_PACK_VALUE"
           ;;
-      cl )
-          CCXXFLAGS_JDK="$CCXXFLAGS $CCXXFLAGS_JDK -Zi -MD -Zc:wchar_t- -W3 -wd4800 \
-               -D_STATIC_CPPLIB -D_DISABLE_DEPRECATE_STATIC_CPPLIB -DWIN32_LEAN_AND_MEAN \
-	       -D_CRT_SECURE_NO_DEPRECATE -D_CRT_NONSTDC_NO_DEPRECATE \
-	       -DWIN32 -DIAL"
-          case $OPENJDK_TARGET_CPU in
-              x86 )
-                  CCXXFLAGS_JDK="$CCXXFLAGS_JDK -D_X86_ -Dx86"
-                  ;;
-              x86_64 )
-                  CCXXFLAGS_JDK="$CCXXFLAGS_JDK -D_AMD64_ -Damd64"
-                  ;;
-          esac
+      esac
+
+      CFLAGS_JDK="$CFLAGS_JDK -xc99=%none -xCC -errshort=tags -Xa -v -mt -W0,-noglobal"
+      CXXFLAGS_JDK="$CXXFLAGS_JDK -errtags=yes +w -mt -features=no%except -DCC_NOEX -norunpath -xnolib"
+
+      LDFLAGS_JDK="$LDFLAGS_JDK -z defs -xildoff -ztext"
+      LDFLAGS_CXX_JDK="$LDFLAGS_CXX_JDK -norunpath -xnolib"
+      ;;
+    cl )
+      CCXXFLAGS_JDK="$CCXXFLAGS $CCXXFLAGS_JDK -Zi -MD -Zc:wchar_t- -W3 -wd4800 \
+      -D_STATIC_CPPLIB -D_DISABLE_DEPRECATE_STATIC_CPPLIB -DWIN32_LEAN_AND_MEAN \
+      -D_CRT_SECURE_NO_DEPRECATE -D_CRT_NONSTDC_NO_DEPRECATE \
+      -DWIN32 -DIAL"
+      case $OPENJDK_TARGET_CPU in
+        x86 )
+          CCXXFLAGS_JDK="$CCXXFLAGS_JDK -D_X86_ -Dx86"
           ;;
-esac
+        x86_64 )
+          CCXXFLAGS_JDK="$CCXXFLAGS_JDK -D_AMD64_ -Damd64"
+          ;;
+      esac
+      ;;
+  esac
 
-###############################################################################
+  ###############################################################################
 
-# Adjust flags according to debug level.
-case $DEBUG_LEVEL in
-      fastdebug )
-              CFLAGS_JDK="$CFLAGS_JDK $CFLAGS_DEBUG_SYMBOLS"
-              CXXFLAGS_JDK="$CXXFLAGS_JDK $CXXFLAGS_DEBUG_SYMBOLS"
-	      C_O_FLAG_HI="$C_O_FLAG_NORM"
-	      C_O_FLAG_NORM="$C_O_FLAG_NORM"
-	      CXX_O_FLAG_HI="$CXX_O_FLAG_NORM"
-	      CXX_O_FLAG_NORM="$CXX_O_FLAG_NORM"
-              JAVAC_FLAGS="$JAVAC_FLAGS -g"
-              ;;
-      slowdebug )
-              CFLAGS_JDK="$CFLAGS_JDK $CFLAGS_DEBUG_SYMBOLS"
-              CXXFLAGS_JDK="$CXXFLAGS_JDK $CXXFLAGS_DEBUG_SYMBOLS"
-	      C_O_FLAG_HI="$C_O_FLAG_NONE"
-	      C_O_FLAG_NORM="$C_O_FLAG_NONE"
-	      CXX_O_FLAG_HI="$CXX_O_FLAG_NONE"
-	      CXX_O_FLAG_NORM="$CXX_O_FLAG_NONE"
-              JAVAC_FLAGS="$JAVAC_FLAGS -g"
-              ;;
-esac
+  # Adjust flags according to debug level.
+  case $DEBUG_LEVEL in
+    fastdebug )
+      CFLAGS_JDK="$CFLAGS_JDK $CFLAGS_DEBUG_SYMBOLS"
+      CXXFLAGS_JDK="$CXXFLAGS_JDK $CXXFLAGS_DEBUG_SYMBOLS"
+      C_O_FLAG_HI="$C_O_FLAG_NORM"
+      C_O_FLAG_NORM="$C_O_FLAG_NORM"
+      CXX_O_FLAG_HI="$CXX_O_FLAG_NORM"
+      CXX_O_FLAG_NORM="$CXX_O_FLAG_NORM"
+      JAVAC_FLAGS="$JAVAC_FLAGS -g"
+      ;;
+    slowdebug )
+      CFLAGS_JDK="$CFLAGS_JDK $CFLAGS_DEBUG_SYMBOLS"
+      CXXFLAGS_JDK="$CXXFLAGS_JDK $CXXFLAGS_DEBUG_SYMBOLS"
+      C_O_FLAG_HI="$C_O_FLAG_NONE"
+      C_O_FLAG_NORM="$C_O_FLAG_NONE"
+      CXX_O_FLAG_HI="$CXX_O_FLAG_NONE"
+      CXX_O_FLAG_NORM="$CXX_O_FLAG_NONE"
+      JAVAC_FLAGS="$JAVAC_FLAGS -g"
+      ;;
+  esac
 
-CCXXFLAGS_JDK="$CCXXFLAGS_JDK $ADD_LP64"
+  CCXXFLAGS_JDK="$CCXXFLAGS_JDK $ADD_LP64"
 
-# The package path is used only on macosx?
-PACKAGE_PATH=/opt/local
+  # The package path is used only on macosx?
+  PACKAGE_PATH=/opt/local
 
 
-if test "x$OPENJDK_TARGET_CPU_ENDIAN" = xlittle; then
+  if test "x$OPENJDK_TARGET_CPU_ENDIAN" = xlittle; then
     # The macro _LITTLE_ENDIAN needs to be defined the same to avoid the
     #   Sun C compiler warning message: warning: macro redefined: _LITTLE_ENDIAN
     #   (The Solaris X86 system defines this in file /usr/include/sys/isa_defs.h).
     #   Note: -Dmacro         is the same as    #define macro 1
-    #         -Dmacro=	    is the same as    #define macro
+    #         -Dmacro=        is the same as    #define macro
     if test "x$OPENJDK_TARGET_OS" = xsolaris; then
-        CCXXFLAGS_JDK="$CCXXFLAGS_JDK -D_LITTLE_ENDIAN="
+      CCXXFLAGS_JDK="$CCXXFLAGS_JDK -D_LITTLE_ENDIAN="
     else
-        CCXXFLAGS_JDK="$CCXXFLAGS_JDK -D_LITTLE_ENDIAN"
+      CCXXFLAGS_JDK="$CCXXFLAGS_JDK -D_LITTLE_ENDIAN"
     fi
-else
+  else
     CCXXFLAGS_JDK="$CCXXFLAGS_JDK -D_BIG_ENDIAN"
-fi
-if test "x$OPENJDK_TARGET_OS" = xlinux; then
+  fi
+  if test "x$OPENJDK_TARGET_OS" = xlinux; then
     CCXXFLAGS_JDK="$CCXXFLAGS_JDK -DLINUX"
-fi
-if test "x$OPENJDK_TARGET_OS" = xwindows; then
+  fi
+  if test "x$OPENJDK_TARGET_OS" = xwindows; then
     CCXXFLAGS_JDK="$CCXXFLAGS_JDK -DWINDOWS"
-fi
-if test "x$OPENJDK_TARGET_OS" = xsolaris; then
+  fi
+  if test "x$OPENJDK_TARGET_OS" = xsolaris; then
     CCXXFLAGS_JDK="$CCXXFLAGS_JDK -DSOLARIS"
-fi
-if test "x$OPENJDK_TARGET_OS" = xmacosx; then
+  fi
+  if test "x$OPENJDK_TARGET_OS" = xmacosx; then
     CCXXFLAGS_JDK="$CCXXFLAGS_JDK -DMACOSX -D_ALLBSD_SOURCE -D_DARWIN_UNLIMITED_SELECT"
     # Setting these parameters makes it an error to link to macosx APIs that are
     # newer than the given OS version and makes the linked binaries compatible even
@@ -29254,106 +29252,106 @@
     # command line.
     CCXXFLAGS_JDK="$CCXXFLAGS_JDK -DMAC_OS_X_VERSION_MAX_ALLOWED=\$(subst .,,\$(MACOSX_VERSION_MIN)) -mmacosx-version-min=\$(MACOSX_VERSION_MIN)"
     LDFLAGS_JDK="$LDFLAGS_JDK -mmacosx-version-min=\$(MACOSX_VERSION_MIN)"
-fi
-if test "x$OPENJDK_TARGET_OS" = xbsd; then
+  fi
+  if test "x$OPENJDK_TARGET_OS" = xbsd; then
     CCXXFLAGS_JDK="$CCXXFLAGS_JDK -DBSD -D_ALLBSD_SOURCE"
-fi
-if test "x$DEBUG_LEVEL" = xrelease; then
+  fi
+  if test "x$DEBUG_LEVEL" = xrelease; then
     CCXXFLAGS_JDK="$CCXXFLAGS_JDK -DNDEBUG"
-    if test "x$OPENJDK_TARGET_OS" = xsolaris; then
-        CCXXFLAGS_JDK="$CCXXFLAGS_JDK -DTRIMMED"
-    fi
-else
+  if test "x$OPENJDK_TARGET_OS" = xsolaris; then
+    CCXXFLAGS_JDK="$CCXXFLAGS_JDK -DTRIMMED"
+  fi
+  else
     CCXXFLAGS_JDK="$CCXXFLAGS_JDK -DDEBUG"
-fi
+  fi
 
-CCXXFLAGS_JDK="$CCXXFLAGS_JDK -DARCH='\"$OPENJDK_TARGET_CPU_LEGACY\"' -D$OPENJDK_TARGET_CPU_LEGACY"
-CCXXFLAGS_JDK="$CCXXFLAGS_JDK -DRELEASE='\"$RELEASE\"'"
+  CCXXFLAGS_JDK="$CCXXFLAGS_JDK -DARCH='\"$OPENJDK_TARGET_CPU_LEGACY\"' -D$OPENJDK_TARGET_CPU_LEGACY"
+  CCXXFLAGS_JDK="$CCXXFLAGS_JDK -DRELEASE='\"$RELEASE\"'"
 
-CCXXFLAGS_JDK="$CCXXFLAGS_JDK \
-        -I${JDK_OUTPUTDIR}/include \
-        -I${JDK_OUTPUTDIR}/include/$OPENJDK_TARGET_OS \
-        -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"
+  CCXXFLAGS_JDK="$CCXXFLAGS_JDK \
+      -I${JDK_OUTPUTDIR}/include \
+      -I${JDK_OUTPUTDIR}/include/$OPENJDK_TARGET_OS \
+      -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"
 
-# The shared libraries are compiled using the picflag.
-CFLAGS_JDKLIB="$CCXXFLAGS_JDK $CFLAGS_JDK $PICFLAG $CFLAGS_JDKLIB_EXTRA"
-CXXFLAGS_JDKLIB="$CCXXFLAGS_JDK $CXXFLAGS_JDK $PICFLAG $CXXFLAGS_JDKLIB_EXTRA "
+  # The shared libraries are compiled using the picflag.
+  CFLAGS_JDKLIB="$CCXXFLAGS_JDK $CFLAGS_JDK $PICFLAG $CFLAGS_JDKLIB_EXTRA"
+  CXXFLAGS_JDKLIB="$CCXXFLAGS_JDK $CXXFLAGS_JDK $PICFLAG $CXXFLAGS_JDKLIB_EXTRA "
 
-# Executable flags
-CFLAGS_JDKEXE="$CCXXFLAGS_JDK $CFLAGS_JDK"
-CXXFLAGS_JDKEXE="$CCXXFLAGS_JDK $CXXFLAGS_JDK"
+  # Executable flags
+  CFLAGS_JDKEXE="$CCXXFLAGS_JDK $CFLAGS_JDK"
+  CXXFLAGS_JDKEXE="$CCXXFLAGS_JDK $CXXFLAGS_JDK"
 
-# Now this is odd. The JDK native libraries have to link against libjvm.so
-# On 32-bit machines there is normally two distinct libjvm.so:s, client and server.
-# Which should we link to? Are we lucky enough that the binary api to the libjvm.so library
-# is identical for client and server? Yes. Which is picked at runtime (client or server)?
-# Neither, since the chosen libjvm.so has already been loaded by the launcher, all the following
-# libraries will link to whatever is in memory. Yuck.
-#
-# Thus we offer the compiler to find libjvm.so first in server then in client. It works. Ugh.
-if test "x$COMPILER_NAME" = xcl; then
+  # Now this is odd. The JDK native libraries have to link against libjvm.so
+  # On 32-bit machines there is normally two distinct libjvm.so:s, client and server.
+  # Which should we link to? Are we lucky enough that the binary api to the libjvm.so library
+  # is identical for client and server? Yes. Which is picked at runtime (client or server)?
+  # Neither, since the chosen libjvm.so has already been loaded by the launcher, all the following
+  # libraries will link to whatever is in memory. Yuck.
+  #
+  # Thus we offer the compiler to find libjvm.so first in server then in client. It works. Ugh.
+  if test "x$COMPILER_NAME" = xcl; then
     LDFLAGS_JDK="$LDFLAGS_JDK -nologo -opt:ref -incremental:no"
     if test "x$OPENJDK_TARGET_CPU" = xx86; then
-        LDFLAGS_JDK="$LDFLAGS_JDK -safeseh"
+      LDFLAGS_JDK="$LDFLAGS_JDK -safeseh"
     fi
     # TODO: make -debug optional "--disable-full-debug-symbols"
     LDFLAGS_JDK="$LDFLAGS_JDK -debug"
     LDFLAGS_JDKLIB="${LDFLAGS_JDK} -dll -libpath:${JDK_OUTPUTDIR}/lib"
     LDFLAGS_JDKLIB_SUFFIX=""
     if test "x$OPENJDK_TARGET_CPU_BITS" = "x64"; then
-        LDFLAGS_STACK_SIZE=1048576
+      LDFLAGS_STACK_SIZE=1048576
     else
-        LDFLAGS_STACK_SIZE=327680
+      LDFLAGS_STACK_SIZE=327680
     fi
     LDFLAGS_JDKEXE="${LDFLAGS_JDK} /STACK:$LDFLAGS_STACK_SIZE"
-else
+  else
     if test "x$COMPILER_NAME" = xgcc; then
-        # If this is a --hash-style=gnu system, use --hash-style=both, why?
-        HAS_GNU_HASH=`$CC -dumpspecs 2>/dev/null | $GREP 'hash-style=gnu'`
-        if test -n "$HAS_GNU_HASH"; then
-            LDFLAGS_JDK="${LDFLAGS_JDK} -Xlinker --hash-style=both "
+      # If this is a --hash-style=gnu system, use --hash-style=both, why?
+      HAS_GNU_HASH=`$CC -dumpspecs 2>/dev/null | $GREP 'hash-style=gnu'`
+      if test -n "$HAS_GNU_HASH"; then
+        LDFLAGS_JDK="${LDFLAGS_JDK} -Xlinker --hash-style=both "
+      fi
+      if test "x$OPENJDK_TARGET_OS" = xlinux; then
+        # And since we now know that the linker is gnu, then add -z defs, to forbid
+        # undefined symbols in object files.
+        LDFLAGS_JDK="${LDFLAGS_JDK} -Xlinker -z -Xlinker defs"
+        if test "x$DEBUG_LEVEL" = "xrelease"; then
+          # When building release libraries, tell the linker optimize them.
+          # Should this be supplied to the OSS linker as well?
+          LDFLAGS_JDK="${LDFLAGS_JDK} -Xlinker -O1"
         fi
-        if test "x$OPENJDK_TARGET_OS" = xlinux; then
-          # And since we now know that the linker is gnu, then add -z defs, to forbid
-          # undefined symbols in object files.
-          LDFLAGS_JDK="${LDFLAGS_JDK} -Xlinker -z -Xlinker defs"
-          if test "x$DEBUG_LEVEL" = "xrelease"; then
-              # When building release libraries, tell the linker optimize them.
-              # Should this be supplied to the OSS linker as well?
-              LDFLAGS_JDK="${LDFLAGS_JDK} -Xlinker -O1"
-          fi
-        fi
+      fi
     fi
     LDFLAGS_JDKLIB="${LDFLAGS_JDK} $SHARED_LIBRARY_FLAGS \
-                    -L${JDK_OUTPUTDIR}/lib${OPENJDK_TARGET_CPU_LIBDIR}"
+        -L${JDK_OUTPUTDIR}/lib${OPENJDK_TARGET_CPU_LIBDIR}"
 
     # On some platforms (mac) the linker warns about non existing -L dirs.
     # Add server first if available. Linking aginst client does not always produce the same results.
     # Only add client dir if client is being built. Add minimal (note not minimal1) if only building minimal1.
     # Default to server for other variants.
     if test "x$JVM_VARIANT_SERVER" = xtrue; then
-        LDFLAGS_JDKLIB="${LDFLAGS_JDKLIB} -L${JDK_OUTPUTDIR}/lib${OPENJDK_TARGET_CPU_LIBDIR}/server"
+      LDFLAGS_JDKLIB="${LDFLAGS_JDKLIB} -L${JDK_OUTPUTDIR}/lib${OPENJDK_TARGET_CPU_LIBDIR}/server"
     elif test "x$JVM_VARIANT_CLIENT" = xtrue; then
-        LDFLAGS_JDKLIB="${LDFLAGS_JDKLIB} -L${JDK_OUTPUTDIR}/lib${OPENJDK_TARGET_CPU_LIBDIR}/client"
+      LDFLAGS_JDKLIB="${LDFLAGS_JDKLIB} -L${JDK_OUTPUTDIR}/lib${OPENJDK_TARGET_CPU_LIBDIR}/client"
     elif test "x$JVM_VARIANT_MINIMAL1" = xtrue; then
-        LDFLAGS_JDKLIB="${LDFLAGS_JDKLIB} -L${JDK_OUTPUTDIR}/lib${OPENJDK_TARGET_CPU_LIBDIR}/minimal"
+      LDFLAGS_JDKLIB="${LDFLAGS_JDKLIB} -L${JDK_OUTPUTDIR}/lib${OPENJDK_TARGET_CPU_LIBDIR}/minimal"
     else
-        LDFLAGS_JDKLIB="${LDFLAGS_JDKLIB} -L${JDK_OUTPUTDIR}/lib${OPENJDK_TARGET_CPU_LIBDIR}/server"
+      LDFLAGS_JDKLIB="${LDFLAGS_JDKLIB} -L${JDK_OUTPUTDIR}/lib${OPENJDK_TARGET_CPU_LIBDIR}/server"
     fi
 
     LDFLAGS_JDKLIB_SUFFIX="-ljava -ljvm"
     if test "x$COMPILER_NAME" = xossc; then
-        LDFLAGS_JDKLIB_SUFFIX="$LDFLAGS_JDKLIB_SUFFIX -lc"
+      LDFLAGS_JDKLIB_SUFFIX="$LDFLAGS_JDKLIB_SUFFIX -lc"
     fi
 
     LDFLAGS_JDKEXE="${LDFLAGS_JDK}"
     if test "x$OPENJDK_TARGET_OS" = xlinux; then
-        LDFLAGS_JDKEXE="$LDFLAGS_JDKEXE -Xlinker --allow-shlib-undefined"
+      LDFLAGS_JDKEXE="$LDFLAGS_JDKEXE -Xlinker --allow-shlib-undefined"
     fi
-fi
+  fi
 
 
 
@@ -29393,9 +29391,7 @@
 
   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
 /* end confdefs.h.  */
-
-    int i;
-
+int i;
 _ACEOF
 if ac_fn_c_try_compile "$LINENO"; then :
 
@@ -29421,9 +29417,7 @@
 
   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
 /* end confdefs.h.  */
-
-    int i;
-
+int i;
 _ACEOF
 if ac_fn_cxx_try_compile "$LINENO"; then :
 
@@ -29466,9 +29460,7 @@
 
   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
 /* end confdefs.h.  */
-
-    int i;
-
+int i;
 _ACEOF
 if ac_fn_c_try_compile "$LINENO"; then :
 
@@ -29494,9 +29486,7 @@
 
   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
 /* end confdefs.h.  */
-
-    int i;
-
+int i;
 _ACEOF
 if ac_fn_cxx_try_compile "$LINENO"; then :
 
@@ -29525,64 +29515,64 @@
 
 # Setup debug symbols (need objcopy from the toolchain for that)
 
-#
-# ENABLE_DEBUG_SYMBOLS
-# This must be done after the toolchain is setup, since we're looking at objcopy.
-#
-# Check whether --enable-debug-symbols was given.
+  #
+  # ENABLE_DEBUG_SYMBOLS
+  # This must be done after the toolchain is setup, since we're looking at objcopy.
+  #
+  # Check whether --enable-debug-symbols was given.
 if test "${enable_debug_symbols+set}" = set; then :
   enableval=$enable_debug_symbols;
 fi
 
 
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking if we should generate debug symbols" >&5
+  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if we should generate debug symbols" >&5
 $as_echo_n "checking if we should generate debug symbols... " >&6; }
 
-if test "x$enable_debug_symbols" = "xyes" && test "x$OBJCOPY" = x; then
-   # explicit enabling of enable-debug-symbols and can't find objcopy
-   #   this is an error
-   as_fn_error $? "Unable to find objcopy, cannot enable debug-symbols" "$LINENO" 5
-fi
-
-if test "x$enable_debug_symbols" = "xyes"; then
-  ENABLE_DEBUG_SYMBOLS=true
-elif test "x$enable_debug_symbols" = "xno"; then
-  ENABLE_DEBUG_SYMBOLS=false
-else
-  # default on macosx is false
-  if test "x$OPENJDK_TARGET_OS" = xmacosx; then
-    ENABLE_DEBUG_SYMBOLS=false
-  # Default is on if objcopy is found, otherwise off
-  elif test "x$OBJCOPY" != x || test "x$OPENJDK_TARGET_OS" = xwindows; then
-    ENABLE_DEBUG_SYMBOLS=true
-  else
-    ENABLE_DEBUG_SYMBOLS=false
+  if test "x$enable_debug_symbols" = "xyes" && test "x$OBJCOPY" = x; then
+    # explicit enabling of enable-debug-symbols and can't find objcopy
+    #   this is an error
+    as_fn_error $? "Unable to find objcopy, cannot enable debug-symbols" "$LINENO" 5
   fi
-fi
 
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ENABLE_DEBUG_SYMBOLS" >&5
+  if test "x$enable_debug_symbols" = "xyes"; then
+    ENABLE_DEBUG_SYMBOLS=true
+  elif test "x$enable_debug_symbols" = "xno"; then
+    ENABLE_DEBUG_SYMBOLS=false
+  else
+    # default on macosx is false
+    if test "x$OPENJDK_TARGET_OS" = xmacosx; then
+      ENABLE_DEBUG_SYMBOLS=false
+      # Default is on if objcopy is found, otherwise off
+    elif test "x$OBJCOPY" != x || test "x$OPENJDK_TARGET_OS" = xwindows; then
+      ENABLE_DEBUG_SYMBOLS=true
+    else
+      ENABLE_DEBUG_SYMBOLS=false
+    fi
+  fi
+
+  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ENABLE_DEBUG_SYMBOLS" >&5
 $as_echo "$ENABLE_DEBUG_SYMBOLS" >&6; }
 
-#
-# ZIP_DEBUGINFO_FILES
-#
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking if we should zip debug-info files" >&5
+  #
+  # ZIP_DEBUGINFO_FILES
+  #
+  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if we should zip debug-info files" >&5
 $as_echo_n "checking if we should zip debug-info files... " >&6; }
-# Check whether --enable-zip-debug-info was given.
+  # Check whether --enable-zip-debug-info was given.
 if test "${enable_zip_debug_info+set}" = set; then :
   enableval=$enable_zip_debug_info; enable_zip_debug_info="${enableval}"
 else
   enable_zip_debug_info="yes"
 fi
 
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: ${enable_zip_debug_info}" >&5
+  { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${enable_zip_debug_info}" >&5
 $as_echo "${enable_zip_debug_info}" >&6; }
 
-if test "x${enable_zip_debug_info}" = "xno"; then
-   ZIP_DEBUGINFO_FILES=false
-else
-   ZIP_DEBUGINFO_FILES=true
-fi
+  if test "x${enable_zip_debug_info}" = "xno"; then
+    ZIP_DEBUGINFO_FILES=false
+  else
+    ZIP_DEBUGINFO_FILES=true
+  fi
 
 
 
@@ -29598,28 +29588,28 @@
 
 
 
-###############################################################################
-#
-# OS specific settings that we never will need to probe.
-#
-if test "x$OPENJDK_TARGET_OS" = xlinux; then
+  ###############################################################################
+  #
+  # OS specific settings that we never will need to probe.
+  #
+  if test "x$OPENJDK_TARGET_OS" = xlinux; then
     { $as_echo "$as_me:${as_lineno-$LINENO}: checking what is not needed on Linux?" >&5
 $as_echo_n "checking what is not needed on Linux?... " >&6; }
     PULSE_NOT_NEEDED=yes
     { $as_echo "$as_me:${as_lineno-$LINENO}: result: pulse" >&5
 $as_echo "pulse" >&6; }
-fi
+  fi
 
-if test "x$OPENJDK_TARGET_OS" = xsolaris; then
+  if test "x$OPENJDK_TARGET_OS" = xsolaris; then
     { $as_echo "$as_me:${as_lineno-$LINENO}: checking what is not needed on Solaris?" >&5
 $as_echo_n "checking what is not needed on Solaris?... " >&6; }
     ALSA_NOT_NEEDED=yes
     PULSE_NOT_NEEDED=yes
     { $as_echo "$as_me:${as_lineno-$LINENO}: result: alsa pulse" >&5
 $as_echo "alsa pulse" >&6; }
-fi
+  fi
 
-if test "x$OPENJDK_TARGET_OS" = xwindows; then
+  if test "x$OPENJDK_TARGET_OS" = xwindows; then
     { $as_echo "$as_me:${as_lineno-$LINENO}: checking what is not needed on Windows?" >&5
 $as_echo_n "checking what is not needed on Windows?... " >&6; }
     CUPS_NOT_NEEDED=yes
@@ -29628,9 +29618,9 @@
     X11_NOT_NEEDED=yes
     { $as_echo "$as_me:${as_lineno-$LINENO}: result: alsa cups pulse x11" >&5
 $as_echo "alsa cups pulse x11" >&6; }
-fi
+  fi
 
-if test "x$OPENJDK_TARGET_OS" = xmacosx; then
+  if test "x$OPENJDK_TARGET_OS" = xmacosx; then
     { $as_echo "$as_me:${as_lineno-$LINENO}: checking what is not needed on MacOSX?" >&5
 $as_echo_n "checking what is not needed on MacOSX?... " >&6; }
     ALSA_NOT_NEEDED=yes
@@ -29641,30 +29631,30 @@
     # This will be adjusted below.
     { $as_echo "$as_me:${as_lineno-$LINENO}: result: alsa pulse x11" >&5
 $as_echo "alsa pulse x11" >&6; }
-fi
+  fi
 
-if test "x$OPENJDK_TARGET_OS" = xbsd; then
+  if test "x$OPENJDK_TARGET_OS" = xbsd; then
     { $as_echo "$as_me:${as_lineno-$LINENO}: checking what is not needed on bsd?" >&5
 $as_echo_n "checking what is not needed on bsd?... " >&6; }
     ALSA_NOT_NEEDED=yes
     { $as_echo "$as_me:${as_lineno-$LINENO}: result: alsa" >&5
 $as_echo "alsa" >&6; }
-fi
+  fi
 
-if test "x$OPENJDK" = "xfalse"; then
+  if test "x$OPENJDK" = "xfalse"; then
     FREETYPE2_NOT_NEEDED=yes
-fi
+  fi
 
-if test "x$SUPPORT_HEADFUL" = xno; then
+  if test "x$SUPPORT_HEADFUL" = xno; then
     X11_NOT_NEEDED=yes
-fi
+  fi
 
-###############################################################################
-#
-# Check for MacOSX support for OpenJDK. If this exists, try to build a JVM
-# that uses this API.
-#
-# Check whether --enable-macosx-runtime-support was given.
+  ###############################################################################
+  #
+  # Check for MacOSX support for OpenJDK. If this exists, try to build a JVM
+  # that uses this API.
+  #
+  # Check whether --enable-macosx-runtime-support was given.
 if test "${enable_macosx_runtime_support+set}" = set; then :
   enableval=$enable_macosx_runtime_support; MACOSX_RUNTIME_SUPPORT="${enableval}"
 else
@@ -29672,64 +29662,64 @@
 fi
 
 
-USE_MACOSX_RUNTIME_SUPPORT=no
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for explicit Java runtime support in the OS" >&5
+  USE_MACOSX_RUNTIME_SUPPORT=no
+  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for explicit Java runtime support in the OS" >&5
 $as_echo_n "checking for explicit Java runtime support in the OS... " >&6; }
-if test -f /System/Library/Frameworks/JavaVM.framework/Frameworks/JavaRuntimeSupport.framework/Headers/JavaRuntimeSupport.h; then
+  if test -f /System/Library/Frameworks/JavaVM.framework/Frameworks/JavaRuntimeSupport.framework/Headers/JavaRuntimeSupport.h; then
     if test "x$MACOSX_RUNTIME_SUPPORT" != xno; then
-        MACOSX_RUNTIME_SUPPORT=yes
-        USE_MACOSX_RUNTIME_SUPPORT=yes
-        { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes, does not need alsa freetype2 pulse and X11" >&5
+      MACOSX_RUNTIME_SUPPORT=yes
+      USE_MACOSX_RUNTIME_SUPPORT=yes
+      { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes, does not need alsa freetype2 pulse and X11" >&5
 $as_echo "yes, does not need alsa freetype2 pulse and X11" >&6; }
     else
-        { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes, but explicitly disabled." >&5
+      { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes, but explicitly disabled." >&5
 $as_echo "yes, but explicitly disabled." >&6; }
     fi
-else
+  else
     { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
 $as_echo "no" >&6; }
-fi
+  fi
 
-if test "x$OPENJDK_TARGET_OS" = xmacosx && test "x$USE_MACOSX_RUNTIME_SUPPORT" = xno; then
+  if test "x$OPENJDK_TARGET_OS" = xmacosx && test "x$USE_MACOSX_RUNTIME_SUPPORT" = xno; then
     { $as_echo "$as_me:${as_lineno-$LINENO}: checking what is not needed on an X11 build on MacOSX?" >&5
 $as_echo_n "checking what is not needed on an X11 build on MacOSX?... " >&6; }
     X11_NOT_NEEDED=
     FREETYPE2_NOT_NEEDED=
     { $as_echo "$as_me:${as_lineno-$LINENO}: result: alsa pulse" >&5
 $as_echo "alsa pulse" >&6; }
-fi
+  fi
 
 
 
-###############################################################################
-#
-# Check for X Windows
-#
+  ###############################################################################
+  #
+  # Check for X Windows
+  #
 
-# Check if the user has specified sysroot, but not --x-includes or --x-libraries.
-# Make a simple check for the libraries at the sysroot, and setup --x-includes and
-# --x-libraries for the sysroot, if that seems to be correct.
-if test "x$SYS_ROOT" != "x/"; then
-  if test "x$x_includes" = xNONE; then
-    if test -f "$SYS_ROOT/usr/X11R6/include/X11/Xlib.h"; then
-      x_includes="$SYS_ROOT/usr/X11R6/include"
-    elif test -f "$SYS_ROOT/usr/include/X11/Xlib.h"; then
-      x_includes="$SYS_ROOT/usr/include"
+  # Check if the user has specified sysroot, but not --x-includes or --x-libraries.
+  # Make a simple check for the libraries at the sysroot, and setup --x-includes and
+  # --x-libraries for the sysroot, if that seems to be correct.
+  if test "x$SYS_ROOT" != "x/"; then
+    if test "x$x_includes" = xNONE; then
+      if test -f "$SYS_ROOT/usr/X11R6/include/X11/Xlib.h"; then
+        x_includes="$SYS_ROOT/usr/X11R6/include"
+      elif test -f "$SYS_ROOT/usr/include/X11/Xlib.h"; then
+        x_includes="$SYS_ROOT/usr/include"
+      fi
+    fi
+    if test "x$x_libraries" = xNONE; then
+      if test -f "$SYS_ROOT/usr/X11R6/lib/libX11.so"; then
+        x_libraries="$SYS_ROOT/usr/X11R6/lib"
+      elif test "$SYS_ROOT/usr/lib64/libX11.so" && test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
+        x_libraries="$SYS_ROOT/usr/lib64"
+      elif test -f "$SYS_ROOT/usr/lib/libX11.so"; then
+        x_libraries="$SYS_ROOT/usr/lib"
+      fi
     fi
   fi
-  if test "x$x_libraries" = xNONE; then
-    if test -f "$SYS_ROOT/usr/X11R6/lib/libX11.so"; then
-      x_libraries="$SYS_ROOT/usr/X11R6/lib"
-    elif test "$SYS_ROOT/usr/lib64/libX11.so" && test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
-      x_libraries="$SYS_ROOT/usr/lib64"
-    elif test -f "$SYS_ROOT/usr/lib/libX11.so"; then
-      x_libraries="$SYS_ROOT/usr/lib"
-    fi
-  fi
-fi
 
-# Now let autoconf do it's magic
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for X" >&5
+  # Now let autoconf do it's magic
+  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for X" >&5
 $as_echo_n "checking for X... " >&6; }
 
 
@@ -29922,7 +29912,7 @@
 $as_echo "libraries $x_libraries, headers $x_includes" >&6; }
 fi
 
-if test "$no_x" = yes; then
+  if test "$no_x" = yes; then
   # Not all programs may use this symbol, but it does not hurt to define it.
 
 $as_echo "#define X_DISPLAY_MISSING 1" >>confdefs.h
@@ -30413,83 +30403,85 @@
 fi
 
 
-# AC_PATH_XTRA creates X_LIBS and sometimes adds -R flags. When cross compiling
-# this doesn't make sense so we remove it.
-if test "x$COMPILE_TYPE" = xcross; then
-  X_LIBS=`$ECHO $X_LIBS | $SED 's/-R \{0,1\}[^ ]*//g'`
-fi
+  # AC_PATH_XTRA creates X_LIBS and sometimes adds -R flags. When cross compiling
+  # this doesn't make sense so we remove it.
+  if test "x$COMPILE_TYPE" = xcross; then
+    X_LIBS=`$ECHO $X_LIBS | $SED 's/-R \{0,1\}[^ ]*//g'`
+  fi
 
-if test "x$no_x" = xyes && test "x$X11_NOT_NEEDED" != xyes; then
+  if test "x$no_x" = xyes && test "x$X11_NOT_NEEDED" != xyes; then
 
-    # Print a helpful message on how to acquire the necessary build dependency.
-    # x11 is the help tag: freetyp2, cups, pulse, alsa etc
-    MISSING_DEPENDENCY=x11
-    PKGHANDLER_COMMAND=
+  # Print a helpful message on how to acquire the necessary build dependency.
+  # x11 is the help tag: freetyp2, cups, pulse, alsa etc
+  MISSING_DEPENDENCY=x11
+  PKGHANDLER_COMMAND=
 
-    case $PKGHANDLER in
-	apt-get)
-                apt_help     $MISSING_DEPENDENCY ;;
+  case $PKGHANDLER in
+    apt-get)
+      apt_help     $MISSING_DEPENDENCY ;;
     yum)
-                yum_help     $MISSING_DEPENDENCY ;;
-	port)
-                port_help    $MISSING_DEPENDENCY ;;
-	pkgutil)
-                pkgutil_help $MISSING_DEPENDENCY ;;
-	pkgadd)
-                pkgadd_help  $MISSING_DEPENDENCY ;;
+      yum_help     $MISSING_DEPENDENCY ;;
+    port)
+      port_help    $MISSING_DEPENDENCY ;;
+    pkgutil)
+      pkgutil_help $MISSING_DEPENDENCY ;;
+    pkgadd)
+      pkgadd_help  $MISSING_DEPENDENCY ;;
     * )
       break ;;
-    esac
+  esac
 
-    if test "x$PKGHANDLER_COMMAND" != x; then
-        HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
-    fi
+  if test "x$PKGHANDLER_COMMAND" != x; then
+    HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
+  fi
 
     as_fn_error $? "Could not find X11 libraries. $HELP_MSG" "$LINENO" 5
-fi
-
-# Some of the old makefiles require a setting of OPENWIN_HOME
-# Since the X11R6 directory has disappeared on later Linuxes,
-# we need to probe for it.
-if test "x$OPENJDK_TARGET_OS" = xlinux; then
-    if test -d "$SYS_ROOT/usr/X11R6"; then
-        OPENWIN_HOME="$SYS_ROOT/usr/X11R6"
-    elif test -d "$SYS_ROOT/usr/include/X11"; then
-        OPENWIN_HOME="$SYS_ROOT/usr"
-    fi
-fi
-if test "x$OPENJDK_TARGET_OS" = xsolaris; then
-    OPENWIN_HOME="/usr/openwin"
-fi
-
-
-
-#
-# Weird Sol10 something check...TODO change to try compile
-#
-if test "x${OPENJDK_TARGET_OS}" = xsolaris; then
-  if test "`uname -r`" = "5.10"; then
-     if test "`${EGREP} -c XLinearGradient ${OPENWIN_HOME}/share/include/X11/extensions/Xrender.h`" = "0"; then
-     	X_CFLAGS="${X_CFLAGS} -DSOLARIS10_NO_XRENDER_STRUCTS"
-     fi
   fi
-fi
 
-ac_ext=c
+  # Some of the old makefiles require a setting of OPENWIN_HOME
+  # Since the X11R6 directory has disappeared on later Linuxes,
+  # we need to probe for it.
+  if test "x$OPENJDK_TARGET_OS" = xlinux; then
+    if test -d "$SYS_ROOT/usr/X11R6"; then
+      OPENWIN_HOME="$SYS_ROOT/usr/X11R6"
+    elif test -d "$SYS_ROOT/usr/include/X11"; then
+      OPENWIN_HOME="$SYS_ROOT/usr"
+    fi
+  fi
+  if test "x$OPENJDK_TARGET_OS" = xsolaris; then
+    OPENWIN_HOME="/usr/openwin"
+  fi
+
+
+
+  #
+  # Weird Sol10 something check...TODO change to try compile
+  #
+  if test "x${OPENJDK_TARGET_OS}" = xsolaris; then
+    if test "`uname -r`" = "5.10"; then
+      if test "`${EGREP} -c XLinearGradient ${OPENWIN_HOME}/share/include/X11/extensions/Xrender.h`" = "0"; then
+        X_CFLAGS="${X_CFLAGS} -DSOLARIS10_NO_XRENDER_STRUCTS"
+      fi
+    fi
+  fi
+
+  ac_ext=c
 ac_cpp='$CPP $CPPFLAGS'
 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
 ac_compiler_gnu=$ac_cv_c_compiler_gnu
 
-OLD_CFLAGS="$CFLAGS"
-CFLAGS="$CFLAGS $X_CFLAGS"
+  OLD_CFLAGS="$CFLAGS"
+  CFLAGS="$CFLAGS $X_CFLAGS"
 
-# Need to include Xlib.h and Xutil.h to avoid "present but cannot be compiled" warnings on Solaris 10
-for ac_header in X11/extensions/shape.h X11/extensions/Xrender.h X11/extensions/XTest.h X11/Intrinsic.h
+  # Need to include Xlib.h and Xutil.h to avoid "present but cannot be compiled" warnings on Solaris 10
+  for ac_header in X11/extensions/shape.h X11/extensions/Xrender.h X11/extensions/XTest.h X11/Intrinsic.h
 do :
   as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
-ac_fn_c_check_header_compile "$LINENO" "$ac_header" "$as_ac_Header" " # include <X11/Xlib.h>
-                   # include <X11/Xutil.h>
+ac_fn_c_check_header_compile "$LINENO" "$ac_header" "$as_ac_Header" "
+        # include <X11/Xlib.h>
+        # include <X11/Xutil.h>
+
 
 "
 if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
@@ -30504,52 +30496,52 @@
 done
 
 
-CFLAGS="$OLD_CFLAGS"
-ac_ext=cpp
+  CFLAGS="$OLD_CFLAGS"
+  ac_ext=cpp
 ac_cpp='$CXXCPP $CPPFLAGS'
 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
 
 
-if test "x$X11_A_OK" = xno && test "x$X11_NOT_NEEDED" != xyes; then
+  if test "x$X11_A_OK" = xno && test "x$X11_NOT_NEEDED" != xyes; then
 
-    # Print a helpful message on how to acquire the necessary build dependency.
-    # x11 is the help tag: freetyp2, cups, pulse, alsa etc
-    MISSING_DEPENDENCY=x11
-    PKGHANDLER_COMMAND=
+  # Print a helpful message on how to acquire the necessary build dependency.
+  # x11 is the help tag: freetyp2, cups, pulse, alsa etc
+  MISSING_DEPENDENCY=x11
+  PKGHANDLER_COMMAND=
 
-    case $PKGHANDLER in
-	apt-get)
-                apt_help     $MISSING_DEPENDENCY ;;
+  case $PKGHANDLER in
+    apt-get)
+      apt_help     $MISSING_DEPENDENCY ;;
     yum)
-                yum_help     $MISSING_DEPENDENCY ;;
-	port)
-                port_help    $MISSING_DEPENDENCY ;;
-	pkgutil)
-                pkgutil_help $MISSING_DEPENDENCY ;;
-	pkgadd)
-                pkgadd_help  $MISSING_DEPENDENCY ;;
+      yum_help     $MISSING_DEPENDENCY ;;
+    port)
+      port_help    $MISSING_DEPENDENCY ;;
+    pkgutil)
+      pkgutil_help $MISSING_DEPENDENCY ;;
+    pkgadd)
+      pkgadd_help  $MISSING_DEPENDENCY ;;
     * )
       break ;;
-    esac
+  esac
 
-    if test "x$PKGHANDLER_COMMAND" != x; then
-        HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
-    fi
+  if test "x$PKGHANDLER_COMMAND" != x; then
+    HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
+  fi
 
     as_fn_error $? "Could not find all X11 headers (shape.h Xrender.h XTest.h Intrinsic.h). $HELP_MSG" "$LINENO" 5
-fi
+  fi
 
 
 
 
 
 
-###############################################################################
-#
-# The common unix printing system cups is used to print from java.
-#
+  ###############################################################################
+  #
+  # The common unix printing system cups is used to print from java.
+  #
 
 # Check whether --with-cups was given.
 if test "${with_cups+set}" = set; then :
@@ -30563,175 +30555,175 @@
 fi
 
 
-if test "x$CUPS_NOT_NEEDED" = xyes; then
-	if test "x${with_cups}" != x || test "x${with_cups_include}" != x; then
-		{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cups not used, so --with-cups is ignored" >&5
+  if test "x$CUPS_NOT_NEEDED" = xyes; then
+    if test "x${with_cups}" != x || test "x${with_cups_include}" != x; then
+      { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cups not used, so --with-cups is ignored" >&5
 $as_echo "$as_me: WARNING: cups not used, so --with-cups is ignored" >&2;}
-	fi
-	CUPS_CFLAGS=
-else
-	CUPS_FOUND=no
+    fi
+    CUPS_CFLAGS=
+  else
+    CUPS_FOUND=no
 
-	if test "x${with_cups}" = xno || test "x${with_cups_include}" = xno; then
-	    as_fn_error $? "It is not possible to disable the use of cups. Remove the --without-cups option." "$LINENO" 5
-	fi
+    if test "x${with_cups}" = xno || test "x${with_cups_include}" = xno; then
+      as_fn_error $? "It is not possible to disable the use of cups. Remove the --without-cups option." "$LINENO" 5
+    fi
 
-	if test "x${with_cups}" != x; then
-	    CUPS_CFLAGS="-I${with_cups}/include"
-	    CUPS_FOUND=yes
-	fi
-	if test "x${with_cups_include}" != x; then
-	    CUPS_CFLAGS="-I${with_cups_include}"
-	    CUPS_FOUND=yes
-	fi
-	if test "x$CUPS_FOUND" = xno; then
+    if test "x${with_cups}" != x; then
+      CUPS_CFLAGS="-I${with_cups}/include"
+      CUPS_FOUND=yes
+    fi
+    if test "x${with_cups_include}" != x; then
+      CUPS_CFLAGS="-I${with_cups_include}"
+      CUPS_FOUND=yes
+    fi
+    if test "x$CUPS_FOUND" = xno; then
 
 
-    if test "x$with_builddeps_server" != x || test "x$with_builddeps_conf" != x; then
-        # Source the builddeps file again, to make sure it uses the latest variables!
-        . $builddepsfile
-        # Look for a target and build machine specific resource!
-        eval resource=\${builddep_cups_BUILD_${rewritten_build_var}_TARGET_${rewritten_target_var}}
-        if test "x$resource" = x; then
-            # Ok, lets instead look for a target specific resource
-            eval resource=\${builddep_cups_TARGET_${rewritten_target_var}}
-        fi
-        if test "x$resource" = x; then
-            # Ok, lets instead look for a build specific resource
-            eval resource=\${builddep_cups_BUILD_${rewritten_build_var}}
-        fi
-        if test "x$resource" = x; then
-            # Ok, lets instead look for a generic resource
-            # (The cups comes from M4 and not the shell, thus no need for eval here.)
-            resource=${builddep_cups}
-        fi
-        if test "x$resource" != x; then
-            { $as_echo "$as_me:${as_lineno-$LINENO}: Using builddeps $resource for cups" >&5
+  if test "x$with_builddeps_server" != x || test "x$with_builddeps_conf" != x; then
+    # Source the builddeps file again, to make sure it uses the latest variables!
+    . $builddepsfile
+    # Look for a target and build machine specific resource!
+    eval resource=\${builddep_cups_BUILD_${rewritten_build_var}_TARGET_${rewritten_target_var}}
+    if test "x$resource" = x; then
+      # Ok, lets instead look for a target specific resource
+      eval resource=\${builddep_cups_TARGET_${rewritten_target_var}}
+    fi
+    if test "x$resource" = x; then
+      # Ok, lets instead look for a build specific resource
+      eval resource=\${builddep_cups_BUILD_${rewritten_build_var}}
+    fi
+    if test "x$resource" = x; then
+      # Ok, lets instead look for a generic resource
+      # (The cups comes from M4 and not the shell, thus no need for eval here.)
+      resource=${builddep_cups}
+    fi
+    if test "x$resource" != x; then
+      { $as_echo "$as_me:${as_lineno-$LINENO}: Using builddeps $resource for cups" >&5
 $as_echo "$as_me: Using builddeps $resource for cups" >&6;}
-	    # If the resource in the builddeps.conf file is an existing directory,
-	    # for example /java/linux/cups
-	    if test -d ${resource}; then
-	       depdir=${resource}
-	    else
+      # If the resource in the builddeps.conf file is an existing directory,
+      # for example /java/linux/cups
+      if test -d ${resource}; then
+        depdir=${resource}
+      else
 
-# cups is for example mymodule
-# $resource is for example libs/general/libmymod_1_2_3.zip
-# $with_builddeps_server is for example ftp://mybuilddeps.myserver.com/builddeps
-# $with_builddeps_dir is for example /localhome/builddeps
-# depdir is the name of the variable into which we store the depdir, eg MYMOD
-# Will download ftp://mybuilddeps.myserver.com/builddeps/libs/general/libmymod_1_2_3.zip and
-# unzip into the directory: /localhome/builddeps/libmymod_1_2_3
-    filename=`basename $resource`
-    filebase=`echo $filename | sed 's/\.[^\.]*$//'`
-    filebase=${filename%%.*}
-    extension=${filename#*.}
-    installdir=$with_builddeps_dir/$filebase
-    if test ! -f $installdir/$filename.unpacked; then
-        { $as_echo "$as_me:${as_lineno-$LINENO}: Downloading build dependency cups from $with_builddeps_server/$resource and installing into $installdir" >&5
+  # cups is for example mymodule
+  # $resource is for example libs/general/libmymod_1_2_3.zip
+  # $with_builddeps_server is for example ftp://mybuilddeps.myserver.com/builddeps
+  # $with_builddeps_dir is for example /localhome/builddeps
+  # depdir is the name of the variable into which we store the depdir, eg MYMOD
+  # Will download ftp://mybuilddeps.myserver.com/builddeps/libs/general/libmymod_1_2_3.zip and
+  # unzip into the directory: /localhome/builddeps/libmymod_1_2_3
+  filename=`basename $resource`
+  filebase=`echo $filename | sed 's/\.[^\.]*$//'`
+  filebase=${filename%%.*}
+  extension=${filename#*.}
+  installdir=$with_builddeps_dir/$filebase
+  if test ! -f $installdir/$filename.unpacked; then
+    { $as_echo "$as_me:${as_lineno-$LINENO}: Downloading build dependency cups from $with_builddeps_server/$resource and installing into $installdir" >&5
 $as_echo "$as_me: Downloading build dependency cups from $with_builddeps_server/$resource and installing into $installdir" >&6;}
-        if test ! -d $installdir; then
-            mkdir -p $installdir
-        fi
-        if test ! -d $installdir; then
-            as_fn_error $? "Could not create directory $installdir" "$LINENO" 5
-        fi
-        tmpfile=`mktemp $installdir/cups.XXXXXXXXX`
-        touch $tmpfile
-        if test ! -f $tmpfile; then
-            as_fn_error $? "Could not create files in directory $installdir" "$LINENO" 5
-        fi
-
-    # $with_builddeps_server/$resource  is the ftp://abuilddeps.server.com/libs/cups.zip
-    # $tmpfile is the local file name for the downloaded file.
-    VALID_TOOL=no
-    if test "x$BDEPS_FTP" = xwget; then
-       VALID_TOOL=yes
-       wget -O $tmpfile $with_builddeps_server/$resource
+    if test ! -d $installdir; then
+      mkdir -p $installdir
     fi
-    if test "x$BDEPS_FTP" = xlftp; then
-       VALID_TOOL=yes
-       lftp -c "get $with_builddeps_server/$resource  -o $tmpfile"
+    if test ! -d $installdir; then
+      as_fn_error $? "Could not create directory $installdir" "$LINENO" 5
     fi
-    if test "x$BDEPS_FTP" = xftp; then
-        VALID_TOOL=yes
-        FTPSERVER=`echo $with_builddeps_server/$resource  | cut -f 3 -d '/'`
-        FTPPATH=`echo $with_builddeps_server/$resource  | cut -f 4- -d '/'`
-        FTPUSERPWD=${FTPSERVER%%@*}
-        if test "x$FTPSERVER" != "x$FTPUSERPWD"; then
-            FTPUSER=${userpwd%%:*}
-            FTPPWD=${userpwd#*@}
-            FTPSERVER=${FTPSERVER#*@}
-        else
-            FTPUSER=ftp
-            FTPPWD=ftp
-        fi
-        # the "pass" command does not work on some
-        # ftp clients (read ftp.exe) but if it works,
-        # passive mode is better!
-        (\
-            echo "user $FTPUSER $FTPPWD"        ;\
-            echo "pass"                         ;\
-            echo "bin"                          ;\
-            echo "get $FTPPATH $tmpfile"              ;\
-        ) | ftp -in $FTPSERVER
-    fi
-    if test "x$VALID_TOOL" != xyes; then
-       as_fn_error $? "I do not know how to use the tool: $BDEPS_FTP" "$LINENO" 5
+    tmpfile=`mktemp $installdir/cups.XXXXXXXXX`
+    touch $tmpfile
+    if test ! -f $tmpfile; then
+      as_fn_error $? "Could not create files in directory $installdir" "$LINENO" 5
     fi
 
-        mv $tmpfile $installdir/$filename
-        if test ! -s $installdir/$filename; then
-            as_fn_error $? "Could not download $with_builddeps_server/$resource" "$LINENO" 5
-        fi
-        case "$extension" in
-            zip)  echo "Unzipping $installdir/$filename..."
-               (cd $installdir ; rm -f $installdir/$filename.unpacked ; $BDEPS_UNZIP $installdir/$filename > /dev/null && touch $installdir/$filename.unpacked)
-            ;;
-            tar.gz) echo "Untaring $installdir/$filename..."
-               (cd $installdir ; rm -f $installdir/$filename.unpacked ; tar xzf $installdir/$filename && touch $installdir/$filename.unpacked)
-            ;;
-            tgz) echo "Untaring $installdir/$filename..."
-               (cd $installdir ; rm -f $installdir/$filename.unpacked ; tar xzf $installdir/$filename && touch $installdir/$filename.unpacked)
-            ;;
-            *) as_fn_error $? "Cannot handle build depency archive with extension $extension" "$LINENO" 5
-            ;;
-        esac
+  # $with_builddeps_server/$resource  is the ftp://abuilddeps.server.com/libs/cups.zip
+  # $tmpfile is the local file name for the downloaded file.
+  VALID_TOOL=no
+  if test "x$BDEPS_FTP" = xwget; then
+    VALID_TOOL=yes
+    wget -O $tmpfile $with_builddeps_server/$resource
+  fi
+  if test "x$BDEPS_FTP" = xlftp; then
+    VALID_TOOL=yes
+    lftp -c "get $with_builddeps_server/$resource  -o $tmpfile"
+  fi
+  if test "x$BDEPS_FTP" = xftp; then
+    VALID_TOOL=yes
+    FTPSERVER=`echo $with_builddeps_server/$resource  | cut -f 3 -d '/'`
+    FTPPATH=`echo $with_builddeps_server/$resource  | cut -f 4- -d '/'`
+    FTPUSERPWD=${FTPSERVER%%@*}
+    if test "x$FTPSERVER" != "x$FTPUSERPWD"; then
+      FTPUSER=${userpwd%%:*}
+      FTPPWD=${userpwd#*@}
+      FTPSERVER=${FTPSERVER#*@}
+    else
+      FTPUSER=ftp
+      FTPPWD=ftp
     fi
-    if test -f $installdir/$filename.unpacked; then
-        depdir=$installdir
+    # the "pass" command does not work on some
+    # ftp clients (read ftp.exe) but if it works,
+    # passive mode is better!
+    ( \
+        echo "user $FTPUSER $FTPPWD"        ; \
+        echo "pass"                         ; \
+        echo "bin"                          ; \
+        echo "get $FTPPATH $tmpfile"              ; \
+    ) | ftp -in $FTPSERVER
+  fi
+  if test "x$VALID_TOOL" != xyes; then
+    as_fn_error $? "I do not know how to use the tool: $BDEPS_FTP" "$LINENO" 5
+  fi
+
+    mv $tmpfile $installdir/$filename
+    if test ! -s $installdir/$filename; then
+      as_fn_error $? "Could not download $with_builddeps_server/$resource" "$LINENO" 5
     fi
+    case "$extension" in
+      zip)  echo "Unzipping $installdir/$filename..."
+        (cd $installdir ; rm -f $installdir/$filename.unpacked ; $BDEPS_UNZIP $installdir/$filename > /dev/null && touch $installdir/$filename.unpacked)
+        ;;
+      tar.gz) echo "Untaring $installdir/$filename..."
+        (cd $installdir ; rm -f $installdir/$filename.unpacked ; tar xzf $installdir/$filename && touch $installdir/$filename.unpacked)
+        ;;
+      tgz) echo "Untaring $installdir/$filename..."
+        (cd $installdir ; rm -f $installdir/$filename.unpacked ; tar xzf $installdir/$filename && touch $installdir/$filename.unpacked)
+        ;;
+      *) as_fn_error $? "Cannot handle build depency archive with extension $extension" "$LINENO" 5
+        ;;
+    esac
+  fi
+  if test -f $installdir/$filename.unpacked; then
+    depdir=$installdir
+  fi
 
-	    fi
-            # Source the builddeps file again, because in the previous command, the depdir
-            # was updated to point at the current build dependency install directory.
-            . $builddepsfile
-            # Now extract variables from the builddeps.conf files.
-            theroot=${builddep_cups_ROOT}
-            thecflags=${builddep_cups_CFLAGS}
-            thelibs=${builddep_cups_LIBS}
-            if test "x$depdir" = x; then
-                as_fn_error $? "Could not download build dependency cups" "$LINENO" 5
-            fi
-            CUPS=$depdir
-            if test "x$theroot" != x; then
-               CUPS="$theroot"
-            fi
-            if test "x$thecflags" != x; then
-               CUPS_CFLAGS="$thecflags"
-            fi
-            if test "x$thelibs" != x; then
-               CUPS_LIBS="$thelibs"
-            fi
-            CUPS_FOUND=yes
-
-        fi
+      fi
+      # Source the builddeps file again, because in the previous command, the depdir
+      # was updated to point at the current build dependency install directory.
+      . $builddepsfile
+      # Now extract variables from the builddeps.conf files.
+      theroot=${builddep_cups_ROOT}
+      thecflags=${builddep_cups_CFLAGS}
+      thelibs=${builddep_cups_LIBS}
+      if test "x$depdir" = x; then
+        as_fn_error $? "Could not download build dependency cups" "$LINENO" 5
+      fi
+      CUPS=$depdir
+      if test "x$theroot" != x; then
+        CUPS="$theroot"
+      fi
+      if test "x$thecflags" != x; then
+        CUPS_CFLAGS="$thecflags"
+      fi
+      if test "x$thelibs" != x; then
+        CUPS_LIBS="$thelibs"
+      fi
+      CUPS_FOUND=yes
 
     fi
 
-	fi
-	if test "x$CUPS_FOUND" = xno; then
-	    # Are the cups headers installed in the default /usr/include location?
-	    for ac_header in cups/cups.h cups/ppd.h
+  fi
+
+    fi
+    if test "x$CUPS_FOUND" = xno; then
+      # Are the cups headers installed in the default /usr/include location?
+      for ac_header in cups/cups.h cups/ppd.h
 do :
   as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
 ac_fn_cxx_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default"
@@ -30739,70 +30731,73 @@
   cat >>confdefs.h <<_ACEOF
 #define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
 _ACEOF
- CUPS_FOUND=yes
-	                      CUPS_CFLAGS=
-	                      DEFAULT_CUPS=yes
+
+            CUPS_FOUND=yes
+            CUPS_CFLAGS=
+            DEFAULT_CUPS=yes
+
+
 fi
 
 done
 
-	fi
-	if test "x$CUPS_FOUND" = xno; then
-	    # Getting nervous now? Lets poke around for standard Solaris third-party
-	    # package installation locations.
-	    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for cups headers" >&5
+    fi
+    if test "x$CUPS_FOUND" = xno; then
+      # Getting nervous now? Lets poke around for standard Solaris third-party
+      # package installation locations.
+      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for cups headers" >&5
 $as_echo_n "checking for cups headers... " >&6; }
-	    if test -s /opt/sfw/cups/include/cups/cups.h; then
-	       # An SFW package seems to be installed!
-	       CUPS_FOUND=yes
-	       CUPS_CFLAGS="-I/opt/sfw/cups/include"
-	    elif test -s /opt/csw/include/cups/cups.h; then
-	       # A CSW package seems to be installed!
-	       CUPS_FOUND=yes
-	       CUPS_CFLAGS="-I/opt/csw/include"
-	    fi
-	    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CUPS_FOUND" >&5
+      if test -s /opt/sfw/cups/include/cups/cups.h; then
+        # An SFW package seems to be installed!
+        CUPS_FOUND=yes
+        CUPS_CFLAGS="-I/opt/sfw/cups/include"
+      elif test -s /opt/csw/include/cups/cups.h; then
+        # A CSW package seems to be installed!
+        CUPS_FOUND=yes
+        CUPS_CFLAGS="-I/opt/csw/include"
+      fi
+      { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CUPS_FOUND" >&5
 $as_echo "$CUPS_FOUND" >&6; }
-	fi
-	if test "x$CUPS_FOUND" = xno; then
+    fi
+    if test "x$CUPS_FOUND" = xno; then
 
-    # Print a helpful message on how to acquire the necessary build dependency.
-    # cups is the help tag: freetyp2, cups, pulse, alsa etc
-    MISSING_DEPENDENCY=cups
-    PKGHANDLER_COMMAND=
+  # Print a helpful message on how to acquire the necessary build dependency.
+  # cups is the help tag: freetyp2, cups, pulse, alsa etc
+  MISSING_DEPENDENCY=cups
+  PKGHANDLER_COMMAND=
 
-    case $PKGHANDLER in
-	apt-get)
-                apt_help     $MISSING_DEPENDENCY ;;
+  case $PKGHANDLER in
+    apt-get)
+      apt_help     $MISSING_DEPENDENCY ;;
     yum)
-                yum_help     $MISSING_DEPENDENCY ;;
-	port)
-                port_help    $MISSING_DEPENDENCY ;;
-	pkgutil)
-                pkgutil_help $MISSING_DEPENDENCY ;;
-	pkgadd)
-                pkgadd_help  $MISSING_DEPENDENCY ;;
+      yum_help     $MISSING_DEPENDENCY ;;
+    port)
+      port_help    $MISSING_DEPENDENCY ;;
+    pkgutil)
+      pkgutil_help $MISSING_DEPENDENCY ;;
+    pkgadd)
+      pkgadd_help  $MISSING_DEPENDENCY ;;
     * )
       break ;;
-    esac
+  esac
 
-    if test "x$PKGHANDLER_COMMAND" != x; then
-        HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
+  if test "x$PKGHANDLER_COMMAND" != x; then
+    HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
+  fi
+
+      as_fn_error $? "Could not find cups! $HELP_MSG " "$LINENO" 5
     fi
-
-	    as_fn_error $? "Could not find cups! $HELP_MSG " "$LINENO" 5
-	fi
-fi
+  fi
 
 
 
 
 
 
-###############################################################################
-#
-# The ubiquitous freetype2 library is used to render fonts.
-#
+  ###############################################################################
+  #
+  # The ubiquitous freetype2 library is used to render fonts.
+  #
 
 # Check whether --with-freetype was given.
 if test "${with_freetype+set}" = set; then :
@@ -30810,21 +30805,21 @@
 fi
 
 
-# If we are using the OS installed system lib for freetype, then we do not need to copy it to the build tree
-USING_SYSTEM_FT_LIB=false
+  # If we are using the OS installed system lib for freetype, then we do not need to copy it to the build tree
+  USING_SYSTEM_FT_LIB=false
 
-if test "x$FREETYPE2_NOT_NEEDED" = xyes; then
-	if test "x$with_freetype" != x || test "x$with_freetype_include" != x || test "x$with_freetype_lib" != x; then
-		{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: freetype not used, so --with-freetype is ignored" >&5
+  if test "x$FREETYPE2_NOT_NEEDED" = xyes; then
+    if test "x$with_freetype" != x || test "x$with_freetype_include" != x || test "x$with_freetype_lib" != x; then
+      { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: freetype not used, so --with-freetype is ignored" >&5
 $as_echo "$as_me: WARNING: freetype not used, so --with-freetype is ignored" >&2;}
-	fi
-	FREETYPE2_CFLAGS=
-	FREETYPE2_LIBS=
-        FREETYPE2_LIB_PATH=
-else
-	FREETYPE2_FOUND=no
+    fi
+    FREETYPE2_CFLAGS=
+    FREETYPE2_LIBS=
+    FREETYPE2_LIB_PATH=
+  else
+    FREETYPE2_FOUND=no
 
-	if test "x$with_freetype" != x; then
+    if test "x$with_freetype" != x; then
 
   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
 
@@ -30947,186 +30942,186 @@
     with_freetype="`cd "$path"; $THEPWDCMD -L`"
   fi
 
-	    FREETYPE2_LIBS="-L$with_freetype/lib -lfreetype"
-            FREETYPE2_LIB_PATH="$with_freetype/lib"
-            if test "x$OPENJDK_TARGET_OS" = xsolaris && test "x$OPENJDK_TARGET_CPU" = xx86_64 && test -d "$with_freetype/lib/amd64"; then
-                FREETYPE2_LIBS="-L$with_freetype/lib/amd64 -lfreetype"
-                FREETYPE2_LIB_PATH="$with_freetype/lib/amd64"
-            fi
-            if test "x$OPENJDK_TARGET_OS" = xwindows; then
-                FREETYPE2_LIBS="$with_freetype/lib/freetype.lib"
-            fi
-	    FREETYPE2_CFLAGS="-I$with_freetype/include"
-            if test -s $with_freetype/include/ft2build.h && test -d $with_freetype/include/freetype2/freetype; then
-                FREETYPE2_CFLAGS="-I$with_freetype/include/freetype2 -I$with_freetype/include"
-            fi
- 	    FREETYPE2_FOUND=yes
-   	    if test "x$FREETYPE2_FOUND" = xyes; then
-	        # Verify that the directories exist
-                if ! test -d "$with_freetype/lib" || ! test -d "$with_freetype/include"; then
-		   as_fn_error $? "Could not find the expected directories $with_freetype/lib and $with_freetype/include" "$LINENO" 5
-		fi
-	        # List the contents of the lib.
-		FREETYPELIB=`ls $with_freetype/lib/libfreetype.so $with_freetype/lib/freetype.dll 2> /dev/null`
-                if test "x$FREETYPELIB" = x; then
-		   as_fn_error $? "Could not find libfreetype.so nor freetype.dll in $with_freetype/lib" "$LINENO" 5
-		fi
-	        # Check one h-file
-                if ! test -s "$with_freetype/include/ft2build.h"; then
-		   as_fn_error $? "Could not find $with_freetype/include/ft2build.h" "$LINENO" 5
-		fi
-            fi
+      FREETYPE2_LIBS="-L$with_freetype/lib -lfreetype"
+      FREETYPE2_LIB_PATH="$with_freetype/lib"
+      if test "x$OPENJDK_TARGET_OS" = xsolaris && test "x$OPENJDK_TARGET_CPU" = xx86_64 && test -d "$with_freetype/lib/amd64"; then
+        FREETYPE2_LIBS="-L$with_freetype/lib/amd64 -lfreetype"
+        FREETYPE2_LIB_PATH="$with_freetype/lib/amd64"
+      fi
+      if test "x$OPENJDK_TARGET_OS" = xwindows; then
+        FREETYPE2_LIBS="$with_freetype/lib/freetype.lib"
+      fi
+      FREETYPE2_CFLAGS="-I$with_freetype/include"
+      if test -s $with_freetype/include/ft2build.h && test -d $with_freetype/include/freetype2/freetype; then
+        FREETYPE2_CFLAGS="-I$with_freetype/include/freetype2 -I$with_freetype/include"
+      fi
+      FREETYPE2_FOUND=yes
+      if test "x$FREETYPE2_FOUND" = xyes; then
+        # Verify that the directories exist
+        if ! test -d "$with_freetype/lib" || ! test -d "$with_freetype/include"; then
+          as_fn_error $? "Could not find the expected directories $with_freetype/lib and $with_freetype/include" "$LINENO" 5
         fi
-	if test "x$FREETYPE2_FOUND" = xno; then
+        # List the contents of the lib.
+        FREETYPELIB=`ls $with_freetype/lib/libfreetype.so $with_freetype/lib/freetype.dll 2> /dev/null`
+        if test "x$FREETYPELIB" = x; then
+          as_fn_error $? "Could not find libfreetype.so nor freetype.dll in $with_freetype/lib" "$LINENO" 5
+        fi
+        # Check one h-file
+        if ! test -s "$with_freetype/include/ft2build.h"; then
+          as_fn_error $? "Could not find $with_freetype/include/ft2build.h" "$LINENO" 5
+        fi
+      fi
+    fi
+    if test "x$FREETYPE2_FOUND" = xno; then
 
 
-    if test "x$with_builddeps_server" != x || test "x$with_builddeps_conf" != x; then
-        # Source the builddeps file again, to make sure it uses the latest variables!
-        . $builddepsfile
-        # Look for a target and build machine specific resource!
-        eval resource=\${builddep_freetype2_BUILD_${rewritten_build_var}_TARGET_${rewritten_target_var}}
-        if test "x$resource" = x; then
-            # Ok, lets instead look for a target specific resource
-            eval resource=\${builddep_freetype2_TARGET_${rewritten_target_var}}
-        fi
-        if test "x$resource" = x; then
-            # Ok, lets instead look for a build specific resource
-            eval resource=\${builddep_freetype2_BUILD_${rewritten_build_var}}
-        fi
-        if test "x$resource" = x; then
-            # Ok, lets instead look for a generic resource
-            # (The freetype2 comes from M4 and not the shell, thus no need for eval here.)
-            resource=${builddep_freetype2}
-        fi
-        if test "x$resource" != x; then
-            { $as_echo "$as_me:${as_lineno-$LINENO}: Using builddeps $resource for freetype2" >&5
+  if test "x$with_builddeps_server" != x || test "x$with_builddeps_conf" != x; then
+    # Source the builddeps file again, to make sure it uses the latest variables!
+    . $builddepsfile
+    # Look for a target and build machine specific resource!
+    eval resource=\${builddep_freetype2_BUILD_${rewritten_build_var}_TARGET_${rewritten_target_var}}
+    if test "x$resource" = x; then
+      # Ok, lets instead look for a target specific resource
+      eval resource=\${builddep_freetype2_TARGET_${rewritten_target_var}}
+    fi
+    if test "x$resource" = x; then
+      # Ok, lets instead look for a build specific resource
+      eval resource=\${builddep_freetype2_BUILD_${rewritten_build_var}}
+    fi
+    if test "x$resource" = x; then
+      # Ok, lets instead look for a generic resource
+      # (The freetype2 comes from M4 and not the shell, thus no need for eval here.)
+      resource=${builddep_freetype2}
+    fi
+    if test "x$resource" != x; then
+      { $as_echo "$as_me:${as_lineno-$LINENO}: Using builddeps $resource for freetype2" >&5
 $as_echo "$as_me: Using builddeps $resource for freetype2" >&6;}
-	    # If the resource in the builddeps.conf file is an existing directory,
-	    # for example /java/linux/cups
-	    if test -d ${resource}; then
-	       depdir=${resource}
-	    else
+      # If the resource in the builddeps.conf file is an existing directory,
+      # for example /java/linux/cups
+      if test -d ${resource}; then
+        depdir=${resource}
+      else
 
-# freetype2 is for example mymodule
-# $resource is for example libs/general/libmymod_1_2_3.zip
-# $with_builddeps_server is for example ftp://mybuilddeps.myserver.com/builddeps
-# $with_builddeps_dir is for example /localhome/builddeps
-# depdir is the name of the variable into which we store the depdir, eg MYMOD
-# Will download ftp://mybuilddeps.myserver.com/builddeps/libs/general/libmymod_1_2_3.zip and
-# unzip into the directory: /localhome/builddeps/libmymod_1_2_3
-    filename=`basename $resource`
-    filebase=`echo $filename | sed 's/\.[^\.]*$//'`
-    filebase=${filename%%.*}
-    extension=${filename#*.}
-    installdir=$with_builddeps_dir/$filebase
-    if test ! -f $installdir/$filename.unpacked; then
-        { $as_echo "$as_me:${as_lineno-$LINENO}: Downloading build dependency freetype2 from $with_builddeps_server/$resource and installing into $installdir" >&5
+  # freetype2 is for example mymodule
+  # $resource is for example libs/general/libmymod_1_2_3.zip
+  # $with_builddeps_server is for example ftp://mybuilddeps.myserver.com/builddeps
+  # $with_builddeps_dir is for example /localhome/builddeps
+  # depdir is the name of the variable into which we store the depdir, eg MYMOD
+  # Will download ftp://mybuilddeps.myserver.com/builddeps/libs/general/libmymod_1_2_3.zip and
+  # unzip into the directory: /localhome/builddeps/libmymod_1_2_3
+  filename=`basename $resource`
+  filebase=`echo $filename | sed 's/\.[^\.]*$//'`
+  filebase=${filename%%.*}
+  extension=${filename#*.}
+  installdir=$with_builddeps_dir/$filebase
+  if test ! -f $installdir/$filename.unpacked; then
+    { $as_echo "$as_me:${as_lineno-$LINENO}: Downloading build dependency freetype2 from $with_builddeps_server/$resource and installing into $installdir" >&5
 $as_echo "$as_me: Downloading build dependency freetype2 from $with_builddeps_server/$resource and installing into $installdir" >&6;}
-        if test ! -d $installdir; then
-            mkdir -p $installdir
-        fi
-        if test ! -d $installdir; then
-            as_fn_error $? "Could not create directory $installdir" "$LINENO" 5
-        fi
-        tmpfile=`mktemp $installdir/freetype2.XXXXXXXXX`
-        touch $tmpfile
-        if test ! -f $tmpfile; then
-            as_fn_error $? "Could not create files in directory $installdir" "$LINENO" 5
-        fi
-
-    # $with_builddeps_server/$resource  is the ftp://abuilddeps.server.com/libs/cups.zip
-    # $tmpfile is the local file name for the downloaded file.
-    VALID_TOOL=no
-    if test "x$BDEPS_FTP" = xwget; then
-       VALID_TOOL=yes
-       wget -O $tmpfile $with_builddeps_server/$resource
+    if test ! -d $installdir; then
+      mkdir -p $installdir
     fi
-    if test "x$BDEPS_FTP" = xlftp; then
-       VALID_TOOL=yes
-       lftp -c "get $with_builddeps_server/$resource  -o $tmpfile"
+    if test ! -d $installdir; then
+      as_fn_error $? "Could not create directory $installdir" "$LINENO" 5
     fi
-    if test "x$BDEPS_FTP" = xftp; then
-        VALID_TOOL=yes
-        FTPSERVER=`echo $with_builddeps_server/$resource  | cut -f 3 -d '/'`
-        FTPPATH=`echo $with_builddeps_server/$resource  | cut -f 4- -d '/'`
-        FTPUSERPWD=${FTPSERVER%%@*}
-        if test "x$FTPSERVER" != "x$FTPUSERPWD"; then
-            FTPUSER=${userpwd%%:*}
-            FTPPWD=${userpwd#*@}
-            FTPSERVER=${FTPSERVER#*@}
-        else
-            FTPUSER=ftp
-            FTPPWD=ftp
-        fi
-        # the "pass" command does not work on some
-        # ftp clients (read ftp.exe) but if it works,
-        # passive mode is better!
-        (\
-            echo "user $FTPUSER $FTPPWD"        ;\
-            echo "pass"                         ;\
-            echo "bin"                          ;\
-            echo "get $FTPPATH $tmpfile"              ;\
-        ) | ftp -in $FTPSERVER
-    fi
-    if test "x$VALID_TOOL" != xyes; then
-       as_fn_error $? "I do not know how to use the tool: $BDEPS_FTP" "$LINENO" 5
+    tmpfile=`mktemp $installdir/freetype2.XXXXXXXXX`
+    touch $tmpfile
+    if test ! -f $tmpfile; then
+      as_fn_error $? "Could not create files in directory $installdir" "$LINENO" 5
     fi
 
-        mv $tmpfile $installdir/$filename
-        if test ! -s $installdir/$filename; then
-            as_fn_error $? "Could not download $with_builddeps_server/$resource" "$LINENO" 5
-        fi
-        case "$extension" in
-            zip)  echo "Unzipping $installdir/$filename..."
-               (cd $installdir ; rm -f $installdir/$filename.unpacked ; $BDEPS_UNZIP $installdir/$filename > /dev/null && touch $installdir/$filename.unpacked)
-            ;;
-            tar.gz) echo "Untaring $installdir/$filename..."
-               (cd $installdir ; rm -f $installdir/$filename.unpacked ; tar xzf $installdir/$filename && touch $installdir/$filename.unpacked)
-            ;;
-            tgz) echo "Untaring $installdir/$filename..."
-               (cd $installdir ; rm -f $installdir/$filename.unpacked ; tar xzf $installdir/$filename && touch $installdir/$filename.unpacked)
-            ;;
-            *) as_fn_error $? "Cannot handle build depency archive with extension $extension" "$LINENO" 5
-            ;;
-        esac
+  # $with_builddeps_server/$resource  is the ftp://abuilddeps.server.com/libs/cups.zip
+  # $tmpfile is the local file name for the downloaded file.
+  VALID_TOOL=no
+  if test "x$BDEPS_FTP" = xwget; then
+    VALID_TOOL=yes
+    wget -O $tmpfile $with_builddeps_server/$resource
+  fi
+  if test "x$BDEPS_FTP" = xlftp; then
+    VALID_TOOL=yes
+    lftp -c "get $with_builddeps_server/$resource  -o $tmpfile"
+  fi
+  if test "x$BDEPS_FTP" = xftp; then
+    VALID_TOOL=yes
+    FTPSERVER=`echo $with_builddeps_server/$resource  | cut -f 3 -d '/'`
+    FTPPATH=`echo $with_builddeps_server/$resource  | cut -f 4- -d '/'`
+    FTPUSERPWD=${FTPSERVER%%@*}
+    if test "x$FTPSERVER" != "x$FTPUSERPWD"; then
+      FTPUSER=${userpwd%%:*}
+      FTPPWD=${userpwd#*@}
+      FTPSERVER=${FTPSERVER#*@}
+    else
+      FTPUSER=ftp
+      FTPPWD=ftp
     fi
-    if test -f $installdir/$filename.unpacked; then
-        depdir=$installdir
+    # the "pass" command does not work on some
+    # ftp clients (read ftp.exe) but if it works,
+    # passive mode is better!
+    ( \
+        echo "user $FTPUSER $FTPPWD"        ; \
+        echo "pass"                         ; \
+        echo "bin"                          ; \
+        echo "get $FTPPATH $tmpfile"              ; \
+    ) | ftp -in $FTPSERVER
+  fi
+  if test "x$VALID_TOOL" != xyes; then
+    as_fn_error $? "I do not know how to use the tool: $BDEPS_FTP" "$LINENO" 5
+  fi
+
+    mv $tmpfile $installdir/$filename
+    if test ! -s $installdir/$filename; then
+      as_fn_error $? "Could not download $with_builddeps_server/$resource" "$LINENO" 5
     fi
+    case "$extension" in
+      zip)  echo "Unzipping $installdir/$filename..."
+        (cd $installdir ; rm -f $installdir/$filename.unpacked ; $BDEPS_UNZIP $installdir/$filename > /dev/null && touch $installdir/$filename.unpacked)
+        ;;
+      tar.gz) echo "Untaring $installdir/$filename..."
+        (cd $installdir ; rm -f $installdir/$filename.unpacked ; tar xzf $installdir/$filename && touch $installdir/$filename.unpacked)
+        ;;
+      tgz) echo "Untaring $installdir/$filename..."
+        (cd $installdir ; rm -f $installdir/$filename.unpacked ; tar xzf $installdir/$filename && touch $installdir/$filename.unpacked)
+        ;;
+      *) as_fn_error $? "Cannot handle build depency archive with extension $extension" "$LINENO" 5
+        ;;
+    esac
+  fi
+  if test -f $installdir/$filename.unpacked; then
+    depdir=$installdir
+  fi
 
-	    fi
-            # Source the builddeps file again, because in the previous command, the depdir
-            # was updated to point at the current build dependency install directory.
-            . $builddepsfile
-            # Now extract variables from the builddeps.conf files.
-            theroot=${builddep_freetype2_ROOT}
-            thecflags=${builddep_freetype2_CFLAGS}
-            thelibs=${builddep_freetype2_LIBS}
-            if test "x$depdir" = x; then
-                as_fn_error $? "Could not download build dependency freetype2" "$LINENO" 5
-            fi
-            FREETYPE2=$depdir
-            if test "x$theroot" != x; then
-               FREETYPE2="$theroot"
-            fi
-            if test "x$thecflags" != x; then
-               FREETYPE2_CFLAGS="$thecflags"
-            fi
-            if test "x$thelibs" != x; then
-               FREETYPE2_LIBS="$thelibs"
-            fi
-            FREETYPE2_FOUND=yes
-            else FREETYPE2_FOUND=no
-
-        fi
-        else FREETYPE2_FOUND=no
+      fi
+      # Source the builddeps file again, because in the previous command, the depdir
+      # was updated to point at the current build dependency install directory.
+      . $builddepsfile
+      # Now extract variables from the builddeps.conf files.
+      theroot=${builddep_freetype2_ROOT}
+      thecflags=${builddep_freetype2_CFLAGS}
+      thelibs=${builddep_freetype2_LIBS}
+      if test "x$depdir" = x; then
+        as_fn_error $? "Could not download build dependency freetype2" "$LINENO" 5
+      fi
+      FREETYPE2=$depdir
+      if test "x$theroot" != x; then
+        FREETYPE2="$theroot"
+      fi
+      if test "x$thecflags" != x; then
+        FREETYPE2_CFLAGS="$thecflags"
+      fi
+      if test "x$thelibs" != x; then
+        FREETYPE2_LIBS="$thelibs"
+      fi
+      FREETYPE2_FOUND=yes
+      else FREETYPE2_FOUND=no
 
     fi
+    else FREETYPE2_FOUND=no
 
-            USING_SYSTEM_FT_LIB=true
-	fi
-	if test "x$FREETYPE2_FOUND" = xno && test "x$OPENJDK_TARGET_OS" = xwindows; then
-            FREETYPELOCATION="$PROGRAMFILES/GnuWin32"
+  fi
+
+      USING_SYSTEM_FT_LIB=true
+    fi
+    if test "x$FREETYPE2_FOUND" = xno && test "x$OPENJDK_TARGET_OS" = xwindows; then
+      FREETYPELOCATION="$PROGRAMFILES/GnuWin32"
 
   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
 
@@ -31249,25 +31244,25 @@
     FREETYPELOCATION="`cd "$path"; $THEPWDCMD -L`"
   fi
 
-	    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype in some standard windows locations" >&5
+      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype in some standard windows locations" >&5
 $as_echo_n "checking for freetype in some standard windows locations... " >&6; }
-	    if test -s "$FREETYPELOCATION/include/ft2build.h" && test -d "$FREETYPELOCATION/include/freetype2/freetype"; then
-	        FREETYPE2_CFLAGS="-I$FREETYPELOCATION/include/freetype2 -I$FREETYPELOCATION/include"
-	        FREETYPE2_LIBS="$FREETYPELOCATION/lib/freetype.lib"
- 	        FREETYPE2_LIB_PATH="$FREETYPELOCATION/lib"
-                if ! test -s "$FREETYPE2_LIBS"; then
-		   as_fn_error $? "Could not find $FREETYPE2_LIBS" "$LINENO" 5
-		fi
-                if ! test -s "$FREETYPE2_LIB_PATH/freetype.dll"; then
-		   as_fn_error $? "Could not find $FREETYPE2_LIB_PATH/freetype.dll" "$LINENO" 5
-		fi
-                USING_SYSTEM_FT_LIB=true
-                FREETYPE2_FOUND=yes
-	    fi
-	    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE2_FOUND" >&5
-$as_echo "$FREETYPE2_FOUND" >&6; }
+      if test -s "$FREETYPELOCATION/include/ft2build.h" && test -d "$FREETYPELOCATION/include/freetype2/freetype"; then
+        FREETYPE2_CFLAGS="-I$FREETYPELOCATION/include/freetype2 -I$FREETYPELOCATION/include"
+        FREETYPE2_LIBS="$FREETYPELOCATION/lib/freetype.lib"
+        FREETYPE2_LIB_PATH="$FREETYPELOCATION/lib"
+        if ! test -s "$FREETYPE2_LIBS"; then
+          as_fn_error $? "Could not find $FREETYPE2_LIBS" "$LINENO" 5
         fi
-	if test "x$FREETYPE2_FOUND" = xno; then
+        if ! test -s "$FREETYPE2_LIB_PATH/freetype.dll"; then
+          as_fn_error $? "Could not find $FREETYPE2_LIB_PATH/freetype.dll" "$LINENO" 5
+        fi
+        USING_SYSTEM_FT_LIB=true
+        FREETYPE2_FOUND=yes
+      fi
+      { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE2_FOUND" >&5
+$as_echo "$FREETYPE2_FOUND" >&6; }
+    fi
+    if test "x$FREETYPE2_FOUND" = xno; then
 
 pkg_failed=no
 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for FREETYPE2" >&5
@@ -31335,92 +31330,94 @@
 $as_echo "yes" >&6; }
 	FREETYPE2_FOUND=yes
 fi
-            # On solaris, pkg_check adds -lz to freetype libs, which isn't necessary for us.
-            FREETYPE2_LIBS=`$ECHO $FREETYPE2_LIBS | $SED 's/-lz//g'`
-            USING_SYSTEM_FT_LIB=true
-            # 64-bit libs for Solaris x86 are installed in the amd64 subdirectory, change lib to lib/amd64
-            if test "x$FREETYPE2_FOUND" = xyes && test "x$OPENJDK_TARGET_OS" = xsolaris && test "x$OPENJDK_TARGET_CPU" = xx86_64; then
-              FREETYPE2_LIBS=`$ECHO $FREETYPE2_LIBS | $SED 's?/lib?/lib/amd64?g'`
-            fi
-	fi
-	if test "x$FREETYPE2_FOUND" = xno; then
-	    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype in some standard locations" >&5
+      # On solaris, pkg_check adds -lz to freetype libs, which isn't necessary for us.
+      FREETYPE2_LIBS=`$ECHO $FREETYPE2_LIBS | $SED 's/-lz//g'`
+      USING_SYSTEM_FT_LIB=true
+      # 64-bit libs for Solaris x86 are installed in the amd64 subdirectory, change lib to lib/amd64
+      if test "x$FREETYPE2_FOUND" = xyes && test "x$OPENJDK_TARGET_OS" = xsolaris && test "x$OPENJDK_TARGET_CPU" = xx86_64; then
+        FREETYPE2_LIBS=`$ECHO $FREETYPE2_LIBS | $SED 's?/lib?/lib/amd64?g'`
+      fi
+    fi
+    if test "x$FREETYPE2_FOUND" = xno; then
+      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype in some standard locations" >&5
 $as_echo_n "checking for freetype in some standard locations... " >&6; }
 
-	    if test -s $SYS_ROOT/usr/X11/include/ft2build.h && test -d $SYS_ROOT/usr/X11/include/freetype2/freetype; then
-	        DEFAULT_FREETYPE_CFLAGS="-I$SYS_ROOT/usr/X11/include/freetype2 -I$SYS_ROOT/usr/X11/include"
-	        DEFAULT_FREETYPE_LIBS="-L$SYS_ROOT/usr/X11/lib -lfreetype"
-	    fi
-	    if test -s $SYS_ROOT/usr/include/ft2build.h && test -d $SYS_ROOT/usr/include/freetype2/freetype; then
-	        DEFAULT_FREETYPE_CFLAGS="-I$SYS_ROOT/usr/include/freetype2"
-	        DEFAULT_FREETYPE_LIBS="-lfreetype"
-	    fi
+      if test -s $SYS_ROOT/usr/X11/include/ft2build.h && test -d $SYS_ROOT/usr/X11/include/freetype2/freetype; then
+        DEFAULT_FREETYPE_CFLAGS="-I$SYS_ROOT/usr/X11/include/freetype2 -I$SYS_ROOT/usr/X11/include"
+        DEFAULT_FREETYPE_LIBS="-L$SYS_ROOT/usr/X11/lib -lfreetype"
+      fi
+      if test -s $SYS_ROOT/usr/include/ft2build.h && test -d $SYS_ROOT/usr/include/freetype2/freetype; then
+        DEFAULT_FREETYPE_CFLAGS="-I$SYS_ROOT/usr/include/freetype2"
+        DEFAULT_FREETYPE_LIBS="-lfreetype"
+      fi
 
-	    PREV_CXXCFLAGS="$CXXFLAGS"
-	    PREV_LDFLAGS="$LDFLAGS"
-	    CXXFLAGS="$CXXFLAGS $DEFAULT_FREETYPE_CFLAGS"
-	    LDFLAGS="$LDFLAGS $DEFAULT_FREETYPE_LIBS"
-	    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+      PREV_CXXCFLAGS="$CXXFLAGS"
+      PREV_LDFLAGS="$LDFLAGS"
+      CXXFLAGS="$CXXFLAGS $DEFAULT_FREETYPE_CFLAGS"
+      LDFLAGS="$LDFLAGS $DEFAULT_FREETYPE_LIBS"
+      cat confdefs.h - <<_ACEOF >conftest.$ac_ext
 /* end confdefs.h.  */
-#include<ft2build.h>
-	                    #include FT_FREETYPE_H
-	                   int main() { return 0; }
+
+            #include<ft2build.h>
+            #include FT_FREETYPE_H
+            int main() { return 0; }
 
 _ACEOF
 if ac_fn_cxx_try_link "$LINENO"; then :
 
-	                      # Yes, the default cflags and libs did the trick.
-	                      FREETYPE2_FOUND=yes
-	                      FREETYPE2_CFLAGS="$DEFAULT_FREETYPE_CFLAGS"
-	                      FREETYPE2_LIBS="$DEFAULT_FREETYPE_LIBS"
+            # Yes, the default cflags and libs did the trick.
+            FREETYPE2_FOUND=yes
+            FREETYPE2_CFLAGS="$DEFAULT_FREETYPE_CFLAGS"
+            FREETYPE2_LIBS="$DEFAULT_FREETYPE_LIBS"
 
 else
 
-	                      FREETYPE2_FOUND=no
+            FREETYPE2_FOUND=no
+
 
 fi
 rm -f core conftest.err conftest.$ac_objext \
     conftest$ac_exeext conftest.$ac_ext
-            CXXCFLAGS="$PREV_CXXFLAGS"
-	    LDFLAGS="$PREV_LDFLAGS"
-	    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE2_FOUND" >&5
+      CXXCFLAGS="$PREV_CXXFLAGS"
+      LDFLAGS="$PREV_LDFLAGS"
+      { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE2_FOUND" >&5
 $as_echo "$FREETYPE2_FOUND" >&6; }
-            USING_SYSTEM_FT_LIB=true
-	fi
-	if test "x$FREETYPE2_FOUND" = xno; then
+      USING_SYSTEM_FT_LIB=true
+    fi
+    if test "x$FREETYPE2_FOUND" = xno; then
 
-    # Print a helpful message on how to acquire the necessary build dependency.
-    # freetype2 is the help tag: freetyp2, cups, pulse, alsa etc
-    MISSING_DEPENDENCY=freetype2
-    PKGHANDLER_COMMAND=
+  # Print a helpful message on how to acquire the necessary build dependency.
+  # freetype2 is the help tag: freetyp2, cups, pulse, alsa etc
+  MISSING_DEPENDENCY=freetype2
+  PKGHANDLER_COMMAND=
 
-    case $PKGHANDLER in
-	apt-get)
-                apt_help     $MISSING_DEPENDENCY ;;
+  case $PKGHANDLER in
+    apt-get)
+      apt_help     $MISSING_DEPENDENCY ;;
     yum)
-                yum_help     $MISSING_DEPENDENCY ;;
-	port)
-                port_help    $MISSING_DEPENDENCY ;;
-	pkgutil)
-                pkgutil_help $MISSING_DEPENDENCY ;;
-	pkgadd)
-                pkgadd_help  $MISSING_DEPENDENCY ;;
+      yum_help     $MISSING_DEPENDENCY ;;
+    port)
+      port_help    $MISSING_DEPENDENCY ;;
+    pkgutil)
+      pkgutil_help $MISSING_DEPENDENCY ;;
+    pkgadd)
+      pkgadd_help  $MISSING_DEPENDENCY ;;
     * )
       break ;;
-    esac
+  esac
 
-    if test "x$PKGHANDLER_COMMAND" != x; then
-        HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
+  if test "x$PKGHANDLER_COMMAND" != x; then
+    HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
+  fi
+
+      as_fn_error $? "Could not find freetype2! $HELP_MSG " "$LINENO" 5
     fi
 
-		as_fn_error $? "Could not find freetype2! $HELP_MSG " "$LINENO" 5
-	fi
-
-        if test "x$OPENJDK_TARGET_OS" != xwindows; then
-            # AC_CHECK_LIB does not support use of cl.exe
-            PREV_LDFLAGS="$LDFLAGS"
-            LDFLAGS="$FREETYPE2_LIBS"
-            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for FT_Init_FreeType in -lfreetype" >&5
+    if test "x$OPENJDK_TARGET_OS" != xwindows; then
+      # AC_CHECK_LIB does not support use of cl.exe
+      PREV_LDFLAGS="$LDFLAGS"
+      LDFLAGS="$FREETYPE2_LIBS"
+      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for FT_Init_FreeType in -lfreetype" >&5
 $as_echo_n "checking for FT_Init_FreeType in -lfreetype... " >&6; }
 if ${ac_cv_lib_freetype_FT_Init_FreeType+:} false; then :
   $as_echo_n "(cached) " >&6
@@ -31462,9 +31459,9 @@
   as_fn_error $? "Could not find freetype2! $HELP_MSG " "$LINENO" 5
 fi
 
-            LDFLAGS="$PREV_LDFLAGS"
-        fi
-fi
+      LDFLAGS="$PREV_LDFLAGS"
+    fi
+  fi
 
 
 
@@ -31473,11 +31470,10 @@
 
 
 
-
-###############################################################################
-#
-# Check for alsa headers and libraries. Used on Linux/GNU systems.
-#
+  ###############################################################################
+  #
+  # Check for alsa headers and libraries. Used on Linux/GNU systems.
+  #
 
 # Check whether --with-alsa was given.
 if test "${with_alsa+set}" = set; then :
@@ -31497,181 +31493,181 @@
 fi
 
 
-if test "x$ALSA_NOT_NEEDED" = xyes; then
-	if test "x${with_alsa}" != x || test "x${with_alsa_include}" != x || test "x${with_alsa_lib}" != x; then
-		{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: alsa not used, so --with-alsa is ignored" >&5
+  if test "x$ALSA_NOT_NEEDED" = xyes; then
+    if test "x${with_alsa}" != x || test "x${with_alsa_include}" != x || test "x${with_alsa_lib}" != x; then
+      { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: alsa not used, so --with-alsa is ignored" >&5
 $as_echo "$as_me: WARNING: alsa not used, so --with-alsa is ignored" >&2;}
-	fi
-	ALSA_CFLAGS=
-	ALSA_LIBS=
-else
-	ALSA_FOUND=no
+    fi
+    ALSA_CFLAGS=
+    ALSA_LIBS=
+  else
+    ALSA_FOUND=no
 
-	if test "x${with_alsa}" = xno || test "x${with_alsa_include}" = xno || test "x${with_alsa_lib}" = xno; then
-	    as_fn_error $? "It is not possible to disable the use of alsa. Remove the --without-alsa option." "$LINENO" 5
-	fi
+    if test "x${with_alsa}" = xno || test "x${with_alsa_include}" = xno || test "x${with_alsa_lib}" = xno; then
+      as_fn_error $? "It is not possible to disable the use of alsa. Remove the --without-alsa option." "$LINENO" 5
+    fi
 
-	if test "x${with_alsa}" != x; then
-	    ALSA_LIBS="-L${with_alsa}/lib -lalsa"
-	    ALSA_CFLAGS="-I${with_alsa}/include"
-	    ALSA_FOUND=yes
-	fi
-	if test "x${with_alsa_include}" != x; then
-	    ALSA_CFLAGS="-I${with_alsa_include}"
-	    ALSA_FOUND=yes
-	fi
-	if test "x${with_alsa_lib}" != x; then
-	    ALSA_LIBS="-L${with_alsa_lib} -lalsa"
-	    ALSA_FOUND=yes
-	fi
-	if test "x$ALSA_FOUND" = xno; then
+    if test "x${with_alsa}" != x; then
+      ALSA_LIBS="-L${with_alsa}/lib -lalsa"
+      ALSA_CFLAGS="-I${with_alsa}/include"
+      ALSA_FOUND=yes
+    fi
+    if test "x${with_alsa_include}" != x; then
+      ALSA_CFLAGS="-I${with_alsa_include}"
+      ALSA_FOUND=yes
+    fi
+    if test "x${with_alsa_lib}" != x; then
+      ALSA_LIBS="-L${with_alsa_lib} -lalsa"
+      ALSA_FOUND=yes
+    fi
+    if test "x$ALSA_FOUND" = xno; then
 
 
-    if test "x$with_builddeps_server" != x || test "x$with_builddeps_conf" != x; then
-        # Source the builddeps file again, to make sure it uses the latest variables!
-        . $builddepsfile
-        # Look for a target and build machine specific resource!
-        eval resource=\${builddep_alsa_BUILD_${rewritten_build_var}_TARGET_${rewritten_target_var}}
-        if test "x$resource" = x; then
-            # Ok, lets instead look for a target specific resource
-            eval resource=\${builddep_alsa_TARGET_${rewritten_target_var}}
-        fi
-        if test "x$resource" = x; then
-            # Ok, lets instead look for a build specific resource
-            eval resource=\${builddep_alsa_BUILD_${rewritten_build_var}}
-        fi
-        if test "x$resource" = x; then
-            # Ok, lets instead look for a generic resource
-            # (The alsa comes from M4 and not the shell, thus no need for eval here.)
-            resource=${builddep_alsa}
-        fi
-        if test "x$resource" != x; then
-            { $as_echo "$as_me:${as_lineno-$LINENO}: Using builddeps $resource for alsa" >&5
+  if test "x$with_builddeps_server" != x || test "x$with_builddeps_conf" != x; then
+    # Source the builddeps file again, to make sure it uses the latest variables!
+    . $builddepsfile
+    # Look for a target and build machine specific resource!
+    eval resource=\${builddep_alsa_BUILD_${rewritten_build_var}_TARGET_${rewritten_target_var}}
+    if test "x$resource" = x; then
+      # Ok, lets instead look for a target specific resource
+      eval resource=\${builddep_alsa_TARGET_${rewritten_target_var}}
+    fi
+    if test "x$resource" = x; then
+      # Ok, lets instead look for a build specific resource
+      eval resource=\${builddep_alsa_BUILD_${rewritten_build_var}}
+    fi
+    if test "x$resource" = x; then
+      # Ok, lets instead look for a generic resource
+      # (The alsa comes from M4 and not the shell, thus no need for eval here.)
+      resource=${builddep_alsa}
+    fi
+    if test "x$resource" != x; then
+      { $as_echo "$as_me:${as_lineno-$LINENO}: Using builddeps $resource for alsa" >&5
 $as_echo "$as_me: Using builddeps $resource for alsa" >&6;}
-	    # If the resource in the builddeps.conf file is an existing directory,
-	    # for example /java/linux/cups
-	    if test -d ${resource}; then
-	       depdir=${resource}
-	    else
+      # If the resource in the builddeps.conf file is an existing directory,
+      # for example /java/linux/cups
+      if test -d ${resource}; then
+        depdir=${resource}
+      else
 
-# alsa is for example mymodule
-# $resource is for example libs/general/libmymod_1_2_3.zip
-# $with_builddeps_server is for example ftp://mybuilddeps.myserver.com/builddeps
-# $with_builddeps_dir is for example /localhome/builddeps
-# depdir is the name of the variable into which we store the depdir, eg MYMOD
-# Will download ftp://mybuilddeps.myserver.com/builddeps/libs/general/libmymod_1_2_3.zip and
-# unzip into the directory: /localhome/builddeps/libmymod_1_2_3
-    filename=`basename $resource`
-    filebase=`echo $filename | sed 's/\.[^\.]*$//'`
-    filebase=${filename%%.*}
-    extension=${filename#*.}
-    installdir=$with_builddeps_dir/$filebase
-    if test ! -f $installdir/$filename.unpacked; then
-        { $as_echo "$as_me:${as_lineno-$LINENO}: Downloading build dependency alsa from $with_builddeps_server/$resource and installing into $installdir" >&5
+  # alsa is for example mymodule
+  # $resource is for example libs/general/libmymod_1_2_3.zip
+  # $with_builddeps_server is for example ftp://mybuilddeps.myserver.com/builddeps
+  # $with_builddeps_dir is for example /localhome/builddeps
+  # depdir is the name of the variable into which we store the depdir, eg MYMOD
+  # Will download ftp://mybuilddeps.myserver.com/builddeps/libs/general/libmymod_1_2_3.zip and
+  # unzip into the directory: /localhome/builddeps/libmymod_1_2_3
+  filename=`basename $resource`
+  filebase=`echo $filename | sed 's/\.[^\.]*$//'`
+  filebase=${filename%%.*}
+  extension=${filename#*.}
+  installdir=$with_builddeps_dir/$filebase
+  if test ! -f $installdir/$filename.unpacked; then
+    { $as_echo "$as_me:${as_lineno-$LINENO}: Downloading build dependency alsa from $with_builddeps_server/$resource and installing into $installdir" >&5
 $as_echo "$as_me: Downloading build dependency alsa from $with_builddeps_server/$resource and installing into $installdir" >&6;}
-        if test ! -d $installdir; then
-            mkdir -p $installdir
-        fi
-        if test ! -d $installdir; then
-            as_fn_error $? "Could not create directory $installdir" "$LINENO" 5
-        fi
-        tmpfile=`mktemp $installdir/alsa.XXXXXXXXX`
-        touch $tmpfile
-        if test ! -f $tmpfile; then
-            as_fn_error $? "Could not create files in directory $installdir" "$LINENO" 5
-        fi
-
-    # $with_builddeps_server/$resource  is the ftp://abuilddeps.server.com/libs/cups.zip
-    # $tmpfile is the local file name for the downloaded file.
-    VALID_TOOL=no
-    if test "x$BDEPS_FTP" = xwget; then
-       VALID_TOOL=yes
-       wget -O $tmpfile $with_builddeps_server/$resource
+    if test ! -d $installdir; then
+      mkdir -p $installdir
     fi
-    if test "x$BDEPS_FTP" = xlftp; then
-       VALID_TOOL=yes
-       lftp -c "get $with_builddeps_server/$resource  -o $tmpfile"
+    if test ! -d $installdir; then
+      as_fn_error $? "Could not create directory $installdir" "$LINENO" 5
     fi
-    if test "x$BDEPS_FTP" = xftp; then
-        VALID_TOOL=yes
-        FTPSERVER=`echo $with_builddeps_server/$resource  | cut -f 3 -d '/'`
-        FTPPATH=`echo $with_builddeps_server/$resource  | cut -f 4- -d '/'`
-        FTPUSERPWD=${FTPSERVER%%@*}
-        if test "x$FTPSERVER" != "x$FTPUSERPWD"; then
-            FTPUSER=${userpwd%%:*}
-            FTPPWD=${userpwd#*@}
-            FTPSERVER=${FTPSERVER#*@}
-        else
-            FTPUSER=ftp
-            FTPPWD=ftp
-        fi
-        # the "pass" command does not work on some
-        # ftp clients (read ftp.exe) but if it works,
-        # passive mode is better!
-        (\
-            echo "user $FTPUSER $FTPPWD"        ;\
-            echo "pass"                         ;\
-            echo "bin"                          ;\
-            echo "get $FTPPATH $tmpfile"              ;\
-        ) | ftp -in $FTPSERVER
-    fi
-    if test "x$VALID_TOOL" != xyes; then
-       as_fn_error $? "I do not know how to use the tool: $BDEPS_FTP" "$LINENO" 5
+    tmpfile=`mktemp $installdir/alsa.XXXXXXXXX`
+    touch $tmpfile
+    if test ! -f $tmpfile; then
+      as_fn_error $? "Could not create files in directory $installdir" "$LINENO" 5
     fi
 
-        mv $tmpfile $installdir/$filename
-        if test ! -s $installdir/$filename; then
-            as_fn_error $? "Could not download $with_builddeps_server/$resource" "$LINENO" 5
-        fi
-        case "$extension" in
-            zip)  echo "Unzipping $installdir/$filename..."
-               (cd $installdir ; rm -f $installdir/$filename.unpacked ; $BDEPS_UNZIP $installdir/$filename > /dev/null && touch $installdir/$filename.unpacked)
-            ;;
-            tar.gz) echo "Untaring $installdir/$filename..."
-               (cd $installdir ; rm -f $installdir/$filename.unpacked ; tar xzf $installdir/$filename && touch $installdir/$filename.unpacked)
-            ;;
-            tgz) echo "Untaring $installdir/$filename..."
-               (cd $installdir ; rm -f $installdir/$filename.unpacked ; tar xzf $installdir/$filename && touch $installdir/$filename.unpacked)
-            ;;
-            *) as_fn_error $? "Cannot handle build depency archive with extension $extension" "$LINENO" 5
-            ;;
-        esac
+  # $with_builddeps_server/$resource  is the ftp://abuilddeps.server.com/libs/cups.zip
+  # $tmpfile is the local file name for the downloaded file.
+  VALID_TOOL=no
+  if test "x$BDEPS_FTP" = xwget; then
+    VALID_TOOL=yes
+    wget -O $tmpfile $with_builddeps_server/$resource
+  fi
+  if test "x$BDEPS_FTP" = xlftp; then
+    VALID_TOOL=yes
+    lftp -c "get $with_builddeps_server/$resource  -o $tmpfile"
+  fi
+  if test "x$BDEPS_FTP" = xftp; then
+    VALID_TOOL=yes
+    FTPSERVER=`echo $with_builddeps_server/$resource  | cut -f 3 -d '/'`
+    FTPPATH=`echo $with_builddeps_server/$resource  | cut -f 4- -d '/'`
+    FTPUSERPWD=${FTPSERVER%%@*}
+    if test "x$FTPSERVER" != "x$FTPUSERPWD"; then
+      FTPUSER=${userpwd%%:*}
+      FTPPWD=${userpwd#*@}
+      FTPSERVER=${FTPSERVER#*@}
+    else
+      FTPUSER=ftp
+      FTPPWD=ftp
     fi
-    if test -f $installdir/$filename.unpacked; then
-        depdir=$installdir
+    # the "pass" command does not work on some
+    # ftp clients (read ftp.exe) but if it works,
+    # passive mode is better!
+    ( \
+        echo "user $FTPUSER $FTPPWD"        ; \
+        echo "pass"                         ; \
+        echo "bin"                          ; \
+        echo "get $FTPPATH $tmpfile"              ; \
+    ) | ftp -in $FTPSERVER
+  fi
+  if test "x$VALID_TOOL" != xyes; then
+    as_fn_error $? "I do not know how to use the tool: $BDEPS_FTP" "$LINENO" 5
+  fi
+
+    mv $tmpfile $installdir/$filename
+    if test ! -s $installdir/$filename; then
+      as_fn_error $? "Could not download $with_builddeps_server/$resource" "$LINENO" 5
     fi
+    case "$extension" in
+      zip)  echo "Unzipping $installdir/$filename..."
+        (cd $installdir ; rm -f $installdir/$filename.unpacked ; $BDEPS_UNZIP $installdir/$filename > /dev/null && touch $installdir/$filename.unpacked)
+        ;;
+      tar.gz) echo "Untaring $installdir/$filename..."
+        (cd $installdir ; rm -f $installdir/$filename.unpacked ; tar xzf $installdir/$filename && touch $installdir/$filename.unpacked)
+        ;;
+      tgz) echo "Untaring $installdir/$filename..."
+        (cd $installdir ; rm -f $installdir/$filename.unpacked ; tar xzf $installdir/$filename && touch $installdir/$filename.unpacked)
+        ;;
+      *) as_fn_error $? "Cannot handle build depency archive with extension $extension" "$LINENO" 5
+        ;;
+    esac
+  fi
+  if test -f $installdir/$filename.unpacked; then
+    depdir=$installdir
+  fi
 
-	    fi
-            # Source the builddeps file again, because in the previous command, the depdir
-            # was updated to point at the current build dependency install directory.
-            . $builddepsfile
-            # Now extract variables from the builddeps.conf files.
-            theroot=${builddep_alsa_ROOT}
-            thecflags=${builddep_alsa_CFLAGS}
-            thelibs=${builddep_alsa_LIBS}
-            if test "x$depdir" = x; then
-                as_fn_error $? "Could not download build dependency alsa" "$LINENO" 5
-            fi
-            ALSA=$depdir
-            if test "x$theroot" != x; then
-               ALSA="$theroot"
-            fi
-            if test "x$thecflags" != x; then
-               ALSA_CFLAGS="$thecflags"
-            fi
-            if test "x$thelibs" != x; then
-               ALSA_LIBS="$thelibs"
-            fi
-            ALSA_FOUND=yes
-            else ALSA_FOUND=no
-
-        fi
-        else ALSA_FOUND=no
+      fi
+      # Source the builddeps file again, because in the previous command, the depdir
+      # was updated to point at the current build dependency install directory.
+      . $builddepsfile
+      # Now extract variables from the builddeps.conf files.
+      theroot=${builddep_alsa_ROOT}
+      thecflags=${builddep_alsa_CFLAGS}
+      thelibs=${builddep_alsa_LIBS}
+      if test "x$depdir" = x; then
+        as_fn_error $? "Could not download build dependency alsa" "$LINENO" 5
+      fi
+      ALSA=$depdir
+      if test "x$theroot" != x; then
+        ALSA="$theroot"
+      fi
+      if test "x$thecflags" != x; then
+        ALSA_CFLAGS="$thecflags"
+      fi
+      if test "x$thelibs" != x; then
+        ALSA_LIBS="$thelibs"
+      fi
+      ALSA_FOUND=yes
+      else ALSA_FOUND=no
 
     fi
+    else ALSA_FOUND=no
 
-	fi
-	if test "x$ALSA_FOUND" = xno; then
+  fi
+
+    fi
+    if test "x$ALSA_FOUND" = xno; then
 
 pkg_failed=no
 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ALSA" >&5
@@ -31739,69 +31735,70 @@
 $as_echo "yes" >&6; }
 	ALSA_FOUND=yes
 fi
-	fi
-	if test "x$ALSA_FOUND" = xno; then
-	    for ac_header in alsa/asoundlib.h
+    fi
+    if test "x$ALSA_FOUND" = xno; then
+      for ac_header in alsa/asoundlib.h
 do :
   ac_fn_cxx_check_header_mongrel "$LINENO" "alsa/asoundlib.h" "ac_cv_header_alsa_asoundlib_h" "$ac_includes_default"
 if test "x$ac_cv_header_alsa_asoundlib_h" = xyes; then :
   cat >>confdefs.h <<_ACEOF
 #define HAVE_ALSA_ASOUNDLIB_H 1
 _ACEOF
- ALSA_FOUND=yes
-	                      ALSA_CFLAGS=-Iignoreme
-	                      ALSA_LIBS=-lasound
-	                      DEFAULT_ALSA=yes
+
+            ALSA_FOUND=yes
+            ALSA_CFLAGS=-Iignoreme
+            ALSA_LIBS=-lasound
+            DEFAULT_ALSA=yes
+
 else
   ALSA_FOUND=no
 fi
 
 done
 
-	fi
-	if test "x$ALSA_FOUND" = xno; then
+    fi
+    if test "x$ALSA_FOUND" = xno; then
 
-    # Print a helpful message on how to acquire the necessary build dependency.
-    # alsa is the help tag: freetyp2, cups, pulse, alsa etc
-    MISSING_DEPENDENCY=alsa
-    PKGHANDLER_COMMAND=
+  # Print a helpful message on how to acquire the necessary build dependency.
+  # alsa is the help tag: freetyp2, cups, pulse, alsa etc
+  MISSING_DEPENDENCY=alsa
+  PKGHANDLER_COMMAND=
 
-    case $PKGHANDLER in
-	apt-get)
-                apt_help     $MISSING_DEPENDENCY ;;
+  case $PKGHANDLER in
+    apt-get)
+      apt_help     $MISSING_DEPENDENCY ;;
     yum)
-                yum_help     $MISSING_DEPENDENCY ;;
-	port)
-                port_help    $MISSING_DEPENDENCY ;;
-	pkgutil)
-                pkgutil_help $MISSING_DEPENDENCY ;;
-	pkgadd)
-                pkgadd_help  $MISSING_DEPENDENCY ;;
+      yum_help     $MISSING_DEPENDENCY ;;
+    port)
+      port_help    $MISSING_DEPENDENCY ;;
+    pkgutil)
+      pkgutil_help $MISSING_DEPENDENCY ;;
+    pkgadd)
+      pkgadd_help  $MISSING_DEPENDENCY ;;
     * )
       break ;;
-    esac
+  esac
 
-    if test "x$PKGHANDLER_COMMAND" != x; then
-        HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
+  if test "x$PKGHANDLER_COMMAND" != x; then
+    HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
+  fi
+
+      as_fn_error $? "Could not find alsa! $HELP_MSG " "$LINENO" 5
     fi
-
-	    as_fn_error $? "Could not find alsa! $HELP_MSG " "$LINENO" 5
-	fi
-fi
+  fi
 
 
 
 
 
 
+  ###############################################################################
+  #
+  # Check for the jpeg library
+  #
 
-###############################################################################
-#
-# Check for the jpeg library
-#
-
-USE_EXTERNAL_LIBJPEG=true
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for main in -ljpeg" >&5
+  USE_EXTERNAL_LIBJPEG=true
+  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for main in -ljpeg" >&5
 $as_echo_n "checking for main in -ljpeg... " >&6; }
 if ${ac_cv_lib_jpeg_main+:} false; then :
   $as_echo_n "(cached) " >&6
@@ -31840,17 +31837,17 @@
 
 else
    USE_EXTERNAL_LIBJPEG=false
-               { $as_echo "$as_me:${as_lineno-$LINENO}: Will use jpeg decoder bundled with the OpenJDK source" >&5
+      { $as_echo "$as_me:${as_lineno-$LINENO}: Will use jpeg decoder bundled with the OpenJDK source" >&5
 $as_echo "$as_me: Will use jpeg decoder bundled with the OpenJDK source" >&6;}
 
 fi
 
 
 
-###############################################################################
-#
-# Check for the gif library
-#
+  ###############################################################################
+  #
+  # Check for the gif library
+  #
 
 
 # Check whether --with-giflib was given.
@@ -31860,25 +31857,25 @@
 
 
 
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for which giflib to use" >&5
+  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for which giflib to use" >&5
 $as_echo_n "checking for which giflib to use... " >&6; }
 
-# default is bundled
-DEFAULT_GIFLIB=bundled
+  # default is bundled
+  DEFAULT_GIFLIB=bundled
 
-#
-# if user didn't specify, use DEFAULT_GIFLIB
-#
-if test "x${with_giflib}" = "x"; then
+  #
+  # if user didn't specify, use DEFAULT_GIFLIB
+  #
+  if test "x${with_giflib}" = "x"; then
     with_giflib=${DEFAULT_GIFLIB}
-fi
+  fi
 
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: ${with_giflib}" >&5
+  { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${with_giflib}" >&5
 $as_echo "${with_giflib}" >&6; }
 
-if test "x${with_giflib}" = "xbundled"; then
+  if test "x${with_giflib}" = "xbundled"; then
     USE_EXTERNAL_LIBGIF=false
-elif test "x${with_giflib}" = "xsystem"; then
+  elif test "x${with_giflib}" = "xsystem"; then
     ac_fn_cxx_check_header_mongrel "$LINENO" "gif_lib.h" "ac_cv_header_gif_lib_h" "$ac_includes_default"
 if test "x$ac_cv_header_gif_lib_h" = xyes; then :
 
@@ -31936,15 +31933,15 @@
 
 
     USE_EXTERNAL_LIBGIF=true
-else
+  else
     as_fn_error $? "Invalid value of --with-giflib: ${with_giflib}, use 'system' or 'bundled'" "$LINENO" 5
-fi
+  fi
 
 
-###############################################################################
-#
-# Check for the zlib library
-#
+  ###############################################################################
+  #
+  # Check for the zlib library
+  #
 
 
 # Check whether --with-zlib was given.
@@ -31953,7 +31950,7 @@
 fi
 
 
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for compress in -lz" >&5
+  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for compress in -lz" >&5
 $as_echo_n "checking for compress in -lz... " >&6; }
 if ${ac_cv_lib_z_compress+:} false; then :
   $as_echo_n "(cached) " >&6
@@ -31996,62 +31993,62 @@
 fi
 
 
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for which zlib to use" >&5
+  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for which zlib to use" >&5
 $as_echo_n "checking for which zlib to use... " >&6; }
 
-DEFAULT_ZLIB=bundled
-if test "x$OPENJDK_TARGET_OS" = xmacosx; then
-#
-# On macosx default is system...on others default is
-#
+  DEFAULT_ZLIB=bundled
+  if test "x$OPENJDK_TARGET_OS" = xmacosx; then
+    #
+    # On macosx default is system...on others default is
+    #
     DEFAULT_ZLIB=system
-fi
+  fi
 
-if test "x${ZLIB_FOUND}" != "xyes"; then
-#
-# If we don't find any system...set default to bundled
-#
+  if test "x${ZLIB_FOUND}" != "xyes"; then
+    #
+    # If we don't find any system...set default to bundled
+    #
     DEFAULT_ZLIB=bundled
-fi
+  fi
 
-#
-# If user didn't specify, use DEFAULT_ZLIB
-#
-if test "x${with_zlib}" = "x"; then
+  #
+  # If user didn't specify, use DEFAULT_ZLIB
+  #
+  if test "x${with_zlib}" = "x"; then
     with_zlib=${DEFAULT_ZLIB}
-fi
+  fi
 
-if test "x${with_zlib}" = "xbundled"; then
+  if test "x${with_zlib}" = "xbundled"; then
     USE_EXTERNAL_LIBZ=false
     { $as_echo "$as_me:${as_lineno-$LINENO}: result: bundled" >&5
 $as_echo "bundled" >&6; }
-elif test "x${with_zlib}" = "xsystem"; then
+  elif test "x${with_zlib}" = "xsystem"; then
     if test "x${ZLIB_FOUND}" = "xyes"; then
-        USE_EXTERNAL_LIBZ=true
-        { $as_echo "$as_me:${as_lineno-$LINENO}: result: system" >&5
+      USE_EXTERNAL_LIBZ=true
+      { $as_echo "$as_me:${as_lineno-$LINENO}: result: system" >&5
 $as_echo "system" >&6; }
     else
-        { $as_echo "$as_me:${as_lineno-$LINENO}: result: system not found" >&5
+      { $as_echo "$as_me:${as_lineno-$LINENO}: result: system not found" >&5
 $as_echo "system not found" >&6; }
-        as_fn_error $? "--with-zlib=system specified, but no zlib found!" "$LINENO" 5
+      as_fn_error $? "--with-zlib=system specified, but no zlib found!" "$LINENO" 5
     fi
-else
+  else
     as_fn_error $? "Invalid value for --with-zlib: ${with_zlib}, use 'system' or 'bundled'" "$LINENO" 5
-fi
+  fi
 
 
 
-###############################################################################
-LIBZIP_CAN_USE_MMAP=true
+  ###############################################################################
+  LIBZIP_CAN_USE_MMAP=true
 
 
 
-###############################################################################
-#
-# Check if altzone exists in time.h
-#
+  ###############################################################################
+  #
+  # Check if altzone exists in time.h
+  #
 
-cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
 /* end confdefs.h.  */
 #include <time.h>
 int
@@ -32069,18 +32066,18 @@
 fi
 rm -f core conftest.err conftest.$ac_objext \
     conftest$ac_exeext conftest.$ac_ext
-if test "x$has_altzone" = xyes; then
+  if test "x$has_altzone" = xyes; then
 
 $as_echo "#define HAVE_ALTZONE 1" >>confdefs.h
 
-fi
+  fi
 
-###############################################################################
-#
-# Check the maths library
-#
+  ###############################################################################
+  #
+  # Check the maths library
+  #
 
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for cos in -lm" >&5
+  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for cos in -lm" >&5
 $as_echo_n "checking for cos in -lm... " >&6; }
 if ${ac_cv_lib_m_cos+:} false; then :
   $as_echo_n "(cached) " >&6
@@ -32125,20 +32122,21 @@
 
 else
 
-                  { $as_echo "$as_me:${as_lineno-$LINENO}: Maths library was not found" >&5
+        { $as_echo "$as_me:${as_lineno-$LINENO}: Maths library was not found" >&5
 $as_echo "$as_me: Maths library was not found" >&6;}
 
+
 fi
 
 
 
-###############################################################################
-#
-# Check for libdl.so
+  ###############################################################################
+  #
+  # Check for libdl.so
 
-save_LIBS="$LIBS"
-LIBS=""
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for dlopen in -ldl" >&5
+  save_LIBS="$LIBS"
+  LIBS=""
+  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for dlopen in -ldl" >&5
 $as_echo_n "checking for dlopen in -ldl... " >&6; }
 if ${ac_cv_lib_dl_dlopen+:} false; then :
   $as_echo_n "(cached) " >&6
@@ -32183,25 +32181,24 @@
 
 fi
 
-LIBDL="$LIBS"
+  LIBDL="$LIBS"
 
-LIBS="$save_LIBS"
+  LIBS="$save_LIBS"
 
 
-
-###############################################################################
-#
-# statically link libstdc++ before C++ ABI is stablized on Linux unless
-# dynamic build is configured on command line.
-#
+  ###############################################################################
+  #
+  # statically link libstdc++ before C++ ABI is stablized on Linux unless
+  # dynamic build is configured on command line.
+  #
 
 # Check whether --with-stdc++lib was given.
 if test "${with_stdc__lib+set}" = set; then :
   withval=$with_stdc__lib;
-    if test "x$with_stdc__lib" != xdynamic && test "x$with_stdc__lib" != xstatic \
-        && test "x$with_stdc__lib" != xdefault; then
-      as_fn_error $? "Bad parameter value --with-stdc++lib=$with_stdc__lib!" "$LINENO" 5
-    fi
+        if test "x$with_stdc__lib" != xdynamic && test "x$with_stdc__lib" != xstatic \
+                && test "x$with_stdc__lib" != xdefault; then
+          as_fn_error $? "Bad parameter value --with-stdc++lib=$with_stdc__lib!" "$LINENO" 5
+        fi
 
 else
   with_stdc__lib=default
@@ -32209,7 +32206,7 @@
 fi
 
 
-if test "x$OPENJDK_TARGET_OS" = xlinux; then
+  if test "x$OPENJDK_TARGET_OS" = xlinux; then
     # Test if -lstdc++ works.
     { $as_echo "$as_me:${as_lineno-$LINENO}: checking if dynamic link of stdc++ is possible" >&5
 $as_echo_n "checking if dynamic link of stdc++ is possible... " >&6; }
@@ -32293,15 +32290,15 @@
 $as_echo "$has_static_libstdcxx" >&6; }
 
     if test "x$has_static_libstdcxx" = xno && test "x$has_dynamic_libstdcxx" = xno; then
-        as_fn_error $? "Cannot link to stdc++, neither dynamically nor statically!" "$LINENO" 5
+      as_fn_error $? "Cannot link to stdc++, neither dynamically nor statically!" "$LINENO" 5
     fi
 
     if test "x$with_stdc__lib" = xstatic && test "x$has_static_libstdcxx" = xno; then
-        as_fn_error $? "Static linking of libstdc++ was not possible!" "$LINENO" 5
+      as_fn_error $? "Static linking of libstdc++ was not possible!" "$LINENO" 5
     fi
 
     if test "x$with_stdc__lib" = xdynamic && test "x$has_dynamic_libstdcxx" = xno; then
-        as_fn_error $? "Dynamic linking of libstdc++ was not possible!" "$LINENO" 5
+      as_fn_error $? "Dynamic linking of libstdc++ was not possible!" "$LINENO" 5
     fi
 
     { $as_echo "$as_me:${as_lineno-$LINENO}: checking how to link with libstdc++" >&5
@@ -32309,22 +32306,22 @@
     # If dynamic was requested, it's available since it would fail above otherwise.
     # If dynamic wasn't requested, go with static unless it isn't available.
     if test "x$with_stdc__lib" = xdynamic || test "x$has_static_libstdcxx" = xno || test "x$JVM_VARIANT_ZEROSHARK" = xtrue; then
-        LIBCXX="$LIBCXX -lstdc++"
-        LDCXX="$CXX"
-        STATIC_CXX_SETTING="STATIC_CXX=false"
-        { $as_echo "$as_me:${as_lineno-$LINENO}: result: dynamic" >&5
+      LIBCXX="$LIBCXX -lstdc++"
+      LDCXX="$CXX"
+      STATIC_CXX_SETTING="STATIC_CXX=false"
+      { $as_echo "$as_me:${as_lineno-$LINENO}: result: dynamic" >&5
 $as_echo "dynamic" >&6; }
     else
-        LIBCXX="$LIBCXX $STATIC_STDCXX_FLAGS"
-        LDCXX="$CC"
-        STATIC_CXX_SETTING="STATIC_CXX=true"
-        { $as_echo "$as_me:${as_lineno-$LINENO}: result: static" >&5
+      LIBCXX="$LIBCXX $STATIC_STDCXX_FLAGS"
+      LDCXX="$CC"
+      STATIC_CXX_SETTING="STATIC_CXX=true"
+      { $as_echo "$as_me:${as_lineno-$LINENO}: result: static" >&5
 $as_echo "static" >&6; }
     fi
-fi
+  fi
 
 
-if test "x$JVM_VARIANT_ZERO" = xtrue || test "x$JVM_VARIANT_ZEROSHARK" = xtrue; then
+  if test "x$JVM_VARIANT_ZERO" = xtrue || test "x$JVM_VARIANT_ZEROSHARK" = xtrue; then
     # Figure out LIBFFI_CFLAGS and LIBFFI_LIBS
 
 pkg_failed=no
@@ -32413,9 +32410,9 @@
 	:
 fi
 
-fi
+  fi
 
-if test "x$JVM_VARIANT_ZEROSHARK" = xtrue; then
+  if test "x$JVM_VARIANT_ZEROSHARK" = xtrue; then
     # Extract the first word of "llvm-config", so it can be a program name with args.
 set dummy llvm-config; ac_word=$2
 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
@@ -32455,7 +32452,7 @@
 
 
     if test "x$LLVM_CONFIG" != xllvm-config; then
-        as_fn_error $? "llvm-config not found in $PATH." "$LINENO" 5
+      as_fn_error $? "llvm-config not found in $PATH." "$LINENO" 5
     fi
 
     llvm_components="jit mcjit engine nativecodegen native"
@@ -32496,30 +32493,29 @@
 
 
 
-fi
+  fi
 
-# libCrun is the c++ runtime-library with SunStudio (roughly the equivalent of gcc's libstdc++.so)
-if test "x$OPENJDK_TARGET_OS" = xsolaris && test "x$LIBCXX" = x; then
+  # libCrun is the c++ runtime-library with SunStudio (roughly the equivalent of gcc's libstdc++.so)
+  if test "x$OPENJDK_TARGET_OS" = xsolaris && test "x$LIBCXX" = x; then
     LIBCXX="/usr/lib${OPENJDK_TARGET_CPU_ISADIR}/libCrun.so.1"
-fi
+  fi
 
-# TODO better (platform agnostic) test
-if test "x$OPENJDK_TARGET_OS" = xmacosx && test "x$LIBCXX" = x && test "x$GCC" = xyes; then
+  # TODO better (platform agnostic) test
+  if test "x$OPENJDK_TARGET_OS" = xmacosx && test "x$LIBCXX" = x && test "x$GCC" = xyes; then
     LIBCXX="-lstdc++"
-fi
-
+  fi
 
 
 
 
 # After we have toolchain and the paths to all libraries (needed by msys), we can compile the fixpath helper
 
-# When using cygwin or msys, we need a wrapper binary that renames
-# /cygdrive/c/ arguments into c:/ arguments and peeks into
-# @files and rewrites these too! This wrapper binary is
-# called fixpath.
-FIXPATH=
-if test "x$OPENJDK_BUILD_OS" = xwindows; then
+  # When using cygwin or msys, we need a wrapper binary that renames
+  # /cygdrive/c/ arguments into c:/ arguments and peeks into
+  # @files and rewrites these too! This wrapper binary is
+  # called fixpath.
+  FIXPATH=
+  if test "x$OPENJDK_BUILD_OS" = xwindows; then
     { $as_echo "$as_me:${as_lineno-$LINENO}: checking if fixpath can be created" >&5
 $as_echo_n "checking if fixpath can be created... " >&6; }
     FIXPATH_SRC="$SRC_ROOT/common/src/fixpath.c"
@@ -32546,10 +32542,10 @@
     cd $CURDIR
 
     if test ! -x $OUTPUT_ROOT/fixpath.exe; then
-        { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+      { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
 $as_echo "no" >&6; }
-        cat $OUTPUT_ROOT/fixpath1.log
-        as_fn_error $? "Could not create $OUTPUT_ROOT/fixpath.exe" "$LINENO" 5
+      cat $OUTPUT_ROOT/fixpath1.log
+      as_fn_error $? "Could not create $OUTPUT_ROOT/fixpath.exe" "$LINENO" 5
     fi
     { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
 $as_echo "yes" >&6; }
@@ -32559,15 +32555,15 @@
     $FIXPATH $CC $SRC_ROOT/common/src/fixpath.c -Fe$OUTPUT_ROOT/fixpath2.exe > $OUTPUT_ROOT/fixpath2.log 2>&1
     cd $CURDIR
     if test ! -x $OUTPUT_ROOT/fixpath2.exe; then
-        { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+      { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
 $as_echo "no" >&6; }
-        cat $OUTPUT_ROOT/fixpath2.log
-        as_fn_error $? "fixpath did not work!" "$LINENO" 5
+      cat $OUTPUT_ROOT/fixpath2.log
+      as_fn_error $? "fixpath did not work!" "$LINENO" 5
     fi
     { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
 $as_echo "yes" >&6; }
     rm -f $OUTPUT_ROOT/fixpath?.??? $OUTPUT_ROOT/fixpath.obj
-fi
+  fi
 
 
 
@@ -32579,30 +32575,29 @@
 ###############################################################################
 
 
-HOTSPOT_MAKE_ARGS="$HOTSPOT_TARGET"
+  HOTSPOT_MAKE_ARGS="$HOTSPOT_TARGET"
 
 
-# The name of the Service Agent jar.
-SALIB_NAME="${LIBRARY_PREFIX}saproc${SHARED_LIBRARY_SUFFIX}"
-if test "x$OPENJDK_TARGET_OS" = "xwindows"; then
-  SALIB_NAME="${LIBRARY_PREFIX}sawindbg${SHARED_LIBRARY_SUFFIX}"
-fi
+  # The name of the Service Agent jar.
+  SALIB_NAME="${LIBRARY_PREFIX}saproc${SHARED_LIBRARY_SUFFIX}"
+  if test "x$OPENJDK_TARGET_OS" = "xwindows"; then
+    SALIB_NAME="${LIBRARY_PREFIX}sawindbg${SHARED_LIBRARY_SUFFIX}"
+  fi
 
 
 
-
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking if elliptic curve crypto implementation is present" >&5
+    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if elliptic curve crypto implementation is present" >&5
 $as_echo_n "checking if elliptic curve crypto implementation is present... " >&6; }
 
-if test -d "${SRC_ROOT}/jdk/src/share/native/sun/security/ec/impl"; then
-    ENABLE_INTREE_EC=yes
-    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
+    if test -d "${SRC_ROOT}/jdk/src/share/native/sun/security/ec/impl"; then
+      ENABLE_INTREE_EC=yes
+      { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
 $as_echo "yes" >&6; }
-else
-    ENABLE_INTREE_EC=no
-    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+    else
+      ENABLE_INTREE_EC=no
+      { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
 $as_echo "no" >&6; }
-fi
+    fi
 
 
 
@@ -32625,39 +32620,38 @@
   if test "x$with_num_cores" = x; then
     # The number of cores were not specified, try to probe them.
 
-    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for number of cores" >&5
+  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for number of cores" >&5
 $as_echo_n "checking for number of cores... " >&6; }
-    NUM_CORES=1
-    FOUND_CORES=no
+  NUM_CORES=1
+  FOUND_CORES=no
 
-    if test -f /proc/cpuinfo; then
-        # Looks like a Linux (or cygwin) system
-        NUM_CORES=`cat /proc/cpuinfo  | grep -c processor`
-        FOUND_CORES=yes
-    elif test -x /usr/sbin/psrinfo; then
-        # Looks like a Solaris system
-        NUM_CORES=`LC_MESSAGES=C /usr/sbin/psrinfo -v | grep -c on-line`
-        FOUND_CORES=yes
-    elif test -x /usr/sbin/system_profiler; then
-        # Looks like a MacOSX system
-        NUM_CORES=`/usr/sbin/system_profiler -detailLevel full SPHardwareDataType | grep 'Cores' | awk  '{print $5}'`
-        FOUND_CORES=yes
-    elif test -n "$NUMBER_OF_PROCESSORS"; then
-        # On windows, look in the env
-        NUM_CORES=$NUMBER_OF_PROCESSORS
-        FOUND_CORES=yes
-    fi
+  if test -f /proc/cpuinfo; then
+    # Looks like a Linux (or cygwin) system
+    NUM_CORES=`cat /proc/cpuinfo  | grep -c processor`
+    FOUND_CORES=yes
+  elif test -x /usr/sbin/psrinfo; then
+    # Looks like a Solaris system
+    NUM_CORES=`LC_MESSAGES=C /usr/sbin/psrinfo -v | grep -c on-line`
+    FOUND_CORES=yes
+  elif test -x /usr/sbin/system_profiler; then
+    # Looks like a MacOSX system
+    NUM_CORES=`/usr/sbin/system_profiler -detailLevel full SPHardwareDataType | grep 'Cores' | awk  '{print $5}'`
+    FOUND_CORES=yes
+  elif test -n "$NUMBER_OF_PROCESSORS"; then
+    # On windows, look in the env
+    NUM_CORES=$NUMBER_OF_PROCESSORS
+    FOUND_CORES=yes
+  fi
 
-    if test "x$FOUND_CORES" = xyes; then
-        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NUM_CORES" >&5
+  if test "x$FOUND_CORES" = xyes; then
+    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NUM_CORES" >&5
 $as_echo "$NUM_CORES" >&6; }
-    else
-        { $as_echo "$as_me:${as_lineno-$LINENO}: result: could not detect number of cores, defaulting to 1" >&5
+  else
+    { $as_echo "$as_me:${as_lineno-$LINENO}: result: could not detect number of cores, defaulting to 1" >&5
 $as_echo "could not detect number of cores, defaulting to 1" >&6; }
-        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: This will disable all parallelism from build!" >&5
+    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: This will disable all parallelism from build!" >&5
 $as_echo "$as_me: WARNING: This will disable all parallelism from build!" >&2;}
-    fi
-
+  fi
 
   else
     NUM_CORES=$with_num_cores
@@ -32675,42 +32669,42 @@
   if test "x$with_memory_size" = x; then
     # The memory size was not specified, try to probe it.
 
-    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for memory size" >&5
+  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for memory size" >&5
 $as_echo_n "checking for memory size... " >&6; }
-    # Default to 1024 MB
-    MEMORY_SIZE=1024
-    FOUND_MEM=no
+  # Default to 1024 MB
+  MEMORY_SIZE=1024
+  FOUND_MEM=no
 
-    if test -f /proc/meminfo; then
-        # Looks like a Linux (or cygwin) system
-        MEMORY_SIZE=`cat /proc/meminfo | grep MemTotal | awk '{print $2}'`
-        MEMORY_SIZE=`expr $MEMORY_SIZE / 1024`
-        FOUND_MEM=yes
-    elif test -x /usr/sbin/prtconf; then
-        # Looks like a Solaris system
-        MEMORY_SIZE=`/usr/sbin/prtconf | grep "Memory size" | awk '{ print $3 }'`
-        FOUND_MEM=yes
-    elif test -x /usr/sbin/system_profiler; then
-        # Looks like a MacOSX system
-        MEMORY_SIZE=`/usr/sbin/system_profiler -detailLevel full SPHardwareDataType | grep 'Memory' | awk  '{print $2}'`
-        MEMORY_SIZE=`expr $MEMORY_SIZE \* 1024`
-        FOUND_MEM=yes
-    elif test "x$OPENJDK_BUILD_OS" = xwindows; then
-        # Windows, but without cygwin
-        MEMORY_SIZE=`wmic computersystem get totalphysicalmemory -value | grep = | cut -d "=" -f 2-`
-        MEMORY_SIZE=`expr $MEMORY_SIZE / 1024 / 1024`
-        FOUND_MEM=yes
-    fi
+  if test -f /proc/meminfo; then
+    # Looks like a Linux (or cygwin) system
+    MEMORY_SIZE=`cat /proc/meminfo | grep MemTotal | awk '{print $2}'`
+    MEMORY_SIZE=`expr $MEMORY_SIZE / 1024`
+    FOUND_MEM=yes
+  elif test -x /usr/sbin/prtconf; then
+    # Looks like a Solaris system
+    MEMORY_SIZE=`/usr/sbin/prtconf | grep "Memory size" | awk '{ print $3 }'`
+    FOUND_MEM=yes
+  elif test -x /usr/sbin/system_profiler; then
+    # Looks like a MacOSX system
+    MEMORY_SIZE=`/usr/sbin/system_profiler -detailLevel full SPHardwareDataType | grep 'Memory' | awk  '{print $2}'`
+    MEMORY_SIZE=`expr $MEMORY_SIZE \* 1024`
+    FOUND_MEM=yes
+  elif test "x$OPENJDK_BUILD_OS" = xwindows; then
+    # Windows, but without cygwin
+    MEMORY_SIZE=`wmic computersystem get totalphysicalmemory -value | grep = | cut -d "=" -f 2-`
+    MEMORY_SIZE=`expr $MEMORY_SIZE / 1024 / 1024`
+    FOUND_MEM=yes
+  fi
 
-    if test "x$FOUND_MEM" = xyes; then
-        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MEMORY_SIZE MB" >&5
+  if test "x$FOUND_MEM" = xyes; then
+    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MEMORY_SIZE MB" >&5
 $as_echo "$MEMORY_SIZE MB" >&6; }
-    else
-        { $as_echo "$as_me:${as_lineno-$LINENO}: result: could not detect memory size, defaulting to 1024 MB" >&5
+  else
+    { $as_echo "$as_me:${as_lineno-$LINENO}: result: could not detect memory size, defaulting to 1024 MB" >&5
 $as_echo "could not detect memory size, defaulting to 1024 MB" >&6; }
-        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: This might seriously impact build performance!" >&5
+    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: This might seriously impact build performance!" >&5
 $as_echo "$as_me: WARNING: This might seriously impact build performance!" >&2;}
-    fi
+  fi
 
   else
     MEMORY_SIZE=$with_memory_size
@@ -32766,224 +32760,223 @@
 fi
 
 
-if test "x$with_sjavac_server_java" != x; then
+  if test "x$with_sjavac_server_java" != x; then
     SJAVAC_SERVER_JAVA="$with_sjavac_server_java"
     FOUND_VERSION=`$SJAVAC_SERVER_JAVA -version 2>&1 | grep " version \""`
     if test "x$FOUND_VERSION" = x; then
-        as_fn_error $? "Could not execute server java: $SJAVAC_SERVER_JAVA" "$LINENO" 5
+      as_fn_error $? "Could not execute server java: $SJAVAC_SERVER_JAVA" "$LINENO" 5
     fi
-else
+  else
     SJAVAC_SERVER_JAVA=""
     # Hotspot specific options.
 
-    $ECHO "Check if jvm arg is ok: -verbosegc" >&5
-    $ECHO "Command: $JAVA -verbosegc -version" >&5
-    OUTPUT=`$JAVA -verbosegc -version 2>&1`
-    FOUND_WARN=`$ECHO "$OUTPUT" | grep -i warn`
-    FOUND_VERSION=`$ECHO $OUTPUT | grep " version \""`
-    if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
-        SJAVAC_SERVER_JAVA="$SJAVAC_SERVER_JAVA -verbosegc"
-	JVM_ARG_OK=true
-    else
-	$ECHO "Arg failed:" >&5
-	$ECHO "$OUTPUT" >&5
-	JVM_ARG_OK=false
-    fi
+  $ECHO "Check if jvm arg is ok: -verbosegc" >&5
+  $ECHO "Command: $JAVA -verbosegc -version" >&5
+  OUTPUT=`$JAVA -verbosegc -version 2>&1`
+  FOUND_WARN=`$ECHO "$OUTPUT" | grep -i warn`
+  FOUND_VERSION=`$ECHO $OUTPUT | grep " version \""`
+  if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
+    SJAVAC_SERVER_JAVA="$SJAVAC_SERVER_JAVA -verbosegc"
+    JVM_ARG_OK=true
+  else
+    $ECHO "Arg failed:" >&5
+    $ECHO "$OUTPUT" >&5
+    JVM_ARG_OK=false
+  fi
 
     # JRockit specific options.
 
-    $ECHO "Check if jvm arg is ok: -Xverbose:gc" >&5
-    $ECHO "Command: $JAVA -Xverbose:gc -version" >&5
-    OUTPUT=`$JAVA -Xverbose:gc -version 2>&1`
-    FOUND_WARN=`$ECHO "$OUTPUT" | grep -i warn`
-    FOUND_VERSION=`$ECHO $OUTPUT | grep " version \""`
-    if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
-        SJAVAC_SERVER_JAVA="$SJAVAC_SERVER_JAVA -Xverbose:gc"
-	JVM_ARG_OK=true
-    else
-	$ECHO "Arg failed:" >&5
-	$ECHO "$OUTPUT" >&5
-	JVM_ARG_OK=false
-    fi
+  $ECHO "Check if jvm arg is ok: -Xverbose:gc" >&5
+  $ECHO "Command: $JAVA -Xverbose:gc -version" >&5
+  OUTPUT=`$JAVA -Xverbose:gc -version 2>&1`
+  FOUND_WARN=`$ECHO "$OUTPUT" | grep -i warn`
+  FOUND_VERSION=`$ECHO $OUTPUT | grep " version \""`
+  if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
+    SJAVAC_SERVER_JAVA="$SJAVAC_SERVER_JAVA -Xverbose:gc"
+    JVM_ARG_OK=true
+  else
+    $ECHO "Arg failed:" >&5
+    $ECHO "$OUTPUT" >&5
+    JVM_ARG_OK=false
+  fi
 
     SJAVAC_SERVER_JAVA="$JAVA $SJAVAC_SERVER_JAVA"
-fi
+  fi
 
 
-if test "$MEMORY_SIZE" -gt "2500"; then
+  if test "$MEMORY_SIZE" -gt "2500"; then
 
-    $ECHO "Check if jvm arg is ok: -d64" >&5
-    $ECHO "Command: $SJAVAC_SERVER_JAVA -d64 -version" >&5
-    OUTPUT=`$SJAVAC_SERVER_JAVA -d64 -version 2>&1`
-    FOUND_WARN=`$ECHO "$OUTPUT" | grep -i warn`
-    FOUND_VERSION=`$ECHO $OUTPUT | grep " version \""`
-    if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
-        SJAVAC_SERVER_JAVA="$SJAVAC_SERVER_JAVA -d64"
-	JVM_ARG_OK=true
-    else
-	$ECHO "Arg failed:" >&5
-	$ECHO "$OUTPUT" >&5
-	JVM_ARG_OK=false
-    fi
+  $ECHO "Check if jvm arg is ok: -d64" >&5
+  $ECHO "Command: $SJAVAC_SERVER_JAVA -d64 -version" >&5
+  OUTPUT=`$SJAVAC_SERVER_JAVA -d64 -version 2>&1`
+  FOUND_WARN=`$ECHO "$OUTPUT" | grep -i warn`
+  FOUND_VERSION=`$ECHO $OUTPUT | grep " version \""`
+  if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
+    SJAVAC_SERVER_JAVA="$SJAVAC_SERVER_JAVA -d64"
+    JVM_ARG_OK=true
+  else
+    $ECHO "Arg failed:" >&5
+    $ECHO "$OUTPUT" >&5
+    JVM_ARG_OK=false
+  fi
 
     if test "$JVM_ARG_OK" = true; then
-        JVM_64BIT=true
-	JVM_ARG_OK=false
+      JVM_64BIT=true
+      JVM_ARG_OK=false
     fi
-    fi
+  fi
 
-if test "$JVM_64BIT" = true; then
+  if test "$JVM_64BIT" = true; then
     if test "$MEMORY_SIZE" -gt "17000"; then
 
-    $ECHO "Check if jvm arg is ok: -Xms10G -Xmx10G" >&5
-    $ECHO "Command: $SJAVAC_SERVER_JAVA -Xms10G -Xmx10G -version" >&5
-    OUTPUT=`$SJAVAC_SERVER_JAVA -Xms10G -Xmx10G -version 2>&1`
-    FOUND_WARN=`$ECHO "$OUTPUT" | grep -i warn`
-    FOUND_VERSION=`$ECHO $OUTPUT | grep " version \""`
-    if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
-        SJAVAC_SERVER_JAVA="$SJAVAC_SERVER_JAVA -Xms10G -Xmx10G"
-	JVM_ARG_OK=true
-    else
-	$ECHO "Arg failed:" >&5
-	$ECHO "$OUTPUT" >&5
-	JVM_ARG_OK=false
-    fi
+  $ECHO "Check if jvm arg is ok: -Xms10G -Xmx10G" >&5
+  $ECHO "Command: $SJAVAC_SERVER_JAVA -Xms10G -Xmx10G -version" >&5
+  OUTPUT=`$SJAVAC_SERVER_JAVA -Xms10G -Xmx10G -version 2>&1`
+  FOUND_WARN=`$ECHO "$OUTPUT" | grep -i warn`
+  FOUND_VERSION=`$ECHO $OUTPUT | grep " version \""`
+  if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
+    SJAVAC_SERVER_JAVA="$SJAVAC_SERVER_JAVA -Xms10G -Xmx10G"
+    JVM_ARG_OK=true
+  else
+    $ECHO "Arg failed:" >&5
+    $ECHO "$OUTPUT" >&5
+    JVM_ARG_OK=false
+  fi
 
     fi
     if test "$MEMORY_SIZE" -gt "10000" && test "$JVM_ARG_OK" = false; then
 
-    $ECHO "Check if jvm arg is ok: -Xms6G -Xmx6G" >&5
-    $ECHO "Command: $SJAVAC_SERVER_JAVA -Xms6G -Xmx6G -version" >&5
-    OUTPUT=`$SJAVAC_SERVER_JAVA -Xms6G -Xmx6G -version 2>&1`
-    FOUND_WARN=`$ECHO "$OUTPUT" | grep -i warn`
-    FOUND_VERSION=`$ECHO $OUTPUT | grep " version \""`
-    if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
-        SJAVAC_SERVER_JAVA="$SJAVAC_SERVER_JAVA -Xms6G -Xmx6G"
-	JVM_ARG_OK=true
-    else
-	$ECHO "Arg failed:" >&5
-	$ECHO "$OUTPUT" >&5
-	JVM_ARG_OK=false
-    fi
+  $ECHO "Check if jvm arg is ok: -Xms6G -Xmx6G" >&5
+  $ECHO "Command: $SJAVAC_SERVER_JAVA -Xms6G -Xmx6G -version" >&5
+  OUTPUT=`$SJAVAC_SERVER_JAVA -Xms6G -Xmx6G -version 2>&1`
+  FOUND_WARN=`$ECHO "$OUTPUT" | grep -i warn`
+  FOUND_VERSION=`$ECHO $OUTPUT | grep " version \""`
+  if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
+    SJAVAC_SERVER_JAVA="$SJAVAC_SERVER_JAVA -Xms6G -Xmx6G"
+    JVM_ARG_OK=true
+  else
+    $ECHO "Arg failed:" >&5
+    $ECHO "$OUTPUT" >&5
+    JVM_ARG_OK=false
+  fi
 
     fi
     if test "$MEMORY_SIZE" -gt "5000" && test "$JVM_ARG_OK" = false; then
 
-    $ECHO "Check if jvm arg is ok: -Xms1G -Xmx3G" >&5
-    $ECHO "Command: $SJAVAC_SERVER_JAVA -Xms1G -Xmx3G -version" >&5
-    OUTPUT=`$SJAVAC_SERVER_JAVA -Xms1G -Xmx3G -version 2>&1`
-    FOUND_WARN=`$ECHO "$OUTPUT" | grep -i warn`
-    FOUND_VERSION=`$ECHO $OUTPUT | grep " version \""`
-    if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
-        SJAVAC_SERVER_JAVA="$SJAVAC_SERVER_JAVA -Xms1G -Xmx3G"
-	JVM_ARG_OK=true
-    else
-	$ECHO "Arg failed:" >&5
-	$ECHO "$OUTPUT" >&5
-	JVM_ARG_OK=false
-    fi
+  $ECHO "Check if jvm arg is ok: -Xms1G -Xmx3G" >&5
+  $ECHO "Command: $SJAVAC_SERVER_JAVA -Xms1G -Xmx3G -version" >&5
+  OUTPUT=`$SJAVAC_SERVER_JAVA -Xms1G -Xmx3G -version 2>&1`
+  FOUND_WARN=`$ECHO "$OUTPUT" | grep -i warn`
+  FOUND_VERSION=`$ECHO $OUTPUT | grep " version \""`
+  if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
+    SJAVAC_SERVER_JAVA="$SJAVAC_SERVER_JAVA -Xms1G -Xmx3G"
+    JVM_ARG_OK=true
+  else
+    $ECHO "Arg failed:" >&5
+    $ECHO "$OUTPUT" >&5
+    JVM_ARG_OK=false
+  fi
 
     fi
     if test "$MEMORY_SIZE" -gt "3800" && test "$JVM_ARG_OK" = false; then
 
-    $ECHO "Check if jvm arg is ok: -Xms1G -Xmx2500M" >&5
-    $ECHO "Command: $SJAVAC_SERVER_JAVA -Xms1G -Xmx2500M -version" >&5
-    OUTPUT=`$SJAVAC_SERVER_JAVA -Xms1G -Xmx2500M -version 2>&1`
-    FOUND_WARN=`$ECHO "$OUTPUT" | grep -i warn`
-    FOUND_VERSION=`$ECHO $OUTPUT | grep " version \""`
-    if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
-        SJAVAC_SERVER_JAVA="$SJAVAC_SERVER_JAVA -Xms1G -Xmx2500M"
-	JVM_ARG_OK=true
-    else
-	$ECHO "Arg failed:" >&5
-	$ECHO "$OUTPUT" >&5
-	JVM_ARG_OK=false
-    fi
+  $ECHO "Check if jvm arg is ok: -Xms1G -Xmx2500M" >&5
+  $ECHO "Command: $SJAVAC_SERVER_JAVA -Xms1G -Xmx2500M -version" >&5
+  OUTPUT=`$SJAVAC_SERVER_JAVA -Xms1G -Xmx2500M -version 2>&1`
+  FOUND_WARN=`$ECHO "$OUTPUT" | grep -i warn`
+  FOUND_VERSION=`$ECHO $OUTPUT | grep " version \""`
+  if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
+    SJAVAC_SERVER_JAVA="$SJAVAC_SERVER_JAVA -Xms1G -Xmx2500M"
+    JVM_ARG_OK=true
+  else
+    $ECHO "Arg failed:" >&5
+    $ECHO "$OUTPUT" >&5
+    JVM_ARG_OK=false
+  fi
 
     fi
-fi
-if test "$MEMORY_SIZE" -gt "2500" && test "$JVM_ARG_OK" = false; then
+  fi
+  if test "$MEMORY_SIZE" -gt "2500" && test "$JVM_ARG_OK" = false; then
 
-    $ECHO "Check if jvm arg is ok: -Xms1000M -Xmx1500M" >&5
-    $ECHO "Command: $SJAVAC_SERVER_JAVA -Xms1000M -Xmx1500M -version" >&5
-    OUTPUT=`$SJAVAC_SERVER_JAVA -Xms1000M -Xmx1500M -version 2>&1`
-    FOUND_WARN=`$ECHO "$OUTPUT" | grep -i warn`
-    FOUND_VERSION=`$ECHO $OUTPUT | grep " version \""`
-    if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
-        SJAVAC_SERVER_JAVA="$SJAVAC_SERVER_JAVA -Xms1000M -Xmx1500M"
-	JVM_ARG_OK=true
-    else
-	$ECHO "Arg failed:" >&5
-	$ECHO "$OUTPUT" >&5
-	JVM_ARG_OK=false
-    fi
+  $ECHO "Check if jvm arg is ok: -Xms1000M -Xmx1500M" >&5
+  $ECHO "Command: $SJAVAC_SERVER_JAVA -Xms1000M -Xmx1500M -version" >&5
+  OUTPUT=`$SJAVAC_SERVER_JAVA -Xms1000M -Xmx1500M -version 2>&1`
+  FOUND_WARN=`$ECHO "$OUTPUT" | grep -i warn`
+  FOUND_VERSION=`$ECHO $OUTPUT | grep " version \""`
+  if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
+    SJAVAC_SERVER_JAVA="$SJAVAC_SERVER_JAVA -Xms1000M -Xmx1500M"
+    JVM_ARG_OK=true
+  else
+    $ECHO "Arg failed:" >&5
+    $ECHO "$OUTPUT" >&5
+    JVM_ARG_OK=false
+  fi
 
-fi
-if test "$MEMORY_SIZE" -gt "1000" && test "$JVM_ARG_OK" = false; then
+  fi
+  if test "$MEMORY_SIZE" -gt "1000" && test "$JVM_ARG_OK" = false; then
 
-    $ECHO "Check if jvm arg is ok: -Xms400M -Xmx1100M" >&5
-    $ECHO "Command: $SJAVAC_SERVER_JAVA -Xms400M -Xmx1100M -version" >&5
-    OUTPUT=`$SJAVAC_SERVER_JAVA -Xms400M -Xmx1100M -version 2>&1`
-    FOUND_WARN=`$ECHO "$OUTPUT" | grep -i warn`
-    FOUND_VERSION=`$ECHO $OUTPUT | grep " version \""`
-    if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
-        SJAVAC_SERVER_JAVA="$SJAVAC_SERVER_JAVA -Xms400M -Xmx1100M"
-	JVM_ARG_OK=true
-    else
-	$ECHO "Arg failed:" >&5
-	$ECHO "$OUTPUT" >&5
-	JVM_ARG_OK=false
-    fi
+  $ECHO "Check if jvm arg is ok: -Xms400M -Xmx1100M" >&5
+  $ECHO "Command: $SJAVAC_SERVER_JAVA -Xms400M -Xmx1100M -version" >&5
+  OUTPUT=`$SJAVAC_SERVER_JAVA -Xms400M -Xmx1100M -version 2>&1`
+  FOUND_WARN=`$ECHO "$OUTPUT" | grep -i warn`
+  FOUND_VERSION=`$ECHO $OUTPUT | grep " version \""`
+  if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
+    SJAVAC_SERVER_JAVA="$SJAVAC_SERVER_JAVA -Xms400M -Xmx1100M"
+    JVM_ARG_OK=true
+  else
+    $ECHO "Arg failed:" >&5
+    $ECHO "$OUTPUT" >&5
+    JVM_ARG_OK=false
+  fi
 
-fi
-if test "$JVM_ARG_OK" = false; then
+  fi
+  if test "$JVM_ARG_OK" = false; then
 
-    $ECHO "Check if jvm arg is ok: -Xms256M -Xmx512M" >&5
-    $ECHO "Command: $SJAVAC_SERVER_JAVA -Xms256M -Xmx512M -version" >&5
-    OUTPUT=`$SJAVAC_SERVER_JAVA -Xms256M -Xmx512M -version 2>&1`
-    FOUND_WARN=`$ECHO "$OUTPUT" | grep -i warn`
-    FOUND_VERSION=`$ECHO $OUTPUT | grep " version \""`
-    if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
-        SJAVAC_SERVER_JAVA="$SJAVAC_SERVER_JAVA -Xms256M -Xmx512M"
-	JVM_ARG_OK=true
-    else
-	$ECHO "Arg failed:" >&5
-	$ECHO "$OUTPUT" >&5
-	JVM_ARG_OK=false
-    fi
+  $ECHO "Check if jvm arg is ok: -Xms256M -Xmx512M" >&5
+  $ECHO "Command: $SJAVAC_SERVER_JAVA -Xms256M -Xmx512M -version" >&5
+  OUTPUT=`$SJAVAC_SERVER_JAVA -Xms256M -Xmx512M -version 2>&1`
+  FOUND_WARN=`$ECHO "$OUTPUT" | grep -i warn`
+  FOUND_VERSION=`$ECHO $OUTPUT | grep " version \""`
+  if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
+    SJAVAC_SERVER_JAVA="$SJAVAC_SERVER_JAVA -Xms256M -Xmx512M"
+    JVM_ARG_OK=true
+  else
+    $ECHO "Arg failed:" >&5
+    $ECHO "$OUTPUT" >&5
+    JVM_ARG_OK=false
+  fi
 
-fi
+  fi
 
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to use sjavac" >&5
+  { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to use sjavac" >&5
 $as_echo_n "checking whether to use sjavac... " >&6; }
-# Check whether --enable-sjavac was given.
+  # Check whether --enable-sjavac was given.
 if test "${enable_sjavac+set}" = set; then :
   enableval=$enable_sjavac; ENABLE_SJAVAC="${enableval}"
 else
   ENABLE_SJAVAC='no'
 fi
 
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ENABLE_SJAVAC" >&5
+  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ENABLE_SJAVAC" >&5
 $as_echo "$ENABLE_SJAVAC" >&6; }
 
 
-if test "x$ENABLE_SJAVAC" = xyes; then
+  if test "x$ENABLE_SJAVAC" = xyes; then
     SJAVAC_SERVER_DIR="$OUTPUT_ROOT/javacservers"
-else
+  else
     SJAVAC_SERVER_DIR=
-fi
-
+  fi
 
 
 
 # Can the C/C++ compiler use precompiled headers?
 
 
-###############################################################################
-#
-# Can the C/C++ compiler use precompiled headers?
-#
-# Check whether --enable-precompiled-headers was given.
+  ###############################################################################
+  #
+  # Can the C/C++ compiler use precompiled headers?
+  #
+  # Check whether --enable-precompiled-headers was given.
 if test "${enable_precompiled_headers+set}" = set; then :
   enableval=$enable_precompiled_headers; ENABLE_PRECOMPH=${enable_precompiled_headers}
 else
@@ -32991,48 +32984,48 @@
 fi
 
 
-USE_PRECOMPILED_HEADER=1
-if test "x$ENABLE_PRECOMPH" = xno; then
+  USE_PRECOMPILED_HEADER=1
+  if test "x$ENABLE_PRECOMPH" = xno; then
     USE_PRECOMPILED_HEADER=0
-fi
+  fi
 
-if test "x$ENABLE_PRECOMPH" = xyes; then
+  if test "x$ENABLE_PRECOMPH" = xyes; then
     # Check that the compiler actually supports precomp headers.
     if test "x$GCC" = xyes; then
-         { $as_echo "$as_me:${as_lineno-$LINENO}: checking that precompiled headers work" >&5
+      { $as_echo "$as_me:${as_lineno-$LINENO}: checking that precompiled headers work" >&5
 $as_echo_n "checking that precompiled headers work... " >&6; }
-         echo "int alfa();" > conftest.h
-         $CXX -x c++-header conftest.h -o conftest.hpp.gch 2>&5 >&5
-         if test ! -f conftest.hpp.gch; then
-             USE_PRECOMPILED_HEADER=0
-             { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+      echo "int alfa();" > conftest.h
+      $CXX -x c++-header conftest.h -o conftest.hpp.gch 2>&5 >&5
+      if test ! -f conftest.hpp.gch; then
+        USE_PRECOMPILED_HEADER=0
+        { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
 $as_echo "no" >&6; }
-         else
-             { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
+      else
+        { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
 $as_echo "yes" >&6; }
-         fi
-         rm -f conftest.h conftest.hpp.gch
+      fi
+      rm -f conftest.h conftest.hpp.gch
     fi
-fi
+  fi
 
 
 
 
 # Setup use of ccache, if available
 
-    # Check whether --enable-ccache was given.
+  # Check whether --enable-ccache was given.
 if test "${enable_ccache+set}" = set; then :
   enableval=$enable_ccache; ENABLE_CCACHE=${enable_ccache}
 else
   ENABLE_CCACHE=yes
 fi
 
-    if test "x$ENABLE_CCACHE" = xyes; then
-        OLD_PATH="$PATH"
-        if test "x$TOOLS_DIR" != x; then
-          PATH=$TOOLS_DIR:$PATH
-        fi
-        # Extract the first word of "ccache", so it can be a program name with args.
+  if test "x$ENABLE_CCACHE" = xyes; then
+    OLD_PATH="$PATH"
+    if test "x$TOOLS_DIR" != x; then
+      PATH=$TOOLS_DIR:$PATH
+    fi
+    # Extract the first word of "ccache", so it can be a program name with args.
 set dummy ccache; ac_word=$2
 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
 $as_echo_n "checking for $ac_word... " >&6; }
@@ -33072,14 +33065,14 @@
 fi
 
 
-        PATH="$OLD_PATH"
-    else
-        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ccache" >&5
+    PATH="$OLD_PATH"
+  else
+    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ccache" >&5
 $as_echo_n "checking for ccache... " >&6; }
-        { $as_echo "$as_me:${as_lineno-$LINENO}: result: explicitly disabled" >&5
+    { $as_echo "$as_me:${as_lineno-$LINENO}: result: explicitly disabled" >&5
 $as_echo "explicitly disabled" >&6; }
-        CCACHE=
-    fi
+    CCACHE=
+  fi
 
 
 
@@ -33089,33 +33082,33 @@
 fi
 
 
-    if test "x$with_ccache_dir" != x; then
-        # When using a non home ccache directory, assume the use is to share ccache files
-        # with other users. Thus change the umask.
-        SET_CCACHE_DIR="CCACHE_DIR=$with_ccache_dir CCACHE_UMASK=002"
-    fi
-    CCACHE_FOUND=""
-    if test "x$CCACHE" != x; then
+  if test "x$with_ccache_dir" != x; then
+    # When using a non home ccache directory, assume the use is to share ccache files
+    # with other users. Thus change the umask.
+    SET_CCACHE_DIR="CCACHE_DIR=$with_ccache_dir CCACHE_UMASK=002"
+  fi
+  CCACHE_FOUND=""
+  if test "x$CCACHE" != x; then
 
-    if test "x$CCACHE" != x; then
-        CCACHE_FOUND="true"
-        # Only use ccache if it is 3.1.4 or later, which supports
-        # precompiled headers.
-        { $as_echo "$as_me:${as_lineno-$LINENO}: checking if ccache supports precompiled headers" >&5
+  if test "x$CCACHE" != x; then
+    CCACHE_FOUND="true"
+    # Only use ccache if it is 3.1.4 or later, which supports
+    # precompiled headers.
+    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if ccache supports precompiled headers" >&5
 $as_echo_n "checking if ccache supports precompiled headers... " >&6; }
-        HAS_GOOD_CCACHE=`($CCACHE --version | head -n 1 | grep -E 3.1.[456789]) 2> /dev/null`
-        if test "x$HAS_GOOD_CCACHE" = x; then
-            { $as_echo "$as_me:${as_lineno-$LINENO}: result: no, disabling ccache" >&5
+    HAS_GOOD_CCACHE=`($CCACHE --version | head -n 1 | grep -E 3.1.[456789]) 2> /dev/null`
+    if test "x$HAS_GOOD_CCACHE" = x; then
+      { $as_echo "$as_me:${as_lineno-$LINENO}: result: no, disabling ccache" >&5
 $as_echo "no, disabling ccache" >&6; }
-            CCACHE=
-        else
-            { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
+      CCACHE=
+    else
+      { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
 $as_echo "yes" >&6; }
-            { $as_echo "$as_me:${as_lineno-$LINENO}: checking if C-compiler supports ccache precompiled headers" >&5
+      { $as_echo "$as_me:${as_lineno-$LINENO}: checking if C-compiler supports ccache precompiled headers" >&5
 $as_echo_n "checking if C-compiler supports ccache precompiled headers... " >&6; }
-            PUSHED_FLAGS="$CXXFLAGS"
-            CXXFLAGS="-fpch-preprocess $CXXFLAGS"
-            cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+      PUSHED_FLAGS="$CXXFLAGS"
+      CXXFLAGS="-fpch-preprocess $CXXFLAGS"
+      cat confdefs.h - <<_ACEOF >conftest.$ac_ext
 /* end confdefs.h.  */
 
 int
@@ -33132,30 +33125,30 @@
   CC_KNOWS_CCACHE_TRICK=no
 fi
 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
-            CXXFLAGS="$PUSHED_FLAGS"
-            if test "x$CC_KNOWS_CCACHE_TRICK" = xyes; then
-                { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
+      CXXFLAGS="$PUSHED_FLAGS"
+      if test "x$CC_KNOWS_CCACHE_TRICK" = xyes; then
+        { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
 $as_echo "yes" >&6; }
-            else
-                { $as_echo "$as_me:${as_lineno-$LINENO}: result: no, disabling ccaching of precompiled headers" >&5
+      else
+        { $as_echo "$as_me:${as_lineno-$LINENO}: result: no, disabling ccaching of precompiled headers" >&5
 $as_echo "no, disabling ccaching of precompiled headers" >&6; }
-                CCACHE=
-            fi
-        fi
+        CCACHE=
+      fi
     fi
+  fi
 
-    if test "x$CCACHE" != x; then
-        CCACHE_SLOPPINESS=time_macros
-        CCACHE="CCACHE_COMPRESS=1 $SET_CCACHE_DIR CCACHE_SLOPPINESS=$CCACHE_SLOPPINESS $CCACHE"
-        CCACHE_FLAGS=-fpch-preprocess
+  if test "x$CCACHE" != x; then
+    CCACHE_SLOPPINESS=time_macros
+    CCACHE="CCACHE_COMPRESS=1 $SET_CCACHE_DIR CCACHE_SLOPPINESS=$CCACHE_SLOPPINESS $CCACHE"
+    CCACHE_FLAGS=-fpch-preprocess
 
-        if test "x$SET_CCACHE_DIR" != x; then
-            mkdir -p $CCACHE_DIR > /dev/null 2>&1
-	    chmod a+rwxs $CCACHE_DIR > /dev/null 2>&1
-        fi
+    if test "x$SET_CCACHE_DIR" != x; then
+      mkdir -p $CCACHE_DIR > /dev/null 2>&1
+      chmod a+rwxs $CCACHE_DIR > /dev/null 2>&1
     fi
+  fi
 
-    fi
+  fi
 
 
 ###############################################################################
@@ -33174,12 +33167,11 @@
   fi
 
 
-
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking if build directory is on local disk" >&5
+  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if build directory is on local disk" >&5
 $as_echo_n "checking if build directory is on local disk... " >&6; }
 
-	# df -l lists only local disks; if the given directory is not found then
-	# a non-zero exit code is given
+  # df -l lists only local disks; if the given directory is not found then
+  # a non-zero exit code is given
   if test "x$DF" = x; then
     if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
       # msys does not have df; use Windows "net use" instead.
@@ -33201,30 +33193,29 @@
     fi
   fi
 
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $OUTPUT_DIR_IS_LOCAL" >&5
+  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OUTPUT_DIR_IS_LOCAL" >&5
 $as_echo "$OUTPUT_DIR_IS_LOCAL" >&6; }
 
 
 
-# Check if the user has any old-style ALT_ variables set.
-FOUND_ALT_VARIABLES=`env | grep ^ALT_`
+  # Check if the user has any old-style ALT_ variables set.
+  FOUND_ALT_VARIABLES=`env | grep ^ALT_`
 
-# Before generating output files, test if they exist. If they do, this is a reconfigure.
-# Since we can't properly handle the dependencies for this, warn the user about the situation
-if test -e $OUTPUT_ROOT/spec.gmk; then
-  IS_RECONFIGURE=yes
-else
-  IS_RECONFIGURE=no
-fi
+  # Before generating output files, test if they exist. If they do, this is a reconfigure.
+  # Since we can't properly handle the dependencies for this, warn the user about the situation
+  if test -e $OUTPUT_ROOT/spec.gmk; then
+    IS_RECONFIGURE=yes
+  else
+    IS_RECONFIGURE=no
+  fi
 
-if test -e $SRC_ROOT/build/.hide-configure-performance-hints; then
-  HIDE_PERFORMANCE_HINTS=yes
-else
-  HIDE_PERFORMANCE_HINTS=no
-  # Hide it the next time around...
-  $TOUCH $SRC_ROOT/build/.hide-configure-performance-hints > /dev/null 2>&1
-fi
-
+  if test -e $SRC_ROOT/build/.hide-configure-performance-hints; then
+    HIDE_PERFORMANCE_HINTS=yes
+  else
+    HIDE_PERFORMANCE_HINTS=no
+    # Hide it the next time around...
+    $TOUCH $SRC_ROOT/build/.hide-configure-performance-hints > /dev/null 2>&1
+  fi
 
 
 # At the end, call the custom hook. (Dummy macro if no custom sources available)
@@ -34525,115 +34516,115 @@
 
 # Finally output some useful information to the user
 
-# Finally output some useful information to the user
+  # Finally output some useful information to the user
 
-if test "x$CCACHE_FOUND" != x; then
-	if  test "x$HAS_GOOD_CCACHE" = x; then
-		CCACHE_STATUS="installed, but disabled (version older than 3.1.4)"
-		CCACHE_HELP_MSG="You have ccache installed, but it is a version prior to 3.1.4. Try upgrading."
-	else
-		CCACHE_STATUS="installed and in use"
-	fi
-else
-	if test "x$GCC" = xyes; then
-		CCACHE_STATUS="not installed (consider installing)"
-		CCACHE_HELP_MSG="You do not have ccache installed. Try installing it."
-	else
-		CCACHE_STATUS="not available for your system"
-	fi
-fi
+  if test "x$CCACHE_FOUND" != x; then
+    if  test "x$HAS_GOOD_CCACHE" = x; then
+      CCACHE_STATUS="installed, but disabled (version older than 3.1.4)"
+      CCACHE_HELP_MSG="You have ccache installed, but it is a version prior to 3.1.4. Try upgrading."
+    else
+      CCACHE_STATUS="installed and in use"
+    fi
+  else
+    if test "x$GCC" = xyes; then
+      CCACHE_STATUS="not installed (consider installing)"
+      CCACHE_HELP_MSG="You do not have ccache installed. Try installing it."
+    else
+      CCACHE_STATUS="not available for your system"
+    fi
+  fi
 
-printf "\n"
-printf "====================================================\n"
-printf "A new configuration has been successfully created in\n"
-printf "$OUTPUT_ROOT\n"
-if test "x$CONFIGURE_COMMAND_LINE" != x; then
-	printf "using configure arguments '$CONFIGURE_COMMAND_LINE'.\n"
-else
-	printf "using default settings.\n"
-fi
+  printf "\n"
+  printf "====================================================\n"
+  printf "A new configuration has been successfully created in\n"
+  printf "$OUTPUT_ROOT\n"
+  if test "x$CONFIGURE_COMMAND_LINE" != x; then
+    printf "using configure arguments '$CONFIGURE_COMMAND_LINE'.\n"
+  else
+    printf "using default settings.\n"
+  fi
 
-printf "\n"
-printf "Configuration summary:\n"
-printf "* Debug level:    $DEBUG_LEVEL\n"
-printf "* JDK variant:    $JDK_VARIANT\n"
-printf "* JVM variants:   $with_jvm_variants\n"
-printf "* OpenJDK target: OS: $OPENJDK_TARGET_OS, CPU architecture: $OPENJDK_TARGET_CPU_ARCH, address length: $OPENJDK_TARGET_CPU_BITS\n"
+  printf "\n"
+  printf "Configuration summary:\n"
+  printf "* Debug level:    $DEBUG_LEVEL\n"
+  printf "* JDK variant:    $JDK_VARIANT\n"
+  printf "* JVM variants:   $with_jvm_variants\n"
+  printf "* OpenJDK target: OS: $OPENJDK_TARGET_OS, CPU architecture: $OPENJDK_TARGET_CPU_ARCH, address length: $OPENJDK_TARGET_CPU_BITS\n"
 
-printf "\n"
-printf "Tools summary:\n"
-if test "x$OPENJDK_BUILD_OS" = "xwindows"; then
-  printf "* Environment:    $WINDOWS_ENV_VENDOR version $WINDOWS_ENV_VERSION (root at $WINDOWS_ENV_ROOT_PATH)\n"
-fi
-printf "* Boot JDK:       $BOOT_JDK_VERSION (at $BOOT_JDK)\n"
-printf "* C Compiler:     $CC_VENDOR version $CC_VERSION (at $CC)\n"
-printf "* C++ Compiler:   $CXX_VENDOR version $CXX_VERSION (at $CXX)\n"
+  printf "\n"
+  printf "Tools summary:\n"
+  if test "x$OPENJDK_BUILD_OS" = "xwindows"; then
+    printf "* Environment:    $WINDOWS_ENV_VENDOR version $WINDOWS_ENV_VERSION (root at $WINDOWS_ENV_ROOT_PATH)\n"
+  fi
+  printf "* Boot JDK:       $BOOT_JDK_VERSION (at $BOOT_JDK)\n"
+  printf "* C Compiler:     $CC_VENDOR version $CC_VERSION (at $CC)\n"
+  printf "* C++ Compiler:   $CXX_VENDOR version $CXX_VERSION (at $CXX)\n"
 
-printf "\n"
-printf "Build performance summary:\n"
-printf "* Cores to use:   $JOBS\n"
-printf "* Memory limit:   $MEMORY_SIZE MB\n"
-printf "* ccache status:  $CCACHE_STATUS\n"
-printf "\n"
+  printf "\n"
+  printf "Build performance summary:\n"
+  printf "* Cores to use:   $JOBS\n"
+  printf "* Memory limit:   $MEMORY_SIZE MB\n"
+  printf "* ccache status:  $CCACHE_STATUS\n"
+  printf "\n"
 
-if test "x$CCACHE_HELP_MSG" != x && test "x$HIDE_PERFORMANCE_HINTS" = "xno"; then
-	printf "Build performance tip: ccache gives a tremendous speedup for C++ recompilations.\n"
-	printf "$CCACHE_HELP_MSG\n"
+  if test "x$CCACHE_HELP_MSG" != x && test "x$HIDE_PERFORMANCE_HINTS" = "xno"; then
+    printf "Build performance tip: ccache gives a tremendous speedup for C++ recompilations.\n"
+    printf "$CCACHE_HELP_MSG\n"
 
-    # Print a helpful message on how to acquire the necessary build dependency.
-    # ccache is the help tag: freetyp2, cups, pulse, alsa etc
-    MISSING_DEPENDENCY=ccache
-    PKGHANDLER_COMMAND=
+  # Print a helpful message on how to acquire the necessary build dependency.
+  # ccache is the help tag: freetyp2, cups, pulse, alsa etc
+  MISSING_DEPENDENCY=ccache
+  PKGHANDLER_COMMAND=
 
-    case $PKGHANDLER in
-	apt-get)
-                apt_help     $MISSING_DEPENDENCY ;;
+  case $PKGHANDLER in
+    apt-get)
+      apt_help     $MISSING_DEPENDENCY ;;
     yum)
-                yum_help     $MISSING_DEPENDENCY ;;
-	port)
-                port_help    $MISSING_DEPENDENCY ;;
-	pkgutil)
-                pkgutil_help $MISSING_DEPENDENCY ;;
-	pkgadd)
-                pkgadd_help  $MISSING_DEPENDENCY ;;
+      yum_help     $MISSING_DEPENDENCY ;;
+    port)
+      port_help    $MISSING_DEPENDENCY ;;
+    pkgutil)
+      pkgutil_help $MISSING_DEPENDENCY ;;
+    pkgadd)
+      pkgadd_help  $MISSING_DEPENDENCY ;;
     * )
       break ;;
-    esac
+  esac
 
-    if test "x$PKGHANDLER_COMMAND" != x; then
-        HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
-    fi
+  if test "x$PKGHANDLER_COMMAND" != x; then
+    HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
+  fi
 
-	printf "$HELP_MSG\n"
-	printf "\n"
-fi
+    printf "$HELP_MSG\n"
+    printf "\n"
+  fi
 
-if test "x$BUILDING_MULTIPLE_JVM_VARIANTS" = "xyes"; then
-	printf "NOTE: You have requested to build more than one version of the JVM, which\n"
-	printf "will result in longer build times.\n"
-	printf "\n"
-fi
+  if test "x$BUILDING_MULTIPLE_JVM_VARIANTS" = "xyes"; then
+    printf "NOTE: You have requested to build more than one version of the JVM, which\n"
+    printf "will result in longer build times.\n"
+    printf "\n"
+  fi
 
-if test "x$FOUND_ALT_VARIABLES" != "x"; then
-	printf "WARNING: You have old-style ALT_ environment variables set.\n"
-	printf "These are not respected, and will be ignored. It is recommended\n"
-	printf "that you clean your environment. The following variables are set:\n"
-	printf "$FOUND_ALT_VARIABLES\n"
-	printf "\n"
-fi
+  if test "x$FOUND_ALT_VARIABLES" != "x"; then
+    printf "WARNING: You have old-style ALT_ environment variables set.\n"
+    printf "These are not respected, and will be ignored. It is recommended\n"
+    printf "that you clean your environment. The following variables are set:\n"
+    printf "$FOUND_ALT_VARIABLES\n"
+    printf "\n"
+  fi
 
-if test "x$OUTPUT_DIR_IS_LOCAL" != "xyes"; then
-	printf "WARNING: Your build output directory is not on a local disk.\n"
-	printf "This will severely degrade build performance!\n"
-	printf "It is recommended that you create an output directory on a local disk,\n"
-	printf "and run the configure script again from that directory.\n"
-	printf "\n"
-fi
+  if test "x$OUTPUT_DIR_IS_LOCAL" != "xyes"; then
+    printf "WARNING: Your build output directory is not on a local disk.\n"
+    printf "This will severely degrade build performance!\n"
+    printf "It is recommended that you create an output directory on a local disk,\n"
+    printf "and run the configure script again from that directory.\n"
+    printf "\n"
+  fi
 
-if test "x$IS_RECONFIGURE" = "xyes"; then
-	printf "WARNING: The result of this configuration has overridden an older\n"
-	printf "configuration. You *should* run 'make clean' to make sure you get a\n"
-	printf "proper build. Failure to do so might result in strange build problems.\n"
-	printf "\n"
-fi
+  if test "x$IS_RECONFIGURE" = "xyes"; then
+    printf "WARNING: The result of this configuration has overridden an older\n"
+    printf "configuration. You *should* run 'make clean' to make sure you get a\n"
+    printf "proper build. Failure to do so might result in strange build problems.\n"
+    printf "\n"
+  fi
 
diff --git a/common/autoconf/help.m4 b/common/autoconf/help.m4
index 15e8b95..c287af3 100644
--- a/common/autoconf/help.m4
+++ b/common/autoconf/help.m4
@@ -25,194 +25,194 @@
 
 AC_DEFUN_ONCE([HELP_SETUP_DEPENDENCY_HELP],
 [
-    AC_CHECK_PROGS(PKGHANDLER, apt-get yum port pkgutil pkgadd)
+  AC_CHECK_PROGS(PKGHANDLER, apt-get yum port pkgutil pkgadd)
 ])
 
 AC_DEFUN([HELP_MSG_MISSING_DEPENDENCY],
 [
-    # Print a helpful message on how to acquire the necessary build dependency.
-    # $1 is the help tag: freetyp2, cups, pulse, alsa etc
-    MISSING_DEPENDENCY=$1
-    PKGHANDLER_COMMAND=
+  # Print a helpful message on how to acquire the necessary build dependency.
+  # $1 is the help tag: freetyp2, cups, pulse, alsa etc
+  MISSING_DEPENDENCY=$1
+  PKGHANDLER_COMMAND=
 
-    case $PKGHANDLER in
-	apt-get)
-                apt_help     $MISSING_DEPENDENCY ;;
+  case $PKGHANDLER in
+    apt-get)
+      apt_help     $MISSING_DEPENDENCY ;;
     yum)
-                yum_help     $MISSING_DEPENDENCY ;;
-	port)
-                port_help    $MISSING_DEPENDENCY ;;
-	pkgutil)
-                pkgutil_help $MISSING_DEPENDENCY ;;
-	pkgadd)
-                pkgadd_help  $MISSING_DEPENDENCY ;;
+      yum_help     $MISSING_DEPENDENCY ;;
+    port)
+      port_help    $MISSING_DEPENDENCY ;;
+    pkgutil)
+      pkgutil_help $MISSING_DEPENDENCY ;;
+    pkgadd)
+      pkgadd_help  $MISSING_DEPENDENCY ;;
     * )
       break ;;
-    esac
+  esac
 
-    if test "x$PKGHANDLER_COMMAND" != x; then
-        HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
-    fi
+  if test "x$PKGHANDLER_COMMAND" != x; then
+    HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
+  fi
 ])
 
 cygwin_help() {
-    case $1 in
+  case $1 in
     unzip)
-        PKGHANDLER_COMMAND="cd <location of cygwin setup.exe> && cmd /c setup -q -P unzip" ;;
+      PKGHANDLER_COMMAND="cd <location of cygwin setup.exe> && cmd /c setup -q -P unzip" ;;
     zip)
-        PKGHANDLER_COMMAND="cd <location of cygwin setup.exe> && cmd /c setup -q -P zip" ;;
+      PKGHANDLER_COMMAND="cd <location of cygwin setup.exe> && cmd /c setup -q -P zip" ;;
     make)
-        PKGHANDLER_COMMAND="cd <location of cygwin setup.exe> && cmd /c setup -q -P make" ;;
+      PKGHANDLER_COMMAND="cd <location of cygwin setup.exe> && cmd /c setup -q -P make" ;;
     * )
-       break ;;
-    esac
+      break ;;
+  esac
 }
 
 apt_help() {
-    case $1 in
+  case $1 in
     devkit)
-        PKGHANDLER_COMMAND="sudo apt-get install build-essential" ;;
+      PKGHANDLER_COMMAND="sudo apt-get install build-essential" ;;
     openjdk)
-        PKGHANDLER_COMMAND="sudo apt-get install openjdk-7-jdk" ;;
+      PKGHANDLER_COMMAND="sudo apt-get install openjdk-7-jdk" ;;
     alsa)
-        PKGHANDLER_COMMAND="sudo apt-get install libasound2-dev" ;;
+      PKGHANDLER_COMMAND="sudo apt-get install libasound2-dev" ;;
     cups)
-        PKGHANDLER_COMMAND="sudo apt-get install libcups2-dev" ;;
+      PKGHANDLER_COMMAND="sudo apt-get install libcups2-dev" ;;
     freetype2)
-        PKGHANDLER_COMMAND="sudo apt-get install libfreetype6-dev" ;;
+      PKGHANDLER_COMMAND="sudo apt-get install libfreetype6-dev" ;;
     pulse)
-        PKGHANDLER_COMMAND="sudo apt-get install libpulse-dev" ;;
+      PKGHANDLER_COMMAND="sudo apt-get install libpulse-dev" ;;
     x11)
-        PKGHANDLER_COMMAND="sudo apt-get install libX11-dev libxext-dev libxrender-dev libxtst-dev libxt-dev" ;;
+      PKGHANDLER_COMMAND="sudo apt-get install libX11-dev libxext-dev libxrender-dev libxtst-dev libxt-dev" ;;
     ccache)
-        PKGHANDLER_COMMAND="sudo apt-get install ccache" ;;
+      PKGHANDLER_COMMAND="sudo apt-get install ccache" ;;
     * )
-       break ;;
-    esac
+      break ;;
+  esac
 }
 
 yum_help() {
-    case $1 in
+  case $1 in
     devkit)
-        PKGHANDLER_COMMAND="sudo yum groupinstall \"Development Tools\"" ;;
+      PKGHANDLER_COMMAND="sudo yum groupinstall \"Development Tools\"" ;;
     openjdk)
-        PKGHANDLER_COMMAND="sudo yum install java-1.7.0-openjdk" ;;
+      PKGHANDLER_COMMAND="sudo yum install java-1.7.0-openjdk" ;;
     alsa)
-        PKGHANDLER_COMMAND="sudo yum install alsa-lib-devel" ;;
+      PKGHANDLER_COMMAND="sudo yum install alsa-lib-devel" ;;
     cups)
-        PKGHANDLER_COMMAND="sudo yum install cups-devel" ;;
+      PKGHANDLER_COMMAND="sudo yum install cups-devel" ;;
     freetype2)
-        PKGHANDLER_COMMAND="sudo yum install freetype-devel" ;;
+      PKGHANDLER_COMMAND="sudo yum install freetype-devel" ;;
     pulse)
-        PKGHANDLER_COMMAND="sudo yum install pulseaudio-libs-devel" ;;
+      PKGHANDLER_COMMAND="sudo yum install pulseaudio-libs-devel" ;;
     x11)
-        PKGHANDLER_COMMAND="sudo yum install libXtst-devel libXt-devel libXrender-devel" ;;
+      PKGHANDLER_COMMAND="sudo yum install libXtst-devel libXt-devel libXrender-devel" ;;
     ccache)
-        PKGHANDLER_COMMAND="sudo yum install ccache" ;;
+      PKGHANDLER_COMMAND="sudo yum install ccache" ;;
     * )
-       break ;;
-    esac
+      break ;;
+  esac
 }
 
 port_help() {
-    PKGHANDLER_COMMAND=""
+  PKGHANDLER_COMMAND=""
 }
 
 pkgutil_help() {
-    PKGHANDLER_COMMAND=""
+  PKGHANDLER_COMMAND=""
 }
 
 pkgadd_help() {
-    PKGHANDLER_COMMAND=""
+  PKGHANDLER_COMMAND=""
 }
 
 AC_DEFUN_ONCE([HELP_PRINT_SUMMARY_AND_WARNINGS],
 [
-# Finally output some useful information to the user
+  # Finally output some useful information to the user
 
-if test "x$CCACHE_FOUND" != x; then
-	if  test "x$HAS_GOOD_CCACHE" = x; then
-		CCACHE_STATUS="installed, but disabled (version older than 3.1.4)"
-		CCACHE_HELP_MSG="You have ccache installed, but it is a version prior to 3.1.4. Try upgrading."
-	else
-		CCACHE_STATUS="installed and in use"
-	fi
-else
-	if test "x$GCC" = xyes; then
-		CCACHE_STATUS="not installed (consider installing)"
-		CCACHE_HELP_MSG="You do not have ccache installed. Try installing it."
-	else
-		CCACHE_STATUS="not available for your system"
-	fi
-fi
+  if test "x$CCACHE_FOUND" != x; then
+    if  test "x$HAS_GOOD_CCACHE" = x; then
+      CCACHE_STATUS="installed, but disabled (version older than 3.1.4)"
+      CCACHE_HELP_MSG="You have ccache installed, but it is a version prior to 3.1.4. Try upgrading."
+    else
+      CCACHE_STATUS="installed and in use"
+    fi
+  else
+    if test "x$GCC" = xyes; then
+      CCACHE_STATUS="not installed (consider installing)"
+      CCACHE_HELP_MSG="You do not have ccache installed. Try installing it."
+    else
+      CCACHE_STATUS="not available for your system"
+    fi
+  fi
 
-printf "\n"
-printf "====================================================\n"
-printf "A new configuration has been successfully created in\n"
-printf "$OUTPUT_ROOT\n"
-if test "x$CONFIGURE_COMMAND_LINE" != x; then
-	printf "using configure arguments '$CONFIGURE_COMMAND_LINE'.\n"
-else
-	printf "using default settings.\n"
-fi
+  printf "\n"
+  printf "====================================================\n"
+  printf "A new configuration has been successfully created in\n"
+  printf "$OUTPUT_ROOT\n"
+  if test "x$CONFIGURE_COMMAND_LINE" != x; then
+    printf "using configure arguments '$CONFIGURE_COMMAND_LINE'.\n"
+  else
+    printf "using default settings.\n"
+  fi
 
-printf "\n"
-printf "Configuration summary:\n"
-printf "* Debug level:    $DEBUG_LEVEL\n"
-printf "* JDK variant:    $JDK_VARIANT\n"
-printf "* JVM variants:   $with_jvm_variants\n"
-printf "* OpenJDK target: OS: $OPENJDK_TARGET_OS, CPU architecture: $OPENJDK_TARGET_CPU_ARCH, address length: $OPENJDK_TARGET_CPU_BITS\n"
+  printf "\n"
+  printf "Configuration summary:\n"
+  printf "* Debug level:    $DEBUG_LEVEL\n"
+  printf "* JDK variant:    $JDK_VARIANT\n"
+  printf "* JVM variants:   $with_jvm_variants\n"
+  printf "* OpenJDK target: OS: $OPENJDK_TARGET_OS, CPU architecture: $OPENJDK_TARGET_CPU_ARCH, address length: $OPENJDK_TARGET_CPU_BITS\n"
 
-printf "\n"
-printf "Tools summary:\n"
-if test "x$OPENJDK_BUILD_OS" = "xwindows"; then
-  printf "* Environment:    $WINDOWS_ENV_VENDOR version $WINDOWS_ENV_VERSION (root at $WINDOWS_ENV_ROOT_PATH)\n"
-fi
-printf "* Boot JDK:       $BOOT_JDK_VERSION (at $BOOT_JDK)\n"
-printf "* C Compiler:     $CC_VENDOR version $CC_VERSION (at $CC)\n"
-printf "* C++ Compiler:   $CXX_VENDOR version $CXX_VERSION (at $CXX)\n"
+  printf "\n"
+  printf "Tools summary:\n"
+  if test "x$OPENJDK_BUILD_OS" = "xwindows"; then
+    printf "* Environment:    $WINDOWS_ENV_VENDOR version $WINDOWS_ENV_VERSION (root at $WINDOWS_ENV_ROOT_PATH)\n"
+  fi
+  printf "* Boot JDK:       $BOOT_JDK_VERSION (at $BOOT_JDK)\n"
+  printf "* C Compiler:     $CC_VENDOR version $CC_VERSION (at $CC)\n"
+  printf "* C++ Compiler:   $CXX_VENDOR version $CXX_VERSION (at $CXX)\n"
 
-printf "\n"
-printf "Build performance summary:\n"
-printf "* Cores to use:   $JOBS\n"
-printf "* Memory limit:   $MEMORY_SIZE MB\n"
-printf "* ccache status:  $CCACHE_STATUS\n"
-printf "\n"
+  printf "\n"
+  printf "Build performance summary:\n"
+  printf "* Cores to use:   $JOBS\n"
+  printf "* Memory limit:   $MEMORY_SIZE MB\n"
+  printf "* ccache status:  $CCACHE_STATUS\n"
+  printf "\n"
 
-if test "x$CCACHE_HELP_MSG" != x && test "x$HIDE_PERFORMANCE_HINTS" = "xno"; then
-	printf "Build performance tip: ccache gives a tremendous speedup for C++ recompilations.\n"
-	printf "$CCACHE_HELP_MSG\n"
-	HELP_MSG_MISSING_DEPENDENCY([ccache])
-	printf "$HELP_MSG\n"
-	printf "\n"
-fi
+  if test "x$CCACHE_HELP_MSG" != x && test "x$HIDE_PERFORMANCE_HINTS" = "xno"; then
+    printf "Build performance tip: ccache gives a tremendous speedup for C++ recompilations.\n"
+    printf "$CCACHE_HELP_MSG\n"
+    HELP_MSG_MISSING_DEPENDENCY([ccache])
+    printf "$HELP_MSG\n"
+    printf "\n"
+  fi
 
-if test "x$BUILDING_MULTIPLE_JVM_VARIANTS" = "xyes"; then
-	printf "NOTE: You have requested to build more than one version of the JVM, which\n"
-	printf "will result in longer build times.\n"
-	printf "\n"
-fi
+  if test "x$BUILDING_MULTIPLE_JVM_VARIANTS" = "xyes"; then
+    printf "NOTE: You have requested to build more than one version of the JVM, which\n"
+    printf "will result in longer build times.\n"
+    printf "\n"
+  fi
 
-if test "x$FOUND_ALT_VARIABLES" != "x"; then
-	printf "WARNING: You have old-style ALT_ environment variables set.\n"
-	printf "These are not respected, and will be ignored. It is recommended\n"
-	printf "that you clean your environment. The following variables are set:\n"
-	printf "$FOUND_ALT_VARIABLES\n"
-	printf "\n"
-fi
+  if test "x$FOUND_ALT_VARIABLES" != "x"; then
+    printf "WARNING: You have old-style ALT_ environment variables set.\n"
+    printf "These are not respected, and will be ignored. It is recommended\n"
+    printf "that you clean your environment. The following variables are set:\n"
+    printf "$FOUND_ALT_VARIABLES\n"
+    printf "\n"
+  fi
 
-if test "x$OUTPUT_DIR_IS_LOCAL" != "xyes"; then
-	printf "WARNING: Your build output directory is not on a local disk.\n"
-	printf "This will severely degrade build performance!\n"
-	printf "It is recommended that you create an output directory on a local disk,\n"
-	printf "and run the configure script again from that directory.\n"
-	printf "\n"
-fi
+  if test "x$OUTPUT_DIR_IS_LOCAL" != "xyes"; then
+    printf "WARNING: Your build output directory is not on a local disk.\n"
+    printf "This will severely degrade build performance!\n"
+    printf "It is recommended that you create an output directory on a local disk,\n"
+    printf "and run the configure script again from that directory.\n"
+    printf "\n"
+  fi
 
-if test "x$IS_RECONFIGURE" = "xyes"; then
-	printf "WARNING: The result of this configuration has overridden an older\n"
-	printf "configuration. You *should* run 'make clean' to make sure you get a\n"
-	printf "proper build. Failure to do so might result in strange build problems.\n"
-	printf "\n"
-fi
+  if test "x$IS_RECONFIGURE" = "xyes"; then
+    printf "WARNING: The result of this configuration has overridden an older\n"
+    printf "configuration. You *should* run 'make clean' to make sure you get a\n"
+    printf "proper build. Failure to do so might result in strange build problems.\n"
+    printf "\n"
+  fi
 ])
diff --git a/common/autoconf/hotspot-spec.gmk.in b/common/autoconf/hotspot-spec.gmk.in
index 17b404a..ffacc97 100644
--- a/common/autoconf/hotspot-spec.gmk.in
+++ b/common/autoconf/hotspot-spec.gmk.in
@@ -111,12 +111,12 @@
 USE_PRECOMPILED_HEADER=@USE_PRECOMPILED_HEADER@
 
 # Hotspot expects the variable FULL_DEBUG_SYMBOLS=1/0 to control debug symbols
-# creation. 
-ifeq ($(ENABLE_DEBUG_SYMBOLS), true) 
+# creation.
+ifeq ($(ENABLE_DEBUG_SYMBOLS), true)
   FULL_DEBUG_SYMBOLS=1
-  # Ensure hotspot uses the objcopy that configure located 
-  ALT_OBJCOPY:=$(OBJCOPY) 
-else 
+  # Ensure hotspot uses the objcopy that configure located
+  ALT_OBJCOPY:=$(OBJCOPY)
+else
   FULL_DEBUG_SYMBOLS=0
 endif
 
diff --git a/common/autoconf/jdk-options.m4 b/common/autoconf/jdk-options.m4
index 1880607..07e548c 100644
--- a/common/autoconf/jdk-options.m4
+++ b/common/autoconf/jdk-options.m4
@@ -25,235 +25,234 @@
 
 AC_DEFUN_ONCE([JDKOPT_SETUP_JDK_VARIANT],
 [
-###############################################################################
-#
-# Check which variant of the JDK that we want to build.
-# Currently we have:
-#    normal:   standard edition   
-# but the custom make system may add other variants
-#
-# Effectively the JDK variant gives a name to a specific set of
-# modules to compile into the JDK. In the future, these modules
-# might even be Jigsaw modules.
-#
-AC_MSG_CHECKING([which variant of the JDK to build])
-AC_ARG_WITH([jdk-variant], [AS_HELP_STRING([--with-jdk-variant],
-	[JDK variant to build (normal) @<:@normal@:>@])])
+  ###############################################################################
+  #
+  # Check which variant of the JDK that we want to build.
+  # Currently we have:
+  #    normal:   standard edition
+  # but the custom make system may add other variants
+  #
+  # Effectively the JDK variant gives a name to a specific set of
+  # modules to compile into the JDK. In the future, these modules
+  # might even be Jigsaw modules.
+  #
+  AC_MSG_CHECKING([which variant of the JDK to build])
+  AC_ARG_WITH([jdk-variant], [AS_HELP_STRING([--with-jdk-variant],
+      [JDK variant to build (normal) @<:@normal@:>@])])
 
-if test "x$with_jdk_variant" = xnormal || test "x$with_jdk_variant" = x; then
+  if test "x$with_jdk_variant" = xnormal || test "x$with_jdk_variant" = x; then
     JDK_VARIANT="normal"
-else
+  else
     AC_MSG_ERROR([The available JDK variants are: normal])
-fi
+  fi
 
-AC_SUBST(JDK_VARIANT)
+  AC_SUBST(JDK_VARIANT)
 
-AC_MSG_RESULT([$JDK_VARIANT])
+  AC_MSG_RESULT([$JDK_VARIANT])
 ])
 
 AC_DEFUN_ONCE([JDKOPT_SETUP_JVM_VARIANTS],
 [
 
-###############################################################################
-#
-# Check which variants of the JVM that we want to build.
-# Currently we have:
-#    server: normal interpreter and a tiered C1/C2 compiler
-#    client: normal interpreter and C1 (no C2 compiler) (only 32-bit platforms)
-#    minimal1: reduced form of client with optional VM services and features stripped out
-#    kernel: kernel footprint JVM that passes the TCK without major performance problems,
-#             ie normal interpreter and C1, only the serial GC, kernel jvmti etc
-#    zero: no machine code interpreter, no compiler
-#    zeroshark: zero interpreter and shark/llvm compiler backend
-AC_MSG_CHECKING([which variants of the JVM to build])
-AC_ARG_WITH([jvm-variants], [AS_HELP_STRING([--with-jvm-variants],
-	[JVM variants (separated by commas) to build (server, client, minimal1, kernel, zero, zeroshark) @<:@server@:>@])])
+  ###############################################################################
+  #
+  # Check which variants of the JVM that we want to build.
+  # Currently we have:
+  #    server: normal interpreter and a tiered C1/C2 compiler
+  #    client: normal interpreter and C1 (no C2 compiler) (only 32-bit platforms)
+  #    minimal1: reduced form of client with optional VM services and features stripped out
+  #    kernel: kernel footprint JVM that passes the TCK without major performance problems,
+  #             ie normal interpreter and C1, only the serial GC, kernel jvmti etc
+  #    zero: no machine code interpreter, no compiler
+  #    zeroshark: zero interpreter and shark/llvm compiler backend
+  AC_MSG_CHECKING([which variants of the JVM to build])
+  AC_ARG_WITH([jvm-variants], [AS_HELP_STRING([--with-jvm-variants],
+      [JVM variants (separated by commas) to build (server, client, minimal1, kernel, zero, zeroshark) @<:@server@:>@])])
 
-if test "x$with_jvm_variants" = x; then
-     with_jvm_variants="server"
-fi
+  if test "x$with_jvm_variants" = x; then
+    with_jvm_variants="server"
+  fi
 
-JVM_VARIANTS=",$with_jvm_variants,"
-TEST_VARIANTS=`$ECHO "$JVM_VARIANTS" | $SED -e 's/server,//' -e 's/client,//'  -e 's/minimal1,//' -e 's/kernel,//' -e 's/zero,//' -e 's/zeroshark,//'`
+  JVM_VARIANTS=",$with_jvm_variants,"
+  TEST_VARIANTS=`$ECHO "$JVM_VARIANTS" | $SED -e 's/server,//' -e 's/client,//'  -e 's/minimal1,//' -e 's/kernel,//' -e 's/zero,//' -e 's/zeroshark,//'`
 
-if test "x$TEST_VARIANTS" != "x,"; then
-   AC_MSG_ERROR([The available JVM variants are: server, client, minimal1, kernel, zero, zeroshark])
-fi   
-AC_MSG_RESULT([$with_jvm_variants])
+  if test "x$TEST_VARIANTS" != "x,"; then
+    AC_MSG_ERROR([The available JVM variants are: server, client, minimal1, kernel, zero, zeroshark])
+  fi
+  AC_MSG_RESULT([$with_jvm_variants])
 
-JVM_VARIANT_SERVER=`$ECHO "$JVM_VARIANTS" | $SED -e '/,server,/!s/.*/false/g' -e '/,server,/s/.*/true/g'`
-JVM_VARIANT_CLIENT=`$ECHO "$JVM_VARIANTS" | $SED -e '/,client,/!s/.*/false/g' -e '/,client,/s/.*/true/g'` 
-JVM_VARIANT_MINIMAL1=`$ECHO "$JVM_VARIANTS" | $SED -e '/,minimal1,/!s/.*/false/g' -e '/,minimal1,/s/.*/true/g'`
-JVM_VARIANT_KERNEL=`$ECHO "$JVM_VARIANTS" | $SED -e '/,kernel,/!s/.*/false/g' -e '/,kernel,/s/.*/true/g'`
-JVM_VARIANT_ZERO=`$ECHO "$JVM_VARIANTS" | $SED -e '/,zero,/!s/.*/false/g' -e '/,zero,/s/.*/true/g'`
-JVM_VARIANT_ZEROSHARK=`$ECHO "$JVM_VARIANTS" | $SED -e '/,zeroshark,/!s/.*/false/g' -e '/,zeroshark,/s/.*/true/g'`
+  JVM_VARIANT_SERVER=`$ECHO "$JVM_VARIANTS" | $SED -e '/,server,/!s/.*/false/g' -e '/,server,/s/.*/true/g'`
+  JVM_VARIANT_CLIENT=`$ECHO "$JVM_VARIANTS" | $SED -e '/,client,/!s/.*/false/g' -e '/,client,/s/.*/true/g'`
+  JVM_VARIANT_MINIMAL1=`$ECHO "$JVM_VARIANTS" | $SED -e '/,minimal1,/!s/.*/false/g' -e '/,minimal1,/s/.*/true/g'`
+  JVM_VARIANT_KERNEL=`$ECHO "$JVM_VARIANTS" | $SED -e '/,kernel,/!s/.*/false/g' -e '/,kernel,/s/.*/true/g'`
+  JVM_VARIANT_ZERO=`$ECHO "$JVM_VARIANTS" | $SED -e '/,zero,/!s/.*/false/g' -e '/,zero,/s/.*/true/g'`
+  JVM_VARIANT_ZEROSHARK=`$ECHO "$JVM_VARIANTS" | $SED -e '/,zeroshark,/!s/.*/false/g' -e '/,zeroshark,/s/.*/true/g'`
 
-if test "x$JVM_VARIANT_CLIENT" = xtrue; then
+  if test "x$JVM_VARIANT_CLIENT" = xtrue; then
     if test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
-        AC_MSG_ERROR([You cannot build a client JVM for a 64-bit machine.])
+      AC_MSG_ERROR([You cannot build a client JVM for a 64-bit machine.])
     fi
-fi
-if test "x$JVM_VARIANT_KERNEL" = xtrue; then
+  fi
+  if test "x$JVM_VARIANT_KERNEL" = xtrue; then
     if test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
-        AC_MSG_ERROR([You cannot build a kernel JVM for a 64-bit machine.])
+      AC_MSG_ERROR([You cannot build a kernel JVM for a 64-bit machine.])
     fi
-fi
-if test "x$JVM_VARIANT_MINIMAL1" = xtrue; then
+  fi
+  if test "x$JVM_VARIANT_MINIMAL1" = xtrue; then
     if test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
-        AC_MSG_ERROR([You cannot build a minimal JVM for a 64-bit machine.])
+      AC_MSG_ERROR([You cannot build a minimal JVM for a 64-bit machine.])
     fi
-fi
+  fi
 
-# Replace the commas with AND for use in the build directory name.
-ANDED_JVM_VARIANTS=`$ECHO "$JVM_VARIANTS" | $SED -e 's/^,//' -e 's/,$//' -e 's/,/AND/'`
-COUNT_VARIANTS=`$ECHO "$JVM_VARIANTS" | $SED -e 's/server,/1/' -e 's/client,/1/' -e 's/minimal1,/1/' -e 's/kernel,/1/' -e 's/zero,/1/' -e 's/zeroshark,/1/'`
-if test "x$COUNT_VARIANTS" != "x,1"; then
+  # Replace the commas with AND for use in the build directory name.
+  ANDED_JVM_VARIANTS=`$ECHO "$JVM_VARIANTS" | $SED -e 's/^,//' -e 's/,$//' -e 's/,/AND/'`
+  COUNT_VARIANTS=`$ECHO "$JVM_VARIANTS" | $SED -e 's/server,/1/' -e 's/client,/1/' -e 's/minimal1,/1/' -e 's/kernel,/1/' -e 's/zero,/1/' -e 's/zeroshark,/1/'`
+  if test "x$COUNT_VARIANTS" != "x,1"; then
     BUILDING_MULTIPLE_JVM_VARIANTS=yes
-else
+  else
     BUILDING_MULTIPLE_JVM_VARIANTS=no
-fi
+  fi
 
-AC_SUBST(JVM_VARIANTS)
-AC_SUBST(JVM_VARIANT_SERVER)
-AC_SUBST(JVM_VARIANT_CLIENT)
-AC_SUBST(JVM_VARIANT_MINIMAL1)
-AC_SUBST(JVM_VARIANT_KERNEL)
-AC_SUBST(JVM_VARIANT_ZERO)
-AC_SUBST(JVM_VARIANT_ZEROSHARK)
+  AC_SUBST(JVM_VARIANTS)
+  AC_SUBST(JVM_VARIANT_SERVER)
+  AC_SUBST(JVM_VARIANT_CLIENT)
+  AC_SUBST(JVM_VARIANT_MINIMAL1)
+  AC_SUBST(JVM_VARIANT_KERNEL)
+  AC_SUBST(JVM_VARIANT_ZERO)
+  AC_SUBST(JVM_VARIANT_ZEROSHARK)
 
-INCLUDE_SA=true
-if test "x$JVM_VARIANT_ZERO" = xtrue ; then
+  INCLUDE_SA=true
+  if test "x$JVM_VARIANT_ZERO" = xtrue ; then
     INCLUDE_SA=false
-fi
-if test "x$JVM_VARIANT_ZEROSHARK" = xtrue ; then
+  fi
+  if test "x$JVM_VARIANT_ZEROSHARK" = xtrue ; then
     INCLUDE_SA=false
-fi
-AC_SUBST(INCLUDE_SA)
+  fi
+  AC_SUBST(INCLUDE_SA)
 
-if test "x$OPENJDK_TARGET_OS" = "xmacosx"; then
-   MACOSX_UNIVERSAL="true"
-fi
+  if test "x$OPENJDK_TARGET_OS" = "xmacosx"; then
+    MACOSX_UNIVERSAL="true"
+  fi
 
-AC_SUBST(MACOSX_UNIVERSAL)
-
+  AC_SUBST(MACOSX_UNIVERSAL)
 ])
 
 AC_DEFUN_ONCE([JDKOPT_SETUP_DEBUG_LEVEL],
 [
-###############################################################################
-#
-# Set the debug level
-#    release: no debug information, all optimizations, no asserts.
-#    fastdebug: debug information (-g), all optimizations, all asserts
-#    slowdebug: debug information (-g), no optimizations, all asserts
-#
-DEBUG_LEVEL="release"              
-AC_MSG_CHECKING([which debug level to use])
-AC_ARG_ENABLE([debug], [AS_HELP_STRING([--enable-debug],
-	[set the debug level to fastdebug (shorthand for --with-debug-level=fastdebug) @<:@disabled@:>@])],
-	[
+  ###############################################################################
+  #
+  # Set the debug level
+  #    release: no debug information, all optimizations, no asserts.
+  #    fastdebug: debug information (-g), all optimizations, all asserts
+  #    slowdebug: debug information (-g), no optimizations, all asserts
+  #
+  DEBUG_LEVEL="release"
+  AC_MSG_CHECKING([which debug level to use])
+  AC_ARG_ENABLE([debug], [AS_HELP_STRING([--enable-debug],
+      [set the debug level to fastdebug (shorthand for --with-debug-level=fastdebug) @<:@disabled@:>@])],
+      [
         ENABLE_DEBUG="${enableval}"
         DEBUG_LEVEL="fastdebug"
-    ], [ENABLE_DEBUG="no"])
+      ], [ENABLE_DEBUG="no"])
 
-AC_ARG_WITH([debug-level], [AS_HELP_STRING([--with-debug-level],
-	[set the debug level (release, fastdebug, slowdebug) @<:@release@:>@])],
-	[
+  AC_ARG_WITH([debug-level], [AS_HELP_STRING([--with-debug-level],
+      [set the debug level (release, fastdebug, slowdebug) @<:@release@:>@])],
+      [
         DEBUG_LEVEL="${withval}"
         if test "x$ENABLE_DEBUG" = xyes; then
-			AC_MSG_ERROR([You cannot use both --enable-debug and --with-debug-level at the same time.])
+          AC_MSG_ERROR([You cannot use both --enable-debug and --with-debug-level at the same time.])
         fi
-    ])
-AC_MSG_RESULT([$DEBUG_LEVEL])
+      ])
+  AC_MSG_RESULT([$DEBUG_LEVEL])
 
-if test "x$DEBUG_LEVEL" != xrelease && \
-   test "x$DEBUG_LEVEL" != xfastdebug && \
-   test "x$DEBUG_LEVEL" != xslowdebug; then
-   AC_MSG_ERROR([Allowed debug levels are: release, fastdebug and slowdebug])
-fi
+  if test "x$DEBUG_LEVEL" != xrelease && \
+      test "x$DEBUG_LEVEL" != xfastdebug && \
+      test "x$DEBUG_LEVEL" != xslowdebug; then
+    AC_MSG_ERROR([Allowed debug levels are: release, fastdebug and slowdebug])
+  fi
 
 
-###############################################################################
-#
-# Setup legacy vars/targets and new vars to deal with different debug levels.
-#
+  ###############################################################################
+  #
+  # Setup legacy vars/targets and new vars to deal with different debug levels.
+  #
 
-case $DEBUG_LEVEL in
-      release )
-          VARIANT="OPT"
-          FASTDEBUG="false"
-          DEBUG_CLASSFILES="false"            
-          BUILD_VARIANT_RELEASE=""             
-          HOTSPOT_DEBUG_LEVEL="product"
-          HOTSPOT_EXPORT="product"
-           ;;
-      fastdebug )
-          VARIANT="DBG"
-          FASTDEBUG="true"
-          DEBUG_CLASSFILES="true"            
-          BUILD_VARIANT_RELEASE="-fastdebug"
-          HOTSPOT_DEBUG_LEVEL="fastdebug"   
-          HOTSPOT_EXPORT="fastdebug"
-           ;;
-      slowdebug )
-          VARIANT="DBG"
-          FASTDEBUG="false"
-          DEBUG_CLASSFILES="true"            
-          BUILD_VARIANT_RELEASE="-debug"             
-          HOTSPOT_DEBUG_LEVEL="jvmg"
-          HOTSPOT_EXPORT="debug"
-           ;;
-esac
+  case $DEBUG_LEVEL in
+    release )
+      VARIANT="OPT"
+      FASTDEBUG="false"
+      DEBUG_CLASSFILES="false"
+      BUILD_VARIANT_RELEASE=""
+      HOTSPOT_DEBUG_LEVEL="product"
+      HOTSPOT_EXPORT="product"
+      ;;
+    fastdebug )
+      VARIANT="DBG"
+      FASTDEBUG="true"
+      DEBUG_CLASSFILES="true"
+      BUILD_VARIANT_RELEASE="-fastdebug"
+      HOTSPOT_DEBUG_LEVEL="fastdebug"
+      HOTSPOT_EXPORT="fastdebug"
+      ;;
+    slowdebug )
+      VARIANT="DBG"
+      FASTDEBUG="false"
+      DEBUG_CLASSFILES="true"
+      BUILD_VARIANT_RELEASE="-debug"
+      HOTSPOT_DEBUG_LEVEL="jvmg"
+      HOTSPOT_EXPORT="debug"
+      ;;
+  esac
 
-#####
-# Generate the legacy makefile targets for hotspot.
-# The hotspot api for selecting the build artifacts, really, needs to be improved.
-# JDK-7195896 will fix this on the hotspot side by using the JVM_VARIANT_* variables to
-# determine what needs to be built. All we will need to set here is all_product, all_fastdebug etc
-# But until then ...
-HOTSPOT_TARGET=""
+  #####
+  # Generate the legacy makefile targets for hotspot.
+  # The hotspot api for selecting the build artifacts, really, needs to be improved.
+  # JDK-7195896 will fix this on the hotspot side by using the JVM_VARIANT_* variables to
+  # determine what needs to be built. All we will need to set here is all_product, all_fastdebug etc
+  # But until then ...
+  HOTSPOT_TARGET=""
 
-if test "x$JVM_VARIANT_SERVER" = xtrue; then
+  if test "x$JVM_VARIANT_SERVER" = xtrue; then
     HOTSPOT_TARGET="$HOTSPOT_TARGET${HOTSPOT_DEBUG_LEVEL} "
-fi
+  fi
 
-if test "x$JVM_VARIANT_CLIENT" = xtrue; then
+  if test "x$JVM_VARIANT_CLIENT" = xtrue; then
     HOTSPOT_TARGET="$HOTSPOT_TARGET${HOTSPOT_DEBUG_LEVEL}1 "
-fi
+  fi
 
-if test "x$JVM_VARIANT_MINIMAL1" = xtrue; then
+  if test "x$JVM_VARIANT_MINIMAL1" = xtrue; then
     HOTSPOT_TARGET="$HOTSPOT_TARGET${HOTSPOT_DEBUG_LEVEL}minimal1 "
-fi
+  fi
 
-if test "x$JVM_VARIANT_KERNEL" = xtrue; then
+  if test "x$JVM_VARIANT_KERNEL" = xtrue; then
     HOTSPOT_TARGET="$HOTSPOT_TARGET${HOTSPOT_DEBUG_LEVEL}kernel "
-fi
+  fi
 
-if test "x$JVM_VARIANT_ZERO" = xtrue; then
+  if test "x$JVM_VARIANT_ZERO" = xtrue; then
     HOTSPOT_TARGET="$HOTSPOT_TARGET${HOTSPOT_DEBUG_LEVEL}zero "
-fi
+  fi
 
-if test "x$JVM_VARIANT_ZEROSHARK" = xtrue; then
+  if test "x$JVM_VARIANT_ZEROSHARK" = xtrue; then
     HOTSPOT_TARGET="$HOTSPOT_TARGET${HOTSPOT_DEBUG_LEVEL}shark "
-fi
+  fi
 
-HOTSPOT_TARGET="$HOTSPOT_TARGET docs export_$HOTSPOT_EXPORT"
+  HOTSPOT_TARGET="$HOTSPOT_TARGET docs export_$HOTSPOT_EXPORT"
 
-# On Macosx universal binaries are produced, but they only contain
-# 64 bit intel. This invalidates control of which jvms are built
-# from configure, but only server is valid anyway. Fix this
-# when hotspot makefiles are rewritten.
-if test "x$MACOSX_UNIVERSAL" = xtrue; then
+  # On Macosx universal binaries are produced, but they only contain
+  # 64 bit intel. This invalidates control of which jvms are built
+  # from configure, but only server is valid anyway. Fix this
+  # when hotspot makefiles are rewritten.
+  if test "x$MACOSX_UNIVERSAL" = xtrue; then
     HOTSPOT_TARGET=universal_${HOTSPOT_EXPORT}
-fi
+  fi
 
-#####
+  #####
 
-AC_SUBST(DEBUG_LEVEL)
-AC_SUBST(VARIANT)
-AC_SUBST(FASTDEBUG)
-AC_SUBST(DEBUG_CLASSFILES)
-AC_SUBST(BUILD_VARIANT_RELEASE)
+  AC_SUBST(DEBUG_LEVEL)
+  AC_SUBST(VARIANT)
+  AC_SUBST(FASTDEBUG)
+  AC_SUBST(DEBUG_CLASSFILES)
+  AC_SUBST(BUILD_VARIANT_RELEASE)
 ])
 
 
@@ -264,7 +263,7 @@
 AC_DEFUN_ONCE([JDKOPT_SETUP_OPEN_OR_CUSTOM],
 [
   AC_ARG_ENABLE([openjdk-only], [AS_HELP_STRING([--enable-openjdk-only],
-    [suppress building custom source even if present @<:@disabled@:>@])],,[enable_openjdk_only="no"])
+      [suppress building custom source even if present @<:@disabled@:>@])],,[enable_openjdk_only="no"])
 
   AC_MSG_CHECKING([for presence of closed sources])
   if test -d "$SRC_ROOT/jdk/src/closed"; then
@@ -301,100 +300,100 @@
 AC_DEFUN_ONCE([JDKOPT_SETUP_JDK_OPTIONS],
 [
 
-###############################################################################
-#
-# Should we build a JDK/JVM with headful support (ie a graphical ui)?
-# We always build headless support.
-#
-AC_MSG_CHECKING([headful support])
-AC_ARG_ENABLE([headful], [AS_HELP_STRING([--disable-headful],
-	[disable building headful support (graphical UI support) @<:@enabled@:>@])],
-    [SUPPORT_HEADFUL=${enable_headful}], [SUPPORT_HEADFUL=yes])
+  ###############################################################################
+  #
+  # Should we build a JDK/JVM with headful support (ie a graphical ui)?
+  # We always build headless support.
+  #
+  AC_MSG_CHECKING([headful support])
+  AC_ARG_ENABLE([headful], [AS_HELP_STRING([--disable-headful],
+      [disable building headful support (graphical UI support) @<:@enabled@:>@])],
+      [SUPPORT_HEADFUL=${enable_headful}], [SUPPORT_HEADFUL=yes])
 
-SUPPORT_HEADLESS=yes
-BUILD_HEADLESS="BUILD_HEADLESS:=true"
+  SUPPORT_HEADLESS=yes
+  BUILD_HEADLESS="BUILD_HEADLESS:=true"
 
-if test "x$SUPPORT_HEADFUL" = xyes; then
+  if test "x$SUPPORT_HEADFUL" = xyes; then
     # We are building both headful and headless.
     headful_msg="include support for both headful and headless"
-fi
+  fi
 
-if test "x$SUPPORT_HEADFUL" = xno; then
+  if test "x$SUPPORT_HEADFUL" = xno; then
     # Thus we are building headless only.
     BUILD_HEADLESS="BUILD_HEADLESS:=true"
     headful_msg="headless only"
-fi
+  fi
 
-AC_MSG_RESULT([$headful_msg])
+  AC_MSG_RESULT([$headful_msg])
 
-AC_SUBST(SUPPORT_HEADLESS)
-AC_SUBST(SUPPORT_HEADFUL)
-AC_SUBST(BUILD_HEADLESS)
+  AC_SUBST(SUPPORT_HEADLESS)
+  AC_SUBST(SUPPORT_HEADFUL)
+  AC_SUBST(BUILD_HEADLESS)
 
-# Control wether Hotspot runs Queens test after build.
-AC_ARG_ENABLE([hotspot-test-in-build], [AS_HELP_STRING([--enable-hotspot-test-in-build],
-	[run the Queens test after Hotspot build @<:@disabled@:>@])],,
-    [enable_hotspot_test_in_build=no])
-if test "x$enable_hotspot_test_in_build" = "xyes"; then
+  # Control wether Hotspot runs Queens test after build.
+  AC_ARG_ENABLE([hotspot-test-in-build], [AS_HELP_STRING([--enable-hotspot-test-in-build],
+      [run the Queens test after Hotspot build @<:@disabled@:>@])],,
+      [enable_hotspot_test_in_build=no])
+  if test "x$enable_hotspot_test_in_build" = "xyes"; then
     TEST_IN_BUILD=true
-else
+  else
     TEST_IN_BUILD=false
-fi
-AC_SUBST(TEST_IN_BUILD)
+  fi
+  AC_SUBST(TEST_IN_BUILD)
 
-###############################################################################
-#
-# Choose cacerts source file
-#
-AC_ARG_WITH(cacerts-file, [AS_HELP_STRING([--with-cacerts-file],
-    [specify alternative cacerts file])])
-if test "x$with_cacerts_file" != x; then
+  ###############################################################################
+  #
+  # Choose cacerts source file
+  #
+  AC_ARG_WITH(cacerts-file, [AS_HELP_STRING([--with-cacerts-file],
+      [specify alternative cacerts file])])
+  if test "x$with_cacerts_file" != x; then
     CACERTS_FILE=$with_cacerts_file
-else
+  else
     CACERTS_FILE=${SRC_ROOT}/jdk/src/share/lib/security/cacerts
-fi
-AC_SUBST(CACERTS_FILE)
+  fi
+  AC_SUBST(CACERTS_FILE)
 
-###############################################################################
-#
-# Enable or disable unlimited crypto
-#
-AC_ARG_ENABLE(unlimited-crypto, [AS_HELP_STRING([--enable-unlimited-crypto],
-        [Enable unlimited crypto policy @<:@disabled@:>@])],,
-    [enable_unlimited_crypto=no])
-if test "x$enable_unlimited_crypto" = "xyes"; then
+  ###############################################################################
+  #
+  # Enable or disable unlimited crypto
+  #
+  AC_ARG_ENABLE(unlimited-crypto, [AS_HELP_STRING([--enable-unlimited-crypto],
+      [Enable unlimited crypto policy @<:@disabled@:>@])],,
+      [enable_unlimited_crypto=no])
+  if test "x$enable_unlimited_crypto" = "xyes"; then
     UNLIMITED_CRYPTO=true
-else
+  else
     UNLIMITED_CRYPTO=false
-fi
-AC_SUBST(UNLIMITED_CRYPTO)
+  fi
+  AC_SUBST(UNLIMITED_CRYPTO)
 
-###############################################################################
-#
-# Enable or disable the elliptic curve crypto implementation
-#
-AC_DEFUN_ONCE([JDKOPT_DETECT_INTREE_EC],
-[
-AC_MSG_CHECKING([if elliptic curve crypto implementation is present])
+  ###############################################################################
+  #
+  # Enable or disable the elliptic curve crypto implementation
+  #
+  AC_DEFUN_ONCE([JDKOPT_DETECT_INTREE_EC],
+  [
+    AC_MSG_CHECKING([if elliptic curve crypto implementation is present])
 
-if test -d "${SRC_ROOT}/jdk/src/share/native/sun/security/ec/impl"; then
-    ENABLE_INTREE_EC=yes
-    AC_MSG_RESULT([yes])
-else
-    ENABLE_INTREE_EC=no
-    AC_MSG_RESULT([no])
-fi
+    if test -d "${SRC_ROOT}/jdk/src/share/native/sun/security/ec/impl"; then
+      ENABLE_INTREE_EC=yes
+      AC_MSG_RESULT([yes])
+    else
+      ENABLE_INTREE_EC=no
+      AC_MSG_RESULT([no])
+    fi
 
-AC_SUBST(ENABLE_INTREE_EC)
-])
+    AC_SUBST(ENABLE_INTREE_EC)
+  ])
 
-###############################################################################
-#
-# Compress jars
-#
-COMPRESS_JARS=false
+  ###############################################################################
+  #
+  # Compress jars
+  #
+  COMPRESS_JARS=false
 
-AC_SUBST(COMPRESS_JARS)
+  AC_SUBST(COMPRESS_JARS)
 ])
 
 ###############################################################################
@@ -403,153 +402,152 @@
 #
 AC_DEFUN_ONCE([JDKOPT_SETUP_JDK_VERSION_NUMBERS],
 [
-# Source the version numbers
-. $AUTOCONF_DIR/version-numbers
+  # Source the version numbers
+  . $AUTOCONF_DIR/version-numbers
 
-# Get the settings from parameters
-AC_ARG_WITH(milestone, [AS_HELP_STRING([--with-milestone], 
-                       [Set milestone value for build @<:@internal@:>@])])
-if test "x$with_milestone" = xyes; then
-  AC_MSG_ERROR([Milestone must have a value])
-elif test "x$with_milestone" != x; then
+  # Get the settings from parameters
+  AC_ARG_WITH(milestone, [AS_HELP_STRING([--with-milestone],
+      [Set milestone value for build @<:@internal@:>@])])
+  if test "x$with_milestone" = xyes; then
+    AC_MSG_ERROR([Milestone must have a value])
+  elif test "x$with_milestone" != x; then
     MILESTONE="$with_milestone"
-fi
-if test "x$MILESTONE" = x; then
-  MILESTONE=internal
-fi
-
-AC_ARG_WITH(update-version, [AS_HELP_STRING([--with-update-version], 
-                          [Set update version value for build @<:@b00@:>@])])
-if test "x$with_update_version" = xyes; then
-  AC_MSG_ERROR([Update version must have a value])
-elif test "x$with_update_version" != x; then
-  JDK_UPDATE_VERSION="$with_update_version"
-fi
-
-AC_ARG_WITH(user-release-suffix, [AS_HELP_STRING([--with-user-release-suffix], 
-        [Add a custom string to the version string if build number isn't set.@<:@username_builddateb00@:>@])])
-if test "x$with_user_release_suffix" = xyes; then
-  AC_MSG_ERROR([Release suffix must have a value])
-elif test "x$with_user_release_suffix" != x; then
-  USER_RELEASE_SUFFIX="$with_user_release_suffix"
-fi
-
-AC_ARG_WITH(build-number, [AS_HELP_STRING([--with-build-number], 
-                          [Set build number value for build @<:@b00@:>@])])
-if test "x$with_build_number" = xyes; then
-  AC_MSG_ERROR([Build number must have a value])
-elif test "x$with_build_number" != x; then
-  JDK_BUILD_NUMBER="$with_build_number"
-fi
-# Define default USER_RELEASE_SUFFIX if BUILD_NUMBER and USER_RELEASE_SUFFIX are not set
-if test "x$JDK_BUILD_NUMBER" = x; then
-  JDK_BUILD_NUMBER=b00
-  if test "x$USER_RELEASE_SUFFIX" = x; then
-    BUILD_DATE=`date '+%Y_%m_%d_%H_%M'`
-    # Avoid [:alnum:] since it depends on the locale.
-    CLEAN_USERNAME=`echo "$USER" | $TR -d -c 'abcdefghijklmnopqrstuvqxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789'`
-    USER_RELEASE_SUFFIX=`echo "${CLEAN_USERNAME}_${BUILD_DATE}" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
   fi
-fi
+  if test "x$MILESTONE" = x; then
+    MILESTONE=internal
+  fi
 
-# Now set the JDK version, milestone, build number etc.
-AC_SUBST(USER_RELEASE_SUFFIX)
-AC_SUBST(JDK_MAJOR_VERSION)
-AC_SUBST(JDK_MINOR_VERSION)
-AC_SUBST(JDK_MICRO_VERSION)
-AC_SUBST(JDK_UPDATE_VERSION)
-AC_SUBST(JDK_BUILD_NUMBER)
-AC_SUBST(MILESTONE)
-AC_SUBST(LAUNCHER_NAME)
-AC_SUBST(PRODUCT_NAME)
-AC_SUBST(PRODUCT_SUFFIX)
-AC_SUBST(JDK_RC_PLATFORM_NAME)
-AC_SUBST(COMPANY_NAME)
-AC_SUBST(MACOSX_BUNDLE_NAME_BASE)
-AC_SUBST(MACOSX_BUNDLE_ID_BASE)
+  AC_ARG_WITH(update-version, [AS_HELP_STRING([--with-update-version],
+      [Set update version value for build @<:@b00@:>@])])
+  if test "x$with_update_version" = xyes; then
+    AC_MSG_ERROR([Update version must have a value])
+  elif test "x$with_update_version" != x; then
+    JDK_UPDATE_VERSION="$with_update_version"
+  fi
 
-COPYRIGHT_YEAR=`date +'%Y'`
-AC_SUBST(COPYRIGHT_YEAR)
+  AC_ARG_WITH(user-release-suffix, [AS_HELP_STRING([--with-user-release-suffix],
+      [Add a custom string to the version string if build number isn't set.@<:@username_builddateb00@:>@])])
+  if test "x$with_user_release_suffix" = xyes; then
+    AC_MSG_ERROR([Release suffix must have a value])
+  elif test "x$with_user_release_suffix" != x; then
+    USER_RELEASE_SUFFIX="$with_user_release_suffix"
+  fi
 
-if test "x$JDK_UPDATE_VERSION" != x; then
-  JDK_VERSION="${JDK_MAJOR_VERSION}.${JDK_MINOR_VERSION}.${JDK_MICRO_VERSION}_${JDK_UPDATE_VERSION}"
-else
-  JDK_VERSION="${JDK_MAJOR_VERSION}.${JDK_MINOR_VERSION}.${JDK_MICRO_VERSION}"
-fi
-AC_SUBST(JDK_VERSION)
+  AC_ARG_WITH(build-number, [AS_HELP_STRING([--with-build-number],
+      [Set build number value for build @<:@b00@:>@])])
+  if test "x$with_build_number" = xyes; then
+    AC_MSG_ERROR([Build number must have a value])
+  elif test "x$with_build_number" != x; then
+    JDK_BUILD_NUMBER="$with_build_number"
+  fi
+  # Define default USER_RELEASE_SUFFIX if BUILD_NUMBER and USER_RELEASE_SUFFIX are not set
+  if test "x$JDK_BUILD_NUMBER" = x; then
+    JDK_BUILD_NUMBER=b00
+    if test "x$USER_RELEASE_SUFFIX" = x; then
+      BUILD_DATE=`date '+%Y_%m_%d_%H_%M'`
+      # Avoid [:alnum:] since it depends on the locale.
+      CLEAN_USERNAME=`echo "$USER" | $TR -d -c 'abcdefghijklmnopqrstuvqxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789'`
+      USER_RELEASE_SUFFIX=`echo "${CLEAN_USERNAME}_${BUILD_DATE}" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
+    fi
+  fi
 
-COOKED_BUILD_NUMBER=`$ECHO $JDK_BUILD_NUMBER | $SED -e 's/^b//' -e 's/^0//'`
-AC_SUBST(COOKED_BUILD_NUMBER)
+  # Now set the JDK version, milestone, build number etc.
+  AC_SUBST(USER_RELEASE_SUFFIX)
+  AC_SUBST(JDK_MAJOR_VERSION)
+  AC_SUBST(JDK_MINOR_VERSION)
+  AC_SUBST(JDK_MICRO_VERSION)
+  AC_SUBST(JDK_UPDATE_VERSION)
+  AC_SUBST(JDK_BUILD_NUMBER)
+  AC_SUBST(MILESTONE)
+  AC_SUBST(LAUNCHER_NAME)
+  AC_SUBST(PRODUCT_NAME)
+  AC_SUBST(PRODUCT_SUFFIX)
+  AC_SUBST(JDK_RC_PLATFORM_NAME)
+  AC_SUBST(COMPANY_NAME)
+  AC_SUBST(MACOSX_BUNDLE_NAME_BASE)
+  AC_SUBST(MACOSX_BUNDLE_ID_BASE)
+
+  COPYRIGHT_YEAR=`date +'%Y'`
+  AC_SUBST(COPYRIGHT_YEAR)
+
+  if test "x$JDK_UPDATE_VERSION" != x; then
+    JDK_VERSION="${JDK_MAJOR_VERSION}.${JDK_MINOR_VERSION}.${JDK_MICRO_VERSION}_${JDK_UPDATE_VERSION}"
+  else
+    JDK_VERSION="${JDK_MAJOR_VERSION}.${JDK_MINOR_VERSION}.${JDK_MICRO_VERSION}"
+  fi
+  AC_SUBST(JDK_VERSION)
+
+  COOKED_BUILD_NUMBER=`$ECHO $JDK_BUILD_NUMBER | $SED -e 's/^b//' -e 's/^0//'`
+  AC_SUBST(COOKED_BUILD_NUMBER)
 ])
 
 AC_DEFUN_ONCE([JDKOPT_SETUP_BUILD_TWEAKS],
 [
-HOTSPOT_MAKE_ARGS="$HOTSPOT_TARGET"
-AC_SUBST(HOTSPOT_MAKE_ARGS)
+  HOTSPOT_MAKE_ARGS="$HOTSPOT_TARGET"
+  AC_SUBST(HOTSPOT_MAKE_ARGS)
 
-# The name of the Service Agent jar.
-SALIB_NAME="${LIBRARY_PREFIX}saproc${SHARED_LIBRARY_SUFFIX}"
-if test "x$OPENJDK_TARGET_OS" = "xwindows"; then
-  SALIB_NAME="${LIBRARY_PREFIX}sawindbg${SHARED_LIBRARY_SUFFIX}"
-fi
-AC_SUBST(SALIB_NAME)
-
+  # The name of the Service Agent jar.
+  SALIB_NAME="${LIBRARY_PREFIX}saproc${SHARED_LIBRARY_SUFFIX}"
+  if test "x$OPENJDK_TARGET_OS" = "xwindows"; then
+    SALIB_NAME="${LIBRARY_PREFIX}sawindbg${SHARED_LIBRARY_SUFFIX}"
+  fi
+  AC_SUBST(SALIB_NAME)
 ])
 
 AC_DEFUN_ONCE([JDKOPT_SETUP_DEBUG_SYMBOLS],
 [
-#
-# ENABLE_DEBUG_SYMBOLS
-# This must be done after the toolchain is setup, since we're looking at objcopy.
-#
-AC_ARG_ENABLE([debug-symbols],
-              [AS_HELP_STRING([--disable-debug-symbols],[disable generation of debug symbols @<:@enabled@:>@])])
+  #
+  # ENABLE_DEBUG_SYMBOLS
+  # This must be done after the toolchain is setup, since we're looking at objcopy.
+  #
+  AC_ARG_ENABLE([debug-symbols],
+      [AS_HELP_STRING([--disable-debug-symbols],[disable generation of debug symbols @<:@enabled@:>@])])
 
-AC_MSG_CHECKING([if we should generate debug symbols])
+  AC_MSG_CHECKING([if we should generate debug symbols])
 
-if test "x$enable_debug_symbols" = "xyes" && test "x$OBJCOPY" = x; then
-   # explicit enabling of enable-debug-symbols and can't find objcopy
-   #   this is an error
-   AC_MSG_ERROR([Unable to find objcopy, cannot enable debug-symbols])
-fi
-
-if test "x$enable_debug_symbols" = "xyes"; then
-  ENABLE_DEBUG_SYMBOLS=true
-elif test "x$enable_debug_symbols" = "xno"; then
-  ENABLE_DEBUG_SYMBOLS=false
-else
-  # default on macosx is false
-  if test "x$OPENJDK_TARGET_OS" = xmacosx; then
-    ENABLE_DEBUG_SYMBOLS=false
-  # Default is on if objcopy is found, otherwise off
-  elif test "x$OBJCOPY" != x || test "x$OPENJDK_TARGET_OS" = xwindows; then
-    ENABLE_DEBUG_SYMBOLS=true
-  else
-    ENABLE_DEBUG_SYMBOLS=false
+  if test "x$enable_debug_symbols" = "xyes" && test "x$OBJCOPY" = x; then
+    # explicit enabling of enable-debug-symbols and can't find objcopy
+    #   this is an error
+    AC_MSG_ERROR([Unable to find objcopy, cannot enable debug-symbols])
   fi
-fi
 
-AC_MSG_RESULT([$ENABLE_DEBUG_SYMBOLS])
+  if test "x$enable_debug_symbols" = "xyes"; then
+    ENABLE_DEBUG_SYMBOLS=true
+  elif test "x$enable_debug_symbols" = "xno"; then
+    ENABLE_DEBUG_SYMBOLS=false
+  else
+    # default on macosx is false
+    if test "x$OPENJDK_TARGET_OS" = xmacosx; then
+      ENABLE_DEBUG_SYMBOLS=false
+      # Default is on if objcopy is found, otherwise off
+    elif test "x$OBJCOPY" != x || test "x$OPENJDK_TARGET_OS" = xwindows; then
+      ENABLE_DEBUG_SYMBOLS=true
+    else
+      ENABLE_DEBUG_SYMBOLS=false
+    fi
+  fi
 
-#
-# ZIP_DEBUGINFO_FILES
-#
-AC_MSG_CHECKING([if we should zip debug-info files])
-AC_ARG_ENABLE([zip-debug-info],
-              [AS_HELP_STRING([--disable-zip-debug-info],[disable zipping of debug-info files @<:@enabled@:>@])],
-	      [enable_zip_debug_info="${enableval}"], [enable_zip_debug_info="yes"])
-AC_MSG_RESULT([${enable_zip_debug_info}])
+  AC_MSG_RESULT([$ENABLE_DEBUG_SYMBOLS])
 
-if test "x${enable_zip_debug_info}" = "xno"; then
-   ZIP_DEBUGINFO_FILES=false
-else
-   ZIP_DEBUGINFO_FILES=true
-fi
+  #
+  # ZIP_DEBUGINFO_FILES
+  #
+  AC_MSG_CHECKING([if we should zip debug-info files])
+  AC_ARG_ENABLE([zip-debug-info],
+      [AS_HELP_STRING([--disable-zip-debug-info],[disable zipping of debug-info files @<:@enabled@:>@])],
+      [enable_zip_debug_info="${enableval}"], [enable_zip_debug_info="yes"])
+  AC_MSG_RESULT([${enable_zip_debug_info}])
 
-AC_SUBST(ENABLE_DEBUG_SYMBOLS)
-AC_SUBST(ZIP_DEBUGINFO_FILES)
-AC_SUBST(CFLAGS_DEBUG_SYMBOLS)
-AC_SUBST(CXXFLAGS_DEBUG_SYMBOLS)
+  if test "x${enable_zip_debug_info}" = "xno"; then
+    ZIP_DEBUGINFO_FILES=false
+  else
+    ZIP_DEBUGINFO_FILES=true
+  fi
+
+  AC_SUBST(ENABLE_DEBUG_SYMBOLS)
+  AC_SUBST(ZIP_DEBUGINFO_FILES)
+  AC_SUBST(CFLAGS_DEBUG_SYMBOLS)
+  AC_SUBST(CXXFLAGS_DEBUG_SYMBOLS)
 ])
 
 # Support for customization of the build process. Some build files
@@ -557,5 +555,5 @@
 # for a degree of customization of the build targets and the rules/recipes
 # to create them
 AC_ARG_WITH([custom-make-dir], [AS_HELP_STRING([--with-custom-make-dir],
-    [use this directory for custom build/make files])], [CUSTOM_MAKE_DIR=$with_custom_make_dir])
+[use this directory for custom build/make files])], [CUSTOM_MAKE_DIR=$with_custom_make_dir])
 AC_SUBST(CUSTOM_MAKE_DIR)
diff --git a/common/autoconf/libraries.m4 b/common/autoconf/libraries.m4
index 1d53f04..941d842 100644
--- a/common/autoconf/libraries.m4
+++ b/common/autoconf/libraries.m4
@@ -25,638 +25,645 @@
 
 AC_DEFUN_ONCE([LIB_SETUP_INIT],
 [
-        
-###############################################################################
-#
-# OS specific settings that we never will need to probe.
-#
-if test "x$OPENJDK_TARGET_OS" = xlinux; then
+
+  ###############################################################################
+  #
+  # OS specific settings that we never will need to probe.
+  #
+  if test "x$OPENJDK_TARGET_OS" = xlinux; then
     AC_MSG_CHECKING([what is not needed on Linux?])
     PULSE_NOT_NEEDED=yes
     AC_MSG_RESULT([pulse])
-fi
+  fi
 
-if test "x$OPENJDK_TARGET_OS" = xsolaris; then
+  if test "x$OPENJDK_TARGET_OS" = xsolaris; then
     AC_MSG_CHECKING([what is not needed on Solaris?])
     ALSA_NOT_NEEDED=yes
     PULSE_NOT_NEEDED=yes
     AC_MSG_RESULT([alsa pulse])
-fi
+  fi
 
-if test "x$OPENJDK_TARGET_OS" = xwindows; then
+  if test "x$OPENJDK_TARGET_OS" = xwindows; then
     AC_MSG_CHECKING([what is not needed on Windows?])
-    CUPS_NOT_NEEDED=yes    
+    CUPS_NOT_NEEDED=yes
     ALSA_NOT_NEEDED=yes
     PULSE_NOT_NEEDED=yes
     X11_NOT_NEEDED=yes
     AC_MSG_RESULT([alsa cups pulse x11])
-fi
+  fi
 
-if test "x$OPENJDK_TARGET_OS" = xmacosx; then
+  if test "x$OPENJDK_TARGET_OS" = xmacosx; then
     AC_MSG_CHECKING([what is not needed on MacOSX?])
     ALSA_NOT_NEEDED=yes
     PULSE_NOT_NEEDED=yes
     X11_NOT_NEEDED=yes
-    FREETYPE2_NOT_NEEDED=yes    
+    FREETYPE2_NOT_NEEDED=yes
     # If the java runtime framework is disabled, then we need X11.
     # This will be adjusted below.
     AC_MSG_RESULT([alsa pulse x11])
-fi
+  fi
 
-if test "x$OPENJDK_TARGET_OS" = xbsd; then
+  if test "x$OPENJDK_TARGET_OS" = xbsd; then
     AC_MSG_CHECKING([what is not needed on bsd?])
     ALSA_NOT_NEEDED=yes
-    AC_MSG_RESULT([alsa])    
-fi
+    AC_MSG_RESULT([alsa])
+  fi
 
-if test "x$OPENJDK" = "xfalse"; then
+  if test "x$OPENJDK" = "xfalse"; then
     FREETYPE2_NOT_NEEDED=yes
-fi
+  fi
 
-if test "x$SUPPORT_HEADFUL" = xno; then
+  if test "x$SUPPORT_HEADFUL" = xno; then
     X11_NOT_NEEDED=yes
-fi
+  fi
 
-###############################################################################
-#
-# Check for MacOSX support for OpenJDK. If this exists, try to build a JVM
-# that uses this API. 
-#
-AC_ARG_ENABLE([macosx-runtime-support], [AS_HELP_STRING([--disable-macosx-runtime-support],
-	[disable the use of MacOSX Java runtime support framework @<:@enabled@:>@])],
-	[MACOSX_RUNTIME_SUPPORT="${enableval}"],[MACOSX_RUNTIME_SUPPORT="no"])
+  ###############################################################################
+  #
+  # Check for MacOSX support for OpenJDK. If this exists, try to build a JVM
+  # that uses this API.
+  #
+  AC_ARG_ENABLE([macosx-runtime-support], [AS_HELP_STRING([--disable-macosx-runtime-support],
+      [disable the use of MacOSX Java runtime support framework @<:@enabled@:>@])],
+      [MACOSX_RUNTIME_SUPPORT="${enableval}"],[MACOSX_RUNTIME_SUPPORT="no"])
 
-USE_MACOSX_RUNTIME_SUPPORT=no
-AC_MSG_CHECKING([for explicit Java runtime support in the OS])
-if test -f /System/Library/Frameworks/JavaVM.framework/Frameworks/JavaRuntimeSupport.framework/Headers/JavaRuntimeSupport.h; then
+  USE_MACOSX_RUNTIME_SUPPORT=no
+  AC_MSG_CHECKING([for explicit Java runtime support in the OS])
+  if test -f /System/Library/Frameworks/JavaVM.framework/Frameworks/JavaRuntimeSupport.framework/Headers/JavaRuntimeSupport.h; then
     if test "x$MACOSX_RUNTIME_SUPPORT" != xno; then
-        MACOSX_RUNTIME_SUPPORT=yes
-        USE_MACOSX_RUNTIME_SUPPORT=yes
-        AC_MSG_RESULT([yes, does not need alsa freetype2 pulse and X11])
+      MACOSX_RUNTIME_SUPPORT=yes
+      USE_MACOSX_RUNTIME_SUPPORT=yes
+      AC_MSG_RESULT([yes, does not need alsa freetype2 pulse and X11])
     else
-        AC_MSG_RESULT([yes, but explicitly disabled.])
+      AC_MSG_RESULT([yes, but explicitly disabled.])
     fi
-else
+  else
     AC_MSG_RESULT([no])
-fi
+  fi
 
-if test "x$OPENJDK_TARGET_OS" = xmacosx && test "x$USE_MACOSX_RUNTIME_SUPPORT" = xno; then
+  if test "x$OPENJDK_TARGET_OS" = xmacosx && test "x$USE_MACOSX_RUNTIME_SUPPORT" = xno; then
     AC_MSG_CHECKING([what is not needed on an X11 build on MacOSX?])
     X11_NOT_NEEDED=
     FREETYPE2_NOT_NEEDED=
     AC_MSG_RESULT([alsa pulse])
-fi
+  fi
 ])
 
 AC_DEFUN_ONCE([LIB_SETUP_X11],
 [
 
-###############################################################################
-#
-# Check for X Windows
-#
+  ###############################################################################
+  #
+  # Check for X Windows
+  #
 
-# Check if the user has specified sysroot, but not --x-includes or --x-libraries.
-# Make a simple check for the libraries at the sysroot, and setup --x-includes and
-# --x-libraries for the sysroot, if that seems to be correct.
-if test "x$SYS_ROOT" != "x/"; then
-  if test "x$x_includes" = xNONE; then
-    if test -f "$SYS_ROOT/usr/X11R6/include/X11/Xlib.h"; then
-      x_includes="$SYS_ROOT/usr/X11R6/include"
-    elif test -f "$SYS_ROOT/usr/include/X11/Xlib.h"; then
-      x_includes="$SYS_ROOT/usr/include"
+  # Check if the user has specified sysroot, but not --x-includes or --x-libraries.
+  # Make a simple check for the libraries at the sysroot, and setup --x-includes and
+  # --x-libraries for the sysroot, if that seems to be correct.
+  if test "x$SYS_ROOT" != "x/"; then
+    if test "x$x_includes" = xNONE; then
+      if test -f "$SYS_ROOT/usr/X11R6/include/X11/Xlib.h"; then
+        x_includes="$SYS_ROOT/usr/X11R6/include"
+      elif test -f "$SYS_ROOT/usr/include/X11/Xlib.h"; then
+        x_includes="$SYS_ROOT/usr/include"
+      fi
+    fi
+    if test "x$x_libraries" = xNONE; then
+      if test -f "$SYS_ROOT/usr/X11R6/lib/libX11.so"; then
+        x_libraries="$SYS_ROOT/usr/X11R6/lib"
+      elif test "$SYS_ROOT/usr/lib64/libX11.so" && test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
+        x_libraries="$SYS_ROOT/usr/lib64"
+      elif test -f "$SYS_ROOT/usr/lib/libX11.so"; then
+        x_libraries="$SYS_ROOT/usr/lib"
+      fi
     fi
   fi
-  if test "x$x_libraries" = xNONE; then
-    if test -f "$SYS_ROOT/usr/X11R6/lib/libX11.so"; then
-      x_libraries="$SYS_ROOT/usr/X11R6/lib"
-    elif test "$SYS_ROOT/usr/lib64/libX11.so" && test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
-      x_libraries="$SYS_ROOT/usr/lib64"
-    elif test -f "$SYS_ROOT/usr/lib/libX11.so"; then
-      x_libraries="$SYS_ROOT/usr/lib"
-    fi
+
+  # Now let autoconf do it's magic
+  AC_PATH_X
+  AC_PATH_XTRA
+
+  # AC_PATH_XTRA creates X_LIBS and sometimes adds -R flags. When cross compiling
+  # this doesn't make sense so we remove it.
+  if test "x$COMPILE_TYPE" = xcross; then
+    X_LIBS=`$ECHO $X_LIBS | $SED 's/-R \{0,1\}[[^ ]]*//g'`
   fi
-fi
 
-# Now let autoconf do it's magic
-AC_PATH_X
-AC_PATH_XTRA
-
-# AC_PATH_XTRA creates X_LIBS and sometimes adds -R flags. When cross compiling
-# this doesn't make sense so we remove it.
-if test "x$COMPILE_TYPE" = xcross; then
-  X_LIBS=`$ECHO $X_LIBS | $SED 's/-R \{0,1\}[[^ ]]*//g'`
-fi
-
-if test "x$no_x" = xyes && test "x$X11_NOT_NEEDED" != xyes; then 
+  if test "x$no_x" = xyes && test "x$X11_NOT_NEEDED" != xyes; then
     HELP_MSG_MISSING_DEPENDENCY([x11])
     AC_MSG_ERROR([Could not find X11 libraries. $HELP_MSG])
-fi
-
-# Some of the old makefiles require a setting of OPENWIN_HOME
-# Since the X11R6 directory has disappeared on later Linuxes,
-# we need to probe for it.
-if test "x$OPENJDK_TARGET_OS" = xlinux; then
-    if test -d "$SYS_ROOT/usr/X11R6"; then
-        OPENWIN_HOME="$SYS_ROOT/usr/X11R6"
-    elif test -d "$SYS_ROOT/usr/include/X11"; then
-        OPENWIN_HOME="$SYS_ROOT/usr"
-    fi
-fi
-if test "x$OPENJDK_TARGET_OS" = xsolaris; then
-    OPENWIN_HOME="/usr/openwin"
-fi
-AC_SUBST(OPENWIN_HOME)
-
-
-#
-# Weird Sol10 something check...TODO change to try compile
-#
-if test "x${OPENJDK_TARGET_OS}" = xsolaris; then
-  if test "`uname -r`" = "5.10"; then
-     if test "`${EGREP} -c XLinearGradient ${OPENWIN_HOME}/share/include/X11/extensions/Xrender.h`" = "0"; then
-     	X_CFLAGS="${X_CFLAGS} -DSOLARIS10_NO_XRENDER_STRUCTS"
-     fi
   fi
-fi
 
-AC_LANG_PUSH(C)
-OLD_CFLAGS="$CFLAGS"
-CFLAGS="$CFLAGS $X_CFLAGS"
+  # Some of the old makefiles require a setting of OPENWIN_HOME
+  # Since the X11R6 directory has disappeared on later Linuxes,
+  # we need to probe for it.
+  if test "x$OPENJDK_TARGET_OS" = xlinux; then
+    if test -d "$SYS_ROOT/usr/X11R6"; then
+      OPENWIN_HOME="$SYS_ROOT/usr/X11R6"
+    elif test -d "$SYS_ROOT/usr/include/X11"; then
+      OPENWIN_HOME="$SYS_ROOT/usr"
+    fi
+  fi
+  if test "x$OPENJDK_TARGET_OS" = xsolaris; then
+    OPENWIN_HOME="/usr/openwin"
+  fi
+  AC_SUBST(OPENWIN_HOME)
 
-# Need to include Xlib.h and Xutil.h to avoid "present but cannot be compiled" warnings on Solaris 10
-AC_CHECK_HEADERS([X11/extensions/shape.h X11/extensions/Xrender.h X11/extensions/XTest.h X11/Intrinsic.h],
-                 [X11_A_OK=yes],
-                 [X11_A_OK=no; break],
-                 [ # include <X11/Xlib.h>
-                   # include <X11/Xutil.h>
-                 ])
 
-CFLAGS="$OLD_CFLAGS"
-AC_LANG_POP(C)
+  #
+  # Weird Sol10 something check...TODO change to try compile
+  #
+  if test "x${OPENJDK_TARGET_OS}" = xsolaris; then
+    if test "`uname -r`" = "5.10"; then
+      if test "`${EGREP} -c XLinearGradient ${OPENWIN_HOME}/share/include/X11/extensions/Xrender.h`" = "0"; then
+        X_CFLAGS="${X_CFLAGS} -DSOLARIS10_NO_XRENDER_STRUCTS"
+      fi
+    fi
+  fi
 
-if test "x$X11_A_OK" = xno && test "x$X11_NOT_NEEDED" != xyes; then 
+  AC_LANG_PUSH(C)
+  OLD_CFLAGS="$CFLAGS"
+  CFLAGS="$CFLAGS $X_CFLAGS"
+
+  # Need to include Xlib.h and Xutil.h to avoid "present but cannot be compiled" warnings on Solaris 10
+  AC_CHECK_HEADERS([X11/extensions/shape.h X11/extensions/Xrender.h X11/extensions/XTest.h X11/Intrinsic.h],
+      [X11_A_OK=yes],
+      [X11_A_OK=no; break],
+      [
+        # include <X11/Xlib.h>
+        # include <X11/Xutil.h>
+      ]
+  )
+
+  CFLAGS="$OLD_CFLAGS"
+  AC_LANG_POP(C)
+
+  if test "x$X11_A_OK" = xno && test "x$X11_NOT_NEEDED" != xyes; then
     HELP_MSG_MISSING_DEPENDENCY([x11])
     AC_MSG_ERROR([Could not find all X11 headers (shape.h Xrender.h XTest.h Intrinsic.h). $HELP_MSG])
-fi
+  fi
 
-AC_SUBST(X_CFLAGS)
-AC_SUBST(X_LIBS)
+  AC_SUBST(X_CFLAGS)
+  AC_SUBST(X_LIBS)
 ])
 
 AC_DEFUN_ONCE([LIB_SETUP_CUPS],
 [
 
-###############################################################################
-#
-# The common unix printing system cups is used to print from java.
-#
-AC_ARG_WITH(cups, [AS_HELP_STRING([--with-cups],
-    [specify prefix directory for the cups package
-	 (expecting the headers under PATH/include)])])
-AC_ARG_WITH(cups-include, [AS_HELP_STRING([--with-cups-include],
-	[specify directory for the cups include files])])
+  ###############################################################################
+  #
+  # The common unix printing system cups is used to print from java.
+  #
+  AC_ARG_WITH(cups, [AS_HELP_STRING([--with-cups],
+      [specify prefix directory for the cups package
+      (expecting the headers under PATH/include)])])
+  AC_ARG_WITH(cups-include, [AS_HELP_STRING([--with-cups-include],
+      [specify directory for the cups include files])])
 
-if test "x$CUPS_NOT_NEEDED" = xyes; then
-	if test "x${with_cups}" != x || test "x${with_cups_include}" != x; then
-		AC_MSG_WARN([cups not used, so --with-cups is ignored])
-	fi
-	CUPS_CFLAGS=
-else
-	CUPS_FOUND=no
+  if test "x$CUPS_NOT_NEEDED" = xyes; then
+    if test "x${with_cups}" != x || test "x${with_cups_include}" != x; then
+      AC_MSG_WARN([cups not used, so --with-cups is ignored])
+    fi
+    CUPS_CFLAGS=
+  else
+    CUPS_FOUND=no
 
-	if test "x${with_cups}" = xno || test "x${with_cups_include}" = xno; then
-	    AC_MSG_ERROR([It is not possible to disable the use of cups. Remove the --without-cups option.])
-	fi
+    if test "x${with_cups}" = xno || test "x${with_cups_include}" = xno; then
+      AC_MSG_ERROR([It is not possible to disable the use of cups. Remove the --without-cups option.])
+    fi
 
-	if test "x${with_cups}" != x; then
-	    CUPS_CFLAGS="-I${with_cups}/include"
-	    CUPS_FOUND=yes
-	fi
-	if test "x${with_cups_include}" != x; then
-	    CUPS_CFLAGS="-I${with_cups_include}"
-	    CUPS_FOUND=yes
-	fi
-	if test "x$CUPS_FOUND" = xno; then
-	    BDEPS_CHECK_MODULE(CUPS, cups, xxx, [CUPS_FOUND=yes])
-	fi
-	if test "x$CUPS_FOUND" = xno; then
-	    # Are the cups headers installed in the default /usr/include location?
-	    AC_CHECK_HEADERS([cups/cups.h cups/ppd.h],
-	                     [CUPS_FOUND=yes
-	                      CUPS_CFLAGS=
-	                      DEFAULT_CUPS=yes])
-	fi
-	if test "x$CUPS_FOUND" = xno; then
-	    # Getting nervous now? Lets poke around for standard Solaris third-party
-	    # package installation locations.
-	    AC_MSG_CHECKING([for cups headers])
-	    if test -s /opt/sfw/cups/include/cups/cups.h; then
-	       # An SFW package seems to be installed!
-	       CUPS_FOUND=yes
-	       CUPS_CFLAGS="-I/opt/sfw/cups/include"
-	    elif test -s /opt/csw/include/cups/cups.h; then
-	       # A CSW package seems to be installed!
-	       CUPS_FOUND=yes
-	       CUPS_CFLAGS="-I/opt/csw/include"
-	    fi
-	    AC_MSG_RESULT([$CUPS_FOUND])
-	fi
-	if test "x$CUPS_FOUND" = xno; then 
-	    HELP_MSG_MISSING_DEPENDENCY([cups])
-	    AC_MSG_ERROR([Could not find cups! $HELP_MSG ])
-	fi
-fi
+    if test "x${with_cups}" != x; then
+      CUPS_CFLAGS="-I${with_cups}/include"
+      CUPS_FOUND=yes
+    fi
+    if test "x${with_cups_include}" != x; then
+      CUPS_CFLAGS="-I${with_cups_include}"
+      CUPS_FOUND=yes
+    fi
+    if test "x$CUPS_FOUND" = xno; then
+      BDEPS_CHECK_MODULE(CUPS, cups, xxx, [CUPS_FOUND=yes])
+    fi
+    if test "x$CUPS_FOUND" = xno; then
+      # Are the cups headers installed in the default /usr/include location?
+      AC_CHECK_HEADERS([cups/cups.h cups/ppd.h],
+          [
+            CUPS_FOUND=yes
+            CUPS_CFLAGS=
+            DEFAULT_CUPS=yes
+          ]
+      )
+    fi
+    if test "x$CUPS_FOUND" = xno; then
+      # Getting nervous now? Lets poke around for standard Solaris third-party
+      # package installation locations.
+      AC_MSG_CHECKING([for cups headers])
+      if test -s /opt/sfw/cups/include/cups/cups.h; then
+        # An SFW package seems to be installed!
+        CUPS_FOUND=yes
+        CUPS_CFLAGS="-I/opt/sfw/cups/include"
+      elif test -s /opt/csw/include/cups/cups.h; then
+        # A CSW package seems to be installed!
+        CUPS_FOUND=yes
+        CUPS_CFLAGS="-I/opt/csw/include"
+      fi
+      AC_MSG_RESULT([$CUPS_FOUND])
+    fi
+    if test "x$CUPS_FOUND" = xno; then
+      HELP_MSG_MISSING_DEPENDENCY([cups])
+      AC_MSG_ERROR([Could not find cups! $HELP_MSG ])
+    fi
+  fi
 
-AC_SUBST(CUPS_CFLAGS)
+  AC_SUBST(CUPS_CFLAGS)
 
 ])
 
 AC_DEFUN_ONCE([LIB_SETUP_FREETYPE],
 [
 
-###############################################################################
-#
-# The ubiquitous freetype2 library is used to render fonts.
-#
-AC_ARG_WITH(freetype, [AS_HELP_STRING([--with-freetype],
-	[specify prefix directory for the freetype2 package
-     (expecting the libraries under PATH/lib and the headers under PATH/include)])])
+  ###############################################################################
+  #
+  # The ubiquitous freetype2 library is used to render fonts.
+  #
+  AC_ARG_WITH(freetype, [AS_HELP_STRING([--with-freetype],
+      [specify prefix directory for the freetype2 package
+      (expecting the libraries under PATH/lib and the headers under PATH/include)])])
 
-# If we are using the OS installed system lib for freetype, then we do not need to copy it to the build tree
-USING_SYSTEM_FT_LIB=false
+  # If we are using the OS installed system lib for freetype, then we do not need to copy it to the build tree
+  USING_SYSTEM_FT_LIB=false
 
-if test "x$FREETYPE2_NOT_NEEDED" = xyes; then
-	if test "x$with_freetype" != x || test "x$with_freetype_include" != x || test "x$with_freetype_lib" != x; then
-		AC_MSG_WARN([freetype not used, so --with-freetype is ignored])
-	fi
-	FREETYPE2_CFLAGS=
-	FREETYPE2_LIBS=
-        FREETYPE2_LIB_PATH=
-else
-	FREETYPE2_FOUND=no
+  if test "x$FREETYPE2_NOT_NEEDED" = xyes; then
+    if test "x$with_freetype" != x || test "x$with_freetype_include" != x || test "x$with_freetype_lib" != x; then
+      AC_MSG_WARN([freetype not used, so --with-freetype is ignored])
+    fi
+    FREETYPE2_CFLAGS=
+    FREETYPE2_LIBS=
+    FREETYPE2_LIB_PATH=
+  else
+    FREETYPE2_FOUND=no
 
-	if test "x$with_freetype" != x; then
-            BASIC_FIXUP_PATH(with_freetype)
-	    FREETYPE2_LIBS="-L$with_freetype/lib -lfreetype"
-            FREETYPE2_LIB_PATH="$with_freetype/lib"
-            if test "x$OPENJDK_TARGET_OS" = xsolaris && test "x$OPENJDK_TARGET_CPU" = xx86_64 && test -d "$with_freetype/lib/amd64"; then
-                FREETYPE2_LIBS="-L$with_freetype/lib/amd64 -lfreetype"
-                FREETYPE2_LIB_PATH="$with_freetype/lib/amd64"
-            fi
-            if test "x$OPENJDK_TARGET_OS" = xwindows; then
-                FREETYPE2_LIBS="$with_freetype/lib/freetype.lib"
-            fi
-	    FREETYPE2_CFLAGS="-I$with_freetype/include"
-            if test -s $with_freetype/include/ft2build.h && test -d $with_freetype/include/freetype2/freetype; then
-                FREETYPE2_CFLAGS="-I$with_freetype/include/freetype2 -I$with_freetype/include"
-            fi
- 	    FREETYPE2_FOUND=yes
-   	    if test "x$FREETYPE2_FOUND" = xyes; then
-	        # Verify that the directories exist 
-                if ! test -d "$with_freetype/lib" || ! test -d "$with_freetype/include"; then
-		   AC_MSG_ERROR([Could not find the expected directories $with_freetype/lib and $with_freetype/include])
-		fi
-	        # List the contents of the lib.
-		FREETYPELIB=`ls $with_freetype/lib/libfreetype.so $with_freetype/lib/freetype.dll 2> /dev/null`
-                if test "x$FREETYPELIB" = x; then
-		   AC_MSG_ERROR([Could not find libfreetype.so nor freetype.dll in $with_freetype/lib])
-		fi
-	        # Check one h-file
-                if ! test -s "$with_freetype/include/ft2build.h"; then
-		   AC_MSG_ERROR([Could not find $with_freetype/include/ft2build.h])
-		fi
-            fi
+    if test "x$with_freetype" != x; then
+      BASIC_FIXUP_PATH(with_freetype)
+      FREETYPE2_LIBS="-L$with_freetype/lib -lfreetype"
+      FREETYPE2_LIB_PATH="$with_freetype/lib"
+      if test "x$OPENJDK_TARGET_OS" = xsolaris && test "x$OPENJDK_TARGET_CPU" = xx86_64 && test -d "$with_freetype/lib/amd64"; then
+        FREETYPE2_LIBS="-L$with_freetype/lib/amd64 -lfreetype"
+        FREETYPE2_LIB_PATH="$with_freetype/lib/amd64"
+      fi
+      if test "x$OPENJDK_TARGET_OS" = xwindows; then
+        FREETYPE2_LIBS="$with_freetype/lib/freetype.lib"
+      fi
+      FREETYPE2_CFLAGS="-I$with_freetype/include"
+      if test -s $with_freetype/include/ft2build.h && test -d $with_freetype/include/freetype2/freetype; then
+        FREETYPE2_CFLAGS="-I$with_freetype/include/freetype2 -I$with_freetype/include"
+      fi
+      FREETYPE2_FOUND=yes
+      if test "x$FREETYPE2_FOUND" = xyes; then
+        # Verify that the directories exist
+        if ! test -d "$with_freetype/lib" || ! test -d "$with_freetype/include"; then
+          AC_MSG_ERROR([Could not find the expected directories $with_freetype/lib and $with_freetype/include])
         fi
-	if test "x$FREETYPE2_FOUND" = xno; then
-	    BDEPS_CHECK_MODULE(FREETYPE2, freetype2, xxx, [FREETYPE2_FOUND=yes], [FREETYPE2_FOUND=no])
-            USING_SYSTEM_FT_LIB=true
-	fi
-	if test "x$FREETYPE2_FOUND" = xno && test "x$OPENJDK_TARGET_OS" = xwindows; then
-            FREETYPELOCATION="$PROGRAMFILES/GnuWin32"
-            BASIC_FIXUP_PATH(FREETYPELOCATION)
-	    AC_MSG_CHECKING([for freetype in some standard windows locations])
-	    if test -s "$FREETYPELOCATION/include/ft2build.h" && test -d "$FREETYPELOCATION/include/freetype2/freetype"; then
-	        FREETYPE2_CFLAGS="-I$FREETYPELOCATION/include/freetype2 -I$FREETYPELOCATION/include"
-	        FREETYPE2_LIBS="$FREETYPELOCATION/lib/freetype.lib"
- 	        FREETYPE2_LIB_PATH="$FREETYPELOCATION/lib"
-                if ! test -s "$FREETYPE2_LIBS"; then
-		   AC_MSG_ERROR([Could not find $FREETYPE2_LIBS])
-		fi
-                if ! test -s "$FREETYPE2_LIB_PATH/freetype.dll"; then
-		   AC_MSG_ERROR([Could not find $FREETYPE2_LIB_PATH/freetype.dll])
-		fi
-                USING_SYSTEM_FT_LIB=true
-                FREETYPE2_FOUND=yes
-	    fi
-	    AC_MSG_RESULT([$FREETYPE2_FOUND])         
+        # List the contents of the lib.
+        FREETYPELIB=`ls $with_freetype/lib/libfreetype.so $with_freetype/lib/freetype.dll 2> /dev/null`
+        if test "x$FREETYPELIB" = x; then
+          AC_MSG_ERROR([Could not find libfreetype.so nor freetype.dll in $with_freetype/lib])
         fi
-	if test "x$FREETYPE2_FOUND" = xno; then
-	    PKG_CHECK_MODULES(FREETYPE2, freetype2, [FREETYPE2_FOUND=yes], [FREETYPE2_FOUND=no])
-            # On solaris, pkg_check adds -lz to freetype libs, which isn't necessary for us.
-            FREETYPE2_LIBS=`$ECHO $FREETYPE2_LIBS | $SED 's/-lz//g'` 
-            USING_SYSTEM_FT_LIB=true
-            # 64-bit libs for Solaris x86 are installed in the amd64 subdirectory, change lib to lib/amd64
-            if test "x$FREETYPE2_FOUND" = xyes && test "x$OPENJDK_TARGET_OS" = xsolaris && test "x$OPENJDK_TARGET_CPU" = xx86_64; then
-              FREETYPE2_LIBS=`$ECHO $FREETYPE2_LIBS | $SED 's?/lib?/lib/amd64?g'`
-            fi
-	fi
-	if test "x$FREETYPE2_FOUND" = xno; then
-	    AC_MSG_CHECKING([for freetype in some standard locations])
-	
-	    if test -s $SYS_ROOT/usr/X11/include/ft2build.h && test -d $SYS_ROOT/usr/X11/include/freetype2/freetype; then
-	        DEFAULT_FREETYPE_CFLAGS="-I$SYS_ROOT/usr/X11/include/freetype2 -I$SYS_ROOT/usr/X11/include"
-	        DEFAULT_FREETYPE_LIBS="-L$SYS_ROOT/usr/X11/lib -lfreetype"
-	    fi
-	    if test -s $SYS_ROOT/usr/include/ft2build.h && test -d $SYS_ROOT/usr/include/freetype2/freetype; then
-	        DEFAULT_FREETYPE_CFLAGS="-I$SYS_ROOT/usr/include/freetype2"
-	        DEFAULT_FREETYPE_LIBS="-lfreetype"
-	    fi
-	
-	    PREV_CXXCFLAGS="$CXXFLAGS"
-	    PREV_LDFLAGS="$LDFLAGS"
-	    CXXFLAGS="$CXXFLAGS $DEFAULT_FREETYPE_CFLAGS"
-	    LDFLAGS="$LDFLAGS $DEFAULT_FREETYPE_LIBS"
-	    AC_LINK_IFELSE([AC_LANG_SOURCE([[#include<ft2build.h>
-	                    #include FT_FREETYPE_H 
-	                   int main() { return 0; }
-	                  ]])],
-	                  [
-	                      # Yes, the default cflags and libs did the trick.
-	                      FREETYPE2_FOUND=yes
-	                      FREETYPE2_CFLAGS="$DEFAULT_FREETYPE_CFLAGS"
-	                      FREETYPE2_LIBS="$DEFAULT_FREETYPE_LIBS"
-	                  ],
-	                  [
-	                      FREETYPE2_FOUND=no
-	                  ])
-            CXXCFLAGS="$PREV_CXXFLAGS"
-	    LDFLAGS="$PREV_LDFLAGS"
-	    AC_MSG_RESULT([$FREETYPE2_FOUND])
-            USING_SYSTEM_FT_LIB=true
-	fi
-	if test "x$FREETYPE2_FOUND" = xno; then
-		HELP_MSG_MISSING_DEPENDENCY([freetype2])
-		AC_MSG_ERROR([Could not find freetype2! $HELP_MSG ])
-	fi
-
-        if test "x$OPENJDK_TARGET_OS" != xwindows; then
-            # AC_CHECK_LIB does not support use of cl.exe
-            PREV_LDFLAGS="$LDFLAGS"
-            LDFLAGS="$FREETYPE2_LIBS"
-            AC_CHECK_LIB(freetype, FT_Init_FreeType, 
-                         FREETYPE2_FOUND=true, 
-                         AC_MSG_ERROR([Could not find freetype2! $HELP_MSG ]))
-            LDFLAGS="$PREV_LDFLAGS"
+        # Check one h-file
+        if ! test -s "$with_freetype/include/ft2build.h"; then
+          AC_MSG_ERROR([Could not find $with_freetype/include/ft2build.h])
         fi
-fi
+      fi
+    fi
+    if test "x$FREETYPE2_FOUND" = xno; then
+      BDEPS_CHECK_MODULE(FREETYPE2, freetype2, xxx, [FREETYPE2_FOUND=yes], [FREETYPE2_FOUND=no])
+      USING_SYSTEM_FT_LIB=true
+    fi
+    if test "x$FREETYPE2_FOUND" = xno && test "x$OPENJDK_TARGET_OS" = xwindows; then
+      FREETYPELOCATION="$PROGRAMFILES/GnuWin32"
+      BASIC_FIXUP_PATH(FREETYPELOCATION)
+      AC_MSG_CHECKING([for freetype in some standard windows locations])
+      if test -s "$FREETYPELOCATION/include/ft2build.h" && test -d "$FREETYPELOCATION/include/freetype2/freetype"; then
+        FREETYPE2_CFLAGS="-I$FREETYPELOCATION/include/freetype2 -I$FREETYPELOCATION/include"
+        FREETYPE2_LIBS="$FREETYPELOCATION/lib/freetype.lib"
+        FREETYPE2_LIB_PATH="$FREETYPELOCATION/lib"
+        if ! test -s "$FREETYPE2_LIBS"; then
+          AC_MSG_ERROR([Could not find $FREETYPE2_LIBS])
+        fi
+        if ! test -s "$FREETYPE2_LIB_PATH/freetype.dll"; then
+          AC_MSG_ERROR([Could not find $FREETYPE2_LIB_PATH/freetype.dll])
+        fi
+        USING_SYSTEM_FT_LIB=true
+        FREETYPE2_FOUND=yes
+      fi
+      AC_MSG_RESULT([$FREETYPE2_FOUND])
+    fi
+    if test "x$FREETYPE2_FOUND" = xno; then
+      PKG_CHECK_MODULES(FREETYPE2, freetype2, [FREETYPE2_FOUND=yes], [FREETYPE2_FOUND=no])
+      # On solaris, pkg_check adds -lz to freetype libs, which isn't necessary for us.
+      FREETYPE2_LIBS=`$ECHO $FREETYPE2_LIBS | $SED 's/-lz//g'`
+      USING_SYSTEM_FT_LIB=true
+      # 64-bit libs for Solaris x86 are installed in the amd64 subdirectory, change lib to lib/amd64
+      if test "x$FREETYPE2_FOUND" = xyes && test "x$OPENJDK_TARGET_OS" = xsolaris && test "x$OPENJDK_TARGET_CPU" = xx86_64; then
+        FREETYPE2_LIBS=`$ECHO $FREETYPE2_LIBS | $SED 's?/lib?/lib/amd64?g'`
+      fi
+    fi
+    if test "x$FREETYPE2_FOUND" = xno; then
+      AC_MSG_CHECKING([for freetype in some standard locations])
 
-AC_SUBST(USING_SYSTEM_FT_LIB)
-AC_SUBST(FREETYPE2_LIB_PATH)
-AC_SUBST(FREETYPE2_CFLAGS)
-AC_SUBST(FREETYPE2_LIBS)
+      if test -s $SYS_ROOT/usr/X11/include/ft2build.h && test -d $SYS_ROOT/usr/X11/include/freetype2/freetype; then
+        DEFAULT_FREETYPE_CFLAGS="-I$SYS_ROOT/usr/X11/include/freetype2 -I$SYS_ROOT/usr/X11/include"
+        DEFAULT_FREETYPE_LIBS="-L$SYS_ROOT/usr/X11/lib -lfreetype"
+      fi
+      if test -s $SYS_ROOT/usr/include/ft2build.h && test -d $SYS_ROOT/usr/include/freetype2/freetype; then
+        DEFAULT_FREETYPE_CFLAGS="-I$SYS_ROOT/usr/include/freetype2"
+        DEFAULT_FREETYPE_LIBS="-lfreetype"
+      fi
 
+      PREV_CXXCFLAGS="$CXXFLAGS"
+      PREV_LDFLAGS="$LDFLAGS"
+      CXXFLAGS="$CXXFLAGS $DEFAULT_FREETYPE_CFLAGS"
+      LDFLAGS="$LDFLAGS $DEFAULT_FREETYPE_LIBS"
+      AC_LINK_IFELSE([AC_LANG_SOURCE([[
+            #include<ft2build.h>
+            #include FT_FREETYPE_H
+            int main() { return 0; }
+          ]])],
+          [
+            # Yes, the default cflags and libs did the trick.
+            FREETYPE2_FOUND=yes
+            FREETYPE2_CFLAGS="$DEFAULT_FREETYPE_CFLAGS"
+            FREETYPE2_LIBS="$DEFAULT_FREETYPE_LIBS"
+          ],
+          [
+            FREETYPE2_FOUND=no
+          ]
+      )
+      CXXCFLAGS="$PREV_CXXFLAGS"
+      LDFLAGS="$PREV_LDFLAGS"
+      AC_MSG_RESULT([$FREETYPE2_FOUND])
+      USING_SYSTEM_FT_LIB=true
+    fi
+    if test "x$FREETYPE2_FOUND" = xno; then
+      HELP_MSG_MISSING_DEPENDENCY([freetype2])
+      AC_MSG_ERROR([Could not find freetype2! $HELP_MSG ])
+    fi
+
+    if test "x$OPENJDK_TARGET_OS" != xwindows; then
+      # AC_CHECK_LIB does not support use of cl.exe
+      PREV_LDFLAGS="$LDFLAGS"
+      LDFLAGS="$FREETYPE2_LIBS"
+      AC_CHECK_LIB(freetype, FT_Init_FreeType,
+          FREETYPE2_FOUND=true,
+          AC_MSG_ERROR([Could not find freetype2! $HELP_MSG ]))
+      LDFLAGS="$PREV_LDFLAGS"
+    fi
+  fi
+
+  AC_SUBST(USING_SYSTEM_FT_LIB)
+  AC_SUBST(FREETYPE2_LIB_PATH)
+  AC_SUBST(FREETYPE2_CFLAGS)
+  AC_SUBST(FREETYPE2_LIBS)
 ])
 
 AC_DEFUN_ONCE([LIB_SETUP_ALSA],
 [
 
-###############################################################################
-#
-# Check for alsa headers and libraries. Used on Linux/GNU systems.
-#
-AC_ARG_WITH(alsa, [AS_HELP_STRING([--with-alsa],
-	[specify prefix directory for the alsa package
-	 (expecting the libraries under PATH/lib and the headers under PATH/include)])])
-AC_ARG_WITH(alsa-include, [AS_HELP_STRING([--with-alsa-include],
-	[specify directory for the alsa include files])])
-AC_ARG_WITH(alsa-lib, [AS_HELP_STRING([--with-alsa-lib],
-	[specify directory for the alsa library])])
+  ###############################################################################
+  #
+  # Check for alsa headers and libraries. Used on Linux/GNU systems.
+  #
+  AC_ARG_WITH(alsa, [AS_HELP_STRING([--with-alsa],
+      [specify prefix directory for the alsa package
+      (expecting the libraries under PATH/lib and the headers under PATH/include)])])
+  AC_ARG_WITH(alsa-include, [AS_HELP_STRING([--with-alsa-include],
+      [specify directory for the alsa include files])])
+  AC_ARG_WITH(alsa-lib, [AS_HELP_STRING([--with-alsa-lib],
+      [specify directory for the alsa library])])
 
-if test "x$ALSA_NOT_NEEDED" = xyes; then
-	if test "x${with_alsa}" != x || test "x${with_alsa_include}" != x || test "x${with_alsa_lib}" != x; then
-		AC_MSG_WARN([alsa not used, so --with-alsa is ignored])
-	fi
-	ALSA_CFLAGS=
-	ALSA_LIBS=
-else
-	ALSA_FOUND=no
+  if test "x$ALSA_NOT_NEEDED" = xyes; then
+    if test "x${with_alsa}" != x || test "x${with_alsa_include}" != x || test "x${with_alsa_lib}" != x; then
+      AC_MSG_WARN([alsa not used, so --with-alsa is ignored])
+    fi
+    ALSA_CFLAGS=
+    ALSA_LIBS=
+  else
+    ALSA_FOUND=no
 
-	if test "x${with_alsa}" = xno || test "x${with_alsa_include}" = xno || test "x${with_alsa_lib}" = xno; then
-	    AC_MSG_ERROR([It is not possible to disable the use of alsa. Remove the --without-alsa option.])
-	fi
+    if test "x${with_alsa}" = xno || test "x${with_alsa_include}" = xno || test "x${with_alsa_lib}" = xno; then
+      AC_MSG_ERROR([It is not possible to disable the use of alsa. Remove the --without-alsa option.])
+    fi
 
-	if test "x${with_alsa}" != x; then
-	    ALSA_LIBS="-L${with_alsa}/lib -lalsa"
-	    ALSA_CFLAGS="-I${with_alsa}/include"
-	    ALSA_FOUND=yes
-	fi
-	if test "x${with_alsa_include}" != x; then
-	    ALSA_CFLAGS="-I${with_alsa_include}"
-	    ALSA_FOUND=yes
-	fi
-	if test "x${with_alsa_lib}" != x; then
-	    ALSA_LIBS="-L${with_alsa_lib} -lalsa"
-	    ALSA_FOUND=yes
-	fi
-	if test "x$ALSA_FOUND" = xno; then
-	    BDEPS_CHECK_MODULE(ALSA, alsa, xxx, [ALSA_FOUND=yes], [ALSA_FOUND=no])
-	fi
-	if test "x$ALSA_FOUND" = xno; then
-	    PKG_CHECK_MODULES(ALSA, alsa, [ALSA_FOUND=yes], [ALSA_FOUND=no])
-	fi
-	if test "x$ALSA_FOUND" = xno; then
-	    AC_CHECK_HEADERS([alsa/asoundlib.h],
-	                     [ALSA_FOUND=yes
-	                      ALSA_CFLAGS=-Iignoreme
-	                      ALSA_LIBS=-lasound
-	                      DEFAULT_ALSA=yes],
-	                     [ALSA_FOUND=no])
-	fi
-	if test "x$ALSA_FOUND" = xno; then 
-	    HELP_MSG_MISSING_DEPENDENCY([alsa])
-	    AC_MSG_ERROR([Could not find alsa! $HELP_MSG ])
-	fi    
-fi
+    if test "x${with_alsa}" != x; then
+      ALSA_LIBS="-L${with_alsa}/lib -lalsa"
+      ALSA_CFLAGS="-I${with_alsa}/include"
+      ALSA_FOUND=yes
+    fi
+    if test "x${with_alsa_include}" != x; then
+      ALSA_CFLAGS="-I${with_alsa_include}"
+      ALSA_FOUND=yes
+    fi
+    if test "x${with_alsa_lib}" != x; then
+      ALSA_LIBS="-L${with_alsa_lib} -lalsa"
+      ALSA_FOUND=yes
+    fi
+    if test "x$ALSA_FOUND" = xno; then
+      BDEPS_CHECK_MODULE(ALSA, alsa, xxx, [ALSA_FOUND=yes], [ALSA_FOUND=no])
+    fi
+    if test "x$ALSA_FOUND" = xno; then
+      PKG_CHECK_MODULES(ALSA, alsa, [ALSA_FOUND=yes], [ALSA_FOUND=no])
+    fi
+    if test "x$ALSA_FOUND" = xno; then
+      AC_CHECK_HEADERS([alsa/asoundlib.h],
+          [
+            ALSA_FOUND=yes
+            ALSA_CFLAGS=-Iignoreme
+            ALSA_LIBS=-lasound
+            DEFAULT_ALSA=yes
+          ],
+          [ALSA_FOUND=no])
+    fi
+    if test "x$ALSA_FOUND" = xno; then
+      HELP_MSG_MISSING_DEPENDENCY([alsa])
+      AC_MSG_ERROR([Could not find alsa! $HELP_MSG ])
+    fi
+  fi
 
-AC_SUBST(ALSA_CFLAGS)
-AC_SUBST(ALSA_LIBS)
-
+  AC_SUBST(ALSA_CFLAGS)
+  AC_SUBST(ALSA_LIBS)
 ])
 
 AC_DEFUN_ONCE([LIB_SETUP_MISC_LIBS],
 [
 
-###############################################################################
-#
-# Check for the jpeg library
-#
+  ###############################################################################
+  #
+  # Check for the jpeg library
+  #
 
-USE_EXTERNAL_LIBJPEG=true
-AC_CHECK_LIB(jpeg, main, [],
-             [ USE_EXTERNAL_LIBJPEG=false
-               AC_MSG_NOTICE([Will use jpeg decoder bundled with the OpenJDK source])
-             ])
-AC_SUBST(USE_EXTERNAL_LIBJPEG)
-        
-###############################################################################
-#
-# Check for the gif library
-#
+  USE_EXTERNAL_LIBJPEG=true
+  AC_CHECK_LIB(jpeg, main, [],
+      [ USE_EXTERNAL_LIBJPEG=false
+      AC_MSG_NOTICE([Will use jpeg decoder bundled with the OpenJDK source])
+  ])
+  AC_SUBST(USE_EXTERNAL_LIBJPEG)
 
-AC_ARG_WITH(giflib, [AS_HELP_STRING([--with-giflib],
-	[use giflib from build system or OpenJDK source (system, bundled) @<:@bundled@:>@])])
+  ###############################################################################
+  #
+  # Check for the gif library
+  #
+
+  AC_ARG_WITH(giflib, [AS_HELP_STRING([--with-giflib],
+      [use giflib from build system or OpenJDK source (system, bundled) @<:@bundled@:>@])])
 
 
-AC_MSG_CHECKING([for which giflib to use])
+  AC_MSG_CHECKING([for which giflib to use])
 
-# default is bundled
-DEFAULT_GIFLIB=bundled
+  # default is bundled
+  DEFAULT_GIFLIB=bundled
 
-#
-# if user didn't specify, use DEFAULT_GIFLIB
-#
-if test "x${with_giflib}" = "x"; then
+  #
+  # if user didn't specify, use DEFAULT_GIFLIB
+  #
+  if test "x${with_giflib}" = "x"; then
     with_giflib=${DEFAULT_GIFLIB}
-fi
+  fi
 
-AC_MSG_RESULT(${with_giflib})
+  AC_MSG_RESULT(${with_giflib})
 
-if test "x${with_giflib}" = "xbundled"; then
+  if test "x${with_giflib}" = "xbundled"; then
     USE_EXTERNAL_LIBGIF=false
-elif test "x${with_giflib}" = "xsystem"; then
+  elif test "x${with_giflib}" = "xsystem"; then
     AC_CHECK_HEADER(gif_lib.h, [],
-             [ AC_MSG_ERROR([--with-giflib=system specified, but gif_lib.h not found!])])
+        [ AC_MSG_ERROR([--with-giflib=system specified, but gif_lib.h not found!])])
     AC_CHECK_LIB(gif, DGifGetCode, [],
-             [ AC_MSG_ERROR([--with-giflib=system specified, but no giflib found!])])
+        [ AC_MSG_ERROR([--with-giflib=system specified, but no giflib found!])])
 
     USE_EXTERNAL_LIBGIF=true
-else
+  else
     AC_MSG_ERROR([Invalid value of --with-giflib: ${with_giflib}, use 'system' or 'bundled'])
-fi
-AC_SUBST(USE_EXTERNAL_LIBGIF)
+  fi
+  AC_SUBST(USE_EXTERNAL_LIBGIF)
 
-###############################################################################
-#
-# Check for the zlib library
-#
+  ###############################################################################
+  #
+  # Check for the zlib library
+  #
 
-AC_ARG_WITH(zlib, [AS_HELP_STRING([--with-zlib],
-	[use zlib from build system or OpenJDK source (system, bundled) @<:@bundled@:>@])])
+  AC_ARG_WITH(zlib, [AS_HELP_STRING([--with-zlib],
+      [use zlib from build system or OpenJDK source (system, bundled) @<:@bundled@:>@])])
 
-AC_CHECK_LIB(z, compress,
-             [ ZLIB_FOUND=yes ],
-             [ ZLIB_FOUND=no ])
+  AC_CHECK_LIB(z, compress,
+      [ ZLIB_FOUND=yes ],
+      [ ZLIB_FOUND=no ])
 
-AC_MSG_CHECKING([for which zlib to use])
+  AC_MSG_CHECKING([for which zlib to use])
 
-DEFAULT_ZLIB=bundled
-if test "x$OPENJDK_TARGET_OS" = xmacosx; then
-#
-# On macosx default is system...on others default is 
-#
+  DEFAULT_ZLIB=bundled
+  if test "x$OPENJDK_TARGET_OS" = xmacosx; then
+    #
+    # On macosx default is system...on others default is
+    #
     DEFAULT_ZLIB=system
-fi
+  fi
 
-if test "x${ZLIB_FOUND}" != "xyes"; then
-#
-# If we don't find any system...set default to bundled
-#
+  if test "x${ZLIB_FOUND}" != "xyes"; then
+    #
+    # If we don't find any system...set default to bundled
+    #
     DEFAULT_ZLIB=bundled
-fi
+  fi
 
-#
-# If user didn't specify, use DEFAULT_ZLIB
-#
-if test "x${with_zlib}" = "x"; then
+  #
+  # If user didn't specify, use DEFAULT_ZLIB
+  #
+  if test "x${with_zlib}" = "x"; then
     with_zlib=${DEFAULT_ZLIB}
-fi
+  fi
 
-if test "x${with_zlib}" = "xbundled"; then
+  if test "x${with_zlib}" = "xbundled"; then
     USE_EXTERNAL_LIBZ=false
     AC_MSG_RESULT([bundled])
-elif test "x${with_zlib}" = "xsystem"; then
+  elif test "x${with_zlib}" = "xsystem"; then
     if test "x${ZLIB_FOUND}" = "xyes"; then
-        USE_EXTERNAL_LIBZ=true
-        AC_MSG_RESULT([system])
+      USE_EXTERNAL_LIBZ=true
+      AC_MSG_RESULT([system])
     else
-        AC_MSG_RESULT([system not found])
-        AC_MSG_ERROR([--with-zlib=system specified, but no zlib found!])  
+      AC_MSG_RESULT([system not found])
+      AC_MSG_ERROR([--with-zlib=system specified, but no zlib found!])
     fi
-else
-    AC_MSG_ERROR([Invalid value for --with-zlib: ${with_zlib}, use 'system' or 'bundled'])  
-fi
+  else
+    AC_MSG_ERROR([Invalid value for --with-zlib: ${with_zlib}, use 'system' or 'bundled'])
+  fi
 
-AC_SUBST(USE_EXTERNAL_LIBZ)
+  AC_SUBST(USE_EXTERNAL_LIBZ)
 
-###############################################################################
-LIBZIP_CAN_USE_MMAP=true
+  ###############################################################################
+  LIBZIP_CAN_USE_MMAP=true
 
-AC_SUBST(LIBZIP_CAN_USE_MMAP)
+  AC_SUBST(LIBZIP_CAN_USE_MMAP)
 
-###############################################################################
-#
-# Check if altzone exists in time.h
-#
+  ###############################################################################
+  #
+  # Check if altzone exists in time.h
+  #
 
-AC_LINK_IFELSE([AC_LANG_PROGRAM([#include <time.h>], [return (int)altzone;])],
-            [has_altzone=yes],
-            [has_altzone=no])
-if test "x$has_altzone" = xyes; then
+  AC_LINK_IFELSE([AC_LANG_PROGRAM([#include <time.h>], [return (int)altzone;])],
+      [has_altzone=yes],
+      [has_altzone=no])
+  if test "x$has_altzone" = xyes; then
     AC_DEFINE([HAVE_ALTZONE], 1, [Define if you have the external 'altzone' variable in time.h])
-fi
+  fi
 
-###############################################################################
-#
-# Check the maths library
-#
+  ###############################################################################
+  #
+  # Check the maths library
+  #
 
-AC_CHECK_LIB(m, cos, [],
-             [ 
-                  AC_MSG_NOTICE([Maths library was not found])
-             ])
-AC_SUBST(LIBM)
+  AC_CHECK_LIB(m, cos, [],
+      [
+        AC_MSG_NOTICE([Maths library was not found])
+      ]
+  )
+  AC_SUBST(LIBM)
 
-###############################################################################
-#
-# Check for libdl.so
+  ###############################################################################
+  #
+  # Check for libdl.so
 
-save_LIBS="$LIBS"
-LIBS=""
-AC_CHECK_LIB(dl,dlopen)
-LIBDL="$LIBS"
-AC_SUBST(LIBDL)
-LIBS="$save_LIBS"
-
+  save_LIBS="$LIBS"
+  LIBS=""
+  AC_CHECK_LIB(dl,dlopen)
+  LIBDL="$LIBS"
+  AC_SUBST(LIBDL)
+  LIBS="$save_LIBS"
 ])
 
 AC_DEFUN_ONCE([LIB_SETUP_STATIC_LINK_LIBSTDCPP],
 [
-###############################################################################
-#
-# statically link libstdc++ before C++ ABI is stablized on Linux unless 
-# dynamic build is configured on command line.
-#
-AC_ARG_WITH([stdc++lib], [AS_HELP_STRING([--with-stdc++lib=<static>,<dynamic>,<default>],
-  [force linking of the C++ runtime on Linux to either static or dynamic, default is static with dynamic as fallback])],
-  [
-    if test "x$with_stdc__lib" != xdynamic && test "x$with_stdc__lib" != xstatic \
-        && test "x$with_stdc__lib" != xdefault; then
-      AC_MSG_ERROR([Bad parameter value --with-stdc++lib=$with_stdc__lib!])
-    fi
-  ],
-  [with_stdc__lib=default]
-)
+  ###############################################################################
+  #
+  # statically link libstdc++ before C++ ABI is stablized on Linux unless
+  # dynamic build is configured on command line.
+  #
+  AC_ARG_WITH([stdc++lib], [AS_HELP_STRING([--with-stdc++lib=<static>,<dynamic>,<default>],
+      [force linking of the C++ runtime on Linux to either static or dynamic, default is static with dynamic as fallback])],
+      [
+        if test "x$with_stdc__lib" != xdynamic && test "x$with_stdc__lib" != xstatic \
+                && test "x$with_stdc__lib" != xdefault; then
+          AC_MSG_ERROR([Bad parameter value --with-stdc++lib=$with_stdc__lib!])
+        fi
+      ],
+      [with_stdc__lib=default]
+  )
 
-if test "x$OPENJDK_TARGET_OS" = xlinux; then
+  if test "x$OPENJDK_TARGET_OS" = xlinux; then
     # Test if -lstdc++ works.
     AC_MSG_CHECKING([if dynamic link of stdc++ is possible])
     AC_LANG_PUSH(C++)
     OLD_CXXFLAGS="$CXXFLAGS"
     CXXFLAGS="$CXXFLAGS -lstdc++"
     AC_LINK_IFELSE([AC_LANG_PROGRAM([], [return 0;])],
-            [has_dynamic_libstdcxx=yes],
-            [has_dynamic_libstdcxx=no])
+        [has_dynamic_libstdcxx=yes],
+        [has_dynamic_libstdcxx=no])
     CXXFLAGS="$OLD_CXXFLAGS"
     AC_LANG_POP(C++)
     AC_MSG_RESULT([$has_dynamic_libstdcxx])
@@ -668,55 +675,55 @@
     OLD_LIBS="$LIBS"
     OLD_CXX="$CXX"
     LIBS="$STATIC_STDCXX_FLAGS"
-    CXX="$CC"                       
+    CXX="$CC"
     AC_LINK_IFELSE([AC_LANG_PROGRAM([], [return 0;])],
-            [has_static_libstdcxx=yes],
-            [has_static_libstdcxx=no])
+        [has_static_libstdcxx=yes],
+        [has_static_libstdcxx=no])
     LIBS="$OLD_LIBS"
     CXX="$OLD_CXX"
     AC_LANG_POP(C++)
     AC_MSG_RESULT([$has_static_libstdcxx])
 
     if test "x$has_static_libstdcxx" = xno && test "x$has_dynamic_libstdcxx" = xno; then
-        AC_MSG_ERROR([Cannot link to stdc++, neither dynamically nor statically!])
+      AC_MSG_ERROR([Cannot link to stdc++, neither dynamically nor statically!])
     fi
 
     if test "x$with_stdc__lib" = xstatic && test "x$has_static_libstdcxx" = xno; then
-        AC_MSG_ERROR([Static linking of libstdc++ was not possible!])
+      AC_MSG_ERROR([Static linking of libstdc++ was not possible!])
     fi
 
     if test "x$with_stdc__lib" = xdynamic && test "x$has_dynamic_libstdcxx" = xno; then
-        AC_MSG_ERROR([Dynamic linking of libstdc++ was not possible!])
+      AC_MSG_ERROR([Dynamic linking of libstdc++ was not possible!])
     fi
 
     AC_MSG_CHECKING([how to link with libstdc++])
     # If dynamic was requested, it's available since it would fail above otherwise.
     # If dynamic wasn't requested, go with static unless it isn't available.
     if test "x$with_stdc__lib" = xdynamic || test "x$has_static_libstdcxx" = xno || test "x$JVM_VARIANT_ZEROSHARK" = xtrue; then
-        LIBCXX="$LIBCXX -lstdc++"
-        LDCXX="$CXX"
-        STATIC_CXX_SETTING="STATIC_CXX=false"
-        AC_MSG_RESULT([dynamic])
+      LIBCXX="$LIBCXX -lstdc++"
+      LDCXX="$CXX"
+      STATIC_CXX_SETTING="STATIC_CXX=false"
+      AC_MSG_RESULT([dynamic])
     else
-        LIBCXX="$LIBCXX $STATIC_STDCXX_FLAGS"
-        LDCXX="$CC"
-        STATIC_CXX_SETTING="STATIC_CXX=true"
-        AC_MSG_RESULT([static])
+      LIBCXX="$LIBCXX $STATIC_STDCXX_FLAGS"
+      LDCXX="$CC"
+      STATIC_CXX_SETTING="STATIC_CXX=true"
+      AC_MSG_RESULT([static])
     fi
-fi
-AC_SUBST(STATIC_CXX_SETTING)
+  fi
+  AC_SUBST(STATIC_CXX_SETTING)
 
-if test "x$JVM_VARIANT_ZERO" = xtrue || test "x$JVM_VARIANT_ZEROSHARK" = xtrue; then
+  if test "x$JVM_VARIANT_ZERO" = xtrue || test "x$JVM_VARIANT_ZEROSHARK" = xtrue; then
     # Figure out LIBFFI_CFLAGS and LIBFFI_LIBS
     PKG_CHECK_MODULES([LIBFFI], [libffi])
 
-fi
+  fi
 
-if test "x$JVM_VARIANT_ZEROSHARK" = xtrue; then
+  if test "x$JVM_VARIANT_ZEROSHARK" = xtrue; then
     AC_CHECK_PROG([LLVM_CONFIG], [llvm-config], [llvm-config])
 
     if test "x$LLVM_CONFIG" != xllvm-config; then
-        AC_MSG_ERROR([llvm-config not found in $PATH.])
+      AC_MSG_ERROR([llvm-config not found in $PATH.])
     fi
 
     llvm_components="jit mcjit engine nativecodegen native"
@@ -757,18 +764,17 @@
     AC_SUBST(LLVM_CFLAGS)
     AC_SUBST(LLVM_LDFLAGS)
     AC_SUBST(LLVM_LIBS)
-fi
+  fi
 
-# libCrun is the c++ runtime-library with SunStudio (roughly the equivalent of gcc's libstdc++.so)
-if test "x$OPENJDK_TARGET_OS" = xsolaris && test "x$LIBCXX" = x; then
+  # libCrun is the c++ runtime-library with SunStudio (roughly the equivalent of gcc's libstdc++.so)
+  if test "x$OPENJDK_TARGET_OS" = xsolaris && test "x$LIBCXX" = x; then
     LIBCXX="/usr/lib${OPENJDK_TARGET_CPU_ISADIR}/libCrun.so.1"
-fi
+  fi
 
-# TODO better (platform agnostic) test
-if test "x$OPENJDK_TARGET_OS" = xmacosx && test "x$LIBCXX" = x && test "x$GCC" = xyes; then
+  # TODO better (platform agnostic) test
+  if test "x$OPENJDK_TARGET_OS" = xmacosx && test "x$LIBCXX" = x && test "x$GCC" = xyes; then
     LIBCXX="-lstdc++"
-fi
+  fi
 
-AC_SUBST(LIBCXX)
-
+  AC_SUBST(LIBCXX)
 ])
diff --git a/common/autoconf/platform.m4 b/common/autoconf/platform.m4
index 96c710d..40c3252 100644
--- a/common/autoconf/platform.m4
+++ b/common/autoconf/platform.m4
@@ -53,37 +53,37 @@
       VAR_CPU_ARCH=ppc
       VAR_CPU_BITS=32
       VAR_CPU_ENDIAN=big
-       ;;
+      ;;
     powerpc64)
       VAR_CPU=ppc64
       VAR_CPU_ARCH=ppc
       VAR_CPU_BITS=64
       VAR_CPU_ENDIAN=big
-       ;;
+      ;;
     s390)
       VAR_CPU=s390
       VAR_CPU_ARCH=s390
       VAR_CPU_BITS=32
       VAR_CPU_ENDIAN=big
-       ;;
+      ;;
     s390x)
       VAR_CPU=s390x
       VAR_CPU_ARCH=s390
       VAR_CPU_BITS=64
       VAR_CPU_ENDIAN=big
-       ;;
+      ;;
     sparc)
       VAR_CPU=sparc
       VAR_CPU_ARCH=sparc
       VAR_CPU_BITS=32
       VAR_CPU_ENDIAN=big
-       ;;
+      ;;
     sparcv9)
       VAR_CPU=sparcv9
       VAR_CPU_ARCH=sparc
       VAR_CPU_BITS=64
       VAR_CPU_ENDIAN=big
-       ;;
+      ;;
     *)
       AC_MSG_ERROR([unsupported cpu $1])
       ;;
@@ -140,56 +140,56 @@
 # OPENJDK_BUILD_OS, etc.
 AC_DEFUN([PLATFORM_EXTRACT_TARGET_AND_BUILD],
 [
-    # Copy the autoconf trip/quadruplet verbatim to OPENJDK_TARGET_AUTOCONF_NAME
-    # (from the autoconf "host") and OPENJDK_BUILD_AUTOCONF_NAME
-    # Note that we might later on rewrite e.g. OPENJDK_TARGET_CPU due to reduced build,
-    # but this will not change the value of OPENJDK_TARGET_AUTOCONF_NAME.     
-    OPENJDK_TARGET_AUTOCONF_NAME="$host"
-    OPENJDK_BUILD_AUTOCONF_NAME="$build"
-    AC_SUBST(OPENJDK_TARGET_AUTOCONF_NAME)
-    AC_SUBST(OPENJDK_BUILD_AUTOCONF_NAME)
+  # Copy the autoconf trip/quadruplet verbatim to OPENJDK_TARGET_AUTOCONF_NAME
+  # (from the autoconf "host") and OPENJDK_BUILD_AUTOCONF_NAME
+  # Note that we might later on rewrite e.g. OPENJDK_TARGET_CPU due to reduced build,
+  # but this will not change the value of OPENJDK_TARGET_AUTOCONF_NAME.
+  OPENJDK_TARGET_AUTOCONF_NAME="$host"
+  OPENJDK_BUILD_AUTOCONF_NAME="$build"
+  AC_SUBST(OPENJDK_TARGET_AUTOCONF_NAME)
+  AC_SUBST(OPENJDK_BUILD_AUTOCONF_NAME)
 
-    # Convert the autoconf OS/CPU value to our own data, into the VAR_OS/CPU variables.
-    PLATFORM_EXTRACT_VARS_FROM_OS($build_os)
-    PLATFORM_EXTRACT_VARS_FROM_CPU($build_cpu)
-    # ..and setup our own variables. (Do this explicitely to facilitate searching)
-    OPENJDK_BUILD_OS="$VAR_OS"
-    OPENJDK_BUILD_OS_API="$VAR_OS_API"
-    OPENJDK_BUILD_OS_ENV="$VAR_OS_ENV"
-    OPENJDK_BUILD_CPU="$VAR_CPU"
-    OPENJDK_BUILD_CPU_ARCH="$VAR_CPU_ARCH"
-    OPENJDK_BUILD_CPU_BITS="$VAR_CPU_BITS"
-    OPENJDK_BUILD_CPU_ENDIAN="$VAR_CPU_ENDIAN"
-    AC_SUBST(OPENJDK_BUILD_OS)
-    AC_SUBST(OPENJDK_BUILD_OS_API)
-    AC_SUBST(OPENJDK_BUILD_CPU)
-    AC_SUBST(OPENJDK_BUILD_CPU_ARCH)
-    AC_SUBST(OPENJDK_BUILD_CPU_BITS)
-    AC_SUBST(OPENJDK_BUILD_CPU_ENDIAN)
+  # Convert the autoconf OS/CPU value to our own data, into the VAR_OS/CPU variables.
+  PLATFORM_EXTRACT_VARS_FROM_OS($build_os)
+  PLATFORM_EXTRACT_VARS_FROM_CPU($build_cpu)
+  # ..and setup our own variables. (Do this explicitely to facilitate searching)
+  OPENJDK_BUILD_OS="$VAR_OS"
+  OPENJDK_BUILD_OS_API="$VAR_OS_API"
+  OPENJDK_BUILD_OS_ENV="$VAR_OS_ENV"
+  OPENJDK_BUILD_CPU="$VAR_CPU"
+  OPENJDK_BUILD_CPU_ARCH="$VAR_CPU_ARCH"
+  OPENJDK_BUILD_CPU_BITS="$VAR_CPU_BITS"
+  OPENJDK_BUILD_CPU_ENDIAN="$VAR_CPU_ENDIAN"
+  AC_SUBST(OPENJDK_BUILD_OS)
+  AC_SUBST(OPENJDK_BUILD_OS_API)
+  AC_SUBST(OPENJDK_BUILD_CPU)
+  AC_SUBST(OPENJDK_BUILD_CPU_ARCH)
+  AC_SUBST(OPENJDK_BUILD_CPU_BITS)
+  AC_SUBST(OPENJDK_BUILD_CPU_ENDIAN)
 
-    AC_MSG_CHECKING([openjdk-build os-cpu])
-    AC_MSG_RESULT([$OPENJDK_BUILD_OS-$OPENJDK_BUILD_CPU])
+  AC_MSG_CHECKING([openjdk-build os-cpu])
+  AC_MSG_RESULT([$OPENJDK_BUILD_OS-$OPENJDK_BUILD_CPU])
 
-    # Convert the autoconf OS/CPU value to our own data, into the VAR_OS/CPU variables.
-    PLATFORM_EXTRACT_VARS_FROM_OS($host_os)
-    PLATFORM_EXTRACT_VARS_FROM_CPU($host_cpu)
-    # ... and setup our own variables. (Do this explicitely to facilitate searching)
-    OPENJDK_TARGET_OS="$VAR_OS"
-    OPENJDK_TARGET_OS_API="$VAR_OS_API"
-    OPENJDK_TARGET_OS_ENV="$VAR_OS_ENV"
-    OPENJDK_TARGET_CPU="$VAR_CPU"
-    OPENJDK_TARGET_CPU_ARCH="$VAR_CPU_ARCH"
-    OPENJDK_TARGET_CPU_BITS="$VAR_CPU_BITS"
-    OPENJDK_TARGET_CPU_ENDIAN="$VAR_CPU_ENDIAN"
-    AC_SUBST(OPENJDK_TARGET_OS)
-    AC_SUBST(OPENJDK_TARGET_OS_API)
-    AC_SUBST(OPENJDK_TARGET_CPU)
-    AC_SUBST(OPENJDK_TARGET_CPU_ARCH)
-    AC_SUBST(OPENJDK_TARGET_CPU_BITS)
-    AC_SUBST(OPENJDK_TARGET_CPU_ENDIAN)
+  # Convert the autoconf OS/CPU value to our own data, into the VAR_OS/CPU variables.
+  PLATFORM_EXTRACT_VARS_FROM_OS($host_os)
+  PLATFORM_EXTRACT_VARS_FROM_CPU($host_cpu)
+  # ... and setup our own variables. (Do this explicitely to facilitate searching)
+  OPENJDK_TARGET_OS="$VAR_OS"
+  OPENJDK_TARGET_OS_API="$VAR_OS_API"
+  OPENJDK_TARGET_OS_ENV="$VAR_OS_ENV"
+  OPENJDK_TARGET_CPU="$VAR_CPU"
+  OPENJDK_TARGET_CPU_ARCH="$VAR_CPU_ARCH"
+  OPENJDK_TARGET_CPU_BITS="$VAR_CPU_BITS"
+  OPENJDK_TARGET_CPU_ENDIAN="$VAR_CPU_ENDIAN"
+  AC_SUBST(OPENJDK_TARGET_OS)
+  AC_SUBST(OPENJDK_TARGET_OS_API)
+  AC_SUBST(OPENJDK_TARGET_CPU)
+  AC_SUBST(OPENJDK_TARGET_CPU_ARCH)
+  AC_SUBST(OPENJDK_TARGET_CPU_BITS)
+  AC_SUBST(OPENJDK_TARGET_CPU_ENDIAN)
 
-    AC_MSG_CHECKING([openjdk-target os-cpu])
-    AC_MSG_RESULT([$OPENJDK_TARGET_OS-$OPENJDK_TARGET_CPU])
+  AC_MSG_CHECKING([openjdk-target os-cpu])
+  AC_MSG_RESULT([$OPENJDK_TARGET_OS-$OPENJDK_TARGET_CPU])
 ])
 
 # Check if a reduced build (32-bit on 64-bit platforms) is requested, and modify behaviour
@@ -198,7 +198,7 @@
 AC_DEFUN([PLATFORM_SETUP_TARGET_CPU_BITS],
 [
   AC_ARG_WITH(target-bits, [AS_HELP_STRING([--with-target-bits],
-     [build 32-bit or 64-bit binaries (for platforms that support it), e.g. --with-target-bits=32 @<:@guessed@:>@])])
+       [build 32-bit or 64-bit binaries (for platforms that support it), e.g. --with-target-bits=32 @<:@guessed@:>@])])
 
   # We have three types of compiles:
   # native  == normal compilation, target system == build system
@@ -227,7 +227,7 @@
         OPENJDK_TARGET_CPU=sparc
       else
         AC_MSG_ERROR([Reduced build (--with-target-bits=32) is only supported on x86_64 and sparcv9])
-      fi 
+      fi
     elif test "x$with_target_bits" = x64 && test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
       AC_MSG_ERROR([It is not possible to use --with-target-bits=64 on a 32 bit system. Use proper cross-compilation instead.])
     elif test "x$with_target_bits" = "x$OPENJDK_TARGET_CPU_BITS"; then
@@ -238,184 +238,183 @@
   fi
   AC_SUBST(COMPILE_TYPE)
 
-AC_MSG_CHECKING([compilation type])
-AC_MSG_RESULT([$COMPILE_TYPE])
+  AC_MSG_CHECKING([compilation type])
+  AC_MSG_RESULT([$COMPILE_TYPE])
 ])
 
-    # Setup the legacy variables, for controlling the old makefiles.
-    #
+# Setup the legacy variables, for controlling the old makefiles.
+#
 AC_DEFUN([PLATFORM_SETUP_LEGACY_VARS],
 [
-    # Also store the legacy naming of the cpu.
-    # Ie i586 and amd64 instead of x86 and x86_64
-    OPENJDK_TARGET_CPU_LEGACY="$OPENJDK_TARGET_CPU"
-    if test "x$OPENJDK_TARGET_CPU" = xx86; then 
-      OPENJDK_TARGET_CPU_LEGACY="i586"
-    elif test "x$OPENJDK_TARGET_OS" != xmacosx && test "x$OPENJDK_TARGET_CPU" = xx86_64; then 
-      # On all platforms except MacOSX replace x86_64 with amd64.
-      OPENJDK_TARGET_CPU_LEGACY="amd64"
-    fi
-    AC_SUBST(OPENJDK_TARGET_CPU_LEGACY)
+  # Also store the legacy naming of the cpu.
+  # Ie i586 and amd64 instead of x86 and x86_64
+  OPENJDK_TARGET_CPU_LEGACY="$OPENJDK_TARGET_CPU"
+  if test "x$OPENJDK_TARGET_CPU" = xx86; then
+    OPENJDK_TARGET_CPU_LEGACY="i586"
+  elif test "x$OPENJDK_TARGET_OS" != xmacosx && test "x$OPENJDK_TARGET_CPU" = xx86_64; then
+    # On all platforms except MacOSX replace x86_64 with amd64.
+    OPENJDK_TARGET_CPU_LEGACY="amd64"
+  fi
+  AC_SUBST(OPENJDK_TARGET_CPU_LEGACY)
 
-    # And the second legacy naming of the cpu.
-    # Ie i386 and amd64 instead of x86 and x86_64.
-    OPENJDK_TARGET_CPU_LEGACY_LIB="$OPENJDK_TARGET_CPU"
-    if test "x$OPENJDK_TARGET_CPU" = xx86; then 
-      OPENJDK_TARGET_CPU_LEGACY_LIB="i386"
-    elif test "x$OPENJDK_TARGET_CPU" = xx86_64; then 
-      OPENJDK_TARGET_CPU_LEGACY_LIB="amd64"
-    fi
-    AC_SUBST(OPENJDK_TARGET_CPU_LEGACY_LIB)
+  # And the second legacy naming of the cpu.
+  # Ie i386 and amd64 instead of x86 and x86_64.
+  OPENJDK_TARGET_CPU_LEGACY_LIB="$OPENJDK_TARGET_CPU"
+  if test "x$OPENJDK_TARGET_CPU" = xx86; then
+    OPENJDK_TARGET_CPU_LEGACY_LIB="i386"
+  elif test "x$OPENJDK_TARGET_CPU" = xx86_64; then
+    OPENJDK_TARGET_CPU_LEGACY_LIB="amd64"
+  fi
+  AC_SUBST(OPENJDK_TARGET_CPU_LEGACY_LIB)
 
-    # This is the name of the cpu (but using i386 and amd64 instead of
-    # x86 and x86_64, respectively), preceeded by a /, to be used when
-    # locating libraries. On macosx, it's empty, though.
-    OPENJDK_TARGET_CPU_LIBDIR="/$OPENJDK_TARGET_CPU_LEGACY_LIB"
-    if test "x$OPENJDK_TARGET_OS" = xmacosx; then
-        OPENJDK_TARGET_CPU_LIBDIR=""
-    fi
-    AC_SUBST(OPENJDK_TARGET_CPU_LIBDIR)
+  # This is the name of the cpu (but using i386 and amd64 instead of
+  # x86 and x86_64, respectively), preceeded by a /, to be used when
+  # locating libraries. On macosx, it's empty, though.
+  OPENJDK_TARGET_CPU_LIBDIR="/$OPENJDK_TARGET_CPU_LEGACY_LIB"
+  if test "x$OPENJDK_TARGET_OS" = xmacosx; then
+    OPENJDK_TARGET_CPU_LIBDIR=""
+  fi
+  AC_SUBST(OPENJDK_TARGET_CPU_LIBDIR)
 
-    # OPENJDK_TARGET_CPU_ISADIR is normally empty. On 64-bit Solaris systems, it is set to
-    # /amd64 or /sparcv9. This string is appended to some library paths, like this:
-    # /usr/lib${OPENJDK_TARGET_CPU_ISADIR}/libexample.so
-    OPENJDK_TARGET_CPU_ISADIR=""
-    if test "x$OPENJDK_TARGET_OS" = xsolaris; then
-      if test "x$OPENJDK_TARGET_CPU" = xx86_64; then 
-          OPENJDK_TARGET_CPU_ISADIR="/amd64"
-      elif test "x$OPENJDK_TARGET_CPU" = xsparcv9; then 
-          OPENJDK_TARGET_CPU_ISADIR="/sparcv9"
-      fi
+  # OPENJDK_TARGET_CPU_ISADIR is normally empty. On 64-bit Solaris systems, it is set to
+  # /amd64 or /sparcv9. This string is appended to some library paths, like this:
+  # /usr/lib${OPENJDK_TARGET_CPU_ISADIR}/libexample.so
+  OPENJDK_TARGET_CPU_ISADIR=""
+  if test "x$OPENJDK_TARGET_OS" = xsolaris; then
+    if test "x$OPENJDK_TARGET_CPU" = xx86_64; then
+      OPENJDK_TARGET_CPU_ISADIR="/amd64"
+    elif test "x$OPENJDK_TARGET_CPU" = xsparcv9; then
+      OPENJDK_TARGET_CPU_ISADIR="/sparcv9"
     fi
-    AC_SUBST(OPENJDK_TARGET_CPU_ISADIR)
+  fi
+  AC_SUBST(OPENJDK_TARGET_CPU_ISADIR)
 
-    # Setup OPENJDK_TARGET_CPU_OSARCH, which is used to set the os.arch Java system property
-    OPENJDK_TARGET_CPU_OSARCH="$OPENJDK_TARGET_CPU"
-    if test "x$OPENJDK_TARGET_OS" = xlinux && test "x$OPENJDK_TARGET_CPU" = xx86; then
-      # On linux only, we replace x86 with i386.
-      OPENJDK_TARGET_CPU_OSARCH="i386"
-    elif test "x$OPENJDK_TARGET_OS" != xmacosx && test "x$OPENJDK_TARGET_CPU" = xx86_64; then
-      # On all platforms except macosx, we replace x86_64 with amd64.
-      OPENJDK_TARGET_CPU_OSARCH="amd64"
-    fi
-    AC_SUBST(OPENJDK_TARGET_CPU_OSARCH)
+  # Setup OPENJDK_TARGET_CPU_OSARCH, which is used to set the os.arch Java system property
+  OPENJDK_TARGET_CPU_OSARCH="$OPENJDK_TARGET_CPU"
+  if test "x$OPENJDK_TARGET_OS" = xlinux && test "x$OPENJDK_TARGET_CPU" = xx86; then
+    # On linux only, we replace x86 with i386.
+    OPENJDK_TARGET_CPU_OSARCH="i386"
+  elif test "x$OPENJDK_TARGET_OS" != xmacosx && test "x$OPENJDK_TARGET_CPU" = xx86_64; then
+    # On all platforms except macosx, we replace x86_64 with amd64.
+    OPENJDK_TARGET_CPU_OSARCH="amd64"
+  fi
+  AC_SUBST(OPENJDK_TARGET_CPU_OSARCH)
 
-    OPENJDK_TARGET_CPU_JLI="$OPENJDK_TARGET_CPU"
-    if test "x$OPENJDK_TARGET_CPU" = xx86; then 
-      OPENJDK_TARGET_CPU_JLI="i386"
-    elif test "x$OPENJDK_TARGET_OS" != xmacosx && test "x$OPENJDK_TARGET_CPU" = xx86_64; then
-      # On all platforms except macosx, we replace x86_64 with amd64.
-      OPENJDK_TARGET_CPU_JLI="amd64"
+  OPENJDK_TARGET_CPU_JLI="$OPENJDK_TARGET_CPU"
+  if test "x$OPENJDK_TARGET_CPU" = xx86; then
+    OPENJDK_TARGET_CPU_JLI="i386"
+  elif test "x$OPENJDK_TARGET_OS" != xmacosx && test "x$OPENJDK_TARGET_CPU" = xx86_64; then
+    # On all platforms except macosx, we replace x86_64 with amd64.
+    OPENJDK_TARGET_CPU_JLI="amd64"
+  fi
+  # Now setup the -D flags for building libjli.
+  OPENJDK_TARGET_CPU_JLI_CFLAGS="-DLIBARCHNAME='\"$OPENJDK_TARGET_CPU_JLI\"'"
+  if test "x$OPENJDK_TARGET_OS" = xsolaris; then
+    if test "x$OPENJDK_TARGET_CPU_ARCH" = xsparc; then
+      OPENJDK_TARGET_CPU_JLI_CFLAGS="$OPENJDK_TARGET_CPU_JLI_CFLAGS -DLIBARCH32NAME='\"sparc\"' -DLIBARCH64NAME='\"sparcv9\"'"
+    elif test "x$OPENJDK_TARGET_CPU_ARCH" = xx86; then
+      OPENJDK_TARGET_CPU_JLI_CFLAGS="$OPENJDK_TARGET_CPU_JLI_CFLAGS -DLIBARCH32NAME='\"i386\"' -DLIBARCH64NAME='\"amd64\"'"
     fi
-    # Now setup the -D flags for building libjli.
-    OPENJDK_TARGET_CPU_JLI_CFLAGS="-DLIBARCHNAME='\"$OPENJDK_TARGET_CPU_JLI\"'"
-    if test "x$OPENJDK_TARGET_OS" = xsolaris; then
-      if test "x$OPENJDK_TARGET_CPU_ARCH" = xsparc; then
-        OPENJDK_TARGET_CPU_JLI_CFLAGS="$OPENJDK_TARGET_CPU_JLI_CFLAGS -DLIBARCH32NAME='\"sparc\"' -DLIBARCH64NAME='\"sparcv9\"'"
-      elif test "x$OPENJDK_TARGET_CPU_ARCH" = xx86; then 
-        OPENJDK_TARGET_CPU_JLI_CFLAGS="$OPENJDK_TARGET_CPU_JLI_CFLAGS -DLIBARCH32NAME='\"i386\"' -DLIBARCH64NAME='\"amd64\"'"
-      fi
-    fi
-    AC_SUBST(OPENJDK_TARGET_CPU_JLI_CFLAGS)
+  fi
+  AC_SUBST(OPENJDK_TARGET_CPU_JLI_CFLAGS)
 
-    # Setup OPENJDK_TARGET_OS_API_DIR, used in source paths.
-    if test "x$OPENJDK_TARGET_OS_API" = xposix; then
-        OPENJDK_TARGET_OS_API_DIR="solaris"
-    fi
-    if test "x$OPENJDK_TARGET_OS_API" = xwinapi; then
-        OPENJDK_TARGET_OS_API_DIR="windows"
-    fi
-    AC_SUBST(OPENJDK_TARGET_OS_API_DIR)
+  # Setup OPENJDK_TARGET_OS_API_DIR, used in source paths.
+  if test "x$OPENJDK_TARGET_OS_API" = xposix; then
+    OPENJDK_TARGET_OS_API_DIR="solaris"
+  fi
+  if test "x$OPENJDK_TARGET_OS_API" = xwinapi; then
+    OPENJDK_TARGET_OS_API_DIR="windows"
+  fi
+  AC_SUBST(OPENJDK_TARGET_OS_API_DIR)
 
-    if test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
-        A_LP64="LP64:="
-        # -D_LP64=1 is only set on linux and mac. Setting on windows causes diff in 
-        # unpack200.exe
-        if test "x$OPENJDK_TARGET_OS" = xlinux || test "x$OPENJDK_TARGET_OS" = xmacosx; then
-            ADD_LP64="-D_LP64=1"
-        fi
+  if test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
+    A_LP64="LP64:="
+    # -D_LP64=1 is only set on linux and mac. Setting on windows causes diff in
+    # unpack200.exe
+    if test "x$OPENJDK_TARGET_OS" = xlinux || test "x$OPENJDK_TARGET_OS" = xmacosx; then
+      ADD_LP64="-D_LP64=1"
     fi
-    AC_SUBST(LP64,$A_LP64)
+  fi
+  AC_SUBST(LP64,$A_LP64)
 
-    if test "x$COMPILE_TYPE" = "xcross"; then
-      # FIXME: ... or should this include reduced builds..?
-      DEFINE_CROSS_COMPILE_ARCH="CROSS_COMPILE_ARCH:=$OPENJDK_TARGET_CPU_LEGACY"
-    else
-      DEFINE_CROSS_COMPILE_ARCH=""
-    fi
-    AC_SUBST(DEFINE_CROSS_COMPILE_ARCH)
+  if test "x$COMPILE_TYPE" = "xcross"; then
+    # FIXME: ... or should this include reduced builds..?
+    DEFINE_CROSS_COMPILE_ARCH="CROSS_COMPILE_ARCH:=$OPENJDK_TARGET_CPU_LEGACY"
+  else
+    DEFINE_CROSS_COMPILE_ARCH=""
+  fi
+  AC_SUBST(DEFINE_CROSS_COMPILE_ARCH)
 
-    # ZERO_ARCHDEF is used to enable architecture-specific code
-    case "${OPENJDK_TARGET_CPU}" in
-      ppc*)    ZERO_ARCHDEF=PPC   ;;
-      s390*)   ZERO_ARCHDEF=S390  ;;
-      sparc*)  ZERO_ARCHDEF=SPARC ;;
-      x86_64*) ZERO_ARCHDEF=AMD64 ;;
-      x86)     ZERO_ARCHDEF=IA32  ;;
-      *)      ZERO_ARCHDEF=$(echo "${OPENJDK_TARGET_CPU_LEGACY_LIB}" | tr a-z A-Z)
-    esac
-    AC_SUBST(ZERO_ARCHDEF)
-
+  # ZERO_ARCHDEF is used to enable architecture-specific code
+  case "${OPENJDK_TARGET_CPU}" in
+    ppc*)    ZERO_ARCHDEF=PPC   ;;
+    s390*)   ZERO_ARCHDEF=S390  ;;
+    sparc*)  ZERO_ARCHDEF=SPARC ;;
+    x86_64*) ZERO_ARCHDEF=AMD64 ;;
+    x86)     ZERO_ARCHDEF=IA32  ;;
+    *)      ZERO_ARCHDEF=$(echo "${OPENJDK_TARGET_CPU_LEGACY_LIB}" | tr a-z A-Z)
+  esac
+  AC_SUBST(ZERO_ARCHDEF)
 ])
 
 AC_DEFUN([PLATFORM_SET_RELEASE_FILE_OS_VALUES],
 [
-    if test "x$OPENJDK_TARGET_OS" = "xsolaris"; then
-       REQUIRED_OS_NAME=SunOS
-       REQUIRED_OS_VERSION=5.10
+  if test "x$OPENJDK_TARGET_OS" = "xsolaris"; then
+    REQUIRED_OS_NAME=SunOS
+    REQUIRED_OS_VERSION=5.10
+  fi
+  if test "x$OPENJDK_TARGET_OS" = "xlinux"; then
+    REQUIRED_OS_NAME=Linux
+    REQUIRED_OS_VERSION=2.6
+  fi
+  if test "x$OPENJDK_TARGET_OS" = "xwindows"; then
+    REQUIRED_OS_NAME=Windows
+    if test "x$OPENJDK_TARGET_CPU_BITS" = "x64"; then
+      REQUIRED_OS_VERSION=5.2
+    else
+      REQUIRED_OS_VERSION=5.1
     fi
-    if test "x$OPENJDK_TARGET_OS" = "xlinux"; then
-       REQUIRED_OS_NAME=Linux
-       REQUIRED_OS_VERSION=2.6
-    fi
-    if test "x$OPENJDK_TARGET_OS" = "xwindows"; then
-        REQUIRED_OS_NAME=Windows
-        if test "x$OPENJDK_TARGET_CPU_BITS" = "x64"; then
-            REQUIRED_OS_VERSION=5.2
-        else
-            REQUIRED_OS_VERSION=5.1
-        fi
-    fi
-    if test "x$OPENJDK_TARGET_OS" = "xmacosx"; then
-        REQUIRED_OS_NAME=Darwin
-        REQUIRED_OS_VERSION=11.2
-    fi
+  fi
+  if test "x$OPENJDK_TARGET_OS" = "xmacosx"; then
+    REQUIRED_OS_NAME=Darwin
+    REQUIRED_OS_VERSION=11.2
+  fi
 
-    AC_SUBST(REQUIRED_OS_NAME)
-    AC_SUBST(REQUIRED_OS_VERSION)
+  AC_SUBST(REQUIRED_OS_NAME)
+  AC_SUBST(REQUIRED_OS_VERSION)
 ])
 
 #%%% Build and target systems %%%
 AC_DEFUN_ONCE([PLATFORM_SETUP_OPENJDK_BUILD_AND_TARGET],
 [
-# Figure out the build and target systems. # Note that in autoconf terminology, "build" is obvious, but "target"
-# is confusing; it assumes you are cross-compiling a cross-compiler (!)  and "target" is thus the target of the
-# product you're building. The target of this build is called "host". Since this is confusing to most people, we
-# have not adopted that system, but use "target" as the platform we are building for. In some places though we need
-# to use the configure naming style.
-AC_CANONICAL_BUILD
-AC_CANONICAL_HOST
-AC_CANONICAL_TARGET
+  # Figure out the build and target systems. # Note that in autoconf terminology, "build" is obvious, but "target"
+  # is confusing; it assumes you are cross-compiling a cross-compiler (!)  and "target" is thus the target of the
+  # product you're building. The target of this build is called "host". Since this is confusing to most people, we
+  # have not adopted that system, but use "target" as the platform we are building for. In some places though we need
+  # to use the configure naming style.
+  AC_CANONICAL_BUILD
+  AC_CANONICAL_HOST
+  AC_CANONICAL_TARGET
 
-PLATFORM_EXTRACT_TARGET_AND_BUILD
-PLATFORM_SETUP_TARGET_CPU_BITS
-PLATFORM_SET_RELEASE_FILE_OS_VALUES
-PLATFORM_SETUP_LEGACY_VARS
+  PLATFORM_EXTRACT_TARGET_AND_BUILD
+  PLATFORM_SETUP_TARGET_CPU_BITS
+  PLATFORM_SET_RELEASE_FILE_OS_VALUES
+  PLATFORM_SETUP_LEGACY_VARS
 ])
 
 AC_DEFUN_ONCE([PLATFORM_SETUP_OPENJDK_BUILD_OS_VERSION],
 [
-###############################################################################
+  ###############################################################################
 
-# Note that this is the build platform OS version!
+  # Note that this is the build platform OS version!
 
-OS_VERSION="`uname -r | ${SED} 's!\.! !g' | ${SED} 's!-! !g'`"
-OS_VERSION_MAJOR="`${ECHO} ${OS_VERSION} | ${CUT} -f 1 -d ' '`"
-OS_VERSION_MINOR="`${ECHO} ${OS_VERSION} | ${CUT} -f 2 -d ' '`"
-OS_VERSION_MICRO="`${ECHO} ${OS_VERSION} | ${CUT} -f 3 -d ' '`"
-AC_SUBST(OS_VERSION_MAJOR)
-AC_SUBST(OS_VERSION_MINOR)
-AC_SUBST(OS_VERSION_MICRO)
+  OS_VERSION="`uname -r | ${SED} 's!\.! !g' | ${SED} 's!-! !g'`"
+  OS_VERSION_MAJOR="`${ECHO} ${OS_VERSION} | ${CUT} -f 1 -d ' '`"
+  OS_VERSION_MINOR="`${ECHO} ${OS_VERSION} | ${CUT} -f 2 -d ' '`"
+  OS_VERSION_MICRO="`${ECHO} ${OS_VERSION} | ${CUT} -f 3 -d ' '`"
+  AC_SUBST(OS_VERSION_MAJOR)
+  AC_SUBST(OS_VERSION_MINOR)
+  AC_SUBST(OS_VERSION_MICRO)
 ])
 
 # Support macro for PLATFORM_SETUP_OPENJDK_TARGET_BITS.
@@ -441,68 +440,68 @@
 
 AC_DEFUN_ONCE([PLATFORM_SETUP_OPENJDK_TARGET_BITS],
 [
-###############################################################################
-#
-# Now we check if libjvm.so will use 32 or 64 bit pointers for the C/C++ code.
-# (The JVM can use 32 or 64 bit Java pointers but that decision
-# is made at runtime.)
-#
+  ###############################################################################
+  #
+  # Now we check if libjvm.so will use 32 or 64 bit pointers for the C/C++ code.
+  # (The JVM can use 32 or 64 bit Java pointers but that decision
+  # is made at runtime.)
+  #
 
-if test "x$OPENJDK_TARGET_OS" = xsolaris; then
-  # Always specify -m flags on Solaris
-  PLATFORM_SET_COMPILER_TARGET_BITS_FLAGS
-elif test "x$COMPILE_TYPE" = xreduced; then
-  if test "x$OPENJDK_TARGET_OS" != xwindows; then
-    # Specify -m if running reduced on other Posix platforms
+  if test "x$OPENJDK_TARGET_OS" = xsolaris; then
+    # Always specify -m flags on Solaris
     PLATFORM_SET_COMPILER_TARGET_BITS_FLAGS
+  elif test "x$COMPILE_TYPE" = xreduced; then
+    if test "x$OPENJDK_TARGET_OS" != xwindows; then
+      # Specify -m if running reduced on other Posix platforms
+      PLATFORM_SET_COMPILER_TARGET_BITS_FLAGS
+    fi
   fi
-fi
 
-# Make compilation sanity check
-AC_CHECK_HEADERS([stdio.h], , [
-  AC_MSG_NOTICE([Failed to compile stdio.h. This likely implies missing compile dependencies.])
-  if test "x$COMPILE_TYPE" = xreduced; then
-    AC_MSG_NOTICE([You are doing a reduced build. Check that you have 32-bit libraries installed.])
-  elif test "x$COMPILE_TYPE" = xcross; then
-    AC_MSG_NOTICE([You are doing a cross-compilation. Check that you have all target platform libraries installed.])
+  # Make compilation sanity check
+  AC_CHECK_HEADERS([stdio.h], , [
+    AC_MSG_NOTICE([Failed to compile stdio.h. This likely implies missing compile dependencies.])
+    if test "x$COMPILE_TYPE" = xreduced; then
+      AC_MSG_NOTICE([You are doing a reduced build. Check that you have 32-bit libraries installed.])
+    elif test "x$COMPILE_TYPE" = xcross; then
+      AC_MSG_NOTICE([You are doing a cross-compilation. Check that you have all target platform libraries installed.])
+    fi
+    AC_MSG_ERROR([Cannot continue.])
+  ])
+
+  AC_CHECK_SIZEOF([int *], [1111])
+
+  if test "x$SIZEOF_INT_P" != "x$ac_cv_sizeof_int_p"; then
+    # Workaround autoconf bug, see http://lists.gnu.org/archive/html/autoconf/2010-07/msg00004.html
+    SIZEOF_INT_P="$ac_cv_sizeof_int_p"
   fi
-  AC_MSG_ERROR([Cannot continue.])
-])
 
-AC_CHECK_SIZEOF([int *], [1111])
-
-if test "x$SIZEOF_INT_P" != "x$ac_cv_sizeof_int_p"; then
-  # Workaround autoconf bug, see http://lists.gnu.org/archive/html/autoconf/2010-07/msg00004.html
-  SIZEOF_INT_P="$ac_cv_sizeof_int_p"
-fi
-
-if test "x$SIZEOF_INT_P" = x; then 
+  if test "x$SIZEOF_INT_P" = x; then
     # The test failed, lets stick to the assumed value.
     AC_MSG_WARN([The number of bits in the target could not be determined, using $OPENJDK_TARGET_CPU_BITS.])
-else
+  else
     TESTED_TARGET_CPU_BITS=`expr 8 \* $SIZEOF_INT_P`
 
     if test "x$TESTED_TARGET_CPU_BITS" != "x$OPENJDK_TARGET_CPU_BITS"; then
-        AC_MSG_ERROR([The tested number of bits in the target ($TESTED_TARGET_CPU_BITS) differs from the number of bits expected to be found in the target ($OPENJDK_TARGET_CPU_BITS)])
+      AC_MSG_ERROR([The tested number of bits in the target ($TESTED_TARGET_CPU_BITS) differs from the number of bits expected to be found in the target ($OPENJDK_TARGET_CPU_BITS)])
     fi
-fi
+  fi
 
-AC_MSG_CHECKING([for target address size])
-AC_MSG_RESULT([$OPENJDK_TARGET_CPU_BITS bits])
+  AC_MSG_CHECKING([for target address size])
+  AC_MSG_RESULT([$OPENJDK_TARGET_CPU_BITS bits])
 ])
 
 AC_DEFUN_ONCE([PLATFORM_SETUP_OPENJDK_TARGET_ENDIANNESS],
 [
-###############################################################################
-#
-# Is the target little of big endian?
-#
-AC_C_BIGENDIAN([ENDIAN="big"],[ENDIAN="little"],[ENDIAN="unknown"],[ENDIAN="universal_endianness"])
+  ###############################################################################
+  #
+  # Is the target little of big endian?
+  #
+  AC_C_BIGENDIAN([ENDIAN="big"],[ENDIAN="little"],[ENDIAN="unknown"],[ENDIAN="universal_endianness"])
 
-if test "x$ENDIAN" = xuniversal_endianness; then
+  if test "x$ENDIAN" = xuniversal_endianness; then
     AC_MSG_ERROR([Building with both big and little endianness is not supported])
-fi
-if test "x$ENDIAN" != "x$OPENJDK_TARGET_CPU_ENDIAN"; then
+  fi
+  if test "x$ENDIAN" != "x$OPENJDK_TARGET_CPU_ENDIAN"; then
     AC_MSG_ERROR([The tested endian in the target ($ENDIAN) differs from the endian expected to be found in the target ($OPENJDK_TARGET_CPU_ENDIAN)])
-fi
+  fi
 ])
diff --git a/common/autoconf/source-dirs.m4 b/common/autoconf/source-dirs.m4
index e040cc8..e5d1262 100644
--- a/common/autoconf/source-dirs.m4
+++ b/common/autoconf/source-dirs.m4
@@ -25,55 +25,54 @@
 
 AC_DEFUN_ONCE([SRCDIRS_SETUP_TOPDIRS],
 [
-
-# Where are the sources. Any of these can be overridden
-# using --with-override-corba and the likes.
-LANGTOOLS_TOPDIR="$SRC_ROOT/langtools"
-CORBA_TOPDIR="$SRC_ROOT/corba"
-JAXP_TOPDIR="$SRC_ROOT/jaxp"
-JAXWS_TOPDIR="$SRC_ROOT/jaxws"
-HOTSPOT_TOPDIR="$SRC_ROOT/hotspot"
-NASHORN_TOPDIR="$SRC_ROOT/nashorn"
-JDK_TOPDIR="$SRC_ROOT/jdk"
-AC_SUBST(LANGTOOLS_TOPDIR)
-AC_SUBST(CORBA_TOPDIR)
-AC_SUBST(JAXP_TOPDIR)
-AC_SUBST(JAXWS_TOPDIR)
-AC_SUBST(HOTSPOT_TOPDIR)
-AC_SUBST(NASHORN_TOPDIR)
-AC_SUBST(JDK_TOPDIR)
+  # Where are the sources. Any of these can be overridden
+  # using --with-override-corba and the likes.
+  LANGTOOLS_TOPDIR="$SRC_ROOT/langtools"
+  CORBA_TOPDIR="$SRC_ROOT/corba"
+  JAXP_TOPDIR="$SRC_ROOT/jaxp"
+  JAXWS_TOPDIR="$SRC_ROOT/jaxws"
+  HOTSPOT_TOPDIR="$SRC_ROOT/hotspot"
+  NASHORN_TOPDIR="$SRC_ROOT/nashorn"
+  JDK_TOPDIR="$SRC_ROOT/jdk"
+  AC_SUBST(LANGTOOLS_TOPDIR)
+  AC_SUBST(CORBA_TOPDIR)
+  AC_SUBST(JAXP_TOPDIR)
+  AC_SUBST(JAXWS_TOPDIR)
+  AC_SUBST(HOTSPOT_TOPDIR)
+  AC_SUBST(NASHORN_TOPDIR)
+  AC_SUBST(JDK_TOPDIR)
 ])
 
 
 AC_DEFUN_ONCE([SRCDIRS_SETUP_ALTERNATIVE_TOPDIRS],
 [
 
-###############################################################################
-#
-# Pickup additional source for a component from outside of the source root
-# or override source for a component. 
-#
-AC_ARG_WITH(add-source-root, [AS_HELP_STRING([--with-add-source-root],
-    [for each and every source directory, look in this additional source root for
-     the same directory; if it exists and have files in it, include it in the build])])                             
-                             
-AC_ARG_WITH(override-source-root, [AS_HELP_STRING([--with-override-source-root],
-    [for each and every source directory, look in this override source root for
-     the same directory; if it exists, use that directory instead and
-     ignore the directory in the original source root])])
+  ###############################################################################
+  #
+  # Pickup additional source for a component from outside of the source root
+  # or override source for a component.
+  #
+  AC_ARG_WITH(add-source-root, [AS_HELP_STRING([--with-add-source-root],
+      [for each and every source directory, look in this additional source root for
+      the same directory; if it exists and have files in it, include it in the build])])
 
-AC_ARG_WITH(adds-and-overrides, [AS_HELP_STRING([--with-adds-and-overrides],
-    [use the subdirs 'adds' and 'overrides' in the specified directory as
-     add-source-root and override-source-root])])
+  AC_ARG_WITH(override-source-root, [AS_HELP_STRING([--with-override-source-root],
+      [for each and every source directory, look in this override source root for
+      the same directory; if it exists, use that directory instead and
+      ignore the directory in the original source root])])
 
-if test "x$with_adds_and_overrides" != x; then
+  AC_ARG_WITH(adds-and-overrides, [AS_HELP_STRING([--with-adds-and-overrides],
+      [use the subdirs 'adds' and 'overrides' in the specified directory as
+      add-source-root and override-source-root])])
+
+  if test "x$with_adds_and_overrides" != x; then
     with_add_source_root="$with_adds_and_overrides/adds"
     with_override_source_root="$with_adds_and_overrides/overrides"
-fi
+  fi
 
-if test "x$with_add_source_root" != x; then
+  if test "x$with_add_source_root" != x; then
     if ! test -d $with_add_source_root; then
-       AC_MSG_ERROR([Trying to use a non-existant add-source-root $with_add_source_root])
+      AC_MSG_ERROR([Trying to use a non-existant add-source-root $with_add_source_root])
     fi
     CURDIR="$PWD"
     cd "$with_add_source_root"
@@ -82,219 +81,218 @@
     # Verify that the addon source root does not have any root makefiles.
     # If it does, then it is usually an error, prevent this.
     if test -f $with_add_source_root/langtools/makefiles/Makefile || \
-       test -f $with_add_source_root/langtools/make/Makefile; then
-        AC_MSG_ERROR([Your add source root seems to contain a full langtools repo! An add source root should only contain additional sources.])
+      test -f $with_add_source_root/langtools/make/Makefile; then
+      AC_MSG_ERROR([Your add source root seems to contain a full langtools repo! An add source root should only contain additional sources.])
     fi
     if test -f $with_add_source_root/corba/makefiles/Makefile || \
-       test -f $with_add_source_root/corba/make/Makefile; then
-        AC_MSG_ERROR([Your add source root seems to contain a full corba repo! An add source root should only contain additional sources.])
+      test -f $with_add_source_root/corba/make/Makefile; then
+      AC_MSG_ERROR([Your add source root seems to contain a full corba repo! An add source root should only contain additional sources.])
     fi
     if test -f $with_add_source_root/jaxp/makefiles/Makefile || \
-       test -f $with_add_source_root/jaxp/make/Makefile; then
-        AC_MSG_ERROR([Your add source root seems to contain a full jaxp repo! An add source root should only contain additional sources.])
+      test -f $with_add_source_root/jaxp/make/Makefile; then
+      AC_MSG_ERROR([Your add source root seems to contain a full jaxp repo! An add source root should only contain additional sources.])
     fi
     if test -f $with_add_source_root/jaxws/makefiles/Makefile || \
-       test -f $with_add_source_root/jaxws/make/Makefile; then
-        AC_MSG_ERROR([Your add source root seems to contain a full jaxws repo! An add source root should only contain additional sources.])
+      test -f $with_add_source_root/jaxws/make/Makefile; then
+      AC_MSG_ERROR([Your add source root seems to contain a full jaxws repo! An add source root should only contain additional sources.])
     fi
     if test -f $with_add_source_root/hotspot/makefiles/Makefile || \
-       test -f $with_add_source_root/hotspot/make/Makefile; then
-        AC_MSG_ERROR([Your add source root seems to contain a full hotspot repo! An add source root should only contain additional sources.])
+      test -f $with_add_source_root/hotspot/make/Makefile; then
+      AC_MSG_ERROR([Your add source root seems to contain a full hotspot repo! An add source root should only contain additional sources.])
     fi
     if test -f $with_add_source_root/nashorn/makefiles/Makefile || \
-       test -f $with_add_source_root/nashorn/make/Makefile; then
-        AC_MSG_ERROR([Your add source root seems to contain a full nashorn repo! An add source root should only contain additional sources.])
+      test -f $with_add_source_root/nashorn/make/Makefile; then
+      AC_MSG_ERROR([Your add source root seems to contain a full nashorn repo! An add source root should only contain additional sources.])
     fi
     if test -f $with_add_source_root/jdk/makefiles/Makefile || \
-       test -f $with_add_source_root/jdk/make/Makefile; then
-        AC_MSG_ERROR([Your add source root seems to contain a full JDK repo! An add source root should only contain additional sources.])
+      test -f $with_add_source_root/jdk/make/Makefile; then
+      AC_MSG_ERROR([Your add source root seems to contain a full JDK repo! An add source root should only contain additional sources.])
     fi
-fi
-AC_SUBST(ADD_SRC_ROOT)
+  fi
+  AC_SUBST(ADD_SRC_ROOT)
 
-if test "x$with_override_source_root" != x; then
+  if test "x$with_override_source_root" != x; then
     if ! test -d $with_override_source_root; then
-       AC_MSG_ERROR([Trying to use a non-existant override-source-root $with_override_source_root])
+      AC_MSG_ERROR([Trying to use a non-existant override-source-root $with_override_source_root])
     fi
     CURDIR="$PWD"
     cd "$with_override_source_root"
     OVERRIDE_SRC_ROOT="`pwd`"
     cd "$CURDIR"
     if test -f $with_override_source_root/langtools/makefiles/Makefile || \
-       test -f $with_override_source_root/langtools/make/Makefile; then
-        AC_MSG_ERROR([Your override source root seems to contain a full langtools repo! An override source root should only contain sources that override.])
+      test -f $with_override_source_root/langtools/make/Makefile; then
+      AC_MSG_ERROR([Your override source root seems to contain a full langtools repo! An override source root should only contain sources that override.])
     fi
     if test -f $with_override_source_root/corba/makefiles/Makefile || \
-       test -f $with_override_source_root/corba/make/Makefile; then
-        AC_MSG_ERROR([Your override source root seems to contain a full corba repo! An override source root should only contain sources that override.])
+      test -f $with_override_source_root/corba/make/Makefile; then
+      AC_MSG_ERROR([Your override source root seems to contain a full corba repo! An override source root should only contain sources that override.])
     fi
     if test -f $with_override_source_root/jaxp/makefiles/Makefile || \
-       test -f $with_override_source_root/jaxp/make/Makefile; then
-        AC_MSG_ERROR([Your override source root seems to contain a full jaxp repo! An override source root should only contain sources that override.])
+      test -f $with_override_source_root/jaxp/make/Makefile; then
+      AC_MSG_ERROR([Your override source root seems to contain a full jaxp repo! An override source root should only contain sources that override.])
     fi
     if test -f $with_override_source_root/jaxws/makefiles/Makefile || \
-       test -f $with_override_source_root/jaxws/make/Makefile; then
-        AC_MSG_ERROR([Your override source root seems to contain a full jaxws repo! An override source root should only contain sources that override.])
+      test -f $with_override_source_root/jaxws/make/Makefile; then
+      AC_MSG_ERROR([Your override source root seems to contain a full jaxws repo! An override source root should only contain sources that override.])
     fi
     if test -f $with_override_source_root/hotspot/makefiles/Makefile || \
-       test -f $with_override_source_root/hotspot/make/Makefile; then
-        AC_MSG_ERROR([Your override source root seems to contain a full hotspot repo! An override source root should only contain sources that override.])
+      test -f $with_override_source_root/hotspot/make/Makefile; then
+      AC_MSG_ERROR([Your override source root seems to contain a full hotspot repo! An override source root should only contain sources that override.])
     fi
     if test -f $with_override_source_root/nashorn/makefiles/Makefile || \
-       test -f $with_override_source_root/nashorn/make/Makefile; then
-        AC_MSG_ERROR([Your override source root seems to contain a full nashorn repo! An override source root should only contain sources that override.])
+      test -f $with_override_source_root/nashorn/make/Makefile; then
+      AC_MSG_ERROR([Your override source root seems to contain a full nashorn repo! An override source root should only contain sources that override.])
     fi
     if test -f $with_override_source_root/jdk/makefiles/Makefile || \
-       test -f $with_override_source_root/jdk/make/Makefile; then
-        AC_MSG_ERROR([Your override source root seems to contain a full JDK repo! An override source root should only contain sources that override.])
+      test -f $with_override_source_root/jdk/make/Makefile; then
+      AC_MSG_ERROR([Your override source root seems to contain a full JDK repo! An override source root should only contain sources that override.])
     fi
-fi
-AC_SUBST(OVERRIDE_SRC_ROOT)
+  fi
+  AC_SUBST(OVERRIDE_SRC_ROOT)
 
-###############################################################################
-#
-# Override a repo completely, this is used for example when you have 3 small
-# development sandboxes of the langtools sources and want to avoid having 3 full
-# OpenJDK sources checked out on disk.
-#
-# Assuming that the 3 langtools sandboxes are located here:
-# /home/fredrik/sandbox1/langtools
-# /home/fredrik/sandbox2/langtools
-# /home/fredrik/sandbox3/langtools
-#
-# From the source root you create build subdirs manually:
-#     mkdir -p build1 build2 build3 
-# in each build directory run:
-#     (cd build1 && ../configure --with-override-langtools=/home/fredrik/sandbox1 && make)
-#     (cd build2 && ../configure --with-override-langtools=/home/fredrik/sandbox2 && make)
-#     (cd build3 && ../configure --with-override-langtools=/home/fredrik/sandbox3 && make)
-#
+  ###############################################################################
+  #
+  # Override a repo completely, this is used for example when you have 3 small
+  # development sandboxes of the langtools sources and want to avoid having 3 full
+  # OpenJDK sources checked out on disk.
+  #
+  # Assuming that the 3 langtools sandboxes are located here:
+  # /home/fredrik/sandbox1/langtools
+  # /home/fredrik/sandbox2/langtools
+  # /home/fredrik/sandbox3/langtools
+  #
+  # From the source root you create build subdirs manually:
+  #     mkdir -p build1 build2 build3
+  # in each build directory run:
+  #     (cd build1 && ../configure --with-override-langtools=/home/fredrik/sandbox1 && make)
+  #     (cd build2 && ../configure --with-override-langtools=/home/fredrik/sandbox2 && make)
+  #     (cd build3 && ../configure --with-override-langtools=/home/fredrik/sandbox3 && make)
+  #
 
-AC_ARG_WITH(override-langtools, [AS_HELP_STRING([--with-override-langtools],
-    [use this langtools dir for the build])])
+  AC_ARG_WITH(override-langtools, [AS_HELP_STRING([--with-override-langtools],
+      [use this langtools dir for the build])])
 
-AC_ARG_WITH(override-corba, [AS_HELP_STRING([--with-override-corba],
-    [use this corba dir for the build])])
+  AC_ARG_WITH(override-corba, [AS_HELP_STRING([--with-override-corba],
+      [use this corba dir for the build])])
 
-AC_ARG_WITH(override-jaxp, [AS_HELP_STRING([--with-override-jaxp],
-	[use this jaxp dir for the build])])
+  AC_ARG_WITH(override-jaxp, [AS_HELP_STRING([--with-override-jaxp],
+      [use this jaxp dir for the build])])
 
-AC_ARG_WITH(override-jaxws, [AS_HELP_STRING([--with-override-jaxws],
-	[use this jaxws dir for the build])])
+  AC_ARG_WITH(override-jaxws, [AS_HELP_STRING([--with-override-jaxws],
+      [use this jaxws dir for the build])])
 
-AC_ARG_WITH(override-hotspot, [AS_HELP_STRING([--with-override-hotspot],
-	[use this hotspot dir for the build])])
+  AC_ARG_WITH(override-hotspot, [AS_HELP_STRING([--with-override-hotspot],
+      [use this hotspot dir for the build])])
 
-AC_ARG_WITH(override-nashorn, [AS_HELP_STRING([--with-override-nashorn],
-	[use this nashorn dir for the build])])
+  AC_ARG_WITH(override-nashorn, [AS_HELP_STRING([--with-override-nashorn],
+      [use this nashorn dir for the build])])
 
-AC_ARG_WITH(override-jdk, [AS_HELP_STRING([--with-override-jdk],
-	[use this jdk dir for the build])])
+  AC_ARG_WITH(override-jdk, [AS_HELP_STRING([--with-override-jdk],
+      [use this jdk dir for the build])])
 
-if test "x$with_override_langtools" != x; then
+  if test "x$with_override_langtools" != x; then
     CURDIR="$PWD"
     cd "$with_override_langtools"
     LANGTOOLS_TOPDIR="`pwd`"
     cd "$CURDIR"
     if ! test -f $LANGTOOLS_TOPDIR/makefiles/Makefile; then
-        AC_MSG_ERROR([You have to override langtools with a full langtools repo!])
+      AC_MSG_ERROR([You have to override langtools with a full langtools repo!])
     fi
     AC_MSG_CHECKING([if langtools should be overridden])
     AC_MSG_RESULT([yes with $LANGTOOLS_TOPDIR])
-fi    
-if test "x$with_override_corba" != x; then
+  fi
+  if test "x$with_override_corba" != x; then
     CURDIR="$PWD"
     cd "$with_override_corba"
     CORBA_TOPDIR="`pwd`"
     cd "$CURDIR"
     if ! test -f $CORBA_TOPDIR/makefiles/Makefile; then
-        AC_MSG_ERROR([You have to override corba with a full corba repo!])
+      AC_MSG_ERROR([You have to override corba with a full corba repo!])
     fi
     AC_MSG_CHECKING([if corba should be overridden])
     AC_MSG_RESULT([yes with $CORBA_TOPDIR])
-fi    
-if test "x$with_override_jaxp" != x; then
+  fi
+  if test "x$with_override_jaxp" != x; then
     CURDIR="$PWD"
     cd "$with_override_jaxp"
     JAXP_TOPDIR="`pwd`"
     cd "$CURDIR"
     if ! test -f $JAXP_TOPDIR/makefiles/Makefile; then
-        AC_MSG_ERROR([You have to override jaxp with a full jaxp repo!])
+      AC_MSG_ERROR([You have to override jaxp with a full jaxp repo!])
     fi
     AC_MSG_CHECKING([if jaxp should be overridden])
     AC_MSG_RESULT([yes with $JAXP_TOPDIR])
-fi    
-if test "x$with_override_jaxws" != x; then
+  fi
+  if test "x$with_override_jaxws" != x; then
     CURDIR="$PWD"
     cd "$with_override_jaxws"
     JAXWS_TOPDIR="`pwd`"
     cd "$CURDIR"
     if ! test -f $JAXWS_TOPDIR/makefiles/Makefile; then
-        AC_MSG_ERROR([You have to override jaxws with a full jaxws repo!])
+      AC_MSG_ERROR([You have to override jaxws with a full jaxws repo!])
     fi
     AC_MSG_CHECKING([if jaxws should be overridden])
     AC_MSG_RESULT([yes with $JAXWS_TOPDIR])
-fi    
-if test "x$with_override_hotspot" != x; then
+  fi
+  if test "x$with_override_hotspot" != x; then
     CURDIR="$PWD"
     cd "$with_override_hotspot"
     HOTSPOT_TOPDIR="`pwd`"
     cd "$CURDIR"
     if ! test -f $HOTSPOT_TOPDIR/make/Makefile && \
-       ! test -f $HOTSPOT_TOPDIR/makefiles/Makefile; then
-        AC_MSG_ERROR([You have to override hotspot with a full hotspot repo!])
+        ! test -f $HOTSPOT_TOPDIR/makefiles/Makefile; then
+      AC_MSG_ERROR([You have to override hotspot with a full hotspot repo!])
     fi
     AC_MSG_CHECKING([if hotspot should be overridden])
     AC_MSG_RESULT([yes with $HOTSPOT_TOPDIR])
-fi
-if test "x$with_override_nashorn" != x; then
+  fi
+  if test "x$with_override_nashorn" != x; then
     CURDIR="$PWD"
     cd "$with_override_nashorn"
     NASHORN_TOPDIR="`pwd`"
     cd "$CURDIR"
     if ! test -f $NASHORN_TOPDIR/makefiles/Makefile; then
-        AC_MSG_ERROR([You have to override nashorn with a full nashorn repo!])
+      AC_MSG_ERROR([You have to override nashorn with a full nashorn repo!])
     fi
     AC_MSG_CHECKING([if nashorn should be overridden])
     AC_MSG_RESULT([yes with $NASHORN_TOPDIR])
-fi
-if test "x$with_override_jdk" != x; then
+  fi
+  if test "x$with_override_jdk" != x; then
     CURDIR="$PWD"
     cd "$with_override_jdk"
     JDK_TOPDIR="`pwd`"
     cd "$CURDIR"
     if ! test -f $JDK_TOPDIR/makefiles/Makefile; then
-        AC_MSG_ERROR([You have to override JDK with a full JDK repo!])
+      AC_MSG_ERROR([You have to override JDK with a full JDK repo!])
     fi
     AC_MSG_CHECKING([if JDK should be overridden])
     AC_MSG_RESULT([yes with $JDK_TOPDIR])
-fi    
-
+  fi
 ])
 
 AC_DEFUN_ONCE([SRCDIRS_SETUP_OUTPUT_DIRS],
 [
-BUILD_OUTPUT="$OUTPUT_ROOT"
-AC_SUBST(BUILD_OUTPUT)
+  BUILD_OUTPUT="$OUTPUT_ROOT"
+  AC_SUBST(BUILD_OUTPUT)
 
-HOTSPOT_DIST="$OUTPUT_ROOT/hotspot/dist"
-BUILD_HOTSPOT=true
-AC_SUBST(HOTSPOT_DIST)
-AC_SUBST(BUILD_HOTSPOT)
-AC_ARG_WITH(import-hotspot, [AS_HELP_STRING([--with-import-hotspot],
-	[import hotspot binaries from this jdk image or hotspot build dist dir instead of building from source])])
-if test "x$with_import_hotspot" != x; then
+  HOTSPOT_DIST="$OUTPUT_ROOT/hotspot/dist"
+  BUILD_HOTSPOT=true
+  AC_SUBST(HOTSPOT_DIST)
+  AC_SUBST(BUILD_HOTSPOT)
+  AC_ARG_WITH(import-hotspot, [AS_HELP_STRING([--with-import-hotspot],
+  [import hotspot binaries from this jdk image or hotspot build dist dir instead of building from source])])
+  if test "x$with_import_hotspot" != x; then
     CURDIR="$PWD"
     cd "$with_import_hotspot"
     HOTSPOT_DIST="`pwd`"
     cd "$CURDIR"
     if ! (test -d $HOTSPOT_DIST/lib && test -d $HOTSPOT_DIST/jre/lib); then
-        AC_MSG_ERROR([You have to import hotspot from a full jdk image or hotspot build dist dir!])
+      AC_MSG_ERROR([You have to import hotspot from a full jdk image or hotspot build dist dir!])
     fi
     AC_MSG_CHECKING([if hotspot should be imported])
     AC_MSG_RESULT([yes from $HOTSPOT_DIST])
     BUILD_HOTSPOT=false
-fi
+  fi
 
-JDK_OUTPUTDIR="$OUTPUT_ROOT/jdk"
+  JDK_OUTPUTDIR="$OUTPUT_ROOT/jdk"
 ])
diff --git a/common/autoconf/spec.gmk.in b/common/autoconf/spec.gmk.in
index 163fbc9..82f5197 100644
--- a/common/autoconf/spec.gmk.in
+++ b/common/autoconf/spec.gmk.in
@@ -30,8 +30,8 @@
 #   (called @OPENJDK_BUILD_AUTOCONF_NAME@ by autoconf)
 # using 'configure @CONFIGURE_COMMAND_LINE@'
 
-# When calling macros, the spaces between arguments are 
-# often semantically important! Sometimes we need to subst 
+# When calling macros, the spaces between arguments are
+# often semantically important! Sometimes we need to subst
 # spaces and commas, therefore we need the following macros.
 X:=
 SPACE:=$(X) $(X)
@@ -56,17 +56,17 @@
 
 # Pass along the verbosity and log level settings.
 ifeq (,$(findstring VERBOSE=,$(MAKE)))
-    MAKE:=$(MAKE) $(VERBOSE) VERBOSE="$(VERBOSE)" LOG_LEVEL="$(LOG_LEVEL)"
+  MAKE:=$(MAKE) $(VERBOSE) VERBOSE="$(VERBOSE)" LOG_LEVEL="$(LOG_LEVEL)"
 endif
 
 # No implicit variables or rules!
 ifeq (,$(findstring -R,$(MAKE)))
-    MAKE:=$(MAKE) -R
+  MAKE:=$(MAKE) -R
 endif
 
 # Specify where the common include directory for makefiles is.
 ifeq (,$(findstring -I @SRC_ROOT@/common/makefiles,$(MAKE)))
-    MAKE:=$(MAKE) -I @SRC_ROOT@/common/makefiles
+  MAKE:=$(MAKE) -I @SRC_ROOT@/common/makefiles
 endif
 
 # The "human readable" name of this configuration
@@ -175,7 +175,7 @@
   RELEASE=$(JDK_VERSION)-$(MILESTONE)$(BUILD_VARIANT_RELEASE)
 endif
 
-ifneq ($(USER_RELEASE_SUFFIX),)
+ifneq ($(USER_RELEASE_SUFFIX), )
   FULL_VERSION=$(RELEASE)-$(USER_RELEASE_SUFFIX)-$(JDK_BUILD_NUMBER)
 else
   FULL_VERSION=$(RELEASE)-$(JDK_BUILD_NUMBER)
@@ -287,7 +287,7 @@
 # Enable unlimited crypto policy
 UNLIMITED_CRYPTO=@UNLIMITED_CRYPTO@
 
-# Necessary additional compiler flags to compile X11 
+# Necessary additional compiler flags to compile X11
 X_CFLAGS:=@X_CFLAGS@
 X_LIBS:=@X_LIBS@
 OPENWIN_HOME:=@OPENWIN_HOME@
@@ -388,7 +388,7 @@
 # Command to create a shared library
 SHARED_LIBRARY_FLAGS:=@SHARED_LIBRARY_FLAGS@
 
-# Options to linker to specify a mapfile. 
+# Options to linker to specify a mapfile.
 # (Note absence of := assignment, because we do not want to evaluate the macro body here)
 SET_SHARED_LIBRARY_MAPFILE=@SET_SHARED_LIBRARY_MAPFILE@
 
@@ -461,7 +461,7 @@
 # Guarding this against resetting value. Legacy make files include spec multiple
 # times.
 ifndef RC_FLAGS
-RC_FLAGS:=@RC_FLAGS@
+  RC_FLAGS:=@RC_FLAGS@
 endif
 
 # A specific java binary with specific options can be used to run
@@ -541,9 +541,9 @@
 # we have solved how to prevent the log wrapper to wait
 # for the background sjavac server process.
 ifeq (@ENABLE_SJAVAC@X@OPENJDK_BUILD_OS_API@,yesXwinapi)
-    BUILD_LOG_WRAPPER:=
+  BUILD_LOG_WRAPPER:=
 else
-    BUILD_LOG_WRAPPER:=@BUILD_LOG_WRAPPER@
+  BUILD_LOG_WRAPPER:=@BUILD_LOG_WRAPPER@
 endif
 
 # Build setup
@@ -563,12 +563,12 @@
 # of the next macro to get rid of superfluous files.
 ADD_SRCS=$1
 ifneq (,$(ADD_SRC_ROOT))
-    # Append wildcard rule to pickup any matching source roots found below ADD_SRC_ROOT 
-    ADD_SRCS+=$(wildcard $(subst $(SRC_ROOT),$(ADD_SRC_ROOT),$1))
+  # Append wildcard rule to pickup any matching source roots found below ADD_SRC_ROOT
+  ADD_SRCS+=$(wildcard $(subst $(SRC_ROOT),$(ADD_SRC_ROOT),$1))
 endif
 ifneq (,$(OVERRIDE_SRC_ROOT))
-    # Append wildcard rule to pickup any matching source roots found below OVERRIDE_SRC_ROOT 
-    ADD_SRCS+=$(wildcard $(subst $(SRC_ROOT),$(OVERRIDE_SRC_ROOT),$1))
+  # Append wildcard rule to pickup any matching source roots found below OVERRIDE_SRC_ROOT
+  ADD_SRCS+=$(wildcard $(subst $(SRC_ROOT),$(OVERRIDE_SRC_ROOT),$1))
 endif
 
 # OVR_SRCS creates a filter expression to filter out sources in
@@ -578,9 +578,9 @@
 # We cannot do the scan in configure, since that would force us to rerun configure when
 # we add overridden sources.
 ifneq (,$(OVERRIDE_SRC_ROOT))
-    OVR_SRCS:=$(addsuffix %,$(subst $(OVERRIDE_SRC_ROOT),$(SRC_ROOT),$(sort $(dir $(shell $(FIND) $(OVERRIDE_SRC_ROOT) -type f)))))
+  OVR_SRCS:=$(addsuffix %,$(subst $(OVERRIDE_SRC_ROOT),$(SRC_ROOT),$(sort $(dir $(shell $(FIND) $(OVERRIDE_SRC_ROOT) -type f)))))
 else
-    OVR_SRCS:=
+  OVR_SRCS:=
 endif
 
 ####################################################
@@ -589,7 +589,7 @@
 #
 
 # Common prefix for all installed files. Defaults to /usr/local,
-# but /opt/myjdk is another common version. 
+# but /opt/myjdk is another common version.
 INSTALL_PREFIX=@prefix@
 
 # Directories containing architecture-dependent files should be relative to exec_prefix
@@ -619,7 +619,7 @@
 # Executables that other programs run.
 INSTALL_LIBEXECDIR=@libexecdir@
 
-# Locale-dependent but architecture-independent data, such as message catalogs. 
+# Locale-dependent but architecture-independent data, such as message catalogs.
 INSTALL_LOCALEDIR=@localedir@
 
 # Modifiable single-machine data
diff --git a/common/autoconf/toolchain.m4 b/common/autoconf/toolchain.m4
index 2173300..abddf99 100644
--- a/common/autoconf/toolchain.m4
+++ b/common/autoconf/toolchain.m4
@@ -46,7 +46,7 @@
     fi
   elif test  "x$OPENJDK_TARGET_OS" = xwindows; then
     # First line typically looks something like:
-    # Microsoft (R) 32-bit C/C++ Optimizing Compiler Version 16.00.30319.01 for 80x86
+    # Microsoft (R) 32-bit C/C++ Optimizing Compiler Version 16.00.40219.01 for 80x86
     COMPILER_VERSION_TEST=`$COMPILER 2>&1 | $HEAD -n 1 | $TR -d '\r'`
     COMPILER_VERSION=`$ECHO $COMPILER_VERSION_TEST | $SED -n "s/^.*Version \(@<:@1-9@:>@@<:@0-9.@:>@*\) .*/\1/p"`
     COMPILER_VENDOR="Microsoft CL.EXE"
@@ -86,25 +86,25 @@
 
 AC_DEFUN_ONCE([TOOLCHAIN_SETUP_SYSROOT_AND_OUT_OPTIONS],
 [
-###############################################################################
-#
-# Configure the development tool paths and potential sysroot.
-#
-AC_LANG(C++)
+  ###############################################################################
+  #
+  # Configure the development tool paths and potential sysroot.
+  #
+  AC_LANG(C++)
 
-# The option used to specify the target .o,.a or .so file.
-# When compiling, how to specify the to be created object file.
-CC_OUT_OPTION='-o$(SPACE)'
-# When linking, how to specify the to be created executable.
-EXE_OUT_OPTION='-o$(SPACE)'
-# When linking, how to specify the to be created dynamically linkable library.
-LD_OUT_OPTION='-o$(SPACE)'
-# When archiving, how to specify the to be create static archive for object files.
-AR_OUT_OPTION='rcs$(SPACE)'
-AC_SUBST(CC_OUT_OPTION)
-AC_SUBST(EXE_OUT_OPTION)
-AC_SUBST(LD_OUT_OPTION)
-AC_SUBST(AR_OUT_OPTION)
+  # The option used to specify the target .o,.a or .so file.
+  # When compiling, how to specify the to be created object file.
+  CC_OUT_OPTION='-o$(SPACE)'
+  # When linking, how to specify the to be created executable.
+  EXE_OUT_OPTION='-o$(SPACE)'
+  # When linking, how to specify the to be created dynamically linkable library.
+  LD_OUT_OPTION='-o$(SPACE)'
+  # When archiving, how to specify the to be create static archive for object files.
+  AR_OUT_OPTION='rcs$(SPACE)'
+  AC_SUBST(CC_OUT_OPTION)
+  AC_SUBST(EXE_OUT_OPTION)
+  AC_SUBST(LD_OUT_OPTION)
+  AC_SUBST(AR_OUT_OPTION)
 ])
 
 # $1 = compiler to test (CC or CXX)
@@ -133,8 +133,8 @@
   fi
 
   if test "x[$]$1" = x; then
-      HELP_MSG_MISSING_DEPENDENCY([devkit])
-      AC_MSG_ERROR([Could not find a $COMPILER_NAME compiler. $HELP_MSG])
+    HELP_MSG_MISSING_DEPENDENCY([devkit])
+    AC_MSG_ERROR([Could not find a $COMPILER_NAME compiler. $HELP_MSG])
   fi
   BASIC_FIXUP_EXECUTABLE($1)
   AC_MSG_CHECKING([resolved symbolic links for $1])
@@ -174,26 +174,26 @@
 
 AC_DEFUN([TOOLCHAIN_SETUP_PATHS],
 [
-if test "x$OPENJDK_TARGET_OS" = "xwindows"; then
-  TOOLCHAIN_SETUP_VISUAL_STUDIO_ENV
-  BASIC_DEPRECATED_ARG_WITH([dxsdk])
-  BASIC_DEPRECATED_ARG_WITH([dxsdk-lib])
-  BASIC_DEPRECATED_ARG_WITH([dxsdk-include])
-fi
+  if test "x$OPENJDK_TARGET_OS" = "xwindows"; then
+    TOOLCHAIN_SETUP_VISUAL_STUDIO_ENV
+    BASIC_DEPRECATED_ARG_WITH([dxsdk])
+    BASIC_DEPRECATED_ARG_WITH([dxsdk-lib])
+    BASIC_DEPRECATED_ARG_WITH([dxsdk-include])
+  fi
 
-AC_SUBST(MSVCR_DLL)
+  AC_SUBST(MSVCR_DLL)
 
-# If --build AND --host is set, then the configure script will find any
-# cross compilation tools in the PATH. Cross compilation tools
-# follows the cross compilation standard where they are prefixed with ${host}.
-# For example the binary i686-sun-solaris2.10-gcc
-# will cross compile for i686-sun-solaris2.10
-# If neither of build and host is not set, then build=host and the
-# default compiler found in the path will be used.
-# Setting only --host, does not seem to be really supported.
-# Please set both --build and --host if you want to cross compile.
+  # If --build AND --host is set, then the configure script will find any
+  # cross compilation tools in the PATH. Cross compilation tools
+  # follows the cross compilation standard where they are prefixed with ${host}.
+  # For example the binary i686-sun-solaris2.10-gcc
+  # will cross compile for i686-sun-solaris2.10
+  # If neither of build and host is not set, then build=host and the
+  # default compiler found in the path will be used.
+  # Setting only --host, does not seem to be really supported.
+  # Please set both --build and --host if you want to cross compile.
 
-if test "x$COMPILE_TYPE" = "xcross"; then
+  if test "x$COMPILE_TYPE" = "xcross"; then
     # Now we to find a C/C++ compiler that can build executables for the build
     # platform. We can't use the AC_PROG_CC macro, since it can only be used
     # once. Also, we need to do this before adding a tools dir to the path,
@@ -206,123 +206,124 @@
     BASIC_FIXUP_EXECUTABLE(BUILD_CXX)
     AC_PATH_PROG(BUILD_LD, ld)
     BASIC_FIXUP_EXECUTABLE(BUILD_LD)
-fi
-AC_SUBST(BUILD_CC)
-AC_SUBST(BUILD_CXX)
-AC_SUBST(BUILD_LD)
+  fi
+  AC_SUBST(BUILD_CC)
+  AC_SUBST(BUILD_CXX)
+  AC_SUBST(BUILD_LD)
 
-# If a devkit is found on the builddeps server, then prepend its path to the
-# PATH variable. If there are cross compilers available in the devkit, these
-# will be found by AC_PROG_CC et al.
-DEVKIT=
-BDEPS_CHECK_MODULE(DEVKIT, devkit, xxx,
-                    [# Found devkit
-                     PATH="$DEVKIT/bin:$PATH"
-                     SYS_ROOT="$DEVKIT/${rewritten_target}/sys-root"
-                     if test "x$x_includes" = "xNONE"; then
-                         x_includes="$SYS_ROOT/usr/include/X11"
-                     fi
-                     if test "x$x_libraries" = "xNONE"; then
-                         x_libraries="$SYS_ROOT/usr/lib"
-                     fi
-                    ],
-                    [])
+  # If a devkit is found on the builddeps server, then prepend its path to the
+  # PATH variable. If there are cross compilers available in the devkit, these
+  # will be found by AC_PROG_CC et al.
+  DEVKIT=
+  BDEPS_CHECK_MODULE(DEVKIT, devkit, xxx,
+      [
+        # Found devkit
+        PATH="$DEVKIT/bin:$PATH"
+        SYS_ROOT="$DEVKIT/${rewritten_target}/sys-root"
+        if test "x$x_includes" = "xNONE"; then
+          x_includes="$SYS_ROOT/usr/include/X11"
+        fi
+        if test "x$x_libraries" = "xNONE"; then
+          x_libraries="$SYS_ROOT/usr/lib"
+        fi
+      ],
+      [])
 
-# Store the CFLAGS etal passed to the configure script.
-ORG_CFLAGS="$CFLAGS"
-ORG_CXXFLAGS="$CXXFLAGS"
-ORG_OBJCFLAGS="$OBJCFLAGS"
+  # Store the CFLAGS etal passed to the configure script.
+  ORG_CFLAGS="$CFLAGS"
+  ORG_CXXFLAGS="$CXXFLAGS"
+  ORG_OBJCFLAGS="$OBJCFLAGS"
 
-# autoconf magic only relies on PATH, so update it if tools dir is specified
-OLD_PATH="$PATH"
-if test "x$TOOLS_DIR" != x; then
-  PATH=$TOOLS_DIR:$PATH
-fi
+  # autoconf magic only relies on PATH, so update it if tools dir is specified
+  OLD_PATH="$PATH"
+  if test "x$TOOLS_DIR" != x; then
+    PATH=$TOOLS_DIR:$PATH
+  fi
 
 
-### Locate C compiler (CC)
+  ### Locate C compiler (CC)
 
-# On windows, only cl.exe is supported.
-# On Solaris, cc is preferred to gcc.
-# Elsewhere, gcc is preferred to cc.
+  # On windows, only cl.exe is supported.
+  # On Solaris, cc is preferred to gcc.
+  # Elsewhere, gcc is preferred to cc.
 
-if test "x$CC" != x; then
-  COMPILER_CHECK_LIST="$CC"
-elif test "x$OPENJDK_TARGET_OS" = "xwindows"; then
-  COMPILER_CHECK_LIST="cl"
-elif test "x$OPENJDK_TARGET_OS" = "xsolaris"; then
-  COMPILER_CHECK_LIST="cc gcc"
-else
-  COMPILER_CHECK_LIST="gcc cc"
-fi
+  if test "x$CC" != x; then
+    COMPILER_CHECK_LIST="$CC"
+  elif test "x$OPENJDK_TARGET_OS" = "xwindows"; then
+    COMPILER_CHECK_LIST="cl"
+  elif test "x$OPENJDK_TARGET_OS" = "xsolaris"; then
+    COMPILER_CHECK_LIST="cc gcc"
+  else
+    COMPILER_CHECK_LIST="gcc cc"
+  fi
 
-TOOLCHAIN_FIND_COMPILER([CC],[C],[$COMPILER_CHECK_LIST])
-# Now that we have resolved CC ourself, let autoconf have its go at it
-AC_PROG_CC([$CC])
+  TOOLCHAIN_FIND_COMPILER([CC],[C],[$COMPILER_CHECK_LIST])
+  # Now that we have resolved CC ourself, let autoconf have its go at it
+  AC_PROG_CC([$CC])
 
-### Locate C++ compiler (CXX)
+  ### Locate C++ compiler (CXX)
 
-if test "x$CXX" != x; then
-  COMPILER_CHECK_LIST="$CXX"
-elif test "x$OPENJDK_TARGET_OS" = "xwindows"; then
-  COMPILER_CHECK_LIST="cl"
-elif test "x$OPENJDK_TARGET_OS" = "xsolaris"; then
-  COMPILER_CHECK_LIST="CC g++"
-else
-  COMPILER_CHECK_LIST="g++ CC"
-fi
+  if test "x$CXX" != x; then
+    COMPILER_CHECK_LIST="$CXX"
+  elif test "x$OPENJDK_TARGET_OS" = "xwindows"; then
+    COMPILER_CHECK_LIST="cl"
+  elif test "x$OPENJDK_TARGET_OS" = "xsolaris"; then
+    COMPILER_CHECK_LIST="CC g++"
+  else
+    COMPILER_CHECK_LIST="g++ CC"
+  fi
 
-TOOLCHAIN_FIND_COMPILER([CXX],[C++],[$COMPILER_CHECK_LIST])
-# Now that we have resolved CXX ourself, let autoconf have its go at it
-AC_PROG_CXX([$CXX])
+  TOOLCHAIN_FIND_COMPILER([CXX],[C++],[$COMPILER_CHECK_LIST])
+  # Now that we have resolved CXX ourself, let autoconf have its go at it
+  AC_PROG_CXX([$CXX])
 
-### Locate other tools
+  ### Locate other tools
 
-if test "x$OPENJDK_TARGET_OS" = xmacosx; then
+  if test "x$OPENJDK_TARGET_OS" = xmacosx; then
     AC_PROG_OBJC
     BASIC_FIXUP_EXECUTABLE(OBJC)
-else
+  else
     OBJC=
-fi
+  fi
 
-# Restore the flags to the user specified values.
-# This is necessary since AC_PROG_CC defaults CFLAGS to "-g -O2"
-CFLAGS="$ORG_CFLAGS"
-CXXFLAGS="$ORG_CXXFLAGS"
-OBJCFLAGS="$ORG_OBJCFLAGS"
+  # Restore the flags to the user specified values.
+  # This is necessary since AC_PROG_CC defaults CFLAGS to "-g -O2"
+  CFLAGS="$ORG_CFLAGS"
+  CXXFLAGS="$ORG_CXXFLAGS"
+  OBJCFLAGS="$ORG_OBJCFLAGS"
 
-LD="$CC"
-LDEXE="$CC"
-LDCXX="$CXX"
-LDEXECXX="$CXX"
-AC_SUBST(LD)
-# LDEXE is the linker to use, when creating executables.
-AC_SUBST(LDEXE)
-# Linking C++ libraries.
-AC_SUBST(LDCXX)
-# Linking C++ executables.
-AC_SUBST(LDEXECXX)
+  LD="$CC"
+  LDEXE="$CC"
+  LDCXX="$CXX"
+  LDEXECXX="$CXX"
+  AC_SUBST(LD)
+  # LDEXE is the linker to use, when creating executables.
+  AC_SUBST(LDEXE)
+  # Linking C++ libraries.
+  AC_SUBST(LDCXX)
+  # Linking C++ executables.
+  AC_SUBST(LDEXECXX)
 
-if test "x$OPENJDK_TARGET_OS" != xwindows; then
+  if test "x$OPENJDK_TARGET_OS" != xwindows; then
     AC_CHECK_TOOL(AR, ar)
     BASIC_FIXUP_EXECUTABLE(AR)
-fi
-if test "x$OPENJDK_TARGET_OS" = xmacosx; then
+  fi
+  if test "x$OPENJDK_TARGET_OS" = xmacosx; then
     ARFLAGS="-r"
-else
+  else
     ARFLAGS=""
-fi
-AC_SUBST(ARFLAGS)
+  fi
+  AC_SUBST(ARFLAGS)
 
-# For hotspot, we need these in Windows mixed path; other platforms keep them the same
-HOTSPOT_CXX="$CXX"
-HOTSPOT_LD="$LD"
-AC_SUBST(HOTSPOT_CXX)
-AC_SUBST(HOTSPOT_LD)
+  # For hotspot, we need these in Windows mixed path; other platforms keep them the same
+  HOTSPOT_CXX="$CXX"
+  HOTSPOT_LD="$LD"
+  AC_SUBST(HOTSPOT_CXX)
+  AC_SUBST(HOTSPOT_LD)
 
-COMPILER_NAME=gcc
-COMPILER_TYPE=CC
-AS_IF([test "x$OPENJDK_TARGET_OS" = xwindows], [
+  COMPILER_NAME=gcc
+  COMPILER_TYPE=CC
+  AS_IF([test "x$OPENJDK_TARGET_OS" = xwindows], [
     # For now, assume that we are always compiling using cl.exe.
     CC_OUT_OPTION=-Fo
     EXE_OUT_OPTION=-out:
@@ -369,45 +370,45 @@
 
     RC_FLAGS="-nologo -l 0x409 -r"
     AS_IF([test "x$VARIANT" = xOPT], [
-        RC_FLAGS="$RC_FLAGS -d NDEBUG"
-    ])
+    RC_FLAGS="$RC_FLAGS -d NDEBUG"
+  ])
 
-    # The version variables used to create RC_FLAGS may be overridden
-    # in a custom configure script, or possibly the command line.  
-    # Let those variables be expanded at make time in spec.gmk.
-    # The \$ are escaped to the shell, and the $(...) variables
-    # are evaluated by make.
-    RC_FLAGS="$RC_FLAGS \
-        -d \"JDK_BUILD_ID=\$(FULL_VERSION)\" \
-        -d \"JDK_COMPANY=\$(COMPANY_NAME)\" \
-        -d \"JDK_COMPONENT=\$(PRODUCT_NAME) \$(JDK_RC_PLATFORM_NAME) binary\" \
-        -d \"JDK_VER=\$(JDK_MINOR_VERSION).\$(JDK_MICRO_VERSION).\$(if \$(JDK_UPDATE_VERSION),\$(JDK_UPDATE_VERSION),0).\$(COOKED_BUILD_NUMBER)\" \
-        -d \"JDK_COPYRIGHT=Copyright \xA9 $COPYRIGHT_YEAR\" \
-        -d \"JDK_NAME=\$(PRODUCT_NAME) \$(JDK_RC_PLATFORM_NAME) \$(JDK_MINOR_VERSION) \$(JDK_UPDATE_META_TAG)\" \
-        -d \"JDK_FVER=\$(JDK_MINOR_VERSION),\$(JDK_MICRO_VERSION),\$(if \$(JDK_UPDATE_VERSION),\$(JDK_UPDATE_VERSION),0),\$(COOKED_BUILD_NUMBER)\""
+  # The version variables used to create RC_FLAGS may be overridden
+  # in a custom configure script, or possibly the command line.
+  # Let those variables be expanded at make time in spec.gmk.
+  # The \$ are escaped to the shell, and the $(...) variables
+  # are evaluated by make.
+  RC_FLAGS="$RC_FLAGS \
+      -d \"JDK_BUILD_ID=\$(FULL_VERSION)\" \
+      -d \"JDK_COMPANY=\$(COMPANY_NAME)\" \
+      -d \"JDK_COMPONENT=\$(PRODUCT_NAME) \$(JDK_RC_PLATFORM_NAME) binary\" \
+      -d \"JDK_VER=\$(JDK_MINOR_VERSION).\$(JDK_MICRO_VERSION).\$(if \$(JDK_UPDATE_VERSION),\$(JDK_UPDATE_VERSION),0).\$(COOKED_BUILD_NUMBER)\" \
+      -d \"JDK_COPYRIGHT=Copyright \xA9 $COPYRIGHT_YEAR\" \
+      -d \"JDK_NAME=\$(PRODUCT_NAME) \$(JDK_RC_PLATFORM_NAME) \$(JDK_MINOR_VERSION) \$(JDK_UPDATE_META_TAG)\" \
+      -d \"JDK_FVER=\$(JDK_MINOR_VERSION),\$(JDK_MICRO_VERSION),\$(if \$(JDK_UPDATE_VERSION),\$(JDK_UPDATE_VERSION),0),\$(COOKED_BUILD_NUMBER)\""
 
-    # lib.exe is used to create static libraries.
-    AC_CHECK_PROG([WINAR], [lib],[lib],,,)
-    BASIC_FIXUP_EXECUTABLE(WINAR)
-    AR="$WINAR"
-    ARFLAGS="-nologo -NODEFAULTLIB:MSVCRT"
+  # lib.exe is used to create static libraries.
+  AC_CHECK_PROG([WINAR], [lib],[lib],,,)
+  BASIC_FIXUP_EXECUTABLE(WINAR)
+  AR="$WINAR"
+  ARFLAGS="-nologo -NODEFAULTLIB:MSVCRT"
 
-    AC_CHECK_PROG([DUMPBIN], [dumpbin], [dumpbin],,,)
-    BASIC_FIXUP_EXECUTABLE(DUMPBIN)
+  AC_CHECK_PROG([DUMPBIN], [dumpbin], [dumpbin],,,)
+      BASIC_FIXUP_EXECUTABLE(DUMPBIN)
 
-    COMPILER_TYPE=CL
-    CCXXFLAGS="$CCXXFLAGS -nologo"
-])
-AC_SUBST(RC_FLAGS)
-AC_SUBST(COMPILER_TYPE)
+      COMPILER_TYPE=CL
+      CCXXFLAGS="$CCXXFLAGS -nologo"
+  ])
+  AC_SUBST(RC_FLAGS)
+  AC_SUBST(COMPILER_TYPE)
 
-AC_PROG_CPP
-BASIC_FIXUP_EXECUTABLE(CPP)
+  AC_PROG_CPP
+  BASIC_FIXUP_EXECUTABLE(CPP)
 
-AC_PROG_CXXCPP
-BASIC_FIXUP_EXECUTABLE(CXXCPP)
+  AC_PROG_CXXCPP
+  BASIC_FIXUP_EXECUTABLE(CXXCPP)
 
-if test "x$COMPILE_TYPE" != "xcross"; then
+  if test "x$COMPILE_TYPE" != "xcross"; then
     # If we are not cross compiling, use the same compilers for
     # building the build platform executables. The cross-compilation
     # case needed to be done earlier, but this can only be done after
@@ -415,28 +416,28 @@
     BUILD_CC="$CC"
     BUILD_CXX="$CXX"
     BUILD_LD="$LD"
-fi
+  fi
 
-# for solaris we really need solaris tools, and not gnu equivalent
-#   these seems to normally reside in /usr/ccs/bin so add that to path before
-#   starting to probe
-#
-#   NOTE: I add this /usr/ccs/bin after TOOLS but before OLD_PATH
-#         so that it can be overriden --with-tools-dir
-if test "x$OPENJDK_BUILD_OS" = xsolaris; then
+  # for solaris we really need solaris tools, and not gnu equivalent
+  #   these seems to normally reside in /usr/ccs/bin so add that to path before
+  #   starting to probe
+  #
+  #   NOTE: I add this /usr/ccs/bin after TOOLS but before OLD_PATH
+  #         so that it can be overriden --with-tools-dir
+  if test "x$OPENJDK_BUILD_OS" = xsolaris; then
     PATH="${TOOLS_DIR}:/usr/ccs/bin:${OLD_PATH}"
-fi
+  fi
 
-# Find the right assembler.
-if test "x$OPENJDK_TARGET_OS" = xsolaris; then
+  # Find the right assembler.
+  if test "x$OPENJDK_TARGET_OS" = xsolaris; then
     AC_PATH_PROG(AS, as)
     BASIC_FIXUP_EXECUTABLE(AS)
-else
+  else
     AS="$CC -c"
-fi
-AC_SUBST(AS)
+  fi
+  AC_SUBST(AS)
 
-if test "x$OPENJDK_TARGET_OS" = xsolaris; then
+  if test "x$OPENJDK_TARGET_OS" = xsolaris; then
     AC_PATH_PROG(NM, nm)
     BASIC_FIXUP_EXECUTABLE(NM)
     AC_PATH_PROG(GNM, gnm)
@@ -445,52 +446,52 @@
     BASIC_FIXUP_EXECUTABLE(STRIP)
     AC_PATH_PROG(MCS, mcs)
     BASIC_FIXUP_EXECUTABLE(MCS)
-elif test "x$OPENJDK_TARGET_OS" != xwindows; then
+  elif test "x$OPENJDK_TARGET_OS" != xwindows; then
     AC_CHECK_TOOL(NM, nm)
     BASIC_FIXUP_EXECUTABLE(NM)
     GNM="$NM"
     AC_SUBST(GNM)
     AC_CHECK_TOOL(STRIP, strip)
     BASIC_FIXUP_EXECUTABLE(STRIP)
-fi
+  fi
 
-# objcopy is used for moving debug symbols to separate files when
-# full debug symbols are enabled.
-if test "x$OPENJDK_TARGET_OS" = xsolaris || test "x$OPENJDK_TARGET_OS" = xlinux; then
+  # objcopy is used for moving debug symbols to separate files when
+  # full debug symbols are enabled.
+  if test "x$OPENJDK_TARGET_OS" = xsolaris || test "x$OPENJDK_TARGET_OS" = xlinux; then
     AC_CHECK_TOOLS(OBJCOPY, [gobjcopy objcopy])
     # Only call fixup if objcopy was found.
     if test -n "$OBJCOPY"; then
-        BASIC_FIXUP_EXECUTABLE(OBJCOPY)
+      BASIC_FIXUP_EXECUTABLE(OBJCOPY)
     fi
-fi
+  fi
 
-AC_CHECK_TOOLS(OBJDUMP, [gobjdump objdump])
-if test "x$OBJDUMP" != x; then
-  # Only used for compare.sh; we can live without it. BASIC_FIXUP_EXECUTABLE bails if argument is missing.
-  BASIC_FIXUP_EXECUTABLE(OBJDUMP)
-fi
+  AC_CHECK_TOOLS(OBJDUMP, [gobjdump objdump])
+  if test "x$OBJDUMP" != x; then
+    # Only used for compare.sh; we can live without it. BASIC_FIXUP_EXECUTABLE bails if argument is missing.
+    BASIC_FIXUP_EXECUTABLE(OBJDUMP)
+  fi
 
-if test "x$OPENJDK_TARGET_OS" = "xmacosx"; then
-   AC_PATH_PROG(LIPO, lipo)
-   BASIC_FIXUP_EXECUTABLE(LIPO)
-fi
+  if test "x$OPENJDK_TARGET_OS" = "xmacosx"; then
+    AC_PATH_PROG(LIPO, lipo)
+    BASIC_FIXUP_EXECUTABLE(LIPO)
+  fi
 
-TOOLCHAIN_SETUP_JTREG
+  TOOLCHAIN_SETUP_JTREG
 
-# Restore old path without tools dir
-PATH="$OLD_PATH"
+  # Restore old path without tools dir
+  PATH="$OLD_PATH"
 ])
 
 
 AC_DEFUN_ONCE([TOOLCHAIN_SETUP_COMPILER_FLAGS_FOR_LIBS],
 [
 
-###############################################################################
-#
-# How to compile shared libraries.
-#
+  ###############################################################################
+  #
+  # How to compile shared libraries.
+  #
 
-if test "x$GCC" = xyes; then
+  if test "x$GCC" = xyes; then
     COMPILER_NAME=gcc
     PICFLAG="-fPIC"
     LIBRARY_PREFIX=lib
@@ -515,398 +516,399 @@
 
     # Linking is different on MacOSX
     if test "x$OPENJDK_TARGET_OS" = xmacosx; then
-        # Might change in the future to clang.
-        COMPILER_NAME=gcc
-        SHARED_LIBRARY='lib[$]1.dylib'
-        SHARED_LIBRARY_FLAGS="-dynamiclib -compatibility_version 1.0.0 -current_version 1.0.0 $PICFLAG"
-        SHARED_LIBRARY_SUFFIX='.dylib'
-        EXE_SUFFIX=''
-        SET_SHARED_LIBRARY_NAME='-Xlinker -install_name -Xlinker @rpath/[$]1'
-        SET_SHARED_LIBRARY_MAPFILE=''
-        SET_SHARED_LIBRARY_ORIGIN='-Xlinker -rpath -Xlinker @loader_path/.'
-        SET_EXECUTABLE_ORIGIN="$SET_SHARED_LIBRARY_ORIGIN"
-        POST_STRIP_CMD="$STRIP -S"
+      # Might change in the future to clang.
+      COMPILER_NAME=gcc
+      SHARED_LIBRARY='lib[$]1.dylib'
+      SHARED_LIBRARY_FLAGS="-dynamiclib -compatibility_version 1.0.0 -current_version 1.0.0 $PICFLAG"
+      SHARED_LIBRARY_SUFFIX='.dylib'
+      EXE_SUFFIX=''
+      SET_SHARED_LIBRARY_NAME='-Xlinker -install_name -Xlinker @rpath/[$]1'
+      SET_SHARED_LIBRARY_MAPFILE=''
+      SET_SHARED_LIBRARY_ORIGIN='-Xlinker -rpath -Xlinker @loader_path/.'
+      SET_EXECUTABLE_ORIGIN="$SET_SHARED_LIBRARY_ORIGIN"
+      POST_STRIP_CMD="$STRIP -S"
     fi
-else
+  else
     if test "x$OPENJDK_TARGET_OS" = xsolaris; then
-        # If it is not gcc, then assume it is the Oracle Solaris Studio Compiler
-        COMPILER_NAME=ossc
-        PICFLAG="-KPIC"
-        LIBRARY_PREFIX=lib
-        SHARED_LIBRARY='lib[$]1.so'
-        STATIC_LIBRARY='lib[$]1.a'
-        SHARED_LIBRARY_FLAGS="-G"
-        SHARED_LIBRARY_SUFFIX='.so'
-        STATIC_LIBRARY_SUFFIX='.a'
-        OBJ_SUFFIX='.o'
-        EXE_SUFFIX=''
-        SET_SHARED_LIBRARY_NAME=''
-        SET_SHARED_LIBRARY_MAPFILE='-M[$]1'
-	C_FLAG_REORDER='-xF'
-	CXX_FLAG_REORDER='-xF'
-        SET_SHARED_LIBRARY_ORIGIN='-R\$$$$ORIGIN[$]1'
-        SET_EXECUTABLE_ORIGIN="$SET_SHARED_LIBRARY_ORIGIN"
-        CFLAGS_JDK="${CFLAGS_JDK} -D__solaris__"
-        CXXFLAGS_JDK="${CXXFLAGS_JDK} -D__solaris__"
-        CFLAGS_JDKLIB_EXTRA='-xstrconst'
-        POST_STRIP_CMD="$STRIP -x"
-        POST_MCS_CMD="$MCS -d -a \"JDK $FULL_VERSION\""
+      # If it is not gcc, then assume it is the Oracle Solaris Studio Compiler
+      COMPILER_NAME=ossc
+      PICFLAG="-KPIC"
+      LIBRARY_PREFIX=lib
+      SHARED_LIBRARY='lib[$]1.so'
+      STATIC_LIBRARY='lib[$]1.a'
+      SHARED_LIBRARY_FLAGS="-G"
+      SHARED_LIBRARY_SUFFIX='.so'
+      STATIC_LIBRARY_SUFFIX='.a'
+      OBJ_SUFFIX='.o'
+      EXE_SUFFIX=''
+      SET_SHARED_LIBRARY_NAME=''
+      SET_SHARED_LIBRARY_MAPFILE='-M[$]1'
+      C_FLAG_REORDER='-xF'
+      CXX_FLAG_REORDER='-xF'
+      SET_SHARED_LIBRARY_ORIGIN='-R\$$$$ORIGIN[$]1'
+      SET_EXECUTABLE_ORIGIN="$SET_SHARED_LIBRARY_ORIGIN"
+      CFLAGS_JDK="${CFLAGS_JDK} -D__solaris__"
+      CXXFLAGS_JDK="${CXXFLAGS_JDK} -D__solaris__"
+      CFLAGS_JDKLIB_EXTRA='-xstrconst'
+      POST_STRIP_CMD="$STRIP -x"
+      POST_MCS_CMD="$MCS -d -a \"JDK $FULL_VERSION\""
     fi
     if test "x$OPENJDK_TARGET_OS" = xwindows; then
-        # If it is not gcc, then assume it is the MS Visual Studio compiler
-        COMPILER_NAME=cl
-        PICFLAG=""
-        LIBRARY_PREFIX=
-        SHARED_LIBRARY='[$]1.dll'
-        STATIC_LIBRARY='[$]1.lib'
-        SHARED_LIBRARY_FLAGS="-LD"
-        SHARED_LIBRARY_SUFFIX='.dll'
-        STATIC_LIBRARY_SUFFIX='.lib'
-        OBJ_SUFFIX='.obj'
-        EXE_SUFFIX='.exe'
-        SET_SHARED_LIBRARY_NAME=''
-        SET_SHARED_LIBRARY_MAPFILE=''
-        SET_SHARED_LIBRARY_ORIGIN=''
-        SET_EXECUTABLE_ORIGIN=''
+      # If it is not gcc, then assume it is the MS Visual Studio compiler
+      COMPILER_NAME=cl
+      PICFLAG=""
+      LIBRARY_PREFIX=
+      SHARED_LIBRARY='[$]1.dll'
+      STATIC_LIBRARY='[$]1.lib'
+      SHARED_LIBRARY_FLAGS="-LD"
+      SHARED_LIBRARY_SUFFIX='.dll'
+      STATIC_LIBRARY_SUFFIX='.lib'
+      OBJ_SUFFIX='.obj'
+      EXE_SUFFIX='.exe'
+      SET_SHARED_LIBRARY_NAME=''
+      SET_SHARED_LIBRARY_MAPFILE=''
+      SET_SHARED_LIBRARY_ORIGIN=''
+      SET_EXECUTABLE_ORIGIN=''
     fi
-fi
+  fi
 
-AC_SUBST(COMPILER_NAME)
-AC_SUBST(OBJ_SUFFIX)
-AC_SUBST(SHARED_LIBRARY)
-AC_SUBST(STATIC_LIBRARY)
-AC_SUBST(LIBRARY_PREFIX)
-AC_SUBST(SHARED_LIBRARY_SUFFIX)
-AC_SUBST(STATIC_LIBRARY_SUFFIX)
-AC_SUBST(EXE_SUFFIX)
-AC_SUBST(SHARED_LIBRARY_FLAGS)
-AC_SUBST(SET_SHARED_LIBRARY_NAME)
-AC_SUBST(SET_SHARED_LIBRARY_MAPFILE)
-AC_SUBST(C_FLAG_REORDER)
-AC_SUBST(CXX_FLAG_REORDER)
-AC_SUBST(SET_SHARED_LIBRARY_ORIGIN)
-AC_SUBST(SET_EXECUTABLE_ORIGIN)
-AC_SUBST(POST_STRIP_CMD)
-AC_SUBST(POST_MCS_CMD)
+  AC_SUBST(COMPILER_NAME)
+  AC_SUBST(OBJ_SUFFIX)
+  AC_SUBST(SHARED_LIBRARY)
+  AC_SUBST(STATIC_LIBRARY)
+  AC_SUBST(LIBRARY_PREFIX)
+  AC_SUBST(SHARED_LIBRARY_SUFFIX)
+  AC_SUBST(STATIC_LIBRARY_SUFFIX)
+  AC_SUBST(EXE_SUFFIX)
+  AC_SUBST(SHARED_LIBRARY_FLAGS)
+  AC_SUBST(SET_SHARED_LIBRARY_NAME)
+  AC_SUBST(SET_SHARED_LIBRARY_MAPFILE)
+  AC_SUBST(C_FLAG_REORDER)
+  AC_SUBST(CXX_FLAG_REORDER)
+  AC_SUBST(SET_SHARED_LIBRARY_ORIGIN)
+  AC_SUBST(SET_EXECUTABLE_ORIGIN)
+  AC_SUBST(POST_STRIP_CMD)
+  AC_SUBST(POST_MCS_CMD)
 
-# The (cross) compiler is now configured, we can now test capabilities
-# of the target platform.
+  # The (cross) compiler is now configured, we can now test capabilities
+  # of the target platform.
 ])
 
 AC_DEFUN_ONCE([TOOLCHAIN_SETUP_COMPILER_FLAGS_FOR_OPTIMIZATION],
 [
 
-###############################################################################
-#
-# Setup the opt flags for different compilers
-# and different operating systems.
-#
+  ###############################################################################
+  #
+  # Setup the opt flags for different compilers
+  # and different operating systems.
+  #
 
-#
-# NOTE: check for -mstackrealign needs to be below potential addition of -m32
-#
-if test "x$OPENJDK_TARGET_CPU_BITS" = x32 && test "x$OPENJDK_TARGET_OS" = xmacosx; then
+  #
+  # NOTE: check for -mstackrealign needs to be below potential addition of -m32
+  #
+  if test "x$OPENJDK_TARGET_CPU_BITS" = x32 && test "x$OPENJDK_TARGET_OS" = xmacosx; then
     # On 32-bit MacOSX the OS requires C-entry points to be 16 byte aligned.
     # While waiting for a better solution, the current workaround is to use -mstackrealign.
     CFLAGS="$CFLAGS -mstackrealign"
     AC_MSG_CHECKING([if 32-bit compiler supports -mstackrealign])
     AC_LINK_IFELSE([AC_LANG_SOURCE([[int main() { return 0; }]])],
-                   [
-		        AC_MSG_RESULT([yes])
-                   ],
-	           [
-		        AC_MSG_RESULT([no])
-	                AC_MSG_ERROR([The selected compiler $CXX does not support -mstackrealign! Try to put another compiler in the path.])
-	           ])
-fi
+        [
+          AC_MSG_RESULT([yes])
+        ],
+        [
+          AC_MSG_RESULT([no])
+          AC_MSG_ERROR([The selected compiler $CXX does not support -mstackrealign! Try to put another compiler in the path.])
+        ]
+    )
+  fi
 
-C_FLAG_DEPS="-MMD -MF"
-CXX_FLAG_DEPS="-MMD -MF"
+  C_FLAG_DEPS="-MMD -MF"
+  CXX_FLAG_DEPS="-MMD -MF"
 
-case $COMPILER_TYPE in
-  CC )
-    case $COMPILER_NAME in
-      gcc )
-      	case $OPENJDK_TARGET_OS in
-	  macosx )
-	    # On MacOSX we optimize for size, something
-	    # we should do for all platforms?
-	    C_O_FLAG_HI="-Os"
-	    C_O_FLAG_NORM="-Os"
-	    C_O_FLAG_NONE=""
-	    ;;
-	  *)
-	    C_O_FLAG_HI="-O3"
-	    C_O_FLAG_NORM="-O2"
-	    C_O_FLAG_NONE="-O0"
-	    ;;
-	esac
-        CXX_O_FLAG_HI="$C_O_FLAG_HI"
-        CXX_O_FLAG_NORM="$C_O_FLAG_NORM"
-        CXX_O_FLAG_NONE="$C_O_FLAG_NONE"
-        CFLAGS_DEBUG_SYMBOLS="-g"
-        CXXFLAGS_DEBUG_SYMBOLS="-g"
-        if test "x$OPENJDK_TARGET_CPU_BITS" = "x64" && test "x$DEBUG_LEVEL" = "xfastdebug"; then
+  case $COMPILER_TYPE in
+    CC )
+      case $COMPILER_NAME in
+        gcc )
+          case $OPENJDK_TARGET_OS in
+            macosx )
+              # On MacOSX we optimize for size, something
+              # we should do for all platforms?
+              C_O_FLAG_HI="-Os"
+              C_O_FLAG_NORM="-Os"
+              C_O_FLAG_NONE=""
+              ;;
+            *)
+              C_O_FLAG_HI="-O3"
+              C_O_FLAG_NORM="-O2"
+              C_O_FLAG_NONE="-O0"
+              ;;
+          esac
+          CXX_O_FLAG_HI="$C_O_FLAG_HI"
+          CXX_O_FLAG_NORM="$C_O_FLAG_NORM"
+          CXX_O_FLAG_NONE="$C_O_FLAG_NONE"
+          CFLAGS_DEBUG_SYMBOLS="-g"
+          CXXFLAGS_DEBUG_SYMBOLS="-g"
+          if test "x$OPENJDK_TARGET_CPU_BITS" = "x64" && test "x$DEBUG_LEVEL" = "xfastdebug"; then
             CFLAGS_DEBUG_SYMBOLS="-g1"
             CXXFLAGS_DEBUG_SYMBOLS="-g1"
-        fi
-        ;;
-      ossc )
-        #
-        # Forte has different names for this with their C++ compiler...
-        #
-        C_FLAG_DEPS="-xMMD -xMF"
-        CXX_FLAG_DEPS="-xMMD -xMF"
+          fi
+          ;;
+        ossc )
+          #
+          # Forte has different names for this with their C++ compiler...
+          #
+          C_FLAG_DEPS="-xMMD -xMF"
+          CXX_FLAG_DEPS="-xMMD -xMF"
 
-        # Extra options used with HIGHEST
-        #
-        # WARNING: Use of OPTIMIZATION_LEVEL=HIGHEST in your Makefile needs to be
-        #          done with care, there are some assumptions below that need to
-        #          be understood about the use of pointers, and IEEE behavior.
-        #
-        # Use non-standard floating point mode (not IEEE 754)
-        CC_HIGHEST="$CC_HIGHEST -fns"
-        # Do some simplification of floating point arithmetic (not IEEE 754)
-        CC_HIGHEST="$CC_HIGHEST -fsimple"
-        # Use single precision floating point with 'float'
-        CC_HIGHEST="$CC_HIGHEST -fsingle"
-        # Assume memory references via basic pointer types do not alias
-        #   (Source with excessing pointer casting and data access with mixed
-        #    pointer types are not recommended)
-        CC_HIGHEST="$CC_HIGHEST -xalias_level=basic"
-        # Use intrinsic or inline versions for math/std functions
-        #   (If you expect perfect errno behavior, do not use this)
-        CC_HIGHEST="$CC_HIGHEST -xbuiltin=%all"
-        # Loop data dependency optimizations (need -xO3 or higher)
-        CC_HIGHEST="$CC_HIGHEST -xdepend"
-        # Pointer parameters to functions do not overlap
-        #   (Similar to -xalias_level=basic usage, but less obvious sometimes.
-        #    If you pass in multiple pointers to the same data, do not use this)
-        CC_HIGHEST="$CC_HIGHEST -xrestrict"
-        # Inline some library routines
-        #   (If you expect perfect errno behavior, do not use this)
-        CC_HIGHEST="$CC_HIGHEST -xlibmil"
-        # Use optimized math routines
-        #   (If you expect perfect errno behavior, do not use this)
-        #  Can cause undefined external on Solaris 8 X86 on __sincos, removing for now
-        #CC_HIGHEST="$CC_HIGHEST -xlibmopt"
+          # Extra options used with HIGHEST
+          #
+          # WARNING: Use of OPTIMIZATION_LEVEL=HIGHEST in your Makefile needs to be
+          #          done with care, there are some assumptions below that need to
+          #          be understood about the use of pointers, and IEEE behavior.
+          #
+          # Use non-standard floating point mode (not IEEE 754)
+          CC_HIGHEST="$CC_HIGHEST -fns"
+          # Do some simplification of floating point arithmetic (not IEEE 754)
+          CC_HIGHEST="$CC_HIGHEST -fsimple"
+          # Use single precision floating point with 'float'
+          CC_HIGHEST="$CC_HIGHEST -fsingle"
+          # Assume memory references via basic pointer types do not alias
+          #   (Source with excessing pointer casting and data access with mixed
+          #    pointer types are not recommended)
+          CC_HIGHEST="$CC_HIGHEST -xalias_level=basic"
+          # Use intrinsic or inline versions for math/std functions
+          #   (If you expect perfect errno behavior, do not use this)
+          CC_HIGHEST="$CC_HIGHEST -xbuiltin=%all"
+          # Loop data dependency optimizations (need -xO3 or higher)
+          CC_HIGHEST="$CC_HIGHEST -xdepend"
+          # Pointer parameters to functions do not overlap
+          #   (Similar to -xalias_level=basic usage, but less obvious sometimes.
+          #    If you pass in multiple pointers to the same data, do not use this)
+          CC_HIGHEST="$CC_HIGHEST -xrestrict"
+          # Inline some library routines
+          #   (If you expect perfect errno behavior, do not use this)
+          CC_HIGHEST="$CC_HIGHEST -xlibmil"
+          # Use optimized math routines
+          #   (If you expect perfect errno behavior, do not use this)
+          #  Can cause undefined external on Solaris 8 X86 on __sincos, removing for now
+          #CC_HIGHEST="$CC_HIGHEST -xlibmopt"
 
-        if test "x$OPENJDK_TARGET_CPU" = xsparc; then
-          CFLAGS_JDK="${CFLAGS_JDK} -xmemalign=4s"
-          CXXFLAGS_JDK="${CXXFLAGS_JDK} -xmemalign=4s"
-        fi
+          if test "x$OPENJDK_TARGET_CPU" = xsparc; then
+            CFLAGS_JDK="${CFLAGS_JDK} -xmemalign=4s"
+            CXXFLAGS_JDK="${CXXFLAGS_JDK} -xmemalign=4s"
+          fi
 
-        case $OPENJDK_TARGET_CPU_ARCH in
-          x86)
-            C_O_FLAG_HIGHEST="-xO4 -Wu,-O4~yz $CC_HIGHEST -xregs=no%frameptr"
-            C_O_FLAG_HI="-xO4 -Wu,-O4~yz -xregs=no%frameptr"
-            C_O_FLAG_NORM="-xO2 -Wu,-O2~yz -xregs=no%frameptr"
-            C_O_FLAG_NONE="-xregs=no%frameptr"
-            CXX_O_FLAG_HIGHEST="-xO4 -Qoption ube -O4~yz $CC_HIGHEST -xregs=no%frameptr"
-            CXX_O_FLAG_HI="-xO4 -Qoption ube -O4~yz -xregs=no%frameptr"
-            CXX_O_FLAG_NORM="-xO2 -Qoption ube -O2~yz -xregs=no%frameptr"
-            CXX_O_FLAG_NONE="-xregs=no%frameptr"
-            if test "x$OPENJDK_TARGET_CPU" = xx86; then
-               C_O_FLAG_HIGHEST="$C_O_FLAG_HIGHEST -xchip=pentium"
-               CXX_O_FLAG_HIGHEST="$CXX_O_FLAG_HIGHEST -xchip=pentium"
-            fi
-            ;;
-          sparc)
-            CFLAGS_JDKLIB_EXTRA="${CFLAGS_JDKLIB_EXTRA} -xregs=no%appl"
-            CXXFLAGS_JDKLIB_EXTRA="${CXXFLAGS_JDKLIB_EXTRA} -xregs=no%appl"
-            C_O_FLAG_HIGHEST="-xO4 -Wc,-Qrm-s -Wc,-Qiselect-T0 $CC_HIGHEST -xprefetch=auto,explicit -xchip=ultra"
-            C_O_FLAG_HI="-xO4 -Wc,-Qrm-s -Wc,-Qiselect-T0"
-            C_O_FLAG_NORM="-xO2 -Wc,-Qrm-s -Wc,-Qiselect-T0"
-            C_O_FLAG_NONE=""
-            CXX_O_FLAG_HIGHEST="-xO4 -Qoption cg -Qrm-s -Qoption cg -Qiselect-T0 $CC_HIGHEST -xprefetch=auto,explicit -xchip=ultra"
-            CXX_O_FLAG_HI="-xO4 -Qoption cg -Qrm-s -Qoption cg -Qiselect-T0"
-            CXX_O_FLAG_NORM="-xO2 -Qoption cg -Qrm-s -Qoption cg -Qiselect-T0"
-            CXX_O_FLAG_NONE=""
-            ;;
-        esac
+          case $OPENJDK_TARGET_CPU_ARCH in
+            x86)
+              C_O_FLAG_HIGHEST="-xO4 -Wu,-O4~yz $CC_HIGHEST -xregs=no%frameptr"
+              C_O_FLAG_HI="-xO4 -Wu,-O4~yz -xregs=no%frameptr"
+              C_O_FLAG_NORM="-xO2 -Wu,-O2~yz -xregs=no%frameptr"
+              C_O_FLAG_NONE="-xregs=no%frameptr"
+              CXX_O_FLAG_HIGHEST="-xO4 -Qoption ube -O4~yz $CC_HIGHEST -xregs=no%frameptr"
+              CXX_O_FLAG_HI="-xO4 -Qoption ube -O4~yz -xregs=no%frameptr"
+              CXX_O_FLAG_NORM="-xO2 -Qoption ube -O2~yz -xregs=no%frameptr"
+              CXX_O_FLAG_NONE="-xregs=no%frameptr"
+              if test "x$OPENJDK_TARGET_CPU" = xx86; then
+                C_O_FLAG_HIGHEST="$C_O_FLAG_HIGHEST -xchip=pentium"
+                CXX_O_FLAG_HIGHEST="$CXX_O_FLAG_HIGHEST -xchip=pentium"
+              fi
+              ;;
+            sparc)
+              CFLAGS_JDKLIB_EXTRA="${CFLAGS_JDKLIB_EXTRA} -xregs=no%appl"
+              CXXFLAGS_JDKLIB_EXTRA="${CXXFLAGS_JDKLIB_EXTRA} -xregs=no%appl"
+              C_O_FLAG_HIGHEST="-xO4 -Wc,-Qrm-s -Wc,-Qiselect-T0 $CC_HIGHEST -xprefetch=auto,explicit -xchip=ultra"
+              C_O_FLAG_HI="-xO4 -Wc,-Qrm-s -Wc,-Qiselect-T0"
+              C_O_FLAG_NORM="-xO2 -Wc,-Qrm-s -Wc,-Qiselect-T0"
+              C_O_FLAG_NONE=""
+              CXX_O_FLAG_HIGHEST="-xO4 -Qoption cg -Qrm-s -Qoption cg -Qiselect-T0 $CC_HIGHEST -xprefetch=auto,explicit -xchip=ultra"
+              CXX_O_FLAG_HI="-xO4 -Qoption cg -Qrm-s -Qoption cg -Qiselect-T0"
+              CXX_O_FLAG_NORM="-xO2 -Qoption cg -Qrm-s -Qoption cg -Qiselect-T0"
+              CXX_O_FLAG_NONE=""
+              ;;
+          esac
 
-    CFLAGS_DEBUG_SYMBOLS="-g -xs"
-    CXXFLAGS_DEBUG_SYMBOLS="-g0 -xs"
-    esac
-    ;;
-  CL )
-    C_O_FLAG_HIGHEST="-O2"
-    C_O_FLAG_HI="-O1"
-    C_O_FLAG_NORM="-O1"
-    C_O_FLAG_NONE="-Od"
-    CXX_O_FLAG_HIGHEST="$C_O_FLAG_HIGHEST"
-    CXX_O_FLAG_HI="$C_O_FLAG_HI"
-    CXX_O_FLAG_NORM="$C_O_FLAG_NORM"
-    CXX_O_FLAG_NONE="$C_O_FLAG_NONE"
-    ;;
-esac
+          CFLAGS_DEBUG_SYMBOLS="-g -xs"
+          CXXFLAGS_DEBUG_SYMBOLS="-g0 -xs"
+      esac
+      ;;
+    CL )
+      C_O_FLAG_HIGHEST="-O2"
+      C_O_FLAG_HI="-O1"
+      C_O_FLAG_NORM="-O1"
+      C_O_FLAG_NONE="-Od"
+      CXX_O_FLAG_HIGHEST="$C_O_FLAG_HIGHEST"
+      CXX_O_FLAG_HI="$C_O_FLAG_HI"
+      CXX_O_FLAG_NORM="$C_O_FLAG_NORM"
+      CXX_O_FLAG_NONE="$C_O_FLAG_NONE"
+      ;;
+  esac
 
-if test -z "$C_O_FLAG_HIGHEST"; then
-   C_O_FLAG_HIGHEST="$C_O_FLAG_HI"
-fi
+  if test -z "$C_O_FLAG_HIGHEST"; then
+    C_O_FLAG_HIGHEST="$C_O_FLAG_HI"
+  fi
 
-if test -z "$CXX_O_FLAG_HIGHEST"; then
-   CXX_O_FLAG_HIGHEST="$CXX_O_FLAG_HI"
-fi
+  if test -z "$CXX_O_FLAG_HIGHEST"; then
+    CXX_O_FLAG_HIGHEST="$CXX_O_FLAG_HI"
+  fi
 
-AC_SUBST(C_O_FLAG_HIGHEST)
-AC_SUBST(C_O_FLAG_HI)
-AC_SUBST(C_O_FLAG_NORM)
-AC_SUBST(C_O_FLAG_NONE)
-AC_SUBST(CXX_O_FLAG_HIGHEST)
-AC_SUBST(CXX_O_FLAG_HI)
-AC_SUBST(CXX_O_FLAG_NORM)
-AC_SUBST(CXX_O_FLAG_NONE)
-AC_SUBST(C_FLAG_DEPS)
-AC_SUBST(CXX_FLAG_DEPS)
+  AC_SUBST(C_O_FLAG_HIGHEST)
+  AC_SUBST(C_O_FLAG_HI)
+  AC_SUBST(C_O_FLAG_NORM)
+  AC_SUBST(C_O_FLAG_NONE)
+  AC_SUBST(CXX_O_FLAG_HIGHEST)
+  AC_SUBST(CXX_O_FLAG_HI)
+  AC_SUBST(CXX_O_FLAG_NORM)
+  AC_SUBST(CXX_O_FLAG_NONE)
+  AC_SUBST(C_FLAG_DEPS)
+  AC_SUBST(CXX_FLAG_DEPS)
 ])
 
 AC_DEFUN_ONCE([TOOLCHAIN_SETUP_COMPILER_FLAGS_FOR_JDK],
 [
 
-if test "x$CFLAGS" != "x${ADDED_CFLAGS}"; then
-   AC_MSG_WARN([Ignoring CFLAGS($CFLAGS) found in environment. Use --with-extra-cflags])
-fi
+  if test "x$CFLAGS" != "x${ADDED_CFLAGS}"; then
+    AC_MSG_WARN([Ignoring CFLAGS($CFLAGS) found in environment. Use --with-extra-cflags])
+  fi
 
-if test "x$CXXFLAGS" != "x${ADDED_CXXFLAGS}"; then
-   AC_MSG_WARN([Ignoring CXXFLAGS($CXXFLAGS) found in environment. Use --with-extra-cxxflags])
-fi
+  if test "x$CXXFLAGS" != "x${ADDED_CXXFLAGS}"; then
+    AC_MSG_WARN([Ignoring CXXFLAGS($CXXFLAGS) found in environment. Use --with-extra-cxxflags])
+  fi
 
-if test "x$LDFLAGS" != "x${ADDED_LDFLAGS}"; then
-   AC_MSG_WARN([Ignoring LDFLAGS($LDFLAGS) found in environment. Use --with-extra-ldflags])
-fi
+  if test "x$LDFLAGS" != "x${ADDED_LDFLAGS}"; then
+    AC_MSG_WARN([Ignoring LDFLAGS($LDFLAGS) found in environment. Use --with-extra-ldflags])
+  fi
 
-AC_ARG_WITH(extra-cflags, [AS_HELP_STRING([--with-extra-cflags],
-    [extra flags to be used when compiling jdk c-files])])
+  AC_ARG_WITH(extra-cflags, [AS_HELP_STRING([--with-extra-cflags],
+      [extra flags to be used when compiling jdk c-files])])
 
-AC_ARG_WITH(extra-cxxflags, [AS_HELP_STRING([--with-extra-cxxflags],
-    [extra flags to be used when compiling jdk c++-files])])
+  AC_ARG_WITH(extra-cxxflags, [AS_HELP_STRING([--with-extra-cxxflags],
+      [extra flags to be used when compiling jdk c++-files])])
 
-AC_ARG_WITH(extra-ldflags, [AS_HELP_STRING([--with-extra-ldflags],
-    [extra flags to be used when linking jdk])])
+  AC_ARG_WITH(extra-ldflags, [AS_HELP_STRING([--with-extra-ldflags],
+      [extra flags to be used when linking jdk])])
 
-CFLAGS_JDK="${CFLAGS_JDK} $with_extra_cflags"
-CXXFLAGS_JDK="${CXXFLAGS_JDK} $with_extra_cxxflags"
-LDFLAGS_JDK="${LDFLAGS_JDK} $with_extra_ldflags"
+  CFLAGS_JDK="${CFLAGS_JDK} $with_extra_cflags"
+  CXXFLAGS_JDK="${CXXFLAGS_JDK} $with_extra_cxxflags"
+  LDFLAGS_JDK="${LDFLAGS_JDK} $with_extra_ldflags"
 
-# Hotspot needs these set in their legacy form
-LEGACY_EXTRA_CFLAGS=$with_extra_cflags
-LEGACY_EXTRA_CXXFLAGS=$with_extra_cxxflags
-LEGACY_EXTRA_LDFLAGS=$with_extra_ldflags
+  # Hotspot needs these set in their legacy form
+  LEGACY_EXTRA_CFLAGS=$with_extra_cflags
+  LEGACY_EXTRA_CXXFLAGS=$with_extra_cxxflags
+  LEGACY_EXTRA_LDFLAGS=$with_extra_ldflags
 
-AC_SUBST(LEGACY_EXTRA_CFLAGS)
-AC_SUBST(LEGACY_EXTRA_CXXFLAGS)
-AC_SUBST(LEGACY_EXTRA_LDFLAGS)
+  AC_SUBST(LEGACY_EXTRA_CFLAGS)
+  AC_SUBST(LEGACY_EXTRA_CXXFLAGS)
+  AC_SUBST(LEGACY_EXTRA_LDFLAGS)
 
-###############################################################################
-#
-# Now setup the CFLAGS and LDFLAGS for the JDK build.
-# Later we will also have CFLAGS and LDFLAGS for the hotspot subrepo build.
-#
-case $COMPILER_NAME in
-      gcc )
-      	  CCXXFLAGS_JDK="$CCXXFLAGS $CCXXFLAGS_JDK -W -Wall -Wno-unused -Wno-parentheses \
-                          -pipe \
-                          -D_GNU_SOURCE -D_REENTRANT -D_LARGEFILE64_SOURCE"
-	  case $OPENJDK_TARGET_CPU_ARCH in
-	  arm )
-            # on arm we don't prevent gcc to omit frame pointer but do prevent strict aliasing
-	    CFLAGS_JDK="${CFLAGS_JDK} -fno-strict-aliasing"
-	  ;;
-	  ppc )
-            # on ppc we don't prevent gcc to omit frame pointer nor strict-aliasing
-	  ;;
-	  * )
-	    CCXXFLAGS_JDK="$CCXXFLAGS_JDK -fno-omit-frame-pointer"
-	    CFLAGS_JDK="${CFLAGS_JDK} -fno-strict-aliasing"
+  ###############################################################################
+  #
+  # Now setup the CFLAGS and LDFLAGS for the JDK build.
+  # Later we will also have CFLAGS and LDFLAGS for the hotspot subrepo build.
+  #
+  case $COMPILER_NAME in
+    gcc )
+      CCXXFLAGS_JDK="$CCXXFLAGS $CCXXFLAGS_JDK -W -Wall -Wno-unused -Wno-parentheses \
+      -pipe \
+      -D_GNU_SOURCE -D_REENTRANT -D_LARGEFILE64_SOURCE"
+      case $OPENJDK_TARGET_CPU_ARCH in
+        arm )
+          # on arm we don't prevent gcc to omit frame pointer but do prevent strict aliasing
+          CFLAGS_JDK="${CFLAGS_JDK} -fno-strict-aliasing"
           ;;
-	  esac
+        ppc )
+          # on ppc we don't prevent gcc to omit frame pointer nor strict-aliasing
           ;;
-      ossc )
-          CCXXFLAGS_JDK="$CCXXFLAGS $CCXXFLAGS_JDK -DTRACING -DMACRO_MEMSYS_OPS -DBREAKPTS"
-          case $OPENJDK_TARGET_CPU_ARCH in
-          x86 )
-            CCXXFLAGS_JDK="$CCXXFLAGS_JDK -DcpuIntel -Di586 -D$OPENJDK_TARGET_CPU_LEGACY_LIB"
-       	    CFLAGS_JDK="$CFLAGS_JDK -erroff=E_BAD_PRAGMA_PACK_VALUE"
+        * )
+          CCXXFLAGS_JDK="$CCXXFLAGS_JDK -fno-omit-frame-pointer"
+          CFLAGS_JDK="${CFLAGS_JDK} -fno-strict-aliasing"
           ;;
-          esac
-
-      	  CFLAGS_JDK="$CFLAGS_JDK -xc99=%none -xCC -errshort=tags -Xa -v -mt -W0,-noglobal"
-      	  CXXFLAGS_JDK="$CXXFLAGS_JDK -errtags=yes +w -mt -features=no%except -DCC_NOEX -norunpath -xnolib"
-
-          LDFLAGS_JDK="$LDFLAGS_JDK -z defs -xildoff -ztext"
-          LDFLAGS_CXX_JDK="$LDFLAGS_CXX_JDK -norunpath -xnolib"
+      esac
+      ;;
+    ossc )
+      CCXXFLAGS_JDK="$CCXXFLAGS $CCXXFLAGS_JDK -DTRACING -DMACRO_MEMSYS_OPS -DBREAKPTS"
+      case $OPENJDK_TARGET_CPU_ARCH in
+        x86 )
+          CCXXFLAGS_JDK="$CCXXFLAGS_JDK -DcpuIntel -Di586 -D$OPENJDK_TARGET_CPU_LEGACY_LIB"
+          CFLAGS_JDK="$CFLAGS_JDK -erroff=E_BAD_PRAGMA_PACK_VALUE"
           ;;
-      cl )
-          CCXXFLAGS_JDK="$CCXXFLAGS $CCXXFLAGS_JDK -Zi -MD -Zc:wchar_t- -W3 -wd4800 \
-               -D_STATIC_CPPLIB -D_DISABLE_DEPRECATE_STATIC_CPPLIB -DWIN32_LEAN_AND_MEAN \
-	       -D_CRT_SECURE_NO_DEPRECATE -D_CRT_NONSTDC_NO_DEPRECATE \
-	       -DWIN32 -DIAL"
-          case $OPENJDK_TARGET_CPU in
-              x86 )
-                  CCXXFLAGS_JDK="$CCXXFLAGS_JDK -D_X86_ -Dx86"
-                  ;;
-              x86_64 )
-                  CCXXFLAGS_JDK="$CCXXFLAGS_JDK -D_AMD64_ -Damd64"
-                  ;;
-          esac
+      esac
+
+      CFLAGS_JDK="$CFLAGS_JDK -xc99=%none -xCC -errshort=tags -Xa -v -mt -W0,-noglobal"
+      CXXFLAGS_JDK="$CXXFLAGS_JDK -errtags=yes +w -mt -features=no%except -DCC_NOEX -norunpath -xnolib"
+
+      LDFLAGS_JDK="$LDFLAGS_JDK -z defs -xildoff -ztext"
+      LDFLAGS_CXX_JDK="$LDFLAGS_CXX_JDK -norunpath -xnolib"
+      ;;
+    cl )
+      CCXXFLAGS_JDK="$CCXXFLAGS $CCXXFLAGS_JDK -Zi -MD -Zc:wchar_t- -W3 -wd4800 \
+      -D_STATIC_CPPLIB -D_DISABLE_DEPRECATE_STATIC_CPPLIB -DWIN32_LEAN_AND_MEAN \
+      -D_CRT_SECURE_NO_DEPRECATE -D_CRT_NONSTDC_NO_DEPRECATE \
+      -DWIN32 -DIAL"
+      case $OPENJDK_TARGET_CPU in
+        x86 )
+          CCXXFLAGS_JDK="$CCXXFLAGS_JDK -D_X86_ -Dx86"
           ;;
-esac
+        x86_64 )
+          CCXXFLAGS_JDK="$CCXXFLAGS_JDK -D_AMD64_ -Damd64"
+          ;;
+      esac
+      ;;
+  esac
 
-###############################################################################
+  ###############################################################################
 
-# Adjust flags according to debug level.
-case $DEBUG_LEVEL in
-      fastdebug )
-              CFLAGS_JDK="$CFLAGS_JDK $CFLAGS_DEBUG_SYMBOLS"
-              CXXFLAGS_JDK="$CXXFLAGS_JDK $CXXFLAGS_DEBUG_SYMBOLS"
-	      C_O_FLAG_HI="$C_O_FLAG_NORM"
-	      C_O_FLAG_NORM="$C_O_FLAG_NORM"
-	      CXX_O_FLAG_HI="$CXX_O_FLAG_NORM"
-	      CXX_O_FLAG_NORM="$CXX_O_FLAG_NORM"
-              JAVAC_FLAGS="$JAVAC_FLAGS -g"
-              ;;
-      slowdebug )
-              CFLAGS_JDK="$CFLAGS_JDK $CFLAGS_DEBUG_SYMBOLS"
-              CXXFLAGS_JDK="$CXXFLAGS_JDK $CXXFLAGS_DEBUG_SYMBOLS"
-	      C_O_FLAG_HI="$C_O_FLAG_NONE"
-	      C_O_FLAG_NORM="$C_O_FLAG_NONE"
-	      CXX_O_FLAG_HI="$CXX_O_FLAG_NONE"
-	      CXX_O_FLAG_NORM="$CXX_O_FLAG_NONE"
-              JAVAC_FLAGS="$JAVAC_FLAGS -g"
-              ;;
-esac
+  # Adjust flags according to debug level.
+  case $DEBUG_LEVEL in
+    fastdebug )
+      CFLAGS_JDK="$CFLAGS_JDK $CFLAGS_DEBUG_SYMBOLS"
+      CXXFLAGS_JDK="$CXXFLAGS_JDK $CXXFLAGS_DEBUG_SYMBOLS"
+      C_O_FLAG_HI="$C_O_FLAG_NORM"
+      C_O_FLAG_NORM="$C_O_FLAG_NORM"
+      CXX_O_FLAG_HI="$CXX_O_FLAG_NORM"
+      CXX_O_FLAG_NORM="$CXX_O_FLAG_NORM"
+      JAVAC_FLAGS="$JAVAC_FLAGS -g"
+      ;;
+    slowdebug )
+      CFLAGS_JDK="$CFLAGS_JDK $CFLAGS_DEBUG_SYMBOLS"
+      CXXFLAGS_JDK="$CXXFLAGS_JDK $CXXFLAGS_DEBUG_SYMBOLS"
+      C_O_FLAG_HI="$C_O_FLAG_NONE"
+      C_O_FLAG_NORM="$C_O_FLAG_NONE"
+      CXX_O_FLAG_HI="$CXX_O_FLAG_NONE"
+      CXX_O_FLAG_NORM="$CXX_O_FLAG_NONE"
+      JAVAC_FLAGS="$JAVAC_FLAGS -g"
+      ;;
+  esac
 
-CCXXFLAGS_JDK="$CCXXFLAGS_JDK $ADD_LP64"
+  CCXXFLAGS_JDK="$CCXXFLAGS_JDK $ADD_LP64"
 
-# The package path is used only on macosx?
-PACKAGE_PATH=/opt/local
-AC_SUBST(PACKAGE_PATH)
+  # The package path is used only on macosx?
+  PACKAGE_PATH=/opt/local
+  AC_SUBST(PACKAGE_PATH)
 
-if test "x$OPENJDK_TARGET_CPU_ENDIAN" = xlittle; then
+  if test "x$OPENJDK_TARGET_CPU_ENDIAN" = xlittle; then
     # The macro _LITTLE_ENDIAN needs to be defined the same to avoid the
     #   Sun C compiler warning message: warning: macro redefined: _LITTLE_ENDIAN
     #   (The Solaris X86 system defines this in file /usr/include/sys/isa_defs.h).
     #   Note: -Dmacro         is the same as    #define macro 1
-    #         -Dmacro=	    is the same as    #define macro
+    #         -Dmacro=        is the same as    #define macro
     if test "x$OPENJDK_TARGET_OS" = xsolaris; then
-        CCXXFLAGS_JDK="$CCXXFLAGS_JDK -D_LITTLE_ENDIAN="
+      CCXXFLAGS_JDK="$CCXXFLAGS_JDK -D_LITTLE_ENDIAN="
     else
-        CCXXFLAGS_JDK="$CCXXFLAGS_JDK -D_LITTLE_ENDIAN"
+      CCXXFLAGS_JDK="$CCXXFLAGS_JDK -D_LITTLE_ENDIAN"
     fi
-else
+  else
     CCXXFLAGS_JDK="$CCXXFLAGS_JDK -D_BIG_ENDIAN"
-fi
-if test "x$OPENJDK_TARGET_OS" = xlinux; then
+  fi
+  if test "x$OPENJDK_TARGET_OS" = xlinux; then
     CCXXFLAGS_JDK="$CCXXFLAGS_JDK -DLINUX"
-fi
-if test "x$OPENJDK_TARGET_OS" = xwindows; then
+  fi
+  if test "x$OPENJDK_TARGET_OS" = xwindows; then
     CCXXFLAGS_JDK="$CCXXFLAGS_JDK -DWINDOWS"
-fi
-if test "x$OPENJDK_TARGET_OS" = xsolaris; then
+  fi
+  if test "x$OPENJDK_TARGET_OS" = xsolaris; then
     CCXXFLAGS_JDK="$CCXXFLAGS_JDK -DSOLARIS"
-fi
-if test "x$OPENJDK_TARGET_OS" = xmacosx; then
+  fi
+  if test "x$OPENJDK_TARGET_OS" = xmacosx; then
     CCXXFLAGS_JDK="$CCXXFLAGS_JDK -DMACOSX -D_ALLBSD_SOURCE -D_DARWIN_UNLIMITED_SELECT"
     # Setting these parameters makes it an error to link to macosx APIs that are
     # newer than the given OS version and makes the linked binaries compatible even
@@ -919,118 +921,118 @@
     # command line.
     CCXXFLAGS_JDK="$CCXXFLAGS_JDK -DMAC_OS_X_VERSION_MAX_ALLOWED=\$(subst .,,\$(MACOSX_VERSION_MIN)) -mmacosx-version-min=\$(MACOSX_VERSION_MIN)"
     LDFLAGS_JDK="$LDFLAGS_JDK -mmacosx-version-min=\$(MACOSX_VERSION_MIN)"
-fi
-if test "x$OPENJDK_TARGET_OS" = xbsd; then
+  fi
+  if test "x$OPENJDK_TARGET_OS" = xbsd; then
     CCXXFLAGS_JDK="$CCXXFLAGS_JDK -DBSD -D_ALLBSD_SOURCE"
-fi
-if test "x$DEBUG_LEVEL" = xrelease; then
+  fi
+  if test "x$DEBUG_LEVEL" = xrelease; then
     CCXXFLAGS_JDK="$CCXXFLAGS_JDK -DNDEBUG"
-    if test "x$OPENJDK_TARGET_OS" = xsolaris; then
-        CCXXFLAGS_JDK="$CCXXFLAGS_JDK -DTRIMMED"
-    fi
-else
+  if test "x$OPENJDK_TARGET_OS" = xsolaris; then
+    CCXXFLAGS_JDK="$CCXXFLAGS_JDK -DTRIMMED"
+  fi
+  else
     CCXXFLAGS_JDK="$CCXXFLAGS_JDK -DDEBUG"
-fi
+  fi
 
-CCXXFLAGS_JDK="$CCXXFLAGS_JDK -DARCH='\"$OPENJDK_TARGET_CPU_LEGACY\"' -D$OPENJDK_TARGET_CPU_LEGACY"
-CCXXFLAGS_JDK="$CCXXFLAGS_JDK -DRELEASE='\"$RELEASE\"'"
+  CCXXFLAGS_JDK="$CCXXFLAGS_JDK -DARCH='\"$OPENJDK_TARGET_CPU_LEGACY\"' -D$OPENJDK_TARGET_CPU_LEGACY"
+  CCXXFLAGS_JDK="$CCXXFLAGS_JDK -DRELEASE='\"$RELEASE\"'"
 
-CCXXFLAGS_JDK="$CCXXFLAGS_JDK \
-        -I${JDK_OUTPUTDIR}/include \
-        -I${JDK_OUTPUTDIR}/include/$OPENJDK_TARGET_OS \
-        -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"
+  CCXXFLAGS_JDK="$CCXXFLAGS_JDK \
+      -I${JDK_OUTPUTDIR}/include \
+      -I${JDK_OUTPUTDIR}/include/$OPENJDK_TARGET_OS \
+      -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"
 
-# The shared libraries are compiled using the picflag.
-CFLAGS_JDKLIB="$CCXXFLAGS_JDK $CFLAGS_JDK $PICFLAG $CFLAGS_JDKLIB_EXTRA"
-CXXFLAGS_JDKLIB="$CCXXFLAGS_JDK $CXXFLAGS_JDK $PICFLAG $CXXFLAGS_JDKLIB_EXTRA "
+  # The shared libraries are compiled using the picflag.
+  CFLAGS_JDKLIB="$CCXXFLAGS_JDK $CFLAGS_JDK $PICFLAG $CFLAGS_JDKLIB_EXTRA"
+  CXXFLAGS_JDKLIB="$CCXXFLAGS_JDK $CXXFLAGS_JDK $PICFLAG $CXXFLAGS_JDKLIB_EXTRA "
 
-# Executable flags
-CFLAGS_JDKEXE="$CCXXFLAGS_JDK $CFLAGS_JDK"
-CXXFLAGS_JDKEXE="$CCXXFLAGS_JDK $CXXFLAGS_JDK"
+  # Executable flags
+  CFLAGS_JDKEXE="$CCXXFLAGS_JDK $CFLAGS_JDK"
+  CXXFLAGS_JDKEXE="$CCXXFLAGS_JDK $CXXFLAGS_JDK"
 
-# Now this is odd. The JDK native libraries have to link against libjvm.so
-# On 32-bit machines there is normally two distinct libjvm.so:s, client and server.
-# Which should we link to? Are we lucky enough that the binary api to the libjvm.so library
-# is identical for client and server? Yes. Which is picked at runtime (client or server)?
-# Neither, since the chosen libjvm.so has already been loaded by the launcher, all the following
-# libraries will link to whatever is in memory. Yuck.
-#
-# Thus we offer the compiler to find libjvm.so first in server then in client. It works. Ugh.
-if test "x$COMPILER_NAME" = xcl; then
+  # Now this is odd. The JDK native libraries have to link against libjvm.so
+  # On 32-bit machines there is normally two distinct libjvm.so:s, client and server.
+  # Which should we link to? Are we lucky enough that the binary api to the libjvm.so library
+  # is identical for client and server? Yes. Which is picked at runtime (client or server)?
+  # Neither, since the chosen libjvm.so has already been loaded by the launcher, all the following
+  # libraries will link to whatever is in memory. Yuck.
+  #
+  # Thus we offer the compiler to find libjvm.so first in server then in client. It works. Ugh.
+  if test "x$COMPILER_NAME" = xcl; then
     LDFLAGS_JDK="$LDFLAGS_JDK -nologo -opt:ref -incremental:no"
     if test "x$OPENJDK_TARGET_CPU" = xx86; then
-        LDFLAGS_JDK="$LDFLAGS_JDK -safeseh"
+      LDFLAGS_JDK="$LDFLAGS_JDK -safeseh"
     fi
     # TODO: make -debug optional "--disable-full-debug-symbols"
     LDFLAGS_JDK="$LDFLAGS_JDK -debug"
     LDFLAGS_JDKLIB="${LDFLAGS_JDK} -dll -libpath:${JDK_OUTPUTDIR}/lib"
     LDFLAGS_JDKLIB_SUFFIX=""
     if test "x$OPENJDK_TARGET_CPU_BITS" = "x64"; then
-        LDFLAGS_STACK_SIZE=1048576
+      LDFLAGS_STACK_SIZE=1048576
     else
-        LDFLAGS_STACK_SIZE=327680
+      LDFLAGS_STACK_SIZE=327680
     fi
     LDFLAGS_JDKEXE="${LDFLAGS_JDK} /STACK:$LDFLAGS_STACK_SIZE"
-else
+  else
     if test "x$COMPILER_NAME" = xgcc; then
-        # If this is a --hash-style=gnu system, use --hash-style=both, why?
-        HAS_GNU_HASH=`$CC -dumpspecs 2>/dev/null | $GREP 'hash-style=gnu'`
-        if test -n "$HAS_GNU_HASH"; then
-            LDFLAGS_JDK="${LDFLAGS_JDK} -Xlinker --hash-style=both "
+      # If this is a --hash-style=gnu system, use --hash-style=both, why?
+      HAS_GNU_HASH=`$CC -dumpspecs 2>/dev/null | $GREP 'hash-style=gnu'`
+      if test -n "$HAS_GNU_HASH"; then
+        LDFLAGS_JDK="${LDFLAGS_JDK} -Xlinker --hash-style=both "
+      fi
+      if test "x$OPENJDK_TARGET_OS" = xlinux; then
+        # And since we now know that the linker is gnu, then add -z defs, to forbid
+        # undefined symbols in object files.
+        LDFLAGS_JDK="${LDFLAGS_JDK} -Xlinker -z -Xlinker defs"
+        if test "x$DEBUG_LEVEL" = "xrelease"; then
+          # When building release libraries, tell the linker optimize them.
+          # Should this be supplied to the OSS linker as well?
+          LDFLAGS_JDK="${LDFLAGS_JDK} -Xlinker -O1"
         fi
-        if test "x$OPENJDK_TARGET_OS" = xlinux; then
-          # And since we now know that the linker is gnu, then add -z defs, to forbid
-          # undefined symbols in object files.
-          LDFLAGS_JDK="${LDFLAGS_JDK} -Xlinker -z -Xlinker defs"
-          if test "x$DEBUG_LEVEL" = "xrelease"; then
-              # When building release libraries, tell the linker optimize them.
-              # Should this be supplied to the OSS linker as well?
-              LDFLAGS_JDK="${LDFLAGS_JDK} -Xlinker -O1"
-          fi
-        fi
+      fi
     fi
     LDFLAGS_JDKLIB="${LDFLAGS_JDK} $SHARED_LIBRARY_FLAGS \
-                    -L${JDK_OUTPUTDIR}/lib${OPENJDK_TARGET_CPU_LIBDIR}"
+        -L${JDK_OUTPUTDIR}/lib${OPENJDK_TARGET_CPU_LIBDIR}"
 
     # On some platforms (mac) the linker warns about non existing -L dirs.
     # Add server first if available. Linking aginst client does not always produce the same results.
     # Only add client dir if client is being built. Add minimal (note not minimal1) if only building minimal1.
     # Default to server for other variants.
     if test "x$JVM_VARIANT_SERVER" = xtrue; then
-        LDFLAGS_JDKLIB="${LDFLAGS_JDKLIB} -L${JDK_OUTPUTDIR}/lib${OPENJDK_TARGET_CPU_LIBDIR}/server"
+      LDFLAGS_JDKLIB="${LDFLAGS_JDKLIB} -L${JDK_OUTPUTDIR}/lib${OPENJDK_TARGET_CPU_LIBDIR}/server"
     elif test "x$JVM_VARIANT_CLIENT" = xtrue; then
-        LDFLAGS_JDKLIB="${LDFLAGS_JDKLIB} -L${JDK_OUTPUTDIR}/lib${OPENJDK_TARGET_CPU_LIBDIR}/client"
+      LDFLAGS_JDKLIB="${LDFLAGS_JDKLIB} -L${JDK_OUTPUTDIR}/lib${OPENJDK_TARGET_CPU_LIBDIR}/client"
     elif test "x$JVM_VARIANT_MINIMAL1" = xtrue; then
-        LDFLAGS_JDKLIB="${LDFLAGS_JDKLIB} -L${JDK_OUTPUTDIR}/lib${OPENJDK_TARGET_CPU_LIBDIR}/minimal"
+      LDFLAGS_JDKLIB="${LDFLAGS_JDKLIB} -L${JDK_OUTPUTDIR}/lib${OPENJDK_TARGET_CPU_LIBDIR}/minimal"
     else
-        LDFLAGS_JDKLIB="${LDFLAGS_JDKLIB} -L${JDK_OUTPUTDIR}/lib${OPENJDK_TARGET_CPU_LIBDIR}/server"
+      LDFLAGS_JDKLIB="${LDFLAGS_JDKLIB} -L${JDK_OUTPUTDIR}/lib${OPENJDK_TARGET_CPU_LIBDIR}/server"
     fi
 
     LDFLAGS_JDKLIB_SUFFIX="-ljava -ljvm"
     if test "x$COMPILER_NAME" = xossc; then
-        LDFLAGS_JDKLIB_SUFFIX="$LDFLAGS_JDKLIB_SUFFIX -lc"
+      LDFLAGS_JDKLIB_SUFFIX="$LDFLAGS_JDKLIB_SUFFIX -lc"
     fi
 
     LDFLAGS_JDKEXE="${LDFLAGS_JDK}"
     if test "x$OPENJDK_TARGET_OS" = xlinux; then
-        LDFLAGS_JDKEXE="$LDFLAGS_JDKEXE -Xlinker --allow-shlib-undefined"
+      LDFLAGS_JDKEXE="$LDFLAGS_JDKEXE -Xlinker --allow-shlib-undefined"
     fi
-fi
+  fi
 
-AC_SUBST(CFLAGS_JDKLIB)
-AC_SUBST(CFLAGS_JDKEXE)
+  AC_SUBST(CFLAGS_JDKLIB)
+  AC_SUBST(CFLAGS_JDKEXE)
 
-AC_SUBST(CXXFLAGS_JDKLIB)
-AC_SUBST(CXXFLAGS_JDKEXE)
+  AC_SUBST(CXXFLAGS_JDKLIB)
+  AC_SUBST(CXXFLAGS_JDKEXE)
 
-AC_SUBST(LDFLAGS_JDKLIB)
-AC_SUBST(LDFLAGS_JDKEXE)
-AC_SUBST(LDFLAGS_JDKLIB_SUFFIX)
-AC_SUBST(LDFLAGS_JDKEXE_SUFFIX)
-AC_SUBST(LDFLAGS_CXX_JDK)
+  AC_SUBST(LDFLAGS_JDKLIB)
+  AC_SUBST(LDFLAGS_JDKEXE)
+  AC_SUBST(LDFLAGS_JDKLIB_SUFFIX)
+  AC_SUBST(LDFLAGS_JDKEXE_SUFFIX)
+  AC_SUBST(LDFLAGS_CXX_JDK)
 ])
 
 
@@ -1046,18 +1048,16 @@
   saved_cflags="$CFLAGS"
   CFLAGS="$CFLAGS $1"
   AC_LANG_PUSH([C])
-  AC_COMPILE_IFELSE([
-    AC_LANG_SOURCE([[int i;]])
-  ], [], [supports=no])
+  AC_COMPILE_IFELSE([AC_LANG_SOURCE([[int i;]])], [], 
+      [supports=no])
   AC_LANG_POP([C])
   CFLAGS="$saved_cflags"
 
   saved_cxxflags="$CXXFLAGS"
   CXXFLAGS="$CXXFLAG $1"
   AC_LANG_PUSH([C++])
-  AC_COMPILE_IFELSE([
-    AC_LANG_SOURCE([[int i;]])
-  ], [], [supports=no])
+  AC_COMPILE_IFELSE([AC_LANG_SOURCE([[int i;]])], [], 
+      [supports=no])
   AC_LANG_POP([C++])
   CXXFLAGS="$saved_cxxflags"
 
@@ -1086,8 +1086,8 @@
   # Check that the compiler supports -mX flags
   # Set COMPILER_SUPPORTS_TARGET_BITS_FLAG to 'true' if it does
   TOOLCHAIN_COMPILER_CHECK_ARGUMENTS([-m${OPENJDK_TARGET_CPU_BITS}],
-    [COMPILER_SUPPORTS_TARGET_BITS_FLAG=true],
-    [COMPILER_SUPPORTS_TARGET_BITS_FLAG=false])
+      [COMPILER_SUPPORTS_TARGET_BITS_FLAG=true],
+      [COMPILER_SUPPORTS_TARGET_BITS_FLAG=false])
   AC_SUBST(COMPILER_SUPPORTS_TARGET_BITS_FLAG)
 ])
 
@@ -1095,9 +1095,9 @@
 AC_DEFUN_ONCE([TOOLCHAIN_SETUP_JTREG],
 [
   AC_ARG_WITH(jtreg, [AS_HELP_STRING([--with-jtreg],
-  [Regression Test Harness @<:@probed@:>@])],
-  [],
-  [with_jtreg=no])
+      [Regression Test Harness @<:@probed@:>@])],
+      [],
+      [with_jtreg=no])
 
   if test "x$with_jtreg" = xno; then
     # jtreg disabled
diff --git a/common/autoconf/toolchain_windows.m4 b/common/autoconf/toolchain_windows.m4
index f97713f..814b429 100644
--- a/common/autoconf/toolchain_windows.m4
+++ b/common/autoconf/toolchain_windows.m4
@@ -75,7 +75,7 @@
     VCVARSFILE="vc/bin/vcvars32.bat"
   else
     VCVARSFILE="vc/bin/amd64/vcvars64.bat"
-  fi 
+  fi
 
   VS_ENV_CMD=""
   VS_ENV_ARGS=""
@@ -89,7 +89,7 @@
     AC_MSG_NOTICE([The path given by --with-tools-dir does not contain a valid Visual Studio installation])
     AC_MSG_NOTICE([Please point to the VC/bin directory within the Visual Studio installation])
     AC_MSG_ERROR([Cannot locate a valid Visual Studio installation])
-  fi  
+  fi
 
   if test "x$VS100COMNTOOLS" != x; then
     TOOLCHAIN_CHECK_POSSIBLE_VISUAL_STUDIO_ROOT([$VS100COMNTOOLS/../..], [VS100COMNTOOLS variable])
@@ -118,7 +118,7 @@
 # the set env variables into the spec file.
 AC_DEFUN([TOOLCHAIN_SETUP_VISUAL_STUDIO_ENV],
 [
-  # Store path to cygwin link.exe to help excluding it when searching for 
+  # Store path to cygwin link.exe to help excluding it when searching for
   # VS linker. This must be done before changing the PATH when looking for VS.
   AC_PATH_PROG(CYGWIN_LINK, link)
   if test "x$CYGWIN_LINK" != x; then
@@ -187,7 +187,7 @@
       AC_MSG_ERROR([Cannot continue])
     fi
 
-    # Now set all paths and other env variables. This will allow the rest of 
+    # Now set all paths and other env variables. This will allow the rest of
     # the configure script to find and run the compiler in the proper way.
     AC_MSG_NOTICE([Setting extracted environment variables])
     . $OUTPUT_ROOT/localdevenv.sh
@@ -198,7 +198,7 @@
 
   # At this point, we should have corrent variables in the environment, or we can't continue.
   AC_MSG_CHECKING([for Visual Studio variables])
-  
+
   if test "x$VCINSTALLDIR" != x || test "x$WindowsSDKDir" != x || test "x$WINDOWSSDKDIR" != x; then
     if test "x$INCLUDE" = x || test "x$LIB" = x; then
       AC_MSG_RESULT([present but broken])
@@ -228,7 +228,7 @@
     AC_MSG_NOTICE([or run "bash.exe -l" from a VS command prompt and then run configure from there.])
     AC_MSG_ERROR([Cannot continue])
   fi
-  
+
   AC_MSG_CHECKING([for msvcr100.dll])
   AC_ARG_WITH(msvcr-dll, [AS_HELP_STRING([--with-msvcr-dll],
       [copy this msvcr100.dll into the built JDK (Windows only) @<:@probed@:>@])])
diff --git a/common/makefiles/HotspotWrapper.gmk b/common/makefiles/HotspotWrapper.gmk
index 8a1ae64..51437df 100644
--- a/common/makefiles/HotspotWrapper.gmk
+++ b/common/makefiles/HotspotWrapper.gmk
@@ -36,7 +36,7 @@
 default: all
 
 # Get all files except .hg in the hotspot directory.
-HOTSPOT_FILES :=  $(shell $(FIND) -L $(HOTSPOT_TOPDIR) -name ".hg" -prune -o -print)
+HOTSPOT_FILES := $(shell $(FIND) -L $(HOTSPOT_TOPDIR) -name ".hg" -prune -o -print)
 
 # The old build creates hotspot output dir before calling hotspot and
 # not doing it breaks builds on msys.
diff --git a/common/makefiles/IdlCompilation.gmk b/common/makefiles/IdlCompilation.gmk
index 94cc154..d816f23 100644
--- a/common/makefiles/IdlCompilation.gmk
+++ b/common/makefiles/IdlCompilation.gmk
@@ -23,52 +23,52 @@
 # questions.
 #
 
-PREFIXES=-pkgPrefix CORBA                org.omg \
-	-pkgPrefix CosNaming             org.omg \
-	-pkgPrefix CosTransactions       org.omg \
-	-pkgPrefix CosTSInteroperation   org.omg \
-	-pkgPrefix DynamicAny            org.omg \
-	-pkgPrefix Dynamic               org.omg \
-	-pkgPrefix IOP                   org.omg \
-	-pkgPrefix Messaging             org.omg \
-	-pkgPrefix PortableInterceptor   org.omg \
-	-pkgPrefix PortableServer        org.omg \
-	-pkgPrefix activation            com.sun.corba.se.spi \
-	-pkgPrefix GIOP                  com.sun.corba.se \
-	-pkgPrefix PortableActivationIDL com.sun.corba.se \
-	-pkgPrefix messages              com.sun.corba.se 
+PREFIXES=-pkgPrefix CORBA org.omg \
+    -pkgPrefix CosNaming org.omg \
+    -pkgPrefix CosTransactions org.omg \
+    -pkgPrefix CosTSInteroperation org.omg \
+    -pkgPrefix DynamicAny org.omg \
+    -pkgPrefix Dynamic org.omg \
+    -pkgPrefix IOP org.omg \
+    -pkgPrefix Messaging org.omg \
+    -pkgPrefix PortableInterceptor org.omg \
+    -pkgPrefix PortableServer org.omg \
+    -pkgPrefix activation com.sun.corba.se.spi \
+    -pkgPrefix GIOP com.sun.corba.se \
+    -pkgPrefix PortableActivationIDL com.sun.corba.se \
+    -pkgPrefix messages com.sun.corba.se
 
 define add_idl_package
-    # param 1 = MYPACKAGE
-    # param 2 = src root
-    # param 3 = gensrc root
-    # param 4 = source idl to compile
-    # param 5 = target idl package
-    # param 6 = delete these files that were output from the idlj
-    # param 7 = idls that match these patterns should be compiled with -oldImplBase
-    # param 8 = the idlj command
-    # Save the generated java files to a temporary directory so
-    # that we can find them and create proper dependencies.
-    # After that, we move them to the real gensrc target dir.
-    $4_TMPDIR:=tmp___$(subst /,_,$(patsubst $2/%,%,$4))___
-    ifneq ($$(filter $7,$4),)
-        $4_OLDIMPLBASE:=-oldImplBase
-        $4_OLDIMPLBASE_MSG:=with -oldImplBase
-    endif
-    $5 : $4
+  # param 1 = MYPACKAGE
+  # param 2 = src root
+  # param 3 = gensrc root
+  # param 4 = source idl to compile
+  # param 5 = target idl package
+  # param 6 = delete these files that were output from the idlj
+  # param 7 = idls that match these patterns should be compiled with -oldImplBase
+  # param 8 = the idlj command
+  # Save the generated java files to a temporary directory so
+  # that we can find them and create proper dependencies.
+  # After that, we move them to the real gensrc target dir.
+  $4_TMPDIR:=tmp___$(subst /,_,$(patsubst $2/%,%,$4))___
+  ifneq ($$(filter $7,$4),)
+    $4_OLDIMPLBASE:=-oldImplBase
+    $4_OLDIMPLBASE_MSG:=with -oldImplBase
+  endif
+  $5 : $4
 	$(MKDIR) -p $3/$$($4_TMPDIR)
 	$(RM) -rf $3/$$($4_TMPDIR)
 	$(MKDIR) -p $(dir $5)
-	$(ECHO) $(LOG_INFO) Compiling IDL $(patsubst $2/%,%,$4) 
+	$(ECHO) $(LOG_INFO) Compiling IDL $(patsubst $2/%,%,$4)
 	$8 -td $3/$$($4_TMPDIR) \
-		-i $2/org/omg/CORBA \
-		-i $2/org/omg/PortableInterceptor \
-		-i $2/org/omg/PortableServer \
-		-D CORBA3 -corba 3.0 \
-		-fall \
-		$$($4_OLDIMPLBASE) \
-		$(PREFIXES) \
-		$4
+	    -i $2/org/omg/CORBA \
+	    -i $2/org/omg/PortableInterceptor \
+	    -i $2/org/omg/PortableServer \
+	    -D CORBA3 -corba 3.0 \
+	    -fall \
+	    $$($4_OLDIMPLBASE) \
+	    $(PREFIXES) \
+	    $4
 	$(RM) -f $$(addprefix $3/$$($4_TMPDIR)/,$6)
 	$(CP) -r $3/$$($4_TMPDIR)/* $3
 	($(CD) $3/$$($4_TMPDIR) && $(FIND) . -type f | $(SED) 's!\./!$3/!g' | $(NAWK) '{ print $$$$1 ": $4" }' > $5)
@@ -76,31 +76,31 @@
 endef
 
 define SetupIdlCompilation
-# param 1 is for example BUILD_IDLS
-# param 2,3,4,5,6,7,8 are named args.
-#    IDLJ,SRC,BIN,INCLUDES,EXCLUDES,OLDIMPLBASES,DELETES
-$(foreach i,2 3 4 5 6 7 8 9 10 11 12 13 14 15, $(if $($i),$1_$(strip $($i)))$(NEWLINE))
-$(call LogSetupMacroEntry,SetupIdlCompilation($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 SetupIdlCompilation, please update IdlCompilation.gmk))
+  # param 1 is for example BUILD_IDLS
+  # param 2,3,4,5,6,7,8 are named args.
+  #   IDLJ,SRC,BIN,INCLUDES,EXCLUDES,OLDIMPLBASES,DELETES
+  $(foreach i,2 3 4 5 6 7 8 9 10 11 12 13 14 15, $(if $($i),$1_$(strip $($i)))$(NEWLINE))
+  $(call LogSetupMacroEntry,SetupIdlCompilation($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 SetupIdlCompilation, please update IdlCompilation.gmk))
 
-# Find all existing java files and existing class files.
-$$(eval $$(call MakeDir,$$($1_BIN)))
-$1_SRCS     := $$(shell find $$($1_SRC) -name "*.idl")
-$1_BINS     := $$(shell find $$($1_BIN) -name "*.java")
-# Prepend the source/bin path to the filter expressions.
-$1_SRC_INCLUDES := $$(addprefix $$($1_SRC)/,$$($1_INCLUDES))
-$1_SRC_EXCLUDES := $$(addprefix $$($1_SRC)/,$$($1_EXCLUDES))
-$1_BIN_INCLUDES := $$(addprefix $$($1_BIN)/,$$($1_INCLUDES))
-$1_BIN_EXCLUDES := $$(addprefix $$($1_BIN)/,$$($1_EXCLUDES))
-$1_OLDIMPLBASES := $$(addprefix $$($1_SRC)/,$$($1_OLDIMPLBASES))
-# Now remove unwanted java/class files.
-$1_SRCS     := $$(filter $$($1_SRC_INCLUDES),$$($1_SRCS))
-$1_SRCS     := $$(filter-out $$($1_SRC_EXCLUDES),$$($1_SRCS))
-$1_BINS     := $$(filter $$($1_BIN_INCLUDES),$$($1_BINS))
-$1_BINS     := $$(filter-out $$($1_BIN_EXCLUDES),$$($1_BINS))
-$1 := $$(sort $$(patsubst $$($1_SRC)/%.idl,$$($1_BIN)/%.idl.d,$$($1_SRCS)))
-# Now create the dependencies for each idl target.
-$$(foreach p,$$($1),$$(eval $$(call add_idl_package,$1,$$($1_SRC),$$($1_BIN),$$(patsubst $$($1_BIN)/%.idl.d,$$($1_SRC)/%.idl,$$p),$$p,$$($1_DELETES),$$($1_OLDIMPLBASES),$$($1_IDLJ))))
+  # Find all existing java files and existing class files.
+  $$(eval $$(call MakeDir,$$($1_BIN)))
+  $1_SRCS := $$(shell find $$($1_SRC) -name "*.idl")
+  $1_BINS := $$(shell find $$($1_BIN) -name "*.java")
+  # Prepend the source/bin path to the filter expressions.
+  $1_SRC_INCLUDES := $$(addprefix $$($1_SRC)/,$$($1_INCLUDES))
+  $1_SRC_EXCLUDES := $$(addprefix $$($1_SRC)/,$$($1_EXCLUDES))
+  $1_BIN_INCLUDES := $$(addprefix $$($1_BIN)/,$$($1_INCLUDES))
+  $1_BIN_EXCLUDES := $$(addprefix $$($1_BIN)/,$$($1_EXCLUDES))
+  $1_OLDIMPLBASES := $$(addprefix $$($1_SRC)/,$$($1_OLDIMPLBASES))
+  # Now remove unwanted java/class files.
+  $1_SRCS := $$(filter $$($1_SRC_INCLUDES),$$($1_SRCS))
+  $1_SRCS := $$(filter-out $$($1_SRC_EXCLUDES),$$($1_SRCS))
+  $1_BINS := $$(filter $$($1_BIN_INCLUDES),$$($1_BINS))
+  $1_BINS := $$(filter-out $$($1_BIN_EXCLUDES),$$($1_BINS))
+  $1 := $$(sort $$(patsubst $$($1_SRC)/%.idl,$$($1_BIN)/%.idl.d,$$($1_SRCS)))
+  # Now create the dependencies for each idl target.
+  $$(foreach p,$$($1),$$(eval $$(call add_idl_package,$1,$$($1_SRC),$$($1_BIN),$$(patsubst $$($1_BIN)/%.idl.d,$$($1_SRC)/%.idl,$$p),$$p,$$($1_DELETES),$$($1_OLDIMPLBASES),$$($1_IDLJ))))
 endef
 
 .SUFFIXES: .java .class .package
diff --git a/common/makefiles/JavaCompilation.gmk b/common/makefiles/JavaCompilation.gmk
index ecc59e3..69006c8 100644
--- a/common/makefiles/JavaCompilation.gmk
+++ b/common/makefiles/JavaCompilation.gmk
@@ -35,288 +35,288 @@
 # of removing duplicates. It is actually this side effect that is
 # desired whenever sort is used below!
 
-ifeq  (,$(_MAKEBASE_GMK))
-    $(error You must include MakeBase.gmk prior to including JavaCompilation.gmk)
+ifeq (,$(_MAKEBASE_GMK))
+  $(error You must include MakeBase.gmk prior to including JavaCompilation.gmk)
 endif
 
 FALSE_FIND_PATTERN:=-name FILE_NAME_THAT_DOESNT_EXIST
 
 define SetupJavaCompiler
-    # param 1 is for example GENERATE_OLD_BYTECODE or GENERATE_NEW_JDKBYTECODE
-    # This is the name of the compiler setup.
-    # param 2-9 are named args.
-    #   JVM:=The jvm used to run the javac/javah command
-    #   JAVAC:=The javac jar and bootstrap classpath changes, or just bin/javac if JVM is left out
-    #   FLAGS:=Flags to be supplied to javac
-    #   SERVER_DIR:=Use a javac server (-XDserver) and store the server related files here
-    #   SERVER_JVM:=Use this JVM for the server. Defaults to the JVM above.
-    $(foreach i,2 3 4 5 6 7 8 9 10 11 12 13 14 15, $(if $($i),$1_$(strip $($i)))$(NEWLINE))
-    $(call LogSetupMacroEntry,SetupJavaCompiler($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 SetupJavaCompiler, please update JavaCompilation.gmk))
+  # param 1 is for example GENERATE_OLD_BYTECODE or GENERATE_NEW_JDKBYTECODE
+  # This is the name of the compiler setup.
+  # param 2-9 are named args.
+  #   JVM:=The jvm used to run the javac/javah command
+  #   JAVAC:=The javac jar and bootstrap classpath changes, or just bin/javac if JVM is left out
+  #   FLAGS:=Flags to be supplied to javac
+  #   SERVER_DIR:=Use a javac server (-XDserver) and store the server related files here
+  #   SERVER_JVM:=Use this JVM for the server. Defaults to the JVM above.
+  $(foreach i,2 3 4 5 6 7 8 9 10 11 12 13 14 15, $(if $($i),$1_$(strip $($i)))$(NEWLINE))
+  $(call LogSetupMacroEntry,SetupJavaCompiler($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 SetupJavaCompiler, please update JavaCompilation.gmk))
 
-    # The port file contains the tcp/ip on which the server listens
-    # and the cookie necessary to talk to the server.
-    $1_SJAVAC_PORTFILE:=$$($1_SERVER_DIR)/server.port
-    # You can use a different JVM to run the background javac server.
-    ifeq ($$($1_SERVER_JVM),)
-        # It defaults to the same JVM that is used to start the javac command.
-        $1_SERVER_JVM:=$$($1_JVM)
-    endif
+  # The port file contains the tcp/ip on which the server listens
+  # and the cookie necessary to talk to the server.
+  $1_SJAVAC_PORTFILE:=$$($1_SERVER_DIR)/server.port
+  # You can use a different JVM to run the background javac server.
+  ifeq ($$($1_SERVER_JVM),)
+    # It defaults to the same JVM that is used to start the javac command.
+    $1_SERVER_JVM:=$$($1_JVM)
+  endif
 endef
 
 define SetupArchive
-    # param 1 is for example ARCHIVE_MYPACKAGE
-    # param 2 are the dependecies
-    # param 3,4,5,6,7,8,9 are named args.
-    #    SRCS:=List of directories in where to find files to add to archive
-    #    SUFFIXES:=File suffixes to include in jar
-    #    INCLUDES:=List of directories/packages in SRCS that should be included
-    #    EXCLUDES:=List of directories/packages in SRCS that should be excluded
-    #    EXCLUDE_FILES:=List of files in SRCS that should be excluded
-    #    EXTRA_FILES:=List of files in SRCS that should be included regardless of suffix match.
-    #    JAR:=Jar file to create
-    #    MANIFEST:=Optional manifest file template.
-    #    JARMAIN:=Optional main class to add to manifest
-    #    JARINDEX:=true means generate the index in the jar file.
-    #    SKIP_METAINF:=Set to prevent contents of an META-INF directory to be automatically 
-    #                  added to the archive.
-    #    EXTRA_MANIFEST_ATTR:=Extra attribute to add to manifest.
-    #    CHECK_COMPRESS_JAR Check the COMPRESS_JAR variable
+  # param 1 is for example ARCHIVE_MYPACKAGE
+  # param 2 are the dependecies
+  # param 3,4,5,6,7,8,9 are named args.
+  #   SRCS:=List of directories in where to find files to add to archive
+  #   SUFFIXES:=File suffixes to include in jar
+  #   INCLUDES:=List of directories/packages in SRCS that should be included
+  #   EXCLUDES:=List of directories/packages in SRCS that should be excluded
+  #   EXCLUDE_FILES:=List of files in SRCS that should be excluded
+  #   EXTRA_FILES:=List of files in SRCS that should be included regardless of suffix match.
+  #   JAR:=Jar file to create
+  #   MANIFEST:=Optional manifest file template.
+  #   JARMAIN:=Optional main class to add to manifest
+  #   JARINDEX:=true means generate the index in the jar file.
+  #   SKIP_METAINF:=Set to prevent contents of an META-INF directory to be automatically
+  #       added to the archive.
+  #   EXTRA_MANIFEST_ATTR:=Extra attribute to add to manifest.
+  #   CHECK_COMPRESS_JAR Check the COMPRESS_JAR variable
 
-    # NOTE: $2 is dependencies, not a named argument!
-    $(foreach i,3 4 5 6 7 8 9 10 11 12 13 14 15, $(if $($i),$1_$(strip $($i)))$(NEWLINE))
-    $(call LogSetupMacroEntry,SetupArchive($1),<dependencies>,$3,$4,$5,$6,$7,$8,$9,$(10),$(11),$(12),$(13),$(14),$(15))
-    $(if $(findstring $(LOG_LEVEL),debug trace), $(info *[2] <dependencies> = $(strip $2)))
-    $(if $(16),$(error Internal makefile error: Too many arguments to SetupArchive, please update JavaCompilation.gmk))
+  # NOTE: $2 is dependencies, not a named argument!
+  $(foreach i,3 4 5 6 7 8 9 10 11 12 13 14 15, $(if $($i),$1_$(strip $($i)))$(NEWLINE))
+  $(call LogSetupMacroEntry,SetupArchive($1),<dependencies>,$3,$4,$5,$6,$7,$8,$9,$(10),$(11),$(12),$(13),$(14),$(15))
+  $(if $(findstring $(LOG_LEVEL),trace), $(info *[2] <dependencies> = $(strip $2)))
+  $(if $(16),$(error Internal makefile error: Too many arguments to SetupArchive, please update JavaCompilation.gmk))
 
-    $1_JARMAIN:=$(strip $$($1_JARMAIN))
-    $1_JARNAME:=$$(notdir $$($1_JAR))
-    $1_MANIFEST_FILE:=$$(dir $$($1_JAR))_the.$$($1_JARNAME)_manifest
-    $1_DELETESS_FILE:=$$(dir $$($1_JAR))_the.$$($1_JARNAME)_deletess
-    $1_DELETES_FILE:=$$(dir $$($1_JAR))_the.$$($1_JARNAME)_deletes
-    $1_BIN:=$$(dir $$($1_JAR))
+  $1_JARMAIN:=$(strip $$($1_JARMAIN))
+  $1_JARNAME:=$$(notdir $$($1_JAR))
+  $1_MANIFEST_FILE:=$$(dir $$($1_JAR))_the.$$($1_JARNAME)_manifest
+  $1_DELETESS_FILE:=$$(dir $$($1_JAR))_the.$$($1_JARNAME)_deletess
+  $1_DELETES_FILE:=$$(dir $$($1_JAR))_the.$$($1_JARNAME)_deletes
+  $1_BIN:=$$(dir $$($1_JAR))
 
-    ifeq (,$$($1_SUFFIXES))
-        # No suffix was set, default to classes.
-        $1_SUFFIXES:=.class
-    endif
-    # Convert suffixes to a find expression
-    $1_FIND_PATTERNS:=$(FALSE_FIND_PATTERN) $$(patsubst %,$(SPACE)-o$(SPACE)-name$(SPACE)$(DQUOTE)*%$(DQUOTE),$$($1_SUFFIXES))
-    # On windows, a lot of includes/excludes risk making the command line too long, so 
-    # writing the grep patterns to files.
-    ifneq (,$$($1_INCLUDES))
-        $1_GREP_INCLUDE_PATTERNS:=$$(foreach src,$$($1_SRCS),\
-					$$(addprefix $$(src)/,$$($1_INCLUDES)))
-        # If there are a lot of include patterns, output to file to shorten command lines
-        ifeq ($$(word 20,$$($1_GREP_INCLUDE_PATTERNS)),)
-            $1_GREP_INCLUDES:=| $(GREP) $$(patsubst %,$(SPACE)-e$(SPACE)$(DQUOTE)%$(DQUOTE),$$($1_GREP_INCLUDE_PATTERNS))
-        else
-            $1_GREP_INCLUDE_OUTPUT:=$(RM) $$($1_BIN)/_the.$$($1_JARNAME)_include && \
-                                    $$(strip $$(call ListPathsSafely,$1_GREP_INCLUDE_PATTERNS,\n, \
-                                        >> $$($1_BIN)/_the.$$($1_JARNAME)_include))
-            $1_GREP_INCLUDES:=| $(GREP) -f $$($1_BIN)/_the.$$($1_JARNAME)_include
-        endif
-    endif
-    ifneq (,$$($1_EXCLUDES)$$($1_EXCLUDE_FILES))
-        $1_GREP_EXCLUDE_PATTERNS:=$$(foreach src,$$($1_SRCS),$$(addprefix $$(src)/,\
-		$$($1_EXCLUDES) $$($1_EXCLUDE_FILES)))
-        # If there are a lot of include patterns, output to file to shorten command lines
-        ifeq ($$(word 20,$$($1_GREP_EXCLUDE_PATTERNS)),)
-            $1_GREP_EXCLUDES:=| $(GREP) -v $$(patsubst %,$(SPACE)-e$(SPACE)$(DQUOTE)%$(DQUOTE),$$($1_GREP_EXCLUDE_PATTERNS))
-        else
-            $1_GREP_EXCLUDE_OUTPUT=$(RM) $$($1_BIN)/_the.$$($1_JARNAME)_exclude && \
-                                    $$(strip $$(call ListPathsSafely,$1_GREP_EXCLUDE_PATTERNS,\n, \
-                                        >> $$($1_BIN)/_the.$$($1_JARNAME)_exclude))
-            $1_GREP_EXCLUDES:=| $(GREP) -v -f $$($1_BIN)/_the.$$($1_JARNAME)_exclude
-        endif
-    endif
-
-    # Check if this jar needs to have its index generated.
-    ifneq (,$$($1_JARINDEX))
-      $1_JARINDEX = (cd $$(dir $$@) && $(JAR) -i $$(notdir $$@))
+  ifeq (,$$($1_SUFFIXES))
+    # No suffix was set, default to classes.
+    $1_SUFFIXES:=.class
+  endif
+  # Convert suffixes to a find expression
+  $1_FIND_PATTERNS:=$(FALSE_FIND_PATTERN) $$(patsubst %,$(SPACE)-o$(SPACE)-name$(SPACE)$(DQUOTE)*%$(DQUOTE),$$($1_SUFFIXES))
+  # On windows, a lot of includes/excludes risk making the command line too long, so
+  # writing the grep patterns to files.
+  ifneq (,$$($1_INCLUDES))
+    $1_GREP_INCLUDE_PATTERNS:=$$(foreach src,$$($1_SRCS), \
+        $$(addprefix $$(src)/,$$($1_INCLUDES)))
+    # If there are a lot of include patterns, output to file to shorten command lines
+    ifeq ($$(word 20,$$($1_GREP_INCLUDE_PATTERNS)),)
+      $1_GREP_INCLUDES:=| $(GREP) $$(patsubst %,$(SPACE)-e$(SPACE)$(DQUOTE)%$(DQUOTE),$$($1_GREP_INCLUDE_PATTERNS))
     else
-      $1_JARINDEX = true
+      $1_GREP_INCLUDE_OUTPUT:=$(RM) $$($1_BIN)/_the.$$($1_JARNAME)_include $$(NEWLINE) \
+          $$(call ListPathsSafely,$1_GREP_INCLUDE_PATTERNS,\n, \
+          >> $$($1_BIN)/_the.$$($1_JARNAME)_include)
+      $1_GREP_INCLUDES:=| $(GREP) -f $$($1_BIN)/_the.$$($1_JARNAME)_include
     endif
-    # When this macro is run in the same makefile as the java compilation, dependencies are 
-    # transfered in make variables. When the macro is run in a different makefile than the 
-    # java compilation, the dependencies need to be found in the filesystem.
-    ifneq (,$2)
-        $1_DEPS:=$2
+  endif
+  ifneq (,$$($1_EXCLUDES)$$($1_EXCLUDE_FILES))
+    $1_GREP_EXCLUDE_PATTERNS:=$$(foreach src,$$($1_SRCS),$$(addprefix $$(src)/, \
+        $$($1_EXCLUDES) $$($1_EXCLUDE_FILES)))
+    # If there are a lot of include patterns, output to file to shorten command lines
+    ifeq ($$(word 20,$$($1_GREP_EXCLUDE_PATTERNS)),)
+      $1_GREP_EXCLUDES:=| $(GREP) -v $$(patsubst %,$(SPACE)-e$(SPACE)$(DQUOTE)%$(DQUOTE),$$($1_GREP_EXCLUDE_PATTERNS))
     else
-        $1_DEPS:=$$(filter $$(addprefix %,$$($1_SUFFIXES)),\
-                    $$(call CacheFind,$$($1_SRCS)))
-        ifneq (,$$($1_GREP_INCLUDE_PATTERNS))
-            $1_DEPS:=$$(filter $$(addsuffix %,$$($1_GREP_INCLUDE_PATTERNS)),$$($1_DEPS))
-        endif
-        ifneq (,$$($1_GREP_EXCLUDE_PATTERNS))
-            $1_DEPS:=$$(filter-out $$(addsuffix %,$$($1_GREP_EXCLUDE_PATTERNS)),$$($1_DEPS))
-        endif
-        # The subst of \ is needed because $ has to be escaped with \ in EXTRA_FILES for the command 
-        # lines, but not here for use in make dependencies.
-        $1_DEPS+=$$(subst \,,$$(foreach src,$$($1_SRCS),$$(addprefix $$(src)/,$$($1_EXTRA_FILES))))
-        ifeq (,$$($1_SKIP_METAINF))
-            $1_DEPS+=$$(call CacheFind,$$(wildcard $$(addsuffix /META-INF,$$($1_SRCS))))
-        endif
+      $1_GREP_EXCLUDE_OUTPUT=$(RM) $$($1_BIN)/_the.$$($1_JARNAME)_exclude $$(NEWLINE) \
+          $$(call ListPathsSafely,$1_GREP_EXCLUDE_PATTERNS,\n, \
+          >> $$($1_BIN)/_the.$$($1_JARNAME)_exclude)
+      $1_GREP_EXCLUDES:=| $(GREP) -v -f $$($1_BIN)/_the.$$($1_JARNAME)_exclude
     endif
+  endif
 
-    # Utility macros, to make the shell script receipt somewhat easier to decipher.
-
-    # The capture contents macro finds all files (matching the patterns, typically
-    # .class and .prp) that are newer than the jar-file, ie the new content to be put into the jar.
-    $1_CAPTURE_CONTENTS=$$(foreach src,$$($1_SRCS),\
-                   (($(FIND) $$(src) -type f -a \( $$($1_FIND_PATTERNS) \) -a -newer $$@ $$($1_GREP_INCLUDES) \
-                       $$($1_GREP_EXCLUDES) | $(SED) 's|$$(src)/||g' &&\
-                       $(ECHO) $$(subst $$(src)/,,$$($1_EXTRA_FILES))) > \
-                       $$(src)/_the.$$($1_JARNAME)_contents) $$(NEWLINE))
-    # The capture metainf macro finds all files below the META-INF directory that are newer than the jar-file.
+  # Check if this jar needs to have its index generated.
+  ifneq (,$$($1_JARINDEX))
+    $1_JARINDEX = (cd $$(dir $$@) && $(JAR) -i $$(notdir $$@))
+  else
+    $1_JARINDEX = true
+  endif
+  # When this macro is run in the same makefile as the java compilation, dependencies are
+  # transfered in make variables. When the macro is run in a different makefile than the
+  # java compilation, the dependencies need to be found in the filesystem.
+  ifneq (,$2)
+    $1_DEPS:=$2
+  else
+    $1_DEPS:=$$(filter $$(addprefix %,$$($1_SUFFIXES)), \
+        $$(call CacheFind,$$($1_SRCS)))
+    ifneq (,$$($1_GREP_INCLUDE_PATTERNS))
+      $1_DEPS:=$$(filter $$(addsuffix %,$$($1_GREP_INCLUDE_PATTERNS)),$$($1_DEPS))
+    endif
+    ifneq (,$$($1_GREP_EXCLUDE_PATTERNS))
+      $1_DEPS:=$$(filter-out $$(addsuffix %,$$($1_GREP_EXCLUDE_PATTERNS)),$$($1_DEPS))
+    endif
+    # The subst of \ is needed because $ has to be escaped with \ in EXTRA_FILES for the command
+    # lines, but not here for use in make dependencies.
+    $1_DEPS+=$$(subst \,,$$(foreach src,$$($1_SRCS),$$(addprefix $$(src)/,$$($1_EXTRA_FILES))))
     ifeq (,$$($1_SKIP_METAINF))
-        $1_CAPTURE_METAINF =$$(foreach src,$$($1_SRCS),($(FIND) $$(src)/META-INF -type f -a -newer $$@ 2> /dev/null | $(SED) 's|$$(src)/||g' >> $$(src)/_the.$$($1_JARNAME)_contents ) $$(NEWLINE))
+      $1_DEPS+=$$(call CacheFind,$$(wildcard $$(addsuffix /META-INF,$$($1_SRCS))))
     endif
-    # The capture deletes macro finds all deleted files and concatenates them. The resulting file
-    # tells us what to remove from the jar-file.
-    $1_CAPTURE_DELETES=$$(foreach src,$$($1_SRCS),($(FIND) $$(src) -name _the.package.deleted -newer $$@ -exec $(SED) 's|$$(src)||g' \{\} >> $$($1_DELETES_FILE) \;) $$(NEWLINE))
-    # The update contents macro updates the jar file with the previously capture contents.
-    # xargs is used to trim the whitespace from the contents file, to see if it is empty.
-    $1_UPDATE_CONTENTS=$$(foreach src,$$($1_SRCS),\
-                    (cd $$(src) && \
-                     if [ -n "`$(CAT) _the.$$($1_JARNAME)_contents | $(XARGS)`" ]; then \
-                         $(ECHO) "  updating" `$(WC) -l _the.$$($1_JARNAME)_contents | $(AWK) '{ print $$$$1 }'` files && \
-                         $(JAR) $$($1_JAR_UPDATE_OPTIONS) $$@ @_the.$$($1_JARNAME)_contents; \
-                     fi) $$(NEWLINE))
-    # The s-variants of the above macros are used when the jar is created from scratch.
-    $1_SCAPTURE_CONTENTS=$$(foreach src,$$($1_SRCS),\
-                    (($(FIND) $$(src) -type f -a \( $$($1_FIND_PATTERNS) \) $$($1_GREP_INCLUDES) \
-			$$($1_GREP_EXCLUDES) | $(SED) 's|$$(src)/||g' &&\
-			$$(subst $$(src)/,,$(ECHO) $$($1_EXTRA_FILES))) > \
-			$$(src)/_the.$$($1_JARNAME)_contents) $$(NEWLINE))
+  endif
 
-    ifeq (,$$($1_SKIP_METAINF))
-        $1_SCAPTURE_METAINF=$$(foreach src,$$($1_SRCS),\
-                    ($(FIND) $$(src)/META-INF -type f 2> /dev/null | $(SED) 's|$$(src)/||g' >> \
-			$$(src)/_the.$$($1_JARNAME)_contents) $$(NEWLINE))
+  # Utility macros, to make the shell script receipt somewhat easier to decipher.
+
+  # The capture contents macro finds all files (matching the patterns, typically
+  # .class and .prp) that are newer than the jar-file, ie the new content to be put into the jar.
+  $1_CAPTURE_CONTENTS=$$(foreach src,$$($1_SRCS), \
+      (($(FIND) $$(src) -type f -a \( $$($1_FIND_PATTERNS) \) -a -newer $$@ $$($1_GREP_INCLUDES) \
+          $$($1_GREP_EXCLUDES) | $(SED) 's|$$(src)/||g' && \
+      $(ECHO) $$(subst $$(src)/,,$$($1_EXTRA_FILES))) > \
+      $$(src)/_the.$$($1_JARNAME)_contents) $$(NEWLINE))
+  # The capture metainf macro finds all files below the META-INF directory that are newer than the jar-file.
+  ifeq (,$$($1_SKIP_METAINF))
+    $1_CAPTURE_METAINF =$$(foreach src,$$($1_SRCS),($(FIND) $$(src)/META-INF -type f -a -newer $$@ 2> /dev/null | $(SED) 's|$$(src)/||g' >> $$(src)/_the.$$($1_JARNAME)_contents ) $$(NEWLINE))
+  endif
+  # The capture deletes macro finds all deleted files and concatenates them. The resulting file
+  # tells us what to remove from the jar-file.
+  $1_CAPTURE_DELETES=$$(foreach src,$$($1_SRCS),($(FIND) $$(src) -name _the.package.deleted -newer $$@ -exec $(SED) 's|$$(src)||g' \{\} >> $$($1_DELETES_FILE) \;) $$(NEWLINE))
+  # The update contents macro updates the jar file with the previously capture contents.
+  # xargs is used to trim the whitespace from the contents file, to see if it is empty.
+  $1_UPDATE_CONTENTS=$$(foreach src,$$($1_SRCS), \
+      (cd $$(src) && \
+       if [ -n "`$(CAT) _the.$$($1_JARNAME)_contents | $(XARGS)`" ]; then \
+         $(ECHO) "  updating" `$(WC) -l _the.$$($1_JARNAME)_contents | $(AWK) '{ print $$$$1 }'` files && \
+         $(JAR) $$($1_JAR_UPDATE_OPTIONS) $$@ @_the.$$($1_JARNAME)_contents; \
+       fi) $$(NEWLINE))
+  # The s-variants of the above macros are used when the jar is created from scratch.
+  $1_SCAPTURE_CONTENTS=$$(foreach src,$$($1_SRCS), \
+      (($(FIND) $$(src) -type f -a \( $$($1_FIND_PATTERNS) \) $$($1_GREP_INCLUDES) \
+          $$($1_GREP_EXCLUDES) | $(SED) 's|$$(src)/||g' && \
+      $$(subst $$(src)/,,$(ECHO) $$($1_EXTRA_FILES))) > \
+      $$(src)/_the.$$($1_JARNAME)_contents) $$(NEWLINE))
+
+  ifeq (,$$($1_SKIP_METAINF))
+    $1_SCAPTURE_METAINF=$$(foreach src,$$($1_SRCS), \
+        ($(FIND) $$(src)/META-INF -type f 2> /dev/null | $(SED) 's|$$(src)/||g' >> \
+        $$(src)/_the.$$($1_JARNAME)_contents) $$(NEWLINE))
+  endif
+  $1_SUPDATE_CONTENTS=$$(foreach src,$$($1_SRCS), \
+      (cd $$(src) && $(JAR) $$($1_JAR_UPDATE_OPTIONS) $$@ @$$(src)/_the.$$($1_JARNAME)_contents) $$(NEWLINE))
+
+  # Use a slightly shorter name for logging, but with enough path to identify this jar.
+  $1_NAME:=$$(subst $$(OUTPUT_ROOT)/,,$$($1_JAR))
+
+  ifneq (,$$($1_CHECK_COMPRESS_JAR))
+    $1_JAR_CREATE_OPTIONS := c0fm
+    $1_JAR_UPDATE_OPTIONS := u0f
+    ifeq ($(COMPRESS_JARS), true)
+      $1_JAR_CREATE_OPTIONS := cfm
+      $1_JAR_UPDATE_OPTIONS := uf
     endif
-    $1_SUPDATE_CONTENTS=$$(foreach src,$$($1_SRCS),\
-                    (cd $$(src) && $(JAR) $$($1_JAR_UPDATE_OPTIONS) $$@ @$$(src)/_the.$$($1_JARNAME)_contents) $$(NEWLINE))
+  else
+    $1_JAR_CREATE_OPTIONS := cfm
+    $1_JAR_UPDATE_OPTIONS := uf
+  endif
 
-    # Use a slightly shorter name for logging, but with enough path to identify this jar.
-    $1_NAME:=$$(subst $$(OUTPUT_ROOT)/,,$$($1_JAR))
-
-    ifneq (,$$($1_CHECK_COMPRESS_JAR))
-        $1_JAR_CREATE_OPTIONS := c0fm
-        $1_JAR_UPDATE_OPTIONS := u0f
-        ifeq ($(COMPRESS_JARS), true)
-            $1_JAR_CREATE_OPTIONS := cfm
-            $1_JAR_UPDATE_OPTIONS := uf
-        endif
-    else
-        $1_JAR_CREATE_OPTIONS := cfm
-        $1_JAR_UPDATE_OPTIONS := uf
-    endif
-
-    # Here is the rule that creates/updates the jar file.
-    $$($1_JAR) : $$($1_DEPS)
+  # Here is the rule that creates/updates the jar file.
+  $$($1_JAR) : $$($1_DEPS)
 	$(MKDIR) -p $$($1_BIN)
 	$$($1_GREP_INCLUDE_OUTPUT)
 	$$($1_GREP_EXCLUDE_OUTPUT)
-	$$(if $$($1_MANIFEST),\
-		$(SED) -e "s#@@RELEASE@@#$(RELEASE)#"           \
-		       -e "s#@@COMPANY_NAME@@#$(COMPANY_NAME)#" $$($1_MANIFEST) > $$($1_MANIFEST_FILE) \
-	,\
-		$(RM) $$($1_MANIFEST_FILE) && $(TOUCH) $$($1_MANIFEST_FILE))
+	$$(if $$($1_MANIFEST), \
+	  $(SED) -e "s#@@RELEASE@@#$(RELEASE)#" \
+	      -e "s#@@COMPANY_NAME@@#$(COMPANY_NAME)#" $$($1_MANIFEST) > $$($1_MANIFEST_FILE) \
+	, \
+	  $(RM) $$($1_MANIFEST_FILE) && $(TOUCH) $$($1_MANIFEST_FILE))
 	$$(if $$($1_JARMAIN),$(ECHO) "Main-Class: $$(strip $$($1_JARMAIN))" >> $$($1_MANIFEST_FILE))
 	$$(if $$($1_EXTRA_MANIFEST_ATTR),$(PRINTF) "$$($1_EXTRA_MANIFEST_ATTR)\n" >> $$($1_MANIFEST_FILE))
-	$$(if $$(wildcard $$@),\
-		$(ECHO) Modifying $$($1_NAME) $$(NEWLINE)\
-		$$($1_CAPTURE_CONTENTS) \
-		$$($1_CAPTURE_METAINF) \
-		$(RM) $$($1_DELETES_FILE) $$(NEWLINE)\
-		$$($1_CAPTURE_DELETES) \
-		$(CAT) $$($1_DELETES_FILE) > $$($1_DELETESS_FILE) $$(NEWLINE)\
-		if [ -s $$($1_DELETESS_FILE) ]; then \
-			$(ECHO) "  deleting" `$(WC) -l $$($1_DELETESS_FILE) | $(AWK) '{ print $$$$1 }'` files && \
-	                       $(ZIP) -q -d $$@ `$(CAT) $$($1_DELETESS_FILE)` ; \
-		fi $$(NEWLINE) \
-		$$($1_UPDATE_CONTENTS) true $$(NEWLINE) \
-		$$($1_JARINDEX) && true \
-	,\
-		$(ECHO) Creating $$($1_NAME) && $(JAR) $$($1_JAR_CREATE_OPTIONS) $$@ $$($1_MANIFEST_FILE) $$(NEWLINE) \
-	        $$($1_SCAPTURE_CONTENTS) \
-		$$($1_SCAPTURE_METAINF) \
-		$$($1_SUPDATE_CONTENTS) \
-		$$($1_JARINDEX) && true ) 
+	$$(if $$(wildcard $$@), \
+	  $(ECHO) Modifying $$($1_NAME) $$(NEWLINE) \
+	  $$($1_CAPTURE_CONTENTS) \
+	  $$($1_CAPTURE_METAINF) \
+	  $(RM) $$($1_DELETES_FILE) $$(NEWLINE) \
+	  $$($1_CAPTURE_DELETES) \
+	  $(CAT) $$($1_DELETES_FILE) > $$($1_DELETESS_FILE) $$(NEWLINE) \
+	  if [ -s $$($1_DELETESS_FILE) ]; then \
+	    $(ECHO) "  deleting" `$(WC) -l $$($1_DELETESS_FILE) | $(AWK) '{ print $$$$1 }'` files && \
+	    $(ZIP) -q -d $$@ `$(CAT) $$($1_DELETESS_FILE)` ; \
+	  fi $$(NEWLINE) \
+	  $$($1_UPDATE_CONTENTS) true $$(NEWLINE) \
+	  $$($1_JARINDEX) && true \
+	, \
+	  $(ECHO) Creating $$($1_NAME) && $(JAR) $$($1_JAR_CREATE_OPTIONS) $$@ $$($1_MANIFEST_FILE) $$(NEWLINE) \
+	  $$($1_SCAPTURE_CONTENTS) \
+	  $$($1_SCAPTURE_METAINF) \
+	  $$($1_SUPDATE_CONTENTS) \
+	  $$($1_JARINDEX) && true )
 
 endef
 
 define SetupZipArchive
-    # param 1 is for example ZIP_MYSOURCE
-    # param 2,3,4,5,6,7,8,9 are named args.
-    #    SRC,ZIP,INCLUDES,INCLUDE_FILES,EXCLUDES,EXCLUDE_FILES,SUFFIXES,EXTRA_DEPS
-    $(foreach i,2 3 4 5 6 7 8 9 10 11 12 13 14 15, $(if $($i),$1_$(strip $($i)))$(NEWLINE))
-    $(call LogSetupMacroEntry,SetupZipArchive($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 SetupZipArchive, please update JavaCompilation.gmk))
+  # param 1 is for example ZIP_MYSOURCE
+  # param 2,3,4,5,6,7,8,9 are named args.
+  #   SRC,ZIP,INCLUDES,INCLUDE_FILES,EXCLUDES,EXCLUDE_FILES,SUFFIXES,EXTRA_DEPS
+  $(foreach i,2 3 4 5 6 7 8 9 10 11 12 13 14 15, $(if $($i),$1_$(strip $($i)))$(NEWLINE))
+  $(call LogSetupMacroEntry,SetupZipArchive($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 SetupZipArchive, please update JavaCompilation.gmk))
 
-    # To avoid running find over too large sets of files, which causes make to crash
-    # on some configurations (cygwin), use INCLUDES and INCLUDE_FILES to build a set
-    # of directories to run find in, if available.
-    ifneq ($$($1_INCLUDES)$$($1_INCLUDE_FILES),)
-	$1_FIND_LIST := $$(wildcard $$(foreach i,$$($1_SRC),\
-		$$(addprefix $$i/,$$($1_INCLUDES) $$($1_INCLUDE_FILES))))
+  # To avoid running find over too large sets of files, which causes make to crash
+  # on some configurations (cygwin), use INCLUDES and INCLUDE_FILES to build a set
+  # of directories to run find in, if available.
+  ifneq ($$($1_INCLUDES)$$($1_INCLUDE_FILES),)
+    $1_FIND_LIST := $$(wildcard $$(foreach i,$$($1_SRC), \
+        $$(addprefix $$i/,$$($1_INCLUDES) $$($1_INCLUDE_FILES))))
+  else
+    $1_FIND_LIST := $$($1_SRC)
+  endif
+
+  # Find all files in the source tree.
+  $1_ALL_SRCS := $$(call not-containing,_the., \
+      $$(filter $$(addprefix %,$$($1_SUFFIXES)),$$(call CacheFind,$$($1_FIND_LIST))))
+
+  ifneq ($$($1_INCLUDES),)
+    ifneq ($$($1_SUFFIXES),)
+      $1_ZIP_INCLUDES := $$(foreach s,$$($1_SUFFIXES), \
+          $$(addprefix -i$(SPACE)$(DQUOTE),$$(addsuffix /*$$s$(DQUOTE),$$($1_INCLUDES))))
     else
-        $1_FIND_LIST := $$($1_SRC)
+      $1_ZIP_INCLUDES := $$(addprefix -i$(SPACE)$(DQUOTE),$$(addsuffix /*$(DQUOTE),$$($1_INCLUDES)))
     endif
+  endif
+  ifneq ($$($1_INCLUDE_FILES),)
+    $1_ZIP_INCLUDES += $$(addprefix -i$(SPACE),$$($1_INCLUDE_FILES))
+  endif
+  ifneq ($$($1_EXCLUDES),)
+    $1_SRC_EXCLUDES := $$(foreach i,$$($1_SRC),$$(addprefix $$i/,$$(addsuffix /%,$$($1_EXCLUDES))))
+    $1_ZIP_EXCLUDES := $$(addprefix -x$(SPACE)$(DQUOTE),$$(addsuffix /*$(DQUOTE),$$($1_EXCLUDES)))
+    $1_ALL_SRCS := $$(filter-out $$($1_SRC_EXCLUDES),$$($1_ALL_SRCS))
+  endif
 
-    # Find all files in the source tree.
-    $1_ALL_SRCS := $$(call not-containing,_the.,\
-            $$(filter $$(addprefix %,$$($1_SUFFIXES)),$$(call CacheFind,$$($1_FIND_LIST))))
+  # Use a slightly shorter name for logging, but with enough path to identify this zip.
+  $1_NAME:=$$(subst $$(OUTPUT_ROOT)/,,$$($1_ZIP))
 
-    ifneq ($$($1_INCLUDES),)
-        ifneq ($$($1_SUFFIXES),)
-            $1_ZIP_INCLUDES := $$(foreach s,$$($1_SUFFIXES),\
-		$$(addprefix -i$(SPACE)$(DQUOTE),$$(addsuffix /*$$s$(DQUOTE),$$($1_INCLUDES))))
-        else
-            $1_ZIP_INCLUDES := $$(addprefix -i$(SPACE)$(DQUOTE),$$(addsuffix /*$(DQUOTE),$$($1_INCLUDES)))
-        endif
-    endif
-    ifneq ($$($1_INCLUDE_FILES),)
-        $1_ZIP_INCLUDES += $$(addprefix -i$(SPACE),$$($1_INCLUDE_FILES))
-    endif
-    ifneq ($$($1_EXCLUDES),)
-        $1_SRC_EXCLUDES := $$(foreach i,$$($1_SRC),$$(addprefix $$i/,$$(addsuffix /%,$$($1_EXCLUDES))))
-        $1_ZIP_EXCLUDES := $$(addprefix -x$(SPACE)$(DQUOTE),$$(addsuffix /*$(DQUOTE),$$($1_EXCLUDES)))
-        $1_ALL_SRCS     := $$(filter-out $$($1_SRC_EXCLUDES),$$($1_ALL_SRCS))
-    endif
-
-    # Use a slightly shorter name for logging, but with enough path to identify this zip.
-    $1_NAME:=$$(subst $$(OUTPUT_ROOT)/,,$$($1_ZIP))
-
-    # Now $1_ALL_SRCS should contain all sources that are going to be put into the zip.
-    # I.e. the zip -i and -x options should match the filtering done in the makefile.
-    # Explicitly excluded files can be given with absolute path. The patsubst solution
-    # isn't perfect but the likelyhood of an absolute path to match something in a src
-    # dir is very small.
-    # If zip has nothing to do, it returns 12 and would fail the build. Check for 12
-    # and only fail if it's not.
-    $$($1_ZIP) : $$($1_ALL_SRCS) $$($1_EXTRA_DEPS)
-		$(MKDIR) -p $$(@D)
-		$(ECHO) Updating $$($1_NAME)
-		$$(foreach i,$$($1_SRC),(cd $$i && $(ZIP) -qru $$@ . $$($1_ZIP_INCLUDES) $$($1_ZIP_EXCLUDES) -x \*_the.\* $$(addprefix -x$(SPACE),$$(patsubst $$i/%,%,$$($1_EXCLUDE_FILES))) || test "$$$$?" = "12" )$$(NEWLINE)) true
-		$(TOUCH) $$@
+  # Now $1_ALL_SRCS should contain all sources that are going to be put into the zip.
+  # I.e. the zip -i and -x options should match the filtering done in the makefile.
+  # Explicitly excluded files can be given with absolute path. The patsubst solution
+  # isn't perfect but the likelyhood of an absolute path to match something in a src
+  # dir is very small.
+  # If zip has nothing to do, it returns 12 and would fail the build. Check for 12
+  # and only fail if it's not.
+  $$($1_ZIP) : $$($1_ALL_SRCS) $$($1_EXTRA_DEPS)
+	$(MKDIR) -p $$(@D)
+	$(ECHO) Updating $$($1_NAME)
+	$$(foreach i,$$($1_SRC),(cd $$i && $(ZIP) -qru $$@ . $$($1_ZIP_INCLUDES) $$($1_ZIP_EXCLUDES) -x \*_the.\* $$(addprefix -x$(SPACE),$$(patsubst $$i/%,%,$$($1_EXCLUDE_FILES))) || test "$$$$?" = "12" )$$(NEWLINE)) true
+	$(TOUCH) $$@
 endef
 
 define add_file_to_copy
-    # param 1 = BUILD_MYPACKAGE
-    # parma 2 = The source file to copy.
-    $2_TARGET:=$2
-    # Remove the source prefix. 
-    $$(foreach i,$$($1_SRC),$$(eval $$(call remove_string,$$i,$2_TARGET)))
-    # Now we can setup the depency that will trigger the copying.
-    $$($1_BIN)$$($2_TARGET) : $2
+  # param 1 = BUILD_MYPACKAGE
+  # parma 2 = The source file to copy.
+  $2_TARGET:=$2
+  # Remove the source prefix.
+  $$(foreach i,$$($1_SRC),$$(eval $$(call remove_string,$$i,$2_TARGET)))
+  # Now we can setup the depency that will trigger the copying.
+  $$($1_BIN)$$($2_TARGET) : $2
 	$(MKDIR) -p $$(@D)
 	$(CP) $$< $$@
 	$(CHMOD) -f ug+w $$@
 
-    # And do not forget this target
-    $1_ALL_COPY_TARGETS += $$($1_BIN)$$($2_TARGET)
+  # And do not forget this target
+  $1_ALL_COPY_TARGETS += $$($1_BIN)$$($2_TARGET)
 endef
 
 
@@ -326,206 +326,206 @@
 # This is the new clean standard. Though it is to be superseded by
 # a standard annotation processor from with sjavac.
 define add_file_to_copy_and_clean
-    # param 1 = BUILD_MYPACKAGE
-    # parma 2 = The source file to copy and clean.
-    $2_TARGET:=$2
-    # Remove the source prefix. 
-    $$(foreach i,$$($1_SRC),$$(eval $$(call remove_string,$$i,$2_TARGET)))
-    # Now we can setup the depency that will trigger the copying.
-    $$($1_BIN)$$($2_TARGET) : $2
+  # param 1 = BUILD_MYPACKAGE
+  # parma 2 = The source file to copy and clean.
+  $2_TARGET:=$2
+  # Remove the source prefix.
+  $$(foreach i,$$($1_SRC),$$(eval $$(call remove_string,$$i,$2_TARGET)))
+  # Now we can setup the depency that will trigger the copying.
+  $$($1_BIN)$$($2_TARGET) : $2
 	$(MKDIR) -p $$(@D)
-	$(CAT) $$< | $(SED) -e 's/\([^\\]\):/\1\\:/g' -e  's/\([^\\]\)=/\1\\=/g' -e 's/#.*/#/g' \
-                   | $(SED) -f "$(SRC_ROOT)/common/makefiles/support/unicode2x.sed" \
-		   | $(SED) -e '/^#/d' -e '/^$$$$/d' \
-		            -e :a -e '/\\$$$$/N; s/\\\n//; ta' \
-			    -e 's/^[ \t]*//;s/[ \t]*$$$$//' \
-			    -e 's/\\=/=/' | LANG=C $(SORT) > $$@
+	$(CAT) $$< | $(SED) -e 's/\([^\\]\):/\1\\:/g' -e 's/\([^\\]\)=/\1\\=/g' -e 's/#.*/#/g' \
+	    | $(SED) -f "$(SRC_ROOT)/common/makefiles/support/unicode2x.sed" \
+	    | $(SED) -e '/^#/d' -e '/^$$$$/d' \
+	        -e :a -e '/\\$$$$/N; s/\\\n//; ta' \
+	        -e 's/^[ \t]*//;s/[ \t]*$$$$//' \
+	        -e 's/\\=/=/' | LANG=C $(SORT) > $$@
 	$(CHMOD) -f ug+w $$@
 
-    # And do not forget this target
-    $1_ALL_COPY_CLEAN_TARGETS += $$($1_BIN)$$($2_TARGET)
+  # And do not forget this target
+  $1_ALL_COPY_CLEAN_TARGETS += $$($1_BIN)$$($2_TARGET)
 endef
 
 define remove_string
-    $2 := $$(subst $1,,$$($2))
+  $2 := $$(subst $1,,$$($2))
 endef
 
 define replace_space_with_pathsep
-    $1:=$(subst $(SPACE),$(PATH_SEP),$(strip $(patsubst %,%,$2)))
+  $1:=$(subst $(SPACE),$(PATH_SEP),$(strip $(patsubst %,%,$2)))
 endef
 
 define SetupJavaCompilation
-    # param 1 is for example BUILD_MYPACKAGE
-    # param 2,3,4,5,6,7,8 are named args.
-    #    SETUP:=must point to a previously setup java compiler, for example: SETUP:=BOOTJAVAC
-    #    JVM:=path to ..bin/java
-    #    ADD_JAVAC_FLAGS:=javac flags to append to the default ones.
-    #    SRC:=one or more directories to search for sources
-    #    BIN:=store classes here
-    #    INCLUDES:=myapp.foo means will only compile java files in myapp.foo or any of its sub-packages.
-    #    EXCLUDES:=myapp.foo means will do not compile java files in myapp.foo or any of its sub-packages.
-    #    COPY:=.prp means copy all prp files to the corresponding package in BIN.
-    #    CLEAN:=.properties means copy and clean all properties file to the corresponding package in BIN.
-    #    COPY_FILES:=myapp/foo/setting.txt means copy this file over to the package myapp/foo
-    #    SRCZIP:=Create a src.zip based on the found sources and copied files.
-    #    INCLUDE_FILES:="com/sun/SolarisFoobar.java" means only compile this file!
-    #    EXCLUDE_FILES:="com/sun/SolarisFoobar.java" means do not compile this particular file!
-    #                   "SolarisFoobar.java" means do not compile SolarisFoobar, wherever it is found.
-    #    JAVAC_SOURCE_PATH_UGLY_OVERRIDE:=Don't use this. This forces an explicit -sourcepath to javac.
-    #                                     Its only here until we cleanup some nasty source code pasta in the jdk.
-    #    HEADERS:=path to directory where all generated c-headers are written.
-    #    DEPENDS:=Extra dependecy
-    $(foreach i,2 3 4 5 6 7 8 9 10 11 12 13 14 15, $(if $($i),$1_$(strip $($i)))$(NEWLINE))
-    $(call LogSetupMacroEntry,SetupJavaCompilation($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 SetupJavaCompilation, please update JavaCompilation.gmk))
+  # param 1 is for example BUILD_MYPACKAGE
+  # param 2,3,4,5,6,7,8 are named args.
+  #   SETUP:=must point to a previously setup java compiler, for example: SETUP:=BOOTJAVAC
+  #   JVM:=path to ..bin/java
+  #   ADD_JAVAC_FLAGS:=javac flags to append to the default ones.
+  #   SRC:=one or more directories to search for sources
+  #   BIN:=store classes here
+  #   INCLUDES:=myapp.foo means will only compile java files in myapp.foo or any of its sub-packages.
+  #   EXCLUDES:=myapp.foo means will do not compile java files in myapp.foo or any of its sub-packages.
+  #   COPY:=.prp means copy all prp files to the corresponding package in BIN.
+  #   CLEAN:=.properties means copy and clean all properties file to the corresponding package in BIN.
+  #   COPY_FILES:=myapp/foo/setting.txt means copy this file over to the package myapp/foo
+  #   SRCZIP:=Create a src.zip based on the found sources and copied files.
+  #   INCLUDE_FILES:="com/sun/SolarisFoobar.java" means only compile this file!
+  #   EXCLUDE_FILES:="com/sun/SolarisFoobar.java" means do not compile this particular file!
+  #       "SolarisFoobar.java" means do not compile SolarisFoobar, wherever it is found.
+  #   JAVAC_SOURCE_PATH_UGLY_OVERRIDE:=Don't use this. This forces an explicit -sourcepath to javac.
+  #       Its only here until we cleanup some nasty source code pasta in the jdk.
+  #   HEADERS:=path to directory where all generated c-headers are written.
+  #   DEPENDS:=Extra dependecy
+  $(foreach i,2 3 4 5 6 7 8 9 10 11 12 13 14 15, $(if $($i),$1_$(strip $($i)))$(NEWLINE))
+  $(call LogSetupMacroEntry,SetupJavaCompilation($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 SetupJavaCompilation, please update JavaCompilation.gmk))
 
-    # Extract the info from the java compiler setup.
-    $1_JVM   := $$($$($1_SETUP)_JVM)
-    $1_JAVAC := $$($$($1_SETUP)_JAVAC)
-    $1_FLAGS := $$($$($1_SETUP)_FLAGS) $(JAVAC_FLAGS) $$($1_ADD_JAVAC_FLAGS)
-    ifeq ($$($1_JAVAC),)
-        $$(error The Java compilation $1 refers to a non-existant java compiler setup $$($1_SETUP))
-    endif
-    $1_SJAVAC_PORTFILE := $$($$($1_SETUP)_SJAVAC_PORTFILE)
-    $1_SERVER_JVM := $$($$($1_SETUP)_SERVER_JVM)
+  # Extract the info from the java compiler setup.
+  $1_JVM := $$($$($1_SETUP)_JVM)
+  $1_JAVAC := $$($$($1_SETUP)_JAVAC)
+  $1_FLAGS := $$($$($1_SETUP)_FLAGS) $(JAVAC_FLAGS) $$($1_ADD_JAVAC_FLAGS)
+  ifeq ($$($1_JAVAC),)
+    $$(error The Java compilation $1 refers to a non-existant java compiler setup $$($1_SETUP))
+  endif
+  $1_SJAVAC_PORTFILE := $$($$($1_SETUP)_SJAVAC_PORTFILE)
+  $1_SERVER_JVM := $$($$($1_SETUP)_SERVER_JVM)
 
-    # Handle addons and overrides.
-    $1_SRC:=$$(call ADD_SRCS,$$($1_SRC))
-    # Make sure the dirs exist.
-    $$(foreach d,$$($1_SRC), $$(if $$(wildcard $$d),,$$(error SRC specified to SetupJavaCompilation $1 contains missing directory $$d)))
-    $$(eval $$(call MakeDir,$$($1_BIN)))
-    # Find all files in the source trees.
-    $1_ALL_SRCS += $$(filter-out $(OVR_SRCS),$$(call CacheFind,$$($1_SRC)))
-    # Extract the java files.
-    ifneq ($$($1_EXCLUDE_FILES),)
-        $1_EXCLUDE_FILES_PATTERN:=$$(addprefix %,$$($1_EXCLUDE_FILES))
+  # Handle addons and overrides.
+  $1_SRC:=$$(call ADD_SRCS,$$($1_SRC))
+  # Make sure the dirs exist.
+  $$(foreach d,$$($1_SRC), $$(if $$(wildcard $$d),,$$(error SRC specified to SetupJavaCompilation $1 contains missing directory $$d)))
+  $$(eval $$(call MakeDir,$$($1_BIN)))
+  # Find all files in the source trees.
+  $1_ALL_SRCS += $$(filter-out $(OVR_SRCS),$$(call CacheFind,$$($1_SRC)))
+  # Extract the java files.
+  ifneq ($$($1_EXCLUDE_FILES),)
+    $1_EXCLUDE_FILES_PATTERN:=$$(addprefix %,$$($1_EXCLUDE_FILES))
+  endif
+  $1_SRCS := $$(filter-out $$($1_EXCLUDE_FILES_PATTERN),$$(filter %.java,$$($1_ALL_SRCS)))
+  ifneq ($$($1_INCLUDE_FILES),)
+    $1_INCLUDE_FILES:=$$(foreach i,$$($1_SRC),$$(addprefix $$i/,$$($1_INCLUDE_FILES)))
+    $1_SRCS := $$(filter $$($1_INCLUDE_FILES), $$($1_SRCS))
+  endif
+
+  # Now we have a list of all java files to compile: $$($1_SRCS)
+
+  # Create the corresponding smart javac wrapper command line.
+  $1_SJAVAC_ARGS:=$$(addprefix -x ,$$(addsuffix .*,$$(subst /,.,$$($1_EXCLUDES)))) \
+      $$(addprefix -i ,$$(addsuffix .*,$$(subst /,.,$$($1_INCLUDES)))) \
+      $$(addprefix -xf *,$$(strip $$($1_EXCLUDE_FILES))) \
+      $$(addprefix -if *,$$(strip $$($1_INCLUDE_FILES))) \
+      -src "$$(subst $$(SPACE),$$(PATH_SEP),$$(strip $$($1_SRC)))"
+
+  # Prepend the source/bin path to the filter expressions.
+  ifneq ($$($1_INCLUDES),)
+    $1_SRC_INCLUDES := $$(foreach i,$$($1_SRC),$$(addprefix $$i/,$$(addsuffix /%,$$($1_INCLUDES))))
+    $1_SRCS := $$(filter $$($1_SRC_INCLUDES),$$($1_SRCS))
+  endif
+  ifneq ($$($1_EXCLUDES),)
+    $1_SRC_EXCLUDES := $$(foreach i,$$($1_SRC),$$(addprefix $$i/,$$(addsuffix /%,$$($1_EXCLUDES))))
+    $1_SRCS := $$(filter-out $$($1_SRC_EXCLUDES),$$($1_SRCS))
+  endif
+
+  # Find all files to be copied from source to bin.
+  ifneq (,$$($1_COPY))
+    # Search for all files to be copied.
+    $1_ALL_COPIES := $$(filter $$(addprefix %,$$($1_COPY)),$$($1_ALL_SRCS))
+    # Copy these explicitly
+    $1_ALL_COPIES += $$($1_COPY_FILES)
+    # Copy must also respect filters.
+    ifneq (,$$($1_INCLUDES))
+      $1_ALL_COPIES := $$(filter $$($1_SRC_INCLUDES),$$($1_ALL_COPIES))
     endif
-    $1_SRCS     := $$(filter-out $$($1_EXCLUDE_FILES_PATTERN),$$(filter %.java,$$($1_ALL_SRCS)))
-    ifneq ($$($1_INCLUDE_FILES),)
-        $1_INCLUDE_FILES:=$$(foreach i,$$($1_SRC),$$(addprefix $$i/,$$($1_INCLUDE_FILES)))
-        $1_SRCS := $$(filter $$($1_INCLUDE_FILES), $$($1_SRCS))
+    ifneq (,$$($1_EXCLUDES))
+      $1_ALL_COPIES := $$(filter-out $$($1_SRC_EXCLUDES),$$($1_ALL_COPIES))
+    endif
+    ifneq (,$$($1_EXCLUDE_FILES))
+      $1_ALL_COPIES := $$(filter-out $$($1_EXCLUDE_FILES_PATTERN),$$($1_ALL_COPIES))
+    endif
+    # All files below META-INF are always copied.
+    $1_ALL_COPIES += $$(filter $$(addsuffix /META-INF%,$$($1_SRC)),$$($1_ALL_SRCS))
+    ifneq (,$$($1_ALL_COPIES))
+      # Yep, there are files to be copied!
+      $1_ALL_COPY_TARGETS:=
+          $$(foreach i,$$($1_ALL_COPIES),$$(eval $$(call add_file_to_copy,$1,$$i)))
+      # Now we can depend on $$($1_ALL_COPY_TARGETS) to copy all files!
+    endif
+  endif
+
+  # Find all property files to be copied and cleaned from source to bin.
+  ifneq (,$$($1_CLEAN))
+    # Search for all files to be copied.
+    $1_ALL_CLEANS := $$(filter $$(addprefix %,$$($1_CLEAN)),$$($1_ALL_SRCS))
+    # Copy and clean must also respect filters.
+    ifneq (,$$($1_INCLUDES))
+      $1_ALL_CLEANS := $$(filter $$($1_SRC_INCLUDES),$$($1_ALL_CLEANS))
+    endif
+    ifneq (,$$($1_EXCLUDES))
+      $1_ALL_CLEANS := $$(filter-out $$($1_SRC_EXCLUDES),$$($1_ALL_CLEANS))
+    endif
+    ifneq (,$$($1_EXCLUDE_FILES))
+      $1_ALL_CLEANS := $$(filter-out $$($1_EXCLUDE_FILES_PATTERN),$$($1_ALL_CLEANS))
+    endif
+    ifneq (,$$($1_ALL_CLEANS))
+      # Yep, there are files to be copied and cleaned!
+      $1_ALL_COPY_CLEAN_TARGETS:=
+          $$(foreach i,$$($1_ALL_CLEANS),$$(eval $$(call add_file_to_copy_and_clean,$1,$$i)))
+      # Now we can depend on $$($1_ALL_COPY_CLEAN_TARGETS) to copy all files!
+    endif
+  endif
+
+  # Prep the source paths.
+  ifneq ($$($1_JAVAC_SOURCE_PATH_UGLY_OVERRIDE),)
+    $$(eval $$(call replace_space_with_pathsep,$1_SRCROOTSC,$$($1_JAVAC_SOURCE_PATH_UGLY_OVERRIDE)))
+  else
+    $$(eval $$(call replace_space_with_pathsep,$1_SRCROOTSC,$$($1_SRC)))
+  endif
+
+  # Create a sed expression to remove the source roots and to replace / with .
+  # and remove .java at the end.
+  $1_REWRITE_INTO_CLASSES:=$$(foreach i,$$($1_SRC),-e 's|$$i/||g') -e 's|/|.|g' -e 's|.java$$$$||g'
+
+  ifeq ($$($1_DISABLE_SJAVAC)x$$(ENABLE_SJAVAC),xyes)
+    ifneq (,$$($1_HEADERS))
+      $1_HEADERS_ARG := -h $$($1_HEADERS)
     endif
 
-    # Now we have a list of all java files to compile: $$($1_SRCS)
+    # Using sjavac to compile.
+    $1 := $$($1_ALL_COPY_TARGETS) $$($1_ALL_COPY_CLEAN_TARGETS) $$($1_BIN)/javac_state
 
-    # Create the corresponding smart javac wrapper command line.
-    $1_SJAVAC_ARGS:=$$(addprefix -x ,$$(addsuffix .*,$$(subst /,.,$$($1_EXCLUDES)))) \
-		$$(addprefix -i ,$$(addsuffix .*,$$(subst /,.,$$($1_INCLUDES)))) \
-		$$(addprefix -xf *,$$(strip $$($1_EXCLUDE_FILES))) \
-		$$(addprefix -if *,$$(strip $$($1_INCLUDE_FILES))) \
-		-src "$$(subst $$(SPACE),$$(PATH_SEP),$$(strip $$($1_SRC)))"
+    # Create SJAVAC variable form JAVAC variable. Expects $1_JAVAC to be
+    # "bootclasspathprepend -cp .../javac.jar com.sun.tools.javac.Main"
+    # and javac is simply replaced with sjavac.
+    $1_SJAVAC:=$$(subst com.sun.tools.javac.Main,com.sun.tools.sjavac.Main,$$($1_JAVAC))
 
-    # Prepend the source/bin path to the filter expressions.
-    ifneq ($$($1_INCLUDES),)
-        $1_SRC_INCLUDES := $$(foreach i,$$($1_SRC),$$(addprefix $$i/,$$(addsuffix /%,$$($1_INCLUDES))))
-        $1_SRCS     := $$(filter $$($1_SRC_INCLUDES),$$($1_SRCS))
-    endif
-    ifneq ($$($1_EXCLUDES),)
-        $1_SRC_EXCLUDES := $$(foreach i,$$($1_SRC),$$(addprefix $$i/,$$(addsuffix /%,$$($1_EXCLUDES))))
-        $1_SRCS     := $$(filter-out $$($1_SRC_EXCLUDES),$$($1_SRCS))
-    endif
+    # Set the $1_REMOTE to spawn a background javac server.
+    $1_REMOTE:=--server:portfile=$$($1_SJAVAC_PORTFILE),id=$1,sjavac=$$(subst $$(SPACE),%20,$$(subst $$(COMMA),%2C,$$(strip $$($1_SERVER_JVM) $$($1_SJAVAC))))
 
-    # Find all files to be copied from source to bin.
-    ifneq (,$$($1_COPY))
-        # Search for all files to be copied.
-        $1_ALL_COPIES := $$(filter $$(addprefix %,$$($1_COPY)),$$($1_ALL_SRCS))
-        # Copy these explicitly
-        $1_ALL_COPIES += $$($1_COPY_FILES)
-        # Copy must also respect filters.
-        ifneq (,$$($1_INCLUDES))
-            $1_ALL_COPIES := $$(filter $$($1_SRC_INCLUDES),$$($1_ALL_COPIES))
-        endif
-        ifneq (,$$($1_EXCLUDES))
-            $1_ALL_COPIES := $$(filter-out $$($1_SRC_EXCLUDES),$$($1_ALL_COPIES))
-        endif
-        ifneq (,$$($1_EXCLUDE_FILES))
-            $1_ALL_COPIES := $$(filter-out $$($1_EXCLUDE_FILES_PATTERN),$$($1_ALL_COPIES))
-        endif
-        # All files below META-INF are always copied.
-        $1_ALL_COPIES += $$(filter $$(addsuffix /META-INF%,$$($1_SRC)),$$($1_ALL_SRCS))
-        ifneq (,$$($1_ALL_COPIES))
-            # Yep, there are files to be copied!
-            $1_ALL_COPY_TARGETS:=
-            $$(foreach i,$$($1_ALL_COPIES),$$(eval $$(call add_file_to_copy,$1,$$i)))
-            # Now we can depend on $$($1_ALL_COPY_TARGETS) to copy all files!
-        endif
-    endif
+    $$($1_BIN)/javac_state: $$($1_SRCS) $$($1_DEPENDS)
+	$(MKDIR) -p $$(@D)
+	$$(call ListPathsSafely,$1_SRCS,\n, >> $$($1_BIN)/_the.batch.tmp)
+	$(ECHO) Compiling $1
+	($$($1_JVM) $$($1_SJAVAC) \
+	    $$($1_REMOTE) \
+	    -j $(JOBS) \
+	    --permit-unidentified-artifacts \
+	    --permit-sources-without-package \
+	    --compare-found-sources $$($1_BIN)/_the.batch.tmp \
+	    --log=$(LOG_LEVEL) \
+	    $$($1_SJAVAC_ARGS) \
+	    $$($1_FLAGS) \
+	    $$($1_HEADERS_ARG) \
+	    -d $$($1_BIN) && \
+	$(MV) $$($1_BIN)/_the.batch.tmp $$($1_BIN)/_the.batch)
+  else
+    # Using plain javac to batch compile everything.
+    $1 := $$($1_ALL_COPY_TARGETS) $$($1_ALL_COPY_CLEAN_TARGETS) $$($1_BIN)/_the.batch
 
-    # Find all property files to be copied and cleaned from source to bin.
-    ifneq (,$$($1_CLEAN))
-        # Search for all files to be copied.
-        $1_ALL_CLEANS := $$(filter $$(addprefix %,$$($1_CLEAN)),$$($1_ALL_SRCS))
-        # Copy and clean must also respect filters.
-        ifneq (,$$($1_INCLUDES))
-            $1_ALL_CLEANS := $$(filter $$($1_SRC_INCLUDES),$$($1_ALL_CLEANS))
-        endif
-        ifneq (,$$($1_EXCLUDES))
-            $1_ALL_CLEANS := $$(filter-out $$($1_SRC_EXCLUDES),$$($1_ALL_CLEANS))
-        endif
-        ifneq (,$$($1_EXCLUDE_FILES))
-            $1_ALL_CLEANS := $$(filter-out $$($1_EXCLUDE_FILES_PATTERN),$$($1_ALL_CLEANS))
-        endif
-        ifneq (,$$($1_ALL_CLEANS))
-            # Yep, there are files to be copied and cleaned!
-            $1_ALL_COPY_CLEAN_TARGETS:=
-            $$(foreach i,$$($1_ALL_CLEANS),$$(eval $$(call add_file_to_copy_and_clean,$1,$$i)))
-            # Now we can depend on $$($1_ALL_COPY_CLEAN_TARGETS) to copy all files!
-        endif
-    endif
+    # When building in batch, put headers in a temp dir to filter out those that actually
+    # changed before copying them to the real header dir.
+    ifneq (,$$($1_HEADERS))
+      $1_HEADERS_ARG := -h $$($1_HEADERS).tmp
 
-    # Prep the source paths.
-    ifneq ($$($1_JAVAC_SOURCE_PATH_UGLY_OVERRIDE),)
-      $$(eval $$(call replace_space_with_pathsep,$1_SRCROOTSC,$$($1_JAVAC_SOURCE_PATH_UGLY_OVERRIDE)))
-    else
-      $$(eval $$(call replace_space_with_pathsep,$1_SRCROOTSC,$$($1_SRC)))
-    endif
-
-    # Create a sed expression to remove the source roots and to replace / with .
-    # and remove .java at the end. 
-    $1_REWRITE_INTO_CLASSES:=$$(foreach i,$$($1_SRC),-e 's|$$i/||g') -e 's|/|.|g' -e 's|.java$$$$||g'
-
-    ifeq ($$($1_DISABLE_SJAVAC)x$$(ENABLE_SJAVAC),xyes)
-        ifneq (,$$($1_HEADERS))
-            $1_HEADERS_ARG := -h $$($1_HEADERS)
-        endif
-
-        # Using sjavac to compile. 
-        $1 := $$($1_ALL_COPY_TARGETS) $$($1_ALL_COPY_CLEAN_TARGETS) $$($1_BIN)/javac_state
-
-        # Create SJAVAC variable form JAVAC variable. Expects $1_JAVAC to be 
-        # "bootclasspathprepend -cp .../javac.jar com.sun.tools.javac.Main"
-        # and javac is simply replaced with sjavac.
-        $1_SJAVAC:=$$(subst com.sun.tools.javac.Main,com.sun.tools.sjavac.Main,$$($1_JAVAC))
-
-        # Set the $1_REMOTE to spawn a background javac server.
-        $1_REMOTE:=--server:portfile=$$($1_SJAVAC_PORTFILE),id=$1,sjavac=$$(subst $$(SPACE),%20,$$(subst $$(COMMA),%2C,$$(strip $$($1_SERVER_JVM) $$($1_SJAVAC))))
-
-        $$($1_BIN)/javac_state: $$($1_SRCS) $$($1_DEPENDS)
-		$(MKDIR) -p $$(@D)
-		$$(call ListPathsSafely,$1_SRCS,\n, >> $$($1_BIN)/_the.batch.tmp)
-		$(ECHO) Compiling $1
-		($$($1_JVM) $$($1_SJAVAC) \
-			$$($1_REMOTE) \
-			-j $(JOBS) \
-			--permit-unidentified-artifacts \
-			--permit-sources-without-package \
-			--compare-found-sources $$($1_BIN)/_the.batch.tmp \
-			--log=$(LOG_LEVEL) \
-			$$($1_SJAVAC_ARGS) \
-			$$($1_FLAGS) \
-			$$($1_HEADERS_ARG) \
-			-d $$($1_BIN) && \
-			$(MV) $$($1_BIN)/_the.batch.tmp $$($1_BIN)/_the.batch)
-    else
-        # Using plain javac to batch compile everything.
-        $1 := $$($1_ALL_COPY_TARGETS) $$($1_ALL_COPY_CLEAN_TARGETS) $$($1_BIN)/_the.batch
-
-        # When building in batch, put headers in a temp dir to filter out those that actually
-        # changed before copying them to the real header dir.
-        ifneq (,$$($1_HEADERS))
-            $1_HEADERS_ARG := -h $$($1_HEADERS).tmp
-
-            $$($1_HEADERS)/_the.headers: $$($1_BIN)/_the.batch
+      $$($1_HEADERS)/_the.headers: $$($1_BIN)/_the.batch
 		$(MKDIR) -p $$(@D)
 		for f in `ls $$($1_HEADERS).tmp`; do \
 		  if [ ! -f "$$($1_HEADERS)/$$$$f" ] || [ "`$(DIFF) $$($1_HEADERS)/$$$$f $$($1_HEADERS).tmp/$$$$f`" != "" ]; then \
@@ -535,54 +535,54 @@
 		$(RM) -r $$($1_HEADERS).tmp
 		$(TOUCH) $$@
 
-            $1 += $$($1_HEADERS)/_the.headers
-        endif
-
-        # When not using sjavac, pass along all sources to javac using an @file.
-        $$($1_BIN)/_the.batch: $$($1_SRCS) $$($1_DEPENDS)
-		$(MKDIR) -p $$(@D)
-		$(RM) $$($1_BIN)/_the.batch $$($1_BIN)/_the.batch.tmp
-		$$(call ListPathsSafely,$1_SRCS,\n, >> $$($1_BIN)/_the.batch.tmp)
-		$(ECHO) Compiling `$(WC) $$($1_BIN)/_the.batch.tmp | $(TR) -s ' ' | $(CUT) -f 2 -d ' '` files for $1
-		($$($1_JVM) $$($1_JAVAC) $$($1_FLAGS) \
-			-implicit:none -sourcepath "$$($1_SRCROOTSC)" \
-			-d $$($1_BIN) $$($1_HEADERS_ARG) @$$($1_BIN)/_the.batch.tmp && \
-			$(MV) $$($1_BIN)/_the.batch.tmp $$($1_BIN)/_the.batch)
-
+      $1 += $$($1_HEADERS)/_the.headers
     endif
 
-    # Check if a jar file was specified, then setup the rules for the jar.
-    ifneq (,$$($1_JAR))
-        # If no suffixes was explicitly set for this jar file.
-        # Use class and the cleaned/copied properties file suffixes as the default
-        # for the types of files to be put into the jar.
-        ifeq (,$$($1_SUFFIXES))
-            $1_SUFFIXES:=.class $$($1_CLEAN) $$($1_COPY)
-        endif
+    # When not using sjavac, pass along all sources to javac using an @file.
+    $$($1_BIN)/_the.batch: $$($1_SRCS) $$($1_DEPENDS)
+	$(MKDIR) -p $$(@D)
+	$(RM) $$($1_BIN)/_the.batch $$($1_BIN)/_the.batch.tmp
+	$$(call ListPathsSafely,$1_SRCS,\n, >> $$($1_BIN)/_the.batch.tmp)
+	$(ECHO) Compiling `$(WC) $$($1_BIN)/_the.batch.tmp | $(TR) -s ' ' | $(CUT) -f 2 -d ' '` files for $1
+	($$($1_JVM) $$($1_JAVAC) $$($1_FLAGS) \
+	    -implicit:none -sourcepath "$$($1_SRCROOTSC)" \
+	    -d $$($1_BIN) $$($1_HEADERS_ARG) @$$($1_BIN)/_the.batch.tmp && \
+	$(MV) $$($1_BIN)/_the.batch.tmp $$($1_BIN)/_the.batch)
 
-        $$(eval $$(call SetupArchive,ARCHIVE_$1,$$($1),\
-		SRCS:=$$($1_BIN),\
-		SUFFIXES:=$$($1_SUFFIXES),\
-		EXCLUDE:=$$($1_EXCLUDES),\
-		INCLUDES:=$$($1_INCLUDES),\
-		EXTRA_FILES:=$$($1_ALL_COPY_TARGETS) $$($1_ALL_COPY_CLEAN_TARGETS),\
-		JAR:=$$($1_JAR),\
-		JARMAIN:=$$($1_JARMAIN),\
-		MANIFEST:=$$($1_MANIFEST),\
-		EXTRA_MANIFEST_ATTR:=$$($1_EXTRA_MANIFEST_ATTR),\
-		JARINDEX:=$$($1_JARINDEX),\
-		HEADERS:=$$($1_HEADERS),\
-		SETUP:=$$($1_SETUP)))
+  endif
+
+  # Check if a jar file was specified, then setup the rules for the jar.
+  ifneq (,$$($1_JAR))
+    # If no suffixes was explicitly set for this jar file.
+    # Use class and the cleaned/copied properties file suffixes as the default
+    # for the types of files to be put into the jar.
+    ifeq (,$$($1_SUFFIXES))
+      $1_SUFFIXES:=.class $$($1_CLEAN) $$($1_COPY)
     endif
 
-    # Check if a srczip was specified, then setup the rules for the srczip.
-    ifneq (,$$($1_SRCZIP))
-        $$(eval $$(call SetupZipArchive,ARCHIVE_$1,\
-		SRC:=$$($1_SRC),\
-		ZIP:=$$($1_SRCZIP),\
-		INCLUDES:=$$($1_INCLUDES),\
-		EXCLUDES:=$$($1_EXCLUDES),\
-		EXCLUDE_FILES:=$$($1_EXCLUDE_FILES)))
-    endif
+    $$(eval $$(call SetupArchive,ARCHIVE_$1,$$($1), \
+        SRCS:=$$($1_BIN), \
+        SUFFIXES:=$$($1_SUFFIXES), \
+        EXCLUDE:=$$($1_EXCLUDES), \
+        INCLUDES:=$$($1_INCLUDES), \
+        EXTRA_FILES:=$$($1_ALL_COPY_TARGETS) $$($1_ALL_COPY_CLEAN_TARGETS), \
+        JAR:=$$($1_JAR), \
+        JARMAIN:=$$($1_JARMAIN), \
+        MANIFEST:=$$($1_MANIFEST), \
+        EXTRA_MANIFEST_ATTR:=$$($1_EXTRA_MANIFEST_ATTR), \
+        JARINDEX:=$$($1_JARINDEX), \
+        HEADERS:=$$($1_HEADERS), \
+        SETUP:=$$($1_SETUP)))
+  endif
+
+  # Check if a srczip was specified, then setup the rules for the srczip.
+  ifneq (,$$($1_SRCZIP))
+    $$(eval $$(call SetupZipArchive,ARCHIVE_$1, \
+        SRC:=$$($1_SRC), \
+        ZIP:=$$($1_SRCZIP), \
+        INCLUDES:=$$($1_INCLUDES), \
+        EXCLUDES:=$$($1_EXCLUDES), \
+        EXCLUDE_FILES:=$$($1_EXCLUDE_FILES)))
+  endif
 
 endef
diff --git a/common/makefiles/Jprt.gmk b/common/makefiles/Jprt.gmk
index cf05583..e80aea9 100644
--- a/common/makefiles/Jprt.gmk
+++ b/common/makefiles/Jprt.gmk
@@ -23,7 +23,7 @@
 # questions.
 #
 
-# This file is included by the root NewerMakefile and contains targets 
+# This file is included by the root NewerMakefile and contains targets
 # and utilities needed by JPRT.
 
 # Utilities used in this Makefile. Most of this makefile executes without
@@ -36,7 +36,7 @@
 PRINTF=printf
 PWD=pwd
 # Insure we have a path that looks like it came from pwd
-#   (This is mostly for Windows sake and drive letters)
+# (This is mostly for Windows sake and drive letters)
 define UnixPath # path
 $(shell (cd "$1" && $(PWD)))
 endef
@@ -47,19 +47,19 @@
   OPEN_BUILD=true
 else
   OPEN_BUILD := $(if $(or $(wildcard $(root_dir)/jdk/src/closed), \
-                          $(wildcard $(root_dir)/jdk/make/closed), \
-                          $(wildcard $(root_dir)/jdk/test/closed), \
-                          $(wildcard $(root_dir)/hotspot/src/closed), \
-                          $(wildcard $(root_dir)/hotspot/make/closed), \
-                          $(wildcard $(root_dir)/hotspot/test/closed)), \
-                     false,true)
+      $(wildcard $(root_dir)/jdk/make/closed), \
+      $(wildcard $(root_dir)/jdk/test/closed), \
+      $(wildcard $(root_dir)/hotspot/src/closed), \
+      $(wildcard $(root_dir)/hotspot/make/closed), \
+      $(wildcard $(root_dir)/hotspot/test/closed)), \
+      false,true)
 endif
 
 HOTSPOT_AVAILABLE := $(if $(wildcard $(root_dir)/hotspot),true,false)
 
 ###########################################################################
 # To help in adoption of the new configure&&make build process, a bridge
-#   build will use the old settings to run configure and do the build.
+# build will use the old settings to run configure and do the build.
 
 # Build with the configure bridge. After running configure, restart make
 # to parse the new spec file.
@@ -85,80 +85,80 @@
 	$(RM) $@.tmp
 	$(MKDIR) -p $(BUILD_DIR_ROOT)
 	@$(ECHO) " --with-debug-level=$(if $(DEBUG_LEVEL),$(DEBUG_LEVEL),release) " >> $@.tmp
-ifdef ARCH_DATA_MODEL
-	@$(ECHO) " --with-target-bits=$(ARCH_DATA_MODEL) " >> $@.tmp
-endif
-ifeq ($(ARCH_DATA_MODEL),32)
-	@$(ECHO) " --with-jvm-variants=client,server " >> $@.tmp
-endif
-ifdef ALT_PARALLEL_COMPILE_JOBS
-	@$(ECHO) " --with-num-cores=$(ALT_PARALLEL_COMPILE_JOBS) " >> $@.tmp
-endif
-ifdef ALT_BOOTDIR
-	@$(ECHO) " --with-boot-jdk=$(call UnixPath,$(ALT_BOOTDIR)) " >> $@.tmp
-endif
-ifdef ALT_CUPS_HEADERS_PATH
-	@$(ECHO) " --with-cups-include=$(call UnixPath,$(ALT_CUPS_HEADERS_PATH)) " >> $@.tmp
-endif
-ifdef ALT_FREETYPE_HEADERS_PATH
-	@$(ECHO) " --with-freetype=$(call UnixPath,$(ALT_FREETYPE_HEADERS_PATH)/..) " >> $@.tmp
-endif
-ifdef ENABLE_SJAVAC
-	@$(ECHO) " --enable-sjavac" >> $@.tmp
-endif
-ifeq ($(HOTSPOT_AVAILABLE),false)
-  ifdef ALT_JDK_IMPORT_PATH
-	@$(ECHO) " --with-import-hotspot=$(call UnixPath,$(ALT_JDK_IMPORT_PATH)) " >> $@.tmp
-  endif
-endif
-ifeq ($(OPEN_BUILD),true)
-	@$(ECHO) " --enable-openjdk-only " >> $@.tmp
-else
-  # Todo: move to closed?
-  ifdef ALT_MOZILLA_HEADERS_PATH
-	@$(ECHO) " --with-mozilla-headers=$(call UnixPath,$(ALT_MOZILLA_HEADERS_PATH)) " >> $@.tmp
-  endif
-  ifdef ALT_JUNIT_DIR
-	@$(ECHO) " --with-junit-dir=$(call UnixPath,$(ALT_JUNIT_DIR)) " >> $@.tmp
-  endif
-  ifdef ANT_HOME
-	@$(ECHO) " --with-ant-home=$(call UnixPath,$(ANT_HOME)) " >> $@.tmp
-  endif
-  ifdef ALT_JAVAFX_ZIP_DIR
-	@$(ECHO) " --with-javafx-zip-dir=$(call UnixPath,$(ALT_JAVAFX_ZIP_DIR)) " >> $@.tmp
-  endif
-  ifdef ALT_JMC_ZIP_DIR
-	@$(ECHO) " --with-jmc-zip-dir=$(call UnixPath,$(ALT_JMC_ZIP_DIR)) " >> $@.tmp
-  endif
-  ifdef ALT_WIXDIR
-	@$(ECHO) " --with-wix=$(call UnixPath,$(ALT_WIXDIR)) " >> $@.tmp
-  endif
-  ifdef ALT_INSTALL_LZMA_PATH
-	@$(ECHO) " --with-lzma-path=$(call UnixPath,$(ALT_INSTALL_LZMA_PATH)) " >> $@.tmp
-  endif
-  ifdef ALT_INSTALL_UPX_PATH
-	@$(ECHO) " --with-upx-path=$(call UnixPath,$(ALT_INSTALL_UPX_PATH)) " >> $@.tmp
-  endif
-  ifdef ALT_INSTALL_UPX_FILENAME
-	@$(ECHO) " --with-upx-filename=$(call UnixPath,$(ALT_INSTALL_UPX_FILENAME)) " >> $@.tmp
-  endif
-  ifdef ALT_CCSS_SIGNING_DIR
-	@$(ECHO) " --with-ccss-signing=$(call UnixPath,$(ALT_CCSS_SIGNING_DIR)) " >> $@.tmp
-  endif
-  ifdef ALT_SLASH_JAVA
-	@$(ECHO) " --with-java-devtools=$(call UnixPath,$(ALT_SLASH_JAVA)/devtools) " >> $@.tmp
-  endif
-  ifdef ALT_SPARKLE_FRAMEWORK_DIR
-	@$(ECHO) " --with-sparkle-framework=$(call UnixPath,$(ALT_SPARKLE_FRAMEWORK_DIR)) " >> $@.tmp
-  endif 
-endif
+        ifdef ARCH_DATA_MODEL
+	  @$(ECHO) " --with-target-bits=$(ARCH_DATA_MODEL) " >> $@.tmp
+        endif
+        ifeq ($(ARCH_DATA_MODEL),32)
+	  @$(ECHO) " --with-jvm-variants=client,server " >> $@.tmp
+        endif
+        ifdef ALT_PARALLEL_COMPILE_JOBS
+	  @$(ECHO) " --with-num-cores=$(ALT_PARALLEL_COMPILE_JOBS) " >> $@.tmp
+        endif
+        ifdef ALT_BOOTDIR
+	  @$(ECHO) " --with-boot-jdk=$(call UnixPath,$(ALT_BOOTDIR)) " >> $@.tmp
+        endif
+        ifdef ALT_CUPS_HEADERS_PATH
+	  @$(ECHO) " --with-cups-include=$(call UnixPath,$(ALT_CUPS_HEADERS_PATH)) " >> $@.tmp
+        endif
+        ifdef ALT_FREETYPE_HEADERS_PATH
+	  @$(ECHO) " --with-freetype=$(call UnixPath,$(ALT_FREETYPE_HEADERS_PATH)/..) " >> $@.tmp
+        endif
+        ifdef ENABLE_SJAVAC
+	  @$(ECHO) " --enable-sjavac" >> $@.tmp
+        endif
+        ifeq ($(HOTSPOT_AVAILABLE),false)
+          ifdef ALT_JDK_IMPORT_PATH
+	    @$(ECHO) " --with-import-hotspot=$(call UnixPath,$(ALT_JDK_IMPORT_PATH)) " >> $@.tmp
+          endif
+        endif
+        ifeq ($(OPEN_BUILD),true)
+	  @$(ECHO) " --enable-openjdk-only " >> $@.tmp
+        else
+#         Todo: move to closed?
+          ifdef ALT_MOZILLA_HEADERS_PATH
+	    @$(ECHO) " --with-mozilla-headers=$(call UnixPath,$(ALT_MOZILLA_HEADERS_PATH)) " >> $@.tmp
+          endif
+          ifdef ALT_JUNIT_DIR
+	    @$(ECHO) " --with-junit-dir=$(call UnixPath,$(ALT_JUNIT_DIR)) " >> $@.tmp
+          endif
+          ifdef ANT_HOME
+	    @$(ECHO) " --with-ant-home=$(call UnixPath,$(ANT_HOME)) " >> $@.tmp
+          endif
+          ifdef ALT_JAVAFX_ZIP_DIR
+	    @$(ECHO) " --with-javafx-zip-dir=$(call UnixPath,$(ALT_JAVAFX_ZIP_DIR)) " >> $@.tmp
+          endif
+          ifdef ALT_JMC_ZIP_DIR
+	    @$(ECHO) " --with-jmc-zip-dir=$(call UnixPath,$(ALT_JMC_ZIP_DIR)) " >> $@.tmp
+          endif
+          ifdef ALT_WIXDIR
+	    @$(ECHO) " --with-wix=$(call UnixPath,$(ALT_WIXDIR)) " >> $@.tmp
+          endif
+          ifdef ALT_INSTALL_LZMA_PATH
+	    @$(ECHO) " --with-lzma-path=$(call UnixPath,$(ALT_INSTALL_LZMA_PATH)) " >> $@.tmp
+          endif
+          ifdef ALT_INSTALL_UPX_PATH
+	    @$(ECHO) " --with-upx-path=$(call UnixPath,$(ALT_INSTALL_UPX_PATH)) " >> $@.tmp
+          endif
+          ifdef ALT_INSTALL_UPX_FILENAME
+	    @$(ECHO) " --with-upx-filename=$(call UnixPath,$(ALT_INSTALL_UPX_FILENAME)) " >> $@.tmp
+          endif
+          ifdef ALT_CCSS_SIGNING_DIR
+	    @$(ECHO) " --with-ccss-signing=$(call UnixPath,$(ALT_CCSS_SIGNING_DIR)) " >> $@.tmp
+          endif
+          ifdef ALT_SLASH_JAVA
+	    @$(ECHO) " --with-java-devtools=$(call UnixPath,$(ALT_SLASH_JAVA)/devtools) " >> $@.tmp
+          endif
+          ifdef ALT_SPARKLE_FRAMEWORK_DIR
+	    @$(ECHO) " --with-sparkle-framework=$(call UnixPath,$(ALT_SPARKLE_FRAMEWORK_DIR)) " >> $@.tmp
+          endif
+        endif
 	@if [ -f $@ ] ; then \
-          if ! $(CMP) $@ $@.tmp > /dev/null ; then \
-            $(CP) $@.tmp $@ ; \
-          fi ; \
-        else \
-          $(CP) $@.tmp $@ ; \
-        fi
+	  if ! $(CMP) $@ $@.tmp > /dev/null ; then \
+	    $(CP) $@.tmp $@ ; \
+	  fi ; \
+	else \
+	  $(CP) $@.tmp $@ ; \
+	fi
 	$(RM) $@.tmp
 
 PHONY_LIST += bridge2configure bridgeBuild
@@ -170,7 +170,7 @@
   JPRT_ARCHIVE_BUNDLE=/tmp/jprt_bundles/j2sdk-image.zip
 endif
 ifndef JPRT_ARCHIVE_INSTALL_BUNDLE
-    JPRT_ARCHIVE_INSTALL_BUNDLE=/tmp/jprt_bundles/product-install.zip
+  JPRT_ARCHIVE_INSTALL_BUNDLE=/tmp/jprt_bundles/product-install.zip
 endif
 
 # These targets execute in a SPEC free context, before calling bridgeBuild
@@ -212,9 +212,9 @@
 	$(MKDIR) -p $(BUILD_OUTPUT)/bundles
 	$(CD) $(SRC_JDK_IMAGE_DIR) && $(ZIP) -y -q -r $(BUILD_OUTPUT)/bundles/$(JDK_IMAGE_SUBDIR).zip .
 	$(CD) $(SRC_JRE_IMAGE_DIR) && $(ZIP) -y -q -r $(BUILD_OUTPUT)/bundles/$(JRE_IMAGE_SUBDIR).zip .
-	if [ -d  $(BUILD_OUTPUT)/install/bundles ] ; then \
-           $(CD) $(BUILD_OUTPUT)/install/bundles && $(ZIP) -y -q -r $(JPRT_ARCHIVE_INSTALL_BUNDLE) . ; \
-        fi
+	if [ -d $(BUILD_OUTPUT)/install/bundles ] ; then \
+	  $(CD) $(BUILD_OUTPUT)/install/bundles && $(ZIP) -y -q -r $(JPRT_ARCHIVE_INSTALL_BUNDLE) . ; \
+	fi
 	@$(call TargetExit)
 
 # Copy images to one unified location regardless of platform etc.
@@ -226,19 +226,19 @@
 	$(MKDIR) -p $(BUILD_OUTPUT)/final-images/$(JRE_IMAGE_SUBDIR)
 	$(CP) -R -P $(SRC_JDK_IMAGE_DIR)/* $(BUILD_OUTPUT)/final-images/$(JDK_IMAGE_SUBDIR)/
 	$(CP) -R -P $(SRC_JRE_IMAGE_DIR)/* $(BUILD_OUTPUT)/final-images/$(JRE_IMAGE_SUBDIR)/
-ifeq ($(OPENJDK_TARGET_OS),macosx)
-	$(MKDIR) -p $(BUILD_OUTPUT)/final-images/$(JDK_BUNDLE_SUBDIR)
-	$(MKDIR) -p $(BUILD_OUTPUT)/final-images/$(JRE_BUNDLE_SUBDIR)
-	$(CP) -R -P $(SRC_JDK_BUNDLE_DIR)/* $(BUILD_OUTPUT)/final-images/$(JDK_BUNDLE_SUBDIR)/
-	$(CP) -R -P $(SRC_JRE_BUNDLE_DIR)/* $(BUILD_OUTPUT)/final-images/$(JRE_BUNDLE_SUBDIR)/
-endif
+        ifeq ($(OPENJDK_TARGET_OS),macosx)
+	  $(MKDIR) -p $(BUILD_OUTPUT)/final-images/$(JDK_BUNDLE_SUBDIR)
+	  $(MKDIR) -p $(BUILD_OUTPUT)/final-images/$(JRE_BUNDLE_SUBDIR)
+	  $(CP) -R -P $(SRC_JDK_BUNDLE_DIR)/* $(BUILD_OUTPUT)/final-images/$(JDK_BUNDLE_SUBDIR)/
+	  $(CP) -R -P $(SRC_JRE_BUNDLE_DIR)/* $(BUILD_OUTPUT)/final-images/$(JRE_BUNDLE_SUBDIR)/
+        endif
 	@$(call TargetExit)
 
 
 # Keep track of phony targets
 PHONY_LIST += jprt_build_product jprt_build_fastdebug jprt_build_debug \
-              jprt_build_generic bundles jprt_bundle \
-              final-images final-images-only
+    jprt_build_generic bundles jprt_bundle \
+    final-images final-images-only
 
 ###########################################################################
 # Phony targets
diff --git a/common/makefiles/Main.gmk b/common/makefiles/Main.gmk
index 47b17e2..fa02feb 100644
--- a/common/makefiles/Main.gmk
+++ b/common/makefiles/Main.gmk
@@ -28,7 +28,7 @@
 # Now load the spec
 include $(SPEC)
 
-# Load the vital tools for all the makefiles. 
+# Load the vital tools for all the makefiles.
 include $(SRC_ROOT)/common/makefiles/MakeBase.gmk
 
 # Include the corresponding custom file, if present.
@@ -38,19 +38,19 @@
 
 # Remove any build.log from a previous run, if they exist
 ifneq (,$(BUILD_LOG))
-    ifneq (,$(BUILD_LOG_PREVIOUS))
-        # Rotate old log
-        $(shell $(RM) $(BUILD_LOG_PREVIOUS) 2> /dev/null)
-        $(shell $(MV) $(BUILD_LOG) $(BUILD_LOG_PREVIOUS) 2> /dev/null)
-    else
-        $(shell $(RM) $(BUILD_LOG) 2> /dev/null)
-    endif
-    $(shell $(RM) $(OUTPUT_ROOT)/build-trace-time.log 2> /dev/null)
+  ifneq (,$(BUILD_LOG_PREVIOUS))
+    # Rotate old log
+    $(shell $(RM) $(BUILD_LOG_PREVIOUS) 2> /dev/null)
+    $(shell $(MV) $(BUILD_LOG) $(BUILD_LOG_PREVIOUS) 2> /dev/null)
+  else
+    $(shell $(RM) $(BUILD_LOG) 2> /dev/null)
+  endif
+  $(shell $(RM) $(OUTPUT_ROOT)/build-trace-time.log 2> /dev/null)
 endif
 # Remove any javac server logs and port files. This
 # prevents a new make run to reuse the previous servers.
 ifneq (,$(SJAVAC_SERVER_DIR))
-    $(shell $(MKDIR) -p $(SJAVAC_SERVER_DIR) && $(RM) -rf $(SJAVAC_SERVER_DIR)/*)
+  $(shell $(MKDIR) -p $(SJAVAC_SERVER_DIR) && $(RM) -rf $(SJAVAC_SERVER_DIR)/*)
 endif
 
 # Reset the build timers.
@@ -103,8 +103,8 @@
 	@$(call TargetExit)
 
 ifeq ($(BUILD_HOTSPOT),true)
-hotspot: hotspot-only
-hotspot-only: start-make
+  hotspot: hotspot-only
+  hotspot-only: start-make
 	@$(call TargetEnter)
 	@($(CD) $(SRC_ROOT)/common/makefiles && $(BUILD_LOG_WRAPPER) $(MAKE) $(MAKE_ARGS) -f HotspotWrapper.gmk)
 	@$(call TargetExit)
@@ -149,9 +149,9 @@
 	@$(call TargetExit)
 
 profiles-oscheck:
-ifneq ($(OPENJDK_TARGET_OS), linux)
-	@echo "Error: The Java SE 8 Compact Profiles are only implemented for Linux at this time" && exit 1
-endif
+        ifneq ($(OPENJDK_TARGET_OS), linux)
+	  @echo "Error: The Java SE 8 Compact Profiles are only implemented for Linux at this time" && exit 1
+        endif
 
 install: images install-only
 install-only: start-make
@@ -202,12 +202,12 @@
 dist-clean: clean
 	@($(CD) $(OUTPUT_ROOT) && $(RM) -r *spec.gmk config.* configure-arguments Makefile compare.sh spec.sh tmp javacservers)
 	@$(if $(filter $(CONF_NAME),$(notdir $(OUTPUT_ROOT))), \
-    if test "x`$(LS) $(OUTPUT_ROOT)`" != x; then \
-        $(ECHO) "Warning: Not removing non-empty configuration directory for '$(CONF_NAME)'" ;\
-    else \
-        ($(CD) $(SRC_ROOT) && $(ECHO) "Removing configuration directory for '$(CONF_NAME)'" && $(RM) -r $(OUTPUT_ROOT)) \
-    fi \
-  )
+	  if test "x`$(LS) $(OUTPUT_ROOT)`" != x; then \
+	    $(ECHO) "Warning: Not removing non-empty configuration directory for '$(CONF_NAME)'" ; \
+	  else \
+	    ($(CD) $(SRC_ROOT) && $(ECHO) "Removing configuration directory for '$(CONF_NAME)'" && $(RM) -r $(OUTPUT_ROOT)) \
+	  fi \
+	)
 	@$(ECHO) Cleaned everything, you will have to re-run configure.
 
 clean-langtools:
diff --git a/common/makefiles/MakeBase.gmk b/common/makefiles/MakeBase.gmk
index d2bf4aa..519abac 100644
--- a/common/makefiles/MakeBase.gmk
+++ b/common/makefiles/MakeBase.gmk
@@ -48,314 +48,316 @@
 $(compress_post)
 
 decompress_paths=$(SED) -f $(SRC_ROOT)/common/makefiles/support/ListPathsSafely-uncompress.sed -e 's|X99|\\n|g' \
-		     -e 's|X98|$(OUTPUT_ROOT)|g' -e 's|X97|$(SRC_ROOT)|g' \
-		     -e 's|X00|X|g' | tr '\n' '$2'
+    -e 's|X98|$(OUTPUT_ROOT)|g' -e 's|X97|$(SRC_ROOT)|g' \
+    -e 's|X00|X|g' | tr '\n' '$2'
 
 define ListPathsSafely_If
-    $(if $(word $3,$($1)),$(eval $1_LPS$3:=$(call compress_paths,$(wordlist $3,$4,$($1)))))
+	$(if $(word $3,$($1)),$(eval $1_LPS$3:=$(call compress_paths,$(wordlist $3,$4,$($1)))))
 endef
 
 define ListPathsSafely_Printf
-    $(if $(strip $($1_LPS$4)),printf -- "$(strip $($1_LPS$4))\n" | $(decompress_paths) $3)
+	$(if $(strip $($1_LPS$4)),$(if $(findstring $(LOG_LEVEL),trace),,@)printf \
+	    -- "$(strip $($1_LPS$4))\n" | $(decompress_paths) $3)
 endef
 
 # Receipt example:
-#    rm -f thepaths
-#    $(call ListPathsSafely,THEPATHS,\n, >> thepaths)
-#    The \n argument means translate spaces into \n
-#    if instead , , (a space) is supplied, then spaces remain spaces.
+#   rm -f thepaths
+#   $(call ListPathsSafely,THEPATHS,\n, >> thepaths)
+# The \n argument means translate spaces into \n
+# if instead , , (a space) is supplied, then spaces remain spaces.
 define ListPathsSafely
-    $(if $(word 16001,$($1)),$(error Cannot list safely more than 16000 paths. $1 has $(words $($1)) paths!))
-    $(call ListPathsSafely_If,$1,$2,1,250)
-    $(call ListPathsSafely_If,$1,$2,251,500)
-    $(call ListPathsSafely_If,$1,$2,501,750)
-    $(call ListPathsSafely_If,$1,$2,751,1000)
+	$(if $(word 16001,$($1)),$(error Cannot list safely more than 16000 paths. $1 has $(words $($1)) paths!))
+	$(ECHO) $(LOG_DEBUG) Writing $(words $($1)) paths to '$3'
+	$(call ListPathsSafely_If,$1,$2,1,250)
+	$(call ListPathsSafely_If,$1,$2,251,500)
+	$(call ListPathsSafely_If,$1,$2,501,750)
+	$(call ListPathsSafely_If,$1,$2,751,1000)
 
-    $(call ListPathsSafely_If,$1,$2,1001,1250)
-    $(call ListPathsSafely_If,$1,$2,1251,1500)
-    $(call ListPathsSafely_If,$1,$2,1501,1750)
-    $(call ListPathsSafely_If,$1,$2,1751,2000)
+	$(call ListPathsSafely_If,$1,$2,1001,1250)
+	$(call ListPathsSafely_If,$1,$2,1251,1500)
+	$(call ListPathsSafely_If,$1,$2,1501,1750)
+	$(call ListPathsSafely_If,$1,$2,1751,2000)
 
-    $(call ListPathsSafely_If,$1,$2,2001,2250)
-    $(call ListPathsSafely_If,$1,$2,2251,2500)
-    $(call ListPathsSafely_If,$1,$2,2501,2750)
-    $(call ListPathsSafely_If,$1,$2,2751,3000)
+	$(call ListPathsSafely_If,$1,$2,2001,2250)
+	$(call ListPathsSafely_If,$1,$2,2251,2500)
+	$(call ListPathsSafely_If,$1,$2,2501,2750)
+	$(call ListPathsSafely_If,$1,$2,2751,3000)
 
-    $(call ListPathsSafely_If,$1,$2,3001,3250)
-    $(call ListPathsSafely_If,$1,$2,3251,3500)
-    $(call ListPathsSafely_If,$1,$2,3501,3750)
-    $(call ListPathsSafely_If,$1,$2,3751,4000)
+	$(call ListPathsSafely_If,$1,$2,3001,3250)
+	$(call ListPathsSafely_If,$1,$2,3251,3500)
+	$(call ListPathsSafely_If,$1,$2,3501,3750)
+	$(call ListPathsSafely_If,$1,$2,3751,4000)
 
-    $(call ListPathsSafely_If,$1,$2,4001,4250)
-    $(call ListPathsSafely_If,$1,$2,4251,4500)
-    $(call ListPathsSafely_If,$1,$2,4501,4750)
-    $(call ListPathsSafely_If,$1,$2,4751,5000)
+	$(call ListPathsSafely_If,$1,$2,4001,4250)
+	$(call ListPathsSafely_If,$1,$2,4251,4500)
+	$(call ListPathsSafely_If,$1,$2,4501,4750)
+	$(call ListPathsSafely_If,$1,$2,4751,5000)
 
-    $(call ListPathsSafely_If,$1,$2,5001,5250)
-    $(call ListPathsSafely_If,$1,$2,5251,5500)
-    $(call ListPathsSafely_If,$1,$2,5501,5750)
-    $(call ListPathsSafely_If,$1,$2,5751,6000)
+	$(call ListPathsSafely_If,$1,$2,5001,5250)
+	$(call ListPathsSafely_If,$1,$2,5251,5500)
+	$(call ListPathsSafely_If,$1,$2,5501,5750)
+	$(call ListPathsSafely_If,$1,$2,5751,6000)
 
-    $(call ListPathsSafely_If,$1,$2,6001,6250)
-    $(call ListPathsSafely_If,$1,$2,6251,6500)
-    $(call ListPathsSafely_If,$1,$2,6501,6750)
-    $(call ListPathsSafely_If,$1,$2,6751,7000)
+	$(call ListPathsSafely_If,$1,$2,6001,6250)
+	$(call ListPathsSafely_If,$1,$2,6251,6500)
+	$(call ListPathsSafely_If,$1,$2,6501,6750)
+	$(call ListPathsSafely_If,$1,$2,6751,7000)
 
-    $(call ListPathsSafely_If,$1,$2,7001,7250)
-    $(call ListPathsSafely_If,$1,$2,7251,7500)
-    $(call ListPathsSafely_If,$1,$2,7501,7750)
-    $(call ListPathsSafely_If,$1,$2,7751,8000)
+	$(call ListPathsSafely_If,$1,$2,7001,7250)
+	$(call ListPathsSafely_If,$1,$2,7251,7500)
+	$(call ListPathsSafely_If,$1,$2,7501,7750)
+	$(call ListPathsSafely_If,$1,$2,7751,8000)
 
-    $(call ListPathsSafely_If,$1,$2,8001,8250)
-    $(call ListPathsSafely_If,$1,$2,8251,8500)
-    $(call ListPathsSafely_If,$1,$2,8501,8750)
-    $(call ListPathsSafely_If,$1,$2,8751,9000)
+	$(call ListPathsSafely_If,$1,$2,8001,8250)
+	$(call ListPathsSafely_If,$1,$2,8251,8500)
+	$(call ListPathsSafely_If,$1,$2,8501,8750)
+	$(call ListPathsSafely_If,$1,$2,8751,9000)
 
-    $(call ListPathsSafely_If,$1,$2,9001,9250)
-    $(call ListPathsSafely_If,$1,$2,9251,9500)
-    $(call ListPathsSafely_If,$1,$2,9501,9750)
-    $(call ListPathsSafely_If,$1,$2,9751,10000)
+	$(call ListPathsSafely_If,$1,$2,9001,9250)
+	$(call ListPathsSafely_If,$1,$2,9251,9500)
+	$(call ListPathsSafely_If,$1,$2,9501,9750)
+	$(call ListPathsSafely_If,$1,$2,9751,10000)
 
-    $(call ListPathsSafely_If,$1,$2,10001,10250)
-    $(call ListPathsSafely_If,$1,$2,10251,10500)
-    $(call ListPathsSafely_If,$1,$2,10501,10750)
-    $(call ListPathsSafely_If,$1,$2,10751,11000)
+	$(call ListPathsSafely_If,$1,$2,10001,10250)
+	$(call ListPathsSafely_If,$1,$2,10251,10500)
+	$(call ListPathsSafely_If,$1,$2,10501,10750)
+	$(call ListPathsSafely_If,$1,$2,10751,11000)
 
-    $(call ListPathsSafely_If,$1,$2,11001,11250)
-    $(call ListPathsSafely_If,$1,$2,11251,11500)
-    $(call ListPathsSafely_If,$1,$2,11501,11750)
-    $(call ListPathsSafely_If,$1,$2,11751,12000)
+	$(call ListPathsSafely_If,$1,$2,11001,11250)
+	$(call ListPathsSafely_If,$1,$2,11251,11500)
+	$(call ListPathsSafely_If,$1,$2,11501,11750)
+	$(call ListPathsSafely_If,$1,$2,11751,12000)
 
-    $(call ListPathsSafely_If,$1,$2,12001,12250)
-    $(call ListPathsSafely_If,$1,$2,12251,12500)
-    $(call ListPathsSafely_If,$1,$2,12501,12750)
-    $(call ListPathsSafely_If,$1,$2,12751,13000)
+	$(call ListPathsSafely_If,$1,$2,12001,12250)
+	$(call ListPathsSafely_If,$1,$2,12251,12500)
+	$(call ListPathsSafely_If,$1,$2,12501,12750)
+	$(call ListPathsSafely_If,$1,$2,12751,13000)
 
-    $(call ListPathsSafely_If,$1,$2,13001,13250)
-    $(call ListPathsSafely_If,$1,$2,13251,13500)
-    $(call ListPathsSafely_If,$1,$2,13501,13750)
-    $(call ListPathsSafely_If,$1,$2,13751,14000)
+	$(call ListPathsSafely_If,$1,$2,13001,13250)
+	$(call ListPathsSafely_If,$1,$2,13251,13500)
+	$(call ListPathsSafely_If,$1,$2,13501,13750)
+	$(call ListPathsSafely_If,$1,$2,13751,14000)
 
-    $(call ListPathsSafely_If,$1,$2,14001,14250)
-    $(call ListPathsSafely_If,$1,$2,14251,14500)
-    $(call ListPathsSafely_If,$1,$2,14501,14750)
-    $(call ListPathsSafely_If,$1,$2,14751,15000)
+	$(call ListPathsSafely_If,$1,$2,14001,14250)
+	$(call ListPathsSafely_If,$1,$2,14251,14500)
+	$(call ListPathsSafely_If,$1,$2,14501,14750)
+	$(call ListPathsSafely_If,$1,$2,14751,15000)
 
-    $(call ListPathsSafely_If,$1,$2,15001,15250)
-    $(call ListPathsSafely_If,$1,$2,15251,15500)
-    $(call ListPathsSafely_If,$1,$2,15501,15750)
-    $(call ListPathsSafely_If,$1,$2,15751,16000)
+	$(call ListPathsSafely_If,$1,$2,15001,15250)
+	$(call ListPathsSafely_If,$1,$2,15251,15500)
+	$(call ListPathsSafely_If,$1,$2,15501,15750)
+	$(call ListPathsSafely_If,$1,$2,15751,16000)
 
-    $(call ListPathsSafely_Printf,$1,$2,$3,1)
-    $(call ListPathsSafely_Printf,$1,$2,$3,251)
-    $(call ListPathsSafely_Printf,$1,$2,$3,501)
-    $(call ListPathsSafely_Printf,$1,$2,$3,751)
+	$(call ListPathsSafely_Printf,$1,$2,$3,1)
+	$(call ListPathsSafely_Printf,$1,$2,$3,251)
+	$(call ListPathsSafely_Printf,$1,$2,$3,501)
+	$(call ListPathsSafely_Printf,$1,$2,$3,751)
 
-    $(call ListPathsSafely_Printf,$1,$2,$3,1001)
-    $(call ListPathsSafely_Printf,$1,$2,$3,1251)
-    $(call ListPathsSafely_Printf,$1,$2,$3,1501)
-    $(call ListPathsSafely_Printf,$1,$2,$3,1751)
+	$(call ListPathsSafely_Printf,$1,$2,$3,1001)
+	$(call ListPathsSafely_Printf,$1,$2,$3,1251)
+	$(call ListPathsSafely_Printf,$1,$2,$3,1501)
+	$(call ListPathsSafely_Printf,$1,$2,$3,1751)
 
-    $(call ListPathsSafely_Printf,$1,$2,$3,2001)
-    $(call ListPathsSafely_Printf,$1,$2,$3,2251)
-    $(call ListPathsSafely_Printf,$1,$2,$3,2501)
-    $(call ListPathsSafely_Printf,$1,$2,$3,2751)
+	$(call ListPathsSafely_Printf,$1,$2,$3,2001)
+	$(call ListPathsSafely_Printf,$1,$2,$3,2251)
+	$(call ListPathsSafely_Printf,$1,$2,$3,2501)
+	$(call ListPathsSafely_Printf,$1,$2,$3,2751)
 
-    $(call ListPathsSafely_Printf,$1,$2,$3,3001)
-    $(call ListPathsSafely_Printf,$1,$2,$3,3251)
-    $(call ListPathsSafely_Printf,$1,$2,$3,3501)
-    $(call ListPathsSafely_Printf,$1,$2,$3,3751)
+	$(call ListPathsSafely_Printf,$1,$2,$3,3001)
+	$(call ListPathsSafely_Printf,$1,$2,$3,3251)
+	$(call ListPathsSafely_Printf,$1,$2,$3,3501)
+	$(call ListPathsSafely_Printf,$1,$2,$3,3751)
 
-    $(call ListPathsSafely_Printf,$1,$2,$3,4001)
-    $(call ListPathsSafely_Printf,$1,$2,$3,4251)
-    $(call ListPathsSafely_Printf,$1,$2,$3,4501)
-    $(call ListPathsSafely_Printf,$1,$2,$3,4751)
+	$(call ListPathsSafely_Printf,$1,$2,$3,4001)
+	$(call ListPathsSafely_Printf,$1,$2,$3,4251)
+	$(call ListPathsSafely_Printf,$1,$2,$3,4501)
+	$(call ListPathsSafely_Printf,$1,$2,$3,4751)
 
-    $(call ListPathsSafely_Printf,$1,$2,$3,5001)
-    $(call ListPathsSafely_Printf,$1,$2,$3,5251)
-    $(call ListPathsSafely_Printf,$1,$2,$3,5501)
-    $(call ListPathsSafely_Printf,$1,$2,$3,5751)
+	$(call ListPathsSafely_Printf,$1,$2,$3,5001)
+	$(call ListPathsSafely_Printf,$1,$2,$3,5251)
+	$(call ListPathsSafely_Printf,$1,$2,$3,5501)
+	$(call ListPathsSafely_Printf,$1,$2,$3,5751)
 
-    $(call ListPathsSafely_Printf,$1,$2,$3,6001)
-    $(call ListPathsSafely_Printf,$1,$2,$3,6251)
-    $(call ListPathsSafely_Printf,$1,$2,$3,6501)
-    $(call ListPathsSafely_Printf,$1,$2,$3,6751)
+	$(call ListPathsSafely_Printf,$1,$2,$3,6001)
+	$(call ListPathsSafely_Printf,$1,$2,$3,6251)
+	$(call ListPathsSafely_Printf,$1,$2,$3,6501)
+	$(call ListPathsSafely_Printf,$1,$2,$3,6751)
 
-    $(call ListPathsSafely_Printf,$1,$2,$3,7001)
-    $(call ListPathsSafely_Printf,$1,$2,$3,7251)
-    $(call ListPathsSafely_Printf,$1,$2,$3,7501)
-    $(call ListPathsSafely_Printf,$1,$2,$3,7751)
+	$(call ListPathsSafely_Printf,$1,$2,$3,7001)
+	$(call ListPathsSafely_Printf,$1,$2,$3,7251)
+	$(call ListPathsSafely_Printf,$1,$2,$3,7501)
+	$(call ListPathsSafely_Printf,$1,$2,$3,7751)
 
-    $(call ListPathsSafely_Printf,$1,$2,$3,8001)
-    $(call ListPathsSafely_Printf,$1,$2,$3,8251)
-    $(call ListPathsSafely_Printf,$1,$2,$3,8501)
-    $(call ListPathsSafely_Printf,$1,$2,$3,8751)
+	$(call ListPathsSafely_Printf,$1,$2,$3,8001)
+	$(call ListPathsSafely_Printf,$1,$2,$3,8251)
+	$(call ListPathsSafely_Printf,$1,$2,$3,8501)
+	$(call ListPathsSafely_Printf,$1,$2,$3,8751)
 
-    $(call ListPathsSafely_Printf,$1,$2,$3,9001)
-    $(call ListPathsSafely_Printf,$1,$2,$3,9251)
-    $(call ListPathsSafely_Printf,$1,$2,$3,9501)
-    $(call ListPathsSafely_Printf,$1,$2,$3,9751)
+	$(call ListPathsSafely_Printf,$1,$2,$3,9001)
+	$(call ListPathsSafely_Printf,$1,$2,$3,9251)
+	$(call ListPathsSafely_Printf,$1,$2,$3,9501)
+	$(call ListPathsSafely_Printf,$1,$2,$3,9751)
 
-    $(call ListPathsSafely_Printf,$1,$2,$3,10001)
-    $(call ListPathsSafely_Printf,$1,$2,$3,10251)
-    $(call ListPathsSafely_Printf,$1,$2,$3,10501)
-    $(call ListPathsSafely_Printf,$1,$2,$3,10751)
+	$(call ListPathsSafely_Printf,$1,$2,$3,10001)
+	$(call ListPathsSafely_Printf,$1,$2,$3,10251)
+	$(call ListPathsSafely_Printf,$1,$2,$3,10501)
+	$(call ListPathsSafely_Printf,$1,$2,$3,10751)
 
-    $(call ListPathsSafely_Printf,$1,$2,$3,11001)
-    $(call ListPathsSafely_Printf,$1,$2,$3,11251)
-    $(call ListPathsSafely_Printf,$1,$2,$3,11501)
-    $(call ListPathsSafely_Printf,$1,$2,$3,11751)
+	$(call ListPathsSafely_Printf,$1,$2,$3,11001)
+	$(call ListPathsSafely_Printf,$1,$2,$3,11251)
+	$(call ListPathsSafely_Printf,$1,$2,$3,11501)
+	$(call ListPathsSafely_Printf,$1,$2,$3,11751)
 
-    $(call ListPathsSafely_Printf,$1,$2,$3,12001)
-    $(call ListPathsSafely_Printf,$1,$2,$3,12251)
-    $(call ListPathsSafely_Printf,$1,$2,$3,12501)
-    $(call ListPathsSafely_Printf,$1,$2,$3,12751)
+	$(call ListPathsSafely_Printf,$1,$2,$3,12001)
+	$(call ListPathsSafely_Printf,$1,$2,$3,12251)
+	$(call ListPathsSafely_Printf,$1,$2,$3,12501)
+	$(call ListPathsSafely_Printf,$1,$2,$3,12751)
 
-    $(call ListPathsSafely_Printf,$1,$2,$3,13001)
-    $(call ListPathsSafely_Printf,$1,$2,$3,13251)
-    $(call ListPathsSafely_Printf,$1,$2,$3,13501)
-    $(call ListPathsSafely_Printf,$1,$2,$3,13751)
+	$(call ListPathsSafely_Printf,$1,$2,$3,13001)
+	$(call ListPathsSafely_Printf,$1,$2,$3,13251)
+	$(call ListPathsSafely_Printf,$1,$2,$3,13501)
+	$(call ListPathsSafely_Printf,$1,$2,$3,13751)
 
-    $(call ListPathsSafely_Printf,$1,$2,$3,14001)
-    $(call ListPathsSafely_Printf,$1,$2,$3,14251)
-    $(call ListPathsSafely_Printf,$1,$2,$3,14501)
-    $(call ListPathsSafely_Printf,$1,$2,$3,14751)
+	$(call ListPathsSafely_Printf,$1,$2,$3,14001)
+	$(call ListPathsSafely_Printf,$1,$2,$3,14251)
+	$(call ListPathsSafely_Printf,$1,$2,$3,14501)
+	$(call ListPathsSafely_Printf,$1,$2,$3,14751)
 
-    $(call ListPathsSafely_Printf,$1,$2,$3,15001)
-    $(call ListPathsSafely_Printf,$1,$2,$3,15251)
-    $(call ListPathsSafely_Printf,$1,$2,$3,15501)
-    $(call ListPathsSafely_Printf,$1,$2,$3,15751)
+	$(call ListPathsSafely_Printf,$1,$2,$3,15001)
+	$(call ListPathsSafely_Printf,$1,$2,$3,15251)
+	$(call ListPathsSafely_Printf,$1,$2,$3,15501)
+	$(call ListPathsSafely_Printf,$1,$2,$3,15751)
 endef
 
 define ListPathsSafelyNow_IfPrintf
-    ifneq (,$$(word $4,$$($1)))
-        $$(eval $1_LPS$4:=$$(call compress_paths,$$(wordlist $4,$5,$$($1))))
-        $$(shell printf -- "$$(strip $$($1_LPS$4))\n" | $(decompress_paths) $3)
-    endif
+  ifneq (,$$(word $4,$$($1)))
+    $$(eval $1_LPS$4:=$$(call compress_paths,$$(wordlist $4,$5,$$($1))))
+    $$(shell printf -- "$$(strip $$($1_LPS$4))\n" | $(decompress_paths) $3)
+  endif
 endef
 
 # And an non-receipt version:
 define ListPathsSafelyNow
-    ifneq (,$$(word 10001,$$($1)))
-        $$(error Cannot list safely more than 10000 paths. $1 has $$(words $$($1)) paths!)
-    endif
-    $(call ListPathsSafelyNow_IfPrintf,$1,$2,$3,1,250)
-    $(call ListPathsSafelyNow_IfPrintf,$1,$2,$3,251,500)
-    $(call ListPathsSafelyNow_IfPrintf,$1,$2,$3,501,750)
-    $(call ListPathsSafelyNow_IfPrintf,$1,$2,$3,751,1000)
+  ifneq (,$$(word 10001,$$($1)))
+    $$(error Cannot list safely more than 10000 paths. $1 has $$(words $$($1)) paths!)
+  endif
+  $(call ListPathsSafelyNow_IfPrintf,$1,$2,$3,1,250)
+  $(call ListPathsSafelyNow_IfPrintf,$1,$2,$3,251,500)
+  $(call ListPathsSafelyNow_IfPrintf,$1,$2,$3,501,750)
+  $(call ListPathsSafelyNow_IfPrintf,$1,$2,$3,751,1000)
 
-    $(call ListPathsSafelyNow_IfPrintf,$1,$2,$3,1001,1250)
-    $(call ListPathsSafelyNow_IfPrintf,$1,$2,$3,1251,1500)
-    $(call ListPathsSafelyNow_IfPrintf,$1,$2,$3,1501,1750)
-    $(call ListPathsSafelyNow_IfPrintf,$1,$2,$3,1751,2000)
+  $(call ListPathsSafelyNow_IfPrintf,$1,$2,$3,1001,1250)
+  $(call ListPathsSafelyNow_IfPrintf,$1,$2,$3,1251,1500)
+  $(call ListPathsSafelyNow_IfPrintf,$1,$2,$3,1501,1750)
+  $(call ListPathsSafelyNow_IfPrintf,$1,$2,$3,1751,2000)
 
-    $(call ListPathsSafelyNow_IfPrintf,$1,$2,$3,2001,2250)
-    $(call ListPathsSafelyNow_IfPrintf,$1,$2,$3,2251,2500)
-    $(call ListPathsSafelyNow_IfPrintf,$1,$2,$3,2501,2750)
-    $(call ListPathsSafelyNow_IfPrintf,$1,$2,$3,2751,3000)
+  $(call ListPathsSafelyNow_IfPrintf,$1,$2,$3,2001,2250)
+  $(call ListPathsSafelyNow_IfPrintf,$1,$2,$3,2251,2500)
+  $(call ListPathsSafelyNow_IfPrintf,$1,$2,$3,2501,2750)
+  $(call ListPathsSafelyNow_IfPrintf,$1,$2,$3,2751,3000)
 
-    $(call ListPathsSafelyNow_IfPrintf,$1,$2,$3,3001,3250)
-    $(call ListPathsSafelyNow_IfPrintf,$1,$2,$3,3251,3500)
-    $(call ListPathsSafelyNow_IfPrintf,$1,$2,$3,3501,3750)
-    $(call ListPathsSafelyNow_IfPrintf,$1,$2,$3,3751,4000)
+  $(call ListPathsSafelyNow_IfPrintf,$1,$2,$3,3001,3250)
+  $(call ListPathsSafelyNow_IfPrintf,$1,$2,$3,3251,3500)
+  $(call ListPathsSafelyNow_IfPrintf,$1,$2,$3,3501,3750)
+  $(call ListPathsSafelyNow_IfPrintf,$1,$2,$3,3751,4000)
 
-    $(call ListPathsSafelyNow_IfPrintf,$1,$2,$3,4001,4250)
-    $(call ListPathsSafelyNow_IfPrintf,$1,$2,$3,4251,4500)
-    $(call ListPathsSafelyNow_IfPrintf,$1,$2,$3,4501,4750)
-    $(call ListPathsSafelyNow_IfPrintf,$1,$2,$3,4751,5000)
+  $(call ListPathsSafelyNow_IfPrintf,$1,$2,$3,4001,4250)
+  $(call ListPathsSafelyNow_IfPrintf,$1,$2,$3,4251,4500)
+  $(call ListPathsSafelyNow_IfPrintf,$1,$2,$3,4501,4750)
+  $(call ListPathsSafelyNow_IfPrintf,$1,$2,$3,4751,5000)
 
-    $(call ListPathsSafelyNow_IfPrintf,$1,$2,$3,5001,5250)
-    $(call ListPathsSafelyNow_IfPrintf,$1,$2,$3,5251,5500)
-    $(call ListPathsSafelyNow_IfPrintf,$1,$2,$3,5501,5750)
-    $(call ListPathsSafelyNow_IfPrintf,$1,$2,$3,5751,6000)
+  $(call ListPathsSafelyNow_IfPrintf,$1,$2,$3,5001,5250)
+  $(call ListPathsSafelyNow_IfPrintf,$1,$2,$3,5251,5500)
+  $(call ListPathsSafelyNow_IfPrintf,$1,$2,$3,5501,5750)
+  $(call ListPathsSafelyNow_IfPrintf,$1,$2,$3,5751,6000)
 
-    $(call ListPathsSafelyNow_IfPrintf,$1,$2,$3,6001,6250)
-    $(call ListPathsSafelyNow_IfPrintf,$1,$2,$3,6251,6500)
-    $(call ListPathsSafelyNow_IfPrintf,$1,$2,$3,6501,6750)
-    $(call ListPathsSafelyNow_IfPrintf,$1,$2,$3,6751,7000)
+  $(call ListPathsSafelyNow_IfPrintf,$1,$2,$3,6001,6250)
+  $(call ListPathsSafelyNow_IfPrintf,$1,$2,$3,6251,6500)
+  $(call ListPathsSafelyNow_IfPrintf,$1,$2,$3,6501,6750)
+  $(call ListPathsSafelyNow_IfPrintf,$1,$2,$3,6751,7000)
 
-    $(call ListPathsSafelyNow_IfPrintf,$1,$2,$3,7001,7250)
-    $(call ListPathsSafelyNow_IfPrintf,$1,$2,$3,7251,7500)
-    $(call ListPathsSafelyNow_IfPrintf,$1,$2,$3,7501,7750)
-    $(call ListPathsSafelyNow_IfPrintf,$1,$2,$3,7751,8000)
+  $(call ListPathsSafelyNow_IfPrintf,$1,$2,$3,7001,7250)
+  $(call ListPathsSafelyNow_IfPrintf,$1,$2,$3,7251,7500)
+  $(call ListPathsSafelyNow_IfPrintf,$1,$2,$3,7501,7750)
+  $(call ListPathsSafelyNow_IfPrintf,$1,$2,$3,7751,8000)
 
-    $(call ListPathsSafelyNow_IfPrintf,$1,$2,$3,8001,8250)
-    $(call ListPathsSafelyNow_IfPrintf,$1,$2,$3,8251,8500)
-    $(call ListPathsSafelyNow_IfPrintf,$1,$2,$3,8501,8750)
-    $(call ListPathsSafelyNow_IfPrintf,$1,$2,$3,8751,9000)
+  $(call ListPathsSafelyNow_IfPrintf,$1,$2,$3,8001,8250)
+  $(call ListPathsSafelyNow_IfPrintf,$1,$2,$3,8251,8500)
+  $(call ListPathsSafelyNow_IfPrintf,$1,$2,$3,8501,8750)
+  $(call ListPathsSafelyNow_IfPrintf,$1,$2,$3,8751,9000)
 
-    $(call ListPathsSafelyNow_IfPrintf,$1,$2,$3,9001,9250)
-    $(call ListPathsSafelyNow_IfPrintf,$1,$2,$3,9251,9500)
-    $(call ListPathsSafelyNow_IfPrintf,$1,$2,$3,9501,9750)
-    $(call ListPathsSafelyNow_IfPrintf,$1,$2,$3,9751,10000)
+  $(call ListPathsSafelyNow_IfPrintf,$1,$2,$3,9001,9250)
+  $(call ListPathsSafelyNow_IfPrintf,$1,$2,$3,9251,9500)
+  $(call ListPathsSafelyNow_IfPrintf,$1,$2,$3,9501,9750)
+  $(call ListPathsSafelyNow_IfPrintf,$1,$2,$3,9751,10000)
 
 endef
 
 # The source tips can come from the Mercurial repository, or in the files
-#   $(HGTIP_FILENAME) which contains the tip but is also positioned in the same
-#   directory as the original $(HGDIR) directory.
-#   These should not be := assignments, only used from the root Makefile.
+# $(HGTIP_FILENAME) which contains the tip but is also positioned in the same
+# directory as the original $(HGDIR) directory.
+# These should not be := assignments, only used from the root Makefile.
 HG_VERSION = $(shell $(HG) version 2> /dev/null)
 HG_DIRECTORY=.hg
 HGTIP_FILENAME=.hgtip
 HG_SEARCH = ./REPO ./*/REPO ./*/*/REPO ./*/*/*/REPO
 REPO_LIST = $(patsubst ./%,%,$(patsubst %/,%,$(sort $(dir \
     $(shell $(CD) $(SRC_ROOT) ; ( $(LS) -d $(HG_SEARCH:%/REPO=%/$(HG_DIRECTORY)) ; \
-                                   $(LS)    $(HG_SEARCH:%/REPO=%/$(HGTIP_FILENAME)) ) \
-	        2> /dev/null)))))
+        $(LS) $(HG_SEARCH:%/REPO=%/$(HGTIP_FILENAME)) ) \
+        2> /dev/null)))))
 
 # Emit the repo:tip pairs to $@
 define GetSourceTips
-$(CD) $(SRC_ROOT) ; \
-for i in $(REPO_LIST) IGNORE ; do \
-  if [ "$${i}" = "IGNORE" ] ; then \
-    continue; \
-  elif [ -d $${i}/$(HG_DIRECTORY) -a "$(HG_VERSION)" != "" ] ; then \
-    $(PRINTF) " %s:%s" \
-      "$${i}" `$(HG) tip --repository $${i} --template '{node|short}\n'` ; \
-  elif [ -f $${i}/$(HGTIP_FILENAME) ] ; then \
-    $(PRINTF) " %s:%s" \
-      "$${i}" `$(CAT) $${i}/$(HGTIP_FILENAME)` ; \
-  fi; \
-done >> $@
-$(PRINTF) "\n" >> $@
+	$(CD) $(SRC_ROOT) ; \
+	for i in $(REPO_LIST) IGNORE ; do \
+	  if [ "$${i}" = "IGNORE" ] ; then \
+	    continue; \
+	  elif [ -d $${i}/$(HG_DIRECTORY) -a "$(HG_VERSION)" != "" ] ; then \
+	    $(PRINTF) " %s:%s" \
+	        "$${i}" `$(HG) tip --repository $${i} --template '{node|short}\n'` ; \
+	  elif [ -f $${i}/$(HGTIP_FILENAME) ] ; then \
+	    $(PRINTF) " %s:%s" \
+	        "$${i}" `$(CAT) $${i}/$(HGTIP_FILENAME)` ; \
+	  fi; \
+	done >> $@
+	$(PRINTF) "\n" >> $@
 endef
 
 # Create the HGTIP_FILENAME file. Called from jdk/make/closed/bundles.gmk
 define CreateHgTip
-$(HG) tip --repository $1 --template '{node|short}\n' > $1/$(HGTIP_FILENAME);\
-$(ECHO) $1/$(HGTIP_FILENAME)
+	$(HG) tip --repository $1 --template '{node|short}\n' > $1/$(HGTIP_FILENAME); \
+	$(ECHO) $1/$(HGTIP_FILENAME)
 endef
 
 define SetupLogging
-    ifeq ($$(LOG_LEVEL),trace)
-        # Shell redefinition trick inspired by http://www.cmcrossroads.com/ask-mr-make/6535-tracing-rule-execution-in-gnu-make
-        # For each target executed, will print
-        # Building <TARGET> (from <FIRST PREREQUISITE>) (<ALL NEWER PREREQUISITES> newer)
-        # but with a limit of 20 on <ALL NEWER PREREQUISITES>, to avoid cluttering logs too much 
-        # (and causing a crash on Cygwin).
-        # Default shell seems to always be /bin/sh. Must override with bash to get this to work on Solaris.
-        # Only use time if it's GNU time which supports format and output file.
-        WRAPPER_SHELL:=/bin/bash $$(SRC_ROOT)/common/bin/shell-tracer.sh $$(if $$(findstring yes,$$(IS_GNU_TIME)),$$(TIME),-) $$(OUTPUT_ROOT)/build-trace-time.log /bin/bash
-        SHELL=$$(warning $$(if $$@,Building $$@,Running shell command) $$(if $$<, (from $$<))$$(if $$?, ($$(wordlist 1, 20, $$?) $$(if $$(wordlist 21, 22, $$?), ... [in total $$(words $$?) files]) newer)))$$(WRAPPER_SHELL)
-    endif
-    # Never remove warning messages; this is just for completeness
-    LOG_WARN= 
-    ifneq ($$(findstring $$(LOG_LEVEL),info debug trace),)
-        LOG_INFO=
-    else
-        LOG_INFO=> /dev/null
-    endif
-    ifneq ($$(findstring $$(LOG_LEVEL),debug trace),)
-        LOG_DEBUG=
-    else
-        LOG_DEBUG=> /dev/null
-    endif
-    ifneq ($$(findstring $$(LOG_LEVEL),trace),)
-        LOG_TRACE=
-    else
-        LOG_TRACE=> /dev/null
-    endif
+  ifeq ($$(LOG_LEVEL),trace)
+    # Shell redefinition trick inspired by http://www.cmcrossroads.com/ask-mr-make/6535-tracing-rule-execution-in-gnu-make
+    # For each target executed, will print
+    # Building <TARGET> (from <FIRST PREREQUISITE>) (<ALL NEWER PREREQUISITES> newer)
+    # but with a limit of 20 on <ALL NEWER PREREQUISITES>, to avoid cluttering logs too much
+    # (and causing a crash on Cygwin).
+    # Default shell seems to always be /bin/sh. Must override with bash to get this to work on Solaris.
+    # Only use time if it's GNU time which supports format and output file.
+    WRAPPER_SHELL:=/bin/bash $$(SRC_ROOT)/common/bin/shell-tracer.sh $$(if $$(findstring yes,$$(IS_GNU_TIME)),$$(TIME),-) $$(OUTPUT_ROOT)/build-trace-time.log /bin/bash
+    SHELL=$$(warning $$(if $$@,Building $$@,Running shell command) $$(if $$<, (from $$<))$$(if $$?, ($$(wordlist 1, 20, $$?) $$(if $$(wordlist 21, 22, $$?), ... [in total $$(words $$?) files]) newer)))$$(WRAPPER_SHELL)
+  endif
+  # Never remove warning messages; this is just for completeness
+  LOG_WARN=
+  ifneq ($$(findstring $$(LOG_LEVEL),info debug trace),)
+    LOG_INFO=
+  else
+    LOG_INFO=> /dev/null
+  endif
+  ifneq ($$(findstring $$(LOG_LEVEL),debug trace),)
+    LOG_DEBUG=
+  else
+    LOG_DEBUG=> /dev/null
+  endif
+  ifneq ($$(findstring $$(LOG_LEVEL),trace),)
+    LOG_TRACE=
+  else
+    LOG_TRACE=> /dev/null
+  endif
 endef
 
 # Make sure logging is setup for everyone that includes MakeBase.gmk.
@@ -363,43 +365,43 @@
 
 # This is to be called by all SetupFoo macros
 define LogSetupMacroEntry
-    $(if $(27),$(error Internal makefile error: Too many arguments to LogSetupMacroEntry, please update MakeBase.gmk))
-    $(if $(findstring $(LOG_LEVEL),debug trace), $(info $1 $(foreach i,2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26,$(if $($i),$(NEWLINE) $(strip [$i] $($i))))))
+  $(if $(27),$(error Internal makefile error: Too many arguments to LogSetupMacroEntry, please update MakeBase.gmk))
+  $(if $(findstring $(LOG_LEVEL),debug trace), $(info $1 $(foreach i,2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26,$(if $($i),$(NEWLINE) $(strip [$i] $($i))))))
 endef
 
 # Make directory without forking mkdir if not needed
 define MakeDir
-    ifneq ($$(wildcard $1 $2 $3 $4 $5 $6 $7 $8 $9),$$(strip $1 $2 $3 $4 $5 $6 $7 $8 $9))
-        $$(shell $(MKDIR) -p $1 $2 $3 $4 $5 $6 $7 $8 $9)
-    endif
+  ifneq ($$(wildcard $1 $2 $3 $4 $5 $6 $7 $8 $9),$$(strip $1 $2 $3 $4 $5 $6 $7 $8 $9))
+    $$(shell $(MKDIR) -p $1 $2 $3 $4 $5 $6 $7 $8 $9)
+  endif
 endef
 
 ifeq ($(OPENJDK_TARGET_OS),solaris)
-# On Solaris, if the target is a symlink and exists, cp won't overwrite.
-# Cp has to operate in recursive mode to allow for -P flag, to preserve soft links. If the
-# name of the target file differs from the source file, rename after copy.
-define install-file
+  # On Solaris, if the target is a symlink and exists, cp won't overwrite.
+  # Cp has to operate in recursive mode to allow for -P flag, to preserve soft links. If the
+  # name of the target file differs from the source file, rename after copy.
+  define install-file
 	$(MKDIR) -p $(@D)
 	$(RM) '$@'
 	$(CP) -f -r -P '$<' '$(@D)'
 	if [ "$(@F)" != "$(<F)" ]; then $(MV) '$(@D)/$(<F)' '$@'; fi
-endef
+  endef
 else ifeq ($(OPENJDK_TARGET_OS),macosx)
-# On mac, extended attributes sometimes creep into the source files, which may later 
-# cause the creation of ._* files which confuses testing. Clear these with xattr if
-# set. Some files get their write permissions removed after being copied to the 
-# output dir. When these are copied again to images, xattr would fail. By only clearing
-# attributes when they are present, failing on this is avoided.
-define install-file
+  # On mac, extended attributes sometimes creep into the source files, which may later
+  # cause the creation of ._* files which confuses testing. Clear these with xattr if
+  # set. Some files get their write permissions removed after being copied to the
+  # output dir. When these are copied again to images, xattr would fail. By only clearing
+  # attributes when they are present, failing on this is avoided.
+  define install-file
 	$(MKDIR) -p $(@D)
 	$(CP) -fRP '$<' '$@'
 	if [ -n "`$(XATTR) -l '$@'`" ]; then $(XATTR) -c '$@'; fi
-endef
+  endef
 else
-define install-file
+  define install-file
 	$(MKDIR) -p $(@D)
 	$(CP) -fP '$<' '$@'
-endef
+  endef
 endif
 
 # Convenience functions for working around make's limitations with $(filter ).
@@ -409,25 +411,25 @@
 ################################################################################
 # In Cygwin, finds are very costly, both because of expensive forks and because
 # of bad file system caching. Find is used extensively in $(shell) commands to
-# find source files. This makes rerunning make with no or few changes rather 
+# find source files. This makes rerunning make with no or few changes rather
 # expensive. To speed this up, these two macros are used to cache the results
 # of simple find commands for reuse.
-# 
+#
 # Runs a find and stores both the directories where it was run and the results.
 # This macro can be called multiple times to add to the cache. Only finds files
 # with no filters.
 #
 # Needs to be called with $(eval )
-# 
+#
 # Param 1 - Dir to find in
 ifeq ($(OPENJDK_BUILD_OS),windows)
-define FillCacheFind
+  define FillCacheFind
     FIND_CACHE_DIR += $1
     FIND_CACHE := $$(sort $$(FIND_CACHE) $$(shell $(FIND) $1 -type f -o -type l))
-endef
+  endef
 else
-define FillCacheFind
-endef
+  define FillCacheFind
+  endef
 endif
 
 # Mimics find by looking in the cache if all of the directories have been cached.
@@ -437,9 +439,9 @@
 # The extra - is needed when FIND_CACHE_DIR is empty but should be harmless.
 # Param 1 - Dirs to find in
 define CacheFind
-    $(if $(filter-out $(addsuffix %,- $(FIND_CACHE_DIR)),$1),\
-        $(shell $(FIND) $1 -type f -o -type l),\
-        $(filter $(addsuffix %,$1),$(FIND_CACHE)))
+  $(if $(filter-out $(addsuffix %,- $(FIND_CACHE_DIR)),$1), \
+    $(shell $(FIND) $1 -type f -o -type l), \
+    $(filter $(addsuffix %,$1),$(FIND_CACHE)))
 endef
 
 ################################################################################
diff --git a/common/makefiles/MakeHelpers.gmk b/common/makefiles/MakeHelpers.gmk
index aa49532..63223ee 100644
--- a/common/makefiles/MakeHelpers.gmk
+++ b/common/makefiles/MakeHelpers.gmk
@@ -26,7 +26,7 @@
 ################################################################
 #
 # This file contains helper functions for the top-level Makefile that does
-# not depend on the spec.gmk file having been read. (The purpose of this 
+# not depend on the spec.gmk file having been read. (The purpose of this
 # file is ju to avoid cluttering the top-level Makefile.)
 #
 ################################################################
@@ -49,7 +49,7 @@
 BUILDTIMESDIR=$(OUTPUT_ROOT)/tmp/buildtimes
 
 # Global targets are possible to run either with or without a SPEC. The prototypical
-# global target is "help". 
+# global target is "help".
 global_targets=help jprt% bridgeBuild
 
 ##############################
@@ -57,55 +57,55 @@
 ##############################
 
 define CheckEnvironment
-    # Find all environment or command line variables that begin with ALT.
-    $(if $(list_alt_overrides),
-        @$(PRINTF) "\nWARNING: You have the following ALT_ variables set:\n"
-    @$(PRINTF) "$(foreach var,$(list_alt_overrides),$(var)=$$$(var))\n"
-    @$(PRINTF) "ALT_ variables are deprecated and will be ignored. Please clean your environment.\n\n"
-    )
+        # Find all environment or command line variables that begin with ALT.
+	$(if $(list_alt_overrides),
+	  @$(PRINTF) "\nWARNING: You have the following ALT_ variables set:\n"
+	  @$(PRINTF) "$(foreach var,$(list_alt_overrides),$(var)=$$$(var))\n"
+	  @$(PRINTF) "ALT_ variables are deprecated and will be ignored. Please clean your environment.\n\n"
+	)
 endef
 
 ### Functions for timers
 
 # Record starting time for build of a sub repository.
 define RecordStartTime
-    $(MKDIR) -p $(BUILDTIMESDIR)
-    $(DATE) '+%Y %m %d %H %M %S' | $(NAWK) '{ print $$1,$$2,$$3,$$4,$$5,$$6,($$4*3600+$$5*60+$$6) }' > $(BUILDTIMESDIR)/build_time_start_$1
-    $(DATE) '+%Y-%m-%d %H:%M:%S' > $(BUILDTIMESDIR)/build_time_start_$1_human_readable
+	$(MKDIR) -p $(BUILDTIMESDIR)
+	$(DATE) '+%Y %m %d %H %M %S' | $(NAWK) '{ print $$1,$$2,$$3,$$4,$$5,$$6,($$4*3600+$$5*60+$$6) }' > $(BUILDTIMESDIR)/build_time_start_$1
+	$(DATE) '+%Y-%m-%d %H:%M:%S' > $(BUILDTIMESDIR)/build_time_start_$1_human_readable
 endef
 
 # Record ending time and calculate the difference and store it in a
 # easy to read format. Handles builds that cross midnight. Expects
-# that a build will never take 24 hours or more. 
+# that a build will never take 24 hours or more.
 define RecordEndTime
-    $(DATE) '+%Y %m %d %H %M %S' | $(NAWK) '{ print $$1,$$2,$$3,$$4,$$5,$$6,($$4*3600+$$5*60+$$6) }' > $(BUILDTIMESDIR)/build_time_end_$1
-    $(DATE) '+%Y-%m-%d %H:%M:%S' > $(BUILDTIMESDIR)/build_time_end_$1_human_readable
-    $(ECHO) `$(CAT) $(BUILDTIMESDIR)/build_time_start_$1` `$(CAT) $(BUILDTIMESDIR)/build_time_end_$1` $1 | \
-        $(NAWK) '{ F=$$7; T=$$14; if (F > T) { T+=3600*24 }; D=T-F; H=int(D/3600); \
-        M=int((D-H*3600)/60); S=D-H*3600-M*60; printf("%02d:%02d:%02d %s\n",H,M,S,$$15); }' \
-        > $(BUILDTIMESDIR)/build_time_diff_$1
+	$(DATE) '+%Y %m %d %H %M %S' | $(NAWK) '{ print $$1,$$2,$$3,$$4,$$5,$$6,($$4*3600+$$5*60+$$6) }' > $(BUILDTIMESDIR)/build_time_end_$1
+	$(DATE) '+%Y-%m-%d %H:%M:%S' > $(BUILDTIMESDIR)/build_time_end_$1_human_readable
+	$(ECHO) `$(CAT) $(BUILDTIMESDIR)/build_time_start_$1` `$(CAT) $(BUILDTIMESDIR)/build_time_end_$1` $1 | \
+	    $(NAWK) '{ F=$$7; T=$$14; if (F > T) { T+=3600*24 }; D=T-F; H=int(D/3600); \
+	    M=int((D-H*3600)/60); S=D-H*3600-M*60; printf("%02d:%02d:%02d %s\n",H,M,S,$$15); }' \
+	    > $(BUILDTIMESDIR)/build_time_diff_$1
 endef
 
 # Find all build_time_* files and print their contents in a list sorted
 # on the name of the sub repository.
 define ReportBuildTimes
-    $(BUILD_LOG_WRAPPER) $(PRINTF) -- "----- Build times -------\nStart %s\nEnd   %s\n%s\n%s\n-------------------------\n" \
-        "`$(CAT) $(BUILDTIMESDIR)/build_time_start_TOTAL_human_readable`" \
-        "`$(CAT) $(BUILDTIMESDIR)/build_time_end_TOTAL_human_readable`" \
-        "`$(LS) $(BUILDTIMESDIR)/build_time_diff_* | $(GREP) -v _TOTAL | $(XARGS) $(CAT) | $(SORT) -k 2`" \
-        "`$(CAT) $(BUILDTIMESDIR)/build_time_diff_TOTAL`"
+	$(BUILD_LOG_WRAPPER) $(PRINTF) -- "----- Build times -------\nStart %s\nEnd   %s\n%s\n%s\n-------------------------\n" \
+	    "`$(CAT) $(BUILDTIMESDIR)/build_time_start_TOTAL_human_readable`" \
+	    "`$(CAT) $(BUILDTIMESDIR)/build_time_end_TOTAL_human_readable`" \
+	    "`$(LS) $(BUILDTIMESDIR)/build_time_diff_* | $(GREP) -v _TOTAL | $(XARGS) $(CAT) | $(SORT) -k 2`" \
+	    "`$(CAT) $(BUILDTIMESDIR)/build_time_diff_TOTAL`"
 endef
 
 define ResetAllTimers
-    $$(shell $(MKDIR) -p $(BUILDTIMESDIR) &&  $(RM) $(BUILDTIMESDIR)/build_time_*)
+  $$(shell $(MKDIR) -p $(BUILDTIMESDIR) && $(RM) $(BUILDTIMESDIR)/build_time_*)
 endef
 
 define StartGlobalTimer
-    $(call RecordStartTime,TOTAL)
+	$(call RecordStartTime,TOTAL)
 endef
 
 define StopGlobalTimer
-    $(call RecordEndTime,TOTAL)
+	$(call RecordEndTime,TOTAL)
 endef
 
 ### Functions for managing makefile structure (start/end of makefile and individual targets)
@@ -123,184 +123,184 @@
 # Check if the current target is the final target, as specified by
 # the user on the command line. If so, call AtRootMakeEnd.
 define CheckIfMakeAtEnd
-    # Check if the current target is the last goal
-    $(if $(filter $@,$(call LastGoal)),$(call AtMakeEnd))
-    # If the target is 'foo-only', check if our goal was stated as 'foo'
-    $(if $(filter $@,$(call LastGoal)-only),$(call AtMakeEnd))
+        # Check if the current target is the last goal
+	$(if $(filter $@,$(call LastGoal)),$(call AtMakeEnd))
+        # If the target is 'foo-only', check if our goal was stated as 'foo'
+	$(if $(filter $@,$(call LastGoal)-only),$(call AtMakeEnd))
 endef
 
 # Hook to be called when starting to execute a top-level target
 define TargetEnter
-    $(BUILD_LOG_WRAPPER) $(PRINTF) "## Starting $(patsubst %-only,%,$@)\n"
-    $(call RecordStartTime,$(patsubst %-only,%,$@))
+	$(BUILD_LOG_WRAPPER) $(PRINTF) "## Starting $(patsubst %-only,%,$@)\n"
+	$(call RecordStartTime,$(patsubst %-only,%,$@))
 endef
 
 # Hook to be called when finish executing a top-level target
 define TargetExit
-    $(call RecordEndTime,$(patsubst %-only,%,$@))
-    $(BUILD_LOG_WRAPPER) $(PRINTF) "## Finished $(patsubst %-only,%,$@) (build time %s)\n\n" \
-        "`$(CAT) $(BUILDTIMESDIR)/build_time_diff_$(patsubst %-only,%,$@) | $(CUT) -f 1 -d ' '`"
-    $(call CheckIfMakeAtEnd)
+	$(call RecordEndTime,$(patsubst %-only,%,$@))
+	$(BUILD_LOG_WRAPPER) $(PRINTF) "## Finished $(patsubst %-only,%,$@) (build time %s)\n\n" \
+	    "`$(CAT) $(BUILDTIMESDIR)/build_time_diff_$(patsubst %-only,%,$@) | $(CUT) -f 1 -d ' '`"
+	$(call CheckIfMakeAtEnd)
 endef
 
 # Hook to be called as the very first thing when running a normal build
 define AtMakeStart
-    $(if $(findstring --jobserver,$(MAKEFLAGS)),$(error make -j is not supported, use make JOBS=n))
-    $(call CheckEnvironment)
-    @$(PRINTF) $(LOG_INFO) "Running make as '$(MAKE) $(MFLAGS) $(MAKE_ARGS)'\n"
-    @$(PRINTF) "Building $(PRODUCT_NAME) for target '$(call GetRealTarget)' in configuration '$(CONF_NAME)'\n\n"
-    $(call StartGlobalTimer)
+	$(if $(findstring --jobserver,$(MAKEFLAGS)),$(error make -j is not supported, use make JOBS=n))
+	$(call CheckEnvironment)
+	@$(PRINTF) $(LOG_INFO) "Running make as '$(MAKE) $(MFLAGS) $(MAKE_ARGS)'\n"
+	@$(PRINTF) "Building $(PRODUCT_NAME) for target '$(call GetRealTarget)' in configuration '$(CONF_NAME)'\n\n"
+	$(call StartGlobalTimer)
 endef
 
 # Hook to be called as the very last thing for targets that are "top level" targets
 define AtMakeEnd
-    [ -f $(SJAVAC_SERVER_DIR)/server.port ] && echo Stopping sjavac server && $(TOUCH) $(SJAVAC_SERVER_DIR)/server.port.stop; true
-    $(call StopGlobalTimer)
-    $(call ReportBuildTimes)
-    @$(PRINTF) "Finished building $(PRODUCT_NAME) for target '$(call GetRealTarget)'\n"
-    $(call CheckEnvironment)
+	[ -f $(SJAVAC_SERVER_DIR)/server.port ] && echo Stopping sjavac server && $(TOUCH) $(SJAVAC_SERVER_DIR)/server.port.stop; true
+	$(call StopGlobalTimer)
+	$(call ReportBuildTimes)
+	@$(PRINTF) "Finished building $(PRODUCT_NAME) for target '$(call GetRealTarget)'\n"
+	$(call CheckEnvironment)
 endef
 
 ### Functions for parsing and setting up make options from command-line
 
 define FatalError
-    # If the user specificed a "global" target (e.g. 'help'), do not exit but continue running
-    $$(if $$(filter-out $(global_targets),$$(call GetRealTarget)),$$(error Cannot continue))
+  # If the user specificed a "global" target (e.g. 'help'), do not exit but continue running
+  $$(if $$(filter-out $(global_targets),$$(call GetRealTarget)),$$(error Cannot continue))
 endef
 
 define ParseLogLevel
-    ifeq ($$(origin VERBOSE),undefined)
-        # Setup logging according to LOG (but only if VERBOSE is not given)
+  ifeq ($$(origin VERBOSE),undefined)
+    # Setup logging according to LOG (but only if VERBOSE is not given)
 
-        # If the "nofile" argument is given, act on it and strip it away
-        ifneq ($$(findstring nofile,$$(LOG)),)
-          # Reset the build log wrapper, regardless of other values
-          override BUILD_LOG_WRAPPER=
-          # COMMA is defined in spec.gmk, but that is not included yet
-          COMMA=,
-          # First try to remove ",nofile" if it exists
-          LOG_STRIPPED1=$$(subst $$(COMMA)nofile,,$$(LOG))
-          # Otherwise just remove "nofile"
-          LOG_STRIPPED2=$$(subst nofile,,$$(LOG_STRIPPED1))
-          # We might have ended up with a leading comma. Remove it
-          LOG_STRIPPED3=$$(strip $$(patsubst $$(COMMA)%,%,$$(LOG_STRIPPED2)))
-          LOG_LEVEL:=$$(LOG_STRIPPED3)
-        else
-          LOG_LEVEL:=$$(LOG)
-        endif
-
-        ifeq ($$(LOG_LEVEL),)
-            # Set LOG to "warn" as default if not set (and no VERBOSE given)
-            override LOG_LEVEL=warn
-        endif
-        ifeq ($$(LOG_LEVEL),warn)
-            VERBOSE=-s
-        else ifeq ($$(LOG_LEVEL),info)
-            VERBOSE=-s
-        else ifeq ($$(LOG_LEVEL),debug)
-            VERBOSE=
-        else ifeq ($$(LOG_LEVEL),trace)
-            VERBOSE=
-        else
-            $$(info Error: LOG must be one of: warn, info, debug or trace.)
-            $$(eval $$(call FatalError))
-        endif
+    # If the "nofile" argument is given, act on it and strip it away
+    ifneq ($$(findstring nofile,$$(LOG)),)
+      # Reset the build log wrapper, regardless of other values
+      override BUILD_LOG_WRAPPER=
+      # COMMA is defined in spec.gmk, but that is not included yet
+      COMMA=,
+      # First try to remove ",nofile" if it exists
+      LOG_STRIPPED1=$$(subst $$(COMMA)nofile,,$$(LOG))
+      # Otherwise just remove "nofile"
+      LOG_STRIPPED2=$$(subst nofile,,$$(LOG_STRIPPED1))
+      # We might have ended up with a leading comma. Remove it
+      LOG_STRIPPED3=$$(strip $$(patsubst $$(COMMA)%,%,$$(LOG_STRIPPED2)))
+      LOG_LEVEL:=$$(LOG_STRIPPED3)
     else
-        # Provide resonable interpretations of LOG_LEVEL if VERBOSE is given.
-        ifeq ($(VERBOSE),)
-            LOG_LEVEL:=debug
-        else
-            LOG_LEVEL:=warn
-        endif
-        ifneq ($$(LOG),)
-            # We have both a VERBOSE and a LOG argument. This is OK only if this is a repeated call by ourselves,
-            # but complain if this is the top-level make call.
-            ifeq ($$(MAKELEVEL),0)
-                $$(info Cannot use LOG=$$(LOG) and VERBOSE=$$(VERBOSE) at the same time. Choose one.)
-                $$(eval $$(call FatalError))
-            endif
-        endif
+      LOG_LEVEL:=$$(LOG)
     endif
+
+    ifeq ($$(LOG_LEVEL),)
+      # Set LOG to "warn" as default if not set (and no VERBOSE given)
+      override LOG_LEVEL=warn
+    endif
+    ifeq ($$(LOG_LEVEL),warn)
+      VERBOSE=-s
+    else ifeq ($$(LOG_LEVEL),info)
+      VERBOSE=-s
+    else ifeq ($$(LOG_LEVEL),debug)
+      VERBOSE=
+    else ifeq ($$(LOG_LEVEL),trace)
+      VERBOSE=
+    else
+      $$(info Error: LOG must be one of: warn, info, debug or trace.)
+      $$(eval $$(call FatalError))
+    endif
+  else
+    # Provide resonable interpretations of LOG_LEVEL if VERBOSE is given.
+    ifeq ($(VERBOSE),)
+      LOG_LEVEL:=debug
+    else
+      LOG_LEVEL:=warn
+    endif
+    ifneq ($$(LOG),)
+      # We have both a VERBOSE and a LOG argument. This is OK only if this is a repeated call by ourselves,
+      # but complain if this is the top-level make call.
+      ifeq ($$(MAKELEVEL),0)
+        $$(info Cannot use LOG=$$(LOG) and VERBOSE=$$(VERBOSE) at the same time. Choose one.)
+        $$(eval $$(call FatalError))
+      endif
+    endif
+  endif
 endef
 
 define ParseConfAndSpec
-    ifneq ($$(filter-out $(global_targets),$$(call GetRealTarget)),)
-        # If we only have global targets, no need to bother with SPEC or CONF
-        ifneq ($$(origin SPEC),undefined)
-            # We have been given a SPEC, check that it works out properly
-            ifeq ($$(wildcard $$(SPEC)),)
-                $$(info Cannot locate spec.gmk, given by SPEC=$$(SPEC))
-                $$(eval $$(call FatalError))
-            endif
-            ifneq ($$(origin CONF),undefined)
-                # We also have a CONF argument. This is OK only if this is a repeated call by ourselves,
-                # but complain if this is the top-level make call.
-                ifeq ($$(MAKELEVEL),0)
-                    $$(info Cannot use CONF=$$(CONF) and SPEC=$$(SPEC) at the same time. Choose one.)
-                    $$(eval $$(call FatalError))
-                endif
-            endif
-            # ... OK, we're satisfied, we'll use this SPEC later on
-        else
-            # Find all spec.gmk files in the build output directory
-            output_dir=$$(root_dir)/build
-            all_spec_files=$$(wildcard $$(output_dir)/*/spec.gmk)
-            ifeq ($$(all_spec_files),)
-                $$(info No configurations found for $$(root_dir)! Please run configure to create a configuration.)
-                $$(eval $$(call FatalError))
-            endif
-            # Extract the configuration names from the path
-            all_confs=$$(patsubst %/spec.gmk,%,$$(patsubst $$(output_dir)/%,%,$$(all_spec_files)))
-
-            ifneq ($$(origin CONF),undefined)
-                # User have given a CONF= argument.
-                ifeq ($$(CONF),)
-                    # If given CONF=, match all configurations
-                    matching_confs=$$(strip $$(all_confs))
-                else
-                    # Otherwise select those that contain the given CONF string
-                    matching_confs=$$(strip $$(foreach var,$$(all_confs),$$(if $$(findstring $$(CONF),$$(var)),$$(var))))
-                endif
-                ifeq ($$(matching_confs),)
-                    $$(info No configurations found matching CONF=$$(CONF))
-                    $$(info Available configurations:)
-                    $$(foreach var,$$(all_confs),$$(info * $$(var)))
-                    $$(eval $$(call FatalError))
-                else
-                    ifeq ($$(words $$(matching_confs)),1)
-                        $$(info Building '$$(matching_confs)' (matching CONF=$$(CONF)))
-                    else
-                        $$(info Building target '$(call GetRealTarget)' in the following configurations (matching CONF=$$(CONF)):)
-                        $$(foreach var,$$(matching_confs),$$(info * $$(var)))
-                    endif
-                endif
-
-                # Create a SPEC definition. This will contain the path to one or more spec.gmk files.
-                SPEC=$$(addsuffix /spec.gmk,$$(addprefix $$(output_dir)/,$$(matching_confs)))
-            else
-                # No CONF or SPEC given, check the available configurations
-                ifneq ($$(words $$(all_spec_files)),1)
-                    $$(info No CONF given, but more than one configuration found in $$(output_dir).)
-                    $$(info Available configurations:)
-                    $$(foreach var,$$(all_confs),$$(info * $$(var)))
-                    $$(info Please retry building with CONF=<config pattern> (or SPEC=<specfile>))
-                    $$(eval $$(call FatalError))
-                endif
-
-                # We found exactly one configuration, use it
-                SPEC=$$(strip $$(all_spec_files))
-            endif
+  ifneq ($$(filter-out $(global_targets),$$(call GetRealTarget)),)
+    # If we only have global targets, no need to bother with SPEC or CONF
+    ifneq ($$(origin SPEC),undefined)
+      # We have been given a SPEC, check that it works out properly
+      ifeq ($$(wildcard $$(SPEC)),)
+        $$(info Cannot locate spec.gmk, given by SPEC=$$(SPEC))
+        $$(eval $$(call FatalError))
+      endif
+      ifneq ($$(origin CONF),undefined)
+        # We also have a CONF argument. This is OK only if this is a repeated call by ourselves,
+        # but complain if this is the top-level make call.
+        ifeq ($$(MAKELEVEL),0)
+          $$(info Cannot use CONF=$$(CONF) and SPEC=$$(SPEC) at the same time. Choose one.)
+          $$(eval $$(call FatalError))
         endif
+      endif
+      # ... OK, we're satisfied, we'll use this SPEC later on
+    else
+      # Find all spec.gmk files in the build output directory
+      output_dir=$$(root_dir)/build
+      all_spec_files=$$(wildcard $$(output_dir)/*/spec.gmk)
+      ifeq ($$(all_spec_files),)
+        $$(info No configurations found for $$(root_dir)! Please run configure to create a configuration.)
+        $$(eval $$(call FatalError))
+      endif
+      # Extract the configuration names from the path
+      all_confs=$$(patsubst %/spec.gmk,%,$$(patsubst $$(output_dir)/%,%,$$(all_spec_files)))
+
+      ifneq ($$(origin CONF),undefined)
+        # User have given a CONF= argument.
+        ifeq ($$(CONF),)
+          # If given CONF=, match all configurations
+          matching_confs=$$(strip $$(all_confs))
+        else
+          # Otherwise select those that contain the given CONF string
+          matching_confs=$$(strip $$(foreach var,$$(all_confs),$$(if $$(findstring $$(CONF),$$(var)),$$(var))))
+        endif
+        ifeq ($$(matching_confs),)
+          $$(info No configurations found matching CONF=$$(CONF))
+          $$(info Available configurations:)
+          $$(foreach var,$$(all_confs),$$(info * $$(var)))
+          $$(eval $$(call FatalError))
+        else
+          ifeq ($$(words $$(matching_confs)),1)
+            $$(info Building '$$(matching_confs)' (matching CONF=$$(CONF)))
+          else
+            $$(info Building target '$(call GetRealTarget)' in the following configurations (matching CONF=$$(CONF)):)
+            $$(foreach var,$$(matching_confs),$$(info * $$(var)))
+          endif
+        endif
+
+        # Create a SPEC definition. This will contain the path to one or more spec.gmk files.
+        SPEC=$$(addsuffix /spec.gmk,$$(addprefix $$(output_dir)/,$$(matching_confs)))
+      else
+        # No CONF or SPEC given, check the available configurations
+        ifneq ($$(words $$(all_spec_files)),1)
+          $$(info No CONF given, but more than one configuration found in $$(output_dir).)
+          $$(info Available configurations:)
+          $$(foreach var,$$(all_confs),$$(info * $$(var)))
+          $$(info Please retry building with CONF=<config pattern> (or SPEC=<specfile>))
+          $$(eval $$(call FatalError))
+        endif
+
+        # We found exactly one configuration, use it
+        SPEC=$$(strip $$(all_spec_files))
+      endif
     endif
+  endif
 endef
 
 ### Convenience functions from Main.gmk
 
 # Cleans the component given as $1
 define CleanComponent
-    @$(PRINTF) "Cleaning $1 build artifacts ..."
-    @($(CD) $(OUTPUT_ROOT) && $(RM) -r $1)
-    @$(PRINTF) " done\n"
+	@$(PRINTF) "Cleaning $1 build artifacts ..."
+	@($(CD) $(OUTPUT_ROOT) && $(RM) -r $1)
+	@$(PRINTF) " done\n"
 endef
 
 endif # _MAKEHELPERS_GMK
diff --git a/common/makefiles/NativeCompilation.gmk b/common/makefiles/NativeCompilation.gmk
index 24448e8..94612fb 100644
--- a/common/makefiles/NativeCompilation.gmk
+++ b/common/makefiles/NativeCompilation.gmk
@@ -27,556 +27,556 @@
 # of removing duplicates. It is actually this side effect that is
 # desired whenever sort is used below!
 
-ifeq  (,$(_MAKEBASE_GMK))
-    $(error You must include MakeBase.gmk prior to including NativeCompilation.gmk)
+ifeq (,$(_MAKEBASE_GMK))
+  $(error You must include MakeBase.gmk prior to including NativeCompilation.gmk)
 endif
 
 ifeq ($(COMPILER_TYPE),CC)
-    COMPILING_MSG=echo $(LOG_INFO) "Compiling $(notdir $1) (for $(notdir $2))"
-    LINKING_MSG=echo $(LOG_INFO) "Linking $1"
-    LINKING_EXE_MSG=echo $(LOG_INFO) "Linking executable $1"
-    ARCHIVING_MSG=echo $(LOG_INFO) "Archiving $1"
+  COMPILING_MSG=echo $(LOG_INFO) "Compiling $(notdir $1) (for $(notdir $2))"
+  LINKING_MSG=echo $(LOG_INFO) "Linking $1"
+  LINKING_EXE_MSG=echo $(LOG_INFO) "Linking executable $1"
+  ARCHIVING_MSG=echo $(LOG_INFO) "Archiving $1"
 else
-    COMPILING_MSG=
-    LINKING_MSG=
-    LINKING_EXE_MSG=
-    ARCHIVING_MSG=
+  COMPILING_MSG=
+  LINKING_MSG=
+  LINKING_EXE_MSG=
+  ARCHIVING_MSG=
 endif
 
 define add_native_source
-    # param 1 = BUILD_MYPACKAGE
-    # parma 2 = the source file name (..../alfa.c or .../beta.cpp)
-    # param 3 = the bin dir that stores all .o (.obj) and .d files.
-    # param 4 = the c flags to the compiler
-    # param 5 = the c compiler
-    # param 6 = the c++ flags to the compiler
-    # param 7 = the c++ compiler
-    # param 8 = the flags to the assembler
+  # param 1 = BUILD_MYPACKAGE
+  # parma 2 = the source file name (..../alfa.c or .../beta.cpp)
+  # param 3 = the bin dir that stores all .o (.obj) and .d files.
+  # param 4 = the c flags to the compiler
+  # param 5 = the c compiler
+  # param 6 = the c++ flags to the compiler
+  # param 7 = the c++ compiler
+  # param 8 = the flags to the assembler
 
-    ifneq (,$$(filter %.c,$2))
-        # Compile as a C file
-        $1_$2_FLAGS=$4 $$($1_$(notdir $2)_CFLAGS) -DTHIS_FILE='"$$(<F)"' -c
-        $1_$2_COMP=$5
-        $1_$2_DEP_FLAG:=$(C_FLAG_DEPS)
-    else ifneq (,$$(filter %.m,$2))
-        # Compile as a objective-c file
-        $1_$2_FLAGS=-x objective-c $4 $$($1_$(notdir $2)_CFLAGS) -DTHIS_FILE='"$$(<F)"' -c
-        $1_$2_COMP=$5
-        $1_$2_DEP_FLAG:=$(C_FLAG_DEPS)
-    else ifneq (,$$(filter %.s,$2))
-        # Compile as assembler file
-        $1_$2_FLAGS=$8 -DTHIS_FILE='"$$(<F)"'
-        $1_$2_COMP=$(AS)
-        $1_$2_DEP_FLAG:=
-    else
-        # Compile as a C++ file
-        $1_$2_FLAGS=$6 $$($1_$(notdir $2)_CXXFLAGS) -DTHIS_FILE='"$$(<F)"' -c
-        $1_$2_COMP=$7
-        $1_$2_DEP_FLAG:=$(CXX_FLAG_DEPS)
+  ifneq (,$$(filter %.c,$2))
+    # Compile as a C file
+    $1_$2_FLAGS=$4 $$($1_$(notdir $2)_CFLAGS) -DTHIS_FILE='"$$(<F)"' -c
+    $1_$2_COMP=$5
+    $1_$2_DEP_FLAG:=$(C_FLAG_DEPS)
+  else ifneq (,$$(filter %.m,$2))
+    # Compile as a objective-c file
+    $1_$2_FLAGS=-x objective-c $4 $$($1_$(notdir $2)_CFLAGS) -DTHIS_FILE='"$$(<F)"' -c
+    $1_$2_COMP=$5
+    $1_$2_DEP_FLAG:=$(C_FLAG_DEPS)
+  else ifneq (,$$(filter %.s,$2))
+    # Compile as assembler file
+    $1_$2_FLAGS=$8 -DTHIS_FILE='"$$(<F)"'
+    $1_$2_COMP=$(AS)
+    $1_$2_DEP_FLAG:=
+  else
+    # Compile as a C++ file
+    $1_$2_FLAGS=$6 $$($1_$(notdir $2)_CXXFLAGS) -DTHIS_FILE='"$$(<F)"' -c
+    $1_$2_COMP=$7
+    $1_$2_DEP_FLAG:=$(CXX_FLAG_DEPS)
+  endif
+  # Generate the .o (.obj) file name and place it in the bin dir.
+  $1_$2_OBJ:=$3/$$(patsubst %.cpp,%$(OBJ_SUFFIX),$$(patsubst %.c,%$(OBJ_SUFFIX),$$(patsubst %.m,%$(OBJ_SUFFIX),$$(patsubst %.s,%$(OBJ_SUFFIX),$$(notdir $2)))))
+  # Only continue if this object file hasn't been processed already. This lets the first found
+  # source file override any other with the same name.
+  ifeq (,$$(findstring $$($1_$2_OBJ),$$($1_OBJS_SO_FAR)))
+    $1_OBJS_SO_FAR+=$$($1_$2_OBJ)
+    ifeq (,$$(filter %.s,$2))
+      # And this is the dependency file for this obj file.
+      $1_$2_DEP:=$$(patsubst %$(OBJ_SUFFIX),%.d,$$($1_$2_OBJ))
+      # Include previously generated dependency information. (if it exists)
+      -include $$($1_$2_DEP)
+
+      ifeq ($(COMPILER_TYPE),CL)
+        $1_$2_DEBUG_OUT_FLAGS:=-Fd$$(patsubst %$(OBJ_SUFFIX),%.pdb,$$($1_$2_OBJ)) \
+            -Fm$$(patsubst %$(OBJ_SUFFIX),%.map,$$($1_$2_OBJ))
+      endif
     endif
-    # Generate the .o (.obj) file name and place it in the bin dir.
-    $1_$2_OBJ:=$3/$$(patsubst %.cpp,%$(OBJ_SUFFIX),$$(patsubst %.c,%$(OBJ_SUFFIX),$$(patsubst %.m,%$(OBJ_SUFFIX),$$(patsubst %.s,%$(OBJ_SUFFIX),$$(notdir $2)))))
-    # Only continue if this object file hasn't been processed already. This lets the first found
-    # source file override any other with the same name.
-    ifeq (,$$(findstring $$($1_$2_OBJ),$$($1_OBJS_SO_FAR)))
-        $1_OBJS_SO_FAR+=$$($1_$2_OBJ)
-        ifeq (,$$(filter %.s,$2))
-          # And this is the dependency file for this obj file.
-          $1_$2_DEP:=$$(patsubst %$(OBJ_SUFFIX),%.d,$$($1_$2_OBJ))
-          # Include previously generated dependency information. (if it exists)
-          -include $$($1_$2_DEP)
 
-          ifeq ($(COMPILER_TYPE),CL)
-              $1_$2_DEBUG_OUT_FLAGS:=-Fd$$(patsubst %$(OBJ_SUFFIX),%.pdb,$$($1_$2_OBJ)) \
-                                     -Fm$$(patsubst %$(OBJ_SUFFIX),%.map,$$($1_$2_OBJ))
-          endif
-        endif
-
-        $$($1_$2_OBJ) : $2
+    $$($1_$2_OBJ) : $2
         ifeq ($(COMPILER_TYPE),CC)
-		$$(call COMPILING_MSG,$2,$$($1_TARGET))
+	  $$(call COMPILING_MSG,$2,$$($1_TARGET))
           # The Sun studio compiler doesn't output the full path to the object file in the
           # generated deps files. Fixing it with sed. If compiling assembly, don't try this.
           ifeq ($(COMPILER_NAME)$$(filter %.s,$2),ossc)
-		$$($1_$2_COMP) $$($1_$2_FLAGS) $$($1_$2_DEP_FLAG) $$($1_$2_DEP).tmp $(CC_OUT_OPTION)$$($1_$2_OBJ) $2
-		$(SED) 's|^$$(@F):|$$@:|' $$($1_$2_DEP).tmp > $$($1_$2_DEP)
+	    $$($1_$2_COMP) $$($1_$2_FLAGS) $$($1_$2_DEP_FLAG) $$($1_$2_DEP).tmp $(CC_OUT_OPTION)$$($1_$2_OBJ) $2
+	    $(SED) 's|^$$(@F):|$$@:|' $$($1_$2_DEP).tmp > $$($1_$2_DEP)
           else
-		$$($1_$2_COMP) $$($1_$2_FLAGS) $$($1_$2_DEP_FLAG) $$($1_$2_DEP) $(CC_OUT_OPTION)$$($1_$2_OBJ) $2
-        endif
+	    $$($1_$2_COMP) $$($1_$2_FLAGS) $$($1_$2_DEP_FLAG) $$($1_$2_DEP) $(CC_OUT_OPTION)$$($1_$2_OBJ) $2
+          endif
         endif
         # The Visual Studio compiler lacks a feature for generating make dependencies, but by
-        # setting -showIncludes, all included files are printed. These are filtered out and 
+        # setting -showIncludes, all included files are printed. These are filtered out and
         # parsed into make dependences.
         ifeq ($(COMPILER_TYPE),CL)
-		($$($1_$2_COMP) $$($1_$2_FLAGS) -showIncludes $$($1_$2_DEBUG_OUT_FLAGS) \
-			$(CC_OUT_OPTION)$$($1_$2_OBJ) $2 ; echo $$$$? > $$($1_$2_DEP).exitvalue) \
-			| $(TEE) $$($1_$2_DEP).raw | $(GREP) -v "^Note: including file:" \
-			&& exit `cat $$($1_$2_DEP).exitvalue`
-		$(RM) $$($1_$2_DEP).exitvalue
-		($(ECHO) $$@: \\ \
-		 && $(SED) -e '/^Note: including file:/!d' \
-			-e 's|Note: including file: *||' \
-			-e 's|\\|/|g' \
-			-e 's|^\([a-zA-Z]\):|/cygdrive/\1|g' \
-			-e '/$(subst /,\/,$(TOPDIR))/!d' \
-			-e 's|$$$$| \\|g' \
-			$$($1_$2_DEP).raw) > $$($1_$2_DEP)
+	  ($$($1_$2_COMP) $$($1_$2_FLAGS) -showIncludes $$($1_$2_DEBUG_OUT_FLAGS) \
+	      $(CC_OUT_OPTION)$$($1_$2_OBJ) $2 ; echo $$$$? > $$($1_$2_DEP).exitvalue) \
+	      | $(TEE) $$($1_$2_DEP).raw | $(GREP) -v "^Note: including file:" \
+	      && exit `cat $$($1_$2_DEP).exitvalue`
+	  $(RM) $$($1_$2_DEP).exitvalue
+	  ($(ECHO) $$@: \\ \
+	  && $(SED) -e '/^Note: including file:/!d' \
+	      -e 's|Note: including file: *||' \
+	      -e 's|\\|/|g' \
+	      -e 's|^\([a-zA-Z]\):|/cygdrive/\1|g' \
+	      -e '/$(subst /,\/,$(TOPDIR))/!d' \
+	      -e 's|$$$$| \\|g' \
+	      $$($1_$2_DEP).raw) > $$($1_$2_DEP)
         endif
-    endif
+  endif
 endef
 
 define SetupNativeCompilation
-    # param 1 is for example BUILD_MYPACKAGE
-    # param 2,3,4,5,6,7,8 are named args.
-    #    SRC one or more directory roots to scan for C/C++ files.
-    #    LANG C or C++
-    #    CFLAGS the compiler flags to be used, used both for C and C++.
-    #    CXXFLAGS the compiler flags to be used for c++, if set overrides CFLAGS.
-    #    LDFLAGS the linker flags to be used, used both for C and C++.
-    #    LDFLAGS_SUFFIX the linker flags to be added last on the commandline
-    #        typically the libraries linked to.
-    #    ARFLAGS the archiver flags to be used
-    #    OBJECT_DIR the directory where we store the object files
-    #    LIBRARY the resulting library file
-    #    PROGRAM the resulting exec file
-    #    INCLUDES only pick source from these directories
-    #    EXCLUDES do not pick source from these directories
-    #    INCLUDE_FILES only compile exactly these files!
-    #    EXCLUDE_FILES with these names
-    #    VERSIONINFO_RESOURCE Input file for RC. Setting this implies that RC will be run
-    #    RC_FLAGS flags for RC.
-    #    MAPFILE mapfile
-    #    REORDER reorder file
-    #    DEBUG_SYMBOLS add debug symbols (if configured on)
-    #    CC the compiler to use, default is $(CC)
-    #    LDEXE the linker to use for linking executables, default is $(LDEXE)
-    #    OPTIMIZATION sets optimization level to NONE, LOW, HIGH, HIGHEST
-    $(foreach i,2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26, $(if $($i),$1_$(strip $($i)))$(NEWLINE))
-    $(call LogSetupMacroEntry,SetupNativeCompilation($1),$2,$3,$4,$5,$6,$7,$8,$9,$(10),$(11),$(12),$(13),$(14),$(15),$(16),$(17),$(18),$(19),$(20),$(21),$(22),$(23),$(24),$(25),$(26))
-    $(if $(27),$(error Internal makefile error: Too many arguments to SetupNativeCompilation, please update NativeCompilation.gmk))
+  # param 1 is for example BUILD_MYPACKAGE
+  # param 2,3,4,5,6,7,8 are named args.
+  #   SRC one or more directory roots to scan for C/C++ files.
+  #   LANG C or C++
+  #   CFLAGS the compiler flags to be used, used both for C and C++.
+  #   CXXFLAGS the compiler flags to be used for c++, if set overrides CFLAGS.
+  #   LDFLAGS the linker flags to be used, used both for C and C++.
+  #   LDFLAGS_SUFFIX the linker flags to be added last on the commandline
+  #       typically the libraries linked to.
+  #   ARFLAGS the archiver flags to be used
+  #   OBJECT_DIR the directory where we store the object files
+  #   LIBRARY the resulting library file
+  #   PROGRAM the resulting exec file
+  #   INCLUDES only pick source from these directories
+  #   EXCLUDES do not pick source from these directories
+  #   INCLUDE_FILES only compile exactly these files!
+  #   EXCLUDE_FILES with these names
+  #   VERSIONINFO_RESOURCE Input file for RC. Setting this implies that RC will be run
+  #   RC_FLAGS flags for RC.
+  #   MAPFILE mapfile
+  #   REORDER reorder file
+  #   DEBUG_SYMBOLS add debug symbols (if configured on)
+  #   CC the compiler to use, default is $(CC)
+  #   LDEXE the linker to use for linking executables, default is $(LDEXE)
+  #   OPTIMIZATION sets optimization level to NONE, LOW, HIGH, HIGHEST
+  $(foreach i,2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26, $(if $($i),$1_$(strip $($i)))$(NEWLINE))
+  $(call LogSetupMacroEntry,SetupNativeCompilation($1),$2,$3,$4,$5,$6,$7,$8,$9,$(10),$(11),$(12),$(13),$(14),$(15),$(16),$(17),$(18),$(19),$(20),$(21),$(22),$(23),$(24),$(25),$(26))
+  $(if $(27),$(error Internal makefile error: Too many arguments to SetupNativeCompilation, please update NativeCompilation.gmk))
 
-    ifneq (,$$($1_BIN))
-        $$(error BIN has been replaced with OBJECT_DIR)
+  ifneq (,$$($1_BIN))
+    $$(error BIN has been replaced with OBJECT_DIR)
+  endif
+
+  ifneq (,$$($1_LIB))
+    $$(error LIB has been replaced with LIBRARY)
+  endif
+
+  ifneq (,$$($1_EXE))
+    $$(error EXE has been replaced with PROGRAM)
+  endif
+
+  ifneq (,$$($1_LIBRARY))
+    ifeq (,$$($1_OUTPUT_DIR))
+      $$(error LIBRARY requires OUTPUT_DIR)
     endif
 
-    ifneq (,$$($1_LIB))
-        $$(error LIB has been replaced with LIBRARY)
+    ifneq ($$($1_LIBRARY),$(basename $$($1_LIBRARY)))
+      $$(error directory of LIBRARY should be specified using OUTPUT_DIR)
     endif
 
-    ifneq (,$$($1_EXE))
-        $$(error EXE has been replaced with PROGRAM)
+    ifneq (,$(findstring $(SHARED_LIBRARY_SUFFIX),$$($1_LIBRARY)))
+      $$(error LIBRARY should be specified without SHARED_LIBRARY_SUFFIX: $(SHARED_LIBRARY_SUFFIX))
     endif
 
-    ifneq (,$$($1_LIBRARY))
-        ifeq (,$$($1_OUTPUT_DIR))
-            $$(error LIBRARY requires OUTPUT_DIR)
-        endif
-
-        ifneq ($$($1_LIBRARY),$(basename $$($1_LIBRARY)))
-            $$(error directory of LIBRARY should be specified using OUTPUT_DIR)
-        endif
-
-        ifneq (,$(findstring $(SHARED_LIBRARY_SUFFIX),$$($1_LIBRARY)))
-            $$(error LIBRARY should be specified without SHARED_LIBRARY_SUFFIX: $(SHARED_LIBRARY_SUFFIX))
-        endif
-
-        ifneq (,$(findstring $(LIBRARY_PREFIX),$$($1_LIBRARY)))
-            $$(error LIBRARY should be specified without LIBRARY_PREFIX: $(LIBRARY_PREFIX))
-        endif
-
-        $1_BASENAME:=$(LIBRARY_PREFIX)$$($1_LIBRARY)$(SHARED_LIBRARY_SUFFIX)
-        $1_TARGET:=$$($1_OUTPUT_DIR)/$$($1_BASENAME)
-
+    ifneq (,$(findstring $(LIBRARY_PREFIX),$$($1_LIBRARY)))
+      $$(error LIBRARY should be specified without LIBRARY_PREFIX: $(LIBRARY_PREFIX))
     endif
 
-    ifneq (,$$($1_STATIC_LIBRARY))
-        ifeq (,$$($1_OUTPUT_DIR))
-            $$(error STATIC_LIBRARY requires OUTPUT_DIR)
-        endif
+    $1_BASENAME:=$(LIBRARY_PREFIX)$$($1_LIBRARY)$(SHARED_LIBRARY_SUFFIX)
+    $1_TARGET:=$$($1_OUTPUT_DIR)/$$($1_BASENAME)
 
-        ifneq ($$($1_STATIC_LIBRARY),$(basename $$($1_STATIC_LIBRARY)))
-            $$(error directory of STATIC_LIBRARY should be specified using OUTPUT_DIR)
-        endif
+  endif
 
-        ifneq (,$(findstring $(STATIC_LIBRARY_SUFFIX),$$($1_STATIC_LIBRARY)))
-            $$(error STATIC_LIBRARY should be specified without STATIC_LIBRARY_SUFFIX: $(STATIC_LIBRARY_SUFFIX))
-        endif
-
-        ifneq (,$(findstring $(LIBRARY_PREFIX),$$($1_STATIC_LIBRARY)))
-            $$(error STATIC_LIBRARY should be specified without LIBRARY_PREFIX: $(LIBRARY_PREFIX))
-        endif
-
-        $1_BASENAME:=$(LIBRARY_PREFIX)$$($1_STATIC_LIBRARY)$(STATIC_LIBRARY_SUFFIX)
-        $1_TARGET:=$$($1_OUTPUT_DIR)/$$($1_BASENAME)
+  ifneq (,$$($1_STATIC_LIBRARY))
+    ifeq (,$$($1_OUTPUT_DIR))
+      $$(error STATIC_LIBRARY requires OUTPUT_DIR)
     endif
 
-    ifneq (,$$($1_PROGRAM))
-        ifeq (,$$($1_OUTPUT_DIR))
-            $$(error PROGRAM requires OUTPUT_DIR)
-        endif
-
-        ifneq ($$($1_PROGRAM),$(basename $$($1_PROGRAM)))
-            $$(error directory of PROGRAM should be specified using OUTPUT_DIR)
-        endif
-
-        ifneq (,$(findstring $(EXE_SUFFIX),$$($1_PROGRAM)))
-            $$(error PROGRAM should be specified without EXE_SUFFIX: $(EXE_SUFFIX))
-        endif
-
-        $1_BASENAME:=$$($1_PROGRAM)$(EXE_SUFFIX)
-        $1_TARGET:=$$($1_OUTPUT_DIR)/$$($1_BASENAME)
-
+    ifneq ($$($1_STATIC_LIBRARY),$(basename $$($1_STATIC_LIBRARY)))
+      $$(error directory of STATIC_LIBRARY should be specified using OUTPUT_DIR)
     endif
 
-    ifeq (,$$($1_TARGET))
-        $$(error Neither PROGRAM, LIBRARY nor STATIC_LIBRARY has been specified for SetupNativeCompilation)
+    ifneq (,$(findstring $(STATIC_LIBRARY_SUFFIX),$$($1_STATIC_LIBRARY)))
+      $$(error STATIC_LIBRARY should be specified without STATIC_LIBRARY_SUFFIX: $(STATIC_LIBRARY_SUFFIX))
     endif
 
-    ifeq (,$$($1_LANG))
-        $$(error You have to specify LANG for native compilation $1)
+    ifneq (,$(findstring $(LIBRARY_PREFIX),$$($1_STATIC_LIBRARY)))
+      $$(error STATIC_LIBRARY should be specified without LIBRARY_PREFIX: $(LIBRARY_PREFIX))
     endif
-    ifeq (C,$$($1_LANG))
-        ifeq ($$($1_LDEXE),)
-	    $1_LDEXE:=$(LDEXE)
-        endif
-	$1_LD:=$(LD)
+
+    $1_BASENAME:=$(LIBRARY_PREFIX)$$($1_STATIC_LIBRARY)$(STATIC_LIBRARY_SUFFIX)
+    $1_TARGET:=$$($1_OUTPUT_DIR)/$$($1_BASENAME)
+  endif
+
+  ifneq (,$$($1_PROGRAM))
+    ifeq (,$$($1_OUTPUT_DIR))
+      $$(error PROGRAM requires OUTPUT_DIR)
+    endif
+
+    ifneq ($$($1_PROGRAM),$(basename $$($1_PROGRAM)))
+      $$(error directory of PROGRAM should be specified using OUTPUT_DIR)
+    endif
+
+    ifneq (,$(findstring $(EXE_SUFFIX),$$($1_PROGRAM)))
+      $$(error PROGRAM should be specified without EXE_SUFFIX: $(EXE_SUFFIX))
+    endif
+
+    $1_BASENAME:=$$($1_PROGRAM)$(EXE_SUFFIX)
+    $1_TARGET:=$$($1_OUTPUT_DIR)/$$($1_BASENAME)
+
+  endif
+
+  ifeq (,$$($1_TARGET))
+    $$(error Neither PROGRAM, LIBRARY nor STATIC_LIBRARY has been specified for SetupNativeCompilation)
+  endif
+
+  ifeq (,$$($1_LANG))
+    $$(error You have to specify LANG for native compilation $1)
+  endif
+  ifeq (C,$$($1_LANG))
+    ifeq ($$($1_LDEXE),)
+      $1_LDEXE:=$(LDEXE)
+    endif
+    $1_LD:=$(LD)
+  else
+    ifeq (C++,$$($1_LANG))
+      $1_LD:=$(LDCXX)
+      $1_LDEXE:=$(LDEXECXX)
     else
-       ifeq (C++,$$($1_LANG))
-           $1_LD:=$(LDCXX)
-	   $1_LDEXE:=$(LDEXECXX)
-       else
-           $$(error Unknown native language $$($1_LANG) for $1)
-       endif
+      $$(error Unknown native language $$($1_LANG) for $1)
     endif
+  endif
 
-    ifeq ($$($1_CC),)
-        $1_CC:=$(CC)
-    endif
+  ifeq ($$($1_CC),)
+    $1_CC:=$(CC)
+  endif
 
-    # Make sure the dirs exist.
-    $$(eval $$(call MakeDir,$$($1_OBJECT_DIR) $$($1_OUTPUT_DIR)))
-    $$(foreach d,$$($1_SRC), $$(if $$(wildcard $$d),,$$(error SRC specified to SetupNativeCompilation $1 contains missing directory $$d)))
+  # Make sure the dirs exist.
+  $$(eval $$(call MakeDir,$$($1_OBJECT_DIR) $$($1_OUTPUT_DIR)))
+  $$(foreach d,$$($1_SRC), $$(if $$(wildcard $$d),,$$(error SRC specified to SetupNativeCompilation $1 contains missing directory $$d)))
 
-    # Find all files in the source trees. Sort to remove duplicates.
-    $1_ALL_SRCS := $$(sort $$(call CacheFind,$$($1_SRC)))
-    # Extract the C/C++ files.
-    $1_EXCLUDE_FILES:=$$(foreach i,$$($1_SRC),$$(addprefix $$i/,$$($1_EXCLUDE_FILES)))
-    $1_INCLUDE_FILES:=$$(foreach i,$$($1_SRC),$$(addprefix $$i/,$$($1_INCLUDE_FILES)))
-    ifneq ($$($1_EXCLUDE_FILES),)
-        $1_EXCLUDE_FILES:=$$(addprefix %,$$($1_EXCLUDE_FILES))
-    endif
-    $1_SRCS     := $$(filter-out $$($1_EXCLUDE_FILES),$$(filter %.s %.c %.cpp %.m,$$($1_ALL_SRCS)))
-    ifneq (,$$(strip $$($1_INCLUDE_FILES)))
-        $1_SRCS := $$(filter $$($1_INCLUDE_FILES),$$($1_SRCS))
-    endif
-    ifeq (,$$($1_SRCS))
-        $$(error No sources found for $1 when looking inside the dirs $$($1_SRC))
-    endif
-    # There can be only a single bin dir root, no need to foreach over the roots.
-    $1_BINS     := $$(wildcard $$($1_OBJECT_DIR)/*$(OBJ_SUFFIX))
-    # Now we have a list of all c/c++ files to compile: $$($1_SRCS)
-    # and we have a list of all existing object files: $$($1_BINS)
+  # Find all files in the source trees. Sort to remove duplicates.
+  $1_ALL_SRCS := $$(sort $$(call CacheFind,$$($1_SRC)))
+  # Extract the C/C++ files.
+  $1_EXCLUDE_FILES:=$$(foreach i,$$($1_SRC),$$(addprefix $$i/,$$($1_EXCLUDE_FILES)))
+  $1_INCLUDE_FILES:=$$(foreach i,$$($1_SRC),$$(addprefix $$i/,$$($1_INCLUDE_FILES)))
+  ifneq ($$($1_EXCLUDE_FILES),)
+    $1_EXCLUDE_FILES:=$$(addprefix %,$$($1_EXCLUDE_FILES))
+  endif
+  $1_SRCS := $$(filter-out $$($1_EXCLUDE_FILES),$$(filter %.s %.c %.cpp %.m,$$($1_ALL_SRCS)))
+  ifneq (,$$(strip $$($1_INCLUDE_FILES)))
+    $1_SRCS := $$(filter $$($1_INCLUDE_FILES),$$($1_SRCS))
+  endif
+  ifeq (,$$($1_SRCS))
+    $$(error No sources found for $1 when looking inside the dirs $$($1_SRC))
+  endif
+  # There can be only a single bin dir root, no need to foreach over the roots.
+  $1_BINS := $$(wildcard $$($1_OBJECT_DIR)/*$(OBJ_SUFFIX))
+  # Now we have a list of all c/c++ files to compile: $$($1_SRCS)
+  # and we have a list of all existing object files: $$($1_BINS)
 
-    # Prepend the source/bin path to the filter expressions. Then do the filtering.
-    ifneq ($$($1_INCLUDES),)
-        $1_SRC_INCLUDES := $$(foreach i,$$($1_SRC),$$(addprefix $$i/,$$(addsuffix /%,$$($1_INCLUDES))))
-        $1_SRCS         := $$(filter $$($1_SRC_INCLUDES),$$($1_SRCS))
-    endif
-    ifneq ($$($1_EXCLUDES),)
-        $1_SRC_EXCLUDES := $$(foreach i,$$($1_SRC),$$(addprefix $$i/,$$(addsuffix /%,$$($1_EXCLUDES))))
-        $1_SRCS         := $$(filter-out $$($1_SRC_EXCLUDES),$$($1_SRCS))
-    endif
+  # Prepend the source/bin path to the filter expressions. Then do the filtering.
+  ifneq ($$($1_INCLUDES),)
+    $1_SRC_INCLUDES := $$(foreach i,$$($1_SRC),$$(addprefix $$i/,$$(addsuffix /%,$$($1_INCLUDES))))
+    $1_SRCS := $$(filter $$($1_SRC_INCLUDES),$$($1_SRCS))
+  endif
+  ifneq ($$($1_EXCLUDES),)
+    $1_SRC_EXCLUDES := $$(foreach i,$$($1_SRC),$$(addprefix $$i/,$$(addsuffix /%,$$($1_EXCLUDES))))
+    $1_SRCS := $$(filter-out $$($1_SRC_EXCLUDES),$$($1_SRCS))
+  endif
 
-    # Calculate the expected output from compiling the sources (sort to remove duplicates. Also provides
-    # a reproducable order on the input files to the linker).
-    $1_EXPECTED_OBJS:=$$(sort $$(addprefix $$($1_OBJECT_DIR)/,$$(patsubst %.cpp,%$(OBJ_SUFFIX),$$(patsubst %.c,%$(OBJ_SUFFIX),$$(patsubst %.m,%$(OBJ_SUFFIX),$$(patsubst %.s,%$(OBJ_SUFFIX),$$(notdir $$($1_SRCS))))))))
-    # Are there too many object files on disk? Perhaps because some source file was removed?
-    $1_SUPERFLOUS_OBJS:=$$(sort $$(filter-out $$($1_EXPECTED_OBJS),$$($1_BINS)))
-    # Clean out the superfluous object files.
-    ifneq ($$($1_SUPERFLUOUS_OBJS),)
-        $$(shell $(RM) -f $$($1_SUPERFLUOUS_OBJS))
-    endif
+  # Calculate the expected output from compiling the sources (sort to remove duplicates. Also provides
+  # a reproducable order on the input files to the linker).
+  $1_EXPECTED_OBJS:=$$(sort $$(addprefix $$($1_OBJECT_DIR)/,$$(patsubst %.cpp,%$(OBJ_SUFFIX),$$(patsubst %.c,%$(OBJ_SUFFIX),$$(patsubst %.m,%$(OBJ_SUFFIX),$$(patsubst %.s,%$(OBJ_SUFFIX),$$(notdir $$($1_SRCS))))))))
+  # Are there too many object files on disk? Perhaps because some source file was removed?
+  $1_SUPERFLOUS_OBJS:=$$(sort $$(filter-out $$($1_EXPECTED_OBJS),$$($1_BINS)))
+  # Clean out the superfluous object files.
+  ifneq ($$($1_SUPERFLUOUS_OBJS),)
+    $$(shell $(RM) -f $$($1_SUPERFLUOUS_OBJS))
+  endif
 
-    # Pickup extra OPENJDK_TARGET_OS_API and/or OPENJDK_TARGET_OS dependent variables for CFLAGS.
-    $1_EXTRA_CFLAGS:=$$($1_CFLAGS_$(OPENJDK_TARGET_OS_API)) $$($1_CFLAGS_$(OPENJDK_TARGET_OS))
-    ifneq ($(DEBUG_LEVEL),release)
-        # Pickup extra debug dependent variables for CFLAGS
-        $1_EXTRA_CFLAGS+=$$($1_CFLAGS_debug)
-        $1_EXTRA_CFLAGS+=$$($1_CFLAGS_$(OPENJDK_TARGET_OS_API)_debug)
-        $1_EXTRA_CFLAGS+=$$($1_CFLAGS_$(OPENJDK_TARGET_OS)_debug)
-    else
-        $1_EXTRA_CFLAGS+=$$($1_CFLAGS_release)
-        $1_EXTRA_CFLAGS+=$$($1_CFLAGS_$(OPENJDK_TARGET_OS_API)_release)
-        $1_EXTRA_CFLAGS+=$$($1_CFLAGS_$(OPENJDK_TARGET_OS)_release)
-    endif
+  # Pickup extra OPENJDK_TARGET_OS_API and/or OPENJDK_TARGET_OS dependent variables for CFLAGS.
+  $1_EXTRA_CFLAGS:=$$($1_CFLAGS_$(OPENJDK_TARGET_OS_API)) $$($1_CFLAGS_$(OPENJDK_TARGET_OS))
+  ifneq ($(DEBUG_LEVEL),release)
+    # Pickup extra debug dependent variables for CFLAGS
+    $1_EXTRA_CFLAGS+=$$($1_CFLAGS_debug)
+    $1_EXTRA_CFLAGS+=$$($1_CFLAGS_$(OPENJDK_TARGET_OS_API)_debug)
+    $1_EXTRA_CFLAGS+=$$($1_CFLAGS_$(OPENJDK_TARGET_OS)_debug)
+  else
+    $1_EXTRA_CFLAGS+=$$($1_CFLAGS_release)
+    $1_EXTRA_CFLAGS+=$$($1_CFLAGS_$(OPENJDK_TARGET_OS_API)_release)
+    $1_EXTRA_CFLAGS+=$$($1_CFLAGS_$(OPENJDK_TARGET_OS)_release)
+  endif
 
-    # Pickup extra OPENJDK_TARGET_OS_API and/or OPENJDK_TARGET_OS dependent variables for CXXFLAGS.
-    $1_EXTRA_CXXFLAGS:=$$($1_CXXFLAGS_$(OPENJDK_TARGET_OS_API)) $$($1_CXXFLAGS_$(OPENJDK_TARGET_OS))
-    ifneq ($(DEBUG_LEVEL),release)
-        # Pickup extra debug dependent variables for CXXFLAGS
-        $1_EXTRA_CXXFLAGS+=$$($1_CXXFLAGS_debug)
-        $1_EXTRA_CXXFLAGS+=$$($1_CXXFLAGS_$(OPENJDK_TARGET_OS_API)_debug)
-        $1_EXTRA_CXXFLAGS+=$$($1_CXXFLAGS_$(OPENJDK_TARGET_OS)_debug)
-    else
-        $1_EXTRA_CXXFLAGS+=$$($1_CXXFLAGS_release)
-        $1_EXTRA_CXXFLAGS+=$$($1_CXXFLAGS_$(OPENJDK_TARGET_OS_API)_release)
-        $1_EXTRA_CXXFLAGS+=$$($1_CXXFLAGS_$(OPENJDK_TARGET_OS)_release)
-    endif
+  # Pickup extra OPENJDK_TARGET_OS_API and/or OPENJDK_TARGET_OS dependent variables for CXXFLAGS.
+  $1_EXTRA_CXXFLAGS:=$$($1_CXXFLAGS_$(OPENJDK_TARGET_OS_API)) $$($1_CXXFLAGS_$(OPENJDK_TARGET_OS))
+  ifneq ($(DEBUG_LEVEL),release)
+    # Pickup extra debug dependent variables for CXXFLAGS
+    $1_EXTRA_CXXFLAGS+=$$($1_CXXFLAGS_debug)
+    $1_EXTRA_CXXFLAGS+=$$($1_CXXFLAGS_$(OPENJDK_TARGET_OS_API)_debug)
+    $1_EXTRA_CXXFLAGS+=$$($1_CXXFLAGS_$(OPENJDK_TARGET_OS)_debug)
+  else
+    $1_EXTRA_CXXFLAGS+=$$($1_CXXFLAGS_release)
+    $1_EXTRA_CXXFLAGS+=$$($1_CXXFLAGS_$(OPENJDK_TARGET_OS_API)_release)
+    $1_EXTRA_CXXFLAGS+=$$($1_CXXFLAGS_$(OPENJDK_TARGET_OS)_release)
+  endif
 
-    ifneq (,$$($1_DEBUG_SYMBOLS))	
-        ifeq ($(ENABLE_DEBUG_SYMBOLS), true)
-	    ifdef OPENJDK
-	        # Always add debug symbols
-                $1_EXTRA_CFLAGS+=$(CFLAGS_DEBUG_SYMBOLS)
-                $1_EXTRA_CXXFLAGS+=$(CXXFLAGS_DEBUG_SYMBOLS)
-	    else
-                # Programs don't get the debug symbols added in the old build. It's not clear if
-                # this is intentional.
-                ifeq ($$($1_PROGRAM),)
-                    $1_EXTRA_CFLAGS+=$(CFLAGS_DEBUG_SYMBOLS)
-                    $1_EXTRA_CXXFLAGS+=$(CXXFLAGS_DEBUG_SYMBOLS)
-                endif
-            endif
+  ifneq (,$$($1_DEBUG_SYMBOLS))
+    ifeq ($(ENABLE_DEBUG_SYMBOLS), true)
+      ifdef OPENJDK
+        # Always add debug symbols
+        $1_EXTRA_CFLAGS+=$(CFLAGS_DEBUG_SYMBOLS)
+        $1_EXTRA_CXXFLAGS+=$(CXXFLAGS_DEBUG_SYMBOLS)
+      else
+        # Programs don't get the debug symbols added in the old build. It's not clear if
+        # this is intentional.
+        ifeq ($$($1_PROGRAM),)
+          $1_EXTRA_CFLAGS+=$(CFLAGS_DEBUG_SYMBOLS)
+          $1_EXTRA_CXXFLAGS+=$(CXXFLAGS_DEBUG_SYMBOLS)
         endif
+      endif
     endif
+  endif
 
-    ifeq ($$($1_CXXFLAGS),)
-        $1_CXXFLAGS:=$$($1_CFLAGS)
-    endif
-    ifeq ($$(strip $$($1_EXTRA_CXXFLAGS)),)
-        $1_EXTRA_CXXFLAGS:=$$($1_EXTRA_CFLAGS)
-    endif
+  ifeq ($$($1_CXXFLAGS),)
+    $1_CXXFLAGS:=$$($1_CFLAGS)
+  endif
+  ifeq ($$(strip $$($1_EXTRA_CXXFLAGS)),)
+    $1_EXTRA_CXXFLAGS:=$$($1_EXTRA_CFLAGS)
+  endif
 
-    ifneq (,$$($1_REORDER))
-          $1_EXTRA_CFLAGS += $$(C_FLAG_REORDER)
-          $1_EXTRA_CXXFLAGS += $$(CXX_FLAG_REORDER)
-    endif
+  ifneq (,$$($1_REORDER))
+    $1_EXTRA_CFLAGS += $$(C_FLAG_REORDER)
+    $1_EXTRA_CXXFLAGS += $$(CXX_FLAG_REORDER)
+  endif
 
-    ifeq (NONE, $$($1_OPTIMIZATION))
-        $1_EXTRA_CFLAGS += $(C_O_FLAG_NONE)
-        $1_EXTRA_CXXFLAGS += $(CXX_O_FLAG_NONE)
-    else ifeq (LOW, $$($1_OPTIMIZATION))
-        $1_EXTRA_CFLAGS += $(C_O_FLAG_NORM)
-        $1_EXTRA_CXXFLAGS += $(CXX_O_FLAG_NORM)
-    else ifeq (HIGH, $$($1_OPTIMIZATION))
-        $1_EXTRA_CFLAGS += $(C_O_FLAG_HI)
-        $1_EXTRA_CXXFLAGS += $(CXX_O_FLAG_HI)
-    else ifeq (HIGHEST, $$($1_OPTIMIZATION))
-        $1_EXTRA_CFLAGS += $(C_O_FLAG_HIGHEST)
-        $1_EXTRA_CXXFLAGS += $(CXX_O_FLAG_HIGHEST)
-    else ifneq (, $$($1_OPTIMIZATION))
-        $$(error Unknown value for OPTIMIZATION: $$($1_OPTIMIZATION))
-    endif
+  ifeq (NONE, $$($1_OPTIMIZATION))
+    $1_EXTRA_CFLAGS += $(C_O_FLAG_NONE)
+    $1_EXTRA_CXXFLAGS += $(CXX_O_FLAG_NONE)
+  else ifeq (LOW, $$($1_OPTIMIZATION))
+    $1_EXTRA_CFLAGS += $(C_O_FLAG_NORM)
+    $1_EXTRA_CXXFLAGS += $(CXX_O_FLAG_NORM)
+  else ifeq (HIGH, $$($1_OPTIMIZATION))
+    $1_EXTRA_CFLAGS += $(C_O_FLAG_HI)
+    $1_EXTRA_CXXFLAGS += $(CXX_O_FLAG_HI)
+  else ifeq (HIGHEST, $$($1_OPTIMIZATION))
+    $1_EXTRA_CFLAGS += $(C_O_FLAG_HIGHEST)
+    $1_EXTRA_CXXFLAGS += $(CXX_O_FLAG_HIGHEST)
+  else ifneq (, $$($1_OPTIMIZATION))
+    $$(error Unknown value for OPTIMIZATION: $$($1_OPTIMIZATION))
+  endif
 
-    # Now call add_native_source for each source file we are going to compile.
-    $$(foreach p,$$($1_SRCS),\
-        $$(eval $$(call add_native_source,$1,$$p,$$($1_OBJECT_DIR),\
-                        $$($1_CFLAGS) $$($1_EXTRA_CFLAGS),$$($1_CC),\
-			$$($1_CXXFLAGS) $$($1_EXTRA_CXXFLAGS),$(CXX),$$($1_ASFLAGS))))
+  # Now call add_native_source for each source file we are going to compile.
+  $$(foreach p,$$($1_SRCS), \
+      $$(eval $$(call add_native_source,$1,$$p,$$($1_OBJECT_DIR), \
+          $$($1_CFLAGS) $$($1_EXTRA_CFLAGS),$$($1_CC), \
+          $$($1_CXXFLAGS) $$($1_EXTRA_CXXFLAGS),$(CXX),$$($1_ASFLAGS))))
 
-    # On windows we need to create a resource file
-    ifeq ($(OPENJDK_TARGET_OS), windows)
-        ifneq (,$$($1_VERSIONINFO_RESOURCE))
-            $1_RES:=$$($1_OBJECT_DIR)/$$($1_BASENAME).res
-            $$($1_RES): $$($1_VERSIONINFO_RESOURCE)
+  # On windows we need to create a resource file
+  ifeq ($(OPENJDK_TARGET_OS), windows)
+    ifneq (,$$($1_VERSIONINFO_RESOURCE))
+      $1_RES:=$$($1_OBJECT_DIR)/$$($1_BASENAME).res
+      $$($1_RES): $$($1_VERSIONINFO_RESOURCE)
 		$(RC) $$($1_RC_FLAGS) $(CC_OUT_OPTION)$$@ $$($1_VERSIONINFO_RESOURCE)
-        endif
-        ifneq (,$$($1_MANIFEST))
-            $1_GEN_MANIFEST:=$$($1_OBJECT_DIR)/$$($1_PROGRAM).manifest
-            IMVERSIONVALUE:=$(JDK_MINOR_VERSION).$(JDK_MICRO_VERSION).$(JDK_UPDATE_VERSION).$(COOKED_BUILD_NUMBER)
-            $$($1_GEN_MANIFEST): $$($1_MANIFEST)
-		$(SED) 's%IMVERSION%$$(IMVERSIONVALUE)%g;s%PROGRAM%$$($1_PROGRAM)%g' $$< > $$@
-        endif
     endif
+    ifneq (,$$($1_MANIFEST))
+      $1_GEN_MANIFEST:=$$($1_OBJECT_DIR)/$$($1_PROGRAM).manifest
+      IMVERSIONVALUE:=$(JDK_MINOR_VERSION).$(JDK_MICRO_VERSION).$(JDK_UPDATE_VERSION).$(COOKED_BUILD_NUMBER)
+      $$($1_GEN_MANIFEST): $$($1_MANIFEST)
+		$(SED) 's%IMVERSION%$$(IMVERSIONVALUE)%g;s%PROGRAM%$$($1_PROGRAM)%g' $$< > $$@
+    endif
+  endif
 
-    # mapfile doesnt seem to be implemented on macosx (yet??)
-    ifneq ($(OPENJDK_TARGET_OS),macosx)
+  # mapfile doesnt seem to be implemented on macosx (yet??)
+  ifneq ($(OPENJDK_TARGET_OS),macosx)
     ifneq ($(OPENJDK_TARGET_OS),windows)
-        $1_REAL_MAPFILE:=$$($1_MAPFILE)
-        ifneq (,$$($1_REORDER))
-            $1_REAL_MAPFILE:=$$($1_OBJECT_DIR)/mapfile
+      $1_REAL_MAPFILE:=$$($1_MAPFILE)
+      ifneq (,$$($1_REORDER))
+        $1_REAL_MAPFILE:=$$($1_OBJECT_DIR)/mapfile
 
-            $$($1_REAL_MAPFILE) : $$($1_MAPFILE) $$($1_REORDER)
+        $$($1_REAL_MAPFILE) : $$($1_MAPFILE) $$($1_REORDER)
 		$$(MKDIR) -p $$(@D)
 		$$(CP) $$($1_MAPFILE) $$@.tmp
 		$$(SED) -e 's=OUTPUTDIR=$$($1_OBJECT_DIR)=' $$($1_REORDER) >> $$@.tmp
 		$$(MV) $$@.tmp $$@
-        endif
+      endif
     endif
+  endif
+
+  # Pickup extra OPENJDK_TARGET_OS_API and/or OPENJDK_TARGET_OS dependent variables
+  # for LDFLAGS and LDFLAGS_SUFFIX
+  $1_EXTRA_LDFLAGS:=$$($1_LDFLAGS_$(OPENJDK_TARGET_OS_API)) $$($1_LDFLAGS_$(OPENJDK_TARGET_OS))
+  $1_EXTRA_LDFLAGS_SUFFIX:=$$($1_LDFLAGS_SUFFIX_$(OPENJDK_TARGET_OS_API)) $$($1_LDFLAGS_SUFFIX_$(OPENJDK_TARGET_OS))
+  ifneq (,$$($1_REAL_MAPFILE))
+    $1_EXTRA_LDFLAGS += $(call SET_SHARED_LIBRARY_MAPFILE,$$($1_REAL_MAPFILE))
+  endif
+
+  $1 := $$($1_TARGET)
+  ifneq (,$$($1_LIBRARY))
+    # Generating a dynamic library.
+    $1_EXTRA_LDFLAGS+=$$(call SET_SHARED_LIBRARY_NAME,$$($1_BASENAME))
+    ifeq ($(OPENJDK_TARGET_OS), windows)
+      $1_EXTRA_LDFLAGS+="-implib:$$($1_OBJECT_DIR)/$$($1_LIBRARY).lib"
     endif
 
-    # Pickup extra OPENJDK_TARGET_OS_API and/or OPENJDK_TARGET_OS dependent variables
-    # for LDFLAGS and LDFLAGS_SUFFIX
-    $1_EXTRA_LDFLAGS:=$$($1_LDFLAGS_$(OPENJDK_TARGET_OS_API)) $$($1_LDFLAGS_$(OPENJDK_TARGET_OS))
-    $1_EXTRA_LDFLAGS_SUFFIX:=$$($1_LDFLAGS_SUFFIX_$(OPENJDK_TARGET_OS_API)) $$($1_LDFLAGS_SUFFIX_$(OPENJDK_TARGET_OS))
-    ifneq (,$$($1_REAL_MAPFILE))
-        $1_EXTRA_LDFLAGS += $(call SET_SHARED_LIBRARY_MAPFILE,$$($1_REAL_MAPFILE))
-    endif
+    $1_EXTRA_LDFLAGS_SUFFIX += $(GLOBAL_LDFLAGS_SUFFIX)
 
-    $1 := $$($1_TARGET)
-    ifneq (,$$($1_LIBRARY))
-        # Generating a dynamic library.
-        $1_EXTRA_LDFLAGS+=$$(call SET_SHARED_LIBRARY_NAME,$$($1_BASENAME))
+    ifneq (,$$($1_DEBUG_SYMBOLS))
+      ifeq ($(ENABLE_DEBUG_SYMBOLS), true)
         ifeq ($(OPENJDK_TARGET_OS), windows)
-            $1_EXTRA_LDFLAGS+="-implib:$$($1_OBJECT_DIR)/$$($1_LIBRARY).lib"
+          $1_EXTRA_LDFLAGS+="-pdb:$$($1_OBJECT_DIR)/$$($1_LIBRARY).pdb" \
+              "-map:$$($1_OBJECT_DIR)/$$($1_LIBRARY).map"
         endif
 
-        $1_EXTRA_LDFLAGS_SUFFIX += $(GLOBAL_LDFLAGS_SUFFIX)        
-
-        ifneq (,$$($1_DEBUG_SYMBOLS))
-            ifeq ($(ENABLE_DEBUG_SYMBOLS), true)
-                ifeq ($(OPENJDK_TARGET_OS), windows)
-                    $1_EXTRA_LDFLAGS+="-pdb:$$($1_OBJECT_DIR)/$$($1_LIBRARY).pdb" \
-				      "-map:$$($1_OBJECT_DIR)/$$($1_LIBRARY).map"
-                endif
-
-                ifneq ($$($1_OUTPUT_DIR),$$($1_OBJECT_DIR))
-                    $$($1_OUTPUT_DIR)/% : $$($1_OBJECT_DIR)/%
-			$(CP) $$< $$@
-                endif
-
-                ifeq ($(OPENJDK_TARGET_OS), solaris)
-                    # gobjcopy crashes on "empty" section headers with the SHF_ALLOC flag set.
-                    # Use $(FIX_EMPTY_SEC_HDR_FLAGS) to clear the SHF_ALLOC flag (if set) from
-                    # empty section headers until a fixed $(OBJCOPY) is available.
-                    # An empty section header has sh_addr == 0 and sh_size == 0.
-                    # This problem has only been seen on Solaris X64, but we call this tool
-                    # on all Solaris builds just in case.
-                    #
-                    # $(OBJCOPY) --add-gnu-debuglink=... corrupts SUNW_* sections.
-                    # Use $(ADD_GNU_DEBUGLINK) until a fixed $(OBJCOPY) is available.
-                    $$($1_OBJECT_DIR)/$$(LIBRARY_PREFIX)$$($1_LIBRARY).debuginfo : $$($1_TARGET) \
-					$(FIX_EMPTY_SEC_HDR_FLAGS) $(ADD_GNU_DEBUGLINK)
-			$(RM) $$@
-			$(FIX_EMPTY_SEC_HDR_FLAGS) $(LOG_INFO) $$<
-			$(OBJCOPY) --only-keep-debug $$< $$@
-			$(CD) $$(@D) && $(ADD_GNU_DEBUGLINK) $(LOG_INFO) $$(@F) $$<
-                else # not solaris
-                    $$($1_OBJECT_DIR)/$$(LIBRARY_PREFIX)$$($1_LIBRARY).debuginfo : $$($1_TARGET)
-			$(RM) $$@
-			$(OBJCOPY) --only-keep-debug $$< $$@
-			$(CD) $$(@D) && $(OBJCOPY) --add-gnu-debuglink=$$(@F) $$<
-                endif # Touch to not retrigger rule on rebuild
-			$(TOUCH) $$@
-
-                ifeq ($(ZIP_DEBUGINFO_FILES), true)
-                    $1 += $$($1_OUTPUT_DIR)/$$(LIBRARY_PREFIX)$$($1_LIBRARY).diz
-
-                    ifeq ($(OPENJDK_TARGET_OS), windows)
-                        $$($1_OBJECT_DIR)/$$(LIBRARY_PREFIX)$$($1_LIBRARY).diz : $$($1_TARGET)
-				$(CD) $$($1_OBJECT_DIR) \
-				&& $(ZIP) -q $$@ $$($1_LIBRARY).map $$($1_LIBRARY).pdb
-                    else
-                        $$($1_OBJECT_DIR)/$$(LIBRARY_PREFIX)$$($1_LIBRARY).diz : $$($1_TARGET) \
-					$$($1_OBJECT_DIR)/$$(LIBRARY_PREFIX)$$($1_LIBRARY).debuginfo
-				$(CD) $$($1_OBJECT_DIR) \
-				&& $(ZIP) -q $$@ $$(LIBRARY_PREFIX)$$($1_LIBRARY).debuginfo 
-                    endif
-                else
-                    ifeq ($(OPENJDK_TARGET_OS), windows)
-                        $1 += $$($1_OUTPUT_DIR)/$$($1_LIBRARY).map \
-			      $$($1_OUTPUT_DIR)/$$($1_LIBRARY).pdb
-                    else
-                        $1 += $$($1_OUTPUT_DIR)/$$(LIBRARY_PREFIX)$$($1_LIBRARY).debuginfo
-                    endif
-                endif
-            endif
+        ifneq ($$($1_OUTPUT_DIR),$$($1_OBJECT_DIR))
+          $$($1_OUTPUT_DIR)/% : $$($1_OBJECT_DIR)/%
+		$(CP) $$< $$@
         endif
 
-        $$($1_TARGET) : $$($1_EXPECTED_OBJS) $$($1_RES) $$($1_REAL_MAPFILE)
-		$$(call LINKING_MSG,$$($1_BASENAME))
-		$$($1_LD) $$($1_LDFLAGS) $$($1_EXTRA_LDFLAGS) $(LD_OUT_OPTION)$$@ \
-		$$($1_EXPECTED_OBJS) $$($1_RES) $$($1_LDFLAGS_SUFFIX) \
-		$$($1_EXTRA_LDFLAGS_SUFFIX)
+        ifeq ($(OPENJDK_TARGET_OS), solaris)
+          # gobjcopy crashes on "empty" section headers with the SHF_ALLOC flag set.
+          # Use $(FIX_EMPTY_SEC_HDR_FLAGS) to clear the SHF_ALLOC flag (if set) from
+          # empty section headers until a fixed $(OBJCOPY) is available.
+          # An empty section header has sh_addr == 0 and sh_size == 0.
+          # This problem has only been seen on Solaris X64, but we call this tool
+          # on all Solaris builds just in case.
+          #
+          # $(OBJCOPY) --add-gnu-debuglink=... corrupts SUNW_* sections.
+          # Use $(ADD_GNU_DEBUGLINK) until a fixed $(OBJCOPY) is available.
+          $$($1_OBJECT_DIR)/$$(LIBRARY_PREFIX)$$($1_LIBRARY).debuginfo : $$($1_TARGET) \
+              $(FIX_EMPTY_SEC_HDR_FLAGS) $(ADD_GNU_DEBUGLINK)
+		$(RM) $$@
+		$(FIX_EMPTY_SEC_HDR_FLAGS) $(LOG_INFO) $$<
+		$(OBJCOPY) --only-keep-debug $$< $$@
+		$(CD) $$(@D) && $(ADD_GNU_DEBUGLINK) $(LOG_INFO) $$(@F) $$<
+        else # not solaris
+          $$($1_OBJECT_DIR)/$$(LIBRARY_PREFIX)$$($1_LIBRARY).debuginfo : $$($1_TARGET)
+		$(RM) $$@
+		$(OBJCOPY) --only-keep-debug $$< $$@
+		$(CD) $$(@D) && $(OBJCOPY) --add-gnu-debuglink=$$(@F) $$<
+        endif # Touch to not retrigger rule on rebuild
+		$(TOUCH) $$@
 
+        ifeq ($(ZIP_DEBUGINFO_FILES), true)
+          $1 += $$($1_OUTPUT_DIR)/$$(LIBRARY_PREFIX)$$($1_LIBRARY).diz
+
+          ifeq ($(OPENJDK_TARGET_OS), windows)
+            $$($1_OBJECT_DIR)/$$(LIBRARY_PREFIX)$$($1_LIBRARY).diz : $$($1_TARGET)
+		$(CD) $$($1_OBJECT_DIR) \
+		&& $(ZIP) -q $$@ $$($1_LIBRARY).map $$($1_LIBRARY).pdb
+          else
+            $$($1_OBJECT_DIR)/$$(LIBRARY_PREFIX)$$($1_LIBRARY).diz : $$($1_TARGET) \
+                $$($1_OBJECT_DIR)/$$(LIBRARY_PREFIX)$$($1_LIBRARY).debuginfo
+		$(CD) $$($1_OBJECT_DIR) \
+		&& $(ZIP) -q $$@ $$(LIBRARY_PREFIX)$$($1_LIBRARY).debuginfo
+          endif
+        else
+          ifeq ($(OPENJDK_TARGET_OS), windows)
+            $1 += $$($1_OUTPUT_DIR)/$$($1_LIBRARY).map \
+                $$($1_OUTPUT_DIR)/$$($1_LIBRARY).pdb
+          else
+            $1 += $$($1_OUTPUT_DIR)/$$(LIBRARY_PREFIX)$$($1_LIBRARY).debuginfo
+          endif
+        endif
+      endif
     endif
 
-    ifneq (,$$($1_STATIC_LIBRARY))
-        # Generating a static library, ie object file archive.
-        $$($1_TARGET) : $$($1_EXPECTED_OBJS) $$($1_RES)
-	        $$(call ARCHIVING_MSG,$$($1_LIBRARY))
-	        $(AR) $$($1_AR_FLAGS) $(AR_OUT_OPTION)$$($1_TARGET) $$($1_EXPECTED_OBJS) \
-			$$($1_RES) $$($1_LDFLAGS_SUFFIX) $$($1_EXTRA_LDFLAGS_SUFFIX)
-    endif
+    $$($1_TARGET) : $$($1_EXPECTED_OBJS) $$($1_RES) $$($1_REAL_MAPFILE)
+	$$(call LINKING_MSG,$$($1_BASENAME))
+	$$($1_LD) $$($1_LDFLAGS) $$($1_EXTRA_LDFLAGS) $(LD_OUT_OPTION)$$@ \
+	$$($1_EXPECTED_OBJS) $$($1_RES) $$($1_LDFLAGS_SUFFIX) \
+	$$($1_EXTRA_LDFLAGS_SUFFIX)
 
-    ifneq (,$$($1_PROGRAM))
-        # A executable binary has been specified, setup the target for it.
-        ifneq (,$$($1_DEBUG_SYMBOLS))
-            ifeq ($(ENABLE_DEBUG_SYMBOLS), true)
-                ifeq ($(OPENJDK_TARGET_OS), windows)
-                    $1_EXTRA_LDFLAGS+="-pdb:$$($1_OBJECT_DIR)/$$($1_PROGRAM).pdb" \
-				      "-map:$$($1_OBJECT_DIR)/$$($1_PROGRAM).map"
-                endif
+  endif
 
-                ifneq ($$($1_OUTPUT_DIR),$$($1_OBJECT_DIR))
-                    $$($1_OUTPUT_DIR)/% : $$($1_OBJECT_DIR)/%
-			$(CP) $$< $$@
-                endif
+  ifneq (,$$($1_STATIC_LIBRARY))
+    # Generating a static library, ie object file archive.
+    $$($1_TARGET) : $$($1_EXPECTED_OBJS) $$($1_RES)
+	$$(call ARCHIVING_MSG,$$($1_LIBRARY))
+	$(AR) $$($1_AR_FLAGS) $(AR_OUT_OPTION)$$($1_TARGET) $$($1_EXPECTED_OBJS) \
+	    $$($1_RES) $$($1_LDFLAGS_SUFFIX) $$($1_EXTRA_LDFLAGS_SUFFIX)
+  endif
 
-                ifeq ($(OPENJDK_TARGET_OS), solaris)
-                    # gobjcopy crashes on "empty" section headers with the SHF_ALLOC flag set.
-                    # Use $(FIX_EMPTY_SEC_HDR_FLAGS) to clear the SHF_ALLOC flag (if set) from
-                    # empty section headers until a fixed $(OBJCOPY) is available.
-                    # An empty section header has sh_addr == 0 and sh_size == 0.
-                    # This problem has only been seen on Solaris X64, but we call this tool
-                    # on all Solaris builds just in case.
-                    #
-                    # $(OBJCOPY) --add-gnu-debuglink=... corrupts SUNW_* sections.
-                    # Use $(ADD_GNU_DEBUGLINK) until a fixed $(OBJCOPY) is available.
-                    $$($1_OBJECT_DIR)/$$($1_PROGRAM).debuginfo : $$($1_TARGET) \
-					$(FIX_EMPTY_SEC_HDR_FLAGS) $(ADD_GNU_DEBUGLINK)
-			$(RM) $$@
-			$(FIX_EMPTY_SEC_HDR_FLAGS) $(LOG_INFO) $$<
-			$(OBJCOPY) --only-keep-debug $$< $$@
-			$(CD) $$(@D) && $(ADD_GNU_DEBUGLINK) $(LOG_INFO) $$(@F) $$<
-                else # not solaris
-                    $$($1_OBJECT_DIR)/$$($1_PROGRAM).debuginfo : $$($1_TARGET)
-			$(RM) $$@
-			$(OBJCOPY) --only-keep-debug $$< $$@
-			$(CD) $$(@D) && $(OBJCOPY) --add-gnu-debuglink=$$(@F) $$<
-                endif
-			$(TOUCH) $$@
-
-                ifeq ($(ZIP_DEBUGINFO_FILES), true)
-                    $1 += $$($1_OUTPUT_DIR)/$$($1_PROGRAM).diz
-
-                    ifeq ($(OPENJDK_TARGET_OS), windows)
-                        $$($1_OBJECT_DIR)/$$($1_PROGRAM).diz : $$($1_TARGET)
-				$(CD) $$($1_OBJECT_DIR) \
-				&& $(ZIP) -q $$@ $$($1_PROGRAM).map $$($1_PROGRAM).pdb
-                    else
-                        $$($1_OBJECT_DIR)/$$(PROGRAM_PREFIX)$$($1_PROGRAM).diz : $$($1_TARGET) \
-					$$($1_OBJECT_DIR)/$$($1_PROGRAM).debuginfo
-				$(CD) $$($1_OBJECT_DIR) \
-				&& $(ZIP) -q $$@ $$($1_PROGRAM).debuginfo 
-                    endif
-                else
-                    ifeq ($(OPENJDK_TARGET_OS), windows)
-                        $1 += $$($1_OUTPUT_DIR)/$$($1_PROGRAM).map \
-			      $$($1_OUTPUT_DIR)/$$($1_PROGRAM).pdb
-                    else
-                        $1 += $$($1_OUTPUT_DIR)/$$($1_PROGRAM).debuginfo
-                    endif
-                endif
-            endif
+  ifneq (,$$($1_PROGRAM))
+    # A executable binary has been specified, setup the target for it.
+    ifneq (,$$($1_DEBUG_SYMBOLS))
+      ifeq ($(ENABLE_DEBUG_SYMBOLS), true)
+        ifeq ($(OPENJDK_TARGET_OS), windows)
+          $1_EXTRA_LDFLAGS+="-pdb:$$($1_OBJECT_DIR)/$$($1_PROGRAM).pdb" \
+              "-map:$$($1_OBJECT_DIR)/$$($1_PROGRAM).map"
         endif
 
-        $1_EXTRA_LDFLAGS_SUFFIX += $(GLOBAL_LDFLAGS_SUFFIX)
+        ifneq ($$($1_OUTPUT_DIR),$$($1_OBJECT_DIR))
+          $$($1_OUTPUT_DIR)/% : $$($1_OBJECT_DIR)/%
+		$(CP) $$< $$@
+        endif
 
-        $$($1_TARGET) : $$($1_EXPECTED_OBJS) $$($1_RES) $$($1_GEN_MANIFEST)
-	    	$$(call LINKING_EXE_MSG,$$($1_BASENAME))
-		$$($1_LDEXE) $$($1_LDFLAGS) $$($1_EXTRA_LDFLAGS) $(EXE_OUT_OPTION)$$($1_TARGET) \
-			$$($1_EXPECTED_OBJS) $$($1_RES) $$($1_LDFLAGS_SUFFIX) \
-			$$($1_EXTRA_LDFLAGS_SUFFIX)
+        ifeq ($(OPENJDK_TARGET_OS), solaris)
+          # gobjcopy crashes on "empty" section headers with the SHF_ALLOC flag set.
+          # Use $(FIX_EMPTY_SEC_HDR_FLAGS) to clear the SHF_ALLOC flag (if set) from
+          # empty section headers until a fixed $(OBJCOPY) is available.
+          # An empty section header has sh_addr == 0 and sh_size == 0.
+          # This problem has only been seen on Solaris X64, but we call this tool
+          # on all Solaris builds just in case.
+          #
+          # $(OBJCOPY) --add-gnu-debuglink=... corrupts SUNW_* sections.
+          # Use $(ADD_GNU_DEBUGLINK) until a fixed $(OBJCOPY) is available.
+          $$($1_OBJECT_DIR)/$$($1_PROGRAM).debuginfo : $$($1_TARGET) \
+              $(FIX_EMPTY_SEC_HDR_FLAGS) $(ADD_GNU_DEBUGLINK)
+		$(RM) $$@
+		$(FIX_EMPTY_SEC_HDR_FLAGS) $(LOG_INFO) $$<
+		$(OBJCOPY) --only-keep-debug $$< $$@
+		$(CD) $$(@D) && $(ADD_GNU_DEBUGLINK) $(LOG_INFO) $$(@F) $$<
+        else # not solaris
+          $$($1_OBJECT_DIR)/$$($1_PROGRAM).debuginfo : $$($1_TARGET)
+		$(RM) $$@
+		$(OBJCOPY) --only-keep-debug $$< $$@
+		$(CD) $$(@D) && $(OBJCOPY) --add-gnu-debuglink=$$(@F) $$<
+        endif
+		$(TOUCH) $$@
+
+        ifeq ($(ZIP_DEBUGINFO_FILES), true)
+          $1 += $$($1_OUTPUT_DIR)/$$($1_PROGRAM).diz
+
+          ifeq ($(OPENJDK_TARGET_OS), windows)
+            $$($1_OBJECT_DIR)/$$($1_PROGRAM).diz : $$($1_TARGET)
+		$(CD) $$($1_OBJECT_DIR) \
+		&& $(ZIP) -q $$@ $$($1_PROGRAM).map $$($1_PROGRAM).pdb
+          else
+            $$($1_OBJECT_DIR)/$$(PROGRAM_PREFIX)$$($1_PROGRAM).diz : $$($1_TARGET) \
+                $$($1_OBJECT_DIR)/$$($1_PROGRAM).debuginfo
+		$(CD) $$($1_OBJECT_DIR) \
+		&& $(ZIP) -q $$@ $$($1_PROGRAM).debuginfo
+          endif
+        else
+          ifeq ($(OPENJDK_TARGET_OS), windows)
+            $1 += $$($1_OUTPUT_DIR)/$$($1_PROGRAM).map \
+                $$($1_OUTPUT_DIR)/$$($1_PROGRAM).pdb
+          else
+            $1 += $$($1_OUTPUT_DIR)/$$($1_PROGRAM).debuginfo
+          endif
+        endif
+      endif
+    endif
+
+    $1_EXTRA_LDFLAGS_SUFFIX += $(GLOBAL_LDFLAGS_SUFFIX)
+
+    $$($1_TARGET) : $$($1_EXPECTED_OBJS) $$($1_RES) $$($1_GEN_MANIFEST)
+	$$(call LINKING_EXE_MSG,$$($1_BASENAME))
+	$$($1_LDEXE) $$($1_LDFLAGS) $$($1_EXTRA_LDFLAGS) $(EXE_OUT_OPTION)$$($1_TARGET) \
+	$$($1_EXPECTED_OBJS) $$($1_RES) $$($1_LDFLAGS_SUFFIX) \
+	$$($1_EXTRA_LDFLAGS_SUFFIX)
         ifneq (,$$($1_GEN_MANIFEST))
-		$(MT) -nologo -manifest $$($1_GEN_MANIFEST) -outputresource:$$@;#1
+	  $(MT) -nologo -manifest $$($1_GEN_MANIFEST) -outputresource:$$@;#1
         endif
         # This only works if the openjdk_codesign identity is present on the system. Let
         # silently fail otherwise.
         ifneq (,$(CODESIGN))
-            ifneq (,$$($1_CODESIGN))
-		$(CODESIGN) -s openjdk_codesign $$@
-            endif
+          ifneq (,$$($1_CODESIGN))
+	    $(CODESIGN) -s openjdk_codesign $$@
+          endif
         endif
-    endif
+  endif
 endef
diff --git a/common/makefiles/RMICompilation.gmk b/common/makefiles/RMICompilation.gmk
index 4727412..f994a7d 100644
--- a/common/makefiles/RMICompilation.gmk
+++ b/common/makefiles/RMICompilation.gmk
@@ -24,74 +24,74 @@
 #
 
 define SetupRMICompilation
-    # param 1 is a name for a variable to depend on.
-    # param 2 and up are named args.
-    #   CLASSES:=List of classes to generate stubs for
-    #   CLASSES_DIR:=Directory where to look for classes
-    #   STUB_CLASSES_DIR:=Directory in where to put stub classes
-    #   RUN_V11:=Set to run rmic with -v1.1
-    #   RUN_V12:=Set to run rmic with -v1.2
-    #   RUN_IIOP:=Set to run rmic with -iiop
-    #   RUN_IIOP_STDPKG:=Set to run rmic with -iiop -standardPackage
-    #   KEEP_GENERATED:=Set to keep generated sources around
-    $(foreach i,2 3 4 5 6 7 8 9 10 11 12 13 14 15, $(if $($i),$1_$(strip $($i)))$(NEWLINE))
-    $(call LogSetupMacroEntry,SetupRMICompilation($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 SetupRMICompilation, please update RMICompilation.gmk))
+  # param 1 is a name for a variable to depend on.
+  # param 2 and up are named args.
+  #   CLASSES:=List of classes to generate stubs for
+  #   CLASSES_DIR:=Directory where to look for classes
+  #   STUB_CLASSES_DIR:=Directory in where to put stub classes
+  #   RUN_V11:=Set to run rmic with -v1.1
+  #   RUN_V12:=Set to run rmic with -v1.2
+  #   RUN_IIOP:=Set to run rmic with -iiop
+  #   RUN_IIOP_STDPKG:=Set to run rmic with -iiop -standardPackage
+  #   KEEP_GENERATED:=Set to keep generated sources around
+  $(foreach i,2 3 4 5 6 7 8 9 10 11 12 13 14 15, $(if $($i),$1_$(strip $($i)))$(NEWLINE))
+  $(call LogSetupMacroEntry,SetupRMICompilation($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 SetupRMICompilation, please update RMICompilation.gmk))
 
-    $1_DEP_FILE := $$($1_STUB_CLASSES_DIR)/$1_rmic
+  $1_DEP_FILE := $$($1_STUB_CLASSES_DIR)/$1_rmic
 
-    $1_CLASSES_SLASH := $$(subst .,/,$$($1_CLASSES))
-    $1_CLASS_FILES := $$(addprefix $$($1_CLASSES_DIR)/,$$(addsuffix .class,$$($1_CLASSES_SLASH)))
-    $1_STUB_FILES := $$(addprefix $$($1_STUB_CLASSES_DIR)/,$$(addsuffix _Stub.class,$$($1_CLASSES_SLASH)))
-    $1_TARGETS := $$($1_STUB_FILES)
-    $1_ARGS :=
-    ifneq (,$$($1_RUN_V11))
-        $1_SKEL_FILES := $$(addprefix $$($1_STUB_CLASSES_DIR)/,$$(addsuffix _Skel.class,$$($1_CLASSES_SLASH)))
-        $1_TARGETS += $$($1_SKEL_FILES)
-        $1_ARGS += -v1.1
-    endif
-    ifneq (,$$($1_RUN_V12))
-        $1_ARGS += -v1.2
-    endif
+  $1_CLASSES_SLASH := $$(subst .,/,$$($1_CLASSES))
+  $1_CLASS_FILES := $$(addprefix $$($1_CLASSES_DIR)/,$$(addsuffix .class,$$($1_CLASSES_SLASH)))
+  $1_STUB_FILES := $$(addprefix $$($1_STUB_CLASSES_DIR)/,$$(addsuffix _Stub.class,$$($1_CLASSES_SLASH)))
+  $1_TARGETS := $$($1_STUB_FILES)
+  $1_ARGS :=
+  ifneq (,$$($1_RUN_V11))
+    $1_SKEL_FILES := $$(addprefix $$($1_STUB_CLASSES_DIR)/,$$(addsuffix _Skel.class,$$($1_CLASSES_SLASH)))
+    $1_TARGETS += $$($1_SKEL_FILES)
+    $1_ARGS += -v1.1
+  endif
+  ifneq (,$$($1_RUN_V12))
+    $1_ARGS += -v1.2
+  endif
 
-    $1_TIE_BASE_FILES := $$(foreach f,$$($1_CLASSES_SLASH),$$(dir $$f)_$$(notdir $$f))
-    $1_TIE_FILES := $$(addprefix $$($1_STUB_CLASSES_DIR)/org/omg/stub/,$$(addsuffix _Tie.class,$$($1_TIE_BASE_FILES)))
-    $1_TIE_STDPKG_FILES := $$(addprefix $$($1_STUB_CLASSES_DIR)/,$$(addsuffix _Tie.class,$$($1_TIE_BASE_FILES)))
+  $1_TIE_BASE_FILES := $$(foreach f,$$($1_CLASSES_SLASH),$$(dir $$f)_$$(notdir $$f))
+  $1_TIE_FILES := $$(addprefix $$($1_STUB_CLASSES_DIR)/org/omg/stub/,$$(addsuffix _Tie.class,$$($1_TIE_BASE_FILES)))
+  $1_TIE_STDPKG_FILES := $$(addprefix $$($1_STUB_CLASSES_DIR)/,$$(addsuffix _Tie.class,$$($1_TIE_BASE_FILES)))
 
-    ifneq (,$$($1_RUN_IIOP))
-        $1_TARGETS += $$($1_TIE_FILES)
-        $1_ARGS += -iiop
-    endif
-    ifneq (,$$($1_RUN_IIOP_STDPKG))
-        $1_TARGETS += $$($1_TIE_STDPKG_FILES)
-        $1_ARGS2 := -iiop -standardPackage
-    endif
+  ifneq (,$$($1_RUN_IIOP))
+    $1_TARGETS += $$($1_TIE_FILES)
+    $1_ARGS += -iiop
+  endif
+  ifneq (,$$($1_RUN_IIOP_STDPKG))
+    $1_TARGETS += $$($1_TIE_STDPKG_FILES)
+    $1_ARGS2 := -iiop -standardPackage
+  endif
 
-    ifneq (,$$($1_KEEP_GENERATED))
-        $1_ARGS += -keepgenerated
-        $1_TARGETS += $$(subst .class,.java,$$($1_TARGETS))
-    endif
+  ifneq (,$$($1_KEEP_GENERATED))
+    $1_ARGS += -keepgenerated
+    $1_TARGETS += $$(subst .class,.java,$$($1_TARGETS))
+  endif
 
-    $1_DOLLAR_SAFE_CLASSES := $$(subst $$$$,\$$$$,$$($1_CLASSES))
+  $1_DOLLAR_SAFE_CLASSES := $$(subst $$$$,\$$$$,$$($1_CLASSES))
 
-    $$($1_TARGETS): $$($1_DEP_FILE) $$($1_CLASS_FILES)
+  $$($1_TARGETS): $$($1_DEP_FILE) $$($1_CLASS_FILES)
 
-    $$($1_DEP_FILE): $$($1_CLASS_FILES)
+  $$($1_DEP_FILE): $$($1_CLASS_FILES)
 	$(MKDIR) -p $$($1_STUB_CLASSES_DIR)
 	if [ "x$$($1_ARGS)" != "x" ]; then \
-	    $(ECHO) $(LOG_INFO) Running rmic $$($1_ARGS) for $$($1_DOLLAR_SAFE_CLASSES) &&\
-	    $(RMIC) $$($1_ARGS) -classpath "$$($1_CLASSES_DIR)" \
-			-d $$($1_STUB_CLASSES_DIR) $$($1_DOLLAR_SAFE_CLASSES);\
+	  $(ECHO) $(LOG_INFO) Running rmic $$($1_ARGS) for $$($1_DOLLAR_SAFE_CLASSES) && \
+	  $(RMIC) $$($1_ARGS) -classpath "$$($1_CLASSES_DIR)" \
+	      -d $$($1_STUB_CLASSES_DIR) $$($1_DOLLAR_SAFE_CLASSES); \
 	fi;
 	if [ "x$$($1_ARGS2)" != "x" ]; then \
-	    $(ECHO) $(LOG_INFO) Running rmic $$($1_ARGS2) for $$($1_DOLLAR_SAFE_CLASSES) &&\
-	    $(RMIC) $$($1_ARGS2) -classpath "$$($1_CLASSES_DIR)" \
-			-d $$($1_STUB_CLASSES_DIR) $$($1_DOLLAR_SAFE_CLASSES);\
+	  $(ECHO) $(LOG_INFO) Running rmic $$($1_ARGS2) for $$($1_DOLLAR_SAFE_CLASSES) && \
+	  $(RMIC) $$($1_ARGS2) -classpath "$$($1_CLASSES_DIR)" \
+	      -d $$($1_STUB_CLASSES_DIR) $$($1_DOLLAR_SAFE_CLASSES); \
 	fi;
 
 
-    $1 := $$($1_TARGETS)
+  $1 := $$($1_TARGETS)
 
-    # By marking as secondary, this "touch" file doesn't need to be touched and will never exist.
-    .SECONDARY: $$($1_DEP_FILE)
+  # By marking as secondary, this "touch" file doesn't need to be touched and will never exist.
+  .SECONDARY: $$($1_DEP_FILE)
 endef
diff --git a/common/makefiles/devkit/Makefile b/common/makefiles/devkit/Makefile
index 000527e..a6a5ca9 100644
--- a/common/makefiles/devkit/Makefile
+++ b/common/makefiles/devkit/Makefile
@@ -25,12 +25,12 @@
 
 ##########################################################################################
 #
-# This Makefile, together with Tools.gmk, can be used to compile a set of 
-# gcc based cross compilation, portable, self contained packages, capable 
+# This Makefile, together with Tools.gmk, can be used to compile a set of
+# gcc based cross compilation, portable, self contained packages, capable
 # of building OpenJDK.
-# 
-# In addition to the makefiles, access to Oracle Linux installation 
-# media is required. This has been tested against Oracle Enterprise Linux 
+#
+# In addition to the makefiles, access to Oracle Linux installation
+# media is required. This has been tested against Oracle Enterprise Linux
 # 5.5. Set variables RPM_DIR_x86_64 and RPM_DIR_i686 respectively to point
 # to directory containing the RPMs.
 #
@@ -43,9 +43,9 @@
 #
 # To build the full set of crosstools, use a command line looking like this:
 #
-# make tars  RPM_DIR_x86_64=/tmp/oel55-x86_64/Server/ RPM_DIR_i686=/tmp/oel55-i686/Server/
+# make tars RPM_DIR_x86_64=/tmp/oel55-x86_64/Server/ RPM_DIR_i686=/tmp/oel55-i686/Server/
 #
-# To create a x86_64 package without the redundant i686 cross compiler, do 
+# To create a x86_64 package without the redundant i686 cross compiler, do
 # like this:
 #
 # make tars platforms=x86_64-unknown-linux-gnu RPM_DIR_x86_64=/tmp/oel55-x86_64/Server/ RPM_DIR_i686=/tmp/oel55-i686/Server/
@@ -54,70 +54,68 @@
 # Main makefile which iterates over all host and target platforms.
 #
 
-os		:= $(shell uname -o)
-cpu 		:= x86_64
+os := $(shell uname -o)
+cpu := x86_64
 #$(shell uname -p)
 
 #
 # This wrapper script can handle exactly these platforms
 #
-platforms	:= $(foreach p,x86_64 i686,$(p)-unknown-linux-gnu)
-#platforms	:= $(foreach p,x86_64,$(p)-unknown-linux-gnu)
+platforms := $(foreach p,x86_64 i686,$(p)-unknown-linux-gnu)
+#platforms := $(foreach p,x86_64,$(p)-unknown-linux-gnu)
 
 # Figure out what platform this is building on.
-me		:= $(cpu)-$(if $(findstring Linux,$(os)),unknown-linux-gnu)
+me := $(cpu)-$(if $(findstring Linux,$(os)),unknown-linux-gnu)
 
 $(info Building on platform $(me))
 
-all compile	: $(platforms)
+all compile : $(platforms)
 
 ifeq (,$(SKIP_ME))
-$(foreach p,$(filter-out $(me),$(platforms)),$(eval $(p) : $$(me)))
+  $(foreach p,$(filter-out $(me),$(platforms)),$(eval $(p) : $$(me)))
 endif
 
-OUTPUT_ROOT	= $(abspath ../../../build/devkit)
-RESULT		= $(OUTPUT_ROOT)/result
+OUTPUT_ROOT = $(abspath ../../../build/devkit)
+RESULT = $(OUTPUT_ROOT)/result
 
-submakevars	= HOST=$@ BUILD=$(me)				\
-			RESULT=$(RESULT) PREFIX=$(RESULT)/$@    \
-			OUTPUT_ROOT=$(OUTPUT_ROOT)
-$(platforms)	:
-		@echo 'Building compilers for $@'
-		@echo 'Targets: $(platforms)'
-		for p in $@ $(filter-out $@,$(platforms)); do	\
-			$(MAKE) -f Tools.gmk all $(submakevars)	\
-				TARGET=$$p || exit 1	;	\
-		done
-		@echo 'Building ccache program for $@'
-		$(MAKE) -f Tools.gmk ccache $(submakevars) TARGET=$@
-		@echo 'All done"'
+submakevars = HOST=$@ BUILD=$(me) \
+    RESULT=$(RESULT) PREFIX=$(RESULT)/$@ \
+    OUTPUT_ROOT=$(OUTPUT_ROOT)
+$(platforms) :
+	@echo 'Building compilers for $@'
+	@echo 'Targets: $(platforms)'
+	for p in $@ $(filter-out $@,$(platforms)); do \
+	  $(MAKE) -f Tools.gmk all $(submakevars) \
+	      TARGET=$$p || exit 1 ; \
+	done
+	@echo 'Building ccache program for $@'
+	$(MAKE) -f Tools.gmk ccache $(submakevars) TARGET=$@
+	@echo 'All done"'
 
 $(foreach a,i686 x86_64,$(eval $(a) : $(filter $(a)%,$(platforms))))
 
-ia32		:  i686
-today		:= $(shell date +%Y%m%d)
+ia32 : i686
+today := $(shell date +%Y%m%d)
 
 
 define Mktar
-$(1)_tar	= $$(RESULT)/sdk-$(1)-$$(today).tar.gz
-$$($(1)_tar)	: PLATFORM = $(1)
-TARFILES	+= $$($(1)_tar)
-$$($(1)_tar)	: $(1) $$(shell find $$(RESULT)/$(1))
+  $(1)_tar = $$(RESULT)/sdk-$(1)-$$(today).tar.gz
+  $$($(1)_tar) : PLATFORM = $(1)
+  TARFILES += $$($(1)_tar)
+  $$($(1)_tar) : $(1) $$(shell find $$(RESULT)/$(1))
 endef
 
 $(foreach p,$(platforms),$(eval $(call Mktar,$(p))))
 
-tars		: all $(TARFILES)
-onlytars	: $(TARFILES)
-%.tar.gz	:
-		@echo 'Creating compiler package $@'
-		cd $(RESULT)/$(PLATFORM) && tar -czf $@ *
-		touch $@
+tars : all $(TARFILES)
+onlytars : $(TARFILES)
+%.tar.gz :
+	@echo 'Creating compiler package $@'
+	cd $(RESULT)/$(PLATFORM) && tar -czf $@ *
+	touch $@
 
-clean		:
+clean :
 	rm -rf build result
 
-FORCE		:
-.PHONY		: $(configs) $(platforms)
-
-
+FORCE :
+.PHONY : $(configs) $(platforms)
diff --git a/common/makefiles/devkit/Tools.gmk b/common/makefiles/devkit/Tools.gmk
index 57d331f..457dacb 100644
--- a/common/makefiles/devkit/Tools.gmk
+++ b/common/makefiles/devkit/Tools.gmk
@@ -26,15 +26,15 @@
 ##########################################################################################
 #
 # Workhorse makefile for creating ONE cross compiler
-# Needs either to be from BUILD -> BUILD OR have 
+# Needs either to be from BUILD -> BUILD OR have
 # BUILD -> HOST prebuilt
 #
-# NOTE: There is a bug here. We don't limit the 
-# PATH when building BUILD -> BUILD, which means that 
+# NOTE: There is a bug here. We don't limit the
+# PATH when building BUILD -> BUILD, which means that
 # if you configure after you've once build the BUILD->BUILD
 # compiler THAT one will be picked up as the compiler for itself.
 # This is not so great, especially if you did a partial delete
-# of the target tree. 
+# of the target tree.
 #
 # Fix this...
 #
@@ -43,45 +43,45 @@
 $(info HOST=$(HOST))
 $(info BUILD=$(BUILD))
 
-ARCH		:= $(word 1,$(subst -, ,$(TARGET)))
+ARCH := $(word 1,$(subst -, ,$(TARGET)))
 
 ##########################################################################################
 # Define external dependencies
 
 # Latest that could be made to work.
-gcc_ver		:= gcc-4.7.3
-binutils_ver	:= binutils-2.22
-ccache_ver	:= ccache-3.1.9
-mpfr_ver        := mpfr-3.0.1
-gmp_ver         := gmp-4.3.2
-mpc_ver		:= mpc-1.0.1
+gcc_ver := gcc-4.7.3
+binutils_ver := binutils-2.22
+ccache_ver := ccache-3.1.9
+mpfr_ver := mpfr-3.0.1
+gmp_ver := gmp-4.3.2
+mpc_ver := mpc-1.0.1
 
-GCC		:= http://ftp.gnu.org/pub/gnu/gcc/$(gcc_ver)/$(gcc_ver).tar.bz2
-BINUTILS	:= http://ftp.gnu.org/pub/gnu/binutils/$(binutils_ver).tar.bz2
-CCACHE		:= http://samba.org/ftp/ccache/$(ccache_ver).tar.gz
-MPFR		:= http://www.mpfr.org/${mpfr_ver}/${mpfr_ver}.tar.bz2
-GMP 		:= http://ftp.gnu.org/pub/gnu/gmp/${gmp_ver}.tar.bz2
-MPC		:= http://www.multiprecision.org/mpc/download/${mpc_ver}.tar.gz
+GCC := http://ftp.gnu.org/pub/gnu/gcc/$(gcc_ver)/$(gcc_ver).tar.bz2
+BINUTILS := http://ftp.gnu.org/pub/gnu/binutils/$(binutils_ver).tar.bz2
+CCACHE := http://samba.org/ftp/ccache/$(ccache_ver).tar.gz
+MPFR := http://www.mpfr.org/${mpfr_ver}/${mpfr_ver}.tar.bz2
+GMP := http://ftp.gnu.org/pub/gnu/gmp/${gmp_ver}.tar.bz2
+MPC := http://www.multiprecision.org/mpc/download/${mpc_ver}.tar.gz
 
 # RPMs in OEL5.5
-RPM_LIST 	:= \
-		kernel-headers \
-		glibc-2 glibc-headers glibc-devel \
-		cups-libs cups-devel \
-		libX11 libX11-devel \
-		xorg-x11-proto-devel \
-		alsa-lib alsa-lib-devel \
-		libXext libXext-devel \
-		libXtst libXtst-devel \
-		libXrender libXrender-devel \
-		freetype freetype-devel \
-		libXt libXt-devel \
-		libSM libSM-devel \
-		libICE libICE-devel \
-		libXi libXi-devel \
-		libXdmcp libXdmcp-devel \
-		libXau libXau-devel \
-		libgcc
+RPM_LIST := \
+    kernel-headers \
+    glibc-2 glibc-headers glibc-devel \
+    cups-libs cups-devel \
+    libX11 libX11-devel \
+    xorg-x11-proto-devel \
+    alsa-lib alsa-lib-devel \
+    libXext libXext-devel \
+    libXtst libXtst-devel \
+    libXrender libXrender-devel \
+    freetype freetype-devel \
+    libXt libXt-devel \
+    libSM libSM-devel \
+    libICE libICE-devel \
+    libXi libXi-devel \
+    libXdmcp libXdmcp-devel \
+    libXau libXau-devel \
+    libgcc
 
 
 ifeq ($(ARCH),x86_64)
@@ -90,7 +90,7 @@
   ifeq ($(BUILD),$(HOST))
     ifeq ($(TARGET),$(HOST))
       # When building the native compiler for x86_64, enable mixed mode.
-      RPM_ARCHS	+= i386 i686
+      RPM_ARCHS += i386 i686
     endif
   endif
 else
@@ -110,47 +110,47 @@
 
 # Ensure we have 32-bit libs also for x64. We enable mixed-mode.
 ifeq (x86_64,$(ARCH))
-  LIBDIRS	:= lib64 lib
-  CFLAGS_lib	:= -m32
+  LIBDIRS := lib64 lib
+  CFLAGS_lib := -m32
 else
-  LIBDIRS 	:= lib
+  LIBDIRS := lib
 endif
 
 # Define directories
-RESULT		:= $(OUTPUT_ROOT)/result
-BUILDDIR	:= $(OUTPUT_ROOT)/$(HOST)/$(TARGET)
-PREFIX		:= $(RESULT)/$(HOST)
-TARGETDIR	:= $(PREFIX)/$(TARGET)
-SYSROOT		:= $(TARGETDIR)/sys-root
-DOWNLOAD	:= $(OUTPUT_ROOT)/download
-SRCDIR		:= $(OUTPUT_ROOT)/src
+RESULT := $(OUTPUT_ROOT)/result
+BUILDDIR := $(OUTPUT_ROOT)/$(HOST)/$(TARGET)
+PREFIX := $(RESULT)/$(HOST)
+TARGETDIR := $(PREFIX)/$(TARGET)
+SYSROOT := $(TARGETDIR)/sys-root
+DOWNLOAD := $(OUTPUT_ROOT)/download
+SRCDIR := $(OUTPUT_ROOT)/src
 
 # Marker file for unpacking rpms
-rpms		:= $(SYSROOT)/rpms_unpacked
+rpms := $(SYSROOT)/rpms_unpacked
 
-# Need to patch libs that are linker scripts to use non-absolute paths 
-libs		:= $(SYSROOT)/libs_patched
+# Need to patch libs that are linker scripts to use non-absolute paths
+libs := $(SYSROOT)/libs_patched
 
 ##########################################################################################
 # Unpack source packages
 
-# Generate downloading + unpacking of sources. 
+# Generate downloading + unpacking of sources.
 define Download
-$(1)_DIR	= $(abspath $(SRCDIR)/$(basename $(basename $(notdir $($(1))))))
-$(1)_CFG	= $$($(1)_DIR)/configure
-$(1)_FILE	= $(DOWNLOAD)/$(notdir $($(1)))
+  $(1)_DIR = $(abspath $(SRCDIR)/$(basename $(basename $(notdir $($(1))))))
+  $(1)_CFG = $$($(1)_DIR)/configure
+  $(1)_FILE = $(DOWNLOAD)/$(notdir $($(1)))
 
-$$($(1)_CFG)	: $$($(1)_FILE)
-		mkdir -p $$(SRCDIR)
-		tar -C $$(SRCDIR) -x$$(if $$(findstring .gz, $$<),z,j)f $$<
-		$$(foreach p,$$(abspath $$(wildcard $$(notdir $$($(1)_DIR)).patch)),	\
-			echo PATCHING $$(p) ;						\
-			patch -d $$($(1)_DIR) -p1 -i $$(p) ; 				\
-			)
-		touch $$@
+  $$($(1)_CFG) : $$($(1)_FILE)
+	mkdir -p $$(SRCDIR)
+	tar -C $$(SRCDIR) -x$$(if $$(findstring .gz, $$<),z,j)f $$<
+	$$(foreach p,$$(abspath $$(wildcard $$(notdir $$($(1)_DIR)).patch)), \
+	  echo PATCHING $$(p) ; \
+	  patch -d $$($(1)_DIR) -p1 -i $$(p) ; \
+	)
+	touch $$@
 
-$$($(1)_FILE)	:
-		wget -P $(DOWNLOAD) $$($(1))
+  $$($(1)_FILE) :
+	wget -P $(DOWNLOAD) $$($(1))
 endef
 
 # Download and unpack all source packages
@@ -159,48 +159,48 @@
 ##########################################################################################
 # Unpack RPMS
 
-# Note. For building linux you should install rpm2cpio. 
+# Note. For building linux you should install rpm2cpio.
 define unrpm
-$(SYSROOT)/$(notdir $(1)).unpacked	\
-		: $(1)
-$$(rpms)	: $(SYSROOT)/$(notdir $(1)).unpacked
+  $(SYSROOT)/$(notdir $(1)).unpacked \
+    : $(1)
+  $$(rpms) : $(SYSROOT)/$(notdir $(1)).unpacked
 endef
 
-%.unpacked	:
-		$(info Unpacking target rpms and libraries from $<)
-		@(mkdir -p $(@D);					\
-		cd $(@D);						\
-		rpm2cpio $< | 						\
-			cpio --extract --make-directories 		\
-				-f 					\
-				"./usr/share/doc/*" 			\
-				"./usr/share/man/*"			\
-				"./usr/X11R6/man/*" 			\
-				"*/X11/locale/*"			\
-				|| die ; )
-		touch $@
+%.unpacked :
+	$(info Unpacking target rpms and libraries from $<)
+	@(mkdir -p $(@D); \
+	cd $(@D); \
+	rpm2cpio $< | \
+	    cpio --extract --make-directories \
+	        -f \
+	        "./usr/share/doc/*" \
+	        "./usr/share/man/*" \
+	        "./usr/X11R6/man/*" \
+	        "*/X11/locale/*" \
+	    || die ; )
+	touch $@
 
 $(foreach p,$(RPM_FILE_LIST),$(eval $(call unrpm,$(p))))
 
 ##########################################################################################
 
-# Note: MUST create a <sys-root>/usr/lib even if not really needed. 
-# gcc will use a path relative to it to resolve lib64. (x86_64). 
-# we're creating multi-lib compiler with 32bit libc as well, so we should 
+# Note: MUST create a <sys-root>/usr/lib even if not really needed.
+# gcc will use a path relative to it to resolve lib64. (x86_64).
+# we're creating multi-lib compiler with 32bit libc as well, so we should
 # have it anyway, but just to make sure...
 # Patch libc.so and libpthread.so to force linking against libraries in sysroot
 # and not the ones installed on the build machine.
-$(libs)		: $(rpms)
-		@echo Patching libc and pthreads
-		@(for f in `find $(SYSROOT) -name libc.so -o -name libpthread.so`; do \
-			(cat $$f | sed -e 's|/usr/lib64/||g' 		\
-				       -e 's|/usr/lib/||g'		\
-				       -e 's|/lib64/||g'		\
-				       -e 's|/lib/||g' ) > $$f.tmp ;	\
-			mv $$f.tmp $$f				;	\
-		done)
-		@mkdir -p $(SYSROOT)/usr/lib
-		@touch $@
+$(libs) : $(rpms)
+	@echo Patching libc and pthreads
+	@(for f in `find $(SYSROOT) -name libc.so -o -name libpthread.so`; do \
+	  (cat $$f | sed -e 's|/usr/lib64/||g' \
+	      -e 's|/usr/lib/||g' \
+	      -e 's|/lib64/||g' \
+	      -e 's|/lib/||g' ) > $$f.tmp ; \
+	  mv $$f.tmp $$f ; \
+	done)
+	@mkdir -p $(SYSROOT)/usr/lib
+	@touch $@
 
 ##########################################################################################
 
@@ -210,264 +210,264 @@
 ##########################################################################################
 
 # Default base config
-CONFIG		= --target=$(TARGET) 					\
-			--host=$(HOST) --build=$(BUILD)			\
-			--prefix=$(PREFIX)
+CONFIG = --target=$(TARGET) \
+    --host=$(HOST) --build=$(BUILD) \
+    --prefix=$(PREFIX)
 
-PATHEXT 	= $(RESULT)/$(BUILD)/bin:
+PATHEXT = $(RESULT)/$(BUILD)/bin:
 
-PATHPRE		= PATH=$(PATHEXT)$(PATH)
-BUILDPAR	= -j16
+PATHPRE = PATH=$(PATHEXT)$(PATH)
+BUILDPAR = -j16
 
 # Default commands to when making
-MAKECMD		=
-INSTALLCMD	= install
+MAKECMD =
+INSTALLCMD = install
 
 
-declare_tools   = CC$(1)=$(2)gcc LD$(1)=$(2)ld AR$(1)=$(2)ar AS$(1)=$(2)as RANLIB$(1)=$(2)ranlib CXX$(1)=$(2)g++ OBJDUMP$(1)=$(2)objdump
+declare_tools = CC$(1)=$(2)gcc LD$(1)=$(2)ld AR$(1)=$(2)ar AS$(1)=$(2)as RANLIB$(1)=$(2)ranlib CXX$(1)=$(2)g++ OBJDUMP$(1)=$(2)objdump
 
 ifeq ($(HOST),$(BUILD))
-ifeq ($(HOST),$(TARGET))
-TOOLS		= $(call declare_tools,_FOR_TARGET,)
-endif
+  ifeq ($(HOST),$(TARGET))
+    TOOLS = $(call declare_tools,_FOR_TARGET,)
+  endif
 endif
 
-TOOLS		?=  $(call declare_tools,_FOR_TARGET,$(TARGET)-)
+TOOLS ?= $(call declare_tools,_FOR_TARGET,$(TARGET)-)
 
 ##########################################################################################
 
-# Create a TARGET bfd + libiberty only. 
+# Create a TARGET bfd + libiberty only.
 # Configure one or two times depending on mulitlib arch.
-# If multilib, the second should be 32-bit, and we resolve 
+# If multilib, the second should be 32-bit, and we resolve
 # CFLAG_<name> to most likely -m32.
 define mk_bfd
-$$(info Libs for $(1)) 
-$$(BUILDDIR)/$$(binutils_ver)-$(subst /,-,$(1))/Makefile \
-		: CFLAGS += $$(CFLAGS_$(1))
-$$(BUILDDIR)/$$(binutils_ver)-$(subst /,-,$(1))/Makefile \
-		: LIBDIRS = --libdir=$(TARGETDIR)/$(1)
+  $$(info Libs for $(1))
+  $$(BUILDDIR)/$$(binutils_ver)-$(subst /,-,$(1))/Makefile \
+      : CFLAGS += $$(CFLAGS_$(1))
+  $$(BUILDDIR)/$$(binutils_ver)-$(subst /,-,$(1))/Makefile \
+      : LIBDIRS = --libdir=$(TARGETDIR)/$(1)
 
-bfdlib		+= $$(TARGETDIR)/$$(binutils_ver)-$(subst /,-,$(1)).done
-bfdmakes	+= $$(BUILDDIR)/$$(binutils_ver)-$(subst /,-,$(1))/Makefile
+  bfdlib += $$(TARGETDIR)/$$(binutils_ver)-$(subst /,-,$(1)).done
+  bfdmakes += $$(BUILDDIR)/$$(binutils_ver)-$(subst /,-,$(1))/Makefile
 endef
 
 # Create one set of bfds etc for each multilib arch
 $(foreach l,$(LIBDIRS),$(eval $(call mk_bfd,$(l))))
 
 # Only build these two libs.
-$(bfdlib)	: MAKECMD 	= all-libiberty all-bfd
-$(bfdlib)	: INSTALLCMD 	= install-libiberty install-bfd
+$(bfdlib) : MAKECMD = all-libiberty all-bfd
+$(bfdlib) : INSTALLCMD = install-libiberty install-bfd
 
-# Building targets libbfd + libiberty. HOST==TARGET, i.e not 
-# for a cross env. 
-$(bfdmakes)	: CONFIG = --target=$(TARGET) 				\
-			--host=$(TARGET) --build=$(BUILD)		\
-			--prefix=$(TARGETDIR) 				\
-			--with-sysroot=$(SYSROOT) 			\
-			$(LIBDIRS)
+# Building targets libbfd + libiberty. HOST==TARGET, i.e not
+# for a cross env.
+$(bfdmakes) : CONFIG = --target=$(TARGET) \
+    --host=$(TARGET) --build=$(BUILD) \
+    --prefix=$(TARGETDIR) \
+    --with-sysroot=$(SYSROOT) \
+    $(LIBDIRS)
 
-$(bfdmakes)	: TOOLS = $(call declare_tools,_FOR_TARGET,$(TARGET)-) $(call declare_tools,,$(TARGET)-)
+$(bfdmakes) : TOOLS = $(call declare_tools,_FOR_TARGET,$(TARGET)-) $(call declare_tools,,$(TARGET)-)
 
 ##########################################################################################
 
-$(gcc)		\
-$(binutils)	\
-$(gmp)		\
-$(mpfr)		\
-$(mpc)		\
-$(bfdmakes)	\
-$(ccache)	: ENVS += $(TOOLS)
+$(gcc) \
+    $(binutils) \
+    $(gmp) \
+    $(mpfr) \
+    $(mpc) \
+    $(bfdmakes) \
+    $(ccache) : ENVS += $(TOOLS)
 
 # libdir to work around hateful bfd stuff installing into wrong dirs...
-# ensure we have 64 bit bfd support in the HOST library. I.e our 
+# ensure we have 64 bit bfd support in the HOST library. I.e our
 # compiler on i686 will know 64 bit symbols, BUT later
-# we build just the libs again for TARGET, then with whatever the arch 
+# we build just the libs again for TARGET, then with whatever the arch
 # wants.
 $(BUILDDIR)/$(binutils_ver)/Makefile : CONFIG += --enable-64-bit-bfd --libdir=$(PREFIX)/$(word 1,$(LIBDIRS))
 
 # Makefile creation. Simply run configure in build dir.
-$(bfdmakes)				\
-$(BUILDDIR)/$(binutils_ver)/Makefile	\
-		: $(BINUTILS_CFG)
-		$(info Configuring $@. Log in $(@D)/log.config)
-		@mkdir -p $(@D)
-		(						\
-			cd $(@D) ;				\
-			$(PATHPRE) $(ENVS) CFLAGS="$(CFLAGS)"	\
-				$(BINUTILS_CFG) 		\
-				$(CONFIG) 			\
-				--with-sysroot=$(SYSROOT)	\
-				--disable-nls			\
-				--program-prefix=$(TARGET)-	\
-				--enable-multilib		\
-		) > $(@D)/log.config 2>&1
-		@echo 'done'
+$(bfdmakes) \
+$(BUILDDIR)/$(binutils_ver)/Makefile \
+    : $(BINUTILS_CFG)
+	$(info Configuring $@. Log in $(@D)/log.config)
+	@mkdir -p $(@D)
+	( \
+	  cd $(@D) ; \
+	  $(PATHPRE) $(ENVS) CFLAGS="$(CFLAGS)" \
+	      $(BINUTILS_CFG) \
+	      $(CONFIG) \
+	      --with-sysroot=$(SYSROOT) \
+	      --disable-nls \
+	      --program-prefix=$(TARGET)- \
+	      --enable-multilib \
+	) > $(@D)/log.config 2>&1
+	@echo 'done'
 
-$(BUILDDIR)/$(mpfr_ver)/Makefile	\
-		: $(MPFR_CFG)
-		$(info Configuring $@. Log in $(@D)/log.config)
-		@mkdir -p $(@D)
-		(						\
-			cd $(@D) ;				\
-			$(PATHPRE) $(ENVS) CFLAGS="$(CFLAGS)"	\
-				$(MPFR_CFG) 			\
-				$(CONFIG) 			\
-				--program-prefix=$(TARGET)-	\
-				--enable-shared=no		\
-				--with-gmp=$(PREFIX)	\
-		) > $(@D)/log.config 2>&1
-		@echo 'done'
+$(BUILDDIR)/$(mpfr_ver)/Makefile \
+    : $(MPFR_CFG)
+	$(info Configuring $@. Log in $(@D)/log.config)
+	@mkdir -p $(@D)
+	( \
+	  cd $(@D) ; \
+	  $(PATHPRE) $(ENVS) CFLAGS="$(CFLAGS)" \
+	      $(MPFR_CFG) \
+	      $(CONFIG) \
+	      --program-prefix=$(TARGET)- \
+	      --enable-shared=no \
+	      --with-gmp=$(PREFIX) \
+	) > $(@D)/log.config 2>&1
+	@echo 'done'
 
-$(BUILDDIR)/$(gmp_ver)/Makefile	\
-		: $(GMP_CFG)
-		$(info Configuring $@. Log in $(@D)/log.config)
-		@mkdir -p $(@D)
-		(						\
-			cd $(@D) ;				\
-			$(PATHPRE) $(ENVS) CFLAGS="$(CFLAGS)"	\
-				$(GMP_CFG) 			\
-				--host=$(HOST) --build=$(BUILD)	\
-				--prefix=$(PREFIX)		\
-				--disable-nls			\
-				--program-prefix=$(TARGET)-	\
-				--enable-shared=no		\
-				--with-mpfr=$(PREFIX)	\
-		) > $(@D)/log.config 2>&1
-		@echo 'done'
+$(BUILDDIR)/$(gmp_ver)/Makefile \
+    : $(GMP_CFG)
+	$(info Configuring $@. Log in $(@D)/log.config)
+	@mkdir -p $(@D)
+	( \
+	  cd $(@D) ; \
+	  $(PATHPRE) $(ENVS) CFLAGS="$(CFLAGS)" \
+	      $(GMP_CFG) \
+	      --host=$(HOST) --build=$(BUILD) \
+	      --prefix=$(PREFIX) \
+	      --disable-nls \
+	      --program-prefix=$(TARGET)- \
+	      --enable-shared=no \
+	      --with-mpfr=$(PREFIX) \
+	) > $(@D)/log.config 2>&1
+	@echo 'done'
 
-$(BUILDDIR)/$(mpc_ver)/Makefile	\
-		: $(MPC_CFG)
-		$(info Configuring $@. Log in $(@D)/log.config)
-		@mkdir -p $(@D)
-		(						\
-			cd $(@D) ;				\
-			$(PATHPRE) $(ENVS) CFLAGS="$(CFLAGS)"	\
-				$(MPC_CFG) 			\
-				$(CONFIG) 			\
-				--program-prefix=$(TARGET)-	\
-				--enable-shared=no		\
-				--with-mpfr=$(PREFIX)	\
-				--with-gmp=$(PREFIX)	\
-		) > $(@D)/log.config 2>&1
-		@echo 'done'
+$(BUILDDIR)/$(mpc_ver)/Makefile \
+    : $(MPC_CFG)
+	$(info Configuring $@. Log in $(@D)/log.config)
+	@mkdir -p $(@D)
+	( \
+	  cd $(@D) ; \
+	  $(PATHPRE) $(ENVS) CFLAGS="$(CFLAGS)" \
+	      $(MPC_CFG) \
+	      $(CONFIG) \
+	      --program-prefix=$(TARGET)- \
+	      --enable-shared=no \
+	      --with-mpfr=$(PREFIX) \
+	      --with-gmp=$(PREFIX) \
+	) > $(@D)/log.config 2>&1
+	@echo 'done'
 
 # Only valid if glibc target -> linux
 # proper destructor handling for c++
 ifneq (,$(findstring linux,$(TARGET)))
-$(BUILDDIR)/$(gcc_ver)/Makefile : CONFIG += --enable-__cxa_atexit 
+  $(BUILDDIR)/$(gcc_ver)/Makefile : CONFIG += --enable-__cxa_atexit
 endif
 
 # Want:
-# 	c,c++
-# 	shared libs
-#	multilib (-m32/-m64 on x64)
-# 	skip native language. 
-#	and link and assemble with the binutils we created 
-#	earlier, so --with-gnu*
-$(BUILDDIR)/$(gcc_ver)/Makefile	\
-		: $(GCC_CFG) 
-		$(info Configuring $@. Log in $(@D)/log.config)
-		mkdir -p $(@D)
-		(						\
-			cd $(@D) ;				\
-			$(PATHPRE) $(ENVS) $(GCC_CFG) $(EXTRA_CFLAGS) \
-				$(CONFIG) 			\
-				--with-sysroot=$(SYSROOT)	\
-				--enable-languages=c,c++ 	\
-				--enable-shared			\
-				--enable-multilib		\
-				--disable-nls			\
-				--with-gnu-as 			\
-				--with-gnu-ld			\
-				--with-mpfr=$(PREFIX)		\
-				--with-gmp=$(PREFIX)		\
-				--with-mpc=$(PREFIX)		\
-		) > $(@D)/log.config 2>&1
-		@echo 'done'
+# c,c++
+# shared libs
+# multilib (-m32/-m64 on x64)
+# skip native language.
+# and link and assemble with the binutils we created
+# earlier, so --with-gnu*
+$(BUILDDIR)/$(gcc_ver)/Makefile \
+    : $(GCC_CFG)
+	$(info Configuring $@. Log in $(@D)/log.config)
+	mkdir -p $(@D)
+	( \
+	  cd $(@D) ; \
+	  $(PATHPRE) $(ENVS) $(GCC_CFG) $(EXTRA_CFLAGS) \
+	      $(CONFIG) \
+	      --with-sysroot=$(SYSROOT) \
+	      --enable-languages=c,c++ \
+	      --enable-shared \
+	      --enable-multilib \
+	      --disable-nls \
+	      --with-gnu-as \
+	      --with-gnu-ld \
+	      --with-mpfr=$(PREFIX) \
+	      --with-gmp=$(PREFIX) \
+	      --with-mpc=$(PREFIX) \
+	) > $(@D)/log.config 2>&1
+	@echo 'done'
 
 # need binutils for gcc
-$(gcc)		: $(binutils) 
+$(gcc) : $(binutils)
 
 # as of 4.3 or so need these for doing config
 $(BUILDDIR)/$(gcc_ver)/Makefile : $(gmp) $(mpfr) $(mpc)
-$(mpfr)		: $(gmp)
-$(mpc)		: $(gmp) $(mpfr)
+$(mpfr) : $(gmp)
+$(mpc) : $(gmp) $(mpfr)
 
 ##########################################################################################
-# very straightforward. just build a ccache. it is only for host. 
-$(BUILDDIR)/$(ccache_ver)/Makefile	\
-		: $(CCACHE_CFG)
-		$(info Configuring $@. Log in $(@D)/log.config)
-		@mkdir -p $(@D)
-		@(						\
-			cd $(@D) ;				\
-			$(PATHPRE) $(ENVS) $(CCACHE_CFG)	\
-				$(CONFIG) 			\
-		) > $(@D)/log.config 2>&1
-		@echo 'done'
+# very straightforward. just build a ccache. it is only for host.
+$(BUILDDIR)/$(ccache_ver)/Makefile \
+    : $(CCACHE_CFG)
+	$(info Configuring $@. Log in $(@D)/log.config)
+	@mkdir -p $(@D)
+	@( \
+	  cd $(@D) ; \
+	  $(PATHPRE) $(ENVS) $(CCACHE_CFG) \
+	      $(CONFIG) \
+	) > $(@D)/log.config 2>&1
+	@echo 'done'
 
-gccpatch	= $(TARGETDIR)/gcc-patched
+gccpatch = $(TARGETDIR)/gcc-patched
 
 ##########################################################################################
-# For some reason cpp is not created as a target-compiler 
+# For some reason cpp is not created as a target-compiler
 ifeq ($(HOST),$(TARGET))
-$(gccpatch)	: $(gcc) link_libs
-		@echo -n 'Creating compiler symlinks...'
-		@for f in cpp; do 				\
-			if [ ! -e $(PREFIX)/bin/$(TARGET)-$$f ];\
-			then					\
-			cd $(PREFIX)/bin && 			\
-				ln -s $$f $(TARGET)-$$f ;	\
-			fi					\
-		done
-		@touch $@
-		@echo 'done'
+  $(gccpatch) : $(gcc) link_libs
+	@echo -n 'Creating compiler symlinks...'
+	@for f in cpp; do \
+	  if [ ! -e $(PREFIX)/bin/$(TARGET)-$$f ]; \
+	  then \
+	    cd $(PREFIX)/bin && \
+	    ln -s $$f $(TARGET)-$$f ; \
+	  fi \
+	done
+	@touch $@
+	@echo 'done'
 
-##########################################################################################
-# Ugly at best. Seems that when we compile host->host compiler, that are NOT
-# the BUILD compiler, the result will not try searching for libs in package root.
-# "Solve" this by create links from the target libdirs to where they are. 
-link_libs:
-		@echo -n 'Creating library symlinks...'
-		@$(foreach l,$(LIBDIRS),							\
-		for f in `cd $(PREFIX)/$(l) && ls`; do 						\
-			if [ ! -e $(TARGETDIR)/$(l)/$$f ]; then					\
-				mkdir -p $(TARGETDIR)/$(l) &&					\
-				cd $(TARGETDIR)/$(l)/ && 					\
-				ln -s $(if $(findstring /,$(l)),../,)../../$(l)/$$f $$f;	\
-			fi									\
-		done;) 
-		@echo 'done'
+  ##########################################################################################
+  # Ugly at best. Seems that when we compile host->host compiler, that are NOT
+  # the BUILD compiler, the result will not try searching for libs in package root.
+  # "Solve" this by create links from the target libdirs to where they are.
+  link_libs:
+	@echo -n 'Creating library symlinks...'
+	@$(foreach l,$(LIBDIRS), \
+	for f in `cd $(PREFIX)/$(l) && ls`; do \
+	  if [ ! -e $(TARGETDIR)/$(l)/$$f ]; then \
+	    mkdir -p $(TARGETDIR)/$(l) && \
+	    cd $(TARGETDIR)/$(l)/ && \
+	    ln -s $(if $(findstring /,$(l)),../,)../../$(l)/$$f $$f; \
+	  fi \
+	done;)
+	@echo 'done'
 else
-$(gccpatch)	:
-		@echo 'done'
+  $(gccpatch) :
+	@echo 'done'
 endif
 
 ##########################################################################################
-# Build in two steps. 
+# Build in two steps.
 # make <default>
-# make install. 
+# make install.
 # Use path to our build hosts cross tools
-# Always need to build cross tools for build host self. 
-$(TARGETDIR)/%.done : $(BUILDDIR)/%/Makefile 
-		$(info Building $(basename $@). Log in $(<D)/log.build)
-		$(PATHPRE) $(ENVS) $(MAKE) $(BUILDPAR) -f $< -C $(<D) $(MAKECMD) $(MAKECMD.$(notdir $@)) > $(<D)/log.build 2>&1
-		@echo -n 'installing...'
-		$(PATHPRE) $(MAKE) $(INSTALLPAR) -f $< -C $(<D) $(INSTALLCMD) $(MAKECMD.$(notdir $@))  > $(<D)/log.install 2>&1
-		@touch $@
-		@echo 'done'
+# Always need to build cross tools for build host self.
+$(TARGETDIR)/%.done : $(BUILDDIR)/%/Makefile
+	$(info Building $(basename $@). Log in $(<D)/log.build)
+	$(PATHPRE) $(ENVS) $(MAKE) $(BUILDPAR) -f $< -C $(<D) $(MAKECMD) $(MAKECMD.$(notdir $@)) > $(<D)/log.build 2>&1
+	@echo -n 'installing...'
+	$(PATHPRE) $(MAKE) $(INSTALLPAR) -f $< -C $(<D) $(INSTALLCMD) $(MAKECMD.$(notdir $@)) > $(<D)/log.install 2>&1
+	@touch $@
+	@echo 'done'
 
 ##########################################################################################
 
-bfdlib		: $(bfdlib)
-binutils	: $(binutils)
-rpms		: $(rpms)
-libs		: $(libs)
-sysroot		: rpms libs
-gcc		: sysroot $(gcc) $(gccpatch)
-all		: binutils gcc bfdlib
+bfdlib : $(bfdlib)
+binutils : $(binutils)
+rpms : $(rpms)
+libs : $(libs)
+sysroot : rpms libs
+gcc : sysroot $(gcc) $(gccpatch)
+all : binutils gcc bfdlib
 
-# this is only built for host. so separate. 
-ccache		: $(ccache)
+# this is only built for host. so separate.
+ccache : $(ccache)
 
-.PHONY		: gcc all binutils bfdlib link_libs rpms libs sysroot
+.PHONY : gcc all binutils bfdlib link_libs rpms libs sysroot
diff --git a/common/makefiles/javadoc/CORE_PKGS.gmk b/common/makefiles/javadoc/CORE_PKGS.gmk
index aede994..9c85da6 100644
--- a/common/makefiles/javadoc/CORE_PKGS.gmk
+++ b/common/makefiles/javadoc/CORE_PKGS.gmk
@@ -24,49 +24,48 @@
 #
 
 # EXCLUDE_PKGS is the list of packages to exclude from the
-# Java API Specification.  Do not add these to CORE_PKGS.
+# Java API Specification. Do not add these to CORE_PKGS.
 # The concatenation of EXCLUDE_PKGS and CORE_PKGS
 # should make up the list of all packages under the
 # src/shared/classes directory of the JDK source tree.
 #
-EXCLUDE_PKGS =             \
-  java.awt.peer            \
-  java.awt.dnd.peer        \
-  sun.*                    \
-  com.sun.*                \
-  org.apache.*             \
-  org.jcp.*		   \
-  org.w3c.dom.css          \
-  org.w3c.dom.html         \
-  org.w3c.dom.stylesheets  \
-  org.w3c.dom.traversal    \
-  org.w3c.dom.ranges       \
-  org.w3c.dom.views        \
-  org.omg.stub.javax.management.remote.rmi
+EXCLUDE_PKGS = \
+    java.awt.peer \
+    java.awt.dnd.peer \
+    sun.* \
+    com.sun.* \
+    org.apache.* \
+    org.jcp.* \
+    org.w3c.dom.css \
+    org.w3c.dom.html \
+    org.w3c.dom.stylesheets \
+    org.w3c.dom.traversal \
+    org.w3c.dom.ranges \
+    org.omg.stub.javax.management.remote.rmi
 
 #
 # ACTIVE_JSR_PKGS are packages that are part of an active JSR process--
 # one that is doing its own review. These packages are not included when
 # creating diff pages for the platform's JCP process.
-# 
-#       (see /java/pubs/apisrc/jdk/6.0/beta/make/docs/active_jsr_pkgs)
+#
+# (see /java/pubs/apisrc/jdk/6.0/beta/make/docs/active_jsr_pkgs)
 # Note:
 # This is a list of regular expressions. So foo.* matches "foo" and "foo.bar".
 #
 ACTIVE_JSR_PKGS= \
-  java.lang.invoke \
-  java.sql  \
-  javax.activation  \
-  javax.annotation.*  \
-  javax.jws.*  \
-  javax.lang.*  \
-  javax.management.*  \
-  javax.script  \
-  javax.sql.*  \
-  javax.tools.*  \
-  javax.xml.*  \
-  org.w3c.*  \
-  org.xml.sax
+    java.lang.invoke \
+    java.sql \
+    javax.activation \
+    javax.annotation.* \
+    javax.jws.* \
+    javax.lang.* \
+    javax.management.* \
+    javax.script \
+    javax.sql.* \
+    javax.tools.* \
+    javax.xml.* \
+    org.w3c.* \
+    org.xml.sax
 
 #
 # CORE_PKGS is the list of packages that form the
@@ -77,224 +76,225 @@
 ### determines which table the packages go in on the main page.
 ### Currently, there is only table ("Platform Packages") and
 ### everything goes in it, so REGEXP is "*". But if that policy
-### changes, packages added will need to be reflected in  that
+### changes, packages added will need to be reflected in that
 ### list of wildcard expressions, as well.
 ###
-CORE_PKGS =                                      \
-  java.applet                                    \
-  java.awt                                       \
-  java.awt.color                                 \
-  java.awt.datatransfer                          \
-  java.awt.dnd                                   \
-  java.awt.event                                 \
-  java.awt.font                                  \
-  java.awt.geom                                  \
-  java.awt.im                                    \
-  java.awt.im.spi                                \
-  java.awt.image                                 \
-  java.awt.image.renderable                      \
-  java.awt.print                                 \
-  java.beans                                     \
-  java.beans.beancontext                         \
-  java.io                                        \
-  java.lang                                      \
-  java.lang.annotation                           \
-  java.lang.instrument                           \
-  java.lang.invoke                               \
-  java.lang.management                           \
-  java.lang.ref                                  \
-  java.lang.reflect                              \
-  java.math                                      \
-  java.net                                       \
-  java.nio                                       \
-  java.nio.channels                              \
-  java.nio.channels.spi                          \
-  java.nio.charset                               \
-  java.nio.charset.spi                           \
-  java.nio.file					 \
-  java.nio.file.attribute			 \
-  java.nio.file.spi				 \
-  java.rmi                                       \
-  java.rmi.activation                            \
-  java.rmi.dgc                                   \
-  java.rmi.registry                              \
-  java.rmi.server                                \
-  java.security                                  \
-  java.security.acl                              \
-  java.security.cert                             \
-  java.security.interfaces                       \
-  java.security.spec                             \
-  java.sql                                       \
-  java.text                                      \
-  java.text.spi                                  \
-  java.time                                      \
-  java.time.chrono                               \
-  java.time.format                               \
-  java.time.temporal                             \
-  java.time.zone                                 \
-  java.util                                      \
-  java.util.concurrent                           \
-  java.util.concurrent.atomic                    \
-  java.util.concurrent.locks                     \
-  java.util.function                             \
-  java.util.jar                                  \
-  java.util.logging                              \
-  java.util.prefs                                \
-  java.util.regex                                \
-  java.util.spi                                  \
-  java.util.stream                               \
-  java.util.zip                                  \
-  javax.accessibility                            \
-  javax.activation                               \
-  javax.activity                                 \
-  javax.annotation                               \
-  javax.annotation.processing                    \
-  javax.crypto                                   \
-  javax.crypto.interfaces                        \
-  javax.crypto.spec                              \
-  javax.imageio                                  \
-  javax.imageio.event                            \
-  javax.imageio.metadata                         \
-  javax.imageio.plugins.jpeg                     \
-  javax.imageio.plugins.bmp                      \
-  javax.imageio.spi                              \
-  javax.imageio.stream                           \
-  javax.jws                                      \
-  javax.jws.soap                                 \
-  javax.lang.model                               \
-  javax.lang.model.element                       \
-  javax.lang.model.type                          \
-  javax.lang.model.util                          \
-  javax.management                               \
-  javax.management.loading                       \
-  javax.management.monitor                       \
-  javax.management.relation                      \
-  javax.management.openmbean                     \
-  javax.management.timer                         \
-  javax.management.modelmbean                    \
-  javax.management.remote                        \
-  javax.management.remote.rmi                    \
-  javax.naming                                   \
-  javax.naming.directory                         \
-  javax.naming.event                             \
-  javax.naming.ldap                              \
-  javax.naming.spi                               \
-  javax.net                                      \
-  javax.net.ssl                                  \
-  javax.print                                    \
-  javax.print.attribute                          \
-  javax.print.attribute.standard                 \
-  javax.print.event                              \
-  javax.rmi                                      \
-  javax.rmi.CORBA                                \
-  javax.rmi.ssl                                  \
-  javax.script                                   \
-  javax.security.auth                            \
-  javax.security.auth.callback                   \
-  javax.security.auth.kerberos                   \
-  javax.security.auth.login                      \
-  javax.security.auth.spi                        \
-  javax.security.auth.x500                       \
-  javax.security.cert                            \
-  javax.security.sasl                            \
-  javax.sound.sampled                            \
-  javax.sound.sampled.spi                        \
-  javax.sound.midi                               \
-  javax.sound.midi.spi                           \
-  javax.sql                                      \
-  javax.sql.rowset                               \
-  javax.sql.rowset.serial                        \
-  javax.sql.rowset.spi                           \
-  javax.swing                                    \
-  javax.swing.border                             \
-  javax.swing.colorchooser                       \
-  javax.swing.filechooser                        \
-  javax.swing.event                              \
-  javax.swing.table                              \
-  javax.swing.text                               \
-  javax.swing.text.html                          \
-  javax.swing.text.html.parser                   \
-  javax.swing.text.rtf                           \
-  javax.swing.tree                               \
-  javax.swing.undo                               \
-  javax.swing.plaf                               \
-  javax.swing.plaf.basic                         \
-  javax.swing.plaf.metal                         \
-  javax.swing.plaf.multi                         \
-  javax.swing.plaf.nimbus                        \
-  javax.swing.plaf.synth                         \
-  javax.tools                                    \
-  javax.tools.annotation                         \
-  javax.transaction                              \
-  javax.transaction.xa                           \
-  javax.xml.parsers                              \
-  javax.xml.bind                                 \
-  javax.xml.bind.annotation                      \
-  javax.xml.bind.annotation.adapters             \
-  javax.xml.bind.attachment                      \
-  javax.xml.bind.helpers                         \
-  javax.xml.bind.util                            \
-  javax.xml.soap                                 \
-  javax.xml.ws                                   \
-  javax.xml.ws.handler                           \
-  javax.xml.ws.handler.soap                      \
-  javax.xml.ws.http                              \
-  javax.xml.ws.soap                              \
-  javax.xml.ws.spi                               \
-  javax.xml.ws.spi.http                          \
-  javax.xml.ws.wsaddressing                      \
-  javax.xml.transform                            \
-  javax.xml.transform.sax                        \
-  javax.xml.transform.dom                        \
-  javax.xml.transform.stax                       \
-  javax.xml.transform.stream                     \
-  javax.xml                                      \
-  javax.xml.crypto				 \
-  javax.xml.crypto.dom				 \
-  javax.xml.crypto.dsig				 \
-  javax.xml.crypto.dsig.dom			 \
-  javax.xml.crypto.dsig.keyinfo			 \
-  javax.xml.crypto.dsig.spec			 \
-  javax.xml.datatype                             \
-  javax.xml.validation                           \
-  javax.xml.namespace                            \
-  javax.xml.xpath                                \
-  javax.xml.stream                               \
-  javax.xml.stream.events                        \
-  javax.xml.stream.util                          \
-  org.ietf.jgss                                  \
-  org.omg.CORBA                                  \
-  org.omg.CORBA.DynAnyPackage                    \
-  org.omg.CORBA.ORBPackage                       \
-  org.omg.CORBA.TypeCodePackage                  \
-  org.omg.stub.java.rmi                          \
-  org.omg.CORBA.portable                         \
-  org.omg.CORBA_2_3                              \
-  org.omg.CORBA_2_3.portable                     \
-  org.omg.CosNaming                              \
-  org.omg.CosNaming.NamingContextExtPackage      \
-  org.omg.CosNaming.NamingContextPackage         \
-  org.omg.SendingContext                         \
-  org.omg.PortableServer                         \
-  org.omg.PortableServer.CurrentPackage          \
-  org.omg.PortableServer.POAPackage              \
-  org.omg.PortableServer.POAManagerPackage       \
-  org.omg.PortableServer.ServantLocatorPackage   \
-  org.omg.PortableServer.portable                \
-  org.omg.PortableInterceptor                    \
-  org.omg.PortableInterceptor.ORBInitInfoPackage \
-  org.omg.Messaging                              \
-  org.omg.IOP                                    \
-  org.omg.IOP.CodecFactoryPackage                \
-  org.omg.IOP.CodecPackage                       \
-  org.omg.Dynamic                                \
-  org.omg.DynamicAny                             \
-  org.omg.DynamicAny.DynAnyPackage               \
-  org.omg.DynamicAny.DynAnyFactoryPackage        \
-  org.w3c.dom                                    \
-  org.w3c.dom.events                             \
-  org.w3c.dom.bootstrap                          \
-  org.w3c.dom.ls                                 \
-  org.xml.sax                                    \
-  org.xml.sax.ext                                \
-  org.xml.sax.helpers
+CORE_PKGS = \
+    java.applet \
+    java.awt \
+    java.awt.color \
+    java.awt.datatransfer \
+    java.awt.dnd \
+    java.awt.event \
+    java.awt.font \
+    java.awt.geom \
+    java.awt.im \
+    java.awt.im.spi \
+    java.awt.image \
+    java.awt.image.renderable \
+    java.awt.print \
+    java.beans \
+    java.beans.beancontext \
+    java.io \
+    java.lang \
+    java.lang.annotation \
+    java.lang.instrument \
+    java.lang.invoke \
+    java.lang.management \
+    java.lang.ref \
+    java.lang.reflect \
+    java.math \
+    java.net \
+    java.nio \
+    java.nio.channels \
+    java.nio.channels.spi \
+    java.nio.charset \
+    java.nio.charset.spi \
+    java.nio.file \
+    java.nio.file.attribute \
+    java.nio.file.spi \
+    java.rmi \
+    java.rmi.activation \
+    java.rmi.dgc \
+    java.rmi.registry \
+    java.rmi.server \
+    java.security \
+    java.security.acl \
+    java.security.cert \
+    java.security.interfaces \
+    java.security.spec \
+    java.sql \
+    java.text \
+    java.text.spi \
+    java.time \
+    java.time.chrono \
+    java.time.format \
+    java.time.temporal \
+    java.time.zone \
+    java.util \
+    java.util.concurrent \
+    java.util.concurrent.atomic \
+    java.util.concurrent.locks \
+    java.util.function \
+    java.util.jar \
+    java.util.logging \
+    java.util.prefs \
+    java.util.regex \
+    java.util.spi \
+    java.util.stream \
+    java.util.zip \
+    javax.accessibility \
+    javax.activation \
+    javax.activity \
+    javax.annotation \
+    javax.annotation.processing \
+    javax.crypto \
+    javax.crypto.interfaces \
+    javax.crypto.spec \
+    javax.imageio \
+    javax.imageio.event \
+    javax.imageio.metadata \
+    javax.imageio.plugins.jpeg \
+    javax.imageio.plugins.bmp \
+    javax.imageio.spi \
+    javax.imageio.stream \
+    javax.jws \
+    javax.jws.soap \
+    javax.lang.model \
+    javax.lang.model.element \
+    javax.lang.model.type \
+    javax.lang.model.util \
+    javax.management \
+    javax.management.loading \
+    javax.management.monitor \
+    javax.management.relation \
+    javax.management.openmbean \
+    javax.management.timer \
+    javax.management.modelmbean \
+    javax.management.remote \
+    javax.management.remote.rmi \
+    javax.naming \
+    javax.naming.directory \
+    javax.naming.event \
+    javax.naming.ldap \
+    javax.naming.spi \
+    javax.net \
+    javax.net.ssl \
+    javax.print \
+    javax.print.attribute \
+    javax.print.attribute.standard \
+    javax.print.event \
+    javax.rmi \
+    javax.rmi.CORBA \
+    javax.rmi.ssl \
+    javax.script \
+    javax.security.auth \
+    javax.security.auth.callback \
+    javax.security.auth.kerberos \
+    javax.security.auth.login \
+    javax.security.auth.spi \
+    javax.security.auth.x500 \
+    javax.security.cert \
+    javax.security.sasl \
+    javax.sound.sampled \
+    javax.sound.sampled.spi \
+    javax.sound.midi \
+    javax.sound.midi.spi \
+    javax.sql \
+    javax.sql.rowset \
+    javax.sql.rowset.serial \
+    javax.sql.rowset.spi \
+    javax.swing \
+    javax.swing.border \
+    javax.swing.colorchooser \
+    javax.swing.filechooser \
+    javax.swing.event \
+    javax.swing.table \
+    javax.swing.text \
+    javax.swing.text.html \
+    javax.swing.text.html.parser \
+    javax.swing.text.rtf \
+    javax.swing.tree \
+    javax.swing.undo \
+    javax.swing.plaf \
+    javax.swing.plaf.basic \
+    javax.swing.plaf.metal \
+    javax.swing.plaf.multi \
+    javax.swing.plaf.nimbus \
+    javax.swing.plaf.synth \
+    javax.tools \
+    javax.tools.annotation \
+    javax.transaction \
+    javax.transaction.xa \
+    javax.xml.parsers \
+    javax.xml.bind \
+    javax.xml.bind.annotation \
+    javax.xml.bind.annotation.adapters \
+    javax.xml.bind.attachment \
+    javax.xml.bind.helpers \
+    javax.xml.bind.util \
+    javax.xml.soap \
+    javax.xml.ws \
+    javax.xml.ws.handler \
+    javax.xml.ws.handler.soap \
+    javax.xml.ws.http \
+    javax.xml.ws.soap \
+    javax.xml.ws.spi \
+    javax.xml.ws.spi.http \
+    javax.xml.ws.wsaddressing \
+    javax.xml.transform \
+    javax.xml.transform.sax \
+    javax.xml.transform.dom \
+    javax.xml.transform.stax \
+    javax.xml.transform.stream \
+    javax.xml \
+    javax.xml.crypto \
+    javax.xml.crypto.dom \
+    javax.xml.crypto.dsig \
+    javax.xml.crypto.dsig.dom \
+    javax.xml.crypto.dsig.keyinfo \
+    javax.xml.crypto.dsig.spec \
+    javax.xml.datatype \
+    javax.xml.validation \
+    javax.xml.namespace \
+    javax.xml.xpath \
+    javax.xml.stream \
+    javax.xml.stream.events \
+    javax.xml.stream.util \
+    org.ietf.jgss \
+    org.omg.CORBA \
+    org.omg.CORBA.DynAnyPackage \
+    org.omg.CORBA.ORBPackage \
+    org.omg.CORBA.TypeCodePackage \
+    org.omg.stub.java.rmi \
+    org.omg.CORBA.portable \
+    org.omg.CORBA_2_3 \
+    org.omg.CORBA_2_3.portable \
+    org.omg.CosNaming \
+    org.omg.CosNaming.NamingContextExtPackage \
+    org.omg.CosNaming.NamingContextPackage \
+    org.omg.SendingContext \
+    org.omg.PortableServer \
+    org.omg.PortableServer.CurrentPackage \
+    org.omg.PortableServer.POAPackage \
+    org.omg.PortableServer.POAManagerPackage \
+    org.omg.PortableServer.ServantLocatorPackage \
+    org.omg.PortableServer.portable \
+    org.omg.PortableInterceptor \
+    org.omg.PortableInterceptor.ORBInitInfoPackage \
+    org.omg.Messaging \
+    org.omg.IOP \
+    org.omg.IOP.CodecFactoryPackage \
+    org.omg.IOP.CodecPackage \
+    org.omg.Dynamic \
+    org.omg.DynamicAny \
+    org.omg.DynamicAny.DynAnyPackage \
+    org.omg.DynamicAny.DynAnyFactoryPackage \
+    org.w3c.dom \
+    org.w3c.dom.events \
+    org.w3c.dom.bootstrap \
+    org.w3c.dom.ls \
+    org.w3c.dom.views \
+    org.xml.sax \
+    org.xml.sax.ext \
+    org.xml.sax.helpers
diff --git a/common/makefiles/javadoc/Javadoc.gmk b/common/makefiles/javadoc/Javadoc.gmk
index 9fe2522..5c5b5fe 100644
--- a/common/makefiles/javadoc/Javadoc.gmk
+++ b/common/makefiles/javadoc/Javadoc.gmk
@@ -47,31 +47,31 @@
 BUILD_NUMBER=$(JDK_BUILD_NUMBER)
 
 JAVADOC_CMD = $(JAVA) \
-              -Xmx1024m \
-	      -Djava.awt.headless=true \
-	      $(NEW_JAVADOC) \
-	      -bootclasspath $(JDK_OUTPUTDIR)/classes
+    -Xmx1024m \
+    -Djava.awt.headless=true \
+    $(NEW_JAVADOC) \
+    -bootclasspath $(JDK_OUTPUTDIR)/classes
 
 # Copyright year for beginning of Java and some of the apis
-#   (Needed when creating the javadocs)
-FIRST_COPYRIGHT_YEAR                = 1993
-DOMAPI_FIRST_COPYRIGHT_YEAR         = 2005
-MIRROR_FIRST_COPYRIGHT_YEAR         = 2004
-DOCLETAPI_FIRST_COPYRIGHT_YEAR      = 1993
-TAGLETAPI_FIRST_COPYRIGHT_YEAR      = 1993
-JDI_FIRST_COPYRIGHT_YEAR            = 1999
-JAAS_FIRST_COPYRIGHT_YEAR           = 1998
-JGSS_FIRST_COPYRIGHT_YEAR           = 2000
-SMARTCARDIO_FIRST_COPYRIGHT_YEAR    = 2005
-HTTPSERVER_FIRST_COPYRIGHT_YEAR     = 2005
-MGMT_FIRST_COPYRIGHT_YEAR           = 2003
-ATTACH_FIRST_COPYRIGHT_YEAR         = 2005
-JCONSOLE_FIRST_COPYRIGHT_YEAR       = 2006
-SCTPAPI_FIRST_COPYRIGHT_YEAR        = 2009
-TRACING_FIRST_COPYRIGHT_YEAR        = 2008
-TREEAPI_FIRST_COPYRIGHT_YEAR        = 2005
-JNLP_FIRST_COPYRIGHT_YEAR           = 1998
-PLUGIN2_FIRST_COPYRIGHT_YEAR        = 2007
+# (Needed when creating the javadocs)
+FIRST_COPYRIGHT_YEAR = 1993
+DOMAPI_FIRST_COPYRIGHT_YEAR = 2005
+MIRROR_FIRST_COPYRIGHT_YEAR = 2004
+DOCLETAPI_FIRST_COPYRIGHT_YEAR = 1993
+TAGLETAPI_FIRST_COPYRIGHT_YEAR = 1993
+JDI_FIRST_COPYRIGHT_YEAR = 1999
+JAAS_FIRST_COPYRIGHT_YEAR = 1998
+JGSS_FIRST_COPYRIGHT_YEAR = 2000
+SMARTCARDIO_FIRST_COPYRIGHT_YEAR = 2005
+HTTPSERVER_FIRST_COPYRIGHT_YEAR = 2005
+MGMT_FIRST_COPYRIGHT_YEAR = 2003
+ATTACH_FIRST_COPYRIGHT_YEAR = 2005
+JCONSOLE_FIRST_COPYRIGHT_YEAR = 2006
+SCTPAPI_FIRST_COPYRIGHT_YEAR = 2009
+TRACING_FIRST_COPYRIGHT_YEAR = 2008
+TREEAPI_FIRST_COPYRIGHT_YEAR = 2005
+JNLP_FIRST_COPYRIGHT_YEAR = 1998
+PLUGIN2_FIRST_COPYRIGHT_YEAR = 2007
 
 # Oracle name
 FULL_COMPANY_NAME = Oracle and/or its affiliates
@@ -83,15 +83,15 @@
 TRADEMARK = &trade;
 
 # Common copyright lines used
-#   The word "Copyright" might optionally be a link to the file cpyr.html.
-#   The first year of copyright may vary or not be available.
-#   The address to the company might be optional.
+# The word "Copyright" might optionally be a link to the file cpyr.html.
+# The first year of copyright may vary or not be available.
+# The address to the company might be optional.
 COMMA:= ,
 EMPTY:=
 SPACE:=$(EMPTY) $(EMPTY)
 COPYRIGHT_SYMBOL = &\#x00a9;
 # Macro to construct the copyright line
-#   (The GNU make 3.78.1 "if" conditional is broken, fixed in GNU make 3.81)
+# (The GNU make 3.78.1 "if" conditional is broken, fixed in GNU make 3.81)
 define CopyrightLine # optionalurl optionalfirstyear optionaladdress
 $(if $(strip $1),<a href="$(strip $1)">Copyright</a>,Copyright) \
 $(COPYRIGHT_SYMBOL) $(if $2,$2${COMMA},) $(COPYRIGHT_YEAR),\
@@ -114,10 +114,9 @@
 BUG_SUBMIT_LINE = <a href="$(BUG_SUBMIT_URL)">Submit a bug or feature</a>
 
 # Url to devdocs page
-#   Was: http://java.sun.com/javase/6/webnotes/devdocs-vs-specs.html
+# Was: http://java.sun.com/javase/6/webnotes/devdocs-vs-specs.html
 DEV_DOCS_URL-7 = http://download.oracle.com/javase/7/docs/index.html
-# This isn't added in old build yet.
-#DEV_DOCS_URL-8 = http://download.oracle.com/javase/7/docs/index.html
+DEV_DOCS_URL-8 = http://download.oracle.com/javase/8/docs/index.html
 DEV_DOCS_URL = $(DEV_DOCS_URL-$(JDK_MINOR_VERSION))
 DOCS_BASE_URL = http://download.oracle.com/javase/7/docs
 
@@ -130,17 +129,17 @@
 
 
 # List of all possible directories for javadoc to look for sources
-#    NOTE: Quotes are required around sourcepath argument only on Windows.
-#          Otherwise, you get "No packages or classes specified." due 
-#          to $(PATH_SEP) being interpreted as an end of 
-#          command (newline or shell ; character)
+# NOTE: Quotes are required around sourcepath argument only on Windows.
+# Otherwise, you get "No packages or classes specified." due
+# to $(PATH_SEP) being interpreted as an end of
+# command (newline or shell ; character)
 ALL_SOURCE_DIRS = $(JDK_SHARE_CLASSES) \
-                  $(JDK_IMPSRC) \
-                  $(JDK_GENSRC) \
-		  $(JDK_OUTPUTDIR)/gendocsrc_rmic \
-                  $(JDK_TOPDIR)/src/solaris/classes \
-                  $(JDK_TOPDIR)/src/windows/classes \
-		  $(JDK_SHARE_SRC)/doc/stub
+    $(JDK_IMPSRC) \
+    $(JDK_GENSRC) \
+    $(JDK_OUTPUTDIR)/gendocsrc_rmic \
+    $(JDK_TOPDIR)/src/solaris/classes \
+    $(JDK_TOPDIR)/src/windows/classes \
+    $(JDK_SHARE_SRC)/doc/stub
 
 # List of directories that actually exist
 ALL_EXISTING_SOURCE_DIRS := $(wildcard $(ALL_SOURCE_DIRS))
@@ -152,60 +151,60 @@
     $(subst $(SPACE),$(PATH_SEP),$(strip $(ALL_SOURCE_DIRS)))
 
 define prep-target
-$(MKDIR) -p $(@D)
-$(RM) $@
+	$(MKDIR) -p $(@D)
+	$(RM) $@
 endef
 
 # Prep for javadoc creation, assumes $@ is an index.html file
 define prep-javadoc
-@if [ -f "$@" -a "$?" != "" ] ; then \
-  $(ECHO) "# Dependencies have changed: $?"; \
-fi
-$(RM) -r $(@D)
-$(MKDIR) -p $(@D)
+	@if [ -f "$@" -a "$?" != "" ] ; then \
+	  $(ECHO) "# Dependencies have changed: $?"; \
+	fi
+	$(RM) -r $(@D)
+	$(MKDIR) -p $(@D)
 endef
 
 # A cache of the directories in ALL_SOURCE_DIRS
 DIRECTORY_CACHE = $(DOCSTMPDIR)/directory.cache
 
 # Given a list of packages, return a list of files or dirs to be dependent on
-#   (Currently only returning a list of directories)
+# (Currently only returning a list of directories)
 define PackageDependencies # packages
-$(shell							\
-  if [ "$1" != "" -a -f $(DIRECTORY_CACHE) ] ; then	\
-    for p in $1 ; do 					\
-      pd=`$(ECHO) $${p} | $(SED) -e 's@[.]@/@g'`;	\
-      $(CAT) $(DIRECTORY_CACHE) | $(GREP) "/$${pd}/" ; 	\
-    done; 						\
-  fi							\
-)
+  $(shell \
+      if [ "$1" != "" -a -f $(DIRECTORY_CACHE) ] ; then \
+        for p in $1 ; do \
+          pd=`$(ECHO) $${p} | $(SED) -e 's@[.]@/@g'`; \
+          $(CAT) $(DIRECTORY_CACHE) | $(GREP) "/$${pd}/" ; \
+        done; \
+      fi \
+  )
 endef
 
 # Given a list of packages, add packages that exist to $@, print summary
 define PackageFilter # packages
-@if [ "$1" != "" ] ; then 				\
-  for p in $1 ; do 					\
-    pd=`$(ECHO) $${p} | $(SED) -e 's@[.]@/@g'`; 	\
-    found="false"; 					\
-    for cp in $(ALL_SOURCE_DIRS) ; do 			\
-      if [ -d $${cp}/$${pd} ] ; then 			\
-        $(ECHO) "$${p}" >> $@; 				\
-	found="true";					\
-	break; 						\
-      fi; 						\
-    done; 						\
-    if [ "$${found}" = "false" ] ; then 		\
-      $(ECHO) "WARNING: Package not found: $${p}"; 	\
-    fi; 						\
-  done; 						\
-fi
+	@if [ "$1" != "" ] ; then \
+	  for p in $1 ; do \
+	    pd=`$(ECHO) $${p} | $(SED) -e 's@[.]@/@g'`; \
+	    found="false"; \
+	    for cp in $(ALL_SOURCE_DIRS) ; do \
+	      if [ -d $${cp}/$${pd} ] ; then \
+	        $(ECHO) "$${p}" >> $@; \
+	        found="true"; \
+	        break; \
+	      fi; \
+	    done; \
+	    if [ "$${found}" = "false" ] ; then \
+	      $(ECHO) "WARNING: Package not found: $${p}"; \
+	    fi; \
+	  done; \
+	fi
 endef
 
 # Print out a summary of the javadoc command about to be run
 define JavadocSummary # optionsfile packagesfile
-@$(ECHO) "# Summary for $@";\
- $(ECHO) "# Options (`$(BASENAME) $1`):"; $(SED) -e 's@^@#   @' $1; \
- $(ECHO) "# Packages (`$(BASENAME) $2`):";$(SED) -e 's@^@#   @' $2
+	@$(ECHO) "# Summary for $@"; \
+	$(ECHO) "# Options (`$(BASENAME) $1`):"; $(SED) -e 's@^@#   @' $1; \
+	$(ECHO) "# Packages (`$(BASENAME) $2`):";$(SED) -e 's@^@#   @' $2
 endef
 
 #
@@ -216,15 +215,15 @@
 #
 # Different api directories created from root directory
 #
-COREAPI_DOCSDIR   = $(DOCSDIR)/api
-JDK_API_DOCSDIR   = $(DOCSDIR)/jdk/api
-JRE_API_DOCSDIR   = $(DOCSDIR)/jre/api
-PLATFORM_DOCSDIR  = $(DOCSDIR)/platform
+COREAPI_DOCSDIR = $(DOCSDIR)/api
+JDK_API_DOCSDIR = $(DOCSDIR)/jdk/api
+JRE_API_DOCSDIR = $(DOCSDIR)/jre/api
+PLATFORM_DOCSDIR = $(DOCSDIR)/platform
 
 # The non-core api javadocs need to be able to access the root of the core
-#   api directory, so for jdk/api or jre/api to get to the core api/
-#   directory we would use this:
-JDKJRE2COREAPI    = ../../api
+# api directory, so for jdk/api or jre/api to get to the core api/
+# directory we would use this:
+JDKJRE2COREAPI = ../../api
 
 # Common bottom argument
 define CommonBottom # year
@@ -241,13 +240,13 @@
 
 # Common echo of option
 define OptionOnly # opt
-$(PRINTF) "%s\n" "$1"
+	$(PRINTF) "%s\n" "$1"
 endef
 define OptionPair # opt arg
-$(PRINTF) "%s '%s'\n" "$1" '$2'
+	$(PRINTF) "%s '%s'\n" "$1" '$2'
 endef
 define OptionTrip # opt arg arg
-$(PRINTF) "%s '%s' '%s'\n" "$1" '$2' '$3'
+	$(PRINTF) "%s '%s' '%s'\n" "$1" '$2' '$3'
 endef
 
 # Core api bottom argument (with special sauce)
@@ -261,18 +260,18 @@
 </font>
 
 # Common javadoc options used by all
-COMMON_JAVADOCFLAGS =					\
-                -XDignore.symbol.file=true              \
-		-quiet					\
-                -use					\
-                -keywords				\
-		-Xdoclint:none				\
-                -Xprofilespath $(JDK_TOPDIR)/makefiles/profile-rtjar-includes.txt \
-		$(ADDITIONAL_JAVADOCFLAGS)
+COMMON_JAVADOCFLAGS = \
+    -XDignore.symbol.file=true \
+    -quiet \
+    -use \
+    -keywords \
+    -Xdoclint:none \
+    -Xprofilespath $(JDK_TOPDIR)/makefiles/profile-rtjar-includes.txt \
+    $(ADDITIONAL_JAVADOCFLAGS)
 
 ifdef OPENJDK
-  ADDITIONAL_JAVADOCFLAGS =				\
-                -Xdocrootparent $(DOCS_BASE_URL)
+  ADDITIONAL_JAVADOCFLAGS = \
+      -Xdocrootparent $(DOCS_BASE_URL)
 else
   ADDITIONAL_JAVADOCFLAGS =
 endif
@@ -280,11 +279,11 @@
 # Draft used for non-fcs documents
 DRAFT_HEADER =
 ifneq ($(MILESTONE), fcs)
-    DRAFT_HEADER = <br><strong>DRAFT&nbsp;$(MILESTONE)-$(BUILD_NUMBER)</strong>
-    DRAFT_BOTTOM = <br><strong>DRAFT&nbsp;$(MILESTONE)-$(BUILD_NUMBER)</strong>
-    DRAFT_WINTITLE = $(BUILD_NUMBER)
-    # Early access top text (not used in FCS releases)
-    COREAPI_TOP_EARLYACCESS = \
+  DRAFT_HEADER = <br><strong>DRAFT&nbsp;$(MILESTONE)-$(BUILD_NUMBER)</strong>
+  DRAFT_BOTTOM = <br><strong>DRAFT&nbsp;$(MILESTONE)-$(BUILD_NUMBER)</strong>
+  DRAFT_WINTITLE = $(BUILD_NUMBER)
+  # Early access top text (not used in FCS releases)
+  COREAPI_TOP_EARLYACCESS = \
 <div style="background-color: \#EEEEEE"> \
 <div style="padding: 6px; margin-top: 2px; margin-bottom: 6px; \
 margin-left: 6px; margin-right: 6px; text-align: justify; \
@@ -295,6 +294,7 @@
 The information is being made available to you solely for purpose of \
 evaluation. \
 </div> </div>
+
 endif
 
 #################################################################
@@ -321,12 +321,12 @@
 
 #################################################################
 # Production Targets -- USE THESE TARGETS WHEN:
-#    a) You're generating docs outside of release engineering's
-#       standard control build.
-#    b) The docs will be pushed to the web and/or included in
-#       the downloaded doc bundle.
+# a) You're generating docs outside of release engineering's
+#    standard control build.
+# b) The docs will be pushed to the web and/or included in
+#    the downloaded doc bundle.
 #
-# See:  Notes.html#releaseTargets
+# See: Notes.html#releaseTargets
 # Note: Spaces precede ifdef/ifndef indents. Tabs precede target commands (!)
 #
 
@@ -336,20 +336,20 @@
 	@$(ECHO) "    BUILD_NUMBER = $(BUILD_NUMBER)"
 	@$(ECHO) "    MILESTONE = $(MILESTONE)"
 	@$(ECHO) ""
-  ifeq ($(BUILD_NUMBER), b00)
-	@$(ECHO) "ERROR: Build number must be defined"
-	@$(ECHO) "MILESTONE is set to $(MILESTONE)"
-	@$(ECHO) ""
-	exit 1
-  endif
+        ifeq ($(BUILD_NUMBER), b00)
+	  @$(ECHO) "ERROR: Build number must be defined"
+	  @$(ECHO) "MILESTONE is set to $(MILESTONE)"
+	  @$(ECHO) ""
+	  exit 1
+        endif
 
 #############################################################
 #
 # coredocs
 #
-COREAPI_DOCTITLE  = Java$(TRADEMARK) Platform, Standard Edition \
+COREAPI_DOCTITLE = Java$(TRADEMARK) Platform, Standard Edition \
 $(JDK_MINOR_VERSION)<br>API Specification
-COREAPI_WINDOWTITLE  = Java Platform SE $(JDK_MINOR_VERSION)
+COREAPI_WINDOWTITLE = Java Platform SE $(JDK_MINOR_VERSION)
 COREAPI_HEADER = \
 <strong>Java$(TRADEMARK)&nbsp;Platform<br>Standard&nbsp;Ed.&nbsp;$(JDK_MINOR_VERSION)</strong>
 
@@ -361,8 +361,8 @@
 COREAPI_OVERVIEW = $(JDK_SHARE_CLASSES)/overview-core.html
 
 # The index.html, options, and packages files
-COREAPI_INDEX_FILE    = $(COREAPI_DOCSDIR)/index.html
-COREAPI_OPTIONS_FILE  = $(DOCSTMPDIR)/coredocs.options
+COREAPI_INDEX_FILE = $(COREAPI_DOCSDIR)/index.html
+COREAPI_OPTIONS_FILE = $(DOCSTMPDIR)/coredocs.options
 COREAPI_PACKAGES_FILE = $(DOCSTMPDIR)/coredocs.packages
 
 coredocs: $(COREAPI_INDEX_FILE)
@@ -375,43 +375,43 @@
 	$(prep-javadoc)
 	$(call JavadocSummary,$(COREAPI_OPTIONS_FILE),$(COREAPI_PACKAGES_FILE))
 	$(JAVADOC_CMD) -d $(@D) \
-	  @$(COREAPI_OPTIONS_FILE) @$(COREAPI_PACKAGES_FILE)
+	    @$(COREAPI_OPTIONS_FILE) @$(COREAPI_PACKAGES_FILE)
 
 # Create file with javadoc options in it
 $(COREAPI_OPTIONS_FILE): $(COREAPI_OVERVIEW)
 	$(prep-target)
-	@($(call OptionOnly,$(COMMON_JAVADOCFLAGS))			; \
-	  $(call OptionPair,-sourcepath,$(RELEASEDOCS_SOURCEPATH))	; \
-	  $(call OptionPair,-encoding,ISO-8859-1)			; \
-	  $(call OptionPair,-tag,beaninfo:X)				; \
-	  $(call OptionPair,-tag,revised:X)				; \
-	  $(call OptionPair,-tag,since.unbundled:X)			; \
-	  $(call OptionPair,-tag,spec:X)				; \
-	  $(call OptionPair,-tag,specdefault:X)				; \
-	  $(call OptionPair,-tag,Note:X)				; \
-	  $(call OptionPair,-tag,ToDo:X)				; \
-          $(call OptionPair,-tag,apiNote:a:API Note:)                   ; \
-          $(call OptionPair,-tag,implSpec:a:Implementation Requirements:) ; \
-          $(call OptionPair,-tag,implNote:a:Implementation Note:)       ; \
-          $(call OptionPair,-tag,param)                                 ; \
-          $(call OptionPair,-tag,return)                                ; \
-          $(call OptionPair,-tag,throws)                                ; \
-          $(call OptionPair,-tag,since)                                 ; \
-          $(call OptionPair,-tag,version)                               ; \
-          $(call OptionPair,-tag,serialData)                            ; \
-          $(call OptionPair,-tag,factory)                               ; \
-          $(call OptionPair,-tag,see)                                   ; \
-          $(call OptionPair,-tag,$(TAG_JLS)) 				; \
-	  $(call OptionOnly,-splitIndex)				; \
-	  $(call OptionPair,-overview,$(COREAPI_OVERVIEW))		; \
-	  $(call OptionPair,-doctitle,$(COREAPI_DOCTITLE))		; \
-	  $(call OptionPair,-windowtitle,$(COREAPI_WINDOWTITLE) $(DRAFT_WINTITLE)) ;\
-	  $(call OptionPair,-header,$(COREAPI_HEADER)$(DRAFT_HEADER))	; \
-	  $(call OptionPair,-bottom,$(COREAPI_BOTTOM)$(DRAFT_BOTTOM))	; \
-        ) >> $@
-ifdef COREAPI_TOP_EARLYACCESS
-	@$(call OptionPair,-top,$(COREAPI_TOP_EARLYACCESS)) >> $@
-endif
+	@($(call OptionOnly,$(COMMON_JAVADOCFLAGS)) ; \
+	  $(call OptionPair,-sourcepath,$(RELEASEDOCS_SOURCEPATH)) ; \
+	  $(call OptionPair,-encoding,ISO-8859-1) ; \
+	  $(call OptionPair,-tag,beaninfo:X) ; \
+	  $(call OptionPair,-tag,revised:X) ; \
+	  $(call OptionPair,-tag,since.unbundled:X) ; \
+	  $(call OptionPair,-tag,spec:X) ; \
+	  $(call OptionPair,-tag,specdefault:X) ; \
+	  $(call OptionPair,-tag,Note:X) ; \
+	  $(call OptionPair,-tag,ToDo:X) ; \
+	  $(call OptionPair,-tag,apiNote:a:API Note:) ; \
+	  $(call OptionPair,-tag,implSpec:a:Implementation Requirements:) ; \
+	  $(call OptionPair,-tag,implNote:a:Implementation Note:) ; \
+	  $(call OptionPair,-tag,param) ; \
+	  $(call OptionPair,-tag,return) ; \
+	  $(call OptionPair,-tag,throws) ; \
+	  $(call OptionPair,-tag,since) ; \
+	  $(call OptionPair,-tag,version) ; \
+	  $(call OptionPair,-tag,serialData) ; \
+	  $(call OptionPair,-tag,factory) ; \
+	  $(call OptionPair,-tag,see) ; \
+	  $(call OptionPair,-tag,$(TAG_JLS)) ; \
+	  $(call OptionOnly,-splitIndex) ; \
+	  $(call OptionPair,-overview,$(COREAPI_OVERVIEW)) ; \
+	  $(call OptionPair,-doctitle,$(COREAPI_DOCTITLE)) ; \
+	  $(call OptionPair,-windowtitle,$(COREAPI_WINDOWTITLE) $(DRAFT_WINTITLE)) ; \
+	  $(call OptionPair,-header,$(COREAPI_HEADER)$(DRAFT_HEADER)) ; \
+	  $(call OptionPair,-bottom,$(COREAPI_BOTTOM)$(DRAFT_BOTTOM)) ; \
+	) >> $@
+        ifdef COREAPI_TOP_EARLYACCESS
+	  @$(call OptionPair,-top,$(COREAPI_TOP_EARLYACCESS)) >> $@
+        endif
 
 # Create a file with the package names in it
 $(COREAPI_PACKAGES_FILE): $(DIRECTORY_CACHE) $(call PackageDependencies,$(CORE_PKGS))
@@ -425,19 +425,19 @@
 
 ALL_OTHER_TARGETS += docletapidocs
 
-DOCLETAPI_DOCDIR       := $(JDK_API_DOCSDIR)/javadoc/doclet
-DOCLETAPI2COREAPI      := ../../$(JDKJRE2COREAPI)
-DOCLETAPI_DOCTITLE     := Doclet API
-DOCLETAPI_WINDOWTITLE  := Doclet API
-DOCLETAPI_HEADER       := <strong>Doclet API</strong>
-DOCLETAPI_BOTTOM       := $(call CommonTrademarkBottom,$(DOCLETAPI_FIRST_COPYRIGHT_YEAR))
-DOCLETAPI_GROUPNAME    := Packages
-DOCLETAPI_REGEXP       := com.sun.javadoc
+DOCLETAPI_DOCDIR := $(JDK_API_DOCSDIR)/javadoc/doclet
+DOCLETAPI2COREAPI := ../../$(JDKJRE2COREAPI)
+DOCLETAPI_DOCTITLE := Doclet API
+DOCLETAPI_WINDOWTITLE := Doclet API
+DOCLETAPI_HEADER := <strong>Doclet API</strong>
+DOCLETAPI_BOTTOM := $(call CommonTrademarkBottom,$(DOCLETAPI_FIRST_COPYRIGHT_YEAR))
+DOCLETAPI_GROUPNAME := Packages
+DOCLETAPI_REGEXP := com.sun.javadoc
 # DOCLETAPI_PKGS is located in NON_CORE_PKGS.gmk
 
 # The index.html, options, and packages files
-DOCLETAPI_INDEX_FILE    = $(DOCLETAPI_DOCDIR)/index.html
-DOCLETAPI_OPTIONS_FILE  = $(DOCSTMPDIR)/docletapi.options
+DOCLETAPI_INDEX_FILE = $(DOCLETAPI_DOCDIR)/index.html
+DOCLETAPI_OPTIONS_FILE = $(DOCSTMPDIR)/docletapi.options
 DOCLETAPI_PACKAGES_FILE = $(DOCSTMPDIR)/docletapi.packages
 
 docletapidocs: $(DOCLETAPI_INDEX_FILE)
@@ -450,22 +450,22 @@
 	$(prep-javadoc)
 	$(call JavadocSummary,$(DOCLETAPI_OPTIONS_FILE),$(DOCLETAPI_PACKAGES_FILE))
 	$(JAVADOC_CMD) -d $(@D) \
-	  @$(DOCLETAPI_OPTIONS_FILE) @$(DOCLETAPI_PACKAGES_FILE)
+	    @$(DOCLETAPI_OPTIONS_FILE) @$(DOCLETAPI_PACKAGES_FILE)
 
 # Create file with javadoc options in it
 $(DOCLETAPI_OPTIONS_FILE):
 	$(prep-target)
-	@($(call OptionOnly,$(COMMON_JAVADOCFLAGS))			; \
-	  $(call OptionPair,-sourcepath,$(RELEASEDOCS_SOURCEPATH))	; \
-	  $(call OptionPair,-encoding,ascii)				; \
-	  $(call OptionOnly,-breakiterator)				; \
-	  $(call OptionPair,-doctitle,$(DOCLETAPI_DOCTITLE))		; \
-	  $(call OptionPair,-windowtitle,$(DOCLETAPI_WINDOWTITLE) $(DRAFT_WINTITLE));\
-	  $(call OptionPair,-header,$(DOCLETAPI_HEADER)$(DRAFT_HEADER))	; \
-	  $(call OptionPair,-bottom,$(DOCLETAPI_BOTTOM)$(DRAFT_BOTTOM))	; \
+	@($(call OptionOnly,$(COMMON_JAVADOCFLAGS)) ; \
+	  $(call OptionPair,-sourcepath,$(RELEASEDOCS_SOURCEPATH)) ; \
+	  $(call OptionPair,-encoding,ascii) ; \
+	  $(call OptionOnly,-breakiterator) ; \
+	  $(call OptionPair,-doctitle,$(DOCLETAPI_DOCTITLE)) ; \
+	  $(call OptionPair,-windowtitle,$(DOCLETAPI_WINDOWTITLE) $(DRAFT_WINTITLE)); \
+	  $(call OptionPair,-header,$(DOCLETAPI_HEADER)$(DRAFT_HEADER)) ; \
+	  $(call OptionPair,-bottom,$(DOCLETAPI_BOTTOM)$(DRAFT_BOTTOM)) ; \
 	  $(call OptionTrip,-group,$(DOCLETAPI_GROUPNAME),$(DOCLETAPI_REGEXP)); \
 	  $(call OptionTrip,-linkoffline,$(DOCLETAPI2COREAPI),$(COREAPI_DOCSDIR)/); \
-        ) >> $@
+	) >> $@
 
 # Create a file with the package names in it
 $(DOCLETAPI_PACKAGES_FILE): $(DIRECTORY_CACHE) $(call PackageDependencies,$(DOCLETAPI_PKGS))
@@ -478,17 +478,17 @@
 #
 
 ALL_OTHER_TARGETS += tagletapidocs
-TAGLETAPI_DOCDIR   := $(JDK_API_DOCSDIR)/javadoc/taglet
-TAGLETAPI2COREAPI  := ../../$(JDKJRE2COREAPI)
-TAGLETAPI_BOTTOM   := $(call CommonTrademarkBottom,$(TAGLETAPI_FIRST_COPYRIGHT_YEAR))
+TAGLETAPI_DOCDIR := $(JDK_API_DOCSDIR)/javadoc/taglet
+TAGLETAPI2COREAPI := ../../$(JDKJRE2COREAPI)
+TAGLETAPI_BOTTOM := $(call CommonTrademarkBottom,$(TAGLETAPI_FIRST_COPYRIGHT_YEAR))
 # TAGLETAPI_FILE is located in NON_CORE_PKGS.gmk
 
 # Temporary directory (special generation rules)
-TAGLETAPI_TEMPDIR       = $(DOCSTMPDIR)/taglets_temp
+TAGLETAPI_TEMPDIR = $(DOCSTMPDIR)/taglets_temp
 
 # The index.html, options, and packages files
-TAGLETAPI_INDEX_FILE    = $(TAGLETAPI_DOCDIR)/index.html
-TAGLETAPI_OPTIONS_FILE  = $(DOCSTMPDIR)/tagletapi.options
+TAGLETAPI_INDEX_FILE = $(TAGLETAPI_DOCDIR)/index.html
+TAGLETAPI_OPTIONS_FILE = $(DOCSTMPDIR)/tagletapi.options
 TAGLETAPI_PACKAGES_FILE = $(DOCSTMPDIR)/tagletapi.packages
 
 tagletapidocs: $(TAGLETAPI_INDEX_FILE)
@@ -503,7 +503,7 @@
 	$(MKDIR) -p $(TAGLETAPI_TEMPDIR)
 	$(call JavadocSummary,$(TAGLETAPI_OPTIONS_FILE),$(TAGLETAPI_PACKAGES_FILE))
 	$(JAVADOC_CMD) -d $(TAGLETAPI_TEMPDIR) \
-	  @$(TAGLETAPI_OPTIONS_FILE) @$(TAGLETAPI_PACKAGES_FILE)
+	    @$(TAGLETAPI_OPTIONS_FILE) @$(TAGLETAPI_PACKAGES_FILE)
 	cp -r $(TAGLETAPI_TEMPDIR)/com $(@D)
 	cp $(TAGLETAPI_TEMPDIR)/stylesheet.css $(@D)
 	$(RM) -r $(TAGLETAPI_TEMPDIR)
@@ -511,14 +511,14 @@
 # Create file with javadoc options in it
 $(TAGLETAPI_OPTIONS_FILE):
 	$(prep-target)
-	@($(call OptionOnly,$(COMMON_JAVADOCFLAGS))			; \
-	  $(call OptionPair,-sourcepath,$(RELEASEDOCS_SOURCEPATH))	; \
-	  $(call OptionPair,-encoding,ascii)				; \
-	  $(call OptionOnly,-nonavbar)					; \
-          $(call OptionOnly,-noindex)                                   ; \
-	  $(call OptionPair,-bottom,$(TAGLETAPI_BOTTOM)$(DRAFT_BOTTOM))	; \
+	@($(call OptionOnly,$(COMMON_JAVADOCFLAGS)) ; \
+	  $(call OptionPair,-sourcepath,$(RELEASEDOCS_SOURCEPATH)) ; \
+	  $(call OptionPair,-encoding,ascii) ; \
+	  $(call OptionOnly,-nonavbar) ; \
+	  $(call OptionOnly,-noindex) ; \
+	  $(call OptionPair,-bottom,$(TAGLETAPI_BOTTOM)$(DRAFT_BOTTOM)) ; \
 	  $(call OptionTrip,-linkoffline,$(TAGLETAPI2COREAPI),$(COREAPI_DOCSDIR)/); \
-        ) >> $@
+	) >> $@
 
 # Create a file with the package names in it
 $(TAGLETAPI_PACKAGES_FILE): $(DIRECTORY_CACHE) $(call PackageDependencies,$(TAGLETAPI_PKGS))
@@ -532,19 +532,19 @@
 
 ALL_OTHER_TARGETS += domapidocs
 
-DOMAPI_DOCDIR       := $(JRE_API_DOCSDIR)/plugin/dom
-DOMAPI2COREAPI      := ../../$(JDKJRE2COREAPI)
-DOMAPI_DOCTITLE     := Common DOM API
-DOMAPI_WINDOWTITLE  := Common DOM API
-DOMAPI_HEADER       := <strong>Common DOM API</strong>
-DOMAPI_BOTTOM       := $(call CommonTrademarkBottom,$(DOMAPI_FIRST_COPYRIGHT_YEAR))
-DOMAPI_GROUPNAME    := Packages
-DOMAPI_REGEXP       := com.sun.java.browser.dom:org.w3c.dom*
+DOMAPI_DOCDIR := $(JRE_API_DOCSDIR)/plugin/dom
+DOMAPI2COREAPI := ../../$(JDKJRE2COREAPI)
+DOMAPI_DOCTITLE := Common DOM API
+DOMAPI_WINDOWTITLE := Common DOM API
+DOMAPI_HEADER := <strong>Common DOM API</strong>
+DOMAPI_BOTTOM := $(call CommonTrademarkBottom,$(DOMAPI_FIRST_COPYRIGHT_YEAR))
+DOMAPI_GROUPNAME := Packages
+DOMAPI_REGEXP := com.sun.java.browser.dom:org.w3c.dom*
 # DOMAPI_PKGS is located in NON_CORE_PKGS.gmk
 
 # The index.html, options, and packages files
-DOMAPI_INDEX_FILE    = $(DOMAPI_DOCDIR)/index.html
-DOMAPI_OPTIONS_FILE  = $(DOCSTMPDIR)/domapi.options
+DOMAPI_INDEX_FILE = $(DOMAPI_DOCDIR)/index.html
+DOMAPI_OPTIONS_FILE = $(DOCSTMPDIR)/domapi.options
 DOMAPI_PACKAGES_FILE = $(DOCSTMPDIR)/domapi.packages
 
 domapidocs: $(DOMAPI_INDEX_FILE)
@@ -557,22 +557,22 @@
 	$(prep-javadoc)
 	$(call JavadocSummary,$(DOMAPI_OPTIONS_FILE),$(DOMAPI_PACKAGES_FILE))
 	$(JAVADOC_CMD) -d $(@D) \
-	  @$(DOMAPI_OPTIONS_FILE) @$(DOMAPI_PACKAGES_FILE)
+	    @$(DOMAPI_OPTIONS_FILE) @$(DOMAPI_PACKAGES_FILE)
 
 # Create file with javadoc options in it
 $(DOMAPI_OPTIONS_FILE):
 	$(prep-target)
-	@($(call OptionOnly,$(COMMON_JAVADOCFLAGS))			; \
-	  $(call OptionPair,-sourcepath,$(RELEASEDOCS_SOURCEPATH))	; \
-	  $(call OptionPair,-encoding,ascii)				; \
-	  $(call OptionOnly,-splitIndex)				; \
-	  $(call OptionPair,-doctitle,$(DOMAPI_DOCTITLE))		; \
-	  $(call OptionPair,-windowtitle,$(DOMAPI_WINDOWTITLE) $(DRAFT_WINTITLE));\
-	  $(call OptionPair,-header,$(DOMAPI_HEADER)$(DRAFT_HEADER))	; \
-	  $(call OptionPair,-bottom,$(DOMAPI_BOTTOM)$(DRAFT_BOTTOM))	; \
+	@($(call OptionOnly,$(COMMON_JAVADOCFLAGS)) ; \
+	  $(call OptionPair,-sourcepath,$(RELEASEDOCS_SOURCEPATH)) ; \
+	  $(call OptionPair,-encoding,ascii) ; \
+	  $(call OptionOnly,-splitIndex) ; \
+	  $(call OptionPair,-doctitle,$(DOMAPI_DOCTITLE)) ; \
+	  $(call OptionPair,-windowtitle,$(DOMAPI_WINDOWTITLE) $(DRAFT_WINTITLE)); \
+	  $(call OptionPair,-header,$(DOMAPI_HEADER)$(DRAFT_HEADER)) ; \
+	  $(call OptionPair,-bottom,$(DOMAPI_BOTTOM)$(DRAFT_BOTTOM)) ; \
 	  $(call OptionTrip,-group,$(DOMAPI_GROUPNAME),$(DOMAPI_REGEXP)); \
 	  $(call OptionTrip,-linkoffline,$(DOMAPI2COREAPI),$(COREAPI_DOCSDIR)/); \
-        ) >> $@
+	) >> $@
 
 # Create a file with the package names in it
 $(DOMAPI_PACKAGES_FILE): $(DIRECTORY_CACHE) $(call PackageDependencies,$(DOMAPI_PKGS))
@@ -595,18 +595,18 @@
 
 ALL_OTHER_TARGETS += jdidocs
 
-JDI_DOCDIR      := $(JDK_API_DOCSDIR)/jpda/jdi
-JDI2COREAPI     := ../../$(JDKJRE2COREAPI)
-JDI_DOCTITLE    := Java$(TRADEMARK) Debug Interface
+JDI_DOCDIR := $(JDK_API_DOCSDIR)/jpda/jdi
+JDI2COREAPI := ../../$(JDKJRE2COREAPI)
+JDI_DOCTITLE := Java$(TRADEMARK) Debug Interface
 JDI_WINDOWTITLE := Java Debug Interface
-JDI_HEADER      := <strong>Java Debug Interface</strong>
-JDI_BOTTOM      := $(call CommonBottom,$(JDI_FIRST_COPYRIGHT_YEAR))
-JDI_OVERVIEW    := $(JDK_SHARE_CLASSES)/jdi-overview.html
+JDI_HEADER := <strong>Java Debug Interface</strong>
+JDI_BOTTOM := $(call CommonBottom,$(JDI_FIRST_COPYRIGHT_YEAR))
+JDI_OVERVIEW := $(JDK_SHARE_CLASSES)/jdi-overview.html
 # JDI_PKGS is located in NON_CORE_PKGS.gmk
 
 # The index.html, options, and packages files
-JDI_INDEX_FILE    = $(JDI_DOCDIR)/index.html
-JDI_OPTIONS_FILE  = $(DOCSTMPDIR)/jdi.options
+JDI_INDEX_FILE = $(JDI_DOCDIR)/index.html
+JDI_OPTIONS_FILE = $(DOCSTMPDIR)/jdi.options
 JDI_PACKAGES_FILE = $(DOCSTMPDIR)/jdi.packages
 
 jdidocs: $(JDI_INDEX_FILE)
@@ -619,21 +619,21 @@
 	$(prep-javadoc)
 	$(call JavadocSummary,$(JDI_OPTIONS_FILE),$(JDI_PACKAGES_FILE))
 	$(JAVADOC_CMD) -d $(@D) \
-	  @$(JDI_OPTIONS_FILE) @$(JDI_PACKAGES_FILE)
+	    @$(JDI_OPTIONS_FILE) @$(JDI_PACKAGES_FILE)
 
 # Create file with javadoc options in it
 $(JDI_OPTIONS_FILE): $(JDI_OVERVIEW)
 	$(prep-target)
-	@($(call OptionOnly,$(COMMON_JAVADOCFLAGS))			; \
-	  $(call OptionPair,-sourcepath,$(RELEASEDOCS_SOURCEPATH))	; \
-	  $(call OptionPair,-encoding,ascii)				; \
-	  $(call OptionPair,-overview,$(JDI_OVERVIEW))			; \
-	  $(call OptionPair,-doctitle,$(JDI_DOCTITLE))			; \
+	@($(call OptionOnly,$(COMMON_JAVADOCFLAGS)) ; \
+	  $(call OptionPair,-sourcepath,$(RELEASEDOCS_SOURCEPATH)) ; \
+	  $(call OptionPair,-encoding,ascii) ; \
+	  $(call OptionPair,-overview,$(JDI_OVERVIEW)) ; \
+	  $(call OptionPair,-doctitle,$(JDI_DOCTITLE)) ; \
 	  $(call OptionPair,-windowtitle,$(JDI_WINDOWTITLE) $(DRAFT_WINTITLE)); \
-	  $(call OptionPair,-header,$(JDI_HEADER)$(DRAFT_HEADER))	; \
-	  $(call OptionPair,-bottom,$(JDI_BOTTOM)$(DRAFT_BOTTOM))	; \
+	  $(call OptionPair,-header,$(JDI_HEADER)$(DRAFT_HEADER)) ; \
+	  $(call OptionPair,-bottom,$(JDI_BOTTOM)$(DRAFT_BOTTOM)) ; \
 	  $(call OptionTrip,-linkoffline,$(JDI2COREAPI),$(COREAPI_DOCSDIR)/); \
-        ) >> $@
+	) >> $@
 
 # Create a file with the package names in it
 $(JDI_PACKAGES_FILE): $(DIRECTORY_CACHE) $(call PackageDependencies,$(JDI_PKGS))
@@ -647,7 +647,7 @@
 
 ALL_OTHER_TARGETS += jdwpdocs
 
-JDWP_DOCDIR     = $(PLATFORM_DOCSDIR)/jpda/jdwp
+JDWP_DOCDIR = $(PLATFORM_DOCSDIR)/jpda/jdwp
 
 jdwpdocs: $(JDWP_DOCDIR)/jdwp-protocol.html
 $(JDWP_DOCDIR)/jdwp-protocol.html : $(JDK_OUTPUTDIR)/gensrc_jdwp_doc/jdwp-protocol.html
@@ -662,16 +662,16 @@
 
 ALL_OTHER_TARGETS += jvmtidocs
 
-JVMTI_DOCDIR      = $(PLATFORM_DOCSDIR)/jvmti
-JVMTI_HTML        = $(HOTSPOT_DIST)/docs/platform/jvmti/jvmti.html
+JVMTI_DOCDIR = $(PLATFORM_DOCSDIR)/jvmti
+JVMTI_HTML = $(HOTSPOT_DIST)/docs/platform/jvmti/jvmti.html
 
-jvmtidocs:  $(JVMTI_DOCDIR)/jvmti.html
+jvmtidocs: $(JVMTI_DOCDIR)/jvmti.html
 $(JVMTI_DOCDIR)/jvmti.html:
 	@$(prep-javadoc)
-	@if [ -f $(JVMTI_HTML) ] ; then		                           \
-	  $(ECHO) "$(CP) $(JVMTI_HTML) $@";                 	           \
-	  $(CP) $(JVMTI_HTML) $@; 	                 	           \
-	else 						                   \
+	@if [ -f $(JVMTI_HTML) ] ; then \
+	  $(ECHO) "$(CP) $(JVMTI_HTML) $@"; \
+	  $(CP) $(JVMTI_HTML) $@; \
+	else \
 	  $(ECHO) "WARNING: Generated file does not exist: $(JVMTI_HTML)"; \
 	fi
 
@@ -682,18 +682,18 @@
 
 ALL_OTHER_TARGETS += jaasdocs
 
-JAAS_DOCDIR	 := $(JRE_API_DOCSDIR)/security/jaas/spec
-JAAS2COREAPI     := ../../../$(JDKJRE2COREAPI)
-JAAS_DOCTITLE    := Java$(TRADEMARK) Authentication and Authorization Service
+JAAS_DOCDIR := $(JRE_API_DOCSDIR)/security/jaas/spec
+JAAS2COREAPI := ../../../$(JDKJRE2COREAPI)
+JAAS_DOCTITLE := Java$(TRADEMARK) Authentication and Authorization Service
 JAAS_WINDOWTITLE := Java Authentication and Authorization Service
-JAAS_HEADER      := <strong>Java Authentication and Authorization Service</strong>
-JAAS_BOTTOM      := $(call CommonBottom,$(JAAS_FIRST_COPYRIGHT_YEAR))
+JAAS_HEADER := <strong>Java Authentication and Authorization Service</strong>
+JAAS_BOTTOM := $(call CommonBottom,$(JAAS_FIRST_COPYRIGHT_YEAR))
 # JAAS_PKGS is located in NON_CORE_PKGS.gmk
-JAAS_OVERVIEW    := $(JDK_SHARE_CLASSES)/com/sun/security/auth/jaas-overview.html
+JAAS_OVERVIEW := $(JDK_SHARE_CLASSES)/com/sun/security/auth/jaas-overview.html
 
 # The index.html, options, and packages files
-JAAS_INDEX_FILE    = $(JAAS_DOCDIR)/index.html
-JAAS_OPTIONS_FILE  = $(DOCSTMPDIR)/jaas.options
+JAAS_INDEX_FILE = $(JAAS_DOCDIR)/index.html
+JAAS_OPTIONS_FILE = $(DOCSTMPDIR)/jaas.options
 JAAS_PACKAGES_FILE = $(DOCSTMPDIR)/jaas.packages
 
 jaasdocs: $(JAAS_INDEX_FILE)
@@ -706,21 +706,21 @@
 	$(prep-javadoc)
 	$(call JavadocSummary,$(JAAS_OPTIONS_FILE),$(JAAS_PACKAGES_FILE))
 	$(JAVADOC_CMD) -d $(@D) \
-	  @$(JAAS_OPTIONS_FILE) @$(JAAS_PACKAGES_FILE)
+	    @$(JAAS_OPTIONS_FILE) @$(JAAS_PACKAGES_FILE)
 
 # Create file with javadoc options in it
 $(JAAS_OPTIONS_FILE): $(JAAS_OVERVIEW)
 	$(prep-target)
-	@($(call OptionOnly,$(COMMON_JAVADOCFLAGS))			; \
-	  $(call OptionPair,-sourcepath,$(RELEASEDOCS_SOURCEPATH))	; \
-	  $(call OptionPair,-encoding,ascii)				; \
-	  $(call OptionPair,-overview,$(JAAS_OVERVIEW))			; \
-	  $(call OptionPair,-doctitle,$(JAAS_DOCTITLE))			; \
+	@($(call OptionOnly,$(COMMON_JAVADOCFLAGS)) ; \
+	  $(call OptionPair,-sourcepath,$(RELEASEDOCS_SOURCEPATH)) ; \
+	  $(call OptionPair,-encoding,ascii) ; \
+	  $(call OptionPair,-overview,$(JAAS_OVERVIEW)) ; \
+	  $(call OptionPair,-doctitle,$(JAAS_DOCTITLE)) ; \
 	  $(call OptionPair,-windowtitle,$(JAAS_WINDOWTITLE) $(DRAFT_WINTITLE)); \
-	  $(call OptionPair,-header,$(JAAS_HEADER)$(DRAFT_HEADER))	; \
-	  $(call OptionPair,-bottom,$(JAAS_BOTTOM)$(DRAFT_BOTTOM))	; \
+	  $(call OptionPair,-header,$(JAAS_HEADER)$(DRAFT_HEADER)) ; \
+	  $(call OptionPair,-bottom,$(JAAS_BOTTOM)$(DRAFT_BOTTOM)) ; \
 	  $(call OptionTrip,-linkoffline,$(JAAS2COREAPI),$(COREAPI_DOCSDIR)/); \
-        ) >> $@
+	) >> $@
 
 # Create a file with the package names in it
 $(JAAS_PACKAGES_FILE): $(DIRECTORY_CACHE) $(call PackageDependencies,$(JAAS_PKGS))
@@ -734,18 +734,18 @@
 
 ALL_OTHER_TARGETS += jgssdocs
 
-JGSS_DOCDIR	 := $(JRE_API_DOCSDIR)/security/jgss/spec
-JGSS2COREAPI     := ../../../$(JDKJRE2COREAPI)
-JGSS_DOCTITLE    := Java$(TRADEMARK) GSS-API Utilities
+JGSS_DOCDIR := $(JRE_API_DOCSDIR)/security/jgss/spec
+JGSS2COREAPI := ../../../$(JDKJRE2COREAPI)
+JGSS_DOCTITLE := Java$(TRADEMARK) GSS-API Utilities
 JGSS_WINDOWTITLE := Java GSS-API Utilities
-JGSS_HEADER      := <strong>Java GSS-API Utilities</strong>
-JGSS_BOTTOM      := $(call CommonBottom,$(JGSS_FIRST_COPYRIGHT_YEAR))
-JGSS_OVERVIEW    := $(JDK_SHARE_CLASSES)/com/sun/security/jgss/jgss-overview.html
+JGSS_HEADER := <strong>Java GSS-API Utilities</strong>
+JGSS_BOTTOM := $(call CommonBottom,$(JGSS_FIRST_COPYRIGHT_YEAR))
+JGSS_OVERVIEW := $(JDK_SHARE_CLASSES)/com/sun/security/jgss/jgss-overview.html
 # JGSS_PKGS is located in NON_CORE_PKGS.gmk
 
 # The index.html, options, and packages files
-JGSS_INDEX_FILE    = $(JGSS_DOCDIR)/index.html
-JGSS_OPTIONS_FILE  = $(DOCSTMPDIR)/jgss.options
+JGSS_INDEX_FILE = $(JGSS_DOCDIR)/index.html
+JGSS_OPTIONS_FILE = $(DOCSTMPDIR)/jgss.options
 JGSS_PACKAGES_FILE = $(DOCSTMPDIR)/jgss.packages
 
 jgssdocs: $(JGSS_INDEX_FILE)
@@ -758,22 +758,22 @@
 	$(prep-javadoc)
 	$(call JavadocSummary,$(JGSS_OPTIONS_FILE),$(JGSS_PACKAGES_FILE))
 	$(JAVADOC_CMD) -d $(@D) \
-	  @$(JGSS_OPTIONS_FILE) @$(JGSS_PACKAGES_FILE)
+	    @$(JGSS_OPTIONS_FILE) @$(JGSS_PACKAGES_FILE)
 
 # Create file with javadoc options in it
 $(JGSS_OPTIONS_FILE): $(JGSS_OVERVIEW)
 	$(prep-target)
-	@($(call OptionOnly,$(COMMON_JAVADOCFLAGS))			; \
-	  $(call OptionPair,-sourcepath,$(RELEASEDOCS_SOURCEPATH))	; \
-	  $(call OptionPair,-encoding,ascii)				; \
-	  $(call OptionOnly,-nodeprecatedlist)				; \
-	  $(call OptionPair,-overview,$(JGSS_OVERVIEW))			; \
-	  $(call OptionPair,-doctitle,$(JGSS_DOCTITLE))			; \
+	@($(call OptionOnly,$(COMMON_JAVADOCFLAGS)) ; \
+	  $(call OptionPair,-sourcepath,$(RELEASEDOCS_SOURCEPATH)) ; \
+	  $(call OptionPair,-encoding,ascii) ; \
+	  $(call OptionOnly,-nodeprecatedlist) ; \
+	  $(call OptionPair,-overview,$(JGSS_OVERVIEW)) ; \
+	  $(call OptionPair,-doctitle,$(JGSS_DOCTITLE)) ; \
 	  $(call OptionPair,-windowtitle,$(JGSS_WINDOWTITLE) $(DRAFT_WINTITLE)); \
-	  $(call OptionPair,-header,$(JGSS_HEADER)$(DRAFT_HEADER))	; \
-	  $(call OptionPair,-bottom,$(JGSS_BOTTOM)$(DRAFT_BOTTOM))	; \
+	  $(call OptionPair,-header,$(JGSS_HEADER)$(DRAFT_HEADER)) ; \
+	  $(call OptionPair,-bottom,$(JGSS_BOTTOM)$(DRAFT_BOTTOM)) ; \
 	  $(call OptionTrip,-linkoffline,$(JGSS2COREAPI),$(COREAPI_DOCSDIR)/); \
-        ) >> $@
+	) >> $@
 
 # Create a file with the package names in it
 $(JGSS_PACKAGES_FILE): $(DIRECTORY_CACHE) $(call PackageDependencies,$(JGSS_PKGS))
@@ -787,17 +787,17 @@
 
 ALL_OTHER_TARGETS += smartcardiodocs
 
-SMARTCARDIO_DOCDIR	:= $(JRE_API_DOCSDIR)/security/smartcardio/spec
-SMARTCARDIO2COREAPI     := ../../../$(JDKJRE2COREAPI)
-SMARTCARDIO_DOCTITLE    := Java$(TRADEMARK) Smart Card I/O
+SMARTCARDIO_DOCDIR := $(JRE_API_DOCSDIR)/security/smartcardio/spec
+SMARTCARDIO2COREAPI := ../../../$(JDKJRE2COREAPI)
+SMARTCARDIO_DOCTITLE := Java$(TRADEMARK) Smart Card I/O
 SMARTCARDIO_WINDOWTITLE := Java Smart Card I/O
-SMARTCARDIO_HEADER      := <strong>Java Smart Card I/O</strong>
-SMARTCARDIO_BOTTOM      := $(call CommonBottom,$(SMARTCARDIO_FIRST_COPYRIGHT_YEAR))
+SMARTCARDIO_HEADER := <strong>Java Smart Card I/O</strong>
+SMARTCARDIO_BOTTOM := $(call CommonBottom,$(SMARTCARDIO_FIRST_COPYRIGHT_YEAR))
 # SMARTCARDIO_PKGS is located in NON_CORE_PKGS.gmk
 
 # The index.html, options, and packages files
-SMARTCARDIO_INDEX_FILE    = $(SMARTCARDIO_DOCDIR)/index.html
-SMARTCARDIO_OPTIONS_FILE  = $(DOCSTMPDIR)/smartcardio.options
+SMARTCARDIO_INDEX_FILE = $(SMARTCARDIO_DOCDIR)/index.html
+SMARTCARDIO_OPTIONS_FILE = $(DOCSTMPDIR)/smartcardio.options
 SMARTCARDIO_PACKAGES_FILE = $(DOCSTMPDIR)/smartcardio.packages
 
 smartcardiodocs: $(SMARTCARDIO_INDEX_FILE)
@@ -810,21 +810,21 @@
 	$(prep-javadoc)
 	$(call JavadocSummary,$(SMARTCARDIO_OPTIONS_FILE),$(SMARTCARDIO_PACKAGES_FILE))
 	$(JAVADOC_CMD) -d $(@D) \
-	  @$(SMARTCARDIO_OPTIONS_FILE) @$(SMARTCARDIO_PACKAGES_FILE)
+	    @$(SMARTCARDIO_OPTIONS_FILE) @$(SMARTCARDIO_PACKAGES_FILE)
 
 # Create file with javadoc options in it
 $(SMARTCARDIO_OPTIONS_FILE):
 	$(prep-target)
-	@($(call OptionOnly,$(COMMON_JAVADOCFLAGS))			; \
-	  $(call OptionPair,-sourcepath,$(RELEASEDOCS_SOURCEPATH))	; \
-	  $(call OptionPair,-encoding,ascii)				; \
-	  $(call OptionOnly,-nodeprecatedlist)				; \
-	  $(call OptionPair,-doctitle,$(SMARTCARDIO_DOCTITLE))		; \
-	  $(call OptionPair,-windowtitle,$(SMARTCARDIO_WINDOWTITLE) $(DRAFT_WINTITLE));\
+	@($(call OptionOnly,$(COMMON_JAVADOCFLAGS)) ; \
+	  $(call OptionPair,-sourcepath,$(RELEASEDOCS_SOURCEPATH)) ; \
+	  $(call OptionPair,-encoding,ascii) ; \
+	  $(call OptionOnly,-nodeprecatedlist) ; \
+	  $(call OptionPair,-doctitle,$(SMARTCARDIO_DOCTITLE)) ; \
+	  $(call OptionPair,-windowtitle,$(SMARTCARDIO_WINDOWTITLE) $(DRAFT_WINTITLE)); \
 	  $(call OptionPair,-header,$(SMARTCARDIO_HEADER)$(DRAFT_HEADER)); \
 	  $(call OptionPair,-bottom,$(SMARTCARDIO_BOTTOM)$(DRAFT_BOTTOM)); \
 	  $(call OptionTrip,-linkoffline,$(SMARTCARDIO2COREAPI),$(COREAPI_DOCSDIR)/); \
-        ) >> $@
+	) >> $@
 
 # Create a file with the package names in it
 $(SMARTCARDIO_PACKAGES_FILE): $(DIRECTORY_CACHE) $(call PackageDependencies,$(SMARTCARDIO_PKGS))
@@ -838,16 +838,16 @@
 
 ALL_OTHER_TARGETS += httpserverdocs
 
-HTTPSERVER_DOCDIR      := $(JRE_API_DOCSDIR)/net/httpserver/spec
-HTTPSERVER2COREAPI     := ../../../$(JDKJRE2COREAPI)
-HTTPSERVER_DOCTITLE    := Java$(TRADEMARK) HTTP Server
+HTTPSERVER_DOCDIR := $(JRE_API_DOCSDIR)/net/httpserver/spec
+HTTPSERVER2COREAPI := ../../../$(JDKJRE2COREAPI)
+HTTPSERVER_DOCTITLE := Java$(TRADEMARK) HTTP Server
 HTTPSERVER_WINDOWTITLE := Java HTTP Server
-HTTPSERVER_HEADER      := <strong>Java HTTP Server</strong>
-HTTPSERVER_BOTTOM      := $(call CommonBottom,$(HTTPSERVER_FIRST_COPYRIGHT_YEAR))
+HTTPSERVER_HEADER := <strong>Java HTTP Server</strong>
+HTTPSERVER_BOTTOM := $(call CommonBottom,$(HTTPSERVER_FIRST_COPYRIGHT_YEAR))
 # HTTPSERVER_PKGS is located in NON_CORE_PKGS.gmk
 
-HTTPSERVER_INDEX_HTML    = $(HTTPSERVER_DOCDIR)/index.html
-HTTPSERVER_OPTIONS_FILE  = $(DOCSTMPDIR)/httpserver.options
+HTTPSERVER_INDEX_HTML = $(HTTPSERVER_DOCDIR)/index.html
+HTTPSERVER_OPTIONS_FILE = $(DOCSTMPDIR)/httpserver.options
 HTTPSERVER_PACKAGES_FILE = $(DOCSTMPDIR)/httpserver.packages
 
 httpserverdocs: $(HTTPSERVER_INDEX_HTML)
@@ -860,21 +860,21 @@
 	$(prep-javadoc)
 	$(call JavadocSummary,$(HTTPSERVER_OPTIONS_FILE),$(HTTPSERVER_PACKAGES_FILE))
 	$(JAVADOC_CMD) -d $(@D) \
-	  @$(HTTPSERVER_OPTIONS_FILE) @$(HTTPSERVER_PACKAGES_FILE)
+	    @$(HTTPSERVER_OPTIONS_FILE) @$(HTTPSERVER_PACKAGES_FILE)
 
 # Create file with javadoc options in it
 $(HTTPSERVER_OPTIONS_FILE):
 	$(prep-target)
-	@($(call OptionOnly,$(COMMON_JAVADOCFLAGS))			; \
-	  $(call OptionPair,-sourcepath,$(RELEASEDOCS_SOURCEPATH))	; \
-	  $(call OptionPair,-encoding,ascii)				; \
-	  $(call OptionOnly,-nodeprecatedlist)				; \
-	  $(call OptionPair,-doctitle,$(HTTPSERVER_DOCTITLE))		; \
-	  $(call OptionPair,-windowtitle,$(HTTPSERVER_WINDOWTITLE) $(DRAFT_WINTITLE));\
+	@($(call OptionOnly,$(COMMON_JAVADOCFLAGS)) ; \
+	  $(call OptionPair,-sourcepath,$(RELEASEDOCS_SOURCEPATH)) ; \
+	  $(call OptionPair,-encoding,ascii) ; \
+	  $(call OptionOnly,-nodeprecatedlist) ; \
+	  $(call OptionPair,-doctitle,$(HTTPSERVER_DOCTITLE)) ; \
+	  $(call OptionPair,-windowtitle,$(HTTPSERVER_WINDOWTITLE) $(DRAFT_WINTITLE)); \
 	  $(call OptionPair,-header,$(HTTPSERVER_HEADER)$(DRAFT_HEADER)); \
 	  $(call OptionPair,-bottom,$(HTTPSERVER_BOTTOM)$(DRAFT_BOTTOM)); \
 	  $(call OptionTrip,-linkoffline,$(HTTPSERVER2COREAPI),$(COREAPI_DOCSDIR)/); \
-        ) >> $@
+	) >> $@
 
 # Create a file with the package names in it
 $(HTTPSERVER_PACKAGES_FILE): $(DIRECTORY_CACHE) $(call PackageDependencies,$(HTTPSERVER_PKGS))
@@ -888,20 +888,20 @@
 
 ALL_OTHER_TARGETS += mgmtdocs
 
-MGMT_DOCDIR	 := $(JRE_API_DOCSDIR)/management/extension
-MGMT2COREAPI     := ../../$(JDKJRE2COREAPI)
-JVM_MIB_NAME     := JVM-MANAGEMENT-MIB.mib
-JVM_MIB_SRC      := $(JDK_TOPDIR)/src/closed/share/classes/sun/management/snmp/$(JVM_MIB_NAME)
-MGMT_DOCTITLE    := Monitoring and Management Interface for the Java$(TRADEMARK) Platform
+MGMT_DOCDIR := $(JRE_API_DOCSDIR)/management/extension
+MGMT2COREAPI := ../../$(JDKJRE2COREAPI)
+JVM_MIB_NAME := JVM-MANAGEMENT-MIB.mib
+JVM_MIB_SRC := $(JDK_TOPDIR)/src/closed/share/classes/sun/management/snmp/$(JVM_MIB_NAME)
+MGMT_DOCTITLE := Monitoring and Management Interface for the Java$(TRADEMARK) Platform
 MGMT_WINDOWTITLE := Monitoring and Management Interface for the Java Platform
-MGMT_HEADER      := <strong>Monitoring and Management Interface for the Java Platform</strong>
-MGMT_BOTTOM      := $(call CommonBottom,$(MGMT_FIRST_COPYRIGHT_YEAR))
-MGMT_OVERVIEW    := $(JDK_SHARE_CLASSES)/com/sun/management/mgmt-overview.html
+MGMT_HEADER := <strong>Monitoring and Management Interface for the Java Platform</strong>
+MGMT_BOTTOM := $(call CommonBottom,$(MGMT_FIRST_COPYRIGHT_YEAR))
+MGMT_OVERVIEW := $(JDK_SHARE_CLASSES)/com/sun/management/mgmt-overview.html
 # MGMT_PKGS is located in NON_CORE_PKGS.gmk
 
 # The index.html, options, and packages files
-MGMT_INDEX_FILE    = $(MGMT_DOCDIR)/index.html
-MGMT_OPTIONS_FILE  = $(DOCSTMPDIR)/mgmt.options
+MGMT_INDEX_FILE = $(MGMT_DOCDIR)/index.html
+MGMT_OPTIONS_FILE = $(DOCSTMPDIR)/mgmt.options
 MGMT_PACKAGES_FILE = $(DOCSTMPDIR)/mgmt.packages
 
 mgmtdocs: $(MGMT_INDEX_FILE)
@@ -912,30 +912,30 @@
 # Run javadoc if the index file is out of date or missing
 $(MGMT_INDEX_FILE): $(MGMT_OPTIONS_FILE) $(MGMT_PACKAGES_FILE) coredocs
 	$(prep-javadoc)
-	@if [ -f $(JVM_MIB_SRC) ] ; then 				\
-	  $(ECHO) "$(CP) $(JVM_MIB_SRC) $(@D)/.."; 			\
-	  $(CP) $(JVM_MIB_SRC) $(@D)/.. ; 				\
-	else 								\
-	  $(ECHO) "WARNING: File $(JVM_MIB_NAME) not available."; 	\
+	@if [ -f $(JVM_MIB_SRC) ] ; then \
+	  $(ECHO) "$(CP) $(JVM_MIB_SRC) $(@D)/.."; \
+	  $(CP) $(JVM_MIB_SRC) $(@D)/.. ; \
+	else \
+	  $(ECHO) "WARNING: File $(JVM_MIB_NAME) not available."; \
 	fi
 	$(call JavadocSummary,$(MGMT_OPTIONS_FILE),$(MGMT_PACKAGES_FILE))
 	$(JAVADOC_CMD) -d $(@D) \
-	  @$(MGMT_OPTIONS_FILE) @$(MGMT_PACKAGES_FILE)
+	    @$(MGMT_OPTIONS_FILE) @$(MGMT_PACKAGES_FILE)
 
 # Create file with javadoc options in it
 $(MGMT_OPTIONS_FILE): $(MGMT_OVERVIEW)
 	$(prep-target)
-	@($(call OptionOnly,$(COMMON_JAVADOCFLAGS))			; \
-	  $(call OptionPair,-sourcepath,$(RELEASEDOCS_SOURCEPATH))	; \
-	  $(call OptionPair,-encoding,ascii)				; \
-	  $(call OptionOnly,-nodeprecatedlist)				; \
-	  $(call OptionPair,-overview,$(MGMT_OVERVIEW))			; \
-	  $(call OptionPair,-doctitle,$(MGMT_DOCTITLE))			; \
+	@($(call OptionOnly,$(COMMON_JAVADOCFLAGS)) ; \
+	  $(call OptionPair,-sourcepath,$(RELEASEDOCS_SOURCEPATH)) ; \
+	  $(call OptionPair,-encoding,ascii) ; \
+	  $(call OptionOnly,-nodeprecatedlist) ; \
+	  $(call OptionPair,-overview,$(MGMT_OVERVIEW)) ; \
+	  $(call OptionPair,-doctitle,$(MGMT_DOCTITLE)) ; \
 	  $(call OptionPair,-windowtitle,$(MGMT_WINDOWTITLE) $(DRAFT_WINTITLE)); \
-	  $(call OptionPair,-header,$(MGMT_HEADER)$(DRAFT_HEADER))	; \
-	  $(call OptionPair,-bottom,$(MGMT_BOTTOM)$(DRAFT_BOTTOM))	; \
+	  $(call OptionPair,-header,$(MGMT_HEADER)$(DRAFT_HEADER)) ; \
+	  $(call OptionPair,-bottom,$(MGMT_BOTTOM)$(DRAFT_BOTTOM)) ; \
 	  $(call OptionTrip,-linkoffline,$(MGMT2COREAPI),$(COREAPI_DOCSDIR)/); \
-        ) >> $@
+	) >> $@
 
 # Create a file with the package names in it
 $(MGMT_PACKAGES_FILE): $(DIRECTORY_CACHE) $(call PackageDependencies,$(MGMT_PKGS))
@@ -949,16 +949,16 @@
 
 ALL_OTHER_TARGETS += attachdocs
 
-ATTACH_DOCDIR      := $(JDK_API_DOCSDIR)/attach/spec
-ATTACH2COREAPI     := ../../$(JDKJRE2COREAPI)
-ATTACH_DOCTITLE    := Attach API
+ATTACH_DOCDIR := $(JDK_API_DOCSDIR)/attach/spec
+ATTACH2COREAPI := ../../$(JDKJRE2COREAPI)
+ATTACH_DOCTITLE := Attach API
 ATTACH_WINDOWTITLE := Attach API
-ATTACH_HEADER      := <strong>Attach API</strong>
-ATTACH_BOTTOM      := $(call CommonBottom,$(ATTACH_FIRST_COPYRIGHT_YEAR))
+ATTACH_HEADER := <strong>Attach API</strong>
+ATTACH_BOTTOM := $(call CommonBottom,$(ATTACH_FIRST_COPYRIGHT_YEAR))
 # ATTACH_PKGS is located in NON_CORE_PKGS.gmk
 
-ATTACH_INDEX_HTML    = $(ATTACH_DOCDIR)/index.html
-ATTACH_OPTIONS_FILE  = $(DOCSTMPDIR)/attach.options
+ATTACH_INDEX_HTML = $(ATTACH_DOCDIR)/index.html
+ATTACH_OPTIONS_FILE = $(DOCSTMPDIR)/attach.options
 ATTACH_PACKAGES_FILE = $(DOCSTMPDIR)/attach.packages
 
 attachdocs: $(ATTACH_INDEX_HTML)
@@ -971,21 +971,21 @@
 	$(prep-javadoc)
 	$(call JavadocSummary,$(ATTACH_OPTIONS_FILE),$(ATTACH_PACKAGES_FILE))
 	$(JAVADOC_CMD) -d $(@D) \
-	  @$(ATTACH_OPTIONS_FILE) @$(ATTACH_PACKAGES_FILE)
+	    @$(ATTACH_OPTIONS_FILE) @$(ATTACH_PACKAGES_FILE)
 
 # Create file with javadoc options in it
 $(ATTACH_OPTIONS_FILE):
 	$(prep-target)
-	@($(call OptionOnly,$(COMMON_JAVADOCFLAGS))			; \
-	  $(call OptionPair,-sourcepath,$(RELEASEDOCS_SOURCEPATH))	; \
-	  $(call OptionPair,-encoding,ascii)				; \
-	  $(call OptionOnly,-nodeprecatedlist)				; \
-	  $(call OptionPair,-doctitle,$(ATTACH_DOCTITLE))		; \
-	  $(call OptionPair,-windowtitle,$(ATTACH_WINDOWTITLE) $(DRAFT_WINTITLE));\
-	  $(call OptionPair,-header,$(ATTACH_HEADER)$(DRAFT_HEADER))	; \
-	  $(call OptionPair,-bottom,$(ATTACH_BOTTOM)$(DRAFT_BOTTOM))	; \
+	@($(call OptionOnly,$(COMMON_JAVADOCFLAGS)) ; \
+	  $(call OptionPair,-sourcepath,$(RELEASEDOCS_SOURCEPATH)) ; \
+	  $(call OptionPair,-encoding,ascii) ; \
+	  $(call OptionOnly,-nodeprecatedlist) ; \
+	  $(call OptionPair,-doctitle,$(ATTACH_DOCTITLE)) ; \
+	  $(call OptionPair,-windowtitle,$(ATTACH_WINDOWTITLE) $(DRAFT_WINTITLE)); \
+	  $(call OptionPair,-header,$(ATTACH_HEADER)$(DRAFT_HEADER)) ; \
+	  $(call OptionPair,-bottom,$(ATTACH_BOTTOM)$(DRAFT_BOTTOM)) ; \
 	  $(call OptionTrip,-linkoffline,$(ATTACH2COREAPI),$(COREAPI_DOCSDIR)/); \
-        ) >> $@
+	) >> $@
 
 # Create a file with the package names in it
 $(ATTACH_PACKAGES_FILE): $(DIRECTORY_CACHE) $(call PackageDependencies,$(ATTACH_PKGS))
@@ -999,16 +999,16 @@
 
 ALL_OTHER_TARGETS += jconsoledocs
 
-JCONSOLE_DOCDIR      := $(JDK_API_DOCSDIR)/jconsole/spec
-JCONSOLE2COREAPI     := ../../$(JDKJRE2COREAPI)
-JCONSOLE_DOCTITLE    := JConsole API
+JCONSOLE_DOCDIR := $(JDK_API_DOCSDIR)/jconsole/spec
+JCONSOLE2COREAPI := ../../$(JDKJRE2COREAPI)
+JCONSOLE_DOCTITLE := JConsole API
 JCONSOLE_WINDOWTITLE := JConsole API
-JCONSOLE_HEADER      := <strong>JConsole API</strong>
-JCONSOLE_BOTTOM      := $(call CommonBottom,$(JCONSOLE_FIRST_COPYRIGHT_YEAR))
+JCONSOLE_HEADER := <strong>JConsole API</strong>
+JCONSOLE_BOTTOM := $(call CommonBottom,$(JCONSOLE_FIRST_COPYRIGHT_YEAR))
 # JCONSOLE_PKGS is located in NON_CORE_PKGS.gmk
 
-JCONSOLE_INDEX_HTML    = $(JCONSOLE_DOCDIR)/index.html
-JCONSOLE_OPTIONS_FILE  = $(DOCSTMPDIR)/jconsole.options
+JCONSOLE_INDEX_HTML = $(JCONSOLE_DOCDIR)/index.html
+JCONSOLE_OPTIONS_FILE = $(DOCSTMPDIR)/jconsole.options
 JCONSOLE_PACKAGES_FILE = $(DOCSTMPDIR)/jconsole.packages
 
 jconsoledocs: $(JCONSOLE_INDEX_HTML)
@@ -1021,21 +1021,21 @@
 	$(prep-javadoc)
 	$(call JavadocSummary,$(JCONSOLE_OPTIONS_FILE),$(JCONSOLE_PACKAGES_FILE))
 	$(JAVADOC_CMD) -d $(@D) \
-	  @$(JCONSOLE_OPTIONS_FILE) @$(JCONSOLE_PACKAGES_FILE)
+	    @$(JCONSOLE_OPTIONS_FILE) @$(JCONSOLE_PACKAGES_FILE)
 
 # Create file with javadoc options in it
 $(JCONSOLE_OPTIONS_FILE):
 	$(prep-target)
-	@($(call OptionOnly,$(COMMON_JAVADOCFLAGS))			; \
-	  $(call OptionPair,-sourcepath,$(RELEASEDOCS_SOURCEPATH))	; \
-	  $(call OptionPair,-encoding,ascii)				; \
-	  $(call OptionOnly,-nodeprecatedlist)				; \
-	  $(call OptionPair,-doctitle,$(JCONSOLE_DOCTITLE))		; \
-	  $(call OptionPair,-windowtitle,$(JCONSOLE_WINDOWTITLE) $(DRAFT_WINTITLE));\
-	  $(call OptionPair,-header,$(JCONSOLE_HEADER)$(DRAFT_HEADER))	; \
-	  $(call OptionPair,-bottom,$(JCONSOLE_BOTTOM)$(DRAFT_BOTTOM))	; \
+	@($(call OptionOnly,$(COMMON_JAVADOCFLAGS)) ; \
+	  $(call OptionPair,-sourcepath,$(RELEASEDOCS_SOURCEPATH)) ; \
+	  $(call OptionPair,-encoding,ascii) ; \
+	  $(call OptionOnly,-nodeprecatedlist) ; \
+	  $(call OptionPair,-doctitle,$(JCONSOLE_DOCTITLE)) ; \
+	  $(call OptionPair,-windowtitle,$(JCONSOLE_WINDOWTITLE) $(DRAFT_WINTITLE)); \
+	  $(call OptionPair,-header,$(JCONSOLE_HEADER)$(DRAFT_HEADER)) ; \
+	  $(call OptionPair,-bottom,$(JCONSOLE_BOTTOM)$(DRAFT_BOTTOM)) ; \
 	  $(call OptionTrip,-linkoffline,$(JCONSOLE2COREAPI),$(COREAPI_DOCSDIR)/); \
-        ) >> $@
+	) >> $@
 
 # Create a file with the package names in it
 $(JCONSOLE_PACKAGES_FILE): $(DIRECTORY_CACHE) $(call PackageDependencies,$(JCONSOLE_PKGS))
@@ -1049,18 +1049,18 @@
 
 ALL_OTHER_TARGETS += treeapidocs
 
-TREEAPI_DOCDIR       := $(JDK_API_DOCSDIR)/javac/tree
-TREEAPI2COREAPI      := ../../$(JDKJRE2COREAPI)
-TREEAPI_DOCTITLE     := Compiler Tree API
-TREEAPI_WINDOWTITLE  := Compiler Tree API
-TREEAPI_HEADER       := <strong>Compiler Tree API</strong>
-TREEAPI_BOTTOM       := $(call CommonBottom,$(TREEAPI_FIRST_COPYRIGHT_YEAR))
-TREEAPI_GROUPNAME    := Packages
-TREEAPI_REGEXP       := com.sun.source.*
+TREEAPI_DOCDIR := $(JDK_API_DOCSDIR)/javac/tree
+TREEAPI2COREAPI := ../../$(JDKJRE2COREAPI)
+TREEAPI_DOCTITLE := Compiler Tree API
+TREEAPI_WINDOWTITLE := Compiler Tree API
+TREEAPI_HEADER := <strong>Compiler Tree API</strong>
+TREEAPI_BOTTOM := $(call CommonBottom,$(TREEAPI_FIRST_COPYRIGHT_YEAR))
+TREEAPI_GROUPNAME := Packages
+TREEAPI_REGEXP := com.sun.source.*
 # TREEAPI_PKGS is located in NON_CORE_PKGS.gmk
 
-TREEAPI_INDEX_HTML    = $(TREEAPI_DOCDIR)/index.html
-TREEAPI_OPTIONS_FILE  = $(DOCSTMPDIR)/treeapi.options
+TREEAPI_INDEX_HTML = $(TREEAPI_DOCDIR)/index.html
+TREEAPI_OPTIONS_FILE = $(DOCSTMPDIR)/treeapi.options
 TREEAPI_PACKAGES_FILE = $(DOCSTMPDIR)/treeapi.packages
 
 treeapidocs: $(TREEAPI_INDEX_HTML)
@@ -1073,22 +1073,22 @@
 	$(prep-javadoc)
 	$(call JavadocSummary,$(TREEAPI_OPTIONS_FILE),$(TREEAPI_PACKAGES_FILE))
 	$(JAVADOC_CMD) -d $(@D) \
-	  @$(TREEAPI_OPTIONS_FILE) @$(TREEAPI_PACKAGES_FILE)
+	    @$(TREEAPI_OPTIONS_FILE) @$(TREEAPI_PACKAGES_FILE)
 
 # Create file with javadoc options in it
 $(TREEAPI_OPTIONS_FILE):
 	$(prep-target)
-	@($(call OptionOnly,$(COMMON_JAVADOCFLAGS))			; \
-	  $(call OptionPair,-sourcepath,$(RELEASEDOCS_SOURCEPATH))	; \
-	  $(call OptionPair,-encoding,ascii)				; \
-	  $(call OptionPair,-doctitle,$(TREEAPI_DOCTITLE))		; \
-	  $(call OptionPair,-windowtitle,$(TREEAPI_WINDOWTITLE) $(DRAFT_WINTITLE));\
-	  $(call OptionPair,-header,$(TREEAPI_HEADER)$(DRAFT_HEADER))	; \
-          $(call OptionPair,-tag,$(TAG_JLS)) 				; \
-	  $(call OptionPair,-bottom,$(TREEAPI_BOTTOM)$(DRAFT_BOTTOM))	; \
+	@($(call OptionOnly,$(COMMON_JAVADOCFLAGS)) ; \
+	  $(call OptionPair,-sourcepath,$(RELEASEDOCS_SOURCEPATH)) ; \
+	  $(call OptionPair,-encoding,ascii) ; \
+	  $(call OptionPair,-doctitle,$(TREEAPI_DOCTITLE)) ; \
+	  $(call OptionPair,-windowtitle,$(TREEAPI_WINDOWTITLE) $(DRAFT_WINTITLE)); \
+	  $(call OptionPair,-header,$(TREEAPI_HEADER)$(DRAFT_HEADER)) ; \
+	  $(call OptionPair,-tag,$(TAG_JLS)) ; \
+	  $(call OptionPair,-bottom,$(TREEAPI_BOTTOM)$(DRAFT_BOTTOM)) ; \
 	  $(call OptionTrip,-group,$(TREEAPI_GROUPNAME),$(TREEAPI_REGEXP)); \
 	  $(call OptionTrip,-linkoffline,$(TREEAPI2COREAPI),$(COREAPI_DOCSDIR)/); \
-        ) >> $@
+	) >> $@
 
 # Create a file with the package names in it
 $(TREEAPI_PACKAGES_FILE): $(DIRECTORY_CACHE) $(call PackageDependencies,$(TREEAPI_PKGS))
@@ -1102,16 +1102,16 @@
 
 ALL_OTHER_TARGETS += sctpdocs
 
-SCTPAPI_DOCDIR      := $(JRE_API_DOCSDIR)/nio/sctp/spec
-SCTPAPI2COREAPI     := ../../../$(JDKJRE2COREAPI)
-SCTPAPI_DOCTITLE    := SCTP API
+SCTPAPI_DOCDIR := $(JRE_API_DOCSDIR)/nio/sctp/spec
+SCTPAPI2COREAPI := ../../../$(JDKJRE2COREAPI)
+SCTPAPI_DOCTITLE := SCTP API
 SCTPAPI_WINDOWTITLE := SCTP API
-SCTPAPI_HEADER      := <strong>SCTP API</strong>
-SCTPAPI_BOTTOM      := $(call CommonBottom,$(SCTPAPI_FIRST_COPYRIGHT_YEAR))
+SCTPAPI_HEADER := <strong>SCTP API</strong>
+SCTPAPI_BOTTOM := $(call CommonBottom,$(SCTPAPI_FIRST_COPYRIGHT_YEAR))
 # SCTPAPI_PKGS is located in NON_CORE_PKGS.gmk
 
-SCTPAPI_INDEX_HTML    = $(SCTPAPI_DOCDIR)/index.html
-SCTPAPI_OPTIONS_FILE  = $(DOCSTMPDIR)/sctp.options
+SCTPAPI_INDEX_HTML = $(SCTPAPI_DOCDIR)/index.html
+SCTPAPI_OPTIONS_FILE = $(DOCSTMPDIR)/sctp.options
 SCTPAPI_PACKAGES_FILE = $(DOCSTMPDIR)/sctp.packages
 
 sctpdocs: $(SCTPAPI_INDEX_HTML)
@@ -1124,21 +1124,21 @@
 	$(prep-javadoc)
 	$(call JavadocSummary,$(SCTPAPI_OPTIONS_FILE),$(SCTPAPI_PACKAGES_FILE))
 	$(JAVADOC_CMD) -d $(@D) \
-	  @$(SCTPAPI_OPTIONS_FILE) @$(SCTPAPI_PACKAGES_FILE)
+	    @$(SCTPAPI_OPTIONS_FILE) @$(SCTPAPI_PACKAGES_FILE)
 
 # Create file with javadoc options in it
 $(SCTPAPI_OPTIONS_FILE):
 	$(prep-target)
-	@($(call OptionOnly,$(COMMON_JAVADOCFLAGS))			; \
-	  $(call OptionPair,-sourcepath,$(RELEASEDOCS_SOURCEPATH))	; \
-	  $(call OptionPair,-encoding,ascii)				; \
-	  $(call OptionOnly,-nodeprecatedlist)				; \
-	  $(call OptionPair,-doctitle,$(SCTPAPI_DOCTITLE))		; \
-	  $(call OptionPair,-windowtitle,$(SCTPAPI_WINDOWTITLE) $(DRAFT_WINTITLE));\
-	  $(call OptionPair,-header,$(SCTPAPI_HEADER)$(DRAFT_HEADER))	; \
-	  $(call OptionPair,-bottom,$(SCTPAPI_BOTTOM)$(DRAFT_BOTTOM))	; \
+	@($(call OptionOnly,$(COMMON_JAVADOCFLAGS)) ; \
+	  $(call OptionPair,-sourcepath,$(RELEASEDOCS_SOURCEPATH)) ; \
+	  $(call OptionPair,-encoding,ascii) ; \
+	  $(call OptionOnly,-nodeprecatedlist) ; \
+	  $(call OptionPair,-doctitle,$(SCTPAPI_DOCTITLE)) ; \
+	  $(call OptionPair,-windowtitle,$(SCTPAPI_WINDOWTITLE) $(DRAFT_WINTITLE)); \
+	  $(call OptionPair,-header,$(SCTPAPI_HEADER)$(DRAFT_HEADER)) ; \
+	  $(call OptionPair,-bottom,$(SCTPAPI_BOTTOM)$(DRAFT_BOTTOM)) ; \
 	  $(call OptionTrip,-linkoffline,$(SCTPAPI2COREAPI),$(COREAPI_DOCSDIR)/); \
-        ) >> $@
+	) >> $@
 
 # Create a file with the package names in it
 $(SCTPAPI_PACKAGES_FILE): $(DIRECTORY_CACHE) $(call PackageDependencies,$(SCTPAPI_PKGS))
@@ -1151,9 +1151,9 @@
 
 $(DIRECTORY_CACHE): $(ALL_EXISTING_SOURCE_DIRS)
 	$(prep-target)
-	@for cp in $(ALL_EXISTING_SOURCE_DIRS) ; do 	\
-	  $(ECHO) "$(FIND) $${cp} -type f >> $@"; 	\
-	  $(FIND) $${cp} -type f >> $@; 		\
+	@for cp in $(ALL_EXISTING_SOURCE_DIRS) ; do \
+	  $(ECHO) "$(FIND) $${cp} -type f >> $@"; \
+	  $(FIND) $${cp} -type f >> $@; \
 	done
 
 #############################################################
@@ -1178,11 +1178,11 @@
 # is set properly, and to help identify values we can use instead of making new ones.
 # (Most of them come from common/shared/Defs.gmk)
 #
-#  Notes:
-#    * BUILD_NUMBER defaults to b00 if not set on command line with BUILD_NUMBER=<value>
-#    * MILESTONE defaults to internal unless set to beta, rc, or fcs on command line
+# Notes:
+# * BUILD_NUMBER defaults to b00 if not set on command line with BUILD_NUMBER=<value>
+# * MILESTONE defaults to internal unless set to beta, rc, or fcs on command line
 #
 
 #############################################################
 .PHONY: all docs coredocs rel-docs otherdocs rel-coredocs \
-        sanitycheckcoredocs $(ALL_OTHER_TARGETS)
+    sanitycheckcoredocs $(ALL_OTHER_TARGETS)
diff --git a/common/makefiles/javadoc/NON_CORE_PKGS.gmk b/common/makefiles/javadoc/NON_CORE_PKGS.gmk
index c2e4811..0b9975d 100644
--- a/common/makefiles/javadoc/NON_CORE_PKGS.gmk
+++ b/common/makefiles/javadoc/NON_CORE_PKGS.gmk
@@ -24,87 +24,87 @@
 #
 
 #
-# This file contains the package names of all the "non-core" 
-# API published in the Java 2 SDK documentation.  "Non-core" means
+# This file contains the package names of all the "non-core"
+# API published in the Java 2 SDK documentation. "Non-core" means
 # it includes all published API outside of the JDK API specification.
 #
-# These environment variables are used by javadoc in 
+# These environment variables are used by javadoc in
 # make/docs/Makefile and are referenced by the localization
 # team when determining which APIs to extract javadoc
 # comments from.
 
-DOMAPI_PKGS      = com.sun.java.browser.dom   \
-                   org.w3c.dom                \
-                   org.w3c.dom.bootstrap      \
-                   org.w3c.dom.ls             \
-                   org.w3c.dom.ranges         \
-                   org.w3c.dom.traversal      \
-                   org.w3c.dom.html           \
-                   org.w3c.dom.stylesheets    \
-                   org.w3c.dom.css            \
-                   org.w3c.dom.events         \
-                   org.w3c.dom.views
+DOMAPI_PKGS = com.sun.java.browser.dom \
+    org.w3c.dom \
+    org.w3c.dom.bootstrap \
+    org.w3c.dom.ls \
+    org.w3c.dom.ranges \
+    org.w3c.dom.traversal \
+    org.w3c.dom.html \
+    org.w3c.dom.stylesheets \
+    org.w3c.dom.css \
+    org.w3c.dom.events \
+    org.w3c.dom.views
 
-JDI_PKGS         = com.sun.jdi                \
-                   com.sun.jdi.event          \
-                   com.sun.jdi.request        \
-                   com.sun.jdi.connect        \
-                   com.sun.jdi.connect.spi
+JDI_PKGS = com.sun.jdi \
+    com.sun.jdi.event \
+    com.sun.jdi.request \
+    com.sun.jdi.connect \
+    com.sun.jdi.connect.spi
 
-MGMT_PKGS        = com.sun.management
+MGMT_PKGS = com.sun.management
 
-JAAS_PKGS        = com.sun.security.auth          \
-                   com.sun.security.auth.callback \
-                   com.sun.security.auth.login    \
-                   com.sun.security.auth.module
+JAAS_PKGS = com.sun.security.auth \
+    com.sun.security.auth.callback \
+    com.sun.security.auth.login \
+    com.sun.security.auth.module
 
-JGSS_PKGS        = com.sun.security.jgss
+JGSS_PKGS = com.sun.security.jgss
 
-OLD_JSSE_PKGS    = com.sun.net.ssl
+OLD_JSSE_PKGS = com.sun.net.ssl
 
-HTTPSERVER_PKGS  = com.sun.net.httpserver       \
-                   com.sun.net.httpserver.spi 
+HTTPSERVER_PKGS = com.sun.net.httpserver \
+    com.sun.net.httpserver.spi
 
-NIO_PKGS         = com.sun.nio.file
+NIO_PKGS = com.sun.nio.file
 
-DOCLETAPI_PKGS   = com.sun.javadoc
+DOCLETAPI_PKGS = com.sun.javadoc
 
-TAGLETAPI_FILE   = com/sun/tools/doclets/Taglet.java
+TAGLETAPI_FILE = com/sun/tools/doclets/Taglet.java
 
-TAGLETAPI_PKGS   = com.sun.tools.doclets
+TAGLETAPI_PKGS = com.sun.tools.doclets
 
-ATTACH_PKGS      = com.sun.tools.attach         \
-                   com.sun.tools.attach.spi
+ATTACH_PKGS = com.sun.tools.attach \
+    com.sun.tools.attach.spi
 
-JCONSOLE_PKGS    = com.sun.tools.jconsole
+JCONSOLE_PKGS = com.sun.tools.jconsole
 
-TREEAPI_PKGS 	 = com.sun.source.doctree \
-		   com.sun.source.tree \
-		   com.sun.source.util \
-		   jdk
+TREEAPI_PKGS = com.sun.source.doctree \
+    com.sun.source.tree \
+    com.sun.source.util \
+    jdk
 
 SMARTCARDIO_PKGS = javax.smartcardio
 
-SCTPAPI_PKGS     = com.sun.nio.sctp
+SCTPAPI_PKGS = com.sun.nio.sctp
 
 ifeq ($(PLATFORM), macosx)
-APPLE_EXT_PKGS   = com.apple.concurrent   \
-                   com.apple.eawt         \
-                   com.apple.eawt.event   \
-                   com.apple.eio
+  APPLE_EXT_PKGS = com.apple.concurrent \
+      com.apple.eawt \
+      com.apple.eawt.event \
+      com.apple.eio
 endif
 
-JDK_PKGS     = jdk
+JDK_PKGS = jdk
 
 # non-core packages in rt.jar
-NON_CORE_PKGS    = $(DOMAPI_PKGS) \
-                   $(MGMT_PKGS) \
-                   $(JAAS_PKGS) \
-                   $(JGSS_PKGS) \
-                   $(NIO_PKGS) \
-                   $(OLD_JSSE_PKGS) \
-                   $(HTTPSERVER_PKGS) \
-                   $(SMARTCARDIO_PKGS) \
-                   $(SCTPAPI_PKGS) \
-                   $(APPLE_EXT_PKGS) \
-                   $(JDK_PKGS)
+NON_CORE_PKGS = $(DOMAPI_PKGS) \
+    $(MGMT_PKGS) \
+    $(JAAS_PKGS) \
+    $(JGSS_PKGS) \
+    $(NIO_PKGS) \
+    $(OLD_JSSE_PKGS) \
+    $(HTTPSERVER_PKGS) \
+    $(SMARTCARDIO_PKGS) \
+    $(SCTPAPI_PKGS) \
+    $(APPLE_EXT_PKGS) \
+    $(JDK_PKGS)
diff --git a/common/makefiles/javadoc/Notes.html b/common/makefiles/javadoc/Notes.html
index e3d8ae1..2705d76 100644
--- a/common/makefiles/javadoc/Notes.html
+++ b/common/makefiles/javadoc/Notes.html
@@ -8,42 +8,42 @@
 <body>
 <h3><a name="REGEXP"></a><br>
 REGEXP</h3>
-<p> REGEXP is a list of wildcard patterns that determines which packages listed 
-  in CORE_PKGS.gmk go into which summary-table on the main API index page. It 
-  was motivated by the need to divide the world into &quot;core packages&quot; 
-  (java.*) and &quot;extension packages&quot; (javax.*). In time, the distinction 
-  went away. The whole table is now called &quot;Platform Packages&quot;--which 
-  eliminated the need for this list of regular expressions. But it lingered on, 
-  accreting all of the packages in the JVM, one by one. I pruned it back to &quot;*&quot;, 
-  so it now covers every package in the Java platform API docs. If some separation 
-  is needed in the future, it can grow back into a colon-separated list, starting 
-  with this, which is in all respects equivalent to &quot;*&quot; at this point 
+<p> REGEXP is a list of wildcard patterns that determines which packages listed
+  in CORE_PKGS.gmk go into which summary-table on the main API index page. It
+  was motivated by the need to divide the world into &quot;core packages&quot;
+  (java.*) and &quot;extension packages&quot; (javax.*). In time, the distinction
+  went away. The whole table is now called &quot;Platform Packages&quot;--which
+  eliminated the need for this list of regular expressions. But it lingered on,
+  accreting all of the packages in the JVM, one by one. I pruned it back to &quot;*&quot;,
+  so it now covers every package in the Java platform API docs. If some separation
+  is needed in the future, it can grow back into a colon-separated list, starting
+  with this, which is in all respects equivalent to &quot;*&quot; at this point
   in time:</p>
-<blockquote> 
+<blockquote>
   <pre>REGEXP = &quot;java.*:javax.*:org.ietf*:org.omg.</pre>
 </blockquote>
 <h3><a name="releaseTargets"></a><br>
   Release Targets</h3>
 <p> (Thanks to Kelly O'Hair for this info.)</p>
-<p> The <tt>rel-coredocs</tt> and <tt>rel-docs</tt> targets were added by Eric 
-  Armstrong. <tt>rel-coredocs</tt> assumes the kind of large, 32-bit machine used 
-  in the javapubs group's docs-release process. It specifies memory settings accordingly 
+<p> The <tt>rel-coredocs</tt> and <tt>rel-docs</tt> targets were added by Eric
+  Armstrong. <tt>rel-coredocs</tt> assumes the kind of large, 32-bit machine used
+  in the javapubs group's docs-release process. It specifies memory settings accordingly
   to maximize performance.</p>
-<p> The performance settings, like the sanity check, are most important for the 
-  core docs--the platform APIs. Running javadoc on those APIs takes a significant 
-  amount of time and memory. Setting the initial heap size as large as possible 
-  is important to prevent thrashing as the heap grows. Setting the maximum as 
+<p> The performance settings, like the sanity check, are most important for the
+  core docs--the platform APIs. Running javadoc on those APIs takes a significant
+  amount of time and memory. Setting the initial heap size as large as possible
+  is important to prevent thrashing as the heap grows. Setting the maximum as
   large as necessary is also important to keep the job from failing.</p>
 <blockquote>
   <p> <tt>-J-Xmx512</tt> sets a maximum of 512, which became necessary in 6.0<br>
     <tt>-J-Xms256</tt> sets starting size to 256 (default is 8)</p>
 </blockquote>
-<p> <tt>rel-coredocs</tt> also includes a sanity check to help ensure that <tt>BUILD_NUMBER</tt> 
-  and <tt>MILESTONE</tt> are specified properly when docs are built outside of 
-  the normal release engineering process, with the intention of releasing them 
-  on the web or in a downloaded docs bundle. (When invoked in release engineering's 
-  control build, the values are always set properly. But when the targets are 
-  run by themselves, they default to b00 and &quot;internal&quot;--which silently 
+<p> <tt>rel-coredocs</tt> also includes a sanity check to help ensure that <tt>BUILD_NUMBER</tt>
+  and <tt>MILESTONE</tt> are specified properly when docs are built outside of
+  the normal release engineering process, with the intention of releasing them
+  on the web or in a downloaded docs bundle. (When invoked in release engineering's
+  control build, the values are always set properly. But when the targets are
+  run by themselves, they default to b00 and &quot;internal&quot;--which silently
   sabotage the result of a build that can take many hours to complete.</p>
 </body>
 </html>
diff --git a/corba/.hgtags b/corba/.hgtags
index adcc8f8..8db6245 100644
--- a/corba/.hgtags
+++ b/corba/.hgtags
@@ -232,3 +232,4 @@
 a4bb3b4500164748a9c33b2283cfda76d89f25ab jdk8-b108
 428428cf5e06163322144cfb5367e1faa86acf20 jdk8-b109
 3d2b7ce93c5c2e3db748f29c3d29620a8b3b748a jdk8-b110
+85c1c94e723582f9a1dd0251502c42b73d6deea7 jdk8-b111
diff --git a/corba/makefiles/BuildCorba.gmk b/corba/makefiles/BuildCorba.gmk
index b177ff2..5f2d625 100644
--- a/corba/makefiles/BuildCorba.gmk
+++ b/corba/makefiles/BuildCorba.gmk
@@ -36,216 +36,218 @@
 include IdlCompilation.gmk
 
 # The Corba sources are old and generates a LOT of warnings.
-# Disable these using Xlint, until someone cares to fix them. 
-DISABLE_CORBA_WARNINGS:=-Xlint:all,-deprecation,-unchecked,-serial,-fallthrough,-cast,-rawtypes,-static,-dep-ann
+# Disable these using Xlint, until someone cares to fix them.
+DISABLE_CORBA_WARNINGS := -Xlint:all,-deprecation,-unchecked,-serial,-fallthrough,-cast,-rawtypes,-static,-dep-ann
 
 # 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 the boot jdk bytecode.
-$(eval $(call SetupJavaCompiler,GENERATE_OLDBYTECODE,\
-     JVM:=$(JAVA),\
-     JAVAC:=$(NEW_JAVAC),\
-     FLAGS:=$(BOOT_JDK_SOURCETARGET) -bootclasspath $(BOOT_RTJAR) $(DISABLE_CORBA_WARNINGS),\
-     SERVER_DIR:=$(SJAVAC_SERVER_DIR),\
-     SERVER_JVM:=$(SJAVAC_SERVER_JAVA)))
+$(eval $(call SetupJavaCompiler,GENERATE_OLDBYTECODE, \
+    JVM := $(JAVA), \
+    JAVAC := $(NEW_JAVAC), \
+    FLAGS := $(BOOT_JDK_SOURCETARGET) -bootclasspath $(BOOT_RTJAR) $(DISABLE_CORBA_WARNINGS), \
+    SERVER_DIR := $(SJAVAC_SERVER_DIR), \
+    SERVER_JVM := $(SJAVAC_SERVER_JAVA)))
 
 # The "generate new bytecode" uses the new compiler to generate bytecode
 # for the new jdk that is being built. The code compiled by this setup
 # cannot necessarily be run with the boot jdk.
-$(eval $(call SetupJavaCompiler,GENERATE_NEWBYTECODE,\
-     JVM:=$(JAVA),\
-     JAVAC:=$(NEW_JAVAC),\
-     FLAGS:=-cp $(BOOT_TOOLSJAR) -XDignore.symbol.file=true $(DISABLE_CORBA_WARNINGS),\
-     SERVER_DIR:=$(SJAVAC_SERVER_DIR),\
-     SERVER_JVM:=$(SJAVAC_SERVER_JAVA)))
+$(eval $(call SetupJavaCompiler,GENERATE_NEWBYTECODE, \
+    JVM := $(JAVA), \
+    JAVAC := $(NEW_JAVAC), \
+    FLAGS := -cp $(BOOT_TOOLSJAR) -XDignore.symbol.file=true $(DISABLE_CORBA_WARNINGS), \
+    SERVER_DIR := $(SJAVAC_SERVER_DIR), \
+    SERVER_JVM := $(SJAVAC_SERVER_JAVA)))
 
-$(eval $(call SetupJavaCompilation,BUILD_STRIPPROP,\
-		SETUP:=GENERATE_OLDBYTECODE,\
-		SRC:=$(CORBA_TOPDIR)/make/tools/src,\
-		BIN:=$(CORBA_OUTPUTDIR)/btclasses/stripprop_classes))
+$(eval $(call SetupJavaCompilation,BUILD_STRIPPROP, \
+    SETUP := GENERATE_OLDBYTECODE, \
+    SRC := $(CORBA_TOPDIR)/make/tools/src, \
+    BIN := $(CORBA_OUTPUTDIR)/btclasses/stripprop_classes))
 
-$(eval $(call SetupArchive,ARCHIVE_STRIPPROP,$(BUILD_STRIPPROP),\
-		SRCS:=$(CORBA_OUTPUTDIR)/btclasses/stripprop_classes,\
-		JAR:=$(CORBA_OUTPUTDIR)/btjars/stripproperties.jar,\
-		JARMAIN:=build.tools.stripproperties.StripPropertiesCorba))
+$(eval $(call SetupArchive,ARCHIVE_STRIPPROP, $(BUILD_STRIPPROP), \
+    SRCS := $(CORBA_OUTPUTDIR)/btclasses/stripprop_classes, \
+    JAR := $(CORBA_OUTPUTDIR)/btjars/stripproperties.jar, \
+    JARMAIN := build.tools.stripproperties.StripPropertiesCorba))
 
-$(eval $(call SetupJavaCompilation,BUILD_IDLJ,\
-		SETUP:=GENERATE_OLDBYTECODE,\
-		SRC:=$(CORBA_TOPDIR)/src/share/classes,\
-		BIN:=$(CORBA_OUTPUTDIR)/btclasses/idlj_classes,\
-		COPY:=.prp,\
-		INCLUDES:=com/sun/tools/corba/se/idl,\
-		EXCLUDE_FILES:=ResourceBundleUtil.java))
+$(eval $(call SetupJavaCompilation,BUILD_IDLJ, \
+    SETUP := GENERATE_OLDBYTECODE, \
+    SRC := $(CORBA_TOPDIR)/src/share/classes, \
+    BIN := $(CORBA_OUTPUTDIR)/btclasses/idlj_classes, \
+    COPY := .prp, \
+    INCLUDES := com/sun/tools/corba/se/idl, \
+    EXCLUDE_FILES := ResourceBundleUtil.java))
 
-$(eval $(call SetupArchive,ARCHIVE_IDLJ,$(BUILD_IDLJ),\
-		SRCS:=$(CORBA_OUTPUTDIR)/btclasses/idlj_classes,\
-		SUFFIXES:=.class .prp,\
-		JAR:=$(CORBA_OUTPUTDIR)/btjars/idlj.jar,\
-		JARMAIN:=com.sun.tools.corba.se.idl.toJavaPortable.Compile))
+$(eval $(call SetupArchive,ARCHIVE_IDLJ, $(BUILD_IDLJ), \
+    SRCS := $(CORBA_OUTPUTDIR)/btclasses/idlj_classes, \
+    SUFFIXES := .class .prp, \
+    JAR := $(CORBA_OUTPUTDIR)/btjars/idlj.jar, \
+    JARMAIN := com.sun.tools.corba.se.idl.toJavaPortable.Compile))
 
-$(eval $(call SetupJavaCompilation,BUILD_LOGUTIL,\
-		SETUP:=GENERATE_OLDBYTECODE,\
-		SRC:=$(CORBA_TOPDIR)/src/share/classes,\
-		BIN:=$(CORBA_OUTPUTDIR)/btclasses/logutil_classes,\
-		INCLUDES:=com/sun/tools/corba/se/logutil))
+$(eval $(call SetupJavaCompilation,BUILD_LOGUTIL, \
+    SETUP := GENERATE_OLDBYTECODE, \
+    SRC := $(CORBA_TOPDIR)/src/share/classes, \
+    BIN := $(CORBA_OUTPUTDIR)/btclasses/logutil_classes, \
+    INCLUDES := com/sun/tools/corba/se/logutil))
 
-$(eval $(call SetupArchive,ARCHIVE_LOGUTIL,$(BUILD_LOGUTIL),\
-		SRCS:=$(CORBA_OUTPUTDIR)/btclasses/logutil_classes,\
-		JAR:=$(CORBA_OUTPUTDIR)/btjars/logutil.jar,\
-		JARMAIN:=com.sun.tools.corba.se.logutil.MC))
+$(eval $(call SetupArchive,ARCHIVE_LOGUTIL, $(BUILD_LOGUTIL), \
+    SRCS := $(CORBA_OUTPUTDIR)/btclasses/logutil_classes, \
+    JAR := $(CORBA_OUTPUTDIR)/btjars/logutil.jar, \
+    JARMAIN := com.sun.tools.corba.se.logutil.MC))
 
-# Generate LogWrapper classes 
-$(CORBA_OUTPUTDIR)/logwrappers/com/sun/corba/se/impl/logging/%SystemException.java : \
-			$(CORBA_TOPDIR)/src/share/classes/com/sun/corba/se/spi/logging/data/%.mc \
-			$(CORBA_OUTPUTDIR)/btjars/logutil.jar
+# Generate LogWrapper classes
+$(CORBA_OUTPUTDIR)/logwrappers/com/sun/corba/se/impl/logging/%SystemException.java: \
+    $(CORBA_TOPDIR)/src/share/classes/com/sun/corba/se/spi/logging/data/%.mc \
+    $(CORBA_OUTPUTDIR)/btjars/logutil.jar
 	$(MKDIR) -p $(@D)
 	$(RM) -f $(@D)/_the_wrappers.d
-	$(ECHO) $(LOG_INFO) Generating class file from $*.mc 
+	$(ECHO) $(LOG_INFO) Generating class file from $*.mc
 	$(JAVA) -jar $(CORBA_OUTPUTDIR)/btjars/logutil.jar make-class $< $(@D)
 
-# Generate LogWrapper properties file by concatening resource files 
+# Generate LogWrapper properties file by concatening resource files
 $(CORBA_OUTPUTDIR)/logwrappers/com/sun/corba/se/impl/logging/LogStrings.properties: \
-		$(CORBA_OUTPUTDIR)/logwrappers/ActivationSystemException.resource \
-		$(CORBA_OUTPUTDIR)/logwrappers/IORSystemException.resource \
-		$(CORBA_OUTPUTDIR)/logwrappers/InterceptorsSystemException.resource \
-		$(CORBA_OUTPUTDIR)/logwrappers/NamingSystemException.resource \
-		$(CORBA_OUTPUTDIR)/logwrappers/OMGSystemException.resource \
-		$(CORBA_OUTPUTDIR)/logwrappers/ORBUtilSystemException.resource \
-		$(CORBA_OUTPUTDIR)/logwrappers/POASystemException.resource \
-		$(CORBA_OUTPUTDIR)/logwrappers/UtilSystemException.resource
+    $(CORBA_OUTPUTDIR)/logwrappers/ActivationSystemException.resource \
+    $(CORBA_OUTPUTDIR)/logwrappers/IORSystemException.resource \
+    $(CORBA_OUTPUTDIR)/logwrappers/InterceptorsSystemException.resource \
+    $(CORBA_OUTPUTDIR)/logwrappers/NamingSystemException.resource \
+    $(CORBA_OUTPUTDIR)/logwrappers/OMGSystemException.resource \
+    $(CORBA_OUTPUTDIR)/logwrappers/ORBUtilSystemException.resource \
+    $(CORBA_OUTPUTDIR)/logwrappers/POASystemException.resource \
+    $(CORBA_OUTPUTDIR)/logwrappers/UtilSystemException.resource
 	$(MKDIR) -p $(@D)
 	$(ECHO) $(LOG_INFO) Concatenating 8 resource files into $(@F)
 	$(CAT) $^ > $@
 
 # The resources files are generated from lisp-like .mc files.
-$(CORBA_OUTPUTDIR)/logwrappers/%SystemException.resource : $(CORBA_TOPDIR)/src/share/classes/com/sun/corba/se/spi/logging/data/%.mc $(CORBA_OUTPUTDIR)/btjars/logutil.jar
+$(CORBA_OUTPUTDIR)/logwrappers/%SystemException.resource: $(CORBA_TOPDIR)/src/share/classes/com/sun/corba/se/spi/logging/data/%.mc $(CORBA_OUTPUTDIR)/btjars/logutil.jar
 	$(MKDIR) -p $(@D)
 	$(RM) -f $(@D)/_the_wrappers.d
-	$(ECHO) $(LOG_INFO) Generating resource file from $*.mc 
+	$(ECHO) $(LOG_INFO) Generating resource file from $*.mc
 	$(JAVA) -jar $(CORBA_OUTPUTDIR)/btjars/logutil.jar make-resource $< $(@D)
 
 
-$(CORBA_OUTPUTDIR)/logwrappers/_the_wrappers.d : $(CORBA_OUTPUTDIR)/btjars/logutil.jar \
-	$(CORBA_OUTPUTDIR)/logwrappers/com/sun/corba/se/impl/logging/ActivationSystemException.java \
-	$(CORBA_OUTPUTDIR)/logwrappers/com/sun/corba/se/impl/logging/IORSystemException.java \
-	$(CORBA_OUTPUTDIR)/logwrappers/com/sun/corba/se/impl/logging/InterceptorsSystemException.java \
-	$(CORBA_OUTPUTDIR)/logwrappers/com/sun/corba/se/impl/logging/NamingSystemException.java \
-	$(CORBA_OUTPUTDIR)/logwrappers/com/sun/corba/se/impl/logging/OMGSystemException.java \
-	$(CORBA_OUTPUTDIR)/logwrappers/com/sun/corba/se/impl/logging/ORBUtilSystemException.java \
-	$(CORBA_OUTPUTDIR)/logwrappers/com/sun/corba/se/impl/logging/POASystemException.java \
-	$(CORBA_OUTPUTDIR)/logwrappers/com/sun/corba/se/impl/logging/UtilSystemException.java \
-	$(CORBA_OUTPUTDIR)/logwrappers/com/sun/corba/se/impl/logging/LogStrings.properties
-	$(MKDIR) -p $(@D) 
-	$(ECHO) LOGWRAPPERS_ARE_CREATED=yes > $@
+$(CORBA_OUTPUTDIR)/logwrappers/_the_wrappers.d: $(CORBA_OUTPUTDIR)/btjars/logutil.jar \
+    $(CORBA_OUTPUTDIR)/logwrappers/com/sun/corba/se/impl/logging/ActivationSystemException.java \
+    $(CORBA_OUTPUTDIR)/logwrappers/com/sun/corba/se/impl/logging/IORSystemException.java \
+    $(CORBA_OUTPUTDIR)/logwrappers/com/sun/corba/se/impl/logging/InterceptorsSystemException.java \
+    $(CORBA_OUTPUTDIR)/logwrappers/com/sun/corba/se/impl/logging/NamingSystemException.java \
+    $(CORBA_OUTPUTDIR)/logwrappers/com/sun/corba/se/impl/logging/OMGSystemException.java \
+    $(CORBA_OUTPUTDIR)/logwrappers/com/sun/corba/se/impl/logging/ORBUtilSystemException.java \
+    $(CORBA_OUTPUTDIR)/logwrappers/com/sun/corba/se/impl/logging/POASystemException.java \
+    $(CORBA_OUTPUTDIR)/logwrappers/com/sun/corba/se/impl/logging/UtilSystemException.java \
+    $(CORBA_OUTPUTDIR)/logwrappers/com/sun/corba/se/impl/logging/LogStrings.properties
+	$(MKDIR) -p $(@D)
+	$(ECHO) LOGWRAPPERS_ARE_CREATED = yes > $@
 
 # Trigger the generation of the logwrappers. After the logwrapper classes and
 # resources have been created, then the makefile will restart and the newly
 # created java files will become part of the build further along in the makefile.
 -include $(CORBA_OUTPUTDIR)/logwrappers/_the_wrappers.d
 
-ifeq ($(LOGWRAPPERS_ARE_CREATED),yes)
-        $(eval $(call SetupIdlCompilation,BUILD_IDLS,\
-                IDLJ:=$(JAVA) -jar $(CORBA_OUTPUTDIR)/btjars/idlj.jar,\
-		SRC:=$(CORBA_TOPDIR)/src/share/classes,\
-		BIN:=$(CORBA_OUTPUTDIR)/gensrc,\
-		EXCLUDES:=com/sun/tools/corba/se/idl/% \
-			org/omg/CORBA/% \
-			com/sun/corba/se/GiopIDL/% \
-			org/omg/PortableServer/corba.idl,\
-		INCLUDES:=%,\
-		OLDIMPLBASES:=com/sun/corba/se/PortableActivationIDL/activation.idl \
-			      com/sun/corba/se/spi/activation/activation.idl,\
-		DELETES:=DYNANYDELETEFILES org/omg/DynamicAny/*POA* org/omg/DynamicAny/*Holder* org/omg/DynamicAny/DynValueBoxHelper.java org/omg/DynamicAny/DynValueCommonHelper.java org/omg/DynamicAny/_DynValueCommonStub.java org/omg/DynamicAny/_DynValueBoxStub.java org/omg/DynamicAny/DynAnyPackage/TypeMismatchHolder.java org/omg/DynamicAny/DynAnyPackage/InvalidValueHolder.java org/omg/DynamicAny/DynAnyFactoryPackage/InconsistentTypeCodeHolder.java IOPDELETEFILES org/omg/IOP/BI_DIR_IIOP.java org/omg/IOP/ChainBypassCheck.java org/omg/IOP/ChainBypassInfo.java org/omg/IOP/FORWARDED_IDENTITY.java org/omg/IOP/INVOCATION_POLICIES.java org/omg/IOP/LogicalThreadId.java org/omg/IOP/SendingContextRunTime.java org/omg/IOP/UnknownExceptionInfo.java org/omg/IOP/TaggedComponentSeqHolder.java POAHELHOLFILES org/omg/PortableServer/CurrentPackage/NoContextHolder.java org/omg/PortableServer/ForwardRequestHolder.java org/omg/PortableServer/IdAssignmentPolicyValueHelper.java org/omg/PortableServer/IdAssignmentPolicyValueHolder.java org/omg/PortableServer/IdUniquenessPolicyValueHelper.java org/omg/PortableServer/IdUniquenessPolicyValueHolder.java org/omg/PortableServer/ImplicitActivationPolicyValueHelper.java org/omg/PortableServer/ImplicitActivationPolicyValueHolder.java org/omg/PortableServer/LifespanPolicyValueHelper.java org/omg/PortableServer/LifespanPolicyValueHolder.java org/omg/PortableServer/ServantRetentionPolicyValueHelper.java org/omg/PortableServer/ServantRetentionPolicyValueHolder.java org/omg/PortableServer/ObjectIdHelper.java org/omg/PortableServer/ObjectIdHolder.java org/omg/PortableServer/POAListHelper.java org/omg/PortableServer/POAListHolder.java org/omg/PortableServer/POAManagerPackage/AdapterInactiveHolder.java org/omg/PortableServer/POAManagerPackage/StateHelper.java org/omg/PortableServer/POAManagerPackage/StateHolder.java org/omg/PortableServer/POAPackage/AdapterAlreadyExistsHolder.java org/omg/PortableServer/POAPackage/AdapterNonExistentHolder.java org/omg/PortableServer/POAPackage/InvalidPolicyHolder.java org/omg/PortableServer/POAPackage/NoServantHolder.java org/omg/PortableServer/POAPackage/ObjectAlreadyActiveHolder.java org/omg/PortableServer/POAPackage/ObjectNotActiveHolder.java org/omg/PortableServer/POAPackage/ServantAlreadyActiveHolder.java org/omg/PortableServer/POAPackage/ServantNotActiveHolder.java org/omg/PortableServer/POAPackage/WrongAdapterHolder.java org/omg/PortableServer/POAPackage/WrongPolicyHolder.java org/omg/PortableServer/RequestProcessingPolicyValueHelper.java org/omg/PortableServer/RequestProcessingPolicyValueHolder.java org/omg/PortableServer/ServantActivatorHolder.java org/omg/PortableServer/ServantLocatorHolder.java org/omg/PortableServer/ThreadPolicyValueHelper.java org/omg/PortableServer/ThreadPolicyValueHolder.java PIHELHOLFILES org/omg/PortableInterceptor/ClientRequestInfoHelper.java org/omg/PortableInterceptor/ClientRequestInterceptorHelper.java org/omg/PortableInterceptor/IORInfoHelper.java org/omg/PortableInterceptor/IORInterceptorHelper.java org/omg/PortableInterceptor/InterceptorHelper.java org/omg/PortableInterceptor/ORBInitInfoHelper.java org/omg/PortableInterceptor/ORBInitializerHelper.java org/omg/PortableInterceptor/PolicyFactoryHelper.java org/omg/PortableInterceptor/ReplyStatusHelper.java org/omg/PortableInterceptor/RequestInfoHelper.java org/omg/PortableInterceptor/ServerRequestInfoHelper.java org/omg/PortableInterceptor/ServerRequestInterceptorHelper.java org/omg/PortableInterceptor/SlotIdHelper.java org/omg/PortableInterceptor/ClientRequestInfoHolder.java org/omg/PortableInterceptor/ClientRequestInterceptorHolder.java org/omg/PortableInterceptor/CurrentHolder.java org/omg/PortableInterceptor/ForwardRequestHolder.java org/omg/PortableInterceptor/IORInfoHolder.java org/omg/PortableInterceptor/IORInterceptorHolder.java org/omg/PortableInterceptor/InterceptorHolder.java org/omg/PortableInterceptor/InvalidSlotHolder.java org/omg/PortableInterceptor/ORBInitInfoHolder.java org/omg/PortableInterceptor/ORBInitializerHolder.java org/omg/PortableInterceptor/PolicyFactoryHolder.java org/omg/PortableInterceptor/RequestInfoHolder.java org/omg/PortableInterceptor/ServerRequestInfoHolder.java org/omg/PortableInterceptor/ServerRequestInterceptorHolder.java org/omg/PortableInterceptor/TaggedComponentSeqHolder.java org/omg/PortableInterceptor/ORBInitInfoPackage/DuplicateNameHolder.java org/omg/PortableInterceptor/ORBInitInfoPackage/InvalidNameHolder.java org/omg/IOP/CodecPackage/FormatMismatchHolder.java org/omg/IOP/CodecPackage/InvalidTypeForEncodingHolder.java org/omg/IOP/CodecPackage/TypeMismatchHolder.java org/omg/IOP/CodecHelper.java org/omg/IOP/EncodingFormatHelper.java org/omg/IOP/EncodingHelper.java org/omg/IOP/CodecFactoryPackage/UnknownEncodingHolder.java org/omg/IOP/CodecFactoryHolder.java org/omg/IOP/CodecHolder.java org/omg/IOP/EncodingHolder.java org/omg/IOP/TaggedComponentSeqHelper.java org/omg/Dynamic/ContextListHelper.java org/omg/Dynamic/ExceptionListHelper.java org/omg/Dynamic/ParameterHolder.java org/omg/Dynamic/ParameterListHolder.java org/omg/Dynamic/ExceptionListHolder.java org/omg/Dynamic/ParameterHelper.java org/omg/Dynamic/ParameterListHelper.java org/omg/Dynamic/RequestContextHelper.java CORBAX org/omg/CORBA/OctetSeqHelper.java org/omg/CORBA/OctetSeqHolder.java org/omg/CORBA/PolicyError.java org/omg/CORBA/RepositoryIdHelper.java)) 
+ifeq ($(LOGWRAPPERS_ARE_CREATED), yes)
 
-        $(BUILD_IDLS) : $(CORBA_OUTPUTDIR)/btjars/idlj.jar
+  $(eval $(call SetupIdlCompilation,BUILD_IDLS, \
+      IDLJ := $(JAVA) -jar $(CORBA_OUTPUTDIR)/btjars/idlj.jar, \
+      SRC := $(CORBA_TOPDIR)/src/share/classes, \
+      BIN := $(CORBA_OUTPUTDIR)/gensrc, \
+      EXCLUDES := com/sun/tools/corba/se/idl/% \
+          org/omg/CORBA/% \
+          com/sun/corba/se/GiopIDL/% \
+          org/omg/PortableServer/corba.idl, \
+      INCLUDES := %, \
+      OLDIMPLBASES := com/sun/corba/se/PortableActivationIDL/activation.idl \
+          com/sun/corba/se/spi/activation/activation.idl, \
+      DELETES := DYNANYDELETEFILES org/omg/DynamicAny/*POA* org/omg/DynamicAny/*Holder* org/omg/DynamicAny/DynValueBoxHelper.java org/omg/DynamicAny/DynValueCommonHelper.java org/omg/DynamicAny/_DynValueCommonStub.java org/omg/DynamicAny/_DynValueBoxStub.java org/omg/DynamicAny/DynAnyPackage/TypeMismatchHolder.java org/omg/DynamicAny/DynAnyPackage/InvalidValueHolder.java org/omg/DynamicAny/DynAnyFactoryPackage/InconsistentTypeCodeHolder.java IOPDELETEFILES org/omg/IOP/BI_DIR_IIOP.java org/omg/IOP/ChainBypassCheck.java org/omg/IOP/ChainBypassInfo.java org/omg/IOP/FORWARDED_IDENTITY.java org/omg/IOP/INVOCATION_POLICIES.java org/omg/IOP/LogicalThreadId.java org/omg/IOP/SendingContextRunTime.java org/omg/IOP/UnknownExceptionInfo.java org/omg/IOP/TaggedComponentSeqHolder.java POAHELHOLFILES org/omg/PortableServer/CurrentPackage/NoContextHolder.java org/omg/PortableServer/ForwardRequestHolder.java org/omg/PortableServer/IdAssignmentPolicyValueHelper.java org/omg/PortableServer/IdAssignmentPolicyValueHolder.java org/omg/PortableServer/IdUniquenessPolicyValueHelper.java org/omg/PortableServer/IdUniquenessPolicyValueHolder.java org/omg/PortableServer/ImplicitActivationPolicyValueHelper.java org/omg/PortableServer/ImplicitActivationPolicyValueHolder.java org/omg/PortableServer/LifespanPolicyValueHelper.java org/omg/PortableServer/LifespanPolicyValueHolder.java org/omg/PortableServer/ServantRetentionPolicyValueHelper.java org/omg/PortableServer/ServantRetentionPolicyValueHolder.java org/omg/PortableServer/ObjectIdHelper.java org/omg/PortableServer/ObjectIdHolder.java org/omg/PortableServer/POAListHelper.java org/omg/PortableServer/POAListHolder.java org/omg/PortableServer/POAManagerPackage/AdapterInactiveHolder.java org/omg/PortableServer/POAManagerPackage/StateHelper.java org/omg/PortableServer/POAManagerPackage/StateHolder.java org/omg/PortableServer/POAPackage/AdapterAlreadyExistsHolder.java org/omg/PortableServer/POAPackage/AdapterNonExistentHolder.java org/omg/PortableServer/POAPackage/InvalidPolicyHolder.java org/omg/PortableServer/POAPackage/NoServantHolder.java org/omg/PortableServer/POAPackage/ObjectAlreadyActiveHolder.java org/omg/PortableServer/POAPackage/ObjectNotActiveHolder.java org/omg/PortableServer/POAPackage/ServantAlreadyActiveHolder.java org/omg/PortableServer/POAPackage/ServantNotActiveHolder.java org/omg/PortableServer/POAPackage/WrongAdapterHolder.java org/omg/PortableServer/POAPackage/WrongPolicyHolder.java org/omg/PortableServer/RequestProcessingPolicyValueHelper.java org/omg/PortableServer/RequestProcessingPolicyValueHolder.java org/omg/PortableServer/ServantActivatorHolder.java org/omg/PortableServer/ServantLocatorHolder.java org/omg/PortableServer/ThreadPolicyValueHelper.java org/omg/PortableServer/ThreadPolicyValueHolder.java PIHELHOLFILES org/omg/PortableInterceptor/ClientRequestInfoHelper.java org/omg/PortableInterceptor/ClientRequestInterceptorHelper.java org/omg/PortableInterceptor/IORInfoHelper.java org/omg/PortableInterceptor/IORInterceptorHelper.java org/omg/PortableInterceptor/InterceptorHelper.java org/omg/PortableInterceptor/ORBInitInfoHelper.java org/omg/PortableInterceptor/ORBInitializerHelper.java org/omg/PortableInterceptor/PolicyFactoryHelper.java org/omg/PortableInterceptor/ReplyStatusHelper.java org/omg/PortableInterceptor/RequestInfoHelper.java org/omg/PortableInterceptor/ServerRequestInfoHelper.java org/omg/PortableInterceptor/ServerRequestInterceptorHelper.java org/omg/PortableInterceptor/SlotIdHelper.java org/omg/PortableInterceptor/ClientRequestInfoHolder.java org/omg/PortableInterceptor/ClientRequestInterceptorHolder.java org/omg/PortableInterceptor/CurrentHolder.java org/omg/PortableInterceptor/ForwardRequestHolder.java org/omg/PortableInterceptor/IORInfoHolder.java org/omg/PortableInterceptor/IORInterceptorHolder.java org/omg/PortableInterceptor/InterceptorHolder.java org/omg/PortableInterceptor/InvalidSlotHolder.java org/omg/PortableInterceptor/ORBInitInfoHolder.java org/omg/PortableInterceptor/ORBInitializerHolder.java org/omg/PortableInterceptor/PolicyFactoryHolder.java org/omg/PortableInterceptor/RequestInfoHolder.java org/omg/PortableInterceptor/ServerRequestInfoHolder.java org/omg/PortableInterceptor/ServerRequestInterceptorHolder.java org/omg/PortableInterceptor/TaggedComponentSeqHolder.java org/omg/PortableInterceptor/ORBInitInfoPackage/DuplicateNameHolder.java org/omg/PortableInterceptor/ORBInitInfoPackage/InvalidNameHolder.java org/omg/IOP/CodecPackage/FormatMismatchHolder.java org/omg/IOP/CodecPackage/InvalidTypeForEncodingHolder.java org/omg/IOP/CodecPackage/TypeMismatchHolder.java org/omg/IOP/CodecHelper.java org/omg/IOP/EncodingFormatHelper.java org/omg/IOP/EncodingHelper.java org/omg/IOP/CodecFactoryPackage/UnknownEncodingHolder.java org/omg/IOP/CodecFactoryHolder.java org/omg/IOP/CodecHolder.java org/omg/IOP/EncodingHolder.java org/omg/IOP/TaggedComponentSeqHelper.java org/omg/Dynamic/ContextListHelper.java org/omg/Dynamic/ExceptionListHelper.java org/omg/Dynamic/ParameterHolder.java org/omg/Dynamic/ParameterListHolder.java org/omg/Dynamic/ExceptionListHolder.java org/omg/Dynamic/ParameterHelper.java org/omg/Dynamic/ParameterListHelper.java org/omg/Dynamic/RequestContextHelper.java CORBAX org/omg/CORBA/OctetSeqHelper.java org/omg/CORBA/OctetSeqHolder.java org/omg/CORBA/PolicyError.java org/omg/CORBA/RepositoryIdHelper.java))
 
-        $(CORBA_OUTPUTDIR)/gensrc/_the_idls.d : $(BUILD_IDLS) $(CORBA_OUTPUTDIR)/btjars/idlj.jar
-		$(MKDIR) -p $(@D)
-		$(ECHO) IDLS_ARE_CREATED=yes > $@
+  $(BUILD_IDLS): $(CORBA_OUTPUTDIR)/btjars/idlj.jar
 
-        -include $(CORBA_OUTPUTDIR)/gensrc/_the_idls.d
+  $(CORBA_OUTPUTDIR)/gensrc/_the_idls.d: $(BUILD_IDLS) $(CORBA_OUTPUTDIR)/btjars/idlj.jar
+	$(MKDIR) -p $(@D)
+	$(ECHO) IDLS_ARE_CREATED = yes > $@
 
-        ifeq ($(IDLS_ARE_CREATED),yes)
-                $(eval $(call SetupJavaCompilation,BUILD_CORBA,\
-		    SETUP:=GENERATE_NEWBYTECODE,\
-		    SRC:=$(CORBA_TOPDIR)/src/share/classes $(CORBA_OUTPUTDIR)/gensrc $(CORBA_OUTPUTDIR)/logwrappers,\
-		    EXCLUDES:=com/sun/corba/se/PortableActivationIDL\
-			      com/sun/tools/corba/se/logutil,\
-		    EXCLUDE_FILES:=com/sun/corba/se/impl/presentation/rmi/JNDIStateFactoryImpl.java \
-				   com/sun/corba/se/spi/presentation/rmi/StubWrapper.java \
-				   com/sun/org/omg/CORBA/IDLTypeOperations.java \
-				   com/sun/org/omg/CORBA/IRObjectOperations.java \
-				   org/omg/PortableInterceptor/UNKNOWN.java \
-				   com/sun/tools/corba/se/idl/ResourceBundleUtil.java\
-				   com/sun/corba/se/impl/presentation/rmi/jndi.properties,\
-		    COPY:=.prp LogStrings.properties,\
-		    BIN:=$(CORBA_OUTPUTDIR)/classes))
+  -include $(CORBA_OUTPUTDIR)/gensrc/_the_idls.d
 
-                # Separate src.zip call to include sources that were excluded in the build to 
-                # mimic behavior in old build system.
-                $(eval $(call SetupZipArchive,ARCHIVE_BUILD_CORBA,\
-		    SRC:=$(CORBA_TOPDIR)/src/share/classes $(CORBA_OUTPUTDIR)/gensrc $(CORBA_OUTPUTDIR)/logwrappers,\
-		    ZIP:=$(CORBA_OUTPUTDIR)/dist/lib/src.zip))
+  ifeq ($(IDLS_ARE_CREATED), yes)
 
-                $(BUILD_CORBA) : $(BUILD_IDLS) $(LOGWRAPPER_DEPENDENCIES)
+    $(eval $(call SetupJavaCompilation,BUILD_CORBA, \
+        SETUP := GENERATE_NEWBYTECODE, \
+        SRC := $(CORBA_TOPDIR)/src/share/classes $(CORBA_OUTPUTDIR)/gensrc $(CORBA_OUTPUTDIR)/logwrappers, \
+        EXCLUDES := com/sun/corba/se/PortableActivationIDL \
+            com/sun/tools/corba/se/logutil, \
+        EXCLUDE_FILES := com/sun/corba/se/impl/presentation/rmi/JNDIStateFactoryImpl.java \
+            com/sun/corba/se/spi/presentation/rmi/StubWrapper.java \
+            com/sun/org/omg/CORBA/IDLTypeOperations.java \
+            com/sun/org/omg/CORBA/IRObjectOperations.java \
+            org/omg/PortableInterceptor/UNKNOWN.java \
+            com/sun/tools/corba/se/idl/ResourceBundleUtil.java \
+            com/sun/corba/se/impl/presentation/rmi/jndi.properties, \
+        COPY := .prp LogStrings.properties, \
+        BIN := $(CORBA_OUTPUTDIR)/classes))
 
-                # Run stripproperties on all sunorb resource files.
-                STRIP_PROP_SRC_FILES:=$(shell $(FIND) $(CORBA_TOPDIR)/src/share/classes -name "sunorb*.properties")
-                STRIP_PROP_FILES:=$(patsubst  $(CORBA_TOPDIR)/src/share/classes/%,$(CORBA_OUTPUTDIR)/classes/%,\
-			$(STRIP_PROP_SRC_FILES))
-                # Simple delivery of zh_HK properties files just copies zh_TW properties files
-                STRIP_PROP_FILES+=$(patsubst  $(CORBA_TOPDIR)/src/share/classes/%_zh_TW.properties,\
-			$(CORBA_OUTPUTDIR)/classes/%_zh_HK.properties,\
-			$(shell $(FIND) $(CORBA_TOPDIR)/src/share/classes -name "sunorb_zh_TW.properties"))
-                STRIP_PROP_SRC_FILES+=$(shell $(FIND) $(CORBA_TOPDIR)/src/share/classes -name "sunorb_zh_TW.properties")
-		STRIP_PROP_CMDLINE:=$(subst _SPACE_,$(SPACE),\
-			$(join $(addprefix -clean_SPACE_,$(STRIP_PROP_SRC_FILES)), \
-			$(addprefix _SPACE_,$(STRIP_PROP_FILES))))
+    # Separate src.zip call to include sources that were excluded in the build to
+    # mimic behavior in old build system.
+    $(eval $(call SetupZipArchive,ARCHIVE_BUILD_CORBA, \
+        SRC := $(CORBA_TOPDIR)/src/share/classes $(CORBA_OUTPUTDIR)/gensrc $(CORBA_OUTPUTDIR)/logwrappers, \
+        ZIP := $(CORBA_OUTPUTDIR)/dist/lib/src.zip))
 
-                $(CORBA_OUTPUTDIR)/_the.stripped_properties: $(STRIP_PROP_SRC_FILES) \
-					$(CORBA_OUTPUTDIR)/btjars/stripproperties.jar
-			$(MKDIR) -p $(sort $(dir $(STRIP_PROP_FILES)))
-			$(call ListPathsSafely,STRIP_PROP_CMDLINE,\n, >> $(CORBA_OUTPUTDIR)/_the.strip_prop.cmdline)
-			$(JAVA) -jar $(CORBA_OUTPUTDIR)/btjars/stripproperties.jar \
-				@$(CORBA_OUTPUTDIR)/_the.strip_prop.cmdline
-			$(TOUCH) $@
+    $(BUILD_CORBA): $(BUILD_IDLS) $(LOGWRAPPER_DEPENDENCIES)
 
-                $(eval $(call SetupArchive,ARCHIVE_CORBA,\
-		     $(BUILD_CORBA) $(CORBA_OUTPUTDIR)/_the.stripped_properties,\
-		     SRCS:=$(CORBA_OUTPUTDIR)/classes,\
-		     SUFFIXES:=.class .prp .properties,\
-		     JAR:=$(CORBA_OUTPUTDIR)/dist/lib/classes.jar))
+    # Run stripproperties on all sunorb resource files.
+    STRIP_PROP_SRC_FILES := $(shell $(FIND) $(CORBA_TOPDIR)/src/share/classes -name "sunorb*.properties")
+    STRIP_PROP_FILES := $(patsubst $(CORBA_TOPDIR)/src/share/classes/%, $(CORBA_OUTPUTDIR)/classes/%, \
+        $(STRIP_PROP_SRC_FILES))
+    # Simple delivery of zh_HK properties files just copies zh_TW properties files
+    STRIP_PROP_FILES += $(patsubst $(CORBA_TOPDIR)/src/share/classes/%_zh_TW.properties, \
+        $(CORBA_OUTPUTDIR)/classes/%_zh_HK.properties, \
+        $(shell $(FIND) $(CORBA_TOPDIR)/src/share/classes -name "sunorb_zh_TW.properties"))
+    STRIP_PROP_SRC_FILES += $(shell $(FIND) $(CORBA_TOPDIR)/src/share/classes -name "sunorb_zh_TW.properties")
+    STRIP_PROP_CMDLINE := $(subst _SPACE_, $(SPACE), \
+        $(join $(addprefix -clean_SPACE_, $(STRIP_PROP_SRC_FILES)), \
+        $(addprefix _SPACE_, $(STRIP_PROP_FILES))))
 
-                # The created classes.jar now contains Corba compiled to run on the target JDK
-                # and is ready for inclusion in jdk rt.jar.
+    $(CORBA_OUTPUTDIR)/_the.stripped_properties: $(STRIP_PROP_SRC_FILES) \
+        $(CORBA_OUTPUTDIR)/btjars/stripproperties.jar
+		$(MKDIR) -p $(sort $(dir $(STRIP_PROP_FILES)))
+		$(call ListPathsSafely,STRIP_PROP_CMDLINE,\n, >> $(CORBA_OUTPUTDIR)/_the.strip_prop.cmdline)
+		$(JAVA) -jar $(CORBA_OUTPUTDIR)/btjars/stripproperties.jar \
+		    @$(CORBA_OUTPUTDIR)/_the.strip_prop.cmdline
+		$(TOUCH) $@
 
-                # The created src.zip now contains .java and .properties files used to create the classes in classes.jar
-                # and is ready for inclusion into the jdk src.zip
+    $(eval $(call SetupArchive,ARCHIVE_CORBA, \
+        $(BUILD_CORBA) $(CORBA_OUTPUTDIR)/_the.stripped_properties, \
+        SRCS := $(CORBA_OUTPUTDIR)/classes, \
+        SUFFIXES := .class .prp .properties, \
+        JAR := $(CORBA_OUTPUTDIR)/dist/lib/classes.jar))
 
-                BIN_FILES:=$(CORBA_TOPDIR)/src/share/classes/com/sun/tools/corba/se/idl/orb.idl \
-			   $(CORBA_TOPDIR)/src/share/classes/com/sun/tools/corba/se/idl/ir.idl
+    # The created classes.jar now contains Corba compiled to run on the target JDK
+    # and is ready for inclusion in jdk rt.jar.
 
-                $(CORBA_OUTPUTDIR)/dist/lib/bin.zip : $(BIN_FILES) $(CORBA_OUTPUTDIR)/dist/lib/classes.jar
-			$(MKDIR) -p $(CORBA_OUTPUTDIR)/dist/lib
-			$(MKDIR) -p $(CORBA_OUTPUTDIR)/lib
-			$(RM) -f $@
-			$(ECHO) Creating `basename $@`
-			$(CP) $(BIN_FILES) $(CORBA_OUTPUTDIR)/lib
-			$(CHMOD) ug+w $(CORBA_OUTPUTDIR)/lib/*
-			(cd $(CORBA_OUTPUTDIR); $(ZIP) -q $@ lib/orb.idl lib/ir.idl)
+    # The created src.zip now contains .java and .properties files used to create the classes in classes.jar
+    # and is ready for inclusion into the jdk src.zip
 
-                # The created bin.zip now contains the corba specific binaries: orb.idl, ir.idl
+    BIN_FILES := $(CORBA_TOPDIR)/src/share/classes/com/sun/tools/corba/se/idl/orb.idl \
+        $(CORBA_TOPDIR)/src/share/classes/com/sun/tools/corba/se/idl/ir.idl
 
-                all: 	$(CORBA_OUTPUTDIR)/btjars/stripproperties.jar \
-			$(CORBA_OUTPUTDIR)/btjars/idlj.jar \
-			$(CORBA_OUTPUTDIR)/btjars/logutil.jar \
-			$(CORBA_OUTPUTDIR)/dist/lib/classes.jar \
-			$(CORBA_OUTPUTDIR)/dist/lib/src.zip \
-			$(CORBA_OUTPUTDIR)/dist/lib/bin.zip
-        endif
+    $(CORBA_OUTPUTDIR)/dist/lib/bin.zip: $(BIN_FILES) $(CORBA_OUTPUTDIR)/dist/lib/classes.jar
+	$(MKDIR) -p $(CORBA_OUTPUTDIR)/dist/lib
+	$(MKDIR) -p $(CORBA_OUTPUTDIR)/lib
+	$(RM) -f $@
+	$(ECHO) Creating `basename $@`
+	$(CP) $(BIN_FILES) $(CORBA_OUTPUTDIR)/lib
+	$(CHMOD) ug+w $(CORBA_OUTPUTDIR)/lib/*
+	(cd $(CORBA_OUTPUTDIR); $(ZIP) -q $@ lib/orb.idl lib/ir.idl)
+
+    # The created bin.zip now contains the corba specific binaries: orb.idl, ir.idl
+
+    all: $(CORBA_OUTPUTDIR)/btjars/stripproperties.jar \
+        $(CORBA_OUTPUTDIR)/btjars/idlj.jar \
+        $(CORBA_OUTPUTDIR)/btjars/logutil.jar \
+        $(CORBA_OUTPUTDIR)/dist/lib/classes.jar \
+        $(CORBA_OUTPUTDIR)/dist/lib/src.zip \
+        $(CORBA_OUTPUTDIR)/dist/lib/bin.zip
+  endif
 endif
 
 clean:
 	$(RM) -rf $(CORBA_OUTPUTDIR)
 
-.PHONY: default all clean clobber 
+.PHONY: default all clean clobber
diff --git a/corba/makefiles/Makefile b/corba/makefiles/Makefile
index 9539fe0..c7d0dd0 100644
--- a/corba/makefiles/Makefile
+++ b/corba/makefiles/Makefile
@@ -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 ===================================================)
diff --git a/hotspot/.hgtags b/hotspot/.hgtags
index b21447b..472bde7 100644
--- a/hotspot/.hgtags
+++ b/hotspot/.hgtags
@@ -383,3 +383,5 @@
 58043478c26d4e8bf48700acea5f97aba8b417d4 hs25-b52
 6209b0ed51c086d4127bac0e086c8f326d1764d7 jdk8-b110
 562a3d356de67670b4172b82aca2d30743449e04 hs25-b53
+f6962730bbde82f279a0ae3a1c14bc5e58096c6e jdk8-b111
+4a845c7a463844cead9e1e1641d6bcfb8a77f1c7 hs25-b54
diff --git a/hotspot/agent/src/os/bsd/ps_core.c b/hotspot/agent/src/os/bsd/ps_core.c
index bb1191c..6e4c65e 100644
--- a/hotspot/agent/src/os/bsd/ps_core.c
+++ b/hotspot/agent/src/os/bsd/ps_core.c
@@ -44,6 +44,7 @@
 // close all file descriptors
 static void close_files(struct ps_prochandle* ph) {
   lib_info* lib = NULL;
+
   // close core file descriptor
   if (ph->core->core_fd >= 0)
     close(ph->core->core_fd);
@@ -149,8 +150,7 @@
 
 // Return the map_info for the given virtual address.  We keep a sorted
 // array of pointers in ph->map_array, so we can binary search.
-static map_info* core_lookup(struct ps_prochandle *ph, uintptr_t addr)
-{
+static map_info* core_lookup(struct ps_prochandle *ph, uintptr_t addr) {
   int mid, lo = 0, hi = ph->core->num_maps - 1;
   map_info *mp;
 
@@ -230,9 +230,9 @@
     size_t _used;            // for setting space top on read
 
     // 4991491 NOTICE These are C++ bool's in filemap.hpp and must match up with
-    // the C type matching the C++ bool type on any given platform. For
-    // Hotspot on BSD we assume the corresponding C type is char but
-    // licensees on BSD versions may need to adjust the type of these fields.
+    // the C type matching the C++ bool type on any given platform.
+    // We assume the corresponding C type is char but licensees
+    // may need to adjust the type of these fields.
     char   _read_only;       // read only space?
     char   _allow_exec;      // executable code in space?
 
@@ -286,10 +286,12 @@
 #define USE_SHARED_SPACES_SYM "_UseSharedSpaces"
 // mangled name of Arguments::SharedArchivePath
 #define SHARED_ARCHIVE_PATH_SYM "_ZN9Arguments17SharedArchivePathE"
+#define LIBJVM_NAME "/libjvm.dylib"
 #else
 #define USE_SHARED_SPACES_SYM "UseSharedSpaces"
 // mangled name of Arguments::SharedArchivePath
 #define SHARED_ARCHIVE_PATH_SYM "__ZN9Arguments17SharedArchivePathE"
+#define LIBJVM_NAME "/libjvm.so"
 #endif // __APPLE_
 
 static bool init_classsharing_workaround(struct ps_prochandle* ph) {
@@ -300,12 +302,7 @@
     // we are iterating over shared objects from the core dump. look for
     // libjvm.so.
     const char *jvm_name = 0;
-#ifdef __APPLE__
-    if ((jvm_name = strstr(lib->name, "/libjvm.dylib")) != 0)
-#else
-    if ((jvm_name = strstr(lib->name, "/libjvm.so")) != 0)
-#endif // __APPLE__
-    {
+    if ((jvm_name = strstr(lib->name, LIBJVM_NAME)) != 0) {
       char classes_jsa[PATH_MAX];
       struct FileMapHeader header;
       int fd = -1;
@@ -399,8 +396,8 @@
         }
       }
       return true;
-    }
-    lib = lib->next;
+   }
+   lib = lib->next;
   }
   return true;
 }
@@ -432,8 +429,8 @@
   // allocate map_array
   map_info** array;
   if ( (array = (map_info**) malloc(sizeof(map_info*) * num_maps)) == NULL) {
-     print_debug("can't allocate memory for map array\n");
-     return false;
+    print_debug("can't allocate memory for map array\n");
+    return false;
   }
 
   // add maps to array
@@ -450,7 +447,7 @@
   ph->core->map_array = array;
   // sort the map_info array by base virtual address.
   qsort(ph->core->map_array, ph->core->num_maps, sizeof (map_info*),
-           core_cmp_mapping);
+        core_cmp_mapping);
 
   // print map
   if (is_debug()) {
@@ -458,7 +455,7 @@
     print_debug("---- sorted virtual address map ----\n");
     for (j = 0; j < ph->core->num_maps; j++) {
       print_debug("base = 0x%lx\tsize = %d\n", ph->core->map_array[j]->vaddr,
-                                       ph->core->map_array[j]->memsz);
+                  ph->core->map_array[j]->memsz);
     }
   }
 
@@ -1091,9 +1088,9 @@
                                    notep->n_type, notep->n_descsz);
 
       if (notep->n_type == NT_PRSTATUS) {
-         if (core_handle_prstatus(ph, descdata, notep->n_descsz) != true) {
-            return false;
-         }
+        if (core_handle_prstatus(ph, descdata, notep->n_descsz) != true) {
+          return false;
+        }
       }
       p = descdata + ROUNDUP(notep->n_descsz, 4);
    }
@@ -1121,7 +1118,7 @@
     * contains a set of saved /proc structures), and PT_LOAD (which
     * represents a memory mapping from the process's address space).
     *
-    * Difference b/w Solaris PT_NOTE and BSD PT_NOTE:
+    * Difference b/w Solaris PT_NOTE and Linux/BSD PT_NOTE:
     *
     *     In Solaris there are two PT_NOTE segments the first PT_NOTE (if present)
     *     contains /proc structs in the pre-2.6 unstructured /proc format. the last
@@ -1167,32 +1164,61 @@
 
 // read segments of a shared object
 static bool read_lib_segments(struct ps_prochandle* ph, int lib_fd, ELF_EHDR* lib_ehdr, uintptr_t lib_base) {
-   int i = 0;
-   ELF_PHDR* phbuf;
-   ELF_PHDR* lib_php = NULL;
+  int i = 0;
+  ELF_PHDR* phbuf;
+  ELF_PHDR* lib_php = NULL;
 
-   if ((phbuf = read_program_header_table(lib_fd, lib_ehdr)) == NULL)
-      return false;
+  int page_size=sysconf(_SC_PAGE_SIZE);
 
-   // we want to process only PT_LOAD segments that are not writable.
-   // i.e., text segments. The read/write/exec (data) segments would
-   // have been already added from core file segments.
-   for (lib_php = phbuf, i = 0; i < lib_ehdr->e_phnum; i++) {
-      if ((lib_php->p_type == PT_LOAD) && !(lib_php->p_flags & PF_W) && (lib_php->p_filesz != 0)) {
-         if (add_map_info(ph, lib_fd, lib_php->p_offset, lib_php->p_vaddr + lib_base, lib_php->p_filesz) == NULL)
-            goto err;
+  if ((phbuf = read_program_header_table(lib_fd, lib_ehdr)) == NULL) {
+    return false;
+  }
+
+  // we want to process only PT_LOAD segments that are not writable.
+  // i.e., text segments. The read/write/exec (data) segments would
+  // have been already added from core file segments.
+  for (lib_php = phbuf, i = 0; i < lib_ehdr->e_phnum; i++) {
+    if ((lib_php->p_type == PT_LOAD) && !(lib_php->p_flags & PF_W) && (lib_php->p_filesz != 0)) {
+
+      uintptr_t target_vaddr = lib_php->p_vaddr + lib_base;
+      map_info *existing_map = core_lookup(ph, target_vaddr);
+
+      if (existing_map == NULL){
+        if (add_map_info(ph, lib_fd, lib_php->p_offset,
+                          target_vaddr, lib_php->p_filesz) == NULL) {
+          goto err;
+        }
+      } else {
+        if ((existing_map->memsz != page_size) &&
+            (existing_map->fd != lib_fd) &&
+            (existing_map->memsz != lib_php->p_filesz)){
+
+          print_debug("address conflict @ 0x%lx (size = %ld, flags = %d\n)",
+                        target_vaddr, lib_php->p_filesz, lib_php->p_flags);
+          goto err;
+        }
+
+        /* replace PT_LOAD segment with library segment */
+        print_debug("overwrote with new address mapping (memsz %ld -> %ld)\n",
+                     existing_map->memsz, lib_php->p_filesz);
+
+        existing_map->fd = lib_fd;
+        existing_map->offset = lib_php->p_offset;
+        existing_map->memsz = lib_php->p_filesz;
       }
-      lib_php++;
-   }
+    }
 
-   free(phbuf);
-   return true;
+    lib_php++;
+  }
+
+  free(phbuf);
+  return true;
 err:
-   free(phbuf);
-   return false;
+  free(phbuf);
+  return false;
 }
 
-// process segments from interpreter (ld-elf.so.1)
+// process segments from interpreter (ld.so or ld-linux.so or ld-elf.so)
 static bool read_interp_segments(struct ps_prochandle* ph) {
    ELF_EHDR interp_ehdr;
 
@@ -1303,32 +1329,34 @@
   debug_base = dyn.d_un.d_ptr;
   // at debug_base we have struct r_debug. This has first link map in r_map field
   if (ps_pread(ph, (psaddr_t) debug_base + FIRST_LINK_MAP_OFFSET,
-                  &first_link_map_addr, sizeof(uintptr_t)) != PS_OK) {
+                 &first_link_map_addr, sizeof(uintptr_t)) != PS_OK) {
     print_debug("can't read first link map address\n");
     return false;
   }
 
   // read ld_base address from struct r_debug
-  // XXX: There is no r_ldbase member on BSD
-  /*
+#if 0  // There is no r_ldbase member on BSD
   if (ps_pread(ph, (psaddr_t) debug_base + LD_BASE_OFFSET, &ld_base_addr,
                   sizeof(uintptr_t)) != PS_OK) {
     print_debug("can't read ld base address\n");
     return false;
   }
   ph->core->ld_base_addr = ld_base_addr;
-  */
+#else
   ph->core->ld_base_addr = 0;
+#endif
 
   print_debug("interpreter base address is 0x%lx\n", ld_base_addr);
 
-  // now read segments from interp (i.e ld-elf.so.1)
-  if (read_interp_segments(ph) != true)
+  // now read segments from interp (i.e ld.so or ld-linux.so or ld-elf.so)
+  if (read_interp_segments(ph) != true) {
     return false;
+  }
 
   // after adding interpreter (ld.so) mappings sort again
-  if (sort_map_array(ph) != true)
+  if (sort_map_array(ph) != true) {
     return false;
+  }
 
   print_debug("first link map is at 0x%lx\n", first_link_map_addr);
 
@@ -1380,8 +1408,9 @@
           add_lib_info_fd(ph, lib_name, lib_fd, lib_base);
           // Map info is added for the library (lib_name) so
           // we need to re-sort it before calling the p_pdread.
-          if (sort_map_array(ph) != true)
+          if (sort_map_array(ph) != true) {
             return false;
+          }
         } else {
           print_debug("can't read ELF header for shared object %s\n", lib_name);
           close(lib_fd);
@@ -1392,7 +1421,7 @@
 
     // read next link_map address
     if (ps_pread(ph, (psaddr_t) link_map_addr + LINK_MAP_NEXT_OFFSET,
-                 &link_map_addr, sizeof(uintptr_t)) != PS_OK) {
+                  &link_map_addr, sizeof(uintptr_t)) != PS_OK) {
       print_debug("can't read next link in link_map\n");
       return false;
     }
@@ -1408,7 +1437,7 @@
 
   struct ps_prochandle* ph = (struct ps_prochandle*) calloc(1, sizeof(struct ps_prochandle));
   if (ph == NULL) {
-    print_debug("cant allocate ps_prochandle\n");
+    print_debug("can't allocate ps_prochandle\n");
     return NULL;
   }
 
@@ -1444,38 +1473,45 @@
   }
 
   if (read_elf_header(ph->core->exec_fd, &exec_ehdr) != true || exec_ehdr.e_type != ET_EXEC) {
-     print_debug("executable file is not a valid ELF ET_EXEC file\n");
-     goto err;
+    print_debug("executable file is not a valid ELF ET_EXEC file\n");
+    goto err;
   }
 
   // process core file segments
-  if (read_core_segments(ph, &core_ehdr) != true)
-     goto err;
+  if (read_core_segments(ph, &core_ehdr) != true) {
+    goto err;
+  }
 
   // process exec file segments
-  if (read_exec_segments(ph, &exec_ehdr) != true)
-     goto err;
+  if (read_exec_segments(ph, &exec_ehdr) != true) {
+    goto err;
+  }
 
   // exec file is also treated like a shared object for symbol search
   if (add_lib_info_fd(ph, exec_file, ph->core->exec_fd,
-                      (uintptr_t)0 + find_base_address(ph->core->exec_fd, &exec_ehdr)) == NULL)
-     goto err;
+                      (uintptr_t)0 + find_base_address(ph->core->exec_fd, &exec_ehdr)) == NULL) {
+    goto err;
+  }
 
   // allocate and sort maps into map_array, we need to do this
   // here because read_shared_lib_info needs to read from debuggee
   // address space
-  if (sort_map_array(ph) != true)
+  if (sort_map_array(ph) != true) {
     goto err;
+  }
 
-  if (read_shared_lib_info(ph) != true)
+  if (read_shared_lib_info(ph) != true) {
     goto err;
+  }
 
   // sort again because we have added more mappings from shared objects
-  if (sort_map_array(ph) != true)
+  if (sort_map_array(ph) != true) {
     goto err;
+  }
 
-  if (init_classsharing_workaround(ph) != true)
+  if (init_classsharing_workaround(ph) != true) {
     goto err;
+  }
 
   print_debug("Leave Pgrab_core\n");
   return ph;
diff --git a/hotspot/agent/src/os/linux/ps_core.c b/hotspot/agent/src/os/linux/ps_core.c
index c162040..ab3866d 100644
--- a/hotspot/agent/src/os/linux/ps_core.c
+++ b/hotspot/agent/src/os/linux/ps_core.c
@@ -41,155 +41,158 @@
 // ps_prochandle cleanup helper functions
 
 // close all file descriptors
-static void close_elf_files(struct ps_prochandle* ph) {
-   lib_info* lib = NULL;
+static void close_files(struct ps_prochandle* ph) {
+  lib_info* lib = NULL;
 
-   // close core file descriptor
-   if (ph->core->core_fd >= 0)
-     close(ph->core->core_fd);
+  // close core file descriptor
+  if (ph->core->core_fd >= 0)
+    close(ph->core->core_fd);
 
-   // close exec file descriptor
-   if (ph->core->exec_fd >= 0)
-     close(ph->core->exec_fd);
+  // close exec file descriptor
+  if (ph->core->exec_fd >= 0)
+    close(ph->core->exec_fd);
 
-   // close interp file descriptor
-   if (ph->core->interp_fd >= 0)
-     close(ph->core->interp_fd);
+  // close interp file descriptor
+  if (ph->core->interp_fd >= 0)
+    close(ph->core->interp_fd);
 
-   // close class share archive file
-   if (ph->core->classes_jsa_fd >= 0)
-     close(ph->core->classes_jsa_fd);
+  // close class share archive file
+  if (ph->core->classes_jsa_fd >= 0)
+    close(ph->core->classes_jsa_fd);
 
-   // close all library file descriptors
-   lib = ph->libs;
-   while (lib) {
-      int fd = lib->fd;
-      if (fd >= 0 && fd != ph->core->exec_fd) close(fd);
-      lib = lib->next;
-   }
+  // close all library file descriptors
+  lib = ph->libs;
+  while (lib) {
+    int fd = lib->fd;
+    if (fd >= 0 && fd != ph->core->exec_fd) {
+      close(fd);
+    }
+    lib = lib->next;
+  }
 }
 
 // clean all map_info stuff
 static void destroy_map_info(struct ps_prochandle* ph) {
   map_info* map = ph->core->maps;
   while (map) {
-     map_info* next = map->next;
-     free(map);
-     map = next;
+    map_info* next = map->next;
+    free(map);
+    map = next;
   }
 
   if (ph->core->map_array) {
-     free(ph->core->map_array);
+    free(ph->core->map_array);
   }
 
   // Part of the class sharing workaround
   map = ph->core->class_share_maps;
   while (map) {
-     map_info* next = map->next;
-     free(map);
-     map = next;
+    map_info* next = map->next;
+    free(map);
+    map = next;
   }
 }
 
 // ps_prochandle operations
 static void core_release(struct ps_prochandle* ph) {
-   if (ph->core) {
-      close_elf_files(ph);
-      destroy_map_info(ph);
-      free(ph->core);
-   }
+  if (ph->core) {
+    close_files(ph);
+    destroy_map_info(ph);
+    free(ph->core);
+  }
 }
 
 static map_info* allocate_init_map(int fd, off_t offset, uintptr_t vaddr, size_t memsz) {
-   map_info* map;
-   if ( (map = (map_info*) calloc(1, sizeof(map_info))) == NULL) {
-      print_debug("can't allocate memory for map_info\n");
-      return NULL;
-   }
+  map_info* map;
+  if ( (map = (map_info*) calloc(1, sizeof(map_info))) == NULL) {
+    print_debug("can't allocate memory for map_info\n");
+    return NULL;
+  }
 
-   // initialize map
-   map->fd     = fd;
-   map->offset = offset;
-   map->vaddr  = vaddr;
-   map->memsz  = memsz;
-   return map;
+  // initialize map
+  map->fd     = fd;
+  map->offset = offset;
+  map->vaddr  = vaddr;
+  map->memsz  = memsz;
+  return map;
 }
 
 // add map info with given fd, offset, vaddr and memsz
 static map_info* add_map_info(struct ps_prochandle* ph, int fd, off_t offset,
                              uintptr_t vaddr, size_t memsz) {
-   map_info* map;
-   if ((map = allocate_init_map(fd, offset, vaddr, memsz)) == NULL) {
-      return NULL;
-   }
+  map_info* map;
+  if ((map = allocate_init_map(fd, offset, vaddr, memsz)) == NULL) {
+    return NULL;
+  }
 
-   // add this to map list
-   map->next  = ph->core->maps;
-   ph->core->maps   = map;
-   ph->core->num_maps++;
+  // add this to map list
+  map->next  = ph->core->maps;
+  ph->core->maps   = map;
+  ph->core->num_maps++;
 
-   return map;
+  return map;
 }
 
 // Part of the class sharing workaround
-static void add_class_share_map_info(struct ps_prochandle* ph, off_t offset,
+static map_info* add_class_share_map_info(struct ps_prochandle* ph, off_t offset,
                              uintptr_t vaddr, size_t memsz) {
-   map_info* map;
-   if ((map = allocate_init_map(ph->core->classes_jsa_fd,
-                                offset, vaddr, memsz)) == NULL) {
-      return;
-   }
+  map_info* map;
+  if ((map = allocate_init_map(ph->core->classes_jsa_fd,
+                               offset, vaddr, memsz)) == NULL) {
+    return NULL;
+  }
 
-   map->next = ph->core->class_share_maps;
-   ph->core->class_share_maps = map;
+  map->next = ph->core->class_share_maps;
+  ph->core->class_share_maps = map;
+  return map;
 }
 
 // Return the map_info for the given virtual address.  We keep a sorted
 // array of pointers in ph->map_array, so we can binary search.
-static map_info* core_lookup(struct ps_prochandle *ph, uintptr_t addr)
-{
-   int mid, lo = 0, hi = ph->core->num_maps - 1;
-   map_info *mp;
+static map_info* core_lookup(struct ps_prochandle *ph, uintptr_t addr) {
+  int mid, lo = 0, hi = ph->core->num_maps - 1;
+  map_info *mp;
 
-   while (hi - lo > 1) {
-     mid = (lo + hi) / 2;
-      if (addr >= ph->core->map_array[mid]->vaddr)
-         lo = mid;
-      else
-         hi = mid;
-   }
+  while (hi - lo > 1) {
+    mid = (lo + hi) / 2;
+    if (addr >= ph->core->map_array[mid]->vaddr) {
+      lo = mid;
+    } else {
+      hi = mid;
+    }
+  }
 
-   if (addr < ph->core->map_array[hi]->vaddr)
-      mp = ph->core->map_array[lo];
-   else
-      mp = ph->core->map_array[hi];
+  if (addr < ph->core->map_array[hi]->vaddr) {
+    mp = ph->core->map_array[lo];
+  } else {
+    mp = ph->core->map_array[hi];
+  }
 
-   if (addr >= mp->vaddr && addr < mp->vaddr + mp->memsz)
+  if (addr >= mp->vaddr && addr < mp->vaddr + mp->memsz) {
+    return (mp);
+  }
+
+
+  // Part of the class sharing workaround
+  // Unfortunately, we have no way of detecting -Xshare state.
+  // Check out the share maps atlast, if we don't find anywhere.
+  // This is done this way so to avoid reading share pages
+  // ahead of other normal maps. For eg. with -Xshare:off we don't
+  // want to prefer class sharing data to data from core.
+  mp = ph->core->class_share_maps;
+  if (mp) {
+    print_debug("can't locate map_info at 0x%lx, trying class share maps\n", addr);
+  }
+  while (mp) {
+    if (addr >= mp->vaddr && addr < mp->vaddr + mp->memsz) {
+      print_debug("located map_info at 0x%lx from class share maps\n", addr);
       return (mp);
+    }
+    mp = mp->next;
+  }
 
-
-   // Part of the class sharing workaround
-   // Unfortunately, we have no way of detecting -Xshare state.
-   // Check out the share maps atlast, if we don't find anywhere.
-   // This is done this way so to avoid reading share pages
-   // ahead of other normal maps. For eg. with -Xshare:off we don't
-   // want to prefer class sharing data to data from core.
-   mp = ph->core->class_share_maps;
-   if (mp) {
-      print_debug("can't locate map_info at 0x%lx, trying class share maps\n",
-             addr);
-   }
-   while (mp) {
-      if (addr >= mp->vaddr && addr < mp->vaddr + mp->memsz) {
-         print_debug("located map_info at 0x%lx from class share maps\n",
-                  addr);
-         return (mp);
-      }
-      mp = mp->next;
-   }
-
-   print_debug("can't locate map_info at 0x%lx\n", addr);
-   return (NULL);
+  print_debug("can't locate map_info at 0x%lx\n", addr);
+  return (NULL);
 }
 
 //---------------------------------------------------------------
@@ -226,9 +229,9 @@
     size_t _used;            // for setting space top on read
 
     // 4991491 NOTICE These are C++ bool's in filemap.hpp and must match up with
-    // the C type matching the C++ bool type on any given platform. For
-    // Hotspot on Linux we assume the corresponding C type is char but
-    // licensees on Linux versions may need to adjust the type of these fields.
+    // the C type matching the C++ bool type on any given platform.
+    // We assume the corresponding C type is char but licensees
+    // may need to adjust the type of these fields.
     char   _read_only;       // read only space?
     char   _allow_exec;      // executable code in space?
 
@@ -238,154 +241,159 @@
 };
 
 static bool read_jboolean(struct ps_prochandle* ph, uintptr_t addr, jboolean* pvalue) {
-   jboolean i;
-   if (ps_pdread(ph, (psaddr_t) addr, &i, sizeof(i)) == PS_OK) {
-      *pvalue = i;
-      return true;
-   } else {
-      return false;
-   }
+  jboolean i;
+  if (ps_pdread(ph, (psaddr_t) addr, &i, sizeof(i)) == PS_OK) {
+    *pvalue = i;
+    return true;
+  } else {
+    return false;
+  }
 }
 
 static bool read_pointer(struct ps_prochandle* ph, uintptr_t addr, uintptr_t* pvalue) {
-   uintptr_t uip;
-   if (ps_pdread(ph, (psaddr_t) addr, &uip, sizeof(uip)) == PS_OK) {
-      *pvalue = uip;
-      return true;
-   } else {
-      return false;
-   }
+  uintptr_t uip;
+  if (ps_pdread(ph, (psaddr_t) addr, (char *)&uip, sizeof(uip)) == PS_OK) {
+    *pvalue = uip;
+    return true;
+  } else {
+    return false;
+  }
 }
 
 // used to read strings from debuggee
 static bool read_string(struct ps_prochandle* ph, uintptr_t addr, char* buf, size_t size) {
-   size_t i = 0;
-   char  c = ' ';
+  size_t i = 0;
+  char  c = ' ';
 
-   while (c != '\0') {
-     if (ps_pdread(ph, (psaddr_t) addr, &c, sizeof(char)) != PS_OK)
-         return false;
-      if (i < size - 1)
-         buf[i] = c;
-      else // smaller buffer
-         return false;
-      i++; addr++;
-   }
+  while (c != '\0') {
+    if (ps_pdread(ph, (psaddr_t) addr, &c, sizeof(char)) != PS_OK) {
+      return false;
+    }
+    if (i < size - 1) {
+      buf[i] = c;
+    } else {
+      // smaller buffer
+      return false;
+    }
+    i++; addr++;
+  }
 
-   buf[i] = '\0';
-   return true;
+  buf[i] = '\0';
+  return true;
 }
 
 #define USE_SHARED_SPACES_SYM "UseSharedSpaces"
 // mangled name of Arguments::SharedArchivePath
 #define SHARED_ARCHIVE_PATH_SYM "_ZN9Arguments17SharedArchivePathE"
+#define LIBJVM_NAME "/libjvm.so"
 
 static bool init_classsharing_workaround(struct ps_prochandle* ph) {
-   lib_info* lib = ph->libs;
-   while (lib != NULL) {
-      // we are iterating over shared objects from the core dump. look for
-      // libjvm.so.
-      const char *jvm_name = 0;
-      if ((jvm_name = strstr(lib->name, "/libjvm.so")) != 0) {
-         char classes_jsa[PATH_MAX];
-         struct FileMapHeader header;
-         size_t n = 0;
-         int fd = -1, m = 0;
-         uintptr_t base = 0, useSharedSpacesAddr = 0;
-         uintptr_t sharedArchivePathAddrAddr = 0, sharedArchivePathAddr = 0;
-         jboolean useSharedSpaces = 0;
-         map_info* mi = 0;
+  lib_info* lib = ph->libs;
+  while (lib != NULL) {
+    // we are iterating over shared objects from the core dump. look for
+    // libjvm.so.
+    const char *jvm_name = 0;
+    if ((jvm_name = strstr(lib->name, LIBJVM_NAME)) != 0) {
+      char classes_jsa[PATH_MAX];
+      struct FileMapHeader header;
+      int fd = -1;
+      int m = 0;
+      size_t n = 0;
+      uintptr_t base = 0, useSharedSpacesAddr = 0;
+      uintptr_t sharedArchivePathAddrAddr = 0, sharedArchivePathAddr = 0;
+      jboolean useSharedSpaces = 0;
+      map_info* mi = 0;
 
-         memset(classes_jsa, 0, sizeof(classes_jsa));
-         jvm_name = lib->name;
-         useSharedSpacesAddr = lookup_symbol(ph, jvm_name, USE_SHARED_SPACES_SYM);
-         if (useSharedSpacesAddr == 0) {
-            print_debug("can't lookup 'UseSharedSpaces' flag\n");
-            return false;
-         }
-
-         // Hotspot vm types are not exported to build this library. So
-         // using equivalent type jboolean to read the value of
-         // UseSharedSpaces which is same as hotspot type "bool".
-         if (read_jboolean(ph, useSharedSpacesAddr, &useSharedSpaces) != true) {
-            print_debug("can't read the value of 'UseSharedSpaces' flag\n");
-            return false;
-         }
-
-         if ((int)useSharedSpaces == 0) {
-            print_debug("UseSharedSpaces is false, assuming -Xshare:off!\n");
-            return true;
-         }
-
-         sharedArchivePathAddrAddr = lookup_symbol(ph, jvm_name, SHARED_ARCHIVE_PATH_SYM);
-         if (sharedArchivePathAddrAddr == 0) {
-            print_debug("can't lookup shared archive path symbol\n");
-            return false;
-         }
-
-         if (read_pointer(ph, sharedArchivePathAddrAddr, &sharedArchivePathAddr) != true) {
-            print_debug("can't read shared archive path pointer\n");
-            return false;
-         }
-
-         if (read_string(ph, sharedArchivePathAddr, classes_jsa, sizeof(classes_jsa)) != true) {
-            print_debug("can't read shared archive path value\n");
-            return false;
-         }
-
-         print_debug("looking for %s\n", classes_jsa);
-         // open the class sharing archive file
-         fd = pathmap_open(classes_jsa);
-         if (fd < 0) {
-            print_debug("can't open %s!\n", classes_jsa);
-            ph->core->classes_jsa_fd = -1;
-            return false;
-         } else {
-            print_debug("opened %s\n", classes_jsa);
-         }
-
-         // read FileMapHeader from the file
-         memset(&header, 0, sizeof(struct FileMapHeader));
-         if ((n = read(fd, &header, sizeof(struct FileMapHeader)))
-              != sizeof(struct FileMapHeader)) {
-            print_debug("can't read shared archive file map header from %s\n", classes_jsa);
-            close(fd);
-            return false;
-         }
-
-         // check file magic
-         if (header._magic != 0xf00baba2) {
-            print_debug("%s has bad shared archive file magic number 0x%x, expecing 0xf00baba2\n",
-                        classes_jsa, header._magic);
-            close(fd);
-            return false;
-         }
-
-         // check version
-         if (header._version != CURRENT_ARCHIVE_VERSION) {
-            print_debug("%s has wrong shared archive file version %d, expecting %d\n",
-                        classes_jsa, header._version, CURRENT_ARCHIVE_VERSION);
-            close(fd);
-            return false;
-         }
-
-         ph->core->classes_jsa_fd = fd;
-         // add read-only maps from classes.jsa to the list of maps
-         for (m = 0; m < NUM_SHARED_MAPS; m++) {
-            if (header._space[m]._read_only) {
-               base = (uintptr_t) header._space[m]._base;
-               // no need to worry about the fractional pages at-the-end.
-               // possible fractional pages are handled by core_read_data.
-               add_class_share_map_info(ph, (off_t) header._space[m]._file_offset,
-                         base, (size_t) header._space[m]._used);
-               print_debug("added a share archive map at 0x%lx\n", base);
-            }
-         }
-         return true;
+      memset(classes_jsa, 0, sizeof(classes_jsa));
+      jvm_name = lib->name;
+      useSharedSpacesAddr = lookup_symbol(ph, jvm_name, USE_SHARED_SPACES_SYM);
+      if (useSharedSpacesAddr == 0) {
+        print_debug("can't lookup 'UseSharedSpaces' flag\n");
+        return false;
       }
-      lib = lib->next;
+
+      // Hotspot vm types are not exported to build this library. So
+      // using equivalent type jboolean to read the value of
+      // UseSharedSpaces which is same as hotspot type "bool".
+      if (read_jboolean(ph, useSharedSpacesAddr, &useSharedSpaces) != true) {
+        print_debug("can't read the value of 'UseSharedSpaces' flag\n");
+        return false;
+      }
+
+      if ((int)useSharedSpaces == 0) {
+        print_debug("UseSharedSpaces is false, assuming -Xshare:off!\n");
+        return true;
+      }
+
+      sharedArchivePathAddrAddr = lookup_symbol(ph, jvm_name, SHARED_ARCHIVE_PATH_SYM);
+      if (sharedArchivePathAddrAddr == 0) {
+        print_debug("can't lookup shared archive path symbol\n");
+        return false;
+      }
+
+      if (read_pointer(ph, sharedArchivePathAddrAddr, &sharedArchivePathAddr) != true) {
+        print_debug("can't read shared archive path pointer\n");
+        return false;
+      }
+
+      if (read_string(ph, sharedArchivePathAddr, classes_jsa, sizeof(classes_jsa)) != true) {
+        print_debug("can't read shared archive path value\n");
+        return false;
+      }
+
+      print_debug("looking for %s\n", classes_jsa);
+      // open the class sharing archive file
+      fd = pathmap_open(classes_jsa);
+      if (fd < 0) {
+        print_debug("can't open %s!\n", classes_jsa);
+        ph->core->classes_jsa_fd = -1;
+        return false;
+      } else {
+        print_debug("opened %s\n", classes_jsa);
+      }
+
+      // read FileMapHeader from the file
+      memset(&header, 0, sizeof(struct FileMapHeader));
+      if ((n = read(fd, &header, sizeof(struct FileMapHeader)))
+           != sizeof(struct FileMapHeader)) {
+        print_debug("can't read shared archive file map header from %s\n", classes_jsa);
+        close(fd);
+        return false;
+      }
+
+      // check file magic
+      if (header._magic != 0xf00baba2) {
+        print_debug("%s has bad shared archive file magic number 0x%x, expecing 0xf00baba2\n",
+                     classes_jsa, header._magic);
+        close(fd);
+        return false;
+      }
+
+      // check version
+      if (header._version != CURRENT_ARCHIVE_VERSION) {
+        print_debug("%s has wrong shared archive file version %d, expecting %d\n",
+                     classes_jsa, header._version, CURRENT_ARCHIVE_VERSION);
+        close(fd);
+        return false;
+      }
+
+      ph->core->classes_jsa_fd = fd;
+      // add read-only maps from classes.jsa to the list of maps
+      for (m = 0; m < NUM_SHARED_MAPS; m++) {
+        if (header._space[m]._read_only) {
+          base = (uintptr_t) header._space[m]._base;
+          // no need to worry about the fractional pages at-the-end.
+          // possible fractional pages are handled by core_read_data.
+          add_class_share_map_info(ph, (off_t) header._space[m]._file_offset,
+                                   base, (size_t) header._space[m]._used);
+          print_debug("added a share archive map at 0x%lx\n", base);
+        }
+      }
+      return true;
    }
-   return true;
+   lib = lib->next;
+  }
+  return true;
 }
 
 
@@ -396,54 +404,58 @@
 // callback for sorting the array of map_info pointers.
 static int core_cmp_mapping(const void *lhsp, const void *rhsp)
 {
-   const map_info *lhs = *((const map_info **)lhsp);
-   const map_info *rhs = *((const map_info **)rhsp);
+  const map_info *lhs = *((const map_info **)lhsp);
+  const map_info *rhs = *((const map_info **)rhsp);
 
-   if (lhs->vaddr == rhs->vaddr)
-      return (0);
+  if (lhs->vaddr == rhs->vaddr) {
+    return (0);
+  }
 
-   return (lhs->vaddr < rhs->vaddr ? -1 : 1);
+  return (lhs->vaddr < rhs->vaddr ? -1 : 1);
 }
 
 // we sort map_info by starting virtual address so that we can do
 // binary search to read from an address.
 static bool sort_map_array(struct ps_prochandle* ph) {
-   size_t num_maps = ph->core->num_maps;
-   map_info* map = ph->core->maps;
-   int i = 0;
+  size_t num_maps = ph->core->num_maps;
+  map_info* map = ph->core->maps;
+  int i = 0;
 
-   // allocate map_array
-   map_info** array;
-   if ( (array = (map_info**) malloc(sizeof(map_info*) * num_maps)) == NULL) {
-      print_debug("can't allocate memory for map array\n");
-      return false;
-   }
+  // allocate map_array
+  map_info** array;
+  if ( (array = (map_info**) malloc(sizeof(map_info*) * num_maps)) == NULL) {
+    print_debug("can't allocate memory for map array\n");
+    return false;
+  }
 
-   // add maps to array
-   while (map) {
-      array[i] = map;
-      i++;
-      map = map->next;
-   }
+  // add maps to array
+  while (map) {
+    array[i] = map;
+    i++;
+    map = map->next;
+  }
 
-   // sort is called twice. If this is second time, clear map array
-   if (ph->core->map_array) free(ph->core->map_array);
-   ph->core->map_array = array;
-   // sort the map_info array by base virtual address.
-   qsort(ph->core->map_array, ph->core->num_maps, sizeof (map_info*),
-            core_cmp_mapping);
+  // sort is called twice. If this is second time, clear map array
+  if (ph->core->map_array) {
+    free(ph->core->map_array);
+  }
 
-   // print map
-   if (is_debug()) {
-      int j = 0;
-      print_debug("---- sorted virtual address map ----\n");
-      for (j = 0; j < ph->core->num_maps; j++) {
-        print_debug("base = 0x%lx\tsize = %zu\n", ph->core->map_array[j]->vaddr,
-                                         ph->core->map_array[j]->memsz);
-      }
-   }
+  ph->core->map_array = array;
+  // sort the map_info array by base virtual address.
+  qsort(ph->core->map_array, ph->core->num_maps, sizeof (map_info*),
+        core_cmp_mapping);
 
-   return true;
+  // print map
+  if (is_debug()) {
+    int j = 0;
+    print_debug("---- sorted virtual address map ----\n");
+    for (j = 0; j < ph->core->num_maps; j++) {
+      print_debug("base = 0x%lx\tsize = %zu\n", ph->core->map_array[j]->vaddr,
+                  ph->core->map_array[j]->memsz);
+    }
+  }
+
+  return true;
 }
 
 #ifndef MIN
@@ -460,16 +472,18 @@
       off_t off;
       int fd;
 
-      if (mp == NULL)
+      if (mp == NULL) {
          break;  /* No mapping for this address */
+      }
 
       fd = mp->fd;
       mapoff = addr - mp->vaddr;
       len = MIN(resid, mp->memsz - mapoff);
       off = mp->offset + mapoff;
 
-      if ((len = pread(fd, buf, len, off)) <= 0)
+      if ((len = pread(fd, buf, len, off)) <= 0) {
          break;
+      }
 
       resid -= len;
       addr += len;
@@ -625,8 +639,9 @@
                                    notep->n_type, notep->n_descsz);
 
       if (notep->n_type == NT_PRSTATUS) {
-         if (core_handle_prstatus(ph, descdata, notep->n_descsz) != true)
-            return false;
+        if (core_handle_prstatus(ph, descdata, notep->n_descsz) != true) {
+          return false;
+        }
       }
       p = descdata + ROUNDUP(notep->n_descsz, 4);
    }
@@ -654,7 +669,7 @@
     * contains a set of saved /proc structures), and PT_LOAD (which
     * represents a memory mapping from the process's address space).
     *
-    * Difference b/w Solaris PT_NOTE and Linux PT_NOTE:
+    * Difference b/w Solaris PT_NOTE and Linux/BSD PT_NOTE:
     *
     *     In Solaris there are two PT_NOTE segments the first PT_NOTE (if present)
     *     contains /proc structs in the pre-2.6 unstructured /proc format. the last
@@ -674,7 +689,9 @@
     for (core_php = phbuf, i = 0; i < core_ehdr->e_phnum; i++) {
       switch (core_php->p_type) {
          case PT_NOTE:
-            if (core_handle_note(ph, core_php) != true) goto err;
+            if (core_handle_note(ph, core_php) != true) {
+              goto err;
+            }
             break;
 
          case PT_LOAD: {
@@ -832,60 +849,62 @@
 // read shared library info from runtime linker's data structures.
 // This work is done by librtlb_db in Solaris
 static bool read_shared_lib_info(struct ps_prochandle* ph) {
-   uintptr_t addr = ph->core->dynamic_addr;
-   uintptr_t debug_base;
-   uintptr_t first_link_map_addr;
-   uintptr_t ld_base_addr;
-   uintptr_t link_map_addr;
-   uintptr_t lib_base_diff;
-   uintptr_t lib_base;
-   uintptr_t lib_name_addr;
-   char lib_name[BUF_SIZE];
-   ELF_DYN dyn;
-   ELF_EHDR elf_ehdr;
-   int lib_fd;
+  uintptr_t addr = ph->core->dynamic_addr;
+  uintptr_t debug_base;
+  uintptr_t first_link_map_addr;
+  uintptr_t ld_base_addr;
+  uintptr_t link_map_addr;
+  uintptr_t lib_base_diff;
+  uintptr_t lib_base;
+  uintptr_t lib_name_addr;
+  char lib_name[BUF_SIZE];
+  ELF_DYN dyn;
+  ELF_EHDR elf_ehdr;
+  int lib_fd;
 
-   // _DYNAMIC has information of the form
-   //         [tag] [data] [tag] [data] .....
-   // Both tag and data are pointer sized.
-   // We look for dynamic info with DT_DEBUG. This has shared object info.
-   // refer to struct r_debug in link.h
+  // _DYNAMIC has information of the form
+  //         [tag] [data] [tag] [data] .....
+  // Both tag and data are pointer sized.
+  // We look for dynamic info with DT_DEBUG. This has shared object info.
+  // refer to struct r_debug in link.h
 
-   dyn.d_tag = DT_NULL;
-   while (dyn.d_tag != DT_DEBUG) {
-      if (ps_pdread(ph, (psaddr_t) addr, &dyn, sizeof(ELF_DYN)) != PS_OK) {
-         print_debug("can't read debug info from _DYNAMIC\n");
-         return false;
-      }
-      addr += sizeof(ELF_DYN);
-   }
+  dyn.d_tag = DT_NULL;
+  while (dyn.d_tag != DT_DEBUG) {
+    if (ps_pdread(ph, (psaddr_t) addr, &dyn, sizeof(ELF_DYN)) != PS_OK) {
+      print_debug("can't read debug info from _DYNAMIC\n");
+      return false;
+    }
+    addr += sizeof(ELF_DYN);
+  }
 
-   // we have got Dyn entry with DT_DEBUG
-   debug_base = dyn.d_un.d_ptr;
-   // at debug_base we have struct r_debug. This has first link map in r_map field
-   if (ps_pdread(ph, (psaddr_t) debug_base + FIRST_LINK_MAP_OFFSET,
+  // we have got Dyn entry with DT_DEBUG
+  debug_base = dyn.d_un.d_ptr;
+  // at debug_base we have struct r_debug. This has first link map in r_map field
+  if (ps_pdread(ph, (psaddr_t) debug_base + FIRST_LINK_MAP_OFFSET,
                  &first_link_map_addr, sizeof(uintptr_t)) != PS_OK) {
-      print_debug("can't read first link map address\n");
-      return false;
-   }
+    print_debug("can't read first link map address\n");
+    return false;
+  }
 
-   // read ld_base address from struct r_debug
-   if (ps_pdread(ph, (psaddr_t) debug_base + LD_BASE_OFFSET, &ld_base_addr,
+  // read ld_base address from struct r_debug
+  if (ps_pdread(ph, (psaddr_t) debug_base + LD_BASE_OFFSET, &ld_base_addr,
                  sizeof(uintptr_t)) != PS_OK) {
-      print_debug("can't read ld base address\n");
-      return false;
-   }
-   ph->core->ld_base_addr = ld_base_addr;
+    print_debug("can't read ld base address\n");
+    return false;
+  }
+  ph->core->ld_base_addr = ld_base_addr;
 
-   print_debug("interpreter base address is 0x%lx\n", ld_base_addr);
+  print_debug("interpreter base address is 0x%lx\n", ld_base_addr);
 
-   // now read segments from interp (i.e ld.so or ld-linux.so)
-   if (read_interp_segments(ph) != true)
+  // now read segments from interp (i.e ld.so or ld-linux.so or ld-elf.so)
+  if (read_interp_segments(ph) != true) {
       return false;
+  }
 
-   // after adding interpreter (ld.so) mappings sort again
-   if (sort_map_array(ph) != true)
-      return false;
+  // after adding interpreter (ld.so) mappings sort again
+  if (sort_map_array(ph) != true) {
+    return false;
+  }
 
    print_debug("first link map is at 0x%lx\n", first_link_map_addr);
 
@@ -950,95 +969,102 @@
          }
       }
 
-      // read next link_map address
-      if (ps_pdread(ph, (psaddr_t) link_map_addr + LINK_MAP_NEXT_OFFSET,
-                        &link_map_addr, sizeof(uintptr_t)) != PS_OK) {
-         print_debug("can't read next link in link_map\n");
-         return false;
-      }
-   }
+    // read next link_map address
+    if (ps_pdread(ph, (psaddr_t) link_map_addr + LINK_MAP_NEXT_OFFSET,
+                   &link_map_addr, sizeof(uintptr_t)) != PS_OK) {
+      print_debug("can't read next link in link_map\n");
+      return false;
+    }
+  }
 
-   return true;
+  return true;
 }
 
 // the one and only one exposed stuff from this file
 struct ps_prochandle* Pgrab_core(const char* exec_file, const char* core_file) {
-   ELF_EHDR core_ehdr;
-   ELF_EHDR exec_ehdr;
-   ELF_EHDR lib_ehdr;
+  ELF_EHDR core_ehdr;
+  ELF_EHDR exec_ehdr;
+  ELF_EHDR lib_ehdr;
 
-   struct ps_prochandle* ph = (struct ps_prochandle*) calloc(1, sizeof(struct ps_prochandle));
-   if (ph == NULL) {
-      print_debug("can't allocate ps_prochandle\n");
-      return NULL;
-   }
+  struct ps_prochandle* ph = (struct ps_prochandle*) calloc(1, sizeof(struct ps_prochandle));
+  if (ph == NULL) {
+    print_debug("can't allocate ps_prochandle\n");
+    return NULL;
+  }
 
-   if ((ph->core = (struct core_data*) calloc(1, sizeof(struct core_data))) == NULL) {
-      free(ph);
-      print_debug("can't allocate ps_prochandle\n");
-      return NULL;
-   }
+  if ((ph->core = (struct core_data*) calloc(1, sizeof(struct core_data))) == NULL) {
+    free(ph);
+    print_debug("can't allocate ps_prochandle\n");
+    return NULL;
+  }
 
-   // initialize ph
-   ph->ops = &core_ops;
-   ph->core->core_fd   = -1;
-   ph->core->exec_fd   = -1;
-   ph->core->interp_fd = -1;
+  // initialize ph
+  ph->ops = &core_ops;
+  ph->core->core_fd   = -1;
+  ph->core->exec_fd   = -1;
+  ph->core->interp_fd = -1;
 
-   // open the core file
-   if ((ph->core->core_fd = open(core_file, O_RDONLY)) < 0) {
-      print_debug("can't open core file\n");
-      goto err;
-   }
+  // open the core file
+  if ((ph->core->core_fd = open(core_file, O_RDONLY)) < 0) {
+    print_debug("can't open core file\n");
+    goto err;
+  }
 
-   // read core file ELF header
-   if (read_elf_header(ph->core->core_fd, &core_ehdr) != true || core_ehdr.e_type != ET_CORE) {
-      print_debug("core file is not a valid ELF ET_CORE file\n");
-      goto err;
-   }
+  // read core file ELF header
+  if (read_elf_header(ph->core->core_fd, &core_ehdr) != true || core_ehdr.e_type != ET_CORE) {
+    print_debug("core file is not a valid ELF ET_CORE file\n");
+    goto err;
+  }
 
-   if ((ph->core->exec_fd = open(exec_file, O_RDONLY)) < 0) {
-      print_debug("can't open executable file\n");
-      goto err;
-   }
+  if ((ph->core->exec_fd = open(exec_file, O_RDONLY)) < 0) {
+    print_debug("can't open executable file\n");
+    goto err;
+  }
 
-   if (read_elf_header(ph->core->exec_fd, &exec_ehdr) != true || exec_ehdr.e_type != ET_EXEC) {
-      print_debug("executable file is not a valid ELF ET_EXEC file\n");
-      goto err;
-   }
+  if (read_elf_header(ph->core->exec_fd, &exec_ehdr) != true || exec_ehdr.e_type != ET_EXEC) {
+    print_debug("executable file is not a valid ELF ET_EXEC file\n");
+    goto err;
+  }
 
-   // process core file segments
-   if (read_core_segments(ph, &core_ehdr) != true)
-      goto err;
+  // process core file segments
+  if (read_core_segments(ph, &core_ehdr) != true) {
+    goto err;
+  }
 
-   // process exec file segments
-   if (read_exec_segments(ph, &exec_ehdr) != true)
-      goto err;
+  // process exec file segments
+  if (read_exec_segments(ph, &exec_ehdr) != true) {
+    goto err;
+  }
 
-   // exec file is also treated like a shared object for symbol search
-   if (add_lib_info_fd(ph, exec_file, ph->core->exec_fd,
-                       (uintptr_t)0 + find_base_address(ph->core->exec_fd, &exec_ehdr)) == NULL)
-      goto err;
+  // exec file is also treated like a shared object for symbol search
+  if (add_lib_info_fd(ph, exec_file, ph->core->exec_fd,
+                      (uintptr_t)0 + find_base_address(ph->core->exec_fd, &exec_ehdr)) == NULL) {
+    goto err;
+  }
 
-   // allocate and sort maps into map_array, we need to do this
-   // here because read_shared_lib_info needs to read from debuggee
-   // address space
-   if (sort_map_array(ph) != true)
-      goto err;
+  // allocate and sort maps into map_array, we need to do this
+  // here because read_shared_lib_info needs to read from debuggee
+  // address space
+  if (sort_map_array(ph) != true) {
+    goto err;
+  }
 
-   if (read_shared_lib_info(ph) != true)
-      goto err;
+  if (read_shared_lib_info(ph) != true) {
+    goto err;
+  }
 
-   // sort again because we have added more mappings from shared objects
-   if (sort_map_array(ph) != true)
-      goto err;
+  // sort again because we have added more mappings from shared objects
+  if (sort_map_array(ph) != true) {
+    goto err;
+  }
 
-   if (init_classsharing_workaround(ph) != true)
-      goto err;
+  if (init_classsharing_workaround(ph) != true) {
+    goto err;
+  }
 
-   return ph;
+  return ph;
 
 err:
-   Prelease(ph);
-   return NULL;
+  Prelease(ph);
+  return NULL;
 }
diff --git a/hotspot/agent/src/share/classes/sun/jvm/hotspot/asm/Disassembler.java b/hotspot/agent/src/share/classes/sun/jvm/hotspot/asm/Disassembler.java
index f6a279d..9d351cb 100644
--- a/hotspot/agent/src/share/classes/sun/jvm/hotspot/asm/Disassembler.java
+++ b/hotspot/agent/src/share/classes/sun/jvm/hotspot/asm/Disassembler.java
@@ -67,6 +67,13 @@
          String libname = "hsdis";
          String arch = System.getProperty("os.arch");
          if (os.lastIndexOf("Windows", 0) != -1) {
+            if (arch.equals("x86")) {
+               libname +=  "-i386";
+            } else if (arch.equals("amd64")) {
+               libname +=  "-amd64";
+            } else {
+               libname +=  "-" + arch;
+            }
             path.append(sep + "bin" + sep);
             libname += ".dll";
          } else if (os.lastIndexOf("SunOS", 0) != -1) {
diff --git a/hotspot/agent/src/share/classes/sun/jvm/hotspot/memory/ProtectionDomainCacheEntry.java b/hotspot/agent/src/share/classes/sun/jvm/hotspot/memory/ProtectionDomainCacheEntry.java
new file mode 100644
index 0000000..2c9e736
--- /dev/null
+++ b/hotspot/agent/src/share/classes/sun/jvm/hotspot/memory/ProtectionDomainCacheEntry.java
@@ -0,0 +1,56 @@
+/*
+ * 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
+ * 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 sun.jvm.hotspot.memory;
+
+import java.util.*;
+import sun.jvm.hotspot.debugger.*;
+import sun.jvm.hotspot.oops.*;
+import sun.jvm.hotspot.runtime.*;
+import sun.jvm.hotspot.types.*;
+
+public class ProtectionDomainCacheEntry extends VMObject {
+  private static sun.jvm.hotspot.types.OopField protectionDomainField;
+
+  static {
+    VM.registerVMInitializedObserver(new Observer() {
+        public void update(Observable o, Object data) {
+          initialize(VM.getVM().getTypeDataBase());
+        }
+      });
+  }
+
+  private static synchronized void initialize(TypeDataBase db) {
+    Type type = db.lookupType("ProtectionDomainCacheEntry");
+    protectionDomainField = type.getOopField("_literal");
+  }
+
+  public ProtectionDomainCacheEntry(Address addr) {
+    super(addr);
+  }
+
+  public Oop protectionDomain() {
+    return VM.getVM().getObjectHeap().newOop(protectionDomainField.getValue(addr));
+  }
+}
diff --git a/hotspot/agent/src/share/classes/sun/jvm/hotspot/memory/ProtectionDomainEntry.java b/hotspot/agent/src/share/classes/sun/jvm/hotspot/memory/ProtectionDomainEntry.java
index de2da04..27aa4e9 100644
--- a/hotspot/agent/src/share/classes/sun/jvm/hotspot/memory/ProtectionDomainEntry.java
+++ b/hotspot/agent/src/share/classes/sun/jvm/hotspot/memory/ProtectionDomainEntry.java
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2001, 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
@@ -32,7 +32,7 @@
 
 public class ProtectionDomainEntry extends VMObject {
   private static AddressField nextField;
-  private static sun.jvm.hotspot.types.OopField protectionDomainField;
+  private static AddressField pdCacheField;
 
   static {
     VM.registerVMInitializedObserver(new Observer() {
@@ -46,7 +46,7 @@
     Type type = db.lookupType("ProtectionDomainEntry");
 
     nextField = type.getAddressField("_next");
-    protectionDomainField = type.getOopField("_protection_domain");
+    pdCacheField = type.getAddressField("_pd_cache");
   }
 
   public ProtectionDomainEntry(Address addr) {
@@ -54,10 +54,12 @@
   }
 
   public ProtectionDomainEntry next() {
-    return (ProtectionDomainEntry) VMObjectFactory.newObject(ProtectionDomainEntry.class, addr);
+    return (ProtectionDomainEntry) VMObjectFactory.newObject(ProtectionDomainEntry.class, nextField.getValue(addr));
   }
 
   public Oop protectionDomain() {
-    return VM.getVM().getObjectHeap().newOop(protectionDomainField.getValue(addr));
+    ProtectionDomainCacheEntry pd_cache = (ProtectionDomainCacheEntry)
+      VMObjectFactory.newObject(ProtectionDomainCacheEntry.class, pdCacheField.getValue(addr));
+    return pd_cache.protectionDomain();
   }
 }
diff --git a/hotspot/agent/src/share/classes/sun/jvm/hotspot/memory/SymbolTable.java b/hotspot/agent/src/share/classes/sun/jvm/hotspot/memory/SymbolTable.java
index 1c0a676..3069cf6 100644
--- a/hotspot/agent/src/share/classes/sun/jvm/hotspot/memory/SymbolTable.java
+++ b/hotspot/agent/src/share/classes/sun/jvm/hotspot/memory/SymbolTable.java
@@ -44,12 +44,10 @@
   private static synchronized void initialize(TypeDataBase db) {
     Type type = db.lookupType("SymbolTable");
     theTableField  = type.getAddressField("_the_table");
-    symbolTableSize = db.lookupIntConstant("SymbolTable::symbol_table_size").intValue();
   }
 
   // Fields
   private static AddressField theTableField;
-  private static int symbolTableSize;
 
   // Accessors
   public static SymbolTable getTheTable() {
@@ -57,10 +55,6 @@
     return (SymbolTable) VMObjectFactory.newObject(SymbolTable.class, tmp);
   }
 
-  public static int getSymbolTableSize() {
-    return symbolTableSize;
-  }
-
   public SymbolTable(Address addr) {
     super(addr);
   }
diff --git a/hotspot/agent/src/share/classes/sun/jvm/hotspot/utilities/AbstractHeapGraphWriter.java b/hotspot/agent/src/share/classes/sun/jvm/hotspot/utilities/AbstractHeapGraphWriter.java
index a2d271c..382d247 100644
--- a/hotspot/agent/src/share/classes/sun/jvm/hotspot/utilities/AbstractHeapGraphWriter.java
+++ b/hotspot/agent/src/share/classes/sun/jvm/hotspot/utilities/AbstractHeapGraphWriter.java
@@ -59,6 +59,7 @@
 
                     public boolean doObj(Oop oop) {
                         try {
+                            writeHeapRecordPrologue();
                             if (oop instanceof TypeArray) {
                                 writePrimitiveArray((TypeArray)oop);
                             } else if (oop instanceof ObjArray) {
@@ -97,6 +98,7 @@
                                 // not-a-Java-visible oop
                                 writeInternalObject(oop);
                             }
+                            writeHeapRecordEpilogue();
                         } catch (IOException exp) {
                             throw new RuntimeException(exp);
                         }
@@ -416,6 +418,12 @@
     protected void writeHeapFooter() throws IOException {
     }
 
+    protected void writeHeapRecordPrologue() throws IOException {
+    }
+
+    protected void writeHeapRecordEpilogue() throws IOException {
+    }
+
     // HeapVisitor, OopVisitor methods can't throw any non-runtime
     // exception. But, derived class write methods (which are called
     // from visitor callbacks) may throw IOException. Hence, we throw
diff --git a/hotspot/agent/src/share/classes/sun/jvm/hotspot/utilities/HeapHprofBinWriter.java b/hotspot/agent/src/share/classes/sun/jvm/hotspot/utilities/HeapHprofBinWriter.java
index 6529972..6f66723 100644
--- a/hotspot/agent/src/share/classes/sun/jvm/hotspot/utilities/HeapHprofBinWriter.java
+++ b/hotspot/agent/src/share/classes/sun/jvm/hotspot/utilities/HeapHprofBinWriter.java
@@ -44,7 +44,7 @@
  * WARNING: This format is still under development, and is subject to
  * change without notice.
  *
- * header    "JAVA PROFILE 1.0.1" (0-terminated)
+ * header    "JAVA PROFILE 1.0.1" or "JAVA PROFILE 1.0.2" (0-terminated)
  * u4        size of identifiers. Identifiers are used to represent
  *            UTF8 strings, objects, stack traces, etc. They usually
  *            have the same size as host pointers. For example, on
@@ -292,11 +292,34 @@
  *                          0x00000002: cpu sampling on/off
  *                u2        stack trace depth
  *
+ *
+ * When the header is "JAVA PROFILE 1.0.2" a heap dump can optionally
+ * be generated as a sequence of heap dump segments. This sequence is
+ * terminated by an end record. The additional tags allowed by format
+ * "JAVA PROFILE 1.0.2" are:
+ *
+ * HPROF_HEAP_DUMP_SEGMENT  denote a heap dump segment
+ *
+ *               [heap dump sub-records]*
+ *               The same sub-record types allowed by HPROF_HEAP_DUMP
+ *
+ * HPROF_HEAP_DUMP_END      denotes the end of a heap dump
+ *
  */
 
 public class HeapHprofBinWriter extends AbstractHeapGraphWriter {
+
+    // The heap size threshold used to determine if segmented format
+    // ("JAVA PROFILE 1.0.2") should be used.
+    private static final long HPROF_SEGMENTED_HEAP_DUMP_THRESHOLD = 2L * 0x40000000;
+
+    // The approximate size of a heap segment. Used to calculate when to create
+    // a new segment.
+    private static final long HPROF_SEGMENTED_HEAP_DUMP_SEGMENT_SIZE = 1L * 0x40000000;
+
     // hprof binary file header
-    private static final String HPROF_HEADER = "JAVA PROFILE 1.0.1";
+    private static final String HPROF_HEADER_1_0_1 = "JAVA PROFILE 1.0.1";
+    private static final String HPROF_HEADER_1_0_2 = "JAVA PROFILE 1.0.2";
 
     // constants in enum HprofTag
     private static final int HPROF_UTF8             = 0x01;
@@ -312,6 +335,10 @@
     private static final int HPROF_CPU_SAMPLES      = 0x0D;
     private static final int HPROF_CONTROL_SETTINGS = 0x0E;
 
+    // 1.0.2 record types
+    private static final int HPROF_HEAP_DUMP_SEGMENT = 0x1C;
+    private static final int HPROF_HEAP_DUMP_END     = 0x2C;
+
     // Heap dump constants
     // constants in enum HprofGcTag
     private static final int HPROF_GC_ROOT_UNKNOWN       = 0xFF;
@@ -352,11 +379,9 @@
     private static final int JVM_SIGNATURE_ARRAY   = '[';
     private static final int JVM_SIGNATURE_CLASS   = 'L';
 
-
     public synchronized void write(String fileName) throws IOException {
         // open file stream and create buffered data output stream
-        FileOutputStream fos = new FileOutputStream(fileName);
-        FileChannel chn = fos.getChannel();
+        fos = new FileOutputStream(fileName);
         out = new DataOutputStream(new BufferedOutputStream(fos));
 
         VM vm = VM.getVM();
@@ -385,6 +410,9 @@
         FLOAT_SIZE = objectHeap.getFloatSize();
         DOUBLE_SIZE = objectHeap.getDoubleSize();
 
+        // Check weather we should dump the heap as segments
+        useSegmentedHeapDump = vm.getUniverse().heap().used() > HPROF_SEGMENTED_HEAP_DUMP_THRESHOLD;
+
         // hprof bin format header
         writeFileHeader();
 
@@ -394,38 +422,87 @@
 
         // hprof UTF-8 symbols section
         writeSymbols();
+
         // HPROF_LOAD_CLASS records for all classes
         writeClasses();
 
-        // write heap data now
-        out.writeByte((byte)HPROF_HEAP_DUMP);
-        out.writeInt(0); // relative timestamp
-
-        // remember position of dump length, we will fixup
-        // length later - hprof format requires length.
-        out.flush();
-        long dumpStart = chn.position();
-
-        // write dummy length of 0 and we'll fix it later.
-        out.writeInt(0);
-
         // write CLASS_DUMP records
         writeClassDumpRecords();
 
         // this will write heap data into the buffer stream
         super.write();
 
+        // flush buffer stream.
+        out.flush();
+
+        // Fill in final length
+        fillInHeapRecordLength();
+
+        if (useSegmentedHeapDump) {
+            // Write heap segment-end record
+            out.writeByte((byte) HPROF_HEAP_DUMP_END);
+            out.writeInt(0);
+            out.writeInt(0);
+        }
+
         // flush buffer stream and throw it.
         out.flush();
         out = null;
 
+        // close the file stream
+        fos.close();
+    }
+
+    @Override
+    protected void writeHeapRecordPrologue() throws IOException {
+        if (currentSegmentStart == 0) {
+            // write heap data header, depending on heap size use segmented heap
+            // format
+            out.writeByte((byte) (useSegmentedHeapDump ? HPROF_HEAP_DUMP_SEGMENT
+                    : HPROF_HEAP_DUMP));
+            out.writeInt(0);
+
+            // remember position of dump length, we will fixup
+            // length later - hprof format requires length.
+            out.flush();
+            currentSegmentStart = fos.getChannel().position();
+
+            // write dummy length of 0 and we'll fix it later.
+            out.writeInt(0);
+        }
+    }
+
+    @Override
+    protected void writeHeapRecordEpilogue() throws IOException {
+        if (useSegmentedHeapDump) {
+            out.flush();
+            if ((fos.getChannel().position() - currentSegmentStart - 4) >= HPROF_SEGMENTED_HEAP_DUMP_SEGMENT_SIZE) {
+                fillInHeapRecordLength();
+                currentSegmentStart = 0;
+            }
+        }
+    }
+
+    private void fillInHeapRecordLength() throws IOException {
+
         // now get current position to calculate length
-        long dumpEnd = chn.position();
+        long dumpEnd = fos.getChannel().position();
+
         // calculate length of heap data
-        int dumpLen = (int) (dumpEnd - dumpStart - 4);
+        long dumpLenLong = (dumpEnd - currentSegmentStart - 4L);
+
+        // Check length boundary, overflow could happen but is _very_ unlikely
+        if(dumpLenLong >= (4L * 0x40000000)){
+            throw new RuntimeException("Heap segment size overflow.");
+        }
+
+        // Save the current position
+        long currentPosition = fos.getChannel().position();
 
         // seek the position to write length
-        chn.position(dumpStart);
+        fos.getChannel().position(currentSegmentStart);
+
+        int dumpLen = (int) dumpLenLong;
 
         // write length as integer
         fos.write((dumpLen >>> 24) & 0xFF);
@@ -433,8 +510,8 @@
         fos.write((dumpLen >>> 8) & 0xFF);
         fos.write((dumpLen >>> 0) & 0xFF);
 
-        // close the file stream
-        fos.close();
+        //Reset to previous current position
+        fos.getChannel().position(currentPosition);
     }
 
     private void writeClassDumpRecords() throws IOException {
@@ -443,7 +520,9 @@
             sysDict.allClassesDo(new SystemDictionary.ClassVisitor() {
                             public void visit(Klass k) {
                                 try {
+                                    writeHeapRecordPrologue();
                                     writeClassDumpRecord(k);
+                                    writeHeapRecordEpilogue();
                                 } catch (IOException e) {
                                     throw new RuntimeException(e);
                                 }
@@ -884,7 +963,12 @@
     // writes hprof binary file header
     private void writeFileHeader() throws IOException {
         // version string
-        out.writeBytes(HPROF_HEADER);
+        if(useSegmentedHeapDump) {
+            out.writeBytes(HPROF_HEADER_1_0_2);
+        }
+        else {
+            out.writeBytes(HPROF_HEADER_1_0_1);
+        }
         out.writeByte((byte)'\0');
 
         // write identifier size. we use pointers as identifiers.
@@ -976,6 +1060,7 @@
     private static final int EMPTY_FRAME_DEPTH = -1;
 
     private DataOutputStream out;
+    private FileOutputStream fos;
     private Debugger dbg;
     private ObjectHeap objectHeap;
     private SymbolTable symTbl;
@@ -983,6 +1068,10 @@
     // oopSize of the debuggee
     private int OBJ_ID_SIZE;
 
+    // Added for hprof file format 1.0.2 support
+    private boolean useSegmentedHeapDump;
+    private long currentSegmentStart;
+
     private long BOOLEAN_BASE_OFFSET;
     private long BYTE_BASE_OFFSET;
     private long CHAR_BASE_OFFSET;
@@ -1005,6 +1094,7 @@
     private static class ClassData {
         int instSize;
         List fields;
+
         ClassData(int instSize, List fields) {
             this.instSize = instSize;
             this.fields = fields;
diff --git a/hotspot/make/hotspot_version b/hotspot/make/hotspot_version
index 0786193..b310fbc 100644
--- a/hotspot/make/hotspot_version
+++ b/hotspot/make/hotspot_version
@@ -35,7 +35,7 @@
 
 HS_MAJOR_VER=25
 HS_MINOR_VER=0
-HS_BUILD_NUMBER=53
+HS_BUILD_NUMBER=54
 
 JDK_MAJOR_VER=1
 JDK_MINOR_VER=8
diff --git a/hotspot/make/windows/makefiles/compile.make b/hotspot/make/windows/makefiles/compile.make
index 6f8dcce..80d84c6b 100644
--- a/hotspot/make/windows/makefiles/compile.make
+++ b/hotspot/make/windows/makefiles/compile.make
@@ -44,6 +44,7 @@
 #   /GS       Inserts security stack checks in some functions (VS2005 default)
 #   /Oi       Use intrinsics (in /O2)
 #   /Od       Disable all optimizations
+#   /MP       Use multiple cores for compilation
 #
 # NOTE: Normally following any of the above with a '-' will turn off that flag
 #
@@ -206,6 +207,7 @@
 DEBUG_OPT_OPTION     = /Od
 GX_OPTION = /EHsc
 LD_FLAGS = /manifest $(LD_FLAGS)
+MP_FLAG = /MP
 # Manifest Tool - used in VS2005 and later to adjust manifests stored
 # as resources inside build artifacts.
 !if "x$(MT)" == "x"
@@ -219,6 +221,7 @@
 DEBUG_OPT_OPTION     = /Od
 GX_OPTION = /EHsc
 LD_FLAGS = /manifest $(LD_FLAGS)
+MP_FLAG = /MP
 # Manifest Tool - used in VS2005 and later to adjust manifests stored
 # as resources inside build artifacts.
 !if "x$(MT)" == "x"
@@ -235,6 +238,7 @@
 DEBUG_OPT_OPTION     = /Od
 GX_OPTION = /EHsc
 LD_FLAGS = /manifest $(LD_FLAGS)
+MP_FLAG = /MP
 # Manifest Tool - used in VS2005 and later to adjust manifests stored
 # as resources inside build artifacts.
 !if "x$(MT)" == "x"
@@ -245,6 +249,8 @@
 !endif
 !endif
 
+CXX_FLAGS = $(CXX_FLAGS) $(MP_FLAG)
+
 # If NO_OPTIMIZATIONS is defined in the environment, turn everything off
 !ifdef NO_OPTIMIZATIONS
 PRODUCT_OPT_OPTION   = $(DEBUG_OPT_OPTION)
diff --git a/hotspot/make/windows/makefiles/fastdebug.make b/hotspot/make/windows/makefiles/fastdebug.make
index 7ca4131..e3138d0 100644
--- a/hotspot/make/windows/makefiles/fastdebug.make
+++ b/hotspot/make/windows/makefiles/fastdebug.make
@@ -38,7 +38,7 @@
 !include ../local.make
 !include compile.make
 
-CXX_FLAGS=$(CXX_FLAGS) $(FASTDEBUG_OPT_OPTION) /D "CHECK_UNHANDLED_OOPS"
+CXX_FLAGS=$(CXX_FLAGS) $(FASTDEBUG_OPT_OPTION)
 
 !include $(WorkSpace)/make/windows/makefiles/vm.make
 !include local.make
diff --git a/hotspot/make/windows/makefiles/sa.make b/hotspot/make/windows/makefiles/sa.make
index 9363f0e..c04e363 100644
--- a/hotspot/make/windows/makefiles/sa.make
+++ b/hotspot/make/windows/makefiles/sa.make
@@ -102,28 +102,33 @@
 !if "$(MT)" != ""
 SA_LD_FLAGS = -manifest $(SA_LD_FLAGS)
 !endif
-SASRCFILE = $(AGENT_DIR)/src/os/win32/windbg/sawindbg.cpp
+
+SASRCFILES = $(AGENT_DIR)/src/os/win32/windbg/sawindbg.cpp \
+		$(AGENT_DIR)/src/share/native/sadis.c
+		            
 SA_LFLAGS = $(SA_LD_FLAGS) -nologo -subsystem:console -machine:$(MACHINE)
 !if "$(ENABLE_FULL_DEBUG_SYMBOLS)" == "1"
 SA_LFLAGS = $(SA_LFLAGS) -map -debug
 !endif
 
+SA_CFLAGS = $(SA_CFLAGS) $(MP_FLAG)
+
 # Note that we do not keep sawindbj.obj around as it would then
 # get included in the dumpbin command in build_vm_def.sh
 
 # In VS2005 or VS2008 the link command creates a .manifest file that we want
 # to insert into the linked artifact so we do not need to track it separately.
 # Use ";#2" for .dll and ";#1" for .exe in the MT command below:
-$(SAWINDBG): $(SASRCFILE)
+$(SAWINDBG): $(SASRCFILES)
 	set INCLUDE=$(SA_INCLUDE)$(INCLUDE)
 	$(CXX) @<<
 	  -I"$(BootStrapDir)/include" -I"$(BootStrapDir)/include/win32" 
 	  -I"$(GENERATED)" $(SA_CFLAGS)
-	  $(SASRCFILE)
+	  $(SASRCFILES)
 	  -out:$*.obj
 <<
 	set LIB=$(SA_LIB)$(LIB)
-	$(LD) -out:$@ -DLL $*.obj dbgeng.lib $(SA_LFLAGS)
+	$(LD) -out:$@ -DLL sawindbg.obj sadis.obj dbgeng.lib $(SA_LFLAGS)
 !if "$(MT)" != ""
 	$(MT) -manifest $(@F).manifest -outputresource:$(@F);#2
 !endif
diff --git a/hotspot/src/cpu/sparc/vm/c1_Runtime1_sparc.cpp b/hotspot/src/cpu/sparc/vm/c1_Runtime1_sparc.cpp
index bc63310..5934f78 100644
--- a/hotspot/src/cpu/sparc/vm/c1_Runtime1_sparc.cpp
+++ b/hotspot/src/cpu/sparc/vm/c1_Runtime1_sparc.cpp
@@ -37,6 +37,9 @@
 #include "runtime/vframeArray.hpp"
 #include "utilities/macros.hpp"
 #include "vmreg_sparc.inline.hpp"
+#if INCLUDE_ALL_GCS
+#include "gc_implementation/g1/g1SATBCardTableModRefBS.hpp"
+#endif
 
 // Implementation of StubAssembler
 
@@ -912,7 +915,7 @@
         Register tmp2 = G3_scratch;
         jbyte* byte_map_base = ((CardTableModRefBS*)bs)->byte_map_base;
 
-        Label not_already_dirty, restart, refill;
+        Label not_already_dirty, restart, refill, young_card;
 
 #ifdef _LP64
         __ srlx(addr, CardTableModRefBS::card_shift, addr);
@@ -924,9 +927,15 @@
         __ set(rs, cardtable);         // cardtable := <card table base>
         __ ldub(addr, cardtable, tmp); // tmp := [addr + cardtable]
 
+        __ cmp_and_br_short(tmp, G1SATBCardTableModRefBS::g1_young_card_val(), Assembler::equal, Assembler::pt, young_card);
+
+        __ membar(Assembler::Membar_mask_bits(Assembler::StoreLoad));
+        __ ldub(addr, cardtable, tmp); // tmp := [addr + cardtable]
+
         assert(CardTableModRefBS::dirty_card_val() == 0, "otherwise check this code");
         __ cmp_and_br_short(tmp, G0, Assembler::notEqual, Assembler::pt, not_already_dirty);
 
+        __ bind(young_card);
         // We didn't take the branch, so we're already dirty: return.
         // Use return-from-leaf
         __ retl();
diff --git a/hotspot/src/cpu/sparc/vm/macroAssembler_sparc.cpp b/hotspot/src/cpu/sparc/vm/macroAssembler_sparc.cpp
index 9f1f2e5..f4f45c0 100644
--- a/hotspot/src/cpu/sparc/vm/macroAssembler_sparc.cpp
+++ b/hotspot/src/cpu/sparc/vm/macroAssembler_sparc.cpp
@@ -3752,7 +3752,7 @@
 #define __ masm.
   address start = __ pc();
 
-  Label not_already_dirty, restart, refill;
+  Label not_already_dirty, restart, refill, young_card;
 
 #ifdef _LP64
   __ srlx(O0, CardTableModRefBS::card_shift, O0);
@@ -3763,9 +3763,15 @@
   __ set(addrlit, O1); // O1 := <card table base>
   __ ldub(O0, O1, O2); // O2 := [O0 + O1]
 
+  __ cmp_and_br_short(O2, G1SATBCardTableModRefBS::g1_young_card_val(), Assembler::equal, Assembler::pt, young_card);
+
+  __ membar(Assembler::Membar_mask_bits(Assembler::StoreLoad));
+  __ ldub(O0, O1, O2); // O2 := [O0 + O1]
+
   assert(CardTableModRefBS::dirty_card_val() == 0, "otherwise check this code");
   __ cmp_and_br_short(O2, G0, Assembler::notEqual, Assembler::pt, not_already_dirty);
 
+  __ bind(young_card);
   // We didn't take the branch, so we're already dirty: return.
   // Use return-from-leaf
   __ retl();
diff --git a/hotspot/src/cpu/x86/vm/c1_Runtime1_x86.cpp b/hotspot/src/cpu/x86/vm/c1_Runtime1_x86.cpp
index e4066e6..f2210f0 100644
--- a/hotspot/src/cpu/x86/vm/c1_Runtime1_x86.cpp
+++ b/hotspot/src/cpu/x86/vm/c1_Runtime1_x86.cpp
@@ -38,6 +38,9 @@
 #include "runtime/vframeArray.hpp"
 #include "utilities/macros.hpp"
 #include "vmreg_x86.inline.hpp"
+#if INCLUDE_ALL_GCS
+#include "gc_implementation/g1/g1SATBCardTableModRefBS.hpp"
+#endif
 
 
 // Implementation of StubAssembler
@@ -1753,13 +1756,17 @@
         __ leal(card_addr, __ as_Address(ArrayAddress(cardtable, index)));
 #endif
 
-        __ cmpb(Address(card_addr, 0), 0);
+        __ cmpb(Address(card_addr, 0), (int)G1SATBCardTableModRefBS::g1_young_card_val());
+        __ jcc(Assembler::equal, done);
+
+        __ membar(Assembler::Membar_mask_bits(Assembler::StoreLoad));
+        __ cmpb(Address(card_addr, 0), (int)CardTableModRefBS::dirty_card_val());
         __ jcc(Assembler::equal, done);
 
         // storing region crossing non-NULL, card is clean.
         // dirty card and log.
 
-        __ movb(Address(card_addr, 0), 0);
+        __ movb(Address(card_addr, 0), (int)CardTableModRefBS::dirty_card_val());
 
         __ cmpl(queue_index, 0);
         __ jcc(Assembler::equal, runtime);
diff --git a/hotspot/src/cpu/x86/vm/macroAssembler_x86.cpp b/hotspot/src/cpu/x86/vm/macroAssembler_x86.cpp
index fed50ef..c39c500 100644
--- a/hotspot/src/cpu/x86/vm/macroAssembler_x86.cpp
+++ b/hotspot/src/cpu/x86/vm/macroAssembler_x86.cpp
@@ -3389,13 +3389,18 @@
   const Register card_addr = tmp;
   lea(card_addr, as_Address(ArrayAddress(cardtable, index)));
 #endif
-  cmpb(Address(card_addr, 0), 0);
+  cmpb(Address(card_addr, 0), (int)G1SATBCardTableModRefBS::g1_young_card_val());
   jcc(Assembler::equal, done);
 
+  membar(Assembler::Membar_mask_bits(Assembler::StoreLoad));
+  cmpb(Address(card_addr, 0), (int)CardTableModRefBS::dirty_card_val());
+  jcc(Assembler::equal, done);
+
+
   // storing a region crossing, non-NULL oop, card is clean.
   // dirty card and log.
 
-  movb(Address(card_addr, 0), 0);
+  movb(Address(card_addr, 0), (int)CardTableModRefBS::dirty_card_val());
 
   cmpl(queue_index, 0);
   jcc(Assembler::equal, runtime);
diff --git a/hotspot/src/os/bsd/vm/osThread_bsd.hpp b/hotspot/src/os/bsd/vm/osThread_bsd.hpp
index fe903eb..f455382 100644
--- a/hotspot/src/os/bsd/vm/osThread_bsd.hpp
+++ b/hotspot/src/os/bsd/vm/osThread_bsd.hpp
@@ -42,7 +42,7 @@
 #ifdef __APPLE__
   typedef thread_t thread_id_t;
 #else
-  typedef pthread_t thread_id_t;
+  typedef pid_t thread_id_t;
 #endif
 
   // _pthread_id is the pthread id, which is used by library calls
diff --git a/hotspot/src/os/bsd/vm/os_bsd.cpp b/hotspot/src/os/bsd/vm/os_bsd.cpp
index 58c961b..fe0ef89 100644
--- a/hotspot/src/os/bsd/vm/os_bsd.cpp
+++ b/hotspot/src/os/bsd/vm/os_bsd.cpp
@@ -100,6 +100,7 @@
 # include <stdint.h>
 # include <inttypes.h>
 # include <sys/ioctl.h>
+# include <sys/syscall.h>
 
 #if defined(__FreeBSD__) || defined(__NetBSD__)
 # include <elf.h>
@@ -152,6 +153,7 @@
 // utility functions
 
 static int SR_initialize();
+static void unpackTime(timespec* absTime, bool isAbsolute, jlong time);
 
 julong os::available_memory() {
   return Bsd::available_memory();
@@ -247,7 +249,17 @@
    * since it returns a 64 bit value)
    */
   mib[0] = CTL_HW;
+
+#if defined (HW_MEMSIZE) // Apple
   mib[1] = HW_MEMSIZE;
+#elif defined(HW_PHYSMEM) // Most of BSD
+  mib[1] = HW_PHYSMEM;
+#elif defined(HW_REALMEM) // Old FreeBSD
+  mib[1] = HW_REALMEM;
+#else
+  #error No ways to get physmem
+#endif
+
   len = sizeof(mem_val);
   if (sysctl(mib, 2, &mem_val, &len, NULL, 0) != -1) {
        assert(len == sizeof(mem_val), "unexpected data size");
@@ -679,18 +691,12 @@
     return NULL;
   }
 
-#ifdef __APPLE__
-  // thread_id is mach thread on macos, which pthreads graciously caches and provides for us
-  mach_port_t thread_id = ::pthread_mach_thread_np(::pthread_self());
-  guarantee(thread_id != 0, "thread id missing from pthreads");
-  osthread->set_thread_id(thread_id);
+  osthread->set_thread_id(os::Bsd::gettid());
 
-  uint64_t unique_thread_id = locate_unique_thread_id(thread_id);
+#ifdef __APPLE__
+  uint64_t unique_thread_id = locate_unique_thread_id(osthread->thread_id());
   guarantee(unique_thread_id != 0, "unique thread id was not found");
   osthread->set_unique_thread_id(unique_thread_id);
-#else
-  // thread_id is pthread_id on BSD
-  osthread->set_thread_id(::pthread_self());
 #endif
   // initialize signal mask for this thread
   os::Bsd::hotspot_sigmask(thread);
@@ -847,18 +853,13 @@
     return false;
   }
 
+  osthread->set_thread_id(os::Bsd::gettid());
+
   // Store pthread info into the OSThread
 #ifdef __APPLE__
-  // thread_id is mach thread on macos, which pthreads graciously caches and provides for us
-  mach_port_t thread_id = ::pthread_mach_thread_np(::pthread_self());
-  guarantee(thread_id != 0, "just checking");
-  osthread->set_thread_id(thread_id);
-
-  uint64_t unique_thread_id = locate_unique_thread_id(thread_id);
+  uint64_t unique_thread_id = locate_unique_thread_id(osthread->thread_id());
   guarantee(unique_thread_id != 0, "just checking");
   osthread->set_unique_thread_id(unique_thread_id);
-#else
-  osthread->set_thread_id(::pthread_self());
 #endif
   osthread->set_pthread_id(::pthread_self());
 
@@ -1125,6 +1126,30 @@
   return n;
 }
 
+// Information of current thread in variety of formats
+pid_t os::Bsd::gettid() {
+  int retval = -1;
+
+#ifdef __APPLE__ //XNU kernel
+  // despite the fact mach port is actually not a thread id use it
+  // instead of syscall(SYS_thread_selfid) as it certainly fits to u4
+  retval = ::pthread_mach_thread_np(::pthread_self());
+  guarantee(retval != 0, "just checking");
+  return retval;
+
+#elif __FreeBSD__
+  retval = syscall(SYS_thr_self);
+#elif __OpenBSD__
+  retval = syscall(SYS_getthrid);
+#elif __NetBSD__
+  retval = (pid_t) syscall(SYS__lwp_self);
+#endif
+
+  if (retval == -1) {
+    return getpid();
+  }
+}
+
 intx os::current_thread_id() {
 #ifdef __APPLE__
   return (intx)::pthread_mach_thread_np(::pthread_self());
@@ -1132,6 +1157,7 @@
   return (intx)::pthread_self();
 #endif
 }
+
 int os::current_process_id() {
 
   // Under the old bsd thread library, bsd gives each thread
@@ -1904,7 +1930,7 @@
     bool timedwait(unsigned int sec, int nsec);
   private:
     jlong currenttime() const;
-    semaphore_t _semaphore;
+    os_semaphore_t _semaphore;
 };
 
 Semaphore::Semaphore() : _semaphore(0) {
@@ -1972,7 +1998,7 @@
 
 bool Semaphore::timedwait(unsigned int sec, int nsec) {
   struct timespec ts;
-  jlong endtime = unpackTime(&ts, false, (sec * NANOSECS_PER_SEC) + nsec);
+  unpackTime(&ts, false, (sec * NANOSECS_PER_SEC) + nsec);
 
   while (1) {
     int result = sem_timedwait(&_semaphore, &ts);
diff --git a/hotspot/src/os/bsd/vm/os_bsd.hpp b/hotspot/src/os/bsd/vm/os_bsd.hpp
index f18bb88..a906a30 100644
--- a/hotspot/src/os/bsd/vm/os_bsd.hpp
+++ b/hotspot/src/os/bsd/vm/os_bsd.hpp
@@ -84,6 +84,7 @@
   static void hotspot_sigmask(Thread* thread);
 
   static bool is_initial_thread(void);
+  static pid_t gettid();
 
   static int page_size(void)                                        { return _page_size; }
   static void set_page_size(int val)                                { _page_size = val; }
diff --git a/hotspot/src/os/linux/vm/globals_linux.hpp b/hotspot/src/os/linux/vm/globals_linux.hpp
index 4dfccc3..83424f2 100644
--- a/hotspot/src/os/linux/vm/globals_linux.hpp
+++ b/hotspot/src/os/linux/vm/globals_linux.hpp
@@ -53,7 +53,7 @@
 // Defines Linux-specific default values. The flags are available on all
 // platforms, but they may have different default values on other platforms.
 //
-define_pd_global(bool, UseLargePages, true);
+define_pd_global(bool, UseLargePages, false);
 define_pd_global(bool, UseLargePagesIndividualAllocation, false);
 define_pd_global(bool, UseOSErrorReporting, false);
 define_pd_global(bool, UseThreadPriorities, true) ;
diff --git a/hotspot/src/os/linux/vm/os_linux.cpp b/hotspot/src/os/linux/vm/os_linux.cpp
index 95e0468..3aeb1b7 100644
--- a/hotspot/src/os/linux/vm/os_linux.cpp
+++ b/hotspot/src/os/linux/vm/os_linux.cpp
@@ -3361,13 +3361,15 @@
   if (FLAG_IS_DEFAULT(UseHugeTLBFS) &&
       FLAG_IS_DEFAULT(UseSHM) &&
       FLAG_IS_DEFAULT(UseTransparentHugePages)) {
-    // If UseLargePages is specified on the command line try all methods,
-    // if it's default, then try only UseTransparentHugePages.
-    if (FLAG_IS_DEFAULT(UseLargePages)) {
-      UseTransparentHugePages = true;
-    } else {
-      UseHugeTLBFS = UseTransparentHugePages = UseSHM = true;
-    }
+
+    // The type of large pages has not been specified by the user.
+
+    // Try UseHugeTLBFS and then UseSHM.
+    UseHugeTLBFS = UseSHM = true;
+
+    // Don't try UseTransparentHugePages since there are known
+    // performance issues with it turned on. This might change in the future.
+    UseTransparentHugePages = false;
   }
 
   if (UseTransparentHugePages) {
@@ -3393,9 +3395,19 @@
 }
 
 void os::large_page_init() {
-  if (!UseLargePages) {
-    UseHugeTLBFS = false;
+  if (!UseLargePages &&
+      !UseTransparentHugePages &&
+      !UseHugeTLBFS &&
+      !UseSHM) {
+    // Not using large pages.
+    return;
+  }
+
+  if (!FLAG_IS_DEFAULT(UseLargePages) && !UseLargePages) {
+    // The user explicitly turned off large pages.
+    // Ignore the rest of the large pages flags.
     UseTransparentHugePages = false;
+    UseHugeTLBFS = false;
     UseSHM = false;
     return;
   }
diff --git a/hotspot/src/share/vm/classfile/classFileParser.cpp b/hotspot/src/share/vm/classfile/classFileParser.cpp
index 5e79063..6817f57 100644
--- a/hotspot/src/share/vm/classfile/classFileParser.cpp
+++ b/hotspot/src/share/vm/classfile/classFileParser.cpp
@@ -4080,8 +4080,7 @@
 
     // Generate any default methods - default methods are interface methods
     // that have a default implementation.  This is new with Lambda project.
-    if (has_default_methods && !access_flags.is_interface() &&
-        local_interfaces->length() > 0) {
+    if (has_default_methods && !access_flags.is_interface() ) {
       DefaultMethods::generate_default_methods(
           this_klass(), &all_mirandas, CHECK_(nullHandle));
     }
diff --git a/hotspot/src/share/vm/classfile/defaultMethods.cpp b/hotspot/src/share/vm/classfile/defaultMethods.cpp
index c488fb2..e4e05c5 100644
--- a/hotspot/src/share/vm/classfile/defaultMethods.cpp
+++ b/hotspot/src/share/vm/classfile/defaultMethods.cpp
@@ -345,7 +345,6 @@
   }
 
   Symbol* generate_no_defaults_message(TRAPS) const;
-  Symbol* generate_abstract_method_message(Method* method, TRAPS) const;
   Symbol* generate_conflicts_message(GrowableArray<Method*>* methods, TRAPS) const;
 
  public:
@@ -404,20 +403,19 @@
       _exception_message = generate_no_defaults_message(CHECK);
       _exception_name = vmSymbols::java_lang_AbstractMethodError();
     } else if (qualified_methods.length() == 1) {
+      // leave abstract methods alone, they will be found via normal search path
       Method* method = qualified_methods.at(0);
-      if (method->is_abstract()) {
-        _exception_message = generate_abstract_method_message(method, CHECK);
-        _exception_name = vmSymbols::java_lang_AbstractMethodError();
-      } else {
+      if (!method->is_abstract()) {
         _selected_target = qualified_methods.at(0);
       }
     } else {
       _exception_message = generate_conflicts_message(&qualified_methods,CHECK);
       _exception_name = vmSymbols::java_lang_IncompatibleClassChangeError();
+      if (TraceDefaultMethods) {
+        _exception_message->print_value_on(tty);
+        tty->print_cr("");
+      }
     }
-
-    assert((has_target() ^ throws_exception()) == 1,
-           "One and only one must be true");
   }
 
   bool contains_signature(Symbol* query) {
@@ -475,20 +473,6 @@
   return SymbolTable::new_symbol("No qualifying defaults found", CHECK_NULL);
 }
 
-Symbol* MethodFamily::generate_abstract_method_message(Method* method, TRAPS) const {
-  Symbol* klass = method->klass_name();
-  Symbol* name = method->name();
-  Symbol* sig = method->signature();
-  stringStream ss;
-  ss.print("Method ");
-  ss.write((const char*)klass->bytes(), klass->utf8_length());
-  ss.print(".");
-  ss.write((const char*)name->bytes(), name->utf8_length());
-  ss.write((const char*)sig->bytes(), sig->utf8_length());
-  ss.print(" is abstract");
-  return SymbolTable::new_symbol(ss.base(), (int)ss.size(), CHECK_NULL);
-}
-
 Symbol* MethodFamily::generate_conflicts_message(GrowableArray<Method*>* methods, TRAPS) const {
   stringStream ss;
   ss.print("Conflicting default methods:");
@@ -595,6 +579,18 @@
 #endif // ndef PRODUCT
 };
 
+static bool already_in_vtable_slots(GrowableArray<EmptyVtableSlot*>* slots, Method* m) {
+  bool found = false;
+  for (int j = 0; j < slots->length(); ++j) {
+    if (slots->at(j)->name() == m->name() &&
+        slots->at(j)->signature() == m->signature() ) {
+      found = true;
+      break;
+    }
+  }
+  return found;
+}
+
 static GrowableArray<EmptyVtableSlot*>* find_empty_vtable_slots(
     InstanceKlass* klass, GrowableArray<Method*>* mirandas, TRAPS) {
 
@@ -604,8 +600,10 @@
 
   // All miranda methods are obvious candidates
   for (int i = 0; i < mirandas->length(); ++i) {
-    EmptyVtableSlot* slot = new EmptyVtableSlot(mirandas->at(i));
-    slots->append(slot);
+    Method* m = mirandas->at(i);
+    if (!already_in_vtable_slots(slots, m)) {
+      slots->append(new EmptyVtableSlot(m));
+    }
   }
 
   // Also any overpasses in our superclasses, that we haven't implemented.
@@ -621,7 +619,26 @@
         // unless we have a real implementation of it in the current class.
         Method* impl = klass->lookup_method(m->name(), m->signature());
         if (impl == NULL || impl->is_overpass()) {
-          slots->append(new EmptyVtableSlot(m));
+          if (!already_in_vtable_slots(slots, m)) {
+            slots->append(new EmptyVtableSlot(m));
+          }
+        }
+      }
+    }
+
+    // also any default methods in our superclasses
+    if (super->default_methods() != NULL) {
+      for (int i = 0; i < super->default_methods()->length(); ++i) {
+        Method* m = super->default_methods()->at(i);
+        // m is a method that would have been a miranda if not for the
+        // default method processing that occurred on behalf of our superclass,
+        // so it's a method we want to re-examine in this new context.  That is,
+        // unless we have a real implementation of it in the current class.
+        Method* impl = klass->lookup_method(m->name(), m->signature());
+        if (impl == NULL || impl->is_overpass()) {
+          if (!already_in_vtable_slots(slots, m)) {
+            slots->append(new EmptyVtableSlot(m));
+          }
         }
       }
     }
@@ -679,7 +696,7 @@
     // private interface methods are not candidates for default methods
     // invokespecial to private interface methods doesn't use default method logic
     // future: take access controls into account for superclass methods
-    if (m != NULL && (!iklass->is_interface() || m->is_public())) {
+    if (m != NULL && !m->is_static() && (!iklass->is_interface() || m->is_public())) {
       if (_family == NULL) {
         _family = new StatefulMethodFamily();
       }
@@ -700,7 +717,7 @@
 
 
 
-static void create_overpasses(
+static void create_defaults_and_exceptions(
     GrowableArray<EmptyVtableSlot*>* slots, InstanceKlass* klass, TRAPS);
 
 static void generate_erased_defaults(
@@ -721,6 +738,8 @@
 
 static void merge_in_new_methods(InstanceKlass* klass,
     GrowableArray<Method*>* new_methods, TRAPS);
+static void create_default_methods( InstanceKlass* klass,
+    GrowableArray<Method*>* new_methods, TRAPS);
 
 // This is the guts of the default methods implementation.  This is called just
 // after the classfile has been parsed if some ancestor has default methods.
@@ -782,7 +801,7 @@
   }
 #endif // ndef PRODUCT
 
-  create_overpasses(empty_slots, klass, CHECK);
+  create_defaults_and_exceptions(empty_slots, klass, CHECK);
 
 #ifndef PRODUCT
   if (TraceDefaultMethods) {
@@ -791,66 +810,6 @@
 #endif // ndef PRODUCT
 }
 
-
-
-#ifdef ASSERT
-// Return true is broad type is a covariant return of narrow type
-static bool covariant_return_type(BasicType narrow, BasicType broad) {
-  if (narrow == broad) {
-    return true;
-  }
-  if (broad == T_OBJECT) {
-    return true;
-  }
-  return false;
-}
-#endif
-
-static int assemble_redirect(
-    BytecodeConstantPool* cp, BytecodeBuffer* buffer,
-    Symbol* incoming, Method* target, TRAPS) {
-
-  BytecodeAssembler assem(buffer, cp);
-
-  SignatureStream in(incoming, true);
-  SignatureStream out(target->signature(), true);
-  u2 parameter_count = 0;
-
-  assem.aload(parameter_count++); // load 'this'
-
-  while (!in.at_return_type()) {
-    assert(!out.at_return_type(), "Parameter counts do not match");
-    BasicType bt = in.type();
-    assert(out.type() == bt, "Parameter types are not compatible");
-    assem.load(bt, parameter_count);
-    if (in.is_object() && in.as_symbol(THREAD) != out.as_symbol(THREAD)) {
-      assem.checkcast(out.as_symbol(THREAD));
-    } else if (bt == T_LONG || bt == T_DOUBLE) {
-      ++parameter_count; // longs and doubles use two slots
-    }
-    ++parameter_count;
-    in.next();
-    out.next();
-  }
-  assert(out.at_return_type(), "Parameter counts do not match");
-  assert(covariant_return_type(out.type(), in.type()), "Return types are not compatible");
-
-  if (parameter_count == 1 && (in.type() == T_LONG || in.type() == T_DOUBLE)) {
-    ++parameter_count; // need room for return value
-  }
-  if (target->method_holder()->is_interface()) {
-    assem.invokespecial(target);
-  } else {
-    assem.invokevirtual(target);
-  }
-
-  if (in.is_object() && in.as_symbol(THREAD) != out.as_symbol(THREAD)) {
-    assem.checkcast(in.as_symbol(THREAD));
-  }
-  assem._return(in.type());
-  return parameter_count;
-}
-
 static int assemble_method_error(
     BytecodeConstantPool* cp, BytecodeBuffer* buffer, Symbol* errorName, Symbol* message, TRAPS) {
 
@@ -924,18 +883,18 @@
   }
 }
 
-// A "bridge" is a method created by javac to bridge the gap between
-// an implementation and a generically-compatible, but different, signature.
-// Bridges have actual bytecode implementation in classfiles.
-// An "overpass", on the other hand, performs the same function as a bridge
-// but does not occur in a classfile; the VM creates overpass itself,
-// when it needs a path to get from a call site to an default method, and
-// a bridge doesn't exist.
-static void create_overpasses(
+// Create default_methods list for the current class.
+// With the VM only processing erased signatures, the VM only
+// creates an overpass in a conflict case or a case with no candidates.
+// This allows virtual methods to override the overpass, but ensures
+// that a local method search will find the exception rather than an abstract
+// or default method that is not a valid candidate.
+static void create_defaults_and_exceptions(
     GrowableArray<EmptyVtableSlot*>* slots,
     InstanceKlass* klass, TRAPS) {
 
   GrowableArray<Method*> overpasses;
+  GrowableArray<Method*> defaults;
   BytecodeConstantPool bpool(klass->constants());
 
   for (int i = 0; i < slots->length(); ++i) {
@@ -943,7 +902,6 @@
 
     if (slot->is_bound()) {
       MethodFamily* method = slot->get_binding();
-      int max_stack = 0;
       BytecodeBuffer buffer;
 
 #ifndef PRODUCT
@@ -953,26 +911,27 @@
         tty->print_cr("");
         if (method->has_target()) {
           method->print_selected(tty, 1);
-        } else {
+        } else if (method->throws_exception()) {
           method->print_exception(tty, 1);
         }
       }
 #endif // ndef PRODUCT
+
       if (method->has_target()) {
         Method* selected = method->get_selected_target();
         if (selected->method_holder()->is_interface()) {
-          max_stack = assemble_redirect(
-            &bpool, &buffer, slot->signature(), selected, CHECK);
+          defaults.push(selected);
         }
       } else if (method->throws_exception()) {
-        max_stack = assemble_method_error(&bpool, &buffer, method->get_exception_name(), method->get_exception_message(), CHECK);
-      }
-      if (max_stack != 0) {
+        int max_stack = assemble_method_error(&bpool, &buffer,
+           method->get_exception_name(), method->get_exception_message(), CHECK);
         AccessFlags flags = accessFlags_from(
           JVM_ACC_PUBLIC | JVM_ACC_SYNTHETIC | JVM_ACC_BRIDGE);
-        Method* m = new_method(&bpool, &buffer, slot->name(), slot->signature(),
+         Method* m = new_method(&bpool, &buffer, slot->name(), slot->signature(),
           flags, max_stack, slot->size_of_parameters(),
           ConstMethod::OVERPASS, CHECK);
+        // We push to the methods list:
+        // overpass methods which are exception throwing methods
         if (m != NULL) {
           overpasses.push(m);
         }
@@ -983,11 +942,31 @@
 #ifndef PRODUCT
   if (TraceDefaultMethods) {
     tty->print_cr("Created %d overpass methods", overpasses.length());
+    tty->print_cr("Created %d default  methods", defaults.length());
   }
 #endif // ndef PRODUCT
 
-  switchover_constant_pool(&bpool, klass, &overpasses, CHECK);
-  merge_in_new_methods(klass, &overpasses, CHECK);
+  if (overpasses.length() > 0) {
+    switchover_constant_pool(&bpool, klass, &overpasses, CHECK);
+    merge_in_new_methods(klass, &overpasses, CHECK);
+  }
+  if (defaults.length() > 0) {
+    create_default_methods(klass, &defaults, CHECK);
+  }
+}
+
+static void create_default_methods( InstanceKlass* klass,
+    GrowableArray<Method*>* new_methods, TRAPS) {
+
+  int new_size = new_methods->length();
+  Array<Method*>* total_default_methods = MetadataFactory::new_array<Method*>(
+      klass->class_loader_data(), new_size, NULL, CHECK);
+  for (int index = 0; index < new_size; index++ ) {
+    total_default_methods->at_put(index, new_methods->at(index));
+  }
+  Method::sort_methods(total_default_methods, false, false);
+
+  klass->set_default_methods(total_default_methods);
 }
 
 static void sort_methods(GrowableArray<Method*>* methods) {
diff --git a/hotspot/src/share/vm/classfile/dictionary.cpp b/hotspot/src/share/vm/classfile/dictionary.cpp
index 26e06c8..e308791 100644
--- a/hotspot/src/share/vm/classfile/dictionary.cpp
+++ b/hotspot/src/share/vm/classfile/dictionary.cpp
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2003, 2012, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2003, 2013, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -25,6 +25,7 @@
 #include "precompiled.hpp"
 #include "classfile/dictionary.hpp"
 #include "classfile/systemDictionary.hpp"
+#include "memory/iterator.hpp"
 #include "oops/oop.inline.hpp"
 #include "prims/jvmtiRedefineClassesTrace.hpp"
 #include "utilities/hashtable.inline.hpp"
@@ -38,17 +39,21 @@
   : TwoOopHashtable<Klass*, mtClass>(table_size, sizeof(DictionaryEntry)) {
   _current_class_index = 0;
   _current_class_entry = NULL;
+  _pd_cache_table = new ProtectionDomainCacheTable(defaultProtectionDomainCacheSize);
 };
 
 
-
 Dictionary::Dictionary(int table_size, HashtableBucket<mtClass>* t,
                        int number_of_entries)
   : TwoOopHashtable<Klass*, mtClass>(table_size, sizeof(DictionaryEntry), t, number_of_entries) {
   _current_class_index = 0;
   _current_class_entry = NULL;
+  _pd_cache_table = new ProtectionDomainCacheTable(defaultProtectionDomainCacheSize);
 };
 
+ProtectionDomainCacheEntry* Dictionary::cache_get(oop protection_domain) {
+  return _pd_cache_table->get(protection_domain);
+}
 
 DictionaryEntry* Dictionary::new_entry(unsigned int hash, Klass* klass,
                                        ClassLoaderData* loader_data) {
@@ -105,11 +110,12 @@
 }
 
 
-void DictionaryEntry::add_protection_domain(oop protection_domain) {
+void DictionaryEntry::add_protection_domain(Dictionary* dict, oop protection_domain) {
   assert_locked_or_safepoint(SystemDictionary_lock);
   if (!contains_protection_domain(protection_domain)) {
+    ProtectionDomainCacheEntry* entry = dict->cache_get(protection_domain);
     ProtectionDomainEntry* new_head =
-                new ProtectionDomainEntry(protection_domain, _pd_set);
+                new ProtectionDomainEntry(entry, _pd_set);
     // Warning: Preserve store ordering.  The SystemDictionary is read
     //          without locks.  The new ProtectionDomainEntry must be
     //          complete before other threads can be allowed to see it
@@ -193,7 +199,10 @@
 
 
 void Dictionary::always_strong_oops_do(OopClosure* blk) {
-  // Follow all system classes and temporary placeholders in dictionary
+  // Follow all system classes and temporary placeholders in dictionary; only
+  // protection domain oops contain references into the heap. In a first
+  // pass over the system dictionary determine which need to be treated as
+  // strongly reachable and mark them as such.
   for (int index = 0; index < table_size(); index++) {
     for (DictionaryEntry *probe = bucket(index);
                           probe != NULL;
@@ -201,10 +210,13 @@
       Klass* e = probe->klass();
       ClassLoaderData* loader_data = probe->loader_data();
       if (is_strongly_reachable(loader_data, e)) {
-        probe->protection_domain_set_oops_do(blk);
+        probe->set_strongly_reachable();
       }
     }
   }
+  // Then iterate over the protection domain cache to apply the closure on the
+  // previously marked ones.
+  _pd_cache_table->always_strong_oops_do(blk);
 }
 
 
@@ -266,18 +278,12 @@
   }
 }
 
-
 void Dictionary::oops_do(OopClosure* f) {
-  for (int index = 0; index < table_size(); index++) {
-    for (DictionaryEntry* probe = bucket(index);
-                          probe != NULL;
-                          probe = probe->next()) {
-      probe->protection_domain_set_oops_do(f);
-    }
-  }
+  // Only the protection domain oops contain references into the heap. Iterate
+  // over all of them.
+  _pd_cache_table->oops_do(f);
 }
 
-
 void Dictionary::methods_do(void f(Method*)) {
   for (int index = 0; index < table_size(); index++) {
     for (DictionaryEntry* probe = bucket(index);
@@ -292,6 +298,11 @@
   }
 }
 
+void Dictionary::unlink(BoolObjectClosure* is_alive) {
+  // Only the protection domain cache table may contain references to the heap
+  // that need to be unlinked.
+  _pd_cache_table->unlink(is_alive);
+}
 
 Klass* Dictionary::try_get_next_class() {
   while (true) {
@@ -306,7 +317,6 @@
   // never reached
 }
 
-
 // Add a loaded class to the system dictionary.
 // Readers of the SystemDictionary aren't always locked, so _buckets
 // is volatile. The store of the next field in the constructor is
@@ -396,7 +406,7 @@
   assert(protection_domain() != NULL,
          "real protection domain should be present");
 
-  entry->add_protection_domain(protection_domain());
+  entry->add_protection_domain(this, protection_domain());
 
   assert(entry->contains_protection_domain(protection_domain()),
          "now protection domain should be present");
@@ -446,6 +456,146 @@
   }
 }
 
+ProtectionDomainCacheTable::ProtectionDomainCacheTable(int table_size)
+  : Hashtable<oop, mtClass>(table_size, sizeof(ProtectionDomainCacheEntry))
+{
+}
+
+void ProtectionDomainCacheTable::unlink(BoolObjectClosure* is_alive) {
+  assert(SafepointSynchronize::is_at_safepoint(), "must be");
+  for (int i = 0; i < table_size(); ++i) {
+    ProtectionDomainCacheEntry** p = bucket_addr(i);
+    ProtectionDomainCacheEntry* entry = bucket(i);
+    while (entry != NULL) {
+      if (is_alive->do_object_b(entry->literal())) {
+        p = entry->next_addr();
+      } else {
+        *p = entry->next();
+        free_entry(entry);
+      }
+      entry = *p;
+    }
+  }
+}
+
+void ProtectionDomainCacheTable::oops_do(OopClosure* f) {
+  for (int index = 0; index < table_size(); index++) {
+    for (ProtectionDomainCacheEntry* probe = bucket(index);
+                                     probe != NULL;
+                                     probe = probe->next()) {
+      probe->oops_do(f);
+    }
+  }
+}
+
+uint ProtectionDomainCacheTable::bucket_size() {
+  return sizeof(ProtectionDomainCacheEntry);
+}
+
+#ifndef PRODUCT
+void ProtectionDomainCacheTable::print() {
+  tty->print_cr("Protection domain cache table (table_size=%d, classes=%d)",
+                table_size(), number_of_entries());
+  for (int index = 0; index < table_size(); index++) {
+    for (ProtectionDomainCacheEntry* probe = bucket(index);
+                                     probe != NULL;
+                                     probe = probe->next()) {
+      probe->print();
+    }
+  }
+}
+
+void ProtectionDomainCacheEntry::print() {
+  tty->print_cr("entry "PTR_FORMAT" value "PTR_FORMAT" strongly_reachable %d next "PTR_FORMAT,
+                this, (void*)literal(), _strongly_reachable, next());
+}
+#endif
+
+void ProtectionDomainCacheTable::verify() {
+  int element_count = 0;
+  for (int index = 0; index < table_size(); index++) {
+    for (ProtectionDomainCacheEntry* probe = bucket(index);
+                                     probe != NULL;
+                                     probe = probe->next()) {
+      probe->verify();
+      element_count++;
+    }
+  }
+  guarantee(number_of_entries() == element_count,
+            "Verify of protection domain cache table failed");
+  debug_only(verify_lookup_length((double)number_of_entries() / table_size()));
+}
+
+void ProtectionDomainCacheEntry::verify() {
+  guarantee(literal()->is_oop(), "must be an oop");
+}
+
+void ProtectionDomainCacheTable::always_strong_oops_do(OopClosure* f) {
+  // the caller marked the protection domain cache entries that we need to apply
+  // the closure on. Only process them.
+  for (int index = 0; index < table_size(); index++) {
+    for (ProtectionDomainCacheEntry* probe = bucket(index);
+                                     probe != NULL;
+                                     probe = probe->next()) {
+      if (probe->is_strongly_reachable()) {
+        probe->reset_strongly_reachable();
+        probe->oops_do(f);
+      }
+    }
+  }
+}
+
+ProtectionDomainCacheEntry* ProtectionDomainCacheTable::get(oop protection_domain) {
+  unsigned int hash = compute_hash(protection_domain);
+  int index = hash_to_index(hash);
+
+  ProtectionDomainCacheEntry* entry = find_entry(index, protection_domain);
+  if (entry == NULL) {
+    entry = add_entry(index, hash, protection_domain);
+  }
+  return entry;
+}
+
+ProtectionDomainCacheEntry* ProtectionDomainCacheTable::find_entry(int index, oop protection_domain) {
+  for (ProtectionDomainCacheEntry* e = bucket(index); e != NULL; e = e->next()) {
+    if (e->protection_domain() == protection_domain) {
+      return e;
+    }
+  }
+
+  return NULL;
+}
+
+ProtectionDomainCacheEntry* ProtectionDomainCacheTable::add_entry(int index, unsigned int hash, oop protection_domain) {
+  assert_locked_or_safepoint(SystemDictionary_lock);
+  assert(index == index_for(protection_domain), "incorrect index?");
+  assert(find_entry(index, protection_domain) == NULL, "no double entry");
+
+  ProtectionDomainCacheEntry* p = new_entry(hash, protection_domain);
+  Hashtable<oop, mtClass>::add_entry(index, p);
+  return p;
+}
+
+void ProtectionDomainCacheTable::free(ProtectionDomainCacheEntry* to_delete) {
+  unsigned int hash = compute_hash(to_delete->protection_domain());
+  int index = hash_to_index(hash);
+
+  ProtectionDomainCacheEntry** p = bucket_addr(index);
+  ProtectionDomainCacheEntry* entry = bucket(index);
+  while (true) {
+    assert(entry != NULL, "sanity");
+
+    if (entry == to_delete) {
+      *p = entry->next();
+      Hashtable<oop, mtClass>::free_entry(entry);
+      break;
+    } else {
+      p = entry->next_addr();
+      entry = *p;
+    }
+  }
+}
+
 SymbolPropertyTable::SymbolPropertyTable(int table_size)
   : Hashtable<Symbol*, mtSymbol>(table_size, sizeof(SymbolPropertyEntry))
 {
@@ -532,11 +682,13 @@
       tty->cr();
     }
   }
+  tty->cr();
+  _pd_cache_table->print();
+  tty->cr();
 }
 
 #endif
 
-
 void Dictionary::verify() {
   guarantee(number_of_entries() >= 0, "Verify of system dictionary failed");
 
@@ -563,5 +715,7 @@
   guarantee(number_of_entries() == element_count,
             "Verify of system dictionary failed");
   debug_only(verify_lookup_length((double)number_of_entries() / table_size()));
+
+  _pd_cache_table->verify();
 }
 
diff --git a/hotspot/src/share/vm/classfile/dictionary.hpp b/hotspot/src/share/vm/classfile/dictionary.hpp
index 1945803..17d916f 100644
--- a/hotspot/src/share/vm/classfile/dictionary.hpp
+++ b/hotspot/src/share/vm/classfile/dictionary.hpp
@@ -27,11 +27,14 @@
 
 #include "classfile/systemDictionary.hpp"
 #include "oops/instanceKlass.hpp"
-#include "oops/oop.hpp"
+#include "oops/oop.inline.hpp"
 #include "utilities/hashtable.hpp"
 
 class DictionaryEntry;
 class PSPromotionManager;
+class ProtectionDomainCacheTable;
+class ProtectionDomainCacheEntry;
+class BoolObjectClosure;
 
 //~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
 // The data structure for the system dictionary (and the shared system
@@ -45,6 +48,8 @@
   // pointer to the current hash table entry.
   static DictionaryEntry*       _current_class_entry;
 
+  ProtectionDomainCacheTable*   _pd_cache_table;
+
   DictionaryEntry* get_entry(int index, unsigned int hash,
                              Symbol* name, ClassLoaderData* loader_data);
 
@@ -93,6 +98,7 @@
 
   void methods_do(void f(Method*));
 
+  void unlink(BoolObjectClosure* is_alive);
 
   // Classes loaded by the bootstrap loader are always strongly reachable.
   // If we're not doing class unloading, all classes are strongly reachable.
@@ -118,6 +124,7 @@
   // Sharing support
   void reorder_dictionary();
 
+  ProtectionDomainCacheEntry* cache_get(oop protection_domain);
 
 #ifndef PRODUCT
   void print();
@@ -126,21 +133,112 @@
 };
 
 // The following classes can be in dictionary.cpp, but we need these
-// to be in header file so that SA's vmStructs can access.
+// to be in header file so that SA's vmStructs can access them.
+class ProtectionDomainCacheEntry : public HashtableEntry<oop, mtClass> {
+  friend class VMStructs;
+ private:
+  // Flag indicating whether this protection domain entry is strongly reachable.
+  // Used during iterating over the system dictionary to remember oops that need
+  // to be updated.
+  bool _strongly_reachable;
+ public:
+  oop protection_domain() { return literal(); }
+
+  void init() {
+    _strongly_reachable = false;
+  }
+
+  ProtectionDomainCacheEntry* next() {
+    return (ProtectionDomainCacheEntry*)HashtableEntry<oop, mtClass>::next();
+  }
+
+  ProtectionDomainCacheEntry** next_addr() {
+    return (ProtectionDomainCacheEntry**)HashtableEntry<oop, mtClass>::next_addr();
+  }
+
+  void oops_do(OopClosure* f) {
+    f->do_oop(literal_addr());
+  }
+
+  void set_strongly_reachable()   { _strongly_reachable = true; }
+  bool is_strongly_reachable()    { return _strongly_reachable; }
+  void reset_strongly_reachable() { _strongly_reachable = false; }
+
+  void print() PRODUCT_RETURN;
+  void verify();
+};
+
+// The ProtectionDomainCacheTable contains all protection domain oops. The system
+// dictionary entries reference its entries instead of having references to oops
+// directly.
+// This is used to speed up system dictionary iteration: the oops in the
+// protection domain are the only ones referring the Java heap. So when there is
+// need to update these, instead of going over every entry of the system dictionary,
+// we only need to iterate over this set.
+// The amount of different protection domains used is typically magnitudes smaller
+// than the number of system dictionary entries (loaded classes).
+class ProtectionDomainCacheTable : public Hashtable<oop, mtClass> {
+  friend class VMStructs;
+private:
+  ProtectionDomainCacheEntry* bucket(int i) {
+    return (ProtectionDomainCacheEntry*) Hashtable<oop, mtClass>::bucket(i);
+  }
+
+  // The following method is not MT-safe and must be done under lock.
+  ProtectionDomainCacheEntry** bucket_addr(int i) {
+    return (ProtectionDomainCacheEntry**) Hashtable<oop, mtClass>::bucket_addr(i);
+  }
+
+  ProtectionDomainCacheEntry* new_entry(unsigned int hash, oop protection_domain) {
+    ProtectionDomainCacheEntry* entry = (ProtectionDomainCacheEntry*) Hashtable<oop, mtClass>::new_entry(hash, protection_domain);
+    entry->init();
+    return entry;
+  }
+
+  static unsigned int compute_hash(oop protection_domain) {
+    return (unsigned int)(protection_domain->identity_hash());
+  }
+
+  int index_for(oop protection_domain) {
+    return hash_to_index(compute_hash(protection_domain));
+  }
+
+  ProtectionDomainCacheEntry* add_entry(int index, unsigned int hash, oop protection_domain);
+  ProtectionDomainCacheEntry* find_entry(int index, oop protection_domain);
+
+public:
+
+  ProtectionDomainCacheTable(int table_size);
+
+  ProtectionDomainCacheEntry* get(oop protection_domain);
+  void free(ProtectionDomainCacheEntry* entry);
+
+  void unlink(BoolObjectClosure* cl);
+
+  // GC support
+  void oops_do(OopClosure* f);
+  void always_strong_oops_do(OopClosure* f);
+
+  static uint bucket_size();
+
+  void print() PRODUCT_RETURN;
+  void verify();
+};
+
 
 class ProtectionDomainEntry :public CHeapObj<mtClass> {
   friend class VMStructs;
  public:
   ProtectionDomainEntry* _next;
-  oop                    _protection_domain;
+  ProtectionDomainCacheEntry* _pd_cache;
 
-  ProtectionDomainEntry(oop protection_domain, ProtectionDomainEntry* next) {
-    _protection_domain = protection_domain;
-    _next              = next;
+  ProtectionDomainEntry(ProtectionDomainCacheEntry* pd_cache, ProtectionDomainEntry* next) {
+    _pd_cache = pd_cache;
+    _next     = next;
   }
 
   ProtectionDomainEntry* next() { return _next; }
-  oop protection_domain() { return _protection_domain; }
+  oop protection_domain() { return _pd_cache->protection_domain(); }
 };
 
 // An entry in the system dictionary, this describes a class as
@@ -151,6 +249,24 @@
  private:
   // Contains the set of approved protection domains that can access
   // this system dictionary entry.
+  //
+  // This protection domain set is a set of tuples:
+  //
+  // (InstanceKlass C, initiating class loader ICL, Protection Domain PD)
+  //
+  // [Note that C.protection_domain(), which is stored in the java.lang.Class
+  // mirror of C, is NOT the same as PD]
+  //
+  // If such an entry (C, ICL, PD) exists in the table, it means that
+  // it is okay for a class Foo to reference C, where
+  //
+  //    Foo.protection_domain() == PD, and
+  //    Foo's defining class loader == ICL
+  //
+  // The usage of the PD set can be seen in SystemDictionary::validate_protection_domain()
+  // It is essentially a cache to avoid repeated Java up-calls to
+  // ClassLoader.checkPackageAccess().
+  //
   ProtectionDomainEntry* _pd_set;
   ClassLoaderData*       _loader_data;
 
@@ -158,7 +274,7 @@
   // Tells whether a protection is in the approved set.
   bool contains_protection_domain(oop protection_domain) const;
   // Adds a protection domain to the approved set.
-  void add_protection_domain(oop protection_domain);
+  void add_protection_domain(Dictionary* dict, oop protection_domain);
 
   Klass* klass() const { return (Klass*)literal(); }
   Klass** klass_addr() { return (Klass**)literal_addr(); }
@@ -189,12 +305,11 @@
          : contains_protection_domain(protection_domain());
   }
 
-
-  void protection_domain_set_oops_do(OopClosure* f) {
+  void set_strongly_reachable() {
     for (ProtectionDomainEntry* current = _pd_set;
                                 current != NULL;
                                 current = current->_next) {
-      f->do_oop(&(current->_protection_domain));
+      current->_pd_cache->set_strongly_reachable();
     }
   }
 
@@ -202,7 +317,7 @@
     for (ProtectionDomainEntry* current = _pd_set;
                                 current != NULL;
                                 current = current->_next) {
-      current->_protection_domain->verify();
+      current->_pd_cache->protection_domain()->verify();
     }
   }
 
diff --git a/hotspot/src/share/vm/classfile/javaClasses.cpp b/hotspot/src/share/vm/classfile/javaClasses.cpp
index 9331cc1..06e75ea 100644
--- a/hotspot/src/share/vm/classfile/javaClasses.cpp
+++ b/hotspot/src/share/vm/classfile/javaClasses.cpp
@@ -1376,8 +1376,15 @@
   const char* klass_name  = holder->external_name();
   int buf_len = (int)strlen(klass_name);
 
-  // pushing to the stack trace added one.
+  // The method id may point to an obsolete method, can't get more stack information
   Method* method = holder->method_with_idnum(method_id);
+  if (method == NULL) {
+    char* buf = NEW_RESOURCE_ARRAY(char, buf_len + 64);
+    // This is what the java code prints in this case - added Redefined
+    sprintf(buf, "\tat %s.null (Redefined)", klass_name);
+    return buf;
+  }
+
   char* method_name = method->name()->as_C_string();
   buf_len += (int)strlen(method_name);
 
@@ -1773,7 +1780,8 @@
   return element;
 }
 
-oop java_lang_StackTraceElement::create(Handle mirror, int method_id, int version, int bci, TRAPS) {
+oop java_lang_StackTraceElement::create(Handle mirror, int method_id,
+                                        int version, int bci, TRAPS) {
   // Allocate java.lang.StackTraceElement instance
   Klass* k = SystemDictionary::StackTraceElement_klass();
   assert(k != NULL, "must be loaded in 1.4+");
@@ -1790,8 +1798,16 @@
   oop classname = StringTable::intern((char*) str, CHECK_0);
   java_lang_StackTraceElement::set_declaringClass(element(), classname);
 
-  // Fill in method name
   Method* method = holder->method_with_idnum(method_id);
+  // Method on stack may be obsolete because it was redefined so cannot be
+  // found by idnum.
+  if (method == NULL) {
+    // leave name and fileName null
+    java_lang_StackTraceElement::set_lineNumber(element(), -1);
+    return element();
+  }
+
+  // Fill in method name
   oop methodname = StringTable::intern(method->name(), CHECK_0);
   java_lang_StackTraceElement::set_methodName(element(), methodname);
 
diff --git a/hotspot/src/share/vm/classfile/symbolTable.hpp b/hotspot/src/share/vm/classfile/symbolTable.hpp
index dc7d033..50cde69 100644
--- a/hotspot/src/share/vm/classfile/symbolTable.hpp
+++ b/hotspot/src/share/vm/classfile/symbolTable.hpp
@@ -107,18 +107,13 @@
     add(loader_data, cp, names_count, name, lengths, cp_indices, hashValues, THREAD);
   }
 
-  // Table size
-  enum {
-    symbol_table_size = 20011
-  };
-
   Symbol* lookup(int index, const char* name, int len, unsigned int hash);
 
   SymbolTable()
-    : Hashtable<Symbol*, mtSymbol>(symbol_table_size, sizeof (HashtableEntry<Symbol*, mtSymbol>)) {}
+    : Hashtable<Symbol*, mtSymbol>(SymbolTableSize, sizeof (HashtableEntry<Symbol*, mtSymbol>)) {}
 
   SymbolTable(HashtableBucket<mtSymbol>* t, int number_of_entries)
-    : Hashtable<Symbol*, mtSymbol>(symbol_table_size, sizeof (HashtableEntry<Symbol*, mtSymbol>), t,
+    : Hashtable<Symbol*, mtSymbol>(SymbolTableSize, sizeof (HashtableEntry<Symbol*, mtSymbol>), t,
                 number_of_entries) {}
 
   // Arena for permanent symbols (null class loader) that are never unloaded
@@ -136,6 +131,9 @@
   // The symbol table
   static SymbolTable* the_table() { return _the_table; }
 
+  // Size of one bucket in the string table.  Used when checking for rollover.
+  static uint bucket_size() { return sizeof(HashtableBucket<mtSymbol>); }
+
   static void create_table() {
     assert(_the_table == NULL, "One symbol table allowed.");
     _the_table = new SymbolTable();
@@ -145,8 +143,11 @@
   static void create_table(HashtableBucket<mtSymbol>* t, int length,
                            int number_of_entries) {
     assert(_the_table == NULL, "One symbol table allowed.");
-    assert(length == symbol_table_size * sizeof(HashtableBucket<mtSymbol>),
-           "bad shared symbol size.");
+
+    // If CDS archive used a different symbol table size, use that size instead
+    // which is better than giving an error.
+    SymbolTableSize = length/bucket_size();
+
     _the_table = new SymbolTable(t, number_of_entries);
     // if CDS give symbol table a default arena size since most symbols
     // are already allocated in the shared misc section.
diff --git a/hotspot/src/share/vm/classfile/systemDictionary.cpp b/hotspot/src/share/vm/classfile/systemDictionary.cpp
index c0d50ca..b6731c2 100644
--- a/hotspot/src/share/vm/classfile/systemDictionary.cpp
+++ b/hotspot/src/share/vm/classfile/systemDictionary.cpp
@@ -1697,6 +1697,24 @@
   return newsize;
 }
 
+#ifdef ASSERT
+class VerifySDReachableAndLiveClosure : public OopClosure {
+private:
+  BoolObjectClosure* _is_alive;
+
+  template <class T> void do_oop_work(T* p) {
+    oop obj = oopDesc::load_decode_heap_oop(p);
+    guarantee(_is_alive->do_object_b(obj), "Oop in system dictionary must be live");
+  }
+
+public:
+  VerifySDReachableAndLiveClosure(BoolObjectClosure* is_alive) : OopClosure(), _is_alive(is_alive) { }
+
+  virtual void do_oop(oop* p)       { do_oop_work(p); }
+  virtual void do_oop(narrowOop* p) { do_oop_work(p); }
+};
+#endif
+
 // Assumes classes in the SystemDictionary are only unloaded at a safepoint
 // Note: anonymous classes are not in the SD.
 bool SystemDictionary::do_unloading(BoolObjectClosure* is_alive) {
@@ -1707,7 +1725,15 @@
     unloading_occurred = dictionary()->do_unloading();
     constraints()->purge_loader_constraints();
     resolution_errors()->purge_resolution_errors();
-}
+  }
+  // Oops referenced by the system dictionary may get unreachable independently
+  // of the class loader (eg. cached protection domain oops). So we need to
+  // explicitly unlink them here instead of in Dictionary::do_unloading.
+  dictionary()->unlink(is_alive);
+#ifdef ASSERT
+  VerifySDReachableAndLiveClosure cl(is_alive);
+  dictionary()->oops_do(&cl);
+#endif
   return unloading_occurred;
 }
 
diff --git a/hotspot/src/share/vm/classfile/verifier.cpp b/hotspot/src/share/vm/classfile/verifier.cpp
index 7134e7c..d645e27 100644
--- a/hotspot/src/share/vm/classfile/verifier.cpp
+++ b/hotspot/src/share/vm/classfile/verifier.cpp
@@ -2442,10 +2442,16 @@
     bool subtype = ref_class_type.is_assignable_from(
       current_type(), this, CHECK_VERIFY(this));
     if (!subtype) {
-      verify_error(ErrorContext::bad_code(bci),
-          "Bad invokespecial instruction: "
-          "current class isn't assignable to reference class.");
-       return;
+      if (current_class()->is_anonymous()) {
+        subtype = ref_class_type.is_assignable_from(VerificationType::reference_type(
+                   current_class()->host_klass()->name()), this, CHECK_VERIFY(this));
+      }
+      if (!subtype) {
+        verify_error(ErrorContext::bad_code(bci),
+            "Bad invokespecial instruction: "
+            "current class isn't assignable to reference class.");
+         return;
+      }
     }
   }
   // Match method descriptor with operand stack
@@ -2461,7 +2467,28 @@
     } else {   // other methods
       // Ensures that target class is assignable to method class.
       if (opcode == Bytecodes::_invokespecial) {
-        current_frame->pop_stack(current_type(), CHECK_VERIFY(this));
+        if (!current_class()->is_anonymous()) {
+          current_frame->pop_stack(current_type(), CHECK_VERIFY(this));
+        } else {
+          // anonymous class invokespecial calls: either the
+          // operand stack/objectref  is a subtype of the current class OR
+          // the objectref is a subtype of the host_klass of the current class
+          // to allow an anonymous class to reference methods in the host_klass
+          VerificationType top = current_frame->pop_stack(CHECK_VERIFY(this));
+          bool subtype = current_type().is_assignable_from(top, this, CHECK_VERIFY(this));
+          if (!subtype) {
+            VerificationType hosttype =
+              VerificationType::reference_type(current_class()->host_klass()->name());
+            subtype = hosttype.is_assignable_from(top, this, CHECK_VERIFY(this));
+          }
+          if (!subtype) {
+            verify_error( ErrorContext::bad_type(current_frame->offset(),
+              current_frame->stack_top_ctx(),
+              TypeOrigin::implicit(top)),
+              "Bad type on operand stack");
+            return;
+          }
+        }
       } else if (opcode == Bytecodes::_invokevirtual) {
         VerificationType stack_object_type =
           current_frame->pop_stack(ref_class_type, CHECK_VERIFY(this));
diff --git a/hotspot/src/share/vm/code/dependencies.cpp b/hotspot/src/share/vm/code/dependencies.cpp
index df26943..4419bdd 100644
--- a/hotspot/src/share/vm/code/dependencies.cpp
+++ b/hotspot/src/share/vm/code/dependencies.cpp
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2005, 2012, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2005, 2013, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -812,8 +812,8 @@
     Klass* k = ctxk;
     Method* lm = k->lookup_method(m->name(), m->signature());
     if (lm == NULL && k->oop_is_instance()) {
-      // It might be an abstract interface method, devoid of mirandas.
-      lm = ((InstanceKlass*)k)->lookup_method_in_all_interfaces(m->name(),
+      // It might be an interface method
+        lm = ((InstanceKlass*)k)->lookup_method_in_ordered_interfaces(m->name(),
                                                                 m->signature());
     }
     if (lm == m)
diff --git a/hotspot/src/share/vm/gc_implementation/g1/g1CollectedHeap.cpp b/hotspot/src/share/vm/gc_implementation/g1/g1CollectedHeap.cpp
index 817ecbf..3f53067 100644
--- a/hotspot/src/share/vm/gc_implementation/g1/g1CollectedHeap.cpp
+++ b/hotspot/src/share/vm/gc_implementation/g1/g1CollectedHeap.cpp
@@ -6035,7 +6035,11 @@
   // is dirty.
   G1SATBCardTableModRefBS* ct_bs = g1_barrier_set();
   MemRegion mr(hr->bottom(), hr->pre_dummy_top());
-  ct_bs->verify_dirty_region(mr);
+  if (hr->is_young()) {
+    ct_bs->verify_g1_young_region(mr);
+  } else {
+    ct_bs->verify_dirty_region(mr);
+  }
 }
 
 void G1CollectedHeap::verify_dirty_young_list(HeapRegion* head) {
diff --git a/hotspot/src/share/vm/gc_implementation/g1/g1CollectedHeap.inline.hpp b/hotspot/src/share/vm/gc_implementation/g1/g1CollectedHeap.inline.hpp
index 5cd3f7f..d309e60 100644
--- a/hotspot/src/share/vm/gc_implementation/g1/g1CollectedHeap.inline.hpp
+++ b/hotspot/src/share/vm/gc_implementation/g1/g1CollectedHeap.inline.hpp
@@ -29,6 +29,7 @@
 #include "gc_implementation/g1/g1CollectedHeap.hpp"
 #include "gc_implementation/g1/g1AllocRegion.inline.hpp"
 #include "gc_implementation/g1/g1CollectorPolicy.hpp"
+#include "gc_implementation/g1/g1SATBCardTableModRefBS.hpp"
 #include "gc_implementation/g1/heapRegionSeq.inline.hpp"
 #include "utilities/taskqueue.hpp"
 
@@ -134,7 +135,7 @@
   assert(containing_hr->is_in(end - 1), "it should also contain end - 1");
 
   MemRegion mr(start, end);
-  g1_barrier_set()->dirty(mr);
+  g1_barrier_set()->g1_mark_as_young(mr);
 }
 
 inline RefToScanQueue* G1CollectedHeap::task_queue(int i) const {
diff --git a/hotspot/src/share/vm/gc_implementation/g1/g1CollectorPolicy.cpp b/hotspot/src/share/vm/gc_implementation/g1/g1CollectorPolicy.cpp
index 178acd2..cac114b 100644
--- a/hotspot/src/share/vm/gc_implementation/g1/g1CollectorPolicy.cpp
+++ b/hotspot/src/share/vm/gc_implementation/g1/g1CollectorPolicy.cpp
@@ -319,10 +319,10 @@
 }
 
 void G1CollectorPolicy::initialize_flags() {
-  set_min_alignment(HeapRegion::GrainBytes);
+  _min_alignment = HeapRegion::GrainBytes;
   size_t card_table_alignment = GenRemSet::max_alignment_constraint(rem_set_name());
   size_t page_size = UseLargePages ? os::large_page_size() : os::vm_page_size();
-  set_max_alignment(MAX3(card_table_alignment, min_alignment(), page_size));
+  _max_alignment = MAX3(card_table_alignment, _min_alignment, page_size);
   if (SurvivorRatio < 1) {
     vm_exit_during_initialization("Invalid survivor ratio specified");
   }
diff --git a/hotspot/src/share/vm/gc_implementation/g1/g1SATBCardTableModRefBS.cpp b/hotspot/src/share/vm/gc_implementation/g1/g1SATBCardTableModRefBS.cpp
index 8608c91..9af87ed 100644
--- a/hotspot/src/share/vm/gc_implementation/g1/g1SATBCardTableModRefBS.cpp
+++ b/hotspot/src/share/vm/gc_implementation/g1/g1SATBCardTableModRefBS.cpp
@@ -70,6 +70,12 @@
   if ((val & (clean_card_mask_val() | deferred_card_val())) == deferred_card_val()) {
     return false;
   }
+
+  if  (val == g1_young_gen) {
+    // the card is for a young gen region. We don't need to keep track of all pointers into young
+    return false;
+  }
+
   // Cached bit can be installed either on a clean card or on a claimed card.
   jbyte new_val = val;
   if (val == clean_card_val()) {
@@ -85,6 +91,19 @@
   return true;
 }
 
+void G1SATBCardTableModRefBS::g1_mark_as_young(const MemRegion& mr) {
+  jbyte *const first = byte_for(mr.start());
+  jbyte *const last = byte_after(mr.last());
+
+  memset(first, g1_young_gen, last - first);
+}
+
+#ifndef PRODUCT
+void G1SATBCardTableModRefBS::verify_g1_young_region(MemRegion mr) {
+  verify_region(mr, g1_young_gen,  true);
+}
+#endif
+
 G1SATBCardTableLoggingModRefBS::
 G1SATBCardTableLoggingModRefBS(MemRegion whole_heap,
                                int max_covered_regions) :
@@ -97,7 +116,11 @@
 void
 G1SATBCardTableLoggingModRefBS::write_ref_field_work(void* field,
                                                      oop new_val) {
-  jbyte* byte = byte_for(field);
+  volatile jbyte* byte = byte_for(field);
+  if (*byte == g1_young_gen) {
+    return;
+  }
+  OrderAccess::storeload();
   if (*byte != dirty_card) {
     *byte = dirty_card;
     Thread* thr = Thread::current();
@@ -129,7 +152,7 @@
 
 void
 G1SATBCardTableLoggingModRefBS::invalidate(MemRegion mr, bool whole_heap) {
-  jbyte* byte = byte_for(mr.start());
+  volatile jbyte* byte = byte_for(mr.start());
   jbyte* last_byte = byte_for(mr.last());
   Thread* thr = Thread::current();
   if (whole_heap) {
@@ -138,25 +161,35 @@
       byte++;
     }
   } else {
-    // Enqueue if necessary.
-    if (thr->is_Java_thread()) {
-      JavaThread* jt = (JavaThread*)thr;
-      while (byte <= last_byte) {
-        if (*byte != dirty_card) {
-          *byte = dirty_card;
-          jt->dirty_card_queue().enqueue(byte);
+    // skip all consecutive young cards
+    for (; byte <= last_byte && *byte == g1_young_gen; byte++);
+
+    if (byte <= last_byte) {
+      OrderAccess::storeload();
+      // Enqueue if necessary.
+      if (thr->is_Java_thread()) {
+        JavaThread* jt = (JavaThread*)thr;
+        for (; byte <= last_byte; byte++) {
+          if (*byte == g1_young_gen) {
+            continue;
+          }
+          if (*byte != dirty_card) {
+            *byte = dirty_card;
+            jt->dirty_card_queue().enqueue(byte);
+          }
         }
-        byte++;
-      }
-    } else {
-      MutexLockerEx x(Shared_DirtyCardQ_lock,
-                      Mutex::_no_safepoint_check_flag);
-      while (byte <= last_byte) {
-        if (*byte != dirty_card) {
-          *byte = dirty_card;
-          _dcqs.shared_dirty_card_queue()->enqueue(byte);
+      } else {
+        MutexLockerEx x(Shared_DirtyCardQ_lock,
+                        Mutex::_no_safepoint_check_flag);
+        for (; byte <= last_byte; byte++) {
+          if (*byte == g1_young_gen) {
+            continue;
+          }
+          if (*byte != dirty_card) {
+            *byte = dirty_card;
+            _dcqs.shared_dirty_card_queue()->enqueue(byte);
+          }
         }
-        byte++;
       }
     }
   }
diff --git a/hotspot/src/share/vm/gc_implementation/g1/g1SATBCardTableModRefBS.hpp b/hotspot/src/share/vm/gc_implementation/g1/g1SATBCardTableModRefBS.hpp
index 4e80734..a943c9f 100644
--- a/hotspot/src/share/vm/gc_implementation/g1/g1SATBCardTableModRefBS.hpp
+++ b/hotspot/src/share/vm/gc_implementation/g1/g1SATBCardTableModRefBS.hpp
@@ -38,7 +38,14 @@
 // snapshot-at-the-beginning marking.
 
 class G1SATBCardTableModRefBS: public CardTableModRefBSForCTRS {
+protected:
+  enum G1CardValues {
+    g1_young_gen = CT_MR_BS_last_reserved << 1
+  };
+
 public:
+  static int g1_young_card_val()   { return g1_young_gen; }
+
   // Add "pre_val" to a set of objects that may have been disconnected from the
   // pre-marking object graph.
   static void enqueue(oop pre_val);
@@ -118,6 +125,9 @@
       _byte_map[card_index] = val;
   }
 
+  void verify_g1_young_region(MemRegion mr) PRODUCT_RETURN;
+  void g1_mark_as_young(const MemRegion& mr);
+
   bool mark_card_deferred(size_t card_index);
 
   bool is_card_deferred(size_t card_index) {
diff --git a/hotspot/src/share/vm/gc_implementation/g1/ptrQueue.hpp b/hotspot/src/share/vm/gc_implementation/g1/ptrQueue.hpp
index 9583171..e39e382 100644
--- a/hotspot/src/share/vm/gc_implementation/g1/ptrQueue.hpp
+++ b/hotspot/src/share/vm/gc_implementation/g1/ptrQueue.hpp
@@ -80,6 +80,10 @@
 
   void reset() { if (_buf != NULL) _index = _sz; }
 
+  void enqueue(volatile void* ptr) {
+    enqueue((void*)(ptr));
+  }
+
   // Enqueues the given "obj".
   void enqueue(void* ptr) {
     if (!_active) return;
diff --git a/hotspot/src/share/vm/gc_implementation/shared/vmGCOperations.hpp b/hotspot/src/share/vm/gc_implementation/shared/vmGCOperations.hpp
index 60b3a96..82cbf23 100644
--- a/hotspot/src/share/vm/gc_implementation/shared/vmGCOperations.hpp
+++ b/hotspot/src/share/vm/gc_implementation/shared/vmGCOperations.hpp
@@ -214,9 +214,6 @@
     : VM_GC_Operation(gc_count_before, gc_cause, full_gc_count_before, true),
       _loader_data(loader_data), _size(size), _mdtype(mdtype), _result(NULL) {
   }
-  ~VM_CollectForMetadataAllocation()  {
-    MetaspaceGC::set_expand_after_GC(false);
-  }
   virtual VMOp_Type type() const { return VMOp_CollectForMetadataAllocation; }
   virtual void doit();
   MetaWord* result() const       { return _result; }
diff --git a/hotspot/src/share/vm/gc_interface/collectedHeap.cpp b/hotspot/src/share/vm/gc_interface/collectedHeap.cpp
index 3f5364b..bbf5419 100644
--- a/hotspot/src/share/vm/gc_interface/collectedHeap.cpp
+++ b/hotspot/src/share/vm/gc_interface/collectedHeap.cpp
@@ -202,12 +202,6 @@
       ShouldNotReachHere(); // Unexpected use of this function
   }
 }
-MetaWord* CollectedHeap::satisfy_failed_metadata_allocation(
-                                              ClassLoaderData* loader_data,
-                                              size_t size, Metaspace::MetadataType mdtype) {
-  return collector_policy()->satisfy_failed_metadata_allocation(loader_data, size, mdtype);
-}
-
 
 void CollectedHeap::pre_initialize() {
   // Used for ReduceInitialCardMarks (when COMPILER2 is used);
diff --git a/hotspot/src/share/vm/gc_interface/collectedHeap.hpp b/hotspot/src/share/vm/gc_interface/collectedHeap.hpp
index c26ca77..1e60ed1 100644
--- a/hotspot/src/share/vm/gc_interface/collectedHeap.hpp
+++ b/hotspot/src/share/vm/gc_interface/collectedHeap.hpp
@@ -475,11 +475,6 @@
   // the context of the vm thread.
   virtual void collect_as_vm_thread(GCCause::Cause cause);
 
-  // Callback from VM_CollectForMetadataAllocation operation.
-  MetaWord* satisfy_failed_metadata_allocation(ClassLoaderData* loader_data,
-                                               size_t size,
-                                               Metaspace::MetadataType mdtype);
-
   // Returns the barrier set for this heap
   BarrierSet* barrier_set() { return _barrier_set; }
 
diff --git a/hotspot/src/share/vm/interpreter/linkResolver.cpp b/hotspot/src/share/vm/interpreter/linkResolver.cpp
index a12b68b..9cebf91 100644
--- a/hotspot/src/share/vm/interpreter/linkResolver.cpp
+++ b/hotspot/src/share/vm/interpreter/linkResolver.cpp
@@ -1,4 +1,5 @@
 /*
+ * 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
@@ -221,8 +222,17 @@
 //
 // According to JVM spec. $5.4.3c & $5.4.3d
 
+// Look up method in klasses, including static methods
+// Then look up local default methods
 void LinkResolver::lookup_method_in_klasses(methodHandle& result, KlassHandle klass, Symbol* name, Symbol* signature, TRAPS) {
   Method* result_oop = klass->uncached_lookup_method(name, signature);
+  if (result_oop == NULL) {
+    Array<Method*>* default_methods = InstanceKlass::cast(klass())->default_methods();
+    if (default_methods != NULL) {
+      result_oop = InstanceKlass::find_method(default_methods, name, signature);
+    }
+  }
+
   if (EnableInvokeDynamic && result_oop != NULL) {
     vmIntrinsics::ID iid = result_oop->intrinsic_id();
     if (MethodHandles::is_signature_polymorphic(iid)) {
@@ -234,6 +244,7 @@
 }
 
 // returns first instance method
+// Looks up method in classes, then looks up local default methods
 void LinkResolver::lookup_instance_method_in_klasses(methodHandle& result, KlassHandle klass, Symbol* name, Symbol* signature, TRAPS) {
   Method* result_oop = klass->uncached_lookup_method(name, signature);
   result = methodHandle(THREAD, result_oop);
@@ -241,13 +252,38 @@
     klass = KlassHandle(THREAD, result->method_holder()->super());
     result = methodHandle(THREAD, klass->uncached_lookup_method(name, signature));
   }
+
+  if (result.is_null()) {
+    Array<Method*>* default_methods = InstanceKlass::cast(klass())->default_methods();
+    if (default_methods != NULL) {
+      result = methodHandle(InstanceKlass::find_method(default_methods, name, signature));
+      assert(result.is_null() || !result->is_static(), "static defaults not allowed");
+    }
+  }
 }
 
+int LinkResolver::vtable_index_of_interface_method(KlassHandle klass,
+                                          methodHandle resolved_method, TRAPS) {
 
-int LinkResolver::vtable_index_of_miranda_method(KlassHandle klass, Symbol* name, Symbol* signature, TRAPS) {
-  ResourceMark rm(THREAD);
-  klassVtable *vt = InstanceKlass::cast(klass())->vtable();
-  return vt->index_of_miranda(name, signature);
+  int vtable_index = Method::invalid_vtable_index;
+  Symbol* name = resolved_method->name();
+  Symbol* signature = resolved_method->signature();
+
+  // First check in default method array
+  if (!resolved_method->is_abstract()  &&
+    (InstanceKlass::cast(klass())->default_methods() != NULL)) {
+    int index = InstanceKlass::find_method_index(InstanceKlass::cast(klass())->default_methods(), name, signature);
+    if (index >= 0 ) {
+      vtable_index = InstanceKlass::cast(klass())->default_vtable_indices()->at(index);
+    }
+  }
+  if (vtable_index == Method::invalid_vtable_index) {
+    // get vtable_index for miranda methods
+    ResourceMark rm(THREAD);
+    klassVtable *vt = InstanceKlass::cast(klass())->vtable();
+    vtable_index = vt->index_of_miranda(name, signature);
+  }
+  return vtable_index;
 }
 
 void LinkResolver::lookup_method_in_interfaces(methodHandle& result, KlassHandle klass, Symbol* name, Symbol* signature, TRAPS) {
@@ -625,6 +661,12 @@
                    resolved_method->method_holder()->internal_name()
                   );
     resolved_method->access_flags().print_on(tty);
+    if (resolved_method->is_default_method()) {
+      tty->print("default");
+    }
+    if (resolved_method->is_overpass()) {
+      tty->print("overpass");
+    }
     tty->cr();
   }
 }
@@ -853,6 +895,7 @@
                                                          resolved_method->signature()));
     THROW_MSG(vmSymbols::java_lang_IncompatibleClassChangeError(), buf);
   }
+
   if (TraceItables && Verbose) {
     ResourceMark rm(THREAD);
     tty->print("invokespecial resolved method: caller-class:%s, compile-time-class:%s, method:%s, method_holder:%s, access_flags: ",
@@ -864,8 +907,7 @@
                 resolved_method->method_holder()->internal_name()
                );
     resolved_method->access_flags().print_on(tty);
-    if (resolved_method->method_holder()->is_interface() &&
-        !resolved_method->is_abstract()) {
+    if (resolved_method->is_default_method()) {
       tty->print("default");
     }
     if (resolved_method->is_overpass()) {
@@ -945,10 +987,12 @@
                  sel_method->method_holder()->internal_name()
                 );
     sel_method->access_flags().print_on(tty);
-    if (sel_method->method_holder()->is_interface() &&
-        !sel_method->is_abstract()) {
+    if (sel_method->is_default_method()) {
       tty->print("default");
     }
+    if (sel_method->is_overpass()) {
+      tty->print("overpass");
+    }
     tty->cr();
   }
 
@@ -996,26 +1040,25 @@
     THROW_MSG(vmSymbols::java_lang_IncompatibleClassChangeError(), buf);
   }
 
- if (PrintVtables && Verbose) {
-   ResourceMark rm(THREAD);
-   tty->print("invokevirtual resolved method: caller-class:%s, compile-time-class:%s, method:%s, method_holder:%s, access_flags: ",
-                  (current_klass.is_null() ? "<NULL>" : current_klass->internal_name()),
-                  (resolved_klass.is_null() ? "<NULL>" : resolved_klass->internal_name()),
-                  Method::name_and_sig_as_C_string(resolved_klass(),
-                                                   resolved_method->name(),
-                                                   resolved_method->signature()),
-                  resolved_method->method_holder()->internal_name()
-                 );
-   resolved_method->access_flags().print_on(tty);
-   if (resolved_method->method_holder()->is_interface() &&
-       !resolved_method->is_abstract()) {
-     tty->print("default");
-   }
-   if (resolved_method->is_overpass()) {
-     tty->print("overpass");
-   }
-   tty->cr();
- }
+  if (PrintVtables && Verbose) {
+    ResourceMark rm(THREAD);
+    tty->print("invokevirtual resolved method: caller-class:%s, compile-time-class:%s, method:%s, method_holder:%s, access_flags: ",
+                   (current_klass.is_null() ? "<NULL>" : current_klass->internal_name()),
+                   (resolved_klass.is_null() ? "<NULL>" : resolved_klass->internal_name()),
+                   Method::name_and_sig_as_C_string(resolved_klass(),
+                                                    resolved_method->name(),
+                                                    resolved_method->signature()),
+                   resolved_method->method_holder()->internal_name()
+                  );
+    resolved_method->access_flags().print_on(tty);
+    if (resolved_method->is_default_method()) {
+      tty->print("default");
+    }
+    if (resolved_method->is_overpass()) {
+      tty->print("overpass");
+    }
+    tty->cr();
+  }
 }
 
 // throws runtime exceptions
@@ -1045,10 +1088,8 @@
 
   // do lookup based on receiver klass using the vtable index
   if (resolved_method->method_holder()->is_interface()) { // miranda method
-    vtable_index = vtable_index_of_miranda_method(resolved_klass,
-                           resolved_method->name(),
-                           resolved_method->signature(), CHECK);
-
+    vtable_index = vtable_index_of_interface_method(resolved_klass,
+                           resolved_method, CHECK);
     assert(vtable_index >= 0 , "we should have valid vtable index at this point");
 
     InstanceKlass* inst = InstanceKlass::cast(recv_klass());
@@ -1104,11 +1145,10 @@
                    vtable_index
                   );
     selected_method->access_flags().print_on(tty);
-    if (selected_method->method_holder()->is_interface() &&
-        !selected_method->is_abstract()) {
+    if (selected_method->is_default_method()) {
       tty->print("default");
     }
-    if (resolved_method->is_overpass()) {
+    if (selected_method->is_overpass()) {
       tty->print("overpass");
     }
     tty->cr();
@@ -1191,7 +1231,6 @@
                                                sel_method->name(),
                                                sel_method->signature()));
   }
-
   // check if abstract
   if (check_null_and_abstract && sel_method->is_abstract()) {
     ResourceMark rm(THREAD);
@@ -1220,11 +1259,10 @@
                    sel_method->method_holder()->internal_name()
                   );
     sel_method->access_flags().print_on(tty);
-    if (sel_method->method_holder()->is_interface() &&
-        !sel_method->is_abstract()) {
+    if (sel_method->is_default_method()) {
       tty->print("default");
     }
-    if (resolved_method->is_overpass()) {
+    if (sel_method->is_overpass()) {
       tty->print("overpass");
     }
     tty->cr();
diff --git a/hotspot/src/share/vm/interpreter/linkResolver.hpp b/hotspot/src/share/vm/interpreter/linkResolver.hpp
index 0fb551a..55a4ddf 100644
--- a/hotspot/src/share/vm/interpreter/linkResolver.hpp
+++ b/hotspot/src/share/vm/interpreter/linkResolver.hpp
@@ -130,8 +130,7 @@
   static void lookup_polymorphic_method         (methodHandle& result, KlassHandle klass, Symbol* name, Symbol* signature,
                                                  KlassHandle current_klass, Handle *appendix_result_or_null, Handle *method_type_result, TRAPS);
 
-  static int vtable_index_of_miranda_method(KlassHandle klass, Symbol* name, Symbol* signature, TRAPS);
-
+  static int vtable_index_of_interface_method(KlassHandle klass, methodHandle resolved_method, TRAPS);
   static void resolve_klass           (KlassHandle& result, constantPoolHandle  pool, int index, TRAPS);
 
   static void resolve_pool  (KlassHandle& resolved_klass, Symbol*& method_name, Symbol*& method_signature, KlassHandle& current_klass, constantPoolHandle pool, int index, TRAPS);
diff --git a/hotspot/src/share/vm/memory/collectorPolicy.cpp b/hotspot/src/share/vm/memory/collectorPolicy.cpp
index 99025bc..a3c4663 100644
--- a/hotspot/src/share/vm/memory/collectorPolicy.cpp
+++ b/hotspot/src/share/vm/memory/collectorPolicy.cpp
@@ -47,85 +47,53 @@
 
 // CollectorPolicy methods.
 
-// Align down. If the aligning result in 0, return 'alignment'.
-static size_t restricted_align_down(size_t size, size_t alignment) {
-  return MAX2(alignment, align_size_down_(size, alignment));
-}
-
 void CollectorPolicy::initialize_flags() {
-  assert(max_alignment() >= min_alignment(),
-      err_msg("max_alignment: " SIZE_FORMAT " less than min_alignment: " SIZE_FORMAT,
-          max_alignment(), min_alignment()));
-  assert(max_alignment() % min_alignment() == 0,
-      err_msg("max_alignment: " SIZE_FORMAT " not aligned by min_alignment: " SIZE_FORMAT,
-          max_alignment(), min_alignment()));
+  assert(_max_alignment >= _min_alignment,
+         err_msg("max_alignment: " SIZE_FORMAT " less than min_alignment: " SIZE_FORMAT,
+                 _max_alignment, _min_alignment));
+  assert(_max_alignment % _min_alignment == 0,
+         err_msg("max_alignment: " SIZE_FORMAT " not aligned by min_alignment: " SIZE_FORMAT,
+                 _max_alignment, _min_alignment));
 
   if (MaxHeapSize < InitialHeapSize) {
     vm_exit_during_initialization("Incompatible initial and maximum heap sizes specified");
   }
 
-  // Do not use FLAG_SET_ERGO to update MaxMetaspaceSize, since this will
-  // override if MaxMetaspaceSize was set on the command line or not.
-  // This information is needed later to conform to the specification of the
-  // java.lang.management.MemoryUsage API.
-  //
-  // Ideally, we would be able to set the default value of MaxMetaspaceSize in
-  // globals.hpp to the aligned value, but this is not possible, since the
-  // alignment depends on other flags being parsed.
-  MaxMetaspaceSize = restricted_align_down(MaxMetaspaceSize, max_alignment());
-
-  if (MetaspaceSize > MaxMetaspaceSize) {
-    MetaspaceSize = MaxMetaspaceSize;
-  }
-
-  MetaspaceSize = restricted_align_down(MetaspaceSize, min_alignment());
-
-  assert(MetaspaceSize <= MaxMetaspaceSize, "Must be");
-
-  MinMetaspaceExpansion = restricted_align_down(MinMetaspaceExpansion, min_alignment());
-  MaxMetaspaceExpansion = restricted_align_down(MaxMetaspaceExpansion, min_alignment());
-
-  MinHeapDeltaBytes = align_size_up(MinHeapDeltaBytes, min_alignment());
-
-  assert(MetaspaceSize    % min_alignment() == 0, "metapace alignment");
-  assert(MaxMetaspaceSize % max_alignment() == 0, "maximum metaspace alignment");
-  if (MetaspaceSize < 256*K) {
-    vm_exit_during_initialization("Too small initial Metaspace size");
-  }
+  MinHeapDeltaBytes = align_size_up(MinHeapDeltaBytes, _min_alignment);
 }
 
 void CollectorPolicy::initialize_size_info() {
   // User inputs from -mx and ms must be aligned
-  set_min_heap_byte_size(align_size_up(Arguments::min_heap_size(), min_alignment()));
-  set_initial_heap_byte_size(align_size_up(InitialHeapSize, min_alignment()));
-  set_max_heap_byte_size(align_size_up(MaxHeapSize, max_alignment()));
+  _min_heap_byte_size = align_size_up(Arguments::min_heap_size(), _min_alignment);
+  _initial_heap_byte_size = align_size_up(InitialHeapSize, _min_alignment);
+  _max_heap_byte_size = align_size_up(MaxHeapSize, _max_alignment);
 
   // Check heap parameter properties
-  if (initial_heap_byte_size() < M) {
+  if (_initial_heap_byte_size < M) {
     vm_exit_during_initialization("Too small initial heap");
   }
   // Check heap parameter properties
-  if (min_heap_byte_size() < M) {
+  if (_min_heap_byte_size < M) {
     vm_exit_during_initialization("Too small minimum heap");
   }
-  if (initial_heap_byte_size() <= NewSize) {
+  if (_initial_heap_byte_size <= NewSize) {
      // make sure there is at least some room in old space
     vm_exit_during_initialization("Too small initial heap for new size specified");
   }
-  if (max_heap_byte_size() < min_heap_byte_size()) {
+  if (_max_heap_byte_size < _min_heap_byte_size) {
     vm_exit_during_initialization("Incompatible minimum and maximum heap sizes specified");
   }
-  if (initial_heap_byte_size() < min_heap_byte_size()) {
+  if (_initial_heap_byte_size < _min_heap_byte_size) {
     vm_exit_during_initialization("Incompatible minimum and initial heap sizes specified");
   }
-  if (max_heap_byte_size() < initial_heap_byte_size()) {
+  if (_max_heap_byte_size < _initial_heap_byte_size) {
     vm_exit_during_initialization("Incompatible initial and maximum heap sizes specified");
   }
 
   if (PrintGCDetails && Verbose) {
     gclog_or_tty->print_cr("Minimum heap " SIZE_FORMAT "  Initial heap "
       SIZE_FORMAT "  Maximum heap " SIZE_FORMAT,
-      min_heap_byte_size(), initial_heap_byte_size(), max_heap_byte_size());
+      _min_heap_byte_size, _initial_heap_byte_size, _max_heap_byte_size);
   }
 }
 
@@ -180,15 +148,15 @@
 
 size_t GenCollectorPolicy::scale_by_NewRatio_aligned(size_t base_size) {
   size_t x = base_size / (NewRatio+1);
-  size_t new_gen_size = x > min_alignment() ?
-                     align_size_down(x, min_alignment()) :
-                     min_alignment();
+  size_t new_gen_size = x > _min_alignment ?
+                     align_size_down(x, _min_alignment) :
+                     _min_alignment;
   return new_gen_size;
 }
 
 size_t GenCollectorPolicy::bound_minus_alignment(size_t desired_size,
                                                  size_t maximum_size) {
-  size_t alignment = min_alignment();
+  size_t alignment = _min_alignment;
   size_t max_minus = maximum_size - alignment;
   return desired_size < max_minus ? desired_size : max_minus;
 }
@@ -207,8 +175,8 @@
 
 void GenCollectorPolicy::initialize_flags() {
   // All sizes must be multiples of the generation granularity.
-  set_min_alignment((uintx) Generation::GenGrain);
-  set_max_alignment(compute_max_alignment());
+  _min_alignment = (uintx) Generation::GenGrain;
+  _max_alignment = compute_max_alignment();
 
   CollectorPolicy::initialize_flags();
 
@@ -218,26 +186,26 @@
   if (NewSize > MaxNewSize) {
     MaxNewSize = NewSize;
   }
-  NewSize = align_size_down(NewSize, min_alignment());
-  MaxNewSize = align_size_down(MaxNewSize, min_alignment());
+  NewSize = align_size_down(NewSize, _min_alignment);
+  MaxNewSize = align_size_down(MaxNewSize, _min_alignment);
 
   // Check validity of heap flags
-  assert(NewSize     % min_alignment() == 0, "eden space alignment");
-  assert(MaxNewSize  % min_alignment() == 0, "survivor space alignment");
+  assert(NewSize     % _min_alignment == 0, "eden space alignment");
+  assert(MaxNewSize  % _min_alignment == 0, "survivor space alignment");
 
-  if (NewSize < 3*min_alignment()) {
+  if (NewSize < 3 * _min_alignment) {
      // make sure there room for eden and two survivor spaces
     vm_exit_during_initialization("Too small new size specified");
   }
   if (SurvivorRatio < 1 || NewRatio < 1) {
-    vm_exit_during_initialization("Invalid heap ratio specified");
+    vm_exit_during_initialization("Invalid young gen ratio specified");
   }
 }
 
 void TwoGenerationCollectorPolicy::initialize_flags() {
   GenCollectorPolicy::initialize_flags();
 
-  OldSize = align_size_down(OldSize, min_alignment());
+  OldSize = align_size_down(OldSize, _min_alignment);
 
   if (FLAG_IS_CMDLINE(OldSize) && FLAG_IS_DEFAULT(NewSize)) {
     // NewRatio will be used later to set the young generation size so we use
@@ -246,11 +214,11 @@
     assert(NewRatio > 0, "NewRatio should have been set up earlier");
     size_t calculated_heapsize = (OldSize / NewRatio) * (NewRatio + 1);
 
-    calculated_heapsize = align_size_up(calculated_heapsize, max_alignment());
+    calculated_heapsize = align_size_up(calculated_heapsize, _max_alignment);
     MaxHeapSize = calculated_heapsize;
     InitialHeapSize = calculated_heapsize;
   }
-  MaxHeapSize = align_size_up(MaxHeapSize, max_alignment());
+  MaxHeapSize = align_size_up(MaxHeapSize, _max_alignment);
 
   // adjust max heap size if necessary
   if (NewSize + OldSize > MaxHeapSize) {
@@ -260,18 +228,18 @@
       uintx calculated_size = NewSize + OldSize;
       double shrink_factor = (double) MaxHeapSize / calculated_size;
       // align
-      NewSize = align_size_down((uintx) (NewSize * shrink_factor), min_alignment());
+      NewSize = align_size_down((uintx) (NewSize * shrink_factor), _min_alignment);
       // OldSize is already aligned because above we aligned MaxHeapSize to
-      // max_alignment(), and we just made sure that NewSize is aligned to
-      // min_alignment(). In initialize_flags() we verified that max_alignment()
-      // is a multiple of min_alignment().
+      // _max_alignment, and we just made sure that NewSize is aligned to
+      // _min_alignment. In initialize_flags() we verified that _max_alignment
+      // is a multiple of _min_alignment.
       OldSize = MaxHeapSize - NewSize;
     } else {
       MaxHeapSize = NewSize + OldSize;
     }
   }
   // need to do this again
-  MaxHeapSize = align_size_up(MaxHeapSize, max_alignment());
+  MaxHeapSize = align_size_up(MaxHeapSize, _max_alignment);
 
   // adjust max heap size if necessary
   if (NewSize + OldSize > MaxHeapSize) {
@@ -281,24 +249,24 @@
       uintx calculated_size = NewSize + OldSize;
       double shrink_factor = (double) MaxHeapSize / calculated_size;
       // align
-      NewSize = align_size_down((uintx) (NewSize * shrink_factor), min_alignment());
+      NewSize = align_size_down((uintx) (NewSize * shrink_factor), _min_alignment);
       // OldSize is already aligned because above we aligned MaxHeapSize to
-      // max_alignment(), and we just made sure that NewSize is aligned to
-      // min_alignment(). In initialize_flags() we verified that max_alignment()
-      // is a multiple of min_alignment().
+      // _max_alignment, and we just made sure that NewSize is aligned to
+      // _min_alignment. In initialize_flags() we verified that _max_alignment
+      // is a multiple of _min_alignment.
       OldSize = MaxHeapSize - NewSize;
     } else {
       MaxHeapSize = NewSize + OldSize;
     }
   }
   // need to do this again
-  MaxHeapSize = align_size_up(MaxHeapSize, max_alignment());
+  MaxHeapSize = align_size_up(MaxHeapSize, _max_alignment);
 
   always_do_update_barrier = UseConcMarkSweepGC;
 
   // Check validity of heap flags
-  assert(OldSize     % min_alignment() == 0, "old space alignment");
-  assert(MaxHeapSize % max_alignment() == 0, "maximum heap alignment");
+  assert(OldSize     % _min_alignment == 0, "old space alignment");
+  assert(MaxHeapSize % _max_alignment == 0, "maximum heap alignment");
 }
 
 // Values set on the command line win over any ergonomically
@@ -313,7 +281,7 @@
 void GenCollectorPolicy::initialize_size_info() {
   CollectorPolicy::initialize_size_info();
 
-  // min_alignment() is used for alignment within a generation.
+  // _min_alignment is used for alignment within a generation.
   // There is additional alignment done down stream for some
   // collectors that sometimes causes unwanted rounding up of
   // generations sizes.
@@ -322,18 +290,18 @@
 
   size_t max_new_size = 0;
   if (FLAG_IS_CMDLINE(MaxNewSize) || FLAG_IS_ERGO(MaxNewSize)) {
-    if (MaxNewSize < min_alignment()) {
-      max_new_size = min_alignment();
+    if (MaxNewSize < _min_alignment) {
+      max_new_size = _min_alignment;
     }
-    if (MaxNewSize >= max_heap_byte_size()) {
-      max_new_size = align_size_down(max_heap_byte_size() - min_alignment(),
-                                     min_alignment());
+    if (MaxNewSize >= _max_heap_byte_size) {
+      max_new_size = align_size_down(_max_heap_byte_size - _min_alignment,
+                                     _min_alignment);
       warning("MaxNewSize (" SIZE_FORMAT "k) is equal to or "
         "greater than the entire heap (" SIZE_FORMAT "k).  A "
         "new generation size of " SIZE_FORMAT "k will be used.",
-        MaxNewSize/K, max_heap_byte_size()/K, max_new_size/K);
+        MaxNewSize/K, _max_heap_byte_size/K, max_new_size/K);
     } else {
-      max_new_size = align_size_down(MaxNewSize, min_alignment());
+      max_new_size = align_size_down(MaxNewSize, _min_alignment);
     }
 
   // The case for FLAG_IS_ERGO(MaxNewSize) could be treated
@@ -351,7 +319,7 @@
   // just accept those choices.  The choices currently made are
   // not always "wise".
   } else {
-    max_new_size = scale_by_NewRatio_aligned(max_heap_byte_size());
+    max_new_size = scale_by_NewRatio_aligned(_max_heap_byte_size);
     // Bound the maximum size by NewSize below (since it historically
     // would have been NewSize and because the NewRatio calculation could
     // yield a size that is too small) and bound it by MaxNewSize above.
@@ -364,13 +332,13 @@
   // Given the maximum gen0 size, determine the initial and
   // minimum gen0 sizes.
 
-  if (max_heap_byte_size() == min_heap_byte_size()) {
+  if (_max_heap_byte_size == _min_heap_byte_size) {
     // The maximum and minimum heap sizes are the same so
     // the generations minimum and initial must be the
     // same as its maximum.
-    set_min_gen0_size(max_new_size);
-    set_initial_gen0_size(max_new_size);
-    set_max_gen0_size(max_new_size);
+    _min_gen0_size = max_new_size;
+    _initial_gen0_size = max_new_size;
+    _max_gen0_size = max_new_size;
   } else {
     size_t desired_new_size = 0;
     if (!FLAG_IS_DEFAULT(NewSize)) {
@@ -391,43 +359,37 @@
       // Use the default NewSize as the floor for these values.  If
       // NewRatio is overly large, the resulting sizes can be too
       // small.
-      _min_gen0_size = MAX2(scale_by_NewRatio_aligned(min_heap_byte_size()),
-                          NewSize);
+      _min_gen0_size = MAX2(scale_by_NewRatio_aligned(_min_heap_byte_size), NewSize);
       desired_new_size =
-        MAX2(scale_by_NewRatio_aligned(initial_heap_byte_size()),
-             NewSize);
+        MAX2(scale_by_NewRatio_aligned(_initial_heap_byte_size), NewSize);
     }
 
     assert(_min_gen0_size > 0, "Sanity check");
-    set_initial_gen0_size(desired_new_size);
-    set_max_gen0_size(max_new_size);
+    _initial_gen0_size = desired_new_size;
+    _max_gen0_size = max_new_size;
 
     // At this point the desirable initial and minimum sizes have been
     // determined without regard to the maximum sizes.
 
     // Bound the sizes by the corresponding overall heap sizes.
-    set_min_gen0_size(
-      bound_minus_alignment(_min_gen0_size, min_heap_byte_size()));
-    set_initial_gen0_size(
-      bound_minus_alignment(_initial_gen0_size, initial_heap_byte_size()));
-    set_max_gen0_size(
-      bound_minus_alignment(_max_gen0_size, max_heap_byte_size()));
+    _min_gen0_size = bound_minus_alignment(_min_gen0_size, _min_heap_byte_size);
+    _initial_gen0_size = bound_minus_alignment(_initial_gen0_size, _initial_heap_byte_size);
+    _max_gen0_size = bound_minus_alignment(_max_gen0_size, _max_heap_byte_size);
 
     // At this point all three sizes have been checked against the
     // maximum sizes but have not been checked for consistency
     // among the three.
 
     // Final check min <= initial <= max
-    set_min_gen0_size(MIN2(_min_gen0_size, _max_gen0_size));
-    set_initial_gen0_size(
-      MAX2(MIN2(_initial_gen0_size, _max_gen0_size), _min_gen0_size));
-    set_min_gen0_size(MIN2(_min_gen0_size, _initial_gen0_size));
+    _min_gen0_size = MIN2(_min_gen0_size, _max_gen0_size);
+    _initial_gen0_size = MAX2(MIN2(_initial_gen0_size, _max_gen0_size), _min_gen0_size);
+    _min_gen0_size = MIN2(_min_gen0_size, _initial_gen0_size);
   }
 
   if (PrintGCDetails && Verbose) {
     gclog_or_tty->print_cr("1: Minimum gen0 " SIZE_FORMAT "  Initial gen0 "
       SIZE_FORMAT "  Maximum gen0 " SIZE_FORMAT,
-      min_gen0_size(), initial_gen0_size(), max_gen0_size());
+      _min_gen0_size, _initial_gen0_size, _max_gen0_size);
   }
 }
 
@@ -447,19 +409,17 @@
 
   if ((*gen1_size_ptr + *gen0_size_ptr) > heap_size) {
     if ((heap_size < (*gen0_size_ptr + min_gen1_size)) &&
-        (heap_size >= min_gen1_size + min_alignment())) {
+        (heap_size >= min_gen1_size + _min_alignment)) {
       // Adjust gen0 down to accommodate min_gen1_size
       *gen0_size_ptr = heap_size - min_gen1_size;
       *gen0_size_ptr =
-        MAX2((uintx)align_size_down(*gen0_size_ptr, min_alignment()),
-             min_alignment());
+        MAX2((uintx)align_size_down(*gen0_size_ptr, _min_alignment), _min_alignment);
       assert(*gen0_size_ptr > 0, "Min gen0 is too large");
       result = true;
     } else {
       *gen1_size_ptr = heap_size - *gen0_size_ptr;
       *gen1_size_ptr =
-        MAX2((uintx)align_size_down(*gen1_size_ptr, min_alignment()),
-                       min_alignment());
+        MAX2((uintx)align_size_down(*gen1_size_ptr, _min_alignment), _min_alignment);
     }
   }
   return result;
@@ -480,10 +440,9 @@
   // The maximum gen1 size can be determined from the maximum gen0
   // and maximum heap size since no explicit flags exits
   // for setting the gen1 maximum.
-  _max_gen1_size = max_heap_byte_size() - _max_gen0_size;
+  _max_gen1_size = _max_heap_byte_size - _max_gen0_size;
   _max_gen1_size =
-    MAX2((uintx)align_size_down(_max_gen1_size, min_alignment()),
-         min_alignment());
+    MAX2((uintx)align_size_down(_max_gen1_size, _min_alignment), _min_alignment);
   // If no explicit command line flag has been set for the
   // gen1 size, use what is left for gen1.
   if (FLAG_IS_DEFAULT(OldSize) || FLAG_IS_ERGO(OldSize)) {
@@ -492,70 +451,66 @@
     // with the overall heap size).  In either case make
     // the minimum, maximum and initial sizes consistent
     // with the gen0 sizes and the overall heap sizes.
-    assert(min_heap_byte_size() > _min_gen0_size,
+    assert(_min_heap_byte_size > _min_gen0_size,
       "gen0 has an unexpected minimum size");
-    set_min_gen1_size(min_heap_byte_size() - min_gen0_size());
-    set_min_gen1_size(
-      MAX2((uintx)align_size_down(_min_gen1_size, min_alignment()),
-           min_alignment()));
-    set_initial_gen1_size(initial_heap_byte_size() - initial_gen0_size());
-    set_initial_gen1_size(
-      MAX2((uintx)align_size_down(_initial_gen1_size, min_alignment()),
-           min_alignment()));
-
+    _min_gen1_size = _min_heap_byte_size - _min_gen0_size;
+    _min_gen1_size =
+      MAX2((uintx)align_size_down(_min_gen1_size, _min_alignment), _min_alignment);
+    _initial_gen1_size = _initial_heap_byte_size - _initial_gen0_size;
+    _initial_gen1_size =
+      MAX2((uintx)align_size_down(_initial_gen1_size, _min_alignment), _min_alignment);
   } else {
     // It's been explicitly set on the command line.  Use the
     // OldSize and then determine the consequences.
-    set_min_gen1_size(OldSize);
-    set_initial_gen1_size(OldSize);
+    _min_gen1_size = OldSize;
+    _initial_gen1_size = OldSize;
 
     // If the user has explicitly set an OldSize that is inconsistent
     // with other command line flags, issue a warning.
     // The generation minimums and the overall heap mimimum should
     // be within one heap alignment.
-    if ((_min_gen1_size + _min_gen0_size + min_alignment()) <
-           min_heap_byte_size()) {
+    if ((_min_gen1_size + _min_gen0_size + _min_alignment) < _min_heap_byte_size) {
       warning("Inconsistency between minimum heap size and minimum "
-          "generation sizes: using minimum heap = " SIZE_FORMAT,
-          min_heap_byte_size());
+              "generation sizes: using minimum heap = " SIZE_FORMAT,
+              _min_heap_byte_size);
     }
     if ((OldSize > _max_gen1_size)) {
       warning("Inconsistency between maximum heap size and maximum "
-          "generation sizes: using maximum heap = " SIZE_FORMAT
-          " -XX:OldSize flag is being ignored",
-          max_heap_byte_size());
+              "generation sizes: using maximum heap = " SIZE_FORMAT
+              " -XX:OldSize flag is being ignored",
+              _max_heap_byte_size);
     }
     // If there is an inconsistency between the OldSize and the minimum and/or
     // initial size of gen0, since OldSize was explicitly set, OldSize wins.
     if (adjust_gen0_sizes(&_min_gen0_size, &_min_gen1_size,
-                          min_heap_byte_size(), OldSize)) {
+                          _min_heap_byte_size, OldSize)) {
       if (PrintGCDetails && Verbose) {
         gclog_or_tty->print_cr("2: Minimum gen0 " SIZE_FORMAT "  Initial gen0 "
               SIZE_FORMAT "  Maximum gen0 " SIZE_FORMAT,
-              min_gen0_size(), initial_gen0_size(), max_gen0_size());
+              _min_gen0_size, _initial_gen0_size, _max_gen0_size);
       }
     }
     // Initial size
     if (adjust_gen0_sizes(&_initial_gen0_size, &_initial_gen1_size,
-                         initial_heap_byte_size(), OldSize)) {
+                          _initial_heap_byte_size, OldSize)) {
       if (PrintGCDetails && Verbose) {
         gclog_or_tty->print_cr("3: Minimum gen0 " SIZE_FORMAT "  Initial gen0 "
           SIZE_FORMAT "  Maximum gen0 " SIZE_FORMAT,
-          min_gen0_size(), initial_gen0_size(), max_gen0_size());
+          _min_gen0_size, _initial_gen0_size, _max_gen0_size);
       }
     }
   }
   // Enforce the maximum gen1 size.
-  set_min_gen1_size(MIN2(_min_gen1_size, _max_gen1_size));
+  _min_gen1_size = MIN2(_min_gen1_size, _max_gen1_size);
 
   // Check that min gen1 <= initial gen1 <= max gen1
-  set_initial_gen1_size(MAX2(_initial_gen1_size, _min_gen1_size));
-  set_initial_gen1_size(MIN2(_initial_gen1_size, _max_gen1_size));
+  _initial_gen1_size = MAX2(_initial_gen1_size, _min_gen1_size);
+  _initial_gen1_size = MIN2(_initial_gen1_size, _max_gen1_size);
 
   if (PrintGCDetails && Verbose) {
     gclog_or_tty->print_cr("Minimum gen1 " SIZE_FORMAT "  Initial gen1 "
       SIZE_FORMAT "  Maximum gen1 " SIZE_FORMAT,
-      min_gen1_size(), initial_gen1_size(), max_gen1_size());
+      _min_gen1_size, _initial_gen1_size, _max_gen1_size);
   }
 }
 
diff --git a/hotspot/src/share/vm/memory/collectorPolicy.hpp b/hotspot/src/share/vm/memory/collectorPolicy.hpp
index 73fd177..42976b3 100644
--- a/hotspot/src/share/vm/memory/collectorPolicy.hpp
+++ b/hotspot/src/share/vm/memory/collectorPolicy.hpp
@@ -101,17 +101,12 @@
   // Return maximum heap alignment that may be imposed by the policy
   static size_t compute_max_alignment();
 
-  void set_min_alignment(size_t align)         { _min_alignment = align; }
   size_t min_alignment()                       { return _min_alignment; }
-  void set_max_alignment(size_t align)         { _max_alignment = align; }
   size_t max_alignment()                       { return _max_alignment; }
 
   size_t initial_heap_byte_size() { return _initial_heap_byte_size; }
-  void set_initial_heap_byte_size(size_t v) { _initial_heap_byte_size = v; }
   size_t max_heap_byte_size()     { return _max_heap_byte_size; }
-  void set_max_heap_byte_size(size_t v) { _max_heap_byte_size = v; }
   size_t min_heap_byte_size()     { return _min_heap_byte_size; }
-  void set_min_heap_byte_size(size_t v) { _min_heap_byte_size = v; }
 
   enum Name {
     CollectorPolicyKind,
@@ -248,12 +243,9 @@
 
  public:
   // Accessors
-  size_t min_gen0_size() { return _min_gen0_size; }
-  void set_min_gen0_size(size_t v) { _min_gen0_size = v; }
+  size_t min_gen0_size()     { return _min_gen0_size; }
   size_t initial_gen0_size() { return _initial_gen0_size; }
-  void set_initial_gen0_size(size_t v) { _initial_gen0_size = v; }
-  size_t max_gen0_size() { return _max_gen0_size; }
-  void set_max_gen0_size(size_t v) { _max_gen0_size = v; }
+  size_t max_gen0_size()     { return _max_gen0_size; }
 
   virtual int number_of_generations() = 0;
 
@@ -302,12 +294,9 @@
 
  public:
   // Accessors
-  size_t min_gen1_size() { return _min_gen1_size; }
-  void set_min_gen1_size(size_t v) { _min_gen1_size = v; }
+  size_t min_gen1_size()     { return _min_gen1_size; }
   size_t initial_gen1_size() { return _initial_gen1_size; }
-  void set_initial_gen1_size(size_t v) { _initial_gen1_size = v; }
-  size_t max_gen1_size() { return _max_gen1_size; }
-  void set_max_gen1_size(size_t v) { _max_gen1_size = v; }
+  size_t max_gen1_size()     { return _max_gen1_size; }
 
   // Inherited methods
   TwoGenerationCollectorPolicy* as_two_generation_policy() { return this; }
diff --git a/hotspot/src/share/vm/memory/filemap.hpp b/hotspot/src/share/vm/memory/filemap.hpp
index 8d7535e..0c93c87 100644
--- a/hotspot/src/share/vm/memory/filemap.hpp
+++ b/hotspot/src/share/vm/memory/filemap.hpp
@@ -26,6 +26,7 @@
 #define SHARE_VM_MEMORY_FILEMAP_HPP
 
 #include "memory/metaspaceShared.hpp"
+#include "memory/metaspace.hpp"
 
 // Layout of the file:
 //  header: dump of archive instance plus versioning info, datestamp, etc.
diff --git a/hotspot/src/share/vm/memory/heapInspection.hpp b/hotspot/src/share/vm/memory/heapInspection.hpp
index c33ed09..25e4389 100644
--- a/hotspot/src/share/vm/memory/heapInspection.hpp
+++ b/hotspot/src/share/vm/memory/heapInspection.hpp
@@ -73,6 +73,10 @@
         "Number of bytes used by the InstanceKlass::methods() array") \
     f(method_ordering_bytes, IK_method_ordering, \
         "Number of bytes used by the InstanceKlass::method_ordering() array") \
+    f(default_methods_array_bytes, IK_default_methods, \
+        "Number of bytes used by the InstanceKlass::default_methods() array") \
+    f(default_vtable_indices_bytes, IK_default_vtable_indices, \
+        "Number of bytes used by the InstanceKlass::default_vtable_indices() array") \
     f(local_interfaces_bytes, IK_local_interfaces, \
         "Number of bytes used by the InstanceKlass::local_interfaces() array") \
     f(transitive_interfaces_bytes, IK_transitive_interfaces, \
diff --git a/hotspot/src/share/vm/memory/metaspace.cpp b/hotspot/src/share/vm/memory/metaspace.cpp
index 7b91449..832bd6d 100644
--- a/hotspot/src/share/vm/memory/metaspace.cpp
+++ b/hotspot/src/share/vm/memory/metaspace.cpp
@@ -29,17 +29,21 @@
 #include "memory/collectorPolicy.hpp"
 #include "memory/filemap.hpp"
 #include "memory/freeList.hpp"
+#include "memory/gcLocker.hpp"
 #include "memory/metablock.hpp"
 #include "memory/metachunk.hpp"
 #include "memory/metaspace.hpp"
 #include "memory/metaspaceShared.hpp"
 #include "memory/resourceArea.hpp"
 #include "memory/universe.hpp"
+#include "runtime/atomic.inline.hpp"
 #include "runtime/globals.hpp"
+#include "runtime/init.hpp"
 #include "runtime/java.hpp"
 #include "runtime/mutex.hpp"
 #include "runtime/orderAccess.hpp"
 #include "services/memTracker.hpp"
+#include "services/memoryService.hpp"
 #include "utilities/copy.hpp"
 #include "utilities/debug.hpp"
 
@@ -84,13 +88,7 @@
   return (ChunkIndex) (i+1);
 }
 
-// Originally _capacity_until_GC was set to MetaspaceSize here but
-// the default MetaspaceSize before argument processing was being
-// used which was not the desired value.  See the code
-// in should_expand() to see how the initialization is handled
-// now.
-size_t MetaspaceGC::_capacity_until_GC = 0;
-bool MetaspaceGC::_expand_after_GC = false;
+volatile intptr_t MetaspaceGC::_capacity_until_GC = 0;
 uint MetaspaceGC::_shrink_factor = 0;
 bool MetaspaceGC::_should_concurrent_collect = false;
 
@@ -293,9 +291,10 @@
   MetaWord* end() const { return (MetaWord*) _virtual_space.high(); }
 
   size_t reserved_words() const  { return _virtual_space.reserved_size() / BytesPerWord; }
-  size_t expanded_words() const  { return _virtual_space.committed_size() / BytesPerWord; }
   size_t committed_words() const { return _virtual_space.actual_committed_size() / BytesPerWord; }
 
+  bool is_pre_committed() const { return _virtual_space.special(); }
+
   // address of next available space in _virtual_space;
   // Accessors
   VirtualSpaceNode* next() { return _next; }
@@ -337,7 +336,7 @@
 
   // Expands/shrinks the committed space in a virtual space.  Delegates
   // to Virtualspace
-  bool expand_by(size_t words, bool pre_touch = false);
+  bool expand_by(size_t min_words, size_t preferred_words);
 
   // In preparation for deleting this node, remove all the chunks
   // in the node from any freelist.
@@ -351,29 +350,64 @@
   void print_on(outputStream* st) const;
 };
 
+#define assert_is_ptr_aligned(ptr, alignment) \
+  assert(is_ptr_aligned(ptr, alignment),      \
+    err_msg(PTR_FORMAT " is not aligned to "  \
+      SIZE_FORMAT, ptr, alignment))
+
+#define assert_is_size_aligned(size, alignment) \
+  assert(is_size_aligned(size, alignment),      \
+    err_msg(SIZE_FORMAT " is not aligned to "   \
+       SIZE_FORMAT, size, alignment))
+
+
+// Decide if large pages should be committed when the memory is reserved.
+static bool should_commit_large_pages_when_reserving(size_t bytes) {
+  if (UseLargePages && UseLargePagesInMetaspace && !os::can_commit_large_page_memory()) {
+    size_t words = bytes / BytesPerWord;
+    bool is_class = false; // We never reserve large pages for the class space.
+    if (MetaspaceGC::can_expand(words, is_class) &&
+        MetaspaceGC::allowed_expansion() >= words) {
+      return true;
+    }
+  }
+
+  return false;
+}
+
   // byte_size is the size of the associated virtualspace.
-VirtualSpaceNode::VirtualSpaceNode(size_t byte_size) : _top(NULL), _next(NULL), _rs(), _container_count(0) {
-  // align up to vm allocation granularity
-  byte_size = align_size_up(byte_size, os::vm_allocation_granularity());
+VirtualSpaceNode::VirtualSpaceNode(size_t bytes) : _top(NULL), _next(NULL), _rs(), _container_count(0) {
+  assert_is_size_aligned(bytes, Metaspace::reserve_alignment());
 
   // This allocates memory with mmap.  For DumpSharedspaces, try to reserve
   // configurable address, generally at the top of the Java heap so other
   // memory addresses don't conflict.
   if (DumpSharedSpaces) {
-    char* shared_base = (char*)SharedBaseAddress;
-    _rs = ReservedSpace(byte_size, 0, false, shared_base, 0);
+    bool large_pages = false; // No large pages when dumping the CDS archive.
+    char* shared_base = (char*)align_ptr_up((char*)SharedBaseAddress, Metaspace::reserve_alignment());
+
+    _rs = ReservedSpace(bytes, Metaspace::reserve_alignment(), large_pages, shared_base, 0);
     if (_rs.is_reserved()) {
       assert(shared_base == 0 || _rs.base() == shared_base, "should match");
     } else {
       // Get a mmap region anywhere if the SharedBaseAddress fails.
-      _rs = ReservedSpace(byte_size);
+      _rs = ReservedSpace(bytes, Metaspace::reserve_alignment(), large_pages);
     }
     MetaspaceShared::set_shared_rs(&_rs);
   } else {
-    _rs = ReservedSpace(byte_size);
+    bool large_pages = should_commit_large_pages_when_reserving(bytes);
+
+    _rs = ReservedSpace(bytes, Metaspace::reserve_alignment(), large_pages);
   }
 
-  MemTracker::record_virtual_memory_type((address)_rs.base(), mtClass);
+  if (_rs.is_reserved()) {
+    assert(_rs.base() != NULL, "Catch if we get a NULL address");
+    assert(_rs.size() != 0, "Catch if we get a 0 size");
+    assert_is_ptr_aligned(_rs.base(), Metaspace::reserve_alignment());
+    assert_is_size_aligned(_rs.size(), Metaspace::reserve_alignment());
+
+    MemTracker::record_virtual_memory_type((address)_rs.base(), mtClass);
+  }
 }
 
 void VirtualSpaceNode::purge(ChunkManager* chunk_manager) {
@@ -410,8 +444,6 @@
 #endif
 
 // List of VirtualSpaces for metadata allocation.
-// It has a  _next link for singly linked list and a MemRegion
-// for total space in the VirtualSpace.
 class VirtualSpaceList : public CHeapObj<mtClass> {
   friend class VirtualSpaceNode;
 
@@ -419,16 +451,13 @@
     VirtualSpaceSize = 256 * K
   };
 
-  // Global list of virtual spaces
   // Head of the list
   VirtualSpaceNode* _virtual_space_list;
   // virtual space currently being used for allocations
   VirtualSpaceNode* _current_virtual_space;
 
-  // Can this virtual list allocate >1 spaces?  Also, used to determine
-  // whether to allocate unlimited small chunks in this virtual space
+  // Is this VirtualSpaceList used for the compressed class space
   bool _is_class;
-  bool can_grow() const { return !is_class() || !UseCompressedClassPointers; }
 
   // Sum of reserved and committed memory in the virtual spaces
   size_t _reserved_words;
@@ -453,7 +482,7 @@
   // Get another virtual space and add it to the list.  This
   // is typically prompted by a failed attempt to allocate a chunk
   // and is typically followed by the allocation of a chunk.
-  bool grow_vs(size_t vs_word_size);
+  bool create_new_virtual_space(size_t vs_word_size);
 
  public:
   VirtualSpaceList(size_t word_size);
@@ -465,12 +494,12 @@
                            size_t grow_chunks_by_words,
                            size_t medium_chunk_bunch);
 
-  bool expand_by(VirtualSpaceNode* node, size_t word_size, bool pre_touch = false);
+  bool expand_node_by(VirtualSpaceNode* node,
+                      size_t min_words,
+                      size_t preferred_words);
 
-  // Get the first chunk for a Metaspace.  Used for
-  // special cases such as the boot class loader, reflection
-  // class loader and anonymous class loader.
-  Metachunk* get_initialization_chunk(size_t word_size, size_t chunk_bunch);
+  bool expand_by(size_t min_words,
+                 size_t preferred_words);
 
   VirtualSpaceNode* current_virtual_space() {
     return _current_virtual_space;
@@ -478,8 +507,7 @@
 
   bool is_class() const { return _is_class; }
 
-  // Allocate the first virtualspace.
-  void initialize(size_t word_size);
+  bool initialization_succeeded() { return _virtual_space_list != NULL; }
 
   size_t reserved_words()  { return _reserved_words; }
   size_t reserved_bytes()  { return reserved_words() * BytesPerWord; }
@@ -708,6 +736,9 @@
   // and allocates from that chunk.
   MetaWord* grow_and_allocate(size_t word_size);
 
+  // Notify memory usage to MemoryService.
+  void track_metaspace_memory_usage();
+
   // debugging support.
 
   void dump(outputStream* const out) const;
@@ -869,6 +900,12 @@
   MetaWord* chunk_limit = top();
   assert(chunk_limit != NULL, "Not safe to call this method");
 
+  // The virtual spaces are always expanded by the
+  // commit granularity to enforce the following condition.
+  // Without this the is_available check will not work correctly.
+  assert(_virtual_space.committed_size() == _virtual_space.actual_committed_size(),
+      "The committed memory doesn't match the expanded memory.");
+
   if (!is_available(chunk_word_size)) {
     if (TraceMetadataChunkAllocation) {
       gclog_or_tty->print("VirtualSpaceNode::take_from_committed() not available %d words ", chunk_word_size);
@@ -888,14 +925,21 @@
 
 
 // Expand the virtual space (commit more of the reserved space)
-bool VirtualSpaceNode::expand_by(size_t words, bool pre_touch) {
-  size_t bytes = words * BytesPerWord;
-  bool result =  virtual_space()->expand_by(bytes, pre_touch);
-  if (TraceMetavirtualspaceAllocation && !result) {
-    gclog_or_tty->print_cr("VirtualSpaceNode::expand_by() failed "
-                           "for byte size " SIZE_FORMAT, bytes);
-    virtual_space()->print_on(gclog_or_tty);
+bool VirtualSpaceNode::expand_by(size_t min_words, size_t preferred_words) {
+  size_t min_bytes = min_words * BytesPerWord;
+  size_t preferred_bytes = preferred_words * BytesPerWord;
+
+  size_t uncommitted = virtual_space()->reserved_size() - virtual_space()->actual_committed_size();
+
+  if (uncommitted < min_bytes) {
+    return false;
   }
+
+  size_t commit = MIN2(preferred_bytes, uncommitted);
+  bool result = virtual_space()->expand_by(commit, false);
+
+  assert(result, "Failed to commit memory");
+
   return result;
 }
 
@@ -914,12 +958,23 @@
     return false;
   }
 
-  // An allocation out of this Virtualspace that is larger
-  // than an initial commit size can waste that initial committed
-  // space.
-  size_t committed_byte_size = 0;
-  bool result = virtual_space()->initialize(_rs, committed_byte_size);
+  // These are necessary restriction to make sure that the virtual space always
+  // grows in steps of Metaspace::commit_alignment(). If both base and size are
+  // aligned only the middle alignment of the VirtualSpace is used.
+  assert_is_ptr_aligned(_rs.base(), Metaspace::commit_alignment());
+  assert_is_size_aligned(_rs.size(), Metaspace::commit_alignment());
+
+  // ReservedSpaces marked as special will have the entire memory
+  // pre-committed. Setting a committed size will make sure that
+  // committed_size and actual_committed_size agrees.
+  size_t pre_committed_size = _rs.special() ? _rs.size() : 0;
+
+  bool result = virtual_space()->initialize_with_granularity(_rs, pre_committed_size,
+                                            Metaspace::commit_alignment());
   if (result) {
+    assert(virtual_space()->committed_size() == virtual_space()->actual_committed_size(),
+        "Checking that the pre-committed memory was registered by the VirtualSpace");
+
     set_top((MetaWord*)virtual_space()->low());
     set_reserved(MemRegion((HeapWord*)_rs.base(),
                  (HeapWord*)(_rs.base() + _rs.size())));
@@ -976,13 +1031,23 @@
   _reserved_words = _reserved_words - v;
 }
 
+#define assert_committed_below_limit()                             \
+  assert(MetaspaceAux::committed_bytes() <= MaxMetaspaceSize,      \
+      err_msg("Too much committed memory. Committed: " SIZE_FORMAT \
+              " limit (MaxMetaspaceSize): " SIZE_FORMAT,           \
+          MetaspaceAux::committed_bytes(), MaxMetaspaceSize));
+
 void VirtualSpaceList::inc_committed_words(size_t v) {
   assert_lock_strong(SpaceManager::expand_lock());
   _committed_words = _committed_words + v;
+
+  assert_committed_below_limit();
 }
 void VirtualSpaceList::dec_committed_words(size_t v) {
   assert_lock_strong(SpaceManager::expand_lock());
   _committed_words = _committed_words - v;
+
+  assert_committed_below_limit();
 }
 
 void VirtualSpaceList::inc_virtual_space_count() {
@@ -1025,8 +1090,8 @@
     if (vsl->container_count() == 0 && vsl != current_virtual_space()) {
       // Unlink it from the list
       if (prev_vsl == vsl) {
-        // This is the case of the current note being the first note.
-        assert(vsl == virtual_space_list(), "Expected to be the first note");
+        // This is the case of the current node being the first node.
+        assert(vsl == virtual_space_list(), "Expected to be the first node");
         set_virtual_space_list(vsl->next());
       } else {
         prev_vsl->set_next(vsl->next());
@@ -1054,7 +1119,7 @@
 #endif
 }
 
-VirtualSpaceList::VirtualSpaceList(size_t word_size ) :
+VirtualSpaceList::VirtualSpaceList(size_t word_size) :
                                    _is_class(false),
                                    _virtual_space_list(NULL),
                                    _current_virtual_space(NULL),
@@ -1063,9 +1128,7 @@
                                    _virtual_space_count(0) {
   MutexLockerEx cl(SpaceManager::expand_lock(),
                    Mutex::_no_safepoint_check_flag);
-  bool initialization_succeeded = grow_vs(word_size);
-  assert(initialization_succeeded,
-    " VirtualSpaceList initialization should not fail");
+  create_new_virtual_space(word_size);
 }
 
 VirtualSpaceList::VirtualSpaceList(ReservedSpace rs) :
@@ -1079,8 +1142,9 @@
                    Mutex::_no_safepoint_check_flag);
   VirtualSpaceNode* class_entry = new VirtualSpaceNode(rs);
   bool succeeded = class_entry->initialize();
-  assert(succeeded, " VirtualSpaceList initialization should not fail");
-  link_vs(class_entry);
+  if (succeeded) {
+    link_vs(class_entry);
+  }
 }
 
 size_t VirtualSpaceList::free_bytes() {
@@ -1088,14 +1152,24 @@
 }
 
 // Allocate another meta virtual space and add it to the list.
-bool VirtualSpaceList::grow_vs(size_t vs_word_size) {
+bool VirtualSpaceList::create_new_virtual_space(size_t vs_word_size) {
   assert_lock_strong(SpaceManager::expand_lock());
-  if (vs_word_size == 0) {
+
+  if (is_class()) {
+    assert(false, "We currently don't support more than one VirtualSpace for"
+                  " the compressed class space. The initialization of the"
+                  " CCS uses another code path and should not hit this path.");
     return false;
   }
+
+  if (vs_word_size == 0) {
+    assert(false, "vs_word_size should always be at least _reserve_alignment large.");
+    return false;
+  }
+
   // Reserve the space
   size_t vs_byte_size = vs_word_size * BytesPerWord;
-  assert(vs_byte_size % os::vm_allocation_granularity() == 0, "Not aligned");
+  assert_is_size_aligned(vs_byte_size, Metaspace::reserve_alignment());
 
   // Allocate the meta virtual space and initialize it.
   VirtualSpaceNode* new_entry = new VirtualSpaceNode(vs_byte_size);
@@ -1103,7 +1177,8 @@
     delete new_entry;
     return false;
   } else {
-    assert(new_entry->reserved_words() == vs_word_size, "Must be");
+    assert(new_entry->reserved_words() == vs_word_size,
+        "Reserved memory size differs from requested memory size");
     // ensure lock-free iteration sees fully initialized node
     OrderAccess::storestore();
     link_vs(new_entry);
@@ -1130,20 +1205,67 @@
   }
 }
 
-bool VirtualSpaceList::expand_by(VirtualSpaceNode* node, size_t word_size, bool pre_touch) {
+bool VirtualSpaceList::expand_node_by(VirtualSpaceNode* node,
+                                      size_t min_words,
+                                      size_t preferred_words) {
   size_t before = node->committed_words();
 
-  bool result = node->expand_by(word_size, pre_touch);
+  bool result = node->expand_by(min_words, preferred_words);
 
   size_t after = node->committed_words();
 
   // after and before can be the same if the memory was pre-committed.
-  assert(after >= before, "Must be");
+  assert(after >= before, "Inconsistency");
   inc_committed_words(after - before);
 
   return result;
 }
 
+bool VirtualSpaceList::expand_by(size_t min_words, size_t preferred_words) {
+  assert_is_size_aligned(min_words,       Metaspace::commit_alignment_words());
+  assert_is_size_aligned(preferred_words, Metaspace::commit_alignment_words());
+  assert(min_words <= preferred_words, "Invalid arguments");
+
+  if (!MetaspaceGC::can_expand(min_words, this->is_class())) {
+    return  false;
+  }
+
+  size_t allowed_expansion_words = MetaspaceGC::allowed_expansion();
+  if (allowed_expansion_words < min_words) {
+    return false;
+  }
+
+  size_t max_expansion_words = MIN2(preferred_words, allowed_expansion_words);
+
+  // Commit more memory from the the current virtual space.
+  bool vs_expanded = expand_node_by(current_virtual_space(),
+                                    min_words,
+                                    max_expansion_words);
+  if (vs_expanded) {
+    return true;
+  }
+
+  // Get another virtual space.
+  size_t grow_vs_words = MAX2((size_t)VirtualSpaceSize, preferred_words);
+  grow_vs_words = align_size_up(grow_vs_words, Metaspace::reserve_alignment_words());
+
+  if (create_new_virtual_space(grow_vs_words)) {
+    if (current_virtual_space()->is_pre_committed()) {
+      // The memory was pre-committed, so we are done here.
+      assert(min_words <= current_virtual_space()->committed_words(),
+          "The new VirtualSpace was pre-committed, so it"
+          "should be large enough to fit the alloc request.");
+      return true;
+    }
+
+    return expand_node_by(current_virtual_space(),
+                          min_words,
+                          max_expansion_words);
+  }
+
+  return false;
+}
+
 Metachunk* VirtualSpaceList::get_new_chunk(size_t word_size,
                                            size_t grow_chunks_by_words,
                                            size_t medium_chunk_bunch) {
@@ -1151,63 +1273,27 @@
   // Allocate a chunk out of the current virtual space.
   Metachunk* next = current_virtual_space()->get_chunk_vs(grow_chunks_by_words);
 
-  if (next == NULL) {
-    // Not enough room in current virtual space.  Try to commit
-    // more space.
-    size_t expand_vs_by_words = MAX2(medium_chunk_bunch,
-                                     grow_chunks_by_words);
-    size_t page_size_words = os::vm_page_size() / BytesPerWord;
-    size_t aligned_expand_vs_by_words = align_size_up(expand_vs_by_words,
-                                                        page_size_words);
-    bool vs_expanded =
-      expand_by(current_virtual_space(), aligned_expand_vs_by_words);
-    if (!vs_expanded) {
-      // Should the capacity of the metaspaces be expanded for
-      // this allocation?  If it's the virtual space for classes and is
-      // being used for CompressedHeaders, don't allocate a new virtualspace.
-      if (can_grow() && MetaspaceGC::should_expand(this, word_size)) {
-        // Get another virtual space.
-        size_t allocation_aligned_expand_words =
-            align_size_up(aligned_expand_vs_by_words, os::vm_allocation_granularity() / BytesPerWord);
-        size_t grow_vs_words =
-            MAX2((size_t)VirtualSpaceSize, allocation_aligned_expand_words);
-        if (grow_vs(grow_vs_words)) {
-          // Got it.  It's on the list now.  Get a chunk from it.
-          assert(current_virtual_space()->expanded_words() == 0,
-              "New virtual space nodes should not have expanded");
-
-          size_t grow_chunks_by_words_aligned = align_size_up(grow_chunks_by_words,
-                                                              page_size_words);
-          // We probably want to expand by aligned_expand_vs_by_words here.
-          expand_by(current_virtual_space(), grow_chunks_by_words_aligned);
-          next = current_virtual_space()->get_chunk_vs(grow_chunks_by_words);
-        }
-      } else {
-        // Allocation will fail and induce a GC
-        if (TraceMetadataChunkAllocation && Verbose) {
-          gclog_or_tty->print_cr("VirtualSpaceList::get_new_chunk():"
-            " Fail instead of expand the metaspace");
-        }
-      }
-    } else {
-      // The virtual space expanded, get a new chunk
-      next = current_virtual_space()->get_chunk_vs(grow_chunks_by_words);
-      assert(next != NULL, "Just expanded, should succeed");
-    }
+  if (next != NULL) {
+    return next;
   }
 
-  assert(next == NULL || (next->next() == NULL && next->prev() == NULL),
-         "New chunk is still on some list");
-  return next;
-}
+  // The expand amount is currently only determined by the requested sizes
+  // and not how much committed memory is left in the current virtual space.
 
-Metachunk* VirtualSpaceList::get_initialization_chunk(size_t chunk_word_size,
-                                                      size_t chunk_bunch) {
-  // Get a chunk from the chunk freelist
-  Metachunk* new_chunk = get_new_chunk(chunk_word_size,
-                                       chunk_word_size,
-                                       chunk_bunch);
-  return new_chunk;
+  size_t min_word_size       = align_size_up(grow_chunks_by_words, Metaspace::commit_alignment_words());
+  size_t preferred_word_size = align_size_up(medium_chunk_bunch,   Metaspace::commit_alignment_words());
+  if (min_word_size >= preferred_word_size) {
+    // Can happen when humongous chunks are allocated.
+    preferred_word_size = min_word_size;
+  }
+
+  bool expanded = expand_by(min_word_size, preferred_word_size);
+  if (expanded) {
+    next = current_virtual_space()->get_chunk_vs(grow_chunks_by_words);
+    assert(next != NULL, "The allocation was expected to succeed after the expansion");
+  }
+
+   return next;
 }
 
 void VirtualSpaceList::print_on(outputStream* st) const {
@@ -1256,96 +1342,96 @@
 // Calculate the amount to increase the high water mark (HWM).
 // Increase by a minimum amount (MinMetaspaceExpansion) so that
 // another expansion is not requested too soon.  If that is not
-// enough to satisfy the allocation (i.e. big enough for a word_size
-// allocation), increase by MaxMetaspaceExpansion.  If that is still
-// not enough, expand by the size of the allocation (word_size) plus
-// some.
-size_t MetaspaceGC::delta_capacity_until_GC(size_t word_size) {
-  size_t before_inc = MetaspaceGC::capacity_until_GC();
-  size_t min_delta_words = MinMetaspaceExpansion / BytesPerWord;
-  size_t max_delta_words = MaxMetaspaceExpansion / BytesPerWord;
-  size_t page_size_words = os::vm_page_size() / BytesPerWord;
-  size_t size_delta_words = align_size_up(word_size, page_size_words);
-  size_t delta_words = MAX2(size_delta_words, min_delta_words);
-  if (delta_words > min_delta_words) {
+// enough to satisfy the allocation, increase by MaxMetaspaceExpansion.
+// If that is still not enough, expand by the size of the allocation
+// plus some.
+size_t MetaspaceGC::delta_capacity_until_GC(size_t bytes) {
+  size_t min_delta = MinMetaspaceExpansion;
+  size_t max_delta = MaxMetaspaceExpansion;
+  size_t delta = align_size_up(bytes, Metaspace::commit_alignment());
+
+  if (delta <= min_delta) {
+    delta = min_delta;
+  } else if (delta <= max_delta) {
     // Don't want to hit the high water mark on the next
     // allocation so make the delta greater than just enough
     // for this allocation.
-    delta_words = MAX2(delta_words, max_delta_words);
-    if (delta_words > max_delta_words) {
-      // This allocation is large but the next ones are probably not
-      // so increase by the minimum.
-      delta_words = delta_words + min_delta_words;
-    }
-  }
-  return delta_words;
-}
-
-bool MetaspaceGC::should_expand(VirtualSpaceList* vsl, size_t word_size) {
-
-  // If the user wants a limit, impose one.
-  // The reason for someone using this flag is to limit reserved space.  So
-  // for non-class virtual space, compare against virtual spaces that are reserved.
-  // For class virtual space, we only compare against the committed space, not
-  // reserved space, because this is a larger space prereserved for compressed
-  // class pointers.
-  if (!FLAG_IS_DEFAULT(MaxMetaspaceSize)) {
-    size_t nonclass_allocated = MetaspaceAux::reserved_bytes(Metaspace::NonClassType);
-    size_t class_allocated    = MetaspaceAux::allocated_capacity_bytes(Metaspace::ClassType);
-    size_t real_allocated     = nonclass_allocated + class_allocated;
-    if (real_allocated >= MaxMetaspaceSize) {
-      return false;
-    }
-  }
-
-  // Class virtual space should always be expanded.  Call GC for the other
-  // metadata virtual space.
-  if (Metaspace::using_class_space() &&
-      (vsl == Metaspace::class_space_list())) return true;
-
-  // If this is part of an allocation after a GC, expand
-  // unconditionally.
-  if (MetaspaceGC::expand_after_GC()) {
-    return true;
-  }
-
-
-  // If the capacity is below the minimum capacity, allow the
-  // expansion.  Also set the high-water-mark (capacity_until_GC)
-  // to that minimum capacity so that a GC will not be induced
-  // until that minimum capacity is exceeded.
-  size_t committed_capacity_bytes = MetaspaceAux::allocated_capacity_bytes();
-  size_t metaspace_size_bytes = MetaspaceSize;
-  if (committed_capacity_bytes < metaspace_size_bytes ||
-      capacity_until_GC() == 0) {
-    set_capacity_until_GC(metaspace_size_bytes);
-    return true;
+    delta = max_delta;
   } else {
-    if (committed_capacity_bytes < capacity_until_GC()) {
-      return true;
-    } else {
-      if (TraceMetadataChunkAllocation && Verbose) {
-        gclog_or_tty->print_cr("  allocation request size " SIZE_FORMAT
-                        "  capacity_until_GC " SIZE_FORMAT
-                        "  allocated_capacity_bytes " SIZE_FORMAT,
-                        word_size,
-                        capacity_until_GC(),
-                        MetaspaceAux::allocated_capacity_bytes());
-      }
+    // This allocation is large but the next ones are probably not
+    // so increase by the minimum.
+    delta = delta + min_delta;
+  }
+
+  assert_is_size_aligned(delta, Metaspace::commit_alignment());
+
+  return delta;
+}
+
+size_t MetaspaceGC::capacity_until_GC() {
+  size_t value = (size_t)OrderAccess::load_ptr_acquire(&_capacity_until_GC);
+  assert(value >= MetaspaceSize, "Not initialied properly?");
+  return value;
+}
+
+size_t MetaspaceGC::inc_capacity_until_GC(size_t v) {
+  assert_is_size_aligned(v, Metaspace::commit_alignment());
+
+  return (size_t)Atomic::add_ptr(v, &_capacity_until_GC);
+}
+
+size_t MetaspaceGC::dec_capacity_until_GC(size_t v) {
+  assert_is_size_aligned(v, Metaspace::commit_alignment());
+
+  return (size_t)Atomic::add_ptr(-(intptr_t)v, &_capacity_until_GC);
+}
+
+bool MetaspaceGC::can_expand(size_t word_size, bool is_class) {
+  // Check if the compressed class space is full.
+  if (is_class && Metaspace::using_class_space()) {
+    size_t class_committed = MetaspaceAux::committed_bytes(Metaspace::ClassType);
+    if (class_committed + word_size * BytesPerWord > CompressedClassSpaceSize) {
       return false;
     }
   }
+
+  // Check if the user has imposed a limit on the metaspace memory.
+  size_t committed_bytes = MetaspaceAux::committed_bytes();
+  if (committed_bytes + word_size * BytesPerWord > MaxMetaspaceSize) {
+    return false;
+  }
+
+  return true;
 }
 
+size_t MetaspaceGC::allowed_expansion() {
+  size_t committed_bytes = MetaspaceAux::committed_bytes();
 
+  size_t left_until_max  = MaxMetaspaceSize - committed_bytes;
+
+  // Always grant expansion if we are initiating the JVM,
+  // or if the GC_locker is preventing GCs.
+  if (!is_init_completed() || GC_locker::is_active_and_needs_gc()) {
+    return left_until_max / BytesPerWord;
+  }
+
+  size_t capacity_until_gc = capacity_until_GC();
+
+  if (capacity_until_gc <= committed_bytes) {
+    return 0;
+  }
+
+  size_t left_until_GC = capacity_until_gc - committed_bytes;
+  size_t left_to_commit = MIN2(left_until_GC, left_until_max);
+
+  return left_to_commit / BytesPerWord;
+}
 
 void MetaspaceGC::compute_new_size() {
   assert(_shrink_factor <= 100, "invalid shrink factor");
   uint current_shrink_factor = _shrink_factor;
   _shrink_factor = 0;
 
-  // Until a faster way of calculating the "used" quantity is implemented,
-  // use "capacity".
   const size_t used_after_gc = MetaspaceAux::allocated_capacity_bytes();
   const size_t capacity_until_GC = MetaspaceGC::capacity_until_GC();
 
@@ -1377,9 +1463,10 @@
     // If we have less capacity below the metaspace HWM, then
     // increment the HWM.
     size_t expand_bytes = minimum_desired_capacity - capacity_until_GC;
+    expand_bytes = align_size_up(expand_bytes, Metaspace::commit_alignment());
     // Don't expand unless it's significant
     if (expand_bytes >= MinMetaspaceExpansion) {
-      MetaspaceGC::set_capacity_until_GC(capacity_until_GC + expand_bytes);
+      MetaspaceGC::inc_capacity_until_GC(expand_bytes);
     }
     if (PrintGCDetails && Verbose) {
       size_t new_capacity_until_GC = capacity_until_GC;
@@ -1436,6 +1523,9 @@
       // on the third call, and 100% by the fourth call.  But if we recompute
       // size without shrinking, it goes back to 0%.
       shrink_bytes = shrink_bytes / 100 * current_shrink_factor;
+
+      shrink_bytes = align_size_down(shrink_bytes, Metaspace::commit_alignment());
+
       assert(shrink_bytes <= max_shrink_bytes,
         err_msg("invalid shrink size " SIZE_FORMAT " not <= " SIZE_FORMAT,
           shrink_bytes, max_shrink_bytes));
@@ -1467,7 +1557,7 @@
   // Don't shrink unless it's significant
   if (shrink_bytes >= MinMetaspaceExpansion &&
       ((capacity_until_GC - shrink_bytes) >= MetaspaceSize)) {
-    MetaspaceGC::set_capacity_until_GC(capacity_until_GC - shrink_bytes);
+    MetaspaceGC::dec_capacity_until_GC(shrink_bytes);
   }
 }
 
@@ -1700,7 +1790,6 @@
     assert(free_list != NULL, "Sanity check");
 
     chunk = free_list->head();
-    debug_only(Metachunk* debug_head = chunk;)
 
     if (chunk == NULL) {
       return NULL;
@@ -1709,9 +1798,6 @@
     // Remove the chunk as the head of the list.
     free_list->remove_chunk(chunk);
 
-    // Chunk is being removed from the chunks free list.
-    dec_free_chunks_total(chunk->capacity_word_size());
-
     if (TraceMetadataChunkAllocation && Verbose) {
       gclog_or_tty->print_cr("ChunkManager::free_chunks_get: free_list "
                              PTR_FORMAT " head " PTR_FORMAT " size " SIZE_FORMAT,
@@ -1722,21 +1808,22 @@
       word_size,
       FreeBlockDictionary<Metachunk>::atLeast);
 
-    if (chunk != NULL) {
-      if (TraceMetadataHumongousAllocation) {
-        size_t waste = chunk->word_size() - word_size;
-        gclog_or_tty->print_cr("Free list allocate humongous chunk size "
-                               SIZE_FORMAT " for requested size " SIZE_FORMAT
-                               " waste " SIZE_FORMAT,
-                               chunk->word_size(), word_size, waste);
-      }
-      // Chunk is being removed from the chunks free list.
-      dec_free_chunks_total(chunk->capacity_word_size());
-    } else {
+    if (chunk == NULL) {
       return NULL;
     }
+
+    if (TraceMetadataHumongousAllocation) {
+      size_t waste = chunk->word_size() - word_size;
+      gclog_or_tty->print_cr("Free list allocate humongous chunk size "
+                             SIZE_FORMAT " for requested size " SIZE_FORMAT
+                             " waste " SIZE_FORMAT,
+                             chunk->word_size(), word_size, waste);
+    }
   }
 
+  // Chunk is being removed from the chunks free list.
+  dec_free_chunks_total(chunk->capacity_word_size());
+
   // Remove it from the links to this freelist
   chunk->set_next(NULL);
   chunk->set_prev(NULL);
@@ -1977,6 +2064,15 @@
   return chunk_word_size;
 }
 
+void SpaceManager::track_metaspace_memory_usage() {
+  if (is_init_completed()) {
+    if (is_class()) {
+      MemoryService::track_compressed_class_memory_usage();
+    }
+    MemoryService::track_metaspace_memory_usage();
+  }
+}
+
 MetaWord* SpaceManager::grow_and_allocate(size_t word_size) {
   assert(vs_list()->current_virtual_space() != NULL,
          "Should have been set");
@@ -2002,15 +2098,24 @@
   size_t grow_chunks_by_words = calc_chunk_size(word_size);
   Metachunk* next = get_new_chunk(word_size, grow_chunks_by_words);
 
+  if (next != NULL) {
+    Metadebug::deallocate_chunk_a_lot(this, grow_chunks_by_words);
+  }
+
+  MetaWord* mem = NULL;
+
   // If a chunk was available, add it to the in-use chunk list
   // and do an allocation from it.
   if (next != NULL) {
-    Metadebug::deallocate_chunk_a_lot(this, grow_chunks_by_words);
     // Add to this manager's list of chunks in use.
     add_chunk(next, false);
-    return next->allocate(word_size);
+    mem = next->allocate(word_size);
   }
-  return NULL;
+
+  // Track metaspace memory usage statistic.
+  track_metaspace_memory_usage();
+
+  return mem;
 }
 
 void SpaceManager::print_on(outputStream* st) const {
@@ -2366,6 +2471,7 @@
     inc_used_metrics(word_size);
     return current_chunk()->allocate(word_size); // caller handles null result
   }
+
   if (current_chunk() != NULL) {
     result = current_chunk()->allocate(word_size);
   }
@@ -2373,7 +2479,8 @@
   if (result == NULL) {
     result = grow_and_allocate(word_size);
   }
-  if (result != 0) {
+
+  if (result != NULL) {
     inc_used_metrics(word_size);
     assert(result != (MetaWord*) chunks_in_use(MediumIndex),
            "Head of the list is being allocated");
@@ -2639,24 +2746,26 @@
 void MetaspaceAux::print_on(outputStream* out) {
   Metaspace::MetadataType nct = Metaspace::NonClassType;
 
-  out->print_cr(" Metaspace total "
-                SIZE_FORMAT "K, used " SIZE_FORMAT "K,"
-                " reserved " SIZE_FORMAT "K",
-                allocated_capacity_bytes()/K, allocated_used_bytes()/K, reserved_bytes()/K);
+  out->print_cr(" Metaspace       "
+                "used "      SIZE_FORMAT "K, "
+                "capacity "  SIZE_FORMAT "K, "
+                "committed " SIZE_FORMAT "K, "
+                "reserved "  SIZE_FORMAT "K",
+                allocated_used_bytes()/K,
+                allocated_capacity_bytes()/K,
+                committed_bytes()/K,
+                reserved_bytes()/K);
 
-  out->print_cr("  data space     "
-                SIZE_FORMAT "K, used " SIZE_FORMAT "K,"
-                " reserved " SIZE_FORMAT "K",
-                allocated_capacity_bytes(nct)/K,
-                allocated_used_bytes(nct)/K,
-                reserved_bytes(nct)/K);
   if (Metaspace::using_class_space()) {
     Metaspace::MetadataType ct = Metaspace::ClassType;
     out->print_cr("  class space    "
-                  SIZE_FORMAT "K, used " SIZE_FORMAT "K,"
-                  " reserved " SIZE_FORMAT "K",
-                  allocated_capacity_bytes(ct)/K,
+                  "used "      SIZE_FORMAT "K, "
+                  "capacity "  SIZE_FORMAT "K, "
+                  "committed " SIZE_FORMAT "K, "
+                  "reserved "  SIZE_FORMAT "K",
                   allocated_used_bytes(ct)/K,
+                  allocated_capacity_bytes(ct)/K,
+                  committed_bytes(ct)/K,
                   reserved_bytes(ct)/K);
   }
 }
@@ -2808,6 +2917,9 @@
 size_t Metaspace::_first_chunk_word_size = 0;
 size_t Metaspace::_first_class_chunk_word_size = 0;
 
+size_t Metaspace::_commit_alignment = 0;
+size_t Metaspace::_reserve_alignment = 0;
+
 Metaspace::Metaspace(Mutex* lock, MetaspaceType type) {
   initialize(lock, type);
 }
@@ -2869,21 +2981,30 @@
   assert(UseCompressedClassPointers, "Only use with CompressedKlassPtrs");
   assert(class_metaspace_size() < KlassEncodingMetaspaceMax,
          "Metaspace size is too big");
+  assert_is_ptr_aligned(requested_addr,          _reserve_alignment);
+  assert_is_ptr_aligned(cds_base,                _reserve_alignment);
+  assert_is_size_aligned(class_metaspace_size(), _reserve_alignment);
+
+  // Don't use large pages for the class space.
+  bool large_pages = false;
 
   ReservedSpace metaspace_rs = ReservedSpace(class_metaspace_size(),
-                                             os::vm_allocation_granularity(),
-                                             false, requested_addr, 0);
+                                             _reserve_alignment,
+                                             large_pages,
+                                             requested_addr, 0);
   if (!metaspace_rs.is_reserved()) {
     if (UseSharedSpaces) {
+      size_t increment = align_size_up(1*G, _reserve_alignment);
+
       // Keep trying to allocate the metaspace, increasing the requested_addr
       // by 1GB each time, until we reach an address that will no longer allow
       // use of CDS with compressed klass pointers.
       char *addr = requested_addr;
-      while (!metaspace_rs.is_reserved() && (addr + 1*G > addr) &&
-             can_use_cds_with_metaspace_addr(addr + 1*G, cds_base)) {
-        addr = addr + 1*G;
+      while (!metaspace_rs.is_reserved() && (addr + increment > addr) &&
+             can_use_cds_with_metaspace_addr(addr + increment, cds_base)) {
+        addr = addr + increment;
         metaspace_rs = ReservedSpace(class_metaspace_size(),
-                                     os::vm_allocation_granularity(), false, addr, 0);
+                                     _reserve_alignment, large_pages, addr, 0);
       }
     }
 
@@ -2894,7 +3015,7 @@
     // So, UseCompressedClassPointers cannot be turned off at this point.
     if (!metaspace_rs.is_reserved()) {
       metaspace_rs = ReservedSpace(class_metaspace_size(),
-                                   os::vm_allocation_granularity(), false);
+                                   _reserve_alignment, large_pages);
       if (!metaspace_rs.is_reserved()) {
         vm_exit_during_initialization(err_msg("Could not allocate metaspace: %d bytes",
                                               class_metaspace_size()));
@@ -2933,34 +3054,96 @@
   assert(using_class_space(), "Must be using class space");
   _class_space_list = new VirtualSpaceList(rs);
   _chunk_manager_class = new ChunkManager(SpecializedChunk, ClassSmallChunk, ClassMediumChunk);
+
+  if (!_class_space_list->initialization_succeeded()) {
+    vm_exit_during_initialization("Failed to setup compressed class space virtual space list.");
+  }
 }
 
 #endif
 
+// Align down. If the aligning result in 0, return 'alignment'.
+static size_t restricted_align_down(size_t size, size_t alignment) {
+  return MAX2(alignment, align_size_down_(size, alignment));
+}
+
+void Metaspace::ergo_initialize() {
+  if (DumpSharedSpaces) {
+    // Using large pages when dumping the shared archive is currently not implemented.
+    FLAG_SET_ERGO(bool, UseLargePagesInMetaspace, false);
+  }
+
+  size_t page_size = os::vm_page_size();
+  if (UseLargePages && UseLargePagesInMetaspace) {
+    page_size = os::large_page_size();
+  }
+
+  _commit_alignment  = page_size;
+  _reserve_alignment = MAX2(page_size, (size_t)os::vm_allocation_granularity());
+
+  // Do not use FLAG_SET_ERGO to update MaxMetaspaceSize, since this will
+  // override if MaxMetaspaceSize was set on the command line or not.
+  // This information is needed later to conform to the specification of the
+  // java.lang.management.MemoryUsage API.
+  //
+  // Ideally, we would be able to set the default value of MaxMetaspaceSize in
+  // globals.hpp to the aligned value, but this is not possible, since the
+  // alignment depends on other flags being parsed.
+  MaxMetaspaceSize = restricted_align_down(MaxMetaspaceSize, _reserve_alignment);
+
+  if (MetaspaceSize > MaxMetaspaceSize) {
+    MetaspaceSize = MaxMetaspaceSize;
+  }
+
+  MetaspaceSize = restricted_align_down(MetaspaceSize, _commit_alignment);
+
+  assert(MetaspaceSize <= MaxMetaspaceSize, "MetaspaceSize should be limited by MaxMetaspaceSize");
+
+  if (MetaspaceSize < 256*K) {
+    vm_exit_during_initialization("Too small initial Metaspace size");
+  }
+
+  MinMetaspaceExpansion = restricted_align_down(MinMetaspaceExpansion, _commit_alignment);
+  MaxMetaspaceExpansion = restricted_align_down(MaxMetaspaceExpansion, _commit_alignment);
+
+  CompressedClassSpaceSize = restricted_align_down(CompressedClassSpaceSize, _reserve_alignment);
+  set_class_metaspace_size(CompressedClassSpaceSize);
+}
+
 void Metaspace::global_initialize() {
   // Initialize the alignment for shared spaces.
   int max_alignment = os::vm_page_size();
   size_t cds_total = 0;
 
-  set_class_metaspace_size(align_size_up(CompressedClassSpaceSize,
-                                         os::vm_allocation_granularity()));
-
   MetaspaceShared::set_max_alignment(max_alignment);
 
   if (DumpSharedSpaces) {
-    SharedReadOnlySize = align_size_up(SharedReadOnlySize, max_alignment);
+    SharedReadOnlySize  = align_size_up(SharedReadOnlySize,  max_alignment);
     SharedReadWriteSize = align_size_up(SharedReadWriteSize, max_alignment);
-    SharedMiscDataSize  = align_size_up(SharedMiscDataSize, max_alignment);
-    SharedMiscCodeSize  = align_size_up(SharedMiscCodeSize, max_alignment);
+    SharedMiscDataSize  = align_size_up(SharedMiscDataSize,  max_alignment);
+    SharedMiscCodeSize  = align_size_up(SharedMiscCodeSize,  max_alignment);
 
     // Initialize with the sum of the shared space sizes.  The read-only
     // and read write metaspace chunks will be allocated out of this and the
     // remainder is the misc code and data chunks.
     cds_total = FileMapInfo::shared_spaces_size();
+    cds_total = align_size_up(cds_total, _reserve_alignment);
     _space_list = new VirtualSpaceList(cds_total/wordSize);
     _chunk_manager_metadata = new ChunkManager(SpecializedChunk, SmallChunk, MediumChunk);
 
+    if (!_space_list->initialization_succeeded()) {
+      vm_exit_during_initialization("Unable to dump shared archive.", NULL);
+    }
+
 #ifdef _LP64
+    if (cds_total + class_metaspace_size() > (uint64_t)max_juint) {
+      vm_exit_during_initialization("Unable to dump shared archive.",
+          err_msg("Size of archive (" SIZE_FORMAT ") + compressed class space ("
+                  SIZE_FORMAT ") == total (" SIZE_FORMAT ") is larger than compressed "
+                  "klass limit: " SIZE_FORMAT, cds_total, class_metaspace_size(),
+                  cds_total + class_metaspace_size(), (size_t)max_juint));
+    }
+
     // Set the compressed klass pointer base so that decoding of these pointers works
     // properly when creating the shared archive.
     assert(UseCompressedOops && UseCompressedClassPointers,
@@ -2971,9 +3154,6 @@
                              _space_list->current_virtual_space()->bottom());
     }
 
-    // Set the shift to zero.
-    assert(class_metaspace_size() < (uint64_t)(max_juint) - cds_total,
-           "CDS region is too large");
     Universe::set_narrow_klass_shift(0);
 #endif
 
@@ -2992,12 +3172,12 @@
       // Map in spaces now also
       if (mapinfo->initialize() && MetaspaceShared::map_shared_spaces(mapinfo)) {
         FileMapInfo::set_current_info(mapinfo);
+        cds_total = FileMapInfo::shared_spaces_size();
+        cds_address = (address)mapinfo->region_base(0);
       } else {
         assert(!mapinfo->is_open() && !UseSharedSpaces,
                "archive file not closed or shared spaces not disabled.");
       }
-      cds_total = FileMapInfo::shared_spaces_size();
-      cds_address = (address)mapinfo->region_base(0);
     }
 
 #ifdef _LP64
@@ -3005,7 +3185,9 @@
     // above the heap and above the CDS area (if it exists).
     if (using_class_space()) {
       if (UseSharedSpaces) {
-        allocate_metaspace_compressed_klass_ptrs((char *)(cds_address + cds_total), cds_address);
+        char* cds_end = (char*)(cds_address + cds_total);
+        cds_end = (char *)align_ptr_up(cds_end, _reserve_alignment);
+        allocate_metaspace_compressed_klass_ptrs(cds_end, cds_address);
       } else {
         allocate_metaspace_compressed_klass_ptrs((char *)CompressedKlassPointersBase, 0);
       }
@@ -3023,11 +3205,19 @@
     _first_class_chunk_word_size = align_word_size_up(_first_class_chunk_word_size);
     // Arbitrarily set the initial virtual space to a multiple
     // of the boot class loader size.
-    size_t word_size = VIRTUALSPACEMULTIPLIER * first_chunk_word_size();
+    size_t word_size = VIRTUALSPACEMULTIPLIER * _first_chunk_word_size;
+    word_size = align_size_up(word_size, Metaspace::reserve_alignment_words());
+
     // Initialize the list of virtual spaces.
     _space_list = new VirtualSpaceList(word_size);
     _chunk_manager_metadata = new ChunkManager(SpecializedChunk, SmallChunk, MediumChunk);
+
+    if (!_space_list->initialization_succeeded()) {
+      vm_exit_during_initialization("Unable to setup metadata virtual space list.", NULL);
+    }
   }
+
+  MetaspaceGC::initialize();
 }
 
 Metachunk* Metaspace::get_initialization_chunk(MetadataType mdtype,
@@ -3039,7 +3229,7 @@
     return chunk;
   }
 
-  return get_space_list(mdtype)->get_initialization_chunk(chunk_word_size, chunk_bunch);
+  return get_space_list(mdtype)->get_new_chunk(chunk_word_size, chunk_word_size, chunk_bunch);
 }
 
 void Metaspace::initialize(Mutex* lock, MetaspaceType type) {
@@ -3112,19 +3302,18 @@
 }
 
 MetaWord* Metaspace::expand_and_allocate(size_t word_size, MetadataType mdtype) {
-  MetaWord* result;
-  MetaspaceGC::set_expand_after_GC(true);
-  size_t before_inc = MetaspaceGC::capacity_until_GC();
-  size_t delta_bytes = MetaspaceGC::delta_capacity_until_GC(word_size) * BytesPerWord;
-  MetaspaceGC::inc_capacity_until_GC(delta_bytes);
+  size_t delta_bytes = MetaspaceGC::delta_capacity_until_GC(word_size * BytesPerWord);
+  assert(delta_bytes > 0, "Must be");
+
+  size_t after_inc = MetaspaceGC::inc_capacity_until_GC(delta_bytes);
+  size_t before_inc = after_inc - delta_bytes;
+
   if (PrintGCDetails && Verbose) {
     gclog_or_tty->print_cr("Increase capacity to GC from " SIZE_FORMAT
-      " to " SIZE_FORMAT, before_inc, MetaspaceGC::capacity_until_GC());
+        " to " SIZE_FORMAT, before_inc, after_inc);
   }
 
-  result = allocate(word_size, mdtype);
-
-  return result;
+  return allocate(word_size, mdtype);
 }
 
 // Space allocated in the Metaspace.  This may
@@ -3206,6 +3395,7 @@
   }
 }
 
+
 Metablock* Metaspace::allocate(ClassLoaderData* loader_data, size_t word_size,
                               bool read_only, MetaspaceObj::Type type, TRAPS) {
   if (HAS_PENDING_EXCEPTION) {
@@ -3213,20 +3403,16 @@
     return NULL;  // caller does a CHECK_NULL too
   }
 
-  MetadataType mdtype = (type == MetaspaceObj::ClassType) ? ClassType : NonClassType;
-
-  // SSS: Should we align the allocations and make sure the sizes are aligned.
-  MetaWord* result = NULL;
-
   assert(loader_data != NULL, "Should never pass around a NULL loader_data. "
         "ClassLoaderData::the_null_class_loader_data() should have been used.");
+
   // Allocate in metaspaces without taking out a lock, because it deadlocks
   // with the SymbolTable_lock.  Dumping is single threaded for now.  We'll have
   // to revisit this for application class data sharing.
   if (DumpSharedSpaces) {
     assert(type > MetaspaceObj::UnknownType && type < MetaspaceObj::_number_of_types, "sanity");
     Metaspace* space = read_only ? loader_data->ro_metaspace() : loader_data->rw_metaspace();
-    result = space->allocate(word_size, NonClassType);
+    MetaWord* result = space->allocate(word_size, NonClassType);
     if (result == NULL) {
       report_out_of_shared_space(read_only ? SharedReadOnly : SharedReadWrite);
     } else {
@@ -3235,42 +3421,64 @@
     return Metablock::initialize(result, word_size);
   }
 
-  result = loader_data->metaspace_non_null()->allocate(word_size, mdtype);
+  MetadataType mdtype = (type == MetaspaceObj::ClassType) ? ClassType : NonClassType;
+
+  // Try to allocate metadata.
+  MetaWord* result = loader_data->metaspace_non_null()->allocate(word_size, mdtype);
 
   if (result == NULL) {
-    // Try to clean out some memory and retry.
-    result =
-      Universe::heap()->collector_policy()->satisfy_failed_metadata_allocation(
-        loader_data, word_size, mdtype);
+    // Allocation failed.
+    if (is_init_completed()) {
+      // Only start a GC if the bootstrapping has completed.
 
-    // If result is still null, we are out of memory.
-    if (result == NULL) {
-      if (Verbose && TraceMetadataChunkAllocation) {
-        gclog_or_tty->print_cr("Metaspace allocation failed for size "
-          SIZE_FORMAT, word_size);
-        if (loader_data->metaspace_or_null() != NULL) loader_data->dump(gclog_or_tty);
-        MetaspaceAux::dump(gclog_or_tty);
-      }
-      // -XX:+HeapDumpOnOutOfMemoryError and -XX:OnOutOfMemoryError support
-      const char* space_string = is_class_space_allocation(mdtype) ? "Compressed class space" :
-                                                                     "Metadata space";
-      report_java_out_of_memory(space_string);
-
-      if (JvmtiExport::should_post_resource_exhausted()) {
-        JvmtiExport::post_resource_exhausted(
-            JVMTI_RESOURCE_EXHAUSTED_OOM_ERROR,
-            space_string);
-      }
-      if (is_class_space_allocation(mdtype)) {
-        THROW_OOP_0(Universe::out_of_memory_error_class_metaspace());
-      } else {
-        THROW_OOP_0(Universe::out_of_memory_error_metaspace());
-      }
+      // Try to clean out some memory and retry.
+      result = Universe::heap()->collector_policy()->satisfy_failed_metadata_allocation(
+          loader_data, word_size, mdtype);
     }
   }
+
+  if (result == NULL) {
+    report_metadata_oome(loader_data, word_size, mdtype, THREAD);
+    // Will not reach here.
+    return NULL;
+  }
+
   return Metablock::initialize(result, word_size);
 }
 
+void Metaspace::report_metadata_oome(ClassLoaderData* loader_data, size_t word_size, MetadataType mdtype, TRAPS) {
+  // If result is still null, we are out of memory.
+  if (Verbose && TraceMetadataChunkAllocation) {
+    gclog_or_tty->print_cr("Metaspace allocation failed for size "
+        SIZE_FORMAT, word_size);
+    if (loader_data->metaspace_or_null() != NULL) {
+      loader_data->dump(gclog_or_tty);
+    }
+    MetaspaceAux::dump(gclog_or_tty);
+  }
+
+  // -XX:+HeapDumpOnOutOfMemoryError and -XX:OnOutOfMemoryError support
+  const char* space_string = is_class_space_allocation(mdtype) ? "Compressed class space" :
+                                                                 "Metadata space";
+  report_java_out_of_memory(space_string);
+
+  if (JvmtiExport::should_post_resource_exhausted()) {
+    JvmtiExport::post_resource_exhausted(
+        JVMTI_RESOURCE_EXHAUSTED_OOM_ERROR,
+        space_string);
+  }
+
+  if (!is_init_completed()) {
+    vm_exit_during_initialization("OutOfMemoryError", space_string);
+  }
+
+  if (is_class_space_allocation(mdtype)) {
+    THROW_OOP(Universe::out_of_memory_error_class_metaspace());
+  } else {
+    THROW_OOP(Universe::out_of_memory_error_metaspace());
+  }
+}
+
 void Metaspace::record_allocation(void* ptr, MetaspaceObj::Type type, size_t word_size) {
   assert(DumpSharedSpaces, "sanity");
 
diff --git a/hotspot/src/share/vm/memory/metaspace.hpp b/hotspot/src/share/vm/memory/metaspace.hpp
index 925d9c1..3a0f4fe 100644
--- a/hotspot/src/share/vm/memory/metaspace.hpp
+++ b/hotspot/src/share/vm/memory/metaspace.hpp
@@ -87,9 +87,10 @@
   friend class MetaspaceAux;
 
  public:
-  enum MetadataType {ClassType = 0,
-                     NonClassType = ClassType + 1,
-                     MetadataTypeCount = ClassType + 2
+  enum MetadataType {
+    ClassType,
+    NonClassType,
+    MetadataTypeCount
   };
   enum MetaspaceType {
     StandardMetaspaceType,
@@ -103,6 +104,9 @@
  private:
   void initialize(Mutex* lock, MetaspaceType type);
 
+  // Get the first chunk for a Metaspace.  Used for
+  // special cases such as the boot class loader, reflection
+  // class loader and anonymous class loader.
   Metachunk* get_initialization_chunk(MetadataType mdtype,
                                       size_t chunk_word_size,
                                       size_t chunk_bunch);
@@ -123,6 +127,9 @@
   static size_t _first_chunk_word_size;
   static size_t _first_class_chunk_word_size;
 
+  static size_t _commit_alignment;
+  static size_t _reserve_alignment;
+
   SpaceManager* _vsm;
   SpaceManager* vsm() const { return _vsm; }
 
@@ -191,12 +198,17 @@
   Metaspace(Mutex* lock, MetaspaceType type);
   ~Metaspace();
 
-  // Initialize globals for Metaspace
+  static void ergo_initialize();
   static void global_initialize();
 
   static size_t first_chunk_word_size() { return _first_chunk_word_size; }
   static size_t first_class_chunk_word_size() { return _first_class_chunk_word_size; }
 
+  static size_t reserve_alignment()       { return _reserve_alignment; }
+  static size_t reserve_alignment_words() { return _reserve_alignment / BytesPerWord; }
+  static size_t commit_alignment()        { return _commit_alignment; }
+  static size_t commit_alignment_words()  { return _commit_alignment / BytesPerWord; }
+
   char*  bottom() const;
   size_t used_words_slow(MetadataType mdtype) const;
   size_t free_words_slow(MetadataType mdtype) const;
@@ -219,6 +231,9 @@
   static void purge(MetadataType mdtype);
   static void purge();
 
+  static void report_metadata_oome(ClassLoaderData* loader_data, size_t word_size,
+                                   MetadataType mdtype, TRAPS);
+
   void print_on(outputStream* st) const;
   // Debugging support
   void verify();
@@ -352,17 +367,10 @@
 
 class MetaspaceGC : AllStatic {
 
-  // The current high-water-mark for inducing a GC.  When
-  // the capacity of all space in the virtual lists reaches this value,
-  // a GC is induced and the value is increased.  This should be changed
-  // to the space actually used for allocations to avoid affects of
-  // fragmentation losses to partially used chunks.  Size is in words.
-  static size_t _capacity_until_GC;
-
-  // After a GC is done any allocation that fails should try to expand
-  // the capacity of the Metaspaces.  This flag is set during attempts
-  // to allocate in the VMGCOperation that does the GC.
-  static bool _expand_after_GC;
+  // The current high-water-mark for inducing a GC.
+  // When committed memory of all metaspaces reaches this value,
+  // a GC is induced and the value is increased. Size is in bytes.
+  static volatile intptr_t _capacity_until_GC;
 
   // For a CMS collection, signal that a concurrent collection should
   // be started.
@@ -370,20 +378,16 @@
 
   static uint _shrink_factor;
 
-  static void set_capacity_until_GC(size_t v) { _capacity_until_GC = v; }
-
   static size_t shrink_factor() { return _shrink_factor; }
   void set_shrink_factor(uint v) { _shrink_factor = v; }
 
  public:
 
-  static size_t capacity_until_GC() { return _capacity_until_GC; }
-  static void inc_capacity_until_GC(size_t v) { _capacity_until_GC += v; }
-  static void dec_capacity_until_GC(size_t v) {
-    _capacity_until_GC = _capacity_until_GC > v ? _capacity_until_GC - v : 0;
-  }
-  static bool expand_after_GC()           { return _expand_after_GC; }
-  static void set_expand_after_GC(bool v) { _expand_after_GC = v; }
+  static void initialize() { _capacity_until_GC = MetaspaceSize; }
+
+  static size_t capacity_until_GC();
+  static size_t inc_capacity_until_GC(size_t v);
+  static size_t dec_capacity_until_GC(size_t v);
 
   static bool should_concurrent_collect() { return _should_concurrent_collect; }
   static void set_should_concurrent_collect(bool v) {
@@ -391,11 +395,14 @@
   }
 
   // The amount to increase the high-water-mark (_capacity_until_GC)
-  static size_t delta_capacity_until_GC(size_t word_size);
+  static size_t delta_capacity_until_GC(size_t bytes);
 
-  // It is expected that this will be called when the current capacity
-  // has been used and a GC should be considered.
-  static bool should_expand(VirtualSpaceList* vsl, size_t word_size);
+  // Tells if we have can expand metaspace without hitting set limits.
+  static bool can_expand(size_t words, bool is_class);
+
+  // Returns amount that we can expand without hitting a GC,
+  // measured in words.
+  static size_t allowed_expansion();
 
   // Calculate the new high-water mark at which to induce
   // a GC.
diff --git a/hotspot/src/share/vm/oops/instanceKlass.cpp b/hotspot/src/share/vm/oops/instanceKlass.cpp
index 82997ed..d6a617a 100644
--- a/hotspot/src/share/vm/oops/instanceKlass.cpp
+++ b/hotspot/src/share/vm/oops/instanceKlass.cpp
@@ -238,6 +238,13 @@
   }
 }
 
+// create a new array of vtable_indices for default methods
+Array<int>* InstanceKlass::create_new_default_vtable_indices(int len, TRAPS) {
+  Array<int>* vtable_indices = MetadataFactory::new_array<int>(class_loader_data(), len, CHECK_NULL);
+  assert(default_vtable_indices() == NULL, "only create once");
+  set_default_vtable_indices(vtable_indices);
+  return vtable_indices;
+}
 
 InstanceKlass::InstanceKlass(int vtable_len,
                              int itable_len,
@@ -263,6 +270,8 @@
   set_array_klasses(NULL);
   set_methods(NULL);
   set_method_ordering(NULL);
+  set_default_methods(NULL);
+  set_default_vtable_indices(NULL);
   set_local_interfaces(NULL);
   set_transitive_interfaces(NULL);
   init_implementor();
@@ -376,6 +385,21 @@
   }
   set_method_ordering(NULL);
 
+  // default methods can be empty
+  if (default_methods() != NULL &&
+      default_methods() != Universe::the_empty_method_array()) {
+    MetadataFactory::free_array<Method*>(loader_data, default_methods());
+  }
+  // Do NOT deallocate the default methods, they are owned by superinterfaces.
+  set_default_methods(NULL);
+
+  // default methods vtable indices can be empty
+  if (default_vtable_indices() != NULL) {
+    MetadataFactory::free_array<int>(loader_data, default_vtable_indices());
+  }
+  set_default_vtable_indices(NULL);
+
+
   // This array is in Klass, but remove it with the InstanceKlass since
   // this place would be the only caller and it can share memory with transitive
   // interfaces.
@@ -456,14 +480,14 @@
   return java_lang_Class::signers(java_mirror());
 }
 
-volatile oop InstanceKlass::init_lock() const {
+oop InstanceKlass::init_lock() const {
   // return the init lock from the mirror
   return java_lang_Class::init_lock(java_mirror());
 }
 
 void InstanceKlass::eager_initialize_impl(instanceKlassHandle this_oop) {
   EXCEPTION_MARK;
-  volatile oop init_lock = this_oop->init_lock();
+  oop init_lock = this_oop->init_lock();
   ObjectLocker ol(init_lock, THREAD);
 
   // abort if someone beat us to the initialization
@@ -608,7 +632,7 @@
 
   // verification & rewriting
   {
-    volatile oop init_lock = this_oop->init_lock();
+    oop init_lock = this_oop->init_lock();
     ObjectLocker ol(init_lock, THREAD);
     // rewritten will have been set if loader constraint error found
     // on an earlier link attempt
@@ -731,7 +755,7 @@
   // refer to the JVM book page 47 for description of steps
   // Step 1
   {
-    volatile oop init_lock = this_oop->init_lock();
+    oop init_lock = this_oop->init_lock();
     ObjectLocker ol(init_lock, THREAD);
 
     Thread *self = THREAD; // it's passed the current thread
@@ -879,7 +903,7 @@
 }
 
 void InstanceKlass::set_initialization_state_and_notify_impl(instanceKlassHandle this_oop, ClassState state, TRAPS) {
-  volatile oop init_lock = this_oop->init_lock();
+  oop init_lock = this_oop->init_lock();
   ObjectLocker ol(init_lock, THREAD);
   this_oop->set_init_state(state);
   ol.notify_all(CHECK);
@@ -1354,32 +1378,44 @@
   return -1;
 }
 
+// find_method looks up the name/signature in the local methods array
 Method* InstanceKlass::find_method(Symbol* name, Symbol* signature) const {
   return InstanceKlass::find_method(methods(), name, signature);
 }
 
+// find_method looks up the name/signature in the local methods array
 Method* InstanceKlass::find_method(
     Array<Method*>* methods, Symbol* name, Symbol* signature) {
+  int hit = find_method_index(methods, name, signature);
+  return hit >= 0 ? methods->at(hit): NULL;
+}
+
+// Used directly for default_methods to find the index into the
+// default_vtable_indices, and indirectly by find_method
+// find_method_index looks in the local methods array to return the index
+// of the matching name/signature
+int InstanceKlass::find_method_index(
+    Array<Method*>* methods, Symbol* name, Symbol* signature) {
   int hit = binary_search(methods, name);
   if (hit != -1) {
     Method* m = methods->at(hit);
     // Do linear search to find matching signature.  First, quick check
     // for common case
-    if (m->signature() == signature) return m;
+    if (m->signature() == signature) return hit;
     // search downwards through overloaded methods
     int i;
     for (i = hit - 1; i >= 0; --i) {
         Method* m = methods->at(i);
         assert(m->is_method(), "must be method");
         if (m->name() != name) break;
-        if (m->signature() == signature) return m;
+        if (m->signature() == signature) return i;
     }
     // search upwards
     for (i = hit + 1; i < methods->length(); ++i) {
         Method* m = methods->at(i);
         assert(m->is_method(), "must be method");
         if (m->name() != name) break;
-        if (m->signature() == signature) return m;
+        if (m->signature() == signature) return i;
     }
     // not found
 #ifdef ASSERT
@@ -1387,9 +1423,8 @@
     assert(index == -1, err_msg("binary search should have found entry %d", index));
 #endif
   }
-  return NULL;
+  return -1;
 }
-
 int InstanceKlass::find_method_by_name(Symbol* name, int* end) {
   return find_method_by_name(methods(), name, end);
 }
@@ -1408,6 +1443,7 @@
   return -1;
 }
 
+// lookup_method searches both the local methods array and all superclasses methods arrays
 Method* InstanceKlass::uncached_lookup_method(Symbol* name, Symbol* signature) const {
   Klass* klass = const_cast<InstanceKlass*>(this);
   while (klass != NULL) {
@@ -1418,6 +1454,21 @@
   return NULL;
 }
 
+// lookup a method in the default methods list then in all transitive interfaces
+// Do NOT return private or static methods
+Method* InstanceKlass::lookup_method_in_ordered_interfaces(Symbol* name,
+                                                         Symbol* signature) const {
+  Method* m = NULL;
+  if (default_methods() != NULL) {
+    m = find_method(default_methods(), name, signature);
+  }
+  // Look up interfaces
+  if (m == NULL) {
+    m = lookup_method_in_all_interfaces(name, signature);
+  }
+  return m;
+}
+
 // lookup a method in all the interfaces that this class implements
 // Do NOT return private or static methods, new in JDK8 which are not externally visible
 // They should only be found in the initial InterfaceMethodRef
@@ -2548,6 +2599,42 @@
   return m;
 }
 
+
+#if INCLUDE_JVMTI
+// update default_methods for redefineclasses for methods that are
+// not yet in the vtable due to concurrent subclass define and superinterface
+// redefinition
+// Note: those in the vtable, should have been updated via adjust_method_entries
+void InstanceKlass::adjust_default_methods(Method** old_methods, Method** new_methods,
+                                           int methods_length, bool* trace_name_printed) {
+  // search the default_methods for uses of either obsolete or EMCP methods
+  if (default_methods() != NULL) {
+    for (int j = 0; j < methods_length; j++) {
+      Method* old_method = old_methods[j];
+      Method* new_method = new_methods[j];
+
+      for (int index = 0; index < default_methods()->length(); index ++) {
+        if (default_methods()->at(index) == old_method) {
+          default_methods()->at_put(index, new_method);
+          if (RC_TRACE_IN_RANGE(0x00100000, 0x00400000)) {
+            if (!(*trace_name_printed)) {
+              // RC_TRACE_MESG macro has an embedded ResourceMark
+              RC_TRACE_MESG(("adjust: klassname=%s default methods from name=%s",
+                             external_name(),
+                             old_method->method_holder()->external_name()));
+              *trace_name_printed = true;
+            }
+            RC_TRACE(0x00100000, ("default method update: %s(%s) ",
+                                  new_method->name()->as_C_string(),
+                                  new_method->signature()->as_C_string()));
+          }
+        }
+      }
+    }
+  }
+}
+#endif // INCLUDE_JVMTI
+
 // On-stack replacement stuff
 void InstanceKlass::add_osr_nmethod(nmethod* n) {
   // only one compilation can be active
@@ -2742,11 +2829,21 @@
   st->print(BULLET"methods:           "); methods()->print_value_on(st);                  st->cr();
   if (Verbose || WizardMode) {
     Array<Method*>* method_array = methods();
-    for(int i = 0; i < method_array->length(); i++) {
+    for (int i = 0; i < method_array->length(); i++) {
       st->print("%d : ", i); method_array->at(i)->print_value(); st->cr();
     }
   }
-  st->print(BULLET"method ordering:   "); method_ordering()->print_value_on(st);       st->cr();
+  st->print(BULLET"method ordering:   "); method_ordering()->print_value_on(st);      st->cr();
+  st->print(BULLET"default_methods:   "); default_methods()->print_value_on(st);      st->cr();
+  if (Verbose && default_methods() != NULL) {
+    Array<Method*>* method_array = default_methods();
+    for (int i = 0; i < method_array->length(); i++) {
+      st->print("%d : ", i); method_array->at(i)->print_value(); st->cr();
+    }
+  }
+  if (default_vtable_indices() != NULL) {
+    st->print(BULLET"default vtable indices:   "); default_vtable_indices()->print_value_on(st);       st->cr();
+  }
   st->print(BULLET"local interfaces:  "); local_interfaces()->print_value_on(st);      st->cr();
   st->print(BULLET"trans. interfaces: "); transitive_interfaces()->print_value_on(st); st->cr();
   st->print(BULLET"constants:         "); constants()->print_value_on(st);         st->cr();
@@ -3099,6 +3196,19 @@
     }
   }
 
+  // Verify default methods
+  if (default_methods() != NULL) {
+    Array<Method*>* methods = this->default_methods();
+    for (int j = 0; j < methods->length(); j++) {
+      guarantee(methods->at(j)->is_method(), "non-method in methods array");
+    }
+    for (int j = 0; j < methods->length() - 1; j++) {
+      Method* m1 = methods->at(j);
+      Method* m2 = methods->at(j + 1);
+      guarantee(m1->name()->fast_compare(m2->name()) <= 0, "methods not sorted correctly");
+    }
+  }
+
   // Verify JNI static field identifiers
   if (jni_ids() != NULL) {
     jni_ids()->verify(this);
diff --git a/hotspot/src/share/vm/oops/instanceKlass.hpp b/hotspot/src/share/vm/oops/instanceKlass.hpp
index c3745ee..914cb1d 100644
--- a/hotspot/src/share/vm/oops/instanceKlass.hpp
+++ b/hotspot/src/share/vm/oops/instanceKlass.hpp
@@ -269,12 +269,18 @@
 
   // Method array.
   Array<Method*>* _methods;
+  // Default Method Array, concrete methods inherited from interfaces
+  Array<Method*>* _default_methods;
   // Interface (Klass*s) this class declares locally to implement.
   Array<Klass*>* _local_interfaces;
   // Interface (Klass*s) this class implements transitively.
   Array<Klass*>* _transitive_interfaces;
   // Int array containing the original order of method in the class file (for JVMTI).
   Array<int>*     _method_ordering;
+  // Int array containing the vtable_indices for default_methods
+  // offset matches _default_methods offset
+  Array<int>*     _default_vtable_indices;
+
   // Instance and static variable information, starts with 6-tuples of shorts
   // [access, name index, sig index, initval index, low_offset, high_offset]
   // for all fields, followed by the generic signature data at the end of
@@ -356,6 +362,15 @@
   void set_method_ordering(Array<int>* m) { _method_ordering = m; }
   void copy_method_ordering(intArray* m, TRAPS);
 
+  // default_methods
+  Array<Method*>* default_methods() const  { return _default_methods; }
+  void set_default_methods(Array<Method*>* a) { _default_methods = a; }
+
+  // default method vtable_indices
+  Array<int>* default_vtable_indices() const { return _default_vtable_indices; }
+  void set_default_vtable_indices(Array<int>* v) { _default_vtable_indices = v; }
+  Array<int>* create_new_default_vtable_indices(int len, TRAPS);
+
   // interfaces
   Array<Klass*>* local_interfaces() const          { return _local_interfaces; }
   void set_local_interfaces(Array<Klass*>* a)      {
@@ -501,12 +516,18 @@
   Method* find_method(Symbol* name, Symbol* signature) const;
   static Method* find_method(Array<Method*>* methods, Symbol* name, Symbol* signature);
 
+  // find a local method index in default_methods (returns -1 if not found)
+  static int find_method_index(Array<Method*>* methods, Symbol* name, Symbol* signature);
+
   // lookup operation (returns NULL if not found)
   Method* uncached_lookup_method(Symbol* name, Symbol* signature) const;
 
   // lookup a method in all the interfaces that this class implements
   // (returns NULL if not found)
   Method* lookup_method_in_all_interfaces(Symbol* name, Symbol* signature) const;
+  // lookup a method in local defaults then in all interfaces
+  // (returns NULL if not found)
+  Method* lookup_method_in_ordered_interfaces(Symbol* name, Symbol* signature) const;
 
   // Find method indices by name.  If a method with the specified name is
   // found the index to the first method is returned, and 'end' is filled in
@@ -910,6 +931,11 @@
   klassItable* itable() const;        // return new klassItable wrapper
   Method* method_at_itable(Klass* holder, int index, TRAPS);
 
+#if INCLUDE_JVMTI
+  void adjust_default_methods(Method** old_methods, Method** new_methods,
+                              int methods_length, bool* trace_name_printed);
+#endif // INCLUDE_JVMTI
+
   // Garbage collection
   void oop_follow_contents(oop obj);
   int  oop_adjust_pointers(oop obj);
@@ -995,7 +1021,7 @@
   // Must be one per class and it has to be a VM internal object so java code
   // cannot lock it (like the mirror).
   // It has to be an object not a Mutex because it's held through java calls.
-  volatile oop init_lock() const;
+  oop init_lock() const;
 private:
 
   // Static methods that are used to implement member methods where an exposed this pointer
diff --git a/hotspot/src/share/vm/oops/klassVtable.cpp b/hotspot/src/share/vm/oops/klassVtable.cpp
index 6788c61..568e15f 100644
--- a/hotspot/src/share/vm/oops/klassVtable.cpp
+++ b/hotspot/src/share/vm/oops/klassVtable.cpp
@@ -83,7 +83,7 @@
 
   GrowableArray<Method*> new_mirandas(20);
   // compute the number of mirandas methods that must be added to the end
-  get_mirandas(&new_mirandas, all_mirandas, super, methods, local_interfaces);
+  get_mirandas(&new_mirandas, all_mirandas, super, methods, NULL, local_interfaces);
   *num_new_mirandas = new_mirandas.length();
 
   vtable_length += *num_new_mirandas * vtableEntry::size();
@@ -186,7 +186,7 @@
       assert(methods->at(i)->is_method(), "must be a Method*");
       methodHandle mh(THREAD, methods->at(i));
 
-      bool needs_new_entry = update_inherited_vtable(ik(), mh, super_vtable_len, checkconstraints, CHECK);
+      bool needs_new_entry = update_inherited_vtable(ik(), mh, super_vtable_len, -1, checkconstraints, CHECK);
 
       if (needs_new_entry) {
         put_method_at(mh(), initialized);
@@ -195,7 +195,35 @@
       }
     }
 
-    // add miranda methods to end of vtable.
+    // update vtable with default_methods
+    Array<Method*>* default_methods = ik()->default_methods();
+    if (default_methods != NULL) {
+      len = default_methods->length();
+      if (len > 0) {
+        Array<int>* def_vtable_indices = NULL;
+        if ((def_vtable_indices = ik()->default_vtable_indices()) == NULL) {
+          def_vtable_indices = ik()->create_new_default_vtable_indices(len, CHECK);
+        } else {
+          assert(def_vtable_indices->length() == len, "reinit vtable len?");
+        }
+        for (int i = 0; i < len; i++) {
+          HandleMark hm(THREAD);
+          assert(default_methods->at(i)->is_method(), "must be a Method*");
+          methodHandle mh(THREAD, default_methods->at(i));
+
+          bool needs_new_entry = update_inherited_vtable(ik(), mh, super_vtable_len, i, checkconstraints, CHECK);
+
+          // needs new entry
+          if (needs_new_entry) {
+            put_method_at(mh(), initialized);
+            def_vtable_indices->at_put(i, initialized); //set vtable index
+            initialized++;
+          }
+        }
+      }
+    }
+
+    // add miranda methods; it will also return the updated initialized
     initialized = fill_in_mirandas(initialized);
 
     // In class hierarchies where the accessibility is not increasing (i.e., going from private ->
@@ -230,14 +258,19 @@
 #ifndef PRODUCT
         if (PrintVtables && Verbose) {
           ResourceMark rm(THREAD);
+          char* sig = target_method()->name_and_sig_as_C_string();
           tty->print("transitive overriding superclass %s with %s::%s index %d, original flags: ",
            supersuperklass->internal_name(),
-           _klass->internal_name(), (target_method() != NULL) ?
-           target_method()->name()->as_C_string() : "<NULL>", vtable_index);
+           _klass->internal_name(), sig, vtable_index);
            super_method->access_flags().print_on(tty);
+           if (super_method->is_default_method()) {
+             tty->print("default");
+           }
            tty->print("overriders flags: ");
            target_method->access_flags().print_on(tty);
-           tty->cr();
+           if (target_method->is_default_method()) {
+             tty->print("default");
+           }
         }
 #endif /*PRODUCT*/
         break; // return found superk
@@ -258,16 +291,31 @@
 // OR return true if a new vtable entry is required.
 // Only called for InstanceKlass's, i.e. not for arrays
 // If that changed, could not use _klass as handle for klass
-bool klassVtable::update_inherited_vtable(InstanceKlass* klass, methodHandle target_method, int super_vtable_len,
-                  bool checkconstraints, TRAPS) {
+bool klassVtable::update_inherited_vtable(InstanceKlass* klass, methodHandle target_method,
+                                          int super_vtable_len, int default_index,
+                                          bool checkconstraints, TRAPS) {
   ResourceMark rm;
   bool allocate_new = true;
   assert(klass->oop_is_instance(), "must be InstanceKlass");
-  assert(klass == target_method()->method_holder(), "caller resp.");
 
-  // Initialize the method's vtable index to "nonvirtual".
-  // If we allocate a vtable entry, we will update it to a non-negative number.
-  target_method()->set_vtable_index(Method::nonvirtual_vtable_index);
+  Array<int>* def_vtable_indices = NULL;
+  bool is_default = false;
+  // default methods are concrete methods in superinterfaces which are added to the vtable
+  // with their real method_holder
+  // Since vtable and itable indices share the same storage, don't touch
+  // the default method's real vtable/itable index
+  // default_vtable_indices stores the vtable value relative to this inheritor
+  if (default_index >= 0 ) {
+    is_default = true;
+    def_vtable_indices = klass->default_vtable_indices();
+    assert(def_vtable_indices != NULL, "def vtable alloc?");
+    assert(default_index <= def_vtable_indices->length(), "def vtable len?");
+  } else {
+    assert(klass == target_method()->method_holder(), "caller resp.");
+    // Initialize the method's vtable index to "nonvirtual".
+    // If we allocate a vtable entry, we will update it to a non-negative number.
+    target_method()->set_vtable_index(Method::nonvirtual_vtable_index);
+  }
 
   // Static and <init> methods are never in
   if (target_method()->is_static() || target_method()->name() ==  vmSymbols::object_initializer_name()) {
@@ -284,6 +332,8 @@
     // An interface never allocates new vtable slots, only inherits old ones.
     // This method will either be assigned its own itable index later,
     // or be assigned an inherited vtable index in the loop below.
+    // default methods store their vtable indices in the inheritors default_vtable_indices
+    assert (default_index == -1, "interfaces don't store resolved default methods");
     target_method()->set_vtable_index(Method::pending_itable_index);
   }
 
@@ -307,8 +357,15 @@
 
   Symbol* name = target_method()->name();
   Symbol* signature = target_method()->signature();
-  Handle target_loader(THREAD, _klass()->class_loader());
-  Symbol*  target_classname = _klass->name();
+
+  KlassHandle target_klass(THREAD, target_method()->method_holder());
+  if (target_klass == NULL) {
+    target_klass = _klass;
+  }
+
+  Handle target_loader(THREAD, target_klass->class_loader());
+
+  Symbol* target_classname = target_klass->name();
   for(int i = 0; i < super_vtable_len; i++) {
     Method* super_method = method_at(i);
     // Check if method name matches
@@ -317,10 +374,14 @@
       // get super_klass for method_holder for the found method
       InstanceKlass* super_klass =  super_method->method_holder();
 
-      if ((super_klass->is_override(super_method, target_loader, target_classname, THREAD)) ||
-      ((klass->major_version() >= VTABLE_TRANSITIVE_OVERRIDE_VERSION)
-        && ((super_klass = find_transitive_override(super_klass, target_method, i, target_loader,
-             target_classname, THREAD)) != (InstanceKlass*)NULL))) {
+      if (is_default
+          || ((super_klass->is_override(super_method, target_loader, target_classname, THREAD))
+          || ((klass->major_version() >= VTABLE_TRANSITIVE_OVERRIDE_VERSION)
+          && ((super_klass = find_transitive_override(super_klass,
+                             target_method, i, target_loader,
+                             target_classname, THREAD))
+                             != (InstanceKlass*)NULL))))
+        {
         // overriding, so no new entry
         allocate_new = false;
 
@@ -347,7 +408,7 @@
                 "%s used in the signature";
               char* sig = target_method()->name_and_sig_as_C_string();
               const char* loader1 = SystemDictionary::loader_name(target_loader());
-              char* current = _klass->name()->as_C_string();
+              char* current = target_klass->name()->as_C_string();
               const char* loader2 = SystemDictionary::loader_name(super_loader());
               char* failed_type_name = failed_type_symbol->as_C_string();
               size_t buflen = strlen(msg) + strlen(sig) + strlen(loader1) +
@@ -360,16 +421,39 @@
           }
        }
 
-        put_method_at(target_method(), i);
-        target_method()->set_vtable_index(i);
+       put_method_at(target_method(), i);
+       if (!is_default) {
+         target_method()->set_vtable_index(i);
+       } else {
+         if (def_vtable_indices != NULL) {
+           def_vtable_indices->at_put(default_index, i);
+         }
+         assert(super_method->is_default_method() || super_method->is_overpass()
+                || super_method->is_abstract(), "default override error");
+       }
+
+
 #ifndef PRODUCT
         if (PrintVtables && Verbose) {
+          ResourceMark rm(THREAD);
+          char* sig = target_method()->name_and_sig_as_C_string();
           tty->print("overriding with %s::%s index %d, original flags: ",
-           _klass->internal_name(), (target_method() != NULL) ?
-           target_method()->name()->as_C_string() : "<NULL>", i);
+           target_klass->internal_name(), sig, i);
            super_method->access_flags().print_on(tty);
+           if (super_method->is_default_method()) {
+             tty->print("default");
+           }
+           if (super_method->is_overpass()) {
+             tty->print("overpass");
+           }
            tty->print("overriders flags: ");
            target_method->access_flags().print_on(tty);
+           if (target_method->is_default_method()) {
+             tty->print("default");
+           }
+           if (target_method->is_overpass()) {
+             tty->print("overpass");
+           }
            tty->cr();
         }
 #endif /*PRODUCT*/
@@ -378,12 +462,25 @@
         // but not override another. Once we override one, not need new
 #ifndef PRODUCT
         if (PrintVtables && Verbose) {
+          ResourceMark rm(THREAD);
+          char* sig = target_method()->name_and_sig_as_C_string();
           tty->print("NOT overriding with %s::%s index %d, original flags: ",
-           _klass->internal_name(), (target_method() != NULL) ?
-           target_method()->name()->as_C_string() : "<NULL>", i);
+           target_klass->internal_name(), sig,i);
            super_method->access_flags().print_on(tty);
+           if (super_method->is_default_method()) {
+             tty->print("default");
+           }
+           if (super_method->is_overpass()) {
+             tty->print("overpass");
+           }
            tty->print("overriders flags: ");
            target_method->access_flags().print_on(tty);
+           if (target_method->is_default_method()) {
+             tty->print("default");
+           }
+           if (target_method->is_overpass()) {
+             tty->print("overpass");
+           }
            tty->cr();
         }
 #endif /*PRODUCT*/
@@ -438,6 +535,14 @@
     return false;
   }
 
+  // Concrete interface methods do not need new entries, they override
+  // abstract method entries using default inheritance rules
+  if (target_method()->method_holder() != NULL &&
+      target_method()->method_holder()->is_interface()  &&
+      !target_method()->is_abstract() ) {
+    return false;
+  }
+
   // we need a new entry if there is no superclass
   if (super == NULL) {
     return true;
@@ -446,7 +551,7 @@
   // private methods in classes always have a new entry in the vtable
   // specification interpretation since classic has
   // private methods not overriding
-  // JDK8 adds private methods in interfaces which require invokespecial
+  // JDK8 adds private  methods in interfaces which require invokespecial
   if (target_method()->is_private()) {
     return true;
   }
@@ -526,35 +631,40 @@
   if (mhk->is_interface()) {
     assert(m->is_public(), "should be public");
     assert(ik()->implements_interface(method_holder) , "this class should implement the interface");
-    assert(is_miranda(m, ik()->methods(), ik()->super()), "should be a miranda_method");
+    assert(is_miranda(m, ik()->methods(), ik()->default_methods(), ik()->super()), "should be a miranda_method");
     return true;
   }
   return false;
 }
 
-// check if a method is a miranda method, given a class's methods table and its super
-// "miranda" means not static, not defined by this class, and not defined
-// in super unless it is private and therefore inaccessible to this class.
+// check if a method is a miranda method, given a class's methods table,
+// its default_method table  and its super
+// "miranda" means not static, not defined by this class.
+// private methods in interfaces do not belong in the miranda list.
 // the caller must make sure that the method belongs to an interface implemented by the class
 // Miranda methods only include public interface instance methods
-// Not private methods, not static methods, not default = concrete abstract
-bool klassVtable::is_miranda(Method* m, Array<Method*>* class_methods, Klass* super) {
-  if (m->is_static()) {
+// Not private methods, not static methods, not default == concrete abstract
+bool klassVtable::is_miranda(Method* m, Array<Method*>* class_methods,
+                             Array<Method*>* default_methods, Klass* super) {
+  if (m->is_static() || m->is_private()) {
     return false;
   }
   Symbol* name = m->name();
   Symbol* signature = m->signature();
   if (InstanceKlass::find_method(class_methods, name, signature) == NULL) {
     // did not find it in the method table of the current class
-    if (super == NULL) {
-      // super doesn't exist
-      return true;
-    }
+    if ((default_methods == NULL) ||
+        InstanceKlass::find_method(default_methods, name, signature) == NULL) {
+      if (super == NULL) {
+        // super doesn't exist
+        return true;
+      }
 
-    Method* mo = InstanceKlass::cast(super)->lookup_method(name, signature);
-    if (mo == NULL || mo->access_flags().is_private() ) {
-      // super class hierarchy does not implement it or protection is different
-      return true;
+      Method* mo = InstanceKlass::cast(super)->lookup_method(name, signature);
+      if (mo == NULL || mo->access_flags().is_private() ) {
+        // super class hierarchy does not implement it or protection is different
+        return true;
+      }
     }
   }
 
@@ -562,7 +672,7 @@
 }
 
 // Scans current_interface_methods for miranda methods that do not
-// already appear in new_mirandas and are also not defined-and-non-private
+// already appear in new_mirandas, or default methods,  and are also not defined-and-non-private
 // in super (superclass).  These mirandas are added to all_mirandas if it is
 // not null; in addition, those that are not duplicates of miranda methods
 // inherited by super from its interfaces are added to new_mirandas.
@@ -572,7 +682,8 @@
 void klassVtable::add_new_mirandas_to_lists(
     GrowableArray<Method*>* new_mirandas, GrowableArray<Method*>* all_mirandas,
     Array<Method*>* current_interface_methods, Array<Method*>* class_methods,
-    Klass* super) {
+    Array<Method*>* default_methods, Klass* super) {
+
   // iterate thru the current interface's method to see if it a miranda
   int num_methods = current_interface_methods->length();
   for (int i = 0; i < num_methods; i++) {
@@ -590,7 +701,7 @@
     }
 
     if (!is_duplicate) { // we don't want duplicate miranda entries in the vtable
-      if (is_miranda(im, class_methods, super)) { // is it a miranda at all?
+      if (is_miranda(im, class_methods, default_methods, super)) { // is it a miranda at all?
         InstanceKlass *sk = InstanceKlass::cast(super);
         // check if it is a duplicate of a super's miranda
         if (sk->lookup_method_in_all_interfaces(im->name(), im->signature()) == NULL) {
@@ -607,6 +718,7 @@
 void klassVtable::get_mirandas(GrowableArray<Method*>* new_mirandas,
                                GrowableArray<Method*>* all_mirandas,
                                Klass* super, Array<Method*>* class_methods,
+                               Array<Method*>* default_methods,
                                Array<Klass*>* local_interfaces) {
   assert((new_mirandas->length() == 0) , "current mirandas must be 0");
 
@@ -615,14 +727,16 @@
   for (int i = 0; i < num_local_ifs; i++) {
     InstanceKlass *ik = InstanceKlass::cast(local_interfaces->at(i));
     add_new_mirandas_to_lists(new_mirandas, all_mirandas,
-                              ik->methods(), class_methods, super);
+                              ik->methods(), class_methods,
+                              default_methods, super);
     // iterate thru each local's super interfaces
     Array<Klass*>* super_ifs = ik->transitive_interfaces();
     int num_super_ifs = super_ifs->length();
     for (int j = 0; j < num_super_ifs; j++) {
       InstanceKlass *sik = InstanceKlass::cast(super_ifs->at(j));
       add_new_mirandas_to_lists(new_mirandas, all_mirandas,
-                                sik->methods(), class_methods, super);
+                                sik->methods(), class_methods,
+                                default_methods, super);
     }
   }
 }
@@ -633,8 +747,22 @@
 int klassVtable::fill_in_mirandas(int initialized) {
   GrowableArray<Method*> mirandas(20);
   get_mirandas(&mirandas, NULL, ik()->super(), ik()->methods(),
-               ik()->local_interfaces());
+               ik()->default_methods(), ik()->local_interfaces());
   for (int i = 0; i < mirandas.length(); i++) {
+    if (PrintVtables && Verbose) {
+      Method* meth = mirandas.at(i);
+      ResourceMark rm(Thread::current());
+      if (meth != NULL) {
+        char* sig = meth->name_and_sig_as_C_string();
+        tty->print("fill in mirandas with %s index %d, flags: ",
+          sig, initialized);
+        meth->access_flags().print_on(tty);
+        if (meth->is_default_method()) {
+          tty->print("default");
+        }
+        tty->cr();
+      }
+    }
     put_method_at(mirandas.at(i), initialized);
     ++initialized;
   }
@@ -648,6 +776,26 @@
 }
 
 #if INCLUDE_JVMTI
+bool klassVtable::adjust_default_method(int vtable_index, Method* old_method, Method* new_method) {
+  // If old_method is default, find this vtable index in default_vtable_indices
+  // and replace that method in the _default_methods list
+  bool updated = false;
+
+  Array<Method*>* default_methods = ik()->default_methods();
+  if (default_methods != NULL) {
+    int len = default_methods->length();
+    for (int idx = 0; idx < len; idx++) {
+      if (vtable_index == ik()->default_vtable_indices()->at(idx)) {
+        if (default_methods->at(idx) == old_method) {
+          default_methods->at_put(idx, new_method);
+          updated = true;
+        }
+        break;
+      }
+    }
+  }
+  return updated;
+}
 void klassVtable::adjust_method_entries(Method** old_methods, Method** new_methods,
                                         int methods_length, bool * trace_name_printed) {
   // search the vtable for uses of either obsolete or EMCP methods
@@ -663,18 +811,26 @@
     for (int index = 0; index < length(); index++) {
       if (unchecked_method_at(index) == old_method) {
         put_method_at(new_method, index);
+          // For default methods, need to update the _default_methods array
+          // which can only have one method entry for a given signature
+          bool updated_default = false;
+          if (old_method->is_default_method()) {
+            updated_default = adjust_default_method(index, old_method, new_method);
+          }
 
         if (RC_TRACE_IN_RANGE(0x00100000, 0x00400000)) {
           if (!(*trace_name_printed)) {
             // RC_TRACE_MESG macro has an embedded ResourceMark
-            RC_TRACE_MESG(("adjust: name=%s",
+            RC_TRACE_MESG(("adjust: klassname=%s for methods from name=%s",
+                           klass()->external_name(),
                            old_method->method_holder()->external_name()));
             *trace_name_printed = true;
           }
           // RC_TRACE macro has an embedded ResourceMark
-          RC_TRACE(0x00100000, ("vtable method update: %s(%s)",
+          RC_TRACE(0x00100000, ("vtable method update: %s(%s), updated default = %s",
                                 new_method->name()->as_C_string(),
-                                new_method->signature()->as_C_string()));
+                                new_method->signature()->as_C_string(),
+                                updated_default ? "true" : "false"));
         }
         // cannot 'break' here; see for-loop comment above.
       }
@@ -701,6 +857,12 @@
     if (m != NULL) {
       tty->print("      (%5d)  ", i);
       m->access_flags().print_on(tty);
+      if (m->is_default_method()) {
+        tty->print("default");
+      }
+      if (m->is_overpass()) {
+        tty->print("overpass");
+      }
       tty->print(" --  ");
       m->print_name(tty);
       tty->cr();
@@ -757,9 +919,9 @@
 // Initialization
 void klassItable::initialize_itable(bool checkconstraints, TRAPS) {
   if (_klass->is_interface()) {
-    // This needs to go after vtable indexes are assigned but
-    // before implementors need to know the number of itable indexes.
-    assign_itable_indexes_for_interface(_klass());
+    // This needs to go after vtable indices are assigned but
+    // before implementors need to know the number of itable indices.
+    assign_itable_indices_for_interface(_klass());
   }
 
   // Cannot be setup doing bootstrapping, interfaces don't have
@@ -803,7 +965,7 @@
   return true;
 }
 
-int klassItable::assign_itable_indexes_for_interface(Klass* klass) {
+int klassItable::assign_itable_indices_for_interface(Klass* klass) {
   // an interface does not have an itable, but its methods need to be numbered
   if (TraceItables) tty->print_cr("%3d: Initializing itable for interface %s", ++initialize_count,
                                   klass->name()->as_C_string());
@@ -846,7 +1008,7 @@
     }
     nof_methods -= 1;
   }
-  // no methods have itable indexes
+  // no methods have itable indices
   return 0;
 }
 
@@ -907,6 +1069,21 @@
       int ime_num = m->itable_index();
       assert(ime_num < ime_count, "oob");
       itableOffsetEntry::method_entry(_klass(), method_table_offset)[ime_num].initialize(target());
+      if (TraceItables && Verbose) {
+        ResourceMark rm(THREAD);
+        if (target() != NULL) {
+          char* sig = target()->name_and_sig_as_C_string();
+          tty->print("interface: %s, ime_num: %d, target: %s, method_holder: %s ",
+                    interf_h()->internal_name(), ime_num, sig,
+                    target()->method_holder()->internal_name());
+          tty->print("target_method flags: ");
+          target()->access_flags().print_on(tty);
+          if (target()->is_default_method()) {
+            tty->print("default");
+          }
+          tty->cr();
+        }
+      }
     }
   }
 }
@@ -980,6 +1157,9 @@
     if (m != NULL) {
       tty->print("      (%5d)  ", i);
       m->access_flags().print_on(tty);
+      if (m->is_default_method()) {
+        tty->print("default");
+      }
       tty->print(" --  ");
       m->print_name(tty);
       tty->cr();
@@ -1116,7 +1296,7 @@
   Array<Method*>* methods = InstanceKlass::cast(intf)->methods();
 
   if (itable_index < 0 || itable_index >= method_count_for_interface(intf))
-    return NULL;                // help caller defend against bad indexes
+    return NULL;                // help caller defend against bad indices
 
   int index = itable_index;
   Method* m = methods->at(index);
diff --git a/hotspot/src/share/vm/oops/klassVtable.hpp b/hotspot/src/share/vm/oops/klassVtable.hpp
index 06d55af..01ad63f 100644
--- a/hotspot/src/share/vm/oops/klassVtable.hpp
+++ b/hotspot/src/share/vm/oops/klassVtable.hpp
@@ -97,6 +97,7 @@
   // trace_name_printed is set to true if the current call has
   // printed the klass name so that other routines in the adjust_*
   // group don't print the klass name.
+  bool adjust_default_method(int vtable_index, Method* old_method, Method* new_method);
   void adjust_method_entries(Method** old_methods, Method** new_methods,
                              int methods_length, bool * trace_name_printed);
   bool check_no_old_or_obsolete_entries();
@@ -118,24 +119,28 @@
   void put_method_at(Method* m, int index);
   static bool needs_new_vtable_entry(methodHandle m, Klass* super, Handle classloader, Symbol* classname, AccessFlags access_flags, TRAPS);
 
-  bool update_inherited_vtable(InstanceKlass* klass, methodHandle target_method, int super_vtable_len, bool checkconstraints, TRAPS);
+  bool update_inherited_vtable(InstanceKlass* klass, methodHandle target_method, int super_vtable_len, int default_index, bool checkconstraints, TRAPS);
  InstanceKlass* find_transitive_override(InstanceKlass* initialsuper, methodHandle target_method, int vtable_index,
                                          Handle target_loader, Symbol* target_classname, Thread* THREAD);
 
   // support for miranda methods
   bool is_miranda_entry_at(int i);
   int fill_in_mirandas(int initialized);
-  static bool is_miranda(Method* m, Array<Method*>* class_methods, Klass* super);
+  static bool is_miranda(Method* m, Array<Method*>* class_methods,
+                         Array<Method*>* default_methods, Klass* super);
   static void add_new_mirandas_to_lists(
       GrowableArray<Method*>* new_mirandas,
       GrowableArray<Method*>* all_mirandas,
-      Array<Method*>* current_interface_methods, Array<Method*>* class_methods,
+      Array<Method*>* current_interface_methods,
+      Array<Method*>* class_methods,
+      Array<Method*>* default_methods,
       Klass* super);
   static void get_mirandas(
       GrowableArray<Method*>* new_mirandas,
       GrowableArray<Method*>* all_mirandas, Klass* super,
-      Array<Method*>* class_methods, Array<Klass*>* local_interfaces);
-
+      Array<Method*>* class_methods,
+      Array<Method*>* default_methods,
+      Array<Klass*>* local_interfaces);
   void verify_against(outputStream* st, klassVtable* vt, int index);
   inline InstanceKlass* ik() const;
 };
@@ -290,7 +295,7 @@
 #endif // INCLUDE_JVMTI
 
   // Setup of itable
-  static int assign_itable_indexes_for_interface(Klass* klass);
+  static int assign_itable_indices_for_interface(Klass* klass);
   static int method_count_for_interface(Klass* klass);
   static int compute_itable_size(Array<Klass*>* transitive_interfaces);
   static void setup_itable_offset_table(instanceKlassHandle klass);
diff --git a/hotspot/src/share/vm/oops/method.cpp b/hotspot/src/share/vm/oops/method.cpp
index 9d30c40..c0b4a97 100644
--- a/hotspot/src/share/vm/oops/method.cpp
+++ b/hotspot/src/share/vm/oops/method.cpp
@@ -511,9 +511,9 @@
 
 bool Method::is_final_method(AccessFlags class_access_flags) const {
   // or "does_not_require_vtable_entry"
-  // overpass can occur, is not final (reuses vtable entry)
+  // default method or overpass can occur, is not final (reuses vtable entry)
   // private methods get vtable entries for backward class compatibility.
-  if (is_overpass())  return false;
+  if (is_overpass() || is_default_method())  return false;
   return is_final() || class_access_flags.is_final();
 }
 
@@ -521,11 +521,24 @@
   return is_final_method(method_holder()->access_flags());
 }
 
+bool Method::is_default_method() const {
+  if (method_holder() != NULL &&
+      method_holder()->is_interface() &&
+      !is_abstract()) {
+    return true;
+  } else {
+    return false;
+  }
+}
+
 bool Method::can_be_statically_bound(AccessFlags class_access_flags) const {
   if (is_final_method(class_access_flags))  return true;
 #ifdef ASSERT
+  ResourceMark rm;
   bool is_nonv = (vtable_index() == nonvirtual_vtable_index);
-  if (class_access_flags.is_interface())  assert(is_nonv == is_static(), err_msg("is_nonv=%s", is_nonv));
+  if (class_access_flags.is_interface()) {
+      assert(is_nonv == is_static(), err_msg("is_nonv=%s", name_and_sig_as_C_string()));
+  }
 #endif
   assert(valid_vtable_index() || valid_itable_index(), "method must be linked before we ask this question");
   return vtable_index() == nonvirtual_vtable_index;
@@ -1371,7 +1384,8 @@
 }
 
 // This is only done during class loading, so it is OK to assume method_idnum matches the methods() array
-void Method::sort_methods(Array<Method*>* methods, bool idempotent) {
+// default_methods also uses this without the ordering for fast find_method
+void Method::sort_methods(Array<Method*>* methods, bool idempotent, bool set_idnums) {
   int length = methods->length();
   if (length > 1) {
     {
@@ -1379,14 +1393,15 @@
       QuickSort::sort<Method*>(methods->data(), length, method_comparator, idempotent);
     }
     // Reset method ordering
-    for (int i = 0; i < length; i++) {
-      Method* m = methods->at(i);
-      m->set_method_idnum(i);
+    if (set_idnums) {
+      for (int i = 0; i < length; i++) {
+        Method* m = methods->at(i);
+        m->set_method_idnum(i);
+      }
     }
   }
 }
 
-
 //-----------------------------------------------------------------------------------
 // Non-product code unless JVM/TI needs it
 
diff --git a/hotspot/src/share/vm/oops/method.hpp b/hotspot/src/share/vm/oops/method.hpp
index 02d2253..c152b26 100644
--- a/hotspot/src/share/vm/oops/method.hpp
+++ b/hotspot/src/share/vm/oops/method.hpp
@@ -567,6 +567,7 @@
   // checks method and its method holder
   bool is_final_method() const;
   bool is_final_method(AccessFlags class_access_flags) const;
+  bool is_default_method() const;
 
   // true if method needs no dynamic dispatch (final and/or no vtable entry)
   bool can_be_statically_bound() const;
@@ -846,7 +847,7 @@
 #endif
 
   // Helper routine used for method sorting
-  static void sort_methods(Array<Method*>* methods, bool idempotent = false);
+  static void sort_methods(Array<Method*>* methods, bool idempotent = false, bool set_idnums = true);
 
   // Deallocation function for redefine classes or if an error occurs
   void deallocate_contents(ClassLoaderData* loader_data);
diff --git a/hotspot/src/share/vm/opto/graphKit.cpp b/hotspot/src/share/vm/opto/graphKit.cpp
index 684ccc6..169acbc 100644
--- a/hotspot/src/share/vm/opto/graphKit.cpp
+++ b/hotspot/src/share/vm/opto/graphKit.cpp
@@ -3713,7 +3713,8 @@
   Node* no_base = __ top();
   float likely  = PROB_LIKELY(0.999);
   float unlikely  = PROB_UNLIKELY(0.999);
-  Node* zero = __ ConI(0);
+  Node* young_card = __ ConI((jint)G1SATBCardTableModRefBS::g1_young_card_val());
+  Node* dirty_card = __ ConI((jint)CardTableModRefBS::dirty_card_val());
   Node* zeroX = __ ConX(0);
 
   // Get the alias_index for raw card-mark memory
@@ -3769,8 +3770,16 @@
         // load the original value of the card
         Node* card_val = __ load(__ ctrl(), card_adr, TypeInt::INT, T_BYTE, Compile::AliasIdxRaw);
 
-        __ if_then(card_val, BoolTest::ne, zero); {
-          g1_mark_card(ideal, card_adr, oop_store, alias_idx, index, index_adr, buffer, tf);
+        __ if_then(card_val, BoolTest::ne, young_card); {
+          sync_kit(ideal);
+          // Use Op_MemBarVolatile to achieve the effect of a StoreLoad barrier.
+          insert_mem_bar(Op_MemBarVolatile, oop_store);
+          __ sync_kit(this);
+
+          Node* card_val_reload = __ load(__ ctrl(), card_adr, TypeInt::INT, T_BYTE, Compile::AliasIdxRaw);
+          __ if_then(card_val_reload, BoolTest::ne, dirty_card); {
+            g1_mark_card(ideal, card_adr, oop_store, alias_idx, index, index_adr, buffer, tf);
+          } __ end_if();
         } __ end_if();
       } __ end_if();
     } __ end_if();
diff --git a/hotspot/src/share/vm/prims/jni.cpp b/hotspot/src/share/vm/prims/jni.cpp
index cbd7860..fce0715 100644
--- a/hotspot/src/share/vm/prims/jni.cpp
+++ b/hotspot/src/share/vm/prims/jni.cpp
@@ -1591,10 +1591,8 @@
     }
   } else {
     m = klass->lookup_method(name, signature);
-    // Look up interfaces
-    if (m == NULL && klass->oop_is_instance()) {
-      m = InstanceKlass::cast(klass())->lookup_method_in_all_interfaces(name,
-                                                                   signature);
+    if (m == NULL &&  klass->oop_is_instance()) {
+      m = InstanceKlass::cast(klass())->lookup_method_in_ordered_interfaces(name, signature);
     }
   }
   if (m == NULL || (m->is_static() != is_static)) {
@@ -3210,7 +3208,11 @@
   HOTSPOT_JNI_GETSTRINGLENGTH_ENTRY(
                                     env, string);
 #endif /* USDT2 */
-  jsize ret = java_lang_String::length(JNIHandles::resolve_non_null(string));
+  jsize ret = 0;
+  oop s = JNIHandles::resolve_non_null(string);
+  if (java_lang_String::value(s) != NULL) {
+    ret = java_lang_String::length(s);
+  }
 #ifndef USDT2
   DTRACE_PROBE1(hotspot_jni, GetStringLength__return, ret);
 #else /* USDT2 */
@@ -3230,20 +3232,23 @@
  HOTSPOT_JNI_GETSTRINGCHARS_ENTRY(
                                   env, string, (uintptr_t *) isCopy);
 #endif /* USDT2 */
+  jchar* buf = NULL;
   oop s = JNIHandles::resolve_non_null(string);
-  int s_len = java_lang_String::length(s);
   typeArrayOop s_value = java_lang_String::value(s);
-  int s_offset = java_lang_String::offset(s);
-  jchar* buf = NEW_C_HEAP_ARRAY_RETURN_NULL(jchar, s_len + 1, mtInternal);  // add one for zero termination
-  /* JNI Specification states return NULL on OOM */
-  if (buf != NULL) {
-    if (s_len > 0) {
-      memcpy(buf, s_value->char_at_addr(s_offset), sizeof(jchar)*s_len);
-    }
-    buf[s_len] = 0;
-    //%note jni_5
-    if (isCopy != NULL) {
-      *isCopy = JNI_TRUE;
+  if (s_value != NULL) {
+    int s_len = java_lang_String::length(s);
+    int s_offset = java_lang_String::offset(s);
+    buf = NEW_C_HEAP_ARRAY_RETURN_NULL(jchar, s_len + 1, mtInternal);  // add one for zero termination
+    /* JNI Specification states return NULL on OOM */
+    if (buf != NULL) {
+      if (s_len > 0) {
+        memcpy(buf, s_value->char_at_addr(s_offset), sizeof(jchar)*s_len);
+      }
+      buf[s_len] = 0;
+      //%note jni_5
+      if (isCopy != NULL) {
+        *isCopy = JNI_TRUE;
+      }
     }
   }
 #ifndef USDT2
@@ -3313,7 +3318,11 @@
  HOTSPOT_JNI_GETSTRINGUTFLENGTH_ENTRY(
                                       env, string);
 #endif /* USDT2 */
-  jsize ret = java_lang_String::utf8_length(JNIHandles::resolve_non_null(string));
+  jsize ret = 0;
+  oop java_string = JNIHandles::resolve_non_null(string);
+  if (java_lang_String::value(java_string) != NULL) {
+    ret = java_lang_String::utf8_length(java_string);
+  }
 #ifndef USDT2
   DTRACE_PROBE1(hotspot_jni, GetStringUTFLength__return, ret);
 #else /* USDT2 */
@@ -3332,14 +3341,17 @@
  HOTSPOT_JNI_GETSTRINGUTFCHARS_ENTRY(
                                      env, string, (uintptr_t *) isCopy);
 #endif /* USDT2 */
+  char* result = NULL;
   oop java_string = JNIHandles::resolve_non_null(string);
-  size_t length = java_lang_String::utf8_length(java_string);
-  /* JNI Specification states return NULL on OOM */
-  char* result = AllocateHeap(length + 1, mtInternal, 0, AllocFailStrategy::RETURN_NULL);
-  if (result != NULL) {
-    java_lang_String::as_utf8_string(java_string, result, (int) length + 1);
-    if (isCopy != NULL) {
-      *isCopy = JNI_TRUE;
+  if (java_lang_String::value(java_string) != NULL) {
+    size_t length = java_lang_String::utf8_length(java_string);
+    /* JNI Specification states return NULL on OOM */
+    result = AllocateHeap(length + 1, mtInternal, 0, AllocFailStrategy::RETURN_NULL);
+    if (result != NULL) {
+      java_lang_String::as_utf8_string(java_string, result, (int) length + 1);
+      if (isCopy != NULL) {
+        *isCopy = JNI_TRUE;
+      }
     }
   }
 #ifndef USDT2
diff --git a/hotspot/src/share/vm/prims/jniCheck.cpp b/hotspot/src/share/vm/prims/jniCheck.cpp
index c53bf39..b829d14 100644
--- a/hotspot/src/share/vm/prims/jniCheck.cpp
+++ b/hotspot/src/share/vm/prims/jniCheck.cpp
@@ -1324,18 +1324,19 @@
     IN_VM(
       checkString(thr, str);
     )
+    jchar* newResult = NULL;
     const jchar *result = UNCHECKED()->GetStringChars(env,str,isCopy);
     assert (isCopy == NULL || *isCopy == JNI_TRUE, "GetStringChars didn't return a copy as expected");
-
-    size_t len = UNCHECKED()->GetStringLength(env,str) + 1; // + 1 for NULL termination
-    jint* tagLocation = (jint*) AllocateHeap(len * sizeof(jchar) + sizeof(jint), mtInternal);
-    *tagLocation = STRING_TAG;
-    jchar* newResult = (jchar*) (tagLocation + 1);
-    memcpy(newResult, result, len * sizeof(jchar));
-    // Avoiding call to UNCHECKED()->ReleaseStringChars() since that will fire unexpected dtrace probes
-    // Note that the dtrace arguments for the allocated memory will not match up with this solution.
-    FreeHeap((char*)result);
-
+    if (result != NULL) {
+      size_t len = UNCHECKED()->GetStringLength(env,str) + 1; // + 1 for NULL termination
+      jint* tagLocation = (jint*) AllocateHeap(len * sizeof(jchar) + sizeof(jint), mtInternal);
+      *tagLocation = STRING_TAG;
+      newResult = (jchar*) (tagLocation + 1);
+      memcpy(newResult, result, len * sizeof(jchar));
+      // Avoiding call to UNCHECKED()->ReleaseStringChars() since that will fire unexpected dtrace probes
+      // Note that the dtrace arguments for the allocated memory will not match up with this solution.
+      FreeHeap((char*)result);
+    }
     functionExit(env);
     return newResult;
 JNI_END
@@ -1394,18 +1395,19 @@
     IN_VM(
       checkString(thr, str);
     )
+    char* newResult = NULL;
     const char *result = UNCHECKED()->GetStringUTFChars(env,str,isCopy);
     assert (isCopy == NULL || *isCopy == JNI_TRUE, "GetStringUTFChars didn't return a copy as expected");
-
-    size_t len = strlen(result) + 1; // + 1 for NULL termination
-    jint* tagLocation = (jint*) AllocateHeap(len + sizeof(jint), mtInternal);
-    *tagLocation = STRING_UTF_TAG;
-    char* newResult = (char*) (tagLocation + 1);
-    strcpy(newResult, result);
-    // Avoiding call to UNCHECKED()->ReleaseStringUTFChars() since that will fire unexpected dtrace probes
-    // Note that the dtrace arguments for the allocated memory will not match up with this solution.
-    FreeHeap((char*)result, mtInternal);
-
+    if (result != NULL) {
+      size_t len = strlen(result) + 1; // + 1 for NULL termination
+      jint* tagLocation = (jint*) AllocateHeap(len + sizeof(jint), mtInternal);
+      *tagLocation = STRING_UTF_TAG;
+      newResult = (char*) (tagLocation + 1);
+      strcpy(newResult, result);
+      // Avoiding call to UNCHECKED()->ReleaseStringUTFChars() since that will fire unexpected dtrace probes
+      // Note that the dtrace arguments for the allocated memory will not match up with this solution.
+      FreeHeap((char*)result, mtInternal);
+    }
     functionExit(env);
     return newResult;
 JNI_END
diff --git a/hotspot/src/share/vm/prims/jvm.cpp b/hotspot/src/share/vm/prims/jvm.cpp
index 7d23f01..a757e19 100644
--- a/hotspot/src/share/vm/prims/jvm.cpp
+++ b/hotspot/src/share/vm/prims/jvm.cpp
@@ -668,13 +668,12 @@
 JVM_ENTRY(jclass, JVM_GetCallerClass(JNIEnv* env, int depth))
   JVMWrapper("JVM_GetCallerClass");
 
-  // Pre-JDK 8 and early builds of JDK 8 don't have a CallerSensitive annotation.
-  if (SystemDictionary::reflect_CallerSensitive_klass() == NULL) {
+  // Pre-JDK 8 and early builds of JDK 8 don't have a CallerSensitive annotation; or
+  // sun.reflect.Reflection.getCallerClass with a depth parameter is provided
+  // temporarily for existing code to use until a replacement API is defined.
+  if (SystemDictionary::reflect_CallerSensitive_klass() == NULL || depth != JVM_CALLER_DEPTH) {
     Klass* k = thread->security_get_caller_class(depth);
     return (k == NULL) ? NULL : (jclass) JNIHandles::make_local(env, k->java_mirror());
-  } else {
-    // Basic handshaking with Java_sun_reflect_Reflection_getCallerClass
-    assert(depth == -1, "wrong handshake depth");
   }
 
   // Getting the class of the caller frame.
@@ -3954,248 +3953,6 @@
 }
 
 
-// Serialization
-JVM_ENTRY(void, JVM_SetPrimitiveFieldValues(JNIEnv *env, jclass cb, jobject obj,
-                                            jlongArray fieldIDs, jcharArray typecodes, jbyteArray data))
-  assert(!JDK_Version::is_gte_jdk14x_version(), "should only be used in 1.3.1 and earlier");
-
-  typeArrayOop tcodes = typeArrayOop(JNIHandles::resolve(typecodes));
-  typeArrayOop dbuf   = typeArrayOop(JNIHandles::resolve(data));
-  typeArrayOop fids   = typeArrayOop(JNIHandles::resolve(fieldIDs));
-  oop          o      = JNIHandles::resolve(obj);
-
-  if (o == NULL || fids == NULL  || dbuf == NULL  || tcodes == NULL) {
-    THROW(vmSymbols::java_lang_NullPointerException());
-  }
-
-  jsize nfids = fids->length();
-  if (nfids == 0) return;
-
-  if (tcodes->length() < nfids) {
-    THROW(vmSymbols::java_lang_ArrayIndexOutOfBoundsException());
-  }
-
-  jsize off = 0;
-  /* loop through fields, setting values */
-  for (jsize i = 0; i < nfids; i++) {
-    jfieldID fid = (jfieldID)(intptr_t) fids->long_at(i);
-    int field_offset;
-    if (fid != NULL) {
-      // NULL is a legal value for fid, but retrieving the field offset
-      // trigger assertion in that case
-      field_offset = jfieldIDWorkaround::from_instance_jfieldID(o->klass(), fid);
-    }
-
-    switch (tcodes->char_at(i)) {
-      case 'Z':
-        if (fid != NULL) {
-          jboolean val = (dbuf->byte_at(off) != 0) ? JNI_TRUE : JNI_FALSE;
-          o->bool_field_put(field_offset, val);
-        }
-        off++;
-        break;
-
-      case 'B':
-        if (fid != NULL) {
-          o->byte_field_put(field_offset, dbuf->byte_at(off));
-        }
-        off++;
-        break;
-
-      case 'C':
-        if (fid != NULL) {
-          jchar val = ((dbuf->byte_at(off + 0) & 0xFF) << 8)
-                    + ((dbuf->byte_at(off + 1) & 0xFF) << 0);
-          o->char_field_put(field_offset, val);
-        }
-        off += 2;
-        break;
-
-      case 'S':
-        if (fid != NULL) {
-          jshort val = ((dbuf->byte_at(off + 0) & 0xFF) << 8)
-                     + ((dbuf->byte_at(off + 1) & 0xFF) << 0);
-          o->short_field_put(field_offset, val);
-        }
-        off += 2;
-        break;
-
-      case 'I':
-        if (fid != NULL) {
-          jint ival = ((dbuf->byte_at(off + 0) & 0xFF) << 24)
-                    + ((dbuf->byte_at(off + 1) & 0xFF) << 16)
-                    + ((dbuf->byte_at(off + 2) & 0xFF) << 8)
-                    + ((dbuf->byte_at(off + 3) & 0xFF) << 0);
-          o->int_field_put(field_offset, ival);
-        }
-        off += 4;
-        break;
-
-      case 'F':
-        if (fid != NULL) {
-          jint ival = ((dbuf->byte_at(off + 0) & 0xFF) << 24)
-                    + ((dbuf->byte_at(off + 1) & 0xFF) << 16)
-                    + ((dbuf->byte_at(off + 2) & 0xFF) << 8)
-                    + ((dbuf->byte_at(off + 3) & 0xFF) << 0);
-          jfloat fval = (*int_bits_to_float_fn)(env, NULL, ival);
-          o->float_field_put(field_offset, fval);
-        }
-        off += 4;
-        break;
-
-      case 'J':
-        if (fid != NULL) {
-          jlong lval = (((jlong) dbuf->byte_at(off + 0) & 0xFF) << 56)
-                     + (((jlong) dbuf->byte_at(off + 1) & 0xFF) << 48)
-                     + (((jlong) dbuf->byte_at(off + 2) & 0xFF) << 40)
-                     + (((jlong) dbuf->byte_at(off + 3) & 0xFF) << 32)
-                     + (((jlong) dbuf->byte_at(off + 4) & 0xFF) << 24)
-                     + (((jlong) dbuf->byte_at(off + 5) & 0xFF) << 16)
-                     + (((jlong) dbuf->byte_at(off + 6) & 0xFF) << 8)
-                     + (((jlong) dbuf->byte_at(off + 7) & 0xFF) << 0);
-          o->long_field_put(field_offset, lval);
-        }
-        off += 8;
-        break;
-
-      case 'D':
-        if (fid != NULL) {
-          jlong lval = (((jlong) dbuf->byte_at(off + 0) & 0xFF) << 56)
-                     + (((jlong) dbuf->byte_at(off + 1) & 0xFF) << 48)
-                     + (((jlong) dbuf->byte_at(off + 2) & 0xFF) << 40)
-                     + (((jlong) dbuf->byte_at(off + 3) & 0xFF) << 32)
-                     + (((jlong) dbuf->byte_at(off + 4) & 0xFF) << 24)
-                     + (((jlong) dbuf->byte_at(off + 5) & 0xFF) << 16)
-                     + (((jlong) dbuf->byte_at(off + 6) & 0xFF) << 8)
-                     + (((jlong) dbuf->byte_at(off + 7) & 0xFF) << 0);
-          jdouble dval = (*long_bits_to_double_fn)(env, NULL, lval);
-          o->double_field_put(field_offset, dval);
-        }
-        off += 8;
-        break;
-
-      default:
-        // Illegal typecode
-        THROW_MSG(vmSymbols::java_lang_IllegalArgumentException(), "illegal typecode");
-    }
-  }
-JVM_END
-
-
-JVM_ENTRY(void, JVM_GetPrimitiveFieldValues(JNIEnv *env, jclass cb, jobject obj,
-                            jlongArray fieldIDs, jcharArray typecodes, jbyteArray data))
-  assert(!JDK_Version::is_gte_jdk14x_version(), "should only be used in 1.3.1 and earlier");
-
-  typeArrayOop tcodes = typeArrayOop(JNIHandles::resolve(typecodes));
-  typeArrayOop dbuf   = typeArrayOop(JNIHandles::resolve(data));
-  typeArrayOop fids   = typeArrayOop(JNIHandles::resolve(fieldIDs));
-  oop          o      = JNIHandles::resolve(obj);
-
-  if (o == NULL || fids == NULL  || dbuf == NULL  || tcodes == NULL) {
-    THROW(vmSymbols::java_lang_NullPointerException());
-  }
-
-  jsize nfids = fids->length();
-  if (nfids == 0) return;
-
-  if (tcodes->length() < nfids) {
-    THROW(vmSymbols::java_lang_ArrayIndexOutOfBoundsException());
-  }
-
-  /* loop through fields, fetching values */
-  jsize off = 0;
-  for (jsize i = 0; i < nfids; i++) {
-    jfieldID fid = (jfieldID)(intptr_t) fids->long_at(i);
-    if (fid == NULL) {
-      THROW(vmSymbols::java_lang_NullPointerException());
-    }
-    int field_offset = jfieldIDWorkaround::from_instance_jfieldID(o->klass(), fid);
-
-     switch (tcodes->char_at(i)) {
-       case 'Z':
-         {
-           jboolean val = o->bool_field(field_offset);
-           dbuf->byte_at_put(off++, (val != 0) ? 1 : 0);
-         }
-         break;
-
-       case 'B':
-         dbuf->byte_at_put(off++, o->byte_field(field_offset));
-         break;
-
-       case 'C':
-         {
-           jchar val = o->char_field(field_offset);
-           dbuf->byte_at_put(off++, (val >> 8) & 0xFF);
-           dbuf->byte_at_put(off++, (val >> 0) & 0xFF);
-         }
-         break;
-
-       case 'S':
-         {
-           jshort val = o->short_field(field_offset);
-           dbuf->byte_at_put(off++, (val >> 8) & 0xFF);
-           dbuf->byte_at_put(off++, (val >> 0) & 0xFF);
-         }
-         break;
-
-       case 'I':
-         {
-           jint val = o->int_field(field_offset);
-           dbuf->byte_at_put(off++, (val >> 24) & 0xFF);
-           dbuf->byte_at_put(off++, (val >> 16) & 0xFF);
-           dbuf->byte_at_put(off++, (val >> 8)  & 0xFF);
-           dbuf->byte_at_put(off++, (val >> 0)  & 0xFF);
-         }
-         break;
-
-       case 'F':
-         {
-           jfloat fval = o->float_field(field_offset);
-           jint ival = (*float_to_int_bits_fn)(env, NULL, fval);
-           dbuf->byte_at_put(off++, (ival >> 24) & 0xFF);
-           dbuf->byte_at_put(off++, (ival >> 16) & 0xFF);
-           dbuf->byte_at_put(off++, (ival >> 8)  & 0xFF);
-           dbuf->byte_at_put(off++, (ival >> 0)  & 0xFF);
-         }
-         break;
-
-       case 'J':
-         {
-           jlong val = o->long_field(field_offset);
-           dbuf->byte_at_put(off++, (val >> 56) & 0xFF);
-           dbuf->byte_at_put(off++, (val >> 48) & 0xFF);
-           dbuf->byte_at_put(off++, (val >> 40) & 0xFF);
-           dbuf->byte_at_put(off++, (val >> 32) & 0xFF);
-           dbuf->byte_at_put(off++, (val >> 24) & 0xFF);
-           dbuf->byte_at_put(off++, (val >> 16) & 0xFF);
-           dbuf->byte_at_put(off++, (val >> 8)  & 0xFF);
-           dbuf->byte_at_put(off++, (val >> 0)  & 0xFF);
-         }
-         break;
-
-       case 'D':
-         {
-           jdouble dval = o->double_field(field_offset);
-           jlong lval = (*double_to_long_bits_fn)(env, NULL, dval);
-           dbuf->byte_at_put(off++, (lval >> 56) & 0xFF);
-           dbuf->byte_at_put(off++, (lval >> 48) & 0xFF);
-           dbuf->byte_at_put(off++, (lval >> 40) & 0xFF);
-           dbuf->byte_at_put(off++, (lval >> 32) & 0xFF);
-           dbuf->byte_at_put(off++, (lval >> 24) & 0xFF);
-           dbuf->byte_at_put(off++, (lval >> 16) & 0xFF);
-           dbuf->byte_at_put(off++, (lval >> 8)  & 0xFF);
-           dbuf->byte_at_put(off++, (lval >> 0)  & 0xFF);
-         }
-         break;
-
-       default:
-         // Illegal typecode
-         THROW_MSG(vmSymbols::java_lang_IllegalArgumentException(), "illegal typecode");
-     }
-  }
-JVM_END
-
 
 // Shared JNI/JVM entry points //////////////////////////////////////////////////////////////
 
diff --git a/hotspot/src/share/vm/prims/jvm.h b/hotspot/src/share/vm/prims/jvm.h
index 6248f4d..ef57a9d 100644
--- a/hotspot/src/share/vm/prims/jvm.h
+++ b/hotspot/src/share/vm/prims/jvm.h
@@ -374,6 +374,9 @@
 /*
  * java.lang.Class and java.lang.ClassLoader
  */
+
+#define JVM_CALLER_DEPTH -1
+
 /*
  * Returns the class in which the code invoking the native method
  * belongs.
diff --git a/hotspot/src/share/vm/prims/jvm_misc.hpp b/hotspot/src/share/vm/prims/jvm_misc.hpp
index 07844b1..266ed86 100644
--- a/hotspot/src/share/vm/prims/jvm_misc.hpp
+++ b/hotspot/src/share/vm/prims/jvm_misc.hpp
@@ -36,22 +36,6 @@
 void trace_class_resolution(Klass* to_class);
 
 /*
- * Support for Serialization and RMI. Currently used by HotSpot only.
- */
-
-extern "C" {
-
-void JNICALL
-JVM_SetPrimitiveFieldValues(JNIEnv *env, jclass cb, jobject obj,
-                            jlongArray fieldIDs, jcharArray typecodes, jbyteArray data);
-
-void JNICALL
-JVM_GetPrimitiveFieldValues(JNIEnv *env, jclass cb, jobject obj,
-                            jlongArray fieldIDs, jcharArray typecodes, jbyteArray data);
-
-}
-
-/*
  * Support for -Xcheck:jni
  */
 
diff --git a/hotspot/src/share/vm/prims/jvmtiRedefineClasses.cpp b/hotspot/src/share/vm/prims/jvmtiRedefineClasses.cpp
index 34254d6..1c3bbbf 100644
--- a/hotspot/src/share/vm/prims/jvmtiRedefineClasses.cpp
+++ b/hotspot/src/share/vm/prims/jvmtiRedefineClasses.cpp
@@ -2755,13 +2755,26 @@
     // InstanceKlass around to hold obsolete methods so we don't have
     // any other InstanceKlass embedded vtables to update. The vtable
     // holds the Method*s for virtual (but not final) methods.
-    if (ik->vtable_length() > 0 && ik->is_subtype_of(_the_class_oop)) {
+    // Default methods, or concrete methods in interfaces are stored
+    // in the vtable, so if an interface changes we need to check
+    // adjust_method_entries() for every InstanceKlass, which will also
+    // adjust the default method vtable indices.
+    // We also need to adjust any default method entries that are
+    // not yet in the vtable, because the vtable setup is in progress.
+    // This must be done after we adjust the default_methods and
+    // default_vtable_indices for methods already in the vtable.
+    if (ik->vtable_length() > 0 && (_the_class_oop->is_interface()
+        || ik->is_subtype_of(_the_class_oop))) {
       // ik->vtable() creates a wrapper object; rm cleans it up
       ResourceMark rm(_thread);
       ik->vtable()->adjust_method_entries(_matching_old_methods,
                                           _matching_new_methods,
                                           _matching_methods_length,
                                           &trace_name_printed);
+      ik->adjust_default_methods(_matching_old_methods,
+                                 _matching_new_methods,
+                                 _matching_methods_length,
+                                 &trace_name_printed);
     }
 
     // If the current class has an itable and we are either redefining an
@@ -2931,7 +2944,8 @@
       old_method->set_is_obsolete();
       obsolete_count++;
 
-      // obsolete methods need a unique idnum
+      // obsolete methods need a unique idnum so they become new entries in
+      // the jmethodID cache in InstanceKlass
       u2 num = InstanceKlass::cast(_the_class_oop)->next_method_idnum();
       if (num != ConstMethod::UNSET_IDNUM) {
         old_method->set_method_idnum(num);
diff --git a/hotspot/src/share/vm/prims/methodHandles.cpp b/hotspot/src/share/vm/prims/methodHandles.cpp
index 88b82b3..7faaebb 100644
--- a/hotspot/src/share/vm/prims/methodHandles.cpp
+++ b/hotspot/src/share/vm/prims/methodHandles.cpp
@@ -187,12 +187,34 @@
     receiver_limit = m->method_holder();
     assert(receiver_limit->verify_itable_index(vmindex), "");
     flags |= IS_METHOD | (JVM_REF_invokeInterface << REFERENCE_KIND_SHIFT);
+    if (TraceInvokeDynamic) {
+      ResourceMark rm;
+      tty->print_cr("memberName: invokeinterface method_holder::method: %s, receiver: %s, itableindex: %d, access_flags:",
+            Method::name_and_sig_as_C_string(receiver_limit(), m->name(), m->signature()),
+            receiver_limit()->internal_name(), vmindex);
+       m->access_flags().print_on(tty);
+       if (!m->is_abstract()) {
+         tty->print("default");
+       }
+       tty->cr();
+    }
     break;
 
   case CallInfo::vtable_call:
     vmindex = info.vtable_index();
     flags |= IS_METHOD | (JVM_REF_invokeVirtual << REFERENCE_KIND_SHIFT);
     assert(receiver_limit->is_subtype_of(m->method_holder()), "virtual call must be type-safe");
+    if (TraceInvokeDynamic) {
+      ResourceMark rm;
+      tty->print_cr("memberName: invokevirtual method_holder::method: %s, receiver: %s, vtableindex: %d, access_flags:",
+            Method::name_and_sig_as_C_string(receiver_limit(), m->name(), m->signature()),
+            receiver_limit()->internal_name(), vmindex);
+       m->access_flags().print_on(tty);
+       if (m->is_default_method()) {
+         tty->print("default");
+       }
+       tty->cr();
+    }
     break;
 
   case CallInfo::direct_call:
diff --git a/hotspot/src/share/vm/prims/nativeLookup.cpp b/hotspot/src/share/vm/prims/nativeLookup.cpp
index 990600e..bb4843e 100644
--- a/hotspot/src/share/vm/prims/nativeLookup.cpp
+++ b/hotspot/src/share/vm/prims/nativeLookup.cpp
@@ -129,10 +129,6 @@
 #define FN_PTR(f) CAST_FROM_FN_PTR(void*, &f)
 
 static JNINativeMethod lookup_special_native_methods[] = {
-  // Next two functions only exist for compatibility with 1.3.1 and earlier.
-  { CC"Java_java_io_ObjectOutputStream_getPrimitiveFieldValues",   NULL, FN_PTR(JVM_GetPrimitiveFieldValues)     },  // intercept ObjectOutputStream getPrimitiveFieldValues for faster serialization
-  { CC"Java_java_io_ObjectInputStream_setPrimitiveFieldValues",    NULL, FN_PTR(JVM_SetPrimitiveFieldValues)     },  // intercept ObjectInputStream setPrimitiveFieldValues for faster serialization
-
   { CC"Java_sun_misc_Unsafe_registerNatives",                      NULL, FN_PTR(JVM_RegisterUnsafeMethods)       },
   { CC"Java_java_lang_invoke_MethodHandleNatives_registerNatives", NULL, FN_PTR(JVM_RegisterMethodHandleMethods) },
   { CC"Java_sun_misc_Perf_registerNatives",                        NULL, FN_PTR(JVM_RegisterPerfMethods)         },
@@ -140,9 +136,8 @@
 };
 
 static address lookup_special_native(char* jni_name) {
-  int i = !JDK_Version::is_gte_jdk14x_version() ? 0 : 2;  // see comment in lookup_special_native_methods
   int count = sizeof(lookup_special_native_methods) / sizeof(JNINativeMethod);
-  for (; i < count; i++) {
+  for (int i = 0; i < count; i++) {
     // NB: To ignore the jni prefix and jni postfix strstr is used matching.
     if (strstr(jni_name, lookup_special_native_methods[i].name) != NULL) {
       return CAST_FROM_FN_PTR(address, lookup_special_native_methods[i].fnPtr);
diff --git a/hotspot/src/share/vm/prims/wbtestmethods/parserTests.cpp b/hotspot/src/share/vm/prims/wbtestmethods/parserTests.cpp
index 4a74ddf..da3493c 100644
--- a/hotspot/src/share/vm/prims/wbtestmethods/parserTests.cpp
+++ b/hotspot/src/share/vm/prims/wbtestmethods/parserTests.cpp
@@ -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
@@ -117,11 +117,12 @@
 
   const char* c_cmdline = java_lang_String::as_utf8_string(JNIHandles::resolve(j_cmdline));
   objArrayOop argumentArray = objArrayOop(JNIHandles::resolve_non_null(arguments));
+  objArrayHandle argumentArray_ah(THREAD, argumentArray);
 
-  int length = argumentArray->length();
+  int length = argumentArray_ah->length();
 
   for (int i = 0; i < length; i++) {
-    oop argument_oop = argumentArray->obj_at(i);
+    oop argument_oop = argumentArray_ah->obj_at(i);
     fill_in_parser(&parser, argument_oop);
   }
 
@@ -130,19 +131,20 @@
 
   Klass* k = SystemDictionary::Object_klass();
   objArrayOop returnvalue_array = oopFactory::new_objArray(k, parser.num_arguments() * 2, CHECK_NULL);
+  objArrayHandle returnvalue_array_ah(THREAD, returnvalue_array);
 
   GrowableArray<const char *>*parsedArgNames = parser.argument_name_array();
 
   for (int i = 0; i < parser.num_arguments(); i++) {
     oop parsedName = java_lang_String::create_oop_from_str(parsedArgNames->at(i), CHECK_NULL);
-    returnvalue_array->obj_at_put(i*2, parsedName);
+    returnvalue_array_ah->obj_at_put(i*2, parsedName);
     GenDCmdArgument* arg = parser.lookup_dcmd_option(parsedArgNames->at(i), strlen(parsedArgNames->at(i)));
     char buf[VALUE_MAXLEN];
     arg->value_as_str(buf, sizeof(buf));
     oop parsedValue = java_lang_String::create_oop_from_str(buf, CHECK_NULL);
-    returnvalue_array->obj_at_put(i*2+1, parsedValue);
+    returnvalue_array_ah->obj_at_put(i*2+1, parsedValue);
   }
 
-  return (jobjectArray) JNIHandles::make_local(returnvalue_array);
+  return (jobjectArray) JNIHandles::make_local(returnvalue_array_ah());
 
 WB_END
diff --git a/hotspot/src/share/vm/runtime/arguments.cpp b/hotspot/src/share/vm/runtime/arguments.cpp
index 1c69cbd..031d9ce 100644
--- a/hotspot/src/share/vm/runtime/arguments.cpp
+++ b/hotspot/src/share/vm/runtime/arguments.cpp
@@ -2045,6 +2045,9 @@
   status = status && verify_interval(StringTableSize, minimumStringTableSize,
     (max_uintx / StringTable::bucket_size()), "StringTable size");
 
+  status = status && verify_interval(SymbolTableSize, minimumSymbolTableSize,
+    (max_uintx / SymbolTable::bucket_size()), "SymbolTable size");
+
   if (MinHeapFreeRatio > MaxHeapFreeRatio) {
     jio_fprintf(defaultStream::error_stream(),
                 "MinHeapFreeRatio (" UINTX_FORMAT ") must be less than or "
@@ -2654,16 +2657,16 @@
       FLAG_SET_CMDLINE(bool, BackgroundCompilation, false);
     // -Xmn for compatibility with other JVM vendors
     } else if (match_option(option, "-Xmn", &tail)) {
-      julong long_initial_eden_size = 0;
-      ArgsRange errcode = parse_memory_size(tail, &long_initial_eden_size, 1);
+      julong long_initial_young_size = 0;
+      ArgsRange errcode = parse_memory_size(tail, &long_initial_young_size, 1);
       if (errcode != arg_in_range) {
         jio_fprintf(defaultStream::error_stream(),
-                    "Invalid initial eden size: %s\n", option->optionString);
+                    "Invalid initial young generation size: %s\n", option->optionString);
         describe_range_error(errcode);
         return JNI_EINVAL;
       }
-      FLAG_SET_CMDLINE(uintx, MaxNewSize, (uintx)long_initial_eden_size);
-      FLAG_SET_CMDLINE(uintx, NewSize, (uintx)long_initial_eden_size);
+      FLAG_SET_CMDLINE(uintx, MaxNewSize, (uintx)long_initial_young_size);
+      FLAG_SET_CMDLINE(uintx, NewSize, (uintx)long_initial_young_size);
     // -Xms
     } else if (match_option(option, "-Xms", &tail)) {
       julong long_initial_heap_size = 0;
@@ -3663,6 +3666,9 @@
   assert(verify_serial_gc_flags(), "SerialGC unset");
 #endif // INCLUDE_ALL_GCS
 
+  // Initialize Metaspace flags and alignments.
+  Metaspace::ergo_initialize();
+
   // Set bytecode rewriting flags
   set_bytecode_flags();
 
diff --git a/hotspot/src/share/vm/runtime/globals.hpp b/hotspot/src/share/vm/runtime/globals.hpp
index e8b7d17..91a9946 100644
--- a/hotspot/src/share/vm/runtime/globals.hpp
+++ b/hotspot/src/share/vm/runtime/globals.hpp
@@ -481,21 +481,21 @@
 #define RUNTIME_FLAGS(develop, develop_pd, product, product_pd, diagnostic, experimental, notproduct, manageable, product_rw, lp64_product) \
                                                                             \
   lp64_product(bool, UseCompressedOops, false,                              \
-            "Use 32-bit object references in 64-bit VM  "                   \
-            "lp64_product means flag is always constant in 32 bit VM")      \
+          "Use 32-bit object references in 64-bit VM. "                     \
+          "lp64_product means flag is always constant in 32 bit VM")        \
                                                                             \
   lp64_product(bool, UseCompressedClassPointers, false,                     \
-            "Use 32-bit class pointers in 64-bit VM  "                      \
-            "lp64_product means flag is always constant in 32 bit VM")      \
+          "Use 32-bit class pointers in 64-bit VM. "                        \
+          "lp64_product means flag is always constant in 32 bit VM")        \
                                                                             \
   notproduct(bool, CheckCompressedOops, true,                               \
-            "generate checks in encoding/decoding code in debug VM")        \
+          "Generate checks in encoding/decoding code in debug VM")          \
                                                                             \
   product_pd(uintx, HeapBaseMinAddress,                                     \
-            "OS specific low limit for heap base address")                  \
+          "OS specific low limit for heap base address")                    \
                                                                             \
   diagnostic(bool, PrintCompressedOopsMode, false,                          \
-            "Print compressed oops base address and encoding mode")         \
+          "Print compressed oops base address and encoding mode")           \
                                                                             \
   lp64_product(intx, ObjectAlignmentInBytes, 8,                             \
           "Default object alignment in bytes, 8 is minimum")                \
@@ -517,7 +517,7 @@
           "Use lwsync instruction if true, else use slower sync")           \
                                                                             \
   develop(bool, CleanChunkPoolAsync, falseInEmbedded,                       \
-          "Whether to clean the chunk pool asynchronously")                 \
+          "Clean the chunk pool asynchronously")                            \
                                                                             \
   /* Temporary: See 6948537 */                                              \
   experimental(bool, UseMemSetInBOT, true,                                  \
@@ -527,10 +527,12 @@
           "Enable normal processing of flags relating to field diagnostics")\
                                                                             \
   experimental(bool, UnlockExperimentalVMOptions, false,                    \
-          "Enable normal processing of flags relating to experimental features")\
+          "Enable normal processing of flags relating to experimental "     \
+          "features")                                                       \
                                                                             \
   product(bool, JavaMonitorsInStackTrace, true,                             \
-          "Print info. about Java monitor locks when the stacks are dumped")\
+          "Print information about Java monitor locks when the stacks are"  \
+          "dumped")                                                         \
                                                                             \
   product_pd(bool, UseLargePages,                                           \
           "Use large page memory")                                          \
@@ -541,8 +543,12 @@
   develop(bool, LargePagesIndividualAllocationInjectError, false,           \
           "Fail large pages individual allocation")                         \
                                                                             \
+  product(bool, UseLargePagesInMetaspace, false,                            \
+          "Use large page memory in metaspace. "                            \
+          "Only used if UseLargePages is enabled.")                         \
+                                                                            \
   develop(bool, TracePageSizes, false,                                      \
-          "Trace page size selection and usage.")                           \
+          "Trace page size selection and usage")                            \
                                                                             \
   product(bool, UseNUMA, false,                                             \
           "Use NUMA if available")                                          \
@@ -557,12 +563,12 @@
           "Force NUMA optimizations on single-node/UMA systems")            \
                                                                             \
   product(uintx, NUMAChunkResizeWeight, 20,                                 \
-          "Percentage (0-100) used to weigh the current sample when "      \
+          "Percentage (0-100) used to weigh the current sample when "       \
           "computing exponentially decaying average for "                   \
           "AdaptiveNUMAChunkSizing")                                        \
                                                                             \
   product(uintx, NUMASpaceResizeRate, 1*G,                                  \
-          "Do not reallocate more that this amount per collection")         \
+          "Do not reallocate more than this amount per collection")         \
                                                                             \
   product(bool, UseAdaptiveNUMAChunkSizing, true,                           \
           "Enable adaptive chunk sizing for NUMA")                          \
@@ -579,17 +585,17 @@
   product(intx, UseSSE, 99,                                                 \
           "Highest supported SSE instructions set on x86/x64")              \
                                                                             \
-  product(bool, UseAES, false,                                               \
+  product(bool, UseAES, false,                                              \
           "Control whether AES instructions can be used on x86/x64")        \
                                                                             \
   product(uintx, LargePageSizeInBytes, 0,                                   \
-          "Large page size (0 to let VM choose the page size")              \
+          "Large page size (0 to let VM choose the page size)")             \
                                                                             \
   product(uintx, LargePageHeapSizeThreshold, 128*M,                         \
-          "Use large pages if max heap is at least this big")               \
+          "Use large pages if maximum heap is at least this big")           \
                                                                             \
   product(bool, ForceTimeHighResolution, false,                             \
-          "Using high time resolution(For Win32 only)")                     \
+          "Using high time resolution (for Win32 only)")                    \
                                                                             \
   develop(bool, TraceItables, false,                                        \
           "Trace initialization and use of itables")                        \
@@ -605,10 +611,10 @@
                                                                             \
   develop(bool, TraceLongCompiles, false,                                   \
           "Print out every time compilation is longer than "                \
-          "a given threashold")                                             \
+          "a given threshold")                                              \
                                                                             \
   develop(bool, SafepointALot, false,                                       \
-          "Generates a lot of safepoints. Works with "                      \
+          "Generate a lot of safepoints. This works with "                  \
           "GuaranteedSafepointInterval")                                    \
                                                                             \
   product_pd(bool, BackgroundCompilation,                                   \
@@ -616,13 +622,13 @@
           "compilation")                                                    \
                                                                             \
   product(bool, PrintVMQWaitTime, false,                                    \
-          "Prints out the waiting time in VM operation queue")              \
+          "Print out the waiting time in VM operation queue")               \
                                                                             \
   develop(bool, NoYieldsInMicrolock, false,                                 \
           "Disable yields in microlock")                                    \
                                                                             \
   develop(bool, TraceOopMapGeneration, false,                               \
-          "Shows oopmap generation")                                        \
+          "Show OopMapGeneration")                                          \
                                                                             \
   product(bool, MethodFlushing, true,                                       \
           "Reclamation of zombie and not-entrant methods")                  \
@@ -631,10 +637,11 @@
           "Verify stack of each thread when it is entering a runtime call") \
                                                                             \
   diagnostic(bool, ForceUnreachable, false,                                 \
-          "Make all non code cache addresses to be unreachable with forcing use of 64bit literal fixups") \
+          "Make all non code cache addresses to be unreachable by "         \
+          "forcing use of 64bit literal fixups")                            \
                                                                             \
   notproduct(bool, StressDerivedPointers, false,                            \
-          "Force scavenge when a derived pointers is detected on stack "    \
+          "Force scavenge when a derived pointer is detected on stack "     \
           "after rtm call")                                                 \
                                                                             \
   develop(bool, TraceDerivedPointers, false,                                \
@@ -653,86 +660,86 @@
           "Use Inline Caches for virtual calls ")                           \
                                                                             \
   develop(bool, InlineArrayCopy, true,                                      \
-          "inline arraycopy native that is known to be part of "            \
+          "Inline arraycopy native that is known to be part of "            \
           "base library DLL")                                               \
                                                                             \
   develop(bool, InlineObjectHash, true,                                     \
-          "inline Object::hashCode() native that is known to be part "      \
+          "Inline Object::hashCode() native that is known to be part "      \
           "of base library DLL")                                            \
                                                                             \
   develop(bool, InlineNatives, true,                                        \
-          "inline natives that are known to be part of base library DLL")   \
+          "Inline natives that are known to be part of base library DLL")   \
                                                                             \
   develop(bool, InlineMathNatives, true,                                    \
-          "inline SinD, CosD, etc.")                                        \
+          "Inline SinD, CosD, etc.")                                        \
                                                                             \
   develop(bool, InlineClassNatives, true,                                   \
-          "inline Class.isInstance, etc")                                   \
+          "Inline Class.isInstance, etc")                                   \
                                                                             \
   develop(bool, InlineThreadNatives, true,                                  \
-          "inline Thread.currentThread, etc")                               \
+          "Inline Thread.currentThread, etc")                               \
                                                                             \
   develop(bool, InlineUnsafeOps, true,                                      \
-          "inline memory ops (native methods) from sun.misc.Unsafe")        \
+          "Inline memory ops (native methods) from sun.misc.Unsafe")        \
                                                                             \
   product(bool, CriticalJNINatives, true,                                   \
-          "check for critical JNI entry points")                            \
+          "Check for critical JNI entry points")                            \
                                                                             \
   notproduct(bool, StressCriticalJNINatives, false,                         \
-            "Exercise register saving code in critical natives")            \
+          "Exercise register saving code in critical natives")              \
                                                                             \
   product(bool, UseSSE42Intrinsics, false,                                  \
           "SSE4.2 versions of intrinsics")                                  \
                                                                             \
   product(bool, UseAESIntrinsics, false,                                    \
-          "use intrinsics for AES versions of crypto")                      \
+          "Use intrinsics for AES versions of crypto")                      \
                                                                             \
   product(bool, UseCRC32Intrinsics, false,                                  \
           "use intrinsics for java.util.zip.CRC32")                         \
                                                                             \
   develop(bool, TraceCallFixup, false,                                      \
-          "traces all call fixups")                                         \
+          "Trace all call fixups")                                          \
                                                                             \
   develop(bool, DeoptimizeALot, false,                                      \
-          "deoptimize at every exit from the runtime system")               \
+          "Deoptimize at every exit from the runtime system")               \
                                                                             \
   notproduct(ccstrlist, DeoptimizeOnlyAt, "",                               \
-          "a comma separated list of bcis to deoptimize at")                \
+          "A comma separated list of bcis to deoptimize at")                \
                                                                             \
   product(bool, DeoptimizeRandom, false,                                    \
-          "deoptimize random frames on random exit from the runtime system")\
+          "Deoptimize random frames on random exit from the runtime system")\
                                                                             \
   notproduct(bool, ZombieALot, false,                                       \
-          "creates zombies (non-entrant) at exit from the runt. system")    \
+          "Create zombies (non-entrant) at exit from the runtime system")   \
                                                                             \
   product(bool, UnlinkSymbolsALot, false,                                   \
-          "unlink unreferenced symbols from the symbol table at safepoints")\
+          "Unlink unreferenced symbols from the symbol table at safepoints")\
                                                                             \
   notproduct(bool, WalkStackALot, false,                                    \
-          "trace stack (no print) at every exit from the runtime system")   \
+          "Trace stack (no print) at every exit from the runtime system")   \
                                                                             \
   product(bool, Debugging, false,                                           \
-          "set when executing debug methods in debug.ccp "                  \
+          "Set when executing debug methods in debug.cpp "                  \
           "(to prevent triggering assertions)")                             \
                                                                             \
   notproduct(bool, StrictSafepointChecks, trueInDebug,                      \
           "Enable strict checks that safepoints cannot happen for threads " \
-          "that used No_Safepoint_Verifier")                                \
+          "that use No_Safepoint_Verifier")                                 \
                                                                             \
   notproduct(bool, VerifyLastFrame, false,                                  \
           "Verify oops on last frame on entry to VM")                       \
                                                                             \
   develop(bool, TraceHandleAllocation, false,                               \
-          "Prints out warnings when suspicious many handles are allocated") \
+          "Print out warnings when suspiciously many handles are allocated")\
                                                                             \
   product(bool, UseCompilerSafepoints, true,                                \
           "Stop at safepoints in compiled code")                            \
                                                                             \
   product(bool, FailOverToOldVerifier, true,                                \
-          "fail over to old verifier when split verifier fails")            \
+          "Fail over to old verifier when split verifier fails")            \
                                                                             \
   develop(bool, ShowSafepointMsgs, false,                                   \
-          "Show msg. about safepoint synch.")                               \
+          "Show message about safepoint synchronization")                   \
                                                                             \
   product(bool, SafepointTimeout, false,                                    \
           "Time out and warn or fail after SafepointTimeoutDelay "          \
@@ -756,19 +763,19 @@
           "Trace external suspend wait failures")                           \
                                                                             \
   product(bool, MaxFDLimit, true,                                           \
-          "Bump the number of file descriptors to max in solaris.")         \
+          "Bump the number of file descriptors to maximum in Solaris")      \
                                                                             \
   diagnostic(bool, LogEvents, true,                                         \
-             "Enable the various ring buffer event logs")                   \
+          "Enable the various ring buffer event logs")                      \
                                                                             \
   diagnostic(uintx, LogEventsBufferEntries, 10,                             \
-             "Enable the various ring buffer event logs")                   \
+          "Number of ring buffer event logs")                               \
                                                                             \
   product(bool, BytecodeVerificationRemote, true,                           \
-          "Enables the Java bytecode verifier for remote classes")          \
+          "Enable the Java bytecode verifier for remote classes")           \
                                                                             \
   product(bool, BytecodeVerificationLocal, false,                           \
-          "Enables the Java bytecode verifier for local classes")           \
+          "Enable the Java bytecode verifier for local classes")            \
                                                                             \
   develop(bool, ForceFloatExceptions, trueInDebug,                          \
           "Force exceptions on FP stack under/overflow")                    \
@@ -780,7 +787,7 @@
           "Trace java language assertions")                                 \
                                                                             \
   notproduct(bool, CheckAssertionStatusDirectives, false,                   \
-          "temporary - see javaClasses.cpp")                                \
+          "Temporary - see javaClasses.cpp")                                \
                                                                             \
   notproduct(bool, PrintMallocFree, false,                                  \
           "Trace calls to C heap malloc/free allocation")                   \
@@ -799,16 +806,16 @@
           "entering the VM")                                                \
                                                                             \
   notproduct(bool, CheckOopishValues, false,                                \
-          "Warn if value contains oop ( requires ZapDeadLocals)")           \
+          "Warn if value contains oop (requires ZapDeadLocals)")            \
                                                                             \
   develop(bool, UseMallocOnly, false,                                       \
-          "use only malloc/free for allocation (no resource area/arena)")   \
+          "Use only malloc/free for allocation (no resource area/arena)")   \
                                                                             \
   develop(bool, PrintMalloc, false,                                         \
-          "print all malloc/free calls")                                    \
+          "Print all malloc/free calls")                                    \
                                                                             \
   develop(bool, PrintMallocStatistics, false,                               \
-          "print malloc/free statistics")                                   \
+          "Print malloc/free statistics")                                   \
                                                                             \
   develop(bool, ZapResourceArea, trueInDebug,                               \
           "Zap freed resource/arena space with 0xABABABAB")                 \
@@ -820,7 +827,7 @@
           "Zap freed JNI handle space with 0xFEFEFEFE")                     \
                                                                             \
   notproduct(bool, ZapStackSegments, trueInDebug,                           \
-             "Zap allocated/freed Stack segments with 0xFADFADED")          \
+          "Zap allocated/freed stack segments with 0xFADFADED")             \
                                                                             \
   develop(bool, ZapUnusedHeapArea, trueInDebug,                             \
           "Zap unused heap space with 0xBAADBABE")                          \
@@ -835,7 +842,7 @@
           "Zap filler objects with 0xDEAFBABE")                             \
                                                                             \
   develop(bool, PrintVMMessages, true,                                      \
-          "Print vm messages on console")                                   \
+          "Print VM messages on console")                                   \
                                                                             \
   product(bool, PrintGCApplicationConcurrentTime, false,                    \
           "Print the time the application has been running")                \
@@ -844,21 +851,21 @@
           "Print the time the application has been stopped")                \
                                                                             \
   diagnostic(bool, VerboseVerification, false,                              \
-             "Display detailed verification details")                       \
+          "Display detailed verification details")                          \
                                                                             \
   notproduct(uintx, ErrorHandlerTest, 0,                                    \
-          "If > 0, provokes an error after VM initialization; the value"    \
-          "determines which error to provoke.  See test_error_handler()"    \
+          "If > 0, provokes an error after VM initialization; the value "   \
+          "determines which error to provoke. See test_error_handler() "    \
           "in debug.cpp.")                                                  \
                                                                             \
   develop(bool, Verbose, false,                                             \
-          "Prints additional debugging information from other modes")       \
+          "Print additional debugging information from other modes")        \
                                                                             \
   develop(bool, PrintMiscellaneous, false,                                  \
-          "Prints uncategorized debugging information (requires +Verbose)") \
+          "Print uncategorized debugging information (requires +Verbose)")  \
                                                                             \
   develop(bool, WizardMode, false,                                          \
-          "Prints much more debugging information")                         \
+          "Print much more debugging information")                          \
                                                                             \
   product(bool, ShowMessageBoxOnError, false,                               \
           "Keep process alive on VM fatal error")                           \
@@ -870,7 +877,7 @@
           "Let VM fatal error propagate to the OS (ie. WER on Windows)")    \
                                                                             \
   product(bool, SuppressFatalErrorMessage, false,                           \
-          "Do NO Fatal Error report [Avoid deadlock]")                      \
+          "Report NO fatal error message (avoid deadlock)")                 \
                                                                             \
   product(ccstrlist, OnError, "",                                           \
           "Run user-defined commands on fatal error; see VMError.cpp "      \
@@ -880,17 +887,17 @@
           "Run user-defined commands on first java.lang.OutOfMemoryError")  \
                                                                             \
   manageable(bool, HeapDumpBeforeFullGC, false,                             \
-          "Dump heap to file before any major stop-world GC")               \
+          "Dump heap to file before any major stop-the-world GC")           \
                                                                             \
   manageable(bool, HeapDumpAfterFullGC, false,                              \
-          "Dump heap to file after any major stop-world GC")                \
+          "Dump heap to file after any major stop-the-world GC")            \
                                                                             \
   manageable(bool, HeapDumpOnOutOfMemoryError, false,                       \
           "Dump heap to file when java.lang.OutOfMemoryError is thrown")    \
                                                                             \
   manageable(ccstr, HeapDumpPath, NULL,                                     \
-          "When HeapDumpOnOutOfMemoryError is on, the path (filename or"    \
-          "directory) of the dump file (defaults to java_pid<pid>.hprof"    \
+          "When HeapDumpOnOutOfMemoryError is on, the path (filename or "   \
+          "directory) of the dump file (defaults to java_pid<pid>.hprof "   \
           "in the working directory)")                                      \
                                                                             \
   develop(uintx, SegmentedHeapDumpThreshold, 2*G,                           \
@@ -904,10 +911,10 @@
           "Execute breakpoint upon encountering VM warning")                \
                                                                             \
   develop(bool, TraceVMOperation, false,                                    \
-          "Trace vm operations")                                            \
+          "Trace VM operations")                                            \
                                                                             \
   develop(bool, UseFakeTimers, false,                                       \
-          "Tells whether the VM should use system time or a fake timer")    \
+          "Tell whether the VM should use system time or a fake timer")     \
                                                                             \
   product(ccstr, NativeMemoryTracking, "off",                               \
           "Native memory tracking options")                                 \
@@ -917,7 +924,7 @@
                                                                             \
   diagnostic(bool, AutoShutdownNMT, true,                                   \
           "Automatically shutdown native memory tracking under stress "     \
-          "situation. When set to false, native memory tracking tries to "  \
+          "situations. When set to false, native memory tracking tries to " \
           "stay alive at the expense of JVM performance")                   \
                                                                             \
   diagnostic(bool, LogCompilation, false,                                   \
@@ -927,12 +934,12 @@
           "Print compilations")                                             \
                                                                             \
   diagnostic(bool, TraceNMethodInstalls, false,                             \
-             "Trace nmethod intallation")                                   \
+          "Trace nmethod installation")                                     \
                                                                             \
   diagnostic(intx, ScavengeRootsInCode, 2,                                  \
-             "0: do not allow scavengable oops in the code cache; "         \
-             "1: allow scavenging from the code cache; "                    \
-             "2: emit as many constants as the compiler can see")           \
+          "0: do not allow scavengable oops in the code cache; "            \
+          "1: allow scavenging from the code cache; "                       \
+          "2: emit as many constants as the compiler can see")              \
                                                                             \
   product(bool, AlwaysRestoreFPU, false,                                    \
           "Restore the FPU control word after every JNI call (expensive)")  \
@@ -953,7 +960,7 @@
           "Print assembly code (using external disassembler.so)")           \
                                                                             \
   diagnostic(ccstr, PrintAssemblyOptions, NULL,                             \
-          "Options string passed to disassembler.so")                       \
+          "Print options string passed to disassembler.so")                 \
                                                                             \
   diagnostic(bool, PrintNMethods, false,                                    \
           "Print assembly code for nmethods when generated")                \
@@ -974,20 +981,21 @@
           "Print exception handler tables for all nmethods when generated") \
                                                                             \
   develop(bool, StressCompiledExceptionHandlers, false,                     \
-         "Exercise compiled exception handlers")                            \
+          "Exercise compiled exception handlers")                           \
                                                                             \
   develop(bool, InterceptOSException, false,                                \
-          "Starts debugger when an implicit OS (e.g., NULL) "               \
+          "Start debugger when an implicit OS (e.g. NULL) "                 \
           "exception happens")                                              \
                                                                             \
   product(bool, PrintCodeCache, false,                                      \
           "Print the code cache memory usage when exiting")                 \
                                                                             \
   develop(bool, PrintCodeCache2, false,                                     \
-          "Print detailed usage info on the code cache when exiting")       \
+          "Print detailed usage information on the code cache when exiting")\
                                                                             \
   product(bool, PrintCodeCacheOnCompilation, false,                         \
-          "Print the code cache memory usage each time a method is compiled") \
+          "Print the code cache memory usage each time a method is "        \
+          "compiled")                                                       \
                                                                             \
   diagnostic(bool, PrintStubCode, false,                                    \
           "Print generated stub code")                                      \
@@ -999,40 +1007,40 @@
           "Omit backtraces for some 'hot' exceptions in optimized code")    \
                                                                             \
   product(bool, ProfilerPrintByteCodeStatistics, false,                     \
-          "Prints byte code statictics when dumping profiler output")       \
+          "Print bytecode statistics when dumping profiler output")         \
                                                                             \
   product(bool, ProfilerRecordPC, false,                                    \
-          "Collects tick for each 16 byte interval of compiled code")       \
+          "Collect ticks for each 16 byte interval of compiled code")       \
                                                                             \
   product(bool, ProfileVM, false,                                           \
-          "Profiles ticks that fall within VM (either in the VM Thread "    \
+          "Profile ticks that fall within VM (either in the VM Thread "     \
           "or VM code called through stubs)")                               \
                                                                             \
   product(bool, ProfileIntervals, false,                                    \
-          "Prints profiles for each interval (see ProfileIntervalsTicks)")  \
+          "Print profiles for each interval (see ProfileIntervalsTicks)")   \
                                                                             \
   notproduct(bool, ProfilerCheckIntervals, false,                           \
-          "Collect and print info on spacing of profiler ticks")            \
+          "Collect and print information on spacing of profiler ticks")     \
                                                                             \
   develop(bool, PrintJVMWarnings, false,                                    \
-          "Prints warnings for unimplemented JVM functions")                \
+          "Print warnings for unimplemented JVM functions")                 \
                                                                             \
   product(bool, PrintWarnings, true,                                        \
-          "Prints JVM warnings to output stream")                           \
+          "Print JVM warnings to output stream")                            \
                                                                             \
   notproduct(uintx, WarnOnStalledSpinLock, 0,                               \
-          "Prints warnings for stalled SpinLocks")                          \
+          "Print warnings for stalled SpinLocks")                           \
                                                                             \
   product(bool, RegisterFinalizersAtInit, true,                             \
           "Register finalizable objects at end of Object.<init> or "        \
           "after allocation")                                               \
                                                                             \
   develop(bool, RegisterReferences, true,                                   \
-          "Tells whether the VM should register soft/weak/final/phantom "   \
+          "Tell whether the VM should register soft/weak/final/phantom "    \
           "references")                                                     \
                                                                             \
   develop(bool, IgnoreRewrites, false,                                      \
-          "Supress rewrites of bytecodes in the oopmap generator. "         \
+          "Suppress rewrites of bytecodes in the oopmap generator. "        \
           "This is unsafe!")                                                \
                                                                             \
   develop(bool, PrintCodeCacheExtension, false,                             \
@@ -1042,8 +1050,7 @@
           "Enable the security JVM functions")                              \
                                                                             \
   develop(bool, ProtectionDomainVerification, true,                         \
-          "Verifies protection domain before resolution in system "         \
-          "dictionary")                                                     \
+          "Verify protection domain before resolution in system dictionary")\
                                                                             \
   product(bool, ClassUnloading, true,                                       \
           "Do unloading of classes")                                        \
@@ -1056,14 +1063,14 @@
           "Write memory usage profiling to log file")                       \
                                                                             \
   notproduct(bool, PrintSystemDictionaryAtExit, false,                      \
-          "Prints the system dictionary at exit")                           \
+          "Print the system dictionary at exit")                            \
                                                                             \
   experimental(intx, PredictedLoadedClassCount, 0,                          \
-          "Experimental: Tune loaded class cache starting size.")           \
+          "Experimental: Tune loaded class cache starting size")            \
                                                                             \
   diagnostic(bool, UnsyncloadClass, false,                                  \
           "Unstable: VM calls loadClass unsynchronized. Custom "            \
-          "class loader  must call VM synchronized for findClass "          \
+          "class loader must call VM synchronized for findClass "           \
           "and defineClass.")                                               \
                                                                             \
   product(bool, AlwaysLockClassLoader, false,                               \
@@ -1079,22 +1086,22 @@
           "Call loadClassInternal() rather than loadClass()")               \
                                                                             \
   product_pd(bool, DontYieldALot,                                           \
-          "Throw away obvious excess yield calls (for SOLARIS only)")       \
+          "Throw away obvious excess yield calls (for Solaris only)")       \
                                                                             \
   product_pd(bool, ConvertSleepToYield,                                     \
-          "Converts sleep(0) to thread yield "                              \
-          "(may be off for SOLARIS to improve GUI)")                        \
+          "Convert sleep(0) to thread yield "                               \
+          "(may be off for Solaris to improve GUI)")                        \
                                                                             \
   product(bool, ConvertYieldToSleep, false,                                 \
-          "Converts yield to a sleep of MinSleepInterval to simulate Win32 "\
-          "behavior (SOLARIS only)")                                        \
+          "Convert yield to a sleep of MinSleepInterval to simulate Win32 " \
+          "behavior (Solaris only)")                                        \
                                                                             \
   product(bool, UseBoundThreads, true,                                      \
-          "Bind user level threads to kernel threads (for SOLARIS only)")   \
+          "Bind user level threads to kernel threads (for Solaris only)")   \
                                                                             \
   develop(bool, UseDetachedThreads, true,                                   \
           "Use detached threads that are recycled upon termination "        \
-          "(for SOLARIS only)")                                             \
+          "(for Solaris only)")                                             \
                                                                             \
   product(bool, UseLWPSynchronization, true,                                \
           "Use LWP-based instead of libthread-based synchronization "       \
@@ -1104,41 +1111,43 @@
           "(Unstable) Various monitor synchronization tunables")            \
                                                                             \
   product(intx, EmitSync, 0,                                                \
-          "(Unsafe,Unstable) "                                              \
-          " Controls emission of inline sync fast-path code")               \
+          "(Unsafe, Unstable) "                                             \
+          "Control emission of inline sync fast-path code")                 \
                                                                             \
   product(intx, MonitorBound, 0, "Bound Monitor population")                \
                                                                             \
   product(bool, MonitorInUseLists, false, "Track Monitors for Deflation")   \
                                                                             \
-  product(intx, SyncFlags, 0, "(Unsafe,Unstable) Experimental Sync flags" ) \
+  product(intx, SyncFlags, 0, "(Unsafe, Unstable) Experimental Sync flags") \
                                                                             \
-  product(intx, SyncVerbose, 0, "(Unstable)" )                              \
+  product(intx, SyncVerbose, 0, "(Unstable)")                               \
                                                                             \
-  product(intx, ClearFPUAtPark, 0, "(Unsafe,Unstable)" )                    \
+  product(intx, ClearFPUAtPark, 0, "(Unsafe, Unstable)")                    \
                                                                             \
   product(intx, hashCode, 5,                                                \
-         "(Unstable) select hashCode generation algorithm" )                \
+          "(Unstable) select hashCode generation algorithm")                \
                                                                             \
   product(intx, WorkAroundNPTLTimedWaitHang, 1,                             \
-         "(Unstable, Linux-specific)"                                       \
-         " avoid NPTL-FUTEX hang pthread_cond_timedwait" )                  \
+          "(Unstable, Linux-specific) "                                     \
+          "avoid NPTL-FUTEX hang pthread_cond_timedwait")                   \
                                                                             \
   product(bool, FilterSpuriousWakeups, true,                                \
           "Prevent spurious or premature wakeups from object.wait "         \
           "(Solaris only)")                                                 \
                                                                             \
-  product(intx, NativeMonitorTimeout, -1, "(Unstable)" )                    \
-  product(intx, NativeMonitorFlags, 0, "(Unstable)" )                       \
-  product(intx, NativeMonitorSpinLimit, 20, "(Unstable)" )                  \
+  product(intx, NativeMonitorTimeout, -1, "(Unstable)")                     \
+                                                                            \
+  product(intx, NativeMonitorFlags, 0, "(Unstable)")                        \
+                                                                            \
+  product(intx, NativeMonitorSpinLimit, 20, "(Unstable)")                   \
                                                                             \
   develop(bool, UsePthreads, false,                                         \
           "Use pthread-based instead of libthread-based synchronization "   \
           "(SPARC only)")                                                   \
                                                                             \
   product(bool, AdjustConcurrency, false,                                   \
-          "call thr_setconcurrency at thread create time to avoid "         \
-          "LWP starvation on MP systems (For Solaris Only)")                \
+          "Call thr_setconcurrency at thread creation time to avoid "       \
+          "LWP starvation on MP systems (for Solaris Only)")                \
                                                                             \
   product(bool, ReduceSignalUsage, false,                                   \
           "Reduce the use of OS signals in Java and/or the VM")             \
@@ -1147,13 +1156,14 @@
           "Share vtable stubs (smaller code but worse branch prediction")   \
                                                                             \
   develop(bool, LoadLineNumberTables, true,                                 \
-          "Tells whether the class file parser loads line number tables")   \
+          "Tell whether the class file parser loads line number tables")    \
                                                                             \
   develop(bool, LoadLocalVariableTables, true,                              \
-          "Tells whether the class file parser loads local variable tables")\
+          "Tell whether the class file parser loads local variable tables") \
                                                                             \
   develop(bool, LoadLocalVariableTypeTables, true,                          \
-          "Tells whether the class file parser loads local variable type tables")\
+          "Tell whether the class file parser loads local variable type"    \
+          "tables")                                                         \
                                                                             \
   product(bool, AllowUserSignalHandlers, false,                             \
           "Do not complain if the application installs signal handlers "    \
@@ -1184,10 +1194,12 @@
                                                                             \
   product(bool, EagerXrunInit, false,                                       \
           "Eagerly initialize -Xrun libraries; allows startup profiling, "  \
-          " but not all -Xrun libraries may support the state of the VM at this time") \
+          "but not all -Xrun libraries may support the state of the VM "    \
+          "at this time")                                                   \
                                                                             \
   product(bool, PreserveAllAnnotations, false,                              \
-          "Preserve RuntimeInvisibleAnnotations as well as RuntimeVisibleAnnotations") \
+          "Preserve RuntimeInvisibleAnnotations as well "                   \
+          "as RuntimeVisibleAnnotations")                                   \
                                                                             \
   develop(uintx, PreallocatedOutOfMemoryErrorCount, 4,                      \
           "Number of OutOfMemoryErrors preallocated with backtrace")        \
@@ -1262,7 +1274,7 @@
           "Trace level for JVMTI RedefineClasses")                          \
                                                                             \
   develop(bool, StressMethodComparator, false,                              \
-          "run the MethodComparator on all loaded methods")                 \
+          "Run the MethodComparator on all loaded methods")                 \
                                                                             \
   /* change to false by default sometime after Mustang */                   \
   product(bool, VerifyMergedCPBytecodes, true,                              \
@@ -1296,7 +1308,7 @@
           "Trace dependencies")                                             \
                                                                             \
   develop(bool, VerifyDependencies, trueInDebug,                            \
-         "Exercise and verify the compilation dependency mechanism")        \
+          "Exercise and verify the compilation dependency mechanism")       \
                                                                             \
   develop(bool, TraceNewOopMapGeneration, false,                            \
           "Trace OopMapGeneration")                                         \
@@ -1314,7 +1326,7 @@
           "Trace monitor matching failures during OopMapGeneration")        \
                                                                             \
   develop(bool, TraceOopMapRewrites, false,                                 \
-          "Trace rewritting of method oops during oop map generation")      \
+          "Trace rewriting of method oops during oop map generation")       \
                                                                             \
   develop(bool, TraceSafepoint, false,                                      \
           "Trace safepoint operations")                                     \
@@ -1332,10 +1344,10 @@
           "Trace setup time")                                               \
                                                                             \
   develop(bool, TraceProtectionDomainVerification, false,                   \
-          "Trace protection domain verifcation")                            \
+          "Trace protection domain verification")                           \
                                                                             \
   develop(bool, TraceClearedExceptions, false,                              \
-          "Prints when an exception is forcibly cleared")                   \
+          "Print when an exception is forcibly cleared")                    \
                                                                             \
   product(bool, TraceClassResolution, false,                                \
           "Trace all constant pool resolutions (for debugging)")            \
@@ -1349,7 +1361,7 @@
   /* gc */                                                                  \
                                                                             \
   product(bool, UseSerialGC, false,                                         \
-          "Use the serial garbage collector")                               \
+          "Use the Serial garbage collector")                               \
                                                                             \
   product(bool, UseG1GC, false,                                             \
           "Use the Garbage-First garbage collector")                        \
@@ -1368,16 +1380,16 @@
           "The collection count for the first maximum compaction")          \
                                                                             \
   product(bool, UseMaximumCompactionOnSystemGC, true,                       \
-          "In the Parallel Old garbage collector maximum compaction for "   \
-          "a system GC")                                                    \
+          "Use maximum compaction in the Parallel Old garbage collector "   \
+          "for a system GC")                                                \
                                                                             \
   product(uintx, ParallelOldDeadWoodLimiterMean, 50,                        \
-          "The mean used by the par compact dead wood"                      \
-          "limiter (a number between 0-100).")                              \
+          "The mean used by the parallel compact dead wood "                \
+          "limiter (a number between 0-100)")                               \
                                                                             \
   product(uintx, ParallelOldDeadWoodLimiterStdDev, 80,                      \
-          "The standard deviation used by the par compact dead wood"        \
-          "limiter (a number between 0-100).")                              \
+          "The standard deviation used by the parallel compact dead wood "  \
+          "limiter (a number between 0-100)")                               \
                                                                             \
   product(uintx, ParallelGCThreads, 0,                                      \
           "Number of parallel threads parallel gc will use")                \
@@ -1387,7 +1399,7 @@
           "parallel gc will use")                                           \
                                                                             \
   diagnostic(bool, ForceDynamicNumberOfGCThreads, false,                    \
-          "Force dynamic selection of the number of"                        \
+          "Force dynamic selection of the number of "                       \
           "parallel threads parallel gc will use to aid debugging")         \
                                                                             \
   product(uintx, HeapSizePerGCThread, ScaleForWordSize(64*M),               \
@@ -1398,7 +1410,7 @@
           "Trace the dynamic GC thread usage")                              \
                                                                             \
   develop(bool, ParallelOldGCSplitALot, false,                              \
-          "Provoke splitting (copying data from a young gen space to"       \
+          "Provoke splitting (copying data from a young gen space to "      \
           "multiple destination spaces)")                                   \
                                                                             \
   develop(uintx, ParallelOldGCSplitInterval, 3,                             \
@@ -1408,19 +1420,19 @@
           "Number of threads concurrent gc will use")                       \
                                                                             \
   product(uintx, YoungPLABSize, 4096,                                       \
-          "Size of young gen promotion labs (in HeapWords)")                \
+          "Size of young gen promotion LAB's (in HeapWords)")               \
                                                                             \
   product(uintx, OldPLABSize, 1024,                                         \
-          "Size of old gen promotion labs (in HeapWords)")                  \
+          "Size of old gen promotion LAB's (in HeapWords)")                 \
                                                                             \
   product(uintx, GCTaskTimeStampEntries, 200,                               \
           "Number of time stamp entries per gc worker thread")              \
                                                                             \
   product(bool, AlwaysTenure, false,                                        \
-          "Always tenure objects in eden. (ParallelGC only)")               \
+          "Always tenure objects in eden (ParallelGC only)")                \
                                                                             \
   product(bool, NeverTenure, false,                                         \
-          "Never tenure objects in eden, May tenure on overflow "           \
+          "Never tenure objects in eden, may tenure on overflow "           \
           "(ParallelGC only)")                                              \
                                                                             \
   product(bool, ScavengeBeforeFullGC, true,                                 \
@@ -1428,14 +1440,14 @@
           "used with UseParallelGC")                                        \
                                                                             \
   develop(bool, ScavengeWithObjectsInToSpace, false,                        \
-          "Allow scavenges to occur when to_space contains objects.")       \
+          "Allow scavenges to occur when to-space contains objects")        \
                                                                             \
   product(bool, UseConcMarkSweepGC, false,                                  \
           "Use Concurrent Mark-Sweep GC in the old generation")             \
                                                                             \
   product(bool, ExplicitGCInvokesConcurrent, false,                         \
-          "A System.gc() request invokes a concurrent collection;"          \
-          " (effective only when UseConcMarkSweepGC)")                      \
+          "A System.gc() request invokes a concurrent collection; "         \
+          "(effective only when UseConcMarkSweepGC)")                       \
                                                                             \
   product(bool, ExplicitGCInvokesConcurrentAndUnloadsClasses, false,        \
           "A System.gc() request invokes a concurrent collection and "      \
@@ -1443,19 +1455,19 @@
           "(effective only when UseConcMarkSweepGC)")                       \
                                                                             \
   product(bool, GCLockerInvokesConcurrent, false,                           \
-          "The exit of a JNI CS necessitating a scavenge also"              \
-          " kicks off a bkgrd concurrent collection")                       \
+          "The exit of a JNI critical section necessitating a scavenge, "   \
+          "also kicks off a background concurrent collection")              \
                                                                             \
   product(uintx, GCLockerEdenExpansionPercent, 5,                           \
-          "How much the GC can expand the eden by while the GC locker  "    \
+          "How much the GC can expand the eden by while the GC locker "     \
           "is active (as a percentage)")                                    \
                                                                             \
   diagnostic(intx, GCLockerRetryAllocationCount, 2,                         \
-          "Number of times to retry allocations when"                       \
-          " blocked by the GC locker")                                      \
+          "Number of times to retry allocations when "                      \
+          "blocked by the GC locker")                                       \
                                                                             \
   develop(bool, UseCMSAdaptiveFreeLists, true,                              \
-          "Use Adaptive Free Lists in the CMS generation")                  \
+          "Use adaptive free lists in the CMS generation")                  \
                                                                             \
   develop(bool, UseAsyncConcMarkSweepGC, true,                              \
           "Use Asynchronous Concurrent Mark-Sweep GC in the old generation")\
@@ -1470,44 +1482,46 @@
           "Use passing of collection from background to foreground")        \
                                                                             \
   product(bool, UseParNewGC, false,                                         \
-          "Use parallel threads in the new generation.")                    \
+          "Use parallel threads in the new generation")                     \
                                                                             \
   product(bool, ParallelGCVerbose, false,                                   \
-          "Verbose output for parallel GC.")                                \
+          "Verbose output for parallel gc")                                 \
                                                                             \
   product(uintx, ParallelGCBufferWastePct, 10,                              \
-          "Wasted fraction of parallel allocation buffer.")                 \
+          "Wasted fraction of parallel allocation buffer")                  \
                                                                             \
   diagnostic(bool, ParallelGCRetainPLAB, false,                             \
-             "Retain parallel allocation buffers across scavenges; "        \
-             " -- disabled because this currently conflicts with "          \
-             " parallel card scanning under certain conditions ")           \
+          "Retain parallel allocation buffers across scavenges; "           \
+          "it is disabled because this currently conflicts with "           \
+          "parallel card scanning under certain conditions.")               \
                                                                             \
   product(uintx, TargetPLABWastePct, 10,                                    \
           "Target wasted space in last buffer as percent of overall "       \
           "allocation")                                                     \
                                                                             \
   product(uintx, PLABWeight, 75,                                            \
-          "Percentage (0-100) used to weight the current sample when"       \
-          "computing exponentially decaying average for ResizePLAB.")       \
+          "Percentage (0-100) used to weigh the current sample when "       \
+          "computing exponentially decaying average for ResizePLAB")        \
                                                                             \
   product(bool, ResizePLAB, true,                                           \
-          "Dynamically resize (survivor space) promotion labs")             \
+          "Dynamically resize (survivor space) promotion LAB's")            \
                                                                             \
   product(bool, PrintPLAB, false,                                           \
-          "Print (survivor space) promotion labs sizing decisions")         \
+          "Print (survivor space) promotion LAB's sizing decisions")        \
                                                                             \
   product(intx, ParGCArrayScanChunk, 50,                                    \
-          "Scan a subset and push remainder, if array is bigger than this") \
+          "Scan a subset of object array and push remainder, if array is "  \
+          "bigger than this")                                               \
                                                                             \
   product(bool, ParGCUseLocalOverflow, false,                               \
           "Instead of a global overflow list, use local overflow stacks")   \
                                                                             \
   product(bool, ParGCTrimOverflow, true,                                    \
-          "Eagerly trim the local overflow lists (when ParGCUseLocalOverflow") \
+          "Eagerly trim the local overflow lists "                          \
+          "(when ParGCUseLocalOverflow)")                                   \
                                                                             \
   notproduct(bool, ParGCWorkQueueOverflowALot, false,                       \
-          "Whether we should simulate work queue overflow in ParNew")       \
+          "Simulate work queue overflow in ParNew")                         \
                                                                             \
   notproduct(uintx, ParGCWorkQueueOverflowInterval, 1000,                   \
           "An `interval' counter that determines how frequently "           \
@@ -1525,43 +1539,46 @@
           "during card table scanning")                                     \
                                                                             \
   product(uintx, CMSParPromoteBlocksToClaim, 16,                            \
-          "Number of blocks to attempt to claim when refilling CMS LAB for "\
-          "parallel GC.")                                                   \
+          "Number of blocks to attempt to claim when refilling CMS LAB's "  \
+          "for parallel GC")                                                \
                                                                             \
   product(uintx, OldPLABWeight, 50,                                         \
-          "Percentage (0-100) used to weight the current sample when"       \
-          "computing exponentially decaying average for resizing CMSParPromoteBlocksToClaim.") \
+          "Percentage (0-100) used to weight the current sample when "      \
+          "computing exponentially decaying average for resizing "          \
+          "CMSParPromoteBlocksToClaim")                                     \
                                                                             \
   product(bool, ResizeOldPLAB, true,                                        \
-          "Dynamically resize (old gen) promotion labs")                    \
+          "Dynamically resize (old gen) promotion LAB's")                   \
                                                                             \
   product(bool, PrintOldPLAB, false,                                        \
-          "Print (old gen) promotion labs sizing decisions")                \
+          "Print (old gen) promotion LAB's sizing decisions")               \
                                                                             \
   product(uintx, CMSOldPLABMin, 16,                                         \
-          "Min size of CMS gen promotion lab caches per worker per blksize")\
+          "Minimum size of CMS gen promotion LAB caches per worker "        \
+          "per block size")                                                 \
                                                                             \
   product(uintx, CMSOldPLABMax, 1024,                                       \
-          "Max size of CMS gen promotion lab caches per worker per blksize")\
+          "Maximum size of CMS gen promotion LAB caches per worker "        \
+          "per block size")                                                 \
                                                                             \
   product(uintx, CMSOldPLABNumRefills, 4,                                   \
-          "Nominal number of refills of CMS gen promotion lab cache"        \
-          " per worker per block size")                                     \
+          "Nominal number of refills of CMS gen promotion LAB cache "       \
+          "per worker per block size")                                      \
                                                                             \
   product(bool, CMSOldPLABResizeQuicker, false,                             \
-          "Whether to react on-the-fly during a scavenge to a sudden"       \
-          " change in block demand rate")                                   \
+          "React on-the-fly during a scavenge to a sudden "                 \
+          "change in block demand rate")                                    \
                                                                             \
   product(uintx, CMSOldPLABToleranceFactor, 4,                              \
-          "The tolerance of the phase-change detector for on-the-fly"       \
-          " PLAB resizing during a scavenge")                               \
+          "The tolerance of the phase-change detector for on-the-fly "      \
+          "PLAB resizing during a scavenge")                                \
                                                                             \
   product(uintx, CMSOldPLABReactivityFactor, 2,                             \
-          "The gain in the feedback loop for on-the-fly PLAB resizing"      \
-          " during a scavenge")                                             \
+          "The gain in the feedback loop for on-the-fly PLAB resizing "     \
+          "during a scavenge")                                              \
                                                                             \
   product(bool, AlwaysPreTouch, false,                                      \
-          "It forces all freshly committed pages to be pre-touched.")       \
+          "Force all freshly committed pages to be pre-touched")            \
                                                                             \
   product_pd(uintx, CMSYoungGenPerWorker,                                   \
           "The maximum size of young gen chosen by default per GC worker "  \
@@ -1571,64 +1588,67 @@
           "Whether CMS GC should operate in \"incremental\" mode")          \
                                                                             \
   product(uintx, CMSIncrementalDutyCycle, 10,                               \
-          "CMS incremental mode duty cycle (a percentage, 0-100).  If"      \
-          "CMSIncrementalPacing is enabled, then this is just the initial"  \
-          "value")                                                          \
+          "Percentage (0-100) of CMS incremental mode duty cycle. If "      \
+          "CMSIncrementalPacing is enabled, then this is just the initial " \
+          "value.")                                                         \
                                                                             \
   product(bool, CMSIncrementalPacing, true,                                 \
           "Whether the CMS incremental mode duty cycle should be "          \
           "automatically adjusted")                                         \
                                                                             \
   product(uintx, CMSIncrementalDutyCycleMin, 0,                             \
-          "Lower bound on the duty cycle when CMSIncrementalPacing is "     \
-          "enabled (a percentage, 0-100)")                                  \
+          "Minimum percentage (0-100) of the CMS incremental duty cycle "   \
+          "used when CMSIncrementalPacing is enabled")                      \
                                                                             \
   product(uintx, CMSIncrementalSafetyFactor, 10,                            \
           "Percentage (0-100) used to add conservatism when computing the " \
           "duty cycle")                                                     \
                                                                             \
   product(uintx, CMSIncrementalOffset, 0,                                   \
-          "Percentage (0-100) by which the CMS incremental mode duty cycle" \
-          " is shifted to the right within the period between young GCs")   \
+          "Percentage (0-100) by which the CMS incremental mode duty cycle "\
+          "is shifted to the right within the period between young GCs")    \
                                                                             \
   product(uintx, CMSExpAvgFactor, 50,                                       \
-          "Percentage (0-100) used to weight the current sample when"       \
-          "computing exponential averages for CMS statistics.")             \
+          "Percentage (0-100) used to weigh the current sample when "       \
+          "computing exponential averages for CMS statistics")              \
                                                                             \
   product(uintx, CMS_FLSWeight, 75,                                         \
-          "Percentage (0-100) used to weight the current sample when"       \
-          "computing exponentially decating averages for CMS FLS statistics.") \
+          "Percentage (0-100) used to weigh the current sample when "       \
+          "computing exponentially decaying averages for CMS FLS "          \
+          "statistics")                                                     \
                                                                             \
   product(uintx, CMS_FLSPadding, 1,                                         \
-          "The multiple of deviation from mean to use for buffering"        \
-          "against volatility in free list demand.")                        \
+          "The multiple of deviation from mean to use for buffering "       \
+          "against volatility in free list demand")                         \
                                                                             \
   product(uintx, FLSCoalescePolicy, 2,                                      \
-          "CMS: Aggression level for coalescing, increasing from 0 to 4")   \
+          "CMS: aggressiveness level for coalescing, increasing "           \
+          "from 0 to 4")                                                    \
                                                                             \
   product(bool, FLSAlwaysCoalesceLarge, false,                              \
-          "CMS: Larger free blocks are always available for coalescing")    \
+          "CMS: larger free blocks are always available for coalescing")    \
                                                                             \
   product(double, FLSLargestBlockCoalesceProximity, 0.99,                   \
-          "CMS: the smaller the percentage the greater the coalition force")\
+          "CMS: the smaller the percentage the greater the coalescing "     \
+          "force")                                                          \
                                                                             \
   product(double, CMSSmallCoalSurplusPercent, 1.05,                         \
-          "CMS: the factor by which to inflate estimated demand of small"   \
-          " block sizes to prevent coalescing with an adjoining block")     \
+          "CMS: the factor by which to inflate estimated demand of small "  \
+          "block sizes to prevent coalescing with an adjoining block")      \
                                                                             \
   product(double, CMSLargeCoalSurplusPercent, 0.95,                         \
-          "CMS: the factor by which to inflate estimated demand of large"   \
-          " block sizes to prevent coalescing with an adjoining block")     \
+          "CMS: the factor by which to inflate estimated demand of large "  \
+          "block sizes to prevent coalescing with an adjoining block")      \
                                                                             \
   product(double, CMSSmallSplitSurplusPercent, 1.10,                        \
-          "CMS: the factor by which to inflate estimated demand of small"   \
-          " block sizes to prevent splitting to supply demand for smaller"  \
-          " blocks")                                                        \
+          "CMS: the factor by which to inflate estimated demand of small "  \
+          "block sizes to prevent splitting to supply demand for smaller "  \
+          "blocks")                                                         \
                                                                             \
   product(double, CMSLargeSplitSurplusPercent, 1.00,                        \
-          "CMS: the factor by which to inflate estimated demand of large"   \
-          " block sizes to prevent splitting to supply demand for smaller"  \
-          " blocks")                                                        \
+          "CMS: the factor by which to inflate estimated demand of large "  \
+          "block sizes to prevent splitting to supply demand for smaller "  \
+          "blocks")                                                         \
                                                                             \
   product(bool, CMSExtrapolateSweep, false,                                 \
           "CMS: cushion for block demand during sweep")                     \
@@ -1640,11 +1660,11 @@
                                                                             \
   product(uintx, CMS_SweepPadding, 1,                                       \
           "The multiple of deviation from mean to use for buffering "       \
-          "against volatility in inter-sweep duration.")                    \
+          "against volatility in inter-sweep duration")                     \
                                                                             \
   product(uintx, CMS_SweepTimerThresholdMillis, 10,                         \
           "Skip block flux-rate sampling for an epoch unless inter-sweep "  \
-          "duration exceeds this threhold in milliseconds")                 \
+          "duration exceeds this threshold in milliseconds")                \
                                                                             \
   develop(bool, CMSTraceIncrementalMode, false,                             \
           "Trace CMS incremental mode")                                     \
@@ -1659,14 +1679,15 @@
           "Whether class unloading enabled when using CMS GC")              \
                                                                             \
   product(uintx, CMSClassUnloadingMaxInterval, 0,                           \
-          "When CMS class unloading is enabled, the maximum CMS cycle count"\
-          " for which classes may not be unloaded")                         \
+          "When CMS class unloading is enabled, the maximum CMS cycle "     \
+          "count for which classes may not be unloaded")                    \
                                                                             \
   product(bool, CMSCompactWhenClearAllSoftRefs, true,                       \
-          "Compact when asked to collect CMS gen with clear_all_soft_refs") \
+          "Compact when asked to collect CMS gen with "                     \
+          "clear_all_soft_refs()")                                          \
                                                                             \
   product(bool, UseCMSCompactAtFullCollection, true,                        \
-          "Use mark sweep compact at full collections")                     \
+          "Use Mark-Sweep-Compact algorithm at full collections")           \
                                                                             \
   product(uintx, CMSFullGCsBeforeCompaction, 0,                             \
           "Number of CMS full collection done before compaction if > 0")    \
@@ -1688,38 +1709,37 @@
           "Warn in case of excessive CMS looping")                          \
                                                                             \
   develop(bool, CMSOverflowEarlyRestoration, false,                         \
-          "Whether preserved marks should be restored early")               \
+          "Restore preserved marks early")                                  \
                                                                             \
   product(uintx, MarkStackSize, NOT_LP64(32*K) LP64_ONLY(4*M),              \
           "Size of marking stack")                                          \
                                                                             \
   product(uintx, MarkStackSizeMax, NOT_LP64(4*M) LP64_ONLY(512*M),          \
-          "Max size of marking stack")                                      \
+          "Maximum size of marking stack")                                  \
                                                                             \
   notproduct(bool, CMSMarkStackOverflowALot, false,                         \
-          "Whether we should simulate frequent marking stack / work queue"  \
-          " overflow")                                                      \
+          "Simulate frequent marking stack / work queue overflow")          \
                                                                             \
   notproduct(uintx, CMSMarkStackOverflowInterval, 1000,                     \
-          "An `interval' counter that determines how frequently"            \
-          " we simulate overflow; a smaller number increases frequency")    \
+          "An \"interval\" counter that determines how frequently "         \
+          "to simulate overflow; a smaller number increases frequency")     \
                                                                             \
   product(uintx, CMSMaxAbortablePrecleanLoops, 0,                           \
-          "(Temporary, subject to experimentation)"                         \
+          "(Temporary, subject to experimentation) "                        \
           "Maximum number of abortable preclean iterations, if > 0")        \
                                                                             \
   product(intx, CMSMaxAbortablePrecleanTime, 5000,                          \
-          "(Temporary, subject to experimentation)"                         \
-          "Maximum time in abortable preclean in ms")                       \
+          "(Temporary, subject to experimentation) "                        \
+          "Maximum time in abortable preclean (in milliseconds)")           \
                                                                             \
   product(uintx, CMSAbortablePrecleanMinWorkPerIteration, 100,              \
-          "(Temporary, subject to experimentation)"                         \
+          "(Temporary, subject to experimentation) "                        \
           "Nominal minimum work per abortable preclean iteration")          \
                                                                             \
   manageable(intx, CMSAbortablePrecleanWaitMillis, 100,                     \
-          "(Temporary, subject to experimentation)"                         \
-          " Time that we sleep between iterations when not given"           \
-          " enough work per iteration")                                     \
+          "(Temporary, subject to experimentation) "                        \
+          "Time that we sleep between iterations when not given "           \
+          "enough work per iteration")                                      \
                                                                             \
   product(uintx, CMSRescanMultiple, 32,                                     \
           "Size (in cards) of CMS parallel rescan task")                    \
@@ -1737,23 +1757,24 @@
           "Whether parallel remark enabled (only if ParNewGC)")             \
                                                                             \
   product(bool, CMSParallelSurvivorRemarkEnabled, true,                     \
-          "Whether parallel remark of survivor space"                       \
-          " enabled (effective only if CMSParallelRemarkEnabled)")          \
+          "Whether parallel remark of survivor space "                      \
+          "enabled (effective only if CMSParallelRemarkEnabled)")           \
                                                                             \
   product(bool, CMSPLABRecordAlways, true,                                  \
-          "Whether to always record survivor space PLAB bdries"             \
-          " (effective only if CMSParallelSurvivorRemarkEnabled)")          \
+          "Always record survivor space PLAB boundaries (effective only "   \
+          "if CMSParallelSurvivorRemarkEnabled)")                           \
                                                                             \
   product(bool, CMSEdenChunksRecordAlways, true,                            \
-          "Whether to always record eden chunks used for "                  \
-          "the parallel initial mark or remark of eden" )                   \
+          "Always record eden chunks used for the parallel initial mark "   \
+          "or remark of eden")                                              \
                                                                             \
   product(bool, CMSPrintEdenSurvivorChunks, false,                          \
           "Print the eden and the survivor chunks used for the parallel "   \
           "initial mark or remark of the eden/survivor spaces")             \
                                                                             \
   product(bool, CMSConcurrentMTEnabled, true,                               \
-          "Whether multi-threaded concurrent work enabled (if ParNewGC)")   \
+          "Whether multi-threaded concurrent work enabled "                 \
+          "(effective only if ParNewGC)")                                   \
                                                                             \
   product(bool, CMSPrecleaningEnabled, true,                                \
           "Whether concurrent precleaning enabled")                         \
@@ -1762,12 +1783,12 @@
           "Maximum number of precleaning iteration passes")                 \
                                                                             \
   product(uintx, CMSPrecleanNumerator, 2,                                   \
-          "CMSPrecleanNumerator:CMSPrecleanDenominator yields convergence"  \
-          " ratio")                                                         \
+          "CMSPrecleanNumerator:CMSPrecleanDenominator yields convergence " \
+          "ratio")                                                          \
                                                                             \
   product(uintx, CMSPrecleanDenominator, 3,                                 \
-          "CMSPrecleanNumerator:CMSPrecleanDenominator yields convergence"  \
-          " ratio")                                                         \
+          "CMSPrecleanNumerator:CMSPrecleanDenominator yields convergence " \
+          "ratio")                                                          \
                                                                             \
   product(bool, CMSPrecleanRefLists1, true,                                 \
           "Preclean ref lists during (initial) preclean phase")             \
@@ -1782,7 +1803,7 @@
           "Preclean survivors during abortable preclean phase")             \
                                                                             \
   product(uintx, CMSPrecleanThreshold, 1000,                                \
-          "Don't re-iterate if #dirty cards less than this")                \
+          "Do not iterate again if number of dirty cards is less than this")\
                                                                             \
   product(bool, CMSCleanOnEnter, true,                                      \
           "Clean-on-enter optimization for reducing number of dirty cards") \
@@ -1791,14 +1812,16 @@
           "Choose variant (1,2) of verification following remark")          \
                                                                             \
   product(uintx, CMSScheduleRemarkEdenSizeThreshold, 2*M,                   \
-          "If Eden used is below this value, don't try to schedule remark") \
+          "If Eden size is below this, do not try to schedule remark")      \
                                                                             \
   product(uintx, CMSScheduleRemarkEdenPenetration, 50,                      \
-          "The Eden occupancy % at which to try and schedule remark pause") \
+          "The Eden occupancy percentage (0-100) at which "                 \
+          "to try and schedule remark pause")                               \
                                                                             \
   product(uintx, CMSScheduleRemarkSamplingRatio, 5,                         \
-          "Start sampling Eden top at least before yg occupancy reaches"    \
-          " 1/<ratio> of the size at which we plan to schedule remark")     \
+          "Start sampling eden top at least before young gen "              \
+          "occupancy reaches 1/<ratio> of the size at which "               \
+          "we plan to schedule remark")                                     \
                                                                             \
   product(uintx, CMSSamplingGrain, 16*K,                                    \
           "The minimum distance between eden samples for CMS (see above)")  \
@@ -1820,27 +1843,27 @@
           "should start a collection cycle")                                \
                                                                             \
   product(bool, CMSYield, true,                                             \
-          "Yield between steps of concurrent mark & sweep")                 \
+          "Yield between steps of CMS")                                     \
                                                                             \
   product(uintx, CMSBitMapYieldQuantum, 10*M,                               \
-          "Bitmap operations should process at most this many bits"         \
+          "Bitmap operations should process at most this many bits "        \
           "between yields")                                                 \
                                                                             \
   product(bool, CMSDumpAtPromotionFailure, false,                           \
           "Dump useful information about the state of the CMS old "         \
-          " generation upon a promotion failure.")                          \
+          "generation upon a promotion failure")                            \
                                                                             \
   product(bool, CMSPrintChunksInDump, false,                                \
           "In a dump enabled by CMSDumpAtPromotionFailure, include "        \
-          " more detailed information about the free chunks.")              \
+          "more detailed information about the free chunks")                \
                                                                             \
   product(bool, CMSPrintObjectsInDump, false,                               \
           "In a dump enabled by CMSDumpAtPromotionFailure, include "        \
-          " more detailed information about the allocated objects.")        \
+          "more detailed information about the allocated objects")          \
                                                                             \
   diagnostic(bool, FLSVerifyAllHeapReferences, false,                       \
-          "Verify that all refs across the FLS boundary "                   \
-          " are to valid objects")                                          \
+          "Verify that all references across the FLS boundary "             \
+          "are to valid objects")                                           \
                                                                             \
   diagnostic(bool, FLSVerifyLists, false,                                   \
           "Do lots of (expensive) FreeListSpace verification")              \
@@ -1852,17 +1875,18 @@
           "Do lots of (expensive) FLS dictionary verification")             \
                                                                             \
   develop(bool, VerifyBlockOffsetArray, false,                              \
-          "Do (expensive!) block offset array verification")                \
+          "Do (expensive) block offset array verification")                 \
                                                                             \
   diagnostic(bool, BlockOffsetArrayUseUnallocatedBlock, false,              \
-          "Maintain _unallocated_block in BlockOffsetArray"                 \
-          " (currently applicable only to CMS collector)")                  \
+          "Maintain _unallocated_block in BlockOffsetArray "                \
+          "(currently applicable only to CMS collector)")                   \
                                                                             \
   develop(bool, TraceCMSState, false,                                       \
           "Trace the state of the CMS collection")                          \
                                                                             \
   product(intx, RefDiscoveryPolicy, 0,                                      \
-          "Whether reference-based(0) or referent-based(1)")                \
+          "Select type of reference discovery policy: "                     \
+          "reference-based(0) or referent-based(1)")                        \
                                                                             \
   product(bool, ParallelRefProcEnabled, false,                              \
           "Enable parallel reference processing whenever possible")         \
@@ -1890,7 +1914,7 @@
           "denotes 'do constant GC cycles'.")                               \
                                                                             \
   product(bool, UseCMSInitiatingOccupancyOnly, false,                       \
-          "Only use occupancy as a crierion for starting a CMS collection") \
+          "Only use occupancy as a criterion for starting a CMS collection")\
                                                                             \
   product(uintx, CMSIsTooFullPercentage, 98,                                \
           "An absolute ceiling above which CMS will always consider the "   \
@@ -1902,7 +1926,7 @@
                                                                             \
   notproduct(bool, CMSVerifyReturnedBytes, false,                           \
           "Check that all the garbage collected was returned to the "       \
-          "free lists.")                                                    \
+          "free lists")                                                     \
                                                                             \
   notproduct(bool, ScavengeALot, false,                                     \
           "Force scavenge at every Nth exit from the runtime system "       \
@@ -1917,16 +1941,16 @@
                                                                             \
   product(bool, PrintPromotionFailure, false,                               \
           "Print additional diagnostic information following "              \
-          " promotion failure")                                             \
+          "promotion failure")                                              \
                                                                             \
   notproduct(bool, PromotionFailureALot, false,                             \
           "Use promotion failure handling on every youngest generation "    \
           "collection")                                                     \
                                                                             \
   develop(uintx, PromotionFailureALotCount, 1000,                           \
-          "Number of promotion failures occurring at ParGCAllocBuffer"      \
+          "Number of promotion failures occurring at ParGCAllocBuffer "     \
           "refill attempts (ParNew) or promotion attempts "                 \
-          "(other young collectors) ")                                      \
+          "(other young collectors)")                                       \
                                                                             \
   develop(uintx, PromotionFailureALotInterval, 5,                           \
           "Total collections between promotion failures alot")              \
@@ -1945,7 +1969,7 @@
           "Ratio of hard spins to calls to yield")                          \
                                                                             \
   develop(uintx, ObjArrayMarkingStride, 512,                                \
-          "Number of ObjArray elements to push onto the marking stack"      \
+          "Number of object array elements to push onto the marking stack " \
           "before pushing a continuation entry")                            \
                                                                             \
   develop(bool, MetadataAllocationFailALot, false,                          \
@@ -1953,7 +1977,7 @@
           "MetadataAllocationFailALotInterval")                             \
                                                                             \
   develop(uintx, MetadataAllocationFailALotInterval, 1000,                  \
-          "metadata allocation failure alot interval")                      \
+          "Metadata allocation failure a lot interval")                     \
                                                                             \
   develop(bool, MetaDataDeallocateALot, false,                              \
           "Deallocation bunches of metadata at intervals controlled by "    \
@@ -1972,7 +1996,7 @@
           "Trace virtual space metadata allocations")                       \
                                                                             \
   notproduct(bool, ExecuteInternalVMTests, false,                           \
-          "Enable execution of internal VM tests.")                         \
+          "Enable execution of internal VM tests")                          \
                                                                             \
   notproduct(bool, VerboseInternalVMTests, false,                           \
           "Turn on logging for internal VM tests.")                         \
@@ -1980,7 +2004,7 @@
   product_pd(bool, UseTLAB, "Use thread-local object allocation")           \
                                                                             \
   product_pd(bool, ResizeTLAB,                                              \
-          "Dynamically resize tlab size for threads")                       \
+          "Dynamically resize TLAB size for threads")                       \
                                                                             \
   product(bool, ZeroTLAB, false,                                            \
           "Zero out the newly created TLAB")                                \
@@ -1992,7 +2016,8 @@
           "Print various TLAB related information")                         \
                                                                             \
   product(bool, TLABStats, true,                                            \
-          "Print various TLAB related information")                         \
+          "Provide more detailed and expensive TLAB statistics "            \
+          "(with PrintTLAB)")                                               \
                                                                             \
   EMBEDDED_ONLY(product(bool, LowMemoryProtection, true,                    \
           "Enable LowMemoryProtection"))                                    \
@@ -2026,14 +2051,14 @@
           "Fraction (1/n) of real memory used for initial heap size")       \
                                                                             \
   develop(uintx, MaxVirtMemFraction, 2,                                     \
-          "Maximum fraction (1/n) of virtual memory used for ergonomically" \
+          "Maximum fraction (1/n) of virtual memory used for ergonomically "\
           "determining maximum heap size")                                  \
                                                                             \
   product(bool, UseAutoGCSelectPolicy, false,                               \
           "Use automatic collection selection policy")                      \
                                                                             \
   product(uintx, AutoGCSelectPauseMillis, 5000,                             \
-          "Automatic GC selection pause threshhold in ms")                  \
+          "Automatic GC selection pause threshold in milliseconds")         \
                                                                             \
   product(bool, UseAdaptiveSizePolicy, true,                                \
           "Use adaptive generation sizing policies")                        \
@@ -2048,7 +2073,7 @@
           "Use adaptive young-old sizing policies at major collections")    \
                                                                             \
   product(bool, UseAdaptiveSizePolicyWithSystemGC, false,                   \
-          "Use statistics from System.GC for adaptive size policy")         \
+          "Include statistics from System.gc() for adaptive size policy")   \
                                                                             \
   product(bool, UseAdaptiveGCBoundary, false,                               \
           "Allow young-old boundary to move")                               \
@@ -2060,16 +2085,16 @@
           "Resize the virtual spaces of the young or old generations")      \
                                                                             \
   product(uintx, AdaptiveSizeThroughPutPolicy, 0,                           \
-          "Policy for changeing generation size for throughput goals")      \
+          "Policy for changing generation size for throughput goals")       \
                                                                             \
   product(uintx, AdaptiveSizePausePolicy, 0,                                \
           "Policy for changing generation size for pause goals")            \
                                                                             \
   develop(bool, PSAdjustTenuredGenForMinorPause, false,                     \
-          "Adjust tenured generation to achive a minor pause goal")         \
+          "Adjust tenured generation to achieve a minor pause goal")        \
                                                                             \
   develop(bool, PSAdjustYoungGenForMajorPause, false,                       \
-          "Adjust young generation to achive a major pause goal")           \
+          "Adjust young generation to achieve a major pause goal")          \
                                                                             \
   product(uintx, AdaptiveSizePolicyInitializingSteps, 20,                   \
           "Number of steps where heuristics is used before data is used")   \
@@ -2124,14 +2149,15 @@
           "Decay factor to TenuredGenerationSizeIncrement")                 \
                                                                             \
   product(uintx, MaxGCPauseMillis, max_uintx,                               \
-          "Adaptive size policy maximum GC pause time goal in msec, "       \
-          "or (G1 Only) the max. GC time per MMU time slice")               \
+          "Adaptive size policy maximum GC pause time goal in millisecond, "\
+          "or (G1 Only) the maximum GC time per MMU time slice")            \
                                                                             \
   product(uintx, GCPauseIntervalMillis, 0,                                  \
           "Time slice for MMU specification")                               \
                                                                             \
   product(uintx, MaxGCMinorPauseMillis, max_uintx,                          \
-          "Adaptive size policy maximum GC minor pause time goal in msec")  \
+          "Adaptive size policy maximum GC minor pause time goal "          \
+          "in millisecond")                                                 \
                                                                             \
   product(uintx, GCTimeRatio, 99,                                           \
           "Adaptive size policy application time to GC time ratio")         \
@@ -2159,8 +2185,8 @@
           "before an OutOfMemory error is thrown")                          \
                                                                             \
   product(uintx, GCTimeLimit, 98,                                           \
-          "Limit of proportion of time spent in GC before an OutOfMemory"   \
-          "error is thrown (used with GCHeapFreeLimit)")                    \
+          "Limit of the proportion of time spent in GC before "             \
+          "an OutOfMemoryError is thrown (used with GCHeapFreeLimit)")      \
                                                                             \
   product(uintx, GCHeapFreeLimit, 2,                                        \
           "Minimum percentage of free space after a full GC before an "     \
@@ -2182,7 +2208,7 @@
           "How many fields ahead to prefetch in oop scan (<= 0 means off)") \
                                                                             \
   diagnostic(bool, VerifySilently, false,                                   \
-          "Don't print print the verification progress")                    \
+          "Do not print the verification progress")                         \
                                                                             \
   diagnostic(bool, VerifyDuringStartup, false,                              \
           "Verify memory system before executing any Java code "            \
@@ -2205,7 +2231,7 @@
                                                                             \
   diagnostic(bool, DeferInitialCardMark, false,                             \
           "When +ReduceInitialCardMarks, explicitly defer any that "        \
-           "may arise from new_pre_store_barrier")                          \
+          "may arise from new_pre_store_barrier")                           \
                                                                             \
   diagnostic(bool, VerifyRememberedSets, false,                             \
           "Verify GC remembered sets")                                      \
@@ -2214,10 +2240,10 @@
           "Verify GC object start array if verify before/after")            \
                                                                             \
   product(bool, DisableExplicitGC, false,                                   \
-          "Tells whether calling System.gc() does a full GC")               \
+          "Ignore calls to System.gc()")                                    \
                                                                             \
   notproduct(bool, CheckMemoryInitialization, false,                        \
-          "Checks memory initialization")                                   \
+          "Check memory initialization")                                    \
                                                                             \
   product(bool, CollectGen0First, false,                                    \
           "Collect youngest generation before each full GC")                \
@@ -2238,44 +2264,45 @@
           "Stride through processors when distributing processes")          \
                                                                             \
   product(uintx, CMSCoordinatorYieldSleepCount, 10,                         \
-          "number of times the coordinator GC thread will sleep while "     \
+          "Number of times the coordinator GC thread will sleep while "     \
           "yielding before giving up and resuming GC")                      \
                                                                             \
   product(uintx, CMSYieldSleepCount, 0,                                     \
-          "number of times a GC thread (minus the coordinator) "            \
+          "Number of times a GC thread (minus the coordinator) "            \
           "will sleep while yielding before giving up and resuming GC")     \
                                                                             \
   /* gc tracing */                                                          \
   manageable(bool, PrintGC, false,                                          \
-          "Print message at garbage collect")                               \
+          "Print message at garbage collection")                            \
                                                                             \
   manageable(bool, PrintGCDetails, false,                                   \
-          "Print more details at garbage collect")                          \
+          "Print more details at garbage collection")                       \
                                                                             \
   manageable(bool, PrintGCDateStamps, false,                                \
-          "Print date stamps at garbage collect")                           \
+          "Print date stamps at garbage collection")                        \
                                                                             \
   manageable(bool, PrintGCTimeStamps, false,                                \
-          "Print timestamps at garbage collect")                            \
+          "Print timestamps at garbage collection")                         \
                                                                             \
   product(bool, PrintGCTaskTimeStamps, false,                               \
           "Print timestamps for individual gc worker thread tasks")         \
                                                                             \
   develop(intx, ConcGCYieldTimeout, 0,                                      \
-          "If non-zero, assert that GC threads yield within this # of ms.") \
+          "If non-zero, assert that GC threads yield within this "          \
+          "number of milliseconds")                                         \
                                                                             \
   notproduct(bool, TraceMarkSweep, false,                                   \
           "Trace mark sweep")                                               \
                                                                             \
   product(bool, PrintReferenceGC, false,                                    \
           "Print times spent handling reference objects during GC "         \
-          " (enabled only when PrintGCDetails)")                            \
+          "(enabled only when PrintGCDetails)")                             \
                                                                             \
   develop(bool, TraceReferenceGC, false,                                    \
           "Trace handling of soft/weak/final/phantom references")           \
                                                                             \
   develop(bool, TraceFinalizerRegistration, false,                          \
-         "Trace registration of final references")                          \
+          "Trace registration of final references")                         \
                                                                             \
   notproduct(bool, TraceScavenge, false,                                    \
           "Trace scavenge")                                                 \
@@ -2312,7 +2339,7 @@
           "Print heap layout before and after each GC")                     \
                                                                             \
   product_rw(bool, PrintHeapAtGCExtended, false,                            \
-          "Prints extended information about the layout of the heap "       \
+          "Print extended information about the layout of the heap "        \
           "when -XX:+PrintHeapAtGC is set")                                 \
                                                                             \
   product(bool, PrintHeapAtSIGBREAK, true,                                  \
@@ -2349,45 +2376,45 @@
           "Trace actions of the GC task threads")                           \
                                                                             \
   product(bool, PrintParallelOldGCPhaseTimes, false,                        \
-          "Print the time taken by each parallel old gc phase."             \
-          "PrintGCDetails must also be enabled.")                           \
+          "Print the time taken by each phase in ParallelOldGC "            \
+          "(PrintGCDetails must also be enabled)")                          \
                                                                             \
   develop(bool, TraceParallelOldGCMarkingPhase, false,                      \
-          "Trace parallel old gc marking phase")                            \
+          "Trace marking phase in ParallelOldGC")                           \
                                                                             \
   develop(bool, TraceParallelOldGCSummaryPhase, false,                      \
-          "Trace parallel old gc summary phase")                            \
+          "Trace summary phase in ParallelOldGC")                           \
                                                                             \
   develop(bool, TraceParallelOldGCCompactionPhase, false,                   \
-          "Trace parallel old gc compaction phase")                         \
+          "Trace compaction phase in ParallelOldGC")                        \
                                                                             \
   develop(bool, TraceParallelOldGCDensePrefix, false,                       \
-          "Trace parallel old gc dense prefix computation")                 \
+          "Trace dense prefix computation for ParallelOldGC")               \
                                                                             \
   develop(bool, IgnoreLibthreadGPFault, false,                              \
           "Suppress workaround for libthread GP fault")                     \
                                                                             \
   product(bool, PrintJNIGCStalls, false,                                    \
-          "Print diagnostic message when GC is stalled"                     \
+          "Print diagnostic message when GC is stalled "                    \
           "by JNI critical section")                                        \
                                                                             \
   experimental(double, ObjectCountCutOffPercent, 0.5,                       \
           "The percentage of the used heap that the instances of a class "  \
-          "must occupy for the class to generate a trace event.")           \
+          "must occupy for the class to generate a trace event")            \
                                                                             \
   /* GC log rotation setting */                                             \
                                                                             \
   product(bool, UseGCLogFileRotation, false,                                \
-          "Prevent large gclog file for long running app. "                 \
-          "Requires -Xloggc:<filename>")                                    \
+          "Rotate gclog files (for long running applications). It requires "\
+          "-Xloggc:<filename>")                                             \
                                                                             \
   product(uintx, NumberOfGCLogFiles, 0,                                     \
-          "Number of gclog files in rotation, "                             \
-          "Default: 0, no rotation")                                        \
+          "Number of gclog files in rotation "                              \
+          "(default: 0, no rotation)")                                      \
                                                                             \
   product(uintx, GCLogFileSize, 0,                                          \
-          "GC log file size, Default: 0 bytes, no rotation "                \
-          "Only valid with UseGCLogFileRotation")                           \
+          "GC log file size (default: 0 bytes, no rotation). "              \
+          "It requires UseGCLogFileRotation")                               \
                                                                             \
   /* JVMTI heap profiling */                                                \
                                                                             \
@@ -2464,40 +2491,40 @@
           "Generate range checks for array accesses")                       \
                                                                             \
   develop_pd(bool, ImplicitNullChecks,                                      \
-          "generate code for implicit null checks")                         \
+          "Generate code for implicit null checks")                         \
                                                                             \
   product(bool, PrintSafepointStatistics, false,                            \
-          "print statistics about safepoint synchronization")               \
+          "Print statistics about safepoint synchronization")               \
                                                                             \
   product(intx, PrintSafepointStatisticsCount, 300,                         \
-          "total number of safepoint statistics collected "                 \
+          "Total number of safepoint statistics collected "                 \
           "before printing them out")                                       \
                                                                             \
   product(intx, PrintSafepointStatisticsTimeout,  -1,                       \
-          "print safepoint statistics only when safepoint takes"            \
-          " more than PrintSafepointSatisticsTimeout in millis")            \
+          "Print safepoint statistics only when safepoint takes "           \
+          "more than PrintSafepointSatisticsTimeout in millis")             \
                                                                             \
   product(bool, TraceSafepointCleanupTime, false,                           \
-          "print the break down of clean up tasks performed during"         \
-          " safepoint")                                                     \
+          "Print the break down of clean up tasks performed during "        \
+          "safepoint")                                                      \
                                                                             \
   product(bool, Inline, true,                                               \
-          "enable inlining")                                                \
+          "Enable inlining")                                                \
                                                                             \
   product(bool, ClipInlining, true,                                         \
-          "clip inlining if aggregate method exceeds DesiredMethodLimit")   \
+          "Clip inlining if aggregate method exceeds DesiredMethodLimit")   \
                                                                             \
   develop(bool, UseCHA, true,                                               \
-          "enable CHA")                                                     \
+          "Enable CHA")                                                     \
                                                                             \
   product(bool, UseTypeProfile, true,                                       \
           "Check interpreter profile for historically monomorphic calls")   \
                                                                             \
   notproduct(bool, TimeCompiler, false,                                     \
-          "time the compiler")                                              \
+          "Time the compiler")                                              \
                                                                             \
   diagnostic(bool, PrintInlining, false,                                    \
-          "prints inlining optimizations")                                  \
+          "Print inlining optimizations")                                   \
                                                                             \
   product(bool, UsePopCountInstruction, false,                              \
           "Use population count instruction")                               \
@@ -2509,57 +2536,59 @@
           "Print when methods are replaced do to recompilation")            \
                                                                             \
   develop(bool, PrintMethodFlushing, false,                                 \
-          "print the nmethods being flushed")                               \
+          "Print the nmethods being flushed")                               \
                                                                             \
   develop(bool, UseRelocIndex, false,                                       \
-         "use an index to speed random access to relocations")              \
+          "Use an index to speed random access to relocations")             \
                                                                             \
   develop(bool, StressCodeBuffers, false,                                   \
-         "Exercise code buffer expansion and other rare state changes")     \
+          "Exercise code buffer expansion and other rare state changes")    \
                                                                             \
   diagnostic(bool, DebugNonSafepoints, trueInDebug,                         \
-         "Generate extra debugging info for non-safepoints in nmethods")    \
+          "Generate extra debugging information for non-safepoints in "     \
+          "nmethods")                                                       \
                                                                             \
   product(bool, PrintVMOptions, false,                                      \
-         "Print flags that appeared on the command line")                   \
+          "Print flags that appeared on the command line")                  \
                                                                             \
   product(bool, IgnoreUnrecognizedVMOptions, false,                         \
-         "Ignore unrecognized VM options")                                  \
+          "Ignore unrecognized VM options")                                 \
                                                                             \
   product(bool, PrintCommandLineFlags, false,                               \
-         "Print flags specified on command line or set by ergonomics")      \
+          "Print flags specified on command line or set by ergonomics")     \
                                                                             \
   product(bool, PrintFlagsInitial, false,                                   \
-         "Print all VM flags before argument processing and exit VM")       \
+          "Print all VM flags before argument processing and exit VM")      \
                                                                             \
   product(bool, PrintFlagsFinal, false,                                     \
-         "Print all VM flags after argument and ergonomic processing")      \
+          "Print all VM flags after argument and ergonomic processing")     \
                                                                             \
   notproduct(bool, PrintFlagsWithComments, false,                           \
-         "Print all VM flags with default values and descriptions and exit")\
+          "Print all VM flags with default values and descriptions and "    \
+          "exit")                                                           \
                                                                             \
   diagnostic(bool, SerializeVMOutput, true,                                 \
-         "Use a mutex to serialize output to tty and LogFile")              \
+          "Use a mutex to serialize output to tty and LogFile")             \
                                                                             \
   diagnostic(bool, DisplayVMOutput, true,                                   \
-         "Display all VM output on the tty, independently of LogVMOutput")  \
+          "Display all VM output on the tty, independently of LogVMOutput") \
                                                                             \
   diagnostic(bool, LogVMOutput, false,                                      \
-         "Save VM output to LogFile")                                       \
+          "Save VM output to LogFile")                                      \
                                                                             \
   diagnostic(ccstr, LogFile, NULL,                                          \
-         "If LogVMOutput or LogCompilation is on, save VM output to "       \
-         "this file [default: ./hotspot_pid%p.log] (%p replaced with pid)") \
+          "If LogVMOutput or LogCompilation is on, save VM output to "      \
+          "this file [default: ./hotspot_pid%p.log] (%p replaced with pid)")\
                                                                             \
   product(ccstr, ErrorFile, NULL,                                           \
-         "If an error occurs, save the error data to this file "            \
-         "[default: ./hs_err_pid%p.log] (%p replaced with pid)")            \
+          "If an error occurs, save the error data to this file "           \
+          "[default: ./hs_err_pid%p.log] (%p replaced with pid)")           \
                                                                             \
   product(bool, DisplayVMOutputToStderr, false,                             \
-         "If DisplayVMOutput is true, display all VM output to stderr")     \
+          "If DisplayVMOutput is true, display all VM output to stderr")    \
                                                                             \
   product(bool, DisplayVMOutputToStdout, false,                             \
-         "If DisplayVMOutput is true, display all VM output to stdout")     \
+          "If DisplayVMOutput is true, display all VM output to stdout")    \
                                                                             \
   product(bool, UseHeavyMonitors, false,                                    \
           "use heavyweight instead of lightweight Java monitors")           \
@@ -2583,7 +2612,7 @@
                                                                             \
   notproduct(ccstr, AbortVMOnExceptionMessage, NULL,                        \
           "Call fatal if the exception pointed by AbortVMOnException "      \
-          "has this message.")                                              \
+          "has this message")                                               \
                                                                             \
   develop(bool, DebugVtables, false,                                        \
           "add debugging code to vtable dispatch")                          \
@@ -2650,29 +2679,29 @@
                                                                             \
   /* statistics */                                                          \
   develop(bool, CountCompiledCalls, false,                                  \
-          "counts method invocations")                                      \
+          "Count method invocations")                                       \
                                                                             \
   notproduct(bool, CountRuntimeCalls, false,                                \
-          "counts VM runtime calls")                                        \
+          "Count VM runtime calls")                                         \
                                                                             \
   develop(bool, CountJNICalls, false,                                       \
-          "counts jni method invocations")                                  \
+          "Count jni method invocations")                                   \
                                                                             \
   notproduct(bool, CountJVMCalls, false,                                    \
-          "counts jvm method invocations")                                  \
+          "Count jvm method invocations")                                   \
                                                                             \
   notproduct(bool, CountRemovableExceptions, false,                         \
-          "count exceptions that could be replaced by branches due to "     \
+          "Count exceptions that could be replaced by branches due to "     \
           "inlining")                                                       \
                                                                             \
   notproduct(bool, ICMissHistogram, false,                                  \
-          "produce histogram of IC misses")                                 \
+          "Produce histogram of IC misses")                                 \
                                                                             \
   notproduct(bool, PrintClassStatistics, false,                             \
-          "prints class statistics at end of run")                          \
+          "Print class statistics at end of run")                           \
                                                                             \
   notproduct(bool, PrintMethodStatistics, false,                            \
-          "prints method statistics at end of run")                         \
+          "Print method statistics at end of run")                          \
                                                                             \
   /* interpreter */                                                         \
   develop(bool, ClearInterpreterLocals, false,                              \
@@ -2686,7 +2715,7 @@
           "Rewrite frequently used bytecode pairs into a single bytecode")  \
                                                                             \
   diagnostic(bool, PrintInterpreter, false,                                 \
-          "Prints the generated interpreter code")                          \
+          "Print the generated interpreter code")                           \
                                                                             \
   product(bool, UseInterpreter, true,                                       \
           "Use interpreter for non-compiled methods")                       \
@@ -2704,8 +2733,8 @@
           "Use fast method entry code for accessor methods")                \
                                                                             \
   product_pd(bool, UseOnStackReplacement,                                   \
-           "Use on stack replacement, calls runtime if invoc. counter "     \
-           "overflows in loop")                                             \
+          "Use on stack replacement, calls runtime if invoc. counter "      \
+          "overflows in loop")                                              \
                                                                             \
   notproduct(bool, TraceOnStackReplacement, false,                          \
           "Trace on stack replacement")                                     \
@@ -2753,10 +2782,10 @@
           "Trace frequency based inlining")                                 \
                                                                             \
   develop_pd(bool, InlineIntrinsics,                                        \
-           "Inline intrinsics that can be statically resolved")             \
+          "Inline intrinsics that can be statically resolved")              \
                                                                             \
   product_pd(bool, ProfileInterpreter,                                      \
-           "Profile at the bytecode level during interpretation")           \
+          "Profile at the bytecode level during interpretation")            \
                                                                             \
   develop_pd(bool, ProfileTraps,                                            \
           "Profile deoptimization traps at the bytecode level")             \
@@ -2766,7 +2795,7 @@
           "CompileThreshold) before using the method's profile")            \
                                                                             \
   develop(bool, PrintMethodData, false,                                     \
-           "Print the results of +ProfileInterpreter at end of run")        \
+          "Print the results of +ProfileInterpreter at end of run")         \
                                                                             \
   develop(bool, VerifyDataPointer, trueInDebug,                             \
           "Verify the method data pointer during interpreter profiling")    \
@@ -2781,7 +2810,7 @@
                                                                             \
   /* compilation */                                                         \
   product(bool, UseCompiler, true,                                          \
-          "use compilation")                                                \
+          "Use Just-In-Time compilation")                                   \
                                                                             \
   develop(bool, TraceCompilationPolicy, false,                              \
           "Trace compilation policy")                                       \
@@ -2790,20 +2819,21 @@
           "Time the compilation policy")                                    \
                                                                             \
   product(bool, UseCounterDecay, true,                                      \
-           "adjust recompilation counters")                                 \
+          "Adjust recompilation counters")                                  \
                                                                             \
   develop(intx, CounterHalfLifeTime,    30,                                 \
-          "half-life time of invocation counters (in secs)")                \
+          "Half-life time of invocation counters (in seconds)")             \
                                                                             \
   develop(intx, CounterDecayMinIntervalLength,   500,                       \
-          "Min. ms. between invocation of CounterDecay")                    \
+          "The minimum interval (in milliseconds) between invocation of "   \
+          "CounterDecay")                                                   \
                                                                             \
   product(bool, AlwaysCompileLoopMethods, false,                            \
-          "when using recompilation, never interpret methods "              \
+          "When using recompilation, never interpret methods "              \
           "containing loops")                                               \
                                                                             \
   product(bool, DontCompileHugeMethods, true,                               \
-          "don't compile methods > HugeMethodLimit")                        \
+          "Do not compile methods > HugeMethodLimit")                       \
                                                                             \
   /* Bytecode escape analysis estimation. */                                \
   product(bool, EstimateArgEscape, true,                                    \
@@ -2813,10 +2843,10 @@
           "How much tracing to do of bytecode escape analysis estimates")   \
                                                                             \
   product(intx, MaxBCEAEstimateLevel, 5,                                    \
-          "Maximum number of nested calls that are analyzed by BC EA.")     \
+          "Maximum number of nested calls that are analyzed by BC EA")      \
                                                                             \
   product(intx, MaxBCEAEstimateSize, 150,                                   \
-          "Maximum bytecode size of a method to be analyzed by BC EA.")     \
+          "Maximum bytecode size of a method to be analyzed by BC EA")      \
                                                                             \
   product(intx,  AllocatePrefetchStyle, 1,                                  \
           "0 = no prefetch, "                                               \
@@ -2831,7 +2861,8 @@
           "Number of lines to prefetch ahead of array allocation pointer")  \
                                                                             \
   product(intx,  AllocateInstancePrefetchLines, 1,                          \
-          "Number of lines to prefetch ahead of instance allocation pointer") \
+          "Number of lines to prefetch ahead of instance allocation "       \
+          "pointer")                                                        \
                                                                             \
   product(intx,  AllocatePrefetchStepSize, 16,                              \
           "Step size in bytes of sequential prefetch instructions")         \
@@ -2851,8 +2882,8 @@
           "(0 means off)")                                                  \
                                                                             \
   product(intx, MaxJavaStackTraceDepth, 1024,                               \
-          "Max. no. of lines in the stack trace for Java exceptions "       \
-          "(0 means all)")                                                  \
+          "The maximum number of lines in the stack trace for Java "        \
+          "exceptions (0 means all)")                                       \
                                                                             \
   NOT_EMBEDDED(diagnostic(intx, GuaranteedSafepointInterval, 1000,          \
           "Guarantee a safepoint (at least) every so many milliseconds "    \
@@ -2876,10 +2907,10 @@
           "result in more aggressive sweeping")                             \
                                                                             \
   notproduct(bool, LogSweeper, false,                                       \
-            "Keep a ring buffer of sweeper activity")                       \
+          "Keep a ring buffer of sweeper activity")                         \
                                                                             \
   notproduct(intx, SweeperLogEntries, 1024,                                 \
-            "Number of records in the ring buffer of sweeper activity")     \
+          "Number of records in the ring buffer of sweeper activity")       \
                                                                             \
   notproduct(intx, MemProfilingInterval, 500,                               \
           "Time between each invocation of the MemProfiler")                \
@@ -2922,34 +2953,35 @@
           "less than this")                                                 \
                                                                             \
   product(intx, MaxInlineSize, 35,                                          \
-          "maximum bytecode size of a method to be inlined")                \
+          "The maximum bytecode size of a method to be inlined")            \
                                                                             \
   product_pd(intx, FreqInlineSize,                                          \
-          "maximum bytecode size of a frequent method to be inlined")       \
+          "The maximum bytecode size of a frequent method to be inlined")   \
                                                                             \
   product(intx, MaxTrivialSize, 6,                                          \
-          "maximum bytecode size of a trivial method to be inlined")        \
+          "The maximum bytecode size of a trivial method to be inlined")    \
                                                                             \
   product(intx, MinInliningThreshold, 250,                                  \
-          "min. invocation count a method needs to have to be inlined")     \
+          "The minimum invocation count a method needs to have to be "      \
+          "inlined")                                                        \
                                                                             \
   develop(intx, MethodHistogramCutoff, 100,                                 \
-          "cutoff value for method invoc. histogram (+CountCalls)")         \
+          "The cutoff value for method invocation histogram (+CountCalls)") \
                                                                             \
   develop(intx, ProfilerNumberOfInterpretedMethods, 25,                     \
-          "# of interpreted methods to show in profile")                    \
+          "Number of interpreted methods to show in profile")               \
                                                                             \
   develop(intx, ProfilerNumberOfCompiledMethods, 25,                        \
-          "# of compiled methods to show in profile")                       \
+          "Number of compiled methods to show in profile")                  \
                                                                             \
   develop(intx, ProfilerNumberOfStubMethods, 25,                            \
-          "# of stub methods to show in profile")                           \
+          "Number of stub methods to show in profile")                      \
                                                                             \
   develop(intx, ProfilerNumberOfRuntimeStubNodes, 25,                       \
-          "# of runtime stub nodes to show in profile")                     \
+          "Number of runtime stub nodes to show in profile")                \
                                                                             \
   product(intx, ProfileIntervalsTicks, 100,                                 \
-          "# of ticks between printing of interval profile "                \
+          "Number of ticks between printing of interval profile "           \
           "(+ProfileIntervals)")                                            \
                                                                             \
   notproduct(intx, ScavengeALotInterval,     1,                             \
@@ -2970,7 +3002,7 @@
                                                                             \
   develop(intx, MinSleepInterval,     1,                                    \
           "Minimum sleep() interval (milliseconds) when "                   \
-          "ConvertSleepToYield is off (used for SOLARIS)")                  \
+          "ConvertSleepToYield is off (used for Solaris)")                  \
                                                                             \
   develop(intx, ProfilerPCTickThreshold,    15,                             \
           "Number of ticks in a PC buckets to be a hotspot")                \
@@ -2985,22 +3017,22 @@
           "Mark nmethods non-entrant at registration")                      \
                                                                             \
   diagnostic(intx, MallocVerifyInterval,     0,                             \
-          "if non-zero, verify C heap after every N calls to "              \
+          "If non-zero, verify C heap after every N calls to "              \
           "malloc/realloc/free")                                            \
                                                                             \
   diagnostic(intx, MallocVerifyStart,     0,                                \
-          "if non-zero, start verifying C heap after Nth call to "          \
+          "If non-zero, start verifying C heap after Nth call to "          \
           "malloc/realloc/free")                                            \
                                                                             \
   diagnostic(uintx, MallocMaxTestWords,     0,                              \
-          "if non-zero, max # of Words that malloc/realloc can allocate "   \
-          "(for testing only)")                                             \
+          "If non-zero, maximum number of words that malloc/realloc can "   \
+          "allocate (for testing only)")                                    \
                                                                             \
   product(intx, TypeProfileWidth,     2,                                    \
-          "number of receiver types to record in call/cast profile")        \
+          "Number of receiver types to record in call/cast profile")        \
                                                                             \
   develop(intx, BciProfileWidth,      2,                                    \
-          "number of return bci's to record in ret profile")                \
+          "Number of return bci's to record in ret profile")                \
                                                                             \
   product(intx, PerMethodRecompilationCutoff, 400,                          \
           "After recompiling N times, stay in the interpreter (-1=>'Inf')") \
@@ -3067,7 +3099,7 @@
           "Percentage of Eden that can be wasted")                          \
                                                                             \
   product(uintx, TLABRefillWasteFraction,    64,                            \
-          "Max TLAB waste at a refill (internal fragmentation)")            \
+          "Maximum TLAB waste at a refill (internal fragmentation)")        \
                                                                             \
   product(uintx, TLABWasteIncrement,    4,                                  \
           "Increment allowed waste at slow allocation")                     \
@@ -3076,7 +3108,7 @@
           "Ratio of eden/survivor space size")                              \
                                                                             \
   product(uintx, NewRatio, 2,                                               \
-          "Ratio of new/old generation sizes")                              \
+          "Ratio of old/new generation sizes")                              \
                                                                             \
   product_pd(uintx, NewSizeThreadIncrease,                                  \
           "Additional size added to desired new generation size per "       \
@@ -3093,28 +3125,30 @@
           "class pointers are used")                                        \
                                                                             \
   product(uintx, MinHeapFreeRatio,    40,                                   \
-          "Min percentage of heap free after GC to avoid expansion")        \
+          "The minimum percentage of heap free after GC to avoid expansion")\
                                                                             \
   product(uintx, MaxHeapFreeRatio,    70,                                   \
-          "Max percentage of heap free after GC to avoid shrinking")        \
+          "The maximum percentage of heap free after GC to avoid shrinking")\
                                                                             \
   product(intx, SoftRefLRUPolicyMSPerMB, 1000,                              \
           "Number of milliseconds per MB of free space in the heap")        \
                                                                             \
   product(uintx, MinHeapDeltaBytes, ScaleForWordSize(128*K),                \
-          "Min change in heap space due to GC (in bytes)")                  \
+          "The minimum change in heap space due to GC (in bytes)")          \
                                                                             \
   product(uintx, MinMetaspaceExpansion, ScaleForWordSize(256*K),            \
-          "Min expansion of Metaspace (in bytes)")                          \
+          "The minimum expansion of Metaspace (in bytes)")                  \
                                                                             \
   product(uintx, MinMetaspaceFreeRatio,    40,                              \
-          "Min percentage of Metaspace free after GC to avoid expansion")   \
+          "The minimum percentage of Metaspace free after GC to avoid "     \
+          "expansion")                                                      \
                                                                             \
   product(uintx, MaxMetaspaceFreeRatio,    70,                              \
-          "Max percentage of Metaspace free after GC to avoid shrinking")   \
+          "The maximum percentage of Metaspace free after GC to avoid "     \
+          "shrinking")                                                      \
                                                                             \
   product(uintx, MaxMetaspaceExpansion, ScaleForWordSize(4*M),              \
-          "Max expansion of Metaspace without full GC (in bytes)")          \
+          "The maximum expansion of Metaspace without full GC (in bytes)")  \
                                                                             \
   product(uintx, QueuedAllocationWarningCount, 0,                           \
           "Number of times an allocation that queues behind a GC "          \
@@ -3136,13 +3170,14 @@
           "Desired percentage of survivor space used after scavenge")       \
                                                                             \
   product(uintx, MarkSweepDeadRatio,     5,                                 \
-          "Percentage (0-100) of the old gen allowed as dead wood."         \
-          "Serial mark sweep treats this as both the min and max value."    \
-          "CMS uses this value only if it falls back to mark sweep."        \
-          "Par compact uses a variable scale based on the density of the"   \
-          "generation and treats this as the max value when the heap is"    \
-          "either completely full or completely empty.  Par compact also"   \
-          "has a smaller default value; see arguments.cpp.")                \
+          "Percentage (0-100) of the old gen allowed as dead wood. "        \
+          "Serial mark sweep treats this as both the minimum and maximum "  \
+          "value. "                                                         \
+          "CMS uses this value only if it falls back to mark sweep. "       \
+          "Par compact uses a variable scale based on the density of the "  \
+          "generation and treats this as the maximum value when the heap "  \
+          "is either completely full or completely empty.  Par compact "    \
+          "also has a smaller default value; see arguments.cpp.")           \
                                                                             \
   product(uintx, MarkSweepAlwaysCompactCount,     4,                        \
           "How often should we fully compact the heap (ignoring the dead "  \
@@ -3161,27 +3196,27 @@
           "Census for CMS' FreeListSpace")                                  \
                                                                             \
   develop(uintx, GCExpandToAllocateDelayMillis, 0,                          \
-          "Delay in ms between expansion and allocation")                   \
+          "Delay between expansion and allocation (in milliseconds)")       \
                                                                             \
   develop(uintx, GCWorkerDelayMillis, 0,                                    \
-          "Delay in ms in scheduling GC workers")                           \
+          "Delay in scheduling GC workers (in milliseconds)")               \
                                                                             \
   product(intx, DeferThrSuspendLoopCount,     4000,                         \
           "(Unstable) Number of times to iterate in safepoint loop "        \
-          " before blocking VM threads ")                                   \
+          "before blocking VM threads ")                                    \
                                                                             \
   product(intx, DeferPollingPageLoopCount,     -1,                          \
           "(Unsafe,Unstable) Number of iterations in safepoint loop "       \
           "before changing safepoint polling page to RO ")                  \
                                                                             \
-  product(intx, SafepointSpinBeforeYield, 2000,  "(Unstable)")              \
+  product(intx, SafepointSpinBeforeYield, 2000, "(Unstable)")               \
                                                                             \
   product(bool, PSChunkLargeArrays, true,                                   \
-          "true: process large arrays in chunks")                           \
+          "Process large arrays in chunks")                                 \
                                                                             \
   product(uintx, GCDrainStackTargetSize, 64,                                \
-          "how many entries we'll try to leave on the stack during "        \
-          "parallel GC")                                                    \
+          "Number of entries we will try to leave on the stack "            \
+          "during parallel gc")                                             \
                                                                             \
   /* stack parameters */                                                    \
   product_pd(intx, StackYellowPages,                                        \
@@ -3191,8 +3226,8 @@
           "Number of red zone (unrecoverable overflows) pages")             \
                                                                             \
   product_pd(intx, StackShadowPages,                                        \
-          "Number of shadow zone (for overflow checking) pages"             \
-          " this should exceed the depth of the VM and native call stack")  \
+          "Number of shadow zone (for overflow checking) pages "            \
+          "this should exceed the depth of the VM and native call stack")   \
                                                                             \
   product_pd(intx, ThreadStackSize,                                         \
           "Thread Stack Size (in Kbytes)")                                  \
@@ -3232,16 +3267,16 @@
           "Reserved code cache size (in bytes) - maximum code cache size")  \
                                                                             \
   product(uintx, CodeCacheMinimumFreeSpace, 500*K,                          \
-          "When less than X space left, we stop compiling.")                \
+          "When less than X space left, we stop compiling")                 \
                                                                             \
   product_pd(uintx, CodeCacheExpansionSize,                                 \
           "Code cache expansion size (in bytes)")                           \
                                                                             \
   develop_pd(uintx, CodeCacheMinBlockLength,                                \
-          "Minimum number of segments in a code cache block.")              \
+          "Minimum number of segments in a code cache block")               \
                                                                             \
   notproduct(bool, ExitOnFullCodeCache, false,                              \
-          "Exit the VM if we fill the code cache.")                         \
+          "Exit the VM if we fill the code cache")                          \
                                                                             \
   product(bool, UseCodeCacheFlushing, true,                                 \
           "Attempt to clean the code cache before shutting off compiler")   \
@@ -3252,31 +3287,31 @@
           "switch")                                                         \
                                                                             \
   develop(intx, StopInterpreterAt, 0,                                       \
-          "Stops interpreter execution at specified bytecode number")       \
+          "Stop interpreter execution at specified bytecode number")        \
                                                                             \
   develop(intx, TraceBytecodesAt, 0,                                        \
-          "Traces bytecodes starting with specified bytecode number")       \
+          "Trace bytecodes starting with specified bytecode number")        \
                                                                             \
   /* compiler interface */                                                  \
   develop(intx, CIStart, 0,                                                 \
-          "the id of the first compilation to permit")                      \
+          "The id of the first compilation to permit")                      \
                                                                             \
   develop(intx, CIStop,    -1,                                              \
-          "the id of the last compilation to permit")                       \
+          "The id of the last compilation to permit")                       \
                                                                             \
   develop(intx, CIStartOSR,     0,                                          \
-          "the id of the first osr compilation to permit "                  \
+          "The id of the first osr compilation to permit "                  \
           "(CICountOSR must be on)")                                        \
                                                                             \
   develop(intx, CIStopOSR,    -1,                                           \
-          "the id of the last osr compilation to permit "                   \
+          "The id of the last osr compilation to permit "                   \
           "(CICountOSR must be on)")                                        \
                                                                             \
   develop(intx, CIBreakAtOSR,    -1,                                        \
-          "id of osr compilation to break at")                              \
+          "The id of osr compilation to break at")                          \
                                                                             \
   develop(intx, CIBreakAt,    -1,                                           \
-          "id of compilation to break at")                                  \
+          "The id of compilation to break at")                              \
                                                                             \
   product(ccstrlist, CompileOnly, "",                                       \
           "List of methods (pkg/class.name) to restrict compilation to")    \
@@ -3295,11 +3330,11 @@
           "[default: ./replay_pid%p.log] (%p replaced with pid)")           \
                                                                             \
   develop(intx, ReplaySuppressInitializers, 2,                              \
-          "Controls handling of class initialization during replay"         \
-          "0 - don't do anything special"                                   \
-          "1 - treat all class initializers as empty"                       \
-          "2 - treat class initializers for application classes as empty"   \
-          "3 - allow all class initializers to run during bootstrap but"    \
+          "Control handling of class initialization during replay: "        \
+          "0 - don't do anything special; "                                 \
+          "1 - treat all class initializers as empty; "                     \
+          "2 - treat class initializers for application classes as empty; " \
+          "3 - allow all class initializers to run during bootstrap but "   \
           "    pretend they are empty after starting replay")               \
                                                                             \
   develop(bool, ReplayIgnoreInitErrors, false,                              \
@@ -3328,14 +3363,15 @@
           "0 : Normal.                                                     "\
           "    VM chooses priorities that are appropriate for normal       "\
           "    applications. On Solaris NORM_PRIORITY and above are mapped "\
-          "    to normal native priority. Java priorities below NORM_PRIORITY"\
-          "    map to lower native priority values. On Windows applications"\
-          "    are allowed to use higher native priorities. However, with  "\
-          "    ThreadPriorityPolicy=0, VM will not use the highest possible"\
-          "    native priority, THREAD_PRIORITY_TIME_CRITICAL, as it may   "\
-          "    interfere with system threads. On Linux thread priorities   "\
-          "    are ignored because the OS does not support static priority "\
-          "    in SCHED_OTHER scheduling class which is the only choice for"\
+          "    to normal native priority. Java priorities below "           \
+          "    NORM_PRIORITY map to lower native priority values. On       "\
+          "    Windows applications are allowed to use higher native       "\
+          "    priorities. However, with ThreadPriorityPolicy=0, VM will   "\
+          "    not use the highest possible native priority,               "\
+          "    THREAD_PRIORITY_TIME_CRITICAL, as it may interfere with     "\
+          "    system threads. On Linux thread priorities are ignored      "\
+          "    because the OS does not support static priority in          "\
+          "    SCHED_OTHER scheduling class which is the only choice for   "\
           "    non-root, non-realtime applications.                        "\
           "1 : Aggressive.                                                 "\
           "    Java thread priorities map over to the entire range of      "\
@@ -3366,16 +3402,35 @@
   product(bool, VMThreadHintNoPreempt, false,                               \
           "(Solaris only) Give VM thread an extra quanta")                  \
                                                                             \
-  product(intx, JavaPriority1_To_OSPriority, -1, "Map Java priorities to OS priorities") \
-  product(intx, JavaPriority2_To_OSPriority, -1, "Map Java priorities to OS priorities") \
-  product(intx, JavaPriority3_To_OSPriority, -1, "Map Java priorities to OS priorities") \
-  product(intx, JavaPriority4_To_OSPriority, -1, "Map Java priorities to OS priorities") \
-  product(intx, JavaPriority5_To_OSPriority, -1, "Map Java priorities to OS priorities") \
-  product(intx, JavaPriority6_To_OSPriority, -1, "Map Java priorities to OS priorities") \
-  product(intx, JavaPriority7_To_OSPriority, -1, "Map Java priorities to OS priorities") \
-  product(intx, JavaPriority8_To_OSPriority, -1, "Map Java priorities to OS priorities") \
-  product(intx, JavaPriority9_To_OSPriority, -1, "Map Java priorities to OS priorities") \
-  product(intx, JavaPriority10_To_OSPriority,-1, "Map Java priorities to OS priorities") \
+  product(intx, JavaPriority1_To_OSPriority, -1,                            \
+          "Map Java priorities to OS priorities")                           \
+                                                                            \
+  product(intx, JavaPriority2_To_OSPriority, -1,                            \
+          "Map Java priorities to OS priorities")                           \
+                                                                            \
+  product(intx, JavaPriority3_To_OSPriority, -1,                            \
+          "Map Java priorities to OS priorities")                           \
+                                                                            \
+  product(intx, JavaPriority4_To_OSPriority, -1,                            \
+          "Map Java priorities to OS priorities")                           \
+                                                                            \
+  product(intx, JavaPriority5_To_OSPriority, -1,                            \
+          "Map Java priorities to OS priorities")                           \
+                                                                            \
+  product(intx, JavaPriority6_To_OSPriority, -1,                            \
+          "Map Java priorities to OS priorities")                           \
+                                                                            \
+  product(intx, JavaPriority7_To_OSPriority, -1,                            \
+          "Map Java priorities to OS priorities")                           \
+                                                                            \
+  product(intx, JavaPriority8_To_OSPriority, -1,                            \
+          "Map Java priorities to OS priorities")                           \
+                                                                            \
+  product(intx, JavaPriority9_To_OSPriority, -1,                            \
+          "Map Java priorities to OS priorities")                           \
+                                                                            \
+  product(intx, JavaPriority10_To_OSPriority,-1,                            \
+          "Map Java priorities to OS priorities")                           \
                                                                             \
   experimental(bool, UseCriticalJavaThreadPriority, false,                  \
           "Java thread priority 10 maps to critical scheduling priority")   \
@@ -3406,37 +3461,38 @@
           "Used with +TraceLongCompiles")                                   \
                                                                             \
   product(intx, StarvationMonitorInterval,    200,                          \
-          "Pause between each check in ms")                                 \
+          "Pause between each check (in milliseconds)")                     \
                                                                             \
   /* recompilation */                                                       \
   product_pd(intx, CompileThreshold,                                        \
           "number of interpreted method invocations before (re-)compiling") \
                                                                             \
   product_pd(intx, BackEdgeThreshold,                                       \
-          "Interpreter Back edge threshold at which an OSR compilation is invoked")\
+          "Interpreter Back edge threshold at which an OSR compilation is " \
+          "invoked")                                                        \
                                                                             \
   product(intx, Tier0InvokeNotifyFreqLog, 7,                                \
-          "Interpreter (tier 0) invocation notification frequency.")        \
+          "Interpreter (tier 0) invocation notification frequency")         \
                                                                             \
   product(intx, Tier2InvokeNotifyFreqLog, 11,                               \
-          "C1 without MDO (tier 2) invocation notification frequency.")     \
+          "C1 without MDO (tier 2) invocation notification frequency")      \
                                                                             \
   product(intx, Tier3InvokeNotifyFreqLog, 10,                               \
           "C1 with MDO profiling (tier 3) invocation notification "         \
-          "frequency.")                                                     \
+          "frequency")                                                      \
                                                                             \
   product(intx, Tier23InlineeNotifyFreqLog, 20,                             \
           "Inlinee invocation (tiers 2 and 3) notification frequency")      \
                                                                             \
   product(intx, Tier0BackedgeNotifyFreqLog, 10,                             \
-          "Interpreter (tier 0) invocation notification frequency.")        \
+          "Interpreter (tier 0) invocation notification frequency")         \
                                                                             \
   product(intx, Tier2BackedgeNotifyFreqLog, 14,                             \
-          "C1 without MDO (tier 2) invocation notification frequency.")     \
+          "C1 without MDO (tier 2) invocation notification frequency")      \
                                                                             \
   product(intx, Tier3BackedgeNotifyFreqLog, 13,                             \
           "C1 with MDO profiling (tier 3) invocation notification "         \
-          "frequency.")                                                     \
+          "frequency")                                                      \
                                                                             \
   product(intx, Tier2CompileThreshold, 0,                                   \
           "threshold at which tier 2 compilation is invoked")               \
@@ -3453,7 +3509,7 @@
                                                                             \
   product(intx, Tier3CompileThreshold, 2000,                                \
           "Threshold at which tier 3 compilation is invoked (invocation "   \
-          "minimum must be satisfied.")                                     \
+          "minimum must be satisfied")                                      \
                                                                             \
   product(intx, Tier3BackEdgeThreshold,  60000,                             \
           "Back edge threshold at which tier 3 OSR compilation is invoked") \
@@ -3467,7 +3523,7 @@
                                                                             \
   product(intx, Tier4CompileThreshold, 15000,                               \
           "Threshold at which tier 4 compilation is invoked (invocation "   \
-          "minimum must be satisfied.")                                     \
+          "minimum must be satisfied")                                      \
                                                                             \
   product(intx, Tier4BackEdgeThreshold, 40000,                              \
           "Back edge threshold at which tier 4 OSR compilation is invoked") \
@@ -3496,12 +3552,12 @@
           "Stop at given compilation level")                                \
                                                                             \
   product(intx, Tier0ProfilingStartPercentage, 200,                         \
-          "Start profiling in interpreter if the counters exceed tier 3"    \
+          "Start profiling in interpreter if the counters exceed tier 3 "   \
           "thresholds by the specified percentage")                         \
                                                                             \
   product(uintx, IncreaseFirstTierCompileThresholdAt, 50,                   \
-          "Increase the compile threshold for C1 compilation if the code"   \
-          "cache is filled by the specified percentage.")                   \
+          "Increase the compile threshold for C1 compilation if the code "  \
+          "cache is filled by the specified percentage")                    \
                                                                             \
   product(intx, TieredRateUpdateMinTime, 1,                                 \
           "Minimum rate sampling interval (in milliseconds)")               \
@@ -3516,24 +3572,26 @@
           "Print tiered events notifications")                              \
                                                                             \
   product_pd(intx, OnStackReplacePercentage,                                \
-          "NON_TIERED number of method invocations/branches (expressed as %"\
-          "of CompileThreshold) before (re-)compiling OSR code")            \
+          "NON_TIERED number of method invocations/branches (expressed as " \
+          "% of CompileThreshold) before (re-)compiling OSR code")          \
                                                                             \
   product(intx, InterpreterProfilePercentage, 33,                           \
-          "NON_TIERED number of method invocations/branches (expressed as %"\
-          "of CompileThreshold) before profiling in the interpreter")       \
+          "NON_TIERED number of method invocations/branches (expressed as " \
+          "% of CompileThreshold) before profiling in the interpreter")     \
                                                                             \
   develop(intx, MaxRecompilationSearchLength,    10,                        \
-          "max. # frames to inspect searching for recompilee")              \
+          "The maximum number of frames to inspect when searching for "     \
+          "recompilee")                                                     \
                                                                             \
   develop(intx, MaxInterpretedSearchLength,     3,                          \
-          "max. # interp. frames to skip when searching for recompilee")    \
+          "The maximum number of interpreted frames to skip when searching "\
+          "for recompilee")                                                 \
                                                                             \
   develop(intx, DesiredMethodLimit,  8000,                                  \
-          "desired max. method size (in bytecodes) after inlining")         \
+          "The desired maximum method size (in bytecodes) after inlining")  \
                                                                             \
   develop(intx, HugeMethodLimit,  8000,                                     \
-          "don't compile methods larger than this if "                      \
+          "Don't compile methods larger than this if "                      \
           "+DontCompileHugeMethods")                                        \
                                                                             \
   /* New JDK 1.4 reflection implementation */                               \
@@ -3555,7 +3613,7 @@
           "in InvocationTargetException. See 6531596")                      \
                                                                             \
   develop(bool, VerifyLambdaBytecodes, false,                               \
-          "Force verification of jdk 8 lambda metafactory bytecodes.")      \
+          "Force verification of jdk 8 lambda metafactory bytecodes")       \
                                                                             \
   develop(intx, FastSuperclassLimit, 8,                                     \
           "Depth of hardwired instanceof accelerator array")                \
@@ -3579,18 +3637,19 @@
   /* flags for performance data collection */                               \
                                                                             \
   product(bool, UsePerfData, falseInEmbedded,                               \
-          "Flag to disable jvmstat instrumentation for performance testing" \
-          "and problem isolation purposes.")                                \
+          "Flag to disable jvmstat instrumentation for performance testing "\
+          "and problem isolation purposes")                                 \
                                                                             \
   product(bool, PerfDataSaveToFile, false,                                  \
           "Save PerfData memory to hsperfdata_<pid> file on exit")          \
                                                                             \
   product(ccstr, PerfDataSaveFile, NULL,                                    \
-          "Save PerfData memory to the specified absolute pathname,"        \
-           "%p in the file name if present will be replaced by pid")        \
+          "Save PerfData memory to the specified absolute pathname. "       \
+          "The string %p in the file name (if present) "                    \
+          "will be replaced by pid")                                        \
                                                                             \
-  product(intx, PerfDataSamplingInterval, 50 /*ms*/,                        \
-          "Data sampling interval in milliseconds")                         \
+  product(intx, PerfDataSamplingInterval, 50,                               \
+          "Data sampling interval (in milliseconds)")                       \
                                                                             \
   develop(bool, PerfTraceDataCreation, false,                               \
           "Trace creation of Performance Data Entries")                     \
@@ -3615,7 +3674,7 @@
           "Bypass Win32 file system criteria checks (Windows Only)")        \
                                                                             \
   product(intx, UnguardOnExecutionViolation, 0,                             \
-          "Unguard page and retry on no-execute fault (Win32 only)"         \
+          "Unguard page and retry on no-execute fault (Win32 only) "        \
           "0=off, 1=conservative, 2=aggressive")                            \
                                                                             \
   /* Serviceability Support */                                              \
@@ -3624,7 +3683,7 @@
           "Create JMX Management Server")                                   \
                                                                             \
   product(bool, DisableAttachMechanism, false,                              \
-         "Disable mechanism that allows tools to attach to this VM")        \
+          "Disable mechanism that allows tools to attach to this VM")       \
                                                                             \
   product(bool, StartAttachListener, false,                                 \
           "Always start Attach Listener at VM startup")                     \
@@ -3647,9 +3706,9 @@
           "Require shared spaces for metadata")                             \
                                                                             \
   product(bool, DumpSharedSpaces, false,                                    \
-           "Special mode: JVM reads a class list, loads classes, builds "   \
-            "shared spaces, and dumps the shared spaces to a file to be "   \
-            "used in future JVM runs.")                                     \
+          "Special mode: JVM reads a class list, loads classes, builds "    \
+          "shared spaces, and dumps the shared spaces to a file to be "     \
+          "used in future JVM runs")                                        \
                                                                             \
   product(bool, PrintSharedSpaces, false,                                   \
           "Print usage of shared spaces")                                   \
@@ -3722,11 +3781,14 @@
           "Relax the access control checks in the verifier")                \
                                                                             \
   diagnostic(bool, PrintDTraceDOF, false,                                   \
-             "Print the DTrace DOF passed to the system for JSDT probes")   \
+          "Print the DTrace DOF passed to the system for JSDT probes")      \
                                                                             \
   product(uintx, StringTableSize, defaultStringTableSize,                   \
           "Number of buckets in the interned String table")                 \
                                                                             \
+  experimental(uintx, SymbolTableSize, defaultSymbolTableSize,              \
+          "Number of buckets in the JVM internal Symbol table")             \
+                                                                            \
   develop(bool, TraceDefaultMethods, false,                                 \
           "Trace the default method processing steps")                      \
                                                                             \
@@ -3735,8 +3797,8 @@
                                                                             \
   product(bool, UseVMInterruptibleIO, false,                                \
           "(Unstable, Solaris-specific) Thread interrupt before or with "   \
-          "EINTR for I/O operations results in OS_INTRPT. The default value"\
-          " of this flag is true for JDK 6 and earlier")                    \
+          "EINTR for I/O operations results in OS_INTRPT. The default "     \
+          "value of this flag is true for JDK 6 and earlier")               \
                                                                             \
   diagnostic(bool, WhiteBoxAPI, false,                                      \
           "Enable internal testing APIs")                                   \
@@ -3757,6 +3819,7 @@
                                                                             \
   product(bool, EnableTracing, false,                                       \
           "Enable event-based tracing")                                     \
+                                                                            \
   product(bool, UseLockedTracing, false,                                    \
           "Use locked-tracing when doing event-based tracing")
 
diff --git a/hotspot/src/share/vm/runtime/reflectionUtils.cpp b/hotspot/src/share/vm/runtime/reflectionUtils.cpp
index 9fcf966..2ec82ab 100644
--- a/hotspot/src/share/vm/runtime/reflectionUtils.cpp
+++ b/hotspot/src/share/vm/runtime/reflectionUtils.cpp
@@ -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
@@ -27,8 +27,11 @@
 #include "memory/universe.inline.hpp"
 #include "runtime/reflectionUtils.hpp"
 
-KlassStream::KlassStream(instanceKlassHandle klass, bool local_only, bool classes_only) {
-  _klass = klass;
+KlassStream::KlassStream(instanceKlassHandle klass, bool local_only,
+                         bool classes_only, bool walk_defaults) {
+  _klass = _base_klass = klass;
+  _base_class_search_defaults = false;
+  _defaults_checked = false;
   if (classes_only) {
     _interfaces = Universe::the_empty_klass_array();
   } else {
@@ -37,6 +40,7 @@
   _interface_index = _interfaces->length();
   _local_only = local_only;
   _classes_only = classes_only;
+  _walk_defaults = walk_defaults;
 }
 
 bool KlassStream::eos() {
@@ -45,7 +49,13 @@
   if (!_klass->is_interface() && _klass->super() != NULL) {
     // go up superclass chain (not for interfaces)
     _klass = _klass->super();
+  // Next for method walks, walk default methods
+  } else if (_walk_defaults && (_defaults_checked == false)  && (_base_klass->default_methods() != NULL)) {
+      _base_class_search_defaults = true;
+      _klass = _base_klass;
+      _defaults_checked = true;
   } else {
+    // Next walk transitive interfaces
     if (_interface_index > 0) {
       _klass = _interfaces->at(--_interface_index);
     } else {
diff --git a/hotspot/src/share/vm/runtime/reflectionUtils.hpp b/hotspot/src/share/vm/runtime/reflectionUtils.hpp
index 71a5009..1f5b87f 100644
--- a/hotspot/src/share/vm/runtime/reflectionUtils.hpp
+++ b/hotspot/src/share/vm/runtime/reflectionUtils.hpp
@@ -38,7 +38,7 @@
 // and (super)interfaces. Streaming is done in reverse order (subclasses first,
 // interfaces last).
 //
-//    for (KlassStream st(k, false, false); !st.eos(); st.next()) {
+//    for (KlassStream st(k, false, false, false); !st.eos(); st.next()) {
 //      Klass* k = st.klass();
 //      ...
 //    }
@@ -46,17 +46,21 @@
 class KlassStream VALUE_OBJ_CLASS_SPEC {
  protected:
   instanceKlassHandle _klass;           // current klass/interface iterated over
-  Array<Klass*>*    _interfaces;      // transitive interfaces for initial class
+  instanceKlassHandle _base_klass;      // initial klass/interface to iterate over
+  Array<Klass*>*      _interfaces;      // transitive interfaces for initial class
   int                 _interface_index; // current interface being processed
   bool                _local_only;      // process initial class/interface only
   bool                _classes_only;    // process classes only (no interfaces)
+  bool                _walk_defaults;   // process default methods
+  bool                _base_class_search_defaults; // time to process default methods
+  bool                _defaults_checked; // already checked for default methods
   int                 _index;
 
-  virtual int length() const = 0;
+  virtual int length() = 0;
 
  public:
   // constructor
-  KlassStream(instanceKlassHandle klass, bool local_only, bool classes_only);
+  KlassStream(instanceKlassHandle klass, bool local_only, bool classes_only, bool walk_defaults);
 
   // testing
   bool eos();
@@ -67,6 +71,8 @@
   // accessors
   instanceKlassHandle klass() const { return _klass; }
   int index() const                 { return _index; }
+  bool base_class_search_defaults() const { return _base_class_search_defaults; }
+  void base_class_search_defaults(bool b) { _base_class_search_defaults = b; }
 };
 
 
@@ -81,17 +87,24 @@
 
 class MethodStream : public KlassStream {
  private:
-  int length() const          { return methods()->length(); }
-  Array<Method*>* methods() const { return _klass->methods(); }
+  int length()                    { return methods()->length(); }
+  Array<Method*>* methods() {
+    if (base_class_search_defaults()) {
+      base_class_search_defaults(false);
+      return _klass->default_methods();
+    } else {
+      return _klass->methods();
+    }
+  }
  public:
   MethodStream(instanceKlassHandle klass, bool local_only, bool classes_only)
-    : KlassStream(klass, local_only, classes_only) {
+    : KlassStream(klass, local_only, classes_only, true) {
     _index = length();
     next();
   }
 
   void next() { _index--; }
-  Method* method() const { return methods()->at(index()); }
+  Method* method() { return methods()->at(index()); }
 };
 
 
@@ -107,13 +120,13 @@
 
 class FieldStream : public KlassStream {
  private:
-  int length() const                { return _klass->java_fields_count(); }
+  int length() { return _klass->java_fields_count(); }
 
   fieldDescriptor _fd_buf;
 
  public:
   FieldStream(instanceKlassHandle klass, bool local_only, bool classes_only)
-    : KlassStream(klass, local_only, classes_only) {
+    : KlassStream(klass, local_only, classes_only, false) {
     _index = length();
     next();
   }
diff --git a/hotspot/src/share/vm/runtime/virtualspace.cpp b/hotspot/src/share/vm/runtime/virtualspace.cpp
index 98ee763..24650f3 100644
--- a/hotspot/src/share/vm/runtime/virtualspace.cpp
+++ b/hotspot/src/share/vm/runtime/virtualspace.cpp
@@ -368,8 +368,15 @@
 
 
 bool VirtualSpace::initialize(ReservedSpace rs, size_t committed_size) {
+  const size_t max_commit_granularity = os::page_size_for_region(rs.size(), rs.size(), 1);
+  return initialize_with_granularity(rs, committed_size, max_commit_granularity);
+}
+
+bool VirtualSpace::initialize_with_granularity(ReservedSpace rs, size_t committed_size, size_t max_commit_granularity) {
   if(!rs.is_reserved()) return false;  // allocation failed.
   assert(_low_boundary == NULL, "VirtualSpace already initialized");
+  assert(max_commit_granularity > 0, "Granularity must be non-zero.");
+
   _low_boundary  = rs.base();
   _high_boundary = low_boundary() + rs.size();
 
@@ -390,7 +397,7 @@
   // No attempt is made to force large page alignment at the very top and
   // bottom of the space if they are not aligned so already.
   _lower_alignment  = os::vm_page_size();
-  _middle_alignment = os::page_size_for_region(rs.size(), rs.size(), 1);
+  _middle_alignment = max_commit_granularity;
   _upper_alignment  = os::vm_page_size();
 
   // End of each region
@@ -966,17 +973,52 @@
 
 
 class TestVirtualSpace : AllStatic {
+  enum TestLargePages {
+    Default,
+    Disable,
+    Reserve,
+    Commit
+  };
+
+  static ReservedSpace reserve_memory(size_t reserve_size_aligned, TestLargePages mode) {
+    switch(mode) {
+    default:
+    case Default:
+    case Reserve:
+      return ReservedSpace(reserve_size_aligned);
+    case Disable:
+    case Commit:
+      return ReservedSpace(reserve_size_aligned,
+                           os::vm_allocation_granularity(),
+                           /* large */ false, /* exec */ false);
+    }
+  }
+
+  static bool initialize_virtual_space(VirtualSpace& vs, ReservedSpace rs, TestLargePages mode) {
+    switch(mode) {
+    default:
+    case Default:
+    case Reserve:
+      return vs.initialize(rs, 0);
+    case Disable:
+      return vs.initialize_with_granularity(rs, 0, os::vm_page_size());
+    case Commit:
+      return vs.initialize_with_granularity(rs, 0, os::page_size_for_region(rs.size(), rs.size(), 1));
+    }
+  }
+
  public:
-  static void test_virtual_space_actual_committed_space(size_t reserve_size, size_t commit_size) {
+  static void test_virtual_space_actual_committed_space(size_t reserve_size, size_t commit_size,
+                                                        TestLargePages mode = Default) {
     size_t granularity = os::vm_allocation_granularity();
     size_t reserve_size_aligned = align_size_up(reserve_size, granularity);
 
-    ReservedSpace reserved(reserve_size_aligned);
+    ReservedSpace reserved = reserve_memory(reserve_size_aligned, mode);
 
     assert(reserved.is_reserved(), "Must be");
 
     VirtualSpace vs;
-    bool initialized = vs.initialize(reserved, 0);
+    bool initialized = initialize_virtual_space(vs, reserved, mode);
     assert(initialized, "Failed to initialize VirtualSpace");
 
     vs.expand_by(commit_size, false);
@@ -986,7 +1028,10 @@
     } else {
       assert_ge(vs.actual_committed_size(), commit_size);
       // Approximate the commit granularity.
-      size_t commit_granularity = UseLargePages ? os::large_page_size() : os::vm_page_size();
+      // Make sure that we don't commit using large pages
+      // if large pages has been disabled for this VirtualSpace.
+      size_t commit_granularity = (mode == Disable || !UseLargePages) ?
+                                   os::vm_page_size() : os::large_page_size();
       assert_lt(vs.actual_committed_size(), commit_size + commit_granularity);
     }
 
@@ -1042,9 +1087,40 @@
     test_virtual_space_actual_committed_space(10 * M, 10 * M);
   }
 
+  static void test_virtual_space_disable_large_pages() {
+    if (!UseLargePages) {
+      return;
+    }
+    // These test cases verify that if we force VirtualSpace to disable large pages
+    test_virtual_space_actual_committed_space(10 * M, 0, Disable);
+    test_virtual_space_actual_committed_space(10 * M, 4 * K, Disable);
+    test_virtual_space_actual_committed_space(10 * M, 8 * K, Disable);
+    test_virtual_space_actual_committed_space(10 * M, 1 * M, Disable);
+    test_virtual_space_actual_committed_space(10 * M, 2 * M, Disable);
+    test_virtual_space_actual_committed_space(10 * M, 5 * M, Disable);
+    test_virtual_space_actual_committed_space(10 * M, 10 * M, Disable);
+
+    test_virtual_space_actual_committed_space(10 * M, 0, Reserve);
+    test_virtual_space_actual_committed_space(10 * M, 4 * K, Reserve);
+    test_virtual_space_actual_committed_space(10 * M, 8 * K, Reserve);
+    test_virtual_space_actual_committed_space(10 * M, 1 * M, Reserve);
+    test_virtual_space_actual_committed_space(10 * M, 2 * M, Reserve);
+    test_virtual_space_actual_committed_space(10 * M, 5 * M, Reserve);
+    test_virtual_space_actual_committed_space(10 * M, 10 * M, Reserve);
+
+    test_virtual_space_actual_committed_space(10 * M, 0, Commit);
+    test_virtual_space_actual_committed_space(10 * M, 4 * K, Commit);
+    test_virtual_space_actual_committed_space(10 * M, 8 * K, Commit);
+    test_virtual_space_actual_committed_space(10 * M, 1 * M, Commit);
+    test_virtual_space_actual_committed_space(10 * M, 2 * M, Commit);
+    test_virtual_space_actual_committed_space(10 * M, 5 * M, Commit);
+    test_virtual_space_actual_committed_space(10 * M, 10 * M, Commit);
+  }
+
   static void test_virtual_space() {
     test_virtual_space_actual_committed_space();
     test_virtual_space_actual_committed_space_one_large_page();
+    test_virtual_space_disable_large_pages();
   }
 };
 
diff --git a/hotspot/src/share/vm/runtime/virtualspace.hpp b/hotspot/src/share/vm/runtime/virtualspace.hpp
index 02b1473..a0052705 100644
--- a/hotspot/src/share/vm/runtime/virtualspace.hpp
+++ b/hotspot/src/share/vm/runtime/virtualspace.hpp
@@ -178,6 +178,7 @@
  public:
   // Initialization
   VirtualSpace();
+  bool initialize_with_granularity(ReservedSpace rs, size_t committed_byte_size, size_t max_commit_ganularity);
   bool initialize(ReservedSpace rs, size_t committed_byte_size);
 
   // Destruction
diff --git a/hotspot/src/share/vm/runtime/vmStructs.cpp b/hotspot/src/share/vm/runtime/vmStructs.cpp
index e274b90..199dbac 100644
--- a/hotspot/src/share/vm/runtime/vmStructs.cpp
+++ b/hotspot/src/share/vm/runtime/vmStructs.cpp
@@ -27,7 +27,6 @@
 #include "classfile/javaClasses.hpp"
 #include "classfile/loaderConstraints.hpp"
 #include "classfile/placeholders.hpp"
-#include "classfile/symbolTable.hpp"
 #include "classfile/systemDictionary.hpp"
 #include "ci/ciField.hpp"
 #include "ci/ciInstance.hpp"
@@ -289,6 +288,7 @@
   nonstatic_field(ConstantPoolCache,    _constant_pool,                                ConstantPool*)                         \
   nonstatic_field(InstanceKlass,               _array_klasses,                                Klass*)                                \
   nonstatic_field(InstanceKlass,               _methods,                                      Array<Method*>*)                       \
+  nonstatic_field(InstanceKlass,               _default_methods,                              Array<Method*>*)                       \
   nonstatic_field(InstanceKlass,               _local_interfaces,                             Array<Klass*>*)                        \
   nonstatic_field(InstanceKlass,               _transitive_interfaces,                        Array<Klass*>*)                        \
   nonstatic_field(InstanceKlass,               _fields,                                       Array<u2>*)                            \
@@ -323,6 +323,7 @@
   nonstatic_field(nmethodBucket,               _count,                                        int)                                   \
   nonstatic_field(nmethodBucket,               _next,                                         nmethodBucket*)                        \
   nonstatic_field(InstanceKlass,               _method_ordering,                              Array<int>*)                           \
+  nonstatic_field(InstanceKlass,               _default_vtable_indices,                       Array<int>*)                           \
   nonstatic_field(Klass,                       _super_check_offset,                           juint)                                 \
   nonstatic_field(Klass,                       _secondary_super_cache,                        Klass*)                                \
   nonstatic_field(Klass,                       _secondary_supers,                             Array<Klass*>*)                        \
@@ -715,11 +716,17 @@
   nonstatic_field(PlaceholderEntry,            _loader_data,                                  ClassLoaderData*)                      \
                                                                                                                                      \
   /**************************/                                                                                                       \
-  /* ProctectionDomainEntry */                                                                                                       \
+  /* ProtectionDomainEntry  */                                                                                                       \
   /**************************/                                                                                                       \
                                                                                                                                      \
   nonstatic_field(ProtectionDomainEntry,       _next,                                         ProtectionDomainEntry*)                \
-  nonstatic_field(ProtectionDomainEntry,       _protection_domain,                            oop)                                   \
+  nonstatic_field(ProtectionDomainEntry,       _pd_cache,                                     ProtectionDomainCacheEntry*)           \
+                                                                                                                                     \
+  /*******************************/                                                                                                  \
+  /* ProtectionDomainCacheEntry  */                                                                                                  \
+  /*******************************/                                                                                                  \
+                                                                                                                                     \
+  nonstatic_field(ProtectionDomainCacheEntry,  _literal,                                      oop)                                   \
                                                                                                                                      \
   /*************************/                                                                                                        \
   /* LoaderConstraintEntry */                                                                                                        \
@@ -1562,6 +1569,7 @@
   declare_toplevel_type(SystemDictionary)                                 \
   declare_toplevel_type(vmSymbols)                                        \
   declare_toplevel_type(ProtectionDomainEntry)                            \
+  declare_toplevel_type(ProtectionDomainCacheEntry)                       \
                                                                           \
   declare_toplevel_type(GenericGrowableArray)                             \
   declare_toplevel_type(GrowableArray<int>)                               \
@@ -2247,12 +2255,6 @@
   declare_preprocessor_constant("PERFDATA_BIG_ENDIAN", PERFDATA_BIG_ENDIAN)       \
   declare_preprocessor_constant("PERFDATA_LITTLE_ENDIAN", PERFDATA_LITTLE_ENDIAN) \
                                                                           \
-  /***************/                                                       \
-  /* SymbolTable */                                                       \
-  /***************/                                                       \
-                                                                          \
-  declare_constant(SymbolTable::symbol_table_size)                        \
-                                                                          \
   /***********************************/                                   \
   /* LoaderConstraintTable constants */                                   \
   /***********************************/                                   \
diff --git a/hotspot/src/share/vm/services/memoryService.hpp b/hotspot/src/share/vm/services/memoryService.hpp
index 8ae6994..7ef9094 100644
--- a/hotspot/src/share/vm/services/memoryService.hpp
+++ b/hotspot/src/share/vm/services/memoryService.hpp
@@ -148,6 +148,12 @@
   static void track_code_cache_memory_usage() {
     track_memory_pool_usage(_code_heap_pool);
   }
+  static void track_metaspace_memory_usage() {
+    track_memory_pool_usage(_metaspace_pool);
+  }
+  static void track_compressed_class_memory_usage() {
+    track_memory_pool_usage(_compressed_class_pool);
+  }
   static void track_memory_pool_usage(MemoryPool* pool);
 
   static void gc_begin(bool fullGC, bool recordGCBeginTime,
diff --git a/hotspot/src/share/vm/utilities/globalDefinitions.hpp b/hotspot/src/share/vm/utilities/globalDefinitions.hpp
index 8febe54..06a32dc 100644
--- a/hotspot/src/share/vm/utilities/globalDefinitions.hpp
+++ b/hotspot/src/share/vm/utilities/globalDefinitions.hpp
@@ -326,12 +326,18 @@
 
 const int max_method_code_size = 64*K - 1;  // JVM spec, 2nd ed. section 4.8.1 (p.134)
 
+// Default ProtectionDomainCacheSize values
+
+const int defaultProtectionDomainCacheSize = NOT_LP64(137) LP64_ONLY(2017);
 
 //----------------------------------------------------------------------------------------------------
 // Default and minimum StringTableSize values
 
 const int defaultStringTableSize = NOT_LP64(1009) LP64_ONLY(60013);
-const int minimumStringTableSize=1009;
+const int minimumStringTableSize = 1009;
+
+const int defaultSymbolTableSize = 20011;
+const int minimumSymbolTableSize = 1009;
 
 
 //----------------------------------------------------------------------------------------------------
diff --git a/hotspot/test/TEST.groups b/hotspot/test/TEST.groups
index aa59759..2778ebf 100644
--- a/hotspot/test/TEST.groups
+++ b/hotspot/test/TEST.groups
@@ -65,7 +65,6 @@
   gc/metaspace/CompressedClassSpaceSizeInJmapHeap.java \
   gc/metaspace/TestMetaspacePerfCounters.java \
   runtime/6819213/TestBootNativeLibraryPath.java \
-  runtime/6878713/Test6878713.sh \
   runtime/6925573/SortMethodsTest.java \
   runtime/7107135/Test7107135.sh \
   runtime/7158988/FieldMonitor.java \
@@ -85,7 +84,9 @@
   runtime/NMT/VirtualAllocTestType.java \
   runtime/RedefineObject/TestRedefineObject.java \
   runtime/XCheckJniJsig/XCheckJSig.java \
-  serviceability/attach/AttachWithStalePidFile.java
+  serviceability/attach/AttachWithStalePidFile.java \
+  serviceability/sa/jmap-hprof/JMapHProfLargeHeapTest.java
+
 
 # JRE adds further tests to compact3
 #
diff --git a/hotspot/test/runtime/6888954/vmerrors.sh b/hotspot/test/runtime/6888954/vmerrors.sh
index 3e3121e..ebd9149 100644
--- a/hotspot/test/runtime/6888954/vmerrors.sh
+++ b/hotspot/test/runtime/6888954/vmerrors.sh
@@ -1,3 +1,25 @@
+# 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 6888954
 # @bug 8015884
@@ -63,6 +85,7 @@
     [ $i -lt 10 ] && i2=0$i
 
     "$TESTJAVA/bin/java" $TESTVMOPTS -XX:+IgnoreUnrecognizedVMOptions \
+        -XX:-TransmitErrorReport \
         -XX:ErrorHandlerTest=${i} -version > ${i2}.out 2>&1
 
     # If ErrorHandlerTest is ignored (product build), stop.
diff --git a/hotspot/test/runtime/memory/LargePages/TestLargePagesFlags.java b/hotspot/test/runtime/memory/LargePages/TestLargePagesFlags.java
new file mode 100644
index 0000000..58044c6
--- /dev/null
+++ b/hotspot/test/runtime/memory/LargePages/TestLargePagesFlags.java
@@ -0,0 +1,389 @@
+/*
+ * 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 TestLargePagesFlags
+ * @summary Tests how large pages are choosen depending on the given large pages flag combinations.
+ * @library /testlibrary
+ * @run main TestLargePagesFlags
+ */
+
+import com.oracle.java.testlibrary.OutputAnalyzer;
+import com.oracle.java.testlibrary.Platform;
+import com.oracle.java.testlibrary.ProcessTools;
+import java.util.ArrayList;
+
+public class TestLargePagesFlags {
+
+  public static void main(String [] args) throws Exception {
+    if (!Platform.isLinux()) {
+      System.out.println("Skipping. TestLargePagesFlags has only been implemented for Linux.");
+      return;
+    }
+
+    testUseTransparentHugePages();
+    testUseHugeTLBFS();
+    testUseSHM();
+    testCombinations();
+  }
+
+  public static void testUseTransparentHugePages() throws Exception {
+    if (!canUse(UseTransparentHugePages(true))) {
+      System.out.println("Skipping testUseTransparentHugePages");
+      return;
+    }
+
+    // -XX:-UseLargePages overrides all other flags.
+    new FlagTester()
+      .use(UseLargePages(false),
+           UseTransparentHugePages(true))
+      .expect(
+           UseLargePages(false),
+           UseTransparentHugePages(false),
+           UseHugeTLBFS(false),
+           UseSHM(false));
+
+    // Explicitly turn on UseTransparentHugePages.
+    new FlagTester()
+      .use(UseTransparentHugePages(true))
+      .expect(
+           UseLargePages(true),
+           UseTransparentHugePages(true),
+           UseHugeTLBFS(false),
+           UseSHM(false));
+
+    new FlagTester()
+      .use(UseLargePages(true),
+           UseTransparentHugePages(true))
+      .expect(
+           UseLargePages(true),
+           UseTransparentHugePages(true),
+           UseHugeTLBFS(false),
+           UseSHM(false));
+
+    // Setting a specific large pages flag will turn
+    // off heuristics to choose large pages type.
+    new FlagTester()
+      .use(UseLargePages(true),
+           UseTransparentHugePages(false))
+      .expect(
+           UseLargePages(false),
+           UseTransparentHugePages(false),
+           UseHugeTLBFS(false),
+           UseSHM(false));
+
+    // Don't turn on UseTransparentHugePages
+    // unless the user explicitly asks for them.
+    new FlagTester()
+      .use(UseLargePages(true))
+      .expect(
+           UseTransparentHugePages(false));
+  }
+
+  public static void testUseHugeTLBFS() throws Exception {
+    if (!canUse(UseHugeTLBFS(true))) {
+      System.out.println("Skipping testUseHugeTLBFS");
+      return;
+    }
+
+    // -XX:-UseLargePages overrides all other flags.
+    new FlagTester()
+      .use(UseLargePages(false),
+           UseHugeTLBFS(true))
+      .expect(
+           UseLargePages(false),
+           UseTransparentHugePages(false),
+           UseHugeTLBFS(false),
+           UseSHM(false));
+
+    // Explicitly turn on UseHugeTLBFS.
+    new FlagTester()
+      .use(UseHugeTLBFS(true))
+      .expect(
+           UseLargePages(true),
+           UseTransparentHugePages(false),
+           UseHugeTLBFS(true),
+           UseSHM(false));
+
+    new FlagTester()
+      .use(UseLargePages(true),
+           UseHugeTLBFS(true))
+      .expect(
+           UseLargePages(true),
+           UseTransparentHugePages(false),
+           UseHugeTLBFS(true),
+           UseSHM(false));
+
+    // Setting a specific large pages flag will turn
+    // off heuristics to choose large pages type.
+    new FlagTester()
+      .use(UseLargePages(true),
+           UseHugeTLBFS(false))
+      .expect(
+           UseLargePages(false),
+           UseTransparentHugePages(false),
+           UseHugeTLBFS(false),
+           UseSHM(false));
+
+    // Using UseLargePages will default to UseHugeTLBFS large pages.
+    new FlagTester()
+      .use(UseLargePages(true))
+      .expect(
+           UseLargePages(true),
+           UseTransparentHugePages(false),
+           UseHugeTLBFS(true),
+           UseSHM(false));
+  }
+
+  public static void testUseSHM() throws Exception {
+    if (!canUse(UseSHM(true))) {
+      System.out.println("Skipping testUseSHM");
+      return;
+    }
+
+    // -XX:-UseLargePages overrides all other flags.
+    new FlagTester()
+      .use(UseLargePages(false),
+           UseSHM(true))
+      .expect(
+           UseLargePages(false),
+           UseTransparentHugePages(false),
+           UseHugeTLBFS(false),
+           UseSHM(false));
+
+    // Explicitly turn on UseSHM.
+    new FlagTester()
+      .use(UseSHM(true))
+      .expect(
+           UseLargePages(true),
+           UseTransparentHugePages(false),
+           UseHugeTLBFS(false),
+           UseSHM(true)) ;
+
+    new FlagTester()
+      .use(UseLargePages(true),
+           UseSHM(true))
+      .expect(
+           UseLargePages(true),
+           UseTransparentHugePages(false),
+           UseHugeTLBFS(false),
+           UseSHM(true)) ;
+
+    // Setting a specific large pages flag will turn
+    // off heuristics to choose large pages type.
+    new FlagTester()
+      .use(UseLargePages(true),
+           UseSHM(false))
+      .expect(
+           UseLargePages(false),
+           UseTransparentHugePages(false),
+           UseHugeTLBFS(false),
+           UseSHM(false));
+
+    // Setting UseLargePages can allow the system to choose
+    // UseHugeTLBFS instead of UseSHM, but never UseTransparentHugePages.
+    new FlagTester()
+      .use(UseLargePages(true))
+      .expect(
+           UseLargePages(true),
+           UseTransparentHugePages(false));
+  }
+
+  public static void testCombinations() throws Exception {
+    if (!canUse(UseSHM(true)) || !canUse(UseHugeTLBFS(true))) {
+      System.out.println("Skipping testUseHugeTLBFSAndUseSHMCombination");
+      return;
+    }
+
+    // UseHugeTLBFS takes precedence over SHM.
+
+    new FlagTester()
+      .use(UseLargePages(true),
+           UseHugeTLBFS(true),
+           UseSHM(true))
+      .expect(
+           UseLargePages(true),
+           UseTransparentHugePages(false),
+           UseHugeTLBFS(true),
+           UseSHM(false));
+
+    new FlagTester()
+      .use(UseLargePages(true),
+           UseHugeTLBFS(false),
+           UseSHM(true))
+      .expect(
+           UseLargePages(true),
+           UseTransparentHugePages(false),
+           UseHugeTLBFS(false),
+           UseSHM(true));
+
+    new FlagTester()
+      .use(UseLargePages(true),
+           UseHugeTLBFS(true),
+           UseSHM(false))
+      .expect(
+           UseLargePages(true),
+           UseTransparentHugePages(false),
+           UseHugeTLBFS(true),
+           UseSHM(false));
+
+    new FlagTester()
+      .use(UseLargePages(true),
+           UseHugeTLBFS(false),
+           UseSHM(false))
+      .expect(
+           UseLargePages(false),
+           UseTransparentHugePages(false),
+           UseHugeTLBFS(false),
+           UseSHM(false));
+
+
+    if (!canUse(UseTransparentHugePages(true))) {
+      return;
+    }
+
+    // UseTransparentHugePages takes precedence.
+
+    new FlagTester()
+      .use(UseLargePages(true),
+           UseTransparentHugePages(true),
+           UseHugeTLBFS(true),
+           UseSHM(true))
+      .expect(
+           UseLargePages(true),
+           UseTransparentHugePages(true),
+           UseHugeTLBFS(false),
+           UseSHM(false));
+
+    new FlagTester()
+      .use(UseTransparentHugePages(true),
+           UseHugeTLBFS(true),
+           UseSHM(true))
+      .expect(
+           UseLargePages(true),
+           UseTransparentHugePages(true),
+           UseHugeTLBFS(false),
+           UseSHM(false));
+  }
+
+  private static class FlagTester {
+    private Flag [] useFlags;
+
+    public FlagTester use(Flag... useFlags) {
+      this.useFlags = useFlags;
+      return this;
+    }
+
+    public void expect(Flag... expectedFlags) throws Exception {
+      if (useFlags == null) {
+        throw new IllegalStateException("Must run use() before expect()");
+      }
+
+      OutputAnalyzer output = executeNewJVM(useFlags);
+
+      for (Flag flag : expectedFlags) {
+        System.out.println("Looking for: " + flag.flagString());
+        String strValue = output.firstMatch(".* " + flag.name() +  " .* :?= (\\S+).*", 1);
+
+        if (strValue == null) {
+          throw new RuntimeException("Flag " + flag.name() + " couldn't be found");
+        }
+
+        if (!flag.value().equals(strValue)) {
+          throw new RuntimeException("Wrong value for: " + flag.name()
+                                     + " expected: " + flag.value()
+                                     + " got: " + strValue);
+        }
+      }
+
+      output.shouldHaveExitValue(0);
+    }
+  }
+
+  private static OutputAnalyzer executeNewJVM(Flag... flags) throws Exception {
+    ArrayList<String> args = new ArrayList<>();
+    for (Flag flag : flags) {
+      args.add(flag.flagString());
+    }
+    args.add("-XX:+PrintFlagsFinal");
+    args.add("-version");
+
+    ProcessBuilder pb = ProcessTools.createJavaProcessBuilder(args.toArray(new String[args.size()]));
+    OutputAnalyzer output = new OutputAnalyzer(pb.start());
+
+    return output;
+  }
+
+  private static boolean canUse(Flag flag) {
+    try {
+      new FlagTester().use(flag).expect(flag);
+    } catch (Exception e) {
+      return false;
+    }
+
+    return true;
+  }
+
+  private static Flag UseLargePages(boolean value) {
+    return new BooleanFlag("UseLargePages", value);
+  }
+
+  private static Flag UseTransparentHugePages(boolean value) {
+    return new BooleanFlag("UseTransparentHugePages", value);
+  }
+
+  private static Flag UseHugeTLBFS(boolean value) {
+    return new BooleanFlag("UseHugeTLBFS", value);
+  }
+
+  private static Flag UseSHM(boolean value) {
+    return new BooleanFlag("UseSHM", value);
+  }
+
+  private static class BooleanFlag implements Flag {
+    private String name;
+    private boolean value;
+
+    BooleanFlag(String name, boolean value) {
+      this.name = name;
+      this.value = value;
+    }
+
+    public String flagString() {
+      return "-XX:" + (value ? "+" : "-") + name;
+    }
+
+    public String name() {
+      return name;
+    }
+
+    public String value() {
+      return Boolean.toString(value);
+    }
+  }
+
+  private static interface Flag {
+    public String flagString();
+    public String name();
+    public String value();
+  }
+}
diff --git a/hotspot/test/runtime/memory/ReserveMemory.java b/hotspot/test/runtime/memory/ReserveMemory.java
index 4d234d3..9e37d52 100644
--- a/hotspot/test/runtime/memory/ReserveMemory.java
+++ b/hotspot/test/runtime/memory/ReserveMemory.java
@@ -56,6 +56,7 @@
           "-Xbootclasspath/a:.",
           "-XX:+UnlockDiagnosticVMOptions",
           "-XX:+WhiteBoxAPI",
+          "-XX:-TransmitErrorReport",
           "ReserveMemory",
           "test");
 
diff --git a/hotspot/test/serviceability/sa/jmap-hprof/JMapHProfLargeHeapProc.java b/hotspot/test/serviceability/sa/jmap-hprof/JMapHProfLargeHeapProc.java
new file mode 100644
index 0000000..c3dced2
--- /dev/null
+++ b/hotspot/test/serviceability/sa/jmap-hprof/JMapHProfLargeHeapProc.java
@@ -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.
+ */
+
+import java.lang.management.ManagementFactory;
+import java.lang.management.RuntimeMXBean;
+import java.lang.reflect.Field;
+import java.lang.reflect.Method;
+import java.util.ArrayList;
+import java.util.List;
+
+import sun.management.VMManagement;
+
+public class JMapHProfLargeHeapProc {
+    private static final List<byte[]> heapGarbage = new ArrayList<>();
+
+    public static void main(String[] args) throws Exception {
+
+        buildLargeHeap(args);
+
+        // Print our pid on stdout
+        System.out.println("PID[" + getProcessId() + "]");
+
+        // Wait for input before termination
+        System.in.read();
+    }
+
+    private static void buildLargeHeap(String[] args) {
+        for (long i = 0; i < Integer.parseInt(args[0]); i++) {
+            heapGarbage.add(new byte[1024]);
+        }
+    }
+
+    public static int getProcessId() throws Exception {
+
+        // Get the current process id using a reflection hack
+        RuntimeMXBean runtime = ManagementFactory.getRuntimeMXBean();
+        Field jvm = runtime.getClass().getDeclaredField("jvm");
+
+        jvm.setAccessible(true);
+        VMManagement mgmt = (sun.management.VMManagement) jvm.get(runtime);
+
+        Method pid_method = mgmt.getClass().getDeclaredMethod("getProcessId");
+
+        pid_method.setAccessible(true);
+
+        int pid = (Integer) pid_method.invoke(mgmt);
+
+        return pid;
+    }
+
+}
diff --git a/hotspot/test/serviceability/sa/jmap-hprof/JMapHProfLargeHeapTest.java b/hotspot/test/serviceability/sa/jmap-hprof/JMapHProfLargeHeapTest.java
new file mode 100644
index 0000000..37d7b70
--- /dev/null
+++ b/hotspot/test/serviceability/sa/jmap-hprof/JMapHProfLargeHeapTest.java
@@ -0,0 +1,146 @@
+/*
+ * Copyright (c) 2013, Oracle and/or its affiliates. All rights reserved.
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * This code is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU General Public License version 2 only, as
+ * published by the Free Software Foundation.
+ *
+ * This code is distributed in the hope that it will be useful, but WITHOUT
+ * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
+ * version 2 for more details (a copy is included in the LICENSE file that
+ * accompanied this code).
+ *
+ * You should have received a copy of the GNU General Public License version
+ * 2 along with this work; if not, write to the Free Software Foundation,
+ * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
+ *
+ * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
+ * or visit www.oracle.com if you need additional information or have any
+ * questions.
+ */
+
+import java.io.BufferedReader;
+import java.io.File;
+import java.io.FileNotFoundException;
+import java.io.FileReader;
+import java.io.IOException;
+import java.io.Reader;
+import java.nio.CharBuffer;
+import java.util.Arrays;
+import java.util.Scanner;
+
+import com.oracle.java.testlibrary.Asserts;
+import com.oracle.java.testlibrary.JDKToolFinder;
+import com.oracle.java.testlibrary.JDKToolLauncher;
+import com.oracle.java.testlibrary.OutputAnalyzer;
+import com.oracle.java.testlibrary.Platform;
+import com.oracle.java.testlibrary.ProcessTools;
+
+/*
+ * @test
+ * @bug 6313383
+ * @key regression
+ * @summary Regression test for hprof export issue due to large heaps (>2G)
+ * @library /testlibrary
+ * @compile JMapHProfLargeHeapProc.java
+ * @run main JMapHProfLargeHeapTest
+ */
+
+public class JMapHProfLargeHeapTest {
+    private static final String HEAP_DUMP_FILE_NAME = "heap.hprof";
+    private static final String HPROF_HEADER_1_0_1 = "JAVA PROFILE 1.0.1";
+    private static final String HPROF_HEADER_1_0_2 = "JAVA PROFILE 1.0.2";
+    private static final long M = 1024L;
+    private static final long G = 1024L * M;
+
+    public static void main(String[] args) throws Exception {
+        // If we are on MacOSX, test if JMap tool is signed, otherwise return
+        // since test will fail with privilege error.
+        if (Platform.isOSX()) {
+            String jmapToolPath = JDKToolFinder.getCurrentJDKTool("jmap");
+            ProcessBuilder codesignProcessBuilder = new ProcessBuilder(
+                    "codesign", "-v", jmapToolPath);
+            Process codesignProcess = codesignProcessBuilder.start();
+            OutputAnalyzer analyser = new OutputAnalyzer(codesignProcess);
+            try {
+                analyser.shouldNotContain("code object is not signed at all");
+                System.out.println("Signed jmap found at: " + jmapToolPath);
+            } catch (Exception e) {
+                // Abort since we can't know if the test will work
+                System.out
+                        .println("Test aborted since we are on MacOSX and the jmap tool is not signed.");
+                return;
+            }
+        }
+
+        // Small heap 22 megabytes, should create 1.0.1 file format
+        testHProfFileFormat("-Xmx1g", 22 * M, HPROF_HEADER_1_0_1);
+
+        /**
+         * This test was deliberately commented out since the test system lacks
+         * support to handle the requirements for this kind of heap size in a
+         * good way. If or when it becomes possible to run this kind of tests in
+         * the test environment the test should be enabled again.
+         * */
+        // Large heap 2,2 gigabytes, should create 1.0.2 file format
+        // testHProfFileFormat("-Xmx4g", 2 * G + 2 * M, HPROF_HEADER_1_0_2);
+    }
+
+    private static void testHProfFileFormat(String vmArgs, long heapSize,
+            String expectedFormat) throws Exception, IOException,
+            InterruptedException, FileNotFoundException {
+        ProcessBuilder procBuilder = ProcessTools.createJavaProcessBuilder(
+                vmArgs, "JMapHProfLargeHeapProc", String.valueOf(heapSize));
+        procBuilder.redirectError(ProcessBuilder.Redirect.INHERIT);
+        Process largeHeapProc = procBuilder.start();
+
+        try (Scanner largeHeapScanner = new Scanner(
+                largeHeapProc.getInputStream());) {
+            String pidstring = null;
+            while ((pidstring = largeHeapScanner.findInLine("PID\\[[0-9].*\\]")) == null) {
+                Thread.sleep(500);
+            }
+            int pid = Integer.parseInt(pidstring.substring(4,
+                    pidstring.length() - 1));
+            System.out.println("Extracted pid: " + pid);
+
+            JDKToolLauncher jMapLauncher = JDKToolLauncher
+                    .create("jmap", false);
+            jMapLauncher.addToolArg("-dump:format=b,file=" + pid + "-"
+                    + HEAP_DUMP_FILE_NAME);
+            jMapLauncher.addToolArg(String.valueOf(pid));
+
+            ProcessBuilder jMapProcessBuilder = new ProcessBuilder(
+                    jMapLauncher.getCommand());
+            System.out.println("jmap command: "
+                    + Arrays.toString(jMapLauncher.getCommand()));
+
+            Process jMapProcess = jMapProcessBuilder.start();
+            OutputAnalyzer analyzer = new OutputAnalyzer(jMapProcess);
+            analyzer.shouldHaveExitValue(0);
+            analyzer.shouldContain(pid + "-" + HEAP_DUMP_FILE_NAME);
+            analyzer.shouldContain("Heap dump file created");
+
+            largeHeapProc.getOutputStream().write('\n');
+
+            File dumpFile = new File(pid + "-" + HEAP_DUMP_FILE_NAME);
+            Asserts.assertTrue(dumpFile.exists(), "Heap dump file not found.");
+
+            try (Reader reader = new BufferedReader(new FileReader(dumpFile))) {
+                CharBuffer buf = CharBuffer.allocate(expectedFormat.length());
+                reader.read(buf);
+                buf.clear();
+                Asserts.assertEQ(buf.toString(), expectedFormat,
+                        "Wrong file format. Expected '" + expectedFormat
+                                + "', but found '" + buf.toString() + "'");
+            }
+
+            System.out.println("Success!");
+
+        } finally {
+            largeHeapProc.destroyForcibly();
+        }
+    }
+}
diff --git a/hotspot/test/testlibrary/com/oracle/java/testlibrary/JDKToolLauncher.java b/hotspot/test/testlibrary/com/oracle/java/testlibrary/JDKToolLauncher.java
index 0f0c0a4..29df4a7 100644
--- a/hotspot/test/testlibrary/com/oracle/java/testlibrary/JDKToolLauncher.java
+++ b/hotspot/test/testlibrary/com/oracle/java/testlibrary/JDKToolLauncher.java
@@ -23,20 +23,17 @@
 
 package com.oracle.java.testlibrary;
 
-import java.util.List;
 import java.util.ArrayList;
 import java.util.Arrays;
-
-import com.oracle.java.testlibrary.JDKToolFinder;
-import com.oracle.java.testlibrary.ProcessTools;
+import java.util.List;
 
 /**
  * A utility for constructing command lines for starting JDK tool processes.
  *
  * The JDKToolLauncher can in particular be combined with a
- * java.lang.ProcessBuilder to easily run a JDK tool. For example, the
- * following code run {@code jmap -heap} against a process with GC logging
- * turned on for the {@code jmap} process:
+ * java.lang.ProcessBuilder to easily run a JDK tool. For example, the following
+ * code run {@code jmap -heap} against a process with GC logging turned on for
+ * the {@code jmap} process:
  *
  * <pre>
  * {@code
@@ -55,19 +52,39 @@
     private final List<String> vmArgs = new ArrayList<String>();
     private final List<String> toolArgs = new ArrayList<String>();
 
-    private JDKToolLauncher(String tool) {
-        executable = JDKToolFinder.getJDKTool(tool);
+    private JDKToolLauncher(String tool, boolean useCompilerJDK) {
+        if (useCompilerJDK) {
+            executable = JDKToolFinder.getJDKTool(tool);
+        } else {
+            executable = JDKToolFinder.getCurrentJDKTool(tool);
+        }
         vmArgs.addAll(Arrays.asList(ProcessTools.getPlatformSpecificVMArgs()));
     }
 
     /**
+     * Creates a new JDKToolLauncher for the specified tool. Using tools path
+     * from the compiler JDK.
+     *
+     * @param tool
+     *            The name of the tool
+     * @return A new JDKToolLauncher
+     */
+    public static JDKToolLauncher create(String tool) {
+        return new JDKToolLauncher(tool, true);
+    }
+
+    /**
      * Creates a new JDKToolLauncher for the specified tool.
      *
-     * @param tool The name of the tool
+     * @param tool
+     *            The name of the tool
+     * @param useCompilerPath
+     *            If true use the compiler JDK path, otherwise use the tested
+     *            JDK path.
      * @return A new JDKToolLauncher
      */
-    public static JDKToolLauncher create(String tool) {
-        return new JDKToolLauncher(tool);
+    public static JDKToolLauncher create(String tool, boolean useCompilerJDK) {
+        return new JDKToolLauncher(tool, useCompilerJDK);
     }
 
     /**
@@ -80,7 +97,8 @@
      * automatically added.
      *
      *
-     * @param arg The argument to VM running the tool
+     * @param arg
+     *            The argument to VM running the tool
      * @return The JDKToolLauncher instance
      */
     public JDKToolLauncher addVMArg(String arg) {
@@ -91,7 +109,8 @@
     /**
      * Adds an argument to the tool.
      *
-     * @param arg The argument to the tool
+     * @param arg
+     *            The argument to the tool
      * @return The JDKToolLauncher instance
      */
     public JDKToolLauncher addToolArg(String arg) {
diff --git a/jaxp/.hgtags b/jaxp/.hgtags
index ded6be1..fb2959b 100644
--- a/jaxp/.hgtags
+++ b/jaxp/.hgtags
@@ -232,3 +232,4 @@
 8ade3eed63da87067a7137c111f684a821e9e531 jdk8-b108
 02bfab2aa93899e0f02584f1e85537485a196553 jdk8-b109
 4c84c5b447b09aff27f3b72667ab3a5401e85968 jdk8-b110
+17ee0d3e97fdb412e48f14d87f504946a708f846 jdk8-b111
diff --git a/jaxp/makefiles/BuildJaxp.gmk b/jaxp/makefiles/BuildJaxp.gmk
index 7490464..7950b0c 100644
--- a/jaxp/makefiles/BuildJaxp.gmk
+++ b/jaxp/makefiles/BuildJaxp.gmk
@@ -30,25 +30,25 @@
 include MakeBase.gmk
 include JavaCompilation.gmk
 
-DISABLE_JAXP_WARNINGS:=-Xlint:all,-deprecation,-unchecked,-rawtypes,-cast,-serial,-dep-ann,-static,-fallthrough
+DISABLE_JAXP_WARNINGS := -Xlint:all,-deprecation,-unchecked,-rawtypes,-cast,-serial,-dep-ann,-static,-fallthrough
 
 # The generate new bytecode uses the new compiler for to generate bytecode
 # for the new jdk that is being built. The code compiled by this setup
 # cannot necessarily be run with the boot jdk.
-$(eval $(call SetupJavaCompiler,GENERATE_NEWBYTECODE_DEBUG,\
-     JVM:=$(JAVA),\
-     JAVAC:=$(NEW_JAVAC),\
-     FLAGS:=-XDignore.symbol.file=true $(DISABLE_JAXP_WARNINGS) -g,\
-     SERVER_DIR:=$(SJAVAC_SERVER_DIR),\
-     SERVER_JVM:=$(SJAVAC_SERVER_JAVA)))
+$(eval $(call SetupJavaCompiler,GENERATE_NEWBYTECODE_DEBUG, \
+    JVM := $(JAVA), \
+    JAVAC := $(NEW_JAVAC), \
+    FLAGS := -XDignore.symbol.file=true $(DISABLE_JAXP_WARNINGS) -g, \
+    SERVER_DIR := $(SJAVAC_SERVER_DIR), \
+    SERVER_JVM := $(SJAVAC_SERVER_JAVA)))
 
-$(eval $(call SetupJavaCompilation,BUILD_JAXP,\
-		SETUP:=GENERATE_NEWBYTECODE_DEBUG,\
-		SRC:=$(JAXP_TOPDIR)/src,\
-		BIN:=$(JAXP_OUTPUTDIR)/classes,\
-		SRCZIP:=$(JAXP_OUTPUTDIR)/dist/lib/src.zip))
+$(eval $(call SetupJavaCompilation,BUILD_JAXP, \
+    SETUP := GENERATE_NEWBYTECODE_DEBUG, \
+    SRC := $(JAXP_TOPDIR)/src, \
+    BIN := $(JAXP_OUTPUTDIR)/classes, \
+    SRCZIP := $(JAXP_OUTPUTDIR)/dist/lib/src.zip))
 
-# Imitate the property cleaning mechanism in the old build. This will likely be replaced 
+# Imitate the property cleaning mechanism in the old build. This will likely be replaced
 # by the unified functionality in JavaCompilation.gmk, but keep it the same as old build
 # for now, even though it actually breaks properties containing # in the value.
 # Using nawk to avoid solaris sed.
@@ -59,13 +59,13 @@
 	$(MV) $@.tmp $@
 
 SRC_PROP_FILES := $(shell $(FIND) $(JAXP_TOPDIR)/src -name "*.properties")
-TARGET_PROP_FILES := $(patsubst $(JAXP_TOPDIR)/src/%,$(JAXP_OUTPUTDIR)/classes/%,$(SRC_PROP_FILES))
+TARGET_PROP_FILES := $(patsubst $(JAXP_TOPDIR)/src/%, $(JAXP_OUTPUTDIR)/classes/%, $(SRC_PROP_FILES))
 
-$(eval $(call SetupArchive,ARCHIVE_JAXP,$(BUILD_JAXP) $(TARGET_PROP_FILES),\
-		SRCS:=$(JAXP_OUTPUTDIR)/classes,\
-		SUFFIXES:=.class .properties,\
-		JAR:=$(JAXP_OUTPUTDIR)/dist/lib/classes.jar))
+$(eval $(call SetupArchive,ARCHIVE_JAXP, $(BUILD_JAXP) $(TARGET_PROP_FILES), \
+    SRCS := $(JAXP_OUTPUTDIR)/classes, \
+    SUFFIXES := .class .properties, \
+    JAR := $(JAXP_OUTPUTDIR)/dist/lib/classes.jar))
 
 all: $(JAXP_OUTPUTDIR)/dist/lib/classes.jar $(JAXP_OUTPUTDIR)/dist/lib/src.zip
 
-.PHONY: default all 
+.PHONY: default all
diff --git a/jaxp/makefiles/Makefile b/jaxp/makefiles/Makefile
index 9539fe0..c7d0dd0 100644
--- a/jaxp/makefiles/Makefile
+++ b/jaxp/makefiles/Makefile
@@ -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 ===================================================)
diff --git a/jaxp/src/com/sun/org/apache/xalan/internal/res/XSLTErrorResources_de.java b/jaxp/src/com/sun/org/apache/xalan/internal/res/XSLTErrorResources_de.java
index d528a26..40a5c71 100644
--- a/jaxp/src/com/sun/org/apache/xalan/internal/res/XSLTErrorResources_de.java
+++ b/jaxp/src/com/sun/org/apache/xalan/internal/res/XSLTErrorResources_de.java
@@ -3,7 +3,7 @@
  * DO NOT REMOVE OR ALTER!
  */
 /*
- * Copyright 1999-2004 The Apache Software Foundation.
+ * Copyright 1999-2005 The Apache Software Foundation.
  *
  * Licensed under the Apache License, Version 2.0 (the "License");
  * you may not use this file except in compliance with the License.
@@ -18,7 +18,7 @@
  * limitations under the License.
  */
 /*
- * $Id: XSLTErrorResources_de.java,v 1.2.4.1 2005/09/13 10:08:18 pvedula Exp $
+ * $Id: XSLTErrorResources_de.java /st_wptg_1.8.0.0.0jdk/2 2013/09/16 04:56:10 gmolloy Exp $
  */
 package com.sun.org.apache.xalan.internal.res;
 
@@ -1207,7 +1207,7 @@
       "Funktionsname darf nicht null sein."},
 
     { ER_XPATH_RESOLVER_NEGATIVE_ARITY,
-      "Anzahl von Argumenten darf nicht negativ sein."},
+      "Argumentanzahl darf nicht negativ sein."},
   // Warnings...
 
     { WG_FOUND_CURLYBRACE,
@@ -1359,7 +1359,7 @@
   {  "optionQ", "   [-Q  (Stiller Modus)]"},
   {  "optionLF", "   [-LF (Nur Zeilenvorsch\u00FCbe bei Ausgabe verwenden {Standard ist CR/LF})]"},
   {  "optionCR", "   [-CR (Nur Zeilenschaltungen bei Ausgabe verwenden {Standard ist CR/LF})]"},
-  { "optionESCAPE", "   [-ESCAPE (Escape-Zeichen {Standard ist <>&\"\'\r\n}]"},
+  { "optionESCAPE", "   [-ESCAPE (Escapezeichen {Standard ist <>&\"'\r\n}]"},
   { "optionINDENT", "   [-INDENT (Steuern, wie viele Leerzeichen der Einzug enthalten soll {Standard ist 0})]"},
   { "optionTT", "   [-TT (Vorlagen verfolgen, wenn diese aufgerufen werden.)]"},
   { "optionTG", "   [-TG (Jedes Generierungsereignis verfolgen.)]"},
diff --git a/jaxp/src/com/sun/org/apache/xalan/internal/res/XSLTErrorResources_es.java b/jaxp/src/com/sun/org/apache/xalan/internal/res/XSLTErrorResources_es.java
index 68fda6d..9937fe6 100644
--- a/jaxp/src/com/sun/org/apache/xalan/internal/res/XSLTErrorResources_es.java
+++ b/jaxp/src/com/sun/org/apache/xalan/internal/res/XSLTErrorResources_es.java
@@ -3,7 +3,7 @@
  * DO NOT REMOVE OR ALTER!
  */
 /*
- * Copyright 1999-2004 The Apache Software Foundation.
+ * Copyright 1999-2005 The Apache Software Foundation.
  *
  * Licensed under the Apache License, Version 2.0 (the "License");
  * you may not use this file except in compliance with the License.
@@ -18,7 +18,7 @@
  * limitations under the License.
  */
 /*
- * $Id: XSLTErrorResources_es.java,v 1.2.4.1 2005/09/13 10:16:43 pvedula Exp $
+ * $Id: XSLTErrorResources_es.java /st_wptg_1.8.0.0.0jdk/2 2013/09/16 09:06:34 gmolloy Exp $
  */
 package com.sun.org.apache.xalan.internal.res;
 
@@ -1359,7 +1359,7 @@
   {  "optionQ", "   [-Q  (Modo Silencioso)]"},
   {  "optionLF", "   [-LF (Utilizar saltos de l\u00EDnea s\u00F3lo en la salida {el valor por defecto es CR/LF})]"},
   {  "optionCR", "   [-CR (Utilizar retornos de carro s\u00F3lo en la salida {el valor por defecto es CR/LF})]"},
-  { "optionESCAPE", "   [-ESCAPE (Caracteres para introducir escape {el valor por defecto es <>&\"\'\\r\\n}]"},
+  { "optionESCAPE", "   [-ESCAPE (Caracteres para introducir escape {el valor por defecto es <>&\"'\\r\\n}]"},
   { "optionINDENT", "   [-INDENT (Control del n\u00FAmero de espacios para el sangrado {el valor por defecto es 0})]"},
   { "optionTT", "   [-TT (Rastrear las plantillas como si se estuviesen llamando.)]"},
   { "optionTG", "   [-TG (Rastrear cada evento de generaci\u00F3n.)]"},
diff --git a/jaxp/src/com/sun/org/apache/xalan/internal/res/XSLTErrorResources_fr.java b/jaxp/src/com/sun/org/apache/xalan/internal/res/XSLTErrorResources_fr.java
index eb37309..9dc7f69 100644
--- a/jaxp/src/com/sun/org/apache/xalan/internal/res/XSLTErrorResources_fr.java
+++ b/jaxp/src/com/sun/org/apache/xalan/internal/res/XSLTErrorResources_fr.java
@@ -3,7 +3,7 @@
  * DO NOT REMOVE OR ALTER!
  */
 /*
- * Copyright 1999-2004 The Apache Software Foundation.
+ * Copyright 1999-2005 The Apache Software Foundation.
  *
  * Licensed under the Apache License, Version 2.0 (the "License");
  * you may not use this file except in compliance with the License.
@@ -18,7 +18,7 @@
  * limitations under the License.
  */
 /*
- * $Id: XSLTErrorResources_fr.java,v 1.2.4.1 2005/09/13 10:20:30 pvedula Exp $
+ * $Id: XSLTErrorResources_fr.java /st_wptg_1.8.0.0.0jdk/2 2013/09/16 07:05:15 gmolloy Exp $
  */
 package com.sun.org.apache.xalan.internal.res;
 
@@ -925,7 +925,7 @@
         "Gestionnaire de contenu NULL"},
 
     { ER_NULL_ERROR_HANDLER,
-        "Gestionnaire d'erreur NULL"},
+        "Gestionnaire d'erreurs NULL"},
 
     { ER_CANNOT_CALL_PARSE,
         "impossible d'appeler l'analyse si le gestionnaire de contenu n'est pas d\u00E9fini"},
@@ -1359,7 +1359,7 @@
   {  "optionQ", "   [-Q  (Mode silencieux)]"},
   {  "optionLF", "   [-LF (Utiliser les retours \u00E0 la ligne uniquement en sortie {valeur par d\u00E9faut : CR/LF})]"},
   {  "optionCR", "   [-CR (Utiliser les retours chariot uniquement en sortie {valeur par d\u00E9faut : CR/LF})]"},
-  { "optionESCAPE", "   [-ESCAPE (Avec caract\u00E8res d'espacement {valeur par d\u00E9faut : <>&\"\'\\r\\n}]"},
+  { "optionESCAPE", "   [-ESCAPE (Avec caract\u00E8res d'espacement {valeur par d\u00E9faut : <>&\"'\\r\\n}]"},
   { "optionINDENT", "   [-INDENT (Contr\u00F4ler le nombre d'espaces \u00E0 mettre en retrait {valeur par d\u00E9faut : 0})]"},
   { "optionTT", "   [-TT (G\u00E9n\u00E9rer une trace des mod\u00E8les pendant qu'ils sont appel\u00E9s.)]"},
   { "optionTG", "   [-TG (G\u00E9n\u00E9rer une trace de chaque \u00E9v\u00E9nement de g\u00E9n\u00E9ration.)]"},
diff --git a/jaxp/src/com/sun/org/apache/xalan/internal/res/XSLTErrorResources_it.java b/jaxp/src/com/sun/org/apache/xalan/internal/res/XSLTErrorResources_it.java
index ff33502..2d7351c 100644
--- a/jaxp/src/com/sun/org/apache/xalan/internal/res/XSLTErrorResources_it.java
+++ b/jaxp/src/com/sun/org/apache/xalan/internal/res/XSLTErrorResources_it.java
@@ -3,7 +3,7 @@
  * DO NOT REMOVE OR ALTER!
  */
 /*
- * Copyright 1999-2004 The Apache Software Foundation.
+ * Copyright 1999-2005 The Apache Software Foundation.
  *
  * Licensed under the Apache License, Version 2.0 (the "License");
  * you may not use this file except in compliance with the License.
@@ -18,7 +18,7 @@
  * limitations under the License.
  */
 /*
- * $Id: XSLTErrorResources_it.java,v 1.2.4.1 2005/09/13 10:23:57 pvedula Exp $
+ * $Id: XSLTErrorResources_it.java /st_wptg_1.8.0.0.0jdk/2 2013/09/16 07:02:00 gmolloy Exp $
  */
 package com.sun.org.apache.xalan.internal.res;
 
@@ -1359,7 +1359,7 @@
   {  "optionQ", "   [-Q  (modalit\u00E0 silenziosa)]"},
   {  "optionLF", "   [-LF (usa avanzamenti riga solo nell'output {il valore predefinito \u00E8 CR/LF})]"},
   {  "optionCR", "   [-CR (usa ritorni a capo solo nell'output {il valore predefinito \u00E8 CR/LF})]"},
-  { "optionESCAPE", "   [-ESCAPE (caratteri da sottoporre a escape {il valore predefinito \u00E8 <>&\"\'\\r\\n}]"},
+  { "optionESCAPE", "   [-ESCAPE (caratteri da sottoporre a escape {il valore predefinito \u00E8 <>&\"'\\r\\n}]"},
   { "optionINDENT", "   [-INDENT (determina il numero di spazi da indentare {il valore predefinito \u00E8 0})]"},
   { "optionTT", "   [-TT (tiene traccia dei modelli mentre vengono richiamati.)]"},
   { "optionTG", "   [-TG (tiene traccia di ogni evento di generazione.)]"},
diff --git a/jaxp/src/com/sun/org/apache/xalan/internal/res/XSLTErrorResources_ja.java b/jaxp/src/com/sun/org/apache/xalan/internal/res/XSLTErrorResources_ja.java
index ed1a024..e5c2567 100644
--- a/jaxp/src/com/sun/org/apache/xalan/internal/res/XSLTErrorResources_ja.java
+++ b/jaxp/src/com/sun/org/apache/xalan/internal/res/XSLTErrorResources_ja.java
@@ -3,7 +3,7 @@
  * DO NOT REMOVE OR ALTER!
  */
 /*
- * Copyright 1999-2004 The Apache Software Foundation.
+ * Copyright 1999-2005 The Apache Software Foundation.
  *
  * Licensed under the Apache License, Version 2.0 (the "License");
  * you may not use this file except in compliance with the License.
@@ -18,7 +18,7 @@
  * limitations under the License.
  */
 /*
- * $Id: XSLTErrorResources_ja.java,v 1.2.4.1 2005/09/13 10:34:30 pvedula Exp $
+ * $Id: XSLTErrorResources_ja.java /st_wptg_1.8.0.0.0jdk/2 2013/09/12 17:39:58 gmolloy Exp $
  */
 package com.sun.org.apache.xalan.internal.res;
 
@@ -1359,7 +1359,7 @@
   {  "optionQ", "   [-Q  (\u6291\u5236\u30E2\u30FC\u30C9)]"},
   {  "optionLF", "   [-LF (\u51FA\u529B\u3067\u306E\u307F\u6539\u884C\u3092\u4F7F\u7528{\u30C7\u30D5\u30A9\u30EB\u30C8\u306FCR/LF})]"},
   {  "optionCR", "   [-CR (\u51FA\u529B\u3067\u306E\u307F\u6539\u884C\u3092\u4F7F\u7528{\u30C7\u30D5\u30A9\u30EB\u30C8\u306FCR/LF})]"},
-  { "optionESCAPE", "   [-ESCAPE (\u30A8\u30B9\u30B1\u30FC\u30D7\u3059\u308B\u6587\u5B57{\u30C7\u30D5\u30A9\u30EB\u30C8\u306F<>&\"\'\\r\\n}]"},
+  { "optionESCAPE", "   [-ESCAPE (\u30A8\u30B9\u30B1\u30FC\u30D7\u3059\u308B\u6587\u5B57{\u30C7\u30D5\u30A9\u30EB\u30C8\u306F<>&\"'\\r\\n}]"},
   { "optionINDENT", "   [-INDENT (\u30A4\u30F3\u30C7\u30F3\u30C8\u3059\u308B\u7A7A\u767D\u6587\u5B57\u6570\u3092\u5236\u5FA1{\u30C7\u30D5\u30A9\u30EB\u30C8\u306F0})]"},
   { "optionTT", "   [-TT (\u30C6\u30F3\u30D7\u30EC\u30FC\u30C8\u304C\u547C\u3073\u51FA\u3055\u308C\u305F\u3068\u304D\u306B\u30C8\u30EC\u30FC\u30B9\u3059\u308B\u3002)]"},
   { "optionTG", "   [-TG (\u5404\u751F\u6210\u30A4\u30D9\u30F3\u30C8\u3092\u30C8\u30EC\u30FC\u30B9\u3059\u308B\u3002)]"},
diff --git a/jaxp/src/com/sun/org/apache/xalan/internal/res/XSLTErrorResources_ko.java b/jaxp/src/com/sun/org/apache/xalan/internal/res/XSLTErrorResources_ko.java
index 9a57758..36203fb 100644
--- a/jaxp/src/com/sun/org/apache/xalan/internal/res/XSLTErrorResources_ko.java
+++ b/jaxp/src/com/sun/org/apache/xalan/internal/res/XSLTErrorResources_ko.java
@@ -3,7 +3,7 @@
  * DO NOT REMOVE OR ALTER!
  */
 /*
- * Copyright 1999-2004 The Apache Software Foundation.
+ * Copyright 1999-2005 The Apache Software Foundation.
  *
  * Licensed under the Apache License, Version 2.0 (the "License");
  * you may not use this file except in compliance with the License.
@@ -18,7 +18,7 @@
  * limitations under the License.
  */
 /*
- * $Id: XSLTErrorResources_ko.java,v 1.2.4.1 2005/09/13 11:03:57 pvedula Exp $
+ * $Id: XSLTErrorResources_ko.java /st_wptg_1.8.0.0.0jdk/2 2013/09/16 02:31:33 gmolloy Exp $
  */
 package com.sun.org.apache.xalan.internal.res;
 
@@ -1359,7 +1359,7 @@
   {  "optionQ", "   [-Q(\uC790\uB3D9 \uBAA8\uB4DC)]"},
   {  "optionLF", "   [-LF(\uCD9C\uB825\uC5D0\uB9CC \uC904 \uBC14\uAFC8 \uC0AC\uC6A9 {\uAE30\uBCF8\uAC12: CR/LF})]"},
   {  "optionCR", "   [-CR(\uCD9C\uB825\uC5D0\uB9CC \uCE90\uB9AC\uC9C0 \uB9AC\uD134 \uC0AC\uC6A9 {\uAE30\uBCF8\uAC12: CR/LF})]"},
-  { "optionESCAPE", "   [-ESCAPE(\uC774\uC2A4\uCF00\uC774\uD504 \uBB38\uC790 {\uAE30\uBCF8\uAC12: <>&\"\'\\r\\n}]"},
+  { "optionESCAPE", "   [-ESCAPE(\uC774\uC2A4\uCF00\uC774\uD504 \uBB38\uC790 {\uAE30\uBCF8\uAC12: <>&\"'\\r\\n}]"},
   { "optionINDENT", "   [-INDENT(\uB4E4\uC5EC \uC4F8 \uACF5\uBC31 \uC218 \uC81C\uC5B4 {\uAE30\uBCF8\uAC12: 0})]"},
   { "optionTT", "   [-TT(\uD15C\uD50C\uB9AC\uD2B8 \uD638\uCD9C \uC2DC \uCD94\uC801)]"},
   { "optionTG", "   [-TG(\uAC01 \uC0DD\uC131 \uC774\uBCA4\uD2B8 \uCD94\uC801)]"},
diff --git a/jaxp/src/com/sun/org/apache/xalan/internal/res/XSLTErrorResources_pt_BR.java b/jaxp/src/com/sun/org/apache/xalan/internal/res/XSLTErrorResources_pt_BR.java
index 62341a6..ae6f6c7 100644
--- a/jaxp/src/com/sun/org/apache/xalan/internal/res/XSLTErrorResources_pt_BR.java
+++ b/jaxp/src/com/sun/org/apache/xalan/internal/res/XSLTErrorResources_pt_BR.java
@@ -3,7 +3,7 @@
  * DO NOT REMOVE OR ALTER!
  */
 /*
- * Copyright 1999-2004 The Apache Software Foundation.
+ * Copyright 1999-2005 The Apache Software Foundation.
  *
  * Licensed under the Apache License, Version 2.0 (the "License");
  * you may not use this file except in compliance with the License.
@@ -17,9 +17,8 @@
  * See the License for the specific language governing permissions and
  * limitations under the License.
  */
-
 /*
- * $Id: XSLTErrorResources_pt_BR.java 3023 2011-03-01 00:53:34Z joehw $
+ * $Id: XSLTErrorResources_pt_BR.java /st_wptg_1.8.0.0.0jdk/2 2013/09/11 12:46:53 gmolloy Exp $
  */
 package com.sun.org.apache.xalan.internal.res;
 
@@ -625,7 +624,7 @@
       "Falha ao processar a folha de estilos!"},
 
     { ER_COULDNT_PARSE_DOC,
-     "N\u00E3o foi poss\u00EDvel fazer parse do documento {0}!"},
+     "N\u00E3o foi poss\u00EDvel fazer parsing do documento {0}!"},
 
     { ER_COULDNT_FIND_FRAGMENT,
      "N\u00E3o foi poss\u00EDvel localizar o fragmento: {0}"},
@@ -929,7 +928,7 @@
         "Handler de erro nulo"},
 
     { ER_CANNOT_CALL_PARSE,
-        "o parse n\u00E3o poder\u00E1 ser chamado se o ContentHandler n\u00E3o tiver sido definido"},
+        "o parsing n\u00E3o poder\u00E1 ser chamado se o ContentHandler n\u00E3o tiver sido definido"},
 
     { ER_NO_PARENT_FOR_FILTER,
         "Nenhum pai para o filtro"},
@@ -963,7 +962,7 @@
   //in locale specific files like XSLTErrorResources_de.java, XSLTErrorResources_fr.java etc.
   //NOTE: Not only the key name but message has also been changed.
     { ER_VALUE_SHOULD_BE_NUMBER,
-        "O valor para {0} deve conter um n\u00FAmero pass\u00EDvel de parse"},
+        "O valor para {0} deve conter um n\u00FAmero pass\u00EDvel de parsing"},
 
     { ER_VALUE_SHOULD_EQUAL,
         "O valor para {0} deve ser igual a sim ou n\u00E3o"},
@@ -1248,7 +1247,7 @@
       "Conflitos de especificidade encontrados: {0} Ser\u00E1 usado o \u00FAltimo encontrado na folha de estilos."},
 
     { WG_PARSING_AND_PREPARING,
-      "========= Fazendo parse e preparando {0} =========="},
+      "========= Fazendo parsing e preparando {0} =========="},
 
     { WG_ATTR_TEMPLATE,
      "Modelo do Atributo, {0}"},
@@ -1360,7 +1359,7 @@
   {  "optionQ", "   [-Q  (Modo Silencioso)]"},
   {  "optionLF", "   [-LF (Usar alimenta\u00E7\u00F5es de linha somente na sa\u00EDda {o default \u00E9 CR/LF})]"},
   {  "optionCR", "   [-CR (Use retornos de carro somente na sa\u00EDda {o default \u00E9 CR/LF})]"},
-  { "optionESCAPE", "   [-ESCAPE (Quais caracteres devem ser identificados como escape {o default \u00E9 <>&\"\'\\r\\n}]"},
+  { "optionESCAPE", "   [-ESCAPE (Quais caracteres devem ser identificados como escape {o default \u00E9 <>&\"'\\r\\n}]"},
   { "optionINDENT", "   [-INDENT (Controla quantos espa\u00E7os devem ser recuados {o default \u00E9 0})]"},
   { "optionTT", "   [-TT (Rastreia os modelos \u00E0 medida que s\u00E3o chamados.)]"},
   { "optionTG", "   [-TG (Rastreia cada evento de gera\u00E7\u00E3o.)]"},
@@ -1396,7 +1395,7 @@
   {   "optionXO",  "   [-XO [transletName] (atribui o nome ao translet gerado)]"},
   {  "optionXD", "   [-XD destinationDirectory (especificar um diret\u00F3rio de destino para translet)]"},
   {  "optionXJ",  "   [-XJ jarfile (empacotar classes do translet em um arquivo jar com o nome <jarfile>)]"},
-  {   "optionXP",  "   [-XP package (especifica um prefixo de nome do pacote para todas as classes translet geradas)]"},
+  {   "optionXP",  "   [-XP pacote (especifica um prefixo de nome do pacote para todas as classes translet geradas)]"},
 
   //AddITIONAL  STRINGS that need L10n
   // Note to translators:  The following message describes usage of a particular
@@ -1449,5 +1448,4 @@
   public static final String QUERY_HEADER = "PATTERN ";
 
 
-
-}
+    }
diff --git a/jaxp/src/com/sun/org/apache/xalan/internal/res/XSLTErrorResources_sv.java b/jaxp/src/com/sun/org/apache/xalan/internal/res/XSLTErrorResources_sv.java
index ee85426..999092d 100644
--- a/jaxp/src/com/sun/org/apache/xalan/internal/res/XSLTErrorResources_sv.java
+++ b/jaxp/src/com/sun/org/apache/xalan/internal/res/XSLTErrorResources_sv.java
@@ -3,7 +3,7 @@
  * DO NOT REMOVE OR ALTER!
  */
 /*
- * Copyright 1999-2004 The Apache Software Foundation.
+ * Copyright 1999-2005 The Apache Software Foundation.
  *
  * Licensed under the Apache License, Version 2.0 (the "License");
  * you may not use this file except in compliance with the License.
@@ -18,7 +18,7 @@
  * limitations under the License.
  */
 /*
- * $Id: XSLTErrorResources_sv.java,v 1.2.4.1 2005/09/13 11:12:11 pvedula Exp $
+ * $Id: XSLTErrorResources_sv.java /st_wptg_1.8.0.0.0jdk/2 2013/09/16 06:50:58 gmolloy Exp $
  */
 package com.sun.org.apache.xalan.internal.res;
 
@@ -495,7 +495,7 @@
      "{0} m\u00E5ste ha ett namnattribut."},
 
     {ER_TEMPLATE_NOT_FOUND,
-     "Kunde inte hitta mallen med namnet: {0}"},
+     "Hittade inte mallen med namnet: {0}"},
 
     {ER_CANT_RESOLVE_NAME_AVT,
       "Kunde inte matcha namn-AVT i xsl:call-template."},
@@ -510,10 +510,10 @@
       "Felaktigt v\u00E4rde i niv\u00E5attribut: {0}"},
 
     {ER_PROCESSINGINSTRUCTION_NAME_CANT_BE_XML,
-      "Namn p\u00E5 processing-instruction kan inte vara 'xml'"},
+      "Namn p\u00E5 bearbetningsinstruktion kan inte vara 'xml'"},
 
     { ER_PROCESSINGINSTRUCTION_NOTVALID_NCNAME,
-      "Namn p\u00E5 processing-instruction m\u00E5ste vara ett giltigt NCName: {0}"},
+      "Namn p\u00E5 bearbetningsinstruktion m\u00E5ste vara ett giltigt NCName: {0}"},
 
     { ER_NEED_MATCH_ATTRIB,
       "{0} m\u00E5ste ha ett matchningsattribut n\u00E4r det anger ett l\u00E4ge."},
@@ -588,7 +588,7 @@
       "Fick IO-undantag med formatmallfil: {0}"},
 
     { ER_NO_HREF_ATTRIB,
-      "(StylesheetHandler) Kunde inte hitta href-attribut f\u00F6r {0}"},
+      "(StylesheetHandler) Hittade inte href-attribut f\u00F6r {0}"},
 
     { ER_STYLESHEET_INCLUDES_ITSELF,
       "(StylesheetHandler) {0} inkluderar, direkt eller indirekt, sig sj\u00E4lv!"},
@@ -627,7 +627,7 @@
      "Kunde inte tolka dokumentet {0}!"},
 
     { ER_COULDNT_FIND_FRAGMENT,
-     "Kunde inte hitta fragment: {0}"},
+     "Hittade inte fragment: {0}"},
 
     { ER_NODE_NOT_ELEMENT,
       "Nod som pekades p\u00E5 av fragment-identifierare var inte ett element: {0}"},
@@ -796,7 +796,7 @@
       "Ogiltigt funktionsanrop: rekursiva key()-anrop \u00E4r inte till\u00E5tna"},
 
     { ER_REFERENCING_ITSELF,
-      "Variabel {0} h\u00E4nvisar, direkt eller indirekt, till sig sj\u00E4lv!"},
+      "Variabeln {0} refererar, direkt eller indirekt, till sig sj\u00E4lv!"},
 
     { ER_ILLEGAL_DOMSOURCE_INPUT,
       "Indatanoden till en DOMSource f\u00F6r newTemplates f\u00E5r inte vara null!"},
@@ -995,7 +995,7 @@
      "F\u00F6rs\u00F6ker formatera ett tal som \u00E4r st\u00F6rre \u00E4n det st\u00F6rsta l\u00E5nga heltalet"},
 
     { ER_CANNOT_FIND_SAX1_DRIVER,
-     "Kan inte hitta SAX1-drivrutinen klass {0}"},
+     "Hittar inte SAX1-drivrutinen klass {0}"},
 
     { ER_SAX1_DRIVER_NOT_LOADED,
      "SAX1-drivrutinen klass {0} hittades, men kan inte laddas"},
@@ -1058,7 +1058,7 @@
 //   'RedundentExprEliminator' is the name of a class, and should not be
 //   translated.
     { ER_ASSERT_REDUNDENT_EXPR_ELIMINATOR,
-     "Programmerarverifiering i RedundentExprEliminator: {0}"},
+     "Programmerarens utsaga i RedundentExprEliminator: {0}"},
 
     { ER_NOT_ALLOWED_IN_POSITION,
      "{0} \u00E4r inte till\u00E5ten i denna position i formatmallen!"},
@@ -1223,7 +1223,7 @@
       "Xalan hanterar \u00E4nnu inte spr\u00E5knamnet i funktionen format-number."},
 
     { WG_LOCALE_NOT_FOUND,
-      "Varning: Kunde inte hitta spr\u00E5kinst\u00E4llning f\u00F6r xml:lang={0}"},
+      "Varning: Hittade inte spr\u00E5kinst\u00E4llning f\u00F6r xml:lang={0}"},
 
     { WG_CANNOT_MAKE_URL_FROM,
       "Kan inte skapa URL fr\u00E5n: {0}"},
@@ -1232,7 +1232,7 @@
       "Kan inte ladda beg\u00E4rt dokument: {0}"},
 
     { WG_CANNOT_FIND_COLLATOR,
-      "Hittade inte uppsamlare f\u00F6r <sort xml:lang={0}"},
+      "Hittade inte kollationering f\u00F6r <sort xml:lang={0}"},
 
     { WG_FUNCTIONS_SHOULD_USE_URL,
       "Gammal syntax: funktionsinstruktionen b\u00F6r anv\u00E4nda url:en {0}"},
@@ -1244,7 +1244,7 @@
       "kodning underst\u00F6ds inte: {0}, anv\u00E4nder Java {1}"},
 
     { WG_SPECIFICITY_CONFLICTS,
-      "Specificitetkonflikter hittades: {0} Senast hittade i formatmall kommer att anv\u00E4ndas."},
+      "Specifika konflikter hittades: {0} Senast hittade i formatmall kommer att anv\u00E4ndas."},
 
     { WG_PARSING_AND_PREPARING,
       "========= Tolkar och f\u00F6rbereder {0} =========="},
@@ -1359,7 +1359,7 @@
   {  "optionQ", "   [-Q  (Tyst l\u00E4ge)]"},
   {  "optionLF", "   [-LF (Anv\u00E4nd radmatningar endast f\u00F6r utdata {standard \u00E4r CR/LF})]"},
   {  "optionCR", "   [-CR (Anv\u00E4nd radmatningar endast f\u00F6r utdata {standard \u00E4r CR/LF})]"},
-  { "optionESCAPE", "   [-ESCAPE (Vilka tecken \u00E4r skiftningstecken {standard \u00E4r <>&\"\'\\r\\n}]"},
+  { "optionESCAPE", "   [-ESCAPE (Vilka tecken \u00E4r skiftningstecken {standard \u00E4r <>&\"'\\r\\n}]"},
   { "optionINDENT", "   [-INDENT (Best\u00E4m antal blanksteg f\u00F6r indrag {standard \u00E4r 0})]"},
   { "optionTT", "   [-TT (Sp\u00E5ra mallar vid anrop.)]"},
   { "optionTG", "   [-TG (Sp\u00E5ra varje generationsh\u00E4ndelse.)]"},
diff --git a/jaxp/src/com/sun/org/apache/xalan/internal/res/XSLTErrorResources_zh_CN.java b/jaxp/src/com/sun/org/apache/xalan/internal/res/XSLTErrorResources_zh_CN.java
index 1c3a0c7..c42b6f3 100644
--- a/jaxp/src/com/sun/org/apache/xalan/internal/res/XSLTErrorResources_zh_CN.java
+++ b/jaxp/src/com/sun/org/apache/xalan/internal/res/XSLTErrorResources_zh_CN.java
@@ -3,7 +3,7 @@
  * DO NOT REMOVE OR ALTER!
  */
 /*
- * Copyright 1999-2004 The Apache Software Foundation.
+ * Copyright 1999-2005 The Apache Software Foundation.
  *
  * Licensed under the Apache License, Version 2.0 (the "License");
  * you may not use this file except in compliance with the License.
@@ -18,7 +18,7 @@
  * limitations under the License.
  */
 /*
- * $Id: XSLTErrorResources_zh_CN.java,v 1.2.4.1 2005/09/13 11:14:39 pvedula Exp $
+ * $Id: XSLTErrorResources_zh_CN.java /st_wptg_1.8.0.0.0jdk/2 2013/09/16 04:44:25 gmolloy Exp $
  */
 package com.sun.org.apache.xalan.internal.res;
 
@@ -1359,7 +1359,7 @@
   {  "optionQ", "   [-Q (\u65E0\u63D0\u793A\u6A21\u5F0F)]"},
   {  "optionLF", "   [-LF (\u4EC5\u5728\u8F93\u51FA\u65F6\u4F7F\u7528\u6362\u884C\u7B26 {\u9ED8\u8BA4\u503C\u4E3A CR/LF})]"},
   {  "optionCR", "   [-CR (\u4EC5\u5728\u8F93\u51FA\u65F6\u4F7F\u7528\u56DE\u8F66 {\u9ED8\u8BA4\u503C\u4E3A CR/LF})]"},
-  { "optionESCAPE", "   [-ESCAPE (\u8981\u8F6C\u79FB\u7684\u5B57\u7B26 {\u9ED8\u8BA4\u503C\u4E3A <>&\"\'\\r\\n}]"},
+  { "optionESCAPE", "   [-ESCAPE (\u8981\u8F6C\u79FB\u7684\u5B57\u7B26 {\u9ED8\u8BA4\u503C\u4E3A <>&\"'\\r\\n}]"},
   { "optionINDENT", "   [-INDENT (\u63A7\u5236\u8981\u7F29\u8FDB\u7684\u7A7A\u683C\u6570 {\u9ED8\u8BA4\u503C\u4E3A 0})]"},
   { "optionTT", "   [-TT (\u5728\u8C03\u7528\u6A21\u677F\u65F6\u8DDF\u8E2A\u6A21\u677F\u3002)]"},
   { "optionTG", "   [-TG (\u8DDF\u8E2A\u6BCF\u4E2A\u751F\u6210\u4E8B\u4EF6\u3002)]"},
diff --git a/jaxp/src/com/sun/org/apache/xalan/internal/res/XSLTErrorResources_zh_TW.java b/jaxp/src/com/sun/org/apache/xalan/internal/res/XSLTErrorResources_zh_TW.java
index 07ad5af..317ee20 100644
--- a/jaxp/src/com/sun/org/apache/xalan/internal/res/XSLTErrorResources_zh_TW.java
+++ b/jaxp/src/com/sun/org/apache/xalan/internal/res/XSLTErrorResources_zh_TW.java
@@ -3,7 +3,7 @@
  * DO NOT REMOVE OR ALTER!
  */
 /*
- * Copyright 1999-2004 The Apache Software Foundation.
+ * Copyright 1999-2005 The Apache Software Foundation.
  *
  * Licensed under the Apache License, Version 2.0 (the "License");
  * you may not use this file except in compliance with the License.
@@ -18,7 +18,7 @@
  * limitations under the License.
  */
 /*
- * $Id: XSLTErrorResources_zh_TW.java,v 1.2.4.1 2005/09/13 11:19:31 pvedula Exp $
+ * $Id: XSLTErrorResources_zh_TW.java /st_wptg_1.8.0.0.0jdk/2 2013/09/14 02:16:34 gmolloy Exp $
  */
 package com.sun.org.apache.xalan.internal.res;
 
@@ -1359,7 +1359,7 @@
   {  "optionQ", "   [-Q  (\u975C\u97F3\u6A21\u5F0F)]"},
   {  "optionLF", "   [-LF (\u8F38\u51FA\u4E0A\u50C5\u4F7F\u7528\u63DB\u884C\u5B57\u5143 {\u9810\u8A2D\u70BA CR/LF})]"},
   {  "optionCR", "   [-CR (\u8F38\u51FA\u4E0A\u50C5\u4F7F\u7528\u6B78\u4F4D\u5B57\u5143 {\u9810\u8A2D\u70BA CR/LF})]"},
-  { "optionESCAPE", "   [-ESCAPE (\u8981\u9041\u96E2\u7684\u5B57\u5143 {\u9810\u8A2D\u70BA <>&\"\'\\r\\n}]"},
+  { "optionESCAPE", "   [-ESCAPE (\u8981\u9041\u96E2\u7684\u5B57\u5143 {\u9810\u8A2D\u70BA <>&\"'\\r\\n}]"},
   { "optionINDENT", "   [-INDENT (\u63A7\u5236\u8981\u7E2E\u6392\u7684\u7A7A\u9593 {\u9810\u8A2D\u70BA 0})]"},
   { "optionTT", "   [-TT (\u8FFD\u8E64\u547C\u53EB\u7684\u6A23\u677F\u3002)]"},
   { "optionTG", "   [-TG (\u8FFD\u8E64\u6BCF\u500B\u7522\u751F\u4E8B\u4EF6\u3002)]"},
diff --git a/jaxp/src/com/sun/org/apache/xalan/internal/xsltc/compiler/util/ErrorMessages_de.java b/jaxp/src/com/sun/org/apache/xalan/internal/xsltc/compiler/util/ErrorMessages_de.java
index 1ae98c1..48c3b6d 100644
--- a/jaxp/src/com/sun/org/apache/xalan/internal/xsltc/compiler/util/ErrorMessages_de.java
+++ b/jaxp/src/com/sun/org/apache/xalan/internal/xsltc/compiler/util/ErrorMessages_de.java
@@ -18,7 +18,7 @@
  * limitations under the License.
  */
 /*
- * $Id: ErrorMessages_de.java,v 1.2.4.1 2005/09/15 10:02:28 pvedula Exp $
+ * $Id: ErrorMessages_de.java /st_wptg_1.8.0.0.0jdk/2 2013/09/16 04:56:10 gmolloy Exp $
  */
 
 package com.sun.org.apache.xalan.internal.xsltc.compiler.util;
@@ -447,7 +447,7 @@
          * Note to translators:  access to the stylesheet target is denied
          */
         {ErrorMsg.ACCESSING_XSLT_TARGET_ERR,
-        "Could not read stylesheet target ''{0}'', because ''{1}'' access is not allowed."},
+        "Stylesheet-Ziel \"{0}\" konnte nicht gelesen werden, weil der \"{1}\"-Zugriff wegen einer von der Eigenschaft accessExternalStylesheet festgelegten Einschr\u00E4nkung nicht zul\u00E4ssig ist."},
 
         /*
          * Note to translators:  This message represents an internal error in
@@ -771,7 +771,7 @@
          * it the same amount as the first in English.
          */
         {ErrorMsg.WARNING_PLUS_WRAPPED_MSG,
-        "WARNING:  \"{0}\"\n       :{1}"},
+        "WARNING:  ''{0}''\n       :{1}"},
 
         /*
          * Note to translators:  This message is used to indicate the severity
@@ -787,7 +787,7 @@
          * it the same amount as the first in English.
          */
         {ErrorMsg.FATAL_ERR_PLUS_WRAPPED_MSG,
-        "FATAL ERROR:  \"{0}\"\n           :{1}"},
+        "FATAL ERROR:  ''{0}''\n           :{1}"},
 
         /*
          * Note to translators:  This message is used to indicate the severity
@@ -803,7 +803,7 @@
          * it the same amount as the first in English.
          */
         {ErrorMsg.ERROR_PLUS_WRAPPED_MSG,
-        "ERROR:  \"{0}\"\n     :{1}"},
+        "ERROR:  ''{0}''\n     :{1}"},
 
         /*
          * Note to translators:  This message is used to indicate the severity
@@ -910,7 +910,58 @@
         "Das Feature \"{0}\" kann nicht f\u00FCr diese TransformerFactory festgelegt werden."},
 
         {ErrorMsg.JAXP_SECUREPROCESSING_FEATURE,
-        "FEATURE_SECURE_PROCESSING: Feature kann nicht auf \"false\" gesetzt werden, wenn Security Manager vorhanden ist."}
+        "FEATURE_SECURE_PROCESSING: Feature kann nicht auf \"false\" gesetzt werden, wenn Security Manager vorhanden ist."},
+
+        /*
+         * Note to translators:  This message describes an internal error in the
+         * processor.  The term "byte code" is a Java technical term for the
+         * executable code in a Java method, and "try-catch-finally block"
+         * refers to the Java keywords with those names.  "Outlined" is a
+         * technical term internal to XSLTC and should not be translated.
+         */
+        {ErrorMsg.OUTLINE_ERR_TRY_CATCH,
+         "Interner XSLTC-Fehler: Der generierte Bytecode enth\u00E4lt einen Try-Catch-Finally-Block. Outline nicht m\u00F6glich."},
+
+        /*
+         * Note to translators:  This message describes an internal error in the
+         * processor.  The terms "OutlineableChunkStart" and
+         * "OutlineableChunkEnd" are the names of classes internal to XSLTC and
+         * should not be translated.  The message indicates that for every
+         * "start" there must be a corresponding "end", and vice versa, and
+         * that if one of a pair of "start" and "end" appears between another
+         * pair of corresponding "start" and "end", then the other half of the
+         * pair must also be between that same enclosing pair.
+         */
+        {ErrorMsg.OUTLINE_ERR_UNBALANCED_MARKERS,
+         "Interner XSLTC-Fehler: Die Marker OutlineableChunkStart und OutlineableChunkEnd m\u00FCssen ausgeglichen und ordnungsgem\u00E4\u00DF platziert sein."},
+
+        /*
+         * Note to translators:  This message describes an internal error in the
+         * processor.  The term "byte code" is a Java technical term for the
+         * executable code in a Java method.  The "method" that is being
+         * referred to is a Java method in a translet that XSLTC is generating
+         * in processing a stylesheet.  The "instruction" that is being
+         * referred to is one of the instrutions in the Java byte code in that
+         * method.  "Outlined" is a technical term internal to XSLTC and
+         * should not be translated.
+         */
+        {ErrorMsg.OUTLINE_ERR_DELETED_TARGET,
+         "Interner XSLTC-Fehler: Eine Anweisung, die Teil eines Bytecodeblocks war, f\u00FCr den ein Outline erstellt wurde, wird nach wie vor in der Originalmethode referenziert."
+        },
+
+
+        /*
+         * Note to translators:  This message describes an internal error in the
+         * processor.  The "method" that is being referred to is a Java method
+         * in a translet that XSLTC is generating.
+         *
+         */
+        {ErrorMsg.OUTLINE_ERR_METHOD_TOO_BIG,
+         "Interner XSLTC-Fehler: Eine Methode im Translet \u00FCberschreitet die Java Virtual Machine-L\u00E4ngeneinschr\u00E4nkung einer Methode von 64 KB. Ursache hierf\u00FCr sind in der Regel sehr gro\u00DFe Vorlagen in einem Stylesheet. Versuchen Sie, das Stylesheet mit kleineren Vorlagen umzustrukturieren."
+        },
+
+         {ErrorMsg.DESERIALIZE_TRANSLET_ERR, "Wenn die Java-Sicherheit aktiviert ist, ist die Unterst\u00FCtzung f\u00FCr das Deserialisieren von TemplatesImpl deaktiviert. Dies kann durch Setzen der Systemeigenschaft jdk.xml.enableTemplatesImplDeserialization auf \"True\" au\u00DFer Kraft gesetzt werden."}
+
     };
 
     /** Get the lookup table for error messages.
diff --git a/jaxp/src/com/sun/org/apache/xalan/internal/xsltc/compiler/util/ErrorMessages_es.java b/jaxp/src/com/sun/org/apache/xalan/internal/xsltc/compiler/util/ErrorMessages_es.java
index 7aa0deb..46e69aa 100644
--- a/jaxp/src/com/sun/org/apache/xalan/internal/xsltc/compiler/util/ErrorMessages_es.java
+++ b/jaxp/src/com/sun/org/apache/xalan/internal/xsltc/compiler/util/ErrorMessages_es.java
@@ -18,7 +18,7 @@
  * limitations under the License.
  */
 /*
- * $Id: ErrorMessages_es.java,v 1.2.4.1 2005/09/15 10:03:56 pvedula Exp $
+ * $Id: ErrorMessages_es.java /st_wptg_1.8.0.0.0jdk/2 2013/09/16 09:06:34 gmolloy Exp $
  */
 
 package com.sun.org.apache.xalan.internal.xsltc.compiler.util;
@@ -447,7 +447,7 @@
          * Note to translators:  access to the stylesheet target is denied
          */
         {ErrorMsg.ACCESSING_XSLT_TARGET_ERR,
-        "Could not read stylesheet target ''{0}'', because ''{1}'' access is not allowed."},
+        "No se ha podido leer el destino de hoja de estilos ''{0}'', porque no se permite el acceso ''{1}'' debido a una restricci\u00F3n definida por la propiedad accessExternalStylesheet."},
 
         /*
          * Note to translators:  This message represents an internal error in
@@ -771,7 +771,7 @@
          * it the same amount as the first in English.
          */
         {ErrorMsg.WARNING_PLUS_WRAPPED_MSG,
-        "ADVERTENCIA: ''{0}''\n       :{1}"},
+        "WARNING:  ''{0}''\n       :{1}"},
 
         /*
          * Note to translators:  This message is used to indicate the severity
@@ -787,7 +787,7 @@
          * it the same amount as the first in English.
          */
         {ErrorMsg.FATAL_ERR_PLUS_WRAPPED_MSG,
-        "ERROR FATAL: ''{0}''\n           :{1}"},
+        "FATAL ERROR:  ''{0}''\n           :{1}"},
 
         /*
          * Note to translators:  This message is used to indicate the severity
@@ -803,7 +803,7 @@
          * it the same amount as the first in English.
          */
         {ErrorMsg.ERROR_PLUS_WRAPPED_MSG,
-        "ERROR: ''{0}''\n     :{1}"},
+        "ERROR:  ''{0}''\n     :{1}"},
 
         /*
          * Note to translators:  This message is used to indicate the severity
@@ -910,7 +910,58 @@
         "No se puede definir la funci\u00F3n ''{0}''en esta f\u00E1brica del transformador."},
 
         {ErrorMsg.JAXP_SECUREPROCESSING_FEATURE,
-        "FEATURE_SECURE_PROCESSING: no se puede definir la funci\u00F3n en false cuando est\u00E1 presente el gestor de seguridad."}
+        "FEATURE_SECURE_PROCESSING: no se puede definir la funci\u00F3n en false cuando est\u00E1 presente el gestor de seguridad."},
+
+        /*
+         * Note to translators:  This message describes an internal error in the
+         * processor.  The term "byte code" is a Java technical term for the
+         * executable code in a Java method, and "try-catch-finally block"
+         * refers to the Java keywords with those names.  "Outlined" is a
+         * technical term internal to XSLTC and should not be translated.
+         */
+        {ErrorMsg.OUTLINE_ERR_TRY_CATCH,
+         "Error interno de XSLTC: el c\u00F3digo de bytes generado contiene un bloque try-catch-finally y no se puede delimitar."},
+
+        /*
+         * Note to translators:  This message describes an internal error in the
+         * processor.  The terms "OutlineableChunkStart" and
+         * "OutlineableChunkEnd" are the names of classes internal to XSLTC and
+         * should not be translated.  The message indicates that for every
+         * "start" there must be a corresponding "end", and vice versa, and
+         * that if one of a pair of "start" and "end" appears between another
+         * pair of corresponding "start" and "end", then the other half of the
+         * pair must also be between that same enclosing pair.
+         */
+        {ErrorMsg.OUTLINE_ERR_UNBALANCED_MARKERS,
+         "Error interno de XSLTC: los marcadores OutlineableChunkStart y OutlineableChunkEnd deben estar equilibrados y correctamente anidados."},
+
+        /*
+         * Note to translators:  This message describes an internal error in the
+         * processor.  The term "byte code" is a Java technical term for the
+         * executable code in a Java method.  The "method" that is being
+         * referred to is a Java method in a translet that XSLTC is generating
+         * in processing a stylesheet.  The "instruction" that is being
+         * referred to is one of the instrutions in the Java byte code in that
+         * method.  "Outlined" is a technical term internal to XSLTC and
+         * should not be translated.
+         */
+        {ErrorMsg.OUTLINE_ERR_DELETED_TARGET,
+         "Error interno de XSLTC: todav\u00EDa se hace referencia a una instrucci\u00F3n que formaba parte de un bloque de c\u00F3digo de bytes delimitado en el m\u00E9todo original."
+        },
+
+
+        /*
+         * Note to translators:  This message describes an internal error in the
+         * processor.  The "method" that is being referred to is a Java method
+         * in a translet that XSLTC is generating.
+         *
+         */
+        {ErrorMsg.OUTLINE_ERR_METHOD_TOO_BIG,
+         "Error interno de XSLTC: un m\u00E9todo en el translet excede la limitaci\u00F3n de Java Virtual Machine de longitud de un m\u00E9todo de 64 kilobytes. Normalmente, esto lo causan plantillas en una hoja de estilos demasiado grandes. Pruebe a reestructurar la hoja de estilos para utilizar plantillas m\u00E1s peque\u00F1as."
+        },
+
+         {ErrorMsg.DESERIALIZE_TRANSLET_ERR, "Cuando la seguridad de Java est\u00E1 activada, el soporte para anular la serializaci\u00F3n de TemplatesImpl est\u00E1 desactivado. Esto se puede sustituir definiendo la propiedad del sistema jdk.xml.enableTemplatesImplDeserialization en true."}
+
     };
 
     /** Get the lookup table for error messages.
diff --git a/jaxp/src/com/sun/org/apache/xalan/internal/xsltc/compiler/util/ErrorMessages_fr.java b/jaxp/src/com/sun/org/apache/xalan/internal/xsltc/compiler/util/ErrorMessages_fr.java
index 39151c7..6d68f24 100644
--- a/jaxp/src/com/sun/org/apache/xalan/internal/xsltc/compiler/util/ErrorMessages_fr.java
+++ b/jaxp/src/com/sun/org/apache/xalan/internal/xsltc/compiler/util/ErrorMessages_fr.java
@@ -18,7 +18,7 @@
  * limitations under the License.
  */
 /*
- * $Id: ErrorMessages_fr.java,v 1.2.4.1 2005/09/15 10:04:47 pvedula Exp $
+ * $Id: ErrorMessages_fr.java /st_wptg_1.8.0.0.0jdk/2 2013/09/16 07:05:15 gmolloy Exp $
  */
 
 package com.sun.org.apache.xalan.internal.xsltc.compiler.util;
@@ -447,7 +447,7 @@
          * Note to translators:  access to the stylesheet target is denied
          */
         {ErrorMsg.ACCESSING_XSLT_TARGET_ERR,
-        "Could not read stylesheet target ''{0}'', because ''{1}'' access is not allowed."},
+        "Impossible de lire la cible de feuille de style ''{0}'' car l''acc\u00E8s \u00E0 ''{1}'' n''est pas autoris\u00E9 en raison d''une restriction d\u00E9finie par la propri\u00E9t\u00E9 accessExternalStylesheet."},
 
         /*
          * Note to translators:  This message represents an internal error in
@@ -771,7 +771,7 @@
          * it the same amount as the first in English.
          */
         {ErrorMsg.WARNING_PLUS_WRAPPED_MSG,
-        "AVERTISSEMENT :  ''{0}''\n       :{1}"},
+        "WARNING:  ''{0}''\n       :{1}"},
 
         /*
          * Note to translators:  This message is used to indicate the severity
@@ -787,7 +787,7 @@
          * it the same amount as the first in English.
          */
         {ErrorMsg.FATAL_ERR_PLUS_WRAPPED_MSG,
-        "ERREUR FATALE :  ''{0}''\n           :{1}"},
+        "FATAL ERROR:  ''{0}''\n           :{1}"},
 
         /*
          * Note to translators:  This message is used to indicate the severity
@@ -803,7 +803,7 @@
          * it the same amount as the first in English.
          */
         {ErrorMsg.ERROR_PLUS_WRAPPED_MSG,
-        "ERREUR :  ''{0}''\n     :{1}"},
+        "ERROR:  ''{0}''\n     :{1}"},
 
         /*
          * Note to translators:  This message is used to indicate the severity
@@ -910,7 +910,58 @@
         "Impossible de d\u00E9finir la fonctionnalit\u00E9 ''{0}'' sur cette propri\u00E9t\u00E9 TransformerFactory."},
 
         {ErrorMsg.JAXP_SECUREPROCESSING_FEATURE,
-        "FEATURE_SECURE_PROCESSING : impossible de d\u00E9finir la fonctionnalit\u00E9 sur False en pr\u00E9sence du gestionnaire de s\u00E9curit\u00E9."}
+        "FEATURE_SECURE_PROCESSING : impossible de d\u00E9finir la fonctionnalit\u00E9 sur False en pr\u00E9sence du gestionnaire de s\u00E9curit\u00E9."},
+
+        /*
+         * Note to translators:  This message describes an internal error in the
+         * processor.  The term "byte code" is a Java technical term for the
+         * executable code in a Java method, and "try-catch-finally block"
+         * refers to the Java keywords with those names.  "Outlined" is a
+         * technical term internal to XSLTC and should not be translated.
+         */
+        {ErrorMsg.OUTLINE_ERR_TRY_CATCH,
+         "Erreur XSLTC interne : le code ex\u00E9cutable g\u00E9n\u00E9r\u00E9 contient un bloc try-catch-finally et ne peut pas \u00EAtre d\u00E9limit\u00E9."},
+
+        /*
+         * Note to translators:  This message describes an internal error in the
+         * processor.  The terms "OutlineableChunkStart" and
+         * "OutlineableChunkEnd" are the names of classes internal to XSLTC and
+         * should not be translated.  The message indicates that for every
+         * "start" there must be a corresponding "end", and vice versa, and
+         * that if one of a pair of "start" and "end" appears between another
+         * pair of corresponding "start" and "end", then the other half of the
+         * pair must also be between that same enclosing pair.
+         */
+        {ErrorMsg.OUTLINE_ERR_UNBALANCED_MARKERS,
+         "Erreur XSLTC interne : les marqueurs OutlineableChunkStart et OutlineableChunkEnd doivent \u00EAtre \u00E9quilibr\u00E9s et correctement imbriqu\u00E9s."},
+
+        /*
+         * Note to translators:  This message describes an internal error in the
+         * processor.  The term "byte code" is a Java technical term for the
+         * executable code in a Java method.  The "method" that is being
+         * referred to is a Java method in a translet that XSLTC is generating
+         * in processing a stylesheet.  The "instruction" that is being
+         * referred to is one of the instrutions in the Java byte code in that
+         * method.  "Outlined" is a technical term internal to XSLTC and
+         * should not be translated.
+         */
+        {ErrorMsg.OUTLINE_ERR_DELETED_TARGET,
+         "Erreur XSLTC interne : une instruction ayant fait partie d'un bloc de code ex\u00E9cutable d\u00E9limit\u00E9 est toujours r\u00E9f\u00E9renc\u00E9e dans la m\u00E9thode d'origine."
+        },
+
+
+        /*
+         * Note to translators:  This message describes an internal error in the
+         * processor.  The "method" that is being referred to is a Java method
+         * in a translet that XSLTC is generating.
+         *
+         */
+        {ErrorMsg.OUTLINE_ERR_METHOD_TOO_BIG,
+         "Erreur XSLTC interne : une m\u00E9thode dans le translet d\u00E9passe la limite de la JVM concernant la longueur d'une m\u00E9thode de 64 kilo-octets. En g\u00E9n\u00E9ral, ceci est d\u00FB \u00E0 de tr\u00E8s grands mod\u00E8les dans une feuille de style. Essayez de restructurer la feuille de style pour utiliser des mod\u00E8les plus petits."
+        },
+
+         {ErrorMsg.DESERIALIZE_TRANSLET_ERR, "Lorsque la s\u00E9curit\u00E9 Java est activ\u00E9e, la prise en charge de la d\u00E9s\u00E9rialisation de TemplatesImpl est d\u00E9sactiv\u00E9e. La d\u00E9finition de la propri\u00E9t\u00E9 syst\u00E8me jdk.xml.enableTemplatesImplDeserialization sur True permet de remplacer ce param\u00E8tre."}
+
     };
 
     /** Get the lookup table for error messages.
diff --git a/jaxp/src/com/sun/org/apache/xalan/internal/xsltc/compiler/util/ErrorMessages_it.java b/jaxp/src/com/sun/org/apache/xalan/internal/xsltc/compiler/util/ErrorMessages_it.java
index b8f68b9..32872e7 100644
--- a/jaxp/src/com/sun/org/apache/xalan/internal/xsltc/compiler/util/ErrorMessages_it.java
+++ b/jaxp/src/com/sun/org/apache/xalan/internal/xsltc/compiler/util/ErrorMessages_it.java
@@ -18,7 +18,7 @@
  * limitations under the License.
  */
 /*
- * $Id: ErrorMessages_it.java,v 1.2.4.1 2005/09/15 10:07:02 pvedula Exp $
+ * $Id: ErrorMessages_it.java /st_wptg_1.8.0.0.0jdk/2 2013/09/16 07:02:00 gmolloy Exp $
  */
 
 package com.sun.org.apache.xalan.internal.xsltc.compiler.util;
@@ -447,7 +447,7 @@
          * Note to translators:  access to the stylesheet target is denied
          */
         {ErrorMsg.ACCESSING_XSLT_TARGET_ERR,
-        "Could not read stylesheet target ''{0}'', because ''{1}'' access is not allowed."},
+        "Impossibile leggere la destinazione del foglio di stile ''{0}''. Accesso ''{1}'' non consentito a causa della limitazione definita dalla propriet\u00E0 accessExternalStylesheet."},
 
         /*
          * Note to translators:  This message represents an internal error in
@@ -771,7 +771,7 @@
          * it the same amount as the first in English.
          */
         {ErrorMsg.WARNING_PLUS_WRAPPED_MSG,
-        "Avvertenza:  ''{0}''\n       :{1}"},
+        "WARNING:  ''{0}''\n       :{1}"},
 
         /*
          * Note to translators:  This message is used to indicate the severity
@@ -787,7 +787,7 @@
          * it the same amount as the first in English.
          */
         {ErrorMsg.FATAL_ERR_PLUS_WRAPPED_MSG,
-        "ERRORE IRREVERSIBILE:  ''{0}''\n           :{1}"},
+        "FATAL ERROR:  ''{0}''\n           :{1}"},
 
         /*
          * Note to translators:  This message is used to indicate the severity
@@ -803,7 +803,7 @@
          * it the same amount as the first in English.
          */
         {ErrorMsg.ERROR_PLUS_WRAPPED_MSG,
-        "ERRORE:  ''{0}''\n     :{1}"},
+        "ERROR:  ''{0}''\n     :{1}"},
 
         /*
          * Note to translators:  This message is used to indicate the severity
@@ -910,7 +910,58 @@
         "Impossibile impostare la funzione ''{0}'' in questo TransformerFactory."},
 
         {ErrorMsg.JAXP_SECUREPROCESSING_FEATURE,
-        "FEATURE_SECURE_PROCESSING: impossibile impostare la funzione su false se \u00E8 presente Security Manager."}
+        "FEATURE_SECURE_PROCESSING: impossibile impostare la funzione su false se \u00E8 presente Security Manager."},
+
+        /*
+         * Note to translators:  This message describes an internal error in the
+         * processor.  The term "byte code" is a Java technical term for the
+         * executable code in a Java method, and "try-catch-finally block"
+         * refers to the Java keywords with those names.  "Outlined" is a
+         * technical term internal to XSLTC and should not be translated.
+         */
+        {ErrorMsg.OUTLINE_ERR_TRY_CATCH,
+         "Errore XSLTC interno: il bytecode generato contiene un blocco try-catch-finally e non pu\u00F2 essere di tipo outlined."},
+
+        /*
+         * Note to translators:  This message describes an internal error in the
+         * processor.  The terms "OutlineableChunkStart" and
+         * "OutlineableChunkEnd" are the names of classes internal to XSLTC and
+         * should not be translated.  The message indicates that for every
+         * "start" there must be a corresponding "end", and vice versa, and
+         * that if one of a pair of "start" and "end" appears between another
+         * pair of corresponding "start" and "end", then the other half of the
+         * pair must also be between that same enclosing pair.
+         */
+        {ErrorMsg.OUTLINE_ERR_UNBALANCED_MARKERS,
+         "Errore XSLTC interno: gli indicatori OutlineableChunkStart e OutlineableChunkEnd devono essere bilanciati e nidificati correttamente."},
+
+        /*
+         * Note to translators:  This message describes an internal error in the
+         * processor.  The term "byte code" is a Java technical term for the
+         * executable code in a Java method.  The "method" that is being
+         * referred to is a Java method in a translet that XSLTC is generating
+         * in processing a stylesheet.  The "instruction" that is being
+         * referred to is one of the instrutions in the Java byte code in that
+         * method.  "Outlined" is a technical term internal to XSLTC and
+         * should not be translated.
+         */
+        {ErrorMsg.OUTLINE_ERR_DELETED_TARGET,
+         "Errore XSLTC interno: a un'istruzione che faceva parte di un blocco di bytecode di tipo outlined viene ancora fatto riferimento nel metodo originale."
+        },
+
+
+        /*
+         * Note to translators:  This message describes an internal error in the
+         * processor.  The "method" that is being referred to is a Java method
+         * in a translet that XSLTC is generating.
+         *
+         */
+        {ErrorMsg.OUTLINE_ERR_METHOD_TOO_BIG,
+         "Errore XSLTC interno: un metodo nel translet supera la limitazione Java Virtual Machine relativa alla lunghezza per un metodo di 64 kilobyte. Ci\u00F2 \u00E8 generalmente causato dalle grandi dimensioni dei modelli in un foglio di stile. Provare a ristrutturare il foglio di stile per utilizzare modelli di dimensioni inferiori."
+        },
+
+         {ErrorMsg.DESERIALIZE_TRANSLET_ERR, "Quando la sicurezza Java \u00E8 abilitata, il supporto per la deserializzazione TemplatesImpl \u00E8 disabilitato. \u00C8 possibile ignorare questa condizione impostando su true la propriet\u00E0 di sistema jdk.xml.enableTemplatesImplDeserialization."}
+
     };
 
     /** Get the lookup table for error messages.
diff --git a/jaxp/src/com/sun/org/apache/xalan/internal/xsltc/compiler/util/ErrorMessages_ja.java b/jaxp/src/com/sun/org/apache/xalan/internal/xsltc/compiler/util/ErrorMessages_ja.java
index 28c15ea..7507e5d 100644
--- a/jaxp/src/com/sun/org/apache/xalan/internal/xsltc/compiler/util/ErrorMessages_ja.java
+++ b/jaxp/src/com/sun/org/apache/xalan/internal/xsltc/compiler/util/ErrorMessages_ja.java
@@ -18,7 +18,7 @@
  * limitations under the License.
  */
 /*
- * $Id: ErrorMessages_ja.java,v 1.2.4.1 2005/09/15 10:08:16 pvedula Exp $
+ * $Id: ErrorMessages_ja.java /st_wptg_1.8.0.0.0jdk/2 2013/09/12 17:39:58 gmolloy Exp $
  */
 
 package com.sun.org.apache.xalan.internal.xsltc.compiler.util;
@@ -447,7 +447,7 @@
          * Note to translators:  access to the stylesheet target is denied
          */
         {ErrorMsg.ACCESSING_XSLT_TARGET_ERR,
-        "Could not read stylesheet target ''{0}'', because ''{1}'' access is not allowed."},
+        "accessExternalStylesheet\u30D7\u30ED\u30D1\u30C6\u30A3\u3067\u8A2D\u5B9A\u3055\u308C\u305F\u5236\u9650\u306B\u3088\u308A''{1}''\u30A2\u30AF\u30BB\u30B9\u304C\u8A31\u53EF\u3055\u308C\u3066\u3044\u306A\u3044\u305F\u3081\u3001\u30B9\u30BF\u30A4\u30EB\u30B7\u30FC\u30C8\u30FB\u30BF\u30FC\u30B2\u30C3\u30C8''{0}''\u3092\u8AAD\u307F\u53D6\u308C\u307E\u305B\u3093\u3067\u3057\u305F\u3002"},
 
         /*
          * Note to translators:  This message represents an internal error in
@@ -771,7 +771,7 @@
          * it the same amount as the first in English.
          */
         {ErrorMsg.WARNING_PLUS_WRAPPED_MSG,
-        "\u8B66\u544A:  ''{0}''\n       :{1}"},
+        "WARNING:  ''{0}''\n       :{1}"},
 
         /*
          * Note to translators:  This message is used to indicate the severity
@@ -787,7 +787,7 @@
          * it the same amount as the first in English.
          */
         {ErrorMsg.FATAL_ERR_PLUS_WRAPPED_MSG,
-        "\u81F4\u547D\u7684\u30A8\u30E9\u30FC:  ''{0}''\n           :{1}"},
+        "FATAL ERROR:  ''{0}''\n           :{1}"},
 
         /*
          * Note to translators:  This message is used to indicate the severity
@@ -803,7 +803,7 @@
          * it the same amount as the first in English.
          */
         {ErrorMsg.ERROR_PLUS_WRAPPED_MSG,
-        "\u30A8\u30E9\u30FC:  ''{0}''\n     :{1}"},
+        "ERROR:  ''{0}''\n     :{1}"},
 
         /*
          * Note to translators:  This message is used to indicate the severity
@@ -910,7 +910,58 @@
         "\u6A5F\u80FD''{0}''\u3092\u3053\u306ETransformerFactory\u306B\u8A2D\u5B9A\u3067\u304D\u307E\u305B\u3093\u3002"},
 
         {ErrorMsg.JAXP_SECUREPROCESSING_FEATURE,
-        "FEATURE_SECURE_PROCESSING: \u30BB\u30AD\u30E5\u30EA\u30C6\u30A3\u30FB\u30DE\u30CD\u30FC\u30B8\u30E3\u304C\u5B58\u5728\u3059\u308B\u3068\u304D\u3001\u6A5F\u80FD\u3092false\u306B\u8A2D\u5B9A\u3067\u304D\u307E\u305B\u3093\u3002"}
+        "FEATURE_SECURE_PROCESSING: \u30BB\u30AD\u30E5\u30EA\u30C6\u30A3\u30FB\u30DE\u30CD\u30FC\u30B8\u30E3\u304C\u5B58\u5728\u3059\u308B\u3068\u304D\u3001\u6A5F\u80FD\u3092false\u306B\u8A2D\u5B9A\u3067\u304D\u307E\u305B\u3093\u3002"},
+
+        /*
+         * Note to translators:  This message describes an internal error in the
+         * processor.  The term "byte code" is a Java technical term for the
+         * executable code in a Java method, and "try-catch-finally block"
+         * refers to the Java keywords with those names.  "Outlined" is a
+         * technical term internal to XSLTC and should not be translated.
+         */
+        {ErrorMsg.OUTLINE_ERR_TRY_CATCH,
+         "\u5185\u90E8XSLTC\u30A8\u30E9\u30FC: \u751F\u6210\u3055\u308C\u305F\u30D0\u30A4\u30C8\u30FB\u30B3\u30FC\u30C9\u306F\u3001try-catch-finally\u30D6\u30ED\u30C3\u30AF\u3092\u542B\u3093\u3067\u3044\u308B\u305F\u3081\u3001\u30A2\u30A6\u30C8\u30E9\u30A4\u30F3\u5316\u3067\u304D\u307E\u305B\u3093\u3002"},
+
+        /*
+         * Note to translators:  This message describes an internal error in the
+         * processor.  The terms "OutlineableChunkStart" and
+         * "OutlineableChunkEnd" are the names of classes internal to XSLTC and
+         * should not be translated.  The message indicates that for every
+         * "start" there must be a corresponding "end", and vice versa, and
+         * that if one of a pair of "start" and "end" appears between another
+         * pair of corresponding "start" and "end", then the other half of the
+         * pair must also be between that same enclosing pair.
+         */
+        {ErrorMsg.OUTLINE_ERR_UNBALANCED_MARKERS,
+         "\u5185\u90E8XSLTC\u30A8\u30E9\u30FC: OutlineableChunkStart\u30DE\u30FC\u30AB\u30FC\u3068OutlineableChunkEnd\u30DE\u30FC\u30AB\u30FC\u306F\u3001\u5BFE\u306B\u306A\u3063\u3066\u304A\u308A\u3001\u304B\u3064\u6B63\u3057\u304F\u30CD\u30B9\u30C8\u3055\u308C\u3066\u3044\u308B\u5FC5\u8981\u304C\u3042\u308A\u307E\u3059\u3002"},
+
+        /*
+         * Note to translators:  This message describes an internal error in the
+         * processor.  The term "byte code" is a Java technical term for the
+         * executable code in a Java method.  The "method" that is being
+         * referred to is a Java method in a translet that XSLTC is generating
+         * in processing a stylesheet.  The "instruction" that is being
+         * referred to is one of the instrutions in the Java byte code in that
+         * method.  "Outlined" is a technical term internal to XSLTC and
+         * should not be translated.
+         */
+        {ErrorMsg.OUTLINE_ERR_DELETED_TARGET,
+         "\u5185\u90E8XSLTC\u30A8\u30E9\u30FC: \u30A2\u30A6\u30C8\u30E9\u30A4\u30F3\u5316\u3055\u308C\u305F\u30D0\u30A4\u30C8\u30FB\u30B3\u30FC\u30C9\u306E\u30D6\u30ED\u30C3\u30AF\u306E\u4E00\u90E8\u3067\u3042\u3063\u305F\u547D\u4EE4\u306F\u3001\u5143\u306E\u30E1\u30BD\u30C3\u30C9\u306E\u4E2D\u3067\u307E\u3060\u53C2\u7167\u3055\u308C\u3066\u3044\u307E\u3059\u3002"
+        },
+
+
+        /*
+         * Note to translators:  This message describes an internal error in the
+         * processor.  The "method" that is being referred to is a Java method
+         * in a translet that XSLTC is generating.
+         *
+         */
+        {ErrorMsg.OUTLINE_ERR_METHOD_TOO_BIG,
+         "\u5185\u90E8XSLTC\u30A8\u30E9\u30FC: \u30C8\u30E9\u30F3\u30B9\u30EC\u30C3\u30C8\u5185\u306E\u30E1\u30BD\u30C3\u30C9\u304C\u3001Java\u4EEE\u60F3\u30DE\u30B7\u30F3\u306E\u5236\u9650(1\u30E1\u30BD\u30C3\u30C9\u306E\u9577\u3055\u306F\u6700\u592764\u30AD\u30ED\u30D0\u30A4\u30C8)\u3092\u8D85\u3048\u3066\u3044\u307E\u3059\u3002\u4E00\u822C\u7684\u306B\u3001\u30B9\u30BF\u30A4\u30EB\u30B7\u30FC\u30C8\u5185\u306E\u30C6\u30F3\u30D7\u30EC\u30FC\u30C8\u306E\u30B5\u30A4\u30BA\u304C\u5927\u304D\u904E\u304E\u308B\u3053\u3068\u304C\u539F\u56E0\u3068\u3057\u3066\u8003\u3048\u3089\u308C\u307E\u3059\u3002\u5C0F\u3055\u3044\u30B5\u30A4\u30BA\u306E\u30C6\u30F3\u30D7\u30EC\u30FC\u30C8\u3092\u4F7F\u7528\u3057\u3066\u3001\u30B9\u30BF\u30A4\u30EB\u30B7\u30FC\u30C8\u3092\u518D\u69CB\u6210\u3057\u3066\u304F\u3060\u3055\u3044\u3002"
+        },
+
+         {ErrorMsg.DESERIALIZE_TRANSLET_ERR, "Java\u30BB\u30AD\u30E5\u30EA\u30C6\u30A3\u304C\u6709\u52B9\u5316\u3055\u308C\u3066\u3044\u308B\u5834\u5408\u3001TemplatesImpl\u306E\u30C7\u30B7\u30EA\u30A2\u30E9\u30A4\u30BA\u306E\u30B5\u30DD\u30FC\u30C8\u306F\u7121\u52B9\u5316\u3055\u308C\u307E\u3059\u3002\u3053\u308C\u306F\u3001jdk.xml.enableTemplatesImplDeserialization\u30B7\u30B9\u30C6\u30E0\u30FB\u30D7\u30ED\u30D1\u30C6\u30A3\u3092true\u306B\u8A2D\u5B9A\u3057\u3066\u30AA\u30FC\u30D0\u30FC\u30E9\u30A4\u30C9\u3067\u304D\u307E\u3059\u3002"}
+
     };
 
     /** Get the lookup table for error messages.
diff --git a/jaxp/src/com/sun/org/apache/xalan/internal/xsltc/compiler/util/ErrorMessages_ko.java b/jaxp/src/com/sun/org/apache/xalan/internal/xsltc/compiler/util/ErrorMessages_ko.java
index 3385381..dc0d6c3 100644
--- a/jaxp/src/com/sun/org/apache/xalan/internal/xsltc/compiler/util/ErrorMessages_ko.java
+++ b/jaxp/src/com/sun/org/apache/xalan/internal/xsltc/compiler/util/ErrorMessages_ko.java
@@ -18,7 +18,7 @@
  * limitations under the License.
  */
 /*
- * $Id: ErrorMessages_ko.java,v 1.2.4.1 2005/09/15 10:10:07 pvedula Exp $
+ * $Id: ErrorMessages_ko.java /st_wptg_1.8.0.0.0jdk/2 2013/09/16 02:31:33 gmolloy Exp $
  */
 
 package com.sun.org.apache.xalan.internal.xsltc.compiler.util;
@@ -447,7 +447,7 @@
          * Note to translators:  access to the stylesheet target is denied
          */
         {ErrorMsg.ACCESSING_XSLT_TARGET_ERR,
-        "Could not read stylesheet target ''{0}'', because ''{1}'' access is not allowed."},
+        "accessExternalStylesheet \uC18D\uC131\uC73C\uB85C \uC124\uC815\uB41C \uC81C\uD55C\uC73C\uB85C \uC778\uD574 ''{1}'' \uC561\uC138\uC2A4\uAC00 \uD5C8\uC6A9\uB418\uC9C0 \uC54A\uC73C\uBBC0\uB85C \uC2A4\uD0C0\uC77C\uC2DC\uD2B8 \uB300\uC0C1 ''{0}''\uC744(\uB97C) \uC77D\uC744 \uC218 \uC5C6\uC2B5\uB2C8\uB2E4."},
 
         /*
          * Note to translators:  This message represents an internal error in
@@ -771,7 +771,7 @@
          * it the same amount as the first in English.
          */
         {ErrorMsg.WARNING_PLUS_WRAPPED_MSG,
-        "\uACBD\uACE0: ''{0}''\n       :{1}"},
+        "WARNING:  ''{0}''\n       :{1}"},
 
         /*
          * Note to translators:  This message is used to indicate the severity
@@ -787,7 +787,7 @@
          * it the same amount as the first in English.
          */
         {ErrorMsg.FATAL_ERR_PLUS_WRAPPED_MSG,
-        "\uCE58\uBA85\uC801\uC778 \uC624\uB958: ''{0}''\n           :{1}"},
+        "FATAL ERROR:  ''{0}''\n           :{1}"},
 
         /*
          * Note to translators:  This message is used to indicate the severity
@@ -803,7 +803,7 @@
          * it the same amount as the first in English.
          */
         {ErrorMsg.ERROR_PLUS_WRAPPED_MSG,
-        "\uC624\uB958: ''{0}''\n     :{1}"},
+        "ERROR:  ''{0}''\n     :{1}"},
 
         /*
          * Note to translators:  This message is used to indicate the severity
@@ -910,7 +910,58 @@
         "\uC774 TransformerFactory\uC5D0\uC11C ''{0}'' \uAE30\uB2A5\uC744 \uC124\uC815\uD560 \uC218 \uC5C6\uC2B5\uB2C8\uB2E4."},
 
         {ErrorMsg.JAXP_SECUREPROCESSING_FEATURE,
-        "FEATURE_SECURE_PROCESSING: \uBCF4\uC548 \uAD00\uB9AC\uC790\uAC00 \uC788\uC744 \uACBD\uC6B0 \uAE30\uB2A5\uC744 false\uB85C \uC124\uC815\uD560 \uC218 \uC5C6\uC2B5\uB2C8\uB2E4."}
+        "FEATURE_SECURE_PROCESSING: \uBCF4\uC548 \uAD00\uB9AC\uC790\uAC00 \uC788\uC744 \uACBD\uC6B0 \uAE30\uB2A5\uC744 false\uB85C \uC124\uC815\uD560 \uC218 \uC5C6\uC2B5\uB2C8\uB2E4."},
+
+        /*
+         * Note to translators:  This message describes an internal error in the
+         * processor.  The term "byte code" is a Java technical term for the
+         * executable code in a Java method, and "try-catch-finally block"
+         * refers to the Java keywords with those names.  "Outlined" is a
+         * technical term internal to XSLTC and should not be translated.
+         */
+        {ErrorMsg.OUTLINE_ERR_TRY_CATCH,
+         "\uB0B4\uBD80 XSLTC \uC624\uB958: \uC0DD\uC131\uB41C \uBC14\uC774\uD2B8 \uCF54\uB4DC\uAC00 try-catch-finally \uBE14\uB85D\uC744 \uD3EC\uD568\uD558\uBBC0\uB85C outlined \uCC98\uB9AC\uD560 \uC218 \uC5C6\uC2B5\uB2C8\uB2E4."},
+
+        /*
+         * Note to translators:  This message describes an internal error in the
+         * processor.  The terms "OutlineableChunkStart" and
+         * "OutlineableChunkEnd" are the names of classes internal to XSLTC and
+         * should not be translated.  The message indicates that for every
+         * "start" there must be a corresponding "end", and vice versa, and
+         * that if one of a pair of "start" and "end" appears between another
+         * pair of corresponding "start" and "end", then the other half of the
+         * pair must also be between that same enclosing pair.
+         */
+        {ErrorMsg.OUTLINE_ERR_UNBALANCED_MARKERS,
+         "\uB0B4\uBD80 XSLTC \uC624\uB958: OutlineableChunkStart \uBC0F OutlineableChunkEnd \uD45C\uC2DC\uC790\uC758 \uC9DD\uC774 \uB9DE\uC544\uC57C \uD558\uACE0 \uC62C\uBC14\uB974\uAC8C \uC911\uCCA9\uB418\uC5B4\uC57C \uD569\uB2C8\uB2E4."},
+
+        /*
+         * Note to translators:  This message describes an internal error in the
+         * processor.  The term "byte code" is a Java technical term for the
+         * executable code in a Java method.  The "method" that is being
+         * referred to is a Java method in a translet that XSLTC is generating
+         * in processing a stylesheet.  The "instruction" that is being
+         * referred to is one of the instrutions in the Java byte code in that
+         * method.  "Outlined" is a technical term internal to XSLTC and
+         * should not be translated.
+         */
+        {ErrorMsg.OUTLINE_ERR_DELETED_TARGET,
+         "\uB0B4\uBD80 XSLTC \uC624\uB958: outlined \uCC98\uB9AC\uB41C \uBC14\uC774\uD2B8 \uCF54\uB4DC \uBE14\uB85D\uC5D0 \uC18D\uD55C \uBA85\uB839\uC774 \uC5EC\uC804\uD788 \uC6D0\uB798 \uBA54\uC18C\uB4DC\uC5D0\uC11C \uCC38\uC870\uB429\uB2C8\uB2E4."
+        },
+
+
+        /*
+         * Note to translators:  This message describes an internal error in the
+         * processor.  The "method" that is being referred to is a Java method
+         * in a translet that XSLTC is generating.
+         *
+         */
+        {ErrorMsg.OUTLINE_ERR_METHOD_TOO_BIG,
+         "\uB0B4\uBD80 XSLTC \uC624\uB958: translet\uC758 \uBA54\uC18C\uB4DC\uAC00 Java Virtual Machine\uC758 \uBA54\uC18C\uB4DC \uAE38\uC774 \uC81C\uD55C\uC778 64KB\uB97C \uCD08\uACFC\uD569\uB2C8\uB2E4. \uB300\uAC1C \uC2A4\uD0C0\uC77C\uC2DC\uD2B8\uC758 \uD15C\uD50C\uB9AC\uD2B8\uAC00 \uB9E4\uC6B0 \uD06C\uAE30 \uB54C\uBB38\uC5D0 \uBC1C\uC0DD\uD569\uB2C8\uB2E4. \uB354 \uC791\uC740 \uD15C\uD50C\uB9AC\uD2B8\uB97C \uC0AC\uC6A9\uD558\uB3C4\uB85D \uC2A4\uD0C0\uC77C\uC2DC\uD2B8\uB97C \uC7AC\uAD6C\uC131\uD574 \uBCF4\uC2ED\uC2DC\uC624."
+        },
+
+         {ErrorMsg.DESERIALIZE_TRANSLET_ERR, "Java \uBCF4\uC548\uC774 \uC0AC\uC6A9\uC73C\uB85C \uC124\uC815\uB41C \uACBD\uC6B0 TemplatesImpl \uC9C1\uB82C\uD654 \uD574\uC81C\uC5D0 \uB300\uD55C \uC9C0\uC6D0\uC774 \uC0AC\uC6A9 \uC548\uD568\uC73C\uB85C \uC124\uC815\uB429\uB2C8\uB2E4. jdk.xml.enableTemplatesImplDeserialization \uC2DC\uC2A4\uD15C \uC18D\uC131\uC744 true\uB85C \uC124\uC815\uD558\uBA74 \uC774\uB97C \uBB34\uD6A8\uD654\uD560 \uC218 \uC788\uC2B5\uB2C8\uB2E4."}
+
     };
 
     /** Get the lookup table for error messages.
diff --git a/jaxp/src/com/sun/org/apache/xalan/internal/xsltc/compiler/util/ErrorMessages_pt_BR.java b/jaxp/src/com/sun/org/apache/xalan/internal/xsltc/compiler/util/ErrorMessages_pt_BR.java
index c6b369e..274a4a0 100644
--- a/jaxp/src/com/sun/org/apache/xalan/internal/xsltc/compiler/util/ErrorMessages_pt_BR.java
+++ b/jaxp/src/com/sun/org/apache/xalan/internal/xsltc/compiler/util/ErrorMessages_pt_BR.java
@@ -3,7 +3,7 @@
  * DO NOT REMOVE OR ALTER!
  */
 /*
- * Copyright 1999-2004 The Apache Software Foundation.
+ * Copyright 2001-2004 The Apache Software Foundation.
  *
  * Licensed under the Apache License, Version 2.0 (the "License");
  * you may not use this file except in compliance with the License.
@@ -17,10 +17,10 @@
  * See the License for the specific language governing permissions and
  * limitations under the License.
  */
-
 /*
- * $Id: ErrorMessages_pt_BR.java 3023 2011-03-01 00:53:34Z joehw $
+ * $Id: ErrorMessages_pt_BR.java /st_wptg_1.8.0.0.0jdk/2 2013/09/11 12:46:53 gmolloy Exp $
  */
+
 package com.sun.org.apache.xalan.internal.xsltc.compiler.util;
 
 import java.util.ListResourceBundle;
@@ -208,7 +208,7 @@
          * the expression.
          */
         {ErrorMsg.XPATH_PARSER_ERR,
-        "Erro durante o parse da express\u00E3o XPath ''{0}''."},
+        "Erro durante o parsing da express\u00E3o XPath ''{0}''."},
 
         /*
          * Note to translators:  An element in the stylesheet requires a
@@ -447,7 +447,7 @@
          * Note to translators:  access to the stylesheet target is denied
          */
         {ErrorMsg.ACCESSING_XSLT_TARGET_ERR,
-        "Could not read stylesheet target ''{0}'', because ''{1}'' access is not allowed."},
+        "N\u00E3o foi poss\u00EDvel ler o alvo ''{0}'' da folha de estilos, porque o acesso a ''{1}'' n\u00E3o \u00E9 permitido em virtude da restri\u00E7\u00E3o definida pela propriedade accessExternalStylesheet."},
 
         /*
          * Note to translators:  This message represents an internal error in
@@ -469,7 +469,7 @@
          * encountered in the stylesheet but is not recognized.
          */
         {ErrorMsg.ELEMENT_PARSE_ERR,
-        "N\u00E3o foi poss\u00EDvel fazer parse do elemento ''{0}''"},
+        "N\u00E3o foi poss\u00EDvel fazer parsing do elemento ''{0}''"},
 
         /*
          * Note to translators:  "use", "<key>", "node", "node-set", "string"
@@ -513,7 +513,7 @@
          * contains the expression that was in error.
          */
         {ErrorMsg.ATTR_VAL_TEMPLATE_ERR,
-        "N\u00E3o \u00E9 poss\u00EDvel fazer parse do modelo do valor do atributo ''{0}''."},
+        "N\u00E3o \u00E9 poss\u00EDvel fazer parsing do modelo do valor do atributo ''{0}''."},
 
         /*
          * Note to translators:  ???
@@ -771,7 +771,7 @@
          * it the same amount as the first in English.
          */
         {ErrorMsg.WARNING_PLUS_WRAPPED_MSG,
-        "ADVERT\u00CANCIA:  ''{0}''\n       :{1}"},
+        "WARNING:  ''{0}''\n       :{1}"},
 
         /*
          * Note to translators:  This message is used to indicate the severity
@@ -787,7 +787,7 @@
          * it the same amount as the first in English.
          */
         {ErrorMsg.FATAL_ERR_PLUS_WRAPPED_MSG,
-        "ERRO FATAL:  ''{0}''\n           :{1}"},
+        "FATAL ERROR:  ''{0}''\n           :{1}"},
 
         /*
          * Note to translators:  This message is used to indicate the severity
@@ -803,7 +803,7 @@
          * it the same amount as the first in English.
          */
         {ErrorMsg.ERROR_PLUS_WRAPPED_MSG,
-        "ERRO:  ''{0}''\n     :{1}"},
+        "ERROR:  ''{0}''\n     :{1}"},
 
         /*
          * Note to translators:  This message is used to indicate the severity
@@ -910,7 +910,58 @@
         "N\u00E3o \u00E9 poss\u00EDvel definir o recurso ''{0}'' nesta TransformerFactory."},
 
         {ErrorMsg.JAXP_SECUREPROCESSING_FEATURE,
-        "FEATURE_SECURE_PROCESSING: N\u00E3o \u00E9 poss\u00EDvel definir o recurso como falso quando o gerenciador de seguran\u00E7a est\u00E1 presente."}
+        "FEATURE_SECURE_PROCESSING: N\u00E3o \u00E9 poss\u00EDvel definir o recurso como falso quando o gerenciador de seguran\u00E7a est\u00E1 presente."},
+
+        /*
+         * Note to translators:  This message describes an internal error in the
+         * processor.  The term "byte code" is a Java technical term for the
+         * executable code in a Java method, and "try-catch-finally block"
+         * refers to the Java keywords with those names.  "Outlined" is a
+         * technical term internal to XSLTC and should not be translated.
+         */
+        {ErrorMsg.OUTLINE_ERR_TRY_CATCH,
+         "Erro interno de XSLTC: o byte code gerado cont\u00E9m um bloco try-catch-finally e n\u00E3o pode ser outlined."},
+
+        /*
+         * Note to translators:  This message describes an internal error in the
+         * processor.  The terms "OutlineableChunkStart" and
+         * "OutlineableChunkEnd" are the names of classes internal to XSLTC and
+         * should not be translated.  The message indicates that for every
+         * "start" there must be a corresponding "end", and vice versa, and
+         * that if one of a pair of "start" and "end" appears between another
+         * pair of corresponding "start" and "end", then the other half of the
+         * pair must also be between that same enclosing pair.
+         */
+        {ErrorMsg.OUTLINE_ERR_UNBALANCED_MARKERS,
+         "Erro interno de XSLTC: os marcadores OutlineableChunkStart e OutlineableChunkEnd devem ser balanceados e aninhados corretamente."},
+
+        /*
+         * Note to translators:  This message describes an internal error in the
+         * processor.  The term "byte code" is a Java technical term for the
+         * executable code in a Java method.  The "method" that is being
+         * referred to is a Java method in a translet that XSLTC is generating
+         * in processing a stylesheet.  The "instruction" that is being
+         * referred to is one of the instrutions in the Java byte code in that
+         * method.  "Outlined" is a technical term internal to XSLTC and
+         * should not be translated.
+         */
+        {ErrorMsg.OUTLINE_ERR_DELETED_TARGET,
+         "Erro interno de XSLTC: ainda h\u00E1 refer\u00EAncia no m\u00E9todo original a uma instru\u00E7\u00E3o que fazia parte de um bloco de byte code que foi outlined."
+        },
+
+
+        /*
+         * Note to translators:  This message describes an internal error in the
+         * processor.  The "method" that is being referred to is a Java method
+         * in a translet that XSLTC is generating.
+         *
+         */
+        {ErrorMsg.OUTLINE_ERR_METHOD_TOO_BIG,
+         "Erro interno de XSLTC: um m\u00E9todo no translet excede a limita\u00E7\u00E3o da M\u00E1quina Virtual Java quanto ao tamanho de um m\u00E9todo de de 64 kilobytes. Em geral, essa situa\u00E7\u00E3o \u00E9 causada por modelos de uma folha de estilos que s\u00E3o muito grandes. Tente reestruturar sua folha de estilos de forma a usar modelos menores."
+        },
+
+         {ErrorMsg.DESERIALIZE_TRANSLET_ERR, "Quando a seguran\u00E7a do Java est\u00E1 ativada, o suporte para desserializar TemplatesImpl fica desativado. Essa situa\u00E7\u00E3o pode ser corrigida definindo a propriedade do sistema jdk.xml.enableTemplatesImplDeserialization como true."}
+
     };
 
     /** Get the lookup table for error messages.
diff --git a/jaxp/src/com/sun/org/apache/xalan/internal/xsltc/compiler/util/ErrorMessages_sv.java b/jaxp/src/com/sun/org/apache/xalan/internal/xsltc/compiler/util/ErrorMessages_sv.java
index 07aa76c..66ee5fb 100644
--- a/jaxp/src/com/sun/org/apache/xalan/internal/xsltc/compiler/util/ErrorMessages_sv.java
+++ b/jaxp/src/com/sun/org/apache/xalan/internal/xsltc/compiler/util/ErrorMessages_sv.java
@@ -3,7 +3,7 @@
  * DO NOT REMOVE OR ALTER!
  */
 /*
- * Copyright 1999-2004 The Apache Software Foundation.
+ * Copyright 2001-2004 The Apache Software Foundation.
  *
  * Licensed under the Apache License, Version 2.0 (the "License");
  * you may not use this file except in compliance with the License.
@@ -17,10 +17,10 @@
  * See the License for the specific language governing permissions and
  * limitations under the License.
  */
-
 /*
- * $Id: ErrorMessages_sv.java 3023 2011-03-01 00:53:34Z joehw $
+ * $Id: ErrorMessages_sv.java /st_wptg_1.8.0.0.0jdk/2 2013/09/16 06:50:58 gmolloy Exp $
  */
+
 package com.sun.org.apache.xalan.internal.xsltc.compiler.util;
 
 import java.util.ListResourceBundle;
@@ -407,7 +407,7 @@
          * encountered.
          */
         {ErrorMsg.INTERNAL_ERR,
-        "Irreparabelt XSLTC-internfel: ''{0}''"},
+        "O\u00E5terkalleligt internt XSLTC-fel: ''{0}''"},
 
         /*
          * Note to translators:  The stylesheet contained an element that was
@@ -447,7 +447,7 @@
          * Note to translators:  access to the stylesheet target is denied
          */
         {ErrorMsg.ACCESSING_XSLT_TARGET_ERR,
-        "Could not read stylesheet target ''{0}'', because ''{1}'' access is not allowed."},
+        "Kunde inte l\u00E4sa formatmallen ''{0}'', eftersom ''{1}''-\u00E5tkomst inte till\u00E5ts p\u00E5 grund av begr\u00E4nsning som anges av egenskapen accessExternalStylesheet."},
 
         /*
          * Note to translators:  This message represents an internal error in
@@ -771,7 +771,7 @@
          * it the same amount as the first in English.
          */
         {ErrorMsg.WARNING_PLUS_WRAPPED_MSG,
-        "VARNING:  ''{0}''\n       :{1}"},
+        "WARNING:  ''{0}''\n       :{1}"},
 
         /*
          * Note to translators:  This message is used to indicate the severity
@@ -787,7 +787,7 @@
          * it the same amount as the first in English.
          */
         {ErrorMsg.FATAL_ERR_PLUS_WRAPPED_MSG,
-        "O\u00C5TERKALLELIGT FEL:  ''{0}''\n           :{1}"},
+        "FATAL ERROR:  ''{0}''\n           :{1}"},
 
         /*
          * Note to translators:  This message is used to indicate the severity
@@ -803,7 +803,7 @@
          * it the same amount as the first in English.
          */
         {ErrorMsg.ERROR_PLUS_WRAPPED_MSG,
-        "FEL:  ''{0}''\n     :{1}"},
+        "ERROR:  ''{0}''\n     :{1}"},
 
         /*
          * Note to translators:  This message is used to indicate the severity
@@ -876,7 +876,7 @@
          * substitution text contains the actual value of the attribute.
          */
         {ErrorMsg.INVALID_QNAME_ERR,
-        "Ett attribut vars v\u00E4rde m\u00E5ste vara ett QName eller en blankteckenseparerad lista med QNames hade v\u00E4rdet ''{0}''"},
+        "Ett attribut vars v\u00E4rde m\u00E5ste vara ett QName eller en blankteckenavgr\u00E4nsad lista med QNames hade v\u00E4rdet ''{0}''"},
 
         /*
          * Note to translators:  An attribute whose value is required to
@@ -910,7 +910,58 @@
         "Kan inte st\u00E4lla in funktionen ''{0}'' i denna TransformerFactory."},
 
         {ErrorMsg.JAXP_SECUREPROCESSING_FEATURE,
-        "FEATURE_SECURE_PROCESSING: Funktionen kan inte anges till false om s\u00E4kerhetshanteraren anv\u00E4nds."}
+        "FEATURE_SECURE_PROCESSING: Funktionen kan inte anges till false om s\u00E4kerhetshanteraren anv\u00E4nds."},
+
+        /*
+         * Note to translators:  This message describes an internal error in the
+         * processor.  The term "byte code" is a Java technical term for the
+         * executable code in a Java method, and "try-catch-finally block"
+         * refers to the Java keywords with those names.  "Outlined" is a
+         * technical term internal to XSLTC and should not be translated.
+         */
+        {ErrorMsg.OUTLINE_ERR_TRY_CATCH,
+         "Internt XSLTC-fel: den genererade bytekoden inneh\u00E5ller ett try-catch-finally-block och kan inte g\u00F6ras till en disposition."},
+
+        /*
+         * Note to translators:  This message describes an internal error in the
+         * processor.  The terms "OutlineableChunkStart" and
+         * "OutlineableChunkEnd" are the names of classes internal to XSLTC and
+         * should not be translated.  The message indicates that for every
+         * "start" there must be a corresponding "end", and vice versa, and
+         * that if one of a pair of "start" and "end" appears between another
+         * pair of corresponding "start" and "end", then the other half of the
+         * pair must also be between that same enclosing pair.
+         */
+        {ErrorMsg.OUTLINE_ERR_UNBALANCED_MARKERS,
+         "Internt XSLTC-fel: mark\u00F6rerna OutlineableChunkStart och OutlineableChunkEnd m\u00E5ste vara balanserade och korrekt kapslade."},
+
+        /*
+         * Note to translators:  This message describes an internal error in the
+         * processor.  The term "byte code" is a Java technical term for the
+         * executable code in a Java method.  The "method" that is being
+         * referred to is a Java method in a translet that XSLTC is generating
+         * in processing a stylesheet.  The "instruction" that is being
+         * referred to is one of the instrutions in the Java byte code in that
+         * method.  "Outlined" is a technical term internal to XSLTC and
+         * should not be translated.
+         */
+        {ErrorMsg.OUTLINE_ERR_DELETED_TARGET,
+         "Internt XSLTC-fel: originalmetoden refererar fortfarande till en instruktion som var en del av ett bytekodsblock som gjordes till en disposition."
+        },
+
+
+        /*
+         * Note to translators:  This message describes an internal error in the
+         * processor.  The "method" that is being referred to is a Java method
+         * in a translet that XSLTC is generating.
+         *
+         */
+        {ErrorMsg.OUTLINE_ERR_METHOD_TOO_BIG,
+         "Internt XSLTC-fel: en metod i transleten \u00F6verstiger Java Virtual Machines l\u00E4ngdbegr\u00E4nsning f\u00F6r en metod p\u00E5 64 kilobytes.  Det h\u00E4r orsakas vanligen av mycket stora mallar i en formatmall. F\u00F6rs\u00F6k att omstrukturera formatmallen att anv\u00E4nda mindre mallar."
+        },
+
+         {ErrorMsg.DESERIALIZE_TRANSLET_ERR, "N\u00E4r Java-s\u00E4kerheten \u00E4r aktiverad \u00E4r st\u00F6det f\u00F6r avserialisering av TemplatesImpl avaktiverat. Du kan \u00E5sidos\u00E4tta det h\u00E4r genom att st\u00E4lla in systemegenskapen jdk.xml.enableTemplatesImplDeserialization till sant."}
+
     };
 
     /** Get the lookup table for error messages.
diff --git a/jaxp/src/com/sun/org/apache/xalan/internal/xsltc/compiler/util/ErrorMessages_zh_CN.java b/jaxp/src/com/sun/org/apache/xalan/internal/xsltc/compiler/util/ErrorMessages_zh_CN.java
index 1b12156..6896db3 100644
--- a/jaxp/src/com/sun/org/apache/xalan/internal/xsltc/compiler/util/ErrorMessages_zh_CN.java
+++ b/jaxp/src/com/sun/org/apache/xalan/internal/xsltc/compiler/util/ErrorMessages_zh_CN.java
@@ -18,7 +18,7 @@
  * limitations under the License.
  */
 /*
- * $Id: ErrorMessages_zh_CN.java,v 1.2.4.1 2005/09/15 10:15:21 pvedula Exp $
+ * $Id: ErrorMessages_zh_CN.java /st_wptg_1.8.0.0.0jdk/2 2013/09/16 04:44:25 gmolloy Exp $
  */
 
 package com.sun.org.apache.xalan.internal.xsltc.compiler.util;
@@ -208,7 +208,7 @@
          * the expression.
          */
         {ErrorMsg.XPATH_PARSER_ERR,
-        "\u5BF9 XPath \u8868\u8FBE\u5F0F ''{0}'' \u8FDB\u884C\u8BED\u6CD5\u5206\u6790\u65F6\u51FA\u9519\u3002"},
+        "\u89E3\u6790 XPath \u8868\u8FBE\u5F0F ''{0}'' \u65F6\u51FA\u9519\u3002"},
 
         /*
          * Note to translators:  An element in the stylesheet requires a
@@ -400,7 +400,7 @@
          * XSLTC to process the XML input document had a configuration problem.
          */
         {ErrorMsg.SAX_PARSER_CONFIG_ERR,
-        "JAXP \u8BED\u6CD5\u5206\u6790\u5668\u672A\u6B63\u786E\u914D\u7F6E"},
+        "JAXP \u89E3\u6790\u5668\u672A\u6B63\u786E\u914D\u7F6E"},
 
         /*
          * Note to translators:  The substitution text names the internal error
@@ -447,7 +447,7 @@
          * Note to translators:  access to the stylesheet target is denied
          */
         {ErrorMsg.ACCESSING_XSLT_TARGET_ERR,
-        "Could not read stylesheet target ''{0}'', because ''{1}'' access is not allowed."},
+        "\u7531\u4E8E accessExternalStylesheet \u5C5E\u6027\u8BBE\u7F6E\u7684\u9650\u5236\u800C\u4E0D\u5141\u8BB8 ''{1}'' \u8BBF\u95EE, \u56E0\u6B64\u65E0\u6CD5\u8BFB\u53D6\u6837\u5F0F\u8868\u76EE\u6807 ''{0}''\u3002"},
 
         /*
          * Note to translators:  This message represents an internal error in
@@ -469,7 +469,7 @@
          * encountered in the stylesheet but is not recognized.
          */
         {ErrorMsg.ELEMENT_PARSE_ERR,
-        "\u65E0\u6CD5\u5BF9\u5143\u7D20 ''{0}'' \u8FDB\u884C\u8BED\u6CD5\u5206\u6790"},
+        "\u65E0\u6CD5\u89E3\u6790\u5143\u7D20 ''{0}''"},
 
         /*
          * Note to translators:  "use", "<key>", "node", "node-set", "string"
@@ -513,7 +513,7 @@
          * contains the expression that was in error.
          */
         {ErrorMsg.ATTR_VAL_TEMPLATE_ERR,
-        "\u65E0\u6CD5\u5BF9\u5C5E\u6027\u503C\u6A21\u677F ''{0}'' \u8FDB\u884C\u8BED\u6CD5\u5206\u6790\u3002"},
+        "\u65E0\u6CD5\u89E3\u6790\u5C5E\u6027\u503C\u6A21\u677F ''{0}''\u3002"},
 
         /*
          * Note to translators:  ???
@@ -771,7 +771,7 @@
          * it the same amount as the first in English.
          */
         {ErrorMsg.WARNING_PLUS_WRAPPED_MSG,
-        "\u8B66\u544A:  ''{0}''\n       :{1}"},
+        "WARNING:  ''{0}''\n       :{1}"},
 
         /*
          * Note to translators:  This message is used to indicate the severity
@@ -787,7 +787,7 @@
          * it the same amount as the first in English.
          */
         {ErrorMsg.FATAL_ERR_PLUS_WRAPPED_MSG,
-        "\u81F4\u547D\u9519\u8BEF:  ''{0}''\n           :{1}"},
+        "FATAL ERROR:  ''{0}''\n           :{1}"},
 
         /*
          * Note to translators:  This message is used to indicate the severity
@@ -803,7 +803,7 @@
          * it the same amount as the first in English.
          */
         {ErrorMsg.ERROR_PLUS_WRAPPED_MSG,
-        "\u9519\u8BEF:  ''{0}''\n     :{1}"},
+        "ERROR:  ''{0}''\n     :{1}"},
 
         /*
          * Note to translators:  This message is used to indicate the severity
@@ -910,7 +910,58 @@
         "\u65E0\u6CD5\u5BF9\u6B64 TransformerFactory \u8BBE\u7F6E\u529F\u80FD ''{0}''\u3002"},
 
         {ErrorMsg.JAXP_SECUREPROCESSING_FEATURE,
-        "FEATURE_SECURE_PROCESSING: \u5B58\u5728 Security Manager \u65F6, \u65E0\u6CD5\u5C06\u6B64\u529F\u80FD\u8BBE\u7F6E\u4E3A\u201C\u5047\u201D\u3002"}
+        "FEATURE_SECURE_PROCESSING: \u5B58\u5728 Security Manager \u65F6, \u65E0\u6CD5\u5C06\u6B64\u529F\u80FD\u8BBE\u7F6E\u4E3A\u201C\u5047\u201D\u3002"},
+
+        /*
+         * Note to translators:  This message describes an internal error in the
+         * processor.  The term "byte code" is a Java technical term for the
+         * executable code in a Java method, and "try-catch-finally block"
+         * refers to the Java keywords with those names.  "Outlined" is a
+         * technical term internal to XSLTC and should not be translated.
+         */
+        {ErrorMsg.OUTLINE_ERR_TRY_CATCH,
+         "\u5185\u90E8 XSLTC \u9519\u8BEF: \u751F\u6210\u7684\u5B57\u8282\u4EE3\u7801\u5305\u542B try-catch-finally \u5757, \u65E0\u6CD5\u8FDB\u884C Outlined\u3002"},
+
+        /*
+         * Note to translators:  This message describes an internal error in the
+         * processor.  The terms "OutlineableChunkStart" and
+         * "OutlineableChunkEnd" are the names of classes internal to XSLTC and
+         * should not be translated.  The message indicates that for every
+         * "start" there must be a corresponding "end", and vice versa, and
+         * that if one of a pair of "start" and "end" appears between another
+         * pair of corresponding "start" and "end", then the other half of the
+         * pair must also be between that same enclosing pair.
+         */
+        {ErrorMsg.OUTLINE_ERR_UNBALANCED_MARKERS,
+         "\u5185\u90E8 XSLTC \u9519\u8BEF: OutlineableChunkStart \u548C OutlineableChunkEnd \u6807\u8BB0\u5FC5\u987B\u914D\u5BF9\u5E76\u4E14\u6B63\u786E\u5D4C\u5957\u3002"},
+
+        /*
+         * Note to translators:  This message describes an internal error in the
+         * processor.  The term "byte code" is a Java technical term for the
+         * executable code in a Java method.  The "method" that is being
+         * referred to is a Java method in a translet that XSLTC is generating
+         * in processing a stylesheet.  The "instruction" that is being
+         * referred to is one of the instrutions in the Java byte code in that
+         * method.  "Outlined" is a technical term internal to XSLTC and
+         * should not be translated.
+         */
+        {ErrorMsg.OUTLINE_ERR_DELETED_TARGET,
+         "\u5185\u90E8 XSLTC \u9519\u8BEF: \u5C5E\u4E8E\u5DF2\u8FDB\u884C Outlined \u7684\u5B57\u8282\u4EE3\u7801\u5757\u7684\u6307\u4EE4\u5728\u539F\u59CB\u65B9\u6CD5\u4E2D\u4ECD\u88AB\u5F15\u7528\u3002"
+        },
+
+
+        /*
+         * Note to translators:  This message describes an internal error in the
+         * processor.  The "method" that is being referred to is a Java method
+         * in a translet that XSLTC is generating.
+         *
+         */
+        {ErrorMsg.OUTLINE_ERR_METHOD_TOO_BIG,
+         "\u5185\u90E8 XSLTC \u9519\u8BEF: translet \u4E2D\u7684\u65B9\u6CD5\u8D85\u8FC7\u4E86 Java \u865A\u62DF\u673A\u7684\u65B9\u6CD5\u957F\u5EA6\u9650\u5236 64 KB\u3002\u8FD9\u901A\u5E38\u662F\u7531\u4E8E\u6837\u5F0F\u8868\u4E2D\u7684\u6A21\u677F\u975E\u5E38\u5927\u9020\u6210\u7684\u3002\u8BF7\u5C1D\u8BD5\u4F7F\u7528\u8F83\u5C0F\u7684\u6A21\u677F\u91CD\u65B0\u6784\u5EFA\u6837\u5F0F\u8868\u3002"
+        },
+
+         {ErrorMsg.DESERIALIZE_TRANSLET_ERR, "\u542F\u7528\u4E86 Java \u5B89\u5168\u65F6, \u5C06\u7981\u7528\u5BF9\u53CD\u5E8F\u5217\u5316 TemplatesImpl \u7684\u652F\u6301\u3002\u53EF\u4EE5\u901A\u8FC7\u5C06 jdk.xml.enableTemplatesImplDeserialization \u7CFB\u7EDF\u5C5E\u6027\u8BBE\u7F6E\u4E3A\u201C\u771F\u201D\u6765\u8986\u76D6\u6B64\u8BBE\u7F6E\u3002"}
+
     };
 
     /** Get the lookup table for error messages.
diff --git a/jaxp/src/com/sun/org/apache/xalan/internal/xsltc/compiler/util/ErrorMessages_zh_TW.java b/jaxp/src/com/sun/org/apache/xalan/internal/xsltc/compiler/util/ErrorMessages_zh_TW.java
index f813e66..59c0b33 100644
--- a/jaxp/src/com/sun/org/apache/xalan/internal/xsltc/compiler/util/ErrorMessages_zh_TW.java
+++ b/jaxp/src/com/sun/org/apache/xalan/internal/xsltc/compiler/util/ErrorMessages_zh_TW.java
@@ -18,7 +18,7 @@
  * limitations under the License.
  */
 /*
- * $Id: ErrorMessages_zh_TW.java,v 1.2.4.1 2005/09/15 10:16:08 pvedula Exp $
+ * $Id: ErrorMessages_zh_TW.java /st_wptg_1.8.0.0.0jdk/2 2013/09/14 02:16:34 gmolloy Exp $
  */
 
 package com.sun.org.apache.xalan.internal.xsltc.compiler.util;
@@ -447,7 +447,7 @@
          * Note to translators:  access to the stylesheet target is denied
          */
         {ErrorMsg.ACCESSING_XSLT_TARGET_ERR,
-        "Could not read stylesheet target ''{0}'', because ''{1}'' access is not allowed."},
+        "\u7121\u6CD5\u8B80\u53D6\u6A23\u5F0F\u8868\u76EE\u6A19 ''{0}''\uFF0C\u56E0\u70BA accessExternalStylesheet \u5C6C\u6027\u8A2D\u5B9A\u7684\u9650\u5236\uFF0C\u6240\u4EE5\u4E0D\u5141\u8A31 ''{1}'' \u5B58\u53D6\u3002"},
 
         /*
          * Note to translators:  This message represents an internal error in
@@ -771,7 +771,7 @@
          * it the same amount as the first in English.
          */
         {ErrorMsg.WARNING_PLUS_WRAPPED_MSG,
-        "\u8B66\u544A:  ''{0}''\n       :{1}"},
+        "WARNING:  ''{0}''\n       :{1}"},
 
         /*
          * Note to translators:  This message is used to indicate the severity
@@ -787,7 +787,7 @@
          * it the same amount as the first in English.
          */
         {ErrorMsg.FATAL_ERR_PLUS_WRAPPED_MSG,
-        "\u56B4\u91CD\u932F\u8AA4:  ''{0}''\n           :{1}"},
+        "FATAL ERROR:  ''{0}''\n           :{1}"},
 
         /*
          * Note to translators:  This message is used to indicate the severity
@@ -803,7 +803,7 @@
          * it the same amount as the first in English.
          */
         {ErrorMsg.ERROR_PLUS_WRAPPED_MSG,
-        "\u932F\u8AA4:  ''{0}''\n     :{1}"},
+        "ERROR:  ''{0}''\n     :{1}"},
 
         /*
          * Note to translators:  This message is used to indicate the severity
@@ -910,7 +910,58 @@
         "\u7121\u6CD5\u5728\u6B64 TransformerFactory \u4E0A\u8A2D\u5B9A\u529F\u80FD ''{0}''\u3002"},
 
         {ErrorMsg.JAXP_SECUREPROCESSING_FEATURE,
-        "FEATURE_SECURE_PROCESSING: \u5B89\u5168\u7BA1\u7406\u7A0B\u5F0F\u5B58\u5728\u6642\uFF0C\u7121\u6CD5\u5C07\u529F\u80FD\u8A2D\u70BA\u507D\u3002"}
+        "FEATURE_SECURE_PROCESSING: \u5B89\u5168\u7BA1\u7406\u7A0B\u5F0F\u5B58\u5728\u6642\uFF0C\u7121\u6CD5\u5C07\u529F\u80FD\u8A2D\u70BA\u507D\u3002"},
+
+        /*
+         * Note to translators:  This message describes an internal error in the
+         * processor.  The term "byte code" is a Java technical term for the
+         * executable code in a Java method, and "try-catch-finally block"
+         * refers to the Java keywords with those names.  "Outlined" is a
+         * technical term internal to XSLTC and should not be translated.
+         */
+        {ErrorMsg.OUTLINE_ERR_TRY_CATCH,
+         "\u5167\u90E8 XSLTC \u932F\u8AA4:  \u7522\u751F\u7684\u4F4D\u5143\u7D44\u78BC\u5305\u542B try-catch-finally \u5340\u584A\uFF0C\u7121\u6CD5\u52A0\u4EE5 outlined."},
+
+        /*
+         * Note to translators:  This message describes an internal error in the
+         * processor.  The terms "OutlineableChunkStart" and
+         * "OutlineableChunkEnd" are the names of classes internal to XSLTC and
+         * should not be translated.  The message indicates that for every
+         * "start" there must be a corresponding "end", and vice versa, and
+         * that if one of a pair of "start" and "end" appears between another
+         * pair of corresponding "start" and "end", then the other half of the
+         * pair must also be between that same enclosing pair.
+         */
+        {ErrorMsg.OUTLINE_ERR_UNBALANCED_MARKERS,
+         "\u5167\u90E8 XSLTC \u932F\u8AA4:  OutlineableChunkStart \u548C OutlineableChunkEnd \u6A19\u8A18\u5FC5\u9808\u6210\u5C0D\u51FA\u73FE\uFF0C\u4E26\u4F7F\u7528\u6B63\u78BA\u7684\u5DE2\u72C0\u7D50\u69CB\u3002"},
+
+        /*
+         * Note to translators:  This message describes an internal error in the
+         * processor.  The term "byte code" is a Java technical term for the
+         * executable code in a Java method.  The "method" that is being
+         * referred to is a Java method in a translet that XSLTC is generating
+         * in processing a stylesheet.  The "instruction" that is being
+         * referred to is one of the instrutions in the Java byte code in that
+         * method.  "Outlined" is a technical term internal to XSLTC and
+         * should not be translated.
+         */
+        {ErrorMsg.OUTLINE_ERR_DELETED_TARGET,
+         "\u5167\u90E8 XSLTC \u932F\u8AA4:  \u539F\u59CB\u65B9\u6CD5\u4E2D\u4ECD\u7136\u53C3\u7167\u5C6C\u65BC outlined \u4F4D\u5143\u7D44\u78BC\u5340\u584A\u4E00\u90E8\u5206\u7684\u6307\u793A\u3002"
+        },
+
+
+        /*
+         * Note to translators:  This message describes an internal error in the
+         * processor.  The "method" that is being referred to is a Java method
+         * in a translet that XSLTC is generating.
+         *
+         */
+        {ErrorMsg.OUTLINE_ERR_METHOD_TOO_BIG,
+         "\u5167\u90E8 XSLTC \u932F\u8AA4:  translet \u4E2D\u7684\u65B9\u6CD5\u8D85\u904E Java \u865B\u64EC\u6A5F\u5668\u5C0D\u65BC\u65B9\u6CD5\u9577\u5EA6 64 KB \u7684\u9650\u5236\u3002\u9019\u901A\u5E38\u662F\u56E0\u70BA\u6A23\u5F0F\u8868\u4E2D\u6709\u975E\u5E38\u5927\u7684\u6A23\u677F\u3002\u8ACB\u5617\u8A66\u91CD\u65B0\u7D44\u7E54\u60A8\u7684\u6A23\u5F0F\u8868\u4EE5\u4F7F\u7528\u8F03\u5C0F\u7684\u6A23\u677F\u3002"
+        },
+
+         {ErrorMsg.DESERIALIZE_TRANSLET_ERR, "\u555F\u7528 Java \u5B89\u5168\u6642\uFF0C\u6703\u505C\u7528\u9084\u539F\u5E8F\u5217\u5316 TemplatesImpl \u7684\u652F\u63F4\u3002\u5C07 jdk.xml.enableTemplatesImplDeserialization \u7CFB\u7D71\u5C6C\u6027\u8A2D\u70BA\u771F\u5373\u53EF\u8986\u5BEB\u6B64\u8A2D\u5B9A\u3002"}
+
     };
 
     /** Get the lookup table for error messages.
diff --git a/jaxp/src/com/sun/org/apache/xalan/internal/xsltc/runtime/ErrorMessages_pt_BR.java b/jaxp/src/com/sun/org/apache/xalan/internal/xsltc/runtime/ErrorMessages_pt_BR.java
index 9d8ab46..0eb0cfa 100644
--- a/jaxp/src/com/sun/org/apache/xalan/internal/xsltc/runtime/ErrorMessages_pt_BR.java
+++ b/jaxp/src/com/sun/org/apache/xalan/internal/xsltc/runtime/ErrorMessages_pt_BR.java
@@ -3,7 +3,7 @@
  * DO NOT REMOVE OR ALTER!
  */
 /*
- * Copyright 1999-2004 The Apache Software Foundation.
+ * Copyright 2001-2004 The Apache Software Foundation.
  *
  * Licensed under the Apache License, Version 2.0 (the "License");
  * you may not use this file except in compliance with the License.
@@ -17,10 +17,10 @@
  * See the License for the specific language governing permissions and
  * limitations under the License.
  */
-
 /*
- * $Id: ErrorMessages_pt_BR.java 3023 2011-03-01 00:53:34Z joehw $
+ * $Id: ErrorMessages_pt_BR.java /st_wptg_1.8.0.0.0jdk/2 2013/09/11 12:46:53 gmolloy Exp $
  */
+
 package com.sun.org.apache.xalan.internal.xsltc.runtime;
 
 import java.util.ListResourceBundle;
diff --git a/jaxp/src/com/sun/org/apache/xalan/internal/xsltc/runtime/ErrorMessages_sv.java b/jaxp/src/com/sun/org/apache/xalan/internal/xsltc/runtime/ErrorMessages_sv.java
index de29ceb..0e7b2fe 100644
--- a/jaxp/src/com/sun/org/apache/xalan/internal/xsltc/runtime/ErrorMessages_sv.java
+++ b/jaxp/src/com/sun/org/apache/xalan/internal/xsltc/runtime/ErrorMessages_sv.java
@@ -3,7 +3,7 @@
  * DO NOT REMOVE OR ALTER!
  */
 /*
- * Copyright 1999-2004 The Apache Software Foundation.
+ * Copyright 2001-2004 The Apache Software Foundation.
  *
  * Licensed under the Apache License, Version 2.0 (the "License");
  * you may not use this file except in compliance with the License.
@@ -17,10 +17,10 @@
  * See the License for the specific language governing permissions and
  * limitations under the License.
  */
-
 /*
- * $Id: ErrorMessages_sv.java 3023 2011-03-01 00:53:34Z joehw $
+ * $Id: ErrorMessages_sv.java /st_wptg_1.8.0.0.0jdk/2 2013/09/16 06:50:58 gmolloy Exp $
  */
+
 package com.sun.org.apache.xalan.internal.xsltc.runtime;
 
 import java.util.ListResourceBundle;
diff --git a/jaxp/src/com/sun/org/apache/xerces/internal/impl/msg/JAXPValidationMessages_it.properties b/jaxp/src/com/sun/org/apache/xerces/internal/impl/msg/JAXPValidationMessages_it.properties
index 86a927e..53c2ae0 100644
--- a/jaxp/src/com/sun/org/apache/xerces/internal/impl/msg/JAXPValidationMessages_it.properties
+++ b/jaxp/src/com/sun/org/apache/xerces/internal/impl/msg/JAXPValidationMessages_it.properties
@@ -27,7 +27,7 @@
 #
 # The messages are arranged in key and value tuples in a ListResourceBundle.
 #
-# @version $Id: JAXPValidationMessages_it.properties /st_wptg_1.8.0.0.0jdk/2 2013/05/27 08:14:02 gmolloy Exp $
+# @version $Id: JAXPValidationMessages_it.properties /st_wptg_1.8.0.0.0jdk/3 2013/09/16 07:02:00 gmolloy Exp $
 
 # Messages for message reporting
 BadMessageKey = Impossibile trovare il messaggio di errore corrispondente alla chiave di messaggio.
@@ -42,7 +42,7 @@
 
 # Validator error messages
 SourceParameterNull = Il parametro di origine non pu\u00F2 essere nullo.
-SourceNotAccepted = Il parametro di origine di tipo ''{0}'' non \u00E8 accettato da questo convalidatore.
+SourceNotAccepted = Il parametro di origine di tipo ''{0}'' non \u00E8 accettato da questo validator.
 SourceResultMismatch = Il parametro di origine di tipo ''{0}'' non \u00E8 compatibile con il parametro dei risultati di tipo ''{1}''.
 
 # TypeInfoProvider error messages
diff --git a/jaxp/src/com/sun/org/apache/xerces/internal/impl/msg/XMLMessages_de.properties b/jaxp/src/com/sun/org/apache/xerces/internal/impl/msg/XMLMessages_de.properties
index f22a2af..2a44dc0 100644
--- a/jaxp/src/com/sun/org/apache/xerces/internal/impl/msg/XMLMessages_de.properties
+++ b/jaxp/src/com/sun/org/apache/xerces/internal/impl/msg/XMLMessages_de.properties
@@ -286,8 +286,8 @@
 # Entity related messages
 # 3.1 Start-Tags, End-Tags, and Empty-Element Tags
         ReferenceToExternalEntity = Externe Entit\u00E4tsreferenz "&{0};" ist in einem Attributwert nicht zul\u00E4ssig.
-        AccessExternalDTD = Externe DTD: Lesen von externer DTD "{0}" nicht erfolgreich, da "{1}"-Zugriff nicht zul\u00E4ssig ist.
-        AccessExternalEntity = Externe Entity: Lesen von externem Dokument "{0}" nicht erfolgreich, da "{1}"-Zugriff nicht zul\u00E4ssig ist.
+        AccessExternalDTD = Externe DTD: Lesen von externer DTD "{0}" nicht erfolgreich, da "{1}"-Zugriff wegen der von der Eigenschaft "accessExternalDTD" festgelegten Einschr\u00E4nkung nicht zul\u00E4ssig ist.
+        AccessExternalEntity = Externe Entit\u00E4t: Lesen des externen Dokuments "{0}" nicht erfolgreich, da "{1}"-Zugriff wegen der von der Eigenschaft "accessExternalDTD" festgelegten Einschr\u00E4nkung nicht zul\u00E4ssig ist.
 
 # 4.1 Character and Entity References
         EntityNotDeclared = Entit\u00E4t "{0}" wurde referenziert aber nicht deklariert.
diff --git a/jaxp/src/com/sun/org/apache/xerces/internal/impl/msg/XMLMessages_es.properties b/jaxp/src/com/sun/org/apache/xerces/internal/impl/msg/XMLMessages_es.properties
index 7864be9..860f862 100644
--- a/jaxp/src/com/sun/org/apache/xerces/internal/impl/msg/XMLMessages_es.properties
+++ b/jaxp/src/com/sun/org/apache/xerces/internal/impl/msg/XMLMessages_es.properties
@@ -286,8 +286,8 @@
 # Entity related messages
 # 3.1 Start-Tags, End-Tags, and Empty-Element Tags
         ReferenceToExternalEntity = La referencia de entidad externa "&{0};" no est\u00E1 permitida en un valor de atributo.
-        AccessExternalDTD = DTD externa: fallo al leer DTD externa ''{0}'' porque el acceso a ''{1}'' no est\u00E1 permitido.
-        AccessExternalEntity = Entidad externa: fallo al leer el documento externo ''{0}'' porque el acceso a ''{1}'' no est\u00E1 permitido.
+        AccessExternalDTD = DTD externa: fallo al leer DTD externa ''{0}'' porque el acceso a ''{1}'' no est\u00E1 permitido debido a una restricci\u00F3n que ha definido la propiedad accessExternalDTD.
+        AccessExternalEntity = Entidad externa: fallo al leer el documento externo ''{0}'' porque el acceso a ''{1}'' no est\u00E1 permitido debido a una restricci\u00F3n que ha definido la propiedad accessExternalDTD.
 
 # 4.1 Character and Entity References
         EntityNotDeclared = Se hizo referencia a la entidad "{0}", pero no se declar\u00F3.
diff --git a/jaxp/src/com/sun/org/apache/xerces/internal/impl/msg/XMLMessages_fr.properties b/jaxp/src/com/sun/org/apache/xerces/internal/impl/msg/XMLMessages_fr.properties
index 915a6e7..a7a2c4c 100644
--- a/jaxp/src/com/sun/org/apache/xerces/internal/impl/msg/XMLMessages_fr.properties
+++ b/jaxp/src/com/sun/org/apache/xerces/internal/impl/msg/XMLMessages_fr.properties
@@ -286,8 +286,8 @@
 # Entity related messages
 # 3.1 Start-Tags, End-Tags, and Empty-Element Tags
         ReferenceToExternalEntity = La r\u00E9f\u00E9rence d''entit\u00E9 externe "&{0};" n''est pas autoris\u00E9e dans une valeur d''attribut.
-        AccessExternalDTD = DTD externe : \u00E9chec de la lecture de la DTD externe ''{0}'', car l''acc\u00E8s ''{1}'' n''est pas autoris\u00E9.
-        AccessExternalEntity = Entit\u00E9 externe : \u00E9chec de la lecture du document externe ''{0}'', car l''acc\u00E8s ''{1}'' n''est pas autoris\u00E9.
+        AccessExternalDTD = DTD externe : \u00E9chec de la lecture de la DTD externe ''{0}'', car l''acc\u00E8s ''{1}'' n''est pas autoris\u00E9 en raison d''une restriction d\u00E9finie par la propri\u00E9t\u00E9 accessExternalDTD.
+        AccessExternalEntity = Entit\u00E9 externe : \u00E9chec de la lecture du document externe ''{0}'', car l''acc\u00E8s ''{1}'' n''est pas autoris\u00E9 en raison d''une restriction d\u00E9finie par la propri\u00E9t\u00E9 accessExternalDTD.
 
 # 4.1 Character and Entity References
         EntityNotDeclared = L''entit\u00E9 "{0}" \u00E9tait r\u00E9f\u00E9renc\u00E9e, mais pas d\u00E9clar\u00E9e.
diff --git a/jaxp/src/com/sun/org/apache/xerces/internal/impl/msg/XMLMessages_it.properties b/jaxp/src/com/sun/org/apache/xerces/internal/impl/msg/XMLMessages_it.properties
index 5222b2e..8bf8837 100644
--- a/jaxp/src/com/sun/org/apache/xerces/internal/impl/msg/XMLMessages_it.properties
+++ b/jaxp/src/com/sun/org/apache/xerces/internal/impl/msg/XMLMessages_it.properties
@@ -286,8 +286,8 @@
 # Entity related messages
 # 3.1 Start-Tags, End-Tags, and Empty-Element Tags
         ReferenceToExternalEntity = Il riferimento di entit\u00E0 esterna "&{0};" non \u00E8 consentito in un valore di attributo.
-        AccessExternalDTD = DTD esterna: lettura della DTD esterna ''{0}'' non riuscita. Accesso ''{1}'' non consentito.
-        AccessExternalEntity = Entit\u00E0 esterna: lettura del documento esterno ''{0}'' non riuscita. Accesso ''{1}'' non consentito.
+        AccessExternalDTD = DTD esterna: lettura della DTD esterna ''{0}'' non riuscita. Accesso ''{1}'' non consentito a causa della limitazione definita dalla propriet\u00E0 accessExternalDTD.
+        AccessExternalEntity = Entit\u00E0 esterna: lettura del documento esterno ''{0}'' non riuscita. Accesso ''{1}'' non consentito a causa della limitazione definita dalla propriet\u00E0 accessExternalDTD.
 
 # 4.1 Character and Entity References
         EntityNotDeclared = L''entit\u00E0 "{0}" \u00E8 indicata da un riferimento, ma non \u00E8 dichiarata.
diff --git a/jaxp/src/com/sun/org/apache/xerces/internal/impl/msg/XMLMessages_ja.properties b/jaxp/src/com/sun/org/apache/xerces/internal/impl/msg/XMLMessages_ja.properties
index 66ed730..567376a 100644
--- a/jaxp/src/com/sun/org/apache/xerces/internal/impl/msg/XMLMessages_ja.properties
+++ b/jaxp/src/com/sun/org/apache/xerces/internal/impl/msg/XMLMessages_ja.properties
@@ -286,8 +286,8 @@
 # Entity related messages
 # 3.1 Start-Tags, End-Tags, and Empty-Element Tags
         ReferenceToExternalEntity = \u5916\u90E8\u30A8\u30F3\u30C6\u30A3\u30C6\u30A3\u53C2\u7167"&{0};"\u306F\u3001\u5C5E\u6027\u5024\u3067\u306F\u8A31\u53EF\u3055\u308C\u3066\u3044\u307E\u305B\u3093\u3002
-        AccessExternalDTD = \u5916\u90E8DTD: ''{1}''\u30A2\u30AF\u30BB\u30B9\u304C\u8A31\u53EF\u3055\u308C\u3066\u3044\u306A\u3044\u305F\u3081\u3001\u5916\u90E8DTD ''{0}''\u306E\u8AAD\u53D6\u308A\u306B\u5931\u6557\u3057\u307E\u3057\u305F\u3002
-        AccessExternalEntity = \u5916\u90E8\u30A8\u30F3\u30C6\u30A3\u30C6\u30A3: ''{1}''\u30A2\u30AF\u30BB\u30B9\u304C\u8A31\u53EF\u3055\u308C\u3066\u3044\u306A\u3044\u305F\u3081\u3001\u5916\u90E8\u30C9\u30AD\u30E5\u30E1\u30F3\u30C8''{0}''\u306E\u8AAD\u53D6\u308A\u306B\u5931\u6557\u3057\u307E\u3057\u305F\u3002
+        AccessExternalDTD = \u5916\u90E8DTD: accessExternalDTD\u30D7\u30ED\u30D1\u30C6\u30A3\u3067\u8A2D\u5B9A\u3055\u308C\u305F\u5236\u9650\u306B\u3088\u308A''{1}''\u30A2\u30AF\u30BB\u30B9\u304C\u8A31\u53EF\u3055\u308C\u3066\u3044\u306A\u3044\u305F\u3081\u3001\u5916\u90E8DTD ''{0}''\u306E\u8AAD\u53D6\u308A\u306B\u5931\u6557\u3057\u307E\u3057\u305F\u3002
+        AccessExternalEntity = \u5916\u90E8\u30A8\u30F3\u30C6\u30A3\u30C6\u30A3: accessExternalDTD\u30D7\u30ED\u30D1\u30C6\u30A3\u3067\u8A2D\u5B9A\u3055\u308C\u305F\u5236\u9650\u306B\u3088\u308A''{1}''\u30A2\u30AF\u30BB\u30B9\u304C\u8A31\u53EF\u3055\u308C\u3066\u3044\u306A\u3044\u305F\u3081\u3001\u5916\u90E8\u30C9\u30AD\u30E5\u30E1\u30F3\u30C8''{0}''\u306E\u8AAD\u53D6\u308A\u306B\u5931\u6557\u3057\u307E\u3057\u305F\u3002
 
 # 4.1 Character and Entity References
         EntityNotDeclared = \u30A8\u30F3\u30C6\u30A3\u30C6\u30A3"{0}"\u304C\u53C2\u7167\u3055\u308C\u3066\u3044\u307E\u3059\u304C\u3001\u5BA3\u8A00\u3055\u308C\u3066\u3044\u307E\u305B\u3093\u3002
diff --git a/jaxp/src/com/sun/org/apache/xerces/internal/impl/msg/XMLMessages_ko.properties b/jaxp/src/com/sun/org/apache/xerces/internal/impl/msg/XMLMessages_ko.properties
index 0613c41..b7f1872 100644
--- a/jaxp/src/com/sun/org/apache/xerces/internal/impl/msg/XMLMessages_ko.properties
+++ b/jaxp/src/com/sun/org/apache/xerces/internal/impl/msg/XMLMessages_ko.properties
@@ -286,8 +286,8 @@
 # Entity related messages
 # 3.1 Start-Tags, End-Tags, and Empty-Element Tags
         ReferenceToExternalEntity = \uC18D\uC131\uAC12\uC5D0\uC11C\uB294 \uC678\uBD80 \uC5D4\uD2F0\uD2F0 \uCC38\uC870 "&{0};"\uC774 \uD5C8\uC6A9\uB418\uC9C0 \uC54A\uC2B5\uB2C8\uB2E4.
-        AccessExternalDTD = \uC678\uBD80 DTD: ''{1}'' \uC561\uC138\uC2A4\uAC00 \uD5C8\uC6A9\uB418\uC9C0 \uC54A\uC544 \uC678\uBD80 DTD ''{0}'' \uC77D\uAE30\uB97C \uC2E4\uD328\uD588\uC2B5\uB2C8\uB2E4.
-        AccessExternalEntity = \uC678\uBD80 \uC5D4\uD2F0\uD2F0: ''{1}'' \uC561\uC138\uC2A4\uAC00 \uD5C8\uC6A9\uB418\uC9C0 \uC54A\uC544 \uC678\uBD80 \uBB38\uC11C ''{0}'' \uC77D\uAE30\uB97C \uC2E4\uD328\uD588\uC2B5\uB2C8\uB2E4.
+        AccessExternalDTD = \uC678\uBD80 DTD: accessExternalDTD \uC18D\uC131\uC73C\uB85C \uC124\uC815\uB41C \uC81C\uD55C\uC73C\uB85C \uC778\uD574 ''{1}'' \uC561\uC138\uC2A4\uAC00 \uD5C8\uC6A9\uB418\uC9C0 \uC54A\uC73C\uBBC0\uB85C \uC678\uBD80 DTD ''{0}'' \uC77D\uAE30\uB97C \uC2E4\uD328\uD588\uC2B5\uB2C8\uB2E4.
+        AccessExternalEntity = \uC678\uBD80 \uC5D4\uD2F0\uD2F0: accessExternalDTD \uC18D\uC131\uC73C\uB85C \uC124\uC815\uB41C \uC81C\uD55C\uC73C\uB85C \uC778\uD574 ''{1}'' \uC561\uC138\uC2A4\uAC00 \uD5C8\uC6A9\uB418\uC9C0 \uC54A\uC73C\uBBC0\uB85C \uC678\uBD80 \uBB38\uC11C ''{0}'' \uC77D\uAE30\uB97C \uC2E4\uD328\uD588\uC2B5\uB2C8\uB2E4.
 
 # 4.1 Character and Entity References
         EntityNotDeclared = "{0}" \uC5D4\uD2F0\uD2F0\uAC00 \uCC38\uC870\uB418\uC5C8\uC9C0\uB9CC \uC120\uC5B8\uB418\uC9C0 \uC54A\uC558\uC2B5\uB2C8\uB2E4.
diff --git a/jaxp/src/com/sun/org/apache/xerces/internal/impl/msg/XMLMessages_pt_BR.properties b/jaxp/src/com/sun/org/apache/xerces/internal/impl/msg/XMLMessages_pt_BR.properties
index 6bf2f30..f76f863 100644
--- a/jaxp/src/com/sun/org/apache/xerces/internal/impl/msg/XMLMessages_pt_BR.properties
+++ b/jaxp/src/com/sun/org/apache/xerces/internal/impl/msg/XMLMessages_pt_BR.properties
@@ -286,8 +286,8 @@
 # Entity related messages
 # 3.1 Start-Tags, End-Tags, and Empty-Element Tags
         ReferenceToExternalEntity = A refer\u00EAncia da entidade externa "&{0};" n\u00E3o \u00E9 permitida em um valor do atributo.
-        AccessExternalDTD = DTD Externo: falha ao ler o DTD ''{0}'' externo porque o acesso a ''{1}'' n\u00E3o \u00E9 permitido.
-        AccessExternalEntity = Entidade Externa: falha ao ler o documento ''{0}'' externo porque o acesso a ''{1}'' n\u00E3o \u00E9 permitido.
+        AccessExternalDTD = DTD Externo: falha ao ler o DTD ''{0}'' externo porque o acesso a ''{1}'' n\u00E3o \u00E9 permitido em decorr\u00EAncia de uma restri\u00E7\u00E3o definida pela propriedade accessExternalDTD.
+        AccessExternalEntity = Entidade Externa: falha ao ler o documento ''{0}'' externo porque o acesso a ''{1}'' n\u00E3o \u00E9 permitido em decorr\u00EAncia de uma restri\u00E7\u00E3o definida pela propriedade accessExternalDTD.
 
 # 4.1 Character and Entity References
         EntityNotDeclared = A entidade "{0}" foi referenciada, mas n\u00E3o declarada.
diff --git a/jaxp/src/com/sun/org/apache/xerces/internal/impl/msg/XMLMessages_sv.properties b/jaxp/src/com/sun/org/apache/xerces/internal/impl/msg/XMLMessages_sv.properties
index 4502150..2aa0899 100644
--- a/jaxp/src/com/sun/org/apache/xerces/internal/impl/msg/XMLMessages_sv.properties
+++ b/jaxp/src/com/sun/org/apache/xerces/internal/impl/msg/XMLMessages_sv.properties
@@ -286,8 +286,8 @@
 # Entity related messages
 # 3.1 Start-Tags, End-Tags, and Empty-Element Tags
         ReferenceToExternalEntity = Den externa enhetsreferensen "&{0};" till\u00E5ts inte i ett attributv\u00E4rde.
-        AccessExternalDTD = Extern DTD: Kunde inte l\u00E4sa extern DTD ''{0}'', eftersom ''{1}'' \u00E5tkomst inte till\u00E5ts.
-        AccessExternalEntity = Extern enhet: Kunde inte l\u00E4sa externt dokument ''{0}'', eftersom ''{1}'' \u00E5tkomst inte till\u00E5ts.
+        AccessExternalDTD = Extern DTD: Kunde inte l\u00E4sa extern DTD ''{0}'', eftersom ''{1}'' \u00E5tkomst inte till\u00E5ts p\u00E5 grund av begr\u00E4nsning som anges av accessExternalDTD-egenskapen.
+        AccessExternalEntity = Extern enhet: Kunde inte l\u00E4sa externt dokument ''{0}'', eftersom ''{1}'' \u00E5tkomst inte till\u00E5ts p\u00E5 grund av begr\u00E4nsning som anges av accessExternalDTD-egenskapen.
 
 # 4.1 Character and Entity References
         EntityNotDeclared = Enheten "{0}" har refererats, men \u00E4r inte deklarerad.
diff --git a/jaxp/src/com/sun/org/apache/xerces/internal/impl/msg/XMLMessages_zh_CN.properties b/jaxp/src/com/sun/org/apache/xerces/internal/impl/msg/XMLMessages_zh_CN.properties
index d327fe3..3bbcd1c 100644
--- a/jaxp/src/com/sun/org/apache/xerces/internal/impl/msg/XMLMessages_zh_CN.properties
+++ b/jaxp/src/com/sun/org/apache/xerces/internal/impl/msg/XMLMessages_zh_CN.properties
@@ -286,8 +286,8 @@
 # Entity related messages
 # 3.1 Start-Tags, End-Tags, and Empty-Element Tags
         ReferenceToExternalEntity = \u5C5E\u6027\u503C\u4E2D\u4E0D\u5141\u8BB8\u91C7\u7528\u5916\u90E8\u5B9E\u4F53\u5F15\u7528 "&{0};"\u3002
-        AccessExternalDTD = \u5916\u90E8 DTD: \u65E0\u6CD5\u8BFB\u53D6\u5916\u90E8 DTD ''{0}'', \u56E0\u4E3A\u4E0D\u5141\u8BB8 ''{1}'' \u8BBF\u95EE\u3002
-        AccessExternalEntity = \u5916\u90E8\u5B9E\u4F53: \u65E0\u6CD5\u8BFB\u53D6\u5916\u90E8\u6587\u6863 ''{0}'', \u56E0\u4E3A\u4E0D\u5141\u8BB8 ''{1}'' \u8BBF\u95EE\u3002
+        AccessExternalDTD = \u5916\u90E8 DTD: \u65E0\u6CD5\u8BFB\u53D6\u5916\u90E8 DTD ''{0}'', \u56E0\u4E3A accessExternalDTD \u5C5E\u6027\u8BBE\u7F6E\u7684\u9650\u5236\u5BFC\u81F4\u4E0D\u5141\u8BB8 ''{1}'' \u8BBF\u95EE\u3002
+        AccessExternalEntity = \u5916\u90E8\u5B9E\u4F53: \u65E0\u6CD5\u8BFB\u53D6\u5916\u90E8\u6587\u6863 ''{0}'', \u56E0\u4E3A accessExternalDTD \u5C5E\u6027\u8BBE\u7F6E\u7684\u9650\u5236\u5BFC\u81F4\u4E0D\u5141\u8BB8 ''{1}'' \u8BBF\u95EE\u3002
 
 # 4.1 Character and Entity References
         EntityNotDeclared = \u5F15\u7528\u4E86\u5B9E\u4F53 "{0}", \u4F46\u672A\u58F0\u660E\u5B83\u3002
diff --git a/jaxp/src/com/sun/org/apache/xerces/internal/impl/msg/XMLMessages_zh_TW.properties b/jaxp/src/com/sun/org/apache/xerces/internal/impl/msg/XMLMessages_zh_TW.properties
index 0b2be0c..3ddcf4d 100644
--- a/jaxp/src/com/sun/org/apache/xerces/internal/impl/msg/XMLMessages_zh_TW.properties
+++ b/jaxp/src/com/sun/org/apache/xerces/internal/impl/msg/XMLMessages_zh_TW.properties
@@ -286,8 +286,8 @@
 # Entity related messages
 # 3.1 Start-Tags, End-Tags, and Empty-Element Tags
         ReferenceToExternalEntity = \u5C6C\u6027\u503C\u4E0D\u5141\u8A31\u53C3\u7167\u5916\u90E8\u5BE6\u9AD4 "&{0};"\u3002
-        AccessExternalDTD = \u5916\u90E8 DTD: \u7121\u6CD5\u8B80\u53D6\u5916\u90E8 DTD ''{0}''\uFF0C\u56E0\u70BA\u4E0D\u5141\u8A31 ''{1}'' \u5B58\u53D6\u3002
-        AccessExternalEntity = \u5916\u90E8\u5BE6\u9AD4: \u7121\u6CD5\u8B80\u53D6\u5916\u90E8\u6587\u4EF6 ''{0}''\uFF0C\u56E0\u70BA\u4E0D\u5141\u8A31 ''{1}'' \u5B58\u53D6\u3002
+        AccessExternalDTD = \u5916\u90E8 DTD: \u7121\u6CD5\u8B80\u53D6\u5916\u90E8 DTD ''{0}''\uFF0C\u56E0\u70BA accessExternalDTD \u5C6C\u6027\u8A2D\u5B9A\u7684\u9650\u5236\uFF0C\u6240\u4EE5\u4E0D\u5141\u8A31 ''{1}'' \u5B58\u53D6\u3002
+        AccessExternalEntity = \u5916\u90E8\u5BE6\u9AD4: \u7121\u6CD5\u8B80\u53D6\u5916\u90E8\u6587\u4EF6 ''{0}''\uFF0C\u56E0\u70BA accessExternalDTD \u5C6C\u6027\u8A2D\u5B9A\u7684\u9650\u5236\uFF0C\u6240\u4EE5\u4E0D\u5141\u8A31 ''{1}'' \u5B58\u53D6\u3002
 
 # 4.1 Character and Entity References
         EntityNotDeclared = \u53C3\u7167\u4E86\u5BE6\u9AD4 "{0}"\uFF0C\u4F46\u662F\u672A\u5BA3\u544A\u3002
diff --git a/jaxp/src/com/sun/org/apache/xerces/internal/impl/msg/XMLSchemaMessages_de.properties b/jaxp/src/com/sun/org/apache/xerces/internal/impl/msg/XMLSchemaMessages_de.properties
index b591da6..5f55b55 100644
--- a/jaxp/src/com/sun/org/apache/xerces/internal/impl/msg/XMLSchemaMessages_de.properties
+++ b/jaxp/src/com/sun/org/apache/xerces/internal/impl/msg/XMLSchemaMessages_de.properties
@@ -26,7 +26,7 @@
 # This file contains error and warning messages related to XML Schema
 # The messages are arranged in key and value tuples in a ListResourceBundle.
 #
-# @version $Id: XMLSchemaMessages_de.properties /st_wptg_1.8.0.0.0jdk/2 2013/05/29 01:16:51 gmolloy Exp $
+# @version $Id: XMLSchemaMessages_de.properties /st_wptg_1.8.0.0.0jdk/3 2013/09/16 04:56:10 gmolloy Exp $
 
         BadMessageKey = Die zum Meldungsschl\u00FCssel geh\u00F6rige Fehlermeldung kann nicht gefunden werden.
         FormatFailed = Beim Formatieren der folgenden Meldung ist ein interner Fehler aufgetreten:\n
@@ -111,7 +111,7 @@
 
 #schema valid (3.X.3)
 
-        schema_reference.access = schema_reference: Lesen von Schema-Dokument "{0}" nicht erfolgreich, da "{1}"-Zugriff nicht zul\u00E4ssig ist.
+        schema_reference.access = schema_reference: Schemadokument "{0}" konnte nicht gelesen werden, weil der "{1}"-Zugriff wegen der von der Eigenschaft accessExternalSchema festgelegten Einschr\u00E4nkung nicht zul\u00E4ssig ist. 
         schema_reference.4 = schema_reference.4: Schemadokument "{0}" konnte nicht gelesen werden, da 1) das Dokument nicht gefunden werden konnte; 2) das Dokument nicht gelesen werden konnte; 3) das Root-Element des Dokuments nicht <xsd:schema> ist.
         src-annotation = src-annotation: <annotation>-Elemente k\u00F6nnen nur <appinfo>- und <documentation>-Elemente enthalten, aber es wurde "{0}" gefunden.
         src-attribute.1 = src-attribute.1: Die Eigenschaften "default" und "fixed" k\u00F6nnen nicht beide in der Attributdeklaration "{0}" vorhanden sein. Verwenden Sie nur eine dieser Eigenschaften.
diff --git a/jaxp/src/com/sun/org/apache/xerces/internal/impl/msg/XMLSchemaMessages_es.properties b/jaxp/src/com/sun/org/apache/xerces/internal/impl/msg/XMLSchemaMessages_es.properties
index dc6d6a2..302bdb6 100644
--- a/jaxp/src/com/sun/org/apache/xerces/internal/impl/msg/XMLSchemaMessages_es.properties
+++ b/jaxp/src/com/sun/org/apache/xerces/internal/impl/msg/XMLSchemaMessages_es.properties
@@ -26,7 +26,7 @@
 # This file contains error and warning messages related to XML Schema
 # The messages are arranged in key and value tuples in a ListResourceBundle.
 #
-# @version $Id: XMLSchemaMessages_es.properties /st_wptg_1.8.0.0.0jdk/2 2013/05/28 05:10:53 gmolloy Exp $
+# @version $Id: XMLSchemaMessages_es.properties /st_wptg_1.8.0.0.0jdk/3 2013/09/16 09:06:34 gmolloy Exp $
 
         BadMessageKey = No se ha encontrado el mensaje de error correspondiente a la clave de mensaje.
         FormatFailed = Se ha producido un error interno al formatear el siguiente mensaje:\n
@@ -111,7 +111,7 @@
 
 #schema valid (3.X.3)
 
-        schema_reference.access = schema_reference: fallo al leer el documento de esquema ''{0}'' porque el acceso a ''{1}'' no est\u00E1 permitido.
+        schema_reference.access = schema_reference: fallo al leer el documento de esquema ''{0}'' porque no se permite el acceso ''{1}'' debido a una restricci\u00F3n definida por la propiedad accessExternalSchema. 
         schema_reference.4 = schema_reference.4: Fallo al leer el documento de esquema ''{0}'', porque 1) no se ha encontrado el documento; 2) no se ha podido leer el documento; 3) el elemento ra\u00EDz del documento no es <xsd:schema>.
         src-annotation = src-annotation: Los elementos de <annotation> s\u00F3lo pueden contener elementos de <appinfo> y <documentation>, pero se ha encontrado ''{0}''.
         src-attribute.1 = src-attribute.1: Las propiedades ''default'' y ''fixed'' no pueden estar presentes de forma simult\u00E1nea en la declaraci\u00F3n de atributo ''{0}''. Utilice s\u00F3lo una de ellas.
diff --git a/jaxp/src/com/sun/org/apache/xerces/internal/impl/msg/XMLSchemaMessages_fr.properties b/jaxp/src/com/sun/org/apache/xerces/internal/impl/msg/XMLSchemaMessages_fr.properties
index 46f840f..33d3a76 100644
--- a/jaxp/src/com/sun/org/apache/xerces/internal/impl/msg/XMLSchemaMessages_fr.properties
+++ b/jaxp/src/com/sun/org/apache/xerces/internal/impl/msg/XMLSchemaMessages_fr.properties
@@ -26,7 +26,7 @@
 # This file contains error and warning messages related to XML Schema
 # The messages are arranged in key and value tuples in a ListResourceBundle.
 #
-# @version $Id: XMLSchemaMessages_fr.properties /st_wptg_1.8.0.0.0jdk/2 2013/05/28 02:16:52 gmolloy Exp $
+# @version $Id: XMLSchemaMessages_fr.properties /st_wptg_1.8.0.0.0jdk/3 2013/09/16 07:05:15 gmolloy Exp $
 
         BadMessageKey = Le message d'erreur correspondant \u00E0 la cl\u00E9 de message est introuvable.
         FormatFailed = Une erreur interne est survenue lors du formatage du message suivant :\n
@@ -88,8 +88,8 @@
         cvc-elt.4.3 = cvc-elt.4.3 : La d\u00E9rivation du type ''{1}'' \u00E0 partir de la d\u00E9finition de type ''{2}'' de l''\u00E9l\u00E9ment "{0}" n''est pas valide.
         cvc-elt.5.1.1 = cvc-elt.5.1.1 : L''attribut ''{''value constraint''}'' ''{2}'' de l''\u00E9l\u00E9ment ''{0}'' n''est pas une valeur par d\u00E9faut valide pour le type ''{1}''.
         cvc-elt.5.2.2.1 = cvc-elt.5.2.2.1 : L''\u00E9l\u00E9ment ''{0}'' ne doit comporter aucun enfant ([children]) de type \u00E9l\u00E9ment d''information.
-        cvc-elt.5.2.2.2.1 = cvc-elt.5.2.2.2.1 : La valeur ''{1}'' de l''\u00E9l\u00E9ment ''{0}'' ne concorde pas avec la valeur ''{2}'' de l''attribut ''{''value constraint''}'' fixe.
-        cvc-elt.5.2.2.2.2 = cvc-elt.5.2.2.2.2 : La valeur ''{1}'' de l''\u00E9l\u00E9ment ''{0}'' ne concorde pas avec la valeur ''{2}'' de l''attribut ''{''value constraint''}''.
+        cvc-elt.5.2.2.2.1 = cvc-elt.5.2.2.2.1 : La valeur ''{1}'' de l''\u00E9l\u00E9ment ''{0}'' ne concorde pas avec la valeur de l''attribut ''{''value constraint''}'' fixe ''{2}''.
+        cvc-elt.5.2.2.2.2 = cvc-elt.5.2.2.2.2 : La valeur ''{1}'' de l''\u00E9l\u00E9ment ''{0}'' ne concorde pas avec la valeur de l''attribut ''{''value constraint''}'' ''{2}''.
         cvc-enumeration-valid = cvc-enumeration-valid : La valeur ''{0}'' n''est pas un facet valide par rapport \u00E0 l''\u00E9num\u00E9ration ''{1}''. Il doit s''agir d''une valeur provenant de l''\u00E9num\u00E9ration.
         cvc-fractionDigits-valid = cvc-fractionDigits-valid : La valeur ''{0}'' poss\u00E8de {1} chiffres apr\u00E8s la virgule, mais le nombre de chiffres apr\u00E8s la virgule ne doit pas d\u00E9passer {2}.
         cvc-id.1 = cvc-id.1 : Aucune liaison ID/IDREF pour l''IDREF ''{0}''.
@@ -111,7 +111,7 @@
 
 #schema valid (3.X.3)
 
-        schema_reference.access = schema_reference : \u00E9chec de la lecture du document de sch\u00E9ma ''{0}'', car l''acc\u00E8s ''{1}'' n''est pas autoris\u00E9.
+        schema_reference.access = schema_reference : \u00E9chec de la lecture du document de sch\u00E9ma ''{0}'', car l''acc\u00E8s ''{1}'' n''est pas autoris\u00E9 en raison d''une restriction d\u00E9finie par la propri\u00E9t\u00E9 accessExternalSchema. 
         schema_reference.4 = schema_reference.4 : Echec de la lecture du document de sch\u00E9ma ''{0}'' pour les raisons suivantes : 1) Le document est introuvable ; 2) Le document n''a pas pu \u00EAtre lu ; 3) L''\u00E9l\u00E9ment racine du document n''est pas <xsd:schema>.
         src-annotation = src-annotation : Les \u00E9l\u00E9ments <annotation> ne peuvent contenir que des \u00E9l\u00E9ments <appinfo> et <documentation>, mais ''{0}'' a \u00E9t\u00E9 trouv\u00E9.
         src-attribute.1 = src-attribute.1 : Les propri\u00E9t\u00E9s ''default'' et ''fixed'' ne peuvent pas figurer simultan\u00E9ment dans la d\u00E9claration d''attribut ''{0}''. Utilisez uniquement l''une d''entre elles.
diff --git a/jaxp/src/com/sun/org/apache/xerces/internal/impl/msg/XMLSchemaMessages_it.properties b/jaxp/src/com/sun/org/apache/xerces/internal/impl/msg/XMLSchemaMessages_it.properties
index 7f4caa8..1074338 100644
--- a/jaxp/src/com/sun/org/apache/xerces/internal/impl/msg/XMLSchemaMessages_it.properties
+++ b/jaxp/src/com/sun/org/apache/xerces/internal/impl/msg/XMLSchemaMessages_it.properties
@@ -26,7 +26,7 @@
 # This file contains error and warning messages related to XML Schema
 # The messages are arranged in key and value tuples in a ListResourceBundle.
 #
-# @version $Id: XMLSchemaMessages_it.properties /st_wptg_1.8.0.0.0jdk/2 2013/05/27 08:14:02 gmolloy Exp $
+# @version $Id: XMLSchemaMessages_it.properties /st_wptg_1.8.0.0.0jdk/3 2013/09/16 07:02:00 gmolloy Exp $
 
         BadMessageKey = Impossibile trovare il messaggio di errore corrispondente alla chiave di messaggio.
         FormatFailed = Si \u00E8 verificato un errore interno durante la formattazione del seguente messaggio:\n
@@ -111,7 +111,7 @@
 
 #schema valid (3.X.3)
 
-        schema_reference.access = schema_reference: lettura del documento di schema ''{0}'' non riuscita. Accesso ''{1}'' non consentito.
+        schema_reference.access = schema_reference: lettura del documento di schema ''{0}'' non riuscita. Accesso ''{1}'' non consentito a causa della limitazione definita dalla propriet\u00E0 accessExternalSchema. 
         schema_reference.4 = schema_reference.4: lettura del documento di schema "{0}" non riuscita perch\u00E9 1) non \u00E8 stato possibile trovare il documento; 2) non \u00E8 stato possibile leggere il documento; 3) l''elemento radice del documento non \u00E8 <xsd:schema>.
         src-annotation = src-annotation: possono essere contenuti soltanto elementi <appinfo> e <documentation>, ma \u00E8 stato trovato ''{0}''.
         src-attribute.1 = src-attribute.1: le propriet\u00E0 ''default'' e ''fixed'' non possono essere entrambi presenti nella dichiarazione di attributo ''{0}''. Utilizzarne solo una.
diff --git a/jaxp/src/com/sun/org/apache/xerces/internal/impl/msg/XMLSchemaMessages_ja.properties b/jaxp/src/com/sun/org/apache/xerces/internal/impl/msg/XMLSchemaMessages_ja.properties
index 063f82c..d8567e3 100644
--- a/jaxp/src/com/sun/org/apache/xerces/internal/impl/msg/XMLSchemaMessages_ja.properties
+++ b/jaxp/src/com/sun/org/apache/xerces/internal/impl/msg/XMLSchemaMessages_ja.properties
@@ -26,7 +26,7 @@
 # This file contains error and warning messages related to XML Schema
 # The messages are arranged in key and value tuples in a ListResourceBundle.
 #
-# @version $Id: XMLSchemaMessages_ja.properties /st_wptg_1.8.0.0.0jdk/2 2013/05/28 01:05:12 gmolloy Exp $
+# @version $Id: XMLSchemaMessages_ja.properties /st_wptg_1.8.0.0.0jdk/3 2013/09/12 17:39:58 gmolloy Exp $
 
         BadMessageKey = \u30E1\u30C3\u30BB\u30FC\u30B8\u30FB\u30AD\u30FC\u306B\u5BFE\u5FDC\u3059\u308B\u30A8\u30E9\u30FC\u30FB\u30E1\u30C3\u30BB\u30FC\u30B8\u304C\u898B\u3064\u304B\u308A\u307E\u305B\u3093\u3002
         FormatFailed = \u6B21\u306E\u30E1\u30C3\u30BB\u30FC\u30B8\u306E\u66F8\u5F0F\u8A2D\u5B9A\u4E2D\u306B\u5185\u90E8\u30A8\u30E9\u30FC\u304C\u767A\u751F\u3057\u307E\u3057\u305F:\n
@@ -111,7 +111,7 @@
 
 #schema valid (3.X.3)
 
-        schema_reference.access = schema_reference: ''{1}''\u30A2\u30AF\u30BB\u30B9\u304C\u8A31\u53EF\u3055\u308C\u3066\u3044\u306A\u3044\u305F\u3081\u3001\u30B9\u30AD\u30FC\u30DE\u30FB\u30C9\u30AD\u30E5\u30E1\u30F3\u30C8''{0}''\u306E\u8AAD\u53D6\u308A\u306B\u5931\u6557\u3057\u307E\u3057\u305F\u3002
+        schema_reference.access = schema_reference: accessExternalSchema\u30D7\u30ED\u30D1\u30C6\u30A3\u3067\u8A2D\u5B9A\u3055\u308C\u305F\u5236\u9650\u306B\u3088\u308A''{1}''\u30A2\u30AF\u30BB\u30B9\u304C\u8A31\u53EF\u3055\u308C\u3066\u3044\u306A\u3044\u305F\u3081\u3001\u30B9\u30AD\u30FC\u30DE\u30FB\u30C9\u30AD\u30E5\u30E1\u30F3\u30C8''{0}''\u306E\u8AAD\u53D6\u308A\u306B\u5931\u6557\u3057\u307E\u3057\u305F\u3002
         schema_reference.4 = schema_reference.4: 1)\u30C9\u30AD\u30E5\u30E1\u30F3\u30C8\u304C\u898B\u3064\u304B\u3089\u306A\u304B\u3063\u305F\u30012)\u30C9\u30AD\u30E5\u30E1\u30F3\u30C8\u3092\u8AAD\u307F\u53D6\u308C\u306A\u304B\u3063\u305F\u30013)\u30C9\u30AD\u30E5\u30E1\u30F3\u30C8\u306E\u30EB\u30FC\u30C8\u8981\u7D20\u304C<xsd:schema>\u3067\u306F\u306A\u304B\u3063\u305F\u305F\u3081\u3001\u30B9\u30AD\u30FC\u30DE\u30FB\u30C9\u30AD\u30E5\u30E1\u30F3\u30C8''{0}''\u306E\u8AAD\u53D6\u308A\u306B\u5931\u6557\u3057\u307E\u3057\u305F\u3002
         src-annotation = src-annotation: <annotation>\u8981\u7D20\u306B\u542B\u3081\u308B\u3053\u3068\u304C\u3067\u304D\u308B\u306E\u306F<appinfo>\u8981\u7D20\u304A\u3088\u3073<documentation>\u8981\u7D20\u306E\u307F\u3067\u3059\u304C\u3001''{0}''\u304C\u898B\u3064\u304B\u308A\u307E\u3057\u305F\u3002
         src-attribute.1 = src-attribute.1: ''default''\u3068''fixed''\u306E\u4E21\u65B9\u306E\u30D7\u30ED\u30D1\u30C6\u30A3\u3092\u5C5E\u6027\u5BA3\u8A00''{0}''\u306B\u542B\u3081\u308B\u3053\u3068\u306F\u3067\u304D\u307E\u305B\u3093\u3002\u3044\u305A\u308C\u304B\u4E00\u65B9\u306E\u307F\u3092\u4F7F\u7528\u3057\u3066\u304F\u3060\u3055\u3044\u3002
diff --git a/jaxp/src/com/sun/org/apache/xerces/internal/impl/msg/XMLSchemaMessages_ko.properties b/jaxp/src/com/sun/org/apache/xerces/internal/impl/msg/XMLSchemaMessages_ko.properties
index 2a21d78..77a2806 100644
--- a/jaxp/src/com/sun/org/apache/xerces/internal/impl/msg/XMLSchemaMessages_ko.properties
+++ b/jaxp/src/com/sun/org/apache/xerces/internal/impl/msg/XMLSchemaMessages_ko.properties
@@ -26,7 +26,7 @@
 # This file contains error and warning messages related to XML Schema
 # The messages are arranged in key and value tuples in a ListResourceBundle.
 #
-# @version $Id: XMLSchemaMessages_ko.properties /st_wptg_1.8.0.0.0jdk/2 2013/05/29 02:40:33 gmolloy Exp $
+# @version $Id: XMLSchemaMessages_ko.properties /st_wptg_1.8.0.0.0jdk/3 2013/09/16 02:31:34 gmolloy Exp $
 
         BadMessageKey = \uBA54\uC2DC\uC9C0 \uD0A4\uC5D0 \uD574\uB2F9\uD558\uB294 \uC624\uB958 \uBA54\uC2DC\uC9C0\uB97C \uCC3E\uC744 \uC218 \uC5C6\uC2B5\uB2C8\uB2E4.
         FormatFailed = \uB2E4\uC74C \uBA54\uC2DC\uC9C0\uC758 \uD615\uC2DD\uC744 \uC9C0\uC815\uD558\uB294 \uC911 \uB0B4\uBD80 \uC624\uB958\uAC00 \uBC1C\uC0DD\uD588\uC2B5\uB2C8\uB2E4.\n
@@ -111,7 +111,7 @@
 
 #schema valid (3.X.3)
 
-        schema_reference.access = schema_reference: ''{1}'' \uC561\uC138\uC2A4\uAC00 \uD5C8\uC6A9\uB418\uC9C0 \uC54A\uC544 \uC2A4\uD0A4\uB9C8 \uBB38\uC11C ''{0}'' \uC77D\uAE30\uB97C \uC2E4\uD328\uD588\uC2B5\uB2C8\uB2E4.
+        schema_reference.access = schema_reference: accessExternalSchema \uC18D\uC131\uC73C\uB85C \uC124\uC815\uB41C \uC81C\uD55C\uC73C\uB85C \uC778\uD574 ''{1}'' \uC561\uC138\uC2A4\uAC00 \uD5C8\uC6A9\uB418\uC9C0 \uC54A\uC73C\uBBC0\uB85C \uC2A4\uD0A4\uB9C8 \uBB38\uC11C ''{0}'' \uC77D\uAE30\uB97C \uC2E4\uD328\uD588\uC2B5\uB2C8\uB2E4. 
         schema_reference.4 = schema_reference.4: \uC2A4\uD0A4\uB9C8 \uBB38\uC11C ''{0}'' \uC77D\uAE30\uB97C \uC2E4\uD328\uD588\uC2B5\uB2C8\uB2E4. \uC6D0\uC778: 1) \uBB38\uC11C\uB97C \uCC3E\uC744 \uC218 \uC5C6\uC2B5\uB2C8\uB2E4. 2) \uBB38\uC11C\uB97C \uC77D\uC744 \uC218 \uC5C6\uC2B5\uB2C8\uB2E4. 3) \uBB38\uC11C\uC758 \uB8E8\uD2B8 \uC694\uC18C\uAC00 <xsd:schema>\uAC00 \uC544\uB2D9\uB2C8\uB2E4.
         src-annotation = src-annotation: <annotation> \uC694\uC18C\uC5D0\uB294 <appinfo> \uBC0F <documentation> \uC694\uC18C\uB9CC \uD3EC\uD568\uB420 \uC218 \uC788\uC9C0\uB9CC ''{0}''\uC774(\uAC00) \uBC1C\uACAC\uB418\uC5C8\uC2B5\uB2C8\uB2E4.
         src-attribute.1 = src-attribute.1: ''default'' \uBC0F ''fixed'' \uC18D\uC131\uC740 \uC18D\uC131 \uC120\uC5B8 ''{0}''\uC5D0 \uD568\uAED8 \uC874\uC7AC\uD560 \uC218 \uC5C6\uC2B5\uB2C8\uB2E4. \uD558\uB098\uB9CC \uC0AC\uC6A9\uD558\uC2ED\uC2DC\uC624.
diff --git a/jaxp/src/com/sun/org/apache/xerces/internal/impl/msg/XMLSchemaMessages_pt_BR.properties b/jaxp/src/com/sun/org/apache/xerces/internal/impl/msg/XMLSchemaMessages_pt_BR.properties
index 8e0eec5..5e3e288 100644
--- a/jaxp/src/com/sun/org/apache/xerces/internal/impl/msg/XMLSchemaMessages_pt_BR.properties
+++ b/jaxp/src/com/sun/org/apache/xerces/internal/impl/msg/XMLSchemaMessages_pt_BR.properties
@@ -26,7 +26,7 @@
 # This file contains error and warning messages related to XML Schema
 # The messages are arranged in key and value tuples in a ListResourceBundle.
 #
-# @version $Id: XMLSchemaMessages_pt_BR.properties /st_wptg_1.8.0.0.0jdk/2 2013/05/28 07:33:06 gmolloy Exp $
+# @version $Id: XMLSchemaMessages_pt_BR.properties /st_wptg_1.8.0.0.0jdk/3 2013/09/11 12:46:54 gmolloy Exp $
 
         BadMessageKey = N\u00E3o foi poss\u00EDvel encontrar a mensagem de erro correspondente \u00E0 chave da mensagem.
         FormatFailed = Ocorreu um erro interno ao formatar a mensagem a seguir:\n
@@ -111,7 +111,7 @@
 
 #schema valid (3.X.3)
 
-        schema_reference.access = schema_reference: falha ao ler o documento ''{0}'' do esquema porque o acesso a ''{1}'' n\u00E3o \u00E9 permitido.
+        schema_reference.access = schema_reference: falha ao ler o documento de esquema ''{0}'' porque o acesso a ''{1}'' n\u00E3o \u00E9 permitido em decorr\u00EAncia de uma restri\u00E7\u00E3o definida pela propriedade accessExternalSchema. 
         schema_reference.4 = schema_reference.4: Falha ao ler o documento do esquema ''{0}'' porque 1) n\u00E3o foi poss\u00EDvel encontrar o documento; 2) n\u00E3o foi poss\u00EDvel ler o documento; 3) o elemento-raiz do documento n\u00E3o \u00E9 <xsd:schema>.
         src-annotation = src-annotation: os elementos de <annotation> podem conter somente os elementos <appinfo> e <documentation>, mas foi encontrado ''{0}''.
         src-attribute.1 = src-attribute.1: As propriedades ''default'' e ''fixed'' n\u00E3o podem estar presentes na declara\u00E7\u00E3o do atributo ''{0}''. Use somente uma delas.
diff --git a/jaxp/src/com/sun/org/apache/xerces/internal/impl/msg/XMLSchemaMessages_sv.properties b/jaxp/src/com/sun/org/apache/xerces/internal/impl/msg/XMLSchemaMessages_sv.properties
index f29bfa1..f14d85b 100644
--- a/jaxp/src/com/sun/org/apache/xerces/internal/impl/msg/XMLSchemaMessages_sv.properties
+++ b/jaxp/src/com/sun/org/apache/xerces/internal/impl/msg/XMLSchemaMessages_sv.properties
@@ -26,7 +26,7 @@
 # This file contains error and warning messages related to XML Schema
 # The messages are arranged in key and value tuples in a ListResourceBundle.
 #
-# @version $Id: XMLSchemaMessages_sv.properties /st_wptg_1.8.0.0.0jdk/2 2013/05/29 00:46:23 gmolloy Exp $
+# @version $Id: XMLSchemaMessages_sv.properties /st_wptg_1.8.0.0.0jdk/3 2013/09/16 06:50:58 gmolloy Exp $
 
         BadMessageKey = Hittar inte felmeddelandet som motsvarar meddelandenyckeln.
         FormatFailed = Ett internt fel intr\u00E4ffade vid formatering av f\u00F6ljande meddelande:\n
@@ -111,7 +111,7 @@
 
 #schema valid (3.X.3)
 
-        schema_reference.access = schema_reference: Kunde inte l\u00E4sa schemadokument ''{0}'', eftersom ''{1}'' \u00E5tkomst inte till\u00E5ts.
+        schema_reference.access = schema_reference: Kunde inte l\u00E4sa schemadokumentet ''{0}'' eftersom ''{1}''-\u00E5tkomst inte till\u00E5ts p\u00E5 grund av begr\u00E4nsning som anges av egenskapen accessExternalSchema. 
         schema_reference.4 = schema_reference.4: L\u00E4sning av schemadokument ''{0}'' utf\u00F6rdes inte p\u00E5 grund av 1) det g\u00E5r inte att hitta dokumentet; 2) det g\u00E5r inte att l\u00E4sa dokumentet; 3) dokumentets rotelement \u00E4r inte <xsd:schema>.
         src-annotation = src-annotation: element f\u00F6r <anteckningar> f\u00E5r endast inneh\u00E5lla element f\u00F6r <appinfo> och <dokumentation>, men ''{0}'' hittades.
         src-attribute.1 = src-attribute.1: B\u00E5da egenskaperna ''default'' och ''fixed'' kan inte samtidigt ing\u00E5 i attributdeklarationen ''{0}''. Anv\u00E4nd en av dem.
diff --git a/jaxp/src/com/sun/org/apache/xerces/internal/impl/msg/XMLSchemaMessages_zh_CN.properties b/jaxp/src/com/sun/org/apache/xerces/internal/impl/msg/XMLSchemaMessages_zh_CN.properties
index 2fdc088..0f42323 100644
--- a/jaxp/src/com/sun/org/apache/xerces/internal/impl/msg/XMLSchemaMessages_zh_CN.properties
+++ b/jaxp/src/com/sun/org/apache/xerces/internal/impl/msg/XMLSchemaMessages_zh_CN.properties
@@ -26,7 +26,7 @@
 # This file contains error and warning messages related to XML Schema
 # The messages are arranged in key and value tuples in a ListResourceBundle.
 #
-# @version $Id: XMLSchemaMessages_zh_CN.properties /st_wptg_1.8.0.0.0jdk/2 2013/05/29 01:19:32 gmolloy Exp $
+# @version $Id: XMLSchemaMessages_zh_CN.properties /st_wptg_1.8.0.0.0jdk/3 2013/09/16 04:44:25 gmolloy Exp $
 
         BadMessageKey = \u627E\u4E0D\u5230\u4E0E\u6D88\u606F\u5173\u952E\u5B57\u5BF9\u5E94\u7684\u9519\u8BEF\u6D88\u606F\u3002
         FormatFailed = \u8BBE\u7F6E\u4EE5\u4E0B\u6D88\u606F\u7684\u683C\u5F0F\u65F6\u51FA\u73B0\u5185\u90E8\u9519\u8BEF:\n
@@ -111,7 +111,7 @@
 
 #schema valid (3.X.3)
 
-        schema_reference.access = schema_reference: \u65E0\u6CD5\u8BFB\u53D6\u65B9\u6848\u6587\u6863 ''{0}'', \u56E0\u4E3A\u4E0D\u5141\u8BB8 ''{1}'' \u8BBF\u95EE\u3002
+        schema_reference.access = schema_reference: \u7531\u4E8E accessExternalSchema \u5C5E\u6027\u8BBE\u7F6E\u7684\u9650\u5236\u800C\u4E0D\u5141\u8BB8 ''{1}'' \u8BBF\u95EE, \u56E0\u6B64\u65E0\u6CD5\u8BFB\u53D6\u65B9\u6848\u6587\u6863 ''{0}''\u3002
         schema_reference.4 = schema_reference.4: \u65E0\u6CD5\u8BFB\u53D6\u65B9\u6848\u6587\u6863 ''{0}'', \u539F\u56E0\u4E3A 1) \u65E0\u6CD5\u627E\u5230\u6587\u6863; 2) \u65E0\u6CD5\u8BFB\u53D6\u6587\u6863; 3) \u6587\u6863\u7684\u6839\u5143\u7D20\u4E0D\u662F <xsd:schema>\u3002
         src-annotation = src-annotation: <annotation> \u5143\u7D20\u53EA\u80FD\u5305\u542B <appinfo> \u548C <documentation> \u5143\u7D20, \u4F46\u53D1\u73B0\u4E86 ''{0}''\u3002
         src-attribute.1 = src-attribute.1: \u5C5E\u6027\u58F0\u660E ''{0}'' \u4E2D\u4E0D\u80FD\u540C\u65F6\u5B58\u5728\u7279\u6027 ''default'' \u548C ''fixed''\u3002\u5E94\u53EA\u4F7F\u7528\u5176\u4E2D\u4E00\u4E2A\u3002
diff --git a/jaxp/src/com/sun/org/apache/xerces/internal/impl/msg/XMLSchemaMessages_zh_TW.properties b/jaxp/src/com/sun/org/apache/xerces/internal/impl/msg/XMLSchemaMessages_zh_TW.properties
index 8600e68..0efb3c4 100644
--- a/jaxp/src/com/sun/org/apache/xerces/internal/impl/msg/XMLSchemaMessages_zh_TW.properties
+++ b/jaxp/src/com/sun/org/apache/xerces/internal/impl/msg/XMLSchemaMessages_zh_TW.properties
@@ -26,7 +26,7 @@
 # This file contains error and warning messages related to XML Schema
 # The messages are arranged in key and value tuples in a ListResourceBundle.
 #
-# @version $Id: XMLSchemaMessages_zh_TW.properties /st_wptg_1.8.0.0.0jdk/2 2013/05/27 00:30:48 gmolloy Exp $
+# @version $Id: XMLSchemaMessages_zh_TW.properties /st_wptg_1.8.0.0.0jdk/3 2013/09/14 02:16:34 gmolloy Exp $
 
         BadMessageKey = \u627E\u4E0D\u5230\u5C0D\u61C9\u8A0A\u606F\u7D22\u5F15\u9375\u7684\u932F\u8AA4\u8A0A\u606F\u3002
         FormatFailed = \u683C\u5F0F\u5316\u4E0B\u5217\u8A0A\u606F\u6642\u767C\u751F\u5167\u90E8\u932F\u8AA4:\n
@@ -111,7 +111,7 @@
 
 #schema valid (3.X.3)
 
-        schema_reference.access = schema_reference: \u7121\u6CD5\u8B80\u53D6\u7DB1\u8981\u6587\u4EF6 ''{0}''\uFF0C\u56E0\u70BA\u4E0D\u5141\u8A31 ''{1}'' \u5B58\u53D6\u3002
+        schema_reference.access = schema_reference: \u7121\u6CD5\u8B80\u53D6\u7DB1\u8981\u6587\u4EF6 ''{0}''\uFF0C\u56E0\u70BA accessExternalSchema \u5C6C\u6027\u8A2D\u5B9A\u7684\u9650\u5236\uFF0C\u6240\u4EE5\u4E0D\u5141\u8A31 ''{1}'' \u5B58\u53D6\u3002
         schema_reference.4 = schema_reference.4: \u7121\u6CD5\u8B80\u53D6\u7DB1\u8981\u6587\u4EF6 ''{0}''\uFF0C\u56E0\u70BA 1) \u627E\u4E0D\u5230\u6587\u4EF6; 2) \u7121\u6CD5\u8B80\u53D6\u6587\u4EF6; 3) \u6587\u4EF6\u7684\u6839\u5143\u7D20\u4E0D\u662F <xsd:schema>\u3002
         src-annotation = src-annotation: <annotation> \u5143\u7D20\u50C5\u80FD\u5305\u542B <appinfo> \u8207 <documentation> \u5143\u7D20\uFF0C\u4F46\u627E\u5230 ''{0}''\u3002
         src-attribute.1 = src-attribute.1: \u5C6C\u6027 ''default'' \u8207 ''fixed'' \u4E0D\u53EF\u540C\u6642\u51FA\u73FE\u5728\u5C6C\u6027\u5BA3\u544A ''{0}'' \u4E2D\u3002\u8ACB\u53EA\u4F7F\u7528\u5176\u4E2D\u4E00\u500B\u3002
diff --git a/jaxp/src/com/sun/org/apache/xml/internal/dtm/ref/DTMAxisIterNodeList.java b/jaxp/src/com/sun/org/apache/xml/internal/dtm/ref/DTMAxisIterNodeList.java
index fa1da4f..1993bd6 100644
--- a/jaxp/src/com/sun/org/apache/xml/internal/dtm/ref/DTMAxisIterNodeList.java
+++ b/jaxp/src/com/sun/org/apache/xml/internal/dtm/ref/DTMAxisIterNodeList.java
@@ -105,15 +105,15 @@
      */
     public Node item(int index) {
         if (m_iter != null) {
-            int node;
+            int node = 0;
             int count = m_cachedNodes.size();
 
             if (count > index) {
                 node = m_cachedNodes.elementAt(index);
                 return m_dtm.getNode(node);
             } else if (m_last == -1) {
-                while (((node = m_iter.next()) != DTMAxisIterator.END)
-                           && count <= index) {
+                while (count <= index
+                        && ((node = m_iter.next()) != DTMAxisIterator.END)) {
                     m_cachedNodes.addElement(node);
                     count++;
                 }
diff --git a/jaxp/src/com/sun/org/apache/xml/internal/res/XMLErrorResources_de.java b/jaxp/src/com/sun/org/apache/xml/internal/res/XMLErrorResources_de.java
index ac19d0d..1d5d39a 100644
--- a/jaxp/src/com/sun/org/apache/xml/internal/res/XMLErrorResources_de.java
+++ b/jaxp/src/com/sun/org/apache/xml/internal/res/XMLErrorResources_de.java
@@ -18,7 +18,7 @@
  * limitations under the License.
  */
 /*
- * $Id: XMLErrorResources_de.java,v 1.2.4.1 2005/09/15 07:45:39 suresh_emailid Exp $
+ * $Id: XMLErrorResources_de.java /st_wptg_1.8.0.0.0jdk/2 2013/09/16 04:56:10 gmolloy Exp $
  */
 package com.sun.org.apache.xml.internal.res;
 
@@ -179,7 +179,7 @@
   // Error messages...
 
   /** The lookup table for error messages.   */
-  private static final Object[][] _contents = {
+  private static final Object[][] contents = {
 
   /** Error message ID that has a null message, but takes in a single object.    */
     {"ER0000" , "{0}" },
@@ -447,7 +447,7 @@
    */
 
     protected Object[][] getContents() {
-        return _contents;
+        return contents;
     }
 
 }
diff --git a/jaxp/src/com/sun/org/apache/xml/internal/res/XMLErrorResources_es.java b/jaxp/src/com/sun/org/apache/xml/internal/res/XMLErrorResources_es.java
index f35db36..a2ec7cf 100644
--- a/jaxp/src/com/sun/org/apache/xml/internal/res/XMLErrorResources_es.java
+++ b/jaxp/src/com/sun/org/apache/xml/internal/res/XMLErrorResources_es.java
@@ -18,7 +18,7 @@
  * limitations under the License.
  */
 /*
- * $Id: XMLErrorResources_es.java,v 1.2.4.1 2005/09/15 07:45:41 suresh_emailid Exp $
+ * $Id: XMLErrorResources_es.java /st_wptg_1.8.0.0.0jdk/2 2013/09/16 09:06:34 gmolloy Exp $
  */
 package com.sun.org.apache.xml.internal.res;
 
@@ -179,7 +179,7 @@
   // Error messages...
 
   /** The lookup table for error messages.   */
-  private static final Object[][] _contents = {
+  private static final Object[][] contents = {
 
   /** Error message ID that has a null message, but takes in a single object.    */
     {"ER0000" , "{0}" },
@@ -447,7 +447,7 @@
    */
 
     protected Object[][] getContents() {
-        return _contents;
+        return contents;
     }
 
 }
diff --git a/jaxp/src/com/sun/org/apache/xml/internal/res/XMLErrorResources_fr.java b/jaxp/src/com/sun/org/apache/xml/internal/res/XMLErrorResources_fr.java
index b5891d6..95d0282 100644
--- a/jaxp/src/com/sun/org/apache/xml/internal/res/XMLErrorResources_fr.java
+++ b/jaxp/src/com/sun/org/apache/xml/internal/res/XMLErrorResources_fr.java
@@ -18,7 +18,7 @@
  * limitations under the License.
  */
 /*
- * $Id: XMLErrorResources_fr.java,v 1.2.4.1 2005/09/15 07:45:41 suresh_emailid Exp $
+ * $Id: XMLErrorResources_fr.java /st_wptg_1.8.0.0.0jdk/2 2013/09/16 07:05:15 gmolloy Exp $
  */
 package com.sun.org.apache.xml.internal.res;
 
@@ -179,7 +179,7 @@
   // Error messages...
 
   /** The lookup table for error messages.   */
-  private static final Object[][] _contents = {
+  private static final Object[][] contents = {
 
   /** Error message ID that has a null message, but takes in a single object.    */
     {"ER0000" , "{0}" },
@@ -447,7 +447,7 @@
    */
 
     protected Object[][] getContents() {
-        return _contents;
+        return contents;
     }
 
 }
diff --git a/jaxp/src/com/sun/org/apache/xml/internal/res/XMLErrorResources_it.java b/jaxp/src/com/sun/org/apache/xml/internal/res/XMLErrorResources_it.java
index c7d01ff..ff457b5 100644
--- a/jaxp/src/com/sun/org/apache/xml/internal/res/XMLErrorResources_it.java
+++ b/jaxp/src/com/sun/org/apache/xml/internal/res/XMLErrorResources_it.java
@@ -18,7 +18,7 @@
  * limitations under the License.
  */
 /*
- * $Id: XMLErrorResources_it.java,v 1.2.4.1 2005/09/15 07:45:42 suresh_emailid Exp $
+ * $Id: XMLErrorResources_it.java /st_wptg_1.8.0.0.0jdk/2 2013/09/16 07:02:00 gmolloy Exp $
  */
 package com.sun.org.apache.xml.internal.res;
 
@@ -179,7 +179,7 @@
   // Error messages...
 
   /** The lookup table for error messages.   */
-  private static final Object[][] _contents = {
+  private static final Object[][] contents = {
 
   /** Error message ID that has a null message, but takes in a single object.    */
     {"ER0000" , "{0}" },
@@ -447,7 +447,7 @@
    */
 
     protected Object[][] getContents() {
-        return _contents;
+        return contents;
     }
 
 }
diff --git a/jaxp/src/com/sun/org/apache/xml/internal/res/XMLErrorResources_ja.java b/jaxp/src/com/sun/org/apache/xml/internal/res/XMLErrorResources_ja.java
index b1a811fb..2cb9734 100644
--- a/jaxp/src/com/sun/org/apache/xml/internal/res/XMLErrorResources_ja.java
+++ b/jaxp/src/com/sun/org/apache/xml/internal/res/XMLErrorResources_ja.java
@@ -18,7 +18,7 @@
  * limitations under the License.
  */
 /*
- * $Id: XMLErrorResources_ja.java,v 1.2.4.1 2005/09/15 07:45:42 suresh_emailid Exp $
+ * $Id: XMLErrorResources_ja.java /st_wptg_1.8.0.0.0jdk/2 2013/09/12 17:39:58 gmolloy Exp $
  */
 package com.sun.org.apache.xml.internal.res;
 
@@ -179,7 +179,7 @@
   // Error messages...
 
   /** The lookup table for error messages.   */
-  private static final Object[][] _contents = {
+  private static final Object[][] contents = {
 
   /** Error message ID that has a null message, but takes in a single object.    */
     {"ER0000" , "{0}" },
@@ -269,13 +269,13 @@
        "\u30B9\u30AD\u30FC\u30E0\u304CURI\u306B\u898B\u3064\u304B\u308A\u307E\u305B\u3093"},
 
     { ER_PATH_INVALID_CHAR,
-       "\u30D1\u30B9\u306B\u7121\u52B9\u6587\u5B57{0}\u304C\u542B\u307E\u308C\u3066\u3044\u307E\u3059"},
+       "\u30D1\u30B9\u306B\u7121\u52B9\u306A\u6587\u5B57\u304C\u542B\u307E\u308C\u3066\u3044\u307E\u3059: {0}"},
 
     { ER_SCHEME_FROM_NULL_STRING,
        "null\u6587\u5B57\u5217\u304B\u3089\u306F\u30B9\u30AD\u30FC\u30E0\u3092\u8A2D\u5B9A\u3067\u304D\u307E\u305B\u3093"},
 
     { ER_SCHEME_NOT_CONFORMANT,
-       "\u30B9\u30AD\u30FC\u30E0\u306F\u4E00\u81F4\u3057\u3066\u3044\u307E\u305B\u3093\u3002"},
+       "\u30B9\u30AD\u30FC\u30E0\u304C\u6574\u5408\u3057\u3066\u3044\u307E\u305B\u3093\u3002"},
 
     { ER_HOST_ADDRESS_NOT_WELLFORMED,
        "\u30DB\u30B9\u30C8\u306F\u6574\u5F62\u5F0F\u306E\u30A2\u30C9\u30EC\u30B9\u3067\u306F\u3042\u308A\u307E\u305B\u3093"},
@@ -397,7 +397,7 @@
       "\u7121\u52B9\u306AUTF-16\u30B5\u30ED\u30B2\u30FC\u30C8\u304C\u691C\u51FA\u3055\u308C\u307E\u3057\u305F: {0}\u3002" },
 
     {ER_OIERROR,
-      "\u5165\u51FA\u529B\u30A8\u30E9\u30FC" },
+      "IO\u30A8\u30E9\u30FC" },
 
     {ER_ILLEGAL_ATTRIBUTE_POSITION,
       "\u5B50\u30CE\u30FC\u30C9\u306E\u5F8C\u307E\u305F\u306F\u8981\u7D20\u304C\u751F\u6210\u3055\u308C\u308B\u524D\u306B\u5C5E\u6027{0}\u3092\u8FFD\u52A0\u3067\u304D\u307E\u305B\u3093\u3002\u5C5E\u6027\u306F\u7121\u8996\u3055\u308C\u307E\u3059\u3002"},
@@ -447,7 +447,7 @@
    */
 
     protected Object[][] getContents() {
-        return _contents;
+        return contents;
     }
 
 }
diff --git a/jaxp/src/com/sun/org/apache/xml/internal/res/XMLErrorResources_ko.java b/jaxp/src/com/sun/org/apache/xml/internal/res/XMLErrorResources_ko.java
index 9721569..75956dd 100644
--- a/jaxp/src/com/sun/org/apache/xml/internal/res/XMLErrorResources_ko.java
+++ b/jaxp/src/com/sun/org/apache/xml/internal/res/XMLErrorResources_ko.java
@@ -18,7 +18,7 @@
  * limitations under the License.
  */
 /*
- * $Id: XMLErrorResources_ko.java,v 1.2.4.1 2005/09/15 07:45:42 suresh_emailid Exp $
+ * $Id: XMLErrorResources_ko.java /st_wptg_1.8.0.0.0jdk/2 2013/09/16 02:31:34 gmolloy Exp $
  */
 package com.sun.org.apache.xml.internal.res;
 
@@ -179,7 +179,7 @@
   // Error messages...
 
   /** The lookup table for error messages.   */
-  private static final Object[][] _contents = {
+  private static final Object[][] contents = {
 
   /** Error message ID that has a null message, but takes in a single object.    */
     {"ER0000" , "{0}" },
@@ -447,7 +447,7 @@
    */
 
     protected Object[][] getContents() {
-        return _contents;
+        return contents;
     }
 
 }
diff --git a/jaxp/src/com/sun/org/apache/xml/internal/res/XMLErrorResources_pt_BR.java b/jaxp/src/com/sun/org/apache/xml/internal/res/XMLErrorResources_pt_BR.java
index 593f8b8..089dc43 100644
--- a/jaxp/src/com/sun/org/apache/xml/internal/res/XMLErrorResources_pt_BR.java
+++ b/jaxp/src/com/sun/org/apache/xml/internal/res/XMLErrorResources_pt_BR.java
@@ -9,7 +9,7 @@
  * you may not use this file except in compliance with the License.
  * You may obtain a copy of the License at
  *
- *      http://www.apache.org/licenses/LICENSE-2.0
+ *     http://www.apache.org/licenses/LICENSE-2.0
  *
  * Unless required by applicable law or agreed to in writing, software
  * distributed under the License is distributed on an "AS IS" BASIS,
@@ -17,9 +17,8 @@
  * See the License for the specific language governing permissions and
  * limitations under the License.
  */
-
 /*
- * $Id: XMLErrorResources_pt_BR.java 3023 2011-03-01 00:53:34Z joehw $
+ * $Id: XMLErrorResources_pt_BR.java /st_wptg_1.8.0.0.0jdk/2 2013/09/11 12:46:54 gmolloy Exp $
  */
 package com.sun.org.apache.xml.internal.res;
 
@@ -180,7 +179,7 @@
   // Error messages...
 
   /** The lookup table for error messages.   */
-  public static final Object[][] contents = {
+  private static final Object[][] contents = {
 
   /** Error message ID that has a null message, but takes in a single object.    */
     {"ER0000" , "{0}" },
@@ -216,7 +215,7 @@
       "\nINESPERADO: Parser doTerminate responde {0}"},
 
     { ER_NO_PARSE_CALL_WHILE_PARSING,
-      "o parse n\u00E3o pode ser chamado durante o parse"},
+      "o parsing n\u00E3o pode ser chamado durante o parsing"},
 
     { ER_TYPED_ITERATOR_AXIS_NOT_IMPLEMENTED,
       "Erro: iterador digitado para o eixo {0} n\u00E3o implementado"},
@@ -246,7 +245,7 @@
       "N\u00E3o foi poss\u00EDvel resolver o n\u00F3 para um handle"},
 
     { ER_STARTPARSE_WHILE_PARSING,
-       "startParse n\u00E3o pode ser chamado durante o parse"},
+       "startParse n\u00E3o pode ser chamado durante o parsing"},
 
     { ER_STARTPARSE_NEEDS_SAXPARSER,
        "startParse requer um SAXParser n\u00E3o nulo"},
@@ -261,7 +260,7 @@
        "O caminho cont\u00E9m uma sequ\u00EAncia inv\u00E1lida de caracteres de escape"},
 
     { ER_SCHEME_REQUIRED,
-       "\u00C9 necess\u00E1rio um esquema!"},
+       "O esquema \u00E9 obrigat\u00F3rio!"},
 
     { ER_NO_SCHEME_IN_URI,
        "Nenhum esquema encontrado no URI: {0}"},
@@ -300,7 +299,7 @@
       "O parser j\u00E1 est\u00E1 sendo usado"},
 
     { ER_CANNOT_CHANGE_WHILE_PARSING,
-      "N\u00E3o \u00E9 poss\u00EDvel alterar {0} {1} durante o parse"},
+      "N\u00E3o \u00E9 poss\u00EDvel alterar {0} {1} durante o parsing"},
 
     { ER_SELF_CAUSATION_NOT_PERMITTED,
       "Autoaverigua\u00E7\u00E3o n\u00E3o permitida"},
@@ -440,16 +439,7 @@
 
 
   };
-  private static final Object[][] msgCopy = new Object[contents.length][2];
-    // return a copy of contents; in theory we want a deep clone
-    // of contents, but since it only contains (immutable) Strings,
-    // this shallow copy is sufficient
-  static {
-        for (int i = 0; i < contents.length; i++) {
-            msgCopy[i][0] = contents[i][0];
-            msgCopy[i][1] = contents[i][1];
-        }
-  }
+
   /**
    * Get the association list.
    *
@@ -457,7 +447,7 @@
    */
 
     protected Object[][] getContents() {
-        return msgCopy;
+        return contents;
     }
 
 }
diff --git a/jaxp/src/com/sun/org/apache/xml/internal/res/XMLErrorResources_sv.java b/jaxp/src/com/sun/org/apache/xml/internal/res/XMLErrorResources_sv.java
index 4fa6a34..f464bed 100644
--- a/jaxp/src/com/sun/org/apache/xml/internal/res/XMLErrorResources_sv.java
+++ b/jaxp/src/com/sun/org/apache/xml/internal/res/XMLErrorResources_sv.java
@@ -18,7 +18,7 @@
  * limitations under the License.
  */
 /*
- * $Id: XMLErrorResources_sv.java,v 1.2.4.1 2005/09/15 07:45:46 suresh_emailid Exp $
+ * $Id: XMLErrorResources_sv.java /st_wptg_1.8.0.0.0jdk/2 2013/09/16 06:50:58 gmolloy Exp $
  */
 package com.sun.org.apache.xml.internal.res;
 
@@ -179,7 +179,7 @@
   // Error messages...
 
   /** The lookup table for error messages.   */
-  private static final Object[][] _contents = {
+  private static final Object[][] contents = {
 
   /** Error message ID that has a null message, but takes in a single object.    */
     {"ER0000" , "{0}" },
@@ -447,6 +447,7 @@
    */
 
     protected Object[][] getContents() {
-        return _contents;
+        return contents;
     }
+
 }
diff --git a/jaxp/src/com/sun/org/apache/xml/internal/res/XMLErrorResources_zh_CN.java b/jaxp/src/com/sun/org/apache/xml/internal/res/XMLErrorResources_zh_CN.java
index aa861e2..e846740 100644
--- a/jaxp/src/com/sun/org/apache/xml/internal/res/XMLErrorResources_zh_CN.java
+++ b/jaxp/src/com/sun/org/apache/xml/internal/res/XMLErrorResources_zh_CN.java
@@ -18,7 +18,7 @@
  * limitations under the License.
  */
 /*
- * $Id: XMLErrorResources_zh_CN.java,v 1.2.4.1 2005/09/15 07:45:47 suresh_emailid Exp $
+ * $Id: XMLErrorResources_zh_CN.java /st_wptg_1.8.0.0.0jdk/2 2013/09/16 04:44:25 gmolloy Exp $
  */
 package com.sun.org.apache.xml.internal.res;
 
@@ -179,7 +179,7 @@
   // Error messages...
 
   /** The lookup table for error messages.   */
-  private static final Object[][] _contents = {
+  private static final Object[][] contents = {
 
   /** Error message ID that has a null message, but takes in a single object.    */
     {"ER0000" , "{0}" },
@@ -447,7 +447,7 @@
    */
 
     protected Object[][] getContents() {
-        return _contents;
+        return contents;
     }
 
 }
diff --git a/jaxp/src/com/sun/org/apache/xml/internal/res/XMLErrorResources_zh_TW.java b/jaxp/src/com/sun/org/apache/xml/internal/res/XMLErrorResources_zh_TW.java
index 78df8fd..8c68bba 100644
--- a/jaxp/src/com/sun/org/apache/xml/internal/res/XMLErrorResources_zh_TW.java
+++ b/jaxp/src/com/sun/org/apache/xml/internal/res/XMLErrorResources_zh_TW.java
@@ -18,7 +18,7 @@
  * limitations under the License.
  */
 /*
- * $Id: XMLErrorResources_zh_TW.java,v 1.2.4.1 2005/09/15 07:45:48 suresh_emailid Exp $
+ * $Id: XMLErrorResources_zh_TW.java /st_wptg_1.8.0.0.0jdk/2 2013/09/14 02:16:34 gmolloy Exp $
  */
 package com.sun.org.apache.xml.internal.res;
 
@@ -179,7 +179,7 @@
   // Error messages...
 
   /** The lookup table for error messages.   */
-  private static final Object[][] _contents = {
+  private static final Object[][] contents = {
 
   /** Error message ID that has a null message, but takes in a single object.    */
     {"ER0000" , "{0}" },
@@ -447,7 +447,7 @@
    */
 
     protected Object[][] getContents() {
-        return _contents;
+        return contents;
     }
 
 }
diff --git a/jaxp/src/com/sun/org/apache/xml/internal/serializer/utils/SerializerMessages_de.java b/jaxp/src/com/sun/org/apache/xml/internal/serializer/utils/SerializerMessages_de.java
index 264a8c9..20e8a4d 100644
--- a/jaxp/src/com/sun/org/apache/xml/internal/serializer/utils/SerializerMessages_de.java
+++ b/jaxp/src/com/sun/org/apache/xml/internal/serializer/utils/SerializerMessages_de.java
@@ -3,7 +3,7 @@
  * DO NOT REMOVE OR ALTER!
  */
 /*
- * Copyright 1999-2004 The Apache Software Foundation.
+ * Copyright 2004 The Apache Software Foundation.
  *
  * Licensed under the Apache License, Version 2.0 (the "License");
  * you may not use this file except in compliance with the License.
@@ -18,105 +18,191 @@
  * limitations under the License.
  */
 /*
- * $Id: SerializerMessages_de.java,v 1.1.4.1 2005/09/08 11:03:12 suresh_emailid Exp $
+ * $Id: SerializerMessages_de.java /st_wptg_1.8.0.0.0jdk/2 2013/09/16 04:56:10 gmolloy Exp $
  */
-
 package com.sun.org.apache.xml.internal.serializer.utils;
 
 import java.util.ListResourceBundle;
+import java.util.Locale;
+import java.util.MissingResourceException;
+import java.util.ResourceBundle;
 
+/**
+ * An instance of this class is a ListResourceBundle that
+ * has the required getContents() method that returns
+ * an array of message-key/message associations.
+ * <p>
+ * The message keys are defined in {@link MsgKey}. The
+ * messages that those keys map to are defined here.
+ * <p>
+ * The messages in the English version are intended to be
+ * translated.
+ *
+ * This class is not a public API, it is only public because it is
+ * used in com.sun.org.apache.xml.internal.serializer.
+ *
+ * @xsl.usage internal
+ */
 public class SerializerMessages_de extends ListResourceBundle {
-  public Object[][] getContents() {
-    Object[][] contents =  new Object[][] {
-        // BAD_MSGKEY needs translation
-        // BAD_MSGFORMAT needs translation
-      { MsgKey.ER_SERIALIZER_NOT_CONTENTHANDLER,
-        "Die Parallel-Seriell-Umsetzerklasse ''{0}'' implementiert org.xml.sax.ContentHandler nicht."},
 
-      { MsgKey.ER_RESOURCE_COULD_NOT_FIND,
-        "Die Ressource [ {0} ] konnte nicht gefunden werden.\n {1}"},
+    /*
+     * This file contains error and warning messages related to
+     * Serializer Error Handling.
+     *
+     *  General notes to translators:
 
-      { MsgKey.ER_RESOURCE_COULD_NOT_LOAD,
-        "Die Ressource [ {0} ] konnte nicht geladen werden: {1} \n {2} \n {3}"},
+     *  1) A stylesheet is a description of how to transform an input XML document
+     *     into a resultant XML document (or HTML document or text).  The
+     *     stylesheet itself is described in the form of an XML document.
 
-      { MsgKey.ER_BUFFER_SIZE_LESSTHAN_ZERO,
-        "Puffergr\u00f6\u00dfe <=0"},
+     *
+     *  2) An element is a mark-up tag in an XML document; an attribute is a
+     *     modifier on the tag.  For example, in <elem attr='val' attr2='val2'>
+     *     "elem" is an element name, "attr" and "attr2" are attribute names with
+     *     the values "val" and "val2", respectively.
+     *
+     *  3) A namespace declaration is a special attribute that is used to associate
+     *     a prefix with a URI (the namespace).  The meanings of element names and
+     *     attribute names that use that prefix are defined with respect to that
+     *     namespace.
+     *
+     *
+     */
 
-      { MsgKey.ER_INVALID_UTF16_SURROGATE,
-        "Ung\u00fcltige UTF-16-Ersetzung festgestellt: {0} ?"},
+    /** The lookup table for error messages.   */
+    public Object[][] getContents() {
+        Object[][] contents = new Object[][] {
+            {   MsgKey.BAD_MSGKEY,
+                "Der Nachrichtenschl\u00FCssel \"{0}\" ist nicht in der Nachrichtenklasse \"{1}\" enthalten" },
 
-      { MsgKey.ER_OIERROR,
-        "E/A-Fehler"},
+            {   MsgKey.BAD_MSGFORMAT,
+                "Das Format der Nachricht \"{0}\" in der Nachrichtenklasse \"{1}\" war nicht erfolgreich." },
 
-      { MsgKey.ER_ILLEGAL_ATTRIBUTE_POSITION,
-        "Attribut {0} kann nicht nach Kindknoten oder vor dem Erstellen eines Elements hinzugef\u00fcgt werden.  Das Attribut wird ignoriert."},
+            {   MsgKey.ER_SERIALIZER_NOT_CONTENTHANDLER,
+                "Serializer-Klasse \"{0}\" implementiert org.xml.sax.ContentHandler nicht." },
 
-      { MsgKey.ER_NAMESPACE_PREFIX,
-        "Der Namensbereich f\u00fcr Pr\u00e4fix ''{0}'' wurde nicht deklariert."},
+            {   MsgKey.ER_RESOURCE_COULD_NOT_FIND,
+                    "Ressource [ {0} ] konnte nicht gefunden werden.\n {1}" },
 
-        // ER_STRAY_ATTRIBUTE needs translation
-      { MsgKey.ER_STRAY_NAMESPACE,
-        "Namensbereichsdeklaration ''{0}''=''{1}'' befindet sich nicht in einem Element."},
+            {   MsgKey.ER_RESOURCE_COULD_NOT_LOAD,
+                    "Ressource [ {0} ] konnte nicht geladen werden: {1} \n {2} \t {3}" },
 
-      { MsgKey.ER_COULD_NOT_LOAD_RESOURCE,
-        "''{0}'' konnte nicht geladen werden (CLASSPATH pr\u00fcfen); es werden die Standardwerte verwendet"},
+            {   MsgKey.ER_BUFFER_SIZE_LESSTHAN_ZERO,
+                    "Puffergr\u00F6\u00DFe <=0" },
 
-        // ER_ILLEGAL_CHARACTER needs translation
-      { MsgKey.ER_COULD_NOT_LOAD_METHOD_PROPERTY,
-        "Merkmaldatei ''{0}'' konnte f\u00fcr Ausgabemethode ''{1}'' nicht geladen werden (CLASSPATH pr\u00fcfen)"},
+            {   MsgKey.ER_INVALID_UTF16_SURROGATE,
+                    "Ung\u00FCltige UTF-16-Ersetzung festgestellt: {0}?" },
 
-      { MsgKey.ER_INVALID_PORT,
-        "Ung\u00fcltige Portnummer"},
+            {   MsgKey.ER_OIERROR,
+                "I/O-Fehler" },
 
-      { MsgKey.ER_PORT_WHEN_HOST_NULL,
-        "Der Port kann nicht festgelegt werden, wenn der Host gleich Null ist."},
+            {   MsgKey.ER_ILLEGAL_ATTRIBUTE_POSITION,
+                "Attribut {0} kann nicht nach untergeordneten Knoten oder vor dem Erstellen eines Elements hinzugef\u00FCgt werden. Attribut wird ignoriert." },
 
-      { MsgKey.ER_HOST_ADDRESS_NOT_WELLFORMED,
-        "Der Host ist keine syntaktisch korrekte Adresse."},
+            /*
+             * Note to translators:  The stylesheet contained a reference to a
+             * namespace prefix that was undefined.  The value of the substitution
+             * text is the name of the prefix.
+             */
+            {   MsgKey.ER_NAMESPACE_PREFIX,
+                "Namespace f\u00FCr Pr\u00E4fix \"{0}\" wurde nicht deklariert." },
 
-      { MsgKey.ER_SCHEME_NOT_CONFORMANT,
-        "Das Schema ist nicht angepasst."},
+            /*
+             * Note to translators:  This message is reported if the stylesheet
+             * being processed attempted to construct an XML document with an
+             * attribute in a place other than on an element.  The substitution text
+             * specifies the name of the attribute.
+             */
+            {   MsgKey.ER_STRAY_ATTRIBUTE,
+                "Attribut \"{0}\" au\u00DFerhalb des Elements." },
 
-      { MsgKey.ER_SCHEME_FROM_NULL_STRING,
-        "Schema kann nicht von Nullzeichenfolge festgelegt werden."},
+            /*
+             * Note to translators:  As with the preceding message, a namespace
+             * declaration has the form of an attribute and is only permitted to
+             * appear on an element.  The substitution text {0} is the namespace
+             * prefix and {1} is the URI that was being used in the erroneous
+             * namespace declaration.
+             */
+            {   MsgKey.ER_STRAY_NAMESPACE,
+                "Namespace-Deklaration {0}={1} au\u00DFerhalb des Elements." },
 
-      { MsgKey.ER_PATH_CONTAINS_INVALID_ESCAPE_SEQUENCE,
-        "Der Pfad enth\u00e4lt eine ung\u00fcltige Escapezeichenfolge."},
+            {   MsgKey.ER_COULD_NOT_LOAD_RESOURCE,
+                "\"{0}\" konnte nicht geladen werden (CLASSPATH pr\u00FCfen). Die Standardwerte werden verwendet" },
 
-      { MsgKey.ER_PATH_INVALID_CHAR,
-        "Pfad enth\u00e4lt ung\u00fcltiges Zeichen: {0}."},
+            {   MsgKey.ER_ILLEGAL_CHARACTER,
+                "Versuch, Zeichen mit Integralwert {0} auszugeben, das nicht in der speziellen Ausgabecodierung von {1} dargestellt wird." },
 
-      { MsgKey.ER_FRAG_INVALID_CHAR,
-        "Fragment enth\u00e4lt ein ung\u00fcltiges Zeichen."},
+            {   MsgKey.ER_COULD_NOT_LOAD_METHOD_PROPERTY,
+                "Property-Datei \"{0}\" konnte f\u00FCr Ausgabemethode \"{1}\" nicht geladen werden (CLASSPATH pr\u00FCfen)" },
 
-      { MsgKey.ER_FRAG_WHEN_PATH_NULL,
-        "Fragment kann nicht festgelegt werden, wenn der Pfad gleich Null ist."},
+            {   MsgKey.ER_INVALID_PORT,
+                "Ung\u00FCltige Portnummer" },
 
-      { MsgKey.ER_FRAG_FOR_GENERIC_URI,
-        "Fragment kann nur f\u00fcr eine generische URI (Uniform Resource Identifier) festgelegt werden."},
+            {   MsgKey.ER_PORT_WHEN_HOST_NULL,
+                "Port kann nicht festgelegt werden, wenn der Host null ist" },
 
-      { MsgKey.ER_NO_SCHEME_IN_URI,
-        "Kein Schema gefunden in URI: {0}."},
+            {   MsgKey.ER_HOST_ADDRESS_NOT_WELLFORMED,
+                "Host ist keine wohlgeformte Adresse" },
 
-      { MsgKey.ER_CANNOT_INIT_URI_EMPTY_PARMS,
-        "URI (Uniform Resource Identifier) kann nicht mit leeren Parametern initialisiert werden."},
+            {   MsgKey.ER_SCHEME_NOT_CONFORMANT,
+                "Schema ist nicht konform." },
 
-      { MsgKey.ER_NO_FRAGMENT_STRING_IN_PATH,
-        "Fragment kann nicht im Pfad und im Fragment angegeben werden."},
+            {   MsgKey.ER_SCHEME_FROM_NULL_STRING,
+                "Schema kann nicht von Nullzeichenfolge festgelegt werden" },
 
-      { MsgKey.ER_NO_QUERY_STRING_IN_PATH,
-        "Abfragezeichenfolge kann nicht im Pfad und in der Abfragezeichenfolge angegeben werden."},
+            {   MsgKey.ER_PATH_CONTAINS_INVALID_ESCAPE_SEQUENCE,
+                "Pfad enth\u00E4lt eine ung\u00FCltige Escapesequenz" },
 
-      { MsgKey.ER_NO_PORT_IF_NO_HOST,
-        "Der Port kann nicht angegeben werden, wenn der Host nicht angegeben wurde."},
+            {   MsgKey.ER_PATH_INVALID_CHAR,
+                "Pfad enth\u00E4lt ung\u00FCltiges Zeichen: {0}" },
 
-      { MsgKey.ER_NO_USERINFO_IF_NO_HOST,
-        "Benutzerinformationen k\u00f6nnen nicht angegeben werden, wenn der Host nicht angegeben wurde."},
+            {   MsgKey.ER_FRAG_INVALID_CHAR,
+                "Fragment enth\u00E4lt ein ung\u00FCltiges Zeichen" },
 
-      { MsgKey.ER_SCHEME_REQUIRED,
-        "Schema ist erforderlich!"}
+            {   MsgKey.ER_FRAG_WHEN_PATH_NULL,
+                "Fragment kann nicht festgelegt werden, wenn der Pfad null ist" },
 
-    };
-    return contents;
-  }
+            {   MsgKey.ER_FRAG_FOR_GENERIC_URI,
+                "Fragment kann nur f\u00FCr einen generischen URI festgelegt werden" },
+
+            {   MsgKey.ER_NO_SCHEME_IN_URI,
+                "Kein Schema gefunden in URI" },
+
+            {   MsgKey.ER_CANNOT_INIT_URI_EMPTY_PARMS,
+                "URI kann nicht mit leeren Parametern initialisiert werden" },
+
+            {   MsgKey.ER_NO_FRAGMENT_STRING_IN_PATH,
+                "Fragment kann nicht im Pfad und im Fragment angegeben werden" },
+
+            {   MsgKey.ER_NO_QUERY_STRING_IN_PATH,
+                "Abfragezeichenfolge kann nicht im Pfad und in der Abfragezeichenfolge angegeben werden" },
+
+            {   MsgKey.ER_NO_PORT_IF_NO_HOST,
+                "Port kann nicht angegeben werden, wenn der Host nicht angegeben wurde" },
+
+            {   MsgKey.ER_NO_USERINFO_IF_NO_HOST,
+                "Benutzerinformationen k\u00F6nnen nicht angegeben werden, wenn der Host nicht angegeben wurde" },
+
+            {   MsgKey.ER_XML_VERSION_NOT_SUPPORTED,
+                "Warnung: Die Version des Ausgabedokuments soll \"{0}\" sein. Diese Version von XML wird nicht unterst\u00FCtzt. Die Version des Ausgabedokuments wird \"1.0\" sein." },
+
+            {   MsgKey.ER_SCHEME_REQUIRED,
+                "Schema ist erforderlich." },
+
+            /*
+             * Note to translators:  The words 'Properties' and
+             * 'SerializerFactory' in this message are Java class names
+             * and should not be translated.
+             */
+            {   MsgKey.ER_FACTORY_PROPERTY_MISSING,
+                "Das an die SerializerFactory \u00FCbergebene Properties-Objekt verf\u00FCgt \u00FCber keine Eigenschaft \"{0}\"." },
+
+            {   MsgKey.ER_ENCODING_NOT_SUPPORTED,
+                "Warnung: Die Codierung \"{0}\" wird nicht von der Java-Laufzeit unterst\u00FCtzt." },
+
+
+        };
+
+        return contents;
+    }
 }
diff --git a/jaxp/src/com/sun/org/apache/xml/internal/serializer/utils/SerializerMessages_es.java b/jaxp/src/com/sun/org/apache/xml/internal/serializer/utils/SerializerMessages_es.java
index 8cec0b3..4628321 100644
--- a/jaxp/src/com/sun/org/apache/xml/internal/serializer/utils/SerializerMessages_es.java
+++ b/jaxp/src/com/sun/org/apache/xml/internal/serializer/utils/SerializerMessages_es.java
@@ -3,7 +3,7 @@
  * DO NOT REMOVE OR ALTER!
  */
 /*
- * Copyright 1999-2004 The Apache Software Foundation.
+ * Copyright 2004 The Apache Software Foundation.
  *
  * Licensed under the Apache License, Version 2.0 (the "License");
  * you may not use this file except in compliance with the License.
@@ -18,105 +18,191 @@
  * limitations under the License.
  */
 /*
- * $Id: SerializerMessages_es.java,v 1.1.4.1 2005/09/08 11:03:13 suresh_emailid Exp $
+ * $Id: SerializerMessages_es.java /st_wptg_1.8.0.0.0jdk/2 2013/09/16 09:06:34 gmolloy Exp $
  */
-
 package com.sun.org.apache.xml.internal.serializer.utils;
 
 import java.util.ListResourceBundle;
+import java.util.Locale;
+import java.util.MissingResourceException;
+import java.util.ResourceBundle;
 
+/**
+ * An instance of this class is a ListResourceBundle that
+ * has the required getContents() method that returns
+ * an array of message-key/message associations.
+ * <p>
+ * The message keys are defined in {@link MsgKey}. The
+ * messages that those keys map to are defined here.
+ * <p>
+ * The messages in the English version are intended to be
+ * translated.
+ *
+ * This class is not a public API, it is only public because it is
+ * used in com.sun.org.apache.xml.internal.serializer.
+ *
+ * @xsl.usage internal
+ */
 public class SerializerMessages_es extends ListResourceBundle {
-  public Object[][] getContents() {
-    Object[][] contents =  new Object[][] {
-        // BAD_MSGKEY needs translation
-        // BAD_MSGFORMAT needs translation
-      { MsgKey.ER_SERIALIZER_NOT_CONTENTHANDLER,
-        "La clase serializer ''{0}'' no implementa org.xml.sax.ContentHandler."},
 
-      { MsgKey.ER_RESOURCE_COULD_NOT_FIND,
-        "No se ha podido cargar el recurso [ {0} ].\n{1}"},
+    /*
+     * This file contains error and warning messages related to
+     * Serializer Error Handling.
+     *
+     *  General notes to translators:
 
-      { MsgKey.ER_RESOURCE_COULD_NOT_LOAD,
-        "No se ha podido cargar el recurso [ {0} ]: {1} \n {2} \n {3}"},
+     *  1) A stylesheet is a description of how to transform an input XML document
+     *     into a resultant XML document (or HTML document or text).  The
+     *     stylesheet itself is described in the form of an XML document.
 
-      { MsgKey.ER_BUFFER_SIZE_LESSTHAN_ZERO,
-        "Tama\u00f1o de almacenamiento intermedio <=0"},
+     *
+     *  2) An element is a mark-up tag in an XML document; an attribute is a
+     *     modifier on the tag.  For example, in <elem attr='val' attr2='val2'>
+     *     "elem" is an element name, "attr" and "attr2" are attribute names with
+     *     the values "val" and "val2", respectively.
+     *
+     *  3) A namespace declaration is a special attribute that is used to associate
+     *     a prefix with a URI (the namespace).  The meanings of element names and
+     *     attribute names that use that prefix are defined with respect to that
+     *     namespace.
+     *
+     *
+     */
 
-      { MsgKey.ER_INVALID_UTF16_SURROGATE,
-        "\u00bfSe ha detectado un sustituto UTF-16 no v\u00e1lido: {0}?"},
+    /** The lookup table for error messages.   */
+    public Object[][] getContents() {
+        Object[][] contents = new Object[][] {
+            {   MsgKey.BAD_MSGKEY,
+                "La clave de mensaje ''{0}'' no est\u00E1 en la clase de mensaje ''{1}''" },
 
-      { MsgKey.ER_OIERROR,
-        "Error de ES"},
+            {   MsgKey.BAD_MSGFORMAT,
+                "Fallo de formato del mensaje ''{0}'' en la clase de mensaje ''{1}''." },
 
-      { MsgKey.ER_ILLEGAL_ATTRIBUTE_POSITION,
-        "No se puede a\u00f1adir el atributo {0} despu\u00e9s de nodos hijo o antes de que se produzca un elemento. Se ignorar\u00e1 el atributo."},
+            {   MsgKey.ER_SERIALIZER_NOT_CONTENTHANDLER,
+                "La clase de serializador ''{0}'' no implanta org.xml.sax.ContentHandler." },
 
-      { MsgKey.ER_NAMESPACE_PREFIX,
-        "No se ha declarado el espacio de nombres para el prefijo ''{0}''."},
+            {   MsgKey.ER_RESOURCE_COULD_NOT_FIND,
+                    "No se ha encontrado el recurso [ {0} ].\n {1}" },
 
-        // ER_STRAY_ATTRIBUTE needs translation
-      { MsgKey.ER_STRAY_NAMESPACE,
-        "Declaraci\u00f3n del espacio de nombres ''{0}''=''{1}'' fuera del elemento."},
+            {   MsgKey.ER_RESOURCE_COULD_NOT_LOAD,
+                    "No se ha podido cargar el recurso [ {0} ]: {1} \n {2} \t {3}" },
 
-      { MsgKey.ER_COULD_NOT_LOAD_RESOURCE,
-        "No se ha podido cargar ''{0}'' (compruebe la CLASSPATH), ahora s\u00f3lo se est\u00e1n utilizando los valores por omisi\u00f3n"},
+            {   MsgKey.ER_BUFFER_SIZE_LESSTHAN_ZERO,
+                    "Tama\u00F1o de buffer menor o igual que 0" },
 
-        // ER_ILLEGAL_CHARACTER needs translation
-      { MsgKey.ER_COULD_NOT_LOAD_METHOD_PROPERTY,
-        "No se ha podido cargar el archivo de propiedades ''{0}'' para el m\u00e9todo de salida ''{1}'' (compruebe la CLASSPATH)"},
+            {   MsgKey.ER_INVALID_UTF16_SURROGATE,
+                    "\u00BFSe ha detectado un sustituto UTF-16 no v\u00E1lido: {0}?" },
 
-      { MsgKey.ER_INVALID_PORT,
-        "N\u00famero de puerto no v\u00e1lido"},
+            {   MsgKey.ER_OIERROR,
+                "Error de E/S" },
 
-      { MsgKey.ER_PORT_WHEN_HOST_NULL,
-        "No se puede establecer el puerto si el sistema principal es nulo"},
+            {   MsgKey.ER_ILLEGAL_ATTRIBUTE_POSITION,
+                "No se puede agregar el atributo {0} despu\u00E9s de nodos secundarios o antes de que se produzca un elemento. Se ignorar\u00E1 el atributo." },
 
-      { MsgKey.ER_HOST_ADDRESS_NOT_WELLFORMED,
-        "El sistema principal no es una direcci\u00f3n bien formada"},
+            /*
+             * Note to translators:  The stylesheet contained a reference to a
+             * namespace prefix that was undefined.  The value of the substitution
+             * text is the name of the prefix.
+             */
+            {   MsgKey.ER_NAMESPACE_PREFIX,
+                "No se ha declarado el espacio de nombres para el prefijo ''{0}''." },
 
-      { MsgKey.ER_SCHEME_NOT_CONFORMANT,
-        "El esquema no es compatible."},
+            /*
+             * Note to translators:  This message is reported if the stylesheet
+             * being processed attempted to construct an XML document with an
+             * attribute in a place other than on an element.  The substitution text
+             * specifies the name of the attribute.
+             */
+            {   MsgKey.ER_STRAY_ATTRIBUTE,
+                "El atributo ''{0}'' est\u00E1 fuera del elemento." },
 
-      { MsgKey.ER_SCHEME_FROM_NULL_STRING,
-        "No se puede establecer un esquema de una serie nula"},
+            /*
+             * Note to translators:  As with the preceding message, a namespace
+             * declaration has the form of an attribute and is only permitted to
+             * appear on an element.  The substitution text {0} is the namespace
+             * prefix and {1} is the URI that was being used in the erroneous
+             * namespace declaration.
+             */
+            {   MsgKey.ER_STRAY_NAMESPACE,
+                "Declaraci\u00F3n del espacio de nombres ''{0}''=''{1}'' fuera del elemento." },
 
-      { MsgKey.ER_PATH_CONTAINS_INVALID_ESCAPE_SEQUENCE,
-        "La v\u00eda de acceso contiene una secuencia de escape no v\u00e1lida"},
+            {   MsgKey.ER_COULD_NOT_LOAD_RESOURCE,
+                "No se ha podido cargar ''{0}'' (compruebe la CLASSPATH), ahora s\u00F3lo se est\u00E1n utilizando los valores por defecto" },
 
-      { MsgKey.ER_PATH_INVALID_CHAR,
-        "La v\u00eda de acceso contiene un car\u00e1cter no v\u00e1lido: {0}"},
+            {   MsgKey.ER_ILLEGAL_CHARACTER,
+                "Intento de realizar la salida del car\u00E1cter del valor integral {0}, que no est\u00E1 representado en la codificaci\u00F3n de salida de {1}." },
 
-      { MsgKey.ER_FRAG_INVALID_CHAR,
-        "El fragmento contiene un car\u00e1cter no v\u00e1lido"},
+            {   MsgKey.ER_COULD_NOT_LOAD_METHOD_PROPERTY,
+                "No se ha podido cargar el archivo de propiedades ''{0}'' para el m\u00E9todo de salida ''{1}'' (compruebe la CLASSPATH)" },
 
-      { MsgKey.ER_FRAG_WHEN_PATH_NULL,
-        "No se puede establecer el fragmento si la v\u00eda de acceso es nula"},
+            {   MsgKey.ER_INVALID_PORT,
+                "N\u00FAmero de puerto no v\u00E1lido" },
 
-      { MsgKey.ER_FRAG_FOR_GENERIC_URI,
-        "S\u00f3lo se puede establecer el fragmento para un URI gen\u00e9rico"},
+            {   MsgKey.ER_PORT_WHEN_HOST_NULL,
+                "No se puede definir el puerto si el host es nulo" },
 
-      { MsgKey.ER_NO_SCHEME_IN_URI,
-        "No se ha encontrado un esquema en el URI: {0}"},
+            {   MsgKey.ER_HOST_ADDRESS_NOT_WELLFORMED,
+                "El formato de la direcci\u00F3n de host no es correcto" },
 
-      { MsgKey.ER_CANNOT_INIT_URI_EMPTY_PARMS,
-        "No se puede inicializar el URI con par\u00e1metros vac\u00edos"},
+            {   MsgKey.ER_SCHEME_NOT_CONFORMANT,
+                "El esquema no es v\u00E1lido." },
 
-      { MsgKey.ER_NO_FRAGMENT_STRING_IN_PATH,
-        "No se puede especificar el fragmento en la v\u00eda de acceso y en el fragmento"},
+            {   MsgKey.ER_SCHEME_FROM_NULL_STRING,
+                "No se puede definir un esquema a partir de una cadena nula" },
 
-      { MsgKey.ER_NO_QUERY_STRING_IN_PATH,
-        "No se puede especificar la serie de consulta en la v\u00eda de acceso y en la serie de consulta"},
+            {   MsgKey.ER_PATH_CONTAINS_INVALID_ESCAPE_SEQUENCE,
+                "La ruta de acceso contiene una secuencia de escape no v\u00E1lida" },
 
-      { MsgKey.ER_NO_PORT_IF_NO_HOST,
-        "No se puede especificar el puerto si no se ha especificado el sistema principal"},
+            {   MsgKey.ER_PATH_INVALID_CHAR,
+                "La ruta de acceso contiene un car\u00E1cter no v\u00E1lido: {0}" },
 
-      { MsgKey.ER_NO_USERINFO_IF_NO_HOST,
-        "No se puede especificar la informaci\u00f3n de usuario si no se ha especificado el sistema principal"},
+            {   MsgKey.ER_FRAG_INVALID_CHAR,
+                "El fragmento contiene un car\u00E1cter no v\u00E1lido" },
 
-      { MsgKey.ER_SCHEME_REQUIRED,
-        "\u00a1Se necesita un esquema!"}
+            {   MsgKey.ER_FRAG_WHEN_PATH_NULL,
+                "No se puede definir el fragmento si la ruta de acceso es nula" },
 
-    };
-    return contents;
-  }
+            {   MsgKey.ER_FRAG_FOR_GENERIC_URI,
+                "S\u00F3lo se puede definir el fragmento para un URI gen\u00E9rico" },
+
+            {   MsgKey.ER_NO_SCHEME_IN_URI,
+                "No se ha encontrado un esquema en el URI" },
+
+            {   MsgKey.ER_CANNOT_INIT_URI_EMPTY_PARMS,
+                "No se puede inicializar el URI con par\u00E1metros vac\u00EDos" },
+
+            {   MsgKey.ER_NO_FRAGMENT_STRING_IN_PATH,
+                "No se puede especificar el fragmento en la ruta de acceso y en el fragmento" },
+
+            {   MsgKey.ER_NO_QUERY_STRING_IN_PATH,
+                "No se puede especificar la cadena de consulta en la ruta de acceso y en la cadena de consulta" },
+
+            {   MsgKey.ER_NO_PORT_IF_NO_HOST,
+                "No se puede especificar el puerto si no se ha especificado el host" },
+
+            {   MsgKey.ER_NO_USERINFO_IF_NO_HOST,
+                "No se puede especificar la informaci\u00F3n de usuario si no se ha especificado el host" },
+
+            {   MsgKey.ER_XML_VERSION_NOT_SUPPORTED,
+                "Advertencia: es necesario que la versi\u00F3n del documento de salida sea ''{0}''. Esta versi\u00F3n de XML no est\u00E1 soportada. La versi\u00F3n del documento de salida ser\u00E1 ''1.0''." },
+
+            {   MsgKey.ER_SCHEME_REQUIRED,
+                "Se necesita un esquema." },
+
+            /*
+             * Note to translators:  The words 'Properties' and
+             * 'SerializerFactory' in this message are Java class names
+             * and should not be translated.
+             */
+            {   MsgKey.ER_FACTORY_PROPERTY_MISSING,
+                "El objeto de propiedades transferido a SerializerFactory no tiene una propiedad ''{0}''." },
+
+            {   MsgKey.ER_ENCODING_NOT_SUPPORTED,
+                "Advertencia: el tiempo de ejecuci\u00F3n de Java no soporta la codificaci\u00F3n ''{0}''." },
+
+
+        };
+
+        return contents;
+    }
 }
diff --git a/jaxp/src/com/sun/org/apache/xml/internal/serializer/utils/SerializerMessages_fr.java b/jaxp/src/com/sun/org/apache/xml/internal/serializer/utils/SerializerMessages_fr.java
index c46cd0f..97fb91f 100644
--- a/jaxp/src/com/sun/org/apache/xml/internal/serializer/utils/SerializerMessages_fr.java
+++ b/jaxp/src/com/sun/org/apache/xml/internal/serializer/utils/SerializerMessages_fr.java
@@ -3,7 +3,7 @@
  * DO NOT REMOVE OR ALTER!
  */
 /*
- * Copyright 1999-2004 The Apache Software Foundation.
+ * Copyright 2004 The Apache Software Foundation.
  *
  * Licensed under the Apache License, Version 2.0 (the "License");
  * you may not use this file except in compliance with the License.
@@ -18,105 +18,191 @@
  * limitations under the License.
  */
 /*
- * $Id: SerializerMessages_fr.java,v 1.1.4.1 2005/09/08 11:03:13 suresh_emailid Exp $
+ * $Id: SerializerMessages_fr.java /st_wptg_1.8.0.0.0jdk/2 2013/09/16 07:05:15 gmolloy Exp $
  */
-
 package com.sun.org.apache.xml.internal.serializer.utils;
 
 import java.util.ListResourceBundle;
+import java.util.Locale;
+import java.util.MissingResourceException;
+import java.util.ResourceBundle;
 
+/**
+ * An instance of this class is a ListResourceBundle that
+ * has the required getContents() method that returns
+ * an array of message-key/message associations.
+ * <p>
+ * The message keys are defined in {@link MsgKey}. The
+ * messages that those keys map to are defined here.
+ * <p>
+ * The messages in the English version are intended to be
+ * translated.
+ *
+ * This class is not a public API, it is only public because it is
+ * used in com.sun.org.apache.xml.internal.serializer.
+ *
+ * @xsl.usage internal
+ */
 public class SerializerMessages_fr extends ListResourceBundle {
-  public Object[][] getContents() {
-    Object[][] contents =  new Object[][] {
-        // BAD_MSGKEY needs translation
-        // BAD_MSGFORMAT needs translation
-      { MsgKey.ER_SERIALIZER_NOT_CONTENTHANDLER,
-        "La classe de la m\u00e9thode de s\u00e9rialisation ''{0}'' n''impl\u00e9mente pas org.xml.sax.ContentHandler."},
 
-      { MsgKey.ER_RESOURCE_COULD_NOT_FIND,
-        "La ressource [ {0} ] est introuvable.\n {1}"},
+    /*
+     * This file contains error and warning messages related to
+     * Serializer Error Handling.
+     *
+     *  General notes to translators:
 
-      { MsgKey.ER_RESOURCE_COULD_NOT_LOAD,
-        "La ressource [ {0} ] n''a pas pu charger : {1} \n {2} \n {3}"},
+     *  1) A stylesheet is a description of how to transform an input XML document
+     *     into a resultant XML document (or HTML document or text).  The
+     *     stylesheet itself is described in the form of an XML document.
 
-      { MsgKey.ER_BUFFER_SIZE_LESSTHAN_ZERO,
-        "Taille du tampon <=0"},
+     *
+     *  2) An element is a mark-up tag in an XML document; an attribute is a
+     *     modifier on the tag.  For example, in <elem attr='val' attr2='val2'>
+     *     "elem" is an element name, "attr" and "attr2" are attribute names with
+     *     the values "val" and "val2", respectively.
+     *
+     *  3) A namespace declaration is a special attribute that is used to associate
+     *     a prefix with a URI (the namespace).  The meanings of element names and
+     *     attribute names that use that prefix are defined with respect to that
+     *     namespace.
+     *
+     *
+     */
 
-      { MsgKey.ER_INVALID_UTF16_SURROGATE,
-        "Substitut UTF-16 non valide d\u00e9tect\u00e9 : {0} ?"},
+    /** The lookup table for error messages.   */
+    public Object[][] getContents() {
+        Object[][] contents = new Object[][] {
+            {   MsgKey.BAD_MSGKEY,
+                "La cl\u00E9 de message ''{0}'' ne figure pas dans la classe de messages ''{1}''" },
 
-      { MsgKey.ER_OIERROR,
-        "Erreur d''E-S"},
+            {   MsgKey.BAD_MSGFORMAT,
+                "Echec du format de message ''{0}'' dans la classe de messages ''{1}''." },
 
-      { MsgKey.ER_ILLEGAL_ATTRIBUTE_POSITION,
-        "Ajout impossible de l''attribut {0} apr\u00e8s des noeuds enfants ou avant la production d''un \u00e9l\u00e9ment.  L''attribut est ignor\u00e9."},
+            {   MsgKey.ER_SERIALIZER_NOT_CONTENTHANDLER,
+                "La classe de serializer ''{0}'' n''impl\u00E9mente pas org.xml.sax.ContentHandler." },
 
-      { MsgKey.ER_NAMESPACE_PREFIX,
-        "L''espace de noms du pr\u00e9fixe ''{0}'' n''a pas \u00e9t\u00e9 d\u00e9clar\u00e9."},
+            {   MsgKey.ER_RESOURCE_COULD_NOT_FIND,
+                    "La ressource [ {0} ] est introuvable.\n {1}" },
 
-        // ER_STRAY_ATTRIBUTE needs translation
-      { MsgKey.ER_STRAY_NAMESPACE,
-        "La d\u00e9claration d''espace de noms ''{0}''=''{1}'' est \u00e0 l''ext\u00e9rieur de l''\u00e9l\u00e9ment."},
+            {   MsgKey.ER_RESOURCE_COULD_NOT_LOAD,
+                    "La ressource [ {0} ] n''a pas pu charger : {1} \n {2} \t {3}" },
 
-      { MsgKey.ER_COULD_NOT_LOAD_RESOURCE,
-        "Impossible de charger ''{0}'' (v\u00e9rifier CLASSPATH), les valeurs par d\u00e9faut sont donc employ\u00e9es "},
+            {   MsgKey.ER_BUFFER_SIZE_LESSTHAN_ZERO,
+                    "Taille du tampon <=0" },
 
-        // ER_ILLEGAL_CHARACTER needs translation
-      { MsgKey.ER_COULD_NOT_LOAD_METHOD_PROPERTY,
-        "Impossible de charger le fichier de propri\u00e9t\u00e9s ''{0}'' pour la m\u00e9thode de sortie ''{1}'' (v\u00e9rifier CLASSPATH)"},
+            {   MsgKey.ER_INVALID_UTF16_SURROGATE,
+                    "Substitut UTF-16 non valide d\u00E9tect\u00E9 : {0} ?" },
 
-      { MsgKey.ER_INVALID_PORT,
-        "Num\u00e9ro de port non valide"},
+            {   MsgKey.ER_OIERROR,
+                "Erreur d'E/S" },
 
-      { MsgKey.ER_PORT_WHEN_HOST_NULL,
-        "Le port ne peut \u00eatre d\u00e9fini quand l'h\u00f4te est vide"},
+            {   MsgKey.ER_ILLEGAL_ATTRIBUTE_POSITION,
+                "Impossible d''ajouter l''attribut {0} apr\u00E8s des noeuds enfant ou avant la production d''un \u00E9l\u00E9ment. L''attribut est ignor\u00E9." },
 
-      { MsgKey.ER_HOST_ADDRESS_NOT_WELLFORMED,
-        "L'h\u00f4te n'est pas une adresse bien form\u00e9e"},
+            /*
+             * Note to translators:  The stylesheet contained a reference to a
+             * namespace prefix that was undefined.  The value of the substitution
+             * text is the name of the prefix.
+             */
+            {   MsgKey.ER_NAMESPACE_PREFIX,
+                "L''espace de noms du pr\u00E9fixe ''{0}'' n''a pas \u00E9t\u00E9 d\u00E9clar\u00E9." },
 
-      { MsgKey.ER_SCHEME_NOT_CONFORMANT,
-        "Le processus n'est pas conforme."},
+            /*
+             * Note to translators:  This message is reported if the stylesheet
+             * being processed attempted to construct an XML document with an
+             * attribute in a place other than on an element.  The substitution text
+             * specifies the name of the attribute.
+             */
+            {   MsgKey.ER_STRAY_ATTRIBUTE,
+                "Attribut ''{0}'' en dehors de l''\u00E9l\u00E9ment." },
 
-      { MsgKey.ER_SCHEME_FROM_NULL_STRING,
-        "Impossible de d\u00e9finir le processus \u00e0 partir de la cha\u00eene vide"},
+            /*
+             * Note to translators:  As with the preceding message, a namespace
+             * declaration has the form of an attribute and is only permitted to
+             * appear on an element.  The substitution text {0} is the namespace
+             * prefix and {1} is the URI that was being used in the erroneous
+             * namespace declaration.
+             */
+            {   MsgKey.ER_STRAY_NAMESPACE,
+                "La d\u00E9claration d''espace de noms ''{0}''=''{1}'' est \u00E0 l''ext\u00E9rieur de l''\u00E9l\u00E9ment." },
 
-      { MsgKey.ER_PATH_CONTAINS_INVALID_ESCAPE_SEQUENCE,
-        "Le chemin d'acc\u00e8s contient une s\u00e9quence d'\u00e9chappement non valide"},
+            {   MsgKey.ER_COULD_NOT_LOAD_RESOURCE,
+                "Impossible de charger ''{0}'' (v\u00E9rifier CLASSPATH), les valeurs par d\u00E9faut sont donc employ\u00E9es" },
 
-      { MsgKey.ER_PATH_INVALID_CHAR,
-        "Le chemin contient un caract\u00e8re non valide : {0}"},
+            {   MsgKey.ER_ILLEGAL_CHARACTER,
+                "Tentative de sortie d''un caract\u00E8re avec une valeur enti\u00E8re {0}, non repr\u00E9sent\u00E9 dans l''encodage de sortie sp\u00E9cifi\u00E9 pour {1}." },
 
-      { MsgKey.ER_FRAG_INVALID_CHAR,
-        "Le fragment contient un caract\u00e8re non valide"},
+            {   MsgKey.ER_COULD_NOT_LOAD_METHOD_PROPERTY,
+                "Impossible de charger le fichier de propri\u00E9t\u00E9s ''{0}'' pour la m\u00E9thode de sortie ''{1}'' (v\u00E9rifier CLASSPATH)" },
 
-      { MsgKey.ER_FRAG_WHEN_PATH_NULL,
-        "Le fragment ne peut \u00eatre d\u00e9fini quand le chemin d'acc\u00e8s est vide"},
+            {   MsgKey.ER_INVALID_PORT,
+                "Num\u00E9ro de port non valide" },
 
-      { MsgKey.ER_FRAG_FOR_GENERIC_URI,
-        "Le fragment ne peut \u00eatre d\u00e9fini que pour un URI g\u00e9n\u00e9rique"},
+            {   MsgKey.ER_PORT_WHEN_HOST_NULL,
+                "Impossible de d\u00E9finir le port quand l'h\u00F4te est NULL" },
 
-      { MsgKey.ER_NO_SCHEME_IN_URI,
-        "Processus introuvable dans l''URI : {0}"},
+            {   MsgKey.ER_HOST_ADDRESS_NOT_WELLFORMED,
+                "Le format de l'adresse de l'h\u00F4te n'est pas correct" },
 
-      { MsgKey.ER_CANNOT_INIT_URI_EMPTY_PARMS,
-        "Impossible d'initialiser l'URI avec des param\u00e8tres vides"},
+            {   MsgKey.ER_SCHEME_NOT_CONFORMANT,
+                "Le mod\u00E8le n'est pas conforme." },
 
-      { MsgKey.ER_NO_FRAGMENT_STRING_IN_PATH,
-        "Le fragment ne doit pas \u00eatre indiqu\u00e9 \u00e0 la fois dans le chemin et dans le fragment"},
+            {   MsgKey.ER_SCHEME_FROM_NULL_STRING,
+                "Impossible de d\u00E9finir le mod\u00E8le \u00E0 partir de la cha\u00EEne NULL" },
 
-      { MsgKey.ER_NO_QUERY_STRING_IN_PATH,
-        "La cha\u00eene de requ\u00eate ne doit pas figurer dans un chemin et une cha\u00eene de requ\u00eate"},
+            {   MsgKey.ER_PATH_CONTAINS_INVALID_ESCAPE_SEQUENCE,
+                "Le chemin d'acc\u00E8s contient une s\u00E9quence d'\u00E9chappement non valide" },
 
-      { MsgKey.ER_NO_PORT_IF_NO_HOST,
-        "Le port peut ne pas \u00eatre sp\u00e9cifi\u00e9 si l'h\u00f4te n'est pas sp\u00e9cifi\u00e9"},
+            {   MsgKey.ER_PATH_INVALID_CHAR,
+                "Le chemin contient un caract\u00E8re non valide : {0}" },
 
-      { MsgKey.ER_NO_USERINFO_IF_NO_HOST,
-        "Userinfo ne peut \u00eatre sp\u00e9cifi\u00e9 si l'h\u00f4te ne l'est pas"},
+            {   MsgKey.ER_FRAG_INVALID_CHAR,
+                "Le fragment contient un caract\u00E8re non valide" },
 
-      { MsgKey.ER_SCHEME_REQUIRED,
-        "Processus requis !"}
+            {   MsgKey.ER_FRAG_WHEN_PATH_NULL,
+                "Impossible de d\u00E9finir le fragment quand le chemin d'acc\u00E8s est NULL" },
 
-    };
-    return contents;
-  }
+            {   MsgKey.ER_FRAG_FOR_GENERIC_URI,
+                "Le fragment ne peut \u00EAtre d\u00E9fini que pour un URI g\u00E9n\u00E9rique" },
+
+            {   MsgKey.ER_NO_SCHEME_IN_URI,
+                "Mod\u00E8le introuvable dans l'URI" },
+
+            {   MsgKey.ER_CANNOT_INIT_URI_EMPTY_PARMS,
+                "Impossible d'initialiser l'URI avec des param\u00E8tres vides" },
+
+            {   MsgKey.ER_NO_FRAGMENT_STRING_IN_PATH,
+                "Le fragment ne doit pas \u00EAtre indiqu\u00E9 \u00E0 la fois dans le chemin et dans le fragment" },
+
+            {   MsgKey.ER_NO_QUERY_STRING_IN_PATH,
+                "La cha\u00EEne de requ\u00EAte ne doit pas figurer dans un chemin et une cha\u00EEne de requ\u00EAte" },
+
+            {   MsgKey.ER_NO_PORT_IF_NO_HOST,
+                "Le port peut ne pas \u00EAtre sp\u00E9cifi\u00E9 si l'h\u00F4te ne l'est pas" },
+
+            {   MsgKey.ER_NO_USERINFO_IF_NO_HOST,
+                "Userinfo peut ne pas \u00EAtre sp\u00E9cifi\u00E9 si l'h\u00F4te ne l'est pas" },
+
+            {   MsgKey.ER_XML_VERSION_NOT_SUPPORTED,
+                "Avertissement : la version du document de sortie doit \u00EAtre ''{0}''. Cette version XML n''est pas prise en charge. La version du document de sortie sera ''1.0''." },
+
+            {   MsgKey.ER_SCHEME_REQUIRED,
+                "Mod\u00E8le obligatoire." },
+
+            /*
+             * Note to translators:  The words 'Properties' and
+             * 'SerializerFactory' in this message are Java class names
+             * and should not be translated.
+             */
+            {   MsgKey.ER_FACTORY_PROPERTY_MISSING,
+                "L''objet de propri\u00E9t\u00E9s transmis \u00E0 SerializerFactory ne comporte aucune propri\u00E9t\u00E9 ''{0}''." },
+
+            {   MsgKey.ER_ENCODING_NOT_SUPPORTED,
+                "Avertissement : l''encodage ''{0}'' n''est pas pris en charge par l''ex\u00E9cution Java." },
+
+
+        };
+
+        return contents;
+    }
 }
diff --git a/jaxp/src/com/sun/org/apache/xml/internal/serializer/utils/SerializerMessages_it.java b/jaxp/src/com/sun/org/apache/xml/internal/serializer/utils/SerializerMessages_it.java
index 8788cf9..6d3977a 100644
--- a/jaxp/src/com/sun/org/apache/xml/internal/serializer/utils/SerializerMessages_it.java
+++ b/jaxp/src/com/sun/org/apache/xml/internal/serializer/utils/SerializerMessages_it.java
@@ -3,7 +3,7 @@
  * DO NOT REMOVE OR ALTER!
  */
 /*
- * Copyright 1999-2004 The Apache Software Foundation.
+ * Copyright 2004 The Apache Software Foundation.
  *
  * Licensed under the Apache License, Version 2.0 (the "License");
  * you may not use this file except in compliance with the License.
@@ -18,105 +18,191 @@
  * limitations under the License.
  */
 /*
- * $Id: SerializerMessages_it.java,v 1.1.4.1 2005/09/08 11:03:15 suresh_emailid Exp $
+ * $Id: SerializerMessages_it.java /st_wptg_1.8.0.0.0jdk/2 2013/09/16 07:02:00 gmolloy Exp $
  */
-
 package com.sun.org.apache.xml.internal.serializer.utils;
 
 import java.util.ListResourceBundle;
+import java.util.Locale;
+import java.util.MissingResourceException;
+import java.util.ResourceBundle;
 
+/**
+ * An instance of this class is a ListResourceBundle that
+ * has the required getContents() method that returns
+ * an array of message-key/message associations.
+ * <p>
+ * The message keys are defined in {@link MsgKey}. The
+ * messages that those keys map to are defined here.
+ * <p>
+ * The messages in the English version are intended to be
+ * translated.
+ *
+ * This class is not a public API, it is only public because it is
+ * used in com.sun.org.apache.xml.internal.serializer.
+ *
+ * @xsl.usage internal
+ */
 public class SerializerMessages_it extends ListResourceBundle {
-  public Object[][] getContents() {
-    Object[][] contents =  new Object[][] {
-        // BAD_MSGKEY needs translation
-        // BAD_MSGFORMAT needs translation
-      { MsgKey.ER_SERIALIZER_NOT_CONTENTHANDLER,
-        "La classe serializer ''{0}'' non implementa org.xml.sax.ContentHandler."},
 
-      { MsgKey.ER_RESOURCE_COULD_NOT_FIND,
-        "Risorsa [ {0} ] non trovata.\n {1}"},
+    /*
+     * This file contains error and warning messages related to
+     * Serializer Error Handling.
+     *
+     *  General notes to translators:
 
-      { MsgKey.ER_RESOURCE_COULD_NOT_LOAD,
-        "Impossibile caricare la risorsa [ {0} ]: {1} \n {2} \n {3}"},
+     *  1) A stylesheet is a description of how to transform an input XML document
+     *     into a resultant XML document (or HTML document or text).  The
+     *     stylesheet itself is described in the form of an XML document.
 
-      { MsgKey.ER_BUFFER_SIZE_LESSTHAN_ZERO,
-        "Dimensione buffer <=0"},
+     *
+     *  2) An element is a mark-up tag in an XML document; an attribute is a
+     *     modifier on the tag.  For example, in <elem attr='val' attr2='val2'>
+     *     "elem" is an element name, "attr" and "attr2" are attribute names with
+     *     the values "val" and "val2", respectively.
+     *
+     *  3) A namespace declaration is a special attribute that is used to associate
+     *     a prefix with a URI (the namespace).  The meanings of element names and
+     *     attribute names that use that prefix are defined with respect to that
+     *     namespace.
+     *
+     *
+     */
 
-      { MsgKey.ER_INVALID_UTF16_SURROGATE,
-        "Rilevato surrogato UTF-16 non valido: {0} ?"},
+    /** The lookup table for error messages.   */
+    public Object[][] getContents() {
+        Object[][] contents = new Object[][] {
+            {   MsgKey.BAD_MSGKEY,
+                "La chiave di messaggio ''{0}'' non si trova nella classe messaggio ''{1}''" },
 
-      { MsgKey.ER_OIERROR,
-        "Errore IO"},
+            {   MsgKey.BAD_MSGFORMAT,
+                "Formato di messaggio ''{0}'' in classe messaggio ''{1}'' non riuscito." },
 
-      { MsgKey.ER_ILLEGAL_ATTRIBUTE_POSITION,
-        "Impossibile aggiungere l''attributo {0} dopo i nodi secondari o prima che sia prodotto un elemento. L''attributo verr\u00e0 ignorato. "},
+            {   MsgKey.ER_SERIALIZER_NOT_CONTENTHANDLER,
+                "La classe serializzatore ''{0}'' non implementa org.xml.sax.ContentHandler." },
 
-      { MsgKey.ER_NAMESPACE_PREFIX,
-        "Lo spazio nomi per il prefisso ''{0}'' non \u00e8 stato dichiarato. "},
+            {   MsgKey.ER_RESOURCE_COULD_NOT_FIND,
+                    "Risorsa [ {0} ] non trovata.\n {1}" },
 
-        // ER_STRAY_ATTRIBUTE needs translation
-      { MsgKey.ER_STRAY_NAMESPACE,
-        "Dichiarazione dello spazio nome ''{0}''=''{1}'' al di fuori dell''elemento. "},
+            {   MsgKey.ER_RESOURCE_COULD_NOT_LOAD,
+                    "Impossibile caricare la risorsa [ {0} ]: {1} \n {2} \t {3}" },
 
-      { MsgKey.ER_COULD_NOT_LOAD_RESOURCE,
-        "Impossibile caricare ''{0}'' (verificare CLASSPATH); verranno utilizzati i valori predefiniti "},
+            {   MsgKey.ER_BUFFER_SIZE_LESSTHAN_ZERO,
+                    "Dimensione buffer <=0" },
 
-        // ER_ILLEGAL_CHARACTER needs translation
-      { MsgKey.ER_COULD_NOT_LOAD_METHOD_PROPERTY,
-        "Impossibile caricare il file delle propriet\u00e0 ''{0}'' per il metodo di emissione ''{1}'' (verificare CLASSPATH)"},
+            {   MsgKey.ER_INVALID_UTF16_SURROGATE,
+                    "Rilevato surrogato UTF-16 non valido: {0}?" },
 
-      { MsgKey.ER_INVALID_PORT,
-        "Numero di porta non valido"},
+            {   MsgKey.ER_OIERROR,
+                "Errore di I/O" },
 
-      { MsgKey.ER_PORT_WHEN_HOST_NULL,
-        "La porta non pu\u00f2 essere impostata se l'host \u00e8 nullo"},
+            {   MsgKey.ER_ILLEGAL_ATTRIBUTE_POSITION,
+                "Impossibile aggiungere l''attributo {0} dopo i nodi figlio o prima che sia prodotto un elemento. L''attributo verr\u00E0 ignorato." },
 
-      { MsgKey.ER_HOST_ADDRESS_NOT_WELLFORMED,
-        "Host non \u00e8 un'indirizzo corretto"},
+            /*
+             * Note to translators:  The stylesheet contained a reference to a
+             * namespace prefix that was undefined.  The value of the substitution
+             * text is the name of the prefix.
+             */
+            {   MsgKey.ER_NAMESPACE_PREFIX,
+                "Lo spazio di nomi per il prefisso ''{0}'' non \u00E8 stato dichiarato." },
 
-      { MsgKey.ER_SCHEME_NOT_CONFORMANT,
-        "Lo schema non \u00e8 conforme."},
+            /*
+             * Note to translators:  This message is reported if the stylesheet
+             * being processed attempted to construct an XML document with an
+             * attribute in a place other than on an element.  The substitution text
+             * specifies the name of the attribute.
+             */
+            {   MsgKey.ER_STRAY_ATTRIBUTE,
+                "Attributo ''{0}'' al di fuori dell''elemento." },
 
-      { MsgKey.ER_SCHEME_FROM_NULL_STRING,
-        "Impossibile impostare lo schema da una stringa nulla"},
+            /*
+             * Note to translators:  As with the preceding message, a namespace
+             * declaration has the form of an attribute and is only permitted to
+             * appear on an element.  The substitution text {0} is the namespace
+             * prefix and {1} is the URI that was being used in the erroneous
+             * namespace declaration.
+             */
+            {   MsgKey.ER_STRAY_NAMESPACE,
+                "Dichiarazione dello spazio di nomi ''{0}''=''{1}'' al di fuori dell''elemento." },
 
-      { MsgKey.ER_PATH_CONTAINS_INVALID_ESCAPE_SEQUENCE,
-        "Il percorso contiene sequenza di escape non valida"},
+            {   MsgKey.ER_COULD_NOT_LOAD_RESOURCE,
+                "Impossibile caricare ''{0}'' (verificare CLASSPATH); verranno utilizzati i valori predefiniti" },
 
-      { MsgKey.ER_PATH_INVALID_CHAR,
-        "Il percorso contiene un carattere non valido: {0}"},
+            {   MsgKey.ER_ILLEGAL_CHARACTER,
+                "Tentativo di eseguire l''output di un carattere di valore integrale {0} non rappresentato nella codifica di output {1} specificata." },
 
-      { MsgKey.ER_FRAG_INVALID_CHAR,
-        "Il frammento contiene un carattere non valido"},
+            {   MsgKey.ER_COULD_NOT_LOAD_METHOD_PROPERTY,
+                "Impossibile caricare il file delle propriet\u00E0 ''{0}'' per il metodo di emissione ''{1}'' (verificare CLASSPATH)" },
 
-      { MsgKey.ER_FRAG_WHEN_PATH_NULL,
-        "Il frammento non pu\u00f2 essere impostato se il percorso \u00e8 nullo"},
+            {   MsgKey.ER_INVALID_PORT,
+                "Numero di porta non valido" },
 
-      { MsgKey.ER_FRAG_FOR_GENERIC_URI,
-        "Il frammento pu\u00f2 essere impostato solo per un URI generico"},
+            {   MsgKey.ER_PORT_WHEN_HOST_NULL,
+                "La porta non pu\u00F2 essere impostata se l'host \u00E8 nullo" },
 
-      { MsgKey.ER_NO_SCHEME_IN_URI,
-        "Nessuno schema trovato nell''URI: {0}"},
+            {   MsgKey.ER_HOST_ADDRESS_NOT_WELLFORMED,
+                "Host non \u00E8 un indirizzo corretto" },
 
-      { MsgKey.ER_CANNOT_INIT_URI_EMPTY_PARMS,
-        "Impossibile inizializzare l'URI con i parametri vuoti"},
+            {   MsgKey.ER_SCHEME_NOT_CONFORMANT,
+                "Lo schema non \u00E8 conforme." },
 
-      { MsgKey.ER_NO_FRAGMENT_STRING_IN_PATH,
-        "Il frammento non pu\u00f2 essere specificato sia nel percorso che nel frammento"},
+            {   MsgKey.ER_SCHEME_FROM_NULL_STRING,
+                "Impossibile impostare lo schema da una stringa nulla" },
 
-      { MsgKey.ER_NO_QUERY_STRING_IN_PATH,
-        "La stringa di interrogazione non pu\u00f2 essere specificata nella stringa di interrogazione e percorso."},
+            {   MsgKey.ER_PATH_CONTAINS_INVALID_ESCAPE_SEQUENCE,
+                "Il percorso contiene sequenza di escape non valida" },
 
-      { MsgKey.ER_NO_PORT_IF_NO_HOST,
-        "La porta non pu\u00f2 essere specificata se l'host non \u00e8 specificato"},
+            {   MsgKey.ER_PATH_INVALID_CHAR,
+                "Il percorso contiene un carattere non valido: {0}" },
 
-      { MsgKey.ER_NO_USERINFO_IF_NO_HOST,
-        "Userinfo non pu\u00f2 essere specificato se l'host non \u00e8 specificato"},
+            {   MsgKey.ER_FRAG_INVALID_CHAR,
+                "Il frammento contiene un carattere non valido" },
 
-      { MsgKey.ER_SCHEME_REQUIRED,
-        "Lo schema \u00e8 obbligatorio."}
+            {   MsgKey.ER_FRAG_WHEN_PATH_NULL,
+                "Il frammento non pu\u00F2 essere impostato se il percorso \u00E8 nullo" },
 
-    };
-    return contents;
-  }
+            {   MsgKey.ER_FRAG_FOR_GENERIC_URI,
+                "Il frammento pu\u00F2 essere impostato solo per un URI generico" },
+
+            {   MsgKey.ER_NO_SCHEME_IN_URI,
+                "Nessuno schema trovato nell'URI" },
+
+            {   MsgKey.ER_CANNOT_INIT_URI_EMPTY_PARMS,
+                "Impossibile inizializzare l'URI con i parametri vuoti" },
+
+            {   MsgKey.ER_NO_FRAGMENT_STRING_IN_PATH,
+                "Il frammento non pu\u00F2 essere specificato sia nel percorso che nel frammento" },
+
+            {   MsgKey.ER_NO_QUERY_STRING_IN_PATH,
+                "La stringa di query non pu\u00F2 essere specificata nella stringa di percorso e query." },
+
+            {   MsgKey.ER_NO_PORT_IF_NO_HOST,
+                "La porta non pu\u00F2 essere specificata se l'host non \u00E8 specificato" },
+
+            {   MsgKey.ER_NO_USERINFO_IF_NO_HOST,
+                "Userinfo non pu\u00F2 essere specificato se l'host non \u00E8 specificato" },
+
+            {   MsgKey.ER_XML_VERSION_NOT_SUPPORTED,
+                "Avvertenza: la versione del documento di output deve essere ''{0}''. Questa versione di XML non \u00E8 supportata. La versione del documento di output sar\u00E0 ''1.0''." },
+
+            {   MsgKey.ER_SCHEME_REQUIRED,
+                "Lo schema \u00E8 obbligatorio." },
+
+            /*
+             * Note to translators:  The words 'Properties' and
+             * 'SerializerFactory' in this message are Java class names
+             * and should not be translated.
+             */
+            {   MsgKey.ER_FACTORY_PROPERTY_MISSING,
+                "L''oggetto Properties passato a SerializerFactory non dispone di una propriet\u00E0 ''{0}''." },
+
+            {   MsgKey.ER_ENCODING_NOT_SUPPORTED,
+                "Avvertenza: la codifica ''{0}'' non \u00E8 supportata da Java Runtime." },
+
+
+        };
+
+        return contents;
+    }
 }
diff --git a/jaxp/src/com/sun/org/apache/xml/internal/serializer/utils/SerializerMessages_ja.java b/jaxp/src/com/sun/org/apache/xml/internal/serializer/utils/SerializerMessages_ja.java
index 1fd524f..069c9f8 100644
--- a/jaxp/src/com/sun/org/apache/xml/internal/serializer/utils/SerializerMessages_ja.java
+++ b/jaxp/src/com/sun/org/apache/xml/internal/serializer/utils/SerializerMessages_ja.java
@@ -3,7 +3,7 @@
  * DO NOT REMOVE OR ALTER!
  */
 /*
- * Copyright 1999-2004 The Apache Software Foundation.
+ * Copyright 2004 The Apache Software Foundation.
  *
  * Licensed under the Apache License, Version 2.0 (the "License");
  * you may not use this file except in compliance with the License.
@@ -18,105 +18,191 @@
  * limitations under the License.
  */
 /*
- * $Id: SerializerMessages_ja.java,v 1.1.4.1 2005/09/08 11:03:16 suresh_emailid Exp $
+ * $Id: SerializerMessages_ja.java /st_wptg_1.8.0.0.0jdk/2 2013/09/12 17:39:58 gmolloy Exp $
  */
-
 package com.sun.org.apache.xml.internal.serializer.utils;
 
 import java.util.ListResourceBundle;
+import java.util.Locale;
+import java.util.MissingResourceException;
+import java.util.ResourceBundle;
 
+/**
+ * An instance of this class is a ListResourceBundle that
+ * has the required getContents() method that returns
+ * an array of message-key/message associations.
+ * <p>
+ * The message keys are defined in {@link MsgKey}. The
+ * messages that those keys map to are defined here.
+ * <p>
+ * The messages in the English version are intended to be
+ * translated.
+ *
+ * This class is not a public API, it is only public because it is
+ * used in com.sun.org.apache.xml.internal.serializer.
+ *
+ * @xsl.usage internal
+ */
 public class SerializerMessages_ja extends ListResourceBundle {
-  public Object[][] getContents() {
-    Object[][] contents =  new Object[][] {
-        // BAD_MSGKEY needs translation
-        // BAD_MSGFORMAT needs translation
-      { MsgKey.ER_SERIALIZER_NOT_CONTENTHANDLER,
-        "\u30b7\u30ea\u30a2\u30e9\u30a4\u30b6\u30fc\u30fb\u30af\u30e9\u30b9 ''{0}'' \u306f org.xml.sax.ContentHandler \u3092\u30a4\u30f3\u30d7\u30ea\u30e1\u30f3\u30c8\u3057\u307e\u305b\u3093\u3002"},
 
-      { MsgKey.ER_RESOURCE_COULD_NOT_FIND,
-        "\u30ea\u30bd\u30fc\u30b9 [ {0} ] \u306f\u898b\u3064\u304b\u308a\u307e\u305b\u3093\u3067\u3057\u305f\u3002\n {1}"},
+    /*
+     * This file contains error and warning messages related to
+     * Serializer Error Handling.
+     *
+     *  General notes to translators:
 
-      { MsgKey.ER_RESOURCE_COULD_NOT_LOAD,
-        "\u30ea\u30bd\u30fc\u30b9 [ {0} ] \u3092\u30ed\u30fc\u30c9\u3067\u304d\u307e\u305b\u3093\u3067\u3057\u305f: {1} \n {2} \n {3}"},
+     *  1) A stylesheet is a description of how to transform an input XML document
+     *     into a resultant XML document (or HTML document or text).  The
+     *     stylesheet itself is described in the form of an XML document.
 
-      { MsgKey.ER_BUFFER_SIZE_LESSTHAN_ZERO,
-        "\u30d0\u30c3\u30d5\u30a1\u30fc\u30fb\u30b5\u30a4\u30ba <=0"},
+     *
+     *  2) An element is a mark-up tag in an XML document; an attribute is a
+     *     modifier on the tag.  For example, in <elem attr='val' attr2='val2'>
+     *     "elem" is an element name, "attr" and "attr2" are attribute names with
+     *     the values "val" and "val2", respectively.
+     *
+     *  3) A namespace declaration is a special attribute that is used to associate
+     *     a prefix with a URI (the namespace).  The meanings of element names and
+     *     attribute names that use that prefix are defined with respect to that
+     *     namespace.
+     *
+     *
+     */
 
-      { MsgKey.ER_INVALID_UTF16_SURROGATE,
-        "\u7121\u52b9\u306a UTF-16 \u30b5\u30ed\u30b2\u30fc\u30c8\u304c\u691c\u51fa\u3055\u308c\u307e\u3057\u305f: {0} ?"},
+    /** The lookup table for error messages.   */
+    public Object[][] getContents() {
+        Object[][] contents = new Object[][] {
+            {   MsgKey.BAD_MSGKEY,
+                "\u30E1\u30C3\u30BB\u30FC\u30B8\u30FB\u30AD\u30FC''{0}''\u306F\u3001\u30E1\u30C3\u30BB\u30FC\u30B8\u30FB\u30AF\u30E9\u30B9''{1}''\u3067\u306F\u3042\u308A\u307E\u305B\u3093" },
 
-      { MsgKey.ER_OIERROR,
-        "\u5165\u51fa\u529b\u30a8\u30e9\u30fc"},
+            {   MsgKey.BAD_MSGFORMAT,
+                "\u30E1\u30C3\u30BB\u30FC\u30B8\u30FB\u30AF\u30E9\u30B9''{1}''\u306E\u30E1\u30C3\u30BB\u30FC\u30B8''{0}''\u306E\u30D5\u30A9\u30FC\u30DE\u30C3\u30C8\u306B\u5931\u6557\u3057\u307E\u3057\u305F\u3002" },
 
-      { MsgKey.ER_ILLEGAL_ATTRIBUTE_POSITION,
-        "\u4e0b\u4f4d\u30ce\u30fc\u30c9\u306e\u5f8c\u307e\u305f\u306f\u30a8\u30ec\u30e1\u30f3\u30c8\u304c\u751f\u6210\u3055\u308c\u308b\u524d\u306b\u5c5e\u6027 {0} \u3092\u8ffd\u52a0\u3067\u304d\u307e\u305b\u3093\u3002\u5c5e\u6027\u306f\u7121\u8996\u3055\u308c\u307e\u3059\u3002"},
+            {   MsgKey.ER_SERIALIZER_NOT_CONTENTHANDLER,
+                "\u30B7\u30EA\u30A2\u30E9\u30A4\u30B6\u30FB\u30AF\u30E9\u30B9''{0}''\u306Forg.xml.sax.ContentHandler\u3092\u5B9F\u88C5\u3057\u307E\u305B\u3093\u3002" },
 
-      { MsgKey.ER_NAMESPACE_PREFIX,
-        "\u63a5\u982d\u90e8 ''{0}'' \u306e\u30cd\u30fc\u30e0\u30fb\u30b9\u30da\u30fc\u30b9\u304c\u5ba3\u8a00\u3055\u308c\u3066\u3044\u307e\u305b\u3093\u3002"},
+            {   MsgKey.ER_RESOURCE_COULD_NOT_FIND,
+                    "\u30EA\u30BD\u30FC\u30B9[ {0} ]\u306F\u898B\u3064\u304B\u308A\u307E\u305B\u3093\u3067\u3057\u305F\u3002\n {1}" },
 
-        // ER_STRAY_ATTRIBUTE needs translation
-      { MsgKey.ER_STRAY_NAMESPACE,
-        "\u30cd\u30fc\u30e0\u30fb\u30b9\u30da\u30fc\u30b9\u5ba3\u8a00 ''{0}''=''{1}'' \u304c\u30a8\u30ec\u30e1\u30f3\u30c8\u306e\u5916\u5074\u3067\u3059\u3002"},
+            {   MsgKey.ER_RESOURCE_COULD_NOT_LOAD,
+                    "\u30EA\u30BD\u30FC\u30B9[ {0} ]\u3092\u30ED\u30FC\u30C9\u3067\u304D\u307E\u305B\u3093\u3067\u3057\u305F: {1} \n {2} \t {3}" },
 
-      { MsgKey.ER_COULD_NOT_LOAD_RESOURCE,
-        "''{0}'' \u3092\u30ed\u30fc\u30c9\u3067\u304d\u307e\u305b\u3093\u3067\u3057\u305f (CLASSPATH \u3092\u8abf\u3079\u3066\u304f\u3060\u3055\u3044)\u3002\u73fe\u5728\u306f\u5358\u306b\u30c7\u30d5\u30a9\u30eb\u30c8\u3092\u4f7f\u7528\u3057\u3066\u3044\u307e\u3059\u3002"},
+            {   MsgKey.ER_BUFFER_SIZE_LESSTHAN_ZERO,
+                    "\u30D0\u30C3\u30D5\u30A1\u30FB\u30B5\u30A4\u30BA<=0" },
 
-        // ER_ILLEGAL_CHARACTER needs translation
-      { MsgKey.ER_COULD_NOT_LOAD_METHOD_PROPERTY,
-        "\u51fa\u529b\u30e1\u30bd\u30c3\u30c9 ''{1}'' \u306e\u30d7\u30ed\u30d1\u30c6\u30a3\u30fc\u30fb\u30d5\u30a1\u30a4\u30eb ''{0}'' \u3092\u30ed\u30fc\u30c9\u3067\u304d\u307e\u305b\u3093\u3067\u3057\u305f (CLASSPATH \u3092\u78ba\u8a8d)"},
+            {   MsgKey.ER_INVALID_UTF16_SURROGATE,
+                    "\u7121\u52B9\u306AUTF-16\u30B5\u30ED\u30B2\u30FC\u30C8\u304C\u691C\u51FA\u3055\u308C\u307E\u3057\u305F: {0}\u3002" },
 
-      { MsgKey.ER_INVALID_PORT,
-        "\u7121\u52b9\u306a\u30dd\u30fc\u30c8\u756a\u53f7"},
+            {   MsgKey.ER_OIERROR,
+                "IO\u30A8\u30E9\u30FC" },
 
-      { MsgKey.ER_PORT_WHEN_HOST_NULL,
-        "\u30db\u30b9\u30c8\u304c\u30cc\u30eb\u3067\u3042\u308b\u3068\u30dd\u30fc\u30c8\u3092\u8a2d\u5b9a\u3067\u304d\u307e\u305b\u3093"},
+            {   MsgKey.ER_ILLEGAL_ATTRIBUTE_POSITION,
+                "\u5B50\u30CE\u30FC\u30C9\u306E\u5F8C\u307E\u305F\u306F\u8981\u7D20\u304C\u751F\u6210\u3055\u308C\u308B\u524D\u306B\u5C5E\u6027{0}\u3092\u8FFD\u52A0\u3067\u304D\u307E\u305B\u3093\u3002\u5C5E\u6027\u306F\u7121\u8996\u3055\u308C\u307E\u3059\u3002" },
 
-      { MsgKey.ER_HOST_ADDRESS_NOT_WELLFORMED,
-        "\u30db\u30b9\u30c8\u306f\u3046\u307e\u304f\u69cb\u6210\u3055\u308c\u305f\u30a2\u30c9\u30ec\u30b9\u3067\u3042\u308a\u307e\u305b\u3093"},
+            /*
+             * Note to translators:  The stylesheet contained a reference to a
+             * namespace prefix that was undefined.  The value of the substitution
+             * text is the name of the prefix.
+             */
+            {   MsgKey.ER_NAMESPACE_PREFIX,
+                "\u63A5\u982D\u8F9E''{0}''\u306E\u30CD\u30FC\u30E0\u30B9\u30DA\u30FC\u30B9\u304C\u5BA3\u8A00\u3055\u308C\u3066\u3044\u307E\u305B\u3093\u3002" },
 
-      { MsgKey.ER_SCHEME_NOT_CONFORMANT,
-        "\u30b9\u30ad\u30fc\u30e0\u306f\u4e00\u81f4\u3057\u3066\u3044\u307e\u305b\u3093\u3002"},
+            /*
+             * Note to translators:  This message is reported if the stylesheet
+             * being processed attempted to construct an XML document with an
+             * attribute in a place other than on an element.  The substitution text
+             * specifies the name of the attribute.
+             */
+            {   MsgKey.ER_STRAY_ATTRIBUTE,
+                "\u5C5E\u6027''{0}''\u304C\u8981\u7D20\u306E\u5916\u5074\u306B\u3042\u308A\u307E\u3059\u3002" },
 
-      { MsgKey.ER_SCHEME_FROM_NULL_STRING,
-        "\u30cc\u30eb\u30fb\u30b9\u30c8\u30ea\u30f3\u30b0\u304b\u3089\u306f\u30b9\u30ad\u30fc\u30e0\u3092\u8a2d\u5b9a\u3067\u304d\u307e\u305b\u3093"},
+            /*
+             * Note to translators:  As with the preceding message, a namespace
+             * declaration has the form of an attribute and is only permitted to
+             * appear on an element.  The substitution text {0} is the namespace
+             * prefix and {1} is the URI that was being used in the erroneous
+             * namespace declaration.
+             */
+            {   MsgKey.ER_STRAY_NAMESPACE,
+                "\u30CD\u30FC\u30E0\u30B9\u30DA\u30FC\u30B9\u5BA3\u8A00''{0}''=''{1}''\u304C\u8981\u7D20\u306E\u5916\u5074\u306B\u3042\u308A\u307E\u3059\u3002" },
 
-      { MsgKey.ER_PATH_CONTAINS_INVALID_ESCAPE_SEQUENCE,
-        "\u30d1\u30b9\u306b\u7121\u52b9\u306a\u30a8\u30b9\u30b1\u30fc\u30d7\u30fb\u30b7\u30fc\u30b1\u30f3\u30b9\u304c\u542b\u307e\u308c\u3066\u3044\u307e\u3059"},
+            {   MsgKey.ER_COULD_NOT_LOAD_RESOURCE,
+                "''{0}''\u3092\u30ED\u30FC\u30C9\u3067\u304D\u307E\u305B\u3093\u3067\u3057\u305F(CLASSPATH\u3092\u78BA\u8A8D\u3057\u3066\u304F\u3060\u3055\u3044)\u3002\u73FE\u5728\u306F\u5358\u306B\u30C7\u30D5\u30A9\u30EB\u30C8\u3092\u4F7F\u7528\u3057\u3066\u3044\u307E\u3059" },
 
-      { MsgKey.ER_PATH_INVALID_CHAR,
-        "\u30d1\u30b9\u306b\u7121\u52b9\u6587\u5b57: {0} \u304c\u542b\u307e\u308c\u3066\u3044\u307e\u3059"},
+            {   MsgKey.ER_ILLEGAL_CHARACTER,
+                "{1}\u306E\u6307\u5B9A\u3055\u308C\u305F\u51FA\u529B\u30A8\u30F3\u30B3\u30FC\u30C7\u30A3\u30F3\u30B0\u3067\u793A\u3055\u308C\u306A\u3044\u6574\u6570\u5024{0}\u306E\u6587\u5B57\u3092\u51FA\u529B\u3057\u3088\u3046\u3068\u3057\u307E\u3057\u305F\u3002" },
 
-      { MsgKey.ER_FRAG_INVALID_CHAR,
-        "\u30d5\u30e9\u30b0\u30e1\u30f3\u30c8\u306b\u7121\u52b9\u6587\u5b57\u304c\u542b\u307e\u308c\u3066\u3044\u307e\u3059"},
+            {   MsgKey.ER_COULD_NOT_LOAD_METHOD_PROPERTY,
+                "\u51FA\u529B\u30E1\u30BD\u30C3\u30C9''{1}''\u306E\u30D7\u30ED\u30D1\u30C6\u30A3\u30FB\u30D5\u30A1\u30A4\u30EB''{0}''\u3092\u30ED\u30FC\u30C9\u3067\u304D\u307E\u305B\u3093\u3067\u3057\u305F(CLASSPATH\u3092\u78BA\u8A8D\u3057\u3066\u304F\u3060\u3055\u3044)" },
 
-      { MsgKey.ER_FRAG_WHEN_PATH_NULL,
-        "\u30d1\u30b9\u304c\u30cc\u30eb\u3067\u3042\u308b\u3068\u30d5\u30e9\u30b0\u30e1\u30f3\u30c8\u3092\u8a2d\u5b9a\u3067\u304d\u307e\u305b\u3093"},
+            {   MsgKey.ER_INVALID_PORT,
+                "\u7121\u52B9\u306A\u30DD\u30FC\u30C8\u756A\u53F7" },
 
-      { MsgKey.ER_FRAG_FOR_GENERIC_URI,
-        "\u7dcf\u79f0 URI \u306e\u30d5\u30e9\u30b0\u30e1\u30f3\u30c8\u3057\u304b\u8a2d\u5b9a\u3067\u304d\u307e\u305b\u3093"},
+            {   MsgKey.ER_PORT_WHEN_HOST_NULL,
+                "\u30DB\u30B9\u30C8\u304Cnull\u306E\u5834\u5408\u306F\u30DD\u30FC\u30C8\u3092\u8A2D\u5B9A\u3067\u304D\u307E\u305B\u3093" },
 
-      { MsgKey.ER_NO_SCHEME_IN_URI,
-        "\u30b9\u30ad\u30fc\u30e0\u306f URI {0} \u3067\u898b\u3064\u304b\u308a\u307e\u305b\u3093"},
+            {   MsgKey.ER_HOST_ADDRESS_NOT_WELLFORMED,
+                "\u30DB\u30B9\u30C8\u306F\u6574\u5F62\u5F0F\u306E\u30A2\u30C9\u30EC\u30B9\u3067\u306F\u3042\u308A\u307E\u305B\u3093" },
 
-      { MsgKey.ER_CANNOT_INIT_URI_EMPTY_PARMS,
-        "URI \u306f\u7a7a\u306e\u30d1\u30e9\u30e1\u30fc\u30bf\u30fc\u3092\u4f7f\u7528\u3057\u3066\u521d\u671f\u5316\u3067\u304d\u307e\u305b\u3093"},
+            {   MsgKey.ER_SCHEME_NOT_CONFORMANT,
+                "\u30B9\u30AD\u30FC\u30E0\u304C\u6574\u5408\u3057\u3066\u3044\u307E\u305B\u3093\u3002" },
 
-      { MsgKey.ER_NO_FRAGMENT_STRING_IN_PATH,
-        "\u30d5\u30e9\u30b0\u30e1\u30f3\u30c8\u306f\u30d1\u30b9\u3068\u30d5\u30e9\u30b0\u30e1\u30f3\u30c8\u306e\u4e21\u65b9\u306b\u6307\u5b9a\u3067\u304d\u307e\u305b\u3093"},
+            {   MsgKey.ER_SCHEME_FROM_NULL_STRING,
+                "null\u6587\u5B57\u5217\u304B\u3089\u306F\u30B9\u30AD\u30FC\u30E0\u3092\u8A2D\u5B9A\u3067\u304D\u307E\u305B\u3093" },
 
-      { MsgKey.ER_NO_QUERY_STRING_IN_PATH,
-        "\u7167\u4f1a\u30b9\u30c8\u30ea\u30f3\u30b0\u306f\u30d1\u30b9\u304a\u3088\u3073\u7167\u4f1a\u30b9\u30c8\u30ea\u30f3\u30b0\u5185\u306b\u6307\u5b9a\u3067\u304d\u307e\u305b\u3093"},
+            {   MsgKey.ER_PATH_CONTAINS_INVALID_ESCAPE_SEQUENCE,
+                "\u30D1\u30B9\u306B\u7121\u52B9\u306A\u30A8\u30B9\u30B1\u30FC\u30D7\u30FB\u30B7\u30FC\u30B1\u30F3\u30B9\u304C\u542B\u307E\u308C\u3066\u3044\u307E\u3059" },
 
-      { MsgKey.ER_NO_PORT_IF_NO_HOST,
-        "\u30db\u30b9\u30c8\u304c\u6307\u5b9a\u3055\u308c\u3066\u3044\u306a\u3044\u5834\u5408\u306f\u30dd\u30fc\u30c8\u3092\u6307\u5b9a\u3057\u3066\u306f\u3044\u3051\u307e\u305b\u3093"},
+            {   MsgKey.ER_PATH_INVALID_CHAR,
+                "\u30D1\u30B9\u306B\u7121\u52B9\u306A\u6587\u5B57\u304C\u542B\u307E\u308C\u3066\u3044\u307E\u3059: {0}" },
 
-      { MsgKey.ER_NO_USERINFO_IF_NO_HOST,
-        "\u30db\u30b9\u30c8\u304c\u6307\u5b9a\u3055\u308c\u3066\u3044\u306a\u3044\u5834\u5408\u306f Userinfo \u3092\u6307\u5b9a\u3057\u3066\u306f\u3044\u3051\u307e\u305b\u3093"},
+            {   MsgKey.ER_FRAG_INVALID_CHAR,
+                "\u30D5\u30E9\u30B0\u30E1\u30F3\u30C8\u306B\u7121\u52B9\u6587\u5B57\u304C\u542B\u307E\u308C\u3066\u3044\u307E\u3059" },
 
-      { MsgKey.ER_SCHEME_REQUIRED,
-        "\u30b9\u30ad\u30fc\u30e0\u304c\u5fc5\u8981\u3067\u3059!"}
+            {   MsgKey.ER_FRAG_WHEN_PATH_NULL,
+                "\u30D1\u30B9\u304Cnull\u306E\u5834\u5408\u306F\u30D5\u30E9\u30B0\u30E1\u30F3\u30C8\u3092\u8A2D\u5B9A\u3067\u304D\u307E\u305B\u3093" },
 
-    };
-    return contents;
-  }
+            {   MsgKey.ER_FRAG_FOR_GENERIC_URI,
+                "\u6C4E\u7528URI\u306E\u30D5\u30E9\u30B0\u30E1\u30F3\u30C8\u306E\u307F\u8A2D\u5B9A\u3067\u304D\u307E\u3059" },
+
+            {   MsgKey.ER_NO_SCHEME_IN_URI,
+                "\u30B9\u30AD\u30FC\u30E0\u304CURI\u306B\u898B\u3064\u304B\u308A\u307E\u305B\u3093" },
+
+            {   MsgKey.ER_CANNOT_INIT_URI_EMPTY_PARMS,
+                "URI\u306F\u7A7A\u306E\u30D1\u30E9\u30E1\u30FC\u30BF\u3092\u4F7F\u7528\u3057\u3066\u521D\u671F\u5316\u3067\u304D\u307E\u305B\u3093" },
+
+            {   MsgKey.ER_NO_FRAGMENT_STRING_IN_PATH,
+                "\u30D5\u30E9\u30B0\u30E1\u30F3\u30C8\u306F\u30D1\u30B9\u3068\u30D5\u30E9\u30B0\u30E1\u30F3\u30C8\u306E\u4E21\u65B9\u306B\u6307\u5B9A\u3067\u304D\u307E\u305B\u3093" },
+
+            {   MsgKey.ER_NO_QUERY_STRING_IN_PATH,
+                "\u554F\u5408\u305B\u6587\u5B57\u5217\u306F\u30D1\u30B9\u304A\u3088\u3073\u554F\u5408\u305B\u6587\u5B57\u5217\u5185\u306B\u6307\u5B9A\u3067\u304D\u307E\u305B\u3093" },
+
+            {   MsgKey.ER_NO_PORT_IF_NO_HOST,
+                "\u30DB\u30B9\u30C8\u304C\u6307\u5B9A\u3055\u308C\u3066\u3044\u306A\u3044\u5834\u5408\u306F\u30DD\u30FC\u30C8\u3092\u6307\u5B9A\u3067\u304D\u307E\u305B\u3093" },
+
+            {   MsgKey.ER_NO_USERINFO_IF_NO_HOST,
+                "\u30DB\u30B9\u30C8\u304C\u6307\u5B9A\u3055\u308C\u3066\u3044\u306A\u3044\u5834\u5408\u306FUserinfo\u3092\u6307\u5B9A\u3067\u304D\u307E\u305B\u3093" },
+
+            {   MsgKey.ER_XML_VERSION_NOT_SUPPORTED,
+                "\u8B66\u544A: \u51FA\u529B\u30C9\u30AD\u30E5\u30E1\u30F3\u30C8\u306E\u30D0\u30FC\u30B8\u30E7\u30F3\u306F\u3001''{0}''\u3067\u3042\u308B\u3053\u3068\u304C\u30EA\u30AF\u30A8\u30B9\u30C8\u3055\u308C\u3066\u3044\u307E\u3059\u3002XML\u306E\u3053\u306E\u30D0\u30FC\u30B8\u30E7\u30F3\u306F\u30B5\u30DD\u30FC\u30C8\u3055\u308C\u3066\u3044\u307E\u305B\u3093\u3002\u51FA\u529B\u30C9\u30AD\u30E5\u30E1\u30F3\u30C8\u306E\u30D0\u30FC\u30B8\u30E7\u30F3\u306F\u3001''1.0''\u306B\u306A\u308A\u307E\u3059\u3002" },
+
+            {   MsgKey.ER_SCHEME_REQUIRED,
+                "\u30B9\u30AD\u30FC\u30E0\u304C\u5FC5\u8981\u3067\u3059\u3002" },
+
+            /*
+             * Note to translators:  The words 'Properties' and
+             * 'SerializerFactory' in this message are Java class names
+             * and should not be translated.
+             */
+            {   MsgKey.ER_FACTORY_PROPERTY_MISSING,
+                "SerializerFactory\u306B\u6E21\u3055\u308C\u308B\u30D7\u30ED\u30D1\u30C6\u30A3\u30FB\u30AA\u30D6\u30B8\u30A7\u30AF\u30C8\u306B\u3001''{0}''\u30D7\u30ED\u30D1\u30C6\u30A3\u304C\u3042\u308A\u307E\u305B\u3093\u3002" },
+
+            {   MsgKey.ER_ENCODING_NOT_SUPPORTED,
+                "\u8B66\u544A:  \u30A8\u30F3\u30B3\u30FC\u30C7\u30A3\u30F3\u30B0''{0}''\u306F\u3001Java\u30E9\u30F3\u30BF\u30A4\u30E0\u3067\u30B5\u30DD\u30FC\u30C8\u3055\u308C\u3066\u3044\u307E\u305B\u3093\u3002" },
+
+
+        };
+
+        return contents;
+    }
 }
diff --git a/jaxp/src/com/sun/org/apache/xml/internal/serializer/utils/SerializerMessages_ko.java b/jaxp/src/com/sun/org/apache/xml/internal/serializer/utils/SerializerMessages_ko.java
index 986954a..90750d5 100644
--- a/jaxp/src/com/sun/org/apache/xml/internal/serializer/utils/SerializerMessages_ko.java
+++ b/jaxp/src/com/sun/org/apache/xml/internal/serializer/utils/SerializerMessages_ko.java
@@ -3,7 +3,7 @@
  * DO NOT REMOVE OR ALTER!
  */
 /*
- * Copyright 1999-2004 The Apache Software Foundation.
+ * Copyright 2004 The Apache Software Foundation.
  *
  * Licensed under the Apache License, Version 2.0 (the "License");
  * you may not use this file except in compliance with the License.
@@ -18,105 +18,191 @@
  * limitations under the License.
  */
 /*
- * $Id: SerializerMessages_ko.java,v 1.1.4.1 2005/09/08 11:03:16 suresh_emailid Exp $
+ * $Id: SerializerMessages_ko.java /st_wptg_1.8.0.0.0jdk/2 2013/09/16 02:31:34 gmolloy Exp $
  */
-
 package com.sun.org.apache.xml.internal.serializer.utils;
 
 import java.util.ListResourceBundle;
+import java.util.Locale;
+import java.util.MissingResourceException;
+import java.util.ResourceBundle;
 
+/**
+ * An instance of this class is a ListResourceBundle that
+ * has the required getContents() method that returns
+ * an array of message-key/message associations.
+ * <p>
+ * The message keys are defined in {@link MsgKey}. The
+ * messages that those keys map to are defined here.
+ * <p>
+ * The messages in the English version are intended to be
+ * translated.
+ *
+ * This class is not a public API, it is only public because it is
+ * used in com.sun.org.apache.xml.internal.serializer.
+ *
+ * @xsl.usage internal
+ */
 public class SerializerMessages_ko extends ListResourceBundle {
-  public Object[][] getContents() {
-    Object[][] contents =  new Object[][] {
-        // BAD_MSGKEY needs translation
-        // BAD_MSGFORMAT needs translation
-      { MsgKey.ER_SERIALIZER_NOT_CONTENTHANDLER,
-        "''{0}'' \uc9c1\ub82c\ud654 \ud504\ub85c\uadf8\ub7a8 \ud074\ub798\uc2a4\uac00 org.xml.sax.ContentHandler\ub97c \uad6c\ud604\ud558\uc9c0 \uc54a\uc2b5\ub2c8\ub2e4."},
 
-      { MsgKey.ER_RESOURCE_COULD_NOT_FIND,
-        "[ {0} ] \uc790\uc6d0\uc744 \ucc3e\uc744 \uc218 \uc5c6\uc2b5\ub2c8\ub2e4.\n {1}"},
+    /*
+     * This file contains error and warning messages related to
+     * Serializer Error Handling.
+     *
+     *  General notes to translators:
 
-      { MsgKey.ER_RESOURCE_COULD_NOT_LOAD,
-        "[ {0} ] \uc790\uc6d0\uc774 {1} \n {2} \n {3}\uc744(\ub97c) \ub85c\ub4dc\ud560 \uc218 \uc5c6\uc2b5\ub2c8\ub2e4. "},
+     *  1) A stylesheet is a description of how to transform an input XML document
+     *     into a resultant XML document (or HTML document or text).  The
+     *     stylesheet itself is described in the form of an XML document.
 
-      { MsgKey.ER_BUFFER_SIZE_LESSTHAN_ZERO,
-        "\ubc84\ud37c \ud06c\uae30 <=0"},
+     *
+     *  2) An element is a mark-up tag in an XML document; an attribute is a
+     *     modifier on the tag.  For example, in <elem attr='val' attr2='val2'>
+     *     "elem" is an element name, "attr" and "attr2" are attribute names with
+     *     the values "val" and "val2", respectively.
+     *
+     *  3) A namespace declaration is a special attribute that is used to associate
+     *     a prefix with a URI (the namespace).  The meanings of element names and
+     *     attribute names that use that prefix are defined with respect to that
+     *     namespace.
+     *
+     *
+     */
 
-      { MsgKey.ER_INVALID_UTF16_SURROGATE,
-        "\uc798\ubabb\ub41c UTF-16 \ub300\ub9ac\uc790(surrogate)\uac00 \ubc1c\uacac\ub418\uc5c8\uc2b5\ub2c8\ub2e4: {0} ?"},
+    /** The lookup table for error messages.   */
+    public Object[][] getContents() {
+        Object[][] contents = new Object[][] {
+            {   MsgKey.BAD_MSGKEY,
+                "\uBA54\uC2DC\uC9C0 \uD0A4 ''{0}''\uC774(\uAC00) \uBA54\uC2DC\uC9C0 \uD074\uB798\uC2A4 ''{1}''\uC5D0 \uC5C6\uC2B5\uB2C8\uB2E4." },
 
-      { MsgKey.ER_OIERROR,
-        "IO \uc624\ub958"},
+            {   MsgKey.BAD_MSGFORMAT,
+                "\uBA54\uC2DC\uC9C0 \uD074\uB798\uC2A4 ''{1}''\uC5D0\uC11C ''{0}'' \uBA54\uC2DC\uC9C0\uC758 \uD615\uC2DD\uC774 \uC798\uBABB\uB418\uC5C8\uC2B5\uB2C8\uB2E4." },
 
-      { MsgKey.ER_ILLEGAL_ATTRIBUTE_POSITION,
-        "\ud558\uc704 \ub178\ub4dc\uac00 \uc0dd\uc131\ub41c \uc774\ud6c4 \ub610\ub294 \uc694\uc18c\uac00 \uc791\uc131\ub418\uae30 \uc774\uc804\uc5d0 {0} \uc18d\uc131\uc744 \ucd94\uac00\ud560 \uc218 \uc5c6\uc2b5\ub2c8\ub2e4. \uc18d\uc131\uc774 \ubb34\uc2dc\ub429\ub2c8\ub2e4."},
+            {   MsgKey.ER_SERIALIZER_NOT_CONTENTHANDLER,
+                "Serializer \uD074\uB798\uC2A4 ''{0}''\uC774(\uAC00) org.xml.sax.ContentHandler\uB97C \uAD6C\uD604\uD558\uC9C0 \uC54A\uC558\uC2B5\uB2C8\uB2E4." },
 
-      { MsgKey.ER_NAMESPACE_PREFIX,
-        "''{0}'' \uc811\ub450\ubd80\uc5d0 \ub300\ud55c \uc774\ub984 \uacf5\uac04\uc774 \uc120\uc5b8\ub418\uc9c0 \uc54a\uc558\uc2b5\ub2c8\ub2e4."},
+            {   MsgKey.ER_RESOURCE_COULD_NOT_FIND,
+                    "[{0}] \uB9AC\uC18C\uC2A4\uB97C \uCC3E\uC744 \uC218 \uC5C6\uC2B5\uB2C8\uB2E4.\n {1}" },
 
-        // ER_STRAY_ATTRIBUTE needs translation
-      { MsgKey.ER_STRAY_NAMESPACE,
-        "''{0}''=''{1}'' \uc774\ub984 \uacf5\uac04 \uc120\uc5b8\uc774 \uc694\uc18c\uc758 \uc678\ubd80\uc5d0 \uc788\uc2b5\ub2c8\ub2e4."},
+            {   MsgKey.ER_RESOURCE_COULD_NOT_LOAD,
+                    "[{0}] \uB9AC\uC18C\uC2A4\uAC00 \uB2E4\uC74C\uC744 \uB85C\uB4DC\uD560 \uC218 \uC5C6\uC74C: {1} \n {2} \t {3}" },
 
-      { MsgKey.ER_COULD_NOT_LOAD_RESOURCE,
-        "''{0}''(CLASSPATH \ud655\uc778)\uc744(\ub97c) \ub85c\ub4dc\ud560 \uc218 \uc5c6\uc73c\ubbc0\ub85c, \ud604\uc7ac \uae30\ubcf8\uac12\ub9cc\uc744 \uc0ac\uc6a9 \uc911\uc785\ub2c8\ub2e4."},
+            {   MsgKey.ER_BUFFER_SIZE_LESSTHAN_ZERO,
+                    "\uBC84\uD37C \uD06C\uAE30 <=0" },
 
-        // ER_ILLEGAL_CHARACTER needs translation
-      { MsgKey.ER_COULD_NOT_LOAD_METHOD_PROPERTY,
-        "''{1}''\ucd9c\ub825 \uba54\uc18c\ub4dc(CLASSPATH \ud655\uc778)\uc5d0 \ub300\ud55c ''{0}'' \ud2b9\uc131 \ud30c\uc77c\uc744 \ub85c\ub4dc\ud560 \uc218 \uc5c6\uc2b5\ub2c8\ub2e4."},
+            {   MsgKey.ER_INVALID_UTF16_SURROGATE,
+                    "\uBD80\uC801\uD569\uD55C UTF-16 \uB300\uB9AC \uC694\uC18C\uAC00 \uAC10\uC9C0\uB428: {0}" },
 
-      { MsgKey.ER_INVALID_PORT,
-        "\uc798\ubabb\ub41c \ud3ec\ud2b8 \ubc88\ud638"},
+            {   MsgKey.ER_OIERROR,
+                "IO \uC624\uB958" },
 
-      { MsgKey.ER_PORT_WHEN_HOST_NULL,
-        "\ud638\uc2a4\ud2b8\uac00 \ub110(null)\uc774\uba74 \ud3ec\ud2b8\ub97c \uc124\uc815\ud560 \uc218 \uc5c6\uc2b5\ub2c8\ub2e4."},
+            {   MsgKey.ER_ILLEGAL_ATTRIBUTE_POSITION,
+                "\uD558\uC704 \uB178\uB4DC\uAC00 \uC0DD\uC131\uB41C \uD6C4 \uB610\uB294 \uC694\uC18C\uAC00 \uC0DD\uC131\uB418\uAE30 \uC804\uC5D0 {0} \uC18D\uC131\uC744 \uCD94\uAC00\uD560 \uC218 \uC5C6\uC2B5\uB2C8\uB2E4. \uC18D\uC131\uC774 \uBB34\uC2DC\uB429\uB2C8\uB2E4." },
 
-      { MsgKey.ER_HOST_ADDRESS_NOT_WELLFORMED,
-        "\ud638\uc2a4\ud2b8\uac00 \uc644\uc804\ud55c \uc8fc\uc18c\uac00 \uc544\ub2d9\ub2c8\ub2e4."},
+            /*
+             * Note to translators:  The stylesheet contained a reference to a
+             * namespace prefix that was undefined.  The value of the substitution
+             * text is the name of the prefix.
+             */
+            {   MsgKey.ER_NAMESPACE_PREFIX,
+                "''{0}'' \uC811\uB450\uC5B4\uC5D0 \uB300\uD55C \uB124\uC784\uC2A4\uD398\uC774\uC2A4\uAC00 \uC120\uC5B8\uB418\uC9C0 \uC54A\uC558\uC2B5\uB2C8\uB2E4." },
 
-      { MsgKey.ER_SCHEME_NOT_CONFORMANT,
-        "\uc124\uacc4\uac00 \uc77c\uce58\ud558\uc9c0 \uc54a\uc2b5\ub2c8\ub2e4."},
+            /*
+             * Note to translators:  This message is reported if the stylesheet
+             * being processed attempted to construct an XML document with an
+             * attribute in a place other than on an element.  The substitution text
+             * specifies the name of the attribute.
+             */
+            {   MsgKey.ER_STRAY_ATTRIBUTE,
+                "''{0}'' \uC18D\uC131\uC774 \uC694\uC18C\uC5D0 \uD3EC\uD568\uB418\uC5B4 \uC788\uC9C0 \uC54A\uC2B5\uB2C8\uB2E4." },
 
-      { MsgKey.ER_SCHEME_FROM_NULL_STRING,
-        "\ub110(null) \ubb38\uc790\uc5f4\uc5d0\uc11c \uc124\uacc4\ub97c \uc124\uc815\ud560 \uc218 \uc5c6\uc2b5\ub2c8\ub2e4."},
+            /*
+             * Note to translators:  As with the preceding message, a namespace
+             * declaration has the form of an attribute and is only permitted to
+             * appear on an element.  The substitution text {0} is the namespace
+             * prefix and {1} is the URI that was being used in the erroneous
+             * namespace declaration.
+             */
+            {   MsgKey.ER_STRAY_NAMESPACE,
+                "\uB124\uC784\uC2A4\uD398\uC774\uC2A4 \uC120\uC5B8 ''{0}''=''{1}''\uC774(\uAC00) \uC694\uC18C\uC5D0 \uD3EC\uD568\uB418\uC5B4 \uC788\uC9C0 \uC54A\uC2B5\uB2C8\uB2E4." },
 
-      { MsgKey.ER_PATH_CONTAINS_INVALID_ESCAPE_SEQUENCE,
-        "\uacbd\ub85c\uc5d0 \uc798\ubabb\ub41c \uc774\uc2a4\ucf00\uc774\ud504 \uc21c\uc11c\uac00 \uc788\uc2b5\ub2c8\ub2e4."},
+            {   MsgKey.ER_COULD_NOT_LOAD_RESOURCE,
+                "{0}\uC744(\uB97C) \uB85C\uB4DC\uD560 \uC218 \uC5C6\uC2B5\uB2C8\uB2E4. CLASSPATH\uB97C \uD655\uC778\uD558\uC2ED\uC2DC\uC624. \uD604\uC7AC \uAE30\uBCF8\uAC12\uB9CC \uC0AC\uC6A9\uD558\uB294 \uC911\uC785\uB2C8\uB2E4." },
 
-      { MsgKey.ER_PATH_INVALID_CHAR,
-        "\uacbd\ub85c\uc5d0 \uc798\ubabb\ub41c \ubb38\uc790\uac00 \uc788\uc2b5\ub2c8\ub2e4: {0}"},
+            {   MsgKey.ER_ILLEGAL_CHARACTER,
+                "{1}\uC758 \uC9C0\uC815\uB41C \uCD9C\uB825 \uC778\uCF54\uB529\uC5D0\uC11C \uD45C\uC2DC\uB418\uC9C0 \uC54A\uB294 \uC815\uC218 \uAC12 {0}\uC758 \uBB38\uC790\uB97C \uCD9C\uB825\uD558\uB824\uACE0 \uC2DC\uB3C4\uD588\uC2B5\uB2C8\uB2E4." },
 
-      { MsgKey.ER_FRAG_INVALID_CHAR,
-        "\ub2e8\ud3b8\uc5d0 \uc798\ubabb\ub41c \ubb38\uc790\uac00 \uc788\uc2b5\ub2c8\ub2e4."},
+            {   MsgKey.ER_COULD_NOT_LOAD_METHOD_PROPERTY,
+                "\uCD9C\uB825 \uBA54\uC18C\uB4DC ''{1}''\uC5D0 \uB300\uD55C \uC18D\uC131 \uD30C\uC77C ''{0}''\uC744(\uB97C) \uB85C\uB4DC\uD560 \uC218 \uC5C6\uC2B5\uB2C8\uB2E4. CLASSPATH\uB97C \uD655\uC778\uD558\uC2ED\uC2DC\uC624." },
 
-      { MsgKey.ER_FRAG_WHEN_PATH_NULL,
-        "\uacbd\ub85c\uac00 \ub110(null)\uc774\uba74 \ub2e8\ud3b8\uc744 \uc124\uc815\ud560 \uc218 \uc5c6\uc2b5\ub2c8\ub2e4."},
+            {   MsgKey.ER_INVALID_PORT,
+                "\uD3EC\uD2B8 \uBC88\uD638\uAC00 \uBD80\uC801\uD569\uD569\uB2C8\uB2E4." },
 
-      { MsgKey.ER_FRAG_FOR_GENERIC_URI,
-        "\uc77c\ubc18 URI\uc5d0 \ub300\ud574\uc11c\ub9cc \ub2e8\ud3b8\uc744 \uc124\uc815\ud560 \uc218 \uc788\uc2b5\ub2c8\ub2e4."},
+            {   MsgKey.ER_PORT_WHEN_HOST_NULL,
+                "\uD638\uC2A4\uD2B8\uAC00 \uB110\uC77C \uACBD\uC6B0 \uD3EC\uD2B8\uB97C \uC124\uC815\uD560 \uC218 \uC5C6\uC2B5\uB2C8\uB2E4." },
 
-      { MsgKey.ER_NO_SCHEME_IN_URI,
-        "URI\uc5d0 \uc124\uacc4\uac00 \uc5c6\uc2b5\ub2c8\ub2e4: {0}"},
+            {   MsgKey.ER_HOST_ADDRESS_NOT_WELLFORMED,
+                "\uD638\uC2A4\uD2B8\uAC00 \uC644\uC804\uD55C \uC8FC\uC18C\uAC00 \uC544\uB2D9\uB2C8\uB2E4." },
 
-      { MsgKey.ER_CANNOT_INIT_URI_EMPTY_PARMS,
-        "\ube48 \ub9e4\uac1c\ubcc0\uc218\ub85c URI\ub97c \ucd08\uae30\ud654\ud560 \uc218 \uc5c6\uc2b5\ub2c8\ub2e4."},
+            {   MsgKey.ER_SCHEME_NOT_CONFORMANT,
+                "\uCCB4\uACC4\uAC00 \uC77C\uCE58\uD558\uC9C0 \uC54A\uC2B5\uB2C8\uB2E4." },
 
-      { MsgKey.ER_NO_FRAGMENT_STRING_IN_PATH,
-        "\uacbd\ub85c \ubc0f \ub2e8\ud3b8 \ub458 \ub2e4\uc5d0 \ub2e8\ud3b8\uc744 \uc9c0\uc815\ud560 \uc218 \uc5c6\uc2b5\ub2c8\ub2e4."},
+            {   MsgKey.ER_SCHEME_FROM_NULL_STRING,
+                "\uB110 \uBB38\uC790\uC5F4\uC5D0\uC11C \uCCB4\uACC4\uB97C \uC124\uC815\uD560 \uC218 \uC5C6\uC2B5\uB2C8\uB2E4." },
 
-      { MsgKey.ER_NO_QUERY_STRING_IN_PATH,
-        "\uacbd\ub85c \ubc0f \uc870\ud68c \ubb38\uc790\uc5f4\uc5d0 \uc870\ud68c \ubb38\uc790\uc5f4\uc744 \uc9c0\uc815\ud560 \uc218 \uc5c6\uc2b5\ub2c8\ub2e4."},
+            {   MsgKey.ER_PATH_CONTAINS_INVALID_ESCAPE_SEQUENCE,
+                "\uACBD\uB85C\uC5D0 \uBD80\uC801\uD569\uD55C \uC774\uC2A4\uCF00\uC774\uD504 \uC2DC\uD000\uC2A4\uAC00 \uD3EC\uD568\uB418\uC5B4 \uC788\uC2B5\uB2C8\uB2E4." },
 
-      { MsgKey.ER_NO_PORT_IF_NO_HOST,
-        "\ud638\uc2a4\ud2b8\ub97c \uc9c0\uc815\ud558\uc9c0 \uc54a\uc740 \uacbd\uc6b0\uc5d0\ub294 \ud3ec\ud2b8\ub97c \uc9c0\uc815\ud560 \uc218 \uc5c6\uc2b5\ub2c8\ub2e4."},
+            {   MsgKey.ER_PATH_INVALID_CHAR,
+                "\uACBD\uB85C\uC5D0 \uBD80\uC801\uD569\uD55C \uBB38\uC790\uAC00 \uD3EC\uD568\uB428: {0}" },
 
-      { MsgKey.ER_NO_USERINFO_IF_NO_HOST,
-        "\ud638\uc2a4\ud2b8\ub97c \uc9c0\uc815\ud558\uc9c0 \uc54a\uc740 \uacbd\uc6b0\uc5d0\ub294 Userinfo\ub97c \uc9c0\uc815\ud560 \uc218 \uc5c6\uc2b5\ub2c8\ub2e4."},
+            {   MsgKey.ER_FRAG_INVALID_CHAR,
+                "\uBD80\uBD84\uC5D0 \uBD80\uC801\uD569\uD55C \uBB38\uC790\uAC00 \uD3EC\uD568\uB418\uC5B4 \uC788\uC2B5\uB2C8\uB2E4." },
 
-      { MsgKey.ER_SCHEME_REQUIRED,
-        "\uc124\uacc4\uac00 \ud544\uc694\ud569\ub2c8\ub2e4!"}
+            {   MsgKey.ER_FRAG_WHEN_PATH_NULL,
+                "\uACBD\uB85C\uAC00 \uB110\uC77C \uACBD\uC6B0 \uBD80\uBD84\uC744 \uC124\uC815\uD560 \uC218 \uC5C6\uC2B5\uB2C8\uB2E4." },
 
-    };
-    return contents;
-  }
+            {   MsgKey.ER_FRAG_FOR_GENERIC_URI,
+                "\uC77C\uBC18 URI\uC5D0 \uB300\uD574\uC11C\uB9CC \uBD80\uBD84\uC744 \uC124\uC815\uD560 \uC218 \uC788\uC2B5\uB2C8\uB2E4." },
+
+            {   MsgKey.ER_NO_SCHEME_IN_URI,
+                "URI\uC5D0\uC11C \uCCB4\uACC4\uB97C \uCC3E\uC744 \uC218 \uC5C6\uC2B5\uB2C8\uB2E4." },
+
+            {   MsgKey.ER_CANNOT_INIT_URI_EMPTY_PARMS,
+                "\uBE48 \uB9E4\uAC1C\uBCC0\uC218\uB85C URI\uB97C \uCD08\uAE30\uD654\uD560 \uC218 \uC5C6\uC2B5\uB2C8\uB2E4." },
+
+            {   MsgKey.ER_NO_FRAGMENT_STRING_IN_PATH,
+                "\uACBD\uB85C\uC640 \uBD80\uBD84\uC5D0 \uBAA8\uB450 \uBD80\uBD84\uC744 \uC9C0\uC815\uD560 \uC218\uB294 \uC5C6\uC2B5\uB2C8\uB2E4." },
+
+            {   MsgKey.ER_NO_QUERY_STRING_IN_PATH,
+                "\uACBD\uB85C \uBC0F \uC9C8\uC758 \uBB38\uC790\uC5F4\uC5D0 \uC9C8\uC758 \uBB38\uC790\uC5F4\uC744 \uC9C0\uC815\uD560 \uC218 \uC5C6\uC2B5\uB2C8\uB2E4." },
+
+            {   MsgKey.ER_NO_PORT_IF_NO_HOST,
+                "\uD638\uC2A4\uD2B8\uB97C \uC9C0\uC815\uD558\uC9C0 \uC54A\uC740 \uACBD\uC6B0\uC5D0\uB294 \uD3EC\uD2B8\uB97C \uC9C0\uC815\uD560 \uC218 \uC5C6\uC2B5\uB2C8\uB2E4." },
+
+            {   MsgKey.ER_NO_USERINFO_IF_NO_HOST,
+                "\uD638\uC2A4\uD2B8\uB97C \uC9C0\uC815\uD558\uC9C0 \uC54A\uC740 \uACBD\uC6B0\uC5D0\uB294 Userinfo\uB97C \uC9C0\uC815\uD560 \uC218 \uC5C6\uC2B5\uB2C8\uB2E4." },
+
+            {   MsgKey.ER_XML_VERSION_NOT_SUPPORTED,
+                "\uACBD\uACE0: \uCD9C\uB825 \uBB38\uC11C\uC758 \uBC84\uC804\uC774 ''{0}''\uC774(\uAC00) \uB418\uB3C4\uB85D \uC694\uCCAD\uD588\uC2B5\uB2C8\uB2E4. \uC774 \uBC84\uC804\uC758 XML\uC740 \uC9C0\uC6D0\uB418\uC9C0 \uC54A\uC2B5\uB2C8\uB2E4. \uCD9C\uB825 \uBB38\uC11C\uC758 \uBC84\uC804\uC740 ''1.0''\uC774 \uB429\uB2C8\uB2E4." },
+
+            {   MsgKey.ER_SCHEME_REQUIRED,
+                "\uCCB4\uACC4\uAC00 \uD544\uC694\uD569\uB2C8\uB2E4!" },
+
+            /*
+             * Note to translators:  The words 'Properties' and
+             * 'SerializerFactory' in this message are Java class names
+             * and should not be translated.
+             */
+            {   MsgKey.ER_FACTORY_PROPERTY_MISSING,
+                "SerializerFactory\uC5D0 \uC804\uB2EC\uB41C Properties \uAC1D\uCCB4\uC5D0 ''{0}'' \uC18D\uC131\uC774 \uC5C6\uC2B5\uB2C8\uB2E4." },
+
+            {   MsgKey.ER_ENCODING_NOT_SUPPORTED,
+                "\uACBD\uACE0: \uC778\uCF54\uB529 ''{0}''\uC740(\uB294) Java \uB7F0\uD0C0\uC784\uC5D0 \uC9C0\uC6D0\uB418\uC9C0 \uC54A\uC2B5\uB2C8\uB2E4." },
+
+
+        };
+
+        return contents;
+    }
 }
diff --git a/jaxp/src/com/sun/org/apache/xml/internal/serializer/utils/SerializerMessages_pt_BR.java b/jaxp/src/com/sun/org/apache/xml/internal/serializer/utils/SerializerMessages_pt_BR.java
new file mode 100644
index 0000000..41949dd
--- /dev/null
+++ b/jaxp/src/com/sun/org/apache/xml/internal/serializer/utils/SerializerMessages_pt_BR.java
@@ -0,0 +1,208 @@
+/*
+ * reserved comment block
+ * DO NOT REMOVE OR ALTER!
+ */
+/*
+ * Copyright 2004 The Apache Software Foundation.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+/*
+ * $Id: SerializerMessages_pt_BR.java /st_wptg_1.8.0.0.0jdk/2 2013/09/11 12:46:54 gmolloy Exp $
+ */
+package com.sun.org.apache.xml.internal.serializer.utils;
+
+import java.util.ListResourceBundle;
+import java.util.Locale;
+import java.util.MissingResourceException;
+import java.util.ResourceBundle;
+
+/**
+ * An instance of this class is a ListResourceBundle that
+ * has the required getContents() method that returns
+ * an array of message-key/message associations.
+ * <p>
+ * The message keys are defined in {@link MsgKey}. The
+ * messages that those keys map to are defined here.
+ * <p>
+ * The messages in the English version are intended to be
+ * translated.
+ *
+ * This class is not a public API, it is only public because it is
+ * used in com.sun.org.apache.xml.internal.serializer.
+ *
+ * @xsl.usage internal
+ */
+public class SerializerMessages_pt_BR extends ListResourceBundle {
+
+    /*
+     * This file contains error and warning messages related to
+     * Serializer Error Handling.
+     *
+     *  General notes to translators:
+
+     *  1) A stylesheet is a description of how to transform an input XML document
+     *     into a resultant XML document (or HTML document or text).  The
+     *     stylesheet itself is described in the form of an XML document.
+
+     *
+     *  2) An element is a mark-up tag in an XML document; an attribute is a
+     *     modifier on the tag.  For example, in <elem attr='val' attr2='val2'>
+     *     "elem" is an element name, "attr" and "attr2" are attribute names with
+     *     the values "val" and "val2", respectively.
+     *
+     *  3) A namespace declaration is a special attribute that is used to associate
+     *     a prefix with a URI (the namespace).  The meanings of element names and
+     *     attribute names that use that prefix are defined with respect to that
+     *     namespace.
+     *
+     *
+     */
+
+    /** The lookup table for error messages.   */
+    public Object[][] getContents() {
+        Object[][] contents = new Object[][] {
+            {   MsgKey.BAD_MSGKEY,
+                "A chave de mensagem ''{0}'' n\u00E3o est\u00E1 na classe de mensagem ''{1}''" },
+
+            {   MsgKey.BAD_MSGFORMAT,
+                "Houve falha no formato da mensagem ''{0}'' na classe de mensagem ''{1}''." },
+
+            {   MsgKey.ER_SERIALIZER_NOT_CONTENTHANDLER,
+                "A classe ''{0}'' do serializador n\u00E3o implementa org.xml.sax.ContentHandler." },
+
+            {   MsgKey.ER_RESOURCE_COULD_NOT_FIND,
+                    "N\u00E3o foi poss\u00EDvel encontrar o recurso [ {0} ].\n {1}" },
+
+            {   MsgKey.ER_RESOURCE_COULD_NOT_LOAD,
+                    "O recurso [ {0} ] n\u00E3o foi carregado: {1} \n {2} \t {3}" },
+
+            {   MsgKey.ER_BUFFER_SIZE_LESSTHAN_ZERO,
+                    "Tamanho do buffer <=0" },
+
+            {   MsgKey.ER_INVALID_UTF16_SURROGATE,
+                    "Foi detectado um substituto de UTF-16 inv\u00E1lido: {0} ?" },
+
+            {   MsgKey.ER_OIERROR,
+                "Erro de E/S" },
+
+            {   MsgKey.ER_ILLEGAL_ATTRIBUTE_POSITION,
+                "N\u00E3o \u00E9 poss\u00EDvel adicionar o atributo {0} depois dos n\u00F3s filhos ou antes que um elemento seja produzido. O atributo ser\u00E1 ignorado." },
+
+            /*
+             * Note to translators:  The stylesheet contained a reference to a
+             * namespace prefix that was undefined.  The value of the substitution
+             * text is the name of the prefix.
+             */
+            {   MsgKey.ER_NAMESPACE_PREFIX,
+                "O namespace do prefixo ''{0}'' n\u00E3o foi declarado." },
+
+            /*
+             * Note to translators:  This message is reported if the stylesheet
+             * being processed attempted to construct an XML document with an
+             * attribute in a place other than on an element.  The substitution text
+             * specifies the name of the attribute.
+             */
+            {   MsgKey.ER_STRAY_ATTRIBUTE,
+                "Atributo ''{0}'' fora do elemento." },
+
+            /*
+             * Note to translators:  As with the preceding message, a namespace
+             * declaration has the form of an attribute and is only permitted to
+             * appear on an element.  The substitution text {0} is the namespace
+             * prefix and {1} is the URI that was being used in the erroneous
+             * namespace declaration.
+             */
+            {   MsgKey.ER_STRAY_NAMESPACE,
+                "Declara\u00E7\u00E3o de namespace ''{0}''=''{1}'' fora do elemento." },
+
+            {   MsgKey.ER_COULD_NOT_LOAD_RESOURCE,
+                "N\u00E3o foi poss\u00EDvel carregar ''{0}'' (verificar CLASSPATH); usando agora apenas os defaults" },
+
+            {   MsgKey.ER_ILLEGAL_CHARACTER,
+                "Tentativa de exibir um caractere de valor integral {0} que n\u00E3o est\u00E1 representado na codifica\u00E7\u00E3o de sa\u00EDda especificada de {1}." },
+
+            {   MsgKey.ER_COULD_NOT_LOAD_METHOD_PROPERTY,
+                "N\u00E3o foi poss\u00EDvel carregar o arquivo de propriedade ''{0}'' para o m\u00E9todo de sa\u00EDda ''{1}'' (verificar CLASSPATH)" },
+
+            {   MsgKey.ER_INVALID_PORT,
+                "N\u00FAmero de porta inv\u00E1lido" },
+
+            {   MsgKey.ER_PORT_WHEN_HOST_NULL,
+                "A porta n\u00E3o pode ser definida quando o host \u00E9 nulo" },
+
+            {   MsgKey.ER_HOST_ADDRESS_NOT_WELLFORMED,
+                "O host n\u00E3o \u00E9 um endere\u00E7o correto" },
+
+            {   MsgKey.ER_SCHEME_NOT_CONFORMANT,
+                "O esquema n\u00E3o \u00E9 compat\u00EDvel." },
+
+            {   MsgKey.ER_SCHEME_FROM_NULL_STRING,
+                "N\u00E3o \u00E9 poss\u00EDvel definir o esquema de uma string nula" },
+
+            {   MsgKey.ER_PATH_CONTAINS_INVALID_ESCAPE_SEQUENCE,
+                "O caminho cont\u00E9m uma sequ\u00EAncia inv\u00E1lida de caracteres de escape" },
+
+            {   MsgKey.ER_PATH_INVALID_CHAR,
+                "O caminho cont\u00E9m um caractere inv\u00E1lido: {0}" },
+
+            {   MsgKey.ER_FRAG_INVALID_CHAR,
+                "O fragmento cont\u00E9m um caractere inv\u00E1lido" },
+
+            {   MsgKey.ER_FRAG_WHEN_PATH_NULL,
+                "O fragmento n\u00E3o pode ser definido quando o caminho \u00E9 nulo" },
+
+            {   MsgKey.ER_FRAG_FOR_GENERIC_URI,
+                "O fragmento s\u00F3 pode ser definido para um URI gen\u00E9rico" },
+
+            {   MsgKey.ER_NO_SCHEME_IN_URI,
+                "Nenhum esquema encontrado no URI" },
+
+            {   MsgKey.ER_CANNOT_INIT_URI_EMPTY_PARMS,
+                "N\u00E3o \u00E9 poss\u00EDvel inicializar o URI com par\u00E2metros vazios" },
+
+            {   MsgKey.ER_NO_FRAGMENT_STRING_IN_PATH,
+                "O fragmento n\u00E3o pode ser especificado no caminho nem no fragmento" },
+
+            {   MsgKey.ER_NO_QUERY_STRING_IN_PATH,
+                "A string de consulta n\u00E3o pode ser especificada no caminho nem na string de consulta" },
+
+            {   MsgKey.ER_NO_PORT_IF_NO_HOST,
+                "A porta n\u00E3o pode ser especificada se o host n\u00E3o tiver sido especificado" },
+
+            {   MsgKey.ER_NO_USERINFO_IF_NO_HOST,
+                "As informa\u00E7\u00F5es do usu\u00E1rio n\u00E3o podem ser especificadas se o host n\u00E3o tiver sido especificado" },
+
+            {   MsgKey.ER_XML_VERSION_NOT_SUPPORTED,
+                "Advert\u00EAncia: a vers\u00E3o do documento de sa\u00EDda deve ser obrigatoriamente ''{0}''. Esta vers\u00E3o do XML n\u00E3o \u00E9 suportada. A vers\u00E3o do documento de sa\u00EDda ser\u00E1 ''1.0''." },
+
+            {   MsgKey.ER_SCHEME_REQUIRED,
+                "O esquema \u00E9 obrigat\u00F3rio!" },
+
+            /*
+             * Note to translators:  The words 'Properties' and
+             * 'SerializerFactory' in this message are Java class names
+             * and should not be translated.
+             */
+            {   MsgKey.ER_FACTORY_PROPERTY_MISSING,
+                "O objeto Properties especificado para a SerializerFactory n\u00E3o tem uma propriedade ''{0}''." },
+
+            {   MsgKey.ER_ENCODING_NOT_SUPPORTED,
+                "Advert\u00EAncia: a codifica\u00E7\u00E3o ''{0}'' n\u00E3o \u00E9 suportada pelo Java runtime." },
+
+
+        };
+
+        return contents;
+    }
+}
diff --git a/jaxp/src/com/sun/org/apache/xml/internal/serializer/utils/SerializerMessages_sv.java b/jaxp/src/com/sun/org/apache/xml/internal/serializer/utils/SerializerMessages_sv.java
index 4690a4b..e9104b7 100644
--- a/jaxp/src/com/sun/org/apache/xml/internal/serializer/utils/SerializerMessages_sv.java
+++ b/jaxp/src/com/sun/org/apache/xml/internal/serializer/utils/SerializerMessages_sv.java
@@ -3,7 +3,7 @@
  * DO NOT REMOVE OR ALTER!
  */
 /*
- * Copyright 1999-2004 The Apache Software Foundation.
+ * Copyright 2004 The Apache Software Foundation.
  *
  * Licensed under the Apache License, Version 2.0 (the "License");
  * you may not use this file except in compliance with the License.
@@ -18,83 +18,191 @@
  * limitations under the License.
  */
 /*
- * $Id: SerializerMessages_sv.java,v 1.1.4.1 2005/09/08 11:03:17 suresh_emailid Exp $
+ * $Id: SerializerMessages_sv.java /st_wptg_1.8.0.0.0jdk/2 2013/09/16 06:50:58 gmolloy Exp $
  */
-
 package com.sun.org.apache.xml.internal.serializer.utils;
 
 import java.util.ListResourceBundle;
+import java.util.Locale;
+import java.util.MissingResourceException;
+import java.util.ResourceBundle;
 
+/**
+ * An instance of this class is a ListResourceBundle that
+ * has the required getContents() method that returns
+ * an array of message-key/message associations.
+ * <p>
+ * The message keys are defined in {@link MsgKey}. The
+ * messages that those keys map to are defined here.
+ * <p>
+ * The messages in the English version are intended to be
+ * translated.
+ *
+ * This class is not a public API, it is only public because it is
+ * used in com.sun.org.apache.xml.internal.serializer.
+ *
+ * @xsl.usage internal
+ */
 public class SerializerMessages_sv extends ListResourceBundle {
-  public Object[][] getContents() {
-    Object[][] contents =  new Object[][] {
-        // BAD_MSGKEY needs translation
-        // BAD_MSGFORMAT needs translation
-        // ER_SERIALIZER_NOT_CONTENTHANDLER needs translation
-        // ER_RESOURCE_COULD_NOT_FIND needs translation
-        // ER_RESOURCE_COULD_NOT_LOAD needs translation
-        // ER_BUFFER_SIZE_LESSTHAN_ZERO needs translation
-        // ER_INVALID_UTF16_SURROGATE needs translation
-        // ER_OIERROR needs translation
-        // ER_ILLEGAL_ATTRIBUTE_POSITION needs translation
-        // ER_NAMESPACE_PREFIX needs translation
-        // ER_STRAY_ATTRIBUTE needs translation
-        // ER_STRAY_NAMESPACE needs translation
-        // ER_COULD_NOT_LOAD_RESOURCE needs translation
-        // ER_ILLEGAL_CHARACTER needs translation
-        // ER_COULD_NOT_LOAD_METHOD_PROPERTY needs translation
-      { MsgKey.ER_INVALID_PORT,
-        "Ogiltigt portnummer"},
 
-      { MsgKey.ER_PORT_WHEN_HOST_NULL,
-        "Port kan inte s\u00e4ttas n\u00e4r v\u00e4rd \u00e4r null"},
+    /*
+     * This file contains error and warning messages related to
+     * Serializer Error Handling.
+     *
+     *  General notes to translators:
 
-      { MsgKey.ER_HOST_ADDRESS_NOT_WELLFORMED,
-        "V\u00e4rd \u00e4r inte en v\u00e4lformulerad adress"},
+     *  1) A stylesheet is a description of how to transform an input XML document
+     *     into a resultant XML document (or HTML document or text).  The
+     *     stylesheet itself is described in the form of an XML document.
 
-      { MsgKey.ER_SCHEME_NOT_CONFORMANT,
-        "Schemat \u00e4r inte likformigt."},
+     *
+     *  2) An element is a mark-up tag in an XML document; an attribute is a
+     *     modifier on the tag.  For example, in <elem attr='val' attr2='val2'>
+     *     "elem" is an element name, "attr" and "attr2" are attribute names with
+     *     the values "val" and "val2", respectively.
+     *
+     *  3) A namespace declaration is a special attribute that is used to associate
+     *     a prefix with a URI (the namespace).  The meanings of element names and
+     *     attribute names that use that prefix are defined with respect to that
+     *     namespace.
+     *
+     *
+     */
 
-      { MsgKey.ER_SCHEME_FROM_NULL_STRING,
-        "Kan inte s\u00e4tta schema fr\u00e5n null-str\u00e4ng"},
+    /** The lookup table for error messages.   */
+    public Object[][] getContents() {
+        Object[][] contents = new Object[][] {
+            {   MsgKey.BAD_MSGKEY,
+                "Meddelandenyckeln ''{0}'' \u00E4r inte i meddelandeklassen ''{1}''" },
 
-      { MsgKey.ER_PATH_CONTAINS_INVALID_ESCAPE_SEQUENCE,
-        "V\u00e4g inneh\u00e5ller ogiltig flyktsekvens"},
+            {   MsgKey.BAD_MSGFORMAT,
+                "Formatet p\u00E5 meddelandet ''{0}'' i meddelandeklassen ''{1}'' underk\u00E4ndes." },
 
-      { MsgKey.ER_PATH_INVALID_CHAR,
-        "V\u00e4g inneh\u00e5ller ogiltigt tecken: {0}"},
+            {   MsgKey.ER_SERIALIZER_NOT_CONTENTHANDLER,
+                "Serializerklassen ''{0}'' implementerar inte org.xml.sax.ContentHandler." },
 
-      { MsgKey.ER_FRAG_INVALID_CHAR,
-        "Fragment inneh\u00e5ller ogiltigt tecken"},
+            {   MsgKey.ER_RESOURCE_COULD_NOT_FIND,
+                    "Resursen [ {0} ] kunde inte h\u00E4mtas.\n {1}" },
 
-      { MsgKey.ER_FRAG_WHEN_PATH_NULL,
-        "Fragment kan inte s\u00e4ttas n\u00e4r v\u00e4g \u00e4r null"},
+            {   MsgKey.ER_RESOURCE_COULD_NOT_LOAD,
+                    "Resursen [ {0} ] kunde inte laddas: {1} \n {2} \t {3}" },
 
-      { MsgKey.ER_FRAG_FOR_GENERIC_URI,
-        "Fragment kan bara s\u00e4ttas f\u00f6r en allm\u00e4n URI"},
+            {   MsgKey.ER_BUFFER_SIZE_LESSTHAN_ZERO,
+                    "Buffertstorlek <=0" },
 
-      { MsgKey.ER_NO_SCHEME_IN_URI,
-        "Schema saknas i URI: {0}"},
+            {   MsgKey.ER_INVALID_UTF16_SURROGATE,
+                    "Ogiltigt UTF-16-surrogat uppt\u00E4ckt: {0} ?" },
 
-      { MsgKey.ER_CANNOT_INIT_URI_EMPTY_PARMS,
-        "Kan inte initialisera URI med tomma parametrar"},
+            {   MsgKey.ER_OIERROR,
+                "IO-fel" },
 
-      { MsgKey.ER_NO_FRAGMENT_STRING_IN_PATH,
-        "Fragment kan inte anges i b\u00e5de v\u00e4gen och fragmentet"},
+            {   MsgKey.ER_ILLEGAL_ATTRIBUTE_POSITION,
+                "Kan inte l\u00E4gga till attributet {0} efter underordnade noder eller innan ett element har skapats. Attributet ignoreras." },
 
-      { MsgKey.ER_NO_QUERY_STRING_IN_PATH,
-        "F\u00f6rfr\u00e5gan-str\u00e4ng kan inte anges i v\u00e4g och f\u00f6rfr\u00e5gan-str\u00e4ng"},
+            /*
+             * Note to translators:  The stylesheet contained a reference to a
+             * namespace prefix that was undefined.  The value of the substitution
+             * text is the name of the prefix.
+             */
+            {   MsgKey.ER_NAMESPACE_PREFIX,
+                "Namnrymd f\u00F6r prefix ''{0}'' har inte deklarerats." },
 
-      { MsgKey.ER_NO_PORT_IF_NO_HOST,
-        "Port f\u00e5r inte anges om v\u00e4rden inte \u00e4r angiven"},
+            /*
+             * Note to translators:  This message is reported if the stylesheet
+             * being processed attempted to construct an XML document with an
+             * attribute in a place other than on an element.  The substitution text
+             * specifies the name of the attribute.
+             */
+            {   MsgKey.ER_STRAY_ATTRIBUTE,
+                "Attributet ''{0}'' finns utanf\u00F6r elementet." },
 
-      { MsgKey.ER_NO_USERINFO_IF_NO_HOST,
-        "Userinfo f\u00e5r inte anges om v\u00e4rden inte \u00e4r angiven"},
+            /*
+             * Note to translators:  As with the preceding message, a namespace
+             * declaration has the form of an attribute and is only permitted to
+             * appear on an element.  The substitution text {0} is the namespace
+             * prefix and {1} is the URI that was being used in the erroneous
+             * namespace declaration.
+             */
+            {   MsgKey.ER_STRAY_NAMESPACE,
+                "Namnrymdsdeklarationen ''{0}''=''{1}'' finns utanf\u00F6r element." },
 
-      { MsgKey.ER_SCHEME_REQUIRED,
-        "Schema kr\u00e4vs!"}
+            {   MsgKey.ER_COULD_NOT_LOAD_RESOURCE,
+                "Kunde inte ladda ''{0}'' (kontrollera CLASSPATH), anv\u00E4nder nu enbart standardv\u00E4rden" },
 
-    };
-    return contents;
-  }
+            {   MsgKey.ER_ILLEGAL_CHARACTER,
+                "F\u00F6rs\u00F6k att skriva utdatatecken med integralv\u00E4rdet {0} som inte \u00E4r representerat i angiven utdatakodning av {1}." },
+
+            {   MsgKey.ER_COULD_NOT_LOAD_METHOD_PROPERTY,
+                "Kunde inte ladda egenskapsfilen ''{0}'' f\u00F6r utdatametoden ''{1}'' (kontrollera CLASSPATH)" },
+
+            {   MsgKey.ER_INVALID_PORT,
+                "Ogiltigt portnummer" },
+
+            {   MsgKey.ER_PORT_WHEN_HOST_NULL,
+                "Port kan inte st\u00E4llas in n\u00E4r v\u00E4rd \u00E4r null" },
+
+            {   MsgKey.ER_HOST_ADDRESS_NOT_WELLFORMED,
+                "V\u00E4rd \u00E4r inte en v\u00E4lformulerad adress" },
+
+            {   MsgKey.ER_SCHEME_NOT_CONFORMANT,
+                "Schemat \u00E4r inte likformigt." },
+
+            {   MsgKey.ER_SCHEME_FROM_NULL_STRING,
+                "Kan inte st\u00E4lla in schema fr\u00E5n null-str\u00E4ng" },
+
+            {   MsgKey.ER_PATH_CONTAINS_INVALID_ESCAPE_SEQUENCE,
+                "S\u00F6kv\u00E4gen inneh\u00E5ller en ogiltig escape-sekvens" },
+
+            {   MsgKey.ER_PATH_INVALID_CHAR,
+                "S\u00F6kv\u00E4gen inneh\u00E5ller ett ogiltigt tecken: {0}" },
+
+            {   MsgKey.ER_FRAG_INVALID_CHAR,
+                "Fragment inneh\u00E5ller ett ogiltigt tecken" },
+
+            {   MsgKey.ER_FRAG_WHEN_PATH_NULL,
+                "Fragment kan inte st\u00E4llas in n\u00E4r s\u00F6kv\u00E4g \u00E4r null" },
+
+            {   MsgKey.ER_FRAG_FOR_GENERIC_URI,
+                "Fragment kan bara st\u00E4llas in f\u00F6r en allm\u00E4n URI" },
+
+            {   MsgKey.ER_NO_SCHEME_IN_URI,
+                "Schema saknas i URI" },
+
+            {   MsgKey.ER_CANNOT_INIT_URI_EMPTY_PARMS,
+                "Kan inte initiera URI med tomma parametrar" },
+
+            {   MsgKey.ER_NO_FRAGMENT_STRING_IN_PATH,
+                "Fragment kan inte anges i b\u00E5de s\u00F6kv\u00E4gen och fragmentet" },
+
+            {   MsgKey.ER_NO_QUERY_STRING_IN_PATH,
+                "Fr\u00E5gestr\u00E4ng kan inte anges i b\u00E5de s\u00F6kv\u00E4gen och fr\u00E5gestr\u00E4ngen" },
+
+            {   MsgKey.ER_NO_PORT_IF_NO_HOST,
+                "Port f\u00E5r inte anges om v\u00E4rden inte \u00E4r angiven" },
+
+            {   MsgKey.ER_NO_USERINFO_IF_NO_HOST,
+                "Anv\u00E4ndarinfo f\u00E5r inte anges om v\u00E4rden inte \u00E4r angiven" },
+
+            {   MsgKey.ER_XML_VERSION_NOT_SUPPORTED,
+                "Varning:  Versionen av utdatadokumentet som beg\u00E4rts \u00E4r ''{0}''.  Den h\u00E4r versionen av XML st\u00F6ds inte.  Versionen av utdatadokumentet kommer att vara ''1.0''." },
+
+            {   MsgKey.ER_SCHEME_REQUIRED,
+                "Schema kr\u00E4vs!" },
+
+            /*
+             * Note to translators:  The words 'Properties' and
+             * 'SerializerFactory' in this message are Java class names
+             * and should not be translated.
+             */
+            {   MsgKey.ER_FACTORY_PROPERTY_MISSING,
+                "Egenskapsobjektet som \u00F6verf\u00F6rts till SerializerFactory har ingen ''{0}''-egenskap." },
+
+            {   MsgKey.ER_ENCODING_NOT_SUPPORTED,
+                "Varning: Kodningen ''{0}'' st\u00F6ds inte av Java runtime." },
+
+
+        };
+
+        return contents;
+    }
 }
diff --git a/jaxp/src/com/sun/org/apache/xml/internal/serializer/utils/SerializerMessages_zh_CN.java b/jaxp/src/com/sun/org/apache/xml/internal/serializer/utils/SerializerMessages_zh_CN.java
index cc41c7f..9bc7c1e 100644
--- a/jaxp/src/com/sun/org/apache/xml/internal/serializer/utils/SerializerMessages_zh_CN.java
+++ b/jaxp/src/com/sun/org/apache/xml/internal/serializer/utils/SerializerMessages_zh_CN.java
@@ -3,7 +3,7 @@
  * DO NOT REMOVE OR ALTER!
  */
 /*
- * Copyright 1999-2004 The Apache Software Foundation.
+ * Copyright 2004 The Apache Software Foundation.
  *
  * Licensed under the Apache License, Version 2.0 (the "License");
  * you may not use this file except in compliance with the License.
@@ -18,105 +18,191 @@
  * limitations under the License.
  */
 /*
- * $Id: SerializerMessages_zh_CN.java,v 1.1.4.1 2005/09/08 11:03:18 suresh_emailid Exp $
+ * $Id: SerializerMessages_zh_CN.java /st_wptg_1.8.0.0.0jdk/2 2013/09/16 04:44:25 gmolloy Exp $
  */
-
 package com.sun.org.apache.xml.internal.serializer.utils;
 
 import java.util.ListResourceBundle;
+import java.util.Locale;
+import java.util.MissingResourceException;
+import java.util.ResourceBundle;
 
+/**
+ * An instance of this class is a ListResourceBundle that
+ * has the required getContents() method that returns
+ * an array of message-key/message associations.
+ * <p>
+ * The message keys are defined in {@link MsgKey}. The
+ * messages that those keys map to are defined here.
+ * <p>
+ * The messages in the English version are intended to be
+ * translated.
+ *
+ * This class is not a public API, it is only public because it is
+ * used in com.sun.org.apache.xml.internal.serializer.
+ *
+ * @xsl.usage internal
+ */
 public class SerializerMessages_zh_CN extends ListResourceBundle {
-  public Object[][] getContents() {
-    Object[][] contents =  new Object[][] {
-        // BAD_MSGKEY needs translation
-        // BAD_MSGFORMAT needs translation
-      { MsgKey.ER_SERIALIZER_NOT_CONTENTHANDLER,
-        "\u4e32\u884c\u5668\u7c7b\u201c{0}\u201d\u4e0d\u5b9e\u73b0 org.xml.sax.ContentHandler."},
 
-      { MsgKey.ER_RESOURCE_COULD_NOT_FIND,
-        "\u627e\u4e0d\u5230\u8d44\u6e90 [ {0} ]\u3002\n {1}"},
+    /*
+     * This file contains error and warning messages related to
+     * Serializer Error Handling.
+     *
+     *  General notes to translators:
 
-      { MsgKey.ER_RESOURCE_COULD_NOT_LOAD,
-        "\u8d44\u6e90 [ {0} ] \u65e0\u6cd5\u88c5\u5165\uff1a{1} \n {2} \n {3}"},
+     *  1) A stylesheet is a description of how to transform an input XML document
+     *     into a resultant XML document (or HTML document or text).  The
+     *     stylesheet itself is described in the form of an XML document.
 
-      { MsgKey.ER_BUFFER_SIZE_LESSTHAN_ZERO,
-        "\u7f13\u51b2\u533a\u5927\u5c0f <=0"},
+     *
+     *  2) An element is a mark-up tag in an XML document; an attribute is a
+     *     modifier on the tag.  For example, in <elem attr='val' attr2='val2'>
+     *     "elem" is an element name, "attr" and "attr2" are attribute names with
+     *     the values "val" and "val2", respectively.
+     *
+     *  3) A namespace declaration is a special attribute that is used to associate
+     *     a prefix with a URI (the namespace).  The meanings of element names and
+     *     attribute names that use that prefix are defined with respect to that
+     *     namespace.
+     *
+     *
+     */
 
-      { MsgKey.ER_INVALID_UTF16_SURROGATE,
-        "\u68c0\u6d4b\u5230\u65e0\u6548\u7684 UTF-16 \u66ff\u4ee3\u8005\uff1a{0}\uff1f"},
+    /** The lookup table for error messages.   */
+    public Object[][] getContents() {
+        Object[][] contents = new Object[][] {
+            {   MsgKey.BAD_MSGKEY,
+                "\u6D88\u606F\u5173\u952E\u5B57 ''{0}'' \u4E0D\u5728\u6D88\u606F\u7C7B ''{1}'' \u4E2D" },
 
-      { MsgKey.ER_OIERROR,
-        "IO \u9519\u8bef"},
+            {   MsgKey.BAD_MSGFORMAT,
+                "\u6D88\u606F\u7C7B ''{1}'' \u4E2D\u6D88\u606F ''{0}'' \u7684\u683C\u5F0F\u5316\u5931\u8D25\u3002" },
 
-      { MsgKey.ER_ILLEGAL_ATTRIBUTE_POSITION,
-        "\u5728\u751f\u6210\u5b50\u8282\u70b9\u4e4b\u540e\u6216\u5728\u751f\u6210\u5143\u7d20\u4e4b\u524d\u65e0\u6cd5\u6dfb\u52a0\u5c5e\u6027 {0}\u3002\u5c06\u5ffd\u7565\u5c5e\u6027\u3002"},
+            {   MsgKey.ER_SERIALIZER_NOT_CONTENTHANDLER,
+                "\u4E32\u884C\u5668\u7C7B ''{0}'' \u4E0D\u5B9E\u73B0 org.xml.sax.ContentHandler\u3002" },
 
-      { MsgKey.ER_NAMESPACE_PREFIX,
-        "\u6ca1\u6709\u8bf4\u660e\u540d\u79f0\u7a7a\u95f4\u524d\u7f00\u201c{0}\u201d\u3002"},
+            {   MsgKey.ER_RESOURCE_COULD_NOT_FIND,
+                    "\u627E\u4E0D\u5230\u8D44\u6E90 [ {0} ]\u3002\n {1}" },
 
-        // ER_STRAY_ATTRIBUTE needs translation
-      { MsgKey.ER_STRAY_NAMESPACE,
-        "\u540d\u79f0\u7a7a\u95f4\u8bf4\u660e\u201c{0}\u201d=\u201c{1}\u201d\u5728\u5143\u7d20\u5916\u3002"},
+            {   MsgKey.ER_RESOURCE_COULD_NOT_LOAD,
+                    "\u8D44\u6E90 [ {0} ] \u65E0\u6CD5\u52A0\u8F7D: {1} \n {2} \t {3}" },
 
-      { MsgKey.ER_COULD_NOT_LOAD_RESOURCE,
-        "\u65e0\u6cd5\u88c5\u5165\u201c{0}\u201d\uff08\u68c0\u67e5 CLASSPATH\uff09\uff0c\u73b0\u5728\u53ea\u4f7f\u7528\u7f3a\u7701\u503c"},
+            {   MsgKey.ER_BUFFER_SIZE_LESSTHAN_ZERO,
+                    "\u7F13\u51B2\u533A\u5927\u5C0F <=0" },
 
-        // ER_ILLEGAL_CHARACTER needs translation
-      { MsgKey.ER_COULD_NOT_LOAD_METHOD_PROPERTY,
-        "\u65e0\u6cd5\u4e3a\u8f93\u51fa\u65b9\u6cd5\u201c{1}\u201d\u88c5\u8f7d\u5c5e\u6027\u6587\u4ef6\u201c{0}\u201d\uff08\u68c0\u67e5 CLASSPATH\uff09"},
+            {   MsgKey.ER_INVALID_UTF16_SURROGATE,
+                    "\u68C0\u6D4B\u5230\u65E0\u6548\u7684 UTF-16 \u4EE3\u7406: {0}?" },
 
-      { MsgKey.ER_INVALID_PORT,
-        "\u65e0\u6548\u7684\u7aef\u53e3\u53f7"},
+            {   MsgKey.ER_OIERROR,
+                "IO \u9519\u8BEF" },
 
-      { MsgKey.ER_PORT_WHEN_HOST_NULL,
-        "\u4e3b\u673a\u4e3a\u7a7a\u65f6\uff0c\u65e0\u6cd5\u8bbe\u7f6e\u7aef\u53e3"},
+            {   MsgKey.ER_ILLEGAL_ATTRIBUTE_POSITION,
+                "\u5728\u751F\u6210\u5B50\u8282\u70B9\u4E4B\u540E\u6216\u5728\u751F\u6210\u5143\u7D20\u4E4B\u524D\u65E0\u6CD5\u6DFB\u52A0\u5C5E\u6027 {0}\u3002\u5C06\u5FFD\u7565\u5C5E\u6027\u3002" },
 
-      { MsgKey.ER_HOST_ADDRESS_NOT_WELLFORMED,
-        "\u4e3b\u673a\u4e0d\u662f\u683c\u5f0f\u826f\u597d\u7684\u5730\u5740"},
+            /*
+             * Note to translators:  The stylesheet contained a reference to a
+             * namespace prefix that was undefined.  The value of the substitution
+             * text is the name of the prefix.
+             */
+            {   MsgKey.ER_NAMESPACE_PREFIX,
+                "\u6CA1\u6709\u8BF4\u660E\u540D\u79F0\u7A7A\u95F4\u524D\u7F00 ''{0}''\u3002" },
 
-      { MsgKey.ER_SCHEME_NOT_CONFORMANT,
-        "\u6a21\u5f0f\u4e0d\u4e00\u81f4\u3002"},
+            /*
+             * Note to translators:  This message is reported if the stylesheet
+             * being processed attempted to construct an XML document with an
+             * attribute in a place other than on an element.  The substitution text
+             * specifies the name of the attribute.
+             */
+            {   MsgKey.ER_STRAY_ATTRIBUTE,
+                "\u5C5E\u6027 ''{0}'' \u5728\u5143\u7D20\u5916\u90E8\u3002" },
 
-      { MsgKey.ER_SCHEME_FROM_NULL_STRING,
-        "\u65e0\u6cd5\u4ece\u7a7a\u5b57\u7b26\u4e32\u8bbe\u7f6e\u6a21\u5f0f"},
+            /*
+             * Note to translators:  As with the preceding message, a namespace
+             * declaration has the form of an attribute and is only permitted to
+             * appear on an element.  The substitution text {0} is the namespace
+             * prefix and {1} is the URI that was being used in the erroneous
+             * namespace declaration.
+             */
+            {   MsgKey.ER_STRAY_NAMESPACE,
+                "\u540D\u79F0\u7A7A\u95F4\u58F0\u660E ''{0}''=''{1}'' \u5728\u5143\u7D20\u5916\u90E8\u3002" },
 
-      { MsgKey.ER_PATH_CONTAINS_INVALID_ESCAPE_SEQUENCE,
-        "\u8def\u5f84\u5305\u542b\u65e0\u6548\u7684\u8f6c\u4e49\u5e8f\u5217"},
+            {   MsgKey.ER_COULD_NOT_LOAD_RESOURCE,
+                "\u65E0\u6CD5\u52A0\u8F7D ''{0}'' (\u68C0\u67E5 CLASSPATH), \u73B0\u5728\u53EA\u4F7F\u7528\u9ED8\u8BA4\u503C" },
 
-      { MsgKey.ER_PATH_INVALID_CHAR,
-        "\u8def\u5f84\u5305\u542b\u975e\u6cd5\u5b57\u7b26\uff1a{0}"},
+            {   MsgKey.ER_ILLEGAL_CHARACTER,
+                "\u5C1D\u8BD5\u8F93\u51FA\u672A\u4EE5{1}\u7684\u6307\u5B9A\u8F93\u51FA\u7F16\u7801\u8868\u793A\u7684\u6574\u6570\u503C {0} \u7684\u5B57\u7B26\u3002" },
 
-      { MsgKey.ER_FRAG_INVALID_CHAR,
-        "\u7247\u6bb5\u5305\u542b\u65e0\u6548\u7684\u5b57\u7b26"},
+            {   MsgKey.ER_COULD_NOT_LOAD_METHOD_PROPERTY,
+                "\u65E0\u6CD5\u4E3A\u8F93\u51FA\u65B9\u6CD5 ''{1}'' \u52A0\u8F7D\u5C5E\u6027\u6587\u4EF6 ''{0}'' (\u68C0\u67E5 CLASSPATH)" },
 
-      { MsgKey.ER_FRAG_WHEN_PATH_NULL,
-        "\u8def\u5f84\u4e3a\u7a7a\u65f6\uff0c\u65e0\u6cd5\u8bbe\u7f6e\u7247\u6bb5"},
+            {   MsgKey.ER_INVALID_PORT,
+                "\u65E0\u6548\u7684\u7AEF\u53E3\u53F7" },
 
-      { MsgKey.ER_FRAG_FOR_GENERIC_URI,
-        "\u53ea\u80fd\u4e3a\u4e00\u822c URI \u8bbe\u7f6e\u7247\u6bb5"},
+            {   MsgKey.ER_PORT_WHEN_HOST_NULL,
+                "\u4E3B\u673A\u4E3A\u7A7A\u65F6, \u65E0\u6CD5\u8BBE\u7F6E\u7AEF\u53E3" },
 
-      { MsgKey.ER_NO_SCHEME_IN_URI,
-        "\u5728 URI \u4e2d\u627e\u4e0d\u5230\u6a21\u5f0f\uff1a{0}"},
+            {   MsgKey.ER_HOST_ADDRESS_NOT_WELLFORMED,
+                "\u4E3B\u673A\u4E0D\u662F\u683C\u5F0F\u826F\u597D\u7684\u5730\u5740" },
 
-      { MsgKey.ER_CANNOT_INIT_URI_EMPTY_PARMS,
-        "\u65e0\u6cd5\u4ee5\u7a7a\u53c2\u6570\u521d\u59cb\u5316 URI"},
+            {   MsgKey.ER_SCHEME_NOT_CONFORMANT,
+                "\u65B9\u6848\u4E0D\u4E00\u81F4\u3002" },
 
-      { MsgKey.ER_NO_FRAGMENT_STRING_IN_PATH,
-        "\u8def\u5f84\u548c\u7247\u6bb5\u4e2d\u90fd\u65e0\u6cd5\u6307\u5b9a\u7247\u6bb5"},
+            {   MsgKey.ER_SCHEME_FROM_NULL_STRING,
+                "\u65E0\u6CD5\u4ECE\u7A7A\u5B57\u7B26\u4E32\u8BBE\u7F6E\u65B9\u6848" },
 
-      { MsgKey.ER_NO_QUERY_STRING_IN_PATH,
-        "\u8def\u5f84\u548c\u67e5\u8be2\u5b57\u7b26\u4e32\u4e2d\u4e0d\u80fd\u6307\u5b9a\u67e5\u8be2\u5b57\u7b26\u4e32"},
+            {   MsgKey.ER_PATH_CONTAINS_INVALID_ESCAPE_SEQUENCE,
+                "\u8DEF\u5F84\u5305\u542B\u65E0\u6548\u7684\u8F6C\u4E49\u5E8F\u5217" },
 
-      { MsgKey.ER_NO_PORT_IF_NO_HOST,
-        "\u5982\u679c\u6ca1\u6709\u6307\u5b9a\u4e3b\u673a\uff0c\u5219\u4e0d\u53ef\u4ee5\u6307\u5b9a\u7aef\u53e3"},
+            {   MsgKey.ER_PATH_INVALID_CHAR,
+                "\u8DEF\u5F84\u5305\u542B\u65E0\u6548\u7684\u5B57\u7B26: {0}" },
 
-      { MsgKey.ER_NO_USERINFO_IF_NO_HOST,
-        "\u5982\u679c\u6ca1\u6709\u6307\u5b9a\u4e3b\u673a\uff0c\u5219\u4e0d\u53ef\u4ee5\u6307\u5b9a Userinfo"},
+            {   MsgKey.ER_FRAG_INVALID_CHAR,
+                "\u7247\u6BB5\u5305\u542B\u65E0\u6548\u7684\u5B57\u7B26" },
 
-      { MsgKey.ER_SCHEME_REQUIRED,
-        "\u6a21\u5f0f\u662f\u5fc5\u9700\u7684\uff01"}
+            {   MsgKey.ER_FRAG_WHEN_PATH_NULL,
+                "\u8DEF\u5F84\u4E3A\u7A7A\u65F6, \u65E0\u6CD5\u8BBE\u7F6E\u7247\u6BB5" },
 
-    };
-    return contents;
-  }
+            {   MsgKey.ER_FRAG_FOR_GENERIC_URI,
+                "\u53EA\u80FD\u4E3A\u4E00\u822C URI \u8BBE\u7F6E\u7247\u6BB5" },
+
+            {   MsgKey.ER_NO_SCHEME_IN_URI,
+                "\u5728 URI \u4E2D\u627E\u4E0D\u5230\u65B9\u6848" },
+
+            {   MsgKey.ER_CANNOT_INIT_URI_EMPTY_PARMS,
+                "\u65E0\u6CD5\u4EE5\u7A7A\u53C2\u6570\u521D\u59CB\u5316 URI" },
+
+            {   MsgKey.ER_NO_FRAGMENT_STRING_IN_PATH,
+                "\u8DEF\u5F84\u548C\u7247\u6BB5\u4E2D\u90FD\u65E0\u6CD5\u6307\u5B9A\u7247\u6BB5" },
+
+            {   MsgKey.ER_NO_QUERY_STRING_IN_PATH,
+                "\u8DEF\u5F84\u548C\u67E5\u8BE2\u5B57\u7B26\u4E32\u4E2D\u4E0D\u80FD\u6307\u5B9A\u67E5\u8BE2\u5B57\u7B26\u4E32" },
+
+            {   MsgKey.ER_NO_PORT_IF_NO_HOST,
+                "\u5982\u679C\u6CA1\u6709\u6307\u5B9A\u4E3B\u673A, \u5219\u4E0D\u53EF\u4EE5\u6307\u5B9A\u7AEF\u53E3" },
+
+            {   MsgKey.ER_NO_USERINFO_IF_NO_HOST,
+                "\u5982\u679C\u6CA1\u6709\u6307\u5B9A\u4E3B\u673A, \u5219\u4E0D\u53EF\u4EE5\u6307\u5B9A Userinfo" },
+
+            {   MsgKey.ER_XML_VERSION_NOT_SUPPORTED,
+                "\u8B66\u544A: \u8F93\u51FA\u6587\u6863\u7684\u7248\u672C\u5E94\u4E3A ''{0}''\u3002\u4E0D\u652F\u6301\u6B64\u7248\u672C\u7684 XML\u3002\u8F93\u51FA\u6587\u6863\u7684\u7248\u672C\u5C06\u4E3A ''1.0''\u3002" },
+
+            {   MsgKey.ER_SCHEME_REQUIRED,
+                "\u65B9\u6848\u662F\u5FC5\u9700\u7684!" },
+
+            /*
+             * Note to translators:  The words 'Properties' and
+             * 'SerializerFactory' in this message are Java class names
+             * and should not be translated.
+             */
+            {   MsgKey.ER_FACTORY_PROPERTY_MISSING,
+                "\u4F20\u9012\u5230 SerializerFactory \u7684 Properties \u5BF9\u8C61\u6CA1\u6709 ''{0}'' \u5C5E\u6027\u3002" },
+
+            {   MsgKey.ER_ENCODING_NOT_SUPPORTED,
+                "\u8B66\u544A: Java \u8FD0\u884C\u65F6\u4E0D\u652F\u6301\u7F16\u7801 ''{0}''\u3002" },
+
+
+        };
+
+        return contents;
+    }
 }
diff --git a/jaxp/src/com/sun/org/apache/xml/internal/serializer/utils/SerializerMessages_zh_TW.java b/jaxp/src/com/sun/org/apache/xml/internal/serializer/utils/SerializerMessages_zh_TW.java
index a72d06e..f1f64f1 100644
--- a/jaxp/src/com/sun/org/apache/xml/internal/serializer/utils/SerializerMessages_zh_TW.java
+++ b/jaxp/src/com/sun/org/apache/xml/internal/serializer/utils/SerializerMessages_zh_TW.java
@@ -3,7 +3,7 @@
  * DO NOT REMOVE OR ALTER!
  */
 /*
- * Copyright 1999-2004 The Apache Software Foundation.
+ * Copyright 2004 The Apache Software Foundation.
  *
  * Licensed under the Apache License, Version 2.0 (the "License");
  * you may not use this file except in compliance with the License.
@@ -18,105 +18,191 @@
  * limitations under the License.
  */
 /*
- * $Id: SerializerMessages_zh_TW.java,v 1.1.4.1 2005/09/08 11:03:18 suresh_emailid Exp $
+ * $Id: SerializerMessages_zh_TW.java /st_wptg_1.8.0.0.0jdk/2 2013/09/14 02:16:34 gmolloy Exp $
  */
-
 package com.sun.org.apache.xml.internal.serializer.utils;
 
 import java.util.ListResourceBundle;
+import java.util.Locale;
+import java.util.MissingResourceException;
+import java.util.ResourceBundle;
 
+/**
+ * An instance of this class is a ListResourceBundle that
+ * has the required getContents() method that returns
+ * an array of message-key/message associations.
+ * <p>
+ * The message keys are defined in {@link MsgKey}. The
+ * messages that those keys map to are defined here.
+ * <p>
+ * The messages in the English version are intended to be
+ * translated.
+ *
+ * This class is not a public API, it is only public because it is
+ * used in com.sun.org.apache.xml.internal.serializer.
+ *
+ * @xsl.usage internal
+ */
 public class SerializerMessages_zh_TW extends ListResourceBundle {
-  public Object[][] getContents() {
-    Object[][] contents =  new Object[][] {
-        // BAD_MSGKEY needs translation
-        // BAD_MSGFORMAT needs translation
-      { MsgKey.ER_SERIALIZER_NOT_CONTENTHANDLER,
-        "serializer \u985e\u5225 ''{0}'' \u4e0d\u5be6\u4f5c org.xml.sax.ContentHandler\u3002"},
 
-      { MsgKey.ER_RESOURCE_COULD_NOT_FIND,
-        "\u627e\u4e0d\u5230\u8cc7\u6e90 [ {0} ]\u3002\n{1}"},
+    /*
+     * This file contains error and warning messages related to
+     * Serializer Error Handling.
+     *
+     *  General notes to translators:
 
-      { MsgKey.ER_RESOURCE_COULD_NOT_LOAD,
-        "\u7121\u6cd5\u8f09\u5165\u8cc7\u6e90 [ {0} ]\uff1a{1} \n {2} \n {3}"},
+     *  1) A stylesheet is a description of how to transform an input XML document
+     *     into a resultant XML document (or HTML document or text).  The
+     *     stylesheet itself is described in the form of an XML document.
 
-      { MsgKey.ER_BUFFER_SIZE_LESSTHAN_ZERO,
-        "\u7de9\u885d\u5340\u5927\u5c0f <=0"},
+     *
+     *  2) An element is a mark-up tag in an XML document; an attribute is a
+     *     modifier on the tag.  For example, in <elem attr='val' attr2='val2'>
+     *     "elem" is an element name, "attr" and "attr2" are attribute names with
+     *     the values "val" and "val2", respectively.
+     *
+     *  3) A namespace declaration is a special attribute that is used to associate
+     *     a prefix with a URI (the namespace).  The meanings of element names and
+     *     attribute names that use that prefix are defined with respect to that
+     *     namespace.
+     *
+     *
+     */
 
-      { MsgKey.ER_INVALID_UTF16_SURROGATE,
-        "\u5075\u6e2c\u5230\u7121\u6548\u7684 UTF-16 \u4ee3\u7406\uff1a{0}?"},
+    /** The lookup table for error messages.   */
+    public Object[][] getContents() {
+        Object[][] contents = new Object[][] {
+            {   MsgKey.BAD_MSGKEY,
+                "\u8A0A\u606F\u7D22\u5F15\u9375 ''{0}'' \u7684\u8A0A\u606F\u985E\u5225\u4E0D\u662F ''{1}''" },
 
-      { MsgKey.ER_OIERROR,
-        "IO \u932f\u8aa4"},
+            {   MsgKey.BAD_MSGFORMAT,
+                "\u8A0A\u606F\u985E\u5225 ''{1}'' \u4E2D\u7684\u8A0A\u606F ''{0}'' \u683C\u5F0F\u4E0D\u6B63\u78BA\u3002" },
 
-      { MsgKey.ER_ILLEGAL_ATTRIBUTE_POSITION,
-        "\u5728\u7522\u751f\u5b50\u9805\u7bc0\u9ede\u4e4b\u5f8c\uff0c\u6216\u5728\u7522\u751f\u5143\u7d20\u4e4b\u524d\uff0c\u4e0d\u53ef\u65b0\u589e\u5c6c\u6027 {0}\u3002\u5c6c\u6027\u6703\u88ab\u5ffd\u7565\u3002"},
+            {   MsgKey.ER_SERIALIZER_NOT_CONTENTHANDLER,
+                "serializer \u985E\u5225 ''{0}'' \u4E0D\u5BE6\u884C org.xml.sax.ContentHandler\u3002" },
 
-      { MsgKey.ER_NAMESPACE_PREFIX,
-        "\u5b57\u9996 ''{0}'' \u7684\u540d\u7a31\u7a7a\u9593\u5c1a\u672a\u5ba3\u544a\u3002"},
+            {   MsgKey.ER_RESOURCE_COULD_NOT_FIND,
+                    "\u627E\u4E0D\u5230\u8CC7\u6E90 [ {0} ]\u3002\n{1}" },
 
-        // ER_STRAY_ATTRIBUTE needs translation
-      { MsgKey.ER_STRAY_NAMESPACE,
-        "\u540d\u7a31\u7a7a\u9593\u5ba3\u544a ''{0}''=''{1}'' \u8d85\u51fa\u5143\u7d20\u5916\u3002"},
+            {   MsgKey.ER_RESOURCE_COULD_NOT_LOAD,
+                    "\u7121\u6CD5\u8F09\u5165\u8CC7\u6E90 [ {0} ]: {1} \n {2} \t {3}" },
 
-      { MsgKey.ER_COULD_NOT_LOAD_RESOURCE,
-        "\u7121\u6cd5\u8f09\u5165 ''{0}''\uff08\u6aa2\u67e5 CLASSPATH\uff09\uff0c\u76ee\u524d\u53ea\u4f7f\u7528\u9810\u8a2d\u503c"},
+            {   MsgKey.ER_BUFFER_SIZE_LESSTHAN_ZERO,
+                    "\u7DE9\u885D\u5340\u5927\u5C0F <=0" },
 
-        // ER_ILLEGAL_CHARACTER needs translation
-      { MsgKey.ER_COULD_NOT_LOAD_METHOD_PROPERTY,
-        "\u7121\u6cd5\u8f09\u5165\u8f38\u51fa\u65b9\u6cd5 ''{1}'' \u7684\u5167\u5bb9\u6a94 ''{0}''\uff08\u6aa2\u67e5 CLASSPATH\uff09"},
+            {   MsgKey.ER_INVALID_UTF16_SURROGATE,
+                    "\u5075\u6E2C\u5230\u7121\u6548\u7684 UTF-16 \u4EE3\u7406: {0}\uFF1F" },
 
-      { MsgKey.ER_INVALID_PORT,
-        "\u7121\u6548\u7684\u57e0\u7de8\u865f"},
+            {   MsgKey.ER_OIERROR,
+                "IO \u932F\u8AA4" },
 
-      { MsgKey.ER_PORT_WHEN_HOST_NULL,
-        "\u4e3b\u6a5f\u70ba\u7a7a\u503c\u6642\uff0c\u7121\u6cd5\u8a2d\u5b9a\u57e0"},
+            {   MsgKey.ER_ILLEGAL_ATTRIBUTE_POSITION,
+                "\u5728\u7522\u751F\u5B50\u9805\u7BC0\u9EDE\u4E4B\u5F8C\uFF0C\u6216\u5728\u7522\u751F\u5143\u7D20\u4E4B\u524D\uFF0C\u4E0D\u53EF\u65B0\u589E\u5C6C\u6027 {0}\u3002\u5C6C\u6027\u6703\u88AB\u5FFD\u7565\u3002" },
 
-      { MsgKey.ER_HOST_ADDRESS_NOT_WELLFORMED,
-        "\u4e3b\u6a5f\u6c92\u6709\u5b8c\u6574\u7684\u4f4d\u5740"},
+            /*
+             * Note to translators:  The stylesheet contained a reference to a
+             * namespace prefix that was undefined.  The value of the substitution
+             * text is the name of the prefix.
+             */
+            {   MsgKey.ER_NAMESPACE_PREFIX,
+                "\u5B57\u9996 ''{0}'' \u7684\u547D\u540D\u7A7A\u9593\u5C1A\u672A\u5BA3\u544A\u3002" },
 
-      { MsgKey.ER_SCHEME_NOT_CONFORMANT,
-        "\u7db1\u8981\u4e0d\u662f conformant\u3002"},
+            /*
+             * Note to translators:  This message is reported if the stylesheet
+             * being processed attempted to construct an XML document with an
+             * attribute in a place other than on an element.  The substitution text
+             * specifies the name of the attribute.
+             */
+            {   MsgKey.ER_STRAY_ATTRIBUTE,
+                "\u5C6C\u6027 ''{0}'' \u5728\u5143\u7D20\u4E4B\u5916\u3002" },
 
-      { MsgKey.ER_SCHEME_FROM_NULL_STRING,
-        "\u7121\u6cd5\u5f9e\u7a7a\u5b57\u4e32\u8a2d\u5b9a\u7db1\u8981"},
+            /*
+             * Note to translators:  As with the preceding message, a namespace
+             * declaration has the form of an attribute and is only permitted to
+             * appear on an element.  The substitution text {0} is the namespace
+             * prefix and {1} is the URI that was being used in the erroneous
+             * namespace declaration.
+             */
+            {   MsgKey.ER_STRAY_NAMESPACE,
+                "\u547D\u540D\u7A7A\u9593\u5BA3\u544A ''{0}''=''{1}'' \u8D85\u51FA\u5143\u7D20\u5916\u3002" },
 
-      { MsgKey.ER_PATH_CONTAINS_INVALID_ESCAPE_SEQUENCE,
-        "\u8def\u5f91\u5305\u542b\u7121\u6548\u7684\u8df3\u812b\u5b57\u5143"},
+            {   MsgKey.ER_COULD_NOT_LOAD_RESOURCE,
+                "\u7121\u6CD5\u8F09\u5165 ''{0}'' (\u6AA2\u67E5 CLASSPATH)\uFF0C\u76EE\u524D\u53EA\u4F7F\u7528\u9810\u8A2D\u503C" },
 
-      { MsgKey.ER_PATH_INVALID_CHAR,
-        "\u8def\u5f91\u5305\u542b\u7121\u6548\u7684\u5b57\u5143\uff1a{0}"},
+            {   MsgKey.ER_ILLEGAL_CHARACTER,
+                "\u5617\u8A66\u8F38\u51FA\u6574\u6578\u503C {0} \u7684\u5B57\u5143\uFF0C\u4F46\u662F\u5B83\u4E0D\u662F\u4EE5\u6307\u5B9A\u7684 {1} \u8F38\u51FA\u7DE8\u78BC\u5448\u73FE\u3002" },
 
-      { MsgKey.ER_FRAG_INVALID_CHAR,
-        "\u7247\u6bb5\u5305\u542b\u7121\u6548\u7684\u5b57\u5143"},
+            {   MsgKey.ER_COULD_NOT_LOAD_METHOD_PROPERTY,
+                "\u7121\u6CD5\u8F09\u5165\u8F38\u51FA\u65B9\u6CD5 ''{1}'' \u7684\u5C6C\u6027\u6A94 ''{0}'' (\u6AA2\u67E5 CLASSPATH)" },
 
-      { MsgKey.ER_FRAG_WHEN_PATH_NULL,
-        "\u8def\u5f91\u70ba\u7a7a\u503c\u6642\uff0c\u7121\u6cd5\u8a2d\u5b9a\u7247\u6bb5"},
+            {   MsgKey.ER_INVALID_PORT,
+                "\u7121\u6548\u7684\u9023\u63A5\u57E0\u865F\u78BC" },
 
-      { MsgKey.ER_FRAG_FOR_GENERIC_URI,
-        "\u53ea\u80fd\u5c0d\u901a\u7528\u7684 URI \u8a2d\u5b9a\u7247\u6bb5"},
+            {   MsgKey.ER_PORT_WHEN_HOST_NULL,
+                "\u4E3B\u6A5F\u70BA\u7A7A\u503C\u6642\uFF0C\u7121\u6CD5\u8A2D\u5B9A\u9023\u63A5\u57E0" },
 
-      { MsgKey.ER_NO_SCHEME_IN_URI,
-        "\u5728 URI\uff1a{0} \u627e\u4e0d\u5230\u7db1\u8981"},
+            {   MsgKey.ER_HOST_ADDRESS_NOT_WELLFORMED,
+                "\u4E3B\u6A5F\u6C92\u6709\u5B8C\u6574\u7684\u4F4D\u5740" },
 
-      { MsgKey.ER_CANNOT_INIT_URI_EMPTY_PARMS,
-        "\u7121\u6cd5\u4ee5\u7a7a\u767d\u53c3\u6578\u8d77\u59cb\u8a2d\u5b9a URI"},
+            {   MsgKey.ER_SCHEME_NOT_CONFORMANT,
+                "\u914D\u7F6E\u4E0D\u4E00\u81F4\u3002" },
 
-      { MsgKey.ER_NO_FRAGMENT_STRING_IN_PATH,
-        "\u7247\u6bb5\u7121\u6cd5\u540c\u6642\u5728\u8def\u5f91\u548c\u7247\u6bb5\u4e2d\u6307\u5b9a"},
+            {   MsgKey.ER_SCHEME_FROM_NULL_STRING,
+                "\u7121\u6CD5\u5F9E\u7A7A\u503C\u5B57\u4E32\u8A2D\u5B9A\u914D\u7F6E" },
 
-      { MsgKey.ER_NO_QUERY_STRING_IN_PATH,
-        "\u5728\u8def\u5f91\u53ca\u67e5\u8a62\u5b57\u4e32\u4e2d\u4e0d\u53ef\u6307\u5b9a\u67e5\u8a62\u5b57\u4e32"},
+            {   MsgKey.ER_PATH_CONTAINS_INVALID_ESCAPE_SEQUENCE,
+                "\u8DEF\u5F91\u5305\u542B\u7121\u6548\u7684\u9041\u96E2\u5E8F\u5217" },
 
-      { MsgKey.ER_NO_PORT_IF_NO_HOST,
-        "\u5982\u679c\u6c92\u6709\u6307\u5b9a\u4e3b\u6a5f\uff0c\u4e0d\u53ef\u6307\u5b9a\u57e0"},
+            {   MsgKey.ER_PATH_INVALID_CHAR,
+                "\u8DEF\u5F91\u5305\u542B\u7121\u6548\u7684\u5B57\u5143: {0}" },
 
-      { MsgKey.ER_NO_USERINFO_IF_NO_HOST,
-        "\u5982\u679c\u6c92\u6709\u6307\u5b9a\u4e3b\u6a5f\uff0c\u4e0d\u53ef\u6307\u5b9a Userinfo"},
+            {   MsgKey.ER_FRAG_INVALID_CHAR,
+                "\u7247\u6BB5\u5305\u542B\u7121\u6548\u7684\u5B57\u5143" },
 
-      { MsgKey.ER_SCHEME_REQUIRED,
-        "\u7db1\u8981\u662f\u5fc5\u9700\u7684\uff01"}
+            {   MsgKey.ER_FRAG_WHEN_PATH_NULL,
+                "\u8DEF\u5F91\u70BA\u7A7A\u503C\u6642\uFF0C\u7121\u6CD5\u8A2D\u5B9A\u7247\u6BB5" },
 
-    };
-    return contents;
-  }
+            {   MsgKey.ER_FRAG_FOR_GENERIC_URI,
+                "\u53EA\u80FD\u5C0D\u4E00\u822C URI \u8A2D\u5B9A\u7247\u6BB5" },
+
+            {   MsgKey.ER_NO_SCHEME_IN_URI,
+                "\u5728 URI \u627E\u4E0D\u5230\u914D\u7F6E" },
+
+            {   MsgKey.ER_CANNOT_INIT_URI_EMPTY_PARMS,
+                "\u7121\u6CD5\u4EE5\u7A7A\u767D\u53C3\u6578\u8D77\u59CB\u8A2D\u5B9A URI" },
+
+            {   MsgKey.ER_NO_FRAGMENT_STRING_IN_PATH,
+                "\u8DEF\u5F91\u548C\u7247\u6BB5\u4E0D\u80FD\u540C\u6642\u6307\u5B9A\u7247\u6BB5" },
+
+            {   MsgKey.ER_NO_QUERY_STRING_IN_PATH,
+                "\u5728\u8DEF\u5F91\u53CA\u67E5\u8A62\u5B57\u4E32\u4E2D\u4E0D\u53EF\u6307\u5B9A\u67E5\u8A62\u5B57\u4E32" },
+
+            {   MsgKey.ER_NO_PORT_IF_NO_HOST,
+                "\u5982\u679C\u6C92\u6709\u6307\u5B9A\u4E3B\u6A5F\uFF0C\u4E0D\u53EF\u6307\u5B9A\u9023\u63A5\u57E0" },
+
+            {   MsgKey.ER_NO_USERINFO_IF_NO_HOST,
+                "\u5982\u679C\u6C92\u6709\u6307\u5B9A\u4E3B\u6A5F\uFF0C\u4E0D\u53EF\u6307\u5B9A Userinfo" },
+
+            {   MsgKey.ER_XML_VERSION_NOT_SUPPORTED,
+                "\u8B66\u544A:  \u8981\u6C42\u7684\u8F38\u51FA\u6587\u4EF6\u7248\u672C\u70BA ''{0}''\u3002\u4E0D\u652F\u63F4\u6B64\u7248\u672C\u7684 XML\u3002\u8F38\u51FA\u6587\u4EF6\u7684\u7248\u672C\u5C07\u6703\u662F ''1.0''\u3002" },
+
+            {   MsgKey.ER_SCHEME_REQUIRED,
+                "\u5FC5\u9808\u6709\u914D\u7F6E\uFF01" },
+
+            /*
+             * Note to translators:  The words 'Properties' and
+             * 'SerializerFactory' in this message are Java class names
+             * and should not be translated.
+             */
+            {   MsgKey.ER_FACTORY_PROPERTY_MISSING,
+                "\u50B3\u905E\u7D66 SerializerFactory \u7684 Properties \u7269\u4EF6\u6C92\u6709 ''{0}'' \u5C6C\u6027\u3002" },
+
+            {   MsgKey.ER_ENCODING_NOT_SUPPORTED,
+                "\u8B66\u544A:  Java Runtime \u4E0D\u652F\u63F4\u7DE8\u78BC ''{0}''\u3002" },
+
+
+        };
+
+        return contents;
+    }
 }
diff --git a/jaxp/src/com/sun/org/apache/xpath/internal/res/XPATHErrorResources_es.java b/jaxp/src/com/sun/org/apache/xpath/internal/res/XPATHErrorResources_es.java
index 034531e..e7013f2 100644
--- a/jaxp/src/com/sun/org/apache/xpath/internal/res/XPATHErrorResources_es.java
+++ b/jaxp/src/com/sun/org/apache/xpath/internal/res/XPATHErrorResources_es.java
@@ -3,7 +3,7 @@
  * DO NOT REMOVE OR ALTER!
  */
 /*
- * Copyright 1999-2004 The Apache Software Foundation.
+ * Copyright 1999-2005 The Apache Software Foundation.
  *
  * Licensed under the Apache License, Version 2.0 (the "License");
  * you may not use this file except in compliance with the License.
@@ -18,7 +18,7 @@
  * limitations under the License.
  */
 /*
- * $Id: XPATHErrorResources_es.java,v 1.2.4.1 2005/09/15 00:39:22 jeffsuttor Exp $
+ * $Id: XPATHErrorResources_es.java /st_wptg_1.8.0.0.0jdk/2 2013/09/16 09:06:34 gmolloy Exp $
  */
 package com.sun.org.apache.xpath.internal.res;
 
@@ -432,7 +432,7 @@
      "ERROR. C\u00F3digo de operaci\u00F3n desconocido: {0}"},
 
   { ER_EXTRA_ILLEGAL_TOKENS,
-     "Elementos no permitidos adicionales: {0}"},
+     "Tokens no permitidos adicionales: {0}"},
 
   { ER_EXPECTED_DOUBLE_QUOTE,
       "literal con comillas incorrectas... se esperaban comillas dobles"},
@@ -549,7 +549,7 @@
      "En XPath.readObject: {0}"},
 
   { ER_FUNCTION_TOKEN_NOT_FOUND,
-      "No se ha encontrado el elemento de funci\u00F3n."},
+      "No se ha encontrado el token de funci\u00F3n."},
 
   { ER_CANNOT_DEAL_XPATH_TYPE,
        "No se puede negociar con el tipo de XPath: {0}"},
@@ -643,13 +643,13 @@
   // The message indicates that such an expression was expected following the
   // characters '/' or '//', but was not found.
   { ER_EXPECTED_REL_LOC_PATH,
-      "Se esperaba una ruta de acceso de ubicaci\u00F3n relativa despu\u00E9s del elemento '/' o '//'."},
+      "Se esperaba una ruta de acceso de ubicaci\u00F3n relativa despu\u00E9s del token '/' o '//'."},
 
   // Note to translators:  A location path is a form of XPath expression.
   // The message indicates that syntactically such an expression was expected,but
   // the characters specified by the substitution text were encountered instead.
   { ER_EXPECTED_LOC_PATH,
-       "Se esperaba una ruta de acceso de ubicaci\u00F3n, pero se ha encontrado el siguiente elemento: {0}"},
+       "Se esperaba una ruta de acceso de ubicaci\u00F3n, pero se ha encontrado el siguiente token: {0}"},
 
   // Note to translators:  A location path is a form of XPath expression.
   // The message indicates that syntactically such a subexpression was expected,
@@ -661,7 +661,7 @@
   // The message indicates that syntactically such an expression was expected
   // following the specified characters.
   { ER_EXPECTED_LOC_STEP,
-       "Se esperaba un paso de ubicaci\u00F3n despu\u00E9s del elemento '/' o '//'."},
+       "Se esperaba un paso de ubicaci\u00F3n despu\u00E9s del token '/' o '//'."},
 
   // Note to translators:  A node test is part of an XPath expression that is
   // used to test for particular kinds of nodes.  In this case, a node test that
@@ -846,7 +846,7 @@
       "XPath necesita un objeto derivado para implantar una prueba de nodo."},
 
   { WG_FUNCTION_TOKEN_NOT_FOUND,
-      "No se ha encontrado el elemento de funci\u00F3n."},
+      "No se ha encontrado el token de funci\u00F3n."},
 
   { WG_COULDNOT_FIND_FUNCTION,
       "No se ha encontrado la funci\u00F3n: {0}"},
diff --git a/jaxp/src/com/sun/org/apache/xpath/internal/res/XPATHErrorResources_ja.java b/jaxp/src/com/sun/org/apache/xpath/internal/res/XPATHErrorResources_ja.java
index 256b88c..e0a8514 100644
--- a/jaxp/src/com/sun/org/apache/xpath/internal/res/XPATHErrorResources_ja.java
+++ b/jaxp/src/com/sun/org/apache/xpath/internal/res/XPATHErrorResources_ja.java
@@ -3,7 +3,7 @@
  * DO NOT REMOVE OR ALTER!
  */
 /*
- * Copyright 1999-2004 The Apache Software Foundation.
+ * Copyright 1999-2005 The Apache Software Foundation.
  *
  * Licensed under the Apache License, Version 2.0 (the "License");
  * you may not use this file except in compliance with the License.
@@ -18,7 +18,7 @@
  * limitations under the License.
  */
 /*
- * $Id: XPATHErrorResources_ja.java,v 1.2.4.1 2005/09/15 00:39:20 jeffsuttor Exp $
+ * $Id: XPATHErrorResources_ja.java /st_wptg_1.8.0.0.0jdk/2 2013/09/12 17:39:58 gmolloy Exp $
  */
 package com.sun.org.apache.xpath.internal.res;
 
@@ -540,7 +540,7 @@
       "\u7121\u52B9\u306AUTF-16\u30B5\u30ED\u30B2\u30FC\u30C8\u304C\u691C\u51FA\u3055\u308C\u307E\u3057\u305F: {0}\u3002"},
 
   { ER_OIERROR,
-     "\u5165\u51FA\u529B\u30A8\u30E9\u30FC"},
+     "IO\u30A8\u30E9\u30FC"},
 
   { ER_CANNOT_CREATE_URL,
      "{0}\u306EURL\u3092\u4F5C\u6210\u3067\u304D\u307E\u305B\u3093"},
diff --git a/jaxp/src/com/sun/org/apache/xpath/internal/res/XPATHErrorResources_pt_BR.java b/jaxp/src/com/sun/org/apache/xpath/internal/res/XPATHErrorResources_pt_BR.java
index 8550492..188dbbc 100644
--- a/jaxp/src/com/sun/org/apache/xpath/internal/res/XPATHErrorResources_pt_BR.java
+++ b/jaxp/src/com/sun/org/apache/xpath/internal/res/XPATHErrorResources_pt_BR.java
@@ -3,13 +3,13 @@
  * DO NOT REMOVE OR ALTER!
  */
 /*
- * Copyright 1999-2004 The Apache Software Foundation.
+ * Copyright 1999-2005 The Apache Software Foundation.
  *
  * Licensed under the Apache License, Version 2.0 (the "License");
  * you may not use this file except in compliance with the License.
  * You may obtain a copy of the License at
  *
- *      http://www.apache.org/licenses/LICENSE-2.0
+ *     http://www.apache.org/licenses/LICENSE-2.0
  *
  * Unless required by applicable law or agreed to in writing, software
  * distributed under the License is distributed on an "AS IS" BASIS,
@@ -17,9 +17,8 @@
  * See the License for the specific language governing permissions and
  * limitations under the License.
  */
-
 /*
- * $Id: XPATHErrorResources_pt_BR.java 3023 2011-03-01 00:53:34Z joehw $
+ * $Id: XPATHErrorResources_pt_BR.java /st_wptg_1.8.0.0.0jdk/2 2013/09/11 12:46:54 gmolloy Exp $
  */
 package com.sun.org.apache.xpath.internal.res;
 
@@ -517,7 +516,7 @@
       "O prefixo deve ser resolvido para um namespace: {0}"},
 
   { ER_PARSE_NOT_SUPPORTED,
-      "parse (InputSource source) n\u00E3o suportado em XPathContext! N\u00E3o \u00E9 poss\u00EDvel abrir {0}"},
+      "parsing (InputSource source) n\u00E3o suportado em XPathContext! N\u00E3o \u00E9 poss\u00EDvel abrir {0}"},
 
   { ER_SAX_API_NOT_HANDLED,
       "Caracteres SAX API(char ch[]... n\u00E3o tratados por DTM!"},
diff --git a/jaxp/src/com/sun/org/apache/xpath/internal/res/XPATHErrorResources_sv.java b/jaxp/src/com/sun/org/apache/xpath/internal/res/XPATHErrorResources_sv.java
index f915256..a02ae33 100644
--- a/jaxp/src/com/sun/org/apache/xpath/internal/res/XPATHErrorResources_sv.java
+++ b/jaxp/src/com/sun/org/apache/xpath/internal/res/XPATHErrorResources_sv.java
@@ -3,7 +3,7 @@
  * DO NOT REMOVE OR ALTER!
  */
 /*
- * Copyright 1999-2004 The Apache Software Foundation.
+ * Copyright 1999-2005 The Apache Software Foundation.
  *
  * Licensed under the Apache License, Version 2.0 (the "License");
  * you may not use this file except in compliance with the License.
@@ -18,7 +18,7 @@
  * limitations under the License.
  */
 /*
- * $Id: XPATHErrorResources_sv.java,v 1.2.4.1 2005/09/15 00:39:20 jeffsuttor Exp $
+ * $Id: XPATHErrorResources_sv.java /st_wptg_1.8.0.0.0jdk/2 2013/09/16 06:50:58 gmolloy Exp $
  */
 package com.sun.org.apache.xpath.internal.res;
 
@@ -447,7 +447,7 @@
      "F\u00F6rv\u00E4ntade {0}, men hittade: {1}"},
 
   { ER_INCORRECT_PROGRAMMER_ASSERTION,
-      "Programmerarens verifiering \u00E4r inte korrekt! - {0}"},
+      "Programmerarens utsaga \u00E4r inte korrekt! - {0}"},
 
   { ER_BOOLEAN_ARG_NO_LONGER_OPTIONAL,
       "Argumentet boolean(...) \u00E4r inte l\u00E4ngre valfritt med 19990709 XPath-utkast."},
@@ -480,7 +480,7 @@
       "Fel! Hittade inte xpath select-uttryck (-select)."},
 
   { ER_COULDNOT_FIND_ENDOP_AFTER_OPLOCATIONPATH,
-      "FEL! Kunde inte hitta ENDOP efter OP_LOCATIONPATH"},
+      "FEL! Hittade inte ENDOP efter OP_LOCATIONPATH"},
 
   { ER_ERROR_OCCURED,
      "Fel intr\u00E4ffade!"},
@@ -498,7 +498,7 @@
       "Funktionen count borde ta emot ett argument!"},
 
   { ER_COULDNOT_FIND_FUNCTION,
-     "Kunde inte hitta funktionen: {0}"},
+     "Hittade inte funktionen: {0}"},
 
   { ER_UNSUPPORTED_ENCODING,
      "Kodning utan st\u00F6d: {0}"},
@@ -567,7 +567,7 @@
         "Felhanterare med v\u00E4rde null"},
 
   { ER_PROG_ASSERT_UNKNOWN_OPCODE,
-       "Programmerarens verifiering: ok\u00E4nd op-kod: {0}"},
+       "Programmerarens utsaga: ok\u00E4nd op-kod: {0}"},
 
   { ER_ZERO_OR_ONE,
        "0 eller 1"},
@@ -637,7 +637,7 @@
        "{0} till\u00E5ter endast {1} argument"},
 
   { ER_UNKNOWN_STEP,
-       "Programmerarens verifiering i getNextStepPos: ok\u00E4nt stepType: {0}"},
+       "Programmerarens utsaga i getNextStepPos: ok\u00E4nt stepType: {0}"},
 
   //Note to translators:  A relative location path is a form of XPath expression.
   // The message indicates that such an expression was expected following the
@@ -849,7 +849,7 @@
       "funktionstecken hittades inte."},
 
   { WG_COULDNOT_FIND_FUNCTION,
-      "Kunde inte hitta funktionen: {0}"},
+      "Hittade inte funktionen: {0}"},
 
   { WG_CANNOT_MAKE_URL_FROM,
       "Kan inte skapa URL fr\u00E5n: {0}"},
diff --git a/jaxp/src/javax/xml/datatype/DatatypeFactory.java b/jaxp/src/javax/xml/datatype/DatatypeFactory.java
index 4f9d6f6..56c796b 100644
--- a/jaxp/src/javax/xml/datatype/DatatypeFactory.java
+++ b/jaxp/src/javax/xml/datatype/DatatypeFactory.java
@@ -49,7 +49,13 @@
  *    </li>
  *    <li>
  *     Uses the service-provider loading facilities, defined by the {@link java.util.ServiceLoader} class, to attempt
- *     to locate and load an implementation of the service.
+ *     to locate and load an implementation of the service using the {@linkplain
+ *     java.util.ServiceLoader#load(java.lang.Class) default loading mechanism}:
+ *     the service-provider loading facility will use the {@linkplain
+ *     java.lang.Thread#getContextClassLoader() current thread's context class loader}
+ *     to attempt to load the service. If the context class
+ *     loader is null, the {@linkplain
+ *     ClassLoader#getSystemClassLoader() system class loader} will be used.
  *     <br>
  *     In case of {@link java.util.ServiceConfigurationError service
  *     configuration error} a {@link javax.xml.datatype.DatatypeConfigurationException}
diff --git a/jaxp/src/javax/xml/parsers/DocumentBuilderFactory.java b/jaxp/src/javax/xml/parsers/DocumentBuilderFactory.java
index 748a163..04265f6 100644
--- a/jaxp/src/javax/xml/parsers/DocumentBuilderFactory.java
+++ b/jaxp/src/javax/xml/parsers/DocumentBuilderFactory.java
@@ -82,7 +82,13 @@
      * <li>
      * Uses the service-provider loading facilities, defined by the
      * {@link java.util.ServiceLoader} class, to attempt to locate and load an
-     * implementation of the service.
+     * implementation of the service using the {@linkplain
+     * java.util.ServiceLoader#load(java.lang.Class) default loading mechanism}:
+     * the service-provider loading facility will use the {@linkplain
+     * java.lang.Thread#getContextClassLoader() current thread's context class loader}
+     * to attempt to load the service. If the context class
+     * loader is null, the {@linkplain
+     * ClassLoader#getSystemClassLoader() system class loader} will be used.
      * </li>
      * <li>
      * Otherwise, the system-default implementation is returned.
diff --git a/jaxp/src/javax/xml/parsers/SAXParserFactory.java b/jaxp/src/javax/xml/parsers/SAXParserFactory.java
index a7aef97..7163456 100644
--- a/jaxp/src/javax/xml/parsers/SAXParserFactory.java
+++ b/jaxp/src/javax/xml/parsers/SAXParserFactory.java
@@ -86,7 +86,13 @@
      * <li>
      * Use the service-provider loading facilities, defined by the
      * {@link java.util.ServiceLoader} class, to attempt to locate and load an
-     * implementation of the service.
+     * implementation of the service using the {@linkplain
+     * java.util.ServiceLoader#load(java.lang.Class) default loading mechanism}:
+     * the service-provider loading facility will use the {@linkplain
+     * java.lang.Thread#getContextClassLoader() current thread's context class loader}
+     * to attempt to load the service. If the context class
+     * loader is null, the {@linkplain
+     * ClassLoader#getSystemClassLoader() system class loader} will be used.
      * </li>
      * <li>
      * Otherwise the system-default implementation is returned.
diff --git a/jaxp/src/javax/xml/stream/XMLEventFactory.java b/jaxp/src/javax/xml/stream/XMLEventFactory.java
index d9e47ef..81a7c55 100644
--- a/jaxp/src/javax/xml/stream/XMLEventFactory.java
+++ b/jaxp/src/javax/xml/stream/XMLEventFactory.java
@@ -84,7 +84,13 @@
    * <li>
    *   Use the service-provider loading facilities, defined by the
    *   {@link java.util.ServiceLoader} class, to attempt to locate and load an
-   *   implementation of the service.
+   *   implementation of the service using the {@linkplain
+   *   java.util.ServiceLoader#load(java.lang.Class) default loading mechanism}:
+   *   the service-provider loading facility will use the {@linkplain
+   *   java.lang.Thread#getContextClassLoader() current thread's context class loader}
+   *   to attempt to load the service. If the context class
+   *   loader is null, the {@linkplain
+   *   ClassLoader#getSystemClassLoader() system class loader} will be used.
    * </li>
    * <li>
    *   Otherwise, the system-default implementation is returned.
@@ -152,7 +158,13 @@
    *   If {@code factoryId} is "javax.xml.stream.XMLEventFactory",
    *   use the service-provider loading facilities, defined by the
    *   {@link java.util.ServiceLoader} class, to attempt to locate and load an
-   *   implementation of the service.
+   *   implementation of the service using the {@linkplain
+   *   java.util.ServiceLoader#load(java.lang.Class) default loading mechanism}:
+   *   the service-provider loading facility will use the {@linkplain
+   *   java.lang.Thread#getContextClassLoader() current thread's context class loader}
+   *   to attempt to load the service. If the context class
+   *   loader is null, the {@linkplain
+   *   ClassLoader#getSystemClassLoader() system class loader} will be used.
    * </li>
    * <li>
    *   Otherwise, throws a {@link FactoryConfigurationError}.
diff --git a/jaxp/src/javax/xml/stream/XMLInputFactory.java b/jaxp/src/javax/xml/stream/XMLInputFactory.java
index d894893..96bd13b 100644
--- a/jaxp/src/javax/xml/stream/XMLInputFactory.java
+++ b/jaxp/src/javax/xml/stream/XMLInputFactory.java
@@ -174,7 +174,13 @@
    * <li>
    *   Use the service-provider loading facilities, defined by the
    *   {@link java.util.ServiceLoader} class, to attempt to locate and load an
-   *   implementation of the service.
+   *   implementation of the service using the {@linkplain
+   *   java.util.ServiceLoader#load(java.lang.Class) default loading mechanism}:
+   *   the service-provider loading facility will use the {@linkplain
+   *   java.lang.Thread#getContextClassLoader() current thread's context class loader}
+   *   to attempt to load the service. If the context class
+   *   loader is null, the {@linkplain
+   *   ClassLoader#getSystemClassLoader() system class loader} will be used.
    * </li>
    * <li>
    * Otherwise, the system-default implementation is returned.
@@ -242,7 +248,13 @@
    *   If {@code factoryId} is "javax.xml.stream.XMLInputFactory",
    *   use the service-provider loading facilities, defined by the
    *   {@link java.util.ServiceLoader} class, to attempt to locate and load an
-   *   implementation of the service.
+   *   implementation of the service using the {@linkplain
+   *   java.util.ServiceLoader#load(java.lang.Class) default loading mechanism}:
+   *   the service-provider loading facility will use the {@linkplain
+   *   java.lang.Thread#getContextClassLoader() current thread's context class loader}
+   *   to attempt to load the service. If the context class
+   *   loader is null, the {@linkplain
+   *   ClassLoader#getSystemClassLoader() system class loader} will be used.
    * </li>
    * <li>
    *   Otherwise, throws a {@link FactoryConfigurationError}.
diff --git a/jaxp/src/javax/xml/stream/XMLOutputFactory.java b/jaxp/src/javax/xml/stream/XMLOutputFactory.java
index a5a593c..55ced98 100644
--- a/jaxp/src/javax/xml/stream/XMLOutputFactory.java
+++ b/jaxp/src/javax/xml/stream/XMLOutputFactory.java
@@ -150,7 +150,13 @@
    * <li>
    *   Use the service-provider loading facilities, defined by the
    *   {@link java.util.ServiceLoader} class, to attempt to locate and load an
-   *   implementation of the service.
+   *   implementation of the service using the {@linkplain
+   *   java.util.ServiceLoader#load(java.lang.Class) default loading mechanism}:
+   *   the service-provider loading facility will use the {@linkplain
+   *   java.lang.Thread#getContextClassLoader() current thread's context class loader}
+   *   to attempt to load the service. If the context class
+   *   loader is null, the {@linkplain
+   *   ClassLoader#getSystemClassLoader() system class loader} will be used.
    * </li>
    * <li>
    *   Otherwise, the system-default implementation is returned.
@@ -216,7 +222,13 @@
    *   If {@code factoryId} is "javax.xml.stream.XMLOutputFactory",
    *   use the service-provider loading facilities, defined by the
    *   {@link java.util.ServiceLoader} class, to attempt to locate and load an
-   *   implementation of the service.
+   *   implementation of the service using the {@linkplain
+   *   java.util.ServiceLoader#load(java.lang.Class) default loading mechanism}:
+   *   the service-provider loading facility will use the {@linkplain
+   *   java.lang.Thread#getContextClassLoader() current thread's context class loader}
+   *   to attempt to load the service. If the context class
+   *   loader is null, the {@linkplain
+   *   ClassLoader#getSystemClassLoader() system class loader} will be used.
    * </li>
    * <li>
    *   Otherwise, throws a {@link FactoryConfigurationError}.
diff --git a/jaxp/src/javax/xml/transform/TransformerFactory.java b/jaxp/src/javax/xml/transform/TransformerFactory.java
index 9c4a076..cde66de 100644
--- a/jaxp/src/javax/xml/transform/TransformerFactory.java
+++ b/jaxp/src/javax/xml/transform/TransformerFactory.java
@@ -77,7 +77,13 @@
      * <li>
      *   Use the service-provider loading facilities, defined by the
      *   {@link java.util.ServiceLoader} class, to attempt to locate and load an
-     *   implementation of the service.
+     *   implementation of the service using the {@linkplain
+     *   java.util.ServiceLoader#load(java.lang.Class) default loading mechanism}:
+     *   the service-provider loading facility will use the {@linkplain
+     *   java.lang.Thread#getContextClassLoader() current thread's context class loader}
+     *   to attempt to load the service. If the context class
+     *   loader is null, the {@linkplain
+     *   ClassLoader#getSystemClassLoader() system class loader} will be used.
      * </li>
      * <li>
      *   Otherwise, the system-default implementation is returned.
diff --git a/jaxp/src/javax/xml/validation/SchemaFactory.java b/jaxp/src/javax/xml/validation/SchemaFactory.java
index d99f450..ebbbe40 100644
--- a/jaxp/src/javax/xml/validation/SchemaFactory.java
+++ b/jaxp/src/javax/xml/validation/SchemaFactory.java
@@ -148,7 +148,14 @@
      *   <li>
      *   Use the service-provider loading facilities, defined by the
      *   {@link java.util.ServiceLoader} class, to attempt to locate and load an
-     *   implementation of the service.<br>
+     *   implementation of the service using the {@linkplain
+     *   java.util.ServiceLoader#load(java.lang.Class) default loading mechanism}:
+     *   the service-provider loading facility will use the {@linkplain
+     *   java.lang.Thread#getContextClassLoader() current thread's context class loader}
+     *   to attempt to load the service. If the context class
+     *   loader is null, the {@linkplain
+     *   ClassLoader#getSystemClassLoader() system class loader} will be used.
+     *   <br>
      *   Each potential service provider is required to implement the method
      *        {@link #isSchemaLanguageSupported(String schemaLanguage)}.
      *   <br>
diff --git a/jaxp/src/javax/xml/xpath/XPathFactory.java b/jaxp/src/javax/xml/xpath/XPathFactory.java
index d4c60d6..72de2b1 100644
--- a/jaxp/src/javax/xml/xpath/XPathFactory.java
+++ b/jaxp/src/javax/xml/xpath/XPathFactory.java
@@ -123,7 +123,13 @@
     *   <li>
     *     Use the service-provider loading facilities, defined by the
     *     {@link java.util.ServiceLoader} class, to attempt to locate and load an
-    *     implementation of the service.
+    *     implementation of the service using the {@linkplain
+    *     java.util.ServiceLoader#load(java.lang.Class) default loading mechanism}:
+    *     the service-provider loading facility will use the {@linkplain
+    *     java.lang.Thread#getContextClassLoader() current thread's context class loader}
+    *     to attempt to load the service. If the context class
+    *     loader is null, the {@linkplain
+    *     ClassLoader#getSystemClassLoader() system class loader} will be used.
     *     <br>
     *     Each potential service provider is required to implement the method
     *     {@link #isObjectModelSupported(String objectModel)}.
diff --git a/jaxws/.hgtags b/jaxws/.hgtags
index d022629..a8d2259 100644
--- a/jaxws/.hgtags
+++ b/jaxws/.hgtags
@@ -232,3 +232,4 @@
 d1ea68556fd7925a3c7078dd9f77c6ca73d5aa9e jdk8-b108
 df5d4d01642572e77fd3c01e4c8703ed3f6eec87 jdk8-b109
 cc682329886be2fc26220fc30597ee4e5bba43ed jdk8-b110
+32edc7a2c86696dfcbdb6ffae641ff153f8e34bd jdk8-b111
diff --git a/jaxws/makefiles/BuildJaxws.gmk b/jaxws/makefiles/BuildJaxws.gmk
index c70086e..db718ff 100644
--- a/jaxws/makefiles/BuildJaxws.gmk
+++ b/jaxws/makefiles/BuildJaxws.gmk
@@ -30,42 +30,42 @@
 include MakeBase.gmk
 include JavaCompilation.gmk
 
-DISABLE_JAXWS_WARNINGS:=-Xlint:all,-varargs,-rawtypes,-deprecation,-unchecked,-serial,-dep-ann,-cast,-fallthrough,-static
+DISABLE_JAXWS_WARNINGS := -Xlint:all,-varargs,-rawtypes,-deprecation,-unchecked,-serial,-dep-ann,-cast,-fallthrough,-static
 
 # The generate new bytecode uses the new compiler for to generate bytecode
 # for the new jdk that is being built. The code compiled by this setup
 # cannot necessarily be run with the boot jdk.
-$(eval $(call SetupJavaCompiler,GENERATE_NEWBYTECODE_DEBUG,\
-     JVM:=$(JAVA),\
-     JAVAC:=$(NEW_JAVAC),\
-     FLAGS:=-XDignore.symbol.file=true $(DISABLE_JAXWS_WARNINGS) -g,\
-     SERVER_DIR:=$(SJAVAC_SERVER_DIR),\
-     SERVER_JVM:=$(SJAVAC_SERVER_JAVA)))
+$(eval $(call SetupJavaCompiler,GENERATE_NEWBYTECODE_DEBUG, \
+    JVM := $(JAVA), \
+    JAVAC := $(NEW_JAVAC), \
+    FLAGS := -XDignore.symbol.file=true $(DISABLE_JAXWS_WARNINGS) -g, \
+    SERVER_DIR := $(SJAVAC_SERVER_DIR), \
+    SERVER_JVM := $(SJAVAC_SERVER_JAVA)))
 
 # Dummy here is needed to trigger copying of META-INF
-$(eval $(call SetupJavaCompilation,BUILD_JAF,\
-		SETUP:=GENERATE_NEWBYTECODE_DEBUG,\
-		SRC:=$(JAXWS_TOPDIR)/src/share/jaf_classes,\
-		COPY:="dummy",\
-		BIN:=$(JAXWS_OUTPUTDIR)/jaf_classes))
+$(eval $(call SetupJavaCompilation,BUILD_JAF, \
+    SETUP := GENERATE_NEWBYTECODE_DEBUG, \
+    SRC := $(JAXWS_TOPDIR)/src/share/jaf_classes, \
+    COPY := "dummy", \
+    BIN := $(JAXWS_OUTPUTDIR)/jaf_classes))
 
-$(eval $(call SetupJavaCompilation,BUILD_JAXWS,\
-		SETUP:=GENERATE_NEWBYTECODE_DEBUG,\
-		SRC:=$(JAXWS_TOPDIR)/src/share/jaxws_classes,\
-		BIN:=$(JAXWS_OUTPUTDIR)/jaxws_classes,\
-		COPY:=.xsd,\
-		COPY_FILES:=$(JAXWS_TOPDIR)/src/share/jaxws_classes/com/sun/tools/internal/xjc/runtime/JAXBContextFactory.java \
-			    $(JAXWS_TOPDIR)/src/share/jaxws_classes/com/sun/tools/internal/xjc/runtime/ZeroOneBooleanAdapter.java \
-  			    $(JAXWS_TOPDIR)/src/share/jaxws_classes/com/sun/xml/internal/ws/assembler/jaxws-tubes-default.xml,\
-		ADD_JAVAC_FLAGS=-cp $(OUTPUT_ROOT)/jaxp/dist/lib/classes.jar))
+$(eval $(call SetupJavaCompilation,BUILD_JAXWS, \
+    SETUP := GENERATE_NEWBYTECODE_DEBUG, \
+    SRC := $(JAXWS_TOPDIR)/src/share/jaxws_classes, \
+    BIN := $(JAXWS_OUTPUTDIR)/jaxws_classes, \
+    COPY := .xsd, \
+    COPY_FILES := $(JAXWS_TOPDIR)/src/share/jaxws_classes/com/sun/tools/internal/xjc/runtime/JAXBContextFactory.java \
+        $(JAXWS_TOPDIR)/src/share/jaxws_classes/com/sun/tools/internal/xjc/runtime/ZeroOneBooleanAdapter.java \
+        $(JAXWS_TOPDIR)/src/share/jaxws_classes/com/sun/xml/internal/ws/assembler/jaxws-tubes-default.xml, \
+    ADD_JAVAC_FLAGS = -cp $(OUTPUT_ROOT)/jaxp/dist/lib/classes.jar))
 
 $(JAXWS_OUTPUTDIR)/jaxws_classes/META-INF/services/com.sun.tools.internal.ws.wscompile.Plugin: \
-		         $(JAXWS_TOPDIR)/src/share/jaxws_classes/com/sun/tools/etc/META-INF/services/com.sun.tools.internal.ws.wscompile.Plugin
+    $(JAXWS_TOPDIR)/src/share/jaxws_classes/com/sun/tools/etc/META-INF/services/com.sun.tools.internal.ws.wscompile.Plugin
 	mkdir -p $(@D)
 	cp $< $@
 
 $(JAXWS_OUTPUTDIR)/jaxws_classes/META-INF/services/com.sun.tools.internal.xjc.Plugin: \
-		         $(JAXWS_TOPDIR)/src/share/jaxws_classes/com/sun/tools/etc/META-INF/services/com.sun.tools.internal.xjc.Plugin
+    $(JAXWS_TOPDIR)/src/share/jaxws_classes/com/sun/tools/etc/META-INF/services/com.sun.tools.internal.xjc.Plugin
 	mkdir -p $(@D)
 	cp $< $@
 
@@ -73,7 +73,7 @@
 BUILD_JAXWS += $(JAXWS_OUTPUTDIR)/jaxws_classes/META-INF/services/com.sun.tools.internal.ws.wscompile.Plugin \
                $(JAXWS_OUTPUTDIR)/jaxws_classes/META-INF/services/com.sun.tools.internal.xjc.Plugin
 
-# Imitate the property cleaning mechanism in the old build. This will likely be replaced 
+# Imitate the property cleaning mechanism in the old build. This will likely be replaced
 # by the unified functionality in JavaCompilation.gmk, but keep it the same as old build
 # for now, even though it actually breaks properties containing # in the value.
 # Using nawk to avoid solaris sed.
@@ -84,8 +84,8 @@
 	$(MV) $@.tmp $@
 
 JAXWS_SRC_PROP_FILES := $(shell $(FIND) $(JAXWS_TOPDIR)/src/share/jaxws_classes -name "*.properties")
-TARGET_PROP_FILES := $(patsubst $(JAXWS_TOPDIR)/src/share/jaxws_classes/%,\
-                       $(JAXWS_OUTPUTDIR)/jaxws_classes/%,$(JAXWS_SRC_PROP_FILES))
+TARGET_PROP_FILES := $(patsubst $(JAXWS_TOPDIR)/src/share/jaxws_classes/%, \
+    $(JAXWS_OUTPUTDIR)/jaxws_classes/%, $(JAXWS_SRC_PROP_FILES))
 
 $(JAXWS_OUTPUTDIR)/jaf_classes/%.properties: $(JAXWS_TOPDIR)/src/share/jaf_classes/%.properties
 	$(MKDIR) -p $(@D)
@@ -94,20 +94,20 @@
 	$(MV) $@.tmp $@
 
 JAF_SRC_PROP_FILES := $(shell $(FIND) $(JAXWS_TOPDIR)/src/share/jaf_classes -name "*.properties")
-TARGET_PROP_FILES += $(patsubst $(JAXWS_TOPDIR)/src/share/jaf_classes/%,\
-                       $(JAXWS_OUTPUTDIR)/jaf_classes/%,$(JAF_SRC_PROP_FILES))
+TARGET_PROP_FILES += $(patsubst $(JAXWS_TOPDIR)/src/share/jaf_classes/%, \
+    $(JAXWS_OUTPUTDIR)/jaf_classes/%, $(JAF_SRC_PROP_FILES))
 
-$(eval $(call SetupArchive,ARCHIVE_JAXWS,$(BUILD_JAXWS) $(BUILD_JAF) $(TARGET_PROP_FILES),\
-		SRCS:=$(JAXWS_OUTPUTDIR)/jaxws_classes $(JAXWS_OUTPUTDIR)/jaf_classes,\
-		SUFFIXES:=.class .properties .xsd .xml .java \
-			  com.sun.mirror.apt.AnnotationProcessorFactory \
-                          com.sun.tools.internal.xjc.Plugin,\
-		JAR:=$(JAXWS_OUTPUTDIR)/dist/lib/classes.jar))
+$(eval $(call SetupArchive,ARCHIVE_JAXWS, $(BUILD_JAXWS) $(BUILD_JAF) $(TARGET_PROP_FILES), \
+    SRCS := $(JAXWS_OUTPUTDIR)/jaxws_classes $(JAXWS_OUTPUTDIR)/jaf_classes, \
+    SUFFIXES := .class .properties .xsd .xml .java \
+        com.sun.mirror.apt.AnnotationProcessorFactory \
+        com.sun.tools.internal.xjc.Plugin, \
+    JAR := $(JAXWS_OUTPUTDIR)/dist/lib/classes.jar))
 
-$(eval $(call SetupZipArchive,ZIP_JAXWS_SOURCES,\
-		SRC:=$(JAXWS_TOPDIR)/src/share/jaf_classes $(JAXWS_TOPDIR)/src/share/jaxws_classes,\
-		ZIP:=$(JAXWS_OUTPUTDIR)/dist/lib/src.zip))
+$(eval $(call SetupZipArchive,ZIP_JAXWS_SOURCES, \
+    SRC := $(JAXWS_TOPDIR)/src/share/jaf_classes $(JAXWS_TOPDIR)/src/share/jaxws_classes, \
+    ZIP := $(JAXWS_OUTPUTDIR)/dist/lib/src.zip))
 
 all: $(JAXWS_OUTPUTDIR)/dist/lib/classes.jar $(JAXWS_OUTPUTDIR)/dist/lib/src.zip
 
-.PHONY: default all 
+.PHONY: default all
diff --git a/jaxws/makefiles/Makefile b/jaxws/makefiles/Makefile
index 9539fe0..c7d0dd0 100644
--- a/jaxws/makefiles/Makefile
+++ b/jaxws/makefiles/Makefile
@@ -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 ===================================================)
diff --git a/jaxws/src/share/jaxws_classes/com/oracle/webservices/internal/api/databinding/ExternalMetadataFeature.java b/jaxws/src/share/jaxws_classes/com/oracle/webservices/internal/api/databinding/ExternalMetadataFeature.java
index ff182cd..4f0b211 100644
--- a/jaxws/src/share/jaxws_classes/com/oracle/webservices/internal/api/databinding/ExternalMetadataFeature.java
+++ b/jaxws/src/share/jaxws_classes/com/oracle/webservices/internal/api/databinding/ExternalMetadataFeature.java
@@ -88,9 +88,9 @@
         return ID;
     }
 
-    public MetadataReader getMetadataReader(ClassLoader classLoader, boolean disableSecureXmlProcessing) {
+    public MetadataReader getMetadataReader(ClassLoader classLoader, boolean disableXmlSecurity) {
         if (reader != null && enabled) return reader;
-        return enabled ? new ExternalMetadataReader(files, resourceNames, classLoader, true, disableSecureXmlProcessing) : null;
+        return enabled ? new ExternalMetadataReader(files, resourceNames, classLoader, true, disableXmlSecurity) : null;
     }
 
     @Override
diff --git a/jaxws/src/share/jaxws_classes/com/sun/tools/internal/jxc/MessageBundle.properties b/jaxws/src/share/jaxws_classes/com/sun/tools/internal/jxc/MessageBundle.properties
index 430a8d8..a21b4de 100644
--- a/jaxws/src/share/jaxws_classes/com/sun/tools/internal/jxc/MessageBundle.properties
+++ b/jaxws/src/share/jaxws_classes/com/sun/tools/internal/jxc/MessageBundle.properties
@@ -30,10 +30,10 @@
     Non-existent directory: {0}
 
 VERSION = \
-        schemagen 2.2.8-b20130806.1801
+        schemagen 2.2.8-b130911.1802
 
 FULLVERSION = \
-        schemagen full version "2.2.8-b20130806.1801"
+        schemagen full version "2.2.8-b130911.1802"
 
 USAGE = \
 Usage: schemagen [-options ...] <java files> \n\
diff --git a/jaxws/src/share/jaxws_classes/com/sun/tools/internal/jxc/MessageBundle_de.properties b/jaxws/src/share/jaxws_classes/com/sun/tools/internal/jxc/MessageBundle_de.properties
index ddf736f..11c7bb7 100644
--- a/jaxws/src/share/jaxws_classes/com/sun/tools/internal/jxc/MessageBundle_de.properties
+++ b/jaxws/src/share/jaxws_classes/com/sun/tools/internal/jxc/MessageBundle_de.properties
@@ -27,8 +27,8 @@
 
 BASEDIR_DOESNT_EXIST = Nicht vorhandenes Verzeichnis: {0}
 
-VERSION = schemagen 2.2.8-b20130806.1801
+VERSION = schemagen 2.2.8-b130911.1802
 
-FULLVERSION = schemagen vollst\u00E4ndige Version "2.2.8-b20130806.1801"
+FULLVERSION = schemagen vollst\u00E4ndige Version "2.2.8-b130911.1802"
 
 USAGE = Verwendung: schemagen [-options ...] <java files> \nOptionen: \n\\ \\ \\ \\ -d <path>             : Gibt an, wo die von Prozessor und javac generierten Klassendateien gespeichert werden sollen\n\\ \\ \\ \\ -cp <path>            : Gibt an, wo die vom Benutzer angegebenen Dateien gespeichert sind\n\\ \\ \\ \\ -classpath <path>     : Gibt an, wo die vom Benutzer angegebenen Dateien gespeichert sind\n\\ \\ \\ \\ -encoding <encoding>  : Gibt die Codierung f\u00FCr die Annotationsverarbeitung/den javac-Aufruf an \n\\ \\ \\ \\ -episode <file>       : Generiert Episodendatei f\u00FCr separate Kompilierung\n\\ \\ \\ \\ -version              : Zeigt Versionsinformation an\n\\ \\ \\ \\ -fullversion          : Zeigt vollst\u00E4ndige Versionsinformationen an\n\\ \\ \\ \\ -help                 : Zeigt diese Verwendungsmeldung an
diff --git a/jaxws/src/share/jaxws_classes/com/sun/tools/internal/jxc/MessageBundle_es.properties b/jaxws/src/share/jaxws_classes/com/sun/tools/internal/jxc/MessageBundle_es.properties
index d9a1b2e..c85d08e 100644
--- a/jaxws/src/share/jaxws_classes/com/sun/tools/internal/jxc/MessageBundle_es.properties
+++ b/jaxws/src/share/jaxws_classes/com/sun/tools/internal/jxc/MessageBundle_es.properties
@@ -27,8 +27,8 @@
 
 BASEDIR_DOESNT_EXIST = Directorio no existente: {0}
 
-VERSION = schemagen 2.2.8-b20130806.1801
+VERSION = schemagen 2.2.8-b130911.1802
 
-FULLVERSION = versi\u00F3n completa de schemagen "2.2.8-b20130806.1801"
+FULLVERSION = versi\u00F3n completa de schemagen "2.2.8-b130911.1802"
 
 USAGE = Sintaxis: schemagen [-options ...] <archivos java> \nOpciones: \n\\ \\ \\ \\ -d <ruta de acceso>             : especifique d\u00F3nde se colocan los archivos de clase generados por javac y el procesador\n\\ \\ \\ \\ -cp <ruta de acceso>            : especifique d\u00F3nde se encuentran los archivos especificados por el usuario\n\\ \\ \\ \\ -encoding <codificaci\u00F3n>  : especifique la codificaci\u00F3n que se va a utilizar para el procesamiento de anotaciones/llamada de javac\n\\ \\ \\ \\ -episode <archivo>       : genera un archivo de episodio para una compilaci\u00F3n diferente\n\\ \\ \\ \\ -version              : muestra la informaci\u00F3n de la versi\u00F3n\n\\ \\ \\ \\ -fullversion          : muestra la informaci\u00F3n completa de la versi\u00F3n\n\\ \\ \\ \\ -help                 : muestra este mensaje de sintaxis
diff --git a/jaxws/src/share/jaxws_classes/com/sun/tools/internal/jxc/MessageBundle_fr.properties b/jaxws/src/share/jaxws_classes/com/sun/tools/internal/jxc/MessageBundle_fr.properties
index 1ed6126..2dd5246 100644
--- a/jaxws/src/share/jaxws_classes/com/sun/tools/internal/jxc/MessageBundle_fr.properties
+++ b/jaxws/src/share/jaxws_classes/com/sun/tools/internal/jxc/MessageBundle_fr.properties
@@ -27,8 +27,8 @@
 
 BASEDIR_DOESNT_EXIST = R\u00E9pertoire {0} inexistant
 
-VERSION = schemagen 2.2.8-b20130806.1801
+VERSION = schemagen 2.2.8-b130911.1802
 
-FULLVERSION = version compl\u00E8te de schemagen "2.2.8-b20130806.1801"
+FULLVERSION = version compl\u00E8te de schemagen "2.2.8-b130911.1802"
 
 USAGE = Syntaxe : schemagen [-options ...] <java files> \nOptions : \n\ \ \ \ -d <path> : indiquez o\u00F9 placer les fichiers de classe g\u00E9n\u00E9r\u00E9s par le processeur et le compilateur javac\n\ \ \ \ -cp <path> : indiquez o\u00F9 trouver les fichiers sp\u00E9cifi\u00E9s par l'utilisateur\n\ \ \ \ -classpath <path> : indiquez o\u00F9 trouver les fichiers sp\u00E9cifi\u00E9s par l'utilisateur\n\ \ \ \ -encoding <encoding> : indiquez l'encodage \u00E0 utiliser pour l'appel de javac/traitement de l'annotation \n\ \ \ \ -episode <file> : g\u00E9n\u00E9rez un fichier d'\u00E9pisode pour la compilation s\u00E9par\u00E9e\n\ \ \ \ -version : affichez les informations de version\n\ \ \ \ -fullversion : affichez les informations compl\u00E8tes de version\n\ \ \ \ -help : affichez ce message de syntaxe
diff --git a/jaxws/src/share/jaxws_classes/com/sun/tools/internal/jxc/MessageBundle_it.properties b/jaxws/src/share/jaxws_classes/com/sun/tools/internal/jxc/MessageBundle_it.properties
index 0208b66..98ea9f3 100644
--- a/jaxws/src/share/jaxws_classes/com/sun/tools/internal/jxc/MessageBundle_it.properties
+++ b/jaxws/src/share/jaxws_classes/com/sun/tools/internal/jxc/MessageBundle_it.properties
@@ -27,8 +27,8 @@
 
 BASEDIR_DOESNT_EXIST = Directory non esistente: {0}
 
-VERSION = schemagen 2.2.8-b20130806.1801
+VERSION = schemagen 2.2.8-b130911.1802
 
-FULLVERSION = versione completa schemagen "2.2.8-b20130806.1801"
+FULLVERSION = versione completa schemagen "2.2.8-b130911.1802"
 
 USAGE = Uso: schemagen [-options ...] <java files> \nOpzioni: \n\ \ \ \ -d <path>             : specifica dove posizionare il processore e i file della classe generata javac\n\ \ \ \ -cp <path>            : specifica dove trovare i file specificati dall'utente\n\ \ \ \ -classpath <path>     : specifica dove trovare i file specificati dall'utente\n\ \ \ \ -encoding <encoding>  : specifica la codifica da usare per l'elaborazione dell'annotazione/richiamo javac \n\ \ \ \ -episode <file>       : genera il file di episodio per la compilazione separata\n\ \ \ \ -version              : visualizza le informazioni sulla versione\n\ \ \ \ -fullversion          : visualizza le informazioni sulla versione completa\n\ \ \ \ -help                 : visualizza questo messaggio sull'uso
diff --git a/jaxws/src/share/jaxws_classes/com/sun/tools/internal/jxc/MessageBundle_ja.properties b/jaxws/src/share/jaxws_classes/com/sun/tools/internal/jxc/MessageBundle_ja.properties
index 7678e5d..365b689 100644
--- a/jaxws/src/share/jaxws_classes/com/sun/tools/internal/jxc/MessageBundle_ja.properties
+++ b/jaxws/src/share/jaxws_classes/com/sun/tools/internal/jxc/MessageBundle_ja.properties
@@ -27,8 +27,8 @@
 
 BASEDIR_DOESNT_EXIST = \u30C7\u30A3\u30EC\u30AF\u30C8\u30EA\u304C\u5B58\u5728\u3057\u307E\u305B\u3093: {0}
 
-VERSION = schemagen 2.2.8-b20130806.1801
+VERSION = schemagen 2.2.8-b130911.1802
 
-FULLVERSION = schemagen\u30D5\u30EB\u30FB\u30D0\u30FC\u30B8\u30E7\u30F3"2.2.8-b20130806.1801"
+FULLVERSION = schemagen\u30D5\u30EB\u30FB\u30D0\u30FC\u30B8\u30E7\u30F3"2.2.8-b130911.1802"
 
 USAGE = \u4F7F\u7528\u65B9\u6CD5: schemagen [-options ...] <java files> \n\u30AA\u30D7\u30B7\u30E7\u30F3: \n\ \ \ \ -d <path>             : \u30D7\u30ED\u30BB\u30C3\u30B5\u304A\u3088\u3073javac\u304C\u751F\u6210\u3057\u305F\u30AF\u30E9\u30B9\u30FB\u30D5\u30A1\u30A4\u30EB\u3092\u7F6E\u304F\u4F4D\u7F6E\u3092\u6307\u5B9A\u3057\u307E\u3059\n\ \ \ \ -cp <path>            : \u30E6\u30FC\u30B6\u30FC\u304C\u6307\u5B9A\u3057\u305F\u30D5\u30A1\u30A4\u30EB\u3092\u691C\u7D22\u3059\u308B\u4F4D\u7F6E\u3092\u6307\u5B9A\u3057\u307E\u3059\n\ \ \ \ -classpath <path>     : \u30E6\u30FC\u30B6\u30FC\u304C\u6307\u5B9A\u3057\u305F\u30D5\u30A1\u30A4\u30EB\u3092\u691C\u7D22\u3059\u308B\u4F4D\u7F6E\u3092\u6307\u5B9A\u3057\u307E\u3059\n\ \ \ \ -encoding <encoding>  : \u6CE8\u91C8\u51E6\u7406/javac\u547C\u51FA\u3057\u306B\u4F7F\u7528\u3059\u308B\u30A8\u30F3\u30B3\u30FC\u30C7\u30A3\u30F3\u30B0\u3092\u6307\u5B9A\u3057\u307E\u3059\n\ \ \ \ -episode <file>       : \u30B3\u30F3\u30D1\u30A4\u30EB\u3054\u3068\u306B\u30A8\u30D4\u30BD\u30FC\u30C9\u30FB\u30D5\u30A1\u30A4\u30EB\u3092\u751F\u6210\u3057\u307E\u3059\n\ \ \ \ -version              : \u30D0\u30FC\u30B8\u30E7\u30F3\u60C5\u5831\u3092\u8868\u793A\u3057\u307E\u3059\n\ \ \ \ -fullversion          : \u30D5\u30EB\u30FB\u30D0\u30FC\u30B8\u30E7\u30F3\u60C5\u5831\u3092\u8868\u793A\u3057\u307E\u3059\n\ \ \ \ -help                 : \u3053\u306E\u4F7F\u7528\u4F8B\u30E1\u30C3\u30BB\u30FC\u30B8\u3092\u8868\u793A\u3057\u307E\u3059
diff --git a/jaxws/src/share/jaxws_classes/com/sun/tools/internal/jxc/MessageBundle_ko.properties b/jaxws/src/share/jaxws_classes/com/sun/tools/internal/jxc/MessageBundle_ko.properties
index cfc4364..1261644 100644
--- a/jaxws/src/share/jaxws_classes/com/sun/tools/internal/jxc/MessageBundle_ko.properties
+++ b/jaxws/src/share/jaxws_classes/com/sun/tools/internal/jxc/MessageBundle_ko.properties
@@ -27,8 +27,8 @@
 
 BASEDIR_DOESNT_EXIST = \uC874\uC7AC\uD558\uC9C0 \uC54A\uB294 \uB514\uB809\uD1A0\uB9AC: {0}
 
-VERSION = schemagen 2.2.8-b20130806.1801
+VERSION = schemagen 2.2.8-b130911.1802
 
-FULLVERSION = schemagen \uC815\uC2DD \uBC84\uC804 "2.2.8-b20130806.1801"
+FULLVERSION = schemagen \uC815\uC2DD \uBC84\uC804 "2.2.8-b130911.1802"
 
 USAGE = \uC0AC\uC6A9\uBC95: schemagen [-options ...] <java files> \n\uC635\uC158: \n\ \ \ \ -d <path>             : \uD504\uB85C\uC138\uC11C \uBC0F javac\uC5D0\uC11C \uC0DD\uC131\uD55C \uD074\uB798\uC2A4 \uD30C\uC77C\uC744 \uBC30\uCE58\uD560 \uC704\uCE58\uB97C \uC9C0\uC815\uD569\uB2C8\uB2E4.\n\ \ \ \ -cp <path>            : \uC0AC\uC6A9\uC790\uAC00 \uC9C0\uC815\uD55C \uD30C\uC77C\uC744 \uCC3E\uC744 \uC704\uCE58\uB97C \uC9C0\uC815\uD569\uB2C8\uB2E4.\n\ \ \ \ -classpath <path>     : \uC0AC\uC6A9\uC790\uAC00 \uC9C0\uC815\uD55C \uD30C\uC77C\uC744 \uCC3E\uC744 \uC704\uCE58\uB97C \uC9C0\uC815\uD569\uB2C8\uB2E4.\n\ \ \ \ -encoding <encoding>  : \uC8FC\uC11D \uCC98\uB9AC/javac \uD638\uCD9C\uC5D0 \uC0AC\uC6A9\uD560 \uC778\uCF54\uB529\uC744 \uC9C0\uC815\uD569\uB2C8\uB2E4. \n\ \ \ \ -episode <file>       : \uBCC4\uB3C4 \uCEF4\uD30C\uC77C\uC744 \uC704\uD574 episode \uD30C\uC77C\uC744 \uC0DD\uC131\uD569\uB2C8\uB2E4.\n\ \ \ \ -version              : \uBC84\uC804 \uC815\uBCF4\uB97C \uD45C\uC2DC\uD569\uB2C8\uB2E4.\n\ \ \ \ -fullversion          : \uC815\uC2DD \uBC84\uC804 \uC815\uBCF4\uB97C \uD45C\uC2DC\uD569\uB2C8\uB2E4.\n\ \ \ \ -help                 : \uC774 \uC0AC\uC6A9\uBC95 \uBA54\uC2DC\uC9C0\uB97C \uD45C\uC2DC\uD569\uB2C8\uB2E4.
diff --git a/jaxws/src/share/jaxws_classes/com/sun/tools/internal/jxc/MessageBundle_pt_BR.properties b/jaxws/src/share/jaxws_classes/com/sun/tools/internal/jxc/MessageBundle_pt_BR.properties
index 318ab2c..006fbbc 100644
--- a/jaxws/src/share/jaxws_classes/com/sun/tools/internal/jxc/MessageBundle_pt_BR.properties
+++ b/jaxws/src/share/jaxws_classes/com/sun/tools/internal/jxc/MessageBundle_pt_BR.properties
@@ -27,8 +27,8 @@
 
 BASEDIR_DOESNT_EXIST = Diret\u00F3rio n\u00E3o existente: {0}
 
-VERSION = gera\u00E7\u00E3o do esquema 2.2.8-b20130806.1801
+VERSION = gera\u00E7\u00E3o do esquema 2.2.8-b130911.1802
 
-FULLVERSION = vers\u00E3o completa da gera\u00E7\u00E3o do esquema "2.2.8-b20130806.1801"
+FULLVERSION = vers\u00E3o completa da gera\u00E7\u00E3o do esquema "2.2.8-b130911.1802"
 
 USAGE = Uso: gera\u00E7\u00E3o do esquema [-options ...] <java files> \nOp\u00E7\u00F5es: \n\\ \\ \\ \\ -d <path>             : especificar onde colocar o processador e os arquivos da classe gerados por javac\n\\ \\ \\ \\ -cp <path>            : especificar onde localizar arquivos especificados pelo usu\u00E1rio\n\\ \\ \\ \\ -classpath <path>     : especificar onde localizar os arquivos especificados pelo usu\u00E1rio\n\\ \\ \\ \\ -encoding <encoding>  : especificar codifica\u00E7\u00E3o a ser usada para processamento de anota\u00E7\u00E3o/chamada javac \n\\ \\ \\ \\ -episode <file>       : gerar arquivo do epis\u00F3dio para compila\u00E7\u00E3o separada\n\\ \\ \\ \\ -version              : exibir informa\u00E7\u00F5es da vers\u00E3o\n\\ \\ \\ \\ -fullversion          : exibir informa\u00E7\u00F5es da vers\u00E3o completa\n\\ \\ \\ \\ -help                 : exibir esta mensagem de uso
diff --git a/jaxws/src/share/jaxws_classes/com/sun/tools/internal/jxc/MessageBundle_zh_CN.properties b/jaxws/src/share/jaxws_classes/com/sun/tools/internal/jxc/MessageBundle_zh_CN.properties
index 87636c0..073ba65 100644
--- a/jaxws/src/share/jaxws_classes/com/sun/tools/internal/jxc/MessageBundle_zh_CN.properties
+++ b/jaxws/src/share/jaxws_classes/com/sun/tools/internal/jxc/MessageBundle_zh_CN.properties
@@ -27,8 +27,8 @@
 
 BASEDIR_DOESNT_EXIST = \u4E0D\u5B58\u5728\u7684\u76EE\u5F55: {0}
 
-VERSION = schemagen 2.2.8-b20130806.1801
+VERSION = schemagen 2.2.8-b130911.1802
 
-FULLVERSION = schemagen \u5B8C\u6574\u7248\u672C "2.2.8-b20130806.1801"
+FULLVERSION = schemagen \u5B8C\u6574\u7248\u672C "2.2.8-b130911.1802"
 
 USAGE = \u7528\u6CD5: schemagen [-options ...] <java files> \n\u9009\u9879: \n\ \ \ \ -d <path>             : \u6307\u5B9A\u653E\u7F6E\u5904\u7406\u7A0B\u5E8F\u548C javac \u751F\u6210\u7684\u7C7B\u6587\u4EF6\u7684\u4F4D\u7F6E\n\ \ \ \ -cp <path>            : \u6307\u5B9A\u67E5\u627E\u7528\u6237\u6307\u5B9A\u6587\u4EF6\u7684\u4F4D\u7F6E\n\ \ \ \ -classpath <path>     : \u6307\u5B9A\u67E5\u627E\u7528\u6237\u6307\u5B9A\u6587\u4EF6\u7684\u4F4D\u7F6E\n\ \ \ \ -encoding <encoding>  : \u6307\u5B9A\u7528\u4E8E\u6CE8\u91CA\u5904\u7406/javac \u8C03\u7528\u7684\u7F16\u7801\n\ \ \ \ -episode <file>       : \u751F\u6210\u7247\u6BB5\u6587\u4EF6\u4EE5\u4F9B\u5355\u72EC\u7F16\u8BD1\n\ \ \ \ -version              : \u663E\u793A\u7248\u672C\u4FE1\u606F\n\ \ \ \ -fullversion          : \u663E\u793A\u5B8C\u6574\u7684\u7248\u672C\u4FE1\u606F\n\ \ \ \ -help                 : \u663E\u793A\u6B64\u7528\u6CD5\u6D88\u606F
diff --git a/jaxws/src/share/jaxws_classes/com/sun/tools/internal/jxc/MessageBundle_zh_TW.properties b/jaxws/src/share/jaxws_classes/com/sun/tools/internal/jxc/MessageBundle_zh_TW.properties
index d828ed5..c7d7d5f 100644
--- a/jaxws/src/share/jaxws_classes/com/sun/tools/internal/jxc/MessageBundle_zh_TW.properties
+++ b/jaxws/src/share/jaxws_classes/com/sun/tools/internal/jxc/MessageBundle_zh_TW.properties
@@ -27,8 +27,8 @@
 
 BASEDIR_DOESNT_EXIST = \u4E0D\u5B58\u5728\u7684\u76EE\u9304: {0}
 
-VERSION = schemagen 2.2.8-b20130806.1801
+VERSION = schemagen 2.2.8-b130911.1802
 
-FULLVERSION = schemagen \u5B8C\u6574\u7248\u672C "2.2.8-b20130806.1801"
+FULLVERSION = schemagen \u5B8C\u6574\u7248\u672C "2.2.8-b130911.1802"
 
 USAGE = \u7528\u6CD5: schemagen [-options ...] <java files> \n\u9078\u9805: \n\\ \\ \\ \\ -d <path>             : \u6307\u5B9A\u8655\u7406\u5668\u4EE5\u53CA javac \u7522\u751F\u7684\u985E\u5225\u6A94\u6848\u653E\u7F6E\u4F4D\u7F6E\n\\ \\ \\ \\ -cp <path>            : \u6307\u5B9A\u8981\u5C0B\u627E\u4F7F\u7528\u8005\u6307\u5B9A\u6A94\u6848\u7684\u4F4D\u7F6E\n\\ \\ \\ \\ -classpath <path>     : \u6307\u5B9A\u8981\u5C0B\u627E\u4F7F\u7528\u8005\u6307\u5B9A\u6A94\u6848\u7684\u4F4D\u7F6E\n\\ \\ \\ \\ -encoding <encoding>  : \u6307\u5B9A\u8981\u7528\u65BC\u8A3B\u89E3\u8655\u7406/javac \u547C\u53EB\u7684\u7DE8\u78BC \n\\ \\ \\ \\ -episode <file>       : \u7522\u751F\u7368\u7ACB\u7DE8\u8B6F\u7684\u4E8B\u4EF6 (episode) \u6A94\u6848\n\\ \\ \\ \\ -version              : \u986F\u793A\u7248\u672C\u8CC7\u8A0A\n\\ \\ \\ \\ -fullversion          : \u986F\u793A\u5B8C\u6574\u7248\u672C\u8CC7\u8A0A\n\\ \\ \\ \\ -help                 : \u986F\u793A\u6B64\u7528\u6CD5\u8A0A\u606F
diff --git a/jaxws/src/share/jaxws_classes/com/sun/tools/internal/ws/resources/WscompileMessages.java b/jaxws/src/share/jaxws_classes/com/sun/tools/internal/ws/resources/WscompileMessages.java
index 0cf792a..6e3aeb0 100644
--- a/jaxws/src/share/jaxws_classes/com/sun/tools/internal/ws/resources/WscompileMessages.java
+++ b/jaxws/src/share/jaxws_classes/com/sun/tools/internal/ws/resources/WscompileMessages.java
@@ -269,6 +269,20 @@
         return localizer.localize(localizableWSIMPORT_USAGE(arg0));
     }
 
+    public static Localizable localizableWSGEN_USAGE_EXTENSIONS() {
+        return messageFactory.getMessage("wsgen.usage.extensions");
+    }
+
+    /**
+     *
+     * Extensions:
+     *   -Xnocompile                do not compile generated Java files
+     *
+     */
+    public static String WSGEN_USAGE_EXTENSIONS() {
+        return localizer.localize(localizableWSGEN_USAGE_EXTENSIONS());
+    }
+
     public static Localizable localizablePLEASE() {
         return messageFactory.getMessage("Please");
     }
@@ -283,6 +297,19 @@
         return localizer.localize(localizablePLEASE());
     }
 
+    public static Localizable localizableWSCOMPILE_EXISTING_OPTION(Object arg0) {
+        return messageFactory.getMessage("wscompile.existingOption", arg0);
+    }
+
+    /**
+     * Ignoring already defined option {0}
+     *
+     *
+     */
+    public static String WSCOMPILE_EXISTING_OPTION(Object arg0) {
+        return localizer.localize(localizableWSCOMPILE_EXISTING_OPTION(arg0));
+    }
+
     public static Localizable localizableWSIMPORT_PARSING_WSDL() {
         return messageFactory.getMessage("wsimport.ParsingWSDL");
     }
@@ -323,6 +350,8 @@
      *   -B<jaxbOption>            Pass this option to JAXB schema compiler
      *   -catalog <file>           specify catalog file to resolve external entity references
      *                             supports TR9401, XCatalog, and OASIS XML Catalog format.
+     *   -classpath <path>         specify where to find user class files and wsimport extensions
+     *   -cp <path>                specify where to find user class files and wsimport extensions
      *   -d <directory>            specify where to place generated output files
      *   -encoding <encoding>      specify character encoding used by source files
      *   -extension                allow vendor extensions - functionality not specified
@@ -332,6 +361,7 @@
      *   -help                     display help
      *   -httpproxy:<proxy>        set a HTTP proxy. Format is [user[:password]@]proxyHost:proxyPort
      *                             (port defaults to 8080)
+     *   -J<javacOption>           pass this option to javac
      *   -keep                     keep generated files
      *   -p <pkg>                  specifies the target package
      *   -quiet                    suppress wsimport output
@@ -343,7 +373,7 @@
      *   -version                  print version information
      *   -fullversion              print full version information
      *   -wsdllocation <location>  @WebServiceClient.wsdlLocation value
-     *   -clientjar <jarfile>      Creates the jar file of the generated artifacts along with the
+     *   -clientjar <jarfile>      creates the jar file of the generated artifacts along with the
      *                             WSDL metadata required for invoking the web service.
      *   -generateJWS              generate stubbed JWS implementation file
      *   -implDestDir <directory>  specify where to generate JWS implementation file
@@ -656,8 +686,8 @@
      * Usage: {0} [options] <SEI>
      *
      * where [options] include:
-     *   -classpath <path>          specify where to find input class files
-     *   -cp <path>                 same as -classpath <path>
+     *   -classpath <path>          specify where to find input class files and wsgen extensions
+     *   -cp <path>                 specify where to find input class files and wsgen extensions
      *   -d <directory>             specify where to place generated output files
      *   -encoding <encoding>       specify character encoding used by source files
      *   -extension                 allow vendor extensions - functionality not specified
@@ -665,6 +695,7 @@
      *                              result in applications that are not portable or
      *                              may not interoperate with other implementations
      *   -help                      display help
+     *   -J<javacOption>            pass this option to javac
      *   -keep                      keep generated files
      *   -r <directory>             resource destination directory, specify where to
      *                              place resouce files such as WSDLs
@@ -675,7 +706,7 @@
      *   -wsdl[:protocol]           generate a WSDL file. The protocol is optional.
      *                              Valid protocols are {1},
      *                              the default is soap1.1.
-     *                              The non stanadard protocols {2}
+     *                              The non standard protocols {2}
      *                              can only be used in conjunction with the
      *                              -extension option.
      *   -inlineSchemas             inline schemas in the generated wsdl. Must be
@@ -684,6 +715,7 @@
      *                              Used in conjunction with the -wsdl option.
      *   -portname <name>           specify the Port name to use in the generated WSDL
      *                              Used in conjunction with the -wsdl option.
+     *   -x <file>                  specify External Web Service Metadata xml descriptor
      *
      */
     public static String WSGEN_HELP(Object arg0, Object arg1, Object arg2) {
@@ -835,6 +867,18 @@
         return localizer.localize(localizableWSIMPORT_AUTH_INFO_LINENO(arg0, arg1));
     }
 
+    public static Localizable localizableWSGEN_SERVICENAME_MISSING_LOCALNAME(Object arg0) {
+        return messageFactory.getMessage("wsgen.servicename.missing.localname", arg0);
+    }
+
+    /**
+     * The service name "{0}" is missing a localname.
+     *
+     */
+    public static String WSGEN_SERVICENAME_MISSING_LOCALNAME(Object arg0) {
+        return localizer.localize(localizableWSGEN_SERVICENAME_MISSING_LOCALNAME(arg0));
+    }
+
     public static Localizable localizableWSGEN_USAGE(Object arg0) {
         return messageFactory.getMessage("wsgen.usage", arg0);
     }
@@ -849,18 +893,6 @@
         return localizer.localize(localizableWSGEN_USAGE(arg0));
     }
 
-    public static Localizable localizableWSGEN_SERVICENAME_MISSING_LOCALNAME(Object arg0) {
-        return messageFactory.getMessage("wsgen.servicename.missing.localname", arg0);
-    }
-
-    /**
-     * The service name "{0}" is missing a localname.
-     *
-     */
-    public static String WSGEN_SERVICENAME_MISSING_LOCALNAME(Object arg0) {
-        return localizer.localize(localizableWSGEN_SERVICENAME_MISSING_LOCALNAME(arg0));
-    }
-
     public static Localizable localizableWSGEN_SERVICENAME_MISSING_NAMESPACE(Object arg0) {
         return messageFactory.getMessage("wsgen.servicename.missing.namespace", arg0);
     }
diff --git a/jaxws/src/share/jaxws_classes/com/sun/tools/internal/ws/resources/wscompile.properties b/jaxws/src/share/jaxws_classes/com/sun/tools/internal/ws/resources/wscompile.properties
index c6f72cd..ab332df 100644
--- a/jaxws/src/share/jaxws_classes/com/sun/tools/internal/ws/resources/wscompile.properties
+++ b/jaxws/src/share/jaxws_classes/com/sun/tools/internal/ws/resources/wscompile.properties
@@ -33,6 +33,8 @@
 \  -B<jaxbOption>            Pass this option to JAXB schema compiler\n\
 \  -catalog <file>           specify catalog file to resolve external entity references\n\
 \                            supports TR9401, XCatalog, and OASIS XML Catalog format.\n\
+\  -classpath <path>         specify where to find user class files and wsimport extensions\n\
+\  -cp <path>                specify where to find user class files and wsimport extensions\n\
 \  -d <directory>            specify where to place generated output files\n\
 \  -encoding <encoding>      specify character encoding used by source files\n\
 \  -extension                allow vendor extensions - functionality not specified\n\
@@ -42,6 +44,7 @@
 \  -help                     display help\n\
 \  -httpproxy:<proxy>        set a HTTP proxy. Format is [user[:password]@]proxyHost:proxyPort\n\
 \                            (port defaults to 8080)\n\
+\  -J<javacOption>           pass this option to javac\n\
 \  -keep                     keep generated files\n\
 \  -p <pkg>                  specifies the target package\n\
 \  -quiet                    suppress wsimport output\n\
@@ -53,7 +56,7 @@
 \  -version                  print version information\n\
 \  -fullversion              print full version information\n\
 \  -wsdllocation <location>  @WebServiceClient.wsdlLocation value\n\
-\  -clientjar <jarfile>      Creates the jar file of the generated artifacts along with the\n\
+\  -clientjar <jarfile>      creates the jar file of the generated artifacts along with the\n\
 \                            WSDL metadata required for invoking the web service.\n\
 \  -generateJWS              generate stubbed JWS implementation file\n\
 \  -implDestDir <directory>  specify where to generate JWS implementation file\n\
@@ -91,8 +94,8 @@
 
 wsgen.help=\nUsage: {0} [options] <SEI>\n\n\
 \where [options] include:\n\
-\  -classpath <path>          specify where to find input class files\n\
-\  -cp <path>                 same as -classpath <path>\n\
+\  -classpath <path>          specify where to find input class files and wsgen extensions\n\
+\  -cp <path>                 specify where to find input class files and wsgen extensions\n\
 \  -d <directory>             specify where to place generated output files\n\
 \  -encoding <encoding>       specify character encoding used by source files\n\
 \  -extension                 allow vendor extensions - functionality not specified\n\
@@ -100,6 +103,7 @@
 \                             result in applications that are not portable or\n\
 \                             may not interoperate with other implementations\n\
 \  -help                      display help\n\
+\  -J<javacOption>            pass this option to javac\n\
 \  -keep                      keep generated files\n\
 \  -r <directory>             resource destination directory, specify where to\n\
 \                             place resouce files such as WSDLs\n\
@@ -110,7 +114,7 @@
 \  -wsdl[:protocol]           generate a WSDL file. The protocol is optional.\n\
 \                             Valid protocols are {1},\n\
 \                             the default is soap1.1.\n\
-\                             The non stanadard protocols {2}\n\
+\                             The non standard protocols {2}\n\
 \                             can only be used in conjunction with the\n\
 \                             -extension option.\n\
 \  -inlineSchemas             inline schemas in the generated wsdl. Must be\n\
@@ -118,8 +122,12 @@
 \  -servicename <name>        specify the Service name to use in the generated WSDL\n\
 \                             Used in conjunction with the -wsdl option.\n\
 \  -portname <name>           specify the Port name to use in the generated WSDL\n\
-\                             Used in conjunction with the -wsdl option.
+\                             Used in conjunction with the -wsdl option.\n\
+\  -x <file>                  specify External Web Service Metadata xml descriptor
 
+wsgen.usage.extensions=\n\
+\Extensions:\n\
+\  -Xnocompile                do not compile generated Java files
 
 wsgen.usage.examples=\n\
 \Examples:\n\
@@ -151,6 +159,7 @@
 # Generic Messages
 #
 wscompile.invalidOption=unrecognized parameter {0}
+wscompile.existingOption=Ignoring already defined option {0}\n
 wsimport.noSuchJaxbOption=no such JAXB option: {0}
 
 wscompile.error=error: {0}
diff --git a/jaxws/src/share/jaxws_classes/com/sun/tools/internal/ws/version.properties b/jaxws/src/share/jaxws_classes/com/sun/tools/internal/ws/version.properties
index 9862bdc..c0aaf9f 100644
--- a/jaxws/src/share/jaxws_classes/com/sun/tools/internal/ws/version.properties
+++ b/jaxws/src/share/jaxws_classes/com/sun/tools/internal/ws/version.properties
@@ -23,7 +23,7 @@
 # questions.
 #
 
-build-id=2.2.9-b14140
-build-version=JAX-WS RI 2.2.9-b14140
+build-id=2.2.9-b130926.1035
+build-version=JAX-WS RI 2.2.9-b130926.1035
 major-version=2.2.9
-svn-revision=14140
+svn-revision=8c29a9a53251ff741fca1664a8221dc876b2eac8
diff --git a/jaxws/src/share/jaxws_classes/com/sun/tools/internal/ws/wscompile/Options.java b/jaxws/src/share/jaxws_classes/com/sun/tools/internal/ws/wscompile/Options.java
index fbb4cb3..f9fb8bd 100644
--- a/jaxws/src/share/jaxws_classes/com/sun/tools/internal/ws/wscompile/Options.java
+++ b/jaxws/src/share/jaxws_classes/com/sun/tools/internal/ws/wscompile/Options.java
@@ -87,6 +87,13 @@
 
     public String classpath = System.getProperty("java.class.path");
 
+    /**
+     * -javacOptions
+     *
+     * @since 2.2.9
+     */
+    public List<String> javacOptions;
+
 
     /**
      * -Xnocompile
@@ -94,10 +101,13 @@
     public boolean nocompile;
 
     /**
-     * Disable secure xml processing.
-     * -XdisableSecureXmlProcessing
+     * If true XML security features when parsing XML documents will be disabled.
+     * The default value is false.
+     *
+     * Boolean
+     * @since 2.2.9
      */
-    public boolean disableSecureXmlProcessing = false;
+    public boolean disableXmlSecurity;
 
     public enum Target {
         V2_0, V2_1, V2_2;
@@ -354,13 +364,24 @@
                 throw new BadCommandLineException(WscompileMessages.WSCOMPILE_UNSUPPORTED_ENCODING(encoding));
             }
             return 2;
-        } else if (args[i].equals("-XdisableSecureXmlProcessing")) {
-            disableSecureXmlProcessing= true;
+        } else if (args[i].equals("-disableXmlSecurity")) {
+            disableXmlSecurity();
+            return 1;
+        } else if (args[i].startsWith("-J")) {
+            if (javacOptions == null) {
+                javacOptions = new ArrayList<String>();
+            }
+            javacOptions.add(args[i].substring(2));
             return 1;
         }
         return 0;
     }
 
+    // protected method to allow overriding
+    protected void disableXmlSecurity() {
+        disableXmlSecurity= true;
+    }
+
     /**
      * Obtains an operand and reports an error if it's not there.
      */
@@ -372,7 +393,28 @@
         return args[i];
     }
 
-
+    List<String> getJavacOptions(List<String> existingOptions, WsimportListener listener) {
+        List<String> result = new ArrayList<String>();
+        for (String o: javacOptions) {
+            if (o.contains("=") && !o.startsWith("A")) {
+                int i = o.indexOf('=');
+                String key = o.substring(0, i);
+                if (existingOptions.contains(key)) {
+                    listener.message(WscompileMessages.WSCOMPILE_EXISTING_OPTION(key));
+                } else {
+                    result.add(key);
+                    result.add(o.substring(i + 1));
+                }
+            } else {
+                if (existingOptions.contains(o)) {
+                    listener.message(WscompileMessages.WSCOMPILE_EXISTING_OPTION(o));
+                } else {
+                    result.add(o);
+                }
+            }
+        }
+        return result;
+    }
 
     /**
      * Used to signal that we've finished processing.
diff --git a/jaxws/src/share/jaxws_classes/com/sun/tools/internal/ws/wscompile/WsgenTool.java b/jaxws/src/share/jaxws_classes/com/sun/tools/internal/ws/wscompile/WsgenTool.java
index f8cdca4..debc4cc 100644
--- a/jaxws/src/share/jaxws_classes/com/sun/tools/internal/ws/wscompile/WsgenTool.java
+++ b/jaxws/src/share/jaxws_classes/com/sun/tools/internal/ws/wscompile/WsgenTool.java
@@ -161,7 +161,7 @@
         final ErrorReceiverFilter errReceiver = new ErrorReceiverFilter(listener);
 
         boolean bootCP = useBootClasspath(EndpointReference.class) || useBootClasspath(XmlSeeAlso.class);
-        Collection<String> args = new ArrayList<String>(6 + (bootCP ? 1 : 0) + (options.nocompile ? 1 : 0)
+        List<String> args = new ArrayList<String>(6 + (bootCP ? 1 : 0) + (options.nocompile ? 1 : 0)
                 + (options.encoding != null ? 2 : 0));
         args.add("-d");
         args.add(options.destDir.getAbsolutePath());
@@ -183,6 +183,9 @@
                     .append(File.pathSeparator)
                     .append(JavaCompilerHelper.getJarFile(XmlSeeAlso.class)).toString());
         }
+        if (options.javacOptions != null) {
+            args.addAll(options.getJavacOptions(args, listener));
+        }
 
         JavaCompiler compiler = ToolProvider.getSystemJavaCompiler();//        compiler = JavacTool.create();
         DiagnosticCollector<JavaFileObject> diagnostics = new DiagnosticCollector<JavaFileObject>();
@@ -205,9 +208,9 @@
             DatabindingConfig config = new DatabindingConfig();
 
             List<String> externalMetadataFileNames = options.externalMetadataFiles;
-            boolean disableSecureXmlProcessing = options.disableSecureXmlProcessing;
+            boolean disableXmlSecurity = options.disableXmlSecurity;
             if (externalMetadataFileNames != null && externalMetadataFileNames.size() > 0) {
-                config.setMetadataReader(new ExternalMetadataReader(getExternalFiles(externalMetadataFileNames), null, null, true, disableSecureXmlProcessing));
+                config.setMetadataReader(new ExternalMetadataReader(getExternalFiles(externalMetadataFileNames), null, null, true, disableXmlSecurity));
             }
 
             String tmpPath = options.destDir.getAbsolutePath() + File.pathSeparator + options.classpath;
@@ -243,7 +246,7 @@
             final Map<String, File> schemaFiles = new HashMap<String, File>();
 
             WSDLGenInfo wsdlGenInfo = new WSDLGenInfo();
-            wsdlGenInfo.setSecureXmlProcessingDisabled(disableSecureXmlProcessing);
+            wsdlGenInfo.setSecureXmlProcessingDisabled(disableXmlSecurity);
 
             wsdlGenInfo.setWsdlResolver(
                     new WSDLResolver() {
@@ -404,6 +407,7 @@
             System.out.println(WscompileMessages.WSGEN_HELP("WSGEN",
                     ((WsgenOptions)options).protocols,
                     ((WsgenOptions)options).nonstdProtocols.keySet()));
+            System.out.println(WscompileMessages.WSGEN_USAGE_EXTENSIONS());
             System.out.println(WscompileMessages.WSGEN_USAGE_EXAMPLES());
         }
     }
diff --git a/jaxws/src/share/jaxws_classes/com/sun/tools/internal/ws/wscompile/WsimportOptions.java b/jaxws/src/share/jaxws_classes/com/sun/tools/internal/ws/wscompile/WsimportOptions.java
index bf74e98..6816f63 100644
--- a/jaxws/src/share/jaxws_classes/com/sun/tools/internal/ws/wscompile/WsimportOptions.java
+++ b/jaxws/src/share/jaxws_classes/com/sun/tools/internal/ws/wscompile/WsimportOptions.java
@@ -774,4 +774,10 @@
                         is.setSystemId(systemId);
                 }
     }
+
+    @Override
+    protected void disableXmlSecurity() {
+        super.disableXmlSecurity();
+        schemaCompiler.getOptions().disableXmlSecurity = true;
+    }
 }
diff --git a/jaxws/src/share/jaxws_classes/com/sun/tools/internal/ws/wscompile/WsimportTool.java b/jaxws/src/share/jaxws_classes/com/sun/tools/internal/ws/wscompile/WsimportTool.java
index 512b293..87e9f42 100644
--- a/jaxws/src/share/jaxws_classes/com/sun/tools/internal/ws/wscompile/WsimportTool.java
+++ b/jaxws/src/share/jaxws_classes/com/sun/tools/internal/ws/wscompile/WsimportTool.java
@@ -332,7 +332,7 @@
                 if(options.verbose) {
                     listener.message(WscompileMessages.WSIMPORT_ARCHIVE_ARTIFACT(f, options.clientjar));
                 }
-                String entry = f.getCanonicalPath().substring(base.length()+1);
+                String entry = f.getCanonicalPath().substring(base.length()+1).replace(File.separatorChar, '/');
                 fi = new FileInputStream(f);
                 bis = new BufferedInputStream(fi);
                 JarEntry jarEntry = new JarEntry(entry);
@@ -524,29 +524,34 @@
             String classDir = options.destDir.getAbsolutePath();
             String classpathString = createClasspathString();
             boolean bootCP = useBootClasspath(EndpointContext.class) || useBootClasspath(JAXBPermission.class);
-            String[] args = new String[4 + (bootCP ? 1 : 0) + (options.debug ? 1 : 0)
-                    + (options.encoding != null ? 2 : 0) + sourceFiles.size()];
-            args[0] = "-d";
-            args[1] = classDir;
-            args[2] = "-classpath";
-            args[3] = classpathString;
-            int baseIndex = 4;
+            List<String> args = new ArrayList<String>();
+            args.add("-d");
+            args.add(classDir);
+            args.add("-classpath");
+            args.add(classpathString);
             //javac is not working in osgi as the url starts with a bundle
             if (bootCP) {
-                args[baseIndex++] = "-Xbootclasspath/p:"+JavaCompilerHelper.getJarFile(EndpointContext.class)+File.pathSeparator+JavaCompilerHelper.getJarFile(JAXBPermission.class);
+                args.add("-Xbootclasspath/p:"
+                        + JavaCompilerHelper.getJarFile(EndpointContext.class)
+                        + File.pathSeparator
+                        + JavaCompilerHelper.getJarFile(JAXBPermission.class));
             }
 
             if (options.debug) {
-                args[baseIndex++] = "-g";
+                args.add("-g");
             }
 
             if (options.encoding != null) {
-                args[baseIndex++] = "-encoding";
-                args[baseIndex++] = options.encoding;
+                args.add("-encoding");
+                args.add(options.encoding);
+            }
+
+            if (options.javacOptions != null) {
+                args.addAll(options.getJavacOptions(args, listener));
             }
 
             for (int i = 0; i < sourceFiles.size(); ++i) {
-                args[baseIndex + i] = sourceFiles.get(i);
+                args.add(sourceFiles.get(i));
             }
 
             listener.message(WscompileMessages.WSIMPORT_COMPILING_CODE());
@@ -558,7 +563,7 @@
                 listener.message("javac "+ argstr.toString());
             }
 
-            return JavaCompilerHelper.compile(args, out, receiver);
+            return JavaCompilerHelper.compile(args.toArray(new String[args.size()]), out, receiver);
         }
         //there are no files to compile, so return true?
         return true;
diff --git a/jaxws/src/share/jaxws_classes/com/sun/tools/internal/ws/wsdl/parser/DOMForest.java b/jaxws/src/share/jaxws_classes/com/sun/tools/internal/ws/wsdl/parser/DOMForest.java
index f62aea6..aed48ab 100644
--- a/jaxws/src/share/jaxws_classes/com/sun/tools/internal/ws/wsdl/parser/DOMForest.java
+++ b/jaxws/src/share/jaxws_classes/com/sun/tools/internal/ws/wsdl/parser/DOMForest.java
@@ -114,7 +114,7 @@
         this.logic = logic;
         try {
             // secure xml processing can be switched off if input requires it
-            boolean secureProcessingEnabled = options == null || !options.disableSecureXmlProcessing;
+            boolean secureProcessingEnabled = options == null || !options.disableXmlSecurity;
             DocumentBuilderFactory dbf = XmlUtil.newDocumentBuilderFactory(secureProcessingEnabled);
             dbf.setNamespaceAware(true);
             this.documentBuilder = dbf.newDocumentBuilder();
@@ -365,7 +365,7 @@
         try {
             // create identity transformer
             // secure xml processing can be switched off if input requires it
-            boolean secureProcessingEnabled = options == null || !options.disableSecureXmlProcessing;
+            boolean secureProcessingEnabled = options == null || !options.disableXmlSecurity;
             TransformerFactory tf = XmlUtil.newTransformerFactory(secureProcessingEnabled);
             Transformer it = tf.newTransformer();
 
diff --git a/jaxws/src/share/jaxws_classes/com/sun/tools/internal/xjc/MessageBundle.properties b/jaxws/src/share/jaxws_classes/com/sun/tools/internal/xjc/MessageBundle.properties
index bf21c1e..3fc147e 100644
--- a/jaxws/src/share/jaxws_classes/com/sun/tools/internal/xjc/MessageBundle.properties
+++ b/jaxws/src/share/jaxws_classes/com/sun/tools/internal/xjc/MessageBundle.properties
@@ -171,20 +171,20 @@
 Driver.FailedToGenerateCode = \
         Failed to produce code.
 
-# DO NOT localize the 2.2.8-b20130806.1801 string - it is a token for an ant <replaceFilter>
+# DO NOT localize the 2.2.8-b130911.1802 string - it is a token for an mvn <properties filter>
 Driver.FilePrologComment = \
-        This file was generated by the JavaTM Architecture for XML Binding(JAXB) Reference Implementation, v2.2.8-b20130806.1801 \n\
+        This file was generated by the JavaTM Architecture for XML Binding(JAXB) Reference Implementation, v2.2.8-b130911.1802 \n\
         See <a href="http://java.sun.com/xml/jaxb">http://java.sun.com/xml/jaxb</a> \n\
         Any modifications to this file will be lost upon recompilation of the source schema. \n\
         Generated on: {0} \n
 
 Driver.Version = \
-        xjc 2.2.8-b20130806.1801
+        xjc 2.2.8-b130911.1802
 
 Driver.FullVersion = \
-        xjc full version "2.2.8-b20130806.1801"
+        xjc full version "2.2.8-b130911.1802"
 
-Driver.BuildID = 2.2.8-b20130806.1801
+Driver.BuildID = 2.2.8-b130911.1802
 
 # for JDK integration - include version in source zip
 jaxb.jdk.version=@@JAXB_JDK_VERSION@@
diff --git a/jaxws/src/share/jaxws_classes/com/sun/tools/internal/xjc/MessageBundle_de.properties b/jaxws/src/share/jaxws_classes/com/sun/tools/internal/xjc/MessageBundle_de.properties
index 560d6b6..8069d4f 100644
--- a/jaxws/src/share/jaxws_classes/com/sun/tools/internal/xjc/MessageBundle_de.properties
+++ b/jaxws/src/share/jaxws_classes/com/sun/tools/internal/xjc/MessageBundle_de.properties
@@ -96,14 +96,14 @@
 
 Driver.FailedToGenerateCode = Code konnte nicht erzeugt werden.
 
-# DO NOT localize the 2.2.8-b20130806.1801 string - it is a token for an ant <replaceFilter>
-Driver.FilePrologComment = Diese Datei wurde mit der JavaTM Architecture for XML Binding(JAXB) Reference Implementation, v2.2.8-b20130806.1801 generiert \nSiehe <a href="http://java.sun.com/xml/jaxb">http://java.sun.com/xml/jaxb</a> \n\u00c4nderungen an dieser Datei gehen bei einer Neukompilierung des Quellschemas verloren. \nGeneriert: {0} \n
+# DO NOT localize the 2.2.8-b130911.1802 string - it is a token for an mvn <properties filter>
+Driver.FilePrologComment = Diese Datei wurde mit der JavaTM Architecture for XML Binding(JAXB) Reference Implementation, v2.2.8-b130911.1802 generiert \nSiehe <a href="http://java.sun.com/xml/jaxb">http://java.sun.com/xml/jaxb</a> \n\u00c4nderungen an dieser Datei gehen bei einer Neukompilierung des Quellschemas verloren. \nGeneriert: {0} \n
 
-Driver.Version = xjc 2.2.8-b20130806.1801
+Driver.Version = xjc 2.2.8-b130911.1802
 
-Driver.FullVersion = xjc vollst\u00E4ndige Version "2.2.8-b20130806.1801"
+Driver.FullVersion = xjc vollst\u00E4ndige Version "2.2.8-b130911.1802"
 
-Driver.BuildID = 2.2.8-b20130806.1801
+Driver.BuildID = 2.2.8-b130911.1802
 
 # for JDK integration - include version in source zip
 jaxb.jdk.version=@@JAXB_JDK_VERSION@@
diff --git a/jaxws/src/share/jaxws_classes/com/sun/tools/internal/xjc/MessageBundle_es.properties b/jaxws/src/share/jaxws_classes/com/sun/tools/internal/xjc/MessageBundle_es.properties
index 47a66fc..c96e2a5 100644
--- a/jaxws/src/share/jaxws_classes/com/sun/tools/internal/xjc/MessageBundle_es.properties
+++ b/jaxws/src/share/jaxws_classes/com/sun/tools/internal/xjc/MessageBundle_es.properties
@@ -96,14 +96,14 @@
 
 Driver.FailedToGenerateCode = Fallo al producir c\u00f3digo.
 
-# DO NOT localize the 2.2.8-b20130806.1801 string - it is a token for an ant <replaceFilter>
-Driver.FilePrologComment = Este archivo ha sido generado por la arquitectura JavaTM para la implantaci\u00f3n de la referencia de enlace (JAXB) XML v2.2.8-b20130806.1801 \nVisite <a href="http://java.sun.com/xml/jaxb">http://java.sun.com/xml/jaxb</a> \nTodas las modificaciones realizadas en este archivo se perder\u00e1n si se vuelve a compilar el esquema de origen. \nGenerado el: {0} \n
+# DO NOT localize the 2.2.8-b130911.1802 string - it is a token for an mvn <properties filter>
+Driver.FilePrologComment = Este archivo ha sido generado por la arquitectura JavaTM para la implantaci\u00f3n de la referencia de enlace (JAXB) XML v2.2.8-b130911.1802 \nVisite <a href="http://java.sun.com/xml/jaxb">http://java.sun.com/xml/jaxb</a> \nTodas las modificaciones realizadas en este archivo se perder\u00e1n si se vuelve a compilar el esquema de origen. \nGenerado el: {0} \n
 
-Driver.Version = xjc 2.2.8-b20130806.1801
+Driver.Version = xjc 2.2.8-b130911.1802
 
-Driver.FullVersion = versi\u00F3n completa de xjc "2.2.8-b20130806.1801"
+Driver.FullVersion = versi\u00F3n completa de xjc "2.2.8-b130911.1802"
 
-Driver.BuildID = 2.2.8-b20130806.1801
+Driver.BuildID = 2.2.8-b130911.1802
 
 # for JDK integration - include version in source zip
 jaxb.jdk.version=@@JAXB_JDK_VERSION@@
diff --git a/jaxws/src/share/jaxws_classes/com/sun/tools/internal/xjc/MessageBundle_fr.properties b/jaxws/src/share/jaxws_classes/com/sun/tools/internal/xjc/MessageBundle_fr.properties
index a9dea41..da2d956 100644
--- a/jaxws/src/share/jaxws_classes/com/sun/tools/internal/xjc/MessageBundle_fr.properties
+++ b/jaxws/src/share/jaxws_classes/com/sun/tools/internal/xjc/MessageBundle_fr.properties
@@ -96,14 +96,14 @@
 
 Driver.FailedToGenerateCode = Echec de la production du code.
 
-# DO NOT localize the 2.2.8-b20130806.1801 string - it is a token for an ant <replaceFilter>
-Driver.FilePrologComment = Ce fichier a \u00e9t\u00e9 g\u00e9n\u00e9r\u00e9 par l''impl\u00e9mentation de r\u00e9f\u00e9rence JavaTM Architecture for XML Binding (JAXB), v2.2.8-b20130806.1801 \nVoir <a href="http://java.sun.com/xml/jaxb">http://java.sun.com/xml/jaxb</a> \nToute modification apport\u00e9e \u00e0 ce fichier sera perdue lors de la recompilation du sch\u00e9ma source. \nG\u00e9n\u00e9r\u00e9 le : {0} \n
+# DO NOT localize the 2.2.8-b130911.1802 string - it is a token for an mvn <properties filter>
+Driver.FilePrologComment = Ce fichier a \u00e9t\u00e9 g\u00e9n\u00e9r\u00e9 par l''impl\u00e9mentation de r\u00e9f\u00e9rence JavaTM Architecture for XML Binding (JAXB), v2.2.8-b130911.1802 \nVoir <a href="http://java.sun.com/xml/jaxb">http://java.sun.com/xml/jaxb</a> \nToute modification apport\u00e9e \u00e0 ce fichier sera perdue lors de la recompilation du sch\u00e9ma source. \nG\u00e9n\u00e9r\u00e9 le : {0} \n
 
-Driver.Version = xjc 2.2.8-b20130806.1801
+Driver.Version = xjc 2.2.8-b130911.1802
 
-Driver.FullVersion = version compl\u00E8te xjc "2.2.8-b20130806.1801"
+Driver.FullVersion = version compl\u00E8te xjc "2.2.8-b130911.1802"
 
-Driver.BuildID = 2.2.8-b20130806.1801
+Driver.BuildID = 2.2.8-b130911.1802
 
 # for JDK integration - include version in source zip
 jaxb.jdk.version=@@JAXB_JDK_VERSION@@
diff --git a/jaxws/src/share/jaxws_classes/com/sun/tools/internal/xjc/MessageBundle_it.properties b/jaxws/src/share/jaxws_classes/com/sun/tools/internal/xjc/MessageBundle_it.properties
index b63eb55..a6a55a8 100644
--- a/jaxws/src/share/jaxws_classes/com/sun/tools/internal/xjc/MessageBundle_it.properties
+++ b/jaxws/src/share/jaxws_classes/com/sun/tools/internal/xjc/MessageBundle_it.properties
@@ -96,14 +96,14 @@
 
 Driver.FailedToGenerateCode = Produzione del codice non riuscita.
 
-# DO NOT localize the 2.2.8-b20130806.1801 string - it is a token for an ant <replaceFilter>
-Driver.FilePrologComment = Questo file \u00e8 stato generato dall''architettura JavaTM per XML Binding (JAXB) Reference Implementation, v2.2.8-b20130806.1801 \nVedere <a href="http://java.sun.com/xml/jaxb">http://java.sun.com/xml/jaxb</a> \nQualsiasi modifica a questo file andr\u00e0 persa durante la ricompilazione dello schema di origine. \nGenerato il: {0} \n
+# DO NOT localize the 2.2.8-b130911.1802 string - it is a token for an mvn <properties filter>
+Driver.FilePrologComment = Questo file \u00e8 stato generato dall''architettura JavaTM per XML Binding (JAXB) Reference Implementation, v2.2.8-b130911.1802 \nVedere <a href="http://java.sun.com/xml/jaxb">http://java.sun.com/xml/jaxb</a> \nQualsiasi modifica a questo file andr\u00e0 persa durante la ricompilazione dello schema di origine. \nGenerato il: {0} \n
 
-Driver.Version = xjc 2.2.8-b20130806.1801
+Driver.Version = xjc 2.2.8-b130911.1802
 
-Driver.FullVersion = versione completa xjc "2.2.8-b20130806.1801"
+Driver.FullVersion = versione completa xjc "2.2.8-b130911.1802"
 
-Driver.BuildID = 2.2.8-b20130806.1801
+Driver.BuildID = 2.2.8-b130911.1802
 
 # for JDK integration - include version in source zip
 jaxb.jdk.version=@@JAXB_JDK_VERSION@@
diff --git a/jaxws/src/share/jaxws_classes/com/sun/tools/internal/xjc/MessageBundle_ja.properties b/jaxws/src/share/jaxws_classes/com/sun/tools/internal/xjc/MessageBundle_ja.properties
index 8dd5b8a..4dd97d0 100644
--- a/jaxws/src/share/jaxws_classes/com/sun/tools/internal/xjc/MessageBundle_ja.properties
+++ b/jaxws/src/share/jaxws_classes/com/sun/tools/internal/xjc/MessageBundle_ja.properties
@@ -96,14 +96,14 @@
 
 Driver.FailedToGenerateCode = \u30b3\u30fc\u30c9\u306e\u751f\u6210\u306b\u5931\u6557\u3057\u307e\u3057\u305f\u3002
 
-# DO NOT localize the 2.2.8-b20130806.1801 string - it is a token for an ant <replaceFilter>
-Driver.FilePrologComment = \u3053\u306e\u30d5\u30a1\u30a4\u30eb\u306f\u3001JavaTM Architecture for XML Binding(JAXB) Reference Implementation\u3001v2.2.8-b20130806.1801\u306b\u3088\u3063\u3066\u751f\u6210\u3055\u308c\u307e\u3057\u305f \n<a href="http://java.sun.com/xml/jaxb">http://java.sun.com/xml/jaxb</a>\u3092\u53c2\u7167\u3057\u3066\u304f\u3060\u3055\u3044 \n\u30bd\u30fc\u30b9\u30fb\u30b9\u30ad\u30fc\u30de\u306e\u518d\u30b3\u30f3\u30d1\u30a4\u30eb\u6642\u306b\u3053\u306e\u30d5\u30a1\u30a4\u30eb\u306e\u5909\u66f4\u306f\u5931\u308f\u308c\u307e\u3059\u3002 \n\u751f\u6210\u65e5: {0} \n
+# DO NOT localize the 2.2.8-b130911.1802 string - it is a token for an mvn <properties filter>
+Driver.FilePrologComment = \u3053\u306e\u30d5\u30a1\u30a4\u30eb\u306f\u3001JavaTM Architecture for XML Binding(JAXB) Reference Implementation\u3001v2.2.8-b130911.1802\u306b\u3088\u3063\u3066\u751f\u6210\u3055\u308c\u307e\u3057\u305f \n<a href="http://java.sun.com/xml/jaxb">http://java.sun.com/xml/jaxb</a>\u3092\u53c2\u7167\u3057\u3066\u304f\u3060\u3055\u3044 \n\u30bd\u30fc\u30b9\u30fb\u30b9\u30ad\u30fc\u30de\u306e\u518d\u30b3\u30f3\u30d1\u30a4\u30eb\u6642\u306b\u3053\u306e\u30d5\u30a1\u30a4\u30eb\u306e\u5909\u66f4\u306f\u5931\u308f\u308c\u307e\u3059\u3002 \n\u751f\u6210\u65e5: {0} \n
 
-Driver.Version = xjc 2.2.8-b20130806.1801
+Driver.Version = xjc 2.2.8-b130911.1802
 
-Driver.FullVersion = xjc\u30D5\u30EB\u30FB\u30D0\u30FC\u30B8\u30E7\u30F3"2.2.8-b20130806.1801"
+Driver.FullVersion = xjc\u30D5\u30EB\u30FB\u30D0\u30FC\u30B8\u30E7\u30F3"2.2.8-b130911.1802"
 
-Driver.BuildID = 2.2.8-b20130806.1801
+Driver.BuildID = 2.2.8-b130911.1802
 
 # for JDK integration - include version in source zip
 jaxb.jdk.version=@@JAXB_JDK_VERSION@@
diff --git a/jaxws/src/share/jaxws_classes/com/sun/tools/internal/xjc/MessageBundle_ko.properties b/jaxws/src/share/jaxws_classes/com/sun/tools/internal/xjc/MessageBundle_ko.properties
index 3d0f6b9..c023a02 100644
--- a/jaxws/src/share/jaxws_classes/com/sun/tools/internal/xjc/MessageBundle_ko.properties
+++ b/jaxws/src/share/jaxws_classes/com/sun/tools/internal/xjc/MessageBundle_ko.properties
@@ -96,14 +96,14 @@
 
 Driver.FailedToGenerateCode = \ucf54\ub4dc \uc0dd\uc131\uc744 \uc2e4\ud328\ud588\uc2b5\ub2c8\ub2e4.
 
-# DO NOT localize the 2.2.8-b20130806.1801 string - it is a token for an ant <replaceFilter>
-Driver.FilePrologComment = \uc774 \ud30c\uc77c\uc740 JAXB(JavaTM Architecture for XML Binding) \ucc38\uc870 \uad6c\ud604 2.2.8-b20130806.1801 \ubc84\uc804\uc744 \ud1b5\ud574 \uc0dd\uc131\ub418\uc5c8\uc2b5\ub2c8\ub2e4. \n<a href="http://java.sun.com/xml/jaxb">http://java.sun.com/xml/jaxb</a>\ub97c \ucc38\uc870\ud558\uc2ed\uc2dc\uc624. \n\uc774 \ud30c\uc77c\uc744 \uc218\uc815\ud558\uba74 \uc18c\uc2a4 \uc2a4\ud0a4\ub9c8\ub97c \uc7ac\ucef4\ud30c\uc77c\ud560 \ub54c \uc218\uc815 \uc0ac\ud56d\uc774 \uc190\uc2e4\ub429\ub2c8\ub2e4. \n\uc0dd\uc131 \ub0a0\uc9dc: {0} \n
+# DO NOT localize the 2.2.8-b130911.1802 string - it is a token for an mvn <properties filter>
+Driver.FilePrologComment = \uc774 \ud30c\uc77c\uc740 JAXB(JavaTM Architecture for XML Binding) \ucc38\uc870 \uad6c\ud604 2.2.8-b130911.1802 \ubc84\uc804\uc744 \ud1b5\ud574 \uc0dd\uc131\ub418\uc5c8\uc2b5\ub2c8\ub2e4. \n<a href="http://java.sun.com/xml/jaxb">http://java.sun.com/xml/jaxb</a>\ub97c \ucc38\uc870\ud558\uc2ed\uc2dc\uc624. \n\uc774 \ud30c\uc77c\uc744 \uc218\uc815\ud558\uba74 \uc18c\uc2a4 \uc2a4\ud0a4\ub9c8\ub97c \uc7ac\ucef4\ud30c\uc77c\ud560 \ub54c \uc218\uc815 \uc0ac\ud56d\uc774 \uc190\uc2e4\ub429\ub2c8\ub2e4. \n\uc0dd\uc131 \ub0a0\uc9dc: {0} \n
 
-Driver.Version = XJC 2.2.8-b20130806.1801
+Driver.Version = XJC 2.2.8-b130911.1802
 
-Driver.FullVersion = XJC \uC815\uC2DD \uBC84\uC804 "2.2.8-b20130806.1801"
+Driver.FullVersion = XJC \uC815\uC2DD \uBC84\uC804 "2.2.8-b130911.1802"
 
-Driver.BuildID = 2.2.8-b20130806.1801
+Driver.BuildID = 2.2.8-b130911.1802
 
 # for JDK integration - include version in source zip
 jaxb.jdk.version=@@JAXB_JDK_VERSION@@
diff --git a/jaxws/src/share/jaxws_classes/com/sun/tools/internal/xjc/MessageBundle_pt_BR.properties b/jaxws/src/share/jaxws_classes/com/sun/tools/internal/xjc/MessageBundle_pt_BR.properties
index c7eb028..1111918 100644
--- a/jaxws/src/share/jaxws_classes/com/sun/tools/internal/xjc/MessageBundle_pt_BR.properties
+++ b/jaxws/src/share/jaxws_classes/com/sun/tools/internal/xjc/MessageBundle_pt_BR.properties
@@ -96,14 +96,14 @@
 
 Driver.FailedToGenerateCode = Falha ao produzir o c\u00f3digo.
 
-# DO NOT localize the 2.2.8-b20130806.1801 string - it is a token for an ant <replaceFilter>
-Driver.FilePrologComment = Este arquivo foi gerado pela Arquitetura JavaTM para Implementa\u00e7\u00e3o de Refer\u00eancia (JAXB) de Bind XML, v2.2.8-b20130806.1801 \nConsulte <a href="http://java.sun.com/xml/jaxb">http://java.sun.com/xml/jaxb</a> \nTodas as modifica\u00e7\u00f5es neste arquivo ser\u00e3o perdidas ap\u00f3s a recompila\u00e7\u00e3o do esquema de origem. \nGerado em: {0} \n
+# DO NOT localize the 2.2.8-b130911.1802 string - it is a token for an mvn <properties filter>
+Driver.FilePrologComment = Este arquivo foi gerado pela Arquitetura JavaTM para Implementa\u00e7\u00e3o de Refer\u00eancia (JAXB) de Bind XML, v2.2.8-b130911.1802 \nConsulte <a href="http://java.sun.com/xml/jaxb">http://java.sun.com/xml/jaxb</a> \nTodas as modifica\u00e7\u00f5es neste arquivo ser\u00e3o perdidas ap\u00f3s a recompila\u00e7\u00e3o do esquema de origem. \nGerado em: {0} \n
 
-Driver.Version = xjc 2.2.8-b20130806.1801
+Driver.Version = xjc 2.2.8-b130911.1802
 
-Driver.FullVersion = vers\u00E3o completa de xjc "2.2.8-b20130806.1801"
+Driver.FullVersion = vers\u00E3o completa de xjc "2.2.8-b130911.1802"
 
-Driver.BuildID = 2.2.8-b20130806.1801
+Driver.BuildID = 2.2.8-b130911.1802
 
 # for JDK integration - include version in source zip
 jaxb.jdk.version=@@JAXB_JDK_VERSION@@
diff --git a/jaxws/src/share/jaxws_classes/com/sun/tools/internal/xjc/MessageBundle_zh_CN.properties b/jaxws/src/share/jaxws_classes/com/sun/tools/internal/xjc/MessageBundle_zh_CN.properties
index 748aab6..38838e8 100644
--- a/jaxws/src/share/jaxws_classes/com/sun/tools/internal/xjc/MessageBundle_zh_CN.properties
+++ b/jaxws/src/share/jaxws_classes/com/sun/tools/internal/xjc/MessageBundle_zh_CN.properties
@@ -96,14 +96,14 @@
 
 Driver.FailedToGenerateCode = \u65e0\u6cd5\u751f\u6210\u4ee3\u7801\u3002
 
-# DO NOT localize the 2.2.8-b20130806.1801 string - it is a token for an ant <replaceFilter>
-Driver.FilePrologComment = \u6b64\u6587\u4ef6\u662f\u7531 JavaTM Architecture for XML Binding (JAXB) \u5f15\u7528\u5b9e\u73b0 v2.2.8-b20130806.1801 \u751f\u6210\u7684\n\u8bf7\u8bbf\u95ee <a href="http://java.sun.com/xml/jaxb">http://java.sun.com/xml/jaxb</a> \n\u5728\u91cd\u65b0\u7f16\u8bd1\u6e90\u6a21\u5f0f\u65f6, \u5bf9\u6b64\u6587\u4ef6\u7684\u6240\u6709\u4fee\u6539\u90fd\u5c06\u4e22\u5931\u3002\n\u751f\u6210\u65f6\u95f4: {0} \n
+# DO NOT localize the 2.2.8-b130911.1802 string - it is a token for an mvn <properties filter>
+Driver.FilePrologComment = \u6b64\u6587\u4ef6\u662f\u7531 JavaTM Architecture for XML Binding (JAXB) \u5f15\u7528\u5b9e\u73b0 v2.2.8-b130911.1802 \u751f\u6210\u7684\n\u8bf7\u8bbf\u95ee <a href="http://java.sun.com/xml/jaxb">http://java.sun.com/xml/jaxb</a> \n\u5728\u91cd\u65b0\u7f16\u8bd1\u6e90\u6a21\u5f0f\u65f6, \u5bf9\u6b64\u6587\u4ef6\u7684\u6240\u6709\u4fee\u6539\u90fd\u5c06\u4e22\u5931\u3002\n\u751f\u6210\u65f6\u95f4: {0} \n
 
-Driver.Version = xjc 2.2.8-b20130806.1801
+Driver.Version = xjc 2.2.8-b130911.1802
 
-Driver.FullVersion = xjc \u5B8C\u6574\u7248\u672C "2.2.8-b20130806.1801"
+Driver.FullVersion = xjc \u5B8C\u6574\u7248\u672C "2.2.8-b130911.1802"
 
-Driver.BuildID = 2.2.8-b20130806.1801
+Driver.BuildID = 2.2.8-b130911.1802
 
 # for JDK integration - include version in source zip
 jaxb.jdk.version=@@JAXB_JDK_VERSION@@
diff --git a/jaxws/src/share/jaxws_classes/com/sun/tools/internal/xjc/MessageBundle_zh_TW.properties b/jaxws/src/share/jaxws_classes/com/sun/tools/internal/xjc/MessageBundle_zh_TW.properties
index a305e7e..c9c60d1 100644
--- a/jaxws/src/share/jaxws_classes/com/sun/tools/internal/xjc/MessageBundle_zh_TW.properties
+++ b/jaxws/src/share/jaxws_classes/com/sun/tools/internal/xjc/MessageBundle_zh_TW.properties
@@ -96,14 +96,14 @@
 
 Driver.FailedToGenerateCode = \u7121\u6cd5\u7522\u751f\u7a0b\u5f0f\u78bc.
 
-# DO NOT localize the 2.2.8-b20130806.1801 string - it is a token for an ant <replaceFilter>
-Driver.FilePrologComment = \u6b64\u6a94\u6848\u662f\u7531 JavaTM Architecture for XML Binding(JAXB) Reference Implementation, v2.2.8-b20130806.1801 \u6240\u7522\u751f \n\u8acb\u53c3\u95b1 <a href="http://java.sun.com/xml/jaxb">http://java.sun.com/xml/jaxb</a> \n\u4e00\u65e6\u91cd\u65b0\u7de8\u8b6f\u4f86\u6e90\u7db1\u8981, \u5c0d\u6b64\u6a94\u6848\u6240\u505a\u7684\u4efb\u4f55\u4fee\u6539\u90fd\u5c07\u6703\u907a\u5931. \n\u7522\u751f\u6642\u9593: {0} \n
+# DO NOT localize the 2.2.8-b130911.1802 string - it is a token for an mvn <properties filter>
+Driver.FilePrologComment = \u6b64\u6a94\u6848\u662f\u7531 JavaTM Architecture for XML Binding(JAXB) Reference Implementation, v2.2.8-b130911.1802 \u6240\u7522\u751f \n\u8acb\u53c3\u95b1 <a href="http://java.sun.com/xml/jaxb">http://java.sun.com/xml/jaxb</a> \n\u4e00\u65e6\u91cd\u65b0\u7de8\u8b6f\u4f86\u6e90\u7db1\u8981, \u5c0d\u6b64\u6a94\u6848\u6240\u505a\u7684\u4efb\u4f55\u4fee\u6539\u90fd\u5c07\u6703\u907a\u5931. \n\u7522\u751f\u6642\u9593: {0} \n
 
-Driver.Version = xjc 2.2.8-b20130806.1801
+Driver.Version = xjc 2.2.8-b130911.1802
 
-Driver.FullVersion = xjc \u5B8C\u6574\u7248\u672C "2.2.8-b20130806.1801"
+Driver.FullVersion = xjc \u5B8C\u6574\u7248\u672C "2.2.8-b130911.1802"
 
-Driver.BuildID = 2.2.8-b20130806.1801
+Driver.BuildID = 2.2.8-b130911.1802
 
 # for JDK integration - include version in source zip
 jaxb.jdk.version=@@JAXB_JDK_VERSION@@
diff --git a/jaxws/src/share/jaxws_classes/com/sun/tools/internal/xjc/SchemaCache.java b/jaxws/src/share/jaxws_classes/com/sun/tools/internal/xjc/SchemaCache.java
index c28fd50..2277dd4 100644
--- a/jaxws/src/share/jaxws_classes/com/sun/tools/internal/xjc/SchemaCache.java
+++ b/jaxws/src/share/jaxws_classes/com/sun/tools/internal/xjc/SchemaCache.java
@@ -35,7 +35,7 @@
 import javax.xml.XMLConstants;
 import org.xml.sax.SAXException;
 
-import static com.sun.xml.internal.bind.v2.util.XmlFactory.allowFileAccess;
+import static com.sun.xml.internal.bind.v2.util.XmlFactory.allowExternalAccess;
 
 /**
  * Wraps a JAXP {@link Schema} object and lazily instantiate it.
@@ -61,7 +61,7 @@
                 try {
                     // do not disable secure processing - these are well-known schemas
                     SchemaFactory sf = XmlFactory.createSchemaFactory(XMLConstants.W3C_XML_SCHEMA_NS_URI, false);
-                    schema = allowFileAccess(sf, false).newSchema(source);
+                    schema = allowExternalAccess(sf, "file", false).newSchema(source);
                 } catch (SAXException e) {
                     // we make sure that the schema is correct before we ship.
                     throw new AssertionError(e);
diff --git a/jaxws/src/share/jaxws_classes/com/sun/tools/internal/xjc/reader/internalizer/DOMForest.java b/jaxws/src/share/jaxws_classes/com/sun/tools/internal/xjc/reader/internalizer/DOMForest.java
index b31ae38..bea319e 100644
--- a/jaxws/src/share/jaxws_classes/com/sun/tools/internal/xjc/reader/internalizer/DOMForest.java
+++ b/jaxws/src/share/jaxws_classes/com/sun/tools/internal/xjc/reader/internalizer/DOMForest.java
@@ -59,7 +59,7 @@
 import java.io.OutputStreamWriter;
 import java.util.*;
 
-import static com.sun.xml.internal.bind.v2.util.XmlFactory.allowFileAccess;
+import static com.sun.xml.internal.bind.v2.util.XmlFactory.allowExternalAccess;
 import static javax.xml.XMLConstants.W3C_XML_SCHEMA_NS_URI;
 
 
@@ -460,7 +460,7 @@
         }
 
         try {
-            allowFileAccess(sf, options.disableXmlSecurity).newSchema(sources.toArray(new SAXSource[0]));
+            allowExternalAccess(sf, "file,http", options.disableXmlSecurity).newSchema(sources.toArray(new SAXSource[0]));
         } catch (SAXException e) {
             // error should have been reported.
         } catch (RuntimeException re) {
diff --git a/jaxws/src/share/jaxws_classes/com/sun/tools/internal/xjc/reader/xmlschema/ct/AbstractExtendedComplexTypeBuilder.java b/jaxws/src/share/jaxws_classes/com/sun/tools/internal/xjc/reader/xmlschema/ct/AbstractExtendedComplexTypeBuilder.java
index b236361..e15b3aa 100644
--- a/jaxws/src/share/jaxws_classes/com/sun/tools/internal/xjc/reader/xmlschema/ct/AbstractExtendedComplexTypeBuilder.java
+++ b/jaxws/src/share/jaxws_classes/com/sun/tools/internal/xjc/reader/xmlschema/ct/AbstractExtendedComplexTypeBuilder.java
@@ -41,6 +41,7 @@
 import com.sun.xml.internal.xsom.XSType;
 import com.sun.xml.internal.xsom.XSWildcard;
 import com.sun.xml.internal.xsom.visitor.XSTermFunction;
+import javax.xml.namespace.QName;
 
 import com.sun.xml.internal.rngom.nc.ChoiceNameClass;
 import com.sun.xml.internal.rngom.nc.NameClass;
@@ -65,14 +66,17 @@
      * Computes a name class that represents everything in a given content model.
      */
     protected final XSTermFunction<NameClass> contentModelNameClassBuilder = new XSTermFunction<NameClass>() {
+        @Override
         public NameClass wildcard(XSWildcard wc) {
             return WildcardNameClassBuilder.build(wc);
         }
 
+        @Override
         public NameClass modelGroupDecl(XSModelGroupDecl decl) {
             return modelGroup(decl.getModelGroup());
         }
 
+        @Override
         public NameClass modelGroup(XSModelGroup group) {
             NameClass nc = NameClass.NULL;
             for( int i=0; i<group.getSize(); i++ )
@@ -216,7 +220,7 @@
      * Gets a {@link SimpleNameClass} from the name of a {@link XSDeclaration}.
      */
     private NameClass getNameClass(XSDeclaration decl) {
-        return new SimpleNameClass(decl.getTargetNamespace(), decl.getName());
+        return new SimpleNameClass(new QName(decl.getTargetNamespace(), decl.getName()));
     }
 
 }
diff --git a/jaxws/src/share/jaxws_classes/com/sun/tools/internal/xjc/reader/xmlschema/parser/SchemaConstraintChecker.java b/jaxws/src/share/jaxws_classes/com/sun/tools/internal/xjc/reader/xmlschema/parser/SchemaConstraintChecker.java
index 1b5b434..19b10a9 100644
--- a/jaxws/src/share/jaxws_classes/com/sun/tools/internal/xjc/reader/xmlschema/parser/SchemaConstraintChecker.java
+++ b/jaxws/src/share/jaxws_classes/com/sun/tools/internal/xjc/reader/xmlschema/parser/SchemaConstraintChecker.java
@@ -69,6 +69,7 @@
         boolean hadErrors = false;
 
         SchemaFactory sf = XmlFactory.createSchemaFactory(W3C_XML_SCHEMA_NS_URI, disableXmlSecurity);
+        XmlFactory.allowExternalAccess(sf, "all", disableXmlSecurity);
         sf.setErrorHandler(errorFilter);
         if( entityResolver != null ) {
             sf.setResourceResolver(new LSResourceResolver() {
@@ -91,6 +92,7 @@
         }
 
         try {
+            XmlFactory.allowExternalDTDAccess(sf, "all", disableXmlSecurity);
             sf.newSchema(getSchemaSource(schemas, entityResolver));
         } catch (SAXException e) {
             // TODO: we haven't thrown exceptions from here before. should we just trap them and return false?
diff --git a/jaxws/src/share/jaxws_classes/com/sun/xml/internal/bind/v2/Messages.java b/jaxws/src/share/jaxws_classes/com/sun/xml/internal/bind/v2/Messages.java
index 17bcfde..2add920 100644
--- a/jaxws/src/share/jaxws_classes/com/sun/xml/internal/bind/v2/Messages.java
+++ b/jaxws/src/share/jaxws_classes/com/sun/xml/internal/bind/v2/Messages.java
@@ -42,6 +42,8 @@
     INVALID_JAXP_IMPLEMENTATION, // 1 arg
     JAXP_SUPPORTED_PROPERTY, // 1 arg
     JAXP_UNSUPPORTED_PROPERTY, // 1 arg
+    JAXP_XML_SECURITY_DISABLED, // no arg
+    JAXP_EXTERNAL_ACCESS_CONFIGURED, // no arg
     ;
 
     private static final ResourceBundle rb = ResourceBundle.getBundle(Messages.class.getName());
diff --git a/jaxws/src/share/jaxws_classes/com/sun/xml/internal/bind/v2/Messages.properties b/jaxws/src/share/jaxws_classes/com/sun/xml/internal/bind/v2/Messages.properties
index 98e2c8ab..121a82a 100644
--- a/jaxws/src/share/jaxws_classes/com/sun/xml/internal/bind/v2/Messages.properties
+++ b/jaxws/src/share/jaxws_classes/com/sun/xml/internal/bind/v2/Messages.properties
@@ -56,3 +56,9 @@
 
 JAXP_UNSUPPORTED_PROPERTY =\
     Property "{0}" is not supported by used JAXP implementation.
+
+JAXP_XML_SECURITY_DISABLED=\
+    "Xml Security disabled, no JAXP xsd external access configuration necessary."
+
+JAXP_EXTERNAL_ACCESS_CONFIGURED=\
+    "Detected explicitly JAXP configuration, no JAXP xsd external access configuration necessary."
diff --git a/jaxws/src/share/jaxws_classes/com/sun/xml/internal/bind/v2/runtime/property/SingleMapNodeProperty.java b/jaxws/src/share/jaxws_classes/com/sun/xml/internal/bind/v2/runtime/property/SingleMapNodeProperty.java
index 76773e8..09e49ff 100644
--- a/jaxws/src/share/jaxws_classes/com/sun/xml/internal/bind/v2/runtime/property/SingleMapNodeProperty.java
+++ b/jaxws/src/share/jaxws_classes/com/sun/xml/internal/bind/v2/runtime/property/SingleMapNodeProperty.java
@@ -140,22 +140,23 @@
      */
     private final Loader itemsLoader = new Loader(false) {
 
-        private ThreadLocal<BeanT> target = new ThreadLocal<BeanT>();
-        private ThreadLocal<ValueT> map = new ThreadLocal<ValueT>();
-        private int depthCounter = 0; // needed to clean ThreadLocals
+        private ThreadLocal<Stack<BeanT>> target = new ThreadLocal<Stack<BeanT>>();
+        private ThreadLocal<Stack<ValueT>> map = new ThreadLocal<Stack<ValueT>>();
 
         @Override
         public void startElement(UnmarshallingContext.State state, TagName ea) throws SAXException {
             // create or obtain the Map object
             try {
-                target.set((BeanT)state.prev.target);
-                map.set(acc.get(target.get()));
-                depthCounter++;
-                if(map.get() == null) {
-                    map.set(ClassFactory.create(mapImplClass));
-                }
-                map.get().clear();
-                state.target = map.get();
+                BeanT target = (BeanT) state.prev.target;
+                ValueT mapValue = acc.get(target);
+                if(mapValue == null)
+                    mapValue = ClassFactory.create(mapImplClass);
+                else
+                    mapValue.clear();
+
+                Stack.push(this.target, target);
+                Stack.push(map, mapValue);
+                state.target = mapValue;
             } catch (AccessorException e) {
                 // recover from error by setting a dummy Map that receives and discards the values
                 handleGenericException(e,true);
@@ -167,11 +168,7 @@
         public void leaveElement(State state, TagName ea) throws SAXException {
             super.leaveElement(state, ea);
             try {
-                acc.set(target.get(), map.get());
-                if (--depthCounter == 0) {
-                    target.remove();
-                    map.remove();
-                }
+                acc.set(Stack.pop(target), Stack.pop(map));
             } catch (AccessorException ex) {
                 handleGenericException(ex,true);
             }
@@ -289,4 +286,36 @@
             return acc;
         return null;
     }
+
+    private static final class Stack<T> {
+        private Stack<T> parent;
+        private T value;
+
+        private Stack(Stack<T> parent, T value) {
+            this.parent = parent;
+            this.value = value;
+        }
+
+        private Stack(T value) {
+            this.value = value;
+        }
+
+        private static <T> void push(ThreadLocal<Stack<T>> holder, T value) {
+            Stack<T> parent = holder.get();
+            if (parent == null)
+                holder.set(new Stack<T>(value));
+            else
+                holder.set(new Stack<T>(parent, value));
+        }
+
+        private static <T> T pop(ThreadLocal<Stack<T>> holder) {
+            Stack<T> current = holder.get();
+            if (current.parent == null)
+                holder.remove();
+            else
+                holder.set(current.parent);
+            return current.value;
+        }
+
+    }
 }
diff --git a/jaxws/src/share/jaxws_classes/com/sun/xml/internal/bind/v2/runtime/reflect/opt/AccessorInjector.java b/jaxws/src/share/jaxws_classes/com/sun/xml/internal/bind/v2/runtime/reflect/opt/AccessorInjector.java
index 7e7b826..adc2610 100644
--- a/jaxws/src/share/jaxws_classes/com/sun/xml/internal/bind/v2/runtime/reflect/opt/AccessorInjector.java
+++ b/jaxws/src/share/jaxws_classes/com/sun/xml/internal/bind/v2/runtime/reflect/opt/AccessorInjector.java
@@ -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
@@ -63,19 +63,15 @@
             ClassLoader cl = SecureLoader.getClassClassLoader(beanClass);
             if(cl==null)    return null;    // how do I inject classes to this "null" class loader? for now, back off.
 
-            Class c = null;
-            synchronized (AccessorInjector.class) {
-                c = Injector.find(cl,newClassName);
-                if(c==null) {
-                    byte[] image = tailor(templateClassName,newClassName,replacements);
-    //                try {
-    //                    new FileOutputStream("debug.class").write(image);
-    //                } catch (IOException e) {
-    //                    e.printStackTrace();
-    //                }
-                    if(image==null)
-                        return null;
-                    c = Injector.inject(cl,newClassName,image);
+            Class c = Injector.find(cl,newClassName);
+            if (c==null) {
+                byte[] image = tailor(templateClassName,newClassName,replacements);
+                if (image==null) {
+                    return null;
+                }
+                c = Injector.inject(cl,newClassName,image);
+                if (c == null) {
+                    Injector.find(cl, newClassName);
                 }
             }
             return c;
@@ -112,4 +108,5 @@
     }
 
     private static final ClassLoader CLASS_LOADER = SecureLoader.getClassClassLoader(AccessorInjector.class);
+
 }
diff --git a/jaxws/src/share/jaxws_classes/com/sun/xml/internal/bind/v2/runtime/reflect/opt/Injector.java b/jaxws/src/share/jaxws_classes/com/sun/xml/internal/bind/v2/runtime/reflect/opt/Injector.java
index 4d74b1d..78f4746 100644
--- a/jaxws/src/share/jaxws_classes/com/sun/xml/internal/bind/v2/runtime/reflect/opt/Injector.java
+++ b/jaxws/src/share/jaxws_classes/com/sun/xml/internal/bind/v2/runtime/reflect/opt/Injector.java
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 1997, 2010, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 1997, 2013, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -156,6 +156,7 @@
         }
         AccessController.doPrivileged(new PrivilegedAction<Void>() {
 
+            @Override
             public Void run() {
                 // TODO: check security implication
                 // do these setAccessible allow anyone to call these methods freely?s
diff --git a/jaxws/src/share/jaxws_classes/com/sun/xml/internal/bind/v2/runtime/reflect/opt/OptimizedAccessorFactory.java b/jaxws/src/share/jaxws_classes/com/sun/xml/internal/bind/v2/runtime/reflect/opt/OptimizedAccessorFactory.java
index e52dccb..ee1506f 100644
--- a/jaxws/src/share/jaxws_classes/com/sun/xml/internal/bind/v2/runtime/reflect/opt/OptimizedAccessorFactory.java
+++ b/jaxws/src/share/jaxws_classes/com/sun/xml/internal/bind/v2/runtime/reflect/opt/OptimizedAccessorFactory.java
@@ -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
@@ -127,8 +127,11 @@
             return null;
 
         Accessor<B,V> acc = instanciate(opt);
-        if(acc!=null)
-            logger.log(Level.FINE,"Using optimized Accessor for "+getter+" and "+setter);
+        if (acc!=null) {
+            if (logger.isLoggable(Level.FINE)) {
+                logger.log(Level.FINE, "Using optimized Accessor for {0} and {1}", new Object[]{getter, setter});
+            }
+        }
         return acc;
     }
 
@@ -174,8 +177,11 @@
             return null;
 
         Accessor<B,V> acc = instanciate(opt);
-        if(acc!=null)
-            logger.log(Level.FINE,"Using optimized Accessor for "+field);
+        if (acc!=null) {
+            if (logger.isLoggable(Level.FINE)) {
+                logger.log(Level.FINE, "Using optimized Accessor for {0}", field);
+            }
+        }
         return acc;
     }
 
diff --git a/jaxws/src/share/jaxws_classes/com/sun/xml/internal/bind/v2/util/XmlFactory.java b/jaxws/src/share/jaxws_classes/com/sun/xml/internal/bind/v2/util/XmlFactory.java
index 969cf45..1bcae09 100644
--- a/jaxws/src/share/jaxws_classes/com/sun/xml/internal/bind/v2/util/XmlFactory.java
+++ b/jaxws/src/share/jaxws_classes/com/sun/xml/internal/bind/v2/util/XmlFactory.java
@@ -43,6 +43,8 @@
 import org.xml.sax.SAXNotRecognizedException;
 import org.xml.sax.SAXNotSupportedException;
 
+import static com.sun.xml.internal.bind.Util.getSystemProperty;
+
 /**
  * Provides helper methods for creating properly configured XML parser
  * factory instances with namespace support turned on and configured for
@@ -53,6 +55,7 @@
 
     // not in older JDK, so must be duplicated here, otherwise javax.xml.XMLConstants should be used
     public static final String ACCESS_EXTERNAL_SCHEMA = "http://javax.xml.XMLConstants/property/accessExternalSchema";
+    public static final String ACCESS_EXTERNAL_DTD = "http://javax.xml.XMLConstants/property/accessExternalDTD";
 
     private static final Logger LOGGER = Logger.getLogger(XmlFactory.class.getName());
 
@@ -65,11 +68,10 @@
      */
     private static final String DISABLE_XML_SECURITY  = "com.sun.xml.internal.bind.disableXmlSecurity";
 
-    public static final boolean DISABLE_SECURE_PROCESSING =
-            Boolean.parseBoolean(Util.getSystemProperty(DISABLE_XML_SECURITY));
+    public static final boolean XML_SECURITY_DISABLED = Boolean.parseBoolean(getSystemProperty(DISABLE_XML_SECURITY));
 
-    private static boolean xmlFeatureValue(boolean runtimeSetting) {
-        return !(DISABLE_SECURE_PROCESSING || runtimeSetting);
+    private static boolean isXMLSecurityDisabled(boolean runtimeSetting) {
+        return XML_SECURITY_DISABLED || runtimeSetting;
     }
 
     /**
@@ -83,7 +85,7 @@
             if (LOGGER.isLoggable(Level.FINE)) {
                 LOGGER.log(Level.FINE, "SchemaFactory instance: {0}", factory);
             }
-            factory.setFeature(XMLConstants.FEATURE_SECURE_PROCESSING, xmlFeatureValue(disableSecureProcessing));
+            factory.setFeature(XMLConstants.FEATURE_SECURE_PROCESSING, !isXMLSecurityDisabled(disableSecureProcessing));
             return factory;
         } catch (SAXNotRecognizedException ex) {
             LOGGER.log(Level.SEVERE, null, ex);
@@ -109,7 +111,7 @@
                 LOGGER.log(Level.FINE, "SAXParserFactory instance: {0}", factory);
             }
             factory.setNamespaceAware(true);
-            factory.setFeature(XMLConstants.FEATURE_SECURE_PROCESSING, xmlFeatureValue(disableSecureProcessing));
+            factory.setFeature(XMLConstants.FEATURE_SECURE_PROCESSING, !isXMLSecurityDisabled(disableSecureProcessing));
             return factory;
         } catch (ParserConfigurationException ex) {
             LOGGER.log(Level.SEVERE, null, ex);
@@ -136,7 +138,7 @@
             if (LOGGER.isLoggable(Level.FINE)) {
                 LOGGER.log(Level.FINE, "XPathFactory instance: {0}", factory);
             }
-            factory.setFeature(XMLConstants.FEATURE_SECURE_PROCESSING, xmlFeatureValue(disableSecureProcessing));
+            factory.setFeature(XMLConstants.FEATURE_SECURE_PROCESSING, !isXMLSecurityDisabled(disableSecureProcessing));
             return factory;
         } catch (XPathFactoryConfigurationException ex) {
             LOGGER.log(Level.SEVERE, null, ex);
@@ -157,7 +159,7 @@
             if (LOGGER.isLoggable(Level.FINE)) {
                 LOGGER.log(Level.FINE, "TransformerFactory instance: {0}", factory);
             }
-            factory.setFeature(XMLConstants.FEATURE_SECURE_PROCESSING, xmlFeatureValue(disableSecureProcessing));
+            factory.setFeature(XMLConstants.FEATURE_SECURE_PROCESSING, !isXMLSecurityDisabled(disableSecureProcessing));
             return factory;
         } catch (TransformerConfigurationException ex) {
             LOGGER.log(Level.SEVERE, null, ex);
@@ -180,7 +182,7 @@
                 LOGGER.log(Level.FINE, "DocumentBuilderFactory instance: {0}", factory);
             }
             factory.setNamespaceAware(true);
-            factory.setFeature(XMLConstants.FEATURE_SECURE_PROCESSING, xmlFeatureValue(disableSecureProcessing));
+            factory.setFeature(XMLConstants.FEATURE_SECURE_PROCESSING, !isXMLSecurityDisabled(disableSecureProcessing));
             return factory;
         } catch (ParserConfigurationException ex) {
             LOGGER.log(Level.SEVERE, null, ex);
@@ -191,20 +193,64 @@
         }
     }
 
-    public static SchemaFactory allowFileAccess(SchemaFactory sf, boolean disableSecureProcessing) {
+    public static SchemaFactory allowExternalAccess(SchemaFactory sf, String value, boolean disableSecureProcessing) {
 
-        // if feature secure processing enabled, nothing to do, file is allowed,
-        // or user is able to control access by standard JAXP mechanisms
-        if (disableSecureProcessing) {
+        // if xml security (feature secure processing) disabled, nothing to do, no restrictions applied
+        if (isXMLSecurityDisabled(disableSecureProcessing)) {
+            if (LOGGER.isLoggable(Level.FINE)) {
+                LOGGER.log(Level.FINE, Messages.JAXP_XML_SECURITY_DISABLED.format());
+            }
+            return sf;
+        }
+
+        if (System.getProperty("javax.xml.accessExternalSchema") != null) {
+            if (LOGGER.isLoggable(Level.FINE)) {
+                LOGGER.log(Level.FINE, Messages.JAXP_EXTERNAL_ACCESS_CONFIGURED.format());
+            }
             return sf;
         }
 
         try {
-            sf.setProperty(ACCESS_EXTERNAL_SCHEMA, "file");
-            LOGGER.log(Level.FINE, Messages.JAXP_SUPPORTED_PROPERTY.format(ACCESS_EXTERNAL_SCHEMA));
+            sf.setProperty(ACCESS_EXTERNAL_SCHEMA, value);
+            if (LOGGER.isLoggable(Level.FINE)) {
+                LOGGER.log(Level.FINE, Messages.JAXP_SUPPORTED_PROPERTY.format(ACCESS_EXTERNAL_SCHEMA));
+            }
         } catch (SAXException ignored) {
             // nothing to do; support depends on version JDK or SAX implementation
-            LOGGER.log(Level.CONFIG, Messages.JAXP_UNSUPPORTED_PROPERTY.format(ACCESS_EXTERNAL_SCHEMA), ignored);
+            if (LOGGER.isLoggable(Level.CONFIG)) {
+                LOGGER.log(Level.CONFIG, Messages.JAXP_UNSUPPORTED_PROPERTY.format(ACCESS_EXTERNAL_SCHEMA), ignored);
+            }
+        }
+        return sf;
+    }
+
+    public static SchemaFactory allowExternalDTDAccess(SchemaFactory sf, String value, boolean disableSecureProcessing) {
+
+        // if xml security (feature secure processing) disabled, nothing to do, no restrictions applied
+        if (isXMLSecurityDisabled(disableSecureProcessing)) {
+            if (LOGGER.isLoggable(Level.FINE)) {
+                LOGGER.log(Level.FINE, Messages.JAXP_XML_SECURITY_DISABLED.format());
+            }
+            return sf;
+        }
+
+        if (System.getProperty("javax.xml.accessExternalDTD") != null) {
+            if (LOGGER.isLoggable(Level.FINE)) {
+                LOGGER.log(Level.FINE, Messages.JAXP_EXTERNAL_ACCESS_CONFIGURED.format());
+            }
+            return sf;
+        }
+
+        try {
+            sf.setProperty(ACCESS_EXTERNAL_DTD, value);
+            if (LOGGER.isLoggable(Level.FINE)) {
+                LOGGER.log(Level.FINE, Messages.JAXP_SUPPORTED_PROPERTY.format(ACCESS_EXTERNAL_DTD));
+            }
+        } catch (SAXException ignored) {
+            // nothing to do; support depends on version JDK or SAX implementation
+            if (LOGGER.isLoggable(Level.CONFIG)) {
+                LOGGER.log(Level.CONFIG, Messages.JAXP_UNSUPPORTED_PROPERTY.format(ACCESS_EXTERNAL_DTD), ignored);
+            }
         }
         return sf;
     }
diff --git a/jaxws/src/share/jaxws_classes/com/sun/xml/internal/org/jvnet/staxex/Base64Data.java b/jaxws/src/share/jaxws_classes/com/sun/xml/internal/org/jvnet/staxex/Base64Data.java
index fa7512c..c749840 100644
--- a/jaxws/src/share/jaxws_classes/com/sun/xml/internal/org/jvnet/staxex/Base64Data.java
+++ b/jaxws/src/share/jaxws_classes/com/sun/xml/internal/org/jvnet/staxex/Base64Data.java
@@ -287,10 +287,11 @@
      * @throws IOException if i/o error occurs
      */
     public InputStream getInputStream() throws IOException {
-        if(dataHandler!=null)
+        if(dataHandler!=null) {
             return dataHandler.getInputStream();
-        else
+        } else {
             return new ByteArrayInputStream(data,0,dataLen);
+        }
     }
 
     /**
@@ -342,8 +343,9 @@
     }
 
     public String getMimeType() {
-        if(mimeType==null)
+        if (mimeType==null) {
             return "application/octet-stream";
+        }
         return mimeType;
     }
 
@@ -376,31 +378,35 @@
         case 0:
             return Base64Encoder.encode(data[base]>>2);
         case 1:
-            if(base+1<dataLen)
+            if (base+1<dataLen) {
                 b1 = data[base+1];
-            else
+            } else {
                 b1 = 0;
+            }
             return Base64Encoder.encode(
                         ((data[base]&0x3)<<4) |
                         ((b1>>4)&0xF));
         case 2:
-            if(base+1<dataLen) {
+            if (base+1<dataLen) {
                 b1 = data[base+1];
-                if(base+2<dataLen)
+                if (base+2<dataLen) {
                     b2 = data[base+2];
-                else
+                } else {
                     b2 = 0;
+                }
 
                 return Base64Encoder.encode(
                             ((b1&0xF)<<2)|
                             ((b2>>6)&0x3));
-            } else
+            } else {
                 return '=';
+            }
         case 3:
-            if(base+2<dataLen)
+            if(base+2<dataLen) {
                 return Base64Encoder.encode(data[base+2]&0x3F);
-            else
+            } else {
                 return '=';
+            }
         }
 
         throw new IllegalStateException();
@@ -414,8 +420,9 @@
     public CharSequence subSequence(int start, int end) {
         StringBuilder buf = new StringBuilder();
         get();  // fill in the buffer if we haven't done so
-        for( int i=start; i<end; i++ )
+        for (int i=start; i<end; i++ ) {
             buf.append(charAt(i));
+        }
         return buf;
     }
 
@@ -473,7 +480,25 @@
 
     @Override
     public Base64Data clone() {
-        return new Base64Data(this);
+        try {
+            Base64Data clone = (Base64Data) super.clone();
+            clone.get();
+            if (clone.dataCloneByRef) {
+                this.data = clone.data;
+            } else {
+                this.data = new byte[clone.dataLen];
+                System.arraycopy(clone.data, 0, this.data, 0, clone.dataLen);
+            }
+
+            this.dataCloneByRef = true;
+            this.dataLen = clone.dataLen;
+            this.dataHandler = null;
+            this.mimeType = clone.mimeType;
+            return clone;
+        } catch (CloneNotSupportedException ex) {
+            Logger.getLogger(Base64Data.class.getName()).log(Level.SEVERE, null, ex);
+            return null;
+        }
     }
 
     static String getProperty(final String propName) {
diff --git a/jaxws/src/share/jaxws_classes/com/sun/xml/internal/org/jvnet/staxex/Base64Encoder.java b/jaxws/src/share/jaxws_classes/com/sun/xml/internal/org/jvnet/staxex/Base64Encoder.java
index b597a0c..442d9ff 100644
--- a/jaxws/src/share/jaxws_classes/com/sun/xml/internal/org/jvnet/staxex/Base64Encoder.java
+++ b/jaxws/src/share/jaxws_classes/com/sun/xml/internal/org/jvnet/staxex/Base64Encoder.java
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 1997, 2010, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 1997, 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
diff --git a/jaxws/src/share/jaxws_classes/com/sun/xml/internal/org/jvnet/staxex/Base64EncoderStream.java b/jaxws/src/share/jaxws_classes/com/sun/xml/internal/org/jvnet/staxex/Base64EncoderStream.java
index febf187..29da264 100644
--- a/jaxws/src/share/jaxws_classes/com/sun/xml/internal/org/jvnet/staxex/Base64EncoderStream.java
+++ b/jaxws/src/share/jaxws_classes/com/sun/xml/internal/org/jvnet/staxex/Base64EncoderStream.java
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2011, Oracle and/or its affiliates. All rights reserved.
+ * 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
diff --git a/jaxws/src/share/jaxws_classes/com/sun/xml/internal/org/jvnet/staxex/ByteArrayOutputStreamEx.java b/jaxws/src/share/jaxws_classes/com/sun/xml/internal/org/jvnet/staxex/ByteArrayOutputStreamEx.java
index 8756c33..ed06063 100644
--- a/jaxws/src/share/jaxws_classes/com/sun/xml/internal/org/jvnet/staxex/ByteArrayOutputStreamEx.java
+++ b/jaxws/src/share/jaxws_classes/com/sun/xml/internal/org/jvnet/staxex/ByteArrayOutputStreamEx.java
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 1997, 2010, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 1997, 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
diff --git a/jaxws/src/share/jaxws_classes/com/sun/xml/internal/org/jvnet/staxex/NamespaceContextEx.java b/jaxws/src/share/jaxws_classes/com/sun/xml/internal/org/jvnet/staxex/NamespaceContextEx.java
index 46a9751..aafeb5c 100644
--- a/jaxws/src/share/jaxws_classes/com/sun/xml/internal/org/jvnet/staxex/NamespaceContextEx.java
+++ b/jaxws/src/share/jaxws_classes/com/sun/xml/internal/org/jvnet/staxex/NamespaceContextEx.java
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 1997, 2010, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 1997, 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
diff --git a/jaxws/src/share/jaxws_classes/com/sun/xml/internal/org/jvnet/staxex/StreamingDataHandler.java b/jaxws/src/share/jaxws_classes/com/sun/xml/internal/org/jvnet/staxex/StreamingDataHandler.java
index 459c66a..b8fb6df 100644
--- a/jaxws/src/share/jaxws_classes/com/sun/xml/internal/org/jvnet/staxex/StreamingDataHandler.java
+++ b/jaxws/src/share/jaxws_classes/com/sun/xml/internal/org/jvnet/staxex/StreamingDataHandler.java
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2010, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2010, 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
diff --git a/jaxws/src/share/jaxws_classes/com/sun/xml/internal/org/jvnet/staxex/XMLStreamWriterEx.java b/jaxws/src/share/jaxws_classes/com/sun/xml/internal/org/jvnet/staxex/XMLStreamWriterEx.java
index 0836302..40d9d19 100644
--- a/jaxws/src/share/jaxws_classes/com/sun/xml/internal/org/jvnet/staxex/XMLStreamWriterEx.java
+++ b/jaxws/src/share/jaxws_classes/com/sun/xml/internal/org/jvnet/staxex/XMLStreamWriterEx.java
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 1997, 2010, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 1997, 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
diff --git a/jaxws/src/share/jaxws_classes/com/sun/xml/internal/rngom/binary/SchemaBuilderImpl.java b/jaxws/src/share/jaxws_classes/com/sun/xml/internal/rngom/binary/SchemaBuilderImpl.java
index 38e3ae8..cdf149e 100644
--- a/jaxws/src/share/jaxws_classes/com/sun/xml/internal/rngom/binary/SchemaBuilderImpl.java
+++ b/jaxws/src/share/jaxws_classes/com/sun/xml/internal/rngom/binary/SchemaBuilderImpl.java
@@ -23,7 +23,7 @@
  * questions.
  */
 /*
- * Copyright (C) 2004-2011
+ * Copyright (C) 2004-2012
  *
  * Permission is hereby granted, free of charge, to any person obtaining a copy
  * of this software and associated documentation files (the "Software"), to deal
@@ -88,703 +88,705 @@
 import org.xml.sax.SAXParseException;
 
 public class SchemaBuilderImpl implements SchemaBuilder, ElementAnnotationBuilder, CommentList {
-  private final SchemaBuilderImpl parent;
-  private boolean hadError = false;
-  private final SchemaPatternBuilder pb;
-  private final DatatypeLibraryFactory datatypeLibraryFactory;
-  private final String inheritNs;
-  private final ErrorHandler eh;
-  private final OpenIncludes openIncludes;
-  private final NameClassBuilder ncb =new NameClassBuilderImpl();
-  static final Localizer localizer = new Localizer(SchemaBuilderImpl.class);
 
-  static class OpenIncludes {
-    final String uri;
-    final OpenIncludes parent;
+    private final SchemaBuilderImpl parent;
+    private boolean hadError = false;
+    private final SchemaPatternBuilder pb;
+    private final DatatypeLibraryFactory datatypeLibraryFactory;
+    private final String inheritNs;
+    private final ErrorHandler eh;
+    private final OpenIncludes openIncludes;
+    private final NameClassBuilder ncb = new NameClassBuilderImpl();
+    static final Localizer localizer = new Localizer(SchemaBuilderImpl.class);
 
-    OpenIncludes(String uri, OpenIncludes parent) {
-      this.uri = uri;
-      this.parent = parent;
+    static class OpenIncludes {
+
+        final String uri;
+        final OpenIncludes parent;
+
+        OpenIncludes(String uri, OpenIncludes parent) {
+            this.uri = uri;
+            this.parent = parent;
+        }
     }
-  }
 
-  public ParsedPattern expandPattern(ParsedPattern _pattern)
-        throws BuildException, IllegalSchemaException {
+    public ParsedPattern expandPattern(ParsedPattern _pattern)
+            throws BuildException, IllegalSchemaException {
         Pattern pattern = (Pattern) _pattern;
         if (!hadError) {
             try {
                 pattern.checkRecursion(0);
                 pattern = pattern.expand(pb);
                 pattern.checkRestrictions(Pattern.START_CONTEXT, null, null);
-                if (!hadError) return pattern;
+                if (!hadError) {
+                    return pattern;
+                }
             } catch (SAXParseException e) {
                 error(e);
             } catch (SAXException e) {
                 throw new BuildException(e);
             } catch (RestrictionViolationException e) {
-                if (e.getName() != null)
+                if (e.getName() != null) {
                     error(e.getMessageId(), e.getName().toString(), e
-                        .getLocator());
-                else
+                            .getLocator());
+                } else {
                     error(e.getMessageId(), e.getLocator());
+                }
             }
         }
         throw new IllegalSchemaException();
     }
 
-  /**
-   *
-   * @param eh
-   *        Error handler to receive errors while building the schema.
-   */
-  public SchemaBuilderImpl(ErrorHandler eh) {
-      this(eh,
-          new CascadingDatatypeLibraryFactory(new DatatypeLibraryLoader(),
-            new BuiltinDatatypeLibraryFactory(new DatatypeLibraryLoader())),
-          new SchemaPatternBuilder());
-  }
+    /**
+     *
+     * @param eh Error handler to receive errors while building the schema.
+     */
+    public SchemaBuilderImpl(ErrorHandler eh) {
+        this(eh,
+                new CascadingDatatypeLibraryFactory(new DatatypeLibraryLoader(),
+                new BuiltinDatatypeLibraryFactory(new DatatypeLibraryLoader())),
+                new SchemaPatternBuilder());
+    }
 
-  /**
-   *
-   * @param eh
-   *        Error handler to receive errors while building the schema.
-   * @param datatypeLibraryFactory
-   *        This is consulted to locate datatype libraries.
-   * @param pb
-   *        Used to build patterns.
-   */
-  public SchemaBuilderImpl(ErrorHandler eh,
-                            DatatypeLibraryFactory datatypeLibraryFactory,
-                            SchemaPatternBuilder pb) {
-    this.parent = null;
-    this.eh = eh;
-    this.datatypeLibraryFactory = datatypeLibraryFactory;
-    this.pb = pb;
-    this.inheritNs = "";
-    this.openIncludes = null;
-  }
+    /**
+     *
+     * @param eh Error handler to receive errors while building the schema.
+     * @param datatypeLibraryFactory This is consulted to locate datatype
+     * libraries.
+     * @param pb Used to build patterns.
+     */
+    public SchemaBuilderImpl(ErrorHandler eh,
+            DatatypeLibraryFactory datatypeLibraryFactory,
+            SchemaPatternBuilder pb) {
+        this.parent = null;
+        this.eh = eh;
+        this.datatypeLibraryFactory = datatypeLibraryFactory;
+        this.pb = pb;
+        this.inheritNs = "";
+        this.openIncludes = null;
+    }
 
-  private SchemaBuilderImpl(String inheritNs,
-                            String uri,
-                            SchemaBuilderImpl parent) {
-    this.parent = parent;
-    this.eh = parent.eh;
-    this.datatypeLibraryFactory = parent.datatypeLibraryFactory;
-    this.pb = parent.pb;
-    this.inheritNs = inheritNs;
-    this.openIncludes = new OpenIncludes(uri, parent.openIncludes);
-  }
+    private SchemaBuilderImpl(String inheritNs,
+            String uri,
+            SchemaBuilderImpl parent) {
+        this.parent = parent;
+        this.eh = parent.eh;
+        this.datatypeLibraryFactory = parent.datatypeLibraryFactory;
+        this.pb = parent.pb;
+        this.inheritNs = inheritNs;
+        this.openIncludes = new OpenIncludes(uri, parent.openIncludes);
+    }
 
-  public NameClassBuilder getNameClassBuilder() {
-      return ncb;
-  }
+    public NameClassBuilder getNameClassBuilder() {
+        return ncb;
+    }
 
-  public ParsedPattern makeChoice(List patterns, Location loc, Annotations anno)
-          throws BuildException {
-    if (patterns.isEmpty())
-      throw new IllegalArgumentException();
-    Pattern result = (Pattern)patterns.get(0);
-    for (int i = 1; i < patterns.size(); i++)
-      result = pb.makeChoice(result, (Pattern)patterns.get(i));
-    return result;
-  }
+    public ParsedPattern makeChoice(List patterns, Location loc, Annotations anno)
+            throws BuildException {
+        if (patterns.isEmpty()) {
+            throw new IllegalArgumentException();
+        }
+        Pattern result = (Pattern) patterns.get(0);
+        for (int i = 1; i < patterns.size(); i++) {
+            result = pb.makeChoice(result, (Pattern) patterns.get(i));
+        }
+        return result;
+    }
 
-  public ParsedPattern makeInterleave(List patterns, Location loc, Annotations anno)
-          throws BuildException {
-    if (patterns.isEmpty())
-      throw new IllegalArgumentException();
-    Pattern result = (Pattern)patterns.get(0);
-    for (int i = 1; i < patterns.size(); i++)
-      result = pb.makeInterleave(result, (Pattern)patterns.get(i));
-    return result;
-  }
+    public ParsedPattern makeInterleave(List patterns, Location loc, Annotations anno)
+            throws BuildException {
+        if (patterns.isEmpty()) {
+            throw new IllegalArgumentException();
+        }
+        Pattern result = (Pattern) patterns.get(0);
+        for (int i = 1; i < patterns.size(); i++) {
+            result = pb.makeInterleave(result, (Pattern) patterns.get(i));
+        }
+        return result;
+    }
 
-  public ParsedPattern makeGroup(List patterns, Location loc, Annotations anno)
-          throws BuildException {
-    if (patterns.isEmpty())
-      throw new IllegalArgumentException();
-    Pattern result = (Pattern)patterns.get(0);
-    for (int i = 1; i < patterns.size(); i++)
-      result = pb.makeGroup(result, (Pattern)patterns.get(i));
-    return result;
-  }
+    public ParsedPattern makeGroup(List patterns, Location loc, Annotations anno)
+            throws BuildException {
+        if (patterns.isEmpty()) {
+            throw new IllegalArgumentException();
+        }
+        Pattern result = (Pattern) patterns.get(0);
+        for (int i = 1; i < patterns.size(); i++) {
+            result = pb.makeGroup(result, (Pattern) patterns.get(i));
+        }
+        return result;
+    }
 
-  public ParsedPattern makeOneOrMore(ParsedPattern p, Location loc, Annotations anno)
-          throws BuildException {
-    return pb.makeOneOrMore((Pattern)p);
-  }
+    public ParsedPattern makeOneOrMore(ParsedPattern p, Location loc, Annotations anno)
+            throws BuildException {
+        return pb.makeOneOrMore((Pattern) p);
+    }
 
-  public ParsedPattern makeZeroOrMore(ParsedPattern p, Location loc, Annotations anno)
-          throws BuildException {
-    return pb.makeZeroOrMore((Pattern)p);
-  }
+    public ParsedPattern makeZeroOrMore(ParsedPattern p, Location loc, Annotations anno)
+            throws BuildException {
+        return pb.makeZeroOrMore((Pattern) p);
+    }
 
-  public ParsedPattern makeOptional(ParsedPattern p, Location loc, Annotations anno)
-          throws BuildException {
-    return pb.makeOptional((Pattern)p);
-  }
+    public ParsedPattern makeOptional(ParsedPattern p, Location loc, Annotations anno)
+            throws BuildException {
+        return pb.makeOptional((Pattern) p);
+    }
 
-  public ParsedPattern makeList(ParsedPattern p, Location loc, Annotations anno)
-          throws BuildException {
-    return pb.makeList((Pattern)p, (Locator)loc);
-  }
+    public ParsedPattern makeList(ParsedPattern p, Location loc, Annotations anno)
+            throws BuildException {
+        return pb.makeList((Pattern) p, (Locator) loc);
+    }
 
-  public ParsedPattern makeMixed(ParsedPattern p, Location loc, Annotations anno)
-          throws BuildException {
-    return pb.makeMixed((Pattern)p);
-  }
+    public ParsedPattern makeMixed(ParsedPattern p, Location loc, Annotations anno)
+            throws BuildException {
+        return pb.makeMixed((Pattern) p);
+    }
 
-  public ParsedPattern makeEmpty(Location loc, Annotations anno) {
-    return pb.makeEmpty();
-  }
+    public ParsedPattern makeEmpty(Location loc, Annotations anno) {
+        return pb.makeEmpty();
+    }
 
-  public ParsedPattern makeNotAllowed(Location loc, Annotations anno) {
-    return pb.makeUnexpandedNotAllowed();
-  }
+    public ParsedPattern makeNotAllowed(Location loc, Annotations anno) {
+        return pb.makeUnexpandedNotAllowed();
+    }
 
-  public ParsedPattern makeText(Location loc, Annotations anno) {
-    return pb.makeText();
-  }
+    public ParsedPattern makeText(Location loc, Annotations anno) {
+        return pb.makeText();
+    }
 
-  public ParsedPattern makeErrorPattern() {
-    return pb.makeError();
-  }
+    public ParsedPattern makeErrorPattern() {
+        return pb.makeError();
+    }
 
 //  public ParsedNameClass makeErrorNameClass() {
 //    return new ErrorNameClass();
 //  }
-
-  public ParsedPattern makeAttribute(ParsedNameClass nc, ParsedPattern p, Location loc, Annotations anno)
-          throws BuildException {
-    return pb.makeAttribute((NameClass)nc, (Pattern)p, (Locator)loc);
-  }
-
-  public ParsedPattern makeElement(ParsedNameClass nc, ParsedPattern p, Location loc, Annotations anno)
-          throws BuildException {
-    return pb.makeElement((NameClass)nc, (Pattern)p, (Locator)loc);
-  }
-
-  private class DummyDataPatternBuilder implements DataPatternBuilder {
-    public void addParam(String name, String value, Context context, String ns, Location loc, Annotations anno)
+    public ParsedPattern makeAttribute(ParsedNameClass nc, ParsedPattern p, Location loc, Annotations anno)
             throws BuildException {
+        return pb.makeAttribute((NameClass) nc, (Pattern) p, (Locator) loc);
     }
 
-    public ParsedPattern makePattern(Location loc, Annotations anno)
+    public ParsedPattern makeElement(ParsedNameClass nc, ParsedPattern p, Location loc, Annotations anno)
             throws BuildException {
-      return pb.makeError();
+        return pb.makeElement((NameClass) nc, (Pattern) p, (Locator) loc);
     }
 
-    public ParsedPattern makePattern(ParsedPattern except, Location loc, Annotations anno)
-            throws BuildException {
-      return pb.makeError();
-    }
+    private class DummyDataPatternBuilder implements DataPatternBuilder {
 
-    public void annotation(ParsedElementAnnotation ea) {
-    }
-  }
-
-  private class ValidationContextImpl implements ValidationContext {
-    private ValidationContext vc;
-    private String ns;
-
-    ValidationContextImpl(ValidationContext vc, String ns) {
-      this.vc = vc;
-      this.ns = ns.length() == 0 ? null : ns;
-    }
-
-    public String resolveNamespacePrefix(String prefix) {
-      return prefix.length() == 0 ? ns : vc.resolveNamespacePrefix(prefix);
-    }
-
-    public String getBaseUri() {
-      return vc.getBaseUri();
-    }
-
-    public boolean isUnparsedEntity(String entityName) {
-      return vc.isUnparsedEntity(entityName);
-    }
-
-    public boolean isNotation(String notationName) {
-      return vc.isNotation(notationName);
-    }
-  }
-
-  private class DataPatternBuilderImpl implements DataPatternBuilder {
-    private DatatypeBuilder dtb;
-    DataPatternBuilderImpl(DatatypeBuilder dtb) {
-      this.dtb = dtb;
-    }
-
-    public void addParam(String name, String value, Context context, String ns, Location loc, Annotations anno)
-            throws BuildException {
-      try {
-        dtb.addParameter(name, value, new ValidationContextImpl(context, ns));
-      }
-      catch (DatatypeException e) {
-        String detail = e.getMessage();
-        int pos = e.getIndex();
-        String displayedParam;
-        if (pos == DatatypeException.UNKNOWN)
-          displayedParam = null;
-        else
-          displayedParam = displayParam(value, pos);
-        if (displayedParam != null) {
-          if (detail != null)
-            error("invalid_param_detail_display", detail, displayedParam, (Locator)loc);
-          else
-            error("invalid_param_display", displayedParam, (Locator)loc);
+        public void addParam(String name, String value, Context context, String ns, Location loc, Annotations anno)
+                throws BuildException {
         }
-        else if (detail != null)
-          error("invalid_param_detail", detail, (Locator)loc);
-        else
-          error("invalid_param", (Locator)loc);
-      }
+
+        public ParsedPattern makePattern(Location loc, Annotations anno)
+                throws BuildException {
+            return pb.makeError();
+        }
+
+        public ParsedPattern makePattern(ParsedPattern except, Location loc, Annotations anno)
+                throws BuildException {
+            return pb.makeError();
+        }
+
+        public void annotation(ParsedElementAnnotation ea) {
+        }
     }
 
-    String displayParam(String value, int pos) {
-      if (pos < 0)
-        pos = 0;
-      else if (pos > value.length())
-        pos = value.length();
-      return localizer.message("display_param", value.substring(0, pos), value.substring(pos));
+    private static class ValidationContextImpl implements ValidationContext {
+
+        private ValidationContext vc;
+        private String ns;
+
+        ValidationContextImpl(ValidationContext vc, String ns) {
+            this.vc = vc;
+            this.ns = ns.length() == 0 ? null : ns;
+        }
+
+        public String resolveNamespacePrefix(String prefix) {
+            return prefix.length() == 0 ? ns : vc.resolveNamespacePrefix(prefix);
+        }
+
+        public String getBaseUri() {
+            return vc.getBaseUri();
+        }
+
+        public boolean isUnparsedEntity(String entityName) {
+            return vc.isUnparsedEntity(entityName);
+        }
+
+        public boolean isNotation(String notationName) {
+            return vc.isNotation(notationName);
+        }
     }
 
-    public ParsedPattern makePattern(Location loc, Annotations anno)
+    private class DataPatternBuilderImpl implements DataPatternBuilder {
+
+        private DatatypeBuilder dtb;
+
+        DataPatternBuilderImpl(DatatypeBuilder dtb) {
+            this.dtb = dtb;
+        }
+
+        public void addParam(String name, String value, Context context, String ns, Location loc, Annotations anno)
+                throws BuildException {
+            try {
+                dtb.addParameter(name, value, new ValidationContextImpl(context, ns));
+            } catch (DatatypeException e) {
+                String detail = e.getMessage();
+                int pos = e.getIndex();
+                String displayedParam;
+                if (pos == DatatypeException.UNKNOWN) {
+                    displayedParam = null;
+                } else {
+                    displayedParam = displayParam(value, pos);
+                }
+                if (displayedParam != null) {
+                    if (detail != null) {
+                        error("invalid_param_detail_display", detail, displayedParam, (Locator) loc);
+                    } else {
+                        error("invalid_param_display", displayedParam, (Locator) loc);
+                    }
+                } else if (detail != null) {
+                    error("invalid_param_detail", detail, (Locator) loc);
+                } else {
+                    error("invalid_param", (Locator) loc);
+                }
+            }
+        }
+
+        String displayParam(String value, int pos) {
+            if (pos < 0) {
+                pos = 0;
+            } else if (pos > value.length()) {
+                pos = value.length();
+            }
+            return localizer.message("display_param", value.substring(0, pos), value.substring(pos));
+        }
+
+        public ParsedPattern makePattern(Location loc, Annotations anno)
+                throws BuildException {
+            try {
+                return pb.makeData(dtb.createDatatype());
+            } catch (DatatypeException e) {
+                String detail = e.getMessage();
+                if (detail != null) {
+                    error("invalid_params_detail", detail, (Locator) loc);
+                } else {
+                    error("invalid_params", (Locator) loc);
+                }
+                return pb.makeError();
+            }
+        }
+
+        public ParsedPattern makePattern(ParsedPattern except, Location loc, Annotations anno)
+                throws BuildException {
+            try {
+                return pb.makeDataExcept(dtb.createDatatype(), (Pattern) except, (Locator) loc);
+            } catch (DatatypeException e) {
+                String detail = e.getMessage();
+                if (detail != null) {
+                    error("invalid_params_detail", detail, (Locator) loc);
+                } else {
+                    error("invalid_params", (Locator) loc);
+                }
+                return pb.makeError();
+            }
+        }
+
+        public void annotation(ParsedElementAnnotation ea) {
+        }
+    }
+
+    public DataPatternBuilder makeDataPatternBuilder(String datatypeLibrary, String type, Location loc)
             throws BuildException {
-      try {
-        return pb.makeData(dtb.createDatatype());
-      }
-      catch (DatatypeException e) {
-        String detail = e.getMessage();
-        if (detail != null)
-          error("invalid_params_detail", detail, (Locator)loc);
-        else
-          error("invalid_params", (Locator)loc);
-        return pb.makeError();
-      }
+        DatatypeLibrary dl = datatypeLibraryFactory.createDatatypeLibrary(datatypeLibrary);
+        if (dl == null) {
+            error("unrecognized_datatype_library", datatypeLibrary, (Locator) loc);
+        } else {
+            try {
+                return new DataPatternBuilderImpl(dl.createDatatypeBuilder(type));
+            } catch (DatatypeException e) {
+                String detail = e.getMessage();
+                if (detail != null) {
+                    error("unsupported_datatype_detail", datatypeLibrary, type, detail, (Locator) loc);
+                } else {
+                    error("unrecognized_datatype", datatypeLibrary, type, (Locator) loc);
+                }
+            }
+        }
+        return new DummyDataPatternBuilder();
     }
 
-    public ParsedPattern makePattern(ParsedPattern except, Location loc, Annotations anno)
+    public ParsedPattern makeValue(String datatypeLibrary, String type, String value, Context context, String ns,
+            Location loc, Annotations anno) throws BuildException {
+        DatatypeLibrary dl = datatypeLibraryFactory.createDatatypeLibrary(datatypeLibrary);
+        if (dl == null) {
+            error("unrecognized_datatype_library", datatypeLibrary, (Locator) loc);
+        } else {
+            try {
+                DatatypeBuilder dtb = dl.createDatatypeBuilder(type);
+                try {
+                    Datatype dt = dtb.createDatatype();
+                    Object obj = dt.createValue(value, new ValidationContextImpl(context, ns));
+                    if (obj != null) {
+                        return pb.makeValue(dt, obj);
+                    }
+                    error("invalid_value", value, (Locator) loc);
+                } catch (DatatypeException e) {
+                    String detail = e.getMessage();
+                    if (detail != null) {
+                        error("datatype_requires_param_detail", detail, (Locator) loc);
+                    } else {
+                        error("datatype_requires_param", (Locator) loc);
+                    }
+                }
+            } catch (DatatypeException e) {
+                error("unrecognized_datatype", datatypeLibrary, type, (Locator) loc);
+            }
+        }
+        return pb.makeError();
+    }
+
+    static class GrammarImpl implements Grammar, Div, IncludedGrammar {
+
+        private final SchemaBuilderImpl sb;
+        private final Hashtable defines;
+        private final RefPattern startRef;
+        private final Scope parent;
+
+        private GrammarImpl(SchemaBuilderImpl sb, Scope parent) {
+            this.sb = sb;
+            this.parent = parent;
+            this.defines = new Hashtable();
+            this.startRef = new RefPattern(null);
+        }
+
+        protected GrammarImpl(SchemaBuilderImpl sb, GrammarImpl g) {
+            this.sb = sb;
+            parent = g.parent;
+            startRef = g.startRef;
+            defines = g.defines;
+        }
+
+        public ParsedPattern endGrammar(Location loc, Annotations anno) throws BuildException {
+            for (Enumeration e = defines.keys();
+                    e.hasMoreElements();) {
+                String name = (String) e.nextElement();
+                RefPattern rp = (RefPattern) defines.get(name);
+                if (rp.getPattern() == null) {
+                    sb.error("reference_to_undefined", name, rp.getRefLocator());
+                    rp.setPattern(sb.pb.makeError());
+                }
+            }
+            Pattern start = startRef.getPattern();
+            if (start == null) {
+                sb.error("missing_start_element", (Locator) loc);
+                start = sb.pb.makeError();
+            }
+            return start;
+        }
+
+        public void endDiv(Location loc, Annotations anno) throws BuildException {
+            // nothing to do
+        }
+
+        public ParsedPattern endIncludedGrammar(Location loc, Annotations anno) throws BuildException {
+            return null;
+        }
+
+        public void define(String name, GrammarSection.Combine combine, ParsedPattern pattern, Location loc, Annotations anno)
+                throws BuildException {
+            define(lookup(name), combine, pattern, loc);
+        }
+
+        private void define(RefPattern rp, GrammarSection.Combine combine, ParsedPattern pattern, Location loc)
+                throws BuildException {
+            switch (rp.getReplacementStatus()) {
+                case RefPattern.REPLACEMENT_KEEP:
+                    if (combine == null) {
+                        if (rp.isCombineImplicit()) {
+                            if (rp.getName() == null) {
+                                sb.error("duplicate_start", (Locator) loc);
+                            } else {
+                                sb.error("duplicate_define", rp.getName(), (Locator) loc);
+                            }
+                        } else {
+                            rp.setCombineImplicit();
+                        }
+                    } else {
+                        byte combineType = (combine == COMBINE_CHOICE ? RefPattern.COMBINE_CHOICE : RefPattern.COMBINE_INTERLEAVE);
+                        if (rp.getCombineType() != RefPattern.COMBINE_NONE
+                                && rp.getCombineType() != combineType) {
+                            if (rp.getName() == null) {
+                                sb.error("conflict_combine_start", (Locator) loc);
+                            } else {
+                                sb.error("conflict_combine_define", rp.getName(), (Locator) loc);
+                            }
+                        }
+                        rp.setCombineType(combineType);
+                    }
+                    Pattern p = (Pattern) pattern;
+                    if (rp.getPattern() == null) {
+                        rp.setPattern(p);
+                    } else if (rp.getCombineType() == RefPattern.COMBINE_INTERLEAVE) {
+                        rp.setPattern(sb.pb.makeInterleave(rp.getPattern(), p));
+                    } else {
+                        rp.setPattern(sb.pb.makeChoice(rp.getPattern(), p));
+                    }
+                    break;
+                case RefPattern.REPLACEMENT_REQUIRE:
+                    rp.setReplacementStatus(RefPattern.REPLACEMENT_IGNORE);
+                    break;
+                case RefPattern.REPLACEMENT_IGNORE:
+                    break;
+            }
+        }
+
+        public void topLevelAnnotation(ParsedElementAnnotation ea) throws BuildException {
+        }
+
+        public void topLevelComment(CommentList comments) throws BuildException {
+        }
+
+        private RefPattern lookup(String name) {
+            if (name == START) {
+                return startRef;
+            }
+            return lookup1(name);
+        }
+
+        private RefPattern lookup1(String name) {
+            RefPattern p = (RefPattern) defines.get(name);
+            if (p == null) {
+                p = new RefPattern(name);
+                defines.put(name, p);
+            }
+            return p;
+        }
+
+        public ParsedPattern makeRef(String name, Location loc, Annotations anno) throws BuildException {
+            RefPattern p = lookup1(name);
+            if (p.getRefLocator() == null && loc != null) {
+                p.setRefLocator((Locator) loc);
+            }
+            return p;
+        }
+
+        public ParsedPattern makeParentRef(String name, Location loc, Annotations anno) throws BuildException {
+            // TODO: do this check by the caller
+            if (parent == null) {
+                sb.error("parent_ref_outside_grammar", (Locator) loc);
+                return sb.makeErrorPattern();
+            }
+            return parent.makeRef(name, loc, anno);
+        }
+
+        public Div makeDiv() {
+            return this;
+        }
+
+        public Include makeInclude() {
+            return new IncludeImpl(sb, this);
+        }
+    }
+
+    static class Override {
+
+        Override(RefPattern prp, Override next) {
+            this.prp = prp;
+            this.next = next;
+        }
+        RefPattern prp;
+        Override next;
+        byte replacementStatus;
+    }
+
+    private static class IncludeImpl implements Include, Div {
+
+        private SchemaBuilderImpl sb;
+        private Override overrides;
+        private GrammarImpl grammar;
+
+        private IncludeImpl(SchemaBuilderImpl sb, GrammarImpl grammar) {
+            this.sb = sb;
+            this.grammar = grammar;
+        }
+
+        public void define(String name, GrammarSection.Combine combine, ParsedPattern pattern, Location loc, Annotations anno)
+                throws BuildException {
+            RefPattern rp = grammar.lookup(name);
+            overrides = new Override(rp, overrides);
+            grammar.define(rp, combine, pattern, loc);
+        }
+
+        public void endDiv(Location loc, Annotations anno) throws BuildException {
+            // nothing to do
+        }
+
+        public void topLevelAnnotation(ParsedElementAnnotation ea) throws BuildException {
+            // nothing to do
+        }
+
+        public void topLevelComment(CommentList comments) throws BuildException {
+        }
+
+        public Div makeDiv() {
+            return this;
+        }
+
+        public void endInclude(Parseable current, String uri, String ns,
+                Location loc, Annotations anno) throws BuildException {
+            for (OpenIncludes inc = sb.openIncludes;
+                    inc != null;
+                    inc = inc.parent) {
+                if (inc.uri.equals(uri)) {
+                    sb.error("recursive_include", uri, (Locator) loc);
+                    return;
+                }
+            }
+
+            for (Override o = overrides; o != null; o = o.next) {
+                o.replacementStatus = o.prp.getReplacementStatus();
+                o.prp.setReplacementStatus(RefPattern.REPLACEMENT_REQUIRE);
+            }
+            try {
+                SchemaBuilderImpl isb = new SchemaBuilderImpl(ns, uri, sb);
+                current.parseInclude(uri, isb, new GrammarImpl(isb, grammar), ns);
+                for (Override o = overrides; o != null; o = o.next) {
+                    if (o.prp.getReplacementStatus() == RefPattern.REPLACEMENT_REQUIRE) {
+                        if (o.prp.getName() == null) {
+                            sb.error("missing_start_replacement", (Locator) loc);
+                        } else {
+                            sb.error("missing_define_replacement", o.prp.getName(), (Locator) loc);
+                        }
+                    }
+                }
+            } catch (IllegalSchemaException e) {
+                sb.noteError();
+            } finally {
+                for (Override o = overrides; o != null; o = o.next) {
+                    o.prp.setReplacementStatus(o.replacementStatus);
+                }
+            }
+        }
+
+        public Include makeInclude() {
+            return null;
+        }
+    }
+
+    public Grammar makeGrammar(Scope parent) {
+        return new GrammarImpl(this, parent);
+    }
+
+    public ParsedPattern annotate(ParsedPattern p, Annotations anno) throws BuildException {
+        return p;
+    }
+
+    public ParsedPattern annotateAfter(ParsedPattern p, ParsedElementAnnotation e) throws BuildException {
+        return p;
+    }
+
+    public ParsedPattern commentAfter(ParsedPattern p, CommentList comments) throws BuildException {
+        return p;
+    }
+
+    public ParsedPattern makeExternalRef(Parseable current, String uri, String ns, Scope scope,
+            Location loc, Annotations anno)
             throws BuildException {
-      try {
-        return pb.makeDataExcept(dtb.createDatatype(), (Pattern)except, (Locator)loc);
-      }
-      catch (DatatypeException e) {
-        String detail = e.getMessage();
-        if (detail != null)
-          error("invalid_params_detail", detail, (Locator)loc);
-        else
-          error("invalid_params", (Locator)loc);
-        return pb.makeError();
-      }
-    }
-
-    public void annotation(ParsedElementAnnotation ea) {
-    }
-  }
-
-  public DataPatternBuilder makeDataPatternBuilder(String datatypeLibrary, String type, Location loc)
-          throws BuildException {
-    DatatypeLibrary dl = datatypeLibraryFactory.createDatatypeLibrary(datatypeLibrary);
-    if (dl == null)
-      error("unrecognized_datatype_library", datatypeLibrary, (Locator)loc);
-    else {
-      try {
-        return new DataPatternBuilderImpl(dl.createDatatypeBuilder(type));
-      }
-      catch (DatatypeException e) {
-        String detail = e.getMessage();
-        if (detail != null)
-          error("unsupported_datatype_detail", datatypeLibrary, type, detail, (Locator)loc);
-        else
-          error("unrecognized_datatype", datatypeLibrary, type, (Locator)loc);
-      }
-    }
-    return new DummyDataPatternBuilder();
-  }
-
-  public ParsedPattern makeValue(String datatypeLibrary, String type, String value, Context context, String ns,
-                                 Location loc, Annotations anno) throws BuildException {
-    DatatypeLibrary dl = datatypeLibraryFactory.createDatatypeLibrary(datatypeLibrary);
-    if (dl == null)
-      error("unrecognized_datatype_library", datatypeLibrary, (Locator)loc);
-    else {
-      try {
-        DatatypeBuilder dtb = dl.createDatatypeBuilder(type);
+        for (OpenIncludes inc = openIncludes;
+                inc != null;
+                inc = inc.parent) {
+            if (inc.uri.equals(uri)) {
+                error("recursive_include", uri, (Locator) loc);
+                return pb.makeError();
+            }
+        }
         try {
-          Datatype dt = dtb.createDatatype();
-          Object obj = dt.createValue(value, new ValidationContextImpl(context, ns));
-          if (obj != null)
-            return pb.makeValue(dt, obj);
-          error("invalid_value", value, (Locator)loc);
+            return current.parseExternal(uri, new SchemaBuilderImpl(ns, uri, this), scope, ns);
+        } catch (IllegalSchemaException e) {
+            noteError();
+            return pb.makeError();
         }
-        catch (DatatypeException e) {
-          String detail = e.getMessage();
-          if (detail != null)
-            error("datatype_requires_param_detail", detail, (Locator)loc);
-          else
-            error("datatype_requires_param", (Locator)loc);
-        }
-      }
-      catch (DatatypeException e) {
-        error("unrecognized_datatype", datatypeLibrary, type, (Locator)loc);
-      }
-    }
-    return pb.makeError();
-  }
-
-  static class GrammarImpl implements Grammar, Div, IncludedGrammar {
-    private final SchemaBuilderImpl sb;
-    private final Hashtable defines;
-    private final RefPattern startRef;
-    private final Scope parent;
-
-    private GrammarImpl(SchemaBuilderImpl sb, Scope parent) {
-      this.sb = sb;
-      this.parent = parent;
-      this.defines = new Hashtable();
-      this.startRef = new RefPattern(null);
     }
 
-    protected GrammarImpl(SchemaBuilderImpl sb, GrammarImpl g) {
-      this.sb = sb;
-      parent = g.parent;
-      startRef = g.startRef;
-      defines = g.defines;
+    public Location makeLocation(String systemId, int lineNumber, int columnNumber) {
+        return new LocatorImpl(systemId, lineNumber, columnNumber);
     }
 
-    public ParsedPattern endGrammar(Location loc, Annotations anno) throws BuildException {
-      for (Enumeration e = defines.keys();
-           e.hasMoreElements();) {
-        String name = (String)e.nextElement();
-        RefPattern rp = (RefPattern)defines.get(name);
-        if (rp.getPattern() == null) {
-          sb.error("reference_to_undefined", name, rp.getRefLocator());
-          rp.setPattern(sb.pb.makeError());
-        }
-      }
-      Pattern start = startRef.getPattern();
-      if (start == null) {
-        sb.error("missing_start_element", (Locator)loc);
-        start = sb.pb.makeError();
-      }
-      return start;
+    public Annotations makeAnnotations(CommentList comments, Context context) {
+        return this;
     }
 
-    public void endDiv(Location loc, Annotations anno) throws BuildException {
-      // nothing to do
+    public ElementAnnotationBuilder makeElementAnnotationBuilder(String ns, String localName, String prefix,
+            Location loc, CommentList comments, Context context) {
+        return this;
     }
 
-    public ParsedPattern endIncludedGrammar(Location loc, Annotations anno) throws BuildException {
+    public CommentList makeCommentList() {
+        return this;
+    }
+
+    public void addComment(String value, Location loc) throws BuildException {
+    }
+
+    public void addAttribute(String ns, String localName, String prefix, String value, Location loc) {
+        // nothing needed
+    }
+
+    public void addElement(ParsedElementAnnotation ea) {
+        // nothing needed
+    }
+
+    public void addComment(CommentList comments) throws BuildException {
+        // nothing needed
+    }
+
+    public void addLeadingComment(CommentList comments) throws BuildException {
+        // nothing needed
+    }
+
+    public ParsedElementAnnotation makeElementAnnotation() {
         return null;
     }
 
-    public void define(String name, GrammarSection.Combine combine, ParsedPattern pattern, Location loc, Annotations anno)
-            throws BuildException {
-      define(lookup(name), combine, pattern, loc);
+    public void addText(String value, Location loc, CommentList comments) throws BuildException {
     }
 
-    private void define(RefPattern rp, GrammarSection.Combine combine, ParsedPattern pattern, Location loc)
-            throws BuildException {
-      switch (rp.getReplacementStatus()) {
-      case RefPattern.REPLACEMENT_KEEP:
-        if (combine == null) {
-          if (rp.isCombineImplicit()) {
-            if (rp.getName() == null)
-              sb.error("duplicate_start", (Locator)loc);
-            else
-              sb.error("duplicate_define", rp.getName(), (Locator)loc);
-          }
-          else
-            rp.setCombineImplicit();
+    public boolean usesComments() {
+        return false;
+    }
+
+    private void error(SAXParseException message) throws BuildException {
+        noteError();
+        try {
+            if (eh != null) {
+                eh.error(message);
+            }
+        } catch (SAXException e) {
+            throw new BuildException(e);
         }
-        else {
-          byte combineType = (combine == COMBINE_CHOICE ? RefPattern.COMBINE_CHOICE : RefPattern.COMBINE_INTERLEAVE);
-          if (rp.getCombineType() != RefPattern.COMBINE_NONE
-              && rp.getCombineType() != combineType) {
-            if (rp.getName() == null)
-              sb.error("conflict_combine_start", (Locator)loc);
-            else
-              sb.error("conflict_combine_define", rp.getName(), (Locator)loc);
-          }
-          rp.setCombineType(combineType);
+    }
+
+    private void error(String key, Locator loc) throws BuildException {
+        error(new SAXParseException(localizer.message(key), loc));
+    }
+
+    private void error(String key, String arg, Locator loc) throws BuildException {
+        error(new SAXParseException(localizer.message(key, arg), loc));
+    }
+
+    private void error(String key, String arg1, String arg2, Locator loc) throws BuildException {
+        error(new SAXParseException(localizer.message(key, arg1, arg2), loc));
+    }
+
+    private void error(String key, String arg1, String arg2, String arg3, Locator loc) throws BuildException {
+        error(new SAXParseException(localizer.message(key, new Object[]{arg1, arg2, arg3}), loc));
+    }
+
+    private void noteError() {
+        if (!hadError && parent != null) {
+            parent.noteError();
         }
-        Pattern p = (Pattern)pattern;
-        if (rp.getPattern() == null)
-          rp.setPattern(p);
-        else if (rp.getCombineType() == RefPattern.COMBINE_INTERLEAVE)
-          rp.setPattern(sb.pb.makeInterleave(rp.getPattern(), p));
-        else
-          rp.setPattern(sb.pb.makeChoice(rp.getPattern(), p));
-        break;
-      case RefPattern.REPLACEMENT_REQUIRE:
-        rp.setReplacementStatus(RefPattern.REPLACEMENT_IGNORE);
-        break;
-      case RefPattern.REPLACEMENT_IGNORE:
-        break;
-      }
+        hadError = true;
     }
-
-    public void topLevelAnnotation(ParsedElementAnnotation ea) throws BuildException {
-    }
-
-    public void topLevelComment(CommentList comments) throws BuildException {
-    }
-
-    private RefPattern lookup(String name) {
-      if (name == START)
-        return startRef;
-      return lookup1(name);
-    }
-
-    private RefPattern lookup1(String name) {
-      RefPattern p = (RefPattern)defines.get(name);
-      if (p == null) {
-        p = new RefPattern(name);
-        defines.put(name, p);
-      }
-      return p;
-    }
-
-    public ParsedPattern makeRef(String name, Location loc, Annotations anno) throws BuildException {
-      RefPattern p = lookup1(name);
-      if (p.getRefLocator() == null && loc != null)
-        p.setRefLocator((Locator)loc);
-      return p;
-    }
-
-    public ParsedPattern makeParentRef(String name, Location loc, Annotations anno) throws BuildException {
-        // TODO: do this check by the caller
-      if (parent == null) {
-        sb.error("parent_ref_outside_grammar", (Locator)loc);
-        return sb.makeErrorPattern();
-      }
-      return parent.makeRef(name, loc, anno);
-    }
-
-    public Div makeDiv() {
-      return this;
-    }
-
-    public Include makeInclude() {
-      return new IncludeImpl(sb, this);
-    }
-
-  }
-
-
-  static class Override {
-    Override(RefPattern prp, Override next) {
-      this.prp = prp;
-      this.next = next;
-    }
-
-    RefPattern prp;
-    Override next;
-    byte replacementStatus;
-  }
-
-
-  private static class IncludeImpl implements Include, Div {
-    private SchemaBuilderImpl sb;
-    private Override overrides;
-    private GrammarImpl grammar;
-
-    private IncludeImpl(SchemaBuilderImpl sb, GrammarImpl grammar) {
-      this.sb = sb;
-      this.grammar = grammar;
-    }
-
-    public void define(String name, GrammarSection.Combine combine, ParsedPattern pattern, Location loc, Annotations anno)
-            throws BuildException {
-      RefPattern rp = grammar.lookup(name);
-      overrides = new Override(rp, overrides);
-      grammar.define(rp, combine, pattern, loc);
-    }
-
-    public void endDiv(Location loc, Annotations anno) throws BuildException {
-      // nothing to do
-    }
-
-    public void topLevelAnnotation(ParsedElementAnnotation ea) throws BuildException {
-      // nothing to do
-    }
-
-    public void topLevelComment(CommentList comments) throws BuildException {
-    }
-
-    public Div makeDiv() {
-      return this;
-    }
-
-    public void endInclude(Parseable current,String uri, String ns,
-                           Location loc, Annotations anno) throws BuildException {
-      for (OpenIncludes inc = sb.openIncludes;
-           inc != null;
-           inc = inc.parent) {
-        if (inc.uri.equals(uri)) {
-          sb.error("recursive_include", uri, (Locator)loc);
-          return;
-        }
-      }
-
-      for (Override o = overrides; o != null; o = o.next) {
-        o.replacementStatus = o.prp.getReplacementStatus();
-        o.prp.setReplacementStatus(RefPattern.REPLACEMENT_REQUIRE);
-      }
-      try {
-        SchemaBuilderImpl isb = new SchemaBuilderImpl(ns, uri, sb);
-        current.parseInclude(uri, isb, new GrammarImpl(isb, grammar), ns);
-        for (Override o = overrides; o != null; o = o.next) {
-          if (o.prp.getReplacementStatus() == RefPattern.REPLACEMENT_REQUIRE) {
-            if (o.prp.getName() == null)
-              sb.error("missing_start_replacement", (Locator)loc);
-            else
-              sb.error("missing_define_replacement", o.prp.getName(), (Locator)loc);
-          }
-        }
-      }
-      catch (IllegalSchemaException e) {
-        sb.noteError();
-      }
-      finally {
-        for (Override o = overrides; o != null; o = o.next)
-          o.prp.setReplacementStatus(o.replacementStatus);
-      }
-    }
-
-    public Include makeInclude() {
-      return null;
-    }
-  }
-
-  public Grammar makeGrammar(Scope parent) {
-    return new GrammarImpl(this, parent);
-  }
-
-  public ParsedPattern annotate(ParsedPattern p, Annotations anno) throws BuildException {
-    return p;
-  }
-
-
-  public ParsedPattern annotateAfter(ParsedPattern p, ParsedElementAnnotation e) throws BuildException {
-    return p;
-  }
-
-  public ParsedPattern commentAfter(ParsedPattern p, CommentList comments) throws BuildException {
-    return p;
-  }
-
-
-  public ParsedPattern makeExternalRef(Parseable current, String uri, String ns, Scope scope,
-                                       Location loc, Annotations anno)
-          throws BuildException {
-    for (OpenIncludes inc = openIncludes;
-         inc != null;
-         inc = inc.parent) {
-      if (inc.uri.equals(uri)) {
-        error("recursive_include", uri, (Locator)loc);
-        return pb.makeError();
-      }
-    }
-    try {
-      return current.parseExternal(uri, new SchemaBuilderImpl(ns, uri, this), scope, ns );
-    }
-    catch (IllegalSchemaException e) {
-      noteError();
-      return pb.makeError();
-    }
-  }
-
-
-
-  public Location makeLocation(String systemId, int lineNumber, int columnNumber) {
-    return new LocatorImpl(systemId, lineNumber, columnNumber);
-  }
-
-  public Annotations makeAnnotations(CommentList comments, Context context) {
-    return this;
-  }
-
-  public ElementAnnotationBuilder makeElementAnnotationBuilder(String ns, String localName, String prefix,
-                                                               Location loc, CommentList comments, Context context) {
-    return this;
-  }
-
-  public CommentList makeCommentList() {
-    return this;
-  }
-
-  public void addComment(String value, Location loc) throws BuildException {
-  }
-
-  public void addAttribute(String ns, String localName, String prefix, String value, Location loc) {
-    // nothing needed
-  }
-
-  public void addElement(ParsedElementAnnotation ea) {
-    // nothing needed
-  }
-
-  public void addComment(CommentList comments) throws BuildException {
-    // nothing needed
-  }
-
-  public void addLeadingComment(CommentList comments) throws BuildException {
-    // nothing needed
-  }
-
-  public ParsedElementAnnotation makeElementAnnotation() {
-    return null;
-  }
-
-  public void addText(String value, Location loc, CommentList comments) throws BuildException {
-  }
-
-  public boolean usesComments() {
-    return false;
-  }
-
-  private void error(SAXParseException message) throws BuildException {
-    noteError();
-    try {
-      if (eh != null)
-        eh.error(message);
-    }
-    catch (SAXException e) {
-      throw new BuildException(e);
-    }
-  }
-
-  private void warning(SAXParseException message) throws BuildException {
-    try {
-      if (eh != null)
-        eh.warning(message);
-    }
-    catch (SAXException e) {
-      throw new BuildException(e);
-    }
-  }
-
-  private void error(String key, Locator loc) throws BuildException {
-    error(new SAXParseException(localizer.message(key), loc));
-  }
-
-  private void error(String key, String arg, Locator loc) throws BuildException {
-    error(new SAXParseException(localizer.message(key, arg), loc));
-  }
-
-  private void error(String key, String arg1, String arg2, Locator loc) throws BuildException {
-    error(new SAXParseException(localizer.message(key, arg1, arg2), loc));
-  }
-
-  private void error(String key, String arg1, String arg2, String arg3, Locator loc) throws BuildException {
-    error(new SAXParseException(localizer.message(key, new Object[]{arg1, arg2, arg3}), loc));
-  }
-  private void noteError() {
-    if (!hadError && parent != null)
-      parent.noteError();
-    hadError = true;
-  }
-
 }
diff --git a/jaxws/src/share/jaxws_classes/com/sun/xml/internal/rngom/digested/DDataPattern.java b/jaxws/src/share/jaxws_classes/com/sun/xml/internal/rngom/digested/DDataPattern.java
index eb92bb8..fa81b97 100644
--- a/jaxws/src/share/jaxws_classes/com/sun/xml/internal/rngom/digested/DDataPattern.java
+++ b/jaxws/src/share/jaxws_classes/com/sun/xml/internal/rngom/digested/DDataPattern.java
@@ -23,7 +23,7 @@
  * questions.
  */
 /*
- * Copyright (C) 2004-2011
+ * Copyright (C) 2004-2012
  *
  * Permission is hereby granted, free of charge, to any person obtaining a copy
  * of this software and associated documentation files (the "Software"), to deal
diff --git a/jaxws/src/share/jaxws_classes/com/sun/xml/internal/rngom/digested/DPattern.java b/jaxws/src/share/jaxws_classes/com/sun/xml/internal/rngom/digested/DPattern.java
index 2637ce4..e38beba 100644
--- a/jaxws/src/share/jaxws_classes/com/sun/xml/internal/rngom/digested/DPattern.java
+++ b/jaxws/src/share/jaxws_classes/com/sun/xml/internal/rngom/digested/DPattern.java
@@ -23,7 +23,7 @@
  * questions.
  */
 /*
- * Copyright (C) 2004-2011
+ * Copyright (C) 2004-2012
  *
  * Permission is hereby granted, free of charge, to any person obtaining a copy
  * of this software and associated documentation files (the "Software"), to deal
@@ -55,9 +55,9 @@
  * @author Kohsuke Kawaguchi (kk@kohsuke.org)
  */
 public abstract class DPattern implements ParsedPattern {
+
     Locator location;
     DAnnotation annotation;
-
     /**
      * Used to chain the child patterns in a doubly-linked list.
      */
@@ -74,12 +74,12 @@
     /**
      * Returns the annotation associated with it.
      *
-     * @return
-     *      may be empty, but never be null.
+     * @return may be empty, but never be null.
      */
     public DAnnotation getAnnotation() {
-        if(annotation==null)
+        if (annotation == null) {
             return DAnnotation.EMPTY;
+        }
         return annotation;
     }
 
@@ -90,7 +90,7 @@
      */
     public abstract boolean isNullable();
 
-    public abstract <V> V accept( DPatternVisitor<V> visitor );
+    public abstract <V> V accept(DPatternVisitor<V> visitor);
 
     /**
      * Creates a {@link Parseable} object that reparses this pattern.
diff --git a/jaxws/src/share/jaxws_classes/com/sun/xml/internal/rngom/digested/DXMLPrinter.java b/jaxws/src/share/jaxws_classes/com/sun/xml/internal/rngom/digested/DXMLPrinter.java
index fd44d6b..c224f6c 100644
--- a/jaxws/src/share/jaxws_classes/com/sun/xml/internal/rngom/digested/DXMLPrinter.java
+++ b/jaxws/src/share/jaxws_classes/com/sun/xml/internal/rngom/digested/DXMLPrinter.java
@@ -110,7 +110,11 @@
             visitor.on(grammar);
             visitor.endDocument();
         } catch (XMLWriterException e) {
-            throw (XMLStreamException) e.getCause();
+            if (e.getCause() instanceof XMLStreamException) {
+                throw (XMLStreamException) e.getCause();
+            } else {
+                throw new XMLStreamException(e);
+            }
         }
     }
 
@@ -123,7 +127,11 @@
         try {
             pattern.accept(visitor);
         } catch (XMLWriterException e) {
-            throw (XMLStreamException) e.getCause();
+            if (e.getCause() instanceof XMLStreamException) {
+                throw (XMLStreamException) e.getCause();
+            } else {
+                throw new XMLStreamException(e);
+            }
         }
     }
 
@@ -136,7 +144,11 @@
         try {
             nc.accept(ncVisitor);
         } catch (XMLWriterException e) {
-            throw (XMLStreamException) e.getCause();
+            if (e.getCause() instanceof XMLStreamException) {
+                throw (XMLStreamException) e.getCause();
+            } else {
+                throw new XMLStreamException(e);
+            }
         }
     }
 
diff --git a/jaxws/src/share/jaxws_classes/com/sun/xml/internal/rngom/digested/DataPatternBuilderImpl.java b/jaxws/src/share/jaxws_classes/com/sun/xml/internal/rngom/digested/DataPatternBuilderImpl.java
index cd81a9e..7d3fbfd 100644
--- a/jaxws/src/share/jaxws_classes/com/sun/xml/internal/rngom/digested/DataPatternBuilderImpl.java
+++ b/jaxws/src/share/jaxws_classes/com/sun/xml/internal/rngom/digested/DataPatternBuilderImpl.java
@@ -23,7 +23,7 @@
  * questions.
  */
 /*
- * Copyright (C) 2004-2011
+ * Copyright (C) 2004-2012
  *
  * Permission is hereby granted, free of charge, to any person obtaining a copy
  * of this software and associated documentation files (the "Software"), to deal
@@ -82,8 +82,9 @@
 
     public ParsedPattern makePattern(ParsedPattern except, Location loc, Annotations anno) throws BuildException {
         p.except = (DPattern)except;
-        if(anno!=null)
+        if (anno!=null) {
             p.annotation = ((Annotation)anno).getResult();
+        }
         return p;
     }
 }
diff --git a/jaxws/src/share/jaxws_classes/com/sun/xml/internal/rngom/digested/GrammarBuilderImpl.java b/jaxws/src/share/jaxws_classes/com/sun/xml/internal/rngom/digested/GrammarBuilderImpl.java
index b9cd820..87e93a5 100644
--- a/jaxws/src/share/jaxws_classes/com/sun/xml/internal/rngom/digested/GrammarBuilderImpl.java
+++ b/jaxws/src/share/jaxws_classes/com/sun/xml/internal/rngom/digested/GrammarBuilderImpl.java
@@ -23,7 +23,7 @@
  * questions.
  */
 /*
- * Copyright (C) 2004-2011
+ * Copyright (C) 2004-2012
  *
  * Permission is hereby granted, free of charge, to any person obtaining a copy
  * of this software and associated documentation files (the "Software"), to deal
@@ -45,6 +45,9 @@
  */
 package com.sun.xml.internal.rngom.digested;
 
+import java.util.ArrayList;
+import java.util.List;
+
 import com.sun.xml.internal.rngom.ast.builder.Annotations;
 import com.sun.xml.internal.rngom.ast.builder.BuildException;
 import com.sun.xml.internal.rngom.ast.builder.CommentList;
@@ -58,9 +61,6 @@
 import com.sun.xml.internal.rngom.ast.util.LocatorImpl;
 import org.w3c.dom.Element;
 
-import java.util.ArrayList;
-import java.util.List;
-
 /**
  * @author Kohsuke Kawaguchi (kk@kohsuke.org)
  */
@@ -85,12 +85,11 @@
     }
 
     public ParsedPattern endGrammar(Location loc, Annotations anno) throws BuildException {
-        if(anno!=null)
-            grammar.annotation = ((Annotation)anno).getResult();
-        if(additionalElementAnnotations!=null) {
-            if(grammar.annotation==null)
-                grammar.annotation = new DAnnotation();
-            grammar.annotation.contents.addAll(additionalElementAnnotations);
+        // Harshit : Fixed possible NPE and issue in handling of annotations
+        if (anno != null) {
+            if (grammar.annotation != null) {
+                grammar.annotation.contents.addAll(((Annotation) anno).getResult().contents);
+            }
         }
         return grammar;
     }
@@ -99,21 +98,28 @@
     }
 
     public void define(String name, Combine combine, ParsedPattern pattern, Location loc, Annotations anno) throws BuildException {
-        if(name==START)
+        if(name==START) {
             grammar.start = (DPattern)pattern;
-        else {
+        } else {
             // TODO: handle combine
             DDefine d = grammar.getOrAdd(name);
             d.setPattern( (DPattern) pattern );
-            if(anno!=null)
+            if (anno!=null) {
                 d.annotation = ((Annotation)anno).getResult();
+            }
         }
     }
 
     public void topLevelAnnotation(ParsedElementAnnotation ea) throws BuildException {
-        if(additionalElementAnnotations==null)
+        // Harshit : Fixed issue in handling of annotations
+        if (additionalElementAnnotations==null) {
             additionalElementAnnotations = new ArrayList<Element>();
+        }
         additionalElementAnnotations.add(((ElementWrapper)ea).element);
+        if (grammar.annotation==null) {
+            grammar.annotation = new DAnnotation();
+        }
+        grammar.annotation.contents.addAll(additionalElementAnnotations);
     }
 
     public void topLevelComment(CommentList comments) throws BuildException {
diff --git a/jaxws/src/share/jaxws_classes/com/sun/xml/internal/rngom/nc/AnyNameClass.java b/jaxws/src/share/jaxws_classes/com/sun/xml/internal/rngom/nc/AnyNameClass.java
index 92aa407..a4c7b6a 100644
--- a/jaxws/src/share/jaxws_classes/com/sun/xml/internal/rngom/nc/AnyNameClass.java
+++ b/jaxws/src/share/jaxws_classes/com/sun/xml/internal/rngom/nc/AnyNameClass.java
@@ -77,7 +77,4 @@
         return true;
     }
 
-    private static Object readReplace() {
-        return NameClass.ANY;
-    }
 }
diff --git a/jaxws/src/share/jaxws_classes/com/sun/xml/internal/rngom/nc/NameClassBuilderImpl.java b/jaxws/src/share/jaxws_classes/com/sun/xml/internal/rngom/nc/NameClassBuilderImpl.java
index 00f16b0..f3cd769 100644
--- a/jaxws/src/share/jaxws_classes/com/sun/xml/internal/rngom/nc/NameClassBuilderImpl.java
+++ b/jaxws/src/share/jaxws_classes/com/sun/xml/internal/rngom/nc/NameClassBuilderImpl.java
@@ -23,7 +23,7 @@
  * questions.
  */
 /*
- * Copyright (C) 2004-2011
+ * Copyright (C) 2004-2012
  *
  * Permission is hereby granted, free of charge, to any person obtaining a copy
  * of this software and associated documentation files (the "Software"), to deal
@@ -65,17 +65,25 @@
     A extends Annotations<E,L,CL>,
     CL extends CommentList<L>> implements NameClassBuilder<NameClass,E,L,A,CL> {
 
+    @Override
     public NameClass makeChoice(List<NameClass> nameClasses, L loc, A anno) {
-      NameClass result = nameClasses.get(0);
-      for (int i = 1; i < nameClasses.size(); i++)
-        result = new ChoiceNameClass(result, nameClasses.get(i));
-      return result;
+        NameClass result = nameClasses.get(0);
+        for (int i = 1; i < nameClasses.size(); i++) {
+            result = new ChoiceNameClass(result, nameClasses.get(i));
+        }
+        return result;
     }
 
+    @Override
     public NameClass makeName(String ns, String localName, String prefix, L loc, A anno) {
-      return new SimpleNameClass(ns, localName);
+        if (prefix == null) {
+            return new SimpleNameClass(ns, localName);
+        } else {
+            return new SimpleNameClass(ns, localName, prefix);
+        }
     }
 
+    @Override
     public NameClass makeNsName(String ns, L loc, A anno) {
       return new NsNameClass(ns);
     }
diff --git a/jaxws/src/share/jaxws_classes/com/sun/xml/internal/rngom/nc/SimpleNameClass.java b/jaxws/src/share/jaxws_classes/com/sun/xml/internal/rngom/nc/SimpleNameClass.java
index 4562249..62b3783 100644
--- a/jaxws/src/share/jaxws_classes/com/sun/xml/internal/rngom/nc/SimpleNameClass.java
+++ b/jaxws/src/share/jaxws_classes/com/sun/xml/internal/rngom/nc/SimpleNameClass.java
@@ -23,7 +23,7 @@
  * questions.
  */
 /*
- * Copyright (C) 2004-2011
+ * Copyright (C) 2004-2012
  *
  * Permission is hereby granted, free of charge, to any person obtaining a copy
  * of this software and associated documentation files (the "Software"), to deal
@@ -55,14 +55,20 @@
         this.name = name;
     }
 
-    public SimpleNameClass( String nsUri, String localPart ) {
-        this( new QName(nsUri,localPart) );
+    public SimpleNameClass(String nsUri, String localPart) {
+        this(new QName(nsUri, localPart));
     }
 
+    public SimpleNameClass(String nsUri, String localPart, String prefix) {
+        this(new QName(nsUri, localPart, prefix));
+    }
+
+    @Override
     public boolean contains(QName name) {
         return this.name.equals(name);
     }
 
+    @Override
     public int containsSpecificity(QName name) {
         return contains(name) ? SPECIFICITY_NAME : SPECIFICITY_NONE;
     }
@@ -74,16 +80,19 @@
 
     @Override
     public boolean equals(Object obj) {
-        if (obj == null || !(obj instanceof SimpleNameClass))
+        if (obj == null || !(obj instanceof SimpleNameClass)) {
             return false;
+        }
         SimpleNameClass other = (SimpleNameClass) obj;
         return name.equals(other.name);
     }
 
+    @Override
     public <V> V accept(NameClassVisitor<V> visitor) {
         return visitor.visitName(name);
     }
 
+    @Override
     public boolean isOpen() {
         return false;
     }
diff --git a/jaxws/src/share/jaxws_classes/com/sun/xml/internal/rngom/parse/compact/UCode_UCodeESC_CharStream.java b/jaxws/src/share/jaxws_classes/com/sun/xml/internal/rngom/parse/compact/UCode_UCodeESC_CharStream.java
index fd839f0..475258c 100644
--- a/jaxws/src/share/jaxws_classes/com/sun/xml/internal/rngom/parse/compact/UCode_UCodeESC_CharStream.java
+++ b/jaxws/src/share/jaxws_classes/com/sun/xml/internal/rngom/parse/compact/UCode_UCodeESC_CharStream.java
@@ -23,7 +23,7 @@
  * questions.
  */
 /*
- * Copyright (C) 2004-2011
+ * Copyright (C) 2004-2012
  *
  * Permission is hereby granted, free of charge, to any person obtaining a copy
  * of this software and associated documentation files (the "Software"), to deal
@@ -45,7 +45,7 @@
  */
 /* Generated By:JavaCC: Do not edit this line. UCode_UCodeESC_CharStream.java Version 0.7pre6 */
 /* The previous line keeps JavaCC quiet. In fact, the JavaCC generated file
-   has been edited to fix some bugs. */
+ has been edited to fix some bugs. */
 package com.sun.xml.internal.rngom.parse.compact;
 
 import com.sun.xml.internal.rngom.util.Utf16;
@@ -58,537 +58,537 @@
  * contain 16-bit unicode characters.
  */
 public final class UCode_UCodeESC_CharStream {
-  public static final boolean staticFlag = false;
 
-  static final int hexval(char c) {
-    switch (c) {
-    case '0':
-      return 0;
-    case '1':
-      return 1;
-    case '2':
-      return 2;
-    case '3':
-      return 3;
-    case '4':
-      return 4;
-    case '5':
-      return 5;
-    case '6':
-      return 6;
-    case '7':
-      return 7;
-    case '8':
-      return 8;
-    case '9':
-      return 9;
+    public static final boolean staticFlag = false;
 
-    case 'a':
-    case 'A':
-      return 10;
-    case 'b':
-    case 'B':
-      return 11;
-    case 'c':
-    case 'C':
-      return 12;
-    case 'd':
-    case 'D':
-      return 13;
-    case 'e':
-    case 'E':
-      return 14;
-    case 'f':
-    case 'F':
-      return 15;
+    static final int hexval(char c) {
+        switch (c) {
+            case '0':
+                return 0;
+            case '1':
+                return 1;
+            case '2':
+                return 2;
+            case '3':
+                return 3;
+            case '4':
+                return 4;
+            case '5':
+                return 5;
+            case '6':
+                return 6;
+            case '7':
+                return 7;
+            case '8':
+                return 8;
+            case '9':
+                return 9;
+
+            case 'a':
+            case 'A':
+                return 10;
+            case 'b':
+            case 'B':
+                return 11;
+            case 'c':
+            case 'C':
+                return 12;
+            case 'd':
+            case 'D':
+                return 13;
+            case 'e':
+            case 'E':
+                return 14;
+            case 'f':
+            case 'F':
+                return 15;
+        }
+        return -1;
     }
-    return -1;
-  }
+    public int bufpos = -1;
+    int bufsize;
+    int available;
+    int tokenBegin;
+    private int bufline[];
+    private int bufcolumn[];
+    private int column = 0;
+    private int line = 1;
+    private java.io.Reader inputStream;
+    private boolean closed = false;
+    private boolean prevCharIsLF = false;
+    private char[] nextCharBuf;
+    private char[] buffer;
+    private int maxNextCharInd = 0;
+    private int nextCharInd = -1;
+    private int inBuf = 0;
 
-  public int bufpos = -1;
-  int bufsize;
-  int available;
-  int tokenBegin;
-  private int bufline[];
-  private int bufcolumn[];
+    private final void ExpandBuff(boolean wrapAround) {
+        char[] newbuffer = new char[bufsize + 2048];
+        int newbufline[] = new int[bufsize + 2048];
+        int newbufcolumn[] = new int[bufsize + 2048];
 
-  private int column = 0;
-  private int line = 1;
+        if (wrapAround) {
+            System.arraycopy(buffer, tokenBegin, newbuffer, 0, bufsize - tokenBegin);
+            System.arraycopy(buffer, 0, newbuffer,
+                    bufsize - tokenBegin, bufpos);
+            buffer = newbuffer;
 
-  private java.io.Reader inputStream;
-  private boolean closed = false;
+            System.arraycopy(bufline, tokenBegin, newbufline, 0, bufsize - tokenBegin);
+            System.arraycopy(bufline, 0, newbufline, bufsize - tokenBegin, bufpos);
+            bufline = newbufline;
 
-  private boolean prevCharIsLF = false;
+            System.arraycopy(bufcolumn, tokenBegin, newbufcolumn, 0, bufsize - tokenBegin);
+            System.arraycopy(bufcolumn, 0, newbufcolumn, bufsize - tokenBegin, bufpos);
+            bufcolumn = newbufcolumn;
 
-  private char[] nextCharBuf;
-  private char[] buffer;
-  private int maxNextCharInd = 0;
-  private int nextCharInd = -1;
-  private int inBuf = 0;
+            bufpos += (bufsize - tokenBegin);
+        } else {
+            System.arraycopy(buffer, tokenBegin, newbuffer, 0, bufsize - tokenBegin);
+            buffer = newbuffer;
 
-  private final void ExpandBuff(boolean wrapAround) {
-    char[] newbuffer = new char[bufsize + 2048];
-    int newbufline[] = new int[bufsize + 2048];
-    int newbufcolumn[] = new int[bufsize + 2048];
+            System.arraycopy(bufline, tokenBegin, newbufline, 0, bufsize - tokenBegin);
+            bufline = newbufline;
 
-    if (wrapAround) {
-      System.arraycopy(buffer, tokenBegin, newbuffer, 0, bufsize - tokenBegin);
-      System.arraycopy(buffer, 0, newbuffer,
-                       bufsize - tokenBegin, bufpos);
-      buffer = newbuffer;
+            System.arraycopy(bufcolumn, tokenBegin, newbufcolumn, 0, bufsize - tokenBegin);
+            bufcolumn = newbufcolumn;
 
-      System.arraycopy(bufline, tokenBegin, newbufline, 0, bufsize - tokenBegin);
-      System.arraycopy(bufline, 0, newbufline, bufsize - tokenBegin, bufpos);
-      bufline = newbufline;
+            bufpos -= tokenBegin;
+        }
 
-      System.arraycopy(bufcolumn, tokenBegin, newbufcolumn, 0, bufsize - tokenBegin);
-      System.arraycopy(bufcolumn, 0, newbufcolumn, bufsize - tokenBegin, bufpos);
-      bufcolumn = newbufcolumn;
-
-      bufpos += (bufsize - tokenBegin);
-    }
-    else {
-      System.arraycopy(buffer, tokenBegin, newbuffer, 0, bufsize - tokenBegin);
-      buffer = newbuffer;
-
-      System.arraycopy(bufline, tokenBegin, newbufline, 0, bufsize - tokenBegin);
-      bufline = newbufline;
-
-      System.arraycopy(bufcolumn, tokenBegin, newbufcolumn, 0, bufsize - tokenBegin);
-      bufcolumn = newbufcolumn;
-
-      bufpos -= tokenBegin;
+        available = (bufsize += 2048);
+        tokenBegin = 0;
     }
 
-    available = (bufsize += 2048);
-    tokenBegin = 0;
-  }
+    private final void FillBuff() throws EOFException {
+        int i;
+        if (maxNextCharInd == 4096) {
+            maxNextCharInd = nextCharInd = 0;
+        }
 
-  private final void FillBuff() throws EOFException {
-    int i;
-    if (maxNextCharInd == 4096)
-      maxNextCharInd = nextCharInd = 0;
-
-    if (closed)
-      throw new EOFException();
-    try {
-      if ((i = inputStream.read(nextCharBuf, maxNextCharInd, 4096 - maxNextCharInd)) == -1) {
-        closed = true;
-        inputStream.close();
-        throw new EOFException();
-      }
-      else
-        maxNextCharInd += i;
-    }
-    catch (IOException e) {
-      throw new BuildException(e);
-    }
-  }
-
-  private final char ReadChar() throws EOFException {
-    if (++nextCharInd >= maxNextCharInd)
-      FillBuff();
-
-    return nextCharBuf[nextCharInd];
-  }
-
-  private final char PeekChar() throws EOFException {
-    char c = ReadChar();
-    --nextCharInd;
-    return c;
-  }
-
-  public final char BeginToken() throws EOFException {
-    if (inBuf > 0) {
-      --inBuf;
-      return buffer[tokenBegin = (bufpos == bufsize - 1) ? (bufpos = 0)
-              : ++bufpos];
-    }
-
-    tokenBegin = 0;
-    bufpos = -1;
-
-    return readChar();
-  }
-
-  private final void AdjustBuffSize() {
-    if (available == bufsize) {
-      if (tokenBegin > 2048) {
-        bufpos = 0;
-        available = tokenBegin;
-      }
-      else
-        ExpandBuff(false);
-    }
-    else if (available > tokenBegin)
-      available = bufsize;
-    else if ((tokenBegin - available) < 2048)
-      ExpandBuff(true);
-    else
-      available = tokenBegin;
-  }
-
-  private final void UpdateLineColumn(char c) {
-    column++;
-
-    if (prevCharIsLF) {
-      prevCharIsLF = false;
-      line += (column = 1);
-    }
-
-    switch (c) {
-    case NEWLINE_MARKER:
-      prevCharIsLF = true;
-      break;
-    case '\t':
-      column--;
-      column += (8 - (column & 07));
-      break;
-    default :
-      break;
-    }
-
-    bufline[bufpos] = line;
-    bufcolumn[bufpos] = column;
-  }
-
-  private final char NEWLINE_MARKER = '\u0000';
-
-  public final char readChar() throws EOFException {
-    if (inBuf > 0) {
-      --inBuf;
-      return buffer[(bufpos == bufsize - 1) ? (bufpos = 0) : ++bufpos];
-    }
-
-    char c;
-    try {
-      c = ReadChar();
-      switch (c) {
-      case '\r':
-        c = NEWLINE_MARKER;
+        if (closed) {
+            throw new EOFException();
+        }
         try {
-          if (PeekChar() == '\n')
-            ReadChar();
-        }
-        catch (EOFException e) {
-        }
-        break;
-      case '\n':
-        c = NEWLINE_MARKER;
-        break;
-      case '\t':
-        break;
-      default:
-        if (c >= 0x20) {
-          if (Utf16.isSurrogate(c)) {
-            if (Utf16.isSurrogate2(c))
-              throw new EscapeSyntaxException("illegal_surrogate_pair", line, column + 1);
-            if (++bufpos == available)
-              AdjustBuffSize();
-            buffer[bufpos] = c;
-            // UpdateLineColumn(c);
-            try {
-              c = ReadChar();
+            if ((i = inputStream.read(nextCharBuf, maxNextCharInd, 4096 - maxNextCharInd)) == -1) {
+                closed = true;
+                inputStream.close();
+                throw new EOFException();
+            } else {
+                maxNextCharInd += i;
             }
-            catch (EOFException e) {
-              throw new EscapeSyntaxException("illegal_surrogate_pair", line, column + 1);
-            }
-            if (!Utf16.isSurrogate2(c))
-              throw new EscapeSyntaxException("illegal_surrogate_pair", line, column + 2);
-          }
-          break;
+        } catch (IOException e) {
+            throw new BuildException(e);
         }
-        // fall through
-      case '\uFFFE':
-      case '\uFFFF':
-        throw new EscapeSyntaxException("illegal_char_code", line, column + 1);
-      }
     }
-    catch (EOFException e) {
-      if (bufpos == -1) {
-        if (++bufpos == available)
-          AdjustBuffSize();
+
+    private final char ReadChar() throws EOFException {
+        if (++nextCharInd >= maxNextCharInd) {
+            FillBuff();
+        }
+
+        return nextCharBuf[nextCharInd];
+    }
+
+    private final char PeekChar() throws EOFException {
+        char c = ReadChar();
+        --nextCharInd;
+        return c;
+    }
+
+    public final char BeginToken() throws EOFException {
+        if (inBuf > 0) {
+            --inBuf;
+            return buffer[tokenBegin = (bufpos == bufsize - 1) ? (bufpos = 0)
+                    : ++bufpos];
+        }
+
+        tokenBegin = 0;
+        bufpos = -1;
+
+        return readChar();
+    }
+
+    private final void AdjustBuffSize() {
+        if (available == bufsize) {
+            if (tokenBegin > 2048) {
+                bufpos = 0;
+                available = tokenBegin;
+            } else {
+                ExpandBuff(false);
+            }
+        } else if (available > tokenBegin) {
+            available = bufsize;
+        } else if ((tokenBegin - available) < 2048) {
+            ExpandBuff(true);
+        } else {
+            available = tokenBegin;
+        }
+    }
+
+    private final void UpdateLineColumn(char c) {
+        column++;
+
+        if (prevCharIsLF) {
+            prevCharIsLF = false;
+            line += (column = 1);
+        }
+
+        switch (c) {
+            case NEWLINE_MARKER:
+                prevCharIsLF = true;
+                break;
+            case '\t':
+                column--;
+                column += (8 - (column & 07));
+                break;
+            default:
+                break;
+        }
+
         bufline[bufpos] = line;
         bufcolumn[bufpos] = column;
-      }
-      throw e;
     }
-    if (++bufpos == available)
-      AdjustBuffSize();
-    buffer[bufpos] = c;
-    UpdateLineColumn(c);
-    try {
-      if (c != '\\' || PeekChar() != 'x')
-        return c;
-    }
-    catch (EOFException e) {
-      return c;
-    }
+    private static final char NEWLINE_MARKER = '\u0000';
 
-    int xCnt = 1;
-    for (;;) {
-      ReadChar();
-      if (++bufpos == available)
-        AdjustBuffSize();
-      buffer[bufpos] = 'x';
-      UpdateLineColumn('x');
-      try {
-        c = PeekChar();
-      }
-      catch (EOFException e) {
-        backup(xCnt);
-        return '\\';
-      }
-      if (c == '{') {
-        ReadChar();
-        column++;
-        // backup past the 'x's
-        bufpos -= xCnt;
-        if (bufpos < 0)
-          bufpos += bufsize;
-        break;
-      }
-      if (c != 'x') {
-        backup(xCnt);
-        return '\\';
-      }
-      xCnt++;
-    }
-    try {
-      int scalarValue = hexval(ReadChar());
-      column++;
-      if (scalarValue < 0)
-        throw new EscapeSyntaxException("illegal_hex_digit", line, column);
-      while ((c = ReadChar()) != '}') {
-        column++;
-        int n = hexval(c);
-        if (n < 0)
-          throw new EscapeSyntaxException("illegal_hex_digit", line, column);
-        scalarValue <<= 4;
-        scalarValue |= n;
-        if (scalarValue >= 0x110000)
-          throw new EscapeSyntaxException("char_code_too_big", line, column);
-      }
-      column++; // for the '}'
-      if (scalarValue <= 0xFFFF) {
-        c = (char)scalarValue;
-        switch (c) {
-        case '\n':
-        case '\r':
-        case '\t':
-          break;
-        default:
-          if (c >= 0x20 && !Utf16.isSurrogate(c))
-            break;
-          // fall through
-        case '\uFFFE':
-        case '\uFFFF':
-          throw new EscapeSyntaxException("illegal_char_code_ref", line, column);
+    public final char readChar() throws EOFException {
+        if (inBuf > 0) {
+            --inBuf;
+            return buffer[(bufpos == bufsize - 1) ? (bufpos = 0) : ++bufpos];
+        }
+
+        char c;
+        try {
+            c = ReadChar();
+            switch (c) {
+                case '\r':
+                    c = NEWLINE_MARKER;
+                    try {
+                        if (PeekChar() == '\n') {
+                            ReadChar();
+                        }
+                    } catch (EOFException e) {
+                    }
+                    break;
+                case '\n':
+                    c = NEWLINE_MARKER;
+                    break;
+                case '\t':
+                    break;
+                default:
+                    if (c >= 0x20) {
+                        if (Utf16.isSurrogate(c)) {
+                            if (Utf16.isSurrogate2(c)) {
+                                throw new EscapeSyntaxException("illegal_surrogate_pair", line, column + 1);
+                            }
+                            if (++bufpos == available) {
+                                AdjustBuffSize();
+                            }
+                            buffer[bufpos] = c;
+                            // UpdateLineColumn(c);
+                            try {
+                                c = ReadChar();
+                            } catch (EOFException e) {
+                                throw new EscapeSyntaxException("illegal_surrogate_pair", line, column + 1);
+                            }
+                            if (!Utf16.isSurrogate2(c)) {
+                                throw new EscapeSyntaxException("illegal_surrogate_pair", line, column + 2);
+                            }
+                        }
+                        break;
+                    }
+                // fall through
+                case '\uFFFE':
+                case '\uFFFF':
+                    throw new EscapeSyntaxException("illegal_char_code", line, column + 1);
+            }
+        } catch (EOFException e) {
+            if (bufpos == -1) {
+                if (++bufpos == available) {
+                    AdjustBuffSize();
+                }
+                bufline[bufpos] = line;
+                bufcolumn[bufpos] = column;
+            }
+            throw e;
+        }
+        if (++bufpos == available) {
+            AdjustBuffSize();
         }
         buffer[bufpos] = c;
-        return c;
-      }
-      c = Utf16.surrogate1(scalarValue);
-      buffer[bufpos] = c;
-      int bufpos1 = bufpos;
-      if (++bufpos == bufsize)
-        bufpos = 0;
-      buffer[bufpos] = Utf16.surrogate2(scalarValue);
-      bufline[bufpos] = bufline[bufpos1];
-      bufcolumn[bufpos] = bufcolumn[bufpos1];
-      backup(1);
-      return c;
-    }
-    catch (EOFException e) {
-      throw new EscapeSyntaxException("incomplete_escape", line, column);
-    }
-  }
+        UpdateLineColumn(c);
+        try {
+            if (c != '\\' || PeekChar() != 'x') {
+                return c;
+            }
+        } catch (EOFException e) {
+            return c;
+        }
 
-  /**
-   * @deprecated
-   * @see #getEndColumn
-   */
-
-  public final int getColumn() {
-    return bufcolumn[bufpos];
-  }
-
-  /**
-   * @deprecated
-   * @see #getEndLine
-   */
-
-  public final int getLine() {
-    return bufline[bufpos];
-  }
-
-  public final int getEndColumn() {
-    return bufcolumn[bufpos];
-  }
-
-  public final int getEndLine() {
-    return bufline[bufpos];
-  }
-
-  public final int getBeginColumn() {
-    return bufcolumn[tokenBegin];
-  }
-
-  public final int getBeginLine() {
-    return bufline[tokenBegin];
-  }
-
-  public final void backup(int amount) {
-
-    inBuf += amount;
-    if ((bufpos -= amount) < 0)
-      bufpos += bufsize;
-  }
-
-  public UCode_UCodeESC_CharStream(java.io.Reader dstream,
-                                   int startline, int startcolumn, int buffersize) {
-    inputStream = dstream;
-    line = startline;
-    column = startcolumn - 1;
-
-    available = bufsize = buffersize;
-    buffer = new char[buffersize];
-    bufline = new int[buffersize];
-    bufcolumn = new int[buffersize];
-    nextCharBuf = new char[4096];
-    skipBOM();
-  }
-
-  public UCode_UCodeESC_CharStream(java.io.Reader dstream,
-                                   int startline, int startcolumn) {
-    this(dstream, startline, startcolumn, 4096);
-  }
-
-  public void ReInit(java.io.Reader dstream,
-                     int startline, int startcolumn, int buffersize) {
-    inputStream = dstream;
-    closed = false;
-    line = startline;
-    column = startcolumn - 1;
-
-    if (buffer == null || buffersize != buffer.length) {
-      available = bufsize = buffersize;
-      buffer = new char[buffersize];
-      bufline = new int[buffersize];
-      bufcolumn = new int[buffersize];
-      nextCharBuf = new char[4096];
-    }
-    prevCharIsLF = false;
-    tokenBegin = inBuf = maxNextCharInd = 0;
-    nextCharInd = bufpos = -1;
-    skipBOM();
-  }
-
-  public void ReInit(java.io.Reader dstream,
-                     int startline, int startcolumn) {
-    ReInit(dstream, startline, startcolumn, 4096);
-  }
-
-  public UCode_UCodeESC_CharStream(java.io.InputStream dstream, int startline,
-                                   int startcolumn, int buffersize) {
-    this(new java.io.InputStreamReader(dstream), startline, startcolumn, 4096);
-  }
-
-  public UCode_UCodeESC_CharStream(java.io.InputStream dstream, int startline,
-                                   int startcolumn) {
-    this(dstream, startline, startcolumn, 4096);
-  }
-
-  public void ReInit(java.io.InputStream dstream, int startline,
-                     int startcolumn, int buffersize) {
-    ReInit(new java.io.InputStreamReader(dstream), startline, startcolumn, 4096);
-  }
-
-  public void ReInit(java.io.InputStream dstream, int startline,
-                     int startcolumn) {
-    ReInit(dstream, startline, startcolumn, 4096);
-  }
-
-  static private final char BOM = '\ufeff';
-
-  private void skipBOM() {
-    try {
-      if (PeekChar() == BOM)
-        ReadChar();
-    }
-    catch (EOFException e) {
-    }
-  }
-
-  public final String GetImage() {
-    if (bufpos >= tokenBegin)
-      return new String(buffer, tokenBegin, bufpos - tokenBegin + 1);
-    else
-      return new String(buffer, tokenBegin, bufsize - tokenBegin) +
-              new String(buffer, 0, bufpos + 1);
-  }
-
-  public final char[] GetSuffix(int len) {
-    char[] ret = new char[len];
-
-    if ((bufpos + 1) >= len)
-      System.arraycopy(buffer, bufpos - len + 1, ret, 0, len);
-    else {
-      System.arraycopy(buffer, bufsize - (len - bufpos - 1), ret, 0,
-                       len - bufpos - 1);
-      System.arraycopy(buffer, 0, ret, len - bufpos - 1, bufpos + 1);
+        int xCnt = 1;
+        for (;;) {
+            ReadChar();
+            if (++bufpos == available) {
+                AdjustBuffSize();
+            }
+            buffer[bufpos] = 'x';
+            UpdateLineColumn('x');
+            try {
+                c = PeekChar();
+            } catch (EOFException e) {
+                backup(xCnt);
+                return '\\';
+            }
+            if (c == '{') {
+                ReadChar();
+                column++;
+                // backup past the 'x's
+                bufpos -= xCnt;
+                if (bufpos < 0) {
+                    bufpos += bufsize;
+                }
+                break;
+            }
+            if (c != 'x') {
+                backup(xCnt);
+                return '\\';
+            }
+            xCnt++;
+        }
+        try {
+            int scalarValue = hexval(ReadChar());
+            column++;
+            if (scalarValue < 0) {
+                throw new EscapeSyntaxException("illegal_hex_digit", line, column);
+            }
+            while ((c = ReadChar()) != '}') {
+                column++;
+                int n = hexval(c);
+                if (n < 0) {
+                    throw new EscapeSyntaxException("illegal_hex_digit", line, column);
+                }
+                scalarValue <<= 4;
+                scalarValue |= n;
+                if (scalarValue >= 0x110000) {
+                    throw new EscapeSyntaxException("char_code_too_big", line, column);
+                }
+            }
+            column++; // for the '}'
+            if (scalarValue <= 0xFFFF) {
+                c = (char) scalarValue;
+                switch (c) {
+                    case '\n':
+                    case '\r':
+                    case '\t':
+                        break;
+                    default:
+                        if (c >= 0x20 && !Utf16.isSurrogate(c)) {
+                            break;
+                        }
+                    // fall through
+                    case '\uFFFE':
+                    case '\uFFFF':
+                        throw new EscapeSyntaxException("illegal_char_code_ref", line, column);
+                }
+                buffer[bufpos] = c;
+                return c;
+            }
+            c = Utf16.surrogate1(scalarValue);
+            buffer[bufpos] = c;
+            int bufpos1 = bufpos;
+            if (++bufpos == bufsize) {
+                bufpos = 0;
+            }
+            buffer[bufpos] = Utf16.surrogate2(scalarValue);
+            bufline[bufpos] = bufline[bufpos1];
+            bufcolumn[bufpos] = bufcolumn[bufpos1];
+            backup(1);
+            return c;
+        } catch (EOFException e) {
+            throw new EscapeSyntaxException("incomplete_escape", line, column);
+        }
     }
 
-    return ret;
-  }
-
-  public void Done() {
-    nextCharBuf = null;
-    buffer = null;
-    bufline = null;
-    bufcolumn = null;
-  }
-
-  /**
-   * Method to adjust line and column numbers for the start of a token.<BR>
-   */
-  public void adjustBeginLineColumn(int newLine, int newCol) {
-    int start = tokenBegin;
-    int len;
-
-    if (bufpos >= tokenBegin) {
-      len = bufpos - tokenBegin + inBuf + 1;
-    }
-    else {
-      len = bufsize - tokenBegin + bufpos + 1 + inBuf;
+    /**
+     * @deprecated @see #getEndColumn
+     */
+    public final int getColumn() {
+        return bufcolumn[bufpos];
     }
 
-    int i = 0, j = 0, k = 0;
-    int nextColDiff = 0, columnDiff = 0;
-
-    while (i < len &&
-            bufline[j = start % bufsize] == bufline[k = ++start % bufsize]) {
-      bufline[j] = newLine;
-      nextColDiff = columnDiff + bufcolumn[k] - bufcolumn[j];
-      bufcolumn[j] = newCol + columnDiff;
-      columnDiff = nextColDiff;
-      i++;
+    /**
+     * @deprecated @see #getEndLine
+     */
+    public final int getLine() {
+        return bufline[bufpos];
     }
 
-    if (i < len) {
-      bufline[j] = newLine++;
-      bufcolumn[j] = newCol + columnDiff;
-
-      while (i++ < len) {
-        if (bufline[j = start % bufsize] != bufline[++start % bufsize])
-          bufline[j] = newLine++;
-        else
-          bufline[j] = newLine;
-      }
+    public final int getEndColumn() {
+        return bufcolumn[bufpos];
     }
 
-    line = bufline[j];
-    column = bufcolumn[j];
-  }
+    public final int getEndLine() {
+        return bufline[bufpos];
+    }
 
+    public final int getBeginColumn() {
+        return bufcolumn[tokenBegin];
+    }
+
+    public final int getBeginLine() {
+        return bufline[tokenBegin];
+    }
+
+    public final void backup(int amount) {
+
+        inBuf += amount;
+        if ((bufpos -= amount) < 0) {
+            bufpos += bufsize;
+        }
+    }
+
+    public UCode_UCodeESC_CharStream(java.io.Reader dstream,
+            int startline, int startcolumn, int buffersize) {
+        inputStream = dstream;
+        line = startline;
+        column = startcolumn - 1;
+
+        available = bufsize = buffersize;
+        buffer = new char[buffersize];
+        bufline = new int[buffersize];
+        bufcolumn = new int[buffersize];
+        nextCharBuf = new char[4096];
+        skipBOM();
+    }
+
+    public UCode_UCodeESC_CharStream(java.io.Reader dstream,
+            int startline, int startcolumn) {
+        this(dstream, startline, startcolumn, 4096);
+    }
+
+    public void ReInit(java.io.Reader dstream,
+            int startline, int startcolumn, int buffersize) {
+        inputStream = dstream;
+        closed = false;
+        line = startline;
+        column = startcolumn - 1;
+
+        if (buffer == null || buffersize != buffer.length) {
+            available = bufsize = buffersize;
+            buffer = new char[buffersize];
+            bufline = new int[buffersize];
+            bufcolumn = new int[buffersize];
+            nextCharBuf = new char[4096];
+        }
+        prevCharIsLF = false;
+        tokenBegin = inBuf = maxNextCharInd = 0;
+        nextCharInd = bufpos = -1;
+        skipBOM();
+    }
+
+    public void ReInit(java.io.Reader dstream,
+            int startline, int startcolumn) {
+        ReInit(dstream, startline, startcolumn, 4096);
+    }
+
+    public UCode_UCodeESC_CharStream(java.io.InputStream dstream, int startline,
+            int startcolumn, int buffersize) {
+        this(new java.io.InputStreamReader(dstream), startline, startcolumn, 4096);
+    }
+
+    public UCode_UCodeESC_CharStream(java.io.InputStream dstream, int startline,
+            int startcolumn) {
+        this(dstream, startline, startcolumn, 4096);
+    }
+
+    public void ReInit(java.io.InputStream dstream, int startline,
+            int startcolumn, int buffersize) {
+        ReInit(new java.io.InputStreamReader(dstream), startline, startcolumn, 4096);
+    }
+
+    public void ReInit(java.io.InputStream dstream, int startline,
+            int startcolumn) {
+        ReInit(dstream, startline, startcolumn, 4096);
+    }
+    static private final char BOM = '\ufeff';
+
+    private void skipBOM() {
+        try {
+            if (PeekChar() == BOM) {
+                ReadChar();
+            }
+        } catch (EOFException e) {
+        }
+    }
+
+    public final String GetImage() {
+        if (bufpos >= tokenBegin) {
+            return new String(buffer, tokenBegin, bufpos - tokenBegin + 1);
+        } else {
+            return new String(buffer, tokenBegin, bufsize - tokenBegin)
+                    + new String(buffer, 0, bufpos + 1);
+        }
+    }
+
+    public final char[] GetSuffix(int len) {
+        char[] ret = new char[len];
+
+        if ((bufpos + 1) >= len) {
+            System.arraycopy(buffer, bufpos - len + 1, ret, 0, len);
+        } else {
+            System.arraycopy(buffer, bufsize - (len - bufpos - 1), ret, 0,
+                    len - bufpos - 1);
+            System.arraycopy(buffer, 0, ret, len - bufpos - 1, bufpos + 1);
+        }
+
+        return ret;
+    }
+
+    public void Done() {
+        nextCharBuf = null;
+        buffer = null;
+        bufline = null;
+        bufcolumn = null;
+    }
+
+    /**
+     * Method to adjust line and column numbers for the start of a token.<BR>
+     */
+    public void adjustBeginLineColumn(int newLine, int newCol) {
+        int start = tokenBegin;
+        int len;
+
+        if (bufpos >= tokenBegin) {
+            len = bufpos - tokenBegin + inBuf + 1;
+        } else {
+            len = bufsize - tokenBegin + bufpos + 1 + inBuf;
+        }
+
+        int i = 0, j = 0, k = 0;
+        int nextColDiff, columnDiff = 0;
+
+        while (i < len
+                && bufline[j = start % bufsize] == bufline[k = ++start % bufsize]) {
+            bufline[j] = newLine;
+            nextColDiff = columnDiff + bufcolumn[k] - bufcolumn[j];
+            bufcolumn[j] = newCol + columnDiff;
+            columnDiff = nextColDiff;
+            i++;
+        }
+
+        if (i < len) {
+            bufline[j] = newLine++;
+            bufcolumn[j] = newCol + columnDiff;
+
+            while (i++ < len) {
+                if (bufline[j = start % bufsize] != bufline[++start % bufsize]) {
+                    bufline[j] = newLine++;
+                } else {
+                    bufline[j] = newLine;
+                }
+            }
+        }
+
+        line = bufline[j];
+        column = bufcolumn[j];
+    }
 }
diff --git a/jaxws/src/share/jaxws_classes/com/sun/xml/internal/rngom/parse/xml/SchemaParser.java b/jaxws/src/share/jaxws_classes/com/sun/xml/internal/rngom/parse/xml/SchemaParser.java
index 0b168fb..c6b326a 100644
--- a/jaxws/src/share/jaxws_classes/com/sun/xml/internal/rngom/parse/xml/SchemaParser.java
+++ b/jaxws/src/share/jaxws_classes/com/sun/xml/internal/rngom/parse/xml/SchemaParser.java
@@ -23,7 +23,7 @@
  * questions.
  */
 /*
- * Copyright (C) 2004-2011
+ * Copyright (C) 2004-2012
  *
  * Permission is hereby granted, free of charge, to any person obtaining a copy
  * of this software and associated documentation files (the "Software"), to deal
@@ -91,1594 +91,1783 @@
 
 class SchemaParser {
 
-  private static final String relaxngURIPrefix =
-          WellKnownNamespaces.RELAX_NG.substring(0, WellKnownNamespaces.RELAX_NG.lastIndexOf('/') + 1);
-  static final String relaxng10URI = WellKnownNamespaces.RELAX_NG;
-  private static final Localizer localizer = new Localizer(new Localizer(Parseable.class),SchemaParser.class);
-
-  private String relaxngURI;
-  private final XMLReader xr;
-  private final ErrorHandler eh;
-  private final SchemaBuilder schemaBuilder;
-  /**
-   * The value of the {@link SchemaBuilder#getNameClassBuilder()}
-   * for the {@link #schemaBuilder} object.
-   */
-  private final NameClassBuilder nameClassBuilder;
-  private ParsedPattern startPattern;
-  private Locator locator;
-  private final XmlBaseHandler xmlBaseHandler = new XmlBaseHandler();
-  private final ContextImpl context = new ContextImpl();
-
-  private boolean hadError = false;
-
-  private Hashtable patternTable;
-  private Hashtable nameClassTable;
-
-  static class PrefixMapping {
-    final String prefix;
-    final String uri;
-    final PrefixMapping next;
-
-    PrefixMapping(String prefix, String uri, PrefixMapping next) {
-      this.prefix = prefix;
-      this.uri = uri;
-      this.next = next;
-    }
-  }
-
-  static abstract class AbstractContext extends DtdContext implements Context {
-    PrefixMapping prefixMapping;
-
-    AbstractContext() {
-      prefixMapping = new PrefixMapping("xml", WellKnownNamespaces.XML, null);
-    }
-
-    AbstractContext(AbstractContext context) {
-      super(context);
-      prefixMapping = context.prefixMapping;
-    }
-
-    public String resolveNamespacePrefix(String prefix) {
-      for (PrefixMapping p = prefixMapping; p != null; p = p.next)
-        if (p.prefix.equals(prefix))
-          return p.uri;
-      return null;
-    }
-
-    public Enumeration prefixes() {
-      Vector v = new Vector();
-      for (PrefixMapping p = prefixMapping; p != null; p = p.next) {
-        if (!v.contains(p.prefix))
-          v.addElement(p.prefix);
-      }
-      return v.elements();
-    }
-
-    public Context copy() {
-      return new SavedContext(this);
-    }
-  }
-
-  static class SavedContext extends AbstractContext {
-    private final String baseUri;
-    SavedContext(AbstractContext context) {
-      super(context);
-      this.baseUri = context.getBaseUri();
-    }
-
-    public String getBaseUri() {
-      return baseUri;
-    }
-  }
-
-  class ContextImpl extends AbstractContext {
-    public String getBaseUri() {
-      return xmlBaseHandler.getBaseUri();
-    }
-  }
-
-  static interface CommentHandler {
-    void comment(String value);
-  }
-
-  abstract class Handler implements ContentHandler, CommentHandler {
-    CommentList comments;
-
-    CommentList getComments() {
-      CommentList tem = comments;
-      comments = null;
-      return tem;
-    }
-
-    public void comment(String value) {
-      if (comments == null)
-        comments = schemaBuilder.makeCommentList();
-      comments.addComment(value, makeLocation());
-    }
-    public void processingInstruction(String target, String date) { }
-    public void skippedEntity(String name) { }
-    public void ignorableWhitespace(char[] ch, int start, int len) { }
-    public void startDocument() { }
-    public void endDocument() { }
-    public void startPrefixMapping(String prefix, String uri) {
-      context.prefixMapping = new PrefixMapping(prefix, uri, context.prefixMapping);
-    }
-
-    public void endPrefixMapping(String prefix) {
-      context.prefixMapping = context.prefixMapping.next;
-    }
-
-    public void setDocumentLocator(Locator loc) {
-      locator = loc;
-      xmlBaseHandler.setLocator(loc);
-    }
-  }
-
-  abstract class State extends Handler {
-    State parent;
-    String nsInherit;
-    String ns;
-    String datatypeLibrary;
+    private static final String relaxngURIPrefix =
+            WellKnownNamespaces.RELAX_NG.substring(0, WellKnownNamespaces.RELAX_NG.lastIndexOf('/') + 1);
+    static final String relaxng10URI = WellKnownNamespaces.RELAX_NG;
+    private static final Localizer localizer = new Localizer(new Localizer(Parseable.class), SchemaParser.class);
+    private String relaxngURI;
+    private final XMLReader xr;
+    private final ErrorHandler eh;
+    private final SchemaBuilder schemaBuilder;
     /**
-     * The current scope, or null if there's none.
+     * The value of the {@link SchemaBuilder#getNameClassBuilder()} for the
+     * {@link #schemaBuilder} object.
      */
-    Scope scope;
-    Location startLocation;
-    Annotations annotations;
+    private final NameClassBuilder nameClassBuilder;
+    private ParsedPattern startPattern;
+    private Locator locator;
+    private final XmlBaseHandler xmlBaseHandler = new XmlBaseHandler();
+    private final ContextImpl context = new ContextImpl();
+    private boolean hadError = false;
+    private Hashtable patternTable;
+    private Hashtable nameClassTable;
 
-    void set() {
-      xr.setContentHandler(this);
-    }
+    static class PrefixMapping {
 
-    abstract State create();
-    abstract State createChildState(String localName) throws SAXException;
+        final String prefix;
+        final String uri;
+        final PrefixMapping next;
 
-
-    void setParent(State parent) {
-      this.parent = parent;
-      this.nsInherit = parent.getNs();
-      this.datatypeLibrary = parent.datatypeLibrary;
-      this.scope = parent.scope;
-      this.startLocation = makeLocation();
-      if (parent.comments != null) {
-        annotations = schemaBuilder.makeAnnotations(parent.comments, getContext());
-        parent.comments = null;
-      }
-      else if (parent instanceof RootState)
-        annotations = schemaBuilder.makeAnnotations(null, getContext());
-    }
-
-    String getNs() {
-      return ns == null ? nsInherit : ns;
-    }
-
-    boolean isRelaxNGElement(String uri) throws SAXException {
-      return uri.equals(relaxngURI);
-    }
-
-    public void startElement(String namespaceURI,
-                             String localName,
-                             String qName,
-                             Attributes atts) throws SAXException {
-      xmlBaseHandler.startElement();
-      if (isRelaxNGElement(namespaceURI)) {
-        State state = createChildState(localName);
-        if (state == null) {
-          xr.setContentHandler(new Skipper(this));
-          return;
-        }
-        state.setParent(this);
-        state.set();
-        state.attributes(atts);
-      }
-      else {
-        checkForeignElement();
-        ForeignElementHandler feh = new ForeignElementHandler(this, getComments());
-        feh.startElement(namespaceURI, localName, qName, atts);
-        xr.setContentHandler(feh);
-      }
-    }
-
-    public void endElement(String namespaceURI,
-                           String localName,
-                           String qName) throws SAXException {
-      xmlBaseHandler.endElement();
-      parent.set();
-      end();
-    }
-
-    void setName(String name) throws SAXException {
-      error("illegal_name_attribute");
-    }
-
-    void setOtherAttribute(String name, String value) throws SAXException {
-      error("illegal_attribute_ignored", name);
-    }
-
-    void endAttributes() throws SAXException {
-    }
-
-    void checkForeignElement() throws SAXException {
-    }
-
-    void attributes(Attributes atts) throws SAXException {
-      int len = atts.getLength();
-      for (int i = 0; i < len; i++) {
-        String uri = atts.getURI(i);
-        if (uri.length() == 0) {
-          String name = atts.getLocalName(i);
-          if (name.equals("name"))
-            setName(atts.getValue(i).trim());
-          else if (name.equals("ns"))
-            ns = atts.getValue(i);
-          else if (name.equals("datatypeLibrary")) {
-            datatypeLibrary = atts.getValue(i);
-            checkUri(datatypeLibrary);
-            if (!datatypeLibrary.equals("")
-                && !Uri.isAbsolute(datatypeLibrary))
-              error("relative_datatype_library");
-            if (Uri.hasFragmentId(datatypeLibrary))
-              error("fragment_identifier_datatype_library");
-            datatypeLibrary = Uri.escapeDisallowedChars(datatypeLibrary);
-          }
-          else
-            setOtherAttribute(name, atts.getValue(i));
-        }
-        else if (uri.equals(relaxngURI))
-          error("qualified_attribute", atts.getLocalName(i));
-        else if (uri.equals(WellKnownNamespaces.XML)
-                 && atts.getLocalName(i).equals("base"))
-          xmlBaseHandler.xmlBaseAttribute(atts.getValue(i));
-        else {
-          if (annotations == null)
-            annotations = schemaBuilder.makeAnnotations(null, getContext());
-          annotations.addAttribute(uri, atts.getLocalName(i), findPrefix(atts.getQName(i), uri),
-                                   atts.getValue(i), startLocation);
-        }
-      }
-      endAttributes();
-    }
-
-    abstract void end() throws SAXException;
-
-    void endChild(ParsedPattern pattern) {
-      // XXX cannot happen; throw exception
-    }
-
-    void endChild(ParsedNameClass nc) {
-      // XXX cannot happen; throw exception
-    }
-
-    public void startDocument() { }
-    public void endDocument() {
-      if (comments != null && startPattern != null) {
-        startPattern = schemaBuilder.commentAfter(startPattern, comments);
-        comments = null;
-      }
-    }
-
-    public void characters(char[] ch, int start, int len) throws SAXException {
-      for (int i = 0; i < len; i++) {
-        switch(ch[start + i]) {
-        case ' ':
-        case '\r':
-        case '\n':
-        case '\t':
-          break;
-        default:
-          error("illegal_characters_ignored");
-          break;
-        }
-      }
-    }
-
-    boolean isPatternNamespaceURI(String s) {
-      return s.equals(relaxngURI);
-    }
-
-    void endForeignChild(ParsedElementAnnotation ea) {
-      if (annotations == null)
-        annotations = schemaBuilder.makeAnnotations(null, getContext());
-      annotations.addElement(ea);
-    }
-
-    void mergeLeadingComments() {
-      if (comments != null) {
-        if (annotations == null)
-          annotations = schemaBuilder.makeAnnotations(comments, getContext());
-        else
-          annotations.addLeadingComment(comments);
-        comments = null;
-      }
-    }
-  }
-
-  class ForeignElementHandler extends Handler {
-    final State nextState;
-    ElementAnnotationBuilder builder;
-    final Stack builderStack = new Stack();
-    StringBuffer textBuf;
-    Location textLoc;
-
-    ForeignElementHandler(State nextState, CommentList comments) {
-      this.nextState = nextState;
-      this.comments = comments;
-    }
-
-    public void startElement(String namespaceURI, String localName,
-                             String qName, Attributes atts) {
-      flushText();
-      if (builder != null)
-        builderStack.push(builder);
-      Location loc = makeLocation();
-      builder = schemaBuilder.makeElementAnnotationBuilder(namespaceURI,
-                                                           localName,
-                                                           findPrefix(qName, namespaceURI),
-                                                           loc,
-                                                           getComments(),
-                                                           getContext());
-      int len = atts.getLength();
-      for (int i = 0; i < len; i++) {
-        String uri = atts.getURI(i);
-        builder.addAttribute(uri, atts.getLocalName(i), findPrefix(atts.getQName(i), uri),
-                             atts.getValue(i), loc);
-      }
-    }
-
-    public void endElement(String namespaceURI, String localName,
-                           String qName) {
-      flushText();
-      if (comments != null)
-        builder.addComment(getComments());
-      ParsedElementAnnotation ea = builder.makeElementAnnotation();
-      if (builderStack.empty()) {
-        nextState.endForeignChild(ea);
-        nextState.set();
-      }
-      else {
-        builder = (ElementAnnotationBuilder)builderStack.pop();
-        builder.addElement(ea);
-      }
-    }
-
-    public void characters(char ch[], int start, int length) {
-      if (textBuf == null)
-        textBuf = new StringBuffer();
-      textBuf.append(ch, start, length);
-      if (textLoc == null)
-        textLoc = makeLocation();
-    }
-
-    public void comment(String value) {
-      flushText();
-      super.comment(value);
-    }
-
-    void flushText() {
-      if (textBuf != null && textBuf.length() != 0) {
-        builder.addText(textBuf.toString(), textLoc, getComments());
-        textBuf.setLength(0);
-      }
-      textLoc = null;
-    }
-  }
-
-  class Skipper extends DefaultHandler implements CommentHandler {
-    int level = 1;
-    final State nextState;
-
-    Skipper(State nextState) {
-      this.nextState = nextState;
-    }
-
-    public void startElement(String namespaceURI,
-                             String localName,
-                             String qName,
-                             Attributes atts) throws SAXException {
-      ++level;
-    }
-
-    public void endElement(String namespaceURI,
-                           String localName,
-                           String qName) throws SAXException {
-      if (--level == 0)
-        nextState.set();
-    }
-
-    public void comment(String value) {
-    }
-  }
-
-  abstract class EmptyContentState extends State {
-
-    State createChildState(String localName) throws SAXException {
-      error("expected_empty", localName);
-      return null;
-    }
-
-    abstract ParsedPattern makePattern() throws SAXException;
-
-    void end() throws SAXException {
-      if (comments != null) {
-        if (annotations == null)
-          annotations = schemaBuilder.makeAnnotations(null, getContext());
-        annotations.addComment(comments);
-        comments = null;
-      }
-      parent.endChild(makePattern());
-    }
-  }
-
-  static private final int INIT_CHILD_ALLOC = 5;
-
-  abstract class PatternContainerState extends State {
-    List<ParsedPattern> childPatterns;
-
-    State createChildState(String localName) throws SAXException {
-      State state = (State)patternTable.get(localName);
-      if (state == null) {
-        error("expected_pattern", localName);
-        return null;
-      }
-      return state.create();
-    }
-
-    ParsedPattern buildPattern(List<ParsedPattern> patterns, Location loc, Annotations anno) throws SAXException {
-      if (patterns.size() == 1 && anno == null)
-        return patterns.get(0);
-      return schemaBuilder.makeGroup(patterns, loc, anno);
-    }
-
-    void endChild(ParsedPattern pattern) {
-      if (childPatterns == null)
-        childPatterns = new ArrayList<ParsedPattern>(INIT_CHILD_ALLOC);
-      childPatterns.add(pattern);
-    }
-
-    void endForeignChild(ParsedElementAnnotation ea) {
-      if (childPatterns == null)
-        super.endForeignChild(ea);
-      else {
-        int idx = childPatterns.size()-1;
-        childPatterns.set(idx, schemaBuilder.annotateAfter(childPatterns.get(idx), ea));
-      }
-    }
-
-    void end() throws SAXException {
-      if (childPatterns == null) {
-        error("missing_children");
-        endChild(schemaBuilder.makeErrorPattern());
-      }
-      if (comments != null) {
-        int idx = childPatterns.size()-1;
-        childPatterns.set(idx,schemaBuilder.commentAfter(childPatterns.get(idx), comments));
-        comments = null;
-      }
-      sendPatternToParent(buildPattern(childPatterns, startLocation, annotations));
-    }
-
-    void sendPatternToParent(ParsedPattern p) {
-      parent.endChild(p);
-    }
-  }
-
-  class GroupState extends PatternContainerState {
-    State create() {
-      return new GroupState();
-    }
-  }
-
-  class ZeroOrMoreState extends PatternContainerState {
-    State create() {
-      return new ZeroOrMoreState();
-    }
-
-    ParsedPattern buildPattern(List<ParsedPattern> patterns, Location loc, Annotations anno) throws SAXException {
-      return schemaBuilder.makeZeroOrMore(super.buildPattern(patterns, loc, null), loc, anno);
-    }
-  }
-
-  class OneOrMoreState extends PatternContainerState {
-    State create() {
-      return new OneOrMoreState();
-    }
-    ParsedPattern buildPattern(List<ParsedPattern> patterns, Location loc, Annotations anno) throws SAXException {
-      return schemaBuilder.makeOneOrMore(super.buildPattern(patterns, loc, null), loc, anno);
-    }
-  }
-
-  class OptionalState extends PatternContainerState {
-    State create() {
-      return new OptionalState();
-    }
-    ParsedPattern buildPattern(List<ParsedPattern> patterns, Location loc, Annotations anno) throws SAXException {
-      return schemaBuilder.makeOptional(super.buildPattern(patterns, loc, null), loc, anno);
-    }
-  }
-
-  class ListState extends PatternContainerState {
-    State create() {
-      return new ListState();
-    }
-    ParsedPattern buildPattern(List<ParsedPattern> patterns, Location loc, Annotations anno) throws SAXException {
-      return schemaBuilder.makeList(super.buildPattern(patterns, loc, null), loc, anno);
-    }
-  }
-
-  class ChoiceState extends PatternContainerState {
-    State create() {
-      return new ChoiceState();
-    }
-    ParsedPattern buildPattern(List<ParsedPattern> patterns, Location loc, Annotations anno) throws SAXException {
-      return schemaBuilder.makeChoice(patterns, loc, anno);
-    }
-  }
-
-  class InterleaveState extends PatternContainerState {
-    State create() {
-      return new InterleaveState();
-    }
-    ParsedPattern buildPattern(List<ParsedPattern> patterns, Location loc, Annotations anno) {
-      return schemaBuilder.makeInterleave(patterns, loc, anno);
-    }
-  }
-
-  class MixedState extends PatternContainerState {
-    State create() {
-      return new MixedState();
-    }
-    ParsedPattern buildPattern(List<ParsedPattern> patterns, Location loc, Annotations anno) throws SAXException {
-      return schemaBuilder.makeMixed(super.buildPattern(patterns, loc, null), loc, anno);
-    }
-  }
-
-  static interface NameClassRef {
-    void setNameClass(ParsedNameClass nc);
-  }
-
-  class ElementState extends PatternContainerState implements NameClassRef {
-    ParsedNameClass nameClass;
-    boolean nameClassWasAttribute;
-    String name;
-
-    void setName(String name) {
-      this.name = name;
-    }
-
-    public void setNameClass(ParsedNameClass nc) {
-      nameClass = nc;
-    }
-
-    void endAttributes() throws SAXException {
-      if (name != null) {
-        nameClass = expandName(name, getNs(), null);
-        nameClassWasAttribute = true;
-      }
-      else
-        new NameClassChildState(this, this).set();
-    }
-
-    State create() {
-      return new ElementState();
-    }
-
-    ParsedPattern buildPattern(List<ParsedPattern> patterns, Location loc, Annotations anno) throws SAXException {
-      return schemaBuilder.makeElement(nameClass, super.buildPattern(patterns, loc, null), loc, anno);
-    }
-
-    void endForeignChild(ParsedElementAnnotation ea) {
-      if (nameClassWasAttribute || childPatterns!=null || nameClass == null)
-        super.endForeignChild(ea);
-      else
-        nameClass = nameClassBuilder.annotateAfter(nameClass, ea);
-    }
-  }
-
-  class RootState extends PatternContainerState {
-    IncludedGrammar grammar;
-
-    RootState() {
-    }
-
-    RootState(IncludedGrammar grammar, Scope scope, String ns) {
-      this.grammar = grammar;
-      this.scope = scope;
-      this.nsInherit = ns;
-      this.datatypeLibrary = "";
-    }
-
-    State create() {
-      return new RootState();
-    }
-
-    State createChildState(String localName) throws SAXException {
-      if (grammar == null)
-        return super.createChildState(localName);
-      if (localName.equals("grammar"))
-        return new MergeGrammarState(grammar);
-      error("expected_grammar", localName);
-      return null;
-    }
-
-    void checkForeignElement() throws SAXException {
-      error("root_bad_namespace_uri", WellKnownNamespaces.RELAX_NG);
-    }
-
-    void endChild(ParsedPattern pattern) {
-      startPattern = pattern;
-    }
-
-    boolean isRelaxNGElement(String uri) throws SAXException {
-      if (!uri.startsWith(relaxngURIPrefix))
-        return false;
-      if (!uri.equals(WellKnownNamespaces.RELAX_NG))
-        warning("wrong_uri_version",
-                WellKnownNamespaces.RELAX_NG.substring(relaxngURIPrefix.length()),
-                uri.substring(relaxngURIPrefix.length()));
-      relaxngURI = uri;
-      return true;
-    }
-
-  }
-
-  class NotAllowedState extends EmptyContentState {
-    State create() {
-      return new NotAllowedState();
-    }
-
-    ParsedPattern makePattern() {
-      return schemaBuilder.makeNotAllowed(startLocation, annotations);
-    }
-  }
-
-  class EmptyState extends EmptyContentState {
-    State create() {
-      return new EmptyState();
-    }
-
-    ParsedPattern makePattern() {
-      return schemaBuilder.makeEmpty(startLocation, annotations);
-    }
-  }
-
-  class TextState extends EmptyContentState {
-    State create() {
-      return new TextState();
-    }
-
-    ParsedPattern makePattern() {
-      return schemaBuilder.makeText(startLocation, annotations);
-    }
-  }
-
-  class ValueState extends EmptyContentState {
-    final StringBuffer buf = new StringBuffer();
-    String type;
-
-    State create() {
-      return new ValueState();
-    }
-
-    void setOtherAttribute(String name, String value) throws SAXException {
-      if (name.equals("type"))
-        type = checkNCName(value.trim());
-      else
-        super.setOtherAttribute(name, value);
-    }
-
-    public void characters(char[] ch, int start, int len) {
-      buf.append(ch, start, len);
-    }
-
-    void checkForeignElement() throws SAXException {
-      error("value_contains_foreign_element");
-    }
-
-    ParsedPattern makePattern() throws SAXException {
-      if (type == null)
-        return makePattern("", "token");
-      else
-        return makePattern(datatypeLibrary, type);
-    }
-
-    void end() throws SAXException {
-      mergeLeadingComments();
-      super.end();
-    }
-
-    ParsedPattern makePattern(String datatypeLibrary, String type) {
-      return schemaBuilder.makeValue(datatypeLibrary,
-                                     type,
-                                     buf.toString(),
-                                     getContext(),
-                                     getNs(),
-                                     startLocation,
-                                     annotations);
-    }
-
-  }
-
-  class DataState extends State {
-    String type;
-    ParsedPattern except = null;
-    DataPatternBuilder dpb = null;
-
-    State create() {
-      return new DataState();
-    }
-
-    State createChildState(String localName) throws SAXException {
-      if (localName.equals("param")) {
-        if (except != null)
-          error("param_after_except");
-        return new ParamState(dpb);
-      }
-      if (localName.equals("except")) {
-        if (except != null)
-          error("multiple_except");
-        return new ChoiceState();
-      }
-      error("expected_param_except", localName);
-      return null;
-    }
-
-    void setOtherAttribute(String name, String value) throws SAXException {
-      if (name.equals("type"))
-        type = checkNCName(value.trim());
-      else
-        super.setOtherAttribute(name, value);
-    }
-
-    void endAttributes() throws SAXException {
-      if (type == null)
-        error("missing_type_attribute");
-      else
-        dpb = schemaBuilder.makeDataPatternBuilder(datatypeLibrary, type, startLocation);
-    }
-
-    void endForeignChild(ParsedElementAnnotation ea) {
-      dpb.annotation(ea);
-    }
-
-    void end() throws SAXException {
-      ParsedPattern p;
-      if (dpb != null) {
-        if (except != null)
-          p = dpb.makePattern(except, startLocation, annotations);
-        else
-          p = dpb.makePattern(startLocation, annotations);
-      }
-      else
-        p = schemaBuilder.makeErrorPattern();
-      // XXX need to capture comments
-      parent.endChild(p);
-    }
-
-    void endChild(ParsedPattern pattern) {
-      except = pattern;
-    }
-
-  }
-
-  class ParamState extends State {
-    private final StringBuffer buf = new StringBuffer();
-    private final DataPatternBuilder dpb;
-    private String name;
-
-    ParamState(DataPatternBuilder dpb) {
-      this.dpb = dpb;
-    }
-
-    State create() {
-      return new ParamState(null);
-    }
-
-    void setName(String name) throws SAXException {
-      this.name = checkNCName(name);
-    }
-
-    void endAttributes() throws SAXException {
-      if (name == null)
-        error("missing_name_attribute");
-    }
-
-    State createChildState(String localName) throws SAXException {
-      error("expected_empty", localName);
-      return null;
-    }
-
-    public void characters(char[] ch, int start, int len) {
-      buf.append(ch, start, len);
-    }
-
-    void checkForeignElement() throws SAXException {
-      error("param_contains_foreign_element");
-    }
-
-    void end() throws SAXException {
-      if (name == null)
-        return;
-      if (dpb == null)
-        return;
-      mergeLeadingComments();
-      dpb.addParam(name, buf.toString(), getContext(), getNs(), startLocation, annotations);
-    }
-  }
-
-  class AttributeState extends PatternContainerState implements NameClassRef {
-    ParsedNameClass nameClass;
-    boolean nameClassWasAttribute;
-    String name;
-
-    State create() {
-      return new AttributeState();
-    }
-
-    void setName(String name) {
-      this.name = name;
-    }
-
-    public void setNameClass(ParsedNameClass nc) {
-      nameClass = nc;
-    }
-
-    void endAttributes() throws SAXException {
-      if (name != null) {
-        String nsUse;
-        if (ns != null)
-          nsUse = ns;
-        else
-          nsUse = "";
-        nameClass = expandName(name, nsUse, null);
-        nameClassWasAttribute = true;
-      }
-      else
-        new NameClassChildState(this, this).set();
-    }
-
-    void endForeignChild(ParsedElementAnnotation ea) {
-      if (nameClassWasAttribute || childPatterns!=null || nameClass == null)
-        super.endForeignChild(ea);
-      else
-        nameClass = nameClassBuilder.annotateAfter(nameClass, ea);
-    }
-
-    void end() throws SAXException {
-      if (childPatterns == null)
-        endChild(schemaBuilder.makeText(startLocation, null));
-      super.end();
-    }
-
-    ParsedPattern buildPattern(List<ParsedPattern> patterns, Location loc, Annotations anno) throws SAXException {
-      return schemaBuilder.makeAttribute(nameClass, super.buildPattern(patterns, loc, null), loc, anno);
-    }
-
-    State createChildState(String localName) throws SAXException {
-      State tem = super.createChildState(localName);
-      if (tem != null && childPatterns!=null)
-        error("attribute_multi_pattern");
-      return tem;
-    }
-
-  }
-
-  abstract class SinglePatternContainerState extends PatternContainerState {
-    State createChildState(String localName) throws SAXException {
-      if (childPatterns==null)
-        return super.createChildState(localName);
-      error("too_many_children");
-      return null;
-    }
-  }
-
-  class GrammarSectionState extends State {
-    GrammarSection section;
-
-    GrammarSectionState() { }
-
-    GrammarSectionState(GrammarSection section) {
-      this.section = section;
-    }
-
-    State create() {
-      return new GrammarSectionState(null);
-    }
-
-    State createChildState(String localName) throws SAXException {
-      if (localName.equals("define"))
-        return new DefineState(section);
-      if (localName.equals("start"))
-        return new StartState(section);
-      if (localName.equals("include")) {
-        Include include = section.makeInclude();
-        if (include != null)
-          return new IncludeState(include);
-      }
-      if (localName.equals("div"))
-        return new DivState(section.makeDiv());
-      error("expected_define", localName);
-      // XXX better errors
-      return null;
-    }
-
-    void end() throws SAXException {
-      if (comments != null) {
-        section.topLevelComment(comments);
-        comments = null;
-      }
-    }
-
-    void endForeignChild(ParsedElementAnnotation ea) {
-      section.topLevelAnnotation(ea);
-    }
-  }
-
-  class DivState extends GrammarSectionState {
-    final Div div;
-    DivState(Div div) {
-      super(div);
-      this.div = div;
-    }
-
-    void end() throws SAXException {
-      super.end();
-      div.endDiv(startLocation, annotations);
-    }
-  }
-
-  class IncludeState extends GrammarSectionState {
-    String href;
-    final Include include;
-
-    IncludeState(Include include) {
-      super(include);
-      this.include = include;
-    }
-
-    void setOtherAttribute(String name, String value) throws SAXException {
-      if (name.equals("href")) {
-        href = value;
-        checkUri(href);
-      }
-      else
-        super.setOtherAttribute(name, value);
-    }
-
-    void endAttributes() throws SAXException {
-      if (href == null)
-        error("missing_href_attribute");
-      else
-        href = resolve(href);
-    }
-
-    void end() throws SAXException {
-      super.end();
-      if (href != null) {
-        try {
-          include.endInclude(parseable, href, getNs(), startLocation, annotations);
-        }
-        catch (IllegalSchemaException e) {
-        }
-      }
-    }
-  }
-
-  class MergeGrammarState extends GrammarSectionState {
-    final IncludedGrammar grammar;
-    MergeGrammarState(IncludedGrammar grammar) {
-      super(grammar);
-      this.grammar = grammar;
-    }
-
-    void end() throws SAXException {
-      super.end();
-      parent.endChild(grammar.endIncludedGrammar(startLocation, annotations));
-    }
-  }
-
-  class GrammarState extends GrammarSectionState {
-    Grammar grammar;
-
-    void setParent(State parent) {
-      super.setParent(parent);
-      grammar = schemaBuilder.makeGrammar(scope);
-      section = grammar;
-      scope = grammar;
-    }
-
-    State create() {
-      return new GrammarState();
-    }
-
-    void end() throws SAXException {
-      super.end();
-      parent.endChild(grammar.endGrammar(startLocation, annotations));
-    }
-  }
-
-  class RefState extends EmptyContentState {
-    String name;
-
-    State create() {
-      return new RefState();
-    }
-
-
-    void endAttributes() throws SAXException {
-      if (name == null)
-        error("missing_name_attribute");
-    }
-
-    void setName(String name) throws SAXException {
-      this.name = checkNCName(name);
-    }
-
-    ParsedPattern makePattern() throws SAXException {
-      if (name == null)
-        return schemaBuilder.makeErrorPattern();
-      if(scope==null) {
-          error("ref_outside_grammar",name);
-          return schemaBuilder.makeErrorPattern();
-      } else
-          return scope.makeRef(name, startLocation, annotations);
-    }
-  }
-
-  class ParentRefState extends RefState {
-    State create() {
-      return new ParentRefState();
-    }
-
-    ParsedPattern makePattern() throws SAXException {
-      if (name == null)
-        return schemaBuilder.makeErrorPattern();
-      if(scope==null) {
-        error("parent_ref_outside_grammar",name);
-        return schemaBuilder.makeErrorPattern();
-      } else
-        return scope.makeParentRef(name, startLocation, annotations);
-    }
-  }
-
-  class ExternalRefState extends EmptyContentState {
-    String href;
-    ParsedPattern includedPattern;
-
-    State create() {
-      return new ExternalRefState();
-    }
-
-    void setOtherAttribute(String name, String value) throws SAXException {
-      if (name.equals("href")) {
-        href = value;
-        checkUri(href);
-      }
-      else
-        super.setOtherAttribute(name, value);
-    }
-
-    void endAttributes() throws SAXException {
-      if (href == null)
-        error("missing_href_attribute");
-      else
-        href = resolve(href);
-    }
-
-    ParsedPattern makePattern() {
-      if (href != null) {
-        try {
-          return schemaBuilder.makeExternalRef(parseable,
-                                               href,
-                                               getNs(),
-                                               scope,
-                                               startLocation,
-                                               annotations);
-        }
-        catch (IllegalSchemaException e) { }
-      }
-      return schemaBuilder.makeErrorPattern();
-    }
-  }
-
-  abstract class DefinitionState extends PatternContainerState {
-    GrammarSection.Combine combine = null;
-    final GrammarSection section;
-
-    DefinitionState(GrammarSection section) {
-      this.section = section;
-    }
-
-    void setOtherAttribute(String name, String value) throws SAXException {
-      if (name.equals("combine")) {
-        value = value.trim();
-        if (value.equals("choice"))
-          combine = GrammarSection.COMBINE_CHOICE;
-        else if (value.equals("interleave"))
-          combine = GrammarSection.COMBINE_INTERLEAVE;
-        else
-          error("combine_attribute_bad_value", value);
-      }
-      else
-        super.setOtherAttribute(name, value);
-    }
-
-    ParsedPattern buildPattern(List<ParsedPattern> patterns, Location loc, Annotations anno) throws SAXException {
-      return super.buildPattern(patterns, loc, null);
-    }
-  }
-
-  class DefineState extends DefinitionState {
-    String name;
-
-    DefineState(GrammarSection section) {
-      super(section);
-    }
-
-    State create() {
-      return new DefineState(null);
-    }
-
-    void setName(String name) throws SAXException {
-      this.name = checkNCName(name);
-    }
-
-    void endAttributes() throws SAXException {
-      if (name == null)
-        error("missing_name_attribute");
-    }
-
-    void sendPatternToParent(ParsedPattern p) {
-      if (name != null)
-        section.define(name, combine, p, startLocation, annotations);
-    }
-
-  }
-
-  class StartState extends DefinitionState {
-
-    StartState(GrammarSection section) {
-      super(section);
-    }
-
-    State create() {
-      return new StartState(null);
-    }
-
-    void sendPatternToParent(ParsedPattern p) {
-      section.define(GrammarSection.START, combine, p, startLocation, annotations);
-    }
-
-    State createChildState(String localName) throws SAXException {
-      State tem = super.createChildState(localName);
-      if (tem != null && childPatterns!=null)
-        error("start_multi_pattern");
-      return tem;
-    }
-
-  }
-
-  abstract class NameClassContainerState extends State {
-    State createChildState(String localName) throws SAXException {
-      State state = (State)nameClassTable.get(localName);
-      if (state == null) {
-        error("expected_name_class", localName);
-        return null;
-      }
-      return state.create();
-    }
-  }
-
-  class NameClassChildState extends NameClassContainerState {
-    final State prevState;
-    final NameClassRef nameClassRef;
-
-    State create() {
-      return null;
-    }
-
-    NameClassChildState(State prevState, NameClassRef nameClassRef) {
-      this.prevState = prevState;
-      this.nameClassRef = nameClassRef;
-      setParent(prevState.parent);
-      this.ns = prevState.ns;
-    }
-
-    void endChild(ParsedNameClass nameClass) {
-      nameClassRef.setNameClass(nameClass);
-      prevState.set();
-    }
-
-    void endForeignChild(ParsedElementAnnotation ea) {
-      prevState.endForeignChild(ea);
-    }
-
-    void end() throws SAXException {
-      nameClassRef.setNameClass(nameClassBuilder.makeErrorNameClass());
-      error("missing_name_class");
-      prevState.set();
-      prevState.end();
-    }
-  }
-
-  abstract class NameClassBaseState extends State {
-
-    abstract ParsedNameClass makeNameClass() throws SAXException;
-
-    void end() throws SAXException {
-      parent.endChild(makeNameClass());
-    }
-  }
-
-  class NameState extends NameClassBaseState {
-    final StringBuffer buf = new StringBuffer();
-
-    State createChildState(String localName) throws SAXException {
-      error("expected_name", localName);
-      return null;
-    }
-
-    State create() {
-      return new NameState();
-    }
-
-    public void characters(char[] ch, int start, int len) {
-      buf.append(ch, start, len);
-    }
-
-    void checkForeignElement() throws SAXException {
-      error("name_contains_foreign_element");
-    }
-
-    ParsedNameClass makeNameClass() throws SAXException {
-      mergeLeadingComments();
-      return expandName(buf.toString().trim(), getNs(), annotations);
-    }
-
-  }
-
-  private static final int PATTERN_CONTEXT = 0;
-  private static final int ANY_NAME_CONTEXT = 1;
-  private static final int NS_NAME_CONTEXT = 2;
-private SAXParseable parseable;
-
-  class AnyNameState extends NameClassBaseState {
-    ParsedNameClass except = null;
-
-    State create() {
-      return new AnyNameState();
-    }
-
-    State createChildState(String localName) throws SAXException {
-      if (localName.equals("except")) {
-        if (except != null)
-          error("multiple_except");
-        return new NameClassChoiceState(getContext());
-      }
-      error("expected_except", localName);
-      return null;
-    }
-
-    int getContext() {
-      return ANY_NAME_CONTEXT;
-    }
-
-    ParsedNameClass makeNameClass() {
-      if (except == null)
-        return makeNameClassNoExcept();
-      else
-        return makeNameClassExcept(except);
-    }
-
-    ParsedNameClass makeNameClassNoExcept() {
-      return nameClassBuilder.makeAnyName(startLocation, annotations);
-    }
-
-    ParsedNameClass makeNameClassExcept(ParsedNameClass except) {
-      return nameClassBuilder.makeAnyName(except, startLocation, annotations);
-    }
-
-    void endChild(ParsedNameClass nameClass) {
-      except = nameClass;
-    }
-
-  }
-
-  class NsNameState extends AnyNameState {
-    State create() {
-      return new NsNameState();
-    }
-
-    ParsedNameClass makeNameClassNoExcept() {
-      return nameClassBuilder.makeNsName(getNs(), null, null);
-    }
-
-    ParsedNameClass makeNameClassExcept(ParsedNameClass except) {
-      return nameClassBuilder.makeNsName(getNs(), except, null, null);
-    }
-
-    int getContext() {
-      return NS_NAME_CONTEXT;
-    }
-
-  }
-
-  class NameClassChoiceState extends NameClassContainerState {
-    private ParsedNameClass[] nameClasses;
-    private int nNameClasses;
-    private int context;
-
-    NameClassChoiceState() {
-      this.context = PATTERN_CONTEXT;
-    }
-
-    NameClassChoiceState(int context) {
-      this.context = context;
-    }
-
-    void setParent(State parent) {
-      super.setParent(parent);
-      if (parent instanceof NameClassChoiceState)
-        this.context = ((NameClassChoiceState)parent).context;
-    }
-
-    State create() {
-      return new NameClassChoiceState();
-    }
-
-    State createChildState(String localName) throws SAXException {
-      if (localName.equals("anyName")) {
-        if (context >= ANY_NAME_CONTEXT) {
-          error(context == ANY_NAME_CONTEXT
-                ? "any_name_except_contains_any_name"
-                : "ns_name_except_contains_any_name");
-          return null;
-        }
-      }
-      else if (localName.equals("nsName")) {
-        if (context == NS_NAME_CONTEXT) {
-          error("ns_name_except_contains_ns_name");
-          return null;
-        }
-      }
-      return super.createChildState(localName);
-    }
-
-    void endChild(ParsedNameClass nc) {
-      if (nameClasses == null)
-        nameClasses = new ParsedNameClass[INIT_CHILD_ALLOC];
-      else if (nNameClasses >= nameClasses.length) {
-        ParsedNameClass[] newNameClasses = new ParsedNameClass[nameClasses.length * 2];
-        System.arraycopy(nameClasses, 0, newNameClasses, 0, nameClasses.length);
-        nameClasses = newNameClasses;
-      }
-      nameClasses[nNameClasses++] = nc;
-    }
-
-    void endForeignChild(ParsedElementAnnotation ea) {
-      if (nNameClasses == 0)
-        super.endForeignChild(ea);
-      else
-        nameClasses[nNameClasses - 1] = nameClassBuilder.annotateAfter(nameClasses[nNameClasses - 1], ea);
-    }
-
-    void end() throws SAXException {
-      if (nNameClasses == 0) {
-        error("missing_name_class");
-        parent.endChild(nameClassBuilder.makeErrorNameClass());
-        return;
-      }
-      if (comments != null) {
-        nameClasses[nNameClasses - 1] = nameClassBuilder.commentAfter(nameClasses[nNameClasses - 1], comments);
-        comments = null;
-      }
-      parent.endChild(nameClassBuilder.makeChoice(Arrays.asList(nameClasses).subList(0,nNameClasses), startLocation, annotations));
-    }
-  }
-
-  private void initPatternTable() {
-    patternTable = new Hashtable();
-    patternTable.put("zeroOrMore", new ZeroOrMoreState());
-    patternTable.put("oneOrMore", new OneOrMoreState());
-    patternTable.put("optional", new OptionalState());
-    patternTable.put("list", new ListState());
-    patternTable.put("choice", new ChoiceState());
-    patternTable.put("interleave", new InterleaveState());
-    patternTable.put("group", new GroupState());
-    patternTable.put("mixed", new MixedState());
-    patternTable.put("element", new ElementState());
-    patternTable.put("attribute", new AttributeState());
-    patternTable.put("empty", new EmptyState());
-    patternTable.put("text", new TextState());
-    patternTable.put("value", new ValueState());
-    patternTable.put("data", new DataState());
-    patternTable.put("notAllowed", new NotAllowedState());
-    patternTable.put("grammar", new GrammarState());
-    patternTable.put("ref", new RefState());
-    patternTable.put("parentRef", new ParentRefState());
-    patternTable.put("externalRef", new ExternalRefState());
-  }
-
-  private void initNameClassTable() {
-    nameClassTable = new Hashtable();
-    nameClassTable.put("name", new NameState());
-    nameClassTable.put("anyName", new AnyNameState());
-    nameClassTable.put("nsName", new NsNameState());
-    nameClassTable.put("choice", new NameClassChoiceState());
-  }
-
-  public ParsedPattern getParsedPattern() throws IllegalSchemaException {
-    if (hadError)
-      throw new IllegalSchemaException();
-    return startPattern;
-  }
-
-  private void error(String key) throws SAXException {
-    error(key, locator);
-  }
-
-  private void error(String key, String arg) throws SAXException {
-    error(key, arg, locator);
-  }
-
-  void error(String key, String arg1, String arg2) throws SAXException {
-    error(key, arg1, arg2, locator);
-  }
-
-  private void error(String key, Locator loc) throws SAXException {
-    error(new SAXParseException(localizer.message(key), loc));
-  }
-
-  private void error(String key, String arg, Locator loc) throws SAXException {
-    error(new SAXParseException(localizer.message(key, arg), loc));
-  }
-
-  private void error(String key, String arg1, String arg2, Locator loc)
-    throws SAXException {
-    error(new SAXParseException(localizer.message(key, arg1, arg2), loc));
-  }
-
-  private void error(SAXParseException e) throws SAXException {
-    hadError = true;
-    if (eh != null)
-      eh.error(e);
-  }
-
-  void warning(String key) throws SAXException {
-    warning(key, locator);
-  }
-
-  private void warning(String key, String arg) throws SAXException {
-    warning(key, arg, locator);
-  }
-
-  private void warning(String key, String arg1, String arg2) throws SAXException {
-    warning(key, arg1, arg2, locator);
-  }
-
-  private void warning(String key, Locator loc) throws SAXException {
-    warning(new SAXParseException(localizer.message(key), loc));
-  }
-
-  private void warning(String key, String arg, Locator loc) throws SAXException {
-    warning(new SAXParseException(localizer.message(key, arg), loc));
-  }
-
-  private void warning(String key, String arg1, String arg2, Locator loc)
-    throws SAXException {
-    warning(new SAXParseException(localizer.message(key, arg1, arg2), loc));
-  }
-
-  private void warning(SAXParseException e) throws SAXException {
-    if (eh != null)
-      eh.warning(e);
-  }
-
-  SchemaParser(SAXParseable parseable,
-               XMLReader xr,
-               ErrorHandler eh,
-               SchemaBuilder schemaBuilder,
-               IncludedGrammar grammar,
-               Scope scope,
-               String inheritedNs) throws SAXException {
-    this.parseable = parseable;
-    this.xr = xr;
-    this.eh = eh;
-    this.schemaBuilder = schemaBuilder;
-    this.nameClassBuilder = schemaBuilder.getNameClassBuilder();
-    if (eh != null)
-      xr.setErrorHandler(eh);
-    xr.setDTDHandler(context);
-    if (schemaBuilder.usesComments()) {
-      try {
-        xr.setProperty("http://xml.org/sax/properties/lexical-handler", new LexicalHandlerImpl());
-      }
-      catch (SAXNotRecognizedException e) {
-        warning("no_comment_support", xr.getClass().getName());
-      }
-      catch (SAXNotSupportedException e) {
-        warning("no_comment_support", xr.getClass().getName());
-      }
-    }
-    initPatternTable();
-    initNameClassTable();
-    new RootState(grammar, scope, inheritedNs).set();
-  }
-
-
-  private Context getContext() {
-    return context;
-  }
-
-  class LexicalHandlerImpl extends AbstractLexicalHandler {
-    private boolean inDtd = false;
-
-    public void startDTD(String s, String s1, String s2) throws SAXException {
-      inDtd = true;
-    }
-
-    public void endDTD() throws SAXException {
-      inDtd = false;
-    }
-
-    public void comment(char[] chars, int start, int length) throws SAXException {
-      if (!inDtd)
-        ((CommentHandler)xr.getContentHandler()).comment(new String(chars, start, length));
-    }
-  }
-
-  private ParsedNameClass expandName(String name, String ns, Annotations anno) throws SAXException {
-    int ic = name.indexOf(':');
-    if (ic == -1)
-      return nameClassBuilder.makeName(ns, checkNCName(name), null, null, anno);
-    String prefix = checkNCName(name.substring(0, ic));
-    String localName = checkNCName(name.substring(ic + 1));
-    for (PrefixMapping tem = context.prefixMapping; tem != null; tem = tem.next)
-      if (tem.prefix.equals(prefix))
-        return nameClassBuilder.makeName(tem.uri, localName, prefix, null, anno);
-    error("undefined_prefix", prefix);
-    return nameClassBuilder.makeName("", localName, null, null, anno);
-  }
-
-  private String findPrefix(String qName, String uri) {
-    String prefix = null;
-    if (qName == null || qName.equals("")) {
-      for (PrefixMapping p = context.prefixMapping; p != null; p = p.next)
-        if (p.uri.equals(uri)) {
-          prefix = p.prefix;
-          break;
+        PrefixMapping(String prefix, String uri, PrefixMapping next) {
+            this.prefix = prefix;
+            this.uri = uri;
+            this.next = next;
         }
     }
-    else {
-      int off = qName.indexOf(':');
-      if (off > 0)
-        prefix = qName.substring(0, off);
+
+    static abstract class AbstractContext extends DtdContext implements Context {
+
+        PrefixMapping prefixMapping;
+
+        AbstractContext() {
+            prefixMapping = new PrefixMapping("xml", WellKnownNamespaces.XML, null);
+        }
+
+        AbstractContext(AbstractContext context) {
+            super(context);
+            prefixMapping = context.prefixMapping;
+        }
+
+        public String resolveNamespacePrefix(String prefix) {
+            for (PrefixMapping p = prefixMapping; p != null; p = p.next) {
+                if (p.prefix.equals(prefix)) {
+                    return p.uri;
+                }
+            }
+            return null;
+        }
+
+        public Enumeration prefixes() {
+            Vector v = new Vector();
+            for (PrefixMapping p = prefixMapping; p != null; p = p.next) {
+                if (!v.contains(p.prefix)) {
+                    v.addElement(p.prefix);
+                }
+            }
+            return v.elements();
+        }
+
+        public Context copy() {
+            return new SavedContext(this);
+        }
     }
-    return prefix;
-  }
-  private String checkNCName(String str) throws SAXException {
-    if (!Naming.isNcname(str))
-      error("invalid_ncname", str);
-    return str;
-  }
 
-  private String resolve(String systemId) throws SAXException {
-    if (Uri.hasFragmentId(systemId))
-      error("href_fragment_id");
-    systemId = Uri.escapeDisallowedChars(systemId);
-    return Uri.resolve(xmlBaseHandler.getBaseUri(), systemId);
-  }
+    static class SavedContext extends AbstractContext {
 
-  private Location makeLocation() {
-    if (locator == null)
-      return null;
-    return schemaBuilder.makeLocation(locator.getSystemId(),
-                                      locator.getLineNumber(),
-                                      locator.getColumnNumber());
-  }
+        private final String baseUri;
 
-  private void checkUri(String s) throws SAXException {
-    if (!Uri.isValid(s))
-      error("invalid_uri", s);
-  }
+        SavedContext(AbstractContext context) {
+            super(context);
+            this.baseUri = context.getBaseUri();
+        }
+
+        public String getBaseUri() {
+            return baseUri;
+        }
+    }
+
+    class ContextImpl extends AbstractContext {
+
+        public String getBaseUri() {
+            return xmlBaseHandler.getBaseUri();
+        }
+    }
+
+    static interface CommentHandler {
+
+        void comment(String value);
+    }
+
+    abstract class Handler implements ContentHandler, CommentHandler {
+
+        CommentList comments;
+
+        CommentList getComments() {
+            CommentList tem = comments;
+            comments = null;
+            return tem;
+        }
+
+        public void comment(String value) {
+            if (comments == null) {
+                comments = schemaBuilder.makeCommentList();
+            }
+            comments.addComment(value, makeLocation());
+        }
+
+        public void processingInstruction(String target, String date) {
+        }
+
+        public void skippedEntity(String name) {
+        }
+
+        public void ignorableWhitespace(char[] ch, int start, int len) {
+        }
+
+        public void startDocument() {
+        }
+
+        public void endDocument() {
+        }
+
+        public void startPrefixMapping(String prefix, String uri) {
+            context.prefixMapping = new PrefixMapping(prefix, uri, context.prefixMapping);
+        }
+
+        public void endPrefixMapping(String prefix) {
+            context.prefixMapping = context.prefixMapping.next;
+        }
+
+        public void setDocumentLocator(Locator loc) {
+            locator = loc;
+            xmlBaseHandler.setLocator(loc);
+        }
+    }
+
+    abstract class State extends Handler {
+
+        State parent;
+        String nsInherit;
+        String ns;
+        String datatypeLibrary;
+        /**
+         * The current scope, or null if there's none.
+         */
+        Scope scope;
+        Location startLocation;
+        Annotations annotations;
+
+        void set() {
+            xr.setContentHandler(this);
+        }
+
+        abstract State create();
+
+        abstract State createChildState(String localName) throws SAXException;
+
+        void setParent(State parent) {
+            this.parent = parent;
+            this.nsInherit = parent.getNs();
+            this.datatypeLibrary = parent.datatypeLibrary;
+            this.scope = parent.scope;
+            this.startLocation = makeLocation();
+            if (parent.comments != null) {
+                annotations = schemaBuilder.makeAnnotations(parent.comments, getContext());
+                parent.comments = null;
+            } else if (parent instanceof RootState) {
+                annotations = schemaBuilder.makeAnnotations(null, getContext());
+            }
+        }
+
+        String getNs() {
+            return ns == null ? nsInherit : ns;
+        }
+
+        boolean isRelaxNGElement(String uri) throws SAXException {
+            return uri.equals(relaxngURI);
+        }
+
+        public void startElement(String namespaceURI,
+                String localName,
+                String qName,
+                Attributes atts) throws SAXException {
+            xmlBaseHandler.startElement();
+            if (isRelaxNGElement(namespaceURI)) {
+                State state = createChildState(localName);
+                if (state == null) {
+                    xr.setContentHandler(new Skipper(this));
+                    return;
+                }
+                state.setParent(this);
+                state.set();
+                state.attributes(atts);
+            } else {
+                checkForeignElement();
+                ForeignElementHandler feh = new ForeignElementHandler(this, getComments());
+                feh.startElement(namespaceURI, localName, qName, atts);
+                xr.setContentHandler(feh);
+            }
+        }
+
+        public void endElement(String namespaceURI,
+                String localName,
+                String qName) throws SAXException {
+            xmlBaseHandler.endElement();
+            parent.set();
+            end();
+        }
+
+        void setName(String name) throws SAXException {
+            error("illegal_name_attribute");
+        }
+
+        void setOtherAttribute(String name, String value) throws SAXException {
+            error("illegal_attribute_ignored", name);
+        }
+
+        void endAttributes() throws SAXException {
+        }
+
+        void checkForeignElement() throws SAXException {
+        }
+
+        void attributes(Attributes atts) throws SAXException {
+            int len = atts.getLength();
+            for (int i = 0; i < len; i++) {
+                String uri = atts.getURI(i);
+                if (uri.length() == 0) {
+                    String name = atts.getLocalName(i);
+                    if (name.equals("name")) {
+                        setName(atts.getValue(i).trim());
+                    } else if (name.equals("ns")) {
+                        ns = atts.getValue(i);
+                    } else if (name.equals("datatypeLibrary")) {
+                        datatypeLibrary = atts.getValue(i);
+                        checkUri(datatypeLibrary);
+                        if (!datatypeLibrary.equals("")
+                                && !Uri.isAbsolute(datatypeLibrary)) {
+                            error("relative_datatype_library");
+                        }
+                        if (Uri.hasFragmentId(datatypeLibrary)) {
+                            error("fragment_identifier_datatype_library");
+                        }
+                        datatypeLibrary = Uri.escapeDisallowedChars(datatypeLibrary);
+                    } else {
+                        setOtherAttribute(name, atts.getValue(i));
+                    }
+                } else if (uri.equals(relaxngURI)) {
+                    error("qualified_attribute", atts.getLocalName(i));
+                } else if (uri.equals(WellKnownNamespaces.XML)
+                        && atts.getLocalName(i).equals("base")) {
+                    xmlBaseHandler.xmlBaseAttribute(atts.getValue(i));
+                } else {
+                    if (annotations == null) {
+                        annotations = schemaBuilder.makeAnnotations(null, getContext());
+                    }
+                    annotations.addAttribute(uri, atts.getLocalName(i), findPrefix(atts.getQName(i), uri),
+                            atts.getValue(i), startLocation);
+                }
+            }
+            endAttributes();
+        }
+
+        abstract void end() throws SAXException;
+
+        void endChild(ParsedPattern pattern) {
+            // XXX cannot happen; throw exception
+        }
+
+        void endChild(ParsedNameClass nc) {
+            // XXX cannot happen; throw exception
+        }
+
+        @Override
+        public void startDocument() {
+        }
+
+        @Override
+        public void endDocument() {
+            if (comments != null && startPattern != null) {
+                startPattern = schemaBuilder.commentAfter(startPattern, comments);
+                comments = null;
+            }
+        }
+
+        public void characters(char[] ch, int start, int len) throws SAXException {
+            for (int i = 0; i < len; i++) {
+                switch (ch[start + i]) {
+                    case ' ':
+                    case '\r':
+                    case '\n':
+                    case '\t':
+                        break;
+                    default:
+                        error("illegal_characters_ignored");
+                        break;
+                }
+            }
+        }
+
+        boolean isPatternNamespaceURI(String s) {
+            return s.equals(relaxngURI);
+        }
+
+        void endForeignChild(ParsedElementAnnotation ea) {
+            if (annotations == null) {
+                annotations = schemaBuilder.makeAnnotations(null, getContext());
+            }
+            annotations.addElement(ea);
+        }
+
+        void mergeLeadingComments() {
+            if (comments != null) {
+                if (annotations == null) {
+                    annotations = schemaBuilder.makeAnnotations(comments, getContext());
+                } else {
+                    annotations.addLeadingComment(comments);
+                }
+                comments = null;
+            }
+        }
+    }
+
+    class ForeignElementHandler extends Handler {
+
+        final State nextState;
+        ElementAnnotationBuilder builder;
+        final Stack builderStack = new Stack();
+        StringBuffer textBuf;
+        Location textLoc;
+
+        ForeignElementHandler(State nextState, CommentList comments) {
+            this.nextState = nextState;
+            this.comments = comments;
+        }
+
+        public void startElement(String namespaceURI, String localName,
+                String qName, Attributes atts) {
+            flushText();
+            if (builder != null) {
+                builderStack.push(builder);
+            }
+            Location loc = makeLocation();
+            builder = schemaBuilder.makeElementAnnotationBuilder(namespaceURI,
+                    localName,
+                    findPrefix(qName, namespaceURI),
+                    loc,
+                    getComments(),
+                    getContext());
+            int len = atts.getLength();
+            for (int i = 0; i < len; i++) {
+                String uri = atts.getURI(i);
+                builder.addAttribute(uri, atts.getLocalName(i), findPrefix(atts.getQName(i), uri),
+                        atts.getValue(i), loc);
+            }
+        }
+
+        public void endElement(String namespaceURI, String localName,
+                String qName) {
+            flushText();
+            if (comments != null) {
+                builder.addComment(getComments());
+            }
+            ParsedElementAnnotation ea = builder.makeElementAnnotation();
+            if (builderStack.empty()) {
+                nextState.endForeignChild(ea);
+                nextState.set();
+            } else {
+                builder = (ElementAnnotationBuilder) builderStack.pop();
+                builder.addElement(ea);
+            }
+        }
+
+        public void characters(char ch[], int start, int length) {
+            if (textBuf == null) {
+                textBuf = new StringBuffer();
+            }
+            textBuf.append(ch, start, length);
+            if (textLoc == null) {
+                textLoc = makeLocation();
+            }
+        }
+
+        @Override
+        public void comment(String value) {
+            flushText();
+            super.comment(value);
+        }
+
+        void flushText() {
+            if (textBuf != null && textBuf.length() != 0) {
+                builder.addText(textBuf.toString(), textLoc, getComments());
+                textBuf.setLength(0);
+            }
+            textLoc = null;
+        }
+    }
+
+    static class Skipper extends DefaultHandler implements CommentHandler {
+
+        int level = 1;
+        final State nextState;
+
+        Skipper(State nextState) {
+            this.nextState = nextState;
+        }
+
+        @Override
+        public void startElement(String namespaceURI,
+                String localName,
+                String qName,
+                Attributes atts) throws SAXException {
+            ++level;
+        }
+
+        @Override
+        public void endElement(String namespaceURI,
+                String localName,
+                String qName) throws SAXException {
+            if (--level == 0) {
+                nextState.set();
+            }
+        }
+
+        public void comment(String value) {
+        }
+    }
+
+    abstract class EmptyContentState extends State {
+
+        State createChildState(String localName) throws SAXException {
+            error("expected_empty", localName);
+            return null;
+        }
+
+        abstract ParsedPattern makePattern() throws SAXException;
+
+        void end() throws SAXException {
+            if (comments != null) {
+                if (annotations == null) {
+                    annotations = schemaBuilder.makeAnnotations(null, getContext());
+                }
+                annotations.addComment(comments);
+                comments = null;
+            }
+            parent.endChild(makePattern());
+        }
+    }
+    static private final int INIT_CHILD_ALLOC = 5;
+
+    abstract class PatternContainerState extends State {
+
+        List<ParsedPattern> childPatterns;
+
+        State createChildState(String localName) throws SAXException {
+            State state = (State) patternTable.get(localName);
+            if (state == null) {
+                error("expected_pattern", localName);
+                return null;
+            }
+            return state.create();
+        }
+
+        ParsedPattern buildPattern(List<ParsedPattern> patterns, Location loc, Annotations anno) throws SAXException {
+            if (patterns.size() == 1 && anno == null) {
+                return patterns.get(0);
+            }
+            return schemaBuilder.makeGroup(patterns, loc, anno);
+        }
+
+        @Override
+        void endChild(ParsedPattern pattern) {
+            if (childPatterns == null) {
+                childPatterns = new ArrayList<ParsedPattern>(INIT_CHILD_ALLOC);
+            }
+            childPatterns.add(pattern);
+        }
+
+        @Override
+        void endForeignChild(ParsedElementAnnotation ea) {
+            // Harshit : Annotation handling should always be taken care of, irrespective of childPatterns being null or not.
+            super.endForeignChild(ea);
+            if (childPatterns != null) {
+                int idx = childPatterns.size() - 1;
+                childPatterns.set(idx, schemaBuilder.annotateAfter(childPatterns.get(idx), ea));
+            }
+        }
+
+        void end() throws SAXException {
+            if (childPatterns == null) {
+                error("missing_children");
+                endChild(schemaBuilder.makeErrorPattern());
+            }
+            if (comments != null) {
+                int idx = childPatterns.size() - 1;
+                childPatterns.set(idx, schemaBuilder.commentAfter(childPatterns.get(idx), comments));
+                comments = null;
+            }
+            sendPatternToParent(buildPattern(childPatterns, startLocation, annotations));
+        }
+
+        void sendPatternToParent(ParsedPattern p) {
+            parent.endChild(p);
+        }
+    }
+
+    class GroupState extends PatternContainerState {
+
+        State create() {
+            return new GroupState();
+        }
+    }
+
+    class ZeroOrMoreState extends PatternContainerState {
+
+        State create() {
+            return new ZeroOrMoreState();
+        }
+
+        @Override
+        ParsedPattern buildPattern(List<ParsedPattern> patterns, Location loc, Annotations anno) throws SAXException {
+            return schemaBuilder.makeZeroOrMore(super.buildPattern(patterns, loc, null), loc, anno);
+        }
+    }
+
+    class OneOrMoreState extends PatternContainerState {
+
+        State create() {
+            return new OneOrMoreState();
+        }
+
+        @Override
+        ParsedPattern buildPattern(List<ParsedPattern> patterns, Location loc, Annotations anno) throws SAXException {
+            return schemaBuilder.makeOneOrMore(super.buildPattern(patterns, loc, null), loc, anno);
+        }
+    }
+
+    class OptionalState extends PatternContainerState {
+
+        State create() {
+            return new OptionalState();
+        }
+
+        @Override
+        ParsedPattern buildPattern(List<ParsedPattern> patterns, Location loc, Annotations anno) throws SAXException {
+            return schemaBuilder.makeOptional(super.buildPattern(patterns, loc, null), loc, anno);
+        }
+    }
+
+    class ListState extends PatternContainerState {
+
+        State create() {
+            return new ListState();
+        }
+
+        @Override
+        ParsedPattern buildPattern(List<ParsedPattern> patterns, Location loc, Annotations anno) throws SAXException {
+            return schemaBuilder.makeList(super.buildPattern(patterns, loc, null), loc, anno);
+        }
+    }
+
+    class ChoiceState extends PatternContainerState {
+
+        State create() {
+            return new ChoiceState();
+        }
+
+        @Override
+        ParsedPattern buildPattern(List<ParsedPattern> patterns, Location loc, Annotations anno) throws SAXException {
+            return schemaBuilder.makeChoice(patterns, loc, anno);
+        }
+    }
+
+    class InterleaveState extends PatternContainerState {
+
+        State create() {
+            return new InterleaveState();
+        }
+
+        @Override
+        ParsedPattern buildPattern(List<ParsedPattern> patterns, Location loc, Annotations anno) {
+            return schemaBuilder.makeInterleave(patterns, loc, anno);
+        }
+    }
+
+    class MixedState extends PatternContainerState {
+
+        State create() {
+            return new MixedState();
+        }
+
+        @Override
+        ParsedPattern buildPattern(List<ParsedPattern> patterns, Location loc, Annotations anno) throws SAXException {
+            return schemaBuilder.makeMixed(super.buildPattern(patterns, loc, null), loc, anno);
+        }
+    }
+
+    static interface NameClassRef {
+
+        void setNameClass(ParsedNameClass nc);
+    }
+
+    class ElementState extends PatternContainerState implements NameClassRef {
+
+        ParsedNameClass nameClass;
+        boolean nameClassWasAttribute;
+        String name;
+
+        @Override
+        void setName(String name) {
+            this.name = name;
+        }
+
+        public void setNameClass(ParsedNameClass nc) {
+            nameClass = nc;
+        }
+
+        @Override
+        void endAttributes() throws SAXException {
+            if (name != null) {
+                nameClass = expandName(name, getNs(), null);
+                nameClassWasAttribute = true;
+            } else {
+                new NameClassChildState(this, this).set();
+            }
+        }
+
+        State create() {
+            return new ElementState();
+        }
+
+        @Override
+        ParsedPattern buildPattern(List<ParsedPattern> patterns, Location loc, Annotations anno) throws SAXException {
+            return schemaBuilder.makeElement(nameClass, super.buildPattern(patterns, loc, null), loc, anno);
+        }
+
+        @Override
+        void endForeignChild(ParsedElementAnnotation ea) {
+            if (nameClassWasAttribute || childPatterns != null || nameClass == null) {
+                super.endForeignChild(ea);
+            } else {
+                nameClass = nameClassBuilder.annotateAfter(nameClass, ea);
+            }
+        }
+    }
+
+    class RootState extends PatternContainerState {
+
+        IncludedGrammar grammar;
+
+        RootState() {
+        }
+
+        RootState(IncludedGrammar grammar, Scope scope, String ns) {
+            this.grammar = grammar;
+            this.scope = scope;
+            this.nsInherit = ns;
+            this.datatypeLibrary = "";
+        }
+
+        State create() {
+            return new RootState();
+        }
+
+        @Override
+        State createChildState(String localName) throws SAXException {
+            if (grammar == null) {
+                return super.createChildState(localName);
+            }
+            if (localName.equals("grammar")) {
+                return new MergeGrammarState(grammar);
+            }
+            error("expected_grammar", localName);
+            return null;
+        }
+
+        @Override
+        void checkForeignElement() throws SAXException {
+            error("root_bad_namespace_uri", WellKnownNamespaces.RELAX_NG);
+        }
+
+        @Override
+        void endChild(ParsedPattern pattern) {
+            startPattern = pattern;
+        }
+
+        @Override
+        boolean isRelaxNGElement(String uri) throws SAXException {
+            if (!uri.startsWith(relaxngURIPrefix)) {
+                return false;
+            }
+            if (!uri.equals(WellKnownNamespaces.RELAX_NG)) {
+                warning("wrong_uri_version",
+                        WellKnownNamespaces.RELAX_NG.substring(relaxngURIPrefix.length()),
+                        uri.substring(relaxngURIPrefix.length()));
+            }
+            relaxngURI = uri;
+            return true;
+        }
+    }
+
+    class NotAllowedState extends EmptyContentState {
+
+        State create() {
+            return new NotAllowedState();
+        }
+
+        ParsedPattern makePattern() {
+            return schemaBuilder.makeNotAllowed(startLocation, annotations);
+        }
+    }
+
+    class EmptyState extends EmptyContentState {
+
+        State create() {
+            return new EmptyState();
+        }
+
+        ParsedPattern makePattern() {
+            return schemaBuilder.makeEmpty(startLocation, annotations);
+        }
+    }
+
+    class TextState extends EmptyContentState {
+
+        State create() {
+            return new TextState();
+        }
+
+        ParsedPattern makePattern() {
+            return schemaBuilder.makeText(startLocation, annotations);
+        }
+    }
+
+    class ValueState extends EmptyContentState {
+
+        final StringBuffer buf = new StringBuffer();
+        String type;
+
+        State create() {
+            return new ValueState();
+        }
+
+        @Override
+        void setOtherAttribute(String name, String value) throws SAXException {
+            if (name.equals("type")) {
+                type = checkNCName(value.trim());
+            } else {
+                super.setOtherAttribute(name, value);
+            }
+        }
+
+        @Override
+        public void characters(char[] ch, int start, int len) {
+            buf.append(ch, start, len);
+        }
+
+        @Override
+        void checkForeignElement() throws SAXException {
+            error("value_contains_foreign_element");
+        }
+
+        ParsedPattern makePattern() throws SAXException {
+            if (type == null) {
+                return makePattern("", "token");
+            } else {
+                return makePattern(datatypeLibrary, type);
+            }
+        }
+
+        @Override
+        void end() throws SAXException {
+            mergeLeadingComments();
+            super.end();
+        }
+
+        ParsedPattern makePattern(String datatypeLibrary, String type) {
+            return schemaBuilder.makeValue(datatypeLibrary,
+                    type,
+                    buf.toString(),
+                    getContext(),
+                    getNs(),
+                    startLocation,
+                    annotations);
+        }
+    }
+
+    class DataState extends State {
+
+        String type;
+        ParsedPattern except = null;
+        DataPatternBuilder dpb = null;
+
+        State create() {
+            return new DataState();
+        }
+
+        State createChildState(String localName) throws SAXException {
+            if (localName.equals("param")) {
+                if (except != null) {
+                    error("param_after_except");
+                }
+                return new ParamState(dpb);
+            }
+            if (localName.equals("except")) {
+                if (except != null) {
+                    error("multiple_except");
+                }
+                return new ChoiceState();
+            }
+            error("expected_param_except", localName);
+            return null;
+        }
+
+        @Override
+        void setOtherAttribute(String name, String value) throws SAXException {
+            if (name.equals("type")) {
+                type = checkNCName(value.trim());
+            } else {
+                super.setOtherAttribute(name, value);
+            }
+        }
+
+        @Override
+        void endAttributes() throws SAXException {
+            if (type == null) {
+                error("missing_type_attribute");
+            } else {
+                dpb = schemaBuilder.makeDataPatternBuilder(datatypeLibrary, type, startLocation);
+            }
+        }
+
+        void end() throws SAXException {
+            ParsedPattern p;
+            if (dpb != null) {
+                if (except != null) {
+                    p = dpb.makePattern(except, startLocation, annotations);
+                } else {
+                    p = dpb.makePattern(startLocation, annotations);
+                }
+            } else {
+                p = schemaBuilder.makeErrorPattern();
+            }
+            // XXX need to capture comments
+            parent.endChild(p);
+        }
+
+        @Override
+        void endChild(ParsedPattern pattern) {
+            except = pattern;
+        }
+    }
+
+    class ParamState extends State {
+
+        private final StringBuffer buf = new StringBuffer();
+        private final DataPatternBuilder dpb;
+        private String name;
+
+        ParamState(DataPatternBuilder dpb) {
+            this.dpb = dpb;
+        }
+
+        State create() {
+            return new ParamState(null);
+        }
+
+        @Override
+        void setName(String name) throws SAXException {
+            this.name = checkNCName(name);
+        }
+
+        @Override
+        void endAttributes() throws SAXException {
+            if (name == null) {
+                error("missing_name_attribute");
+            }
+        }
+
+        State createChildState(String localName) throws SAXException {
+            error("expected_empty", localName);
+            return null;
+        }
+
+        @Override
+        public void characters(char[] ch, int start, int len) {
+            buf.append(ch, start, len);
+        }
+
+        @Override
+        void checkForeignElement() throws SAXException {
+            error("param_contains_foreign_element");
+        }
+
+        void end() throws SAXException {
+            if (name == null) {
+                return;
+            }
+            if (dpb == null) {
+                return;
+            }
+            mergeLeadingComments();
+            dpb.addParam(name, buf.toString(), getContext(), getNs(), startLocation, annotations);
+        }
+    }
+
+    class AttributeState extends PatternContainerState implements NameClassRef {
+
+        ParsedNameClass nameClass;
+        boolean nameClassWasAttribute;
+        String name;
+
+        State create() {
+            return new AttributeState();
+        }
+
+        @Override
+        void setName(String name) {
+            this.name = name;
+        }
+
+        public void setNameClass(ParsedNameClass nc) {
+            nameClass = nc;
+        }
+
+        @Override
+        void endAttributes() throws SAXException {
+            if (name != null) {
+                String nsUse;
+                if (ns != null) {
+                    nsUse = ns;
+                } else {
+                    nsUse = "";
+                }
+                nameClass = expandName(name, nsUse, null);
+                nameClassWasAttribute = true;
+            } else {
+                new NameClassChildState(this, this).set();
+            }
+        }
+
+        @Override
+        void endForeignChild(ParsedElementAnnotation ea) {
+            if (nameClassWasAttribute || childPatterns != null || nameClass == null) {
+                super.endForeignChild(ea);
+            } else {
+                nameClass = nameClassBuilder.annotateAfter(nameClass, ea);
+            }
+        }
+
+        @Override
+        void end() throws SAXException {
+            if (childPatterns == null) {
+                endChild(schemaBuilder.makeText(startLocation, null));
+            }
+            super.end();
+        }
+
+        @Override
+        ParsedPattern buildPattern(List<ParsedPattern> patterns, Location loc, Annotations anno) throws SAXException {
+            return schemaBuilder.makeAttribute(nameClass, super.buildPattern(patterns, loc, null), loc, anno);
+        }
+
+        @Override
+        State createChildState(String localName) throws SAXException {
+            State tem = super.createChildState(localName);
+            if (tem != null && childPatterns != null) {
+                error("attribute_multi_pattern");
+            }
+            return tem;
+        }
+    }
+
+    abstract class SinglePatternContainerState extends PatternContainerState {
+
+        @Override
+        State createChildState(String localName) throws SAXException {
+            if (childPatterns == null) {
+                return super.createChildState(localName);
+            }
+            error("too_many_children");
+            return null;
+        }
+    }
+
+    class GrammarSectionState extends State {
+
+        GrammarSection section;
+
+        GrammarSectionState() {
+        }
+
+        GrammarSectionState(GrammarSection section) {
+            this.section = section;
+        }
+
+        State create() {
+            return new GrammarSectionState(null);
+        }
+
+        State createChildState(String localName) throws SAXException {
+            if (localName.equals("define")) {
+                return new DefineState(section);
+            }
+            if (localName.equals("start")) {
+                return new StartState(section);
+            }
+            if (localName.equals("include")) {
+                Include include = section.makeInclude();
+                if (include != null) {
+                    return new IncludeState(include);
+                }
+            }
+            if (localName.equals("div")) {
+                return new DivState(section.makeDiv());
+            }
+            error("expected_define", localName);
+            // XXX better errors
+            return null;
+        }
+
+        void end() throws SAXException {
+            if (comments != null) {
+                section.topLevelComment(comments);
+                comments = null;
+            }
+        }
+
+        @Override
+        void endForeignChild(ParsedElementAnnotation ea) {
+            section.topLevelAnnotation(ea);
+        }
+    }
+
+    class DivState extends GrammarSectionState {
+
+        final Div div;
+
+        DivState(Div div) {
+            super(div);
+            this.div = div;
+        }
+
+        @Override
+        void end() throws SAXException {
+            super.end();
+            div.endDiv(startLocation, annotations);
+        }
+    }
+
+    class IncludeState extends GrammarSectionState {
+
+        String href;
+        final Include include;
+
+        IncludeState(Include include) {
+            super(include);
+            this.include = include;
+        }
+
+        @Override
+        void setOtherAttribute(String name, String value) throws SAXException {
+            if (name.equals("href")) {
+                href = value;
+                checkUri(href);
+            } else {
+                super.setOtherAttribute(name, value);
+            }
+        }
+
+        @Override
+        void endAttributes() throws SAXException {
+            if (href == null) {
+                error("missing_href_attribute");
+            } else {
+                href = resolve(href);
+            }
+        }
+
+        @Override
+        void end() throws SAXException {
+            super.end();
+            if (href != null) {
+                try {
+                    include.endInclude(parseable, href, getNs(), startLocation, annotations);
+                } catch (IllegalSchemaException e) {
+                }
+            }
+        }
+    }
+
+    class MergeGrammarState extends GrammarSectionState {
+
+        final IncludedGrammar grammar;
+
+        MergeGrammarState(IncludedGrammar grammar) {
+            super(grammar);
+            this.grammar = grammar;
+        }
+
+        @Override
+        void end() throws SAXException {
+            super.end();
+            parent.endChild(grammar.endIncludedGrammar(startLocation, annotations));
+        }
+    }
+
+    class GrammarState extends GrammarSectionState {
+
+        Grammar grammar;
+
+        @Override
+        void setParent(State parent) {
+            super.setParent(parent);
+            grammar = schemaBuilder.makeGrammar(scope);
+            section = grammar;
+            scope = grammar;
+        }
+
+        @Override
+        State create() {
+            return new GrammarState();
+        }
+
+        @Override
+        void end() throws SAXException {
+            super.end();
+            parent.endChild(grammar.endGrammar(startLocation, annotations));
+        }
+    }
+
+    class RefState extends EmptyContentState {
+
+        String name;
+
+        State create() {
+            return new RefState();
+        }
+
+        @Override
+        void endAttributes() throws SAXException {
+            if (name == null) {
+                error("missing_name_attribute");
+            }
+        }
+
+        @Override
+        void setName(String name) throws SAXException {
+            this.name = checkNCName(name);
+        }
+
+        ParsedPattern makePattern() throws SAXException {
+            if (name == null) {
+                return schemaBuilder.makeErrorPattern();
+            }
+            if (scope == null) {
+                error("ref_outside_grammar", name);
+                return schemaBuilder.makeErrorPattern();
+            } else {
+                return scope.makeRef(name, startLocation, annotations);
+            }
+        }
+    }
+
+    class ParentRefState extends RefState {
+
+        @Override
+        State create() {
+            return new ParentRefState();
+        }
+
+        @Override
+        ParsedPattern makePattern() throws SAXException {
+            if (name == null) {
+                return schemaBuilder.makeErrorPattern();
+            }
+            if (scope == null) {
+                error("parent_ref_outside_grammar", name);
+                return schemaBuilder.makeErrorPattern();
+            } else {
+                return scope.makeParentRef(name, startLocation, annotations);
+            }
+        }
+    }
+
+    class ExternalRefState extends EmptyContentState {
+
+        String href;
+
+        State create() {
+            return new ExternalRefState();
+        }
+
+        @Override
+        void setOtherAttribute(String name, String value) throws SAXException {
+            if (name.equals("href")) {
+                href = value;
+                checkUri(href);
+            } else {
+                super.setOtherAttribute(name, value);
+            }
+        }
+
+        @Override
+        void endAttributes() throws SAXException {
+            if (href == null) {
+                error("missing_href_attribute");
+            } else {
+                href = resolve(href);
+            }
+        }
+
+        ParsedPattern makePattern() {
+            if (href != null) {
+                try {
+                    return schemaBuilder.makeExternalRef(parseable,
+                            href,
+                            getNs(),
+                            scope,
+                            startLocation,
+                            annotations);
+                } catch (IllegalSchemaException e) {
+                }
+            }
+            return schemaBuilder.makeErrorPattern();
+        }
+    }
+
+    abstract class DefinitionState extends PatternContainerState {
+
+        GrammarSection.Combine combine = null;
+        final GrammarSection section;
+
+        DefinitionState(GrammarSection section) {
+            this.section = section;
+        }
+
+        @Override
+        void setOtherAttribute(String name, String value) throws SAXException {
+            if (name.equals("combine")) {
+                value = value.trim();
+                if (value.equals("choice")) {
+                    combine = GrammarSection.COMBINE_CHOICE;
+                } else if (value.equals("interleave")) {
+                    combine = GrammarSection.COMBINE_INTERLEAVE;
+                } else {
+                    error("combine_attribute_bad_value", value);
+                }
+            } else {
+                super.setOtherAttribute(name, value);
+            }
+        }
+
+        @Override
+        ParsedPattern buildPattern(List<ParsedPattern> patterns, Location loc, Annotations anno) throws SAXException {
+            return super.buildPattern(patterns, loc, null);
+        }
+    }
+
+    class DefineState extends DefinitionState {
+
+        String name;
+
+        DefineState(GrammarSection section) {
+            super(section);
+        }
+
+        State create() {
+            return new DefineState(null);
+        }
+
+        @Override
+        void setName(String name) throws SAXException {
+            this.name = checkNCName(name);
+        }
+
+        @Override
+        void endAttributes() throws SAXException {
+            if (name == null) {
+                error("missing_name_attribute");
+            }
+        }
+
+        @Override
+        void sendPatternToParent(ParsedPattern p) {
+            if (name != null) {
+                section.define(name, combine, p, startLocation, annotations);
+            }
+        }
+    }
+
+    class StartState extends DefinitionState {
+
+        StartState(GrammarSection section) {
+            super(section);
+        }
+
+        State create() {
+            return new StartState(null);
+        }
+
+        @Override
+        void sendPatternToParent(ParsedPattern p) {
+            section.define(GrammarSection.START, combine, p, startLocation, annotations);
+        }
+
+        @Override
+        State createChildState(String localName) throws SAXException {
+            State tem = super.createChildState(localName);
+            if (tem != null && childPatterns != null) {
+                error("start_multi_pattern");
+            }
+            return tem;
+        }
+    }
+
+    abstract class NameClassContainerState extends State {
+
+        State createChildState(String localName) throws SAXException {
+            State state = (State) nameClassTable.get(localName);
+            if (state == null) {
+                error("expected_name_class", localName);
+                return null;
+            }
+            return state.create();
+        }
+    }
+
+    class NameClassChildState extends NameClassContainerState {
+
+        final State prevState;
+        final NameClassRef nameClassRef;
+
+        State create() {
+            return null;
+        }
+
+        NameClassChildState(State prevState, NameClassRef nameClassRef) {
+            this.prevState = prevState;
+            this.nameClassRef = nameClassRef;
+            setParent(prevState.parent);
+            this.ns = prevState.ns;
+        }
+
+        @Override
+        void endChild(ParsedNameClass nameClass) {
+            nameClassRef.setNameClass(nameClass);
+            prevState.set();
+        }
+
+        @Override
+        void endForeignChild(ParsedElementAnnotation ea) {
+            prevState.endForeignChild(ea);
+        }
+
+        void end() throws SAXException {
+            nameClassRef.setNameClass(nameClassBuilder.makeErrorNameClass());
+            error("missing_name_class");
+            prevState.set();
+            prevState.end();
+        }
+    }
+
+    abstract class NameClassBaseState extends State {
+
+        abstract ParsedNameClass makeNameClass() throws SAXException;
+
+        void end() throws SAXException {
+            parent.endChild(makeNameClass());
+        }
+    }
+
+    class NameState extends NameClassBaseState {
+
+        final StringBuffer buf = new StringBuffer();
+
+        State createChildState(String localName) throws SAXException {
+            error("expected_name", localName);
+            return null;
+        }
+
+        State create() {
+            return new NameState();
+        }
+
+        @Override
+        public void characters(char[] ch, int start, int len) {
+            buf.append(ch, start, len);
+        }
+
+        @Override
+        void checkForeignElement() throws SAXException {
+            error("name_contains_foreign_element");
+        }
+
+        ParsedNameClass makeNameClass() throws SAXException {
+            mergeLeadingComments();
+            return expandName(buf.toString().trim(), getNs(), annotations);
+        }
+    }
+    private static final int PATTERN_CONTEXT = 0;
+    private static final int ANY_NAME_CONTEXT = 1;
+    private static final int NS_NAME_CONTEXT = 2;
+    private SAXParseable parseable;
+
+    class AnyNameState extends NameClassBaseState {
+
+        ParsedNameClass except = null;
+
+        State create() {
+            return new AnyNameState();
+        }
+
+        State createChildState(String localName) throws SAXException {
+            if (localName.equals("except")) {
+                if (except != null) {
+                    error("multiple_except");
+                }
+                return new NameClassChoiceState(getContext());
+            }
+            error("expected_except", localName);
+            return null;
+        }
+
+        int getContext() {
+            return ANY_NAME_CONTEXT;
+        }
+
+        ParsedNameClass makeNameClass() {
+            if (except == null) {
+                return makeNameClassNoExcept();
+            } else {
+                return makeNameClassExcept(except);
+            }
+        }
+
+        ParsedNameClass makeNameClassNoExcept() {
+            return nameClassBuilder.makeAnyName(startLocation, annotations);
+        }
+
+        ParsedNameClass makeNameClassExcept(ParsedNameClass except) {
+            return nameClassBuilder.makeAnyName(except, startLocation, annotations);
+        }
+
+        @Override
+        void endChild(ParsedNameClass nameClass) {
+            except = nameClass;
+        }
+    }
+
+    class NsNameState extends AnyNameState {
+
+        @Override
+        State create() {
+            return new NsNameState();
+        }
+
+        @Override
+        ParsedNameClass makeNameClassNoExcept() {
+            return nameClassBuilder.makeNsName(getNs(), null, null);
+        }
+
+        @Override
+        ParsedNameClass makeNameClassExcept(ParsedNameClass except) {
+            return nameClassBuilder.makeNsName(getNs(), except, null, null);
+        }
+
+        @Override
+        int getContext() {
+            return NS_NAME_CONTEXT;
+        }
+    }
+
+    class NameClassChoiceState extends NameClassContainerState {
+
+        private ParsedNameClass[] nameClasses;
+        private int nNameClasses;
+        private int context;
+
+        NameClassChoiceState() {
+            this.context = PATTERN_CONTEXT;
+        }
+
+        NameClassChoiceState(int context) {
+            this.context = context;
+        }
+
+        @Override
+        void setParent(State parent) {
+            super.setParent(parent);
+            if (parent instanceof NameClassChoiceState) {
+                this.context = ((NameClassChoiceState) parent).context;
+            }
+        }
+
+        State create() {
+            return new NameClassChoiceState();
+        }
+
+        @Override
+        State createChildState(String localName) throws SAXException {
+            if (localName.equals("anyName")) {
+                if (context >= ANY_NAME_CONTEXT) {
+                    error(context == ANY_NAME_CONTEXT
+                            ? "any_name_except_contains_any_name"
+                            : "ns_name_except_contains_any_name");
+                    return null;
+                }
+            } else if (localName.equals("nsName")) {
+                if (context == NS_NAME_CONTEXT) {
+                    error("ns_name_except_contains_ns_name");
+                    return null;
+                }
+            }
+            return super.createChildState(localName);
+        }
+
+        @Override
+        void endChild(ParsedNameClass nc) {
+            if (nameClasses == null) {
+                nameClasses = new ParsedNameClass[INIT_CHILD_ALLOC];
+            } else if (nNameClasses >= nameClasses.length) {
+                ParsedNameClass[] newNameClasses = new ParsedNameClass[nameClasses.length * 2];
+                System.arraycopy(nameClasses, 0, newNameClasses, 0, nameClasses.length);
+                nameClasses = newNameClasses;
+            }
+            nameClasses[nNameClasses++] = nc;
+        }
+
+        @Override
+        void endForeignChild(ParsedElementAnnotation ea) {
+            if (nNameClasses == 0) {
+                super.endForeignChild(ea);
+            } else {
+                nameClasses[nNameClasses - 1] = nameClassBuilder.annotateAfter(nameClasses[nNameClasses - 1], ea);
+            }
+        }
+
+        void end() throws SAXException {
+            if (nNameClasses == 0) {
+                error("missing_name_class");
+                parent.endChild(nameClassBuilder.makeErrorNameClass());
+                return;
+            }
+            if (comments != null) {
+                nameClasses[nNameClasses - 1] = nameClassBuilder.commentAfter(nameClasses[nNameClasses - 1], comments);
+                comments = null;
+            }
+            parent.endChild(nameClassBuilder.makeChoice(Arrays.asList(nameClasses).subList(0, nNameClasses), startLocation, annotations));
+        }
+    }
+
+    private void initPatternTable() {
+        patternTable = new Hashtable();
+        patternTable.put("zeroOrMore", new ZeroOrMoreState());
+        patternTable.put("oneOrMore", new OneOrMoreState());
+        patternTable.put("optional", new OptionalState());
+        patternTable.put("list", new ListState());
+        patternTable.put("choice", new ChoiceState());
+        patternTable.put("interleave", new InterleaveState());
+        patternTable.put("group", new GroupState());
+        patternTable.put("mixed", new MixedState());
+        patternTable.put("element", new ElementState());
+        patternTable.put("attribute", new AttributeState());
+        patternTable.put("empty", new EmptyState());
+        patternTable.put("text", new TextState());
+        patternTable.put("value", new ValueState());
+        patternTable.put("data", new DataState());
+        patternTable.put("notAllowed", new NotAllowedState());
+        patternTable.put("grammar", new GrammarState());
+        patternTable.put("ref", new RefState());
+        patternTable.put("parentRef", new ParentRefState());
+        patternTable.put("externalRef", new ExternalRefState());
+    }
+
+    private void initNameClassTable() {
+        nameClassTable = new Hashtable();
+        nameClassTable.put("name", new NameState());
+        nameClassTable.put("anyName", new AnyNameState());
+        nameClassTable.put("nsName", new NsNameState());
+        nameClassTable.put("choice", new NameClassChoiceState());
+    }
+
+    public ParsedPattern getParsedPattern() throws IllegalSchemaException {
+        if (hadError) {
+            throw new IllegalSchemaException();
+        }
+        return startPattern;
+    }
+
+    private void error(String key) throws SAXException {
+        error(key, locator);
+    }
+
+    private void error(String key, String arg) throws SAXException {
+        error(key, arg, locator);
+    }
+
+    void error(String key, String arg1, String arg2) throws SAXException {
+        error(key, arg1, arg2, locator);
+    }
+
+    private void error(String key, Locator loc) throws SAXException {
+        error(new SAXParseException(localizer.message(key), loc));
+    }
+
+    private void error(String key, String arg, Locator loc) throws SAXException {
+        error(new SAXParseException(localizer.message(key, arg), loc));
+    }
+
+    private void error(String key, String arg1, String arg2, Locator loc)
+            throws SAXException {
+        error(new SAXParseException(localizer.message(key, arg1, arg2), loc));
+    }
+
+    private void error(SAXParseException e) throws SAXException {
+        hadError = true;
+        if (eh != null) {
+            eh.error(e);
+        }
+    }
+
+    void warning(String key) throws SAXException {
+        warning(key, locator);
+    }
+
+    private void warning(String key, String arg) throws SAXException {
+        warning(key, arg, locator);
+    }
+
+    private void warning(String key, String arg1, String arg2) throws SAXException {
+        warning(key, arg1, arg2, locator);
+    }
+
+    private void warning(String key, Locator loc) throws SAXException {
+        warning(new SAXParseException(localizer.message(key), loc));
+    }
+
+    private void warning(String key, String arg, Locator loc) throws SAXException {
+        warning(new SAXParseException(localizer.message(key, arg), loc));
+    }
+
+    private void warning(String key, String arg1, String arg2, Locator loc)
+            throws SAXException {
+        warning(new SAXParseException(localizer.message(key, arg1, arg2), loc));
+    }
+
+    private void warning(SAXParseException e) throws SAXException {
+        if (eh != null) {
+            eh.warning(e);
+        }
+    }
+
+    SchemaParser(SAXParseable parseable,
+            XMLReader xr,
+            ErrorHandler eh,
+            SchemaBuilder schemaBuilder,
+            IncludedGrammar grammar,
+            Scope scope,
+            String inheritedNs) throws SAXException {
+        this.parseable = parseable;
+        this.xr = xr;
+        this.eh = eh;
+        this.schemaBuilder = schemaBuilder;
+        this.nameClassBuilder = schemaBuilder.getNameClassBuilder();
+        if (eh != null) {
+            xr.setErrorHandler(eh);
+        }
+        xr.setDTDHandler(context);
+        if (schemaBuilder.usesComments()) {
+            try {
+                xr.setProperty("http://xml.org/sax/properties/lexical-handler", new LexicalHandlerImpl());
+            } catch (SAXNotRecognizedException e) {
+                warning("no_comment_support", xr.getClass().getName());
+            } catch (SAXNotSupportedException e) {
+                warning("no_comment_support", xr.getClass().getName());
+            }
+        }
+        initPatternTable();
+        initNameClassTable();
+        new RootState(grammar, scope, inheritedNs).set();
+    }
+
+    private Context getContext() {
+        return context;
+    }
+
+    class LexicalHandlerImpl extends AbstractLexicalHandler {
+
+        private boolean inDtd = false;
+
+        @Override
+        public void startDTD(String s, String s1, String s2) throws SAXException {
+            inDtd = true;
+        }
+
+        @Override
+        public void endDTD() throws SAXException {
+            inDtd = false;
+        }
+
+        @Override
+        public void comment(char[] chars, int start, int length) throws SAXException {
+            if (!inDtd) {
+                ((CommentHandler) xr.getContentHandler()).comment(new String(chars, start, length));
+            }
+        }
+    }
+
+    private ParsedNameClass expandName(String name, String ns, Annotations anno) throws SAXException {
+        int ic = name.indexOf(':');
+        if (ic == -1) {
+            return nameClassBuilder.makeName(ns, checkNCName(name), null, null, anno);
+        }
+        String prefix = checkNCName(name.substring(0, ic));
+        String localName = checkNCName(name.substring(ic + 1));
+        for (PrefixMapping tem = context.prefixMapping; tem != null; tem = tem.next) {
+            if (tem.prefix.equals(prefix)) {
+                return nameClassBuilder.makeName(tem.uri, localName, prefix, null, anno);
+            }
+        }
+        error("undefined_prefix", prefix);
+        return nameClassBuilder.makeName("", localName, null, null, anno);
+    }
+
+    private String findPrefix(String qName, String uri) {
+        String prefix = null;
+        if (qName == null || qName.equals("")) {
+            for (PrefixMapping p = context.prefixMapping; p != null; p = p.next) {
+                if (p.uri.equals(uri)) {
+                    prefix = p.prefix;
+                    break;
+                }
+            }
+        } else {
+            int off = qName.indexOf(':');
+            if (off > 0) {
+                prefix = qName.substring(0, off);
+            }
+        }
+        return prefix;
+    }
+
+    private String checkNCName(String str) throws SAXException {
+        if (!Naming.isNcname(str)) {
+            error("invalid_ncname", str);
+        }
+        return str;
+    }
+
+    private String resolve(String systemId) throws SAXException {
+        if (Uri.hasFragmentId(systemId)) {
+            error("href_fragment_id");
+        }
+        systemId = Uri.escapeDisallowedChars(systemId);
+        return Uri.resolve(xmlBaseHandler.getBaseUri(), systemId);
+    }
+
+    private Location makeLocation() {
+        if (locator == null) {
+            return null;
+        }
+        return schemaBuilder.makeLocation(locator.getSystemId(),
+                locator.getLineNumber(),
+                locator.getColumnNumber());
+    }
+
+    private void checkUri(String s) throws SAXException {
+        if (!Uri.isValid(s)) {
+            error("invalid_uri", s);
+        }
+    }
 }
diff --git a/jaxws/src/share/jaxws_classes/com/sun/xml/internal/rngom/xml/sax/JAXPXMLReaderCreator.java b/jaxws/src/share/jaxws_classes/com/sun/xml/internal/rngom/xml/sax/JAXPXMLReaderCreator.java
index f9f15c7..455143d 100644
--- a/jaxws/src/share/jaxws_classes/com/sun/xml/internal/rngom/xml/sax/JAXPXMLReaderCreator.java
+++ b/jaxws/src/share/jaxws_classes/com/sun/xml/internal/rngom/xml/sax/JAXPXMLReaderCreator.java
@@ -23,7 +23,7 @@
  * questions.
  */
 /*
- * Copyright (C) 2004-2011
+ * Copyright (C) 2004-2012
  *
  * Permission is hereby granted, free of charge, to any person obtaining a copy
  * of this software and associated documentation files (the "Software"), to deal
@@ -45,10 +45,15 @@
  */
 package com.sun.xml.internal.rngom.xml.sax;
 
+import java.util.logging.Level;
+import java.util.logging.Logger;
+import javax.xml.XMLConstants;
 import javax.xml.parsers.ParserConfigurationException;
 import javax.xml.parsers.SAXParserFactory;
 
 import org.xml.sax.SAXException;
+import org.xml.sax.SAXNotRecognizedException;
+import org.xml.sax.SAXNotSupportedException;
 import org.xml.sax.XMLReader;
 
 /**
@@ -72,7 +77,16 @@
      */
     public JAXPXMLReaderCreator() {
         spf = SAXParserFactory.newInstance();
-        spf.setNamespaceAware(true);
+        try {
+            spf.setNamespaceAware(true);
+            spf.setFeature(XMLConstants.FEATURE_SECURE_PROCESSING, true);
+        } catch (ParserConfigurationException ex) {
+            Logger.getLogger(JAXPXMLReaderCreator.class.getName()).log(Level.SEVERE, null, ex);
+        } catch (SAXNotRecognizedException ex) {
+            Logger.getLogger(JAXPXMLReaderCreator.class.getName()).log(Level.SEVERE, null, ex);
+        } catch (SAXNotSupportedException ex) {
+            Logger.getLogger(JAXPXMLReaderCreator.class.getName()).log(Level.SEVERE, null, ex);
+        }
     }
 
     /**
diff --git a/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/addressing/WsaTubeHelper.java b/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/addressing/WsaTubeHelper.java
index 0a0c10c..fdfeb1c 100644
--- a/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/addressing/WsaTubeHelper.java
+++ b/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/addressing/WsaTubeHelper.java
@@ -40,7 +40,6 @@
 import com.sun.xml.internal.ws.api.model.SEIModel;
 import com.sun.xml.internal.ws.api.model.JavaMethod;
 import com.sun.xml.internal.ws.api.model.WSDLOperationMapping;
-import com.sun.xml.internal.ws.model.wsdl.WSDLOperationImpl;
 import com.sun.xml.internal.ws.model.JavaMethodImpl;
 import com.sun.xml.internal.ws.model.CheckedExceptionImpl;
 import com.sun.istack.internal.Nullable;
@@ -236,7 +235,7 @@
         }
         WSDLBoundOperation wbo = wsdlOp.getWSDLBoundOperation();
         WSDLOperation op = wbo.getOperation();
-        return ((WSDLOperationImpl) op).getInput().isDefaultAction();
+        return op.getInput().isDefaultAction();
 
     }
 
diff --git a/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/api/model/wsdl/WSDLBoundOperation.java b/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/api/model/wsdl/WSDLBoundOperation.java
index d2f975a..b0f4842 100644
--- a/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/api/model/wsdl/WSDLBoundOperation.java
+++ b/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/api/model/wsdl/WSDLBoundOperation.java
@@ -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
@@ -27,9 +27,11 @@
 
 import com.sun.istack.internal.NotNull;
 import com.sun.istack.internal.Nullable;
+import com.sun.xml.internal.ws.api.model.ParameterBinding;
 
 import javax.jws.WebParam.Mode;
 import javax.xml.namespace.QName;
+
 import java.util.Map;
 
 /**
@@ -79,14 +81,62 @@
     @Nullable WSDLPart getPart(@NotNull String partName, @NotNull Mode mode);
 
     /**
+     * Gets {@link ParameterBinding} for a given wsdl part in wsdl:input
+     *
+     * @param part Name of wsdl:part, must be non-null
+     * @return null if the part is not found.
+     */
+    public ParameterBinding getInputBinding(String part);
+
+    /**
+     * Gets {@link ParameterBinding} for a given wsdl part in wsdl:output
+     *
+     * @param part Name of wsdl:part, must be non-null
+     * @return null if the part is not found.
+     */
+    public ParameterBinding getOutputBinding(String part);
+
+    /**
+     * Gets {@link ParameterBinding} for a given wsdl part in wsdl:fault
+     *
+     * @param part Name of wsdl:part, must be non-null
+     * @return null if the part is not found.
+     */
+    public ParameterBinding getFaultBinding(String part);
+
+    /**
+     * Gets the MIME type for a given wsdl part in wsdl:input
+     *
+     * @param part Name of wsdl:part, must be non-null
+     * @return null if the part is not found.
+     */
+    public String getMimeTypeForInputPart(String part);
+
+    /**
+     * Gets the MIME type for a given wsdl part in wsdl:output
+     *
+     * @param part Name of wsdl:part, must be non-null
+     * @return null if the part is not found.
+     */
+    public String getMimeTypeForOutputPart(String part);
+
+    /**
+     * Gets the MIME type for a given wsdl part in wsdl:fault
+     *
+     * @param part Name of wsdl:part, must be non-null
+     * @return null if the part is not found.
+     */
+    public String getMimeTypeForFaultPart(String part);
+
+    /**
      * Gets all inbound {@link WSDLPart} by its {@link WSDLPart#getName() name}.
      */
-    @NotNull Map<String,WSDLPart> getInParts();
+    @NotNull Map<String,? extends WSDLPart> getInParts();
 
     /**
      * Gets all outbound {@link WSDLPart} by its {@link WSDLPart#getName() name}.
      */
-    @NotNull Map<String,WSDLPart> getOutParts();
+    @NotNull Map<String,? extends WSDLPart> getOutParts();
 
     /**
      * Gets all the {@link WSDLFault} bound to this operation.
@@ -94,13 +144,34 @@
     @NotNull Iterable<? extends WSDLBoundFault> getFaults();
 
     /**
+     * Map of wsdl:input part name and the binding as {@link ParameterBinding}
+     *
+     * @return empty Map if there is no parts
+     */
+    public Map<String, ParameterBinding> getInputParts();
+
+    /**
+     * Map of wsdl:output part name and the binding as {@link ParameterBinding}
+     *
+     * @return empty Map if there is no parts
+     */
+    public Map<String, ParameterBinding> getOutputParts();
+
+    /**
+     * Map of wsdl:fault part name and the binding as {@link ParameterBinding}
+     *
+     * @return empty Map if there is no parts
+     */
+    public Map<String, ParameterBinding> getFaultParts();
+
+    /**
      * Gets the payload QName of the request message.
      *
      * <p>
      * It's possible for an operation to define no body part, in which case
      * this method returns null.
      */
-    @Nullable QName getReqPayloadName();
+    @Nullable QName getRequestPayloadName();
 
     /**
      * Gets the payload QName of the response message.
@@ -109,7 +180,7 @@
      * It's possible for an operation to define no body part, in which case
      * this method returns null.
      */
-    @Nullable QName getResPayloadName();
+    @Nullable QName getResponsePayloadName();
 
     /**
      * Gets the namespace of request payload.
diff --git a/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/api/model/wsdl/WSDLBoundPortType.java b/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/api/model/wsdl/WSDLBoundPortType.java
index a2b400e..f89e12b 100644
--- a/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/api/model/wsdl/WSDLBoundPortType.java
+++ b/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/api/model/wsdl/WSDLBoundPortType.java
@@ -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
diff --git a/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/api/model/wsdl/WSDLExtensible.java b/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/api/model/wsdl/WSDLExtensible.java
index cae65be..eb3c869 100644
--- a/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/api/model/wsdl/WSDLExtensible.java
+++ b/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/api/model/wsdl/WSDLExtensible.java
@@ -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
@@ -25,6 +25,12 @@
 
 package com.sun.xml.internal.ws.api.model.wsdl;
 
+import java.util.List;
+
+import javax.xml.namespace.QName;
+
+import org.xml.sax.Locator;
+
 /**
  * Interface that represents WSDL concepts that
  * can have extensions.
@@ -82,4 +88,23 @@
      *      must not be null.
      */
     void addExtension(WSDLExtension extension);
+
+    /**
+     * True if all required WSDL extensions on Port and Binding are understood
+     * @return true if all wsdl required extensions on Port and Binding are understood
+     */
+    public boolean areRequiredExtensionsUnderstood();
+
+    /**
+     * Marks extension as not understood
+     * @param extnEl QName of extension
+     * @param locator Locator
+     */
+    public void addNotUnderstoodExtension(QName extnEl, Locator locator);
+
+    /**
+     * Lists extensions marked as not understood
+     * @return List of not understood extensions
+     */
+    public List<? extends WSDLExtension> getNotUnderstoodExtensions();
 }
diff --git a/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/api/model/wsdl/WSDLFault.java b/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/api/model/wsdl/WSDLFault.java
index 36a6ffd..d2d2adb 100644
--- a/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/api/model/wsdl/WSDLFault.java
+++ b/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/api/model/wsdl/WSDLFault.java
@@ -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
@@ -76,4 +76,10 @@
      * @return Action
      */
     String getAction();
+
+    /**
+     * True if this is the default action
+     * @return
+     */
+    public boolean isDefaultAction();
 }
diff --git a/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/api/model/wsdl/WSDLModel.java b/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/api/model/wsdl/WSDLModel.java
index cc63395..3e24853 100644
--- a/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/api/model/wsdl/WSDLModel.java
+++ b/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/api/model/wsdl/WSDLModel.java
@@ -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
@@ -34,10 +34,12 @@
 import com.sun.xml.internal.ws.api.policy.PolicyResolverFactory;
 import com.sun.xml.internal.ws.wsdl.parser.RuntimeWSDLParser;
 import com.sun.xml.internal.ws.policy.PolicyMap;
+
 import org.xml.sax.SAXException;
 
 import javax.xml.namespace.QName;
 import javax.xml.stream.XMLStreamException;
+
 import java.io.IOException;
 import java.util.Map;
 
@@ -96,7 +98,7 @@
      *
      * @return an empty Map if the wsdl document has no wsdl:binding
      */
-    @NotNull Map<QName, WSDLBoundPortType> getBindings();
+    @NotNull Map<QName, ? extends WSDLBoundPortType> getBindings();
 
     /**
      * Gives a {@link Map} of wsdl:service qualified name and {@link com.sun.xml.internal.ws.api.model.wsdl.WSDLService}
@@ -106,6 +108,25 @@
     @NotNull Map<QName, ? extends WSDLService> getServices();
 
     /**
+     * Returns the first service QName from insertion order
+     */
+    public QName getFirstServiceName();
+
+    /**
+     * Returns the message with the given QName
+     * @param name Message name
+     * @return Message
+     */
+    public WSDLMessage getMessage(QName name);
+
+    /**
+     * Gives a {@link Map} of wsdl:message qualified name and {@link com.sun.xml.internal.ws.api.model.wsdl.WSDLMesage}
+     *
+     * @return an empty Map if the wsdl document has no wsdl:message
+     */
+    @NotNull Map<QName, ? extends WSDLMessage> getMessages();
+
+    /**
      * Gives the PolicyMap associated with the WSDLModel
      *
      * @return PolicyMap
@@ -115,7 +136,6 @@
      */
     public PolicyMap getPolicyMap();
 
-
     /**
      * Main purpose of this class is to  parsing of a WSDL and get the {@link WSDLModel} from it.
      */
diff --git a/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/api/model/wsdl/WSDLOperation.java b/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/api/model/wsdl/WSDLOperation.java
index 1a08f01..8569804 100644
--- a/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/api/model/wsdl/WSDLOperation.java
+++ b/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/api/model/wsdl/WSDLOperation.java
@@ -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
@@ -56,8 +56,6 @@
      */
     @Nullable WSDLOutput getOutput();
 
-
-
     /**
      * Returns true if this operation is an one-way operation.
      */
@@ -112,4 +110,10 @@
      * Gives the enclosing wsdl:portType@name attribute value.
      */
     @NotNull QName getPortTypeName();
+
+    /**
+     * Returns parameter order
+     * @return Parameter order
+     */
+    public String getParameterOrder();
 }
diff --git a/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/api/model/wsdl/WSDLOutput.java b/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/api/model/wsdl/WSDLOutput.java
index 8743f73..71c9035 100644
--- a/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/api/model/wsdl/WSDLOutput.java
+++ b/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/api/model/wsdl/WSDLOutput.java
@@ -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
@@ -79,4 +79,11 @@
      */
     @NotNull
     QName getQName();
+
+    /**
+     * Checks if the Action value is implicitly derived using the rules defined in WS-Addressing.
+     *
+     * @return true if the Action value is implicitly derived using the rules defined in WS-Addressing.
+     */
+    public boolean isDefaultAction();
 }
diff --git a/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/api/model/wsdl/WSDLPort.java b/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/api/model/wsdl/WSDLPort.java
index 4b01852..337294b 100644
--- a/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/api/model/wsdl/WSDLPort.java
+++ b/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/api/model/wsdl/WSDLPort.java
@@ -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
@@ -26,7 +26,9 @@
 package com.sun.xml.internal.ws.api.model.wsdl;
 
 import com.sun.istack.internal.NotNull;
+import com.sun.istack.internal.Nullable;
 import com.sun.xml.internal.ws.api.EndpointAddress;
+import com.sun.xml.internal.ws.api.addressing.WSEndpointReference;
 
 import javax.xml.namespace.QName;
 
@@ -64,4 +66,10 @@
      */
     @NotNull
     WSDLService getOwner();
+
+    /**
+     * Returns endpoint reference
+     * @return Endpoint reference
+     */
+    public @Nullable WSEndpointReference getEPR();
 }
diff --git a/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/api/model/wsdl/WSDLPortType.java b/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/api/model/wsdl/WSDLPortType.java
index 5fcc5ec..6a96b45 100644
--- a/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/api/model/wsdl/WSDLPortType.java
+++ b/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/api/model/wsdl/WSDLPortType.java
@@ -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
@@ -50,7 +50,6 @@
      */
     public WSDLOperation get(String operationName);
 
-
     /**
      * Gets {@link Iterable}<{@link WSDLOperation}>
      */
diff --git a/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/api/model/wsdl/WSDLService.java b/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/api/model/wsdl/WSDLService.java
index 52cb76a..285e737 100644
--- a/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/api/model/wsdl/WSDLService.java
+++ b/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/api/model/wsdl/WSDLService.java
@@ -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
@@ -26,6 +26,7 @@
 package com.sun.xml.internal.ws.api.model.wsdl;
 
 import com.sun.istack.internal.NotNull;
+import com.sun.istack.internal.Nullable;
 
 import javax.xml.namespace.QName;
 
@@ -62,6 +63,12 @@
     WSDLPort getFirstPort();
 
     /**
+    * Gets the first port in this service which matches the portType
+    */
+    @Nullable
+    WSDLPort getMatchingPort(QName portTypeName);
+
+    /**
      * Gives all the {@link WSDLPort} in a wsdl:service {@link WSDLService}
      */
     Iterable<? extends WSDLPort> getPorts();
diff --git a/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/api/model/wsdl/editable/EditableWSDLBoundFault.java b/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/api/model/wsdl/editable/EditableWSDLBoundFault.java
new file mode 100644
index 0000000..f99058e
--- /dev/null
+++ b/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/api/model/wsdl/editable/EditableWSDLBoundFault.java
@@ -0,0 +1,48 @@
+/*
+ * 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
+ * under the terms of the GNU General Public License version 2 only, as
+ * published by the Free Software Foundation.  Oracle designates this
+ * particular file as subject to the "Classpath" exception as provided
+ * by Oracle in the LICENSE file that accompanied this code.
+ *
+ * This code is distributed in the hope that it will be useful, but WITHOUT
+ * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
+ * version 2 for more details (a copy is included in the LICENSE file that
+ * accompanied this code).
+ *
+ * You should have received a copy of the GNU General Public License version
+ * 2 along with this work; if not, write to the Free Software Foundation,
+ * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
+ *
+ * Please 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.sun.xml.internal.ws.api.model.wsdl.editable;
+
+import com.sun.istack.internal.NotNull;
+import com.sun.istack.internal.Nullable;
+import com.sun.xml.internal.ws.api.model.wsdl.WSDLBoundFault;
+
+public interface EditableWSDLBoundFault extends WSDLBoundFault {
+
+    @Override
+    @Nullable
+    EditableWSDLFault getFault();
+
+    @Override
+    @NotNull
+    EditableWSDLBoundOperation getBoundOperation();
+
+    /**
+     * Freezes WSDL model to prevent further modification
+     *
+     * @param operation Operation
+     */
+    void freeze(EditableWSDLBoundOperation operation);
+}
diff --git a/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/api/model/wsdl/editable/EditableWSDLBoundOperation.java b/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/api/model/wsdl/editable/EditableWSDLBoundOperation.java
new file mode 100644
index 0000000..565c9d7
--- /dev/null
+++ b/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/api/model/wsdl/editable/EditableWSDLBoundOperation.java
@@ -0,0 +1,124 @@
+/*
+ * 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
+ * under the terms of the GNU General Public License version 2 only, as
+ * published by the Free Software Foundation.  Oracle designates this
+ * particular file as subject to the "Classpath" exception as provided
+ * by Oracle in the LICENSE file that accompanied this code.
+ *
+ * This code is distributed in the hope that it will be useful, but WITHOUT
+ * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
+ * version 2 for more details (a copy is included in the LICENSE file that
+ * accompanied this code).
+ *
+ * You should have received a copy of the GNU General Public License version
+ * 2 along with this work; if not, write to the Free Software Foundation,
+ * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
+ *
+ * Please 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.sun.xml.internal.ws.api.model.wsdl.editable;
+
+import java.util.Map;
+
+import javax.jws.WebParam.Mode;
+import javax.jws.soap.SOAPBinding.Style;
+
+import com.sun.istack.internal.NotNull;
+import com.sun.istack.internal.Nullable;
+import com.sun.xml.internal.ws.api.model.wsdl.WSDLBoundOperation;
+
+public interface EditableWSDLBoundOperation extends WSDLBoundOperation {
+
+        @Override
+    @NotNull EditableWSDLOperation getOperation();
+
+        @Override
+    @NotNull EditableWSDLBoundPortType getBoundPortType();
+
+        @Override
+    @Nullable EditableWSDLPart getPart(@NotNull String partName, @NotNull Mode mode);
+
+        @Override
+    @NotNull Map<String,? extends EditableWSDLPart> getInParts();
+
+        @Override
+    @NotNull Map<String,? extends EditableWSDLPart> getOutParts();
+
+        @Override
+    @NotNull Iterable<? extends EditableWSDLBoundFault> getFaults();
+
+        /**
+         * Add Part
+         * @param part Part
+         * @param mode Mode
+         */
+    public void addPart(EditableWSDLPart part, Mode mode);
+
+    /**
+     * Add Fault
+     * @param fault Fault
+     */
+    public void addFault(@NotNull EditableWSDLBoundFault fault);
+
+    /**
+     * Sets the soapbinding:binding/operation/wsaw:Anonymous.
+     *
+     * @param anonymous Anonymous value of the operation
+     */
+        public void setAnonymous(ANONYMOUS anonymous);
+
+        /**
+         * Sets input explicit body parts
+         * @param b True, if input body part is explicit
+         */
+        public void setInputExplicitBodyParts(boolean b);
+
+        /**
+         * Sets output explicit body parts
+         * @param b True, if output body part is explicit
+         */
+        public void setOutputExplicitBodyParts(boolean b);
+
+        /**
+         * Sets fault explicit body parts
+         * @param b True, if fault body part is explicit
+         */
+        public void setFaultExplicitBodyParts(boolean b);
+
+        /**
+         * Set request namespace
+         * @param ns Namespace
+         */
+        public void setRequestNamespace(String ns);
+
+        /**
+         * Set response namespace
+         * @param ns Namespace
+         */
+        public void setResponseNamespace(String ns);
+
+        /**
+         * Set SOAP action
+         * @param soapAction SOAP action
+         */
+        public void setSoapAction(String soapAction);
+
+        /**
+         * Set parameter style
+         * @param style Style
+         */
+        public void setStyle(Style style);
+
+        /**
+         * Freezes WSDL model to prevent further modification
+         * @param root WSDL Model
+         */
+        public void freeze(EditableWSDLModel root);
+}
diff --git a/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/api/model/wsdl/editable/EditableWSDLBoundPortType.java b/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/api/model/wsdl/editable/EditableWSDLBoundPortType.java
new file mode 100644
index 0000000..ba910bc
--- /dev/null
+++ b/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/api/model/wsdl/editable/EditableWSDLBoundPortType.java
@@ -0,0 +1,78 @@
+/*
+ * 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
+ * under the terms of the GNU General Public License version 2 only, as
+ * published by the Free Software Foundation.  Oracle designates this
+ * particular file as subject to the "Classpath" exception as provided
+ * by Oracle in the LICENSE file that accompanied this code.
+ *
+ * This code is distributed in the hope that it will be useful, but WITHOUT
+ * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
+ * version 2 for more details (a copy is included in the LICENSE file that
+ * accompanied this code).
+ *
+ * You should have received a copy of the GNU General Public License version
+ * 2 along with this work; if not, write to the Free Software Foundation,
+ * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
+ *
+ * Please 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.sun.xml.internal.ws.api.model.wsdl.editable;
+
+import javax.jws.soap.SOAPBinding.Style;
+import javax.xml.namespace.QName;
+
+import com.sun.istack.internal.NotNull;
+import com.sun.istack.internal.Nullable;
+import com.sun.xml.internal.ws.api.BindingID;
+import com.sun.xml.internal.ws.api.model.wsdl.WSDLBoundOperation;
+import com.sun.xml.internal.ws.api.model.wsdl.WSDLBoundPortType;
+
+public interface EditableWSDLBoundPortType extends WSDLBoundPortType {
+
+        @Override
+    @NotNull EditableWSDLModel getOwner();
+
+        @Override
+    public EditableWSDLBoundOperation get(QName operationName);
+
+        @Override
+    EditableWSDLPortType getPortType();
+
+        @Override
+    Iterable<? extends EditableWSDLBoundOperation> getBindingOperations();
+
+        @Override
+    @Nullable EditableWSDLBoundOperation getOperation(String namespaceUri, String localName);
+
+    /**
+     * Populates the Map that holds operation name as key and {@link WSDLBoundOperation} as the value.
+     *
+     * @param opName Must be non-null
+     * @param ptOp   Must be non-null
+     * @throws NullPointerException if either opName or ptOp is null
+     */
+    public void put(QName opName, EditableWSDLBoundOperation ptOp);
+
+    /**
+     * Sets the binding ID
+     * @param bindingId Binding ID
+     */
+        public void setBindingId(BindingID bindingId);
+
+    /**
+     * sets whether the {@link WSDLBoundPortType} is rpc or lit
+     */
+        public void setStyle(Style style);
+
+        /**
+         * Freezes WSDL model to prevent further modification
+         */
+        public void freeze();
+}
diff --git a/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/api/model/wsdl/editable/EditableWSDLFault.java b/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/api/model/wsdl/editable/EditableWSDLFault.java
new file mode 100644
index 0000000..e7da811
--- /dev/null
+++ b/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/api/model/wsdl/editable/EditableWSDLFault.java
@@ -0,0 +1,61 @@
+/*
+ * 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 com.sun.xml.internal.ws.api.model.wsdl.editable;
+
+import com.sun.istack.internal.NotNull;
+import com.sun.xml.internal.ws.api.model.wsdl.WSDLFault;
+
+public interface EditableWSDLFault extends WSDLFault {
+
+    @Override
+    EditableWSDLMessage getMessage();
+
+    @Override
+    @NotNull
+    EditableWSDLOperation getOperation();
+
+    /**
+     * Sets action
+     *
+     * @param action Action
+     */
+    public void setAction(String action);
+
+    /**
+     * Set to true if this is the default action
+     *
+     * @param defaultAction True, if default action
+     */
+    public void setDefaultAction(boolean defaultAction);
+
+    /**
+     * Freezes WSDL model to prevent further modification
+     *
+     * @param root WSDL Model
+     */
+    public void freeze(EditableWSDLModel root);
+
+}
diff --git a/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/api/model/wsdl/editable/EditableWSDLInput.java b/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/api/model/wsdl/editable/EditableWSDLInput.java
new file mode 100644
index 0000000..fc5d56c
--- /dev/null
+++ b/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/api/model/wsdl/editable/EditableWSDLInput.java
@@ -0,0 +1,61 @@
+/*
+ * 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 com.sun.xml.internal.ws.api.model.wsdl.editable;
+
+import com.sun.istack.internal.NotNull;
+import com.sun.xml.internal.ws.api.model.wsdl.WSDLInput;
+
+public interface EditableWSDLInput extends WSDLInput {
+
+    @Override
+    EditableWSDLMessage getMessage();
+
+    @Override
+    @NotNull
+    EditableWSDLOperation getOperation();
+
+    /**
+     * Sets action
+     *
+     * @param action Action
+     */
+    public void setAction(String action);
+
+    /**
+     * Set to true if this is the default action
+     *
+     * @param defaultAction True, if default action
+     */
+    public void setDefaultAction(boolean defaultAction);
+
+    /**
+     * Freezes WSDL model to prevent further modification
+     *
+     * @param root WSDL Model
+     */
+    public void freeze(EditableWSDLModel root);
+
+}
diff --git a/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/api/model/wsdl/editable/EditableWSDLMessage.java b/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/api/model/wsdl/editable/EditableWSDLMessage.java
new file mode 100644
index 0000000..f7a8086
--- /dev/null
+++ b/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/api/model/wsdl/editable/EditableWSDLMessage.java
@@ -0,0 +1,42 @@
+/*
+ * Copyright (c) 2013, Oracle and/or its affiliates. All rights reserved.
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * This code is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU General Public License version 2 only, as
+ * published by the Free Software Foundation.  Oracle designates this
+ * particular file as subject to the "Classpath" exception as provided
+ * by Oracle in the LICENSE file that accompanied this code.
+ *
+ * This code is distributed in the hope that it will be useful, but WITHOUT
+ * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
+ * version 2 for more details (a copy is included in the LICENSE file that
+ * accompanied this code).
+ *
+ * You should have received a copy of the GNU General Public License version
+ * 2 along with this work; if not, write to the Free Software Foundation,
+ * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
+ *
+ * Please 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.sun.xml.internal.ws.api.model.wsdl.editable;
+
+import com.sun.xml.internal.ws.api.model.wsdl.WSDLMessage;
+
+public interface EditableWSDLMessage extends WSDLMessage {
+
+    @Override
+    Iterable<? extends EditableWSDLPart> parts();
+
+    /**
+     * Add part
+     *
+     * @param part Part
+     */
+    public void add(EditableWSDLPart part);
+
+}
diff --git a/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/api/model/wsdl/editable/EditableWSDLModel.java b/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/api/model/wsdl/editable/EditableWSDLModel.java
new file mode 100644
index 0000000..7fee15a
--- /dev/null
+++ b/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/api/model/wsdl/editable/EditableWSDLModel.java
@@ -0,0 +1,115 @@
+/*
+ * 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 com.sun.xml.internal.ws.api.model.wsdl.editable;
+
+import java.util.Map;
+
+import javax.xml.namespace.QName;
+
+import com.sun.istack.internal.NotNull;
+import com.sun.xml.internal.ws.api.model.wsdl.WSDLModel;
+import com.sun.xml.internal.ws.policy.PolicyMap;
+
+public interface EditableWSDLModel extends WSDLModel {
+
+    @Override
+    EditableWSDLPortType getPortType(@NotNull QName name);
+
+    /**
+     * Add Binding
+     *
+     * @param portType Bound port type
+     */
+    void addBinding(EditableWSDLBoundPortType portType);
+
+    @Override
+    EditableWSDLBoundPortType getBinding(@NotNull QName name);
+
+    @Override
+    EditableWSDLBoundPortType getBinding(@NotNull QName serviceName, @NotNull QName portName);
+
+    @Override
+    EditableWSDLService getService(@NotNull QName name);
+
+    @Override
+    @NotNull
+    Map<QName, ? extends EditableWSDLMessage> getMessages();
+
+    /**
+     * Add message
+     *
+     * @param msg Message
+     */
+    public void addMessage(EditableWSDLMessage msg);
+
+    @Override
+    @NotNull
+    Map<QName, ? extends EditableWSDLPortType> getPortTypes();
+
+    /**
+     * Add port type
+     *
+     * @param pt Port type
+     */
+    public void addPortType(EditableWSDLPortType pt);
+
+    @Override
+    @NotNull
+    Map<QName, ? extends EditableWSDLBoundPortType> getBindings();
+
+    @Override
+    @NotNull
+    Map<QName, ? extends EditableWSDLService> getServices();
+
+    /**
+     * Add service
+     *
+     * @param svc Service
+     */
+    public void addService(EditableWSDLService svc);
+
+    @Override
+    public EditableWSDLMessage getMessage(QName name);
+
+    /**
+     * @param policyMap
+     * @deprecated
+     */
+    public void setPolicyMap(PolicyMap policyMap);
+
+    /**
+     * Finalize rpc-lit binding
+     *
+     * @param portType Binding
+     */
+    public void finalizeRpcLitBinding(EditableWSDLBoundPortType portType);
+
+    /**
+     * Freezes WSDL model to prevent further modification
+     */
+    public void freeze();
+
+}
diff --git a/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/api/model/wsdl/editable/EditableWSDLOperation.java b/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/api/model/wsdl/editable/EditableWSDLOperation.java
new file mode 100644
index 0000000..b0536d9
--- /dev/null
+++ b/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/api/model/wsdl/editable/EditableWSDLOperation.java
@@ -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.  Oracle designates this
+ * particular file as subject to the "Classpath" exception as provided
+ * by Oracle in the LICENSE file that accompanied this code.
+ *
+ * This code is distributed in the hope that it will be useful, but WITHOUT
+ * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
+ * version 2 for more details (a copy is included in the LICENSE file that
+ * accompanied this code).
+ *
+ * You should have received a copy of the GNU General Public License version
+ * 2 along with this work; if not, write to the Free Software Foundation,
+ * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
+ *
+ * Please 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.sun.xml.internal.ws.api.model.wsdl.editable;
+
+import javax.xml.namespace.QName;
+
+import com.sun.istack.internal.NotNull;
+import com.sun.istack.internal.Nullable;
+import com.sun.xml.internal.ws.api.model.wsdl.WSDLOperation;
+
+public interface EditableWSDLOperation extends WSDLOperation {
+
+    @Override
+    @NotNull
+    EditableWSDLInput getInput();
+
+    /**
+     * Set input
+     *
+     * @param input Input
+     */
+    public void setInput(EditableWSDLInput input);
+
+    @Override
+    @Nullable
+    EditableWSDLOutput getOutput();
+
+    /**
+     * Set output
+     *
+     * @param output Output
+     */
+    public void setOutput(EditableWSDLOutput output);
+
+    @Override
+    Iterable<? extends EditableWSDLFault> getFaults();
+
+    /**
+     * Add fault
+     *
+     * @param fault Fault
+     */
+    public void addFault(EditableWSDLFault fault);
+
+    @Override
+    @Nullable
+    EditableWSDLFault getFault(QName faultDetailName);
+
+    /**
+     * Set parameter order
+     *
+     * @param parameterOrder Parameter order
+     */
+    public void setParameterOrder(String parameterOrder);
+
+    /**
+     * Freezes WSDL model to prevent further modification
+     *
+     * @param root WSDL Model
+     */
+    public void freeze(EditableWSDLModel root);
+}
diff --git a/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/api/model/wsdl/editable/EditableWSDLOutput.java b/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/api/model/wsdl/editable/EditableWSDLOutput.java
new file mode 100644
index 0000000..2befb50
--- /dev/null
+++ b/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/api/model/wsdl/editable/EditableWSDLOutput.java
@@ -0,0 +1,61 @@
+/*
+ * 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 com.sun.xml.internal.ws.api.model.wsdl.editable;
+
+import com.sun.istack.internal.NotNull;
+import com.sun.xml.internal.ws.api.model.wsdl.WSDLOutput;
+
+public interface EditableWSDLOutput extends WSDLOutput {
+
+    @Override
+    EditableWSDLMessage getMessage();
+
+    @Override
+    @NotNull
+    EditableWSDLOperation getOperation();
+
+    /**
+     * Sets action
+     *
+     * @param action Action
+     */
+    public void setAction(String action);
+
+    /**
+     * Set to true if this is the default action
+     *
+     * @param defaultAction True, if default action
+     */
+    public void setDefaultAction(boolean defaultAction);
+
+    /**
+     * Freezes WSDL model to prevent further modification
+     *
+     * @param root WSDL Model
+     */
+    public void freeze(EditableWSDLModel root);
+
+}
diff --git a/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/api/model/wsdl/editable/EditableWSDLPart.java b/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/api/model/wsdl/editable/EditableWSDLPart.java
new file mode 100644
index 0000000..3db6195
--- /dev/null
+++ b/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/api/model/wsdl/editable/EditableWSDLPart.java
@@ -0,0 +1,47 @@
+/*
+ * 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 com.sun.xml.internal.ws.api.model.wsdl.editable;
+
+import com.sun.xml.internal.ws.api.model.ParameterBinding;
+import com.sun.xml.internal.ws.api.model.wsdl.WSDLPart;
+
+public interface EditableWSDLPart extends WSDLPart {
+
+    /**
+     * Sets binding
+     *
+     * @param binding Binding
+     */
+    public void setBinding(ParameterBinding binding);
+
+    /**
+     * Sets index
+     *
+     * @param index Index
+     */
+    public void setIndex(int index);
+
+}
diff --git a/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/api/model/wsdl/editable/EditableWSDLPort.java b/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/api/model/wsdl/editable/EditableWSDLPort.java
new file mode 100644
index 0000000..6f78a56
--- /dev/null
+++ b/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/api/model/wsdl/editable/EditableWSDLPort.java
@@ -0,0 +1,63 @@
+/*
+ * Copyright (c) 2013, Oracle and/or its affiliates. All rights reserved.
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * This code is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU General Public License version 2 only, as
+ * published by the Free Software Foundation.  Oracle designates this
+ * particular file as subject to the "Classpath" exception as provided
+ * by Oracle in the LICENSE file that accompanied this code.
+ *
+ * This code is distributed in the hope that it will be useful, but WITHOUT
+ * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
+ * version 2 for more details (a copy is included in the LICENSE file that
+ * accompanied this code).
+ *
+ * You should have received a copy of the GNU General Public License version
+ * 2 along with this work; if not, write to the Free Software Foundation,
+ * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
+ *
+ * Please 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.sun.xml.internal.ws.api.model.wsdl.editable;
+
+import com.sun.istack.internal.NotNull;
+import com.sun.xml.internal.ws.api.EndpointAddress;
+import com.sun.xml.internal.ws.api.addressing.WSEndpointReference;
+import com.sun.xml.internal.ws.api.model.wsdl.WSDLPort;
+
+public interface EditableWSDLPort extends WSDLPort {
+
+    @Override
+    @NotNull
+    EditableWSDLBoundPortType getBinding();
+
+    @Override
+    @NotNull
+    EditableWSDLService getOwner();
+
+    /**
+     * Sets endpoint address
+     *
+     * @param address Endpoint address
+     */
+    public void setAddress(EndpointAddress address);
+
+    /**
+     * Sets endpoint reference
+     *
+     * @param epr Endpoint reference
+     */
+    public void setEPR(@NotNull WSEndpointReference epr);
+
+    /**
+     * Freezes WSDL model to prevent further modification
+     *
+     * @param root WSDL Model
+     */
+    void freeze(EditableWSDLModel root);
+}
diff --git a/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/api/model/wsdl/editable/EditableWSDLPortType.java b/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/api/model/wsdl/editable/EditableWSDLPortType.java
new file mode 100644
index 0000000..0a1d3b6
--- /dev/null
+++ b/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/api/model/wsdl/editable/EditableWSDLPortType.java
@@ -0,0 +1,50 @@
+/*
+ * 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 com.sun.xml.internal.ws.api.model.wsdl.editable;
+
+import com.sun.xml.internal.ws.api.model.wsdl.WSDLPortType;
+
+public interface EditableWSDLPortType extends WSDLPortType {
+
+    @Override
+    public EditableWSDLOperation get(String operationName);
+
+    @Override
+    public Iterable<? extends EditableWSDLOperation> getOperations();
+
+    /**
+     * Associate WSDL operation with operation name
+     *
+     * @param opName Operation name
+     * @param ptOp   Operation
+     */
+    public void put(String opName, EditableWSDLOperation ptOp);
+
+    /**
+     * Freezes WSDL model to prevent further modification
+     */
+    public void freeze();
+}
diff --git a/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/api/model/wsdl/editable/EditableWSDLService.java b/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/api/model/wsdl/editable/EditableWSDLService.java
new file mode 100644
index 0000000..a162e50
--- /dev/null
+++ b/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/api/model/wsdl/editable/EditableWSDLService.java
@@ -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.
+ */
+
+package com.sun.xml.internal.ws.api.model.wsdl.editable;
+
+import javax.xml.namespace.QName;
+
+import com.sun.istack.internal.NotNull;
+import com.sun.istack.internal.Nullable;
+import com.sun.xml.internal.ws.api.model.wsdl.WSDLService;
+
+public interface EditableWSDLService extends WSDLService {
+
+    @Override
+    @NotNull
+    EditableWSDLModel getParent();
+
+    @Override
+    EditableWSDLPort get(QName portName);
+
+    @Override
+    EditableWSDLPort getFirstPort();
+
+    @Override
+    @Nullable
+    EditableWSDLPort getMatchingPort(QName portTypeName);
+
+    @Override
+    Iterable<? extends EditableWSDLPort> getPorts();
+
+    /**
+     * Associate WSDL port with port QName
+     *
+     * @param portName Port QName
+     * @param port     Port
+     */
+    public void put(QName portName, EditableWSDLPort port);
+
+    /**
+     * Freezes WSDL model to prevent further modification
+     *
+     * @param root WSDL Model
+     */
+    void freeze(EditableWSDLModel root);
+}
diff --git a/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/api/wsdl/parser/WSDLParserExtension.java b/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/api/wsdl/parser/WSDLParserExtension.java
index f8cbabc..2737573 100644
--- a/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/api/wsdl/parser/WSDLParserExtension.java
+++ b/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/api/wsdl/parser/WSDLParserExtension.java
@@ -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
@@ -26,7 +26,17 @@
 package com.sun.xml.internal.ws.api.wsdl.parser;
 
 import com.sun.xml.internal.ws.api.WSService;
-import com.sun.xml.internal.ws.api.model.wsdl.*;
+import com.sun.xml.internal.ws.api.model.wsdl.editable.EditableWSDLBoundFault;
+import com.sun.xml.internal.ws.api.model.wsdl.editable.EditableWSDLBoundOperation;
+import com.sun.xml.internal.ws.api.model.wsdl.editable.EditableWSDLBoundPortType;
+import com.sun.xml.internal.ws.api.model.wsdl.editable.EditableWSDLFault;
+import com.sun.xml.internal.ws.api.model.wsdl.editable.EditableWSDLInput;
+import com.sun.xml.internal.ws.api.model.wsdl.editable.EditableWSDLMessage;
+import com.sun.xml.internal.ws.api.model.wsdl.editable.EditableWSDLOperation;
+import com.sun.xml.internal.ws.api.model.wsdl.editable.EditableWSDLOutput;
+import com.sun.xml.internal.ws.api.model.wsdl.editable.EditableWSDLPort;
+import com.sun.xml.internal.ws.api.model.wsdl.editable.EditableWSDLPortType;
+import com.sun.xml.internal.ws.api.model.wsdl.editable.EditableWSDLService;
 import com.sun.xml.internal.ws.api.pipe.Tube;
 import com.sun.xml.internal.ws.wsdl.parser.RuntimeWSDLParser;
 
@@ -138,34 +148,36 @@
  * @author Kohsuke Kawaguchi
  */
 public abstract class WSDLParserExtension {
+
     public void start(WSDLParserExtensionContext context){
         // noop
     }
-    public void serviceAttributes(WSDLService service, XMLStreamReader reader) {
+
+    public void serviceAttributes(EditableWSDLService service, XMLStreamReader reader) {
         // noop
     }
 
-    public boolean serviceElements(WSDLService service, XMLStreamReader reader) {
+    public boolean serviceElements(EditableWSDLService service, XMLStreamReader reader) {
         return false;
     }
 
-    public void portAttributes(WSDLPort port, XMLStreamReader reader) {
+    public void portAttributes(EditableWSDLPort port, XMLStreamReader reader) {
         // noop
     }
 
-    public boolean portElements(WSDLPort port, XMLStreamReader reader) {
+    public boolean portElements(EditableWSDLPort port, XMLStreamReader reader) {
         return false;
     }
 
-    public boolean portTypeOperationInput(WSDLOperation op, XMLStreamReader reader) {
+    public boolean portTypeOperationInput(EditableWSDLOperation op, XMLStreamReader reader) {
         return false;
     }
 
-    public boolean portTypeOperationOutput(WSDLOperation op, XMLStreamReader reader) {
+    public boolean portTypeOperationOutput(EditableWSDLOperation op, XMLStreamReader reader) {
         return false;
     }
 
-    public boolean portTypeOperationFault(WSDLOperation op, XMLStreamReader reader) {
+    public boolean portTypeOperationFault(EditableWSDLOperation op, XMLStreamReader reader) {
         return false;
     }
 
@@ -173,81 +185,81 @@
         return false;
     }
 
-    public boolean bindingElements(WSDLBoundPortType binding, XMLStreamReader reader) {
+    public boolean bindingElements(EditableWSDLBoundPortType binding, XMLStreamReader reader) {
         return false;
     }
 
-    public void bindingAttributes(WSDLBoundPortType binding, XMLStreamReader reader) {
+    public void bindingAttributes(EditableWSDLBoundPortType binding, XMLStreamReader reader) {
     }
 
-    public boolean portTypeElements(WSDLPortType portType, XMLStreamReader reader) {
+    public boolean portTypeElements(EditableWSDLPortType portType, XMLStreamReader reader) {
         return false;
     }
 
-    public void portTypeAttributes(WSDLPortType portType, XMLStreamReader reader) {
+    public void portTypeAttributes(EditableWSDLPortType portType, XMLStreamReader reader) {
     }
 
-    public boolean portTypeOperationElements(WSDLOperation operation, XMLStreamReader reader) {
+    public boolean portTypeOperationElements(EditableWSDLOperation operation, XMLStreamReader reader) {
         return false;
     }
 
-    public void portTypeOperationAttributes(WSDLOperation operation, XMLStreamReader reader) {
+    public void portTypeOperationAttributes(EditableWSDLOperation operation, XMLStreamReader reader) {
     }
 
-    public boolean bindingOperationElements(WSDLBoundOperation operation, XMLStreamReader reader) {
+    public boolean bindingOperationElements(EditableWSDLBoundOperation operation, XMLStreamReader reader) {
         return false;
     }
 
-    public void bindingOperationAttributes(WSDLBoundOperation operation, XMLStreamReader reader) {
+    public void bindingOperationAttributes(EditableWSDLBoundOperation operation, XMLStreamReader reader) {
     }
 
-    public boolean messageElements(WSDLMessage msg, XMLStreamReader reader) {
+    public boolean messageElements(EditableWSDLMessage msg, XMLStreamReader reader) {
         return false;
     }
 
-    public void messageAttributes(WSDLMessage msg, XMLStreamReader reader) {
+    public void messageAttributes(EditableWSDLMessage msg, XMLStreamReader reader) {
     }
 
-    public boolean portTypeOperationInputElements(WSDLInput input, XMLStreamReader reader) {
+    public boolean portTypeOperationInputElements(EditableWSDLInput input, XMLStreamReader reader) {
         return false;
     }
 
-    public void portTypeOperationInputAttributes(WSDLInput input, XMLStreamReader reader) {
+    public void portTypeOperationInputAttributes(EditableWSDLInput input, XMLStreamReader reader) {
     }
 
-    public boolean portTypeOperationOutputElements(WSDLOutput output, XMLStreamReader reader) {
+    public boolean portTypeOperationOutputElements(EditableWSDLOutput output, XMLStreamReader reader) {
         return false;
     }
 
-    public void portTypeOperationOutputAttributes(WSDLOutput output, XMLStreamReader reader) {
+    public void portTypeOperationOutputAttributes(EditableWSDLOutput output, XMLStreamReader reader) {
     }
 
-    public boolean portTypeOperationFaultElements(WSDLFault fault, XMLStreamReader reader) {
+    public boolean portTypeOperationFaultElements(EditableWSDLFault fault, XMLStreamReader reader) {
         return false;
     }
 
-    public void portTypeOperationFaultAttributes(WSDLFault fault, XMLStreamReader reader) {
+    public void portTypeOperationFaultAttributes(EditableWSDLFault fault, XMLStreamReader reader) {
     }
 
-    public boolean bindingOperationInputElements(WSDLBoundOperation operation, XMLStreamReader reader) {
+    public boolean bindingOperationInputElements(EditableWSDLBoundOperation operation, XMLStreamReader reader) {
         return false;
     }
 
-    public void bindingOperationInputAttributes(WSDLBoundOperation operation, XMLStreamReader reader) {
+    public void bindingOperationInputAttributes(EditableWSDLBoundOperation operation, XMLStreamReader reader) {
     }
 
-    public boolean bindingOperationOutputElements(WSDLBoundOperation operation, XMLStreamReader reader) {
+    public boolean bindingOperationOutputElements(EditableWSDLBoundOperation operation, XMLStreamReader reader) {
         return false;
     }
 
-    public void bindingOperationOutputAttributes(WSDLBoundOperation operation, XMLStreamReader reader) {
+    public void bindingOperationOutputAttributes(EditableWSDLBoundOperation operation, XMLStreamReader reader) {
     }
 
-    public boolean bindingOperationFaultElements(WSDLBoundFault fault, XMLStreamReader reader) {
+    public boolean bindingOperationFaultElements(EditableWSDLBoundFault fault, XMLStreamReader reader) {
         return false;
     }
 
-    public void bindingOperationFaultAttributes(WSDLBoundFault fault, XMLStreamReader reader) {
+    public void bindingOperationFaultAttributes(EditableWSDLBoundFault fault, XMLStreamReader reader) {
     }
 
     // TODO: complete the rest of the callback
diff --git a/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/api/wsdl/parser/WSDLParserExtensionContext.java b/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/api/wsdl/parser/WSDLParserExtensionContext.java
index e67bbc0..ebad3d5 100644
--- a/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/api/wsdl/parser/WSDLParserExtensionContext.java
+++ b/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/api/wsdl/parser/WSDLParserExtensionContext.java
@@ -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
@@ -26,7 +26,7 @@
 package com.sun.xml.internal.ws.api.wsdl.parser;
 
 import com.sun.istack.internal.NotNull;
-import com.sun.xml.internal.ws.api.model.wsdl.WSDLModel;
+import com.sun.xml.internal.ws.api.model.wsdl.editable.EditableWSDLModel;
 import com.sun.xml.internal.ws.api.server.Container;
 import com.sun.xml.internal.ws.api.policy.PolicyResolver;
 
@@ -44,10 +44,10 @@
     boolean isClientSide();
 
     /**
-     * Gives the {@link WSDLModel}. The WSDLModel may not be complete until
+     * Gives the {@link EditableWSDLModel}. The WSDLModel may not be complete until
      * {@link WSDLParserExtension#finished(WSDLParserExtensionContext)} is called.
      */
-    WSDLModel getWSDLModel();
+    EditableWSDLModel getWSDLModel();
 
     /**
      * Provides the {@link Container} in which this service or client is running.
diff --git a/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/binding/WebServiceFeatureList.java b/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/binding/WebServiceFeatureList.java
index adcf63f..32bf683 100644
--- a/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/binding/WebServiceFeatureList.java
+++ b/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/binding/WebServiceFeatureList.java
@@ -38,7 +38,6 @@
 import com.sun.xml.internal.ws.api.model.wsdl.WSDLPort;
 import com.sun.xml.internal.ws.api.model.wsdl.WSDLFeaturedObject;
 import com.sun.xml.internal.ws.model.RuntimeModelerException;
-import com.sun.xml.internal.ws.model.wsdl.WSDLPortImpl;
 import com.sun.xml.internal.ws.resources.ModelerMessages;
 import com.sun.xml.internal.bind.util.Which;
 
@@ -440,9 +439,9 @@
     }
 
     /**
-     * Extracts features from {@link WSDLPortImpl#getFeatures()}. Extra features
+     * Extracts features from {@link WSDLPort#getFeatures()}. Extra features
      * that are not already set on binding. i.e, if a feature is set already on
-     * binding through someother API the coresponding wsdlFeature is not set.
+     * binding through some other API the corresponding wsdlFeature is not set.
      *
      * @param wsdlPort
      *            WSDLPort model
@@ -452,7 +451,7 @@
      *            true
      * @param reportConflicts
      *            If true, checks if the feature setting in WSDL (wsdl extension
-     *            or policy configuration) colflicts with feature setting in
+     *            or policy configuration) conflicts with feature setting in
      *            Deployed Service and logs warning if there are any conflicts.
      */
     public void mergeFeatures(@NotNull WSDLPort wsdlPort,
diff --git a/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/client/MonitorRootClient.java b/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/client/MonitorRootClient.java
index fdd7c42..72fd1bb 100644
--- a/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/client/MonitorRootClient.java
+++ b/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/client/MonitorRootClient.java
@@ -25,14 +25,18 @@
 
 package com.sun.xml.internal.ws.client;
 
+import com.sun.xml.internal.ws.api.model.wsdl.WSDLService;
 import com.sun.xml.internal.ws.api.server.Container;
-import com.sun.xml.internal.ws.model.wsdl.WSDLServiceImpl;
+
 import java.util.Map;
+
 import javax.xml.namespace.QName;
+
 import com.sun.org.glassfish.gmbal.AMXMetadata;
 import com.sun.org.glassfish.gmbal.Description;
 import com.sun.org.glassfish.gmbal.ManagedAttribute;
 import com.sun.org.glassfish.gmbal.ManagedObject;
+
 import java.net.URL;
 
 /**
@@ -74,7 +78,7 @@
     private URL wsdlDocumentLocation() { return stub.owner.getWSDLDocumentLocation(); }
 
     @ManagedAttribute
-    private WSDLServiceImpl wsdlService() { return stub.owner.getWsdlService(); }
+    private WSDLService wsdlService() { return stub.owner.getWsdlService(); }
 
 
 
diff --git a/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/client/PortInfo.java b/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/client/PortInfo.java
index f5a3397..39be8d8 100644
--- a/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/client/PortInfo.java
+++ b/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/client/PortInfo.java
@@ -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
@@ -36,8 +36,6 @@
 import com.sun.xml.internal.ws.api.model.wsdl.WSDLPort;
 import com.sun.xml.internal.ws.binding.BindingImpl;
 import com.sun.xml.internal.ws.binding.WebServiceFeatureList;
-import com.sun.xml.internal.ws.model.wsdl.WSDLPortImpl;
-import com.sun.xml.internal.ws.model.wsdl.WSDLModelImpl;
 import com.sun.xml.internal.ws.policy.PolicyMap;
 import com.sun.xml.internal.ws.policy.jaxws.PolicyUtil;
 
@@ -96,7 +94,7 @@
     public PolicyMap createPolicyMap() {
        PolicyMap map;
        if(portModel != null) {
-            map = ((WSDLModelImpl) portModel.getOwner().getParent()).getPolicyMap();
+            map = portModel.getOwner().getParent().getPolicyMap();
        } else {
            map = PolicyResolverFactory.create().resolve(new PolicyResolver.ClientContext(null,owner.getContainer()));
        }
@@ -154,8 +152,8 @@
     private WSDLPort getPortModel(WSServiceDelegate owner, QName portName) {
 
         if (owner.getWsdlService() != null){
-            Iterable<WSDLPortImpl> ports = owner.getWsdlService().getPorts();
-            for (WSDLPortImpl port : ports){
+            Iterable<? extends WSDLPort> ports = owner.getWsdlService().getPorts();
+            for (WSDLPort port : ports){
                 if (port.getName().equals(portName))
                     return port;
             }
diff --git a/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/client/Stub.java b/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/client/Stub.java
index 31bb91f..8f7c918 100644
--- a/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/client/Stub.java
+++ b/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/client/Stub.java
@@ -62,7 +62,6 @@
 import com.sun.xml.internal.ws.developer.JAXWSProperties;
 import com.sun.xml.internal.ws.developer.WSBindingProvider;
 import com.sun.xml.internal.ws.model.wsdl.WSDLDirectProperties;
-import com.sun.xml.internal.ws.model.wsdl.WSDLPortImpl;
 import com.sun.xml.internal.ws.model.wsdl.WSDLPortProperties;
 import com.sun.xml.internal.ws.model.wsdl.WSDLProperties;
 import com.sun.xml.internal.ws.resources.ClientMessages;
@@ -354,7 +353,7 @@
      */
     private static void checkAllWSDLExtensionsUnderstood(WSPortInfo port, WSBinding binding) {
         if (port.getPort() != null && binding.isFeatureEnabled(RespectBindingFeature.class)) {
-            ((WSDLPortImpl) port.getPort()).areRequiredExtensionsUnderstood();
+            port.getPort().areRequiredExtensionsUnderstood();
         }
     }
 
@@ -649,7 +648,7 @@
 
             //gather EPRExtensions specified in WSDL.
             try {
-                WSEndpointReference wsdlEpr = ((WSDLPortImpl) wsdlPort).getEPR();
+                WSEndpointReference wsdlEpr = wsdlPort.getEPR();
                 if (wsdlEpr != null) {
                     for (WSEndpointReference.EPRExtension extnEl : wsdlEpr.getEPRExtensions()) {
                         wsdlEPRExtensions.add(new WSEPRExtension(
diff --git a/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/client/WSServiceDelegate.java b/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/client/WSServiceDelegate.java
index 8b4eaa2..7805320 100644
--- a/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/client/WSServiceDelegate.java
+++ b/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/client/WSServiceDelegate.java
@@ -41,7 +41,9 @@
 import com.sun.xml.internal.ws.api.databinding.DatabindingFactory;
 import com.sun.xml.internal.ws.api.databinding.MetadataReader;
 import com.sun.xml.internal.ws.api.model.SEIModel;
+import com.sun.xml.internal.ws.api.model.wsdl.WSDLModel;
 import com.sun.xml.internal.ws.api.model.wsdl.WSDLPort;
+import com.sun.xml.internal.ws.api.model.wsdl.WSDLService;
 import com.sun.xml.internal.ws.api.pipe.Stubs;
 import com.sun.xml.internal.ws.api.server.Container;
 import com.sun.xml.internal.ws.api.server.ContainerResolver;
@@ -51,15 +53,11 @@
 import com.sun.xml.internal.ws.client.HandlerConfigurator.AnnotationConfigurator;
 import com.sun.xml.internal.ws.client.HandlerConfigurator.HandlerResolverImpl;
 import com.sun.xml.internal.ws.client.sei.SEIStub;
-
 import com.sun.xml.internal.ws.developer.MemberSubmissionAddressingFeature;
 import com.sun.xml.internal.ws.developer.UsesJAXBContextFeature;
 import com.sun.xml.internal.ws.developer.WSBindingProvider;
 import com.sun.xml.internal.ws.model.RuntimeModeler;
 import com.sun.xml.internal.ws.model.SOAPSEIModel;
-import com.sun.xml.internal.ws.model.wsdl.WSDLModelImpl;
-import com.sun.xml.internal.ws.model.wsdl.WSDLPortImpl;
-import com.sun.xml.internal.ws.model.wsdl.WSDLServiceImpl;
 import com.sun.xml.internal.ws.resources.ClientMessages;
 import com.sun.xml.internal.ws.resources.DispatchMessages;
 import com.sun.xml.internal.ws.resources.ProviderApiMessages;
@@ -67,6 +65,7 @@
 import com.sun.xml.internal.ws.util.ServiceConfigurationError;
 import com.sun.xml.internal.ws.util.ServiceFinder;
 import com.sun.xml.internal.ws.wsdl.parser.RuntimeWSDLParser;
+
 import org.xml.sax.EntityResolver;
 import org.xml.sax.SAXException;
 
@@ -86,6 +85,7 @@
 import javax.xml.ws.WebServiceFeature;
 import javax.xml.ws.handler.HandlerResolver;
 import javax.xml.ws.soap.AddressingFeature;
+
 import java.io.IOException;
 import java.lang.reflect.InvocationHandler;
 import java.lang.reflect.Proxy;
@@ -179,7 +179,7 @@
      * This fiels can be be null if the service is created without wsdl but later
      * the epr supplies a wsdl that can be parsed.
      */
-    private  @Nullable WSDLServiceImpl wsdlService;
+    private  @Nullable WSDLService wsdlService;
 
     private final Container container;
     /**
@@ -219,7 +219,7 @@
      * @param serviceClass
      *      Either {@link Service}.class or other generated service-derived classes.
      */
-    public WSServiceDelegate(@Nullable Source wsdl, @Nullable WSDLServiceImpl service, @NotNull QName serviceName, @NotNull final Class<? extends Service> serviceClass, WebServiceFeature... features) {
+    public WSServiceDelegate(@Nullable Source wsdl, @Nullable WSDLService service, @NotNull QName serviceName, @NotNull final Class<? extends Service> serviceClass, WebServiceFeature... features) {
         this(wsdl, service, serviceName, serviceClass, new WebServiceFeatureList(features));
     }
 
@@ -227,7 +227,7 @@
      * @param serviceClass
      *      Either {@link Service}.class or other generated service-derived classes.
      */
-    public WSServiceDelegate(@Nullable Source wsdl, @Nullable WSDLServiceImpl service, @NotNull QName serviceName, @NotNull final Class<? extends Service> serviceClass, WebServiceFeatureList features) {
+    public WSServiceDelegate(@Nullable Source wsdl, @Nullable WSDLService service, @NotNull QName serviceName, @NotNull final Class<? extends Service> serviceClass, WebServiceFeatureList features) {
         //we cant create a Service without serviceName
         if (serviceName == null) {
             throw new WebServiceException(ClientMessages.INVALID_SERVICE_NAME_NULL(null));
@@ -303,7 +303,7 @@
                 if (wsdl != null) {
                     try {
                         URL url = wsdl.getSystemId()==null ? null : JAXWSUtils.getEncodedURL(wsdl.getSystemId());
-                        WSDLModelImpl model = parseWSDL(url, wsdl, serviceClass);
+                        WSDLModel model = parseWSDL(url, wsdl, serviceClass);
                         service = model.getService(this.serviceName);
                         if (service == null)
                             throw new WebServiceException(
@@ -316,6 +316,10 @@
                         throw new WebServiceException(ClientMessages.INVALID_WSDL_URL(wsdl.getSystemId()));
                     }
                 }
+        } else {
+            // fill in statically known ports
+            for (WSDLPort port : service.getPorts())
+                ports.put(port.getName(), new PortInfo(this, port));
         }
         this.wsdlService = service;
 
@@ -339,7 +343,7 @@
      *      Either this or <tt>wsdl</tt> parameter must be given.
      *      Null location means the system won't be able to resolve relative references in the WSDL,
      */
-    private WSDLModelImpl parseWSDL(URL wsdlDocumentLocation, Source wsdlSource, Class serviceClass) {
+    private WSDLModel parseWSDL(URL wsdlDocumentLocation, Source wsdlSource, Class serviceClass) {
         try {
             return RuntimeWSDLParser.parse(wsdlDocumentLocation, wsdlSource, createCatalogResolver(),
                 true, getContainer(), serviceClass, ServiceFinder.find(WSDLParserExtension.class).toArray());
@@ -385,7 +389,7 @@
     public <T> T getPort(QName portName, Class<T> portInterface, WebServiceFeature... features) {
         if (portName == null || portInterface == null)
             throw new IllegalArgumentException();
-        WSDLServiceImpl tWsdlService = this.wsdlService;
+        WSDLService tWsdlService = this.wsdlService;
         if (tWsdlService == null) {
             // assigning it to local variable and not setting it back to this.wsdlService intentionally
             // as we don't want to include the service instance with information gathered from sei
@@ -396,7 +400,7 @@
             }
 
         }
-        WSDLPortImpl portModel = getPortModel(tWsdlService, portName);
+        WSDLPort portModel = getPortModel(tWsdlService, portName);
         return getPort(portModel.getEPR(), portName, portInterface, new WebServiceFeatureList(features));
     }
 
@@ -436,7 +440,7 @@
     public <T> T getPort(Class<T> portInterface, WebServiceFeature... features) {
         //get the portType from SEI
         QName portTypeName = RuntimeModeler.getPortTypeName(portInterface, getMetadadaReader(new WebServiceFeatureList(features), portInterface.getClassLoader()));
-        WSDLServiceImpl tmpWsdlService = this.wsdlService;
+        WSDLService tmpWsdlService = this.wsdlService;
         if (tmpWsdlService == null) {
             // assigning it to local variable and not setting it back to this.wsdlService intentionally
             // as we don't want to include the service instance with information gathered from sei
@@ -447,7 +451,7 @@
             }
         }
         //get the first port corresponding to the SEI
-        WSDLPortImpl port = tmpWsdlService.getMatchingPort(portTypeName);
+        WSDLPort port = tmpWsdlService.getMatchingPort(portTypeName);
         if (port == null) {
             throw new WebServiceException(ClientMessages.UNDEFINED_PORT_TYPE(portTypeName));
         }
@@ -672,7 +676,7 @@
                 throw new WebServiceException(ProviderApiMessages.NULL_WSDL());
             }
             try {
-                WSDLModelImpl eprWsdlMdl = parseWSDL(new URL(wsepr.getAddress()), eprWsdlSource, null);
+                WSDLModel eprWsdlMdl = parseWSDL(new URL(wsepr.getAddress()), eprWsdlSource, null);
                 wsdlService = eprWsdlMdl.getService(serviceName);
                 if (wsdlService == null)
                     throw new WebServiceException(ClientMessages.INVALID_SERVICE_NAME(serviceName,
@@ -685,7 +689,7 @@
 
         if (portName == null && portTypeName != null) {
             //get the first port corresponding to the SEI
-            WSDLPortImpl port = wsdlService.getMatchingPort(portTypeName);
+            WSDLPort port = wsdlService.getMatchingPort(portTypeName);
             if (port == null)
                 throw new WebServiceException(ClientMessages.UNDEFINED_PORT_TYPE(portTypeName));
             portName = port.getName();
@@ -732,7 +736,7 @@
         );
     }
 
-    private WSDLServiceImpl getWSDLModelfromSEI(final Class sei) {
+    private WSDLService getWSDLModelfromSEI(final Class sei) {
         WebService ws = AccessController.doPrivileged(new PrivilegedAction<WebService>() {
             public WebService run() {
                 return (WebService) sei.getAnnotation(WebService.class);
@@ -743,11 +747,11 @@
         String wsdlLocation = ws.wsdlLocation();
         wsdlLocation = JAXWSUtils.absolutize(JAXWSUtils.getFileOrURLName(wsdlLocation));
         Source wsdl = new StreamSource(wsdlLocation);
-        WSDLServiceImpl service = null;
+        WSDLService service = null;
 
         try {
             URL url = wsdl.getSystemId() == null ? null : new URL(wsdl.getSystemId());
-            WSDLModelImpl model = parseWSDL(url, wsdl, sei);
+            WSDLModel model = parseWSDL(url, wsdl, sei);
             service = model.getService(this.serviceName);
             if (service == null)
                 throw new WebServiceException(
@@ -815,7 +819,7 @@
      */
     private StringBuilder buildWsdlPortNames() {
         Set<QName> wsdlPortNames = new HashSet<QName>();
-        for (WSDLPortImpl port : wsdlService.getPorts()) {
+        for (WSDLPort port : wsdlService.getPorts()) {
             wsdlPortNames.add(port.getName());
         }
         return buildNameList(wsdlPortNames);
@@ -826,8 +830,8 @@
      *
      * @return guaranteed to be non-null.
      */
-    public @NotNull WSDLPortImpl getPortModel(WSDLServiceImpl wsdlService, QName portName) {
-        WSDLPortImpl port = wsdlService.get(portName);
+    public @NotNull WSDLPort getPortModel(WSDLService wsdlService, QName portName) {
+        WSDLPort port = wsdlService.get(portName);
         if (port == null)
             throw new WebServiceException(
                 ClientMessages.INVALID_PORT_NAME(portName,buildWsdlPortNames()));
@@ -884,7 +888,7 @@
     }
 
     private SEIPortInfo createSEIPortInfo(QName portName, Class portInterface, WebServiceFeatureList features) {
-        WSDLPortImpl wsdlPort = getPortModel(wsdlService, portName);
+        WSDLPort wsdlPort = getPortModel(wsdlService, portName);
         SEIModel model = buildRuntimeModel(serviceName, portName, portInterface, wsdlPort, features);
 
         return new SEIPortInfo(this, portInterface, (SOAPSEIModel) model, wsdlPort);
@@ -894,7 +898,7 @@
         return features.contains(UsesJAXBContextFeature.class);
     }
 
-    public WSDLServiceImpl getWsdlService() {
+    public WSDLService getWsdlService() {
         return wsdlService;
     }
 
diff --git a/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/model/ExternalMetadataReader.java b/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/model/ExternalMetadataReader.java
index 41cf3f7..2de13dc 100644
--- a/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/model/ExternalMetadataReader.java
+++ b/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/model/ExternalMetadataReader.java
@@ -75,13 +75,13 @@
     private Map<String, JavaWsdlMappingType> readers = new HashMap<String, JavaWsdlMappingType>();
 
     public ExternalMetadataReader(Collection<File> files, Collection<String> resourcePaths, ClassLoader classLoader,
-                                  boolean xsdValidation, boolean disableSecureXmlProcessing) {
+                                  boolean xsdValidation, boolean disableXmlSecurity) {
 
         if (files != null) {
             for (File file : files) {
                 try {
-                    String namespace = Util.documentRootNamespace(newSource(file), disableSecureXmlProcessing);
-                    JavaWsdlMappingType externalMapping = parseMetadata(xsdValidation, newSource(file), namespace, disableSecureXmlProcessing);
+                    String namespace = Util.documentRootNamespace(newSource(file), disableXmlSecurity);
+                    JavaWsdlMappingType externalMapping = parseMetadata(xsdValidation, newSource(file), namespace, disableXmlSecurity);
                     readers.put(externalMapping.getJavaTypeName(), externalMapping);
                 } catch (Exception e) {
                     throw new RuntimeModelerException("runtime.modeler.external.metadata.unable.to.read", file.getAbsolutePath());
@@ -92,8 +92,8 @@
         if (resourcePaths != null) {
             for (String resourcePath : resourcePaths) {
                 try {
-                    String namespace = Util.documentRootNamespace(newSource(resourcePath, classLoader), disableSecureXmlProcessing);
-                    JavaWsdlMappingType externalMapping = parseMetadata(xsdValidation, newSource(resourcePath, classLoader), namespace, disableSecureXmlProcessing);
+                    String namespace = Util.documentRootNamespace(newSource(resourcePath, classLoader), disableXmlSecurity);
+                    JavaWsdlMappingType externalMapping = parseMetadata(xsdValidation, newSource(resourcePath, classLoader), namespace, disableXmlSecurity);
                     readers.put(externalMapping.getJavaTypeName(), externalMapping);
                 } catch (Exception e) {
                     throw new RuntimeModelerException("runtime.modeler.external.metadata.unable.to.read", resourcePath);
@@ -107,11 +107,11 @@
         return new StreamSource(is);
     }
 
-    private JavaWsdlMappingType parseMetadata(boolean xsdValidation, StreamSource source, String namespace, boolean disableSecureXmlProcessing) throws JAXBException, IOException, TransformerException {
+    private JavaWsdlMappingType parseMetadata(boolean xsdValidation, StreamSource source, String namespace, boolean disableXmlSecurity) throws JAXBException, IOException, TransformerException {
         if (NAMESPACE_WEBLOGIC_WSEE_DATABINDING.equals(namespace)) {
-            return Util.transformAndRead(source, disableSecureXmlProcessing);
+            return Util.transformAndRead(source, disableXmlSecurity);
         } if (NAMESPACE_JAXWS_RI_EXTERNAL_METADATA.equals(namespace)) {
-            return Util.read(source, xsdValidation, disableSecureXmlProcessing);
+            return Util.read(source, xsdValidation, disableXmlSecurity);
         } else {
             throw new RuntimeModelerException("runtime.modeler.external.metadata.unsupported.schema", namespace, Arrays.asList(NAMESPACE_WEBLOGIC_WSEE_DATABINDING, NAMESPACE_JAXWS_RI_EXTERNAL_METADATA).toString());
         }
@@ -425,8 +425,8 @@
         }
 
         @SuppressWarnings("unchecked")
-        public static JavaWsdlMappingType read(Source src, boolean xsdValidation, boolean disableSecureXmlProcessing) throws IOException, JAXBException {
-            JAXBContext ctx = jaxbContext(disableSecureXmlProcessing);
+        public static JavaWsdlMappingType read(Source src, boolean xsdValidation, boolean disableXmlSecurity) throws IOException, JAXBException {
+            JAXBContext ctx = jaxbContext(disableXmlSecurity);
             try {
                 Unmarshaller um = ctx.createUnmarshaller();
                 if (xsdValidation) {
@@ -455,16 +455,16 @@
             }
         }
 
-        private static JAXBContext jaxbContext(boolean disableSecureXmlProcessing) {
+        private static JAXBContext jaxbContext(boolean disableXmlSecurity) {
             // as it is supposed to have security enabled in most cases, we create and don't cache
             // "insecure" JAXBContext - these should be corner cases
-            return disableSecureXmlProcessing ? createJaxbContext(true) : jaxbContext;
+            return disableXmlSecurity ? createJaxbContext(true) : jaxbContext;
         }
 
-        public static JavaWsdlMappingType transformAndRead(Source src, boolean disableSecureXmlProcessing) throws TransformerException, JAXBException {
+        public static JavaWsdlMappingType transformAndRead(Source src, boolean disableXmlSecurity) throws TransformerException, JAXBException {
             Source xsl = new StreamSource(Util.class.getResourceAsStream(TRANSLATE_NAMESPACES_XSL));
-            JAXBResult result = new JAXBResult(jaxbContext(disableSecureXmlProcessing));
-            TransformerFactory tf = XmlUtil.newTransformerFactory(!disableSecureXmlProcessing);
+            JAXBResult result = new JAXBResult(jaxbContext(disableXmlSecurity));
+            TransformerFactory tf = XmlUtil.newTransformerFactory(!disableXmlSecurity);
             Transformer transformer = tf.newTemplates(xsl).newTransformer();
             transformer.transform(src, result);
             return getJavaWsdlMapping(result.getResult());
@@ -534,9 +534,9 @@
             return elems.toArray(new Element[elems.size()]);
         }
 
-        static String documentRootNamespace(Source src, boolean disableSecureXmlProcessing) throws XMLStreamException {
+        static String documentRootNamespace(Source src, boolean disableXmlSecurity) throws XMLStreamException {
             XMLInputFactory factory;
-            factory = XmlUtil.newXMLInputFactory(!disableSecureXmlProcessing);
+            factory = XmlUtil.newXMLInputFactory(!disableXmlSecurity);
             XMLStreamReader streamReader = factory.createXMLStreamReader(src);
             XMLStreamReaderUtil.nextElementContent(streamReader);
             String namespaceURI = streamReader.getName().getNamespaceURI();
diff --git a/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/model/JavaMethodImpl.java b/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/model/JavaMethodImpl.java
index 7d24880..c6acfe0 100644
--- a/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/model/JavaMethodImpl.java
+++ b/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/model/JavaMethodImpl.java
@@ -25,7 +25,6 @@
 
 package com.sun.xml.internal.ws.model;
 
-import com.sun.istack.internal.NotNull;
 import com.sun.xml.internal.bind.api.TypeReference;
 import com.sun.xml.internal.ws.api.databinding.MetadataReader;
 import com.sun.xml.internal.ws.api.model.JavaMethod;
@@ -216,14 +215,14 @@
      * @return soap:Body's first child name for request message.
      */
     public @Nullable QName getRequestPayloadName() {
-        return (wsdlOperation != null)? wsdlOperation.getReqPayloadName(): requestPayloadName;
+        return (wsdlOperation != null)? wsdlOperation.getRequestPayloadName(): requestPayloadName;
     }
 
     /**
      * @return soap:Body's first child name for response message.
      */
     public @Nullable QName getResponsePayloadName() {
-        return (mep == MEP.ONE_WAY) ? null : wsdlOperation.getResPayloadName();
+        return (mep == MEP.ONE_WAY) ? null : wsdlOperation.getResponsePayloadName();
     }
 
     /**
diff --git a/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/model/wsdl/AbstractExtensibleImpl.java b/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/model/wsdl/AbstractExtensibleImpl.java
index cb3ac1f..d7b3be4 100644
--- a/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/model/wsdl/AbstractExtensibleImpl.java
+++ b/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/model/wsdl/AbstractExtensibleImpl.java
@@ -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
@@ -29,11 +29,9 @@
 import com.sun.xml.internal.ws.api.model.wsdl.WSDLExtension;
 import com.sun.xml.internal.ws.api.model.wsdl.WSDLObject;
 import com.sun.xml.internal.ws.resources.UtilMessages;
-import com.sun.xml.internal.ws.wsdl.parser.WSDLConstants;
 import com.sun.istack.internal.NotNull;
 
 import javax.xml.stream.XMLStreamReader;
-import javax.xml.stream.Location;
 import javax.xml.namespace.QName;
 import javax.xml.ws.WebServiceException;
 import java.util.ArrayList;
@@ -42,7 +40,6 @@
 import java.util.Set;
 
 import org.xml.sax.Locator;
-import org.xml.sax.helpers.LocatorImpl;
 
 /**
  * All the WSDL 1.1 elements that are extensible should subclass from this abstract implementation of
@@ -95,6 +92,10 @@
         extensions.add(ex);
     }
 
+    public List<? extends UnknownWSDLExtension> getNotUnderstoodExtensions() {
+        return notUnderstoodExtensions;
+    }
+
     /**
      * This can be used if a WSDL extension element that has wsdl:required=true
      * is not understood
diff --git a/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/model/wsdl/WSDLBoundFaultImpl.java b/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/model/wsdl/WSDLBoundFaultImpl.java
index 86dd0dc..bdd590e 100644
--- a/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/model/wsdl/WSDLBoundFaultImpl.java
+++ b/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/model/wsdl/WSDLBoundFaultImpl.java
@@ -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
@@ -26,10 +26,10 @@
 package com.sun.xml.internal.ws.model.wsdl;
 
 import com.sun.istack.internal.NotNull;
-import com.sun.xml.internal.ws.api.model.wsdl.WSDLBoundFault;
-import com.sun.xml.internal.ws.api.model.wsdl.WSDLFault;
-import com.sun.xml.internal.ws.api.model.wsdl.WSDLOperation;
-import com.sun.xml.internal.ws.api.model.wsdl.WSDLBoundOperation;
+import com.sun.xml.internal.ws.api.model.wsdl.editable.EditableWSDLBoundFault;
+import com.sun.xml.internal.ws.api.model.wsdl.editable.EditableWSDLBoundOperation;
+import com.sun.xml.internal.ws.api.model.wsdl.editable.EditableWSDLFault;
+import com.sun.xml.internal.ws.api.model.wsdl.editable.EditableWSDLOperation;
 
 import javax.xml.stream.XMLStreamReader;
 import javax.xml.namespace.QName;
@@ -37,12 +37,12 @@
 /**
  * @author Vivek Pandey
  */
-public class WSDLBoundFaultImpl extends AbstractExtensibleImpl implements WSDLBoundFault {
+public class WSDLBoundFaultImpl extends AbstractExtensibleImpl implements EditableWSDLBoundFault {
     private final String name;
-    private WSDLFault fault;
-    private WSDLBoundOperationImpl owner;
+    private EditableWSDLFault fault;
+    private EditableWSDLBoundOperation owner;
 
-    public WSDLBoundFaultImpl(XMLStreamReader xsr, String name, WSDLBoundOperationImpl owner) {
+    public WSDLBoundFaultImpl(XMLStreamReader xsr, String name, EditableWSDLBoundOperation owner) {
         super(xsr);
         this.name = name;
         this.owner = owner;
@@ -61,20 +61,20 @@
         return null;
     }
 
-    public WSDLFault getFault() {
+    public EditableWSDLFault getFault() {
         return fault;
     }
 
     @NotNull
-    public WSDLBoundOperation getBoundOperation() {
+    public EditableWSDLBoundOperation getBoundOperation() {
         return owner;
     }
 
-    void freeze(WSDLBoundOperationImpl root) {
+    public void freeze(EditableWSDLBoundOperation root) {
         assert root != null;
-        WSDLOperation op = root.getOperation();
+        EditableWSDLOperation op = root.getOperation();
         if (op != null) {
-            for (WSDLFault f : op.getFaults()) {
+            for (EditableWSDLFault f : op.getFaults()) {
                 if (f.getName().equals(name)) {
                     this.fault = f;
                     break;
diff --git a/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/model/wsdl/WSDLBoundOperationImpl.java b/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/model/wsdl/WSDLBoundOperationImpl.java
index 917e5c6..e4f0097 100644
--- a/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/model/wsdl/WSDLBoundOperationImpl.java
+++ b/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/model/wsdl/WSDLBoundOperationImpl.java
@@ -29,12 +29,20 @@
 import com.sun.istack.internal.NotNull;
 import com.sun.xml.internal.ws.api.model.ParameterBinding;
 import com.sun.xml.internal.ws.api.model.wsdl.*;
+import com.sun.xml.internal.ws.api.model.wsdl.editable.EditableWSDLBoundFault;
+import com.sun.xml.internal.ws.api.model.wsdl.editable.EditableWSDLBoundOperation;
+import com.sun.xml.internal.ws.api.model.wsdl.editable.EditableWSDLBoundPortType;
+import com.sun.xml.internal.ws.api.model.wsdl.editable.EditableWSDLMessage;
+import com.sun.xml.internal.ws.api.model.wsdl.editable.EditableWSDLModel;
+import com.sun.xml.internal.ws.api.model.wsdl.editable.EditableWSDLOperation;
+import com.sun.xml.internal.ws.api.model.wsdl.editable.EditableWSDLPart;
 import com.sun.xml.internal.ws.model.RuntimeModeler;
 
 import javax.jws.WebParam.Mode;
 import javax.jws.soap.SOAPBinding.Style;
 import javax.xml.namespace.QName;
 import javax.xml.stream.XMLStreamReader;
+
 import java.util.*;
 
 /**
@@ -42,7 +50,7 @@
  *
  * @author Vivek Pandey
  */
-public final class WSDLBoundOperationImpl extends AbstractExtensibleImpl implements WSDLBoundOperation {
+public final class WSDLBoundOperationImpl extends AbstractExtensibleImpl implements EditableWSDLBoundOperation {
     private final QName name;
 
     // map of wsdl:part to the binding
@@ -61,20 +69,20 @@
     private Boolean emptyOutputBody;
     private Boolean emptyFaultBody;
 
-    private final Map<String, WSDLPartImpl> inParts;
-    private final Map<String, WSDLPartImpl> outParts;
-    private final List<WSDLBoundFaultImpl> wsdlBoundFaults;
-    private WSDLOperationImpl operation;
+    private final Map<String, EditableWSDLPart> inParts;
+    private final Map<String, EditableWSDLPart> outParts;
+    private final List<EditableWSDLBoundFault> wsdlBoundFaults;
+    private EditableWSDLOperation operation;
     private String soapAction;
     private ANONYMOUS anonymous;
 
-    private final WSDLBoundPortTypeImpl owner;
+    private final EditableWSDLBoundPortType owner;
 
     /**
      *
      * @param name wsdl:operation name qualified value
      */
-    public WSDLBoundOperationImpl(XMLStreamReader xsr, WSDLBoundPortTypeImpl owner, QName name) {
+    public WSDLBoundOperationImpl(XMLStreamReader xsr, EditableWSDLBoundPortType owner, QName name) {
         super(xsr);
         this.name = name;
         inputParts = new HashMap<String, ParameterBinding>();
@@ -83,9 +91,9 @@
         inputMimeTypes = new HashMap<String, String>();
         outputMimeTypes = new HashMap<String, String>();
         faultMimeTypes = new HashMap<String, String>();
-        inParts = new HashMap<String, WSDLPartImpl>();
-        outParts = new HashMap<String, WSDLPartImpl>();
-        wsdlBoundFaults = new ArrayList<WSDLBoundFaultImpl>();
+        inParts = new HashMap<String, EditableWSDLPart>();
+        outParts = new HashMap<String, EditableWSDLPart>();
+        wsdlBoundFaults = new ArrayList<EditableWSDLBoundFault>();
         this.owner = owner;
     }
 
@@ -104,7 +112,7 @@
     }
 
     @Override
-    public WSDLPartImpl getPart(String partName, Mode mode) {
+    public EditableWSDLPart getPart(String partName, Mode mode) {
         if(mode==Mode.IN){
             return inParts.get(partName);
         }else if(mode==Mode.OUT){
@@ -113,7 +121,7 @@
         return null;
     }
 
-    public void addPart(WSDLPartImpl part, Mode mode){
+    public void addPart(EditableWSDLPart part, Mode mode){
         if(mode==Mode.IN)
             inParts.put(part.getName(), part);
         else if(mode==Mode.OUT)
@@ -149,54 +157,27 @@
 
     // TODO: what's the difference between this and inputParts/outputParts?
     @Override
-    public Map<String,WSDLPart> getInParts() {
-        return Collections.<String,WSDLPart>unmodifiableMap(inParts);
+    public Map<String, ? extends EditableWSDLPart> getInParts() {
+        return Collections.<String, EditableWSDLPart>unmodifiableMap(inParts);
     }
 
     @Override
-    public Map<String,WSDLPart> getOutParts() {
-        return Collections.<String,WSDLPart>unmodifiableMap(outParts);
+    public Map<String, ? extends EditableWSDLPart> getOutParts() {
+        return Collections.<String, EditableWSDLPart>unmodifiableMap(outParts);
     }
 
     @NotNull
     @Override
-    public List<WSDLBoundFaultImpl> getFaults() {
+    public List<? extends EditableWSDLBoundFault> getFaults() {
         return wsdlBoundFaults;
     }
 
-    public void addFault(@NotNull WSDLBoundFaultImpl fault){
+    public void addFault(@NotNull EditableWSDLBoundFault fault){
         wsdlBoundFaults.add(fault);
     }
 
 
     /**
-     * Map of mime:content@part and the mime type from mime:content@type for wsdl:output
-     *
-     * @return empty Map if there is no parts
-     */
-    public Map<String, String> getInputMimeTypes() {
-        return inputMimeTypes;
-    }
-
-    /**
-     * Map of mime:content@part and the mime type from mime:content@type for wsdl:output
-     *
-     * @return empty Map if there is no parts
-     */
-    public Map<String, String> getOutputMimeTypes() {
-        return outputMimeTypes;
-    }
-
-    /**
-     * Map of mime:content@part and the mime type from mime:content@type for wsdl:fault
-     *
-     * @return empty Map if there is no parts
-     */
-    public Map<String, String> getFaultMimeTypes() {
-        return faultMimeTypes;
-    }
-
-    /**
      * Gets {@link ParameterBinding} for a given wsdl part in wsdl:input
      *
      * @param part Name of wsdl:part, must be non-null
@@ -296,13 +277,13 @@
     }
 
     @Override
-    public WSDLOperationImpl getOperation() {
+    public EditableWSDLOperation getOperation() {
         return operation;
     }
 
 
     @Override
-    public WSDLBoundPortType getBoundPortType() {
+    public EditableWSDLBoundPortType getBoundPortType() {
         return owner;
     }
 
@@ -324,7 +305,7 @@
     }
 
     @Override
-    public @Nullable QName getReqPayloadName() {
+    public @Nullable QName getRequestPayloadName() {
         if (emptyRequestPayload)
             return null;
 
@@ -337,8 +318,8 @@
             return requestPayloadName;
         }else{
             QName inMsgName = operation.getInput().getMessage().getName();
-            WSDLMessageImpl message = messages.get(inMsgName);
-            for(WSDLPartImpl part:message.parts()){
+            EditableWSDLMessage message = messages.get(inMsgName);
+            for(EditableWSDLPart part:message.parts()){
                 ParameterBinding binding = getInputBinding(part.getName());
                 if(binding.isBody()){
                     requestPayloadName = part.getDescriptor().name();
@@ -354,7 +335,7 @@
     }
 
     @Override
-    public @Nullable QName getResPayloadName() {
+    public @Nullable QName getResponsePayloadName() {
         if (emptyResponsePayload)
             return null;
 
@@ -367,8 +348,8 @@
             return responsePayloadName;
         }else{
             QName outMsgName = operation.getOutput().getMessage().getName();
-            WSDLMessageImpl message = messages.get(outMsgName);
-            for(WSDLPartImpl part:message.parts()){
+            EditableWSDLMessage message = messages.get(outMsgName);
+            for(EditableWSDLPart part:message.parts()){
                 ParameterBinding binding = getOutputBinding(part.getName());
                 if(binding.isBody()){
                     responsePayloadName = part.getDescriptor().name();
@@ -402,7 +383,6 @@
         reqNamespace = ns;
     }
 
-
     /**
      * For rpclit gives namespace value on soapbinding:body@namespace
      *
@@ -418,7 +398,7 @@
         respNamespace = ns;
     }
 
-    WSDLBoundPortTypeImpl getOwner(){
+    EditableWSDLBoundPortType getOwner(){
         return owner;
     }
 
@@ -426,12 +406,12 @@
     private QName responsePayloadName;
     private boolean emptyRequestPayload;
     private boolean emptyResponsePayload;
-    private Map<QName, WSDLMessageImpl> messages;
+    private Map<QName, ? extends EditableWSDLMessage> messages;
 
-    void freeze(WSDLModelImpl parent) {
+    public void freeze(EditableWSDLModel parent) {
         messages = parent.getMessages();
         operation = owner.getPortType().get(name.getLocalPart());
-        for(WSDLBoundFaultImpl bf : wsdlBoundFaults){
+        for(EditableWSDLBoundFault bf : wsdlBoundFaults){
             bf.freeze(this);
         }
     }
diff --git a/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/model/wsdl/WSDLBoundPortTypeImpl.java b/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/model/wsdl/WSDLBoundPortTypeImpl.java
index c77c687..ddd052d 100644
--- a/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/model/wsdl/WSDLBoundPortTypeImpl.java
+++ b/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/model/wsdl/WSDLBoundPortTypeImpl.java
@@ -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
@@ -31,6 +31,10 @@
 import com.sun.xml.internal.ws.api.model.ParameterBinding;
 import com.sun.xml.internal.ws.api.model.wsdl.WSDLBoundOperation;
 import com.sun.xml.internal.ws.api.model.wsdl.WSDLBoundPortType;
+import com.sun.xml.internal.ws.api.model.wsdl.editable.EditableWSDLBoundOperation;
+import com.sun.xml.internal.ws.api.model.wsdl.editable.EditableWSDLBoundPortType;
+import com.sun.xml.internal.ws.api.model.wsdl.editable.EditableWSDLModel;
+import com.sun.xml.internal.ws.api.model.wsdl.editable.EditableWSDLPortType;
 import com.sun.xml.internal.ws.resources.ClientMessages;
 import com.sun.xml.internal.ws.util.QNameMap;
 import com.sun.xml.internal.ws.util.exception.LocatableWebServiceException;
@@ -47,26 +51,26 @@
  *
  * @author Vivek Pandey
  */
-public final class WSDLBoundPortTypeImpl extends AbstractFeaturedObjectImpl implements WSDLBoundPortType {
+public final class WSDLBoundPortTypeImpl extends AbstractFeaturedObjectImpl implements EditableWSDLBoundPortType {
     private final QName name;
     private final QName portTypeName;
-    private WSDLPortTypeImpl portType;
+    private EditableWSDLPortType portType;
     private BindingID bindingId;
-    private final @NotNull WSDLModelImpl owner;
-    private final QNameMap<WSDLBoundOperationImpl> bindingOperations = new QNameMap<WSDLBoundOperationImpl>();
+    private final @NotNull EditableWSDLModel owner;
+    private final QNameMap<EditableWSDLBoundOperation> bindingOperations = new QNameMap<EditableWSDLBoundOperation>();
 
     /**
      * Operations keyed by the payload tag name.
      */
-    private QNameMap<WSDLBoundOperationImpl> payloadMap;
+    private QNameMap<EditableWSDLBoundOperation> payloadMap;
     /**
      * {@link #payloadMap} doesn't allow null key, so we store the value for it here.
      */
-    private WSDLBoundOperationImpl emptyPayloadOperation;
+    private EditableWSDLBoundOperation emptyPayloadOperation;
 
 
 
-    public WSDLBoundPortTypeImpl(XMLStreamReader xsr,@NotNull WSDLModelImpl owner, QName name, QName portTypeName) {
+    public WSDLBoundPortTypeImpl(XMLStreamReader xsr,@NotNull EditableWSDLModel owner, QName name, QName portTypeName) {
         super(xsr);
         this.owner = owner;
         this.name = name;
@@ -78,11 +82,11 @@
         return name;
     }
 
-    public @NotNull WSDLModelImpl getOwner() {
+    public @NotNull EditableWSDLModel getOwner() {
         return owner;
     }
 
-    public WSDLBoundOperationImpl get(QName operationName) {
+    public EditableWSDLBoundOperation get(QName operationName) {
         return bindingOperations.get(operationName);
     }
 
@@ -93,7 +97,7 @@
      * @param ptOp   Must be non-null
      * @throws NullPointerException if either opName or ptOp is null
      */
-    public void put(QName opName, WSDLBoundOperationImpl ptOp) {
+    public void put(QName opName, EditableWSDLBoundOperation ptOp) {
         bindingOperations.put(opName,ptOp);
     }
 
@@ -101,11 +105,11 @@
         return portTypeName;
     }
 
-    public WSDLPortTypeImpl getPortType() {
+    public EditableWSDLPortType getPortType() {
         return portType;
     }
 
-    public Iterable<WSDLBoundOperationImpl> getBindingOperations() {
+    public Iterable<EditableWSDLBoundOperation> getBindingOperations() {
         return bindingOperations.values();
     }
 
@@ -149,7 +153,7 @@
      * @return null if the binding could not be resolved for the part.
      */
     public ParameterBinding getBinding(QName operation, String part, Mode mode) {
-        WSDLBoundOperationImpl op = get(operation);
+        EditableWSDLBoundOperation op = get(operation);
         if (op == null) {
             //TODO throw exception
             return null;
@@ -160,23 +164,7 @@
             return op.getOutputBinding(part);
     }
 
-    /**
-     * Gets mime:content@part value which is the MIME type for a given operation, part and {@link Mode}.
-     *
-     * @param operation wsdl:operation@name value. Must be non-null.
-     * @param part      wsdl:part@name such as value of soap:header@part. Must be non-null.
-     * @param mode      {@link Mode#IN} or {@link Mode#OUT}. Must be non-null.
-     * @return null if the binding could not be resolved for the part.
-     */
-    public String getMimeType(QName operation, String part, Mode mode) {
-        WSDLBoundOperationImpl op = get(operation);
-        if (Mode.IN == mode)
-            return op.getMimeTypeForInputPart(part);
-        else
-            return op.getMimeTypeForOutputPart(part);
-    }
-
-    public WSDLBoundOperationImpl getOperation(String namespaceUri, String localName) {
+    public EditableWSDLBoundOperation getOperation(String namespaceUri, String localName) {
         if(namespaceUri==null && localName == null)
             return emptyPayloadOperation;
         else{
@@ -184,19 +172,7 @@
         }
     }
 
-    public void enableMTOM() {
-        features.add(new MTOMFeature());
-    }
-
-    public boolean isMTOMEnabled() {
-        return features.isEnabled(MTOMFeature.class);
-    }
-
-    public SOAPVersion getSOAPVersion(){
-        return getBindingId().getSOAPVersion();
-    }
-
-    void freeze() {
+    public void freeze() {
         portType = owner.getPortType(portTypeName);
         if(portType == null){
             throw new LocatableWebServiceException(
@@ -204,7 +180,7 @@
         }
         portType.freeze();
 
-        for (WSDLBoundOperationImpl op : bindingOperations.values()) {
+        for (EditableWSDLBoundOperation op : bindingOperations.values()) {
             op.freeze(owner);
         }
 
@@ -214,15 +190,15 @@
 
     private void freezePayloadMap() {
         if(style== Style.RPC) {
-            payloadMap = new QNameMap<WSDLBoundOperationImpl>();
-            for(WSDLBoundOperationImpl op : bindingOperations.values()){
-                payloadMap.put(op.getReqPayloadName(), op);
+            payloadMap = new QNameMap<EditableWSDLBoundOperation>();
+            for(EditableWSDLBoundOperation op : bindingOperations.values()){
+                payloadMap.put(op.getRequestPayloadName(), op);
             }
         } else {
-            payloadMap = new QNameMap<WSDLBoundOperationImpl>();
+            payloadMap = new QNameMap<EditableWSDLBoundOperation>();
             // For doclit The tag will be the operation that has the same input part descriptor value
-            for(WSDLBoundOperationImpl op : bindingOperations.values()){
-                QName name = op.getReqPayloadName();
+            for(EditableWSDLBoundOperation op : bindingOperations.values()){
+                QName name = op.getRequestPayloadName();
                 if(name == null){
                     //empty payload
                     emptyPayloadOperation = op;
diff --git a/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/model/wsdl/WSDLFaultImpl.java b/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/model/wsdl/WSDLFaultImpl.java
index d35b633..cfe3d5b 100644
--- a/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/model/wsdl/WSDLFaultImpl.java
+++ b/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/model/wsdl/WSDLFaultImpl.java
@@ -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
@@ -25,8 +25,10 @@
 
 package com.sun.xml.internal.ws.model.wsdl;
 
-import com.sun.xml.internal.ws.api.model.wsdl.WSDLFault;
-import com.sun.xml.internal.ws.api.model.wsdl.WSDLOperation;
+import com.sun.xml.internal.ws.api.model.wsdl.editable.EditableWSDLFault;
+import com.sun.xml.internal.ws.api.model.wsdl.editable.EditableWSDLMessage;
+import com.sun.xml.internal.ws.api.model.wsdl.editable.EditableWSDLModel;
+import com.sun.xml.internal.ws.api.model.wsdl.editable.EditableWSDLOperation;
 import com.sun.istack.internal.NotNull;
 
 import javax.xml.namespace.QName;
@@ -35,15 +37,15 @@
 /**
  * @author Vivek Pandey
  */
-public final class WSDLFaultImpl extends AbstractExtensibleImpl implements WSDLFault {
+public final class WSDLFaultImpl extends AbstractExtensibleImpl implements EditableWSDLFault {
     private final String name;
     private final QName messageName;
-    private WSDLMessageImpl message;
-    private WSDLOperationImpl operation;
+    private EditableWSDLMessage message;
+    private EditableWSDLOperation operation;
     private String action = "";
     private boolean defaultAction = true;
 
-    public WSDLFaultImpl(XMLStreamReader xsr, String name, QName messageName, WSDLOperationImpl operation) {
+    public WSDLFaultImpl(XMLStreamReader xsr, String name, QName messageName, EditableWSDLOperation operation) {
         super(xsr);
         this.name = name;
         this.messageName = messageName;
@@ -54,12 +56,12 @@
         return name;
     }
 
-    public WSDLMessageImpl getMessage() {
+    public EditableWSDLMessage getMessage() {
         return message;
     }
 
     @NotNull
-    public WSDLOperation getOperation() {
+    public EditableWSDLOperation getOperation() {
         return operation;
     }
 
@@ -72,6 +74,7 @@
     public String getAction() {
         return action;
     }
+
     public void setAction(String action) {
         this.action = action;
     }
@@ -84,7 +87,7 @@
         this.defaultAction = defaultAction;
     }
 
-    void freeze(WSDLModelImpl root){
+    public void freeze(EditableWSDLModel root){
         message = root.getMessage(messageName);
     }
 }
diff --git a/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/model/wsdl/WSDLInputImpl.java b/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/model/wsdl/WSDLInputImpl.java
index cde05d0..c90c84c 100644
--- a/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/model/wsdl/WSDLInputImpl.java
+++ b/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/model/wsdl/WSDLInputImpl.java
@@ -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
@@ -25,11 +25,11 @@
 
 package com.sun.xml.internal.ws.model.wsdl;
 
-import com.sun.xml.internal.ws.api.model.wsdl.WSDLInput;
-import com.sun.xml.internal.ws.api.model.wsdl.WSDLMessage;
-import com.sun.xml.internal.ws.api.model.wsdl.WSDLOperation;
+import com.sun.xml.internal.ws.api.model.wsdl.editable.EditableWSDLInput;
+import com.sun.xml.internal.ws.api.model.wsdl.editable.EditableWSDLMessage;
+import com.sun.xml.internal.ws.api.model.wsdl.editable.EditableWSDLModel;
+import com.sun.xml.internal.ws.api.model.wsdl.editable.EditableWSDLOperation;
 import com.sun.istack.internal.NotNull;
-import com.sun.istack.internal.Nullable;
 
 import javax.xml.namespace.QName;
 import javax.xml.stream.XMLStreamReader;
@@ -37,15 +37,15 @@
 /**
  * @author Vivek Pandey
  */
-public final class WSDLInputImpl extends AbstractExtensibleImpl implements WSDLInput {
+public final class WSDLInputImpl extends AbstractExtensibleImpl implements EditableWSDLInput {
     private String name;
     private QName messageName;
-    private WSDLOperationImpl operation;
-    private WSDLMessageImpl message;
+    private EditableWSDLOperation operation;
+    private EditableWSDLMessage message;
     private String action;
     private boolean defaultAction = true;
 
-    public WSDLInputImpl(XMLStreamReader xsr,String name, QName messageName, WSDLOperationImpl operation) {
+    public WSDLInputImpl(XMLStreamReader xsr,String name, QName messageName, EditableWSDLOperation operation) {
         super(xsr);
         this.name = name;
         this.messageName = messageName;
@@ -59,7 +59,7 @@
         return (operation.isOneWay())?operation.getName().getLocalPart():operation.getName().getLocalPart()+"Request";
     }
 
-    public WSDLMessage getMessage() {
+    public EditableWSDLMessage getMessage() {
         return message;
     }
 
@@ -68,7 +68,7 @@
     }
 
     @NotNull
-    public WSDLOperation getOperation() {
+    public EditableWSDLOperation getOperation() {
         return operation;
     }
 
@@ -88,7 +88,7 @@
         this.defaultAction = defaultAction;
     }
 
-    void freeze(WSDLModelImpl parent) {
+    public void freeze(EditableWSDLModel parent) {
         message = parent.getMessage(messageName);
     }
 }
diff --git a/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/model/wsdl/WSDLMessageImpl.java b/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/model/wsdl/WSDLMessageImpl.java
index c3a0865..22dcc2b 100644
--- a/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/model/wsdl/WSDLMessageImpl.java
+++ b/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/model/wsdl/WSDLMessageImpl.java
@@ -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
@@ -25,19 +25,21 @@
 
 package com.sun.xml.internal.ws.model.wsdl;
 
-import com.sun.xml.internal.ws.api.model.wsdl.WSDLMessage;
+import com.sun.xml.internal.ws.api.model.wsdl.editable.EditableWSDLMessage;
+import com.sun.xml.internal.ws.api.model.wsdl.editable.EditableWSDLPart;
 
 import javax.xml.namespace.QName;
 import javax.xml.stream.XMLStreamReader;
+
 import java.util.ArrayList;
 
 /**
  * Provides abstraction for wsdl:message
  * @author Vivek Pandey
  */
-public final class WSDLMessageImpl extends AbstractExtensibleImpl implements WSDLMessage {
+public final class WSDLMessageImpl extends AbstractExtensibleImpl implements EditableWSDLMessage {
     private final QName name;
-    private final ArrayList<WSDLPartImpl> parts;
+    private final ArrayList<EditableWSDLPart> parts;
 
     /**
      * @param name wsdl:message name attribute value
@@ -45,18 +47,18 @@
     public WSDLMessageImpl(XMLStreamReader xsr,QName name) {
         super(xsr);
         this.name = name;
-        this.parts = new ArrayList<WSDLPartImpl>();
+        this.parts = new ArrayList<EditableWSDLPart>();
     }
 
     public QName getName() {
         return name;
     }
 
-    public void add(WSDLPartImpl part){
+    public void add(EditableWSDLPart part){
         parts.add(part);
     }
 
-    public Iterable<WSDLPartImpl> parts(){
+    public Iterable<EditableWSDLPart> parts(){
         return parts;
     }
 }
diff --git a/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/model/wsdl/WSDLModelImpl.java b/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/model/wsdl/WSDLModelImpl.java
index 78aa5ca..798388a 100644
--- a/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/model/wsdl/WSDLModelImpl.java
+++ b/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/model/wsdl/WSDLModelImpl.java
@@ -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
@@ -27,21 +27,25 @@
 
 import com.sun.istack.internal.NotNull;
 import com.sun.xml.internal.ws.api.model.ParameterBinding;
-import com.sun.xml.internal.ws.api.model.wsdl.WSDLBoundPortType;
 import com.sun.xml.internal.ws.api.model.wsdl.WSDLMessage;
 import com.sun.xml.internal.ws.api.model.wsdl.WSDLModel;
 import com.sun.xml.internal.ws.api.model.wsdl.WSDLOperation;
-import com.sun.xml.internal.ws.api.model.wsdl.WSDLPort;
 import com.sun.xml.internal.ws.api.model.wsdl.WSDLPortType;
-import com.sun.xml.internal.ws.api.model.wsdl.WSDLService;
+import com.sun.xml.internal.ws.api.model.wsdl.editable.EditableWSDLBoundOperation;
+import com.sun.xml.internal.ws.api.model.wsdl.editable.EditableWSDLBoundPortType;
+import com.sun.xml.internal.ws.api.model.wsdl.editable.EditableWSDLMessage;
+import com.sun.xml.internal.ws.api.model.wsdl.editable.EditableWSDLModel;
+import com.sun.xml.internal.ws.api.model.wsdl.editable.EditableWSDLPart;
+import com.sun.xml.internal.ws.api.model.wsdl.editable.EditableWSDLPort;
+import com.sun.xml.internal.ws.api.model.wsdl.editable.EditableWSDLPortType;
+import com.sun.xml.internal.ws.api.model.wsdl.editable.EditableWSDLService;
 import com.sun.xml.internal.ws.policy.PolicyMap;
 
 import javax.jws.WebParam.Mode;
 import javax.xml.namespace.QName;
-import java.net.URL;
+
 import java.util.Collections;
 import java.util.HashMap;
-import java.util.Iterator;
 import java.util.LinkedHashMap;
 import java.util.Map;
 
@@ -50,15 +54,15 @@
  *
  * @author Vivek Pandey
  */
-public final class WSDLModelImpl extends AbstractExtensibleImpl implements WSDLModel {
-    private final Map<QName, WSDLMessageImpl> messages = new HashMap<QName, WSDLMessageImpl>();
-    private final Map<QName, WSDLPortTypeImpl> portTypes = new HashMap<QName, WSDLPortTypeImpl>();
-    private final Map<QName, WSDLBoundPortTypeImpl> bindings = new HashMap<QName, WSDLBoundPortTypeImpl>();
-    private final Map<QName, WSDLServiceImpl> services = new LinkedHashMap<QName, WSDLServiceImpl>();
+public final class WSDLModelImpl extends AbstractExtensibleImpl implements EditableWSDLModel {
+    private final Map<QName, EditableWSDLMessage> messages = new HashMap<QName, EditableWSDLMessage>();
+    private final Map<QName, EditableWSDLPortType> portTypes = new HashMap<QName, EditableWSDLPortType>();
+    private final Map<QName, EditableWSDLBoundPortType> bindings = new HashMap<QName, EditableWSDLBoundPortType>();
+    private final Map<QName, EditableWSDLService> services = new LinkedHashMap<QName, EditableWSDLService>();
 
     private PolicyMap policyMap;
-    private final Map<QName,WSDLBoundPortType> unmBindings
-        = Collections.<QName,WSDLBoundPortType>unmodifiableMap(bindings);
+    private final Map<QName, EditableWSDLBoundPortType> unmBindings
+        = Collections.<QName, EditableWSDLBoundPortType>unmodifiableMap(bindings);
 
 
     public WSDLModelImpl(@NotNull String systemId) {
@@ -72,52 +76,52 @@
         super(null,-1);
     }
 
-    public void addMessage(WSDLMessageImpl msg){
+    public void addMessage(EditableWSDLMessage msg){
         messages.put(msg.getName(), msg);
     }
 
-    public WSDLMessageImpl getMessage(QName name){
+    public EditableWSDLMessage getMessage(QName name){
         return messages.get(name);
     }
 
-    public void addPortType(WSDLPortTypeImpl pt){
+    public void addPortType(EditableWSDLPortType pt){
         portTypes.put(pt.getName(), pt);
     }
 
-    public WSDLPortTypeImpl getPortType(QName name){
+    public EditableWSDLPortType getPortType(QName name){
         return portTypes.get(name);
     }
 
-    public void addBinding(WSDLBoundPortTypeImpl boundPortType){
+    public void addBinding(EditableWSDLBoundPortType boundPortType){
         assert !bindings.containsValue(boundPortType);
         bindings.put(boundPortType.getName(), boundPortType);
     }
 
-    public WSDLBoundPortTypeImpl getBinding(QName name){
+    public EditableWSDLBoundPortType getBinding(QName name){
         return bindings.get(name);
     }
 
-    public void addService(WSDLServiceImpl svc){
+    public void addService(EditableWSDLService svc){
         services.put(svc.getName(), svc);
     }
 
-    public WSDLServiceImpl getService(QName name){
+    public EditableWSDLService getService(QName name){
         return services.get(name);
     }
 
-    public Map<QName, WSDLMessageImpl> getMessages() {
+    public Map<QName, EditableWSDLMessage> getMessages() {
         return messages;
     }
 
-    public @NotNull Map<QName, WSDLPortTypeImpl> getPortTypes() {
+    public @NotNull Map<QName, EditableWSDLPortType> getPortTypes() {
         return portTypes;
     }
 
-    public @NotNull Map<QName, WSDLBoundPortType> getBindings() {
+    public @NotNull Map<QName, ? extends EditableWSDLBoundPortType> getBindings() {
         return unmBindings;
     }
 
-    public @NotNull Map<QName, WSDLServiceImpl> getServices(){
+    public @NotNull Map<QName, EditableWSDLService> getServices(){
         return services;
     }
 
@@ -131,50 +135,23 @@
     }
 
     /**
-     * Returns first port QName from first service as per the insertion order
-     */
-    public QName getFirstPortName(){
-        WSDLPort fp = getFirstPort();
-        if(fp==null)
-            return null;
-        else
-            return fp.getName();
-    }
-
-    private WSDLPort getFirstPort(){
-        if(services.isEmpty())
-            return null;
-        WSDLService service = services.values().iterator().next();
-        Iterator<? extends WSDLPort> iter = service.getPorts().iterator();
-        WSDLPort port = iter.hasNext()?iter.next():null;
-        return port;
-    }
-
-    /**
-    * gets the first port in the wsdl which matches the serviceName and portType
-    */
-    public WSDLPortImpl getMatchingPort(QName serviceName, QName portType){
-        return getService(serviceName).getMatchingPort(portType);
-    }
-
-    /**
      *
      * @param serviceName non-null service QName
      * @param portName    non-null port QName
      * @return
      *          WSDLBoundOperation on success otherwise null. throws NPE if any of the parameters null
      */
-    public WSDLBoundPortTypeImpl getBinding(QName serviceName, QName portName){
-        WSDLServiceImpl service = services.get(serviceName);
+    public EditableWSDLBoundPortType getBinding(QName serviceName, QName portName){
+        EditableWSDLService service = services.get(serviceName);
         if(service != null){
-            WSDLPortImpl port = service.get(portName);
+            EditableWSDLPort port = service.get(portName);
             if(port != null)
                 return port.getBinding();
         }
         return null;
     }
 
-    void finalizeRpcLitBinding(WSDLBoundPortTypeImpl boundPortType){
+    public void finalizeRpcLitBinding(EditableWSDLBoundPortType boundPortType){
         assert(boundPortType != null);
         QName portTypeName = boundPortType.getPortTypeName();
         if(portTypeName == null)
@@ -182,15 +159,15 @@
         WSDLPortType pt = portTypes.get(portTypeName);
         if(pt == null)
             return;
-        for (WSDLBoundOperationImpl bop : boundPortType.getBindingOperations()) {
+        for (EditableWSDLBoundOperation bop : boundPortType.getBindingOperations()) {
             WSDLOperation pto = pt.get(bop.getName().getLocalPart());
             WSDLMessage inMsgName = pto.getInput().getMessage();
             if(inMsgName == null)
                 continue;
-            WSDLMessageImpl inMsg = messages.get(inMsgName.getName());
+            EditableWSDLMessage inMsg = messages.get(inMsgName.getName());
             int bodyindex = 0;
             if(inMsg != null){
-                for(WSDLPartImpl part:inMsg.parts()){
+                for(EditableWSDLPart part:inMsg.parts()){
                     String name = part.getName();
                     ParameterBinding pb = bop.getInputBinding(name);
                     if(pb.isBody()){
@@ -206,9 +183,9 @@
             WSDLMessage outMsgName = pto.getOutput().getMessage();
             if(outMsgName == null)
                 continue;
-            WSDLMessageImpl outMsg = messages.get(outMsgName.getName());
+            EditableWSDLMessage outMsg = messages.get(outMsgName.getName());
             if(outMsg!= null){
-                for(WSDLPartImpl part:outMsg.parts()){
+                for(EditableWSDLPart part:outMsg.parts()){
                     String name = part.getName();
                     ParameterBinding pb = bop.getOutputBinding(name);
                     if(pb.isBody()){
@@ -242,14 +219,14 @@
      * Invoked at the end of the model construction to fix up references, etc.
      */
     public void freeze() {
-        for (WSDLServiceImpl service : services.values()) {
+        for (EditableWSDLService service : services.values()) {
             service.freeze(this);
         }
-        for (WSDLBoundPortTypeImpl bp : bindings.values()) {
+        for (EditableWSDLBoundPortType bp : bindings.values()) {
             bp.freeze();
         }
         // Enforce freeze all the portTypes referenced by this endpoints, see Bug8966673 for detail
-        for (WSDLPortTypeImpl pt : portTypes.values()) {
+        for (EditableWSDLPortType pt : portTypes.values()) {
             pt.freeze();
         }
     }
diff --git a/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/model/wsdl/WSDLOperationImpl.java b/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/model/wsdl/WSDLOperationImpl.java
index 5f6532c..c469994 100644
--- a/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/model/wsdl/WSDLOperationImpl.java
+++ b/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/model/wsdl/WSDLOperationImpl.java
@@ -26,13 +26,20 @@
 package com.sun.xml.internal.ws.model.wsdl;
 
 import com.sun.istack.internal.NotNull;
-import com.sun.xml.internal.ws.api.model.wsdl.WSDLFault;
 import com.sun.xml.internal.ws.api.model.wsdl.WSDLOperation;
-import com.sun.xml.internal.ws.api.model.wsdl.WSDLPortType;
+import com.sun.xml.internal.ws.api.model.wsdl.editable.EditableWSDLFault;
+import com.sun.xml.internal.ws.api.model.wsdl.editable.EditableWSDLInput;
+import com.sun.xml.internal.ws.api.model.wsdl.editable.EditableWSDLMessage;
+import com.sun.xml.internal.ws.api.model.wsdl.editable.EditableWSDLModel;
+import com.sun.xml.internal.ws.api.model.wsdl.editable.EditableWSDLOperation;
+import com.sun.xml.internal.ws.api.model.wsdl.editable.EditableWSDLOutput;
+import com.sun.xml.internal.ws.api.model.wsdl.editable.EditableWSDLPart;
+import com.sun.xml.internal.ws.api.model.wsdl.editable.EditableWSDLPortType;
 import com.sun.xml.internal.ws.util.QNameMap;
 
 import javax.xml.namespace.QName;
 import javax.xml.stream.XMLStreamReader;
+
 import java.util.ArrayList;
 import java.util.List;
 
@@ -41,21 +48,21 @@
  *
  * @author Vivek Pandey
  */
-public final class WSDLOperationImpl extends AbstractExtensibleImpl implements WSDLOperation {
+public final class WSDLOperationImpl extends AbstractExtensibleImpl implements EditableWSDLOperation {
     private final QName name;
     private String parameterOrder;
-    private WSDLInputImpl input;
-    private WSDLOutputImpl output;
-    private final List<WSDLFaultImpl> faults;
-    private final QNameMap<WSDLFaultImpl> faultMap;
-    protected Iterable<WSDLMessageImpl> messages;
-    private final WSDLPortType owner;
+    private EditableWSDLInput input;
+    private EditableWSDLOutput output;
+    private final List<EditableWSDLFault> faults;
+    private final QNameMap<EditableWSDLFault> faultMap;
+    protected Iterable<EditableWSDLMessage> messages;
+    private final EditableWSDLPortType owner;
 
-    public WSDLOperationImpl(XMLStreamReader xsr,WSDLPortTypeImpl owner, QName name) {
+    public WSDLOperationImpl(XMLStreamReader xsr, EditableWSDLPortType owner, QName name) {
         super(xsr);
         this.name = name;
-        this.faults = new ArrayList<WSDLFaultImpl>();
-        this.faultMap = new QNameMap<WSDLFaultImpl>();
+        this.faults = new ArrayList<EditableWSDLFault>();
+        this.faultMap = new QNameMap<EditableWSDLFault>();
         this.owner = owner;
     }
 
@@ -71,15 +78,15 @@
         this.parameterOrder = parameterOrder;
     }
 
-    public WSDLInputImpl getInput() {
+    public EditableWSDLInput getInput() {
         return input;
     }
 
-    public void setInput(WSDLInputImpl input) {
+    public void setInput(EditableWSDLInput input) {
         this.input = input;
     }
 
-    public WSDLOutputImpl getOutput() {
+    public EditableWSDLOutput getOutput() {
         return output;
     }
 
@@ -87,22 +94,22 @@
         return output == null;
     }
 
-    public void setOutput(WSDLOutputImpl output) {
+    public void setOutput(EditableWSDLOutput output) {
         this.output = output;
     }
 
-    public Iterable<WSDLFaultImpl> getFaults() {
+    public Iterable<EditableWSDLFault> getFaults() {
         return faults;
     }
 
-    public WSDLFault getFault(QName faultDetailName) {
-        WSDLFaultImpl fault = faultMap.get(faultDetailName);
+    public EditableWSDLFault getFault(QName faultDetailName) {
+        EditableWSDLFault fault = faultMap.get(faultDetailName);
         if(fault != null)
             return fault;
 
-        for(WSDLFaultImpl fi:faults){
+        for(EditableWSDLFault fi : faults){
             assert fi.getMessage().parts().iterator().hasNext();
-            WSDLPartImpl part = fi.getMessage().parts().iterator().next();
+            EditableWSDLPart part = fi.getMessage().parts().iterator().next();
             if(part.getDescriptor().name().equals(faultDetailName)){
                 faultMap.put(faultDetailName, fi);
                 return fi;
@@ -111,25 +118,21 @@
         return null;
     }
 
-    WSDLPortType getOwner() {
-        return owner;
-    }
-
     @NotNull
     public QName getPortTypeName() {
         return owner.getName();
     }
 
-    public void addFault(WSDLFaultImpl fault) {
+    public void addFault(EditableWSDLFault fault) {
         faults.add(fault);
     }
 
-    public void freez(WSDLModelImpl root) {
+    public void freeze(EditableWSDLModel root) {
         assert input != null;
         input.freeze(root);
         if(output != null)
             output.freeze(root);
-        for(WSDLFaultImpl fault : faults){
+        for(EditableWSDLFault fault : faults){
             fault.freeze(root);
         }
     }
diff --git a/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/model/wsdl/WSDLOutputImpl.java b/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/model/wsdl/WSDLOutputImpl.java
index 851ba72..672c368 100644
--- a/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/model/wsdl/WSDLOutputImpl.java
+++ b/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/model/wsdl/WSDLOutputImpl.java
@@ -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
@@ -25,9 +25,10 @@
 
 package com.sun.xml.internal.ws.model.wsdl;
 
-import com.sun.xml.internal.ws.api.model.wsdl.WSDLMessage;
-import com.sun.xml.internal.ws.api.model.wsdl.WSDLOutput;
-import com.sun.xml.internal.ws.api.model.wsdl.WSDLOperation;
+import com.sun.xml.internal.ws.api.model.wsdl.editable.EditableWSDLMessage;
+import com.sun.xml.internal.ws.api.model.wsdl.editable.EditableWSDLModel;
+import com.sun.xml.internal.ws.api.model.wsdl.editable.EditableWSDLOperation;
+import com.sun.xml.internal.ws.api.model.wsdl.editable.EditableWSDLOutput;
 import com.sun.istack.internal.NotNull;
 
 import javax.xml.namespace.QName;
@@ -36,14 +37,15 @@
 /**
  * @author Vivek Pandey
  */
-public final class WSDLOutputImpl extends AbstractExtensibleImpl implements WSDLOutput {
+public final class WSDLOutputImpl extends AbstractExtensibleImpl implements EditableWSDLOutput {
     private String name;
     private QName messageName;
-    private WSDLOperationImpl operation;
-    private WSDLMessageImpl message;
+    private EditableWSDLOperation operation;
+    private EditableWSDLMessage message;
     private String action;
     private boolean defaultAction = true;
-    public WSDLOutputImpl(XMLStreamReader xsr,String name, QName messageName, WSDLOperationImpl operation) {
+
+    public WSDLOutputImpl(XMLStreamReader xsr,String name, QName messageName, EditableWSDLOperation operation) {
         super(xsr);
         this.name = name;
         this.messageName = messageName;
@@ -54,7 +56,7 @@
         return (name == null)?operation.getName().getLocalPart()+"Response":name;
     }
 
-    public WSDLMessage getMessage() {
+    public EditableWSDLMessage getMessage() {
         return message;
     }
 
@@ -71,7 +73,7 @@
     }
 
     @NotNull
-    public WSDLOperation getOperation() {
+    public EditableWSDLOperation getOperation() {
         return operation;
     }
 
@@ -84,7 +86,7 @@
         this.action = action;
     }
 
-    void freeze(WSDLModelImpl root) {
+    public void freeze(EditableWSDLModel root) {
         message = root.getMessage(messageName);
     }
 }
diff --git a/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/model/wsdl/WSDLPartImpl.java b/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/model/wsdl/WSDLPartImpl.java
index 1a0dcf1..64df1c0 100644
--- a/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/model/wsdl/WSDLPartImpl.java
+++ b/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/model/wsdl/WSDLPartImpl.java
@@ -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
@@ -28,6 +28,7 @@
 import com.sun.xml.internal.ws.api.model.ParameterBinding;
 import com.sun.xml.internal.ws.api.model.wsdl.WSDLPart;
 import com.sun.xml.internal.ws.api.model.wsdl.WSDLPartDescriptor;
+import com.sun.xml.internal.ws.api.model.wsdl.editable.EditableWSDLPart;
 
 import javax.xml.stream.XMLStreamReader;
 
@@ -36,7 +37,7 @@
  *
  * @author Vivek Pandey
  */
-public final class WSDLPartImpl extends AbstractObjectImpl implements WSDLPart {
+public final class WSDLPartImpl extends AbstractObjectImpl implements EditableWSDLPart {
     private final String name;
     private ParameterBinding binding;
     private int index;
@@ -72,10 +73,6 @@
         this.index = index;
     }
 
-    boolean isBody(){
-        return binding.isBody();
-    }
-
     public WSDLPartDescriptor getDescriptor() {
         return descriptor;
     }
diff --git a/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/model/wsdl/WSDLPortImpl.java b/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/model/wsdl/WSDLPortImpl.java
index 2813d60..f5c9e84 100644
--- a/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/model/wsdl/WSDLPortImpl.java
+++ b/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/model/wsdl/WSDLPortImpl.java
@@ -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
@@ -25,10 +25,16 @@
 
 package com.sun.xml.internal.ws.model.wsdl;
 
+import java.util.List;
+
 import com.sun.xml.internal.ws.api.EndpointAddress;
 import com.sun.xml.internal.ws.api.SOAPVersion;
 import com.sun.xml.internal.ws.api.addressing.WSEndpointReference;
 import com.sun.xml.internal.ws.api.model.wsdl.WSDLPort;
+import com.sun.xml.internal.ws.api.model.wsdl.editable.EditableWSDLBoundPortType;
+import com.sun.xml.internal.ws.api.model.wsdl.editable.EditableWSDLModel;
+import com.sun.xml.internal.ws.api.model.wsdl.editable.EditableWSDLPort;
+import com.sun.xml.internal.ws.api.model.wsdl.editable.EditableWSDLService;
 import com.sun.xml.internal.ws.resources.ClientMessages;
 import com.sun.xml.internal.ws.util.exception.LocatableWebServiceException;
 import com.sun.xml.internal.ws.wsdl.parser.RuntimeWSDLParser;
@@ -44,19 +50,19 @@
  *
  * @author Vivek Pandey
  */
-public final class WSDLPortImpl extends AbstractFeaturedObjectImpl implements WSDLPort {
+public final class WSDLPortImpl extends AbstractFeaturedObjectImpl implements EditableWSDLPort {
     private final QName name;
     private EndpointAddress address;
     private final QName bindingName;
-    private final WSDLServiceImpl owner;
+    private final EditableWSDLService owner;
     private WSEndpointReference epr;
 
     /**
      * To be set after the WSDL parsing is complete.
      */
-    private WSDLBoundPortTypeImpl boundPortType;
+    private EditableWSDLBoundPortType boundPortType;
 
-    public WSDLPortImpl(XMLStreamReader xsr,WSDLServiceImpl owner, QName name, QName binding) {
+    public WSDLPortImpl(XMLStreamReader xsr, EditableWSDLService owner, QName name, QName binding) {
         super(xsr);
         this.owner = owner;
         this.name = name;
@@ -75,7 +81,7 @@
         return address;
     }
 
-    public WSDLServiceImpl getOwner() {
+    public EditableWSDLService getOwner() {
         return owner;
     }
 
@@ -99,15 +105,13 @@
     public @Nullable WSEndpointReference getEPR() {
         return epr;
     }
-    public WSDLBoundPortTypeImpl getBinding() {
+
+    public EditableWSDLBoundPortType getBinding() {
         return boundPortType;
     }
 
-    public SOAPVersion getSOAPVersion(){
-        return boundPortType.getSOAPVersion();
-    }
-
-    void freeze(WSDLModelImpl root) {
+    @SuppressWarnings("unchecked")
+    public void freeze(EditableWSDLModel root) {
         boundPortType = root.getBinding(bindingName);
         if(boundPortType==null) {
             throw new LocatableWebServiceException(
@@ -116,6 +120,6 @@
         if(features == null)
             features =  new WebServiceFeatureList();
         features.setParentFeaturedObject(boundPortType);
-        notUnderstoodExtensions.addAll(boundPortType.notUnderstoodExtensions);
+        notUnderstoodExtensions.addAll((List<UnknownWSDLExtension>)boundPortType.getNotUnderstoodExtensions());
     }
 }
diff --git a/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/model/wsdl/WSDLPortTypeImpl.java b/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/model/wsdl/WSDLPortTypeImpl.java
index 6fb98e6..6ad0980 100644
--- a/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/model/wsdl/WSDLPortTypeImpl.java
+++ b/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/model/wsdl/WSDLPortTypeImpl.java
@@ -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
@@ -27,9 +27,13 @@
 
 import com.sun.xml.internal.ws.api.model.wsdl.WSDLOperation;
 import com.sun.xml.internal.ws.api.model.wsdl.WSDLPortType;
+import com.sun.xml.internal.ws.api.model.wsdl.editable.EditableWSDLModel;
+import com.sun.xml.internal.ws.api.model.wsdl.editable.EditableWSDLOperation;
+import com.sun.xml.internal.ws.api.model.wsdl.editable.EditableWSDLPortType;
 
 import javax.xml.namespace.QName;
 import javax.xml.stream.XMLStreamReader;
+
 import java.util.Hashtable;
 import java.util.Map;
 
@@ -38,27 +42,27 @@
  *
  * @author Vivek Pandey
  */
-public final class WSDLPortTypeImpl  extends AbstractExtensibleImpl implements WSDLPortType {
+public final class WSDLPortTypeImpl  extends AbstractExtensibleImpl implements EditableWSDLPortType {
     private QName name;
-    private final Map<String, WSDLOperationImpl> portTypeOperations;
-    private WSDLModelImpl owner;
+    private final Map<String, EditableWSDLOperation> portTypeOperations;
+    private EditableWSDLModel owner;
 
-    public WSDLPortTypeImpl(XMLStreamReader xsr,WSDLModelImpl owner, QName name) {
+    public WSDLPortTypeImpl(XMLStreamReader xsr, EditableWSDLModel owner, QName name) {
         super(xsr);
         this.name = name;
         this.owner = owner;
-        portTypeOperations = new Hashtable<String, WSDLOperationImpl>();
+        portTypeOperations = new Hashtable<String, EditableWSDLOperation>();
     }
 
     public QName getName() {
         return name;
     }
 
-    public WSDLOperationImpl get(String operationName) {
+    public EditableWSDLOperation get(String operationName) {
         return portTypeOperations.get(operationName);
     }
 
-    public Iterable<WSDLOperationImpl> getOperations() {
+    public Iterable<EditableWSDLOperation> getOperations() {
         return portTypeOperations.values();
     }
 
@@ -68,17 +72,17 @@
      * @param ptOp  Must be non-null
      * @throws NullPointerException if either opName or ptOp is null
      */
-    public void put(String opName, WSDLOperationImpl ptOp){
+    public void put(String opName, EditableWSDLOperation ptOp){
         portTypeOperations.put(opName, ptOp);
     }
 
-    WSDLModelImpl getOwner(){
+    EditableWSDLModel getOwner(){
         return owner;
     }
 
-    void freeze() {
-        for(WSDLOperationImpl op : portTypeOperations.values()){
-            op.freez(owner);
+    public void freeze() {
+        for(EditableWSDLOperation op : portTypeOperations.values()){
+            op.freeze(owner);
         }
     }
 }
diff --git a/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/model/wsdl/WSDLProperties.java b/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/model/wsdl/WSDLProperties.java
index f1a75ed..0d2d287 100644
--- a/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/model/wsdl/WSDLProperties.java
+++ b/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/model/wsdl/WSDLProperties.java
@@ -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
@@ -26,7 +26,6 @@
 package com.sun.xml.internal.ws.model.wsdl;
 
 import com.oracle.webservices.internal.api.message.BasePropertySet;
-import com.oracle.webservices.internal.api.message.PropertySet;
 import com.sun.istack.internal.Nullable;
 import com.sun.xml.internal.ws.api.model.SEIModel;
 import com.sun.xml.internal.ws.api.model.wsdl.WSDLPort;
diff --git a/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/model/wsdl/WSDLServiceImpl.java b/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/model/wsdl/WSDLServiceImpl.java
index a24419f..acc1d37 100644
--- a/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/model/wsdl/WSDLServiceImpl.java
+++ b/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/model/wsdl/WSDLServiceImpl.java
@@ -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
@@ -29,9 +29,13 @@
 import com.sun.istack.internal.Nullable;
 import com.sun.xml.internal.ws.api.model.wsdl.WSDLPort;
 import com.sun.xml.internal.ws.api.model.wsdl.WSDLService;
+import com.sun.xml.internal.ws.api.model.wsdl.editable.EditableWSDLModel;
+import com.sun.xml.internal.ws.api.model.wsdl.editable.EditableWSDLPort;
+import com.sun.xml.internal.ws.api.model.wsdl.editable.EditableWSDLService;
 
 import javax.xml.namespace.QName;
 import javax.xml.stream.XMLStreamReader;
+
 import java.util.LinkedHashMap;
 import java.util.Map;
 
@@ -40,20 +44,20 @@
  *
  * @author Vivek Pandey
  */
-public final class WSDLServiceImpl extends AbstractExtensibleImpl implements WSDLService {
+public final class WSDLServiceImpl extends AbstractExtensibleImpl implements EditableWSDLService {
     private final QName name;
-    private final Map<QName, WSDLPortImpl> ports;
-    private final WSDLModelImpl parent;
+    private final Map<QName, EditableWSDLPort> ports;
+    private final EditableWSDLModel parent;
 
-    public WSDLServiceImpl(XMLStreamReader xsr,WSDLModelImpl parent, QName name) {
+    public WSDLServiceImpl(XMLStreamReader xsr, EditableWSDLModel parent, QName name) {
         super(xsr);
         this.parent = parent;
         this.name = name;
-        ports = new LinkedHashMap<QName,WSDLPortImpl>();
+        ports = new LinkedHashMap<QName, EditableWSDLPort>();
     }
 
     public @NotNull
-    WSDLModelImpl getParent() {
+    EditableWSDLModel getParent() {
         return parent;
     }
 
@@ -61,18 +65,18 @@
         return name;
     }
 
-    public WSDLPortImpl get(QName portName) {
+    public EditableWSDLPort get(QName portName) {
         return ports.get(portName);
     }
 
-    public WSDLPort getFirstPort() {
+    public EditableWSDLPort getFirstPort() {
         if(ports.isEmpty())
             return null;
         else
             return ports.values().iterator().next();
     }
 
-    public Iterable<WSDLPortImpl> getPorts(){
+    public Iterable<EditableWSDLPort> getPorts(){
         return ports.values();
     }
 
@@ -80,8 +84,8 @@
     * gets the first port in this service which matches the portType
     */
     public @Nullable
-    WSDLPortImpl getMatchingPort(QName portTypeName){
-        for(WSDLPortImpl port : getPorts()){
+    EditableWSDLPort getMatchingPort(QName portTypeName){
+        for(EditableWSDLPort port : getPorts()){
             QName ptName = port.getBinding().getPortTypeName();
             assert (ptName != null);
             if(ptName.equals(portTypeName))
@@ -97,14 +101,14 @@
      * @param port     Must be non-null
      * @throws NullPointerException if either opName or ptOp is null
      */
-    public void put(QName portName, WSDLPortImpl port) {
+    public void put(QName portName, EditableWSDLPort port) {
         if (portName == null || port == null)
             throw new NullPointerException();
         ports.put(portName, port);
     }
 
-    void freeze(WSDLModelImpl root) {
-        for (WSDLPortImpl port : ports.values()) {
+    public void freeze(EditableWSDLModel root) {
+        for (EditableWSDLPort port : ports.values()) {
             port.freeze(root);
         }
     }
diff --git a/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/policy/jaxws/PolicyWSDLParserExtension.java b/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/policy/jaxws/PolicyWSDLParserExtension.java
index 93cba73..42166f4 100644
--- a/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/policy/jaxws/PolicyWSDLParserExtension.java
+++ b/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/policy/jaxws/PolicyWSDLParserExtension.java
@@ -25,7 +25,8 @@
 
 package com.sun.xml.internal.ws.policy.jaxws;
 
-import com.sun.xml.internal.ws.api.model.wsdl.*;
+import com.sun.xml.internal.ws.api.model.wsdl.WSDLObject;
+import com.sun.xml.internal.ws.api.model.wsdl.editable.*;
 import com.sun.xml.internal.ws.api.wsdl.parser.WSDLParserExtension;
 import com.sun.xml.internal.ws.api.wsdl.parser.WSDLParserExtensionContext;
 import com.sun.xml.internal.ws.api.policy.PolicyResolver;
@@ -37,7 +38,6 @@
 import com.sun.xml.internal.ws.policy.sourcemodel.PolicySourceModelContext;
 import com.sun.xml.internal.ws.policy.sourcemodel.wspolicy.NamespaceVersion;
 import com.sun.xml.internal.ws.policy.sourcemodel.wspolicy.XmlToken;
-import com.sun.xml.internal.ws.model.wsdl.WSDLModelImpl;
 import com.sun.xml.internal.ws.policy.PolicyException;
 import com.sun.xml.internal.ws.policy.PolicyMap;
 import com.sun.xml.internal.ws.util.xml.XmlUtil;
@@ -54,12 +54,11 @@
 import java.util.HashMap;
 import java.util.LinkedList;
 import java.util.Map;
+
 import javax.xml.namespace.QName;
 import javax.xml.stream.XMLStreamException;
 import javax.xml.stream.XMLStreamReader;
-import javax.xml.stream.XMLInputFactory;
 import javax.xml.ws.WebServiceException;
-import javax.xml.xpath.XPathFactoryConfigurationException;
 
 /**
  * This class parses the Policy Attachments in the WSDL and creates a PolicyMap thaty captures the policies configured on
@@ -376,7 +375,7 @@
     }
 
     @Override
-    public boolean portElements(final WSDLPort port, final XMLStreamReader reader) {
+    public boolean portElements(final EditableWSDLPort port, final XMLStreamReader reader) {
         LOGGER.entering();
         final boolean result = processSubelement(port, reader, getHandlers4PortMap());
         LOGGER.exiting();
@@ -384,14 +383,14 @@
     }
 
     @Override
-    public void portAttributes(final WSDLPort port, final XMLStreamReader reader) {
+    public void portAttributes(final EditableWSDLPort port, final XMLStreamReader reader) {
         LOGGER.entering();
         processAttributes(port, reader, getHandlers4PortMap());
         LOGGER.exiting();
     }
 
     @Override
-    public boolean serviceElements(final WSDLService service, final XMLStreamReader reader) {
+    public boolean serviceElements(final EditableWSDLService service, final XMLStreamReader reader) {
         LOGGER.entering();
         final boolean result = processSubelement(service, reader, getHandlers4ServiceMap());
         LOGGER.exiting();
@@ -399,7 +398,7 @@
     }
 
     @Override
-    public void serviceAttributes(final WSDLService service, final XMLStreamReader reader) {
+    public void serviceAttributes(final EditableWSDLService service, final XMLStreamReader reader) {
         LOGGER.entering();
         processAttributes(service, reader, getHandlers4ServiceMap());
         LOGGER.exiting();
@@ -424,7 +423,7 @@
     }
 
     @Override
-    public boolean bindingElements(final WSDLBoundPortType binding, final XMLStreamReader reader) {
+    public boolean bindingElements(final EditableWSDLBoundPortType binding, final XMLStreamReader reader) {
         LOGGER.entering();
         final boolean result = processSubelement(binding, reader, getHandlers4BindingMap());
         LOGGER.exiting();
@@ -432,14 +431,14 @@
     }
 
     @Override
-    public void bindingAttributes(final WSDLBoundPortType binding, final XMLStreamReader reader) {
+    public void bindingAttributes(final EditableWSDLBoundPortType binding, final XMLStreamReader reader) {
         LOGGER.entering();
         processAttributes(binding, reader, getHandlers4BindingMap());
         LOGGER.exiting();
     }
 
     @Override
-    public boolean portTypeElements(final WSDLPortType portType, final XMLStreamReader reader) {
+    public boolean portTypeElements(final EditableWSDLPortType portType, final XMLStreamReader reader) {
         LOGGER.entering();
         final boolean result = processSubelement(portType, reader, getHandlers4PortTypeMap());
         LOGGER.exiting();
@@ -447,14 +446,14 @@
     }
 
     @Override
-    public void portTypeAttributes(final WSDLPortType portType, final XMLStreamReader reader) {
+    public void portTypeAttributes(final EditableWSDLPortType portType, final XMLStreamReader reader) {
         LOGGER.entering();
         processAttributes(portType, reader, getHandlers4PortTypeMap());
         LOGGER.exiting();
     }
 
     @Override
-    public boolean portTypeOperationElements(final WSDLOperation operation, final XMLStreamReader reader) {
+    public boolean portTypeOperationElements(final EditableWSDLOperation operation, final XMLStreamReader reader) {
         LOGGER.entering();
         final boolean result = processSubelement(operation, reader, getHandlers4OperationMap());
         LOGGER.exiting();
@@ -462,14 +461,14 @@
     }
 
     @Override
-    public void portTypeOperationAttributes(final WSDLOperation operation, final XMLStreamReader reader) {
+    public void portTypeOperationAttributes(final EditableWSDLOperation operation, final XMLStreamReader reader) {
         LOGGER.entering();
         processAttributes(operation, reader, getHandlers4OperationMap());
         LOGGER.exiting();
     }
 
     @Override
-    public boolean bindingOperationElements(final WSDLBoundOperation boundOperation, final XMLStreamReader reader) {
+    public boolean bindingOperationElements(final EditableWSDLBoundOperation boundOperation, final XMLStreamReader reader) {
         LOGGER.entering();
         final boolean result = processSubelement(boundOperation, reader, getHandlers4BoundOperationMap());
         LOGGER.exiting();
@@ -477,14 +476,14 @@
     }
 
     @Override
-    public void bindingOperationAttributes(final WSDLBoundOperation boundOperation, final XMLStreamReader reader) {
+    public void bindingOperationAttributes(final EditableWSDLBoundOperation boundOperation, final XMLStreamReader reader) {
         LOGGER.entering();
         processAttributes(boundOperation, reader, getHandlers4BoundOperationMap());
         LOGGER.exiting();
     }
 
     @Override
-    public boolean messageElements(final WSDLMessage msg, final XMLStreamReader reader) {
+    public boolean messageElements(final EditableWSDLMessage msg, final XMLStreamReader reader) {
         LOGGER.entering();
         final boolean result = processSubelement(msg, reader, getHandlers4MessageMap());
         LOGGER.exiting();
@@ -492,14 +491,14 @@
     }
 
     @Override
-    public void messageAttributes(final WSDLMessage msg, final XMLStreamReader reader) {
+    public void messageAttributes(final EditableWSDLMessage msg, final XMLStreamReader reader) {
         LOGGER.entering();
         processAttributes(msg, reader, getHandlers4MessageMap());
         LOGGER.exiting();
     }
 
     @Override
-    public boolean portTypeOperationInputElements(final WSDLInput input, final XMLStreamReader reader) {
+    public boolean portTypeOperationInputElements(final EditableWSDLInput input, final XMLStreamReader reader) {
         LOGGER.entering();
         final boolean result = processSubelement(input, reader, getHandlers4InputMap());
         LOGGER.exiting();
@@ -507,7 +506,7 @@
     }
 
     @Override
-    public void portTypeOperationInputAttributes(final WSDLInput input, final XMLStreamReader reader) {
+    public void portTypeOperationInputAttributes(final EditableWSDLInput input, final XMLStreamReader reader) {
         LOGGER.entering();
         processAttributes(input, reader, getHandlers4InputMap());
         LOGGER.exiting();
@@ -515,7 +514,7 @@
 
 
     @Override
-    public boolean portTypeOperationOutputElements(final WSDLOutput output, final XMLStreamReader reader) {
+    public boolean portTypeOperationOutputElements(final EditableWSDLOutput output, final XMLStreamReader reader) {
         LOGGER.entering();
         final boolean result = processSubelement(output, reader, getHandlers4OutputMap());
         LOGGER.exiting();
@@ -523,7 +522,7 @@
     }
 
     @Override
-    public void portTypeOperationOutputAttributes(final WSDLOutput output, final XMLStreamReader reader) {
+    public void portTypeOperationOutputAttributes(final EditableWSDLOutput output, final XMLStreamReader reader) {
         LOGGER.entering();
         processAttributes(output, reader, getHandlers4OutputMap());
         LOGGER.exiting();
@@ -531,7 +530,7 @@
 
 
     @Override
-    public boolean portTypeOperationFaultElements(final WSDLFault fault, final XMLStreamReader reader) {
+    public boolean portTypeOperationFaultElements(final EditableWSDLFault fault, final XMLStreamReader reader) {
         LOGGER.entering();
         final boolean result = processSubelement(fault, reader, getHandlers4FaultMap());
         LOGGER.exiting();
@@ -539,14 +538,14 @@
     }
 
     @Override
-    public void portTypeOperationFaultAttributes(final WSDLFault fault, final XMLStreamReader reader) {
+    public void portTypeOperationFaultAttributes(final EditableWSDLFault fault, final XMLStreamReader reader) {
         LOGGER.entering();
         processAttributes(fault, reader, getHandlers4FaultMap());
         LOGGER.exiting();
     }
 
     @Override
-    public boolean bindingOperationInputElements(final WSDLBoundOperation operation, final XMLStreamReader reader) {
+    public boolean bindingOperationInputElements(final EditableWSDLBoundOperation operation, final XMLStreamReader reader) {
         LOGGER.entering();
         final boolean result = processSubelement(operation, reader, getHandlers4BindingInputOpMap());
         LOGGER.exiting();
@@ -554,7 +553,7 @@
     }
 
     @Override
-    public void bindingOperationInputAttributes(final WSDLBoundOperation operation, final XMLStreamReader reader) {
+    public void bindingOperationInputAttributes(final EditableWSDLBoundOperation operation, final XMLStreamReader reader) {
         LOGGER.entering();
         processAttributes(operation, reader, getHandlers4BindingInputOpMap());
         LOGGER.exiting();
@@ -562,7 +561,7 @@
 
 
     @Override
-    public boolean bindingOperationOutputElements(final WSDLBoundOperation operation, final XMLStreamReader reader) {
+    public boolean bindingOperationOutputElements(final EditableWSDLBoundOperation operation, final XMLStreamReader reader) {
         LOGGER.entering();
         final boolean result = processSubelement(operation, reader, getHandlers4BindingOutputOpMap());
         LOGGER.exiting();
@@ -570,14 +569,14 @@
     }
 
     @Override
-    public void bindingOperationOutputAttributes(final WSDLBoundOperation operation, final XMLStreamReader reader) {
+    public void bindingOperationOutputAttributes(final EditableWSDLBoundOperation operation, final XMLStreamReader reader) {
         LOGGER.entering();
         processAttributes(operation, reader, getHandlers4BindingOutputOpMap());
         LOGGER.exiting();
     }
 
     @Override
-    public boolean bindingOperationFaultElements(final WSDLBoundFault fault, final XMLStreamReader reader) {
+    public boolean bindingOperationFaultElements(final EditableWSDLBoundFault fault, final XMLStreamReader reader) {
         LOGGER.entering();
         final boolean result = processSubelement(fault, reader, getHandlers4BindingFaultOpMap());
         LOGGER.exiting(result);
@@ -585,7 +584,7 @@
     }
 
     @Override
-    public void bindingOperationFaultAttributes(final WSDLBoundFault fault, final XMLStreamReader reader) {
+    public void bindingOperationFaultAttributes(final EditableWSDLBoundFault fault, final XMLStreamReader reader) {
         LOGGER.entering();
         processAttributes(fault, reader, getHandlers4BindingFaultOpMap());
         LOGGER.exiting();
@@ -701,7 +700,7 @@
             // may otherwise be multiple entries for policies that are contained
             // by fault messages.
             HashSet<BuilderHandlerMessageScope> messageSet = new HashSet<BuilderHandlerMessageScope>();
-            for (WSDLService service : context.getWSDLModel().getServices().values()) {
+            for (EditableWSDLService service : context.getWSDLModel().getServices().values()) {
                 if (getHandlers4ServiceMap().containsKey(service)) {
                     getPolicyMapBuilder().registerHandler(new BuilderHandlerServiceScope(
                             getPolicyURIs(getHandlers4ServiceMap().get(service),modelContext)
@@ -711,7 +710,7 @@
                 }
                 // end service scope
 
-                for (WSDLPort port : service.getPorts()) {
+                for (EditableWSDLPort port : service.getPorts()) {
                     if (getHandlers4PortMap().containsKey(port)) {
                         getPolicyMapBuilder().registerHandler(
                                 new BuilderHandlerEndpointScope(
@@ -747,9 +746,9 @@
                         } // endif handler for port type
                         // end endpoint scope
 
-                        for (WSDLBoundOperation boundOperation : port.getBinding().getBindingOperations()) {
+                        for (EditableWSDLBoundOperation boundOperation : port.getBinding().getBindingOperations()) {
 
-                            final WSDLOperation operation = boundOperation.getOperation();
+                            final EditableWSDLOperation operation = boundOperation.getOperation();
                             final QName operationName = new QName(boundOperation.getBoundPortType().getName().getNamespaceURI(), boundOperation.getName().getLocalPart());
                             // We store the message and portType/operation under the same namespace as the binding/operation so that we can match them up later
                             if ( // handler for operation scope -- by boundOperation
@@ -778,9 +777,9 @@
                             } // endif for portType:operation scope
                             // end operation scope
 
-                            final WSDLInput input = operation.getInput();
+                            final EditableWSDLInput input = operation.getInput();
                             if (null!=input) {
-                                WSDLMessage inputMsg = input.getMessage();
+                                EditableWSDLMessage inputMsg = input.getMessage();
                                 if (inputMsg != null && getHandlers4MessageMap().containsKey(inputMsg)) {
                                     messageSet.add(new BuilderHandlerMessageScope(
                                         getPolicyURIs(
@@ -825,9 +824,9 @@
                             } // endif portType op input msg
                             // end input message scope
 
-                            final WSDLOutput output = operation.getOutput();
+                            final EditableWSDLOutput output = operation.getOutput();
                             if (null!=output) {
-                                WSDLMessage outputMsg = output.getMessage();
+                                EditableWSDLMessage outputMsg = output.getMessage();
                                 if (outputMsg != null && getHandlers4MessageMap().containsKey(outputMsg)) {
                                     messageSet.add(new BuilderHandlerMessageScope(
                                         getPolicyURIs(
@@ -872,8 +871,8 @@
                             } // endif portType op output msg
                             // end output message scope
 
-                            for (WSDLBoundFault boundFault : boundOperation.getFaults()) {
-                                final WSDLFault fault = boundFault.getFault();
+                            for (EditableWSDLBoundFault boundFault : boundOperation.getFaults()) {
+                                final EditableWSDLFault fault = boundFault.getFault();
 
                                 // this shouldn't happen ususally,
                                 // but since this scenario tested in lagacy tests, dont' fail here
@@ -882,7 +881,7 @@
                                     continue;
                                 }
 
-                                final WSDLMessage faultMessage = fault.getMessage();
+                                final EditableWSDLMessage faultMessage = fault.getMessage();
                                 final QName faultName = new QName(boundOperation.getBoundPortType().getName().getNamespaceURI(), boundFault.getName());
                                 // We store the message and portType/fault under the same namespace as the binding/fault so that we can match them up later
                                 if (faultMessage != null && getHandlers4MessageMap().containsKey(faultMessage)) {
@@ -948,14 +947,14 @@
     @Override
     public void postFinished(final WSDLParserExtensionContext context) {
         // finally register the PolicyMap on the WSDLModel
-        WSDLModel wsdlModel = context.getWSDLModel();
+        EditableWSDLModel wsdlModel = context.getWSDLModel();
         PolicyMap effectiveMap;
         try {
             if(context.isClientSide())
                 effectiveMap = context.getPolicyResolver().resolve(new PolicyResolver.ClientContext(policyBuilder.getPolicyMap(),context.getContainer()));
             else
                 effectiveMap = context.getPolicyResolver().resolve(new PolicyResolver.ServerContext(policyBuilder.getPolicyMap(), context.getContainer(),null));
-            ((WSDLModelImpl) wsdlModel).setPolicyMap(effectiveMap);
+            wsdlModel.setPolicyMap(effectiveMap);
         } catch (PolicyException e) {
             LOGGER.logSevereException(e);
             throw LOGGER.logSevereException(new WebServiceException(PolicyMessages.WSP_1007_POLICY_EXCEPTION_WHILE_FINISHING_PARSING_WSDL(), e));
diff --git a/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/resources/WsservletMessages.java b/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/resources/WsservletMessages.java
index 909c111..e424adf 100644
--- a/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/resources/WsservletMessages.java
+++ b/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/resources/WsservletMessages.java
@@ -507,6 +507,20 @@
         return localizer.localize(localizableSERVLET_ERROR_NO_RESPONSE_MESSAGE());
     }
 
+    public static Localizable localizableMESSAGE_TOO_LONG(Object arg0) {
+        return messageFactory.getMessage("message.too.long", arg0);
+    }
+
+    /**
+     *
+     * Message has been truncated
+     * use {0} property to increase the amount of printed part of the message
+     *
+     */
+    public static String MESSAGE_TOO_LONG(Object arg0) {
+        return localizer.localize(localizableMESSAGE_TOO_LONG(arg0));
+    }
+
     public static Localizable localizableLISTENER_INFO_INITIALIZE() {
         return messageFactory.getMessage("listener.info.initialize");
     }
diff --git a/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/resources/wsservlet.properties b/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/resources/wsservlet.properties
index a51a4b7..fd981e7 100644
--- a/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/resources/wsservlet.properties
+++ b/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/resources/wsservlet.properties
@@ -1,5 +1,5 @@
 #
-# Copyright (c) 2005, 2012, Oracle and/or its affiliates. All rights reserved.
+# Copyright (c) 2005, 2013, Oracle and/or its affiliates. All rights reserved.
 # DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
 #
 # This code is free software; you can redistribute it and/or modify it
@@ -243,3 +243,6 @@
 # Concatenated with html.rootPage.body3a
 #html.rootPage.body3b='>here.</a></p>
 html.rootPage.body4=<p>This endpoint is incorrectly configured. Please check the location and contents of the configuration file.</p>
+
+message.too.long=\nMessage has been truncated\n\
+use {0} property to increase the amount of printed part of the message
diff --git a/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/server/EndpointFactory.java b/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/server/EndpointFactory.java
index 3e3bffa..c78aef5 100644
--- a/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/server/EndpointFactory.java
+++ b/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/server/EndpointFactory.java
@@ -36,7 +36,9 @@
 import com.sun.xml.internal.ws.api.databinding.MetadataReader;
 import com.sun.xml.internal.ws.api.databinding.WSDLGenInfo;
 import com.sun.xml.internal.ws.api.model.SEIModel;
+import com.sun.xml.internal.ws.api.model.wsdl.WSDLModel;
 import com.sun.xml.internal.ws.api.model.wsdl.WSDLPort;
+import com.sun.xml.internal.ws.api.model.wsdl.WSDLService;
 import com.sun.xml.internal.ws.api.policy.PolicyResolver;
 import com.sun.xml.internal.ws.api.policy.PolicyResolverFactory;
 import com.sun.xml.internal.ws.api.server.AsyncProvider;
@@ -59,9 +61,6 @@
 import com.sun.xml.internal.ws.model.ReflectAnnotationReader;
 import com.sun.xml.internal.ws.model.RuntimeModeler;
 import com.sun.xml.internal.ws.model.SOAPSEIModel;
-import com.sun.xml.internal.ws.model.wsdl.WSDLModelImpl;
-import com.sun.xml.internal.ws.model.wsdl.WSDLPortImpl;
-import com.sun.xml.internal.ws.model.wsdl.WSDLServiceImpl;
 import com.sun.xml.internal.ws.policy.PolicyMap;
 import com.sun.xml.internal.ws.policy.jaxws.PolicyUtil;
 import com.sun.xml.internal.ws.resources.ServerMessages;
@@ -73,6 +72,7 @@
 import com.sun.xml.internal.ws.util.ServiceFinder;
 import com.sun.xml.internal.ws.util.xml.XmlUtil;
 import com.sun.xml.internal.ws.wsdl.parser.RuntimeWSDLParser;
+
 import org.xml.sax.EntityResolver;
 import org.xml.sax.InputSource;
 import org.xml.sax.SAXException;
@@ -86,6 +86,7 @@
 import javax.xml.ws.WebServiceFeature;
 import javax.xml.ws.WebServiceProvider;
 import javax.xml.ws.soap.SOAPBinding;
+
 import java.io.IOException;
 import java.net.URL;
 import java.util.ArrayList;
@@ -232,7 +233,7 @@
         SDDocumentImpl primaryDoc = primaryWsdl != null ? SDDocumentImpl.create(primaryWsdl,serviceName,portTypeName) : findPrimary(docList);
 
         EndpointAwareTube terminal;
-        WSDLPortImpl wsdlPort = null;
+        WSDLPort wsdlPort = null;
         AbstractSEIModelImpl seiModel = null;
         // create WSDL model
         if (primaryDoc != null) {
@@ -709,23 +710,23 @@
      * @param container container in which this service is running
      * @return non-null wsdl port object
      */
-    private static @NotNull WSDLPortImpl getWSDLPort(SDDocumentSource primaryWsdl, List<? extends SDDocumentSource> metadata,
+    private static @NotNull WSDLPort getWSDLPort(SDDocumentSource primaryWsdl, List<? extends SDDocumentSource> metadata,
                                                      @NotNull QName serviceName, @NotNull QName portName, Container container,
                                                      EntityResolver resolver) {
         URL wsdlUrl = primaryWsdl.getSystemId();
         try {
             // TODO: delegate to another entity resolver
-            WSDLModelImpl wsdlDoc = RuntimeWSDLParser.parse(
+            WSDLModel wsdlDoc = RuntimeWSDLParser.parse(
                 new Parser(primaryWsdl), new EntityResolverImpl(metadata, resolver),
                     false, container, ServiceFinder.find(WSDLParserExtension.class).toArray());
             if(wsdlDoc.getServices().size() == 0) {
                 throw new ServerRtException(ServerMessages.localizableRUNTIME_PARSER_WSDL_NOSERVICE_IN_WSDLMODEL(wsdlUrl));
             }
-            WSDLServiceImpl wsdlService = wsdlDoc.getService(serviceName);
+            WSDLService wsdlService = wsdlDoc.getService(serviceName);
             if (wsdlService == null) {
                 throw new ServerRtException(ServerMessages.localizableRUNTIME_PARSER_WSDL_INCORRECTSERVICE(serviceName,wsdlUrl));
             }
-            WSDLPortImpl wsdlPort = wsdlService.get(portName);
+            WSDLPort wsdlPort = wsdlService.get(portName);
             if (wsdlPort == null) {
                 throw new ServerRtException(ServerMessages.localizableRUNTIME_PARSER_WSDL_INCORRECTSERVICEPORT(serviceName, portName, wsdlUrl));
             }
diff --git a/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/server/WSEndpointImpl.java b/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/server/WSEndpointImpl.java
index cd9dd1f..f0afa41 100644
--- a/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/server/WSEndpointImpl.java
+++ b/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/server/WSEndpointImpl.java
@@ -46,7 +46,6 @@
 import com.sun.xml.internal.ws.binding.BindingImpl;
 import com.sun.xml.internal.ws.fault.SOAPFaultBuilder;
 import com.sun.xml.internal.ws.model.wsdl.WSDLDirectProperties;
-import com.sun.xml.internal.ws.model.wsdl.WSDLPortImpl;
 import com.sun.xml.internal.ws.model.wsdl.WSDLPortProperties;
 import com.sun.xml.internal.ws.model.wsdl.WSDLProperties;
 import com.sun.xml.internal.ws.policy.PolicyMap;
@@ -195,7 +194,7 @@
         try {
             if (port != null) {
                 //gather EPR extrensions from WSDL Model
-                WSEndpointReference wsdlEpr = ((WSDLPortImpl) port).getEPR();
+                WSEndpointReference wsdlEpr = port.getEPR();
                 if (wsdlEpr != null) {
                     for (WSEndpointReference.EPRExtension extnEl : wsdlEpr.getEPRExtensions()) {
                         eprExtensions.put(extnEl.getQName(), extnEl);
diff --git a/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/spi/ProviderImpl.java b/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/spi/ProviderImpl.java
index 5db1bc0..05b7a2f 100644
--- a/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/spi/ProviderImpl.java
+++ b/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/spi/ProviderImpl.java
@@ -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
@@ -31,6 +31,7 @@
 import com.sun.xml.internal.ws.api.ServiceSharedFeatureMarker;
 import com.sun.xml.internal.ws.api.addressing.AddressingVersion;
 import com.sun.xml.internal.ws.api.addressing.WSEndpointReference;
+import com.sun.xml.internal.ws.api.model.wsdl.WSDLModel;
 import com.sun.xml.internal.ws.api.model.wsdl.WSDLPort;
 import com.sun.xml.internal.ws.api.model.wsdl.WSDLService;
 import com.sun.xml.internal.ws.api.server.BoundEndpoint;
@@ -41,12 +42,12 @@
 import com.sun.xml.internal.ws.api.wsdl.parser.WSDLParserExtension;
 import com.sun.xml.internal.ws.client.WSServiceDelegate;
 import com.sun.xml.internal.ws.developer.MemberSubmissionEndpointReference;
-import com.sun.xml.internal.ws.model.wsdl.WSDLModelImpl;
 import com.sun.xml.internal.ws.resources.ProviderApiMessages;
 import com.sun.xml.internal.ws.transport.http.server.EndpointImpl;
 import com.sun.xml.internal.ws.util.ServiceFinder;
 import com.sun.xml.internal.ws.util.xml.XmlUtil;
 import com.sun.xml.internal.ws.wsdl.parser.RuntimeWSDLParser;
+
 import org.w3c.dom.Element;
 import org.xml.sax.EntityResolver;
 
@@ -65,6 +66,7 @@
 import javax.xml.ws.spi.ServiceDelegate;
 import javax.xml.ws.spi.Invoker;
 import javax.xml.ws.wsaddressing.W3CEndpointReference;
+
 import java.net.URL;
 import java.security.AccessController;
 import java.security.PrivilegedAction;
@@ -217,7 +219,7 @@
                 EntityResolver er = XmlUtil.createDefaultCatalogResolver();
 
                 URL wsdlLoc = new URL(wsdlDocumentLocation);
-                WSDLModelImpl wsdlDoc = RuntimeWSDLParser.parse(wsdlLoc, new StreamSource(wsdlLoc.toExternalForm()), er,
+                WSDLModel wsdlDoc = RuntimeWSDLParser.parse(wsdlLoc, new StreamSource(wsdlLoc.toExternalForm()), er,
                         true, container, ServiceFinder.find(WSDLParserExtension.class).toArray());
                 if (serviceName != null) {
                     WSDLService wsdlService = wsdlDoc.getService(serviceName);
diff --git a/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/transport/http/HttpAdapter.java b/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/transport/http/HttpAdapter.java
index f54a0a4..452eb98 100644
--- a/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/transport/http/HttpAdapter.java
+++ b/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/transport/http/HttpAdapter.java
@@ -89,6 +89,8 @@
  */
 public class HttpAdapter extends Adapter<HttpAdapter.HttpToolkit> {
 
+    private static final Logger LOGGER = Logger.getLogger(HttpAdapter.class.getName());
+
     /**
      * {@link com.sun.xml.internal.ws.api.server.SDDocument}s keyed by the query string like "?abc".
      * Used for serving documents via HTTP GET.
@@ -852,7 +854,14 @@
                 }
             }
         }
-        buf.writeTo(baos);
+        if (buf.size() > dump_threshold) {
+            byte[] b = buf.getRawData();
+            baos.write(b, 0, dump_threshold);
+            pw.println();
+            pw.println(WsservletMessages.MESSAGE_TOO_LONG(HttpAdapter.class.getName() + ".dumpTreshold"));
+        } else {
+            buf.writeTo(baos);
+        }
         pw.println("--------------------");
 
         String msg = baos.toString();
@@ -946,6 +955,8 @@
      */
     public static volatile boolean dump = false;
 
+    public static volatile int dump_threshold = 4096;
+
     public static volatile boolean publishStatusPage = true;
 
     public static synchronized void setPublishStatus(boolean publish) {
@@ -954,19 +965,32 @@
 
     static {
         try {
-            dump = Boolean.getBoolean(HttpAdapter.class.getName()+".dump");
-        } catch( Throwable t ) {
-            // OK to ignore this
+            dump = Boolean.getBoolean(HttpAdapter.class.getName() + ".dump");
+        } catch (SecurityException se) {
+            if (LOGGER.isLoggable(Level.CONFIG)) {
+                LOGGER.log(Level.CONFIG, "Cannot read ''{0}'' property, using defaults.",
+                        new Object[] {HttpAdapter.class.getName() + ".dump"});
+            }
         }
         try {
-            setPublishStatus(System.getProperty(HttpAdapter.class.getName()+".publishStatusPage").equals("true"));
-        } catch( Throwable t ) {
-            // OK to ignore this
+            dump_threshold = Integer.getInteger(HttpAdapter.class.getName() + ".dumpTreshold", 4096);
+        } catch (SecurityException se) {
+            if (LOGGER.isLoggable(Level.CONFIG)) {
+                LOGGER.log(Level.CONFIG, "Cannot read ''{0}'' property, using defaults.",
+                        new Object[] {HttpAdapter.class.getName() + ".dumpTreshold"});
+            }
+        }
+        try {
+            setPublishStatus(Boolean.getBoolean(HttpAdapter.class.getName() + ".publishStatusPage"));
+        } catch (SecurityException se) {
+            if (LOGGER.isLoggable(Level.CONFIG)) {
+                LOGGER.log(Level.CONFIG, "Cannot read ''{0}'' property, using defaults.",
+                        new Object[] {HttpAdapter.class.getName() + ".publishStatusPage"});
+            }
         }
     }
 
     public static void setDump(boolean dumpMessages) {
         HttpAdapter.dump = dumpMessages;
     }
-    private static final Logger LOGGER = Logger.getLogger(HttpAdapter.class.getName());
 }
diff --git a/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/transport/http/client/HttpTransportPipe.java b/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/transport/http/client/HttpTransportPipe.java
index 048af96..f8633d1 100644
--- a/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/transport/http/client/HttpTransportPipe.java
+++ b/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/transport/http/client/HttpTransportPipe.java
@@ -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
@@ -35,7 +35,9 @@
 import com.sun.xml.internal.ws.client.ClientTransportException;
 import com.sun.xml.internal.ws.developer.HttpConfigFeature;
 import com.sun.xml.internal.ws.resources.ClientMessages;
+import com.sun.xml.internal.ws.resources.WsservletMessages;
 import com.sun.xml.internal.ws.transport.Headers;
+import com.sun.xml.internal.ws.transport.http.HttpAdapter;
 import com.sun.xml.internal.ws.util.ByteArrayBuffer;
 import com.sun.xml.internal.ws.util.RuntimeVersion;
 import com.sun.xml.internal.ws.util.StreamUtils;
@@ -426,7 +428,14 @@
             }
         }
 
-        buf.writeTo(baos);
+        if (buf.size() > HttpAdapter.dump_threshold) {
+            byte[] b = buf.getRawData();
+            baos.write(b, 0, HttpAdapter.dump_threshold);
+            pw.println();
+            pw.println(WsservletMessages.MESSAGE_TOO_LONG(HttpAdapter.class.getName() + ".dumpTreshold"));
+        } else {
+            buf.writeTo(baos);
+        }
         pw.println("--------------------");
 
         String msg = baos.toString();
diff --git a/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/util/pipe/AbstractSchemaValidationTube.java b/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/util/pipe/AbstractSchemaValidationTube.java
index e4b3ed2..12d1507 100644
--- a/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/util/pipe/AbstractSchemaValidationTube.java
+++ b/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/util/pipe/AbstractSchemaValidationTube.java
@@ -72,7 +72,7 @@
 import java.util.logging.Level;
 import java.util.logging.Logger;
 
-import static com.sun.xml.internal.ws.util.xml.XmlUtil.allowFileAccess;
+import static com.sun.xml.internal.ws.util.xml.XmlUtil.allowExternalAccess;
 
 /**
  * {@link Tube} that does the schema validation.
@@ -92,7 +92,7 @@
         super(next);
         this.binding = binding;
         feature = binding.getFeature(SchemaValidationFeature.class);
-        sf = allowFileAccess(SchemaFactory.newInstance(XMLConstants.W3C_XML_SCHEMA_NS_URI), false);
+        sf = allowExternalAccess(SchemaFactory.newInstance(XMLConstants.W3C_XML_SCHEMA_NS_URI), "file", false);
     }
 
     protected AbstractSchemaValidationTube(AbstractSchemaValidationTube that, TubeCloner cloner) {
diff --git a/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/util/version.properties b/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/util/version.properties
index 9862bdc..c0aaf9f 100644
--- a/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/util/version.properties
+++ b/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/util/version.properties
@@ -23,7 +23,7 @@
 # questions.
 #
 
-build-id=2.2.9-b14140
-build-version=JAX-WS RI 2.2.9-b14140
+build-id=2.2.9-b130926.1035
+build-version=JAX-WS RI 2.2.9-b130926.1035
 major-version=2.2.9
-svn-revision=14140
+svn-revision=8c29a9a53251ff741fca1664a8221dc876b2eac8
diff --git a/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/util/xml/XmlUtil.java b/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/util/xml/XmlUtil.java
index 8ae256f..f6b63d4 100644
--- a/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/util/xml/XmlUtil.java
+++ b/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/util/xml/XmlUtil.java
@@ -84,11 +84,11 @@
 
     private static final Logger LOGGER = Logger.getLogger(XmlUtil.class.getName());
 
-    private static boolean globalSecureXmlProcessingEnabled;
+    private static boolean XML_SECURITY_DISABLED;
 
     static {
-        String disableSecureXmlProcessing = System.getProperty("disableSecureXmlProcessing");
-        globalSecureXmlProcessingEnabled = disableSecureXmlProcessing == null || !Boolean.valueOf(disableSecureXmlProcessing);
+        String disableXmlSecurity = System.getProperty("com.sun.xml.internal.ws.disableXmlSecurity");
+        XML_SECURITY_DISABLED = disableXmlSecurity == null || !Boolean.valueOf(disableXmlSecurity);
     }
 
     public static String getPrefix(String s) {
@@ -364,9 +364,9 @@
     public static DocumentBuilderFactory newDocumentBuilderFactory(boolean secureXmlProcessing) {
         DocumentBuilderFactory factory = DocumentBuilderFactory.newInstance();
         try {
-            factory.setFeature(XMLConstants.FEATURE_SECURE_PROCESSING, checkGlobalOverride(secureXmlProcessing));
+            factory.setFeature(XMLConstants.FEATURE_SECURE_PROCESSING, isXMLSecurityDisabled(secureXmlProcessing));
         } catch (ParserConfigurationException e) {
-            LOGGER.log(Level.WARNING, "Factory [{}] doesn't support secure xml processing!", new Object[] { factory.getClass().getName() } );
+            LOGGER.log(Level.WARNING, "Factory [{0}] doesn't support secure xml processing!", new Object[] { factory.getClass().getName() } );
         }
         return factory;
     }
@@ -374,9 +374,9 @@
     public static TransformerFactory newTransformerFactory(boolean secureXmlProcessingEnabled) {
         TransformerFactory factory = TransformerFactory.newInstance();
         try {
-            factory.setFeature(XMLConstants.FEATURE_SECURE_PROCESSING, checkGlobalOverride(secureXmlProcessingEnabled));
+            factory.setFeature(XMLConstants.FEATURE_SECURE_PROCESSING, isXMLSecurityDisabled(secureXmlProcessingEnabled));
         } catch (TransformerConfigurationException e) {
-            LOGGER.log(Level.WARNING, "Factory [{}] doesn't support secure xml processing!", new Object[]{factory.getClass().getName()});
+            LOGGER.log(Level.WARNING, "Factory [{0}] doesn't support secure xml processing!", new Object[]{factory.getClass().getName()});
         }
         return factory;
     }
@@ -388,9 +388,9 @@
     public static SAXParserFactory newSAXParserFactory(boolean secureXmlProcessingEnabled) {
         SAXParserFactory factory = SAXParserFactory.newInstance();
         try {
-            factory.setFeature(XMLConstants.FEATURE_SECURE_PROCESSING, checkGlobalOverride(secureXmlProcessingEnabled));
+            factory.setFeature(XMLConstants.FEATURE_SECURE_PROCESSING, isXMLSecurityDisabled(secureXmlProcessingEnabled));
         } catch (Exception e) {
-            LOGGER.log(Level.WARNING, "Factory [{}] doesn't support secure xml processing!", new Object[]{factory.getClass().getName()});
+            LOGGER.log(Level.WARNING, "Factory [{0}] doesn't support secure xml processing!", new Object[]{factory.getClass().getName()});
         }
         return factory;
     }
@@ -398,16 +398,16 @@
     public static XPathFactory newXPathFactory(boolean secureXmlProcessingEnabled) {
         XPathFactory factory = XPathFactory.newInstance();
         try {
-            factory.setFeature(XMLConstants.FEATURE_SECURE_PROCESSING, checkGlobalOverride(secureXmlProcessingEnabled));
+            factory.setFeature(XMLConstants.FEATURE_SECURE_PROCESSING, isXMLSecurityDisabled(secureXmlProcessingEnabled));
         } catch (XPathFactoryConfigurationException e) {
-            LOGGER.log(Level.WARNING, "Factory [{}] doesn't support secure xml processing!", new Object[] { factory.getClass().getName() } );
+            LOGGER.log(Level.WARNING, "Factory [{0}] doesn't support secure xml processing!", new Object[] { factory.getClass().getName() } );
         }
         return factory;
     }
 
     public static XMLInputFactory newXMLInputFactory(boolean secureXmlProcessingEnabled)  {
         XMLInputFactory factory = XMLInputFactory.newInstance();
-        if (checkGlobalOverride(secureXmlProcessingEnabled)) {
+        if (isXMLSecurityDisabled(secureXmlProcessingEnabled)) {
             // TODO-Miran: are those apppropriate defaults?
             factory.setProperty(XMLInputFactory.SUPPORT_DTD, false);
             factory.setProperty(XMLInputFactory.IS_SUPPORTING_EXTERNAL_ENTITIES, false);
@@ -415,25 +415,39 @@
         return factory;
     }
 
-    private static boolean checkGlobalOverride(boolean localSecureXmlProcessingEnabled) {
-        return globalSecureXmlProcessingEnabled && localSecureXmlProcessingEnabled;
+    private static boolean isXMLSecurityDisabled(boolean runtimeDisabled) {
+        return XML_SECURITY_DISABLED || runtimeDisabled;
     }
 
-    public static SchemaFactory allowFileAccess(SchemaFactory sf, boolean disableSecureProcessing) {
+    public static SchemaFactory allowExternalAccess(SchemaFactory sf, String value, boolean disableSecureProcessing) {
 
-        // if feature secure processing enabled, nothing to do, file is allowed,
-        // or user is able to control access by standard JAXP mechanisms
-        if (checkGlobalOverride(disableSecureProcessing)) {
+        // if xml security (feature secure processing) disabled, nothing to do, no restrictions applied
+        if (isXMLSecurityDisabled(disableSecureProcessing)) {
+            if (LOGGER.isLoggable(Level.FINE)) {
+                LOGGER.log(Level.FINE, "Xml Security disabled, no JAXP xsd external access configuration necessary.");
+            }
+            return sf;
+        }
+
+        if (System.getProperty("javax.xml.accessExternalSchema") != null) {
+            if (LOGGER.isLoggable(Level.FINE)) {
+                LOGGER.log(Level.FINE, "Detected explicitly JAXP configuration, no JAXP xsd external access configuration necessary.");
+            }
             return sf;
         }
 
         try {
-            sf.setProperty(ACCESS_EXTERNAL_SCHEMA, "file");
-            LOGGER.log(Level.FINE, "Property \"{}\" is supported and has been successfully set by used JAXP implementation.", new Object[]{ACCESS_EXTERNAL_SCHEMA});
+            sf.setProperty(ACCESS_EXTERNAL_SCHEMA, value);
+            if (LOGGER.isLoggable(Level.FINE)) {
+                LOGGER.log(Level.FINE, "Property \"{0}\" is supported and has been successfully set by used JAXP implementation.", new Object[]{ACCESS_EXTERNAL_SCHEMA});
+            }
         } catch (SAXException ignored) {
-            // depending on JDK/SAX implementation used
-            LOGGER.log(Level.CONFIG, "Property \"{}\" is not supported by used JAXP implementation.", new Object[]{ACCESS_EXTERNAL_SCHEMA});
+            // nothing to do; support depends on version JDK or SAX implementation
+            if (LOGGER.isLoggable(Level.CONFIG)) {
+                LOGGER.log(Level.CONFIG, "Property \"{0}\" is not supported by used JAXP implementation.", new Object[]{ACCESS_EXTERNAL_SCHEMA});
+            }
         }
         return sf;
     }
+
 }
diff --git a/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/wsdl/ActionBasedOperationFinder.java b/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/wsdl/ActionBasedOperationFinder.java
index 1c13367..f9e7577 100644
--- a/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/wsdl/ActionBasedOperationFinder.java
+++ b/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/wsdl/ActionBasedOperationFinder.java
@@ -102,7 +102,7 @@
             }
         } else {
             for (WSDLBoundOperation wsdlOp : wsdlModel.getBinding().getBindingOperations()) {
-                QName payloadName = wsdlOp.getReqPayloadName();
+                QName payloadName = wsdlOp.getRequestPayloadName();
                 if (payloadName == null)
                     payloadName = EMPTY_PAYLOAD;
                 String action = wsdlOp.getOperation().getInput().getAction();
diff --git a/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/wsdl/PayloadQNameBasedOperationFinder.java b/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/wsdl/PayloadQNameBasedOperationFinder.java
index d246ed0..172d5cd 100644
--- a/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/wsdl/PayloadQNameBasedOperationFinder.java
+++ b/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/wsdl/PayloadQNameBasedOperationFinder.java
@@ -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
@@ -104,7 +104,7 @@
             }
         } else {
             for (WSDLBoundOperation wsdlOp : wsdlModel.getBinding().getBindingOperations()) {
-                QName name = wsdlOp.getReqPayloadName();
+                QName name = wsdlOp.getRequestPayloadName();
                 if (name == null)
                     name = EMPTY_PAYLOAD;
                 methodHandlers.put(name, wsdlOperationMapping(wsdlOp));
diff --git a/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/wsdl/parser/DelegatingParserExtension.java b/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/wsdl/parser/DelegatingParserExtension.java
index e715003..d02d9c4 100644
--- a/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/wsdl/parser/DelegatingParserExtension.java
+++ b/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/wsdl/parser/DelegatingParserExtension.java
@@ -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
@@ -25,7 +25,7 @@
 
 package com.sun.xml.internal.ws.wsdl.parser;
 
-import com.sun.xml.internal.ws.api.model.wsdl.*;
+import com.sun.xml.internal.ws.api.model.wsdl.editable.*;
 import com.sun.xml.internal.ws.api.wsdl.parser.WSDLParserExtension;
 import com.sun.xml.internal.ws.api.wsdl.parser.WSDLParserExtensionContext;
 
@@ -48,31 +48,31 @@
         core.start(context);
     }
 
-    public void serviceAttributes(WSDLService service, XMLStreamReader reader) {
+    public void serviceAttributes(EditableWSDLService service, XMLStreamReader reader) {
         core.serviceAttributes(service, reader);
     }
 
-    public boolean serviceElements(WSDLService service, XMLStreamReader reader) {
+    public boolean serviceElements(EditableWSDLService service, XMLStreamReader reader) {
         return core.serviceElements(service, reader);
     }
 
-    public void portAttributes(WSDLPort port, XMLStreamReader reader) {
+    public void portAttributes(EditableWSDLPort port, XMLStreamReader reader) {
         core.portAttributes(port, reader);
     }
 
-    public boolean portElements(WSDLPort port, XMLStreamReader reader) {
+    public boolean portElements(EditableWSDLPort port, XMLStreamReader reader) {
         return core.portElements(port, reader);
     }
 
-    public boolean portTypeOperationInput(WSDLOperation op, XMLStreamReader reader) {
+    public boolean portTypeOperationInput(EditableWSDLOperation op, XMLStreamReader reader) {
         return core.portTypeOperationInput(op, reader);
     }
 
-    public boolean portTypeOperationOutput(WSDLOperation op, XMLStreamReader reader) {
+    public boolean portTypeOperationOutput(EditableWSDLOperation op, XMLStreamReader reader) {
         return core.portTypeOperationOutput(op, reader);
     }
 
-    public boolean portTypeOperationFault(WSDLOperation op, XMLStreamReader reader) {
+    public boolean portTypeOperationFault(EditableWSDLOperation op, XMLStreamReader reader) {
         return core.portTypeOperationFault(op, reader);
     }
 
@@ -80,91 +80,91 @@
         return core.definitionsElements(reader);
     }
 
-    public boolean bindingElements(WSDLBoundPortType binding, XMLStreamReader reader) {
+    public boolean bindingElements(EditableWSDLBoundPortType binding, XMLStreamReader reader) {
         return core.bindingElements(binding, reader);
     }
 
-    public void bindingAttributes(WSDLBoundPortType binding, XMLStreamReader reader) {
+    public void bindingAttributes(EditableWSDLBoundPortType binding, XMLStreamReader reader) {
         core.bindingAttributes(binding, reader);
     }
 
-    public boolean portTypeElements(WSDLPortType portType, XMLStreamReader reader) {
+    public boolean portTypeElements(EditableWSDLPortType portType, XMLStreamReader reader) {
         return core.portTypeElements(portType, reader);
     }
 
-    public void portTypeAttributes(WSDLPortType portType, XMLStreamReader reader) {
+    public void portTypeAttributes(EditableWSDLPortType portType, XMLStreamReader reader) {
         core.portTypeAttributes(portType, reader);
     }
 
-    public boolean portTypeOperationElements(WSDLOperation operation, XMLStreamReader reader) {
+    public boolean portTypeOperationElements(EditableWSDLOperation operation, XMLStreamReader reader) {
         return core.portTypeOperationElements(operation, reader);
     }
 
-    public void portTypeOperationAttributes(WSDLOperation operation, XMLStreamReader reader) {
+    public void portTypeOperationAttributes(EditableWSDLOperation operation, XMLStreamReader reader) {
         core.portTypeOperationAttributes(operation, reader);
     }
 
-    public boolean bindingOperationElements(WSDLBoundOperation operation, XMLStreamReader reader) {
+    public boolean bindingOperationElements(EditableWSDLBoundOperation operation, XMLStreamReader reader) {
         return core.bindingOperationElements(operation, reader);
     }
 
-    public void bindingOperationAttributes(WSDLBoundOperation operation, XMLStreamReader reader) {
+    public void bindingOperationAttributes(EditableWSDLBoundOperation operation, XMLStreamReader reader) {
         core.bindingOperationAttributes(operation, reader);
     }
 
-    public boolean messageElements(WSDLMessage msg, XMLStreamReader reader) {
+    public boolean messageElements(EditableWSDLMessage msg, XMLStreamReader reader) {
         return core.messageElements(msg, reader);
     }
 
-    public void messageAttributes(WSDLMessage msg, XMLStreamReader reader) {
+    public void messageAttributes(EditableWSDLMessage msg, XMLStreamReader reader) {
         core.messageAttributes(msg, reader);
     }
 
-    public boolean portTypeOperationInputElements(WSDLInput input, XMLStreamReader reader) {
+    public boolean portTypeOperationInputElements(EditableWSDLInput input, XMLStreamReader reader) {
         return core.portTypeOperationInputElements(input, reader);
     }
 
-    public void portTypeOperationInputAttributes(WSDLInput input, XMLStreamReader reader) {
+    public void portTypeOperationInputAttributes(EditableWSDLInput input, XMLStreamReader reader) {
         core.portTypeOperationInputAttributes(input, reader);
     }
 
-    public boolean portTypeOperationOutputElements(WSDLOutput output, XMLStreamReader reader) {
+    public boolean portTypeOperationOutputElements(EditableWSDLOutput output, XMLStreamReader reader) {
         return core.portTypeOperationOutputElements(output, reader);
     }
 
-    public void portTypeOperationOutputAttributes(WSDLOutput output, XMLStreamReader reader) {
+    public void portTypeOperationOutputAttributes(EditableWSDLOutput output, XMLStreamReader reader) {
         core.portTypeOperationOutputAttributes(output, reader);
     }
 
-    public boolean portTypeOperationFaultElements(WSDLFault fault, XMLStreamReader reader) {
+    public boolean portTypeOperationFaultElements(EditableWSDLFault fault, XMLStreamReader reader) {
         return core.portTypeOperationFaultElements(fault, reader);
     }
 
-    public void portTypeOperationFaultAttributes(WSDLFault fault, XMLStreamReader reader) {
+    public void portTypeOperationFaultAttributes(EditableWSDLFault fault, XMLStreamReader reader) {
         core.portTypeOperationFaultAttributes(fault, reader);
     }
 
-    public boolean bindingOperationInputElements(WSDLBoundOperation operation, XMLStreamReader reader) {
+    public boolean bindingOperationInputElements(EditableWSDLBoundOperation operation, XMLStreamReader reader) {
         return core.bindingOperationInputElements(operation, reader);
     }
 
-    public void bindingOperationInputAttributes(WSDLBoundOperation operation, XMLStreamReader reader) {
+    public void bindingOperationInputAttributes(EditableWSDLBoundOperation operation, XMLStreamReader reader) {
         core.bindingOperationInputAttributes(operation, reader);
     }
 
-    public boolean bindingOperationOutputElements(WSDLBoundOperation operation, XMLStreamReader reader) {
+    public boolean bindingOperationOutputElements(EditableWSDLBoundOperation operation, XMLStreamReader reader) {
         return core.bindingOperationOutputElements(operation, reader);
     }
 
-    public void bindingOperationOutputAttributes(WSDLBoundOperation operation, XMLStreamReader reader) {
+    public void bindingOperationOutputAttributes(EditableWSDLBoundOperation operation, XMLStreamReader reader) {
         core.bindingOperationOutputAttributes(operation, reader);
     }
 
-    public boolean bindingOperationFaultElements(WSDLBoundFault fault, XMLStreamReader reader) {
+    public boolean bindingOperationFaultElements(EditableWSDLBoundFault fault, XMLStreamReader reader) {
         return core.bindingOperationFaultElements(fault, reader);
     }
 
-    public void bindingOperationFaultAttributes(WSDLBoundFault fault, XMLStreamReader reader) {
+    public void bindingOperationFaultAttributes(EditableWSDLBoundFault fault, XMLStreamReader reader) {
         core.bindingOperationFaultAttributes(fault, reader);
     }
 
diff --git a/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/wsdl/parser/FoolProofParserExtension.java b/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/wsdl/parser/FoolProofParserExtension.java
index 4c0b141..414ccc9 100644
--- a/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/wsdl/parser/FoolProofParserExtension.java
+++ b/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/wsdl/parser/FoolProofParserExtension.java
@@ -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
@@ -26,7 +26,7 @@
 package com.sun.xml.internal.ws.wsdl.parser;
 
 
-import com.sun.xml.internal.ws.api.model.wsdl.*;
+import com.sun.xml.internal.ws.api.model.wsdl.editable.*;
 import com.sun.xml.internal.ws.api.wsdl.parser.WSDLParserExtension;
 
 import javax.xml.namespace.QName;
@@ -73,11 +73,11 @@
         throw new AssertionError("XMLStreamReader is placed at the wrong place after invoking "+core);
     }
 
-    public boolean serviceElements(WSDLService service, XMLStreamReader reader) {
+    public boolean serviceElements(EditableWSDLService service, XMLStreamReader reader) {
         return post(pre(reader),reader,super.serviceElements(service, reader));
     }
 
-    public boolean portElements(WSDLPort port, XMLStreamReader reader) {
+    public boolean portElements(EditableWSDLPort port, XMLStreamReader reader) {
         return post(pre(reader),reader,super.portElements(port, reader));
     }
 
@@ -85,47 +85,47 @@
         return post(pre(reader),reader,super.definitionsElements(reader));
     }
 
-    public boolean bindingElements(WSDLBoundPortType binding, XMLStreamReader reader) {
+    public boolean bindingElements(EditableWSDLBoundPortType binding, XMLStreamReader reader) {
         return post(pre(reader),reader,super.bindingElements(binding, reader));
     }
 
-    public boolean portTypeElements(WSDLPortType portType, XMLStreamReader reader) {
+    public boolean portTypeElements(EditableWSDLPortType portType, XMLStreamReader reader) {
         return post(pre(reader),reader,super.portTypeElements(portType, reader));
     }
 
-    public boolean portTypeOperationElements(WSDLOperation operation, XMLStreamReader reader) {
+    public boolean portTypeOperationElements(EditableWSDLOperation operation, XMLStreamReader reader) {
         return post(pre(reader),reader,super.portTypeOperationElements(operation, reader));
     }
 
-    public boolean bindingOperationElements(WSDLBoundOperation operation, XMLStreamReader reader) {
+    public boolean bindingOperationElements(EditableWSDLBoundOperation operation, XMLStreamReader reader) {
         return post(pre(reader),reader,super.bindingOperationElements(operation, reader));
     }
 
-    public boolean messageElements(WSDLMessage msg, XMLStreamReader reader) {
+    public boolean messageElements(EditableWSDLMessage msg, XMLStreamReader reader) {
         return post(pre(reader),reader,super.messageElements(msg, reader));
     }
 
-    public boolean portTypeOperationInputElements(WSDLInput input, XMLStreamReader reader) {
+    public boolean portTypeOperationInputElements(EditableWSDLInput input, XMLStreamReader reader) {
         return post(pre(reader),reader,super.portTypeOperationInputElements(input, reader));
     }
 
-    public boolean portTypeOperationOutputElements(WSDLOutput output, XMLStreamReader reader) {
+    public boolean portTypeOperationOutputElements(EditableWSDLOutput output, XMLStreamReader reader) {
         return post(pre(reader),reader,super.portTypeOperationOutputElements(output, reader));
     }
 
-    public boolean portTypeOperationFaultElements(WSDLFault fault, XMLStreamReader reader) {
+    public boolean portTypeOperationFaultElements(EditableWSDLFault fault, XMLStreamReader reader) {
         return post(pre(reader),reader,super.portTypeOperationFaultElements(fault, reader));
     }
 
-    public boolean bindingOperationInputElements(WSDLBoundOperation operation, XMLStreamReader reader) {
+    public boolean bindingOperationInputElements(EditableWSDLBoundOperation operation, XMLStreamReader reader) {
         return super.bindingOperationInputElements(operation, reader);
     }
 
-    public boolean bindingOperationOutputElements(WSDLBoundOperation operation, XMLStreamReader reader) {
+    public boolean bindingOperationOutputElements(EditableWSDLBoundOperation operation, XMLStreamReader reader) {
         return post(pre(reader),reader,super.bindingOperationOutputElements(operation, reader));
     }
 
-    public boolean bindingOperationFaultElements(WSDLBoundFault fault, XMLStreamReader reader) {
+    public boolean bindingOperationFaultElements(EditableWSDLBoundFault fault, XMLStreamReader reader) {
         return post(pre(reader),reader,super.bindingOperationFaultElements(fault, reader));
     }
 }
diff --git a/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/wsdl/parser/MemberSubmissionAddressingWSDLParserExtension.java b/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/wsdl/parser/MemberSubmissionAddressingWSDLParserExtension.java
index fc57f89..e259b3a 100644
--- a/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/wsdl/parser/MemberSubmissionAddressingWSDLParserExtension.java
+++ b/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/wsdl/parser/MemberSubmissionAddressingWSDLParserExtension.java
@@ -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
@@ -27,13 +27,8 @@
 
 import com.sun.xml.internal.ws.api.addressing.AddressingVersion;
 import com.sun.xml.internal.ws.developer.MemberSubmissionAddressingFeature;
-import com.sun.xml.internal.ws.api.model.wsdl.WSDLBoundOperation;
-import com.sun.xml.internal.ws.api.model.wsdl.WSDLBoundPortType;
 import com.sun.xml.internal.ws.api.model.wsdl.WSDLFeaturedObject;
-import com.sun.xml.internal.ws.api.model.wsdl.WSDLOperation;
-import com.sun.xml.internal.ws.api.model.wsdl.WSDLPort;
-import com.sun.xml.internal.ws.model.wsdl.WSDLBoundPortTypeImpl;
-import com.sun.xml.internal.ws.model.wsdl.WSDLOperationImpl;
+import com.sun.xml.internal.ws.api.model.wsdl.editable.*;
 import com.sun.xml.internal.ws.streaming.XMLStreamReaderUtil;
 
 import javax.xml.namespace.QName;
@@ -46,12 +41,12 @@
  */
 public class MemberSubmissionAddressingWSDLParserExtension extends W3CAddressingWSDLParserExtension {
     @Override
-    public boolean bindingElements(WSDLBoundPortType binding, XMLStreamReader reader) {
+    public boolean bindingElements(EditableWSDLBoundPortType binding, XMLStreamReader reader) {
         return addressibleElement(reader, binding);
     }
 
     @Override
-    public boolean portElements(WSDLPort port, XMLStreamReader reader) {
+    public boolean portElements(EditableWSDLPort port, XMLStreamReader reader) {
         return addressibleElement(reader, port);
     }
 
@@ -68,12 +63,12 @@
     }
 
     @Override
-    public boolean bindingOperationElements(WSDLBoundOperation operation, XMLStreamReader reader) {
+    public boolean bindingOperationElements(EditableWSDLBoundOperation operation, XMLStreamReader reader) {
         return false;
     }
 
     @Override
-    protected void patchAnonymousDefault(WSDLBoundPortTypeImpl binding) {
+    protected void patchAnonymousDefault(EditableWSDLBoundPortType binding) {
     }
 
     @Override
diff --git a/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/wsdl/parser/RuntimeWSDLParser.java b/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/wsdl/parser/RuntimeWSDLParser.java
index ddaf8d6..2fb01c7 100644
--- a/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/wsdl/parser/RuntimeWSDLParser.java
+++ b/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/wsdl/parser/RuntimeWSDLParser.java
@@ -42,6 +42,20 @@
 import com.sun.xml.internal.ws.api.addressing.WSEndpointReference;
 import com.sun.xml.internal.ws.api.model.ParameterBinding;
 import com.sun.xml.internal.ws.api.model.wsdl.WSDLDescriptorKind;
+import com.sun.xml.internal.ws.api.model.wsdl.WSDLModel;
+import com.sun.xml.internal.ws.api.model.wsdl.editable.EditableWSDLBoundFault;
+import com.sun.xml.internal.ws.api.model.wsdl.editable.EditableWSDLBoundOperation;
+import com.sun.xml.internal.ws.api.model.wsdl.editable.EditableWSDLBoundPortType;
+import com.sun.xml.internal.ws.api.model.wsdl.editable.EditableWSDLFault;
+import com.sun.xml.internal.ws.api.model.wsdl.editable.EditableWSDLInput;
+import com.sun.xml.internal.ws.api.model.wsdl.editable.EditableWSDLMessage;
+import com.sun.xml.internal.ws.api.model.wsdl.editable.EditableWSDLModel;
+import com.sun.xml.internal.ws.api.model.wsdl.editable.EditableWSDLOperation;
+import com.sun.xml.internal.ws.api.model.wsdl.editable.EditableWSDLOutput;
+import com.sun.xml.internal.ws.api.model.wsdl.editable.EditableWSDLPart;
+import com.sun.xml.internal.ws.api.model.wsdl.editable.EditableWSDLPort;
+import com.sun.xml.internal.ws.api.model.wsdl.editable.EditableWSDLPortType;
+import com.sun.xml.internal.ws.api.model.wsdl.editable.EditableWSDLService;
 import com.sun.xml.internal.ws.api.server.Container;
 import com.sun.xml.internal.ws.api.server.ContainerResolver;
 import com.sun.xml.internal.ws.api.streaming.XMLStreamReaderFactory;
@@ -60,6 +74,7 @@
 import com.sun.xml.internal.ws.util.ServiceFinder;
 import com.sun.xml.internal.ws.util.xml.XmlUtil;
 import com.sun.xml.internal.ws.policy.jaxws.PolicyWSDLParserExtension;
+
 import org.xml.sax.EntityResolver;
 import org.xml.sax.SAXException;
 
@@ -70,6 +85,7 @@
 import javax.xml.transform.stream.StreamSource;
 import javax.xml.ws.Service;
 import javax.xml.ws.WebServiceException;
+
 import java.io.IOException;
 import java.io.InputStream;
 import java.io.FilterInputStream;
@@ -86,7 +102,7 @@
  */
 public class RuntimeWSDLParser {
 
-    private final WSDLModelImpl wsdlDoc;
+    private final EditableWSDLModel wsdlDoc;
     /**
      * Target namespace URI of the WSDL that we are currently parsing.
      */
@@ -126,7 +142,7 @@
      *      Either this or <tt>wsdl</tt> parameter must be given.
      *      Null location means the system won't be able to resolve relative references in the WSDL,
      */
-    public static WSDLModelImpl parse(@Nullable URL wsdlLoc, @NotNull Source wsdlSource, @NotNull EntityResolver resolver,
+    public static WSDLModel parse(@Nullable URL wsdlLoc, @NotNull Source wsdlSource, @NotNull EntityResolver resolver,
                                       boolean isClientSide, Container container,
                                       WSDLParserExtension... extensions) throws IOException, XMLStreamException, SAXException {
         return parse(wsdlLoc, wsdlSource, resolver, isClientSide, container, Service.class, PolicyResolverFactory.create(),extensions);
@@ -141,7 +157,7 @@
      *      Either this or <tt>wsdl</tt> parameter must be given.
      *      Null location means the system won't be able to resolve relative references in the WSDL,
      */
-    public static WSDLModelImpl parse(@Nullable URL wsdlLoc, @NotNull Source wsdlSource, @NotNull EntityResolver resolver,
+    public static WSDLModel parse(@Nullable URL wsdlLoc, @NotNull Source wsdlSource, @NotNull EntityResolver resolver,
                                       boolean isClientSide, Container container, Class serviceClass,
                                       WSDLParserExtension... extensions) throws IOException, XMLStreamException, SAXException {
         return parse(wsdlLoc, wsdlSource, resolver, isClientSide, container, serviceClass, PolicyResolverFactory.create(),extensions);
@@ -156,7 +172,7 @@
      *      Either this or <tt>wsdl</tt> parameter must be given.
      *      Null location means the system won't be able to resolve relative references in the WSDL,
      */
-    public static WSDLModelImpl parse(@Nullable URL wsdlLoc, @NotNull Source wsdlSource, @NotNull EntityResolver resolver,
+    public static WSDLModel parse(@Nullable URL wsdlLoc, @NotNull Source wsdlSource, @NotNull EntityResolver resolver,
                                       boolean isClientSide, Container container, @NotNull PolicyResolver policyResolver,
                                       WSDLParserExtension... extensions) throws IOException, XMLStreamException, SAXException {
         return parse(wsdlLoc, wsdlSource, resolver, isClientSide, container, Service.class, policyResolver, extensions);
@@ -171,7 +187,7 @@
      *      Either this or <tt>wsdl</tt> parameter must be given.
      *      Null location means the system won't be able to resolve relative references in the WSDL,
      */
-    public static WSDLModelImpl parse(@Nullable URL wsdlLoc, @NotNull Source wsdlSource, @NotNull EntityResolver resolver,
+    public static WSDLModel parse(@Nullable URL wsdlLoc, @NotNull Source wsdlSource, @NotNull EntityResolver resolver,
                                       boolean isClientSide, Container container, Class serviceClass,
                                       @NotNull PolicyResolver policyResolver,
                                       WSDLParserExtension... extensions) throws IOException, XMLStreamException, SAXException {
@@ -187,7 +203,7 @@
      *      Either this or <tt>wsdl</tt> parameter must be given.
      *      Null location means the system won't be able to resolve relative references in the WSDL,
      */
-    public static WSDLModelImpl parse(@Nullable URL wsdlLoc, @NotNull Source wsdlSource, @NotNull EntityResolver resolver,
+    public static WSDLModel parse(@Nullable URL wsdlLoc, @NotNull Source wsdlSource, @NotNull EntityResolver resolver,
                                       boolean isClientSide, Container container, Class serviceClass,
                                       @NotNull PolicyResolver policyResolver,
                                       boolean isUseStreamFromEntityResolverWrapper,
@@ -226,10 +242,10 @@
         return wsdlParser.wsdlDoc;
     }
 
-    private static WSDLModelImpl tryWithMex(@NotNull RuntimeWSDLParser wsdlParser, @NotNull URL wsdlLoc, @NotNull EntityResolver resolver, boolean isClientSide, Container container, Throwable e, Class serviceClass, PolicyResolver policyResolver, WSDLParserExtension... extensions) throws SAXException, XMLStreamException {
+    private static WSDLModel tryWithMex(@NotNull RuntimeWSDLParser wsdlParser, @NotNull URL wsdlLoc, @NotNull EntityResolver resolver, boolean isClientSide, Container container, Throwable e, Class serviceClass, PolicyResolver policyResolver, WSDLParserExtension... extensions) throws SAXException, XMLStreamException {
         ArrayList<Throwable> exceptions = new ArrayList<Throwable>();
         try {
-            WSDLModelImpl wsdlModel =  wsdlParser.parseUsingMex(wsdlLoc, resolver, isClientSide, container, serviceClass, policyResolver,extensions);
+            WSDLModel wsdlModel = wsdlParser.parseUsingMex(wsdlLoc, resolver, isClientSide, container, serviceClass, policyResolver,extensions);
             if(wsdlModel == null){
                 throw new WebServiceException(ClientMessages.FAILED_TO_PARSE(wsdlLoc.toExternalForm(), e.getMessage()), e);
             }
@@ -244,7 +260,7 @@
         throw new InaccessibleWSDLException(exceptions);
     }
 
-    private WSDLModelImpl parseUsingMex(@NotNull URL wsdlLoc, @NotNull EntityResolver resolver, boolean isClientSide, Container container, Class serviceClass, PolicyResolver policyResolver, WSDLParserExtension[] extensions) throws IOException, SAXException, XMLStreamException, URISyntaxException {
+    private WSDLModel parseUsingMex(@NotNull URL wsdlLoc, @NotNull EntityResolver resolver, boolean isClientSide, Container container, Class serviceClass, PolicyResolver policyResolver, WSDLParserExtension[] extensions) throws IOException, SAXException, XMLStreamException, URISyntaxException {
         //try MEX
         MetaDataResolver mdResolver = null;
         ServiceDescriptor serviceDescriptor = null;
@@ -295,7 +311,7 @@
         return reader.getName().equals(WSDLConstants.QNAME_DEFINITIONS);
     }
 
-    public static WSDLModelImpl parse(XMLEntityResolver.Parser wsdl, XMLEntityResolver resolver, boolean isClientSide, Container container, PolicyResolver policyResolver, WSDLParserExtension... extensions) throws IOException, XMLStreamException, SAXException {
+    public static WSDLModel parse(XMLEntityResolver.Parser wsdl, XMLEntityResolver resolver, boolean isClientSide, Container container, PolicyResolver policyResolver, WSDLParserExtension... extensions) throws IOException, XMLStreamException, SAXException {
         assert resolver != null;
         RuntimeWSDLParser parser = new RuntimeWSDLParser( wsdl.systemId.toExternalForm(), resolver, isClientSide, container, policyResolver, extensions);
         parser.extensionFacade.start(parser.context);
@@ -306,7 +322,7 @@
         return parser.wsdlDoc;
     }
 
-    public static WSDLModelImpl parse(XMLEntityResolver.Parser wsdl, XMLEntityResolver resolver, boolean isClientSide, Container container, WSDLParserExtension... extensions) throws IOException, XMLStreamException, SAXException {
+    public static WSDLModel parse(XMLEntityResolver.Parser wsdl, XMLEntityResolver resolver, boolean isClientSide, Container container, WSDLParserExtension... extensions) throws IOException, XMLStreamException, SAXException {
         assert resolver != null;
         RuntimeWSDLParser parser = new RuntimeWSDLParser( wsdl.systemId.toExternalForm(), resolver, isClientSide, container, PolicyResolverFactory.create(), extensions);
         parser.extensionFacade.start(parser.context);
@@ -460,7 +476,7 @@
         readNSDecl(service_nsdecl,reader);
 
         String serviceName = ParserUtil.getMandatoryNonEmptyAttribute(reader, WSDLConstants.ATTR_NAME);
-        WSDLServiceImpl service = new WSDLServiceImpl(reader,wsdlDoc,new QName(targetNamespace, serviceName));
+        EditableWSDLService service = new WSDLServiceImpl(reader,wsdlDoc,new QName(targetNamespace, serviceName));
         extensionFacade.serviceAttributes(service, reader);
         while (XMLStreamReaderUtil.nextElementContent(reader) != XMLStreamConstants.END_ELEMENT) {
             QName name = reader.getName();
@@ -477,7 +493,7 @@
         service_nsdecl =  new HashMap<String, String>();
     }
 
-    private void parsePort(XMLStreamReader reader, WSDLServiceImpl service) {
+    private void parsePort(XMLStreamReader reader, EditableWSDLService service) {
         port_nsdecl.putAll(service_nsdecl);
         readNSDecl(port_nsdecl,reader);
 
@@ -486,7 +502,7 @@
 
         QName bindingName = ParserUtil.getQName(reader, binding);
         QName portQName = new QName(service.getName().getNamespaceURI(), portName);
-        WSDLPortImpl port = new WSDLPortImpl(reader,service, portQName, bindingName);
+        EditableWSDLPort port = new WSDLPortImpl(reader,service, portQName, bindingName);
 
         extensionFacade.portAttributes(port, reader);
 
@@ -551,7 +567,7 @@
             XMLStreamReaderUtil.skipElement(reader);
             return;
         }
-        WSDLBoundPortTypeImpl binding = new WSDLBoundPortTypeImpl(reader,wsdlDoc, new QName(targetNamespace, bindingName),
+        EditableWSDLBoundPortType binding = new WSDLBoundPortTypeImpl(reader,wsdlDoc, new QName(targetNamespace, bindingName),
                 ParserUtil.getQName(reader, portTypeName));
         extensionFacade.bindingAttributes(binding, reader);
 
@@ -601,7 +617,7 @@
     }
 
 
-    private void parseBindingOperation(XMLStreamReader reader, WSDLBoundPortTypeImpl binding) {
+    private void parseBindingOperation(XMLStreamReader reader, EditableWSDLBoundPortType binding) {
         String bindingOpName = ParserUtil.getMandatoryNonEmptyAttribute(reader, "name");
         if (bindingOpName == null) {
             //TODO: throw exception?
@@ -611,7 +627,7 @@
         }
 
         QName opName = new QName(binding.getPortTypeName().getNamespaceURI(), bindingOpName);
-        WSDLBoundOperationImpl bindingOp = new WSDLBoundOperationImpl(reader,binding, opName);
+        EditableWSDLBoundOperation bindingOp = new WSDLBoundOperationImpl(reader,binding, opName);
         binding.put(opName, bindingOp);
         extensionFacade.bindingOperationAttributes(bindingOp, reader);
 
@@ -651,7 +667,7 @@
         }
     }
 
-    private void parseInputBinding(XMLStreamReader reader, WSDLBoundOperationImpl bindingOp) {
+    private void parseInputBinding(XMLStreamReader reader, EditableWSDLBoundOperation bindingOp) {
         boolean bodyFound = false;
         extensionFacade.bindingOperationInputAttributes(bindingOp, reader);
         while (XMLStreamReaderUtil.nextElementContent(reader) != XMLStreamConstants.END_ELEMENT) {
@@ -670,7 +686,7 @@
         }
     }
 
-    private void parseOutputBinding(XMLStreamReader reader, WSDLBoundOperationImpl bindingOp) {
+    private void parseOutputBinding(XMLStreamReader reader, EditableWSDLBoundOperation bindingOp) {
         boolean bodyFound = false;
         extensionFacade.bindingOperationOutputAttributes(bindingOp, reader);
         while (XMLStreamReaderUtil.nextElementContent(reader) != XMLStreamConstants.END_ELEMENT) {
@@ -689,9 +705,9 @@
         }
     }
 
-    private void parseFaultBinding(XMLStreamReader reader, WSDLBoundOperationImpl bindingOp) {
+    private void parseFaultBinding(XMLStreamReader reader, EditableWSDLBoundOperation bindingOp) {
         String faultName = ParserUtil.getMandatoryNonEmptyAttribute(reader, "name");
-        WSDLBoundFaultImpl wsdlBoundFault = new WSDLBoundFaultImpl(reader, faultName, bindingOp);
+        EditableWSDLBoundFault wsdlBoundFault = new WSDLBoundFaultImpl(reader, faultName, bindingOp);
         bindingOp.addFault(wsdlBoundFault);
 
         extensionFacade.bindingOperationFaultAttributes(wsdlBoundFault, reader);
@@ -704,7 +720,7 @@
     private enum BindingMode {
         INPUT, OUTPUT, FAULT}
 
-    private static boolean parseSOAPBodyBinding(XMLStreamReader reader, WSDLBoundOperationImpl op, BindingMode mode) {
+    private static boolean parseSOAPBodyBinding(XMLStreamReader reader, EditableWSDLBoundOperation op, BindingMode mode) {
         String namespace = reader.getAttributeValue(null, "namespace");
         if (mode == BindingMode.INPUT) {
             op.setRequestNamespace(namespace);
@@ -749,7 +765,7 @@
     }
 
 
-    private static void parseMimeMultipartBinding(XMLStreamReader reader, WSDLBoundOperationImpl op, BindingMode mode) {
+    private static void parseMimeMultipartBinding(XMLStreamReader reader, EditableWSDLBoundOperation op, BindingMode mode) {
         while (XMLStreamReaderUtil.nextElementContent(reader) != XMLStreamConstants.END_ELEMENT) {
             QName name = reader.getName();
             if (MIMEConstants.QNAME_PART.equals(name)) {
@@ -760,7 +776,7 @@
         }
     }
 
-    private static void parseMIMEPart(XMLStreamReader reader, WSDLBoundOperationImpl op, BindingMode mode) {
+    private static void parseMIMEPart(XMLStreamReader reader, EditableWSDLBoundOperation op, BindingMode mode) {
         boolean bodyFound = false;
         Map<String, ParameterBinding> parts = null;
         if (mode == BindingMode.INPUT) {
@@ -820,7 +836,7 @@
             XMLStreamReaderUtil.skipElement(reader);
             return;
         }
-        WSDLPortTypeImpl portType = new WSDLPortTypeImpl(reader,wsdlDoc, new QName(targetNamespace, portTypeName));
+        EditableWSDLPortType portType = new WSDLPortTypeImpl(reader,wsdlDoc, new QName(targetNamespace, portTypeName));
         extensionFacade.portTypeAttributes(portType, reader);
         wsdlDoc.addPortType(portType);
         while (XMLStreamReaderUtil.nextElementContent(reader) != XMLStreamConstants.END_ELEMENT) {
@@ -834,7 +850,7 @@
     }
 
 
-    private void parsePortTypeOperation(XMLStreamReader reader, WSDLPortTypeImpl portType) {
+    private void parsePortTypeOperation(XMLStreamReader reader, EditableWSDLPortType portType) {
         String operationName = ParserUtil.getMandatoryNonEmptyAttribute(reader, WSDLConstants.ATTR_NAME);
         if (operationName == null) {
             //TODO: throw exception?
@@ -844,7 +860,7 @@
         }
 
         QName operationQName = new QName(portType.getName().getNamespaceURI(), operationName);
-        WSDLOperationImpl operation = new WSDLOperationImpl(reader,portType, operationQName);
+        EditableWSDLOperation operation = new WSDLOperationImpl(reader,portType, operationQName);
         extensionFacade.portTypeOperationAttributes(operation, reader);
         String parameterOrder = ParserUtil.getAttribute(reader, "parameterOrder");
         operation.setParameterOrder(parameterOrder);
@@ -864,11 +880,11 @@
     }
 
 
-    private void parsePortTypeOperationFault(XMLStreamReader reader, WSDLOperationImpl operation) {
+    private void parsePortTypeOperationFault(XMLStreamReader reader, EditableWSDLOperation operation) {
         String msg = ParserUtil.getMandatoryNonEmptyAttribute(reader, "message");
         QName msgName = ParserUtil.getQName(reader, msg);
         String name = ParserUtil.getMandatoryNonEmptyAttribute(reader, "name");
-        WSDLFaultImpl fault = new WSDLFaultImpl(reader,name, msgName, operation);
+        EditableWSDLFault fault = new WSDLFaultImpl(reader,name, msgName, operation);
         operation.addFault(fault);
         extensionFacade.portTypeOperationFaultAttributes(fault, reader);
         extensionFacade.portTypeOperationFault(operation, reader);
@@ -877,11 +893,11 @@
         }
     }
 
-    private void parsePortTypeOperationInput(XMLStreamReader reader, WSDLOperationImpl operation) {
+    private void parsePortTypeOperationInput(XMLStreamReader reader, EditableWSDLOperation operation) {
         String msg = ParserUtil.getMandatoryNonEmptyAttribute(reader, "message");
         QName msgName = ParserUtil.getQName(reader, msg);
         String name = ParserUtil.getAttribute(reader, "name");
-        WSDLInputImpl input = new WSDLInputImpl(reader, name, msgName, operation);
+        EditableWSDLInput input = new WSDLInputImpl(reader, name, msgName, operation);
         operation.setInput(input);
         extensionFacade.portTypeOperationInputAttributes(input, reader);
         extensionFacade.portTypeOperationInput(operation, reader);
@@ -890,11 +906,11 @@
         }
     }
 
-    private void parsePortTypeOperationOutput(XMLStreamReader reader, WSDLOperationImpl operation) {
+    private void parsePortTypeOperationOutput(XMLStreamReader reader, EditableWSDLOperation operation) {
         String msg = ParserUtil.getAttribute(reader, "message");
         QName msgName = ParserUtil.getQName(reader, msg);
         String name = ParserUtil.getAttribute(reader, "name");
-        WSDLOutputImpl output = new WSDLOutputImpl(reader,name, msgName, operation);
+        EditableWSDLOutput output = new WSDLOutputImpl(reader,name, msgName, operation);
         operation.setOutput(output);
         extensionFacade.portTypeOperationOutputAttributes(output, reader);
         extensionFacade.portTypeOperationOutput(operation, reader);
@@ -905,7 +921,7 @@
 
     private void parseMessage(XMLStreamReader reader) {
         String msgName = ParserUtil.getMandatoryNonEmptyAttribute(reader, WSDLConstants.ATTR_NAME);
-        WSDLMessageImpl msg = new WSDLMessageImpl(reader,new QName(targetNamespace, msgName));
+        EditableWSDLMessage msg = new WSDLMessageImpl(reader,new QName(targetNamespace, msgName));
         extensionFacade.messageAttributes(msg, reader);
         int partIndex = 0;
         while (XMLStreamReaderUtil.nextElementContent(reader) != XMLStreamConstants.END_ELEMENT) {
@@ -928,7 +944,7 @@
                     }
                 }
                 if (desc != null) {
-                    WSDLPartImpl wsdlPart = new WSDLPartImpl(reader, part, partIndex, new WSDLPartDescriptorImpl(reader,ParserUtil.getQName(reader, desc), kind));
+                    EditableWSDLPart wsdlPart = new WSDLPartImpl(reader, part, partIndex, new WSDLPartDescriptorImpl(reader,ParserUtil.getQName(reader, desc), kind));
                     msg.add(wsdlPart);
                 }
                 if (reader.getEventType() != XMLStreamConstants.END_ELEMENT)
diff --git a/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/wsdl/parser/W3CAddressingMetadataWSDLParserExtension.java b/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/wsdl/parser/W3CAddressingMetadataWSDLParserExtension.java
index f1ccd79..e995a37 100644
--- a/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/wsdl/parser/W3CAddressingMetadataWSDLParserExtension.java
+++ b/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/wsdl/parser/W3CAddressingMetadataWSDLParserExtension.java
@@ -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
@@ -25,9 +25,7 @@
 
 package com.sun.xml.internal.ws.wsdl.parser;
 
-import com.sun.xml.internal.ws.api.model.wsdl.*;
-import com.sun.xml.internal.ws.model.wsdl.WSDLOperationImpl;
-import com.sun.xml.internal.ws.model.wsdl.WSDLBoundPortTypeImpl;
+import com.sun.xml.internal.ws.api.model.wsdl.editable.*;
 import javax.xml.stream.XMLStreamReader;
 import javax.xml.namespace.QName;
 
@@ -43,22 +41,22 @@
     String METADATA_WSDL_EXTN_NS = "http://www.w3.org/2007/05/addressing/metadata";
     QName METADATA_WSDL_ACTION_TAG = new QName(METADATA_WSDL_EXTN_NS, "Action", "wsam");
     @Override
-    public boolean bindingElements(WSDLBoundPortType binding, XMLStreamReader reader) {
+    public boolean bindingElements(EditableWSDLBoundPortType binding, XMLStreamReader reader) {
         return false;
     }
 
     @Override
-    public boolean portElements(WSDLPort port, XMLStreamReader reader) {
+    public boolean portElements(EditableWSDLPort port, XMLStreamReader reader) {
         return false;
     }
 
     @Override
-    public boolean bindingOperationElements(WSDLBoundOperation operation, XMLStreamReader reader) {
+    public boolean bindingOperationElements(EditableWSDLBoundOperation operation, XMLStreamReader reader) {
         return false;
     }
 
     @Override
-    protected void patchAnonymousDefault(WSDLBoundPortTypeImpl binding) {
+    protected void patchAnonymousDefault(EditableWSDLBoundPortType binding) {
     }
 
     @Override
diff --git a/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/wsdl/parser/W3CAddressingWSDLParserExtension.java b/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/wsdl/parser/W3CAddressingWSDLParserExtension.java
index f7de58d..0d2de0a 100644
--- a/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/wsdl/parser/W3CAddressingWSDLParserExtension.java
+++ b/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/wsdl/parser/W3CAddressingWSDLParserExtension.java
@@ -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
@@ -26,19 +26,18 @@
 package com.sun.xml.internal.ws.wsdl.parser;
 
 import com.sun.xml.internal.ws.api.addressing.AddressingVersion;
-import com.sun.xml.internal.ws.api.model.wsdl.*;
+import com.sun.xml.internal.ws.api.model.wsdl.WSDLFeaturedObject;
+import static com.sun.xml.internal.ws.api.model.wsdl.WSDLBoundOperation.ANONYMOUS;
+import com.sun.xml.internal.ws.api.model.wsdl.editable.*;
 import com.sun.xml.internal.ws.api.wsdl.parser.WSDLParserExtension;
 import com.sun.xml.internal.ws.api.wsdl.parser.WSDLParserExtensionContext;
-import com.sun.xml.internal.ws.model.wsdl.*;
 import com.sun.xml.internal.ws.streaming.XMLStreamReaderUtil;
-import com.sun.xml.internal.ws.resources.AddressingMessages;
 
 import javax.xml.namespace.QName;
 import javax.xml.stream.XMLStreamException;
 import javax.xml.stream.XMLStreamReader;
 import javax.xml.ws.WebServiceException;
 import javax.xml.ws.soap.AddressingFeature;
-import java.util.Map;
 
 /**
  * W3C WS-Addressing Runtime WSDL parser extension
@@ -47,12 +46,12 @@
  */
 public class W3CAddressingWSDLParserExtension extends WSDLParserExtension {
     @Override
-    public boolean bindingElements(WSDLBoundPortType binding, XMLStreamReader reader) {
+    public boolean bindingElements(EditableWSDLBoundPortType binding, XMLStreamReader reader) {
         return addressibleElement(reader, binding);
     }
 
     @Override
-    public boolean portElements(WSDLPort port, XMLStreamReader reader) {
+    public boolean portElements(EditableWSDLPort port, XMLStreamReader reader) {
         return addressibleElement(reader, port);
     }
 
@@ -69,8 +68,8 @@
     }
 
     @Override
-    public boolean bindingOperationElements(WSDLBoundOperation operation, XMLStreamReader reader) {
-        WSDLBoundOperationImpl impl = (WSDLBoundOperationImpl)operation;
+    public boolean bindingOperationElements(EditableWSDLBoundOperation operation, XMLStreamReader reader) {
+        EditableWSDLBoundOperation edit = (EditableWSDLBoundOperation) operation;
 
         QName anon = reader.getName();
         if (anon.equals(AddressingVersion.W3C.wsdlAnonymousTag)) {
@@ -81,11 +80,11 @@
                     // TODO: throw exception only if wsdl:required=true
                     // TODO: is this the right exception ?
                 } else if (value.equals("optional")) {
-                    impl.setAnonymous(WSDLBoundOperation.ANONYMOUS.optional);
+                    edit.setAnonymous(ANONYMOUS.optional);
                 } else if (value.equals("required")) {
-                    impl.setAnonymous(WSDLBoundOperation.ANONYMOUS.required);
+                    edit.setAnonymous(ANONYMOUS.required);
                 } else if (value.equals("prohibited")) {
-                    impl.setAnonymous(WSDLBoundOperation.ANONYMOUS.prohibited);
+                    edit.setAnonymous(ANONYMOUS.prohibited);
                 } else {
                     throw new WebServiceException("wsaw:Anonymous value \"" + value + "\" not understood.");
                     // TODO: throw exception only if wsdl:required=true
@@ -101,29 +100,29 @@
         return false;
     }
 
-    public void portTypeOperationInputAttributes(WSDLInput input, XMLStreamReader reader) {
+    public void portTypeOperationInputAttributes(EditableWSDLInput input, XMLStreamReader reader) {
        String action = ParserUtil.getAttribute(reader, getWsdlActionTag());
        if (action != null) {
-            ((WSDLInputImpl)input).setAction(action);
-            ((WSDLInputImpl)input).setDefaultAction(false);
+            input.setAction(action);
+            input.setDefaultAction(false);
         }
     }
 
 
-    public void portTypeOperationOutputAttributes(WSDLOutput output, XMLStreamReader reader) {
+    public void portTypeOperationOutputAttributes(EditableWSDLOutput output, XMLStreamReader reader) {
        String action = ParserUtil.getAttribute(reader, getWsdlActionTag());
        if (action != null) {
-            ((WSDLOutputImpl)output).setAction(action);
-            ((WSDLOutputImpl)output).setDefaultAction(false);
+            output.setAction(action);
+            output.setDefaultAction(false);
         }
     }
 
 
-    public void portTypeOperationFaultAttributes(WSDLFault fault, XMLStreamReader reader) {
+    public void portTypeOperationFaultAttributes(EditableWSDLFault fault, XMLStreamReader reader) {
         String action = ParserUtil.getAttribute(reader, getWsdlActionTag());
         if (action != null) {
-            ((WSDLFaultImpl) fault).setAction(action);
-            ((WSDLFaultImpl) fault).setDefaultAction(false);
+            fault.setAction(action);
+            fault.setDefaultAction(false);
         }
     }
 
@@ -139,11 +138,10 @@
      */
     @Override
     public void finished(WSDLParserExtensionContext context) {
-        WSDLModel model = context.getWSDLModel();
-        for (WSDLService service : model.getServices().values()) {
-            for (WSDLPort wp : service.getPorts()) {
-                WSDLPortImpl port = (WSDLPortImpl)wp;
-                WSDLBoundPortTypeImpl binding = port.getBinding();
+        EditableWSDLModel model = context.getWSDLModel();
+        for (EditableWSDLService service : model.getServices().values()) {
+            for (EditableWSDLPort port : service.getPorts()) {
+                EditableWSDLBoundPortType binding = port.getBinding();
 
                 // populate actions for the messages that do not have an explicit wsaw:Action
                 populateActions(binding);
@@ -166,12 +164,12 @@
      *
      * @param binding soapbinding:operation
      */
-    private void populateActions(WSDLBoundPortTypeImpl binding) {
-        WSDLPortTypeImpl porttype = binding.getPortType();
-        for (WSDLOperationImpl o : porttype.getOperations()) {
+    private void populateActions(EditableWSDLBoundPortType binding) {
+        EditableWSDLPortType porttype = binding.getPortType();
+        for (EditableWSDLOperation o : porttype.getOperations()) {
             // TODO: this may be performance intensive. Alternatively default action
             // TODO: can be calculated when the operation is actually invoked.
-            WSDLBoundOperationImpl wboi = binding.get(o.getName());
+                EditableWSDLBoundOperation wboi = binding.get(o.getName());
 
             if (wboi == null) {
                 //If this operation is unbound set the action to default
@@ -202,9 +200,9 @@
             if (o.getFaults() == null || !o.getFaults().iterator().hasNext())
                 continue;
 
-            for (WSDLFault f : o.getFaults()) {
+            for (EditableWSDLFault f : o.getFaults()) {
                 if (f.getAction() == null || f.getAction().equals("")) {
-                    ((WSDLFaultImpl)f).setAction(defaultFaultAction(f.getName(), o));
+                    f.setAction(defaultFaultAction(f.getName(), o));
                 }
 
             }
@@ -216,26 +214,26 @@
      *
      * @param binding WSDLBoundPortTypeImpl
      */
-    protected void patchAnonymousDefault(WSDLBoundPortTypeImpl binding) {
-        for (WSDLBoundOperationImpl wbo : binding.getBindingOperations()) {
+    protected void patchAnonymousDefault(EditableWSDLBoundPortType binding) {
+        for (EditableWSDLBoundOperation wbo : binding.getBindingOperations()) {
             if (wbo.getAnonymous() == null)
-                wbo.setAnonymous(WSDLBoundOperation.ANONYMOUS.optional);
+                wbo.setAnonymous(ANONYMOUS.optional);
         }
     }
 
-    private String defaultInputAction(WSDLOperation o) {
+    private String defaultInputAction(EditableWSDLOperation o) {
         return buildAction(o.getInput().getName(), o, false);
     }
 
-    private String defaultOutputAction(WSDLOperation o) {
+    private String defaultOutputAction(EditableWSDLOperation o) {
         return buildAction(o.getOutput().getName(), o, false);
     }
 
-    private String defaultFaultAction(String name, WSDLOperation o) {
+    private String defaultFaultAction(String name, EditableWSDLOperation o) {
         return buildAction(name, o, true);
     }
 
-    protected static final String buildAction(String name, WSDLOperation o, boolean isFault) {
+    protected static final String buildAction(String name, EditableWSDLOperation o, boolean isFault) {
         String tns = o.getName().getNamespaceURI();
 
         String delim = SLASH_DELIMITER;
diff --git a/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/wsdl/parser/WSDLParserExtensionContextImpl.java b/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/wsdl/parser/WSDLParserExtensionContextImpl.java
index a8b2550..57a84db 100644
--- a/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/wsdl/parser/WSDLParserExtensionContextImpl.java
+++ b/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/wsdl/parser/WSDLParserExtensionContextImpl.java
@@ -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
@@ -25,7 +25,7 @@
 
 package com.sun.xml.internal.ws.wsdl.parser;
 
-import com.sun.xml.internal.ws.api.model.wsdl.WSDLModel;
+import com.sun.xml.internal.ws.api.model.wsdl.editable.EditableWSDLModel;
 import com.sun.xml.internal.ws.api.server.Container;
 import com.sun.xml.internal.ws.api.wsdl.parser.WSDLParserExtensionContext;
 import com.sun.xml.internal.ws.api.policy.PolicyResolver;
@@ -38,7 +38,7 @@
  */
 final class WSDLParserExtensionContextImpl implements WSDLParserExtensionContext {
     private final boolean isClientSide;
-    private final WSDLModel wsdlModel;
+    private final EditableWSDLModel wsdlModel;
     private final Container container;
     private final PolicyResolver policyResolver;
 
@@ -46,7 +46,7 @@
      * Construct {@link WSDLParserExtensionContextImpl} with information that whether its on client side
      * or server side.
      */
-    protected WSDLParserExtensionContextImpl(WSDLModel model, boolean isClientSide, Container container, PolicyResolver policyResolver) {
+    protected WSDLParserExtensionContextImpl(EditableWSDLModel model, boolean isClientSide, Container container, PolicyResolver policyResolver) {
         this.wsdlModel = model;
         this.isClientSide = isClientSide;
         this.container = container;
@@ -57,7 +57,7 @@
         return isClientSide;
     }
 
-    public WSDLModel getWSDLModel() {
+    public EditableWSDLModel getWSDLModel() {
         return wsdlModel;
     }
 
diff --git a/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/wsdl/parser/WSDLParserExtensionFacade.java b/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/wsdl/parser/WSDLParserExtensionFacade.java
index d55bf52..a3e453b 100644
--- a/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/wsdl/parser/WSDLParserExtensionFacade.java
+++ b/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/wsdl/parser/WSDLParserExtensionFacade.java
@@ -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
@@ -27,10 +27,8 @@
 
 import com.sun.xml.internal.ws.api.wsdl.parser.WSDLParserExtension;
 import com.sun.xml.internal.ws.api.wsdl.parser.WSDLParserExtensionContext;
-import com.sun.xml.internal.ws.api.model.wsdl.*;
+import com.sun.xml.internal.ws.api.model.wsdl.editable.*;
 import com.sun.xml.internal.ws.streaming.XMLStreamReaderUtil;
-import com.sun.xml.internal.ws.model.wsdl.WSDLPortImpl;
-import com.sun.xml.internal.ws.model.wsdl.WSDLBoundPortTypeImpl;
 
 import javax.xml.stream.XMLStreamReader;
 import javax.xml.stream.Location;
@@ -66,7 +64,7 @@
         }
     }
 
-    public boolean serviceElements(WSDLService service, XMLStreamReader reader) {
+    public boolean serviceElements(EditableWSDLService service, XMLStreamReader reader) {
         for (WSDLParserExtension e : extensions) {
             if(e.serviceElements(service,reader))
                 return true;
@@ -75,12 +73,12 @@
         return true;
     }
 
-    public void serviceAttributes(WSDLService service, XMLStreamReader reader) {
+    public void serviceAttributes(EditableWSDLService service, XMLStreamReader reader) {
         for (WSDLParserExtension e : extensions)
             e.serviceAttributes(service,reader);
     }
 
-    public boolean portElements(WSDLPort port, XMLStreamReader reader) {
+    public boolean portElements(EditableWSDLPort port, XMLStreamReader reader) {
         for (WSDLParserExtension e : extensions) {
             if(e.portElements(port,reader))
                 return true;
@@ -88,34 +86,34 @@
         //extension is not understood by any WSDlParserExtension
         //Check if it must be understood.
         if(isRequiredExtension(reader)) {
-            ((WSDLPortImpl)port).addNotUnderstoodExtension(reader.getName(),getLocator(reader));
+            port.addNotUnderstoodExtension(reader.getName(),getLocator(reader));
         }
         XMLStreamReaderUtil.skipElement(reader);
         return true;
     }
 
-    public boolean portTypeOperationInput(WSDLOperation op, XMLStreamReader reader) {
+    public boolean portTypeOperationInput(EditableWSDLOperation op, XMLStreamReader reader) {
         for (WSDLParserExtension e : extensions)
             e.portTypeOperationInput(op,reader);
 
         return false;
     }
 
-    public boolean portTypeOperationOutput(WSDLOperation op, XMLStreamReader reader) {
+    public boolean portTypeOperationOutput(EditableWSDLOperation op, XMLStreamReader reader) {
         for (WSDLParserExtension e : extensions)
             e.portTypeOperationOutput(op,reader);
 
         return false;
     }
 
-    public boolean portTypeOperationFault(WSDLOperation op, XMLStreamReader reader) {
+    public boolean portTypeOperationFault(EditableWSDLOperation op, XMLStreamReader reader) {
         for (WSDLParserExtension e : extensions)
             e.portTypeOperationFault(op,reader);
 
         return false;
     }
 
-    public void portAttributes(WSDLPort port, XMLStreamReader reader) {
+    public void portAttributes(EditableWSDLPort port, XMLStreamReader reader) {
         for (WSDLParserExtension e : extensions)
             e.portAttributes(port,reader);
     }
@@ -130,7 +128,7 @@
         return true;
     }
 
-    public boolean bindingElements(WSDLBoundPortType binding, XMLStreamReader reader){
+    public boolean bindingElements(EditableWSDLBoundPortType binding, XMLStreamReader reader){
         for (WSDLParserExtension e : extensions) {
             if (e.bindingElements(binding, reader)) {
                 return true;
@@ -139,20 +137,20 @@
         //extension is not understood by any WSDlParserExtension
         //Check if it must be understood.
         if (isRequiredExtension(reader)) {
-            ((WSDLBoundPortTypeImpl) binding).addNotUnderstoodExtension(
+            binding.addNotUnderstoodExtension(
                     reader.getName(), getLocator(reader));
         }
         XMLStreamReaderUtil.skipElement(reader);
         return true;
     }
 
-    public void bindingAttributes(WSDLBoundPortType binding, XMLStreamReader reader){
+    public void bindingAttributes(EditableWSDLBoundPortType binding, XMLStreamReader reader){
         for (WSDLParserExtension e : extensions) {
             e.bindingAttributes(binding, reader);
         }
     }
 
-    public boolean portTypeElements(WSDLPortType portType, XMLStreamReader reader) {
+    public boolean portTypeElements(EditableWSDLPortType portType, XMLStreamReader reader) {
         for (WSDLParserExtension e : extensions) {
             if (e.portTypeElements(portType, reader)) {
                 return true;
@@ -162,13 +160,13 @@
         return true;
     }
 
-    public void portTypeAttributes(WSDLPortType portType, XMLStreamReader reader) {
+    public void portTypeAttributes(EditableWSDLPortType portType, XMLStreamReader reader) {
         for (WSDLParserExtension e : extensions) {
             e.portTypeAttributes(portType, reader);
         }
     }
 
-    public boolean portTypeOperationElements(WSDLOperation operation, XMLStreamReader reader) {
+    public boolean portTypeOperationElements(EditableWSDLOperation operation, XMLStreamReader reader) {
         for (WSDLParserExtension e : extensions) {
             if (e.portTypeOperationElements(operation, reader)) {
                 return true;
@@ -178,13 +176,13 @@
         return true;
     }
 
-    public void portTypeOperationAttributes(WSDLOperation operation, XMLStreamReader reader) {
+    public void portTypeOperationAttributes(EditableWSDLOperation operation, XMLStreamReader reader) {
         for (WSDLParserExtension e : extensions) {
             e.portTypeOperationAttributes(operation, reader);
         }
     }
 
-    public boolean bindingOperationElements(WSDLBoundOperation operation, XMLStreamReader reader) {
+    public boolean bindingOperationElements(EditableWSDLBoundOperation operation, XMLStreamReader reader) {
         for (WSDLParserExtension e : extensions) {
             if (e.bindingOperationElements(operation, reader)) {
                 return true;
@@ -194,13 +192,13 @@
         return true;
     }
 
-    public void bindingOperationAttributes(WSDLBoundOperation operation, XMLStreamReader reader) {
+    public void bindingOperationAttributes(EditableWSDLBoundOperation operation, XMLStreamReader reader) {
         for (WSDLParserExtension e : extensions) {
             e.bindingOperationAttributes(operation, reader);
         }
     }
 
-    public boolean messageElements(WSDLMessage msg, XMLStreamReader reader) {
+    public boolean messageElements(EditableWSDLMessage msg, XMLStreamReader reader) {
         for (WSDLParserExtension e : extensions) {
             if (e.messageElements(msg, reader)) {
                 return true;
@@ -210,13 +208,13 @@
         return true;
     }
 
-    public void messageAttributes(WSDLMessage msg, XMLStreamReader reader) {
+    public void messageAttributes(EditableWSDLMessage msg, XMLStreamReader reader) {
         for (WSDLParserExtension e : extensions) {
             e.messageAttributes(msg, reader);
         }
     }
 
-    public boolean portTypeOperationInputElements(WSDLInput input, XMLStreamReader reader) {
+    public boolean portTypeOperationInputElements(EditableWSDLInput input, XMLStreamReader reader) {
         for (WSDLParserExtension e : extensions) {
             if (e.portTypeOperationInputElements(input, reader)) {
                 return true;
@@ -226,13 +224,13 @@
         return true;
     }
 
-    public void portTypeOperationInputAttributes(WSDLInput input, XMLStreamReader reader) {
+    public void portTypeOperationInputAttributes(EditableWSDLInput input, XMLStreamReader reader) {
         for (WSDLParserExtension e : extensions) {
             e.portTypeOperationInputAttributes(input, reader);
         }
     }
 
-    public boolean portTypeOperationOutputElements(WSDLOutput output, XMLStreamReader reader) {
+    public boolean portTypeOperationOutputElements(EditableWSDLOutput output, XMLStreamReader reader) {
         for (WSDLParserExtension e : extensions) {
             if (e.portTypeOperationOutputElements(output, reader)) {
                 return true;
@@ -242,13 +240,13 @@
         return true;
     }
 
-    public void portTypeOperationOutputAttributes(WSDLOutput output, XMLStreamReader reader) {
+    public void portTypeOperationOutputAttributes(EditableWSDLOutput output, XMLStreamReader reader) {
         for (WSDLParserExtension e : extensions) {
             e.portTypeOperationOutputAttributes(output, reader);
         }
     }
 
-    public boolean portTypeOperationFaultElements(WSDLFault fault, XMLStreamReader reader) {
+    public boolean portTypeOperationFaultElements(EditableWSDLFault fault, XMLStreamReader reader) {
         for (WSDLParserExtension e : extensions) {
             if (e.portTypeOperationFaultElements(fault, reader)) {
                 return true;
@@ -258,13 +256,13 @@
         return true;
     }
 
-    public void portTypeOperationFaultAttributes(WSDLFault fault, XMLStreamReader reader) {
+    public void portTypeOperationFaultAttributes(EditableWSDLFault fault, XMLStreamReader reader) {
         for (WSDLParserExtension e : extensions) {
             e.portTypeOperationFaultAttributes(fault, reader);
         }
     }
 
-    public boolean bindingOperationInputElements(WSDLBoundOperation operation, XMLStreamReader reader) {
+    public boolean bindingOperationInputElements(EditableWSDLBoundOperation operation, XMLStreamReader reader) {
         for (WSDLParserExtension e : extensions) {
             if (e.bindingOperationInputElements(operation, reader)) {
                 return true;
@@ -274,13 +272,13 @@
         return true;
     }
 
-    public void bindingOperationInputAttributes(WSDLBoundOperation operation, XMLStreamReader reader) {
+    public void bindingOperationInputAttributes(EditableWSDLBoundOperation operation, XMLStreamReader reader) {
         for (WSDLParserExtension e : extensions) {
             e.bindingOperationInputAttributes(operation, reader);
         }
     }
 
-    public boolean bindingOperationOutputElements(WSDLBoundOperation operation, XMLStreamReader reader) {
+    public boolean bindingOperationOutputElements(EditableWSDLBoundOperation operation, XMLStreamReader reader) {
         for (WSDLParserExtension e : extensions) {
             if (e.bindingOperationOutputElements(operation, reader)) {
                 return true;
@@ -290,13 +288,13 @@
         return true;
     }
 
-    public void bindingOperationOutputAttributes(WSDLBoundOperation operation, XMLStreamReader reader) {
+    public void bindingOperationOutputAttributes(EditableWSDLBoundOperation operation, XMLStreamReader reader) {
         for (WSDLParserExtension e : extensions) {
             e.bindingOperationOutputAttributes(operation, reader);
         }
     }
 
-    public boolean bindingOperationFaultElements(WSDLBoundFault fault, XMLStreamReader reader) {
+    public boolean bindingOperationFaultElements(EditableWSDLBoundFault fault, XMLStreamReader reader) {
         for (WSDLParserExtension e : extensions) {
             if (e.bindingOperationFaultElements(fault, reader)) {
                 return true;
@@ -306,7 +304,7 @@
         return true;
     }
 
-    public void bindingOperationFaultAttributes(WSDLBoundFault fault, XMLStreamReader reader) {
+    public void bindingOperationFaultAttributes(EditableWSDLBoundFault fault, XMLStreamReader reader) {
         for (WSDLParserExtension e : extensions) {
             e.bindingOperationFaultAttributes(fault, reader);
         }
diff --git a/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/wsdl/writer/WSDLGenerator.java b/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/wsdl/writer/WSDLGenerator.java
index 136c980..c954b6f 100644
--- a/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/wsdl/writer/WSDLGenerator.java
+++ b/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/wsdl/writer/WSDLGenerator.java
@@ -209,7 +209,7 @@
     private final Class implType;
 
     private boolean inlineSchemas;      // TODO
-    private final boolean disableSecureXmlProcessing;
+    private final boolean disableXmlSecurity;
 
     /**
      * Creates the WSDLGenerator
@@ -229,12 +229,12 @@
      * @param model The {@link AbstractSEIModelImpl} used to generate the WSDL
      * @param wsdlResolver The {@link WSDLResolver} to use resovle names while generating the WSDL
      * @param binding specifies which {@link javax.xml.ws.BindingType} to generate
-     * @param disableSecureXmlProcessing specifies whether to disable the secure xml processing feature
+     * @param disableXmlSecurity specifies whether to disable the secure xml processing feature
      * @param extensions an array {@link WSDLGeneratorExtension} that will
      * be invoked to generate WSDL extensions
      */
     public WSDLGenerator(AbstractSEIModelImpl model, WSDLResolver wsdlResolver, WSBinding binding, Container container,
-                         Class implType, boolean inlineSchemas, boolean disableSecureXmlProcessing,
+                         Class implType, boolean inlineSchemas, boolean disableXmlSecurity,
                          WSDLGeneratorExtension... extensions) {
 
         this.model = model;
@@ -245,7 +245,7 @@
         this.implType = implType;
         extensionHandlers = new ArrayList<WSDLGeneratorExtension>();
         this.inlineSchemas = inlineSchemas;
-        this.disableSecureXmlProcessing = disableSecureXmlProcessing;
+        this.disableXmlSecurity = disableXmlSecurity;
 
         // register handlers for default extensions
         register(new W3CAddressingWSDLGeneratorExtension());
@@ -463,7 +463,7 @@
             }
         }
         if (resolver.nonGlassfishSchemas != null) {
-            TransformerFactory tf = XmlUtil.newTransformerFactory(!disableSecureXmlProcessing);
+            TransformerFactory tf = XmlUtil.newTransformerFactory(!disableXmlSecurity);
             try {
                 Transformer t = tf.newTransformer();
                 for (DOMResult xsd : resolver.nonGlassfishSchemas) {
diff --git a/jaxws/src/share/jaxws_classes/javax/annotation/PostConstruct.java b/jaxws/src/share/jaxws_classes/javax/annotation/PostConstruct.java
index 7478d2a..4f2976c 100644
--- a/jaxws/src/share/jaxws_classes/javax/annotation/PostConstruct.java
+++ b/jaxws/src/share/jaxws_classes/javax/annotation/PostConstruct.java
@@ -38,12 +38,31 @@
  * if the class does not request any resources to be injected. Only one
  * method can be annotated with this annotation. The method on which the
  * PostConstruct annotation is applied MUST fulfill all of the following
- * criteria:<ul>
- * <li>The method MUST NOT have any parameters except in the case of EJB
+ * criteria:
+ * <p>
+ * <ul>
+ * <li>The method MUST NOT have any parameters except in the case of
  * interceptors in which case it takes an InvocationContext object as
- * defined by the EJB specification.</li>
- * <li>The return type of the method MUST be void.</li>
- * <li>The method MUST NOT throw a checked exception.</li>
+ * defined by the Interceptors specification.</li>
+ * <li>The method defined on an interceptor class MUST HAVE one of the
+ * following signatures:
+ * <p>
+ * void &#060;METHOD&#062;(InvocationContext)
+ * <p>
+ * Object &#060;METHOD&#062;(InvocationContext) throws Exception
+ * <p>
+ * <i>Note: A PostConstruct interceptor method must not throw application
+ * exceptions, but it may be declared to throw checked exceptions including
+ * the java.lang.Exception if the same interceptor method interposes on
+ * business or timeout methods in addition to lifecycle events. If a
+ * PostConstruct interceptor method returns a value, it is ignored by
+ * the container.</i>
+ * </li>
+ * <li>The method defined on a non-interceptor class MUST HAVE the
+ * following signature:
+ * <p>
+ * void &#060;METHOD&#062;()
+ * </li>
  * <li>The method on which PostConstruct is applied MAY be public, protected,
  * package private or private.</li>
  * <li>The method MUST NOT be static except for the application client.</li>
diff --git a/jaxws/src/share/jaxws_classes/javax/annotation/PreDestroy.java b/jaxws/src/share/jaxws_classes/javax/annotation/PreDestroy.java
index 1c5c4df..d24cd3f 100644
--- a/jaxws/src/share/jaxws_classes/javax/annotation/PreDestroy.java
+++ b/jaxws/src/share/jaxws_classes/javax/annotation/PreDestroy.java
@@ -37,18 +37,38 @@
  * supported by all container managed objects that support PostConstruct
  * except the application client container in Java EE 5. The method on which
  * the PreDestroy annotation is applied MUST fulfill all of the following
- * criteria:<ul>
- * <li>The method MUST NOT have any parameters except in the case of EJB
- * interceptors in which case it takes an InvocationContext object as defined
- * by the EJB specification.</li>
- * <li>The return type of the method MUST be void.</li>
- * <li>The method MUST NOT throw a checked exception.</li>
+ * criteria:
+ * <p>
+ * <ul>
+ * <li>The method MUST NOT have any parameters except in the case of
+ * interceptors in which case it takes an InvocationContext object as
+ * defined by the Interceptors specification.</li>
+ * <li>The method defined on an interceptor class MUST HAVE one of the
+ * following signatures:
+ * <p>
+ * void &#060;METHOD&#062;(InvocationContext)
+ * <p>
+ * Object &#060;METHOD&#062;(InvocationContext) throws Exception
+ * <p>
+ * <i>Note: A PreDestroy interceptor method must not throw application
+ * exceptions, but it may be declared to throw checked exceptions including
+ * the java.lang.Exception if the same interceptor method interposes on
+ * business or timeout methods in addition to lifecycle events. If a
+ * PreDestroy interceptor method returns a value, it is ignored by
+ * the container.</i>
+ * </li>
+ * <li>The method defined on a non-interceptor class MUST HAVE the
+ * following signature:
+ * <p>
+ * void &#060;METHOD&#062;()
+ * </li>
  * <li>The method on which PreDestroy is applied MAY be public, protected,
  * package private or private.</li>
  * <li>The method MUST NOT be static.</li>
  * <li>The method MAY be final.</li>
  * <li>If the method throws an unchecked exception it is ignored except in the
  * case of EJBs where the EJB can handle exceptions.</li>
+ * </ul>
  *
  * @see javax.annotation.PostConstruct
  * @see javax.annotation.Resource
diff --git a/jaxws/src/share/jaxws_classes/javax/xml/bind/JAXBException.java b/jaxws/src/share/jaxws_classes/javax/xml/bind/JAXBException.java
index ff79b11..c6b94d6 100644
--- a/jaxws/src/share/jaxws_classes/javax/xml/bind/JAXBException.java
+++ b/jaxws/src/share/jaxws_classes/javax/xml/bind/JAXBException.java
@@ -48,7 +48,7 @@
      * Exception reference
      *
      */
-    private Throwable linkedException;
+    private volatile Throwable linkedException;
 
     static final long serialVersionUID = -5621384651494307979L;
 
@@ -133,7 +133,7 @@
      *                  indicates that the linked exception does not exist or
      *                  is unknown).
      */
-    public synchronized void setLinkedException( Throwable exception ) {
+    public void setLinkedException( Throwable exception ) {
         this.linkedException = exception;
     }
 
diff --git a/jaxws/src/share/jaxws_classes/javax/xml/bind/Marshaller.java b/jaxws/src/share/jaxws_classes/javax/xml/bind/Marshaller.java
index a37fa3c..6a46903 100644
--- a/jaxws/src/share/jaxws_classes/javax/xml/bind/Marshaller.java
+++ b/jaxws/src/share/jaxws_classes/javax/xml/bind/Marshaller.java
@@ -175,9 +175,7 @@
  * encoding used during these marshal operations.  Client applications are
  * expected to supply a valid character encoding name as defined in the
  * <a href="http://www.w3.org/TR/2000/REC-xml-20001006#charencoding">W3C XML 1.0
- * Recommendation</a> and supported by your
- * <a href="http://java.sun.com/j2se/1.3/docs/api/java/lang/package-summary.html#charenc">
- * Java Platform</a>.
+ * Recommendation</a> and supported by your Java Platform</a>.
  * </blockquote>
  *
  * <p>
@@ -292,7 +290,7 @@
  *   boolean beforeMarshal(Marshaller);
  *
  *   // Invoked by Marshaller after it has marshalled all properties of this object.
- *   void afterMmarshal(Marshaller);
+ *   void afterMarshal(Marshaller);
  * </pre>
  * </blockquote>
  * The class defined event callback methods should be used when the callback method requires
diff --git a/jaxws/src/share/jaxws_classes/javax/xml/bind/TypeConstraintException.java b/jaxws/src/share/jaxws_classes/javax/xml/bind/TypeConstraintException.java
index a1118b1..b441bd0 100644
--- a/jaxws/src/share/jaxws_classes/javax/xml/bind/TypeConstraintException.java
+++ b/jaxws/src/share/jaxws_classes/javax/xml/bind/TypeConstraintException.java
@@ -57,7 +57,7 @@
      * Exception reference
      *
      */
-    private Throwable linkedException;
+    private volatile Throwable linkedException;
 
 
     /**
@@ -141,7 +141,7 @@
      *                  indicates that the linked exception does not exist or
      *                  is unknown).
      */
-    public synchronized void setLinkedException( Throwable exception ) {
+    public void setLinkedException( Throwable exception ) {
         this.linkedException = exception;
     }
 
diff --git a/jaxws/src/share/jaxws_classes/javax/xml/bind/annotation/adapters/package.html b/jaxws/src/share/jaxws_classes/javax/xml/bind/annotation/adapters/package.html
index 9174944..02dbd93 100644
--- a/jaxws/src/share/jaxws_classes/javax/xml/bind/annotation/adapters/package.html
+++ b/jaxws/src/share/jaxws_classes/javax/xml/bind/annotation/adapters/package.html
@@ -38,8 +38,7 @@
         <h2>Package Specification</h2>
 
         <ul>
-            <li><a href="http://java.sun.com/xml/downloads/jaxb.html">JAXB
-                Specification</a>
+            <li><a href="http://jcp.org/en/jsr/detail?id=222">JAXB Specification</a>
         </ul>
 
         <h2>Related Documentation</h2>
@@ -47,8 +46,7 @@
         For overviews, tutorials, examples, guides, and tool documentation,
         please see:
         <ul>
-            <li>The <a href="http://java.sun.com/xml/jaxb/index.html">JAXB
-            Website</a>
+            <li>The <a href="http://jaxb.java.net">JAXB Website</a>
         </ul>
 
         <!-- Put @see and @since tags down here. -->
diff --git a/jaxws/src/share/jaxws_classes/javax/xml/soap/MessageFactory.java b/jaxws/src/share/jaxws_classes/javax/xml/soap/MessageFactory.java
index 074c720..8501297 100644
--- a/jaxws/src/share/jaxws_classes/javax/xml/soap/MessageFactory.java
+++ b/jaxws/src/share/jaxws_classes/javax/xml/soap/MessageFactory.java
@@ -104,8 +104,6 @@
                     MESSAGE_FACTORY_PROPERTY,
                     DEFAULT_MESSAGE_FACTORY,
                     false);
-                FactoryFinder.find(MESSAGE_FACTORY_PROPERTY,
-                        DEFAULT_MESSAGE_FACTORY, false);
 
             if (factory != null) {
                 return factory;
diff --git a/jdk/.hgtags b/jdk/.hgtags
index cdae1de..3a38f34 100644
--- a/jdk/.hgtags
+++ b/jdk/.hgtags
@@ -232,3 +232,4 @@
 006aaa5f069e7dd98fccdc696866c9f8582c087c jdk8-b108
 946f3fd5f8bf0ccd180c258d25e5837fa1bf004c jdk8-b109
 54e099776f08430d3a7f4feabd9f2ba886b55320 jdk8-b110
+719befd87c7b96ae103c05730ca555227bfc0116 jdk8-b111
diff --git a/jdk/make/common/shared/Compiler-msvc.gmk b/jdk/make/common/shared/Compiler-msvc.gmk
index af7dd10..d6d7416 100644
--- a/jdk/make/common/shared/Compiler-msvc.gmk
+++ b/jdk/make/common/shared/Compiler-msvc.gmk
@@ -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)
diff --git a/jdk/make/common/shared/Defs-versions.gmk b/jdk/make/common/shared/Defs-versions.gmk
index a3a53c5..31d09f0 100644
--- a/jdk/make/common/shared/Defs-versions.gmk
+++ b/jdk/make/common/shared/Defs-versions.gmk
@@ -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
diff --git a/jdk/make/common/shared/Sanity.gmk b/jdk/make/common/shared/Sanity.gmk
index a9f4692..66fab35 100644
--- a/jdk/make/common/shared/Sanity.gmk
+++ b/jdk/make/common/shared/Sanity.gmk
@@ -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):
diff --git a/jdk/make/docs/Makefile b/jdk/make/docs/Makefile
index 6681097..ad9a2c5 100644
--- a/jdk/make/docs/Makefile
+++ b/jdk/make/docs/Makefile
@@ -50,6 +50,7 @@
 DEV_DOCS_URL-5 = http://java.sun.com/j2se/1.5.0/docs/index.html
 DEV_DOCS_URL-6 = http://download.oracle.com/javase/6/docs/index.html
 DEV_DOCS_URL-7 = http://download.oracle.com/javase/7/docs/index.html
+DEV_DOCS_URL-8 = http://download.oracle.com/javase/8/docs/index.html
 DEV_DOCS_URL = $(DEV_DOCS_URL-$(JDK_MINOR_VERSION))
 DOCS_BASE_URL = http://download.oracle.com/javase/7/docs
 
diff --git a/jdk/make/java/java/FILES_c.gmk b/jdk/make/java/java/FILES_c.gmk
index d01b0c2..29bb7e3 100644
--- a/jdk/make/java/java/FILES_c.gmk
+++ b/jdk/make/java/java/FILES_c.gmk
@@ -33,6 +33,7 @@
 	Console_md.c \
 	Double.c \
 	Executable.c \
+	Field.c \
 	FileDescriptor_md.c \
 	FileInputStream.c \
 	FileInputStream_md.c \
diff --git a/jdk/make/java/java/mapfile-vers b/jdk/make/java/java/mapfile-vers
index bb06a3d..29ce7eb 100644
--- a/jdk/make/java/java/mapfile-vers
+++ b/jdk/make/java/java/mapfile-vers
@@ -190,6 +190,8 @@
 		Java_java_lang_reflect_Array_setLong;
 		Java_java_lang_reflect_Array_setShort;
 		Java_java_lang_reflect_Executable_getParameters0;
+		Java_java_lang_reflect_Executable_getTypeAnnotationBytes0;
+		Java_java_lang_reflect_Field_getTypeAnnotationBytes0;
 		Java_java_lang_Runtime_freeMemory;
                 Java_java_lang_Runtime_maxMemory;
 		Java_java_lang_Runtime_gc;
diff --git a/jdk/make/netbeans/common/java-data-native.ent b/jdk/make/netbeans/common/java-data-native.ent
index 54c7486..b50ea59 100644
--- a/jdk/make/netbeans/common/java-data-native.ent
+++ b/jdk/make/netbeans/common/java-data-native.ent
@@ -31,14 +31,14 @@
  SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
 -->
 
-<java-data xmlns="http://www.netbeans.org/ns/freeform-project-java/3">
+<java-data xmlns="http://www.netbeans.org/ns/freeform-project-java/4">
     <compilation-unit>
         <package-root>${root}/src/share/classes</package-root>
         <package-root>${root}/src/macosx/classes</package-root>
         <package-root>${root}/src/solaris/classes</package-root>
         <package-root>${root}/src/windows/classes</package-root>
         <classpath mode="boot">${bootstrap.jdk}/jre/lib/rt.jar</classpath>
-        <built-to>${root}/build/${platform}-${arch}/classes</built-to>
+        <built-to>${root}/../build/${platform}-${arch}/jdk/classes</built-to>
         <javadoc-built-to>${root}/build/${platform}-${arch}/docs/api</javadoc-built-to>
         <source-level>1.8</source-level>
     </compilation-unit>
diff --git a/jdk/make/netbeans/common/java-data-no-native.ent b/jdk/make/netbeans/common/java-data-no-native.ent
index 8e06c66..882072e 100644
--- a/jdk/make/netbeans/common/java-data-no-native.ent
+++ b/jdk/make/netbeans/common/java-data-no-native.ent
@@ -31,11 +31,11 @@
  SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
 -->
 
-<java-data xmlns="http://www.netbeans.org/ns/freeform-project-java/3">
+<java-data xmlns="http://www.netbeans.org/ns/freeform-project-java/4">
     <compilation-unit>
         <package-root>${root}/src/share/classes</package-root>
         <classpath mode="boot">${bootstrap.jdk}/jre/lib/rt.jar</classpath>
-        <built-to>${root}/build/${platform}-${arch}/classes</built-to>
+        <built-to>${root}/../build/${platform}-${arch}/jdk/classes</built-to>
         <javadoc-built-to>${root}/build/${platform}-${arch}/docs/api</javadoc-built-to>
         <source-level>1.8</source-level>
     </compilation-unit>
diff --git a/jdk/make/tools/manifest.mf b/jdk/make/tools/manifest.mf
index bbfd1c3..25b7a8b 100644
--- a/jdk/make/tools/manifest.mf
+++ b/jdk/make/tools/manifest.mf
@@ -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@@
diff --git a/jdk/make/tools/src/build/tools/buildmetaindex/BuildMetaIndex.java b/jdk/make/tools/src/build/tools/buildmetaindex/BuildMetaIndex.java
index 73feec3..f573c57 100644
--- a/jdk/make/tools/src/build/tools/buildmetaindex/BuildMetaIndex.java
+++ b/jdk/make/tools/src/build/tools/buildmetaindex/BuildMetaIndex.java
@@ -174,6 +174,44 @@
     private HashMap<String, HashSet<String>> knownPrefixMap = new HashMap<>();
 
     /*
+     * A class for mapping package prefixes to the number of
+     * levels of package elements to include.
+     */
+    static class ExtraLevel {
+        public ExtraLevel(String prefix, int levels) {
+            this.prefix = prefix;
+            this.levels = levels;
+        }
+        String prefix;
+        int levels;
+    }
+
+    /*
+     * A list of the special-cased package names.
+     */
+    private static ArrayList<ExtraLevel> extraLevels = new ArrayList<>();
+
+    static {
+        // The order of these statements is significant,
+        // since we stop looking after the first match.
+
+        // Need more precise information to disambiguate
+        // (illegal) references from applications to
+        // obsolete backported collections classes in
+        // com/sun/java/util
+        extraLevels.add(new ExtraLevel("com/sun/java/util/", Integer.MAX_VALUE));
+        extraLevels.add(new ExtraLevel("com/sun/java/", 4));
+        // Need more information than just first two package
+        // name elements to determine that classes in
+        // deploy.jar are not in rt.jar
+        extraLevels.add(new ExtraLevel("com/sun/", 3));
+        // Need to make sure things in jfr.jar aren't
+        // confused with other com/oracle/** packages
+        extraLevels.add(new ExtraLevel("com/oracle/jrockit", 3));
+    }
+
+
+    /*
      * We add maximum 5 second level entries to "sun", "java" and
      * "javax" entries. Tune this parameter to get a balance on the
      * cold start and footprint.
@@ -237,39 +275,25 @@
                         String[] pkgElements = name.split("/");
                         // Last one is the class name; definitely ignoring that
                         if (pkgElements.length > 2) {
-                            String meta = null;
-                            // Need more information than just first two package
-                            // name elements to determine that classes in
-                            // deploy.jar are not in rt.jar
-                            if (pkgElements.length > 3 &&
-                                pkgElements[0].equals("com") &&
-                                pkgElements[1].equals("sun")) {
-                                // Need more precise information to disambiguate
-                                // (illegal) references from applications to
-                                // obsolete backported collections classes in
-                                // com/sun/java/util
-                                if (pkgElements.length > 4 &&
-                                    pkgElements[2].equals("java")) {
-                                    int bound = 0;
-                                    if (pkgElements[3].equals("util")) {
-                                        // Take all of the packages
-                                        bound = pkgElements.length - 1;
-                                    } else {
-                                        // Trim it somewhat more
-                                        bound = 4;
-                                    }
-                                    meta = "";
-                                    for (int j = 0; j < bound; j++) {
-                                        meta += pkgElements[j] + "/";
-                                    }
-                                } else {
-                                    meta = pkgElements[0] + "/" + pkgElements[1]
-                                        + "/" + pkgElements[2] + "/";
+                            String meta = "";
+
+                            // Default is 2 levels of package elements
+                            int levels = 2;
+
+                            // But for some packages we add more elements
+                            for(ExtraLevel el : extraLevels) {
+                                if (name.startsWith(el.prefix)) {
+                                    levels = el.levels;
+                                    break;
                                 }
-                            } else {
-                                meta = pkgElements[0] + "/" + pkgElements[1] + "/";
                             }
-                            indexSet.add(meta);
+                            for (int i = 0; i < levels && i < pkgElements.length - 1; i++) {
+                                meta += pkgElements[i] + "/";
+                            }
+
+                            if (!meta.equals("")) {
+                                indexSet.add(meta);
+                            }
                         }
 
                     } // end of "while" loop;
diff --git a/jdk/makefiles/BuildJdk.gmk b/jdk/makefiles/BuildJdk.gmk
index d6c1033..9a42d01 100644
--- a/jdk/makefiles/BuildJdk.gmk
+++ b/jdk/makefiles/BuildJdk.gmk
@@ -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
diff --git a/jdk/makefiles/Bundles.gmk b/jdk/makefiles/Bundles.gmk
index 94b8a57..6d0cbe5 100644
--- a/jdk/makefiles/Bundles.gmk
+++ b/jdk/makefiles/Bundles.gmk
@@ -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
diff --git a/jdk/makefiles/CompileDemos.gmk b/jdk/makefiles/CompileDemos.gmk
index 6cd5dd4..c65b0f8 100644
--- a/jdk/makefiles/CompileDemos.gmk
+++ b/jdk/makefiles/CompileDemos.gmk
@@ -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
 
 ##################################################################################################
diff --git a/jdk/makefiles/CompileJavaClasses.gmk b/jdk/makefiles/CompileJavaClasses.gmk
index a015846..e032f47 100644
--- a/jdk/makefiles/CompileJavaClasses.gmk
+++ b/jdk/makefiles/CompileJavaClasses.gmk
@@ -38,244 +38,244 @@
 
 ##########################################################################################
 
-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
 # is because they are generated sources, but the AUTO_JAVA_FILES won't
-# pick them up since they aren't generated when the source dirs are 
+# pick them up since they aren't generated when the source dirs are
 # searched and they aren't referenced by any other classes so they won't
 # 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 
+# 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
 
-     # 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,36 +288,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))
-
-##########################################################################################
-
-ifndef OPENJDK
-
-    $(eval $(call SetupJavaCompilation,BUILD_ALTCLASSES,\
-		SETUP:=GENERATE_JDKBYTECODE,\
-		SRC:=$(JDK_TOPDIR)/src/closed/share/altclasses, \
-		BIN:=$(JDK_OUTPUTDIR)/altclasses_classes))
-
-    $(BUILD_ALTCLASSES): $(BUILD_JDK)
-
-endif
+$(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))
 
 ##########################################################################################
 
@@ -327,85 +314,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_ALTCLASSES) $(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)
+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)
 
 .PHONY: all
diff --git a/jdk/makefiles/CompileLaunchers.gmk b/jdk/makefiles/CompileLaunchers.gmk
index d4ce031..b3cc4e2 100644
--- a/jdk/makefiles/CompileLaunchers.gmk
+++ b/jdk/makefiles/CompileLaunchers.gmk
@@ -33,27 +33,27 @@
 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) \
+      $(call SET_EXECUTABLE_ORIGIN,$(ORIGIN_ROOT)/jre/lib$(OPENJDK_TARGET_CPU_LIBDIR)/jli)
 endif
 
 #
@@ -61,158 +61,158 @@
 # 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)) \
+      $(call SET_EXECUTABLE_ORIGIN,$(ORIGIN_ROOT)/jre/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.
+  # 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
+  $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
+
+  $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 := $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 += -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
+  endif
 
-    ifeq ($(USE_EXTERNAL_LIBZ), true)
-        $1_LDFLAGS_SUFFIX += -lz
-    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
+  $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
+  # 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
+  $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
+  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 +221,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 +515,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 +529,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,7 +571,7 @@
 #
 # 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
@@ -588,11 +588,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 +605,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)
 
diff --git a/jdk/makefiles/CompileNativeLibraries.gmk b/jdk/makefiles/CompileNativeLibraries.gmk
index 52b02f1..294f73b 100644
--- a/jdk/makefiles/CompileNativeLibraries.gmk
+++ b/jdk/makefiles/CompileNativeLibraries.gmk
@@ -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,13 +46,13 @@
 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.
@@ -63,59 +63,59 @@
 # 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
+  DEBUG_ALL_BINARIES := true
 endif
 
 #
 # TODO replace with X_FLAGS / X_LIBS
-#   and add them to configure
+# and add them to configure
 #
-OPENWIN_LIB:=$(OPENWIN_HOME)/lib
+OPENWIN_LIB := $(OPENWIN_HOME)/lib
 
 ##########################################################################################
 
-BUILD_LIBFDLIBM_OPTIMIZATION:=HIGH
+BUILD_LIBFDLIBM_OPTIMIZATION := HIGH
 
 ifneq ($(OPENJDK_TARGET_OS), solaris)
-      BUILD_LIBFDLIBM_OPTIMIZATION:=NONE
+  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)))
+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)))
+  $(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)
+  BUILD_LIBFDLIBM := $(JDK_OUTPUTDIR)/objs/$(LIBRARY_PREFIX)fdlibm$(STATIC_LIBRARY_SUFFIX)
+  $(BUILD_LIBFDLIBM): $(BUILD_LIBFDLIBM_MAC)
 	$(call install-file)
 
 endif
@@ -123,637 +123,638 @@
 
 ##########################################################################################
 
-BUILD_LIBVERIFY_SRC:=check_code.c check_format.c
+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
+  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
+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))
+$(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
+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
+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
+  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
+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 := $(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)"'
+    -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)"'
+ifneq (, $(JDK_UPDATE_VERSION))
+  LIBJAVA_CFLAGS += -DJDK_UPDATE_VERSION='"$(JDK_UPDATE_VERSION)"'
 endif
 
-LIBJAVA_EXCLUDE_FILES:=check_code.c check_format.c jspawnhelper.c
+LIBJAVA_EXCLUDE_FILES := check_code.c check_format.c jspawnhelper.c
 
-ifneq ($(OPENJDK_TARGET_OS),macosx)
-	LIBJAVA_EXCLUDE_FILES += java_props_macosx.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
+  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
+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
+  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
+  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)))
+$(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): $(LIBJLI_BINARY)
 
-$(BUILD_LIBJAVA) : $(BUILD_LIBVERIFY)
+$(BUILD_LIBJAVA): $(BUILD_LIBVERIFY)
 
-$(BUILD_LIBJAVA) : $(BUILD_LIBFDLIBM)
+$(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_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_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
+  BUILD_LIBMLIB_CFLAGS += -DMLIB_OS64BIT
 endif
 
 ifneq ($(OPENJDK_TARGET_OS), windows)
-	BUILD_LIBMLIB_LDLIBS += $(LIBM) $(LIBDL)
+  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)))
+$(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_LIBMLIB_IMAGE): $(BUILD_LIBJAVA)
 
 BUILD_LIBRARIES += $(BUILD_LIBMLIB_IMAGE)
 
 ##########################################################################################
 
-ifeq ($(OPENJDK_TARGET_OS)-$(OPENJDK_TARGET_CPU_ARCH),solaris-sparc)
+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_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))
+  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)))
+  $(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_LIBMLIB_IMAGE_V): $(BUILD_LIBJAVA)
 
-BUILD_LIBRARIES += $(BUILD_LIBMLIB_IMAGE_V)
+  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
+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
+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
+  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_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
+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
+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
+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
+  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_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_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
+  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
+  ifeq ($(OPENJDK_TARGET_CPU), sparcv9)
+    LIBAWT_ASFLAGS = -P -xarch=v9a
+  else
+    LIBAWT_ASFLAGS = -P -xarch=v8plusa
+  endif
 else
-	LIBAWT_FILES += MapAccelFunc.c
+  LIBAWT_FILES += MapAccelFunc.c
 endif
 
-ifneq ($(OPENJDK_TARGET_OS),solaris)
-	LIBAWT_CFLAGS += -DMLIB_NO_LIBSUNMATH
+ifneq ($(OPENJDK_TARGET_OS), solaris)
+  LIBAWT_CFLAGS += -DMLIB_NO_LIBSUNMATH
 endif
 
-LIBAWT_LANG:=C
+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
+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
 
-	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
+  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
+  LIBAWT_CFLAGS += -DINTERNAL_BUILD
 endif
 
-LIBAWT_MAPFILE:=$(JDK_TOPDIR)/makefiles/mapfiles/libawt/mapfile-vers
-ifeq ($(OPENJDK_TARGET_OS),linux)
-	LIBAWT_MAPFILE:=
+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)))
+$(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)
+$(BUILD_LIBAWT): $(BUILD_LIBJAVA)
 
 ifeq ($(OPENJDK_TARGET_OS), macosx)
-$(BUILD_LIBAWT) : $(BUILD_LIBMLIB_IMAGE)
+  $(BUILD_LIBAWT): $(BUILD_LIBMLIB_IMAGE)
 endif
 
 BUILD_LIBRARIES += $(BUILD_LIBAWT)
@@ -766,1601 +767,76 @@
 #
 # It's used for libawt_headless _and_ libawt_xawt
 #
-X11_PATH:=/usr/X11R6
+X11_PATH := /usr/X11R6
 
 ifneq ($(OPENJDK_TARGET_OS), windows)
-ifndef BUILD_HEADLESS_ONLY
+  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_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 \
+    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
+        $(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), solaris)
+      LIBAWT_XAWT_CFLAGS += -DFUNCPROTO=15
+    endif
 
-ifeq ($(OPENJDK_TARGET_OS),linux)
-ifndef OPENJDK
-include $(JDK_TOPDIR)/make/closed/xawt.gmk
-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 ($(DISABLE_XRENDER), true)
+        LIBAWT_XAWT_CFLAGS += -DDISABLE_XRENDER_BY_DEFAULT=true
+      endif
+    endif
 
-ifeq ($(MILESTONE),internal)
-	LIBAWT_XAWT_CFLAGS += -DINTERNAL_BUILD
-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 \
+    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)
-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)
-
-##########################################################################################
-
-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
-
-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)
-
-$(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 \
+        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 \
@@ -2376,812 +852,1517 @@
         GLXGraphicsConfig.c \
         GLXSurfaceData.c \
         AccelGlyphCache.c \
-	CUPSfuncs.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
 
-ifeq ($(OPENJDK_TARGET_OS),macosx)
-	LIBAWT_HEADLESS_FILES+=\
-		AWTFont.m \
-		AWTStrike.m \
-		CCharToGlyphMapper.m \
-		CGGlyphImages.m \
-		CGGlyphOutlines.m \
-		CoreTextSupport.m
-endif
+    LIBAWT_XAWT_LDFLAGS_SUFFIX := $(LIBM) -lawt -lXext -lX11 -lXrender $(LIBDL) -lXtst -lXi -ljava -ljvm -lc
 
-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
+    ifeq ($(OPENJDK_TARGET_OS), linux)
+      # To match old build, add this to LDFLAGS instead of suffix.
+      LIBAWT_XAWT_LDFLAGS += -lpthread
+    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)))
+    ifeq ($(OPENJDK_TARGET_OS), macosx)
+      LIBAWT_XAWT_LDFLAGS_SUFFIX += -lpthread
+    endif
 
-$(BUILD_LIBAWT_HEADLESS) : $(BUILD_LIBAWT)
+    # 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_LIBRARIES += $(BUILD_LIBAWT_HEADLESS)
+    $(BUILD_LIBAWT_XAWT): $(BUILD_LIBJAVA)
 
-endif
+    $(BUILD_LIBAWT_XAWT): $(BUILD_LIBAWT)
+
+    BUILD_LIBRARIES += $(BUILD_LIBAWT_XAWT)
+
+  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
+BUILD_LIBZIP_EXCLUDES :=
+ifeq ($(USE_EXTERNAL_LIBZ), true)
+  LIBZ := -lz
+  LIBZIP_EXCLUDES += zlib-1.2.5
 else
-    LIBSPLASHSCREEN_DIRS += $(JDK_TOPDIR)/src/share/native/sun/awt/giflib
-    GIFLIB_CFLAGS := -I$(JDK_TOPDIR)/src/share/native/sun/awt/giflib
+  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)
+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)
-    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
+  BUILD_LIBMANAGEMENT_EXCLUDES += MacosxOperatingSystem.c
 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 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)
+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)
+
+##########################################################################################
+
+$(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)
-
-$(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)
+  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))
 
-$(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
+LIBNET_EXCLUDE_FILES :=
+ifneq ($(OPENJDK_TARGET_OS), linux)
+  LIBNET_EXCLUDE_FILES += linux_close.c
 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)
+ifneq ($(OPENJDK_TARGET_OS), macosx)
+  LIBNET_EXCLUDE_FILES += bsd_close.c
 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
+  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)
-	EXTRA_SOUND_JNI_LIBS += jsoundalsa
-	LIBJSOUND_CFLAGS += -DX_PLATFORM=X_LINUX
-endif # 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)
-	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
+  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)
-	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
+  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)
-	LIBJSOUND_CFLAGS += -DX_ARCH=X_ZERO
+  ERGO_FAMILY := 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
+  ifeq ($(OPENJDK_TARGET_CPU_ARCH), x86)
+    ERGO_FAMILY := i586
+  else
+    ERGO_FAMILY := $(OPENJDK_TARGET_CPU_ARCH)
   endif
 endif
 
-LIBJSOUND_CFLAGS += -DEXTRA_SOUND_JNI_LIBS='"$(EXTRA_SOUND_JNI_LIBS)"'
+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
 
-$(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_LIBJLI_java_md_macosx.c_CFLAGS := -x objective-c
+  BUILD_LIBJLI_STATIC_java_md_macosx.c_CFLAGS := -x objective-c
+endif
 
-$(BUILD_LIBJSOUND) : $(BUILD_LIBJAVA)
+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_LIBRARIES += $(BUILD_LIBJSOUND)
+  BUILD_LIBJLI_FILES += java_md_common.c
+  BUILD_LIBJLI_FILES += java_md_solinux.c ergo.c
 
-##########################################################################################
+  ERGO_ARCH_FILE = ergo_$(ERGO_FAMILY).c
 
-ifneq ($(filter jsoundalsa, $(EXTRA_SOUND_JNI_LIBS)),)
+  # 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
 
-$(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)))
+# Append defines depending on target platform
+LIBJLI_CFLAGS += $(OPENJDK_TARGET_CPU_JLI_CFLAGS)
 
-$(BUILD_LIBJSOUNDALSA) : $(BUILD_LIBJAVA)
+ifeq ($(OPENJDK_TARGET_OS), macosx)
+  LIBJLI_CFLAGS += -DPACKAGE_PATH=\"$(PACKAGE_PATH)\"
+endif
 
-BUILD_LIBRARIES += $(BUILD_LIBJSOUNDALSA)
+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
 
 ##########################################################################################
 
-ifneq ($(filter jsoundds, $(EXTRA_SOUND_JNI_LIBS)),)
+ifndef OPENJDK
+  ifeq ($(ENABLE_JFR), true)
 
-$(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)))
+    $(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_LIBJSOUNDDS) : $(BUILD_LIBJAVA)
+    BUILD_LIBRARIES += $(BUILD_LIBJFR)
 
-BUILD_LIBRARIES += $(BUILD_LIBJSOUNDDS)
-
+endif
 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_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_LIBJ2UCRYPTO) : $(BUILD_LIBJAVA)
+  BUILD_LIBKCMS_FLAGS := $(CFLAGS_JDKLIB)
 
-BUILD_LIBRARIES += $(BUILD_LIBJ2UCRYPTO)
+  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
 
-endif
-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)
 
-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)
+  BUILD_LIBRARIES += $(BUILD_LIBKCMS)
 
 endif
 
 ##########################################################################################
 
-ifeq ($(OPENJDK_TARGET_OS), macosx)
+ifndef OPENJDK
+  ifeq ($(OPENJDK_TARGET_OS), solaris)
+    ifneq ($(OPENJDK_TARGET_CPU), x86_64)
 
-$(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)))
+      ifeq ($(shell if test "$(OS_VERSION_MAJOR)" -eq 5 -a "$(OS_VERSION_MINOR)" -le 10; then $(ECHO) ok; fi), ok)
 
-BUILD_LIBRARIES += $(BUILD_LIBOSXAPP)
+        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 ($(OPENJDK_TARGET_OS), macosx)
+ifeq ($(BUILD_HEADLESS), true)
+  ifneq ($(OPENJDK_TARGET_OS), windows)
 
-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
+    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
 
-$(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)))
+    ifeq ($(OPENJDK_TARGET_OS), macosx)
+      LIBAWT_HEADLESS_DIRS += $(JDK_TOPDIR)/src/macosx/native/sun/font
+    endif
 
-BUILD_LIBRARIES += $(BUILD_LIBOSX)
+    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))
 
-$(BUILD_LIBOSX) : $(BUILD_LIBOSXAPP)
+    ifeq ($(OPENJDK_TARGET_OS), macosx)
+      LIBAWT_HEADLESS_CFLAGS += \
+          -F/System/Library/Frameworks/JavaVM.framework/Frameworks \
+          -F/System/Library/Frameworks/ApplicationServices.framework/Frameworks
+    endif
 
-$(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 \
-        \
+    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 \
@@ -3194,259 +2375,1080 @@
         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_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 \
+    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_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)))
+    $(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_LIBRARIES += $(BUILD_LIBAWT_LWAWT)
+    $(BUILD_LIBAWT_HEADLESS): $(BUILD_LIBAWT)
 
-$(BUILD_LIBAWT_LWAWT) : $(BUILD_LIBAWT)
+    BUILD_LIBRARIES += $(BUILD_LIBAWT_HEADLESS)
 
-$(BUILD_LIBAWT_LWAWT) : $(BUILD_LIBMLIB_IMAGE)
-
-$(BUILD_LIBAWT_LWAWT) : $(BUILD_LIBOSXAPP)
-
-$(BUILD_LIBAWT_LWAWT) : $(BUILD_LIBJAVA)
-
+  endif
 endif
 
 ##########################################################################################
 
-ifeq ($(OPENJDK_TARGET_OS), macosx)
+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
 
-$(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)))
+  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
 
-BUILD_LIBRARIES += $(BUILD_LIBOSXUI)
+  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
 
-$(BUILD_LIBOSXUI) : $(BUILD_LIBAWT)
+  LIBSPLASHSCREEN_CFLAGS := -DSPLASHSCREEN -DPNG_NO_MMX_CODE \
+      $(foreach dir, $(LIBSPLASHSCREEN_DIRS), -I$(dir))
 
-$(BUILD_LIBOSXUI) : $(BUILD_LIBOSXAPP)
+  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
 
-$(BUILD_LIBOSXUI) : $(BUILD_LIBAWT_LWAWT)
+    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
 
-#$(BUILD_LIBOSXUI) : $(BUILD_LIBJAVA)
+  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
 
-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)
+  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
 
-# 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,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)))
 
-$(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)))
+  BUILD_LIBRARIES += $(LIBSPLASHSCREEN)
 
-$(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)
+  ifeq ($(OPENJDK_TARGET_OS), macosx)
+    $(LIBSPLASHSCREEN): $(INSTALL_LIBRARIES_HERE)/$(LIBRARY_PREFIX)osxapp$(SHARED_LIBRARY_SUFFIX)
+  endif
 
 endif
 
 ##########################################################################################
 
 ifndef OPENJDK
-ifeq ($(OPENJDK_TARGET_OS), windows)
 
-  ACCESSBRIDGE_SRCDIR:=$(JDK_TOPDIR)/src/closed/windows/native/sun/bridge
+  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
 
-  define SetupAccessBridge
-    # Parameter 1 Suffix
-    # Parameter 2 Machine
-    # Parameter 3 ACCESSBRIDGE_ARCH_ suffix
+  LIBDCPR_CFLAGS := $(foreach dir, $(LIBDCPR_SRC_DIRS), -I$(dir)) \
+      -I$(JDK_TOPDIR)/src/share/native/sun/java2d/pipe
 
-    $(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)
+  $(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_JAWTACCESSBRIDGE$1): $(JDK_OUTPUTDIR)/lib/$(LIBRARY_PREFIX)jawt$(STATIC_LIBRARY_SUFFIX)
+  $(BUILD_LIBDCPR): $(BUILD_LIBJAVA)
 
-    $(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)
+  BUILD_LIBRARIES += $(BUILD_LIBDCPR)
 
-    $(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)
+endif
 
-    BUILD_LIBRARIES += $$(BUILD_JAWTACCESSBRIDGE$1) $$(BUILD_JAVAACCESSBRIDGE$1) \
-		       $$(BUILD_WINDOWSACCESSBRIDGE$1)
+##########################################################################################
 
-  endef
+$(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)))
 
-  ifeq ($(OPENJDK_TARGET_CPU_BITS),32)
-    $(eval $(call SetupAccessBridge,-32,I386,32))
-    $(eval $(call SetupAccessBridge,,I386,LEGACY))
-  else
-    $(eval $(call SetupAccessBridge,-64,X64,64))
+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
+
+##########################################################################################
+
+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
+
+##########################################################################################
+
+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
+
+
+  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
 
 
diff --git a/jdk/makefiles/CopyFiles.gmk b/jdk/makefiles/CopyFiles.gmk
index abdf354..0ad18ce 100644
--- a/jdk/makefiles/CopyFiles.gmk
+++ b/jdk/makefiles/CopyFiles.gmk
@@ -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,60 @@
 
 ##########################################################################################
 
-#make sure freetype dll will be available at runtime as well as link time
+# 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).
+# 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.
+# 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
+# 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
-        endif
+  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
     endif
+  endif
 
-    $(FREETYPE_LIB): $(FREETYPE2_LIB_PATH)/$(call SHARED_LIBRARY,freetype)
+  $(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
+        ifeq ($(OPENJDK_BUILD_OS), windows)
+	  $(CHMOD) +rx $@
+        endif
 
-    COPY_FILES += $(FREETYPE_LIB)
+  COPY_FILES += $(FREETYPE_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 +279,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 +294,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 +305,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 +317,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)
@@ -387,23 +386,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 +424,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 +523,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
diff --git a/jdk/makefiles/CopyIntoClasses.gmk b/jdk/makefiles/CopyIntoClasses.gmk
index 196ddb0..2eb496b 100644
--- a/jdk/makefiles/CopyIntoClasses.gmk
+++ b/jdk/makefiles/CopyIntoClasses.gmk
@@ -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
   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)))
diff --git a/jdk/makefiles/CopySamples.gmk b/jdk/makefiles/CopySamples.gmk
index 1f6b3bf..10d084a 100644
--- a/jdk/makefiles/CopySamples.gmk
+++ b/jdk/makefiles/CopySamples.gmk
@@ -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
diff --git a/jdk/makefiles/CreateJars.gmk b/jdk/makefiles/CreateJars.gmk
index abef9a6..05c88da 100644
--- a/jdk/makefiles/CreateJars.gmk
+++ b/jdk/makefiles/CreateJars.gmk
@@ -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,128 @@
 # This value should exclude types destined for jars other than rt.jar and resources.jar.
 # When building a Profile this value augments the profile specific exclusions
 RT_JAR_EXCLUDES += \
-	com/oracle/security \
-	com/sun/codemodel \
-	com/sun/crypto/provider \
-	com/sun/istack/internal/tools \
-	com/sun/jarsigner \
-	com/sun/java/accessibility \
-	com/sun/javadoc \
-	com/sun/jdi \
-	com/sun/net/ssl/internal/ssl \
-	com/sun/source \
-	com/sun/tools \
-	com/sun/xml/internal/dtdparser \
-	com/sun/xml/internal/rngom \
-	com/sun/xml/internal/xsom \
-	javax/crypto \
-	javax/swing/AbstractButtonBeanInfo.class \
-	javax/swing/beaninfo \
-	javax/swing/BoxBeanInfo.class \
-	javax/swing/JAppletBeanInfo.class \
-	javax/swing/JButtonBeanInfo.class \
-	javax/swing/JCheckBoxBeanInfo.class \
-	javax/swing/JCheckBoxMenuItemBeanInfo.class \
-	javax/swing/JColorChooserBeanInfo.class \
-	javax/swing/JComboBoxBeanInfo.class \
-	javax/swing/JComponentBeanInfo.class \
-	javax/swing/JDesktopPaneBeanInfo.class \
-	javax/swing/JDialogBeanInfo.class \
-	javax/swing/JEditorPaneBeanInfo.class \
-	javax/swing/JFileChooserBeanInfo.class \
-	javax/swing/JFormattedTextFieldBeanInfo.class \
-	javax/swing/JFrameBeanInfo.class \
-	javax/swing/JInternalFrameBeanInfo.class \
-	javax/swing/JLabelBeanInfo.class \
-	javax/swing/JLayeredPaneBeanInfo.class \
-	javax/swing/JListBeanInfo.class \
-	javax/swing/JMenuBarBeanInfo.class \
-	javax/swing/JMenuBeanInfo.class \
-	javax/swing/JMenuItemBeanInfo.class \
-	javax/swing/JOptionPaneBeanInfo.class \
-	javax/swing/JPanelBeanInfo.class \
-	javax/swing/JPasswordFieldBeanInfo.class \
-	javax/swing/JPopupMenuBeanInfo.class \
-	javax/swing/JProgressBarBeanInfo.class \
-	javax/swing/JRadioButtonBeanInfo.class \
-	javax/swing/JRadioButtonMenuItemBeanInfo.class \
-	javax/swing/JScrollBarBeanInfo.class \
-	javax/swing/JScrollPaneBeanInfo.class \
-	javax/swing/JSeparatorBeanInfo.class \
-	javax/swing/JSliderBeanInfo.class \
-	javax/swing/JSpinnerBeanInfo.class \
-	javax/swing/JSplitPaneBeanInfo.class \
-	javax/swing/JTabbedPaneBeanInfo.class \
-	javax/swing/JTableBeanInfo.class \
-	javax/swing/JTextAreaBeanInfo.class \
-	javax/swing/JTextFieldBeanInfo.class \
-	javax/swing/JTextPaneBeanInfo.class \
-	javax/swing/JToggleButtonBeanInfo.class \
-	javax/swing/JToolBarBeanInfo.class \
-	javax/swing/JTreeBeanInfo.class \
-	javax/swing/JWindowBeanInfo.class \
-	javax/swing/SwingBeanInfoBase.class \
-	javax/swing/text/JTextComponentBeanInfo.class \
-	META-INF/services/com.sun.jdi.connect.Connector \
-	META-INF/services/com.sun.jdi.connect.spi.TransportService \
-	META-INF/services/com.sun.tools.attach.spi.AttachProvider \
-	META-INF/services/com.sun.tools.xjc.Plugin \
-	META-INF/services/sun.net.spi.nameservice.NameServiceDescriptor \
-	org/relaxng/datatype \
-	sun/awt/HKSCS.class \
-	sun/awt/motif/X11GB2312.class \
-	sun/awt/motif/X11GB2312\$$$$Decoder.class \
-	sun/awt/motif/X11GB2312\$$$$Encoder.class \
-	sun/awt/motif/X11GBK.class \
-	sun/awt/motif/X11GBK\$$$$Encoder.class \
-	sun/awt/motif/X11KSC5601.class \
-	sun/awt/motif/X11KSC5601\$$$$Decoder.class \
-	sun/awt/motif/X11KSC5601\$$$$Encoder.class \
-	sun/jvmstat \
-	sun/net/spi/nameservice/dns \
-	sun/nio/cs/ext \
-	sun/rmi/rmic \
-	sun/security/ec \
-	sun/security/internal \
-	sun/security/mscapi \
-	sun/security/pkcs11 \
-	sun/security/provider/Sun.class \
-	sun/security/rsa/SunRsaSign.class \
-	sun/security/ssl \
-	sun/security/tools/jarsigner \
-	sun/swing/BeanInfoUtils.class \
-	sun/text/resources/cldr \
-	sun/tools/asm \
-	sun/tools/attach \
-	sun/tools/java \
-	sun/tools/javac \
-	sun/tools/jcmd \
-	sun/tools/jconsole \
-	sun/tools/jinfo \
-	sun/tools/jmap \
-	sun/tools/jps \
-	sun/tools/jstack \
-	sun/tools/jstat \
-	sun/tools/jstatd \
-	sun/tools/native2ascii \
-	sun/tools/serialver \
-	sun/tools/tree \
-	sun/tools/util \
-	sun/util/cldr/CLDRLocaleDataMetaInfo.class \
-	sun/util/resources/cldr \
-	$(LOCALEDATA_INCLUDES) \
-	com/oracle/jrockit/jfr \
-	oracle/jrockit/jfr \
-	jdk/jfr
+    com/oracle/security \
+    com/sun/codemodel \
+    com/sun/crypto/provider \
+    com/sun/istack/internal/tools \
+    com/sun/jarsigner \
+    com/sun/java/accessibility \
+    com/sun/javadoc \
+    com/sun/jdi \
+    com/sun/net/ssl/internal/ssl \
+    com/sun/source \
+    com/sun/tools \
+    com/sun/xml/internal/dtdparser \
+    com/sun/xml/internal/rngom \
+    com/sun/xml/internal/xsom \
+    javax/crypto \
+    javax/swing/AbstractButtonBeanInfo.class \
+    javax/swing/beaninfo \
+    javax/swing/BoxBeanInfo.class \
+    javax/swing/JAppletBeanInfo.class \
+    javax/swing/JButtonBeanInfo.class \
+    javax/swing/JCheckBoxBeanInfo.class \
+    javax/swing/JCheckBoxMenuItemBeanInfo.class \
+    javax/swing/JColorChooserBeanInfo.class \
+    javax/swing/JComboBoxBeanInfo.class \
+    javax/swing/JComponentBeanInfo.class \
+    javax/swing/JDesktopPaneBeanInfo.class \
+    javax/swing/JDialogBeanInfo.class \
+    javax/swing/JEditorPaneBeanInfo.class \
+    javax/swing/JFileChooserBeanInfo.class \
+    javax/swing/JFormattedTextFieldBeanInfo.class \
+    javax/swing/JFrameBeanInfo.class \
+    javax/swing/JInternalFrameBeanInfo.class \
+    javax/swing/JLabelBeanInfo.class \
+    javax/swing/JLayeredPaneBeanInfo.class \
+    javax/swing/JListBeanInfo.class \
+    javax/swing/JMenuBarBeanInfo.class \
+    javax/swing/JMenuBeanInfo.class \
+    javax/swing/JMenuItemBeanInfo.class \
+    javax/swing/JOptionPaneBeanInfo.class \
+    javax/swing/JPanelBeanInfo.class \
+    javax/swing/JPasswordFieldBeanInfo.class \
+    javax/swing/JPopupMenuBeanInfo.class \
+    javax/swing/JProgressBarBeanInfo.class \
+    javax/swing/JRadioButtonBeanInfo.class \
+    javax/swing/JRadioButtonMenuItemBeanInfo.class \
+    javax/swing/JScrollBarBeanInfo.class \
+    javax/swing/JScrollPaneBeanInfo.class \
+    javax/swing/JSeparatorBeanInfo.class \
+    javax/swing/JSliderBeanInfo.class \
+    javax/swing/JSpinnerBeanInfo.class \
+    javax/swing/JSplitPaneBeanInfo.class \
+    javax/swing/JTabbedPaneBeanInfo.class \
+    javax/swing/JTableBeanInfo.class \
+    javax/swing/JTextAreaBeanInfo.class \
+    javax/swing/JTextFieldBeanInfo.class \
+    javax/swing/JTextPaneBeanInfo.class \
+    javax/swing/JToggleButtonBeanInfo.class \
+    javax/swing/JToolBarBeanInfo.class \
+    javax/swing/JTreeBeanInfo.class \
+    javax/swing/JWindowBeanInfo.class \
+    javax/swing/SwingBeanInfoBase.class \
+    javax/swing/text/JTextComponentBeanInfo.class \
+    META-INF/services/com.sun.jdi.connect.Connector \
+    META-INF/services/com.sun.jdi.connect.spi.TransportService \
+    META-INF/services/com.sun.tools.attach.spi.AttachProvider \
+    META-INF/services/com.sun.tools.xjc.Plugin \
+    META-INF/services/sun.net.spi.nameservice.NameServiceDescriptor \
+    org/relaxng/datatype \
+    sun/awt/HKSCS.class \
+    sun/awt/motif/X11GB2312.class \
+    sun/awt/motif/X11GB2312\$$$$Decoder.class \
+    sun/awt/motif/X11GB2312\$$$$Encoder.class \
+    sun/awt/motif/X11GBK.class \
+    sun/awt/motif/X11GBK\$$$$Encoder.class \
+    sun/awt/motif/X11KSC5601.class \
+    sun/awt/motif/X11KSC5601\$$$$Decoder.class \
+    sun/awt/motif/X11KSC5601\$$$$Encoder.class \
+    sun/jvmstat \
+    sun/net/spi/nameservice/dns \
+    sun/nio/cs/ext \
+    sun/rmi/rmic \
+    sun/security/ec \
+    sun/security/internal \
+    sun/security/mscapi \
+    sun/security/pkcs11 \
+    sun/security/provider/Sun.class \
+    sun/security/rsa/SunRsaSign.class \
+    sun/security/ssl \
+    sun/security/tools/jarsigner \
+    sun/swing/BeanInfoUtils.class \
+    sun/text/resources/cldr \
+    sun/tools/asm \
+    sun/tools/attach \
+    sun/tools/java \
+    sun/tools/javac \
+    sun/tools/jcmd \
+    sun/tools/jconsole \
+    sun/tools/jinfo \
+    sun/tools/jmap \
+    sun/tools/jps \
+    sun/tools/jstack \
+    sun/tools/jstat \
+    sun/tools/jstatd \
+    sun/tools/native2ascii \
+    sun/tools/serialver \
+    sun/tools/tree \
+    sun/tools/util \
+    sun/util/cldr/CLDRLocaleDataMetaInfo.class \
+    sun/util/resources/cldr \
+    $(LOCALEDATA_INCLUDES) \
+    com/oracle/jrockit/jfr \
+    oracle/jrockit/jfr \
+    jdk/jfr
 
 ifeq ($(OPENJDK_TARGET_OS), macosx)
-        RT_JAR_EXCLUDES += com/sun/nio/sctp \
-                           sun/nio/ch/sctp
+  RT_JAR_EXCLUDES += com/sun/nio/sctp \
+      sun/nio/ch/sctp
 endif
 
 # 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 +231,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 +241,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 +252,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 +286,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 +322,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 +429,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 +450,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 +477,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 +501,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 +530,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 +544,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 +573,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 +613,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 +627,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 +655,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 +821,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 +831,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 +846,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 +902,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,85 +916,76 @@
 $(IMAGES_OUTPUTDIR)/src.zip: $(LAUNCHER_ZIP_SRC)
 
 # This dir needs to exist before macro is evaluated to avoid warning from find.
-$(eval $(call MakeDir,$(IMAGES_OUTPUTDIR)/src))
-$(eval $(call SetupZipArchive,BUILD_SRC_ZIP,\
-		SRC:=$(SRC_ZIP_SRCS) $(IMAGES_OUTPUTDIR)/src,\
-		INCLUDES:=$(SRC_ZIP_INCLUDES) launcher,\
-		EXCLUDES:=javax/swing/beaninfo,\
-		SUFFIXES:=.java .c .h,\
-		ZIP:=$(IMAGES_OUTPUTDIR)/src.zip,\
-		EXTRA_DEPS:=$(LAUNCHER_ZIP_SRC)))
+$(eval $(call MakeDir, $(IMAGES_OUTPUTDIR)/src))
+$(eval $(call SetupZipArchive,BUILD_SRC_ZIP, \
+    SRC := $(SRC_ZIP_SRCS) $(IMAGES_OUTPUTDIR)/src, \
+    INCLUDES := $(SRC_ZIP_INCLUDES) launcher, \
+    EXCLUDES := javax/swing/beaninfo, \
+    SUFFIXES := .java .c .h, \
+    ZIP := $(IMAGES_OUTPUTDIR)/src.zip, \
+    EXTRA_DEPS := $(LAUNCHER_ZIP_SRC)))
 
 ##########################################################################################
 
 ifndef OPENJDK
-ifeq ($(OPENJDK_TARGET_OS), windows)
+  ifeq ($(OPENJDK_TARGET_OS), windows)
 
-    $(eval $(call SetupArchive,BUILD_JACCESS_JAR,,\
-		SRCS:=$(JDK_OUTPUTDIR)/classes,\
-		INCLUDES:=com/sun/java/accessibility/util,\
-		JAR:=$(IMAGES_OUTPUTDIR)/lib/ext/jaccess.jar,\
-		SKIP_METAINF:=true))
+    $(eval $(call SetupArchive,BUILD_JACCESS_JAR, , \
+        SRCS := $(JDK_OUTPUTDIR)/classes, \
+        INCLUDES := com/sun/java/accessibility/util, \
+        JAR := $(IMAGES_OUTPUTDIR)/lib/ext/jaccess.jar, \
+        SKIP_METAINF := true))
 
     JARS += $(IMAGES_OUTPUTDIR)/lib/ext/jaccess.jar
 
     ifeq ($(OPENJDK_TARGET_CPU_BITS), 32)
-        $(eval $(call SetupArchive,BUILD_ACCESSBRIDGE_32_JAR,,\
-		SRCS:=$(JDK_OUTPUTDIR)/classes_ab/32bit,\
-		INCLUDES:=com/sun/java/accessibility,\
-		JAR:=$(IMAGES_OUTPUTDIR)/lib/ext/access-bridge-32.jar,\
-		SKIP_METAINF:=true))
+      $(eval $(call SetupArchive,BUILD_ACCESSBRIDGE_32_JAR, , \
+          SRCS := $(JDK_OUTPUTDIR)/classes_ab/32bit, \
+          INCLUDES := com/sun/java/accessibility, \
+          JAR := $(IMAGES_OUTPUTDIR)/lib/ext/access-bridge-32.jar, \
+          SKIP_METAINF := true))
 
-        $(eval $(call SetupArchive,BUILD_ACCESSBRIDGE_LEGACY_JAR,,\
-		SRCS:=$(JDK_OUTPUTDIR)/classes_ab/legacy,\
-		INCLUDES:=com/sun/java/accessibility,\
-		JAR:=$(IMAGES_OUTPUTDIR)/lib/ext/access-bridge.jar,\
-		SKIP_METAINF:=true))
+      $(eval $(call SetupArchive,BUILD_ACCESSBRIDGE_LEGACY_JAR, , \
+          SRCS := $(JDK_OUTPUTDIR)/classes_ab/legacy, \
+          INCLUDES := com/sun/java/accessibility, \
+          JAR := $(IMAGES_OUTPUTDIR)/lib/ext/access-bridge.jar, \
+          SKIP_METAINF := true))
 
-        JARS += $(IMAGES_OUTPUTDIR)/lib/ext/access-bridge-32.jar \
-		$(IMAGES_OUTPUTDIR)/lib/ext/access-bridge.jar
+      JARS += $(IMAGES_OUTPUTDIR)/lib/ext/access-bridge-32.jar \
+          $(IMAGES_OUTPUTDIR)/lib/ext/access-bridge.jar
     else
-        $(eval $(call SetupArchive,BUILD_ACCESSBRIDGE_64_JAR,,\
-		SRCS:=$(JDK_OUTPUTDIR)/classes_ab/64bit,\
-		INCLUDES:=com/sun/java/accessibility,\
-		JAR:=$(IMAGES_OUTPUTDIR)/lib/ext/access-bridge-64.jar,\
-		SKIP_METAINF:=true))
+      $(eval $(call SetupArchive,BUILD_ACCESSBRIDGE_64_JAR, , \
+          SRCS := $(JDK_OUTPUTDIR)/classes_ab/64bit, \
+          INCLUDES := com/sun/java/accessibility, \
+          JAR := $(IMAGES_OUTPUTDIR)/lib/ext/access-bridge-64.jar, \
+          SKIP_METAINF := true))
 
-        JARS += $(IMAGES_OUTPUTDIR)/lib/ext/access-bridge-64.jar
+      JARS += $(IMAGES_OUTPUTDIR)/lib/ext/access-bridge-64.jar
     endif
-endif
+  endif
 endif
 
 ##########################################################################################
 
 #
 # This is an empty jar (only contains manifest) and fits poorly into framework...
-#   create simple rule instead
+# create simple rule instead
 #
-$(IMAGES_OUTPUTDIR)/lib/management-agent.jar : $(JDK_TOPDIR)/src/share/classes/sun/management/manifest
+$(IMAGES_OUTPUTDIR)/lib/management-agent.jar: $(JDK_TOPDIR)/src/share/classes/sun/management/manifest
 	$(JAR) cfm $@ $<
 
 ##########################################################################################
 
-$(IMAGES_OUTPUTDIR)/lib/ext/zipfs.jar : $(JDK_OUTPUTDIR)/demo/nio/zipfs/zipfs.jar
+$(IMAGES_OUTPUTDIR)/lib/ext/zipfs.jar: $(JDK_OUTPUTDIR)/demo/nio/zipfs/zipfs.jar
 	$(install-file)
 
 ##########################################################################################
 
-ifeq ($(OPENJDK_TARGET_OS),macosx)
-    $(eval $(call SetupArchive,BUILD_JOBJC_JAR,,\
-		SRCS:=$(JDK_OUTPUTDIR)/jobjc_classes,\
-		JAR:=$(IMAGES_OUTPUTDIR)/lib/JObjC.jar, \
-		JARINDEX:=true))
-endif
-
-##########################################################################################
-
-ifndef OPENJDK
-    $(eval $(call SetupArchive,BUILD_ALT_RT_JAR,,\
-		SRCS:=$(JDK_OUTPUTDIR)/altclasses_classes,\
-		JAR:=$(IMAGES_OUTPUTDIR)/lib/alt-rt.jar))
-
+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
 
 ##########################################################################################
@@ -1009,25 +1000,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
 
@@ -1035,30 +1026,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
 
 ##########################################################################################
diff --git a/jdk/makefiles/GenerateClasses.gmk b/jdk/makefiles/GenerateClasses.gmk
index 3ee2a05..4c68353 100644
--- a/jdk/makefiles/GenerateClasses.gmk
+++ b/jdk/makefiles/GenerateClasses.gmk
@@ -30,64 +30,64 @@
 include RMICompilation.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  
+# when available, we need to run with latest rmic version available.
+ifneq ($(COMPILE_TYPE), cross)
+  RMIC := $(FIXPATH) $(JDK_OUTPUTDIR)/bin/rmic
+endif
 
 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))
 
 ##########################################################################################
 
diff --git a/jdk/makefiles/GenerateData.gmk b/jdk/makefiles/GenerateData.gmk
index f35cf32..f4739ee 100644
--- a/jdk/makefiles/GenerateData.gmk
+++ b/jdk/makefiles/GenerateData.gmk
@@ -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
diff --git a/jdk/makefiles/GenerateJavaSources.gmk b/jdk/makefiles/GenerateSources.gmk
similarity index 77%
rename from jdk/makefiles/GenerateJavaSources.gmk
rename to jdk/makefiles/GenerateSources.gmk
index 7bc0598..5246cc9 100644
--- a/jdk/makefiles/GenerateJavaSources.gmk
+++ b/jdk/makefiles/GenerateSources.gmk
@@ -38,57 +38,57 @@
 # Now include all the rules that generate Java sources.
 # The Java sources are written into the gensrc_.... directories.
 
-include GensrcProperties.gmk
+include gensrc/GensrcProperties.gmk
 GENSRC += $(GENSRC_PROPERTIES)
 
-include GensrcLocaleDataMetaInfo.gmk
+include gensrc/GensrcLocaleDataMetaInfo.gmk
 GENSRC += $(GENSRC_LOCALEDATAMETAINFO)
 
-include GensrcCharacterData.gmk
+include gensrc/GensrcCharacterData.gmk
 GENSRC += $(GENSRC_CHARACTERDATA)
 
-include GensrcJDWP.gmk
+include gensrc/GensrcJDWP.gmk
 GENSRC += $(GENSRC_JDWP)
 
-include GensrcMisc.gmk
+include gensrc/GensrcMisc.gmk
 GENSRC += $(GENSRC_MISC)
 
-include GensrcCharsetMapping.gmk
+include gensrc/GensrcCharsetMapping.gmk
 GENSRC += $(GENSRC_CHARSETMAPPING)
 
-include GensrcCharsetCoder.gmk
+include gensrc/GensrcCharsetCoder.gmk
 GENSRC += $(GENSRC_CHARSETCODER)
 
-include GensrcBuffer.gmk
+include gensrc/GensrcBuffer.gmk
 GENSRC += $(GENSRC_BUFFER)
 
-include GensrcExceptions.gmk
+include gensrc/GensrcExceptions.gmk
 GENSRC += $(GENSRC_EXCEPTIONS)
 
-ifneq ($(OPENJDK_TARGET_OS),windows)
-include GensrcIcons.gmk
+ifneq ($(OPENJDK_TARGET_OS), windows)
+include gensrc/GensrcIcons.gmk
 GENSRC += $(GENSRC_AWT_ICONS)
 
-ifeq ($(OPENJDK_TARGET_OS),macosx)
+ifeq ($(OPENJDK_TARGET_OS), macosx)
 GENSRC += $(GENSRC_OSX_ICONS)
 endif
 
-include GensrcX11Wrappers.gmk
+include gensrc/GensrcX11Wrappers.gmk
 GENSRC += $(GENSRC_X11WRAPPERS)
 endif
 
-include GensrcCLDR.gmk
+include gensrc/GensrcCLDR.gmk
 GENSRC += $(GENSRC_CLDR)
 
-include GensrcSwing.gmk
+include gensrc/GensrcSwing.gmk
 GENSRC += $(GENSRC_SWING_BEANINFO) $(GENSRC_SWING_NIMBUS)
 
 ifeq ($(OPENJDK_TARGET_OS), macosx)
-     include GensrcJObjC.gmk
-     GENSRC += $(GENSRC_JOBJC)
+  include gensrc/GensrcJObjC.gmk
+  GENSRC += $(GENSRC_JOBJC)
 endif
 
-$(GENSRC) : $(BUILD_TOOLS)
+$(GENSRC): $(BUILD_TOOLS)
 
 all: $(GENSRC)
 
diff --git a/jdk/makefiles/GensrcBuffer.gmk b/jdk/makefiles/GensrcBuffer.gmk
deleted file mode 100644
index 55b51d0..0000000
--- a/jdk/makefiles/GensrcBuffer.gmk
+++ /dev/null
@@ -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)
diff --git a/jdk/makefiles/GensrcCharsetCoder.gmk b/jdk/makefiles/GensrcCharsetCoder.gmk
deleted file mode 100644
index 1ae7149..0000000
--- a/jdk/makefiles/GensrcCharsetCoder.gmk
+++ /dev/null
@@ -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)
diff --git a/jdk/makefiles/GensrcLocaleDataMetaInfo.gmk b/jdk/makefiles/GensrcLocaleDataMetaInfo.gmk
deleted file mode 100644
index 1577017..0000000
--- a/jdk/makefiles/GensrcLocaleDataMetaInfo.gmk
+++ /dev/null
@@ -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)
-
-###
diff --git a/jdk/makefiles/GensrcMisc.gmk b/jdk/makefiles/GensrcMisc.gmk
deleted file mode 100644
index d557499..0000000
--- a/jdk/makefiles/GensrcMisc.gmk
+++ /dev/null
@@ -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
-
-##########################################################################################
diff --git a/jdk/makefiles/GensrcProperties.gmk b/jdk/makefiles/GensrcProperties.gmk
deleted file mode 100644
index 1e29376..0000000
--- a/jdk/makefiles/GensrcProperties.gmk
+++ /dev/null
@@ -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)
diff --git a/jdk/makefiles/Images.gmk b/jdk/makefiles/Images.gmk
index 716616b..4626e36 100644
--- a/jdk/makefiles/Images.gmk
+++ b/jdk/makefiles/Images.gmk
@@ -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,88 @@
 ################################################################################
 # /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
 
 # 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 +318,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 +507,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 +517,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 +554,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 +629,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 +674,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 +732,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 +753,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
 
diff --git a/jdk/makefiles/Import.gmk b/jdk/makefiles/Import.gmk
index d25a182..8d74196 100644
--- a/jdk/makefiles/Import.gmk
+++ b/jdk/makefiles/Import.gmk
@@ -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,46 +114,46 @@
 #
 # 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) )
+    $(wildcard $(HOTSPOT_DIST)/jre/lib$(OPENJDK_TARGET_CPU_LIBDIR)/libjsig.diz) )
 
 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
+  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
+  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
+$(INSTALL_LIBRARIES_HERE)/server/%.debuginfo: $(INSTALL_LIBRARIES_HERE)/%.debuginfo
 	$(MKDIR) -p $(@D)
 	$(RM) $@
 	$(LN) -s ../$(@F) $@
 
-$(INSTALL_LIBRARIES_HERE)/server/%.diz : $(INSTALL_LIBRARIES_HERE)/%.diz
+$(INSTALL_LIBRARIES_HERE)/server/%.diz: $(INSTALL_LIBRARIES_HERE)/%.diz
 	$(MKDIR) -p $(@D)
 	$(RM) $@
 	$(RM) $@.tmp $(basename $@).debuginfo
@@ -162,17 +162,17 @@
 	$(RM) $(basename $@).debuginfo
 	$(MV) $@.tmp $@
 
-$(INSTALL_LIBRARIES_HERE)/client/%$(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) $@
 
-$(INSTALL_LIBRARIES_HERE)/client/%.debuginfo : $(INSTALL_LIBRARIES_HERE)/%.debuginfo
+$(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)/client/%.diz: $(INSTALL_LIBRARIES_HERE)/%.diz
 	$(MKDIR) -p $(@D)
 	$(RM) $@
 	$(RM) $@.tmp $(basename $@).debuginfo
@@ -181,17 +181,17 @@
 	$(RM) $(basename $@).debuginfo
 	$(MV) $@.tmp $@
 
-$(INSTALL_LIBRARIES_HERE)/minimal/%$(SHARED_LIBRARY_SUFFIX) : $(INSTALL_LIBRARIES_HERE)/%$(SHARED_LIBRARY_SUFFIX)
+$(INSTALL_LIBRARIES_HERE)/minimal/%$(SHARED_LIBRARY_SUFFIX): $(INSTALL_LIBRARIES_HERE)/%$(SHARED_LIBRARY_SUFFIX)
 	$(MKDIR) -p $(@D)
 	$(RM) $@
 	$(LN) -s ../$(@F) $@
 
-$(INSTALL_LIBRARIES_HERE)/minimal/%.debuginfo : $(INSTALL_LIBRARIES_HERE)/%.debuginfo
+$(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
+$(INSTALL_LIBRARIES_HERE)/minimal/%.diz: $(INSTALL_LIBRARIES_HERE)/%.diz
 	$(MKDIR) -p $(@D)
 	$(RM) $@
 	$(RM) $@.tmp $(basename $@).debuginfo
@@ -202,10 +202,10 @@
 
 ##########################################################################################
 # 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 +227,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
diff --git a/jdk/makefiles/Makefile b/jdk/makefiles/Makefile
index 9539fe0..c7d0dd0 100644
--- a/jdk/makefiles/Makefile
+++ b/jdk/makefiles/Makefile
@@ -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 ===================================================)
diff --git a/jdk/makefiles/PatchList.solaris b/jdk/makefiles/PatchList.solaris
index 173881e..8101c53 100644
--- a/jdk/makefiles/PatchList.solaris
+++ b/jdk/makefiles/PatchList.solaris
@@ -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"
-
diff --git a/jdk/makefiles/ProfileNames.gmk b/jdk/makefiles/ProfileNames.gmk
index b16e915..2e1e16e 100644
--- a/jdk/makefiles/ProfileNames.gmk
+++ b/jdk/makefiles/ProfileNames.gmk
@@ -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))
-
diff --git a/jdk/makefiles/Profiles.gmk b/jdk/makefiles/Profiles.gmk
index 9e79b2b..03702e5 100644
--- a/jdk/makefiles/Profiles.gmk
+++ b/jdk/makefiles/Profiles.gmk
@@ -40,8 +40,8 @@
 # imported (signed jars) rather than built.
 #
 # The incoming lists, eg PROFILE_1_JRE_JARS_FILES, are the jars to be
-# included in this profile. They have the jar name relative to the lib 
-# directory. We have to turn these into targets by adding the 
+# included in this profile. They have the jar name relative to the lib
+# directory. We have to turn these into targets by adding the
 # $(IMAGES_OUTPUTDIR)/lib prefix
 #
 # Note that some jars may be optional depending on the type of build (jdk vs.
@@ -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 := \
@@ -69,12 +69,8 @@
     $(addprefix $(IMAGES_OUTPUTDIR)/lib/, $(PROFILE_3_JRE_JAR_FILES)) \
     $(PROFILE_2_JARS)
 
-ifdef OPENJDK
-  FULL_JRE_JAR_FILES := $(filter-out alt-rt.jar, $(FULL_JRE_JAR_FILES))
-endif
-
 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 := \
@@ -87,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
-endif 
+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
 
 ###############################################################################
@@ -132,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))
@@ -172,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))
 
@@ -188,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
@@ -210,7 +206,7 @@
 
 ###############################################################################
 # Customization of rt.jar file contents
-# These are expressed as exclusions from everything found in the 
+# These are expressed as exclusions from everything found in the
 # JDK_OUTPUTDIR/classes directory
 ###############################################################################
 
@@ -231,8 +227,8 @@
 #
 # These are specific types that must be included within a package.
 # There are two cases:
-# - individual types in a package that is otherwise excluded at this 
-#   profile level. The only arises if there are split packages. 
+# - individual types in a package that is otherwise excluded at this
+#   profile level. The only arises if there are split packages.
 #
 # - A higher-level package is included in a high profile where a subpackage
 # is included in a lower profile. Including the package in the high profile
@@ -247,7 +243,7 @@
 # containing package is include. Again this occurs with split packges.
 #
 # So the exclude list for each profile consists of the include lists
-# for all profiles above it, together with any explicitly excluded types. 
+# for all profiles above it, together with any explicitly excluded types.
 # This is then combined with the overall RT_JAR_EXCLUDES list (which covers
 # things that go into other jar files).
 #
@@ -257,7 +253,7 @@
 # profile 3 includes the entire package, but it is harmless to add them
 # explicitly, and complex to determine if we still need to include them.
 #
-# Need a way to express: 
+# Need a way to express:
 #  for (int i = profile+1; i < 4; i++)
 #     RT_JAR_EXCLUDES += PROFILE_$i_RTJAR_INCLUDE_PACKAGES
 #
@@ -267,7 +263,7 @@
 #
 # These are META-INF/services/ entries found in resources.jar. Together
 # resources.jar and rt.jar hold the contents of the classes directory, (the
-# classes in rt.jar and everything else in resources.jar).Hence the 
+# classes in rt.jar and everything else in resources.jar).Hence the
 # include/exclude information for resources.jar is tied to that of rt.jar
 
 include profile-rtjar-includes.txt
@@ -276,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))
+  EXCLUDED_SERVICES := META-INF/services/javax.script.ScriptEngineFactory
+  PROFILE_INCLUDE_METAINF_SERVICES := $(filter-out $(EXCLUDED_SERVICES), $(PROFILE_INCLUDE_METAINF_SERVICES))
 endif
 
 
 endif # profile
-
diff --git a/jdk/makefiles/Setup.gmk b/jdk/makefiles/Setup.gmk
index 4da575f..f40ded5 100644
--- a/jdk/makefiles/Setup.gmk
+++ b/jdk/makefiles/Setup.gmk
@@ -23,40 +23,40 @@
 # 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
 
 # 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)))
+$(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)))
 
 # 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)))
diff --git a/jdk/makefiles/SignJars.gmk b/jdk/makefiles/SignJars.gmk
index 6e84d14..4e4233d 100644
--- a/jdk/makefiles/SignJars.gmk
+++ b/jdk/makefiles/SignJars.gmk
@@ -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
diff --git a/jdk/makefiles/Tools.gmk b/jdk/makefiles/Tools.gmk
index 9a7b299..9dc4af0 100644
--- a/jdk/makefiles/Tools.gmk
+++ b/jdk/makefiles/Tools.gmk
@@ -24,152 +24,151 @@
 #
 
 # Cache all finds needed for this file. Only used on windows.
-$(eval $(call FillCacheFind,$(JDK_TOPDIR)/make/tools \
+$(eval $(call FillCacheFind, $(JDK_TOPDIR)/make/tools \
     $(JDK_TOPDIR)/makefiles/sun))
 
-TOOLS_SRC:=$(JDK_TOPDIR)/make/tools/src \
-           $(JDK_TOPDIR)/makefiles/sun/awt/ \
-           $(JDK_TOPDIR)/makefiles/sun/osxapp \
-           $(JDK_TOPDIR)/make/tools/swing-beans
+TOOLS_SRC := $(JDK_TOPDIR)/make/tools/src \
+    $(JDK_TOPDIR)/makefiles/sun/awt/ \
+    $(JDK_TOPDIR)/makefiles/sun/osxapp \
+    $(JDK_TOPDIR)/make/tools/swing-beans
 
-ifneq ($(OPENJDK_TARGET_OS),windows)
-  TOOLS_SRC+=$(JDK_TOPDIR)/src/solaris/classes/sun/awt/X11/generator
+ifneq ($(OPENJDK_TARGET_OS), windows)
+  TOOLS_SRC += $(JDK_TOPDIR)/src/solaris/classes/sun/awt/X11/generator
 endif
 
 # The exception handling of swing beaninfo which have the own tool directory
-ifeq (,$(BUILD_TOOLS))
-$(eval $(call SetupJavaCompilation,BUILD_TOOLS,\
-                SETUP:=GENERATE_OLDBYTECODE,\
-		SRC:=$(TOOLS_SRC),\
-		BIN:=$(JDK_OUTPUTDIR)/btclasses))
-
+ifeq (, $(BUILD_TOOLS))
+  $(eval $(call SetupJavaCompilation,BUILD_TOOLS, \
+      SETUP := GENERATE_OLDBYTECODE, \
+      SRC := $(TOOLS_SRC), \
+      BIN := $(JDK_OUTPUTDIR)/btclasses))
 endif
 
-$(JDK_OUTPUTDIR)/btclasses/build/tools/generatenimbus/resources/%.template : \
-		$(JDK_TOPDIR)/src/share/classes/javax/swing/plaf/nimbus/%.template
+$(JDK_OUTPUTDIR)/btclasses/build/tools/generatenimbus/resources/%.template: \
+    $(JDK_TOPDIR)/src/share/classes/javax/swing/plaf/nimbus/%.template
 	$(call install-file)
 
-BUILD_TOOLS += $(foreach i,$(wildcard $(JDK_TOPDIR)/src/share/classes/javax/swing/plaf/nimbus/*.template),$(JDK_OUTPUTDIR)/btclasses/build/tools/generatenimbus/resources/$(notdir $i))
+BUILD_TOOLS += $(foreach i, $(wildcard $(JDK_TOPDIR)/src/share/classes/javax/swing/plaf/nimbus/*.template), $(JDK_OUTPUTDIR)/btclasses/build/tools/generatenimbus/resources/$(notdir $i))
 
 # Resources used by CheckDeps tool
-$(JDK_OUTPUTDIR)/btclasses/build/tools/deps/% : \
-		$(JDK_TOPDIR)/make/tools/src/build/tools/deps/%
+$(JDK_OUTPUTDIR)/btclasses/build/tools/deps/%: \
+    $(JDK_TOPDIR)/make/tools/src/build/tools/deps/%
 	$(call install-file)
 
 BUILD_TOOLS += $(JDK_OUTPUTDIR)/btclasses/build/tools/deps/refs.allowed
 
 # Add a checksum ("jsum") to the end of a text file. Prevents trivial tampering with class lists.
-TOOL_ADDJSUM=$(JAVA) -cp $(JDK_OUTPUTDIR)/btclasses \
-	build.tools.addjsum.AddJsum
+TOOL_ADDJSUM = $(JAVA) -cp $(JDK_OUTPUTDIR)/btclasses \
+    build.tools.addjsum.AddJsum
 
 # The buildmetaindex tool creates a meta-index to make core class loaders lazier.
-TOOL_BUILDMETAINDEX=$(JAVA) -cp $(JDK_OUTPUTDIR)/btclasses \
-	build.tools.buildmetaindex.BuildMetaIndex
+TOOL_BUILDMETAINDEX = $(JAVA) -cp $(JDK_OUTPUTDIR)/btclasses \
+    build.tools.buildmetaindex.BuildMetaIndex
 
 # The comment checker is not currently used. Should it be removed or added to javac?
-TOOL_COMMENTCHECKER=$(JAVA) -cp $(JDK_OUTPUTDIR)/btclasses \
-	build.tools.commentchecker.CommentChecker
+TOOL_COMMENTCHECKER = $(JAVA) -cp $(JDK_OUTPUTDIR)/btclasses \
+    build.tools.commentchecker.CommentChecker
 
-TOOL_COMPILEFONTCONFIG=$(JAVA) -cp $(JDK_OUTPUTDIR)/btclasses \
-	build.tools.compilefontconfig.CompileFontConfig
+TOOL_COMPILEFONTCONFIG = $(JAVA) -cp $(JDK_OUTPUTDIR)/btclasses \
+    build.tools.compilefontconfig.CompileFontConfig
 
-TOOL_COMPILEPROPERTIES=$(JAVA) -cp $(JDK_OUTPUTDIR)/btclasses \
-	build.tools.compileproperties.CompileProperties
+TOOL_COMPILEPROPERTIES = $(JAVA) -cp $(JDK_OUTPUTDIR)/btclasses \
+    build.tools.compileproperties.CompileProperties
 
-TOOL_STRIPPROPERTIES=$(JAVA) -cp $(JDK_OUTPUTDIR)/btclasses \
-	build.tools.stripproperties.StripProperties
+TOOL_STRIPPROPERTIES = $(JAVA) -cp $(JDK_OUTPUTDIR)/btclasses \
+    build.tools.stripproperties.StripProperties
 
-TOOL_JARREORDER=$(JAVA) -cp $(JDK_OUTPUTDIR)/btclasses \
-	build.tools.jarreorder.JarReorder
+TOOL_JARREORDER = $(JAVA) -cp $(JDK_OUTPUTDIR)/btclasses \
+    build.tools.jarreorder.JarReorder
 
-TOOL_GENERATECHARACTER=$(JAVA) -cp $(JDK_OUTPUTDIR)/btclasses \
-	build.tools.generatecharacter.GenerateCharacter
+TOOL_GENERATECHARACTER = $(JAVA) -cp $(JDK_OUTPUTDIR)/btclasses \
+    build.tools.generatecharacter.GenerateCharacter
 
-TOOL_CHARACTERNAME=$(JAVA) -cp $(JDK_OUTPUTDIR)/btclasses \
-	build.tools.generatecharacter.CharacterName
+TOOL_CHARACTERNAME = $(JAVA) -cp $(JDK_OUTPUTDIR)/btclasses \
+    build.tools.generatecharacter.CharacterName
 
-TOOL_DIRDIFF=$(JAVA) -cp $(JDK_OUTPUTDIR)/btclasses \
-	build.tools.dirdiff.DirDiff
+TOOL_DIRDIFF = $(JAVA) -cp $(JDK_OUTPUTDIR)/btclasses \
+    build.tools.dirdiff.DirDiff
 
-TOOL_DTDBUILDER=$(JAVA) -Ddtd_home=$(JDK_TOPDIR)/make/tools/dtdbuilder/dtds \
-	-cp $(JDK_OUTPUTDIR)/btclasses build.tools.dtdbuilder.DTDBuilder
+TOOL_DTDBUILDER = $(JAVA) -Ddtd_home=$(JDK_TOPDIR)/make/tools/dtdbuilder/dtds \
+    -cp $(JDK_OUTPUTDIR)/btclasses build.tools.dtdbuilder.DTDBuilder
 
-TOOL_GENERATEBREAKITERATORDATA=$(JAVA) \
-	-cp $(JDK_OUTPUTDIR)/btclasses \
-	build.tools.generatebreakiteratordata.GenerateBreakIteratorData
+TOOL_GENERATEBREAKITERATORDATA = $(JAVA) \
+    -cp $(JDK_OUTPUTDIR)/btclasses \
+    build.tools.generatebreakiteratordata.GenerateBreakIteratorData
 
-TOOL_GENERATECURRENCYDATA=$(JAVA) -cp $(JDK_OUTPUTDIR)/btclasses \
-	build.tools.generatecurrencydata.GenerateCurrencyData
+TOOL_GENERATECURRENCYDATA = $(JAVA) -cp $(JDK_OUTPUTDIR)/btclasses \
+    build.tools.generatecurrencydata.GenerateCurrencyData
 
-TOOL_HASHER=$(JAVA) -cp $(JDK_OUTPUTDIR)/btclasses \
-	build.tools.hasher.Hasher
+TOOL_HASHER = $(JAVA) -cp $(JDK_OUTPUTDIR)/btclasses \
+    build.tools.hasher.Hasher
 
 # Jarsplit used in jdk/makefiles/common/Release.gmk
-TOOL_JARSPLIT=$(JAVA) -cp $(JDK_OUTPUTDIR)/btclasses \
-	build.tools.jarsplit.JarSplit
+TOOL_JARSPLIT = $(JAVA) -cp $(JDK_OUTPUTDIR)/btclasses \
+    build.tools.jarsplit.JarSplit
 
-TOOL_TZDB=$(JAVA) -cp $(JDK_OUTPUTDIR)/btclasses \
-	build.tools.tzdb.TzdbZoneRulesCompiler
+TOOL_TZDB = $(JAVA) -cp $(JDK_OUTPUTDIR)/btclasses \
+    build.tools.tzdb.TzdbZoneRulesCompiler
 
 
-# TODO: There are references to the jdwpgen.jar in jdk/make/netbeans/jdwpgen/build.xml 
+# TODO: There are references to the jdwpgen.jar in jdk/make/netbeans/jdwpgen/build.xml
 # and nbproject/project.properties in the same dir. Needs to be looked at.
-TOOL_JDWPGEN=$(JAVA) -cp $(JDK_OUTPUTDIR)/btclasses build.tools.jdwpgen.Main
+TOOL_JDWPGEN = $(JAVA) -cp $(JDK_OUTPUTDIR)/btclasses build.tools.jdwpgen.Main
 
 # TODO: Lots of files in jdk/make/tools/CharsetMapping dir
-TOOL_CHARSETMAPPING=$(JAVA) -cp $(JDK_OUTPUTDIR)/btclasses \
-	build.tools.charsetmapping.Main
+TOOL_CHARSETMAPPING = $(JAVA) -cp $(JDK_OUTPUTDIR)/btclasses \
+    build.tools.charsetmapping.Main
 
-TOOL_SPP=$(JAVA) -cp $(JDK_OUTPUTDIR)/btclasses build.tools.spp.Spp
+TOOL_SPP = $(JAVA) -cp $(JDK_OUTPUTDIR)/btclasses build.tools.spp.Spp
 
 # TODO: Only referenced in jdk/make/tools/sharing/README.txt. Find out what it means.
-TOOL_MAKECLASSLIST=$(JAVA) -cp $(JDK_OUTPUTDIR)/btclasses \
-	build.tools.makeclasslist.MakeClasslist
+TOOL_MAKECLASSLIST = $(JAVA) -cp $(JDK_OUTPUTDIR)/btclasses \
+    build.tools.makeclasslist.MakeClasslist
 
 # Nimbus is used somewhere in the swing build.
-TOOL_GENERATENIMBUS=$(JAVA) -cp $(JDK_OUTPUTDIR)/btclasses \
-	build.tools.generatenimbus.Generator
+TOOL_GENERATENIMBUS = $(JAVA) -cp $(JDK_OUTPUTDIR)/btclasses \
+    build.tools.generatenimbus.Generator
 
-TOOL_WRAPPERGENERATOR=$(JAVA) -cp $(JDK_OUTPUTDIR)/btclasses \
-	WrapperGenerator
+TOOL_WRAPPERGENERATOR = $(JAVA) -cp $(JDK_OUTPUTDIR)/btclasses \
+    WrapperGenerator
 
-TOOL_AWT_TOBIN=$(JAVA) -Djava.awt.headless=true -cp $(JDK_OUTPUTDIR)/btclasses \
-	sun.awt.ToBin
+TOOL_AWT_TOBIN = $(JAVA) -Djava.awt.headless=true -cp $(JDK_OUTPUTDIR)/btclasses \
+    sun.awt.ToBin
 
-TOOL_OSX_TOBIN=$(JAVA) -Djava.awt.headless=true -cp $(JDK_OUTPUTDIR)/btclasses \
-	sun.osxapp.ToBin
+TOOL_OSX_TOBIN = $(JAVA) -Djava.awt.headless=true -cp $(JDK_OUTPUTDIR)/btclasses \
+    sun.osxapp.ToBin
 
-TOOL_CLDRCONVERTER=$(JAVA) -cp $(JDK_OUTPUTDIR)/btclasses \
-	build.tools.cldrconverter.CLDRConverter
+TOOL_CLDRCONVERTER = $(JAVA) -cp $(JDK_OUTPUTDIR)/btclasses \
+    build.tools.cldrconverter.CLDRConverter
 
-TOOL_REMOVEMETHODS=$(JAVA) -Xbootclasspath/p:$(LANGTOOLS_OUTPUTDIR)/dist/bootstrap/lib/javac.jar \
+TOOL_REMOVEMETHODS = $(JAVA) -Xbootclasspath/p:$(LANGTOOLS_OUTPUTDIR)/dist/bootstrap/lib/javac.jar \
     -cp $(JDK_OUTPUTDIR)/btclasses:$(JDK_OUTPUTDIR) \
-        build.tools.classfile.RemoveMethods
+    build.tools.classfile.RemoveMethods
 
-TOOL_CHECKDEPS=$(JAVA) -Xbootclasspath/p:$(LANGTOOLS_OUTPUTDIR)/dist/bootstrap/lib/javac.jar \
+TOOL_CHECKDEPS = $(JAVA) -Xbootclasspath/p:$(LANGTOOLS_OUTPUTDIR)/dist/bootstrap/lib/javac.jar \
     -cp $(JDK_OUTPUTDIR)/btclasses:$(JDK_OUTPUTDIR) \
-        build.tools.deps.CheckDeps
+    build.tools.deps.CheckDeps
 
 ##########################################################################################
 
 # 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))
+$(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))
diff --git a/jdk/makefiles/GendataBreakIterator.gmk b/jdk/makefiles/gendata/GendataBreakIterator.gmk
similarity index 66%
rename from jdk/makefiles/GendataBreakIterator.gmk
rename to jdk/makefiles/gendata/GendataBreakIterator.gmk
index fca47b3..b0f6253 100644
--- a/jdk/makefiles/GendataBreakIterator.gmk
+++ b/jdk/makefiles/gendata/GendataBreakIterator.gmk
@@ -29,16 +29,16 @@
 
 # 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.
+# 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
+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
@@ -46,53 +46,53 @@
 
 # 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. 
+# 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)))
+$(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
+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)/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)
+	$(MKDIR) -p $(DATA_PKG_DIR)
 	$(RM) $(BIFILES)
 	$(TOOL_GENERATEBREAKITERATORDATA) \
-		-o $(DATA_PKG_DIR) \
-		-spec $(UNICODEDATA)
+	    -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
+	$(MKDIR) -p $(DATA_PKG_DIR)/th
 	$(RM) $(BIFILES_TH)
 	$(TOOL_GENERATEBREAKITERATORDATA) \
-		-o $(DATA_PKG_DIR) \
-		-spec $(UNICODEDATA) \
-		-language th
+	    -o $(DATA_PKG_DIR) \
+	    -spec $(UNICODEDATA) \
+	    -language th
 	$(TOUCH) $@
 
 
diff --git a/jdk/makefiles/GendataFontConfig.gmk b/jdk/makefiles/gendata/GendataFontConfig.gmk
similarity index 74%
rename from jdk/makefiles/GendataFontConfig.gmk
rename to jdk/makefiles/gendata/GendataFontConfig.gmk
index 08d30fa..4ee52db 100644
--- a/jdk/makefiles/GendataFontConfig.gmk
+++ b/jdk/makefiles/gendata/GendataFontConfig.gmk
@@ -26,53 +26,53 @@
 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 := 
+  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   := \
+    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 := 
+    # useful for some highly specialized Linux distributions
+    GENDATA_FONT_CONFIG_SRC_FILES :=
   else
-    GENDATA_FONT_CONFIG_SRC_DIR   := \
+    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
+        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    := \
+  GENDATA_FONT_CONFIG_SRC_DIR := \
       $(JDK_TOPDIR)/src/solaris/classes/sun/awt/fontconfigs
-  GENDATA_FONT_CONFIG_SRC_FILES  := fontconfig.properties
+  GENDATA_FONT_CONFIG_SRC_FILES := fontconfig.properties
   GENDATA_FONT_CONFIG_SRC_PREFIX := solaris.
 endif
 
 ifeq ($(OPENJDK_TARGET_OS), macosx)
-  GENDATA_FONT_CONFIG_SRC_DIR    := \
+  GENDATA_FONT_CONFIG_SRC_DIR := \
       $(JDK_TOPDIR)/src/macosx/classes/sun/awt/fontconfigs
-  GENDATA_FONT_CONFIG_SRC_FILES  := fontconfig.properties
+  GENDATA_FONT_CONFIG_SRC_FILES := fontconfig.properties
   GENDATA_FONT_CONFIG_SRC_PREFIX := macosx.
 endif
 
 ###
 
-$(GENDATA_FONT_CONFIG_DST)/%.src : \
+$(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_DST)/%.bfc: \
     $(GENDATA_FONT_CONFIG_SRC_DIR)/$(GENDATA_FONT_CONFIG_SRC_PREFIX)%.properties
 	$(MKDIR) -p $(@D)
 	$(RM) $@
@@ -87,4 +87,3 @@
 GENDATA_FONT_CONFIG := $(GENDATA_FONT_CONFIGS) $(GENDATA_BFONT_CONFIGS)
 
 ###
-
diff --git a/jdk/makefiles/GendataHtml32dtd.gmk b/jdk/makefiles/gendata/GendataHtml32dtd.gmk
similarity index 98%
rename from jdk/makefiles/GendataHtml32dtd.gmk
rename to jdk/makefiles/gendata/GendataHtml32dtd.gmk
index 45a705d..efa596e 100644
--- a/jdk/makefiles/GendataHtml32dtd.gmk
+++ b/jdk/makefiles/gendata/GendataHtml32dtd.gmk
@@ -23,7 +23,7 @@
 # questions.
 #
 
-GENDATA_HTML32DTD := 
+GENDATA_HTML32DTD :=
 
 HTML32DTD = $(JDK_OUTPUTDIR)/classes/javax/swing/text/html/parser/html32.bdtd
 $(HTML32DTD): $(BUILD_TOOLS)
diff --git a/jdk/makefiles/GendataTZDB.gmk b/jdk/makefiles/gendata/GendataTZDB.gmk
similarity index 97%
rename from jdk/makefiles/GendataTZDB.gmk
rename to jdk/makefiles/gendata/GendataTZDB.gmk
index 802b3e5..46ef698 100644
--- a/jdk/makefiles/GendataTZDB.gmk
+++ b/jdk/makefiles/gendata/GendataTZDB.gmk
@@ -34,7 +34,7 @@
 
 GENDATA_TZDB_DAT := $(JDK_OUTPUTDIR)/lib/tzdb.dat
 
-$(GENDATA_TZDB_DAT) : $(TZDATA_TZFILES)
+$(GENDATA_TZDB_DAT): $(TZDATA_TZFILES)
 	$(RM) $(GENDATA_TZDB_DAT)
 	$(TOOL_TZDB) -srcdir $(TZDATA_DIR) -dstfile $(GENDATA_TZDB_DAT) $(TZDATA_TZFILE)
 
diff --git a/jdk/makefiles/GendataTimeZone.gmk b/jdk/makefiles/gendata/GendataTimeZone.gmk
similarity index 94%
rename from jdk/makefiles/GendataTimeZone.gmk
rename to jdk/makefiles/gendata/GendataTimeZone.gmk
index 1a482dc..f78c14f 100644
--- a/jdk/makefiles/GendataTimeZone.gmk
+++ b/jdk/makefiles/gendata/GendataTimeZone.gmk
@@ -43,9 +43,9 @@
     $(addprefix $(JDK_TOPDIR)/make/sun/javazic/tzdata/,$(TZFILE0)) \
     $(addprefix $(JDK_TOPDIR)/make/sun/javazic/tzdata_jdk/,$(TZFILE1))
 
-GENDATA_TIMEZONE_MAPFILE:=ZoneInfoMappings
+GENDATA_TIMEZONE_MAPFILE := ZoneInfoMappings
 
-$(GENDATA_TIMEZONE_DST)/$(GENDATA_TIMEZONE_MAPFILE) : $(TZFILES)
+$(GENDATA_TIMEZONE_DST)/$(GENDATA_TIMEZONE_MAPFILE): $(TZFILES)
 	$(RM) -r $(GENDATA_TIMEZONE_TMP)
 	$(MKDIR) -p $(GENDATA_TIMEZONE_TMP)
 	$(RM) -r $(GENDATA_TIMEZONE_DST)
diff --git a/jdk/makefiles/gensrc/GensrcBuffer.gmk b/jdk/makefiles/gensrc/GensrcBuffer.gmk
new file mode 100644
index 0000000..1d0fe98
--- /dev/null
+++ b/jdk/makefiles/gensrc/GensrcBuffer.gmk
@@ -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)
diff --git a/jdk/makefiles/GensrcCLDR.gmk b/jdk/makefiles/gensrc/GensrcCLDR.gmk
similarity index 93%
rename from jdk/makefiles/GensrcCLDR.gmk
rename to jdk/makefiles/gensrc/GensrcCLDR.gmk
index a86c122..dd66f93 100644
--- a/jdk/makefiles/GensrcCLDR.gmk
+++ b/jdk/makefiles/gensrc/GensrcCLDR.gmk
@@ -31,8 +31,8 @@
 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)
+    $(wildcard $(CLDRSRCDIR)/common/main/*.xml) \
+    $(wildcard $(CLDRSRCDIR)/common/supplemental/*.xml)
 	$(MKDIR) -p $(@D)
 	$(TOOL_CLDRCONVERTER) -base $(CLDRSRCDIR) -o $(GENSRC_DIR)
 
diff --git a/jdk/makefiles/GensrcCharacterData.gmk b/jdk/makefiles/gensrc/GensrcCharacterData.gmk
similarity index 61%
rename from jdk/makefiles/GensrcCharacterData.gmk
rename to jdk/makefiles/gensrc/GensrcCharacterData.gmk
index f64edba..2c6cc7a 100644
--- a/jdk/makefiles/GensrcCharacterData.gmk
+++ b/jdk/makefiles/gensrc/GensrcCharacterData.gmk
@@ -24,41 +24,41 @@
 #
 
 #
-# Rules to create $(JDK_OUTPUTDIR)/gensrc/sun/lang/CharacterData*.java 
+# Rules to create $(JDK_OUTPUTDIR)/gensrc/sun/lang/CharacterData*.java
 #
 
-GENSRC_CHARACTERDATA:=
+GENSRC_CHARACTERDATA :=
 
 CHARACTERDATA = $(JDK_TOPDIR)/make/tools/GenerateCharacter
-UNICODEDATA   = $(JDK_TOPDIR)/make/tools/UnicodeData
+UNICODEDATA = $(JDK_TOPDIR)/make/tools/UnicodeData
 
 define SetupCharacterData
-    $(JDK_OUTPUTDIR)/gensrc/java/lang/$1.java : $(CHARACTERDATA)/$1.java.template $(BUILD_TOOLS)
+  $(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
+	    -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
+  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))
+$(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
+$(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
+    $(JDK_OUTPUTDIR)/gensrc/java/lang/CharacterDataPrivateUse.java
 
-$(GENSRC_CHARACTERDATA) : $(BUILD_TOOLS)
+$(GENSRC_CHARACTERDATA): $(BUILD_TOOLS)
diff --git a/jdk/makefiles/gensrc/GensrcCharsetCoder.gmk b/jdk/makefiles/gensrc/GensrcCharsetCoder.gmk
new file mode 100644
index 0000000..524c76d
--- /dev/null
+++ b/jdk/makefiles/gensrc/GensrcCharsetCoder.gmk
@@ -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)
diff --git a/jdk/makefiles/GensrcCharsetMapping.gmk b/jdk/makefiles/gensrc/GensrcCharsetMapping.gmk
similarity index 72%
rename from jdk/makefiles/GensrcCharsetMapping.gmk
rename to jdk/makefiles/gensrc/GensrcCharsetMapping.gmk
index 5d32092..6dfc8d9 100644
--- a/jdk/makefiles/GensrcCharsetMapping.gmk
+++ b/jdk/makefiles/gensrc/GensrcCharsetMapping.gmk
@@ -23,7 +23,7 @@
 # questions.
 #
 
-GENSRC_CHARSETMAPPING:=
+GENSRC_CHARSETMAPPING :=
 
 GENSRC_TMP := $(JDK_OUTPUTDIR)/gensrc
 GENSRC_DST := $(JDK_OUTPUTDIR)/gensrc/sun/nio/cs
@@ -35,7 +35,7 @@
 
 ###
 
-$(GENSRC_TMP)/_the.charsetmapping.dir :
+$(GENSRC_TMP)/_the.charsetmapping.dir:
 	$(ECHO) Generating charsetmapping classes
 	$(MKDIR) -p $(GENSRC_DST)/ext
 	$(TOUCH) $@
@@ -44,7 +44,7 @@
 
 GENSRC_SB := $(GENSRC_TMP)/_the.charsetmapping.sbcs
 
-$(GENSRC_SB) : $(GENSRC_SRC)/sbcs $(GENSRC_TEMPLATES) $(GENSRC_TMP)/_the.charsetmapping.dir
+$(GENSRC_SB): $(GENSRC_SRC)/sbcs $(GENSRC_TEMPLATES) $(GENSRC_TMP)/_the.charsetmapping.dir
 	$(TOOL_CHARSETMAPPING) $(LOG_INFO) $(GENSRC_SRC) $(GENSRC_DST) sbcs
 	$(TOUCH) $@
 
@@ -52,28 +52,28 @@
 
 ###
 
-$(GENSRC_DST)/ext/sjis0213.dat : $(GENSRC_SRC)/sjis0213.map $(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)
+$(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)
+$(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)
+$(GENSRC_TMP)/gensrc_the.charsetmapping.extsbcs: $(GENSRC_SRC)/extsbcs $(GENSRC_TEMPLATES) $(GENSRC_SB)
 	$(TOOL_CHARSETMAPPING) $(GENSRC_SRC) $(LOG_INFO) $(GENSRC_DST)/ext extsbcs
 	$(TOUCH) $@
 
@@ -81,7 +81,7 @@
 
 ###
 
-$(GENSRC_TMP)/gensrc_the.charsetmapping.dbcs : $(GENSRC_SRC)/dbcs $(GENSRC_TEMPLATES) $(GENSRC_SB)
+$(GENSRC_TMP)/gensrc_the.charsetmapping.dbcs: $(GENSRC_SRC)/dbcs $(GENSRC_TEMPLATES) $(GENSRC_SB)
 	$(TOOL_CHARSETMAPPING) $(GENSRC_SRC) $(LOG_INFO) $(GENSRC_DST)/ext dbcs
 	$(TOUCH) $@
 
@@ -91,15 +91,14 @@
 
 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
-
+$(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)
+	    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)
+$(GENSRC_CHARSETMAPPING): $(BUILD_TOOLS)
diff --git a/jdk/makefiles/GensrcExceptions.gmk b/jdk/makefiles/gensrc/GensrcExceptions.gmk
similarity index 80%
rename from jdk/makefiles/GensrcExceptions.gmk
rename to jdk/makefiles/gensrc/GensrcExceptions.gmk
index a1cd393..cf9c6ad 100644
--- a/jdk/makefiles/GensrcExceptions.gmk
+++ b/jdk/makefiles/gensrc/GensrcExceptions.gmk
@@ -31,11 +31,11 @@
 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_SRC_DIRS := . charset channels
 
 ###
 
-$(GENSRC_EXCEPTIONS_DST)/_the.exceptions.dir :
+$(GENSRC_EXCEPTIONS_DST)/_the.exceptions.dir:
 	$(ECHO) "Generating exceptions classes"
 	$(MKDIR) -p $(@D)
 	$(TOUCH) $@
@@ -43,13 +43,13 @@
 
 ###
 
-$(GENSRC_EXCEPTIONS_DST)/_the.% : $(GENSRC_EXCEPTIONS_SRC)/%/exceptions \
-                                  $(GENSRC_EXCEPTIONS_CMD) \
-                                  $(GENSRC_EXCEPTIONS_DST)/_the.exceptions.dir
+$(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) 
+	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)
+$(GENSRC_EXCEPTIONS): $(BUILD_TOOLS)
diff --git a/jdk/makefiles/GensrcIcons.gmk b/jdk/makefiles/gensrc/GensrcIcons.gmk
similarity index 67%
rename from jdk/makefiles/GensrcIcons.gmk
rename to jdk/makefiles/gensrc/GensrcIcons.gmk
index 01b19c7..f0acc3e 100644
--- a/jdk/makefiles/GensrcIcons.gmk
+++ b/jdk/makefiles/gensrc/GensrcIcons.gmk
@@ -44,18 +44,18 @@
 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
+    $(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))
 
@@ -64,7 +64,7 @@
 
 ###
 
-$(GENSRC_AWT_ICONS_TMP)/_the.icons.dir :
+$(GENSRC_AWT_ICONS_TMP)/_the.icons.dir:
 	$(ECHO) Generating icon classes
 	$(MKDIR) -p $(GENSRC_AWT_ICONS_DST)
 	$(TOUCH) $@
@@ -72,15 +72,15 @@
 ###
 
 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
+  # 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
+  $$($1_TARGET32): $2/$1 $(GENSRC_AWT_ICONS_TMP)/_the.icons.dir
 	$(RM) $$@ $$@.tmp
 	$(ECHO) "package sun.awt;" > $$@.tmp
 	$(ECHO) "public class $$($1_NAME32) {" >> $$@.tmp
@@ -89,9 +89,9 @@
 	$(ECHO) "}; }" >> $$@.tmp
 	$(MV) $$@.tmp $$@
 
-GENSRC_AWT_ICONS += $$($1_TARGET32)
+  GENSRC_AWT_ICONS += $$($1_TARGET32)
 
-$$($1_TARGET64) : $2/$1 $(GENSRC_AWT_ICONS_TMP)/_the.icons.dir
+  $$($1_TARGET64): $2/$1 $(GENSRC_AWT_ICONS_TMP)/_the.icons.dir
 	$(RM) $$@ $$@.tmp
 	$(ECHO) "package sun.awt;" > $$@.tmp
 	$(ECHO) "public class $$($1_NAME64) {" >> $$@.tmp
@@ -100,18 +100,18 @@
 	$(ECHO) "}; }" >> $$@.tmp
 	$(MV) $$@.tmp $$@
 
-GENSRC_AWT_ICONS += $$($1_TARGET64)
+  GENSRC_AWT_ICONS += $$($1_TARGET64)
 endef
 
-$(foreach I,$(GENSRC_AWT_ICONS_SRC), $(eval $(call SetupGensrcAWTIcon,$(notdir $(I)),$(dir $(I)))))
+$(foreach I, $(GENSRC_AWT_ICONS_SRC), $(eval $(call SetupGensrcAWTIcon,$(notdir $(I)),$(dir $(I)))))
 
 ###
 
-ifeq ($(OPENJDK_TARGET_OS),macosx)
+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
+  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
@@ -119,7 +119,7 @@
     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)
+  $(GENSRC_OSX_ICONS_DST)/AWTIconData.h: $(GENSRC_OSX_ICONS_SRC)
 	$(RM) $@ $@.tmp
 	$(MKDIR) -p $(dir $@)
 	$(ECHO) "static unsigned char sAWTIconData[] = { " >> $@.tmp
@@ -128,4 +128,3 @@
 	$(MV) $@.tmp $@
 
 endif
-
diff --git a/jdk/makefiles/GensrcJDWP.gmk b/jdk/makefiles/gensrc/GensrcJDWP.gmk
similarity index 78%
rename from jdk/makefiles/GensrcJDWP.gmk
rename to jdk/makefiles/gensrc/GensrcJDWP.gmk
index e210353..de24575 100644
--- a/jdk/makefiles/GensrcJDWP.gmk
+++ b/jdk/makefiles/gensrc/GensrcJDWP.gmk
@@ -26,21 +26,21 @@
 # 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_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
+$(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
+$(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
+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
diff --git a/jdk/makefiles/GensrcJObjC.gmk b/jdk/makefiles/gensrc/GensrcJObjC.gmk
similarity index 61%
rename from jdk/makefiles/GensrcJObjC.gmk
rename to jdk/makefiles/gensrc/GensrcJObjC.gmk
index 4f90747..899ec25 100644
--- a/jdk/makefiles/GensrcJObjC.gmk
+++ b/jdk/makefiles/gensrc/GensrcJObjC.gmk
@@ -36,57 +36,57 @@
 #
 # 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))
+$(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)))
+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.
+# 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 $@
+	$(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)
+$(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)
+$(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)
+$(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.
+# 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)
+$(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
@@ -94,17 +94,17 @@
 
 #
 # Run generator
-#    Now we use bootclasspath to run java again, with the bridge support to
-#    generate more source.
+# 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)
+$(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
+$(JDK_OUTPUTDIR)/gensrc/_the.jobjc.files: $(JOBJC_TMP)/_the.generator
 	$(MKDIR) -p $(@D)
 	$(CP) -rp $(JOBJC_DST)/* $(@D)
 	$(TOUCH) $@
diff --git a/jdk/makefiles/gensrc/GensrcLocaleDataMetaInfo.gmk b/jdk/makefiles/gensrc/GensrcLocaleDataMetaInfo.gmk
new file mode 100644
index 0000000..360a032
--- /dev/null
+++ b/jdk/makefiles/gensrc/GensrcLocaleDataMetaInfo.gmk
@@ -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)
+
+###
diff --git a/jdk/makefiles/gensrc/GensrcMisc.gmk b/jdk/makefiles/gensrc/GensrcMisc.gmk
new file mode 100644
index 0000000..20d0820
--- /dev/null
+++ b/jdk/makefiles/gensrc/GensrcMisc.gmk
@@ -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
+
+##########################################################################################
diff --git a/jdk/makefiles/gensrc/GensrcProperties.gmk b/jdk/makefiles/gensrc/GensrcProperties.gmk
new file mode 100644
index 0000000..6ef7802
--- /dev/null
+++ b/jdk/makefiles/gensrc/GensrcProperties.gmk
@@ -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)
diff --git a/jdk/makefiles/GensrcSwing.gmk b/jdk/makefiles/gensrc/GensrcSwing.gmk
similarity index 72%
rename from jdk/makefiles/GensrcSwing.gmk
rename to jdk/makefiles/gensrc/GensrcSwing.gmk
index 5350c14..cfdc78d 100644
--- a/jdk/makefiles/GensrcSwing.gmk
+++ b/jdk/makefiles/gensrc/GensrcSwing.gmk
@@ -25,7 +25,7 @@
 
 #
 # 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
@@ -48,22 +48,22 @@
 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
+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)
+    $(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
@@ -71,21 +71,21 @@
 # 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)
+    $(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.
+	    -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 
+	$(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
@@ -94,7 +94,7 @@
 $(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 
+# 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
diff --git a/jdk/makefiles/GensrcX11Wrappers.gmk b/jdk/makefiles/gensrc/GensrcX11Wrappers.gmk
similarity index 64%
rename from jdk/makefiles/GensrcX11Wrappers.gmk
rename to jdk/makefiles/gensrc/GensrcX11Wrappers.gmk
index 934ddbe..c6f7da8 100644
--- a/jdk/makefiles/GensrcX11Wrappers.gmk
+++ b/jdk/makefiles/gensrc/GensrcX11Wrappers.gmk
@@ -48,75 +48,74 @@
 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
+    # 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
+    # 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))
+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 
+# 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 
+# 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)
+$(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.
+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)
+  # 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
+  # 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
+  # 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)
+	    $(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
+  .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
+  # 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
+  GENSRC_X11WRAPPERS += $(GENSRC_X11WRAPPERS_TMP)/sizes.$(OPENJDK_TARGET_CPU_BITS).verification
 endif
-
diff --git a/jdk/makefiles/jpda/jdwp/jdwp.spec b/jdk/makefiles/jpda/jdwp/jdwp.spec
index 910fffa..6078ae6 100644
--- a/jdk/makefiles/jpda/jdwp/jdwp.spec
+++ b/jdk/makefiles/jpda/jdwp/jdwp.spec
@@ -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 
-                                "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")
-                    )
-                    (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. "
+                         "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 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 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. "
+
+                        (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")
                     )
                     (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)")
 )
-
-
diff --git a/jdk/makefiles/jprt.gmk b/jdk/makefiles/jprt.gmk
index b5e4273..00b5f5f 100644
--- a/jdk/makefiles/jprt.gmk
+++ b/jdk/makefiles/jprt.gmk
@@ -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
-
diff --git a/jdk/makefiles/jprt.properties b/jdk/makefiles/jprt.properties
index 1051bb3..7a1b8a2 100644
--- a/jdk/makefiles/jprt.properties
+++ b/jdk/makefiles/jprt.properties
@@ -32,278 +32,277 @@
 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_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}, \
     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_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, \
     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_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, \
     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_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, \
     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_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
 
 # 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
-
diff --git a/jdk/makefiles/mapfiles/libawt/mapfile-mawt-vers b/jdk/makefiles/mapfiles/libawt/mapfile-mawt-vers
index 09beb06..b21eada 100644
--- a/jdk/makefiles/mapfiles/libawt/mapfile-mawt-vers
+++ b/jdk/makefiles/mapfiles/libawt/mapfile-mawt-vers
@@ -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:
 		*;
 };
-
diff --git a/jdk/makefiles/mapfiles/libawt/mapfile-vers b/jdk/makefiles/mapfiles/libawt/mapfile-vers
index 8af9d14..da13850 100644
--- a/jdk/makefiles/mapfiles/libawt/mapfile-vers
+++ b/jdk/makefiles/mapfiles/libawt/mapfile-vers
@@ -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:
 		*;
 };
-
diff --git a/jdk/makefiles/mapfiles/libawt/mapfile-vers-linux b/jdk/makefiles/mapfiles/libawt/mapfile-vers-linux
index b0bfb1c..519271b 100644
--- a/jdk/makefiles/mapfiles/libawt/mapfile-vers-linux
+++ b/jdk/makefiles/mapfiles/libawt/mapfile-vers-linux
@@ -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:
 		*;
 };
-
diff --git a/jdk/makefiles/mapfiles/libawt_headless/mapfile-vers b/jdk/makefiles/mapfiles/libawt_headless/mapfile-vers
index 0947ddc..a5a7413 100644
--- a/jdk/makefiles/mapfiles/libawt_headless/mapfile-vers
+++ b/jdk/makefiles/mapfiles/libawt_headless/mapfile-vers
@@ -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:
 		*;
 };
-
diff --git a/jdk/makefiles/mapfiles/libawt_xawt/mapfile-vers b/jdk/makefiles/mapfiles/libawt_xawt/mapfile-vers
index a2bb9bd..b872003 100644
--- a/jdk/makefiles/mapfiles/libawt_xawt/mapfile-vers
+++ b/jdk/makefiles/mapfiles/libawt_xawt/mapfile-vers
@@ -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;
 
diff --git a/jdk/makefiles/mapfiles/libfontmanager/mapfile-vers b/jdk/makefiles/mapfiles/libfontmanager/mapfile-vers
index b4fd96e..b19d646 100644
--- a/jdk/makefiles/mapfiles/libfontmanager/mapfile-vers
+++ b/jdk/makefiles/mapfiles/libfontmanager/mapfile-vers
@@ -28,7 +28,7 @@
 SUNWprivate_1.1 {
 	global:
                 getSunFontIDs;
-                newLayoutTableCache; 
+                newLayoutTableCache;
                 freeLayoutTableCache;
                 isNullScalerContext;
                 Java_sun_font_NullFontScaler_getNullScalerContext;
diff --git a/jdk/makefiles/mapfiles/libfontmanager/mapfile-vers.openjdk b/jdk/makefiles/mapfiles/libfontmanager/mapfile-vers.openjdk
index 044cf8f..6af4fd0 100644
--- a/jdk/makefiles/mapfiles/libfontmanager/mapfile-vers.openjdk
+++ b/jdk/makefiles/mapfiles/libfontmanager/mapfile-vers.openjdk
@@ -30,7 +30,7 @@
 SUNWprivate_1.1 {
 	global:
                 getSunFontIDs;
-                newLayoutTableCache; 
+                newLayoutTableCache;
                 freeLayoutTableCache;
                 isNullScalerContext;
                 Java_sun_font_NullFontScaler_getNullScalerContext;
diff --git a/jdk/makefiles/mapfiles/libj2pcsc/mapfile-vers b/jdk/makefiles/mapfiles/libj2pcsc/mapfile-vers
index 44b91b3..bac7f87 100644
--- a/jdk/makefiles/mapfiles/libj2pcsc/mapfile-vers
+++ b/jdk/makefiles/mapfiles/libj2pcsc/mapfile-vers
@@ -39,7 +39,7 @@
 		Java_sun_security_smartcardio_PCSC_SCardBeginTransaction;
 		Java_sun_security_smartcardio_PCSC_SCardEndTransaction;
 		Java_sun_security_smartcardio_PCSC_SCardControl;
-		
+
 	local:
 		*;
 };
diff --git a/jdk/makefiles/mapfiles/libjava/mapfile-vers b/jdk/makefiles/mapfiles/libjava/mapfile-vers
index bb06a3d..29ce7eb 100644
--- a/jdk/makefiles/mapfiles/libjava/mapfile-vers
+++ b/jdk/makefiles/mapfiles/libjava/mapfile-vers
@@ -190,6 +190,8 @@
 		Java_java_lang_reflect_Array_setLong;
 		Java_java_lang_reflect_Array_setShort;
 		Java_java_lang_reflect_Executable_getParameters0;
+		Java_java_lang_reflect_Executable_getTypeAnnotationBytes0;
+		Java_java_lang_reflect_Field_getTypeAnnotationBytes0;
 		Java_java_lang_Runtime_freeMemory;
                 Java_java_lang_Runtime_maxMemory;
 		Java_java_lang_Runtime_gc;
diff --git a/jdk/makefiles/mapfiles/libjdga/mapfile-vers b/jdk/makefiles/mapfiles/libjdga/mapfile-vers
index 86dae13..8d51ce2 100644
--- a/jdk/makefiles/mapfiles/libjdga/mapfile-vers
+++ b/jdk/makefiles/mapfiles/libjdga/mapfile-vers
@@ -27,7 +27,7 @@
 
 SUNWprivate_1.1 {
 	global:
-            JDgaLibInit;	
+            JDgaLibInit;
 	local:
 	    *;
 };
diff --git a/jdk/makefiles/mapfiles/libjli/mapfile-vers b/jdk/makefiles/mapfiles/libjli/mapfile-vers
index a12d96f..77d8ff8 100644
--- a/jdk/makefiles/mapfiles/libjli/mapfile-vers
+++ b/jdk/makefiles/mapfiles/libjli/mapfile-vers
@@ -36,7 +36,7 @@
 		JLI_ReportExceptionDescription;
 		JLI_GetStdArgs;
 		JLI_GetStdArgc;
-		
+
 	local:
 		*;
 };
diff --git a/jdk/makefiles/mapfiles/libverify/mapfile-vers b/jdk/makefiles/mapfiles/libverify/mapfile-vers
index f8cb44d..f4f8a3c 100644
--- a/jdk/makefiles/mapfiles/libverify/mapfile-vers
+++ b/jdk/makefiles/mapfiles/libverify/mapfile-vers
@@ -22,7 +22,7 @@
 # or visit www.oracle.com if you need additional information or have any
 # questions.
 #
- 
+
 SUNWprivate_1.1 {
    global:
            VerifyClass;
diff --git a/jdk/makefiles/profile-includes.txt b/jdk/makefiles/profile-includes.txt
index fe2f13e..1d1adbf 100644
--- a/jdk/makefiles/profile-includes.txt
+++ b/jdk/makefiles/profile-includes.txt
@@ -107,14 +107,14 @@
     rmid$(EXE_SUFFIX) \
     rmiregistry$(EXE_SUFFIX)
 
-PROFILE_2_JRE_LIB_FILES := 
+PROFILE_2_JRE_LIB_FILES :=
 
-PROFILE_2_JRE_OTHER_FILES := 
+PROFILE_2_JRE_OTHER_FILES :=
 
-PROFILE_2_JRE_JAR_FILES := 
+PROFILE_2_JRE_JAR_FILES :=
 
 
-PROFILE_3_JRE_BIN_FILES := 
+PROFILE_3_JRE_BIN_FILES :=
 
 PROFILE_3_JRE_LIB_FILES := \
     $(OPENJDK_TARGET_CPU_LEGACY_LIB)/$(LIBRARY_PREFIX)hprof$(SHARED_LIBRARY_SUFFIX) \
@@ -138,7 +138,7 @@
     management/management.properties \
     management/snmp.acl.template
 
-PROFILE_3_JRE_OTHER_FILES := 
+PROFILE_3_JRE_OTHER_FILES :=
 
 PROFILE_3_JRE_JAR_FILES := \
     management-agent.jar
@@ -171,7 +171,6 @@
     $(OPENJDK_TARGET_CPU_LEGACY_LIB)/$(LIBRARY_PREFIX)splashscreen$(SHARED_LIBRARY_SUFFIX) \
     $(OPENJDK_TARGET_CPU_LEGACY_LIB)/$(LIBRARY_PREFIX)t2k$(SHARED_LIBRARY_SUFFIX) \
     $(OPENJDK_TARGET_CPU_LEGACY_LIB)/$(LIBRARY_PREFIX)unpack$(SHARED_LIBRARY_SUFFIX) \
-    alt-rt.jar \
     charsets.jar \
     cmm/CIEXYZ.pf \
     cmm/GRAY.pf \
@@ -248,11 +247,9 @@
     man/man1/unpack200.1
 
 FULL_JRE_JAR_FILES := \
-    alt-rt.jar \
     charsets.jar \
     ext/cldrdata.jar \
     ext/dnsns.jar \
     ext/nashorn.jar \
     ext/zipfs.jar \
     jfr.jar
-
diff --git a/jdk/makefiles/profile-rtjar-includes.txt b/jdk/makefiles/profile-rtjar-includes.txt
index d740e01..3f0934c 100644
--- a/jdk/makefiles/profile-rtjar-includes.txt
+++ b/jdk/makefiles/profile-rtjar-includes.txt
@@ -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
diff --git a/jdk/makefiles/scripts/addNotices.sh b/jdk/makefiles/scripts/addNotices.sh
index cad3879..6e0cdf9 100644
--- a/jdk/makefiles/scripts/addNotices.sh
+++ b/jdk/makefiles/scripts/addNotices.sh
@@ -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
diff --git a/jdk/makefiles/scripts/genCharsetProvider.sh b/jdk/makefiles/scripts/genCharsetProvider.sh
index 4503349..d145274 100644
--- a/jdk/makefiles/scripts/genCharsetProvider.sh
+++ b/jdk/makefiles/scripts/genCharsetProvider.sh
@@ -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
diff --git a/jdk/makefiles/scripts/genExceptions.sh b/jdk/makefiles/scripts/genExceptions.sh
index 698e145..66ef805 100644
--- a/jdk/makefiles/scripts/genExceptions.sh
+++ b/jdk/makefiles/scripts/genExceptions.sh
@@ -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! -- //
 
diff --git a/jdk/makefiles/scripts/localelist.sh b/jdk/makefiles/scripts/localelist.sh
index 467f321..96fa02b 100644
--- a/jdk/makefiles/scripts/localelist.sh
+++ b/jdk/makefiles/scripts/localelist.sh
@@ -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
diff --git a/jdk/makefiles/sun/awt/ToBin.java b/jdk/makefiles/sun/awt/ToBin.java
index db97240..5f91542 100644
--- a/jdk/makefiles/sun/awt/ToBin.java
+++ b/jdk/makefiles/sun/awt/ToBin.java
@@ -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 {
diff --git a/jdk/src/macosx/classes/apple/applescript/AppleScriptEngine.java b/jdk/src/macosx/classes/apple/applescript/AppleScriptEngine.java
index 917037b..e50f218 100644
--- a/jdk/src/macosx/classes/apple/applescript/AppleScriptEngine.java
+++ b/jdk/src/macosx/classes/apple/applescript/AppleScriptEngine.java
@@ -155,7 +155,7 @@
         TRACE("init()");
         // set up our context
 /* TODO -- name of current executable?  bad java documentation at:
- * http://java.sun.com/javase/6/docs/api/javax/script/ScriptEngine.html#FILENAME */
+ * http://docs.oracle.com/javase/6/docs/api/javax/script/ScriptEngine.html#FILENAME */
         put(ScriptEngine.FILENAME, "");
         put(ScriptEngine.ENGINE, getEngine());
         put(ScriptEngine.ENGINE_VERSION, getEngineVersion());
diff --git a/jdk/src/macosx/classes/apple/security/AppleProvider.java b/jdk/src/macosx/classes/apple/security/AppleProvider.java
index e1e3e2f..654af3c 100644
--- a/jdk/src/macosx/classes/apple/security/AppleProvider.java
+++ b/jdk/src/macosx/classes/apple/security/AppleProvider.java
@@ -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
@@ -43,7 +43,7 @@
 
     public AppleProvider() {
         /* We are the Apple provider */
-        super("Apple", 1.1, info);
+        super("Apple", 1.8d, info);
 
         AccessController.<Object>doPrivileged(new java.security.PrivilegedAction<Object>() {
             public Object run() {
diff --git a/jdk/src/macosx/classes/com/apple/eawt/_AppEventLegacyHandler.java b/jdk/src/macosx/classes/com/apple/eawt/_AppEventLegacyHandler.java
index c870f79..493999c 100644
--- a/jdk/src/macosx/classes/com/apple/eawt/_AppEventLegacyHandler.java
+++ b/jdk/src/macosx/classes/com/apple/eawt/_AppEventLegacyHandler.java
@@ -31,10 +31,6 @@
 
 import com.apple.eawt.AppEvent.*;
 
-interface _OpenAppHandler {
-    void handleOpenApp();
-}
-
 @SuppressWarnings("deprecation")
 class _AppEventLegacyHandler implements AboutHandler, PreferencesHandler, _OpenAppHandler, AppReOpenedListener, OpenFilesHandler, PrintFilesHandler, QuitHandler {
     final _AppEventHandler parent;
diff --git a/jdk/src/macosx/classes/com/apple/eawt/_OpenAppHandler.java b/jdk/src/macosx/classes/com/apple/eawt/_OpenAppHandler.java
new file mode 100644
index 0000000..97daaad
--- /dev/null
+++ b/jdk/src/macosx/classes/com/apple/eawt/_OpenAppHandler.java
@@ -0,0 +1,30 @@
+/*
+ * Copyright (c) 2011, Oracle and/or its affiliates. All rights reserved.
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * This code is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU General Public License version 2 only, as
+ * published by the Free Software Foundation.  Oracle designates this
+ * particular file as subject to the "Classpath" exception as provided
+ * by Oracle in the LICENSE file that accompanied this code.
+ *
+ * This code is distributed in the hope that it will be useful, but WITHOUT
+ * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
+ * version 2 for more details (a copy is included in the LICENSE file that
+ * accompanied this code).
+ *
+ * You should have received a copy of the GNU General Public License version
+ * 2 along with this work; if not, write to the Free Software Foundation,
+ * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
+ *
+ * Please 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.eawt;
+
+interface _OpenAppHandler {
+    void handleOpenApp();
+}
\ No newline at end of file
diff --git a/jdk/src/macosx/classes/com/apple/laf/AquaComboBoxRenderer.java b/jdk/src/macosx/classes/com/apple/laf/AquaComboBoxRenderer.java
index 4b31dfff..fc60e53 100644
--- a/jdk/src/macosx/classes/com/apple/laf/AquaComboBoxRenderer.java
+++ b/jdk/src/macosx/classes/com/apple/laf/AquaComboBoxRenderer.java
@@ -25,141 +25,11 @@
 
 package com.apple.laf;
 
-import java.awt.*;
-
 import javax.swing.*;
 import javax.swing.plaf.UIResource;
 
-import sun.swing.SwingUtilities2;
-
 class AquaComboBoxRenderer extends AquaComboBoxRendererInternal implements UIResource {
     public AquaComboBoxRenderer(final JComboBox comboBox) {
         super(comboBox);
     }
 }
-
-class AquaComboBoxRendererInternal extends JLabel implements ListCellRenderer {
-    final JComboBox fComboBox;
-    boolean fSelected;
-    boolean fChecked;
-    boolean fInList;
-    boolean fEditable;
-    boolean fDrawCheckedItem = true;
-
-    // Provides space for a checkbox, and is translucent
-    public AquaComboBoxRendererInternal(final JComboBox comboBox) {
-        super();
-        fComboBox = comboBox;
-    }
-
-    // Don't include checkIcon space, because this is also used for button size calculations
-    // - the popup-size calc will get checkIcon space from getInsets
-    public Dimension getPreferredSize() {
-        // From BasicComboBoxRenderer - trick to avoid zero-height items
-        final Dimension size;
-
-        final String text = getText();
-        if ((text == null) || ("".equals(text))) {
-            setText(" ");
-            size = super.getPreferredSize();
-            setText("");
-        } else {
-            size = super.getPreferredSize();
-        }
-        return size;
-    }
-
-    // Don't paint the border here, it gets painted by the UI
-    protected void paintBorder(final Graphics g) {
-
-    }
-
-    public int getBaseline(int width, int height) {
-        return super.getBaseline(width, height) - 1;
-    }
-
-    // Really means is the one with the mouse over it
-    public Component getListCellRendererComponent(final JList list, final Object value, int index, final boolean isSelected, final boolean cellHasFocus) {
-        fInList = (index >= 0); // When the button wants the item painted, it passes in -1
-        fSelected = isSelected;
-        if (index < 0) {
-            index = fComboBox.getSelectedIndex();
-        }
-
-        // changed this to not ask for selected index but directly compare the current item and selected item
-        // different from basic because basic has no concept of checked, just has the last one selected,
-        // and the user changes selection. We have selection and a check mark.
-        // we used to call fComboBox.getSelectedIndex which ends up being a very bad call for large checkboxes
-        // it does a linear compare of every object in the checkbox until it finds the selected one, so if
-        // we have a 5000 element list we will 5000 * (selected index) .equals() of objects.
-        // See Radar #3141307
-
-        // Fix for Radar # 3204287 where we ask for an item at a negative index!
-        if (index >= 0) {
-            final Object item = fComboBox.getItemAt(index);
-            fChecked = fInList && item != null && item.equals(fComboBox.getSelectedItem());
-        } else {
-            fChecked = false;
-        }
-
-        fEditable = fComboBox.isEditable();
-        if (isSelected) {
-            if (fEditable) {
-                setBackground(UIManager.getColor("List.selectionBackground"));
-                setForeground(UIManager.getColor("List.selectionForeground"));
-            } else {
-                setBackground(list.getSelectionBackground());
-                setForeground(list.getSelectionForeground());
-            }
-        } else {
-            if (fEditable) {
-                setBackground(UIManager.getColor("List.background"));
-                setForeground(UIManager.getColor("List.foreground"));
-            } else {
-                setBackground(list.getBackground());
-                setForeground(list.getForeground());
-            }
-        }
-
-        setFont(list.getFont());
-
-        if (value instanceof Icon) {
-            setIcon((Icon)value);
-        } else {
-            setText((value == null) ? " " : value.toString());
-        }
-        return this;
-    }
-
-    public Insets getInsets(Insets insets) {
-        if (insets == null) insets = new Insets(0, 0, 0, 0);
-        insets.top = 1;
-        insets.bottom = 1;
-        insets.right = 5;
-        insets.left = (fInList && !fEditable ? 16 + 7 : 5);
-        return insets;
-    }
-
-    protected void setDrawCheckedItem(final boolean drawCheckedItem) {
-        this.fDrawCheckedItem = drawCheckedItem;
-    }
-
-    // Paint this component, and a checkbox if it's the selected item and not in the button
-    protected void paintComponent(final Graphics g) {
-        if (fInList) {
-            if (fSelected && !fEditable) {
-                AquaMenuPainter.instance().paintSelectedMenuItemBackground(g, getWidth(), getHeight());
-            } else {
-                g.setColor(getBackground());
-                g.fillRect(0, 0, getWidth(), getHeight());
-            }
-
-            if (fChecked && !fEditable && fDrawCheckedItem) {
-                final int y = getHeight() - 4;
-                g.setColor(getForeground());
-                SwingUtilities2.drawString(fComboBox, g, "\u2713", 6, y);
-            }
-        }
-        super.paintComponent(g);
-    }
-}
diff --git a/jdk/src/macosx/classes/com/apple/laf/AquaComboBoxRendererInternal.java b/jdk/src/macosx/classes/com/apple/laf/AquaComboBoxRendererInternal.java
new file mode 100644
index 0000000..a93560a
--- /dev/null
+++ b/jdk/src/macosx/classes/com/apple/laf/AquaComboBoxRendererInternal.java
@@ -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.  Oracle designates this
+ * particular file as subject to the "Classpath" exception as provided
+ * by Oracle in the LICENSE file that accompanied this code.
+ *
+ * This code is distributed in the hope that it will be useful, but WITHOUT
+ * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
+ * version 2 for more details (a copy is included in the LICENSE file that
+ * accompanied this code).
+ *
+ * You should have received a copy of the GNU General Public License version
+ * 2 along with this work; if not, write to the Free Software Foundation,
+ * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
+ *
+ * Please 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.laf;
+
+import sun.swing.SwingUtilities2;
+
+import javax.swing.*;
+import java.awt.*;
+
+class AquaComboBoxRendererInternal extends JLabel implements ListCellRenderer {
+    final JComboBox fComboBox;
+    boolean fSelected;
+    boolean fChecked;
+    boolean fInList;
+    boolean fEditable;
+    boolean fDrawCheckedItem = true;
+
+    // Provides space for a checkbox, and is translucent
+    public AquaComboBoxRendererInternal(final JComboBox comboBox) {
+        super();
+        fComboBox = comboBox;
+    }
+
+    // Don't include checkIcon space, because this is also used for button size calculations
+    // - the popup-size calc will get checkIcon space from getInsets
+    public Dimension getPreferredSize() {
+        // From BasicComboBoxRenderer - trick to avoid zero-height items
+        final Dimension size;
+
+        final String text = getText();
+        if ((text == null) || ("".equals(text))) {
+            setText(" ");
+            size = super.getPreferredSize();
+            setText("");
+        } else {
+            size = super.getPreferredSize();
+        }
+        return size;
+    }
+
+    // Don't paint the border here, it gets painted by the UI
+    protected void paintBorder(final Graphics g) {
+
+    }
+
+    public int getBaseline(int width, int height) {
+        return super.getBaseline(width, height) - 1;
+    }
+
+    // Really means is the one with the mouse over it
+    public Component getListCellRendererComponent(final JList list, final Object value, int index, final boolean isSelected, final boolean cellHasFocus) {
+        fInList = (index >= 0); // When the button wants the item painted, it passes in -1
+        fSelected = isSelected;
+        if (index < 0) {
+            index = fComboBox.getSelectedIndex();
+        }
+
+        // changed this to not ask for selected index but directly compare the current item and selected item
+        // different from basic because basic has no concept of checked, just has the last one selected,
+        // and the user changes selection. We have selection and a check mark.
+        // we used to call fComboBox.getSelectedIndex which ends up being a very bad call for large checkboxes
+        // it does a linear compare of every object in the checkbox until it finds the selected one, so if
+        // we have a 5000 element list we will 5000 * (selected index) .equals() of objects.
+        // See Radar #3141307
+
+        // Fix for Radar # 3204287 where we ask for an item at a negative index!
+        if (index >= 0) {
+            final Object item = fComboBox.getItemAt(index);
+            fChecked = fInList && item != null && item.equals(fComboBox.getSelectedItem());
+        } else {
+            fChecked = false;
+        }
+
+        fEditable = fComboBox.isEditable();
+        if (isSelected) {
+            if (fEditable) {
+                setBackground(UIManager.getColor("List.selectionBackground"));
+                setForeground(UIManager.getColor("List.selectionForeground"));
+            } else {
+                setBackground(list.getSelectionBackground());
+                setForeground(list.getSelectionForeground());
+            }
+        } else {
+            if (fEditable) {
+                setBackground(UIManager.getColor("List.background"));
+                setForeground(UIManager.getColor("List.foreground"));
+            } else {
+                setBackground(list.getBackground());
+                setForeground(list.getForeground());
+            }
+        }
+
+        setFont(list.getFont());
+
+        if (value instanceof Icon) {
+            setIcon((Icon)value);
+        } else {
+            setText((value == null) ? " " : value.toString());
+        }
+        return this;
+    }
+
+    public Insets getInsets(Insets insets) {
+        if (insets == null) insets = new Insets(0, 0, 0, 0);
+        insets.top = 1;
+        insets.bottom = 1;
+        insets.right = 5;
+        insets.left = (fInList && !fEditable ? 16 + 7 : 5);
+        return insets;
+    }
+
+    protected void setDrawCheckedItem(final boolean drawCheckedItem) {
+        this.fDrawCheckedItem = drawCheckedItem;
+    }
+
+    // Paint this component, and a checkbox if it's the selected item and not in the button
+    protected void paintComponent(final Graphics g) {
+        if (fInList) {
+            if (fSelected && !fEditable) {
+                AquaMenuPainter.instance().paintSelectedMenuItemBackground(g, getWidth(), getHeight());
+            } else {
+                g.setColor(getBackground());
+                g.fillRect(0, 0, getWidth(), getHeight());
+            }
+
+            if (fChecked && !fEditable && fDrawCheckedItem) {
+                final int y = getHeight() - 4;
+                g.setColor(getForeground());
+                SwingUtilities2.drawString(fComboBox, g, "\u2713", 6, y);
+            }
+        }
+        super.paintComponent(g);
+    }
+}
diff --git a/jdk/src/macosx/classes/com/apple/laf/AquaComboBoxUI.java b/jdk/src/macosx/classes/com/apple/laf/AquaComboBoxUI.java
index 8e8527f..4b9c78b 100644
--- a/jdk/src/macosx/classes/com/apple/laf/AquaComboBoxUI.java
+++ b/jdk/src/macosx/classes/com/apple/laf/AquaComboBoxUI.java
@@ -281,12 +281,16 @@
         actionMap.put("aquaSelectPageUp", highlightPageUpAction);
         actionMap.put("aquaSelectPageDown", highlightPageDownAction);
 
+        actionMap.put("aquaHidePopup", hideAction);
+
         SwingUtilities.replaceUIActionMap(comboBox, actionMap);
     }
 
-    abstract class ComboBoxAction extends AbstractAction {
+    private abstract class ComboBoxAction extends AbstractAction {
         public void actionPerformed(final ActionEvent e) {
-            if (!comboBox.isEnabled() || !comboBox.isShowing()) return;
+            if (!comboBox.isEnabled() || !comboBox.isShowing()) {
+                return;
+            }
 
             if (comboBox.isPopupVisible()) {
                 final AquaComboBoxUI ui = (AquaComboBoxUI)comboBox.getUI();
@@ -302,7 +306,7 @@
     /**
      * Hilight _but do not select_ the next item in the list.
      */
-    Action highlightNextAction = new ComboBoxAction() {
+    private Action highlightNextAction = new ComboBoxAction() {
         @Override
         public void performComboBoxAction(AquaComboBoxUI ui) {
             final int si = listBox.getSelectedIndex();
@@ -318,7 +322,7 @@
     /**
      * Hilight _but do not select_ the previous item in the list.
      */
-    Action highlightPreviousAction = new ComboBoxAction() {
+    private Action highlightPreviousAction = new ComboBoxAction() {
         @Override
         void performComboBoxAction(final AquaComboBoxUI ui) {
             final int si = listBox.getSelectedIndex();
@@ -330,7 +334,7 @@
         }
     };
 
-    Action highlightFirstAction = new ComboBoxAction() {
+    private Action highlightFirstAction = new ComboBoxAction() {
         @Override
         void performComboBoxAction(final AquaComboBoxUI ui) {
             listBox.setSelectedIndex(0);
@@ -338,7 +342,7 @@
         }
     };
 
-    Action highlightLastAction = new ComboBoxAction() {
+    private Action highlightLastAction = new ComboBoxAction() {
         @Override
         void performComboBoxAction(final AquaComboBoxUI ui) {
             final int size = listBox.getModel().getSize();
@@ -347,7 +351,7 @@
         }
     };
 
-    Action highlightPageUpAction = new ComboBoxAction() {
+    private Action highlightPageUpAction = new ComboBoxAction() {
         @Override
         void performComboBoxAction(final AquaComboBoxUI ui) {
             final int current = listBox.getSelectedIndex();
@@ -367,7 +371,7 @@
         }
     };
 
-    Action highlightPageDownAction = new ComboBoxAction() {
+    private Action highlightPageDownAction = new ComboBoxAction() {
         @Override
         void performComboBoxAction(final AquaComboBoxUI ui) {
             final int current = listBox.getSelectedIndex();
@@ -482,13 +486,13 @@
 
     // This is somewhat messy.  The difference here from BasicComboBoxUI.EnterAction is that
     // arrow up or down does not automatically select the
-    static final Action triggerSelectionAction = new AbstractAction() {
+    private static final Action triggerSelectionAction = new AbstractAction() {
         public void actionPerformed(final ActionEvent e) {
             triggerSelectionEvent((JComboBox)e.getSource(), e);
         }
     };
 
-    static final Action toggleSelectionAction = new AbstractAction() {
+    private static final Action toggleSelectionAction = new AbstractAction() {
         public void actionPerformed(final ActionEvent e) {
             final JComboBox comboBox = (JComboBox)e.getSource();
             if (!comboBox.isEnabled()) return;
@@ -506,6 +510,18 @@
         }
     };
 
+    private static Action hideAction = new AbstractAction() {
+        @Override
+        public void actionPerformed(final ActionEvent e) {
+            final JComboBox comboBox = (JComboBox)e.getSource();
+
+            if (comboBox.isPopupVisible()) {
+                comboBox.firePopupMenuCanceled();
+                comboBox.setPopupVisible(false);
+            }
+        }
+    };
+
     public void applySizeFor(final JComponent c, final Size size) {
         if (arrowButton == null) return;
         final Border border = arrowButton.getBorder();
diff --git a/jdk/src/macosx/classes/com/apple/laf/AquaKeyBindings.java b/jdk/src/macosx/classes/com/apple/laf/AquaKeyBindings.java
index 88db59f..9804826 100644
--- a/jdk/src/macosx/classes/com/apple/laf/AquaKeyBindings.java
+++ b/jdk/src/macosx/classes/com/apple/laf/AquaKeyBindings.java
@@ -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
@@ -209,7 +209,7 @@
 
     LateBoundInputMap getComboBoxInputMap() {
         return new LateBoundInputMap(new SimpleBinding(new String[] {
-            "ESCAPE", "hidePopup",
+            "ESCAPE", "aquaHidePopup",
             "PAGE_UP", "aquaSelectPageUp",
             "PAGE_DOWN", "aquaSelectPageDown",
             "HOME", "aquaSelectHome",
diff --git a/jdk/src/macosx/classes/com/apple/laf/AquaMenuBarUI.java b/jdk/src/macosx/classes/com/apple/laf/AquaMenuBarUI.java
index da6a01e..e2a4caf 100644
--- a/jdk/src/macosx/classes/com/apple/laf/AquaMenuBarUI.java
+++ b/jdk/src/macosx/classes/com/apple/laf/AquaMenuBarUI.java
@@ -73,8 +73,9 @@
 
     public Dimension getPreferredSize(final JComponent c) {
         if (isScreenMenuBar((JMenuBar)c)) {
-            if (setScreenMenuBar((JFrame)(c.getTopLevelAncestor()))) ;
-            return new Dimension(0, 0);
+            if (setScreenMenuBar((JFrame)(c.getTopLevelAncestor()))) {
+                return new Dimension(0, 0);
+            }
         }
         return null;
     }
diff --git a/jdk/src/macosx/classes/sun/awt/CGraphicsEnvironment.java b/jdk/src/macosx/classes/sun/awt/CGraphicsEnvironment.java
index a2319e6..a117d99 100644
--- a/jdk/src/macosx/classes/sun/awt/CGraphicsEnvironment.java
+++ b/jdk/src/macosx/classes/sun/awt/CGraphicsEnvironment.java
@@ -181,6 +181,9 @@
             initDevices();
 
             d = devices.get(mainDisplayID);
+            if (d == null) {
+                throw new AWTError("no screen devices");
+            }
         }
         return d;
     }
diff --git a/jdk/src/macosx/classes/sun/lwawt/LWComponentPeer.java b/jdk/src/macosx/classes/sun/lwawt/LWComponentPeer.java
index f6adcda..0ab1d1e 100644
--- a/jdk/src/macosx/classes/sun/lwawt/LWComponentPeer.java
+++ b/jdk/src/macosx/classes/sun/lwawt/LWComponentPeer.java
@@ -385,11 +385,6 @@
 
     // ---- PEER METHODS ---- //
 
-    @Override
-    public Toolkit getToolkit() {
-        return LWToolkit.getLWToolkit();
-    }
-
     // Just a helper method
     public LWToolkit getLWToolkit() {
         return LWToolkit.getLWToolkit();
@@ -1010,13 +1005,13 @@
     @Override
     public boolean prepareImage(Image img, int w, int h, ImageObserver o) {
         // TODO: is it a right/complete implementation?
-        return getToolkit().prepareImage(img, w, h, o);
+        return Toolkit.getDefaultToolkit().prepareImage(img, w, h, o);
     }
 
     @Override
     public int checkImage(Image img, int w, int h, ImageObserver o) {
         // TODO: is it a right/complete implementation?
-        return getToolkit().checkImage(img, w, h, o);
+        return Toolkit.getDefaultToolkit().checkImage(img, w, h, o);
     }
 
     @Override
diff --git a/jdk/src/macosx/classes/sun/lwawt/LWTextComponentPeer.java b/jdk/src/macosx/classes/sun/lwawt/LWTextComponentPeer.java
index 860aa54..d1df8e7 100644
--- a/jdk/src/macosx/classes/sun/lwawt/LWTextComponentPeer.java
+++ b/jdk/src/macosx/classes/sun/lwawt/LWTextComponentPeer.java
@@ -71,13 +71,14 @@
         }
         setEditable(getTarget().isEditable());
         setText(getTarget().getText());
+        setCaretPosition(getTarget().getCaretPosition());
         getTarget().addInputMethodListener(this);
         final int start = getTarget().getSelectionStart();
         final int end = getTarget().getSelectionEnd();
         if (end > start) {
+            // Should be called after setText() and setCaretPosition()
             select(start, end);
         }
-        setCaretPosition(getTarget().getCaretPosition());
         firstChangeSkipped = true;
     }
 
@@ -122,7 +123,7 @@
     }
 
     @Override
-    public final void setText(final String l) {
+    public final void setText(final String text) {
         synchronized (getDelegateLock()) {
             // JTextArea.setText() posts two different events (remove & insert).
             // Since we make no differences between text events,
@@ -130,7 +131,7 @@
             // JTextArea.setText() is called.
             final Document document = getTextComponent().getDocument();
             document.removeDocumentListener(this);
-            getTextComponent().setText(l);
+            getTextComponent().setText(text);
             revalidate();
             if (firstChangeSkipped) {
                 postEvent(new TextEvent(getTarget(),
diff --git a/jdk/src/macosx/classes/sun/lwawt/LWWindowPeer.java b/jdk/src/macosx/classes/sun/lwawt/LWWindowPeer.java
index 632fe84..44aafc5 100644
--- a/jdk/src/macosx/classes/sun/lwawt/LWWindowPeer.java
+++ b/jdk/src/macosx/classes/sun/lwawt/LWWindowPeer.java
@@ -317,9 +317,25 @@
             op |= SET_SIZE;
         }
 
+        // Don't post ComponentMoved/Resized and Paint events
+        // until we've got a notification from the delegate
+        Rectangle cb = constrainBounds(x, y, w, h);
+        setBounds(cb.x, cb.y, cb.width, cb.height, op, false, false);
+        // Get updated bounds, so we don't have to handle 'op' here manually
+        Rectangle r = getBounds();
+        platformWindow.setBounds(r.x, r.y, r.width, r.height);
+    }
+
+    public Rectangle constrainBounds(Rectangle bounds) {
+        return constrainBounds(bounds.x, bounds.y, bounds.width, bounds.height);
+    }
+
+    public Rectangle constrainBounds(int x, int y, int w, int h) {
+
         if (w < MINIMUM_WIDTH) {
             w = MINIMUM_WIDTH;
         }
+
         if (h < MINIMUM_HEIGHT) {
             h = MINIMUM_HEIGHT;
         }
@@ -334,12 +350,7 @@
             h = maxH;
         }
 
-        // Don't post ComponentMoved/Resized and Paint events
-        // until we've got a notification from the delegate
-        setBounds(x, y, w, h, op, false, false);
-        // Get updated bounds, so we don't have to handle 'op' here manually
-        Rectangle r = getBounds();
-        platformWindow.setBounds(r.x, r.y, r.width, r.height);
+        return new Rectangle(x, y, w, h);
     }
 
     @Override
@@ -393,8 +404,12 @@
     @Override
     public void setModalBlocked(Dialog blocker, boolean blocked) {
         synchronized (getPeerTreeLock()) {
-            this.blocker = !blocked ? null :
-            (LWWindowPeer) AWTAccessor.getComponentAccessor().getPeer(blocker);
+            ComponentPeer peer =  AWTAccessor.getComponentAccessor().getPeer(blocker);
+            if (blocked && (peer instanceof LWWindowPeer)) {
+                this.blocker = (LWWindowPeer) peer;
+            } else {
+                this.blocker = null;
+            }
         }
 
         platformWindow.setModalBlocked(blocked);
@@ -1146,8 +1161,11 @@
             return false;
         }
 
-        Window currentActive = KeyboardFocusManager.
-            getCurrentKeyboardFocusManager().getActiveWindow();
+        AppContext targetAppContext = AWTAccessor.getComponentAccessor().getAppContext(getTarget());
+        KeyboardFocusManager kfm = AWTAccessor.getKeyboardFocusManagerAccessor()
+                .getCurrentKeyboardFocusManager(targetAppContext);
+        Window currentActive = kfm.getActiveWindow();
+
 
         Window opposite = LWKeyboardFocusManagerPeer.getInstance().
             getCurrentFocusedWindow();
diff --git a/jdk/src/macosx/classes/sun/lwawt/macosx/CDropTargetContextPeer.java b/jdk/src/macosx/classes/sun/lwawt/macosx/CDropTargetContextPeer.java
index ad6171f..4c71a22 100644
--- a/jdk/src/macosx/classes/sun/lwawt/macosx/CDropTargetContextPeer.java
+++ b/jdk/src/macosx/classes/sun/lwawt/macosx/CDropTargetContextPeer.java
@@ -26,6 +26,7 @@
 package sun.lwawt.macosx;
 
 import java.awt.*;
+import java.awt.dnd.DropTarget;
 
 import sun.awt.dnd.SunDropTargetContextPeer;
 import sun.awt.dnd.SunDropTargetEvent;
@@ -38,7 +39,7 @@
     private long    fNativeDropTransfer = 0;
     private long    fNativeDataAvailable = 0;
     private Object  fNativeData    = null;
-    private boolean insideTarget = true;
+    private DropTarget insideTarget = null;
 
     Object awtLockAccess = new Object();
 
@@ -88,26 +89,19 @@
         return fNativeData;
     }
 
-    // We need to take care of dragExit message because for some reason it is not being
-    // generated for lightweight components
+    // We need to take care of dragEnter and dragExit messages because
+    // native system generates them only for heavyweights
     @Override
     protected void processMotionMessage(SunDropTargetEvent event, boolean operationChanged) {
-        Component eventSource = (Component)event.getComponent();
-        Point screenPoint = event.getPoint();
-        SwingUtilities.convertPointToScreen(screenPoint, eventSource);
-        Rectangle screenBounds = new Rectangle(eventSource.getLocationOnScreen().x,
-                eventSource.getLocationOnScreen().y,
-                eventSource.getWidth(), eventSource.getHeight());
-        if(insideTarget) {
-            if(!screenBounds.contains(screenPoint)) {
+        boolean eventInsideTarget = isEventInsideTarget(event);
+        if (event.getComponent().getDropTarget() == insideTarget) {
+            if (!eventInsideTarget) {
                 processExitMessage(event);
-                insideTarget = false;
                 return;
             }
         } else {
-            if(screenBounds.contains(screenPoint)) {
+            if (eventInsideTarget) {
                 processEnterMessage(event);
-                insideTarget = true;
             } else {
                 return;
             }
@@ -115,17 +109,52 @@
         super.processMotionMessage(event, operationChanged);
     }
 
+    /**
+     * Could be called when DnD enters a heavyweight or synthesized in processMotionMessage
+     */
+    @Override
+    protected void processEnterMessage(SunDropTargetEvent event) {
+        Component c = event.getComponent();
+        DropTarget dt = event.getComponent().getDropTarget();
+        if (isEventInsideTarget(event)
+                && dt != insideTarget
+                && c.isShowing()
+                && dt != null
+                && dt.isActive()) {
+            insideTarget = dt;
+            super.processEnterMessage(event);
+        }
+    }
+
+    /**
+     * Could be called when DnD exits a heavyweight or synthesized in processMotionMessage
+     */
+    @Override
+    protected void processExitMessage(SunDropTargetEvent event) {
+        if (event.getComponent().getDropTarget() == insideTarget) {
+            insideTarget = null;
+            super.processExitMessage(event);
+        }
+    }
+
     @Override
     protected void processDropMessage(SunDropTargetEvent event) {
-        Component eventSource = (Component)event.getComponent();
+        if (isEventInsideTarget(event)) {
+            super.processDropMessage(event);
+            insideTarget = null;
+        }
+    }
+
+    private boolean isEventInsideTarget(SunDropTargetEvent event) {
+        Component eventSource = event.getComponent();
         Point screenPoint = event.getPoint();
         SwingUtilities.convertPointToScreen(screenPoint, eventSource);
-        Rectangle screenBounds = new Rectangle(eventSource.getLocationOnScreen().x,
-                eventSource.getLocationOnScreen().y,
-                eventSource.getWidth(), eventSource.getHeight());
-        if(screenBounds.contains(screenPoint)) {
-            super.processDropMessage(event);
-        }
+        Point locationOnScreen = eventSource.getLocationOnScreen();
+        Rectangle screenBounds = new Rectangle(locationOnScreen.x,
+                                               locationOnScreen.y,
+                                               eventSource.getWidth(),
+                                               eventSource.getHeight());
+        return screenBounds.contains(screenPoint);
     }
 
     @Override
diff --git a/jdk/src/macosx/classes/sun/lwawt/macosx/CFileDialog.java b/jdk/src/macosx/classes/sun/lwawt/macosx/CFileDialog.java
index 2912939..4702cec 100644
--- a/jdk/src/macosx/classes/sun/lwawt/macosx/CFileDialog.java
+++ b/jdk/src/macosx/classes/sun/lwawt/macosx/CFileDialog.java
@@ -327,11 +327,6 @@
     }
 
     @Override
-    public Toolkit getToolkit() {
-        return Toolkit.getDefaultToolkit();
-    }
-
-    @Override
     public void handleEvent(AWTEvent e) {
     }
 
diff --git a/jdk/src/macosx/classes/sun/lwawt/macosx/CPlatformWindow.java b/jdk/src/macosx/classes/sun/lwawt/macosx/CPlatformWindow.java
index b859420..8fca7df 100644
--- a/jdk/src/macosx/classes/sun/lwawt/macosx/CPlatformWindow.java
+++ b/jdk/src/macosx/classes/sun/lwawt/macosx/CPlatformWindow.java
@@ -210,7 +210,6 @@
     private boolean undecorated; // initialized in getInitialStyleBits()
     private Rectangle normalBounds = null; // not-null only for undecorated maximized windows
     private CPlatformResponder responder;
-    private volatile boolean zoomed = false; // from native perspective
 
     public CPlatformWindow() {
         super(0, true);
@@ -231,7 +230,9 @@
         contentView.initialize(peer, responder);
 
         final long ownerPtr = owner != null ? owner.getNSWindowPtr() : 0L;
-        final long nativeWindowPtr = nativeCreateNSWindow(contentView.getAWTView(), ownerPtr, styleBits, 0, 0, 0, 0);
+        Rectangle bounds = _peer.constrainBounds(_target.getBounds());
+        final long nativeWindowPtr = nativeCreateNSWindow(contentView.getAWTView(),
+                ownerPtr, styleBits, bounds.x, bounds.y, bounds.width, bounds.height);
         setPtr(nativeWindowPtr);
 
         if (target instanceof javax.swing.RootPaneContainer) {
@@ -466,7 +467,8 @@
     }
 
     private boolean isMaximized() {
-        return undecorated ? this.normalBounds != null : zoomed;
+        return undecorated ? this.normalBounds != null
+                : CWrapper.NSWindow.isZoomed(getNSWindowPtr());
     }
 
     private void maximize() {
@@ -474,7 +476,6 @@
             return;
         }
         if (!undecorated) {
-            zoomed = true;
             CWrapper.NSWindow.zoom(getNSWindowPtr());
         } else {
             deliverZoom(true);
@@ -496,7 +497,6 @@
             return;
         }
         if (!undecorated) {
-            zoomed = false;
             CWrapper.NSWindow.zoom(getNSWindowPtr());
         } else {
             deliverZoom(false);
diff --git a/jdk/src/macosx/classes/sun/lwawt/macosx/CWrapper.java b/jdk/src/macosx/classes/sun/lwawt/macosx/CWrapper.java
index 7dc421e..879118c 100644
--- a/jdk/src/macosx/classes/sun/lwawt/macosx/CWrapper.java
+++ b/jdk/src/macosx/classes/sun/lwawt/macosx/CWrapper.java
@@ -68,6 +68,7 @@
 
         public static native void miniaturize(long window);
         public static native void deminiaturize(long window);
+        public static native boolean isZoomed(long window);
         public static native void zoom(long window);
 
         public static native void makeFirstResponder(long window, long responder);
diff --git a/jdk/src/macosx/lib/flavormap.properties b/jdk/src/macosx/lib/flavormap.properties
index 4a9f5fe..b00f2c2 100644
--- a/jdk/src/macosx/lib/flavormap.properties
+++ b/jdk/src/macosx/lib/flavormap.properties
@@ -76,5 +76,6 @@
 text/uri-list=application/x-java-file-list;class=java.util.List
 PNG=image/x-java-image;class=java.awt.Image
 JFIF=image/x-java-image;class=java.awt.Image
+TIFF=image/x-java-image;class=java.awt.Image
 RICH_TEXT=text/rtf
 HTML=text/html;charset=utf-8;eoln="\r\n";terminators=1
diff --git a/jdk/src/macosx/native/sun/awt/AWTWindow.m b/jdk/src/macosx/native/sun/awt/AWTWindow.m
index c933379..2231f10 100644
--- a/jdk/src/macosx/native/sun/awt/AWTWindow.m
+++ b/jdk/src/macosx/native/sun/awt/AWTWindow.m
@@ -366,7 +366,7 @@
 
 - (BOOL) canBecomeMainWindow {
 AWT_ASSERT_APPKIT_THREAD;
-    if(!self.isEnabled){
+    if (!self.isEnabled) {
         // Native system can bring up the NSWindow to
         // the top even if the window is not main.
         // We should bring up the modal dialog manually
@@ -377,7 +377,7 @@
         if (platformWindow != NULL) {
             static JNF_MEMBER_CACHE(jm_checkBlockingAndOrder, jc_CPlatformWindow,
                                     "checkBlockingAndOrder", "()Z");
-            JNFCallVoidMethod(env, platformWindow, jm_checkBlockingAndOrder);
+            JNFCallBooleanMethod(env, platformWindow, jm_checkBlockingAndOrder);
             (*env)->DeleteLocalRef(env, platformWindow);
         }
     }
diff --git a/jdk/src/macosx/native/sun/awt/CDropTarget.m b/jdk/src/macosx/native/sun/awt/CDropTarget.m
index 260bbde..a1c47f8 100644
--- a/jdk/src/macosx/native/sun/awt/CDropTarget.m
+++ b/jdk/src/macosx/native/sun/awt/CDropTarget.m
@@ -477,6 +477,8 @@
         sDraggingExited = FALSE;
         sDraggingLocation = [sender draggingLocation];
         NSPoint javaLocation = [fView convertPoint:sDraggingLocation fromView:nil];
+        javaLocation.y = fView.window.frame.size.height - javaLocation.y;
+
         DLog5(@"+ dragEnter: loc native %f, %f, java %f, %f\n", sDraggingLocation.x, sDraggingLocation.y, javaLocation.x, javaLocation.y);
 
                 ////////// BEGIN Calculate the current drag actions //////////
@@ -570,8 +572,7 @@
     // Should we notify Java things have changed?
     if (sDraggingError == FALSE && notifyJava) {
         NSPoint javaLocation = [fView convertPoint:sDraggingLocation fromView:nil];
-                // For some reason even after the convertPoint drag events come with the y coordinate reverted
-                javaLocation.y = fView.window.frame.size.height - javaLocation.y;
+        javaLocation.y = fView.window.frame.size.height - javaLocation.y;
         //DLog5(@"  : dragMoved: loc native %f, %f, java %f, %f\n", sDraggingLocation.x, sDraggingLocation.y, javaLocation.x, javaLocation.y);
 
         jlongArray formats = sDraggingFormats;
diff --git a/jdk/src/macosx/native/sun/awt/CFileDialog.m b/jdk/src/macosx/native/sun/awt/CFileDialog.m
index be7cadc..74ea1fb 100644
--- a/jdk/src/macosx/native/sun/awt/CFileDialog.m
+++ b/jdk/src/macosx/native/sun/awt/CFileDialog.m
@@ -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
@@ -93,6 +93,14 @@
 - (void)safeSaveOrLoad {
     NSSavePanel *thePanel = nil;
 
+    /* 
+     * 8013553: turns off extension hiding for the native file dialog.
+     * This way is used because setExtensionHidden(NO) doesn't work
+     * as expected.
+     */
+    NSUserDefaults *defaults = [NSUserDefaults standardUserDefaults];
+    [defaults setBool:NO forKey:@"NSNavLastUserSetHideExtensionButtonState"];
+
     if (fMode == java_awt_FileDialog_SAVE) {
         thePanel = [NSSavePanel savePanel];
         [thePanel setAllowsOtherFileTypes:YES];
@@ -110,7 +118,7 @@
         if (fMode == java_awt_FileDialog_LOAD) {
             NSOpenPanel *openPanel = (NSOpenPanel *)thePanel;
             [openPanel setAllowsMultipleSelection:fMultipleMode];
-            [openPanel setCanChooseFiles:YES];
+            [openPanel setCanChooseFiles:!fChooseDirectories];
             [openPanel setCanChooseDirectories:fChooseDirectories];
             [openPanel setCanCreateDirectories:YES];
         }
diff --git a/jdk/src/macosx/native/sun/awt/CWrapper.m b/jdk/src/macosx/native/sun/awt/CWrapper.m
index ccc688e..a658a5d 100644
--- a/jdk/src/macosx/native/sun/awt/CWrapper.m
+++ b/jdk/src/macosx/native/sun/awt/CWrapper.m
@@ -437,6 +437,29 @@
 
 /*
  * Class:     sun_lwawt_macosx_CWrapper$NSWindow
+ * Method:    isZoomed
+ * Signature: (J)Z
+ */
+JNIEXPORT jboolean JNICALL
+Java_sun_lwawt_macosx_CWrapper_00024NSWindow_isZoomed
+(JNIEnv *env, jclass cls, jlong windowPtr)
+{
+    __block jboolean isZoomed = JNI_FALSE;
+    
+JNF_COCOA_ENTER(env);
+    
+    NSWindow *window = (NSWindow *)jlong_to_ptr(windowPtr);
+    [ThreadUtilities performOnMainThreadWaiting:YES block:^(){
+        isZoomed = [window isZoomed];
+    }];
+    
+JNF_COCOA_EXIT(env);
+    
+    return isZoomed;
+}
+
+/*
+ * Class:     sun_lwawt_macosx_CWrapper$NSWindow
  * Method:    zoom
  * Signature: (J)V
  */
diff --git a/jdk/src/macosx/native/sun/awt/awt.m b/jdk/src/macosx/native/sun/awt/awt.m
index 5e7942a..e730a5c 100644
--- a/jdk/src/macosx/native/sun/awt/awt.m
+++ b/jdk/src/macosx/native/sun/awt/awt.m
@@ -227,7 +227,7 @@
     id jrsAppKitAWTClass = objc_getClass("JRSAppKitAWT");
     SEL markAppSel = @selector(markAppIsDaemon);
     if (![jrsAppKitAWTClass respondsToSelector:markAppSel]) return NO;
-    return (BOOL)[jrsAppKitAWTClass performSelector:markAppSel];
+    return [jrsAppKitAWTClass performSelector:markAppSel] ? YES : NO;
 }
 
 + (void)appKitIsRunning:(id)arg {
@@ -337,6 +337,8 @@
 
     // Headless mode trumps either ordinary AWT or SWT-in-AWT mode.  Declare us a daemon and return.
     if (headless) {
+        // Note that we don't install run loop observers in headless mode
+        // because we don't need them (see 7174704)
         if (!forceEmbeddedMode) {
             setUpAppKitThreadName();
         }
diff --git a/jdk/src/share/classes/com/sun/crypto/provider/SunJCE.java b/jdk/src/share/classes/com/sun/crypto/provider/SunJCE.java
index af828e2..08e1e2a 100644
--- a/jdk/src/share/classes/com/sun/crypto/provider/SunJCE.java
+++ b/jdk/src/share/classes/com/sun/crypto/provider/SunJCE.java
@@ -104,7 +104,7 @@
 
     public SunJCE() {
         /* We are the "SunJCE" provider */
-        super("SunJCE", 1.7d, info);
+        super("SunJCE", 1.8d, info);
 
         final String BLOCK_MODES = "ECB|CBC|PCBC|CTR|CTS|CFB|OFB" +
             "|CFB8|CFB16|CFB24|CFB32|CFB40|CFB48|CFB56|CFB64" +
diff --git a/jdk/src/share/classes/com/sun/imageio/plugins/bmp/BMPCompressionTypes.java b/jdk/src/share/classes/com/sun/imageio/plugins/bmp/BMPCompressionTypes.java
new file mode 100644
index 0000000..c61beee
--- /dev/null
+++ b/jdk/src/share/classes/com/sun/imageio/plugins/bmp/BMPCompressionTypes.java
@@ -0,0 +1,47 @@
+/*
+ * 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 com.sun.imageio.plugins.bmp;
+
+public class BMPCompressionTypes {
+
+    private static final String[] compressionTypeNames =
+        {"BI_RGB", "BI_RLE8", "BI_RLE4", "BI_BITFIELDS", "BI_JPEG", "BI_PNG"};
+
+    static int getType(String typeString) {
+        for (int i = 0; i < compressionTypeNames.length; i++)
+            if (compressionTypeNames[i].equals(typeString))
+                return i;
+        return 0;
+    }
+
+    static String getName(int type) {
+        return compressionTypeNames[type];
+    }
+
+    public static String[] getCompressionTypes() {
+        return compressionTypeNames.clone();
+    }
+}
diff --git a/jdk/src/share/classes/com/sun/imageio/plugins/bmp/BMPConstants.java b/jdk/src/share/classes/com/sun/imageio/plugins/bmp/BMPConstants.java
index 7934eaf..b99d284 100644
--- a/jdk/src/share/classes/com/sun/imageio/plugins/bmp/BMPConstants.java
+++ b/jdk/src/share/classes/com/sun/imageio/plugins/bmp/BMPConstants.java
@@ -47,7 +47,4 @@
     static final int BI_BITFIELDS = 3;
     static final int BI_JPEG = 4;
     static final int BI_PNG = 5;
-
-    static final String[] compressionTypeNames =
-        {"BI_RGB", "BI_RLE8", "BI_RLE4", "BI_BITFIELDS", "BI_JPEG", "BI_PNG"};
 }
diff --git a/jdk/src/share/classes/com/sun/imageio/plugins/bmp/BMPImageWriter.java b/jdk/src/share/classes/com/sun/imageio/plugins/bmp/BMPImageWriter.java
index bfed710..5d1241e 100644
--- a/jdk/src/share/classes/com/sun/imageio/plugins/bmp/BMPImageWriter.java
+++ b/jdk/src/share/classes/com/sun/imageio/plugins/bmp/BMPImageWriter.java
@@ -25,7 +25,6 @@
 
 package com.sun.imageio.plugins.bmp;
 
-import java.awt.Point;
 import java.awt.Rectangle;
 import java.awt.image.ColorModel;
 import java.awt.image.ComponentSampleModel;
@@ -42,7 +41,6 @@
 import java.awt.image.RenderedImage;
 import java.awt.image.SampleModel;
 import java.awt.image.SinglePixelPackedSampleModel;
-import java.awt.image.WritableRaster;
 import java.awt.image.BufferedImage;
 
 import java.io.IOException;
@@ -51,22 +49,16 @@
 import java.util.Iterator;
 
 import javax.imageio.IIOImage;
-import javax.imageio.IIOException;
 import javax.imageio.ImageIO;
 import javax.imageio.ImageTypeSpecifier;
 import javax.imageio.ImageWriteParam;
 import javax.imageio.ImageWriter;
 import javax.imageio.metadata.IIOMetadata;
-import javax.imageio.metadata.IIOMetadataNode;
-import javax.imageio.metadata.IIOMetadataFormatImpl;
-import javax.imageio.metadata.IIOInvalidTreeException;
 import javax.imageio.spi.ImageWriterSpi;
 import javax.imageio.stream.ImageOutputStream;
 import javax.imageio.event.IIOWriteProgressListener;
 import javax.imageio.event.IIOWriteWarningListener;
 
-import org.w3c.dom.Node;
-import org.w3c.dom.NodeList;
 
 import javax.imageio.plugins.bmp.BMPImageWriteParam;
 import com.sun.imageio.plugins.common.ImageUtil;
@@ -129,7 +121,7 @@
         meta.compression = getPreferredCompressionType(imageType);
         if (param != null
             && param.getCompressionMode() == ImageWriteParam.MODE_EXPLICIT) {
-            meta.compression = getCompressionType(param.getCompressionType());
+            meta.compression = BMPCompressionTypes.getType(param.getCompressionType());
         }
         meta.bitsPerPixel = (short)imageType.getColorModel().getPixelSize();
         return meta;
@@ -308,7 +300,7 @@
 
         switch(bmpParam.getCompressionMode()) {
         case ImageWriteParam.MODE_EXPLICIT:
-            compressionType = getCompressionType(bmpParam.getCompressionType());
+            compressionType = BMPCompressionTypes.getType(bmpParam.getCompressionType());
             break;
         case ImageWriteParam.MODE_COPY_FROM_METADATA:
             compressionType = bmpImageMetadata.compression;
@@ -323,12 +315,12 @@
 
         if (!canEncodeImage(compressionType, colorModel, sampleModel)) {
             throw new IOException("Image can not be encoded with compression type "
-                                  + compressionTypeNames[compressionType]);
+                                  + BMPCompressionTypes.getName(compressionType));
         }
 
         byte r[] = null, g[] = null, b[] = null, a[] = null;
 
-        if (compressionType == BMPConstants.BI_BITFIELDS) {
+        if (compressionType == BI_BITFIELDS) {
             bitsPerPixel =
                 DataBuffer.getDataTypeSize(sampleModel.getDataType());
 
@@ -372,7 +364,7 @@
                     // an exception related to unsupported image format
                     throw new IOException("Image can not be encoded with " +
                                           "compression type " +
-                                          compressionTypeNames[compressionType]);
+                                          BMPCompressionTypes.getName(compressionType));
                 }
             }
             writeMaskToPalette(rmask, 0, r, g, b, a);
@@ -511,8 +503,8 @@
          * Images with any other compression type must be wrote in the
          * bottom-up layout.
          */
-        if (compressionType == BMPConstants.BI_RGB ||
-            compressionType == BMPConstants.BI_BITFIELDS)
+        if (compressionType == BI_RGB ||
+            compressionType == BI_BITFIELDS)
         {
             isTopDown = bmpParam.isTopDown();
         } else {
@@ -543,7 +535,7 @@
         if (isPalette == true) {
 
             // write palette
-            if (compressionType == BMPConstants.BI_BITFIELDS) {
+            if (compressionType == BI_BITFIELDS) {
                 // write masks for red, green and blue components.
                 for (int i=0; i<3; i++) {
                     int mask = (a[i]&0xFF) + ((r[i]&0xFF)*0x100) + ((g[i]&0xFF)*0x10000) + ((b[i]&0xFF)*0x1000000);
@@ -571,8 +563,8 @@
 
         int l;
 
-        if (compressionType == BMPConstants.BI_JPEG ||
-            compressionType == BMPConstants.BI_PNG) {
+        if (compressionType == BI_JPEG ||
+            compressionType == BI_PNG) {
 
             // prepare embedded buffer
             embedded_stream = new ByteArrayOutputStream();
@@ -657,7 +649,7 @@
                     pos = sppsm.getOffset(startX, startY);
                 }
 
-                if (compressionType == BMPConstants.BI_RGB || compressionType == BMPConstants.BI_BITFIELDS){
+                if (compressionType == BI_RGB || compressionType == BI_BITFIELDS){
                     switch(dataType) {
                     case DataBuffer.TYPE_BYTE:
                         byte[] bdata =
@@ -687,7 +679,7 @@
                     for(int k=0; k<padding; k++) {
                         stream.writeByte(0);
                     }
-                } else if (compressionType == BMPConstants.BI_RLE4) {
+                } else if (compressionType == BI_RLE4) {
                     if (bpixels == null || bpixels.length < scanlineBytes)
                         bpixels = new byte[scanlineBytes];
                     src.getPixels(srcRect.x, srcRect.y,
@@ -696,7 +688,7 @@
                         bpixels[h] = (byte)pixels[h];
                     }
                     encodeRLE4(bpixels, scanlineBytes);
-                } else if (compressionType == BMPConstants.BI_RLE8) {
+                } else if (compressionType == BI_RLE8) {
                     //byte[] bdata =
                     //    ((DataBufferByte)src.getDataBuffer()).getData();
                     //System.out.println("bdata.length="+bdata.length);
@@ -734,8 +726,8 @@
             processImageProgress(100.0f * (((float)i) / ((float)h)));
         }
 
-        if (compressionType == BMPConstants.BI_RLE4 ||
-            compressionType == BMPConstants.BI_RLE8) {
+        if (compressionType == BI_RLE4 ||
+            compressionType == BI_RLE8) {
             // Write the RLE EOF marker and
             stream.writeByte(0);
             stream.writeByte(1);
@@ -793,7 +785,7 @@
             break;
 
         case 4:
-            if (compressionType == BMPConstants.BI_RLE4){
+            if (compressionType == BI_RLE4){
                 byte[] bipixels = new byte[scanlineBytes];
                 for (int h=0; h<scanlineBytes; h++) {
                     bipixels[h] = (byte)pixels[l++];
@@ -814,7 +806,7 @@
             break;
 
         case 8:
-            if(compressionType == BMPConstants.BI_RLE8) {
+            if(compressionType == BI_RLE8) {
                 for (int h=0; h<scanlineBytes; h++) {
                     bpixels[h] = (byte)pixels[l++];
                 }
@@ -841,7 +833,7 @@
              */
             for (int j = 0, m = 0; j < scanlineBytes; m++) {
                 spixels[m] = 0;
-                if (compressionType == BMPConstants.BI_RGB) {
+                if (compressionType == BI_RGB) {
                     /*
                      * please note that despite other cases,
                      * the 16bpp BI_RGB requires the RGB data order
@@ -910,7 +902,7 @@
                  */
                 for (int j = 0, m = 0; j < scanlineBytes; m++) {
                     ipixels[m] = 0;
-                    if (compressionType == BMPConstants.BI_RGB) {
+                    if (compressionType == BI_RGB) {
                         ipixels[m] =
                             ((0xff & pixels[j + 2]) << 16) |
                             ((0xff & pixels[j + 1]) <<  8) |
@@ -945,8 +937,8 @@
         }
 
         // Write out the padding
-        if (compressionType == BMPConstants.BI_RGB ||
-            compressionType == BMPConstants.BI_BITFIELDS)
+        if (compressionType == BI_RGB ||
+            compressionType == BI_BITFIELDS)
         {
             for(k=0; k<padding; k++) {
                 stream.writeByte(0);
@@ -1329,17 +1321,10 @@
         stream = null;
     }
 
-    private int getCompressionType(String typeString) {
-        for (int i = 0; i < BMPConstants.compressionTypeNames.length; i++)
-            if (BMPConstants.compressionTypeNames[i].equals(typeString))
-                return i;
-        return 0;
-    }
-
     private void writeEmbedded(IIOImage image,
                                ImageWriteParam bmpParam) throws IOException {
         String format =
-            compressionType == BMPConstants.BI_JPEG ? "jpeg" : "png";
+            compressionType == BI_JPEG ? "jpeg" : "png";
         Iterator iterator = ImageIO.getImageWritersByFormatName(format);
         ImageWriter writer = null;
         if (iterator.hasNext())
diff --git a/jdk/src/share/classes/com/sun/imageio/plugins/bmp/BMPMetadata.java b/jdk/src/share/classes/com/sun/imageio/plugins/bmp/BMPMetadata.java
index 0a809ba..7f7d33f 100644
--- a/jdk/src/share/classes/com/sun/imageio/plugins/bmp/BMPMetadata.java
+++ b/jdk/src/share/classes/com/sun/imageio/plugins/bmp/BMPMetadata.java
@@ -219,7 +219,7 @@
 
         // CompressionTypeName
         IIOMetadataNode subNode = new IIOMetadataNode("CompressionTypeName");
-        subNode.setAttribute("value", compressionTypeNames[compression]);
+        subNode.setAttribute("value", BMPCompressionTypes.getName(compression));
         node.appendChild(subNode);
         return node;
     }
diff --git a/jdk/src/share/classes/com/sun/imageio/plugins/gif/GIFStreamMetadata.java b/jdk/src/share/classes/com/sun/imageio/plugins/gif/GIFStreamMetadata.java
index c4f9b64..03241cd 100644
--- a/jdk/src/share/classes/com/sun/imageio/plugins/gif/GIFStreamMetadata.java
+++ b/jdk/src/share/classes/com/sun/imageio/plugins/gif/GIFStreamMetadata.java
@@ -25,11 +25,8 @@
 
 package com.sun.imageio.plugins.gif;
 
-import javax.imageio.ImageTypeSpecifier;
 import javax.imageio.metadata.IIOInvalidTreeException;
-import javax.imageio.metadata.IIOMetadata;
 import javax.imageio.metadata.IIOMetadataNode;
-import javax.imageio.metadata.IIOMetadataFormat;
 import javax.imageio.metadata.IIOMetadataFormatImpl;
 import org.w3c.dom.Node;
 
@@ -41,7 +38,7 @@
     static final String
         nativeMetadataFormatName = "javax_imageio_gif_stream_1.0";
 
-    public static final String[] versionStrings = { "87a", "89a" };
+    static final String[] versionStrings = { "87a", "89a" };
 
     public String version; // 87a or 89a
     public int logicalScreenWidth;
@@ -52,7 +49,7 @@
     public int backgroundColorIndex; // Valid if globalColorTable != null
     public boolean sortFlag; // Valid if globalColorTable != null
 
-    public static final String[] colorTableSizes = {
+    static final String[] colorTableSizes = {
         "2", "4", "8", "16", "32", "64", "128", "256"
     };
 
diff --git a/jdk/src/share/classes/com/sun/imageio/plugins/jpeg/JPEG.java b/jdk/src/share/classes/com/sun/imageio/plugins/jpeg/JPEG.java
index 64ffe69..6a1058f 100644
--- a/jdk/src/share/classes/com/sun/imageio/plugins/jpeg/JPEG.java
+++ b/jdk/src/share/classes/com/sun/imageio/plugins/jpeg/JPEG.java
@@ -25,14 +25,11 @@
 
 package com.sun.imageio.plugins.jpeg;
 
-import javax.imageio.metadata.IIOMetadataFormatImpl;
 import javax.imageio.ImageTypeSpecifier;
 import javax.imageio.plugins.jpeg.JPEGQTable;
 import javax.imageio.plugins.jpeg.JPEGHuffmanTable;
 
 import java.awt.image.ColorModel;
-import java.awt.image.BufferedImage;
-import java.awt.image.DataBuffer;
 import java.awt.color.ColorSpace;
 import java.awt.color.ICC_ColorSpace;
 
@@ -172,9 +169,9 @@
     public static final String vendor = "Oracle Corporation";
     public static final String version = "0.5";
     // Names of the formats we can read or write
-    public static final String [] names = {"JPEG", "jpeg", "JPG", "jpg"};
-    public static final String [] suffixes = {"jpg", "jpeg"};
-    public static final String [] MIMETypes = {"image/jpeg"};
+    static final String [] names = {"JPEG", "jpeg", "JPG", "jpg"};
+    static final String [] suffixes = {"jpg", "jpeg"};
+    static final String [] MIMETypes = {"image/jpeg"};
     public static final String nativeImageMetadataFormatName =
         "javax_imageio_jpeg_image_1.0";
     public static final String nativeImageMetadataFormatClassName =
@@ -201,12 +198,12 @@
     public static final int NUM_JCS_CODES = JCS_YCCK+1;
 
     /** IJG can handle up to 4-channel JPEGs */
-    public static final int [] [] bandOffsets = {{0},
+    static final int [] [] bandOffsets = {{0},
                                           {0, 1},
                                           {0, 1, 2},
                                           {0, 1, 2, 3}};
 
-    public static final int [] bOffsRGB = { 2, 1, 0 };
+    static final int [] bOffsRGB = { 2, 1, 0 };
 
     /* These are kept in the inner class to avoid static initialization
      * of the CMM class until someone actually needs it.
diff --git a/jdk/src/share/classes/com/sun/imageio/plugins/png/PNGMetadata.java b/jdk/src/share/classes/com/sun/imageio/plugins/png/PNGMetadata.java
index 1a326db..41392c5 100644
--- a/jdk/src/share/classes/com/sun/imageio/plugins/png/PNGMetadata.java
+++ b/jdk/src/share/classes/com/sun/imageio/plugins/png/PNGMetadata.java
@@ -29,12 +29,10 @@
 import java.awt.image.IndexColorModel;
 import java.awt.image.SampleModel;
 import java.util.ArrayList;
-import java.util.Iterator;
 import java.util.StringTokenizer;
 import javax.imageio.ImageTypeSpecifier;
 import javax.imageio.metadata.IIOInvalidTreeException;
 import javax.imageio.metadata.IIOMetadata;
-import javax.imageio.metadata.IIOMetadataFormat;
 import javax.imageio.metadata.IIOMetadataFormatImpl;
 import javax.imageio.metadata.IIOMetadataNode;
 import org.w3c.dom.Node;
@@ -49,42 +47,42 @@
         = "com.sun.imageio.plugins.png.PNGMetadataFormat";
 
     // Color types for IHDR chunk
-    public static final String[] IHDR_colorTypeNames = {
+    static final String[] IHDR_colorTypeNames = {
         "Grayscale", null, "RGB", "Palette",
         "GrayAlpha", null, "RGBAlpha"
     };
 
-    public static final int[] IHDR_numChannels = {
+    static final int[] IHDR_numChannels = {
         1, 0, 3, 3, 2, 0, 4
     };
 
     // Bit depths for IHDR chunk
-    public static final String[] IHDR_bitDepths = {
+    static final String[] IHDR_bitDepths = {
         "1", "2", "4", "8", "16"
     };
 
     // Compression methods for IHDR chunk
-    public static final String[] IHDR_compressionMethodNames = {
+    static final String[] IHDR_compressionMethodNames = {
         "deflate"
     };
 
     // Filter methods for IHDR chunk
-    public static final String[] IHDR_filterMethodNames = {
+    static final String[] IHDR_filterMethodNames = {
         "adaptive"
     };
 
     // Interlace methods for IHDR chunk
-    public static final String[] IHDR_interlaceMethodNames = {
+    static final String[] IHDR_interlaceMethodNames = {
         "none", "adam7"
     };
 
     // Compression methods for iCCP chunk
-    public static final String[] iCCP_compressionMethodNames = {
+    static final String[] iCCP_compressionMethodNames = {
         "deflate"
     };
 
     // Compression methods for zTXt chunk
-    public static final String[] zTXt_compressionMethodNames = {
+    static final String[] zTXt_compressionMethodNames = {
         "deflate"
     };
 
@@ -95,12 +93,12 @@
     public static final int PHYS_UNIT_METER = 1;
 
     // Unit specifiers for pHYs chunk
-    public static final String[] unitSpecifierNames = {
+    static final String[] unitSpecifierNames = {
         "unknown", "meter"
     };
 
     // Rendering intents for sRGB chunk
-    public static final String[] renderingIntentNames = {
+    static final String[] renderingIntentNames = {
         "Perceptual", // 0
         "Relative colorimetric", // 1
         "Saturation", // 2
@@ -109,7 +107,7 @@
     };
 
     // Color space types for Chroma->ColorSpaceType node
-    public static final String[] colorSpaceTypeNames = {
+    static final String[] colorSpaceTypeNames = {
         "GRAY", null, "RGB", "RGB",
         "GRAY", null, "RGB"
     };
diff --git a/jdk/src/share/classes/com/sun/imageio/plugins/wbmp/WBMPImageReaderSpi.java b/jdk/src/share/classes/com/sun/imageio/plugins/wbmp/WBMPImageReaderSpi.java
index 38fb6d7..95d572f 100644
--- a/jdk/src/share/classes/com/sun/imageio/plugins/wbmp/WBMPImageReaderSpi.java
+++ b/jdk/src/share/classes/com/sun/imageio/plugins/wbmp/WBMPImageReaderSpi.java
@@ -85,42 +85,42 @@
         ImageInputStream stream = (ImageInputStream)source;
 
         stream.mark();
-        int type = stream.readByte();   // TypeField
-        int fixHeaderField = stream.readByte();
-        // check WBMP "header"
-        if (type != 0 || fixHeaderField != 0) {
-            // while WBMP reader does not support ext WBMP headers
+        try {
+            int type = stream.readByte();   // TypeField
+            int fixHeaderField = stream.readByte();
+            // check WBMP "header"
+            if (type != 0 || fixHeaderField != 0) {
+                // while WBMP reader does not support ext WBMP headers
+                return false;
+            }
+
+            int width = ReaderUtil.readMultiByteInteger(stream);
+            int height = ReaderUtil.readMultiByteInteger(stream);
+            // check image dimension
+            if (width <= 0 || height <= 0) {
+                return false;
+            }
+
+            long dataLength = stream.length();
+            if (dataLength == -1) {
+                // We can't verify that amount of data in the stream
+                // corresponds to image dimension because we do not know
+                // the length of the data stream.
+                // Assuming that wbmp image are used for mobile devices,
+                // let's introduce an upper limit for image dimension.
+                // In case if exact amount of raster data is unknown,
+                // let's reject images with dimension above the limit.
+                return (width < MAX_WBMP_WIDTH) && (height < MAX_WBMP_HEIGHT);
+            }
+
+            dataLength -= stream.getStreamPosition();
+
+            long scanSize = (width / 8) + ((width % 8) == 0 ? 0 : 1);
+
+            return (dataLength == scanSize * height);
+        } finally {
             stream.reset();
-            return false;
         }
-
-        int width = ReaderUtil.readMultiByteInteger(stream);
-        int height = ReaderUtil.readMultiByteInteger(stream);
-        // check image dimension
-        if (width <= 0 || height <= 0) {
-            stream.reset();
-            return false;
-        }
-
-        long dataLength = stream.length();
-        if (dataLength == -1) {
-            // We can't verify that amount of data in the stream
-            // corresponds to image dimension because we do not know
-            // the length of the data stream.
-            // Assuming that wbmp image are used for mobile devices,
-            // let's introduce an upper limit for image dimension.
-            // In case if exact amount of raster data is unknown,
-            // let's reject images with dimension above the limit.
-            stream.reset();
-            return (width < MAX_WBMP_WIDTH) && (height < MAX_WBMP_HEIGHT);
-        }
-
-        dataLength -= stream.getStreamPosition();
-        stream.reset();
-
-        long scanSize = (width / 8) + ((width % 8) == 0 ? 0 : 1);
-
-        return (dataLength == scanSize * height);
     }
 
     public ImageReader createReaderInstance(Object extension)
diff --git a/jdk/src/share/classes/com/sun/java/util/jar/pack/Driver.java b/jdk/src/share/classes/com/sun/java/util/jar/pack/Driver.java
index 7ecbca0..c0393d3 100644
--- a/jdk/src/share/classes/com/sun/java/util/jar/pack/Driver.java
+++ b/jdk/src/share/classes/com/sun/java/util/jar/pack/Driver.java
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2003, 2012, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2003, 2013, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -303,7 +303,7 @@
                 } else {
                     if (!packfile.toLowerCase().endsWith(".pack") &&
                             !packfile.toLowerCase().endsWith(".pac")) {
-                        System.err.println(MessageFormat.format(RESOURCE.getString(DriverResource.WIRTE_PACKGZ_FILE),packfile));
+                        System.err.println(MessageFormat.format(RESOURCE.getString(DriverResource.WRITE_PACKGZ_FILE),packfile));
                         printUsage(doPack, false, System.err);
                         System.exit(2);
                     }
diff --git a/jdk/src/share/classes/com/sun/java/util/jar/pack/DriverResource.java b/jdk/src/share/classes/com/sun/java/util/jar/pack/DriverResource.java
index 050f8d7..48a0122 100644
--- a/jdk/src/share/classes/com/sun/java/util/jar/pack/DriverResource.java
+++ b/jdk/src/share/classes/com/sun/java/util/jar/pack/DriverResource.java
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2005, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2005, 2013, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -22,110 +22,99 @@
  * or visit www.oracle.com if you need additional information or have any
  * questions.
  */
-
 package com.sun.java.util.jar.pack;
 
 import java.util.ListResourceBundle;
 
 public class DriverResource extends ListResourceBundle {
-        public static final String VERSION ="VERSION";
-        public static final String BAD_ARGUMENT ="BAD_ARGUMENT";
-        public static final String BAD_OPTION ="BAD_OPTION";
-        public static final String BAD_REPACK_OUTPUT="BAD_REPACK_OUTPUT";
-        public static final String DETECTED_ZIP_COMMENT="DETECTED_ZIP_COMMENT";
-        public static final String SKIP_FOR_REPACKED ="SKIP_FOR_REPACKED";
-        public static final String WRITE_PACK_FILE ="WRITE_PACK_FILE";
-        public static final String WIRTE_PACKGZ_FILE="WIRTE_PACKGZ_FILE";
-        public static final String SKIP_FOR_MOVE_FAILED="SKIP_FOR_MOVE_FAILED";
-        public static final String PACK_HELP="PACK_HELP";
-        public static final String UNPACK_HELP ="UNPACK_HELP";
-        public static final String MORE_INFO = "MORE_INFO";
-        public static final String DUPLICATE_OPTION = "DUPLICATE_OPTION";
-        public static final String BAD_SPEC = "BAD_SPEC";
 
-        //The following string is duplicate in PACK and UNPACK comment,which was draw out to ruduce translation work.
-        private static final String PARAMETER_V = "  -v, --verbose                   increase program verbosity";
-        private static final String PARAMETER_Q = "  -q, --quiet                     set verbosity to lowest level";
-        private static final String PARAMETER_LF = "  -l{F}, --log-file={F}           output to the given log file, or '-' for System.out";
-        private static final String PARAMETER_H = "  -?, -h, --help                  print this message";
-        private static final String PARAMETER_VER = "  -V, --version                   print program version";
-        private static final String PARAMETER_J = "  -J{X}                           pass option X to underlying Java VM";
+    public static final String VERSION = "VERSION";
+    public static final String BAD_ARGUMENT = "BAD_ARGUMENT";
+    public static final String BAD_OPTION = "BAD_OPTION";
+    public static final String BAD_REPACK_OUTPUT = "BAD_REPACK_OUTPUT";
+    public static final String DETECTED_ZIP_COMMENT = "DETECTED_ZIP_COMMENT";
+    public static final String SKIP_FOR_REPACKED = "SKIP_FOR_REPACKED";
+    public static final String WRITE_PACK_FILE = "WRITE_PACK_FILE";
+    public static final String WRITE_PACKGZ_FILE = "WRITE_PACKGZ_FILE";
+    public static final String SKIP_FOR_MOVE_FAILED = "SKIP_FOR_MOVE_FAILED";
+    public static final String PACK_HELP = "PACK_HELP";
+    public static final String UNPACK_HELP = "UNPACK_HELP";
+    public static final String MORE_INFO = "MORE_INFO";
+    public static final String DUPLICATE_OPTION = "DUPLICATE_OPTION";
+    public static final String BAD_SPEC = "BAD_SPEC";
 
+    /*
+     * The following are the output of 'pack200' and 'unpack200' commands.
+     * Do not translate command arguments and words with a prefix of '-' or '--'.
+     */
+    private static final Object[][] resource = {
+        {VERSION, "{0} version {1}"}, // parameter 0:class name;parameter 1: version value
+        {BAD_ARGUMENT, "Bad argument: {0}"},
+        {BAD_OPTION, "Bad option: {0}={1}"}, // parameter 0:option name;parameter 1:option value
+        {BAD_REPACK_OUTPUT, "Bad --repack output: {0}"}, // parameter 0:filename
+        {DETECTED_ZIP_COMMENT, "Detected ZIP comment: {0}"}, // parameter 0:comment
+        {SKIP_FOR_REPACKED, "Skipping because already repacked: {0}"}, // parameter 0:filename
+        {WRITE_PACK_FILE, "To write a *.pack file, specify --no-gzip: {0}"}, // parameter 0:filename
+        {WRITE_PACKGZ_FILE, "To write a *.pack.gz file, specify --gzip: {0}"}, // parameter 0:filename
+        {SKIP_FOR_MOVE_FAILED, "Skipping unpack because move failed: {0}"}, // parameter 0:filename
+        {PACK_HELP, new String[] {
+                "Usage:  pack200 [-opt... | --option=value]... x.pack[.gz] y.jar",
+                "",
+                "Packing Options",
+                "  -g, --no-gzip                   output a plain *.pack file with no zipping",
+                "  --gzip                          (default) post-process the pack output with gzip",
+                "  -G, --strip-debug               remove debugging attributes while packing",
+                "  -O, --no-keep-file-order        do not transmit file ordering information",
+                "  --keep-file-order               (default) preserve input file ordering",
+                "  -S{N}, --segment-limit={N}      output segment limit (default N=1Mb)",
+                "  -E{N}, --effort={N}             packing effort (default N=5)",
+                "  -H{h}, --deflate-hint={h}       transmit deflate hint: true, false, or keep (default)",
+                "  -m{V}, --modification-time={V}  transmit modtimes: latest or keep (default)",
+                "  -P{F}, --pass-file={F}          transmit the given input element(s) uncompressed",
+                "  -U{a}, --unknown-attribute={a}  unknown attribute action: error, strip, or pass (default)",
+                "  -C{N}={L}, --class-attribute={N}={L}  (user-defined attribute)",
+                "  -F{N}={L}, --field-attribute={N}={L}  (user-defined attribute)",
+                "  -M{N}={L}, --method-attribute={N}={L} (user-defined attribute)",
+                "  -D{N}={L}, --code-attribute={N}={L}   (user-defined attribute)",
+                "  -f{F}, --config-file={F}        read file F for Pack200.Packer properties",
+                "  -v, --verbose                   increase program verbosity",
+                "  -q, --quiet                     set verbosity to lowest level",
+                "  -l{F}, --log-file={F}           output to the given log file, or '-' for System.out",
+                "  -?, -h, --help                  print this message",
+                "  -V, --version                   print program version",
+                "  -J{X}                           pass option X to underlying Java VM",
+                "",
+                "Notes:",
+                "  The -P, -C, -F, -M, and -D options accumulate.",
+                "  Example attribute definition:  -C SourceFile=RUH .",
+                "  Config. file properties are defined by the Pack200 API.",
+                "  For meaning of -S, -E, -H-, -m, -U values, see Pack200 API.",
+                "  Layout definitions (like RUH) are defined by JSR 200.",
+                "",
+                "Repacking mode updates the JAR file with a pack/unpack cycle:",
+                "    pack200 [-r|--repack] [-opt | --option=value]... [repackedy.jar] y.jar\n"
+            }
+        },
+        {UNPACK_HELP, new String[] {
+                "Usage:  unpack200 [-opt... | --option=value]... x.pack[.gz] y.jar\n",
+                "",
+                "Unpacking Options",
+                "  -H{h}, --deflate-hint={h}     override transmitted deflate hint: true, false, or keep (default)",
+                "  -r, --remove-pack-file        remove input file after unpacking",
+                "  -v, --verbose                 increase program verbosity",
+                "  -q, --quiet                   set verbosity to lowest level",
+                "  -l{F}, --log-file={F}         output to the given log file, or '-' for System.out",
+                "  -?, -h, --help                print this message",
+                "  -V, --version                 print program version",
+                "  -J{X}                         pass option X to underlying Java VM"
+            }
+        },
+        {MORE_INFO, "(For more information, run {0} --help .)"}, // parameter 0:command name
+        {DUPLICATE_OPTION, "duplicate option: {0}"}, // parameter 0:option
+        {BAD_SPEC, "bad spec for {0}: {1}"}, // parameter 0:option;parameter 1:specifier
+    };
 
-        //The following are outputs of command 'pack200' and 'unpack200'.
-        //Don't translate command arguments ,words with a prefix of '-' or '--'.
-        //
-        private static final Object[][] resource= {
-                {VERSION,"{0} version {1}"},//parameter 0:class name;parameter 1: version value
-                {BAD_ARGUMENT,"Bad argument: {0}"},
-                {BAD_OPTION,"Bad option: {0}={1}"},//parameter 0:option name;parameter 1:option value
-                {BAD_REPACK_OUTPUT,"Bad --repack output: {0}"},//parameter 0:filename
-                {DETECTED_ZIP_COMMENT,"Detected ZIP comment: {0}"},//parameter 0:comment
-                {SKIP_FOR_REPACKED,"Skipping because already repacked: {0}"},//parameter 0:filename
-                {WRITE_PACK_FILE,"To write a *.pack file, specify --no-gzip: {0}"},//parameter 0:filename
-                {WIRTE_PACKGZ_FILE,"To write a *.pack.gz file, specify --gzip: {0}"},//parameter 0:filename
-                {SKIP_FOR_MOVE_FAILED,"Skipping unpack because move failed: {0}"},//parameter 0:filename
-                {PACK_HELP,new String[]{
-                                "Usage:  pack200 [-opt... | --option=value]... x.pack[.gz] y.jar",
-                                "",
-                                "Packing Options",
-                                "  -g, --no-gzip                   output a plain *.pack file with no zipping",
-                                "  --gzip                          (default) post-process the pack output with gzip",
-                                "  -G, --strip-debug               remove debugging attributes while packing",
-                                "  -O, --no-keep-file-order        do not transmit file ordering information",
-                                "  --keep-file-order               (default) preserve input file ordering",
-                                "  -S{N}, --segment-limit={N}      output segment limit (default N=1Mb)",
-                                "  -E{N}, --effort={N}             packing effort (default N=5)",
-                                "  -H{h}, --deflate-hint={h}       transmit deflate hint: true, false, or keep (default)",
-                                "  -m{V}, --modification-time={V}  transmit modtimes: latest or keep (default)",
-                                "  -P{F}, --pass-file={F}          transmit the given input element(s) uncompressed",
-                                "  -U{a}, --unknown-attribute={a}  unknown attribute action: error, strip, or pass (default)",
-                                "  -C{N}={L}, --class-attribute={N}={L}  (user-defined attribute)",
-                                "  -F{N}={L}, --field-attribute={N}={L}  (user-defined attribute)",
-                                "  -M{N}={L}, --method-attribute={N}={L} (user-defined attribute)",
-                                "  -D{N}={L}, --code-attribute={N}={L}   (user-defined attribute)",
-                                "  -f{F}, --config-file={F}        read file F for Pack200.Packer properties",
-                                PARAMETER_V ,
-                                PARAMETER_Q ,
-                                PARAMETER_LF ,
-                                PARAMETER_H ,
-                                PARAMETER_VER ,
-                                PARAMETER_J,
-                                "",
-                                "Notes:",
-                                "  The -P, -C, -F, -M, and -D options accumulate.",
-                                "  Example attribute definition:  -C SourceFile=RUH .",
-                                "  Config. file properties are defined by the Pack200 API.",
-                                "  For meaning of -S, -E, -H-, -m, -U values, see Pack200 API.",
-                                "  Layout definitions (like RUH) are defined by JSR 200.",
-                                "",
-                                "Repacking mode updates the JAR file with a pack/unpack cycle:",
-                                "    pack200 [-r|--repack] [-opt | --option=value]... [repackedy.jar] y.jar\n"
-                                }
-                },
-                {UNPACK_HELP,new String[]{
-                                "Usage:  unpack200 [-opt... | --option=value]... x.pack[.gz] y.jar\n",
-                                "",
-                                "Unpacking Options",
-                                "  -H{h}, --deflate-hint={h}     override transmitted deflate hint: true, false, or keep (default)",
-                                "  -r, --remove-pack-file        remove input file after unpacking",
-                                PARAMETER_V ,
-                                PARAMETER_Q ,
-                                PARAMETER_LF ,
-                                PARAMETER_H ,
-                                PARAMETER_VER ,
-                                PARAMETER_J,
-                            }
-                },
-
-                {MORE_INFO,"(For more information, run {0} --help .)"},//parameter 0:command name
-                {DUPLICATE_OPTION,"duplicate option: {0}"},//parameter 0:option
-                {BAD_SPEC,"bad spec for {0}: {1}"},//parameter 0:option;parameter 1:specifier
-        };
-
-        protected Object[][] getContents() {
-                return resource;
-        }
-
-
+    protected Object[][] getContents() {
+        return resource;
+    }
 }
diff --git a/jdk/src/share/classes/com/sun/media/sound/JSSecurityManager.java b/jdk/src/share/classes/com/sun/media/sound/JSSecurityManager.java
index 280e92a..ef34bc4 100644
--- a/jdk/src/share/classes/com/sun/media/sound/JSSecurityManager.java
+++ b/jdk/src/share/classes/com/sun/media/sound/JSSecurityManager.java
@@ -187,9 +187,18 @@
 
     static <T> List<T> getProviders(final Class<T> providerClass) {
         List<T> p = new ArrayList<>();
-        // ServiceLoader creates "lazy" iterator instance, so it doesn't,
-        // require do be called from privileged section
-        final Iterator<T> ps = ServiceLoader.load(providerClass).iterator();
+        // ServiceLoader creates "lazy" iterator instance, but it ensures that
+        // next/hasNext run with permissions that are restricted by whatever
+        // creates the ServiceLoader instance, so it requires to be called from
+        // privileged section
+        final PrivilegedAction<Iterator<T>> psAction =
+                new PrivilegedAction<Iterator<T>>() {
+                    @Override
+                    public Iterator<T> run() {
+                        return ServiceLoader.load(providerClass).iterator();
+                    }
+                };
+        final Iterator<T> ps = AccessController.doPrivileged(psAction);
 
         // the iterator's hasNext() method looks through classpath for
         // the provider class names, so it requires read permissions
diff --git a/jdk/src/share/classes/com/sun/org/apache/xml/internal/security/keys/content/x509/XMLX509SKI.java b/jdk/src/share/classes/com/sun/org/apache/xml/internal/security/keys/content/x509/XMLX509SKI.java
index e4617da..6030c96 100644
--- a/jdk/src/share/classes/com/sun/org/apache/xml/internal/security/keys/content/x509/XMLX509SKI.java
+++ b/jdk/src/share/classes/com/sun/org/apache/xml/internal/security/keys/content/x509/XMLX509SKI.java
@@ -35,7 +35,7 @@
 /**
  * Handles SubjectKeyIdentifier (SKI) for X.509v3.
  *
- * @see <A HREF="http://java.sun.com/j2se/1.5.0/docs/api/java/security/cert/X509Extension.html">
+ * @see <A HREF="http://docs.oracle.com/javase/1.5.0/docs/api/java/security/cert/X509Extension.html">
  * Interface X509Extension</A>
  */
 public class XMLX509SKI extends SignatureElementProxy implements XMLX509DataContent {
diff --git a/jdk/src/share/classes/com/sun/org/apache/xml/internal/security/utils/resolver/implementations/ResolverDirectHTTP.java b/jdk/src/share/classes/com/sun/org/apache/xml/internal/security/utils/resolver/implementations/ResolverDirectHTTP.java
index cd09672..a3359bd 100644
--- a/jdk/src/share/classes/com/sun/org/apache/xml/internal/security/utils/resolver/implementations/ResolverDirectHTTP.java
+++ b/jdk/src/share/classes/com/sun/org/apache/xml/internal/security/utils/resolver/implementations/ResolverDirectHTTP.java
@@ -56,7 +56,7 @@
  * </PRE>
  *
  * @see <A HREF="http://www.javaworld.com/javaworld/javatips/jw-javatip42_p.html">Java Tip 42: Write Java apps that work with proxy-based firewalls</A>
- * @see <A HREF="http://java.sun.com/j2se/1.4/docs/guide/net/properties.html">SUN J2SE docs for network properties</A>
+ * @see <A HREF="http://docs.oracle.com/javase/1.4.2/docs/guide/net/properties.html">SUN J2SE docs for network properties</A>
  * @see <A HREF="http://metalab.unc.edu/javafaq/javafaq.html#proxy">The JAVA FAQ Question 9.5: How do I make Java work with a proxy server?</A>
  */
 public class ResolverDirectHTTP extends ResourceResolverSpi {
diff --git a/jdk/src/share/classes/com/sun/security/sasl/Provider.java b/jdk/src/share/classes/com/sun/security/sasl/Provider.java
index 8b9c00c..986a187 100644
--- a/jdk/src/share/classes/com/sun/security/sasl/Provider.java
+++ b/jdk/src/share/classes/com/sun/security/sasl/Provider.java
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2003, 2010, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2003, 2013, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -53,7 +53,7 @@
         " server mechanisms for: DIGEST-MD5, GSSAPI, CRAM-MD5, NTLM)";
 
     public Provider() {
-        super("SunSASL", 1.7d, info);
+        super("SunSASL", 1.8d, info);
 
         AccessController.doPrivileged(new PrivilegedAction<Void>() {
             public Void run() {
diff --git a/jdk/src/share/classes/java/applet/Applet.java b/jdk/src/share/classes/java/applet/Applet.java
index ff9389f..2e8e39a 100644
--- a/jdk/src/share/classes/java/applet/Applet.java
+++ b/jdk/src/share/classes/java/applet/Applet.java
@@ -143,11 +143,11 @@
      * For example, suppose an applet is contained
      * within the document:
      * <blockquote><pre>
-     *    http://java.sun.com/products/jdk/1.2/index.html
+     *    http://www.oracle.com/technetwork/java/index.html
      * </pre></blockquote>
      * The document base is:
      * <blockquote><pre>
-     *    http://java.sun.com/products/jdk/1.2/index.html
+     *    http://www.oracle.com/technetwork/java/index.html
      * </pre></blockquote>
      *
      * @return  the {@link java.net.URL} of the document that contains this
diff --git a/jdk/src/share/classes/java/applet/AppletStub.java b/jdk/src/share/classes/java/applet/AppletStub.java
index 0887a58..a1a31ad 100644
--- a/jdk/src/share/classes/java/applet/AppletStub.java
+++ b/jdk/src/share/classes/java/applet/AppletStub.java
@@ -54,11 +54,11 @@
      * For example, suppose an applet is contained
      * within the document:
      * <blockquote><pre>
-     *    http://java.sun.com/products/jdk/1.2/index.html
+     *    http://www.oracle.com/technetwork/java/index.html
      * </pre></blockquote>
      * The document base is:
      * <blockquote><pre>
-     *    http://java.sun.com/products/jdk/1.2/index.html
+     *    http://www.oracle.com/technetwork/java/index.html
      * </pre></blockquote>
      *
      * @return  the {@link java.net.URL} of the document that contains the
diff --git a/jdk/src/share/classes/java/awt/BorderLayout.java b/jdk/src/share/classes/java/awt/BorderLayout.java
index 9b86447..98bd4d5 100644
--- a/jdk/src/share/classes/java/awt/BorderLayout.java
+++ b/jdk/src/share/classes/java/awt/BorderLayout.java
@@ -96,7 +96,7 @@
  * alt="Diagram of an applet demonstrating BorderLayout.
  *      Each section of the BorderLayout contains a Button corresponding to its position in the layout, one of:
  *      North, West, Center, East, or South."
- * ALIGN=center HSPACE=10 VSPACE=7>
+ * style="float:center; margin: 7px 10px;">
  * <p>
  * The code for this applet is as follows:
  * <p>
diff --git a/jdk/src/share/classes/java/awt/Button.java b/jdk/src/share/classes/java/awt/Button.java
index 9fe42d4..83506b6 100644
--- a/jdk/src/share/classes/java/awt/Button.java
+++ b/jdk/src/share/classes/java/awt/Button.java
@@ -40,7 +40,7 @@
  * under the Solaris operating system:
  * <p>
  * <img src="doc-files/Button-1.gif" alt="The following context describes the graphic"
- * ALIGN=center HSPACE=10 VSPACE=7>
+ * style="float:center; margin: 7px 10px;">
  * <p>
  * The first view shows the button as it appears normally.
  * The second view shows the button
diff --git a/jdk/src/share/classes/java/awt/Checkbox.java b/jdk/src/share/classes/java/awt/Checkbox.java
index f0486f3..7568b0c5 100644
--- a/jdk/src/share/classes/java/awt/Checkbox.java
+++ b/jdk/src/share/classes/java/awt/Checkbox.java
@@ -53,7 +53,7 @@
  * created by this code example:
  * <p>
  * <img src="doc-files/Checkbox-1.gif" alt="The following context describes the graphic."
- * ALIGN=center HSPACE=10 VSPACE=7>
+ * style="float:center; margin: 7px 10px;">
  * <p>
  * The button labeled <code>one</code> is in the "on" state, and the
  * other two are in the "off" state. In this example, which uses the
diff --git a/jdk/src/share/classes/java/awt/CheckboxGroup.java b/jdk/src/share/classes/java/awt/CheckboxGroup.java
index e953daa..25b0697 100644
--- a/jdk/src/share/classes/java/awt/CheckboxGroup.java
+++ b/jdk/src/share/classes/java/awt/CheckboxGroup.java
@@ -48,7 +48,7 @@
  * <p>
  * <img src="doc-files/CheckboxGroup-1.gif"
  * alt="Shows three checkboxes, arranged vertically, labeled one, two, and three. Checkbox one is in the on state."
- * ALIGN=center HSPACE=10 VSPACE=7>
+ * style="float:center; margin: 7px 10px;">
  * <p>
  * @author      Sami Shaio
  * @see         java.awt.Checkbox
diff --git a/jdk/src/share/classes/java/awt/CheckboxMenuItem.java b/jdk/src/share/classes/java/awt/CheckboxMenuItem.java
index ad12d4c..4da887e 100644
--- a/jdk/src/share/classes/java/awt/CheckboxMenuItem.java
+++ b/jdk/src/share/classes/java/awt/CheckboxMenuItem.java
@@ -44,7 +44,7 @@
  * <p>
  * <img src="doc-files/MenuBar-1.gif"
  * alt="Menu labeled Examples, containing items Basic, Simple, Check, and More Examples. The Check item is a CheckBoxMenuItem instance, in the off state."
- * ALIGN=center HSPACE=10 VSPACE=7>
+ * style="float:center; margin: 7px 10px;">
  * <p>
  * The item labeled <code>Check</code> shows a check box menu item
  * in its "off" state.
diff --git a/jdk/src/share/classes/java/awt/Choice.java b/jdk/src/share/classes/java/awt/Choice.java
index e026953..e74bd09 100644
--- a/jdk/src/share/classes/java/awt/Choice.java
+++ b/jdk/src/share/classes/java/awt/Choice.java
@@ -52,7 +52,7 @@
  * it appears as follows in its normal state:
  * <p>
  * <img src="doc-files/Choice-1.gif" alt="The following text describes the graphic"
- * ALIGN=center HSPACE=10 VSPACE=7>
+ * style="float:center; margin: 7px 10px;">
  * <p>
  * In the picture, <code>"Green"</code> is the current choice.
  * Pushing the mouse button down on the object causes a menu to
diff --git a/jdk/src/share/classes/java/awt/Color.java b/jdk/src/share/classes/java/awt/Color.java
index 51d46a4..464fe98 100644
--- a/jdk/src/share/classes/java/awt/Color.java
+++ b/jdk/src/share/classes/java/awt/Color.java
@@ -823,7 +823,7 @@
      * <p>
      * The integer that is returned by <code>HSBtoRGB</code> encodes the
      * value of a color in bits 0-23 of an integer value that is the same
-     * format used by the method {@link #getRGB() <code>getRGB</code>}.
+     * format used by the method {@link #getRGB() getRGB}.
      * This integer can be supplied as an argument to the
      * <code>Color</code> constructor that takes a single integer argument.
      * @param     hue   the hue component of the color
diff --git a/jdk/src/share/classes/java/awt/Component.java b/jdk/src/share/classes/java/awt/Component.java
index 64a7538..f7e2fbd 100644
--- a/jdk/src/share/classes/java/awt/Component.java
+++ b/jdk/src/share/classes/java/awt/Component.java
@@ -173,10 +173,10 @@
  * <b>Note</b>: For more information on the paint mechanisms utilitized
  * by AWT and Swing, including information on how to write the most
  * efficient painting code, see
- * <a href="http://java.sun.com/products/jfc/tsc/articles/painting/index.html">Painting in AWT and Swing</a>.
+ * <a href="http://www.oracle.com/technetwork/java/painting-140037.html">Painting in AWT and Swing</a>.
  * <p>
  * For details on the focus subsystem, see
- * <a href="http://java.sun.com/docs/books/tutorial/uiswing/misc/focus.html">
+ * <a href="http://docs.oracle.com/javase/tutorial/uiswing/misc/focus.html">
  * How to Use the Focus Subsystem</a>,
  * a section in <em>The Java Tutorial</em>, and the
  * <a href="../../java/awt/doc-files/FocusSpec.html">Focus Specification</a>
@@ -1223,10 +1223,6 @@
      * be called on the toolkit thread.
      */
     final Toolkit getToolkitImpl() {
-        ComponentPeer peer = this.peer;
-        if ((peer != null) && ! (peer instanceof LightweightPeer)){
-            return peer.getToolkit();
-        }
         Container parent = this.parent;
         if (parent != null) {
             return parent.getToolkitImpl();
@@ -3205,7 +3201,7 @@
      * <b>Note</b>: For more information on the paint mechanisms utilitized
      * by AWT and Swing, including information on how to write the most
      * efficient painting code, see
-     * <a href="http://java.sun.com/products/jfc/tsc/articles/painting/index.html">Painting in AWT and Swing</a>.
+     * <a href="http://www.oracle.com/technetwork/java/painting-140037.html">Painting in AWT and Swing</a>.
      *
      * @param g the graphics context to use for painting
      * @see       #update
@@ -3240,7 +3236,7 @@
      * <b>Note</b>: For more information on the paint mechanisms utilitized
      * by AWT and Swing, including information on how to write the most
      * efficient painting code, see
-     * <a href="http://java.sun.com/products/jfc/tsc/articles/painting/index.html">Painting in AWT and Swing</a>.
+     * <a href="http://www.oracle.com/technetwork/java/painting-140037.html">Painting in AWT and Swing</a>.
      *
      * @param g the specified context to use for updating
      * @see       #paint
@@ -3301,7 +3297,7 @@
      * <b>Note</b>: For more information on the paint mechanisms utilitized
      * by AWT and Swing, including information on how to write the most
      * efficient painting code, see
-     * <a href="http://java.sun.com/products/jfc/tsc/articles/painting/index.html">Painting in AWT and Swing</a>.
+     * <a href="http://www.oracle.com/technetwork/java/painting-140037.html">Painting in AWT and Swing</a>.
 
      *
      * @see       #update(Graphics)
@@ -3319,7 +3315,7 @@
      * <b>Note</b>: For more information on the paint mechanisms utilitized
      * by AWT and Swing, including information on how to write the most
      * efficient painting code, see
-     * <a href="http://java.sun.com/products/jfc/tsc/articles/painting/index.html">Painting in AWT and Swing</a>.
+     * <a href="http://www.oracle.com/technetwork/java/painting-140037.html">Painting in AWT and Swing</a>.
      *
      * @param tm maximum time in milliseconds before update
      * @see #paint
@@ -3341,7 +3337,7 @@
      * <b>Note</b>: For more information on the paint mechanisms utilitized
      * by AWT and Swing, including information on how to write the most
      * efficient painting code, see
-     * <a href="http://java.sun.com/products/jfc/tsc/articles/painting/index.html">Painting in AWT and Swing</a>.
+     * <a href="http://www.oracle.com/technetwork/java/painting-140037.html">Painting in AWT and Swing</a>.
      *
      * @param     x   the <i>x</i> coordinate
      * @param     y   the <i>y</i> coordinate
@@ -3366,7 +3362,7 @@
      * <b>Note</b>: For more information on the paint mechanisms utilitized
      * by AWT and Swing, including information on how to write the most
      * efficient painting code, see
-     * <a href="http://java.sun.com/products/jfc/tsc/articles/painting/index.html">Painting in AWT and Swing</a>.
+     * <a href="http://www.oracle.com/technetwork/java/painting-140037.html">Painting in AWT and Swing</a>.
      *
      * @param     tm   maximum time in milliseconds before update
      * @param     x    the <i>x</i> coordinate
diff --git a/jdk/src/share/classes/java/awt/Container.java b/jdk/src/share/classes/java/awt/Container.java
index 14bd55d..82b682d 100644
--- a/jdk/src/share/classes/java/awt/Container.java
+++ b/jdk/src/share/classes/java/awt/Container.java
@@ -75,7 +75,7 @@
  * (and hence to the bottom of the stacking order).
  * <p>
  * <b>Note</b>: For details on the focus subsystem, see
- * <a href="http://java.sun.com/docs/books/tutorial/uiswing/misc/focus.html">
+ * <a href="http://docs.oracle.com/javase/tutorial/uiswing/misc/focus.html">
  * How to Use the Focus Subsystem</a>,
  * a section in <em>The Java Tutorial</em>, and the
  * <a href="../../java/awt/doc-files/FocusSpec.html">Focus Specification</a>
diff --git a/jdk/src/share/classes/java/awt/DefaultFocusTraversalPolicy.java b/jdk/src/share/classes/java/awt/DefaultFocusTraversalPolicy.java
index 0c30fe9..ae9dd91 100644
--- a/jdk/src/share/classes/java/awt/DefaultFocusTraversalPolicy.java
+++ b/jdk/src/share/classes/java/awt/DefaultFocusTraversalPolicy.java
@@ -54,7 +54,7 @@
  * impact, the focusability of the Component itself.
  * <p>
  * Please see
- * <a href="http://java.sun.com/docs/books/tutorial/uiswing/misc/focus.html">
+ * <a href="http://docs.oracle.com/javase/tutorial/uiswing/misc/focus.html">
  * How to Use the Focus Subsystem</a>,
  * a section in <em>The Java Tutorial</em>, and the
  * <a href="../../java/awt/doc-files/FocusSpec.html">Focus Specification</a>
diff --git a/jdk/src/share/classes/java/awt/DefaultKeyboardFocusManager.java b/jdk/src/share/classes/java/awt/DefaultKeyboardFocusManager.java
index 4e07f16..040e659 100644
--- a/jdk/src/share/classes/java/awt/DefaultKeyboardFocusManager.java
+++ b/jdk/src/share/classes/java/awt/DefaultKeyboardFocusManager.java
@@ -49,7 +49,7 @@
  * Container's FocusTraversalPolicy.
  * <p>
  * Please see
- * <a href="http://java.sun.com/docs/books/tutorial/uiswing/misc/focus.html">
+ * <a href="http://docs.oracle.com/javase/tutorial/uiswing/misc/focus.html">
  * How to Use the Focus Subsystem</a>,
  * a section in <em>The Java Tutorial</em>, and the
  * <a href="../../java/awt/doc-files/FocusSpec.html">Focus Specification</a>
diff --git a/jdk/src/share/classes/java/awt/DisplayMode.java b/jdk/src/share/classes/java/awt/DisplayMode.java
index c4bd095..71a5d7e 100644
--- a/jdk/src/share/classes/java/awt/DisplayMode.java
+++ b/jdk/src/share/classes/java/awt/DisplayMode.java
@@ -35,7 +35,7 @@
  * (see {@link GraphicsDevice#isDisplayChangeSupported}).
  * <p>
  * For more information on full-screen exclusive mode API, see the
- * <a href="http://java.sun.com/docs/books/tutorial/extra/fullscreen/index.html">
+ * <a href="http://docs.oracle.com/javase/tutorial/extra/fullscreen/index.html">
  * Full-Screen Exclusive Mode API Tutorial</a>.
  *
  * @see GraphicsDevice
diff --git a/jdk/src/share/classes/java/awt/EventQueue.java b/jdk/src/share/classes/java/awt/EventQueue.java
index 1a04dcb..d6a1dab 100644
--- a/jdk/src/share/classes/java/awt/EventQueue.java
+++ b/jdk/src/share/classes/java/awt/EventQueue.java
@@ -652,7 +652,7 @@
      * Dispatches an event. The manner in which the event is
      * dispatched depends upon the type of the event and the
      * type of the event's source object:
-     * <p> </p>
+     * <p>
      * <table border=1 summary="Event types, source types, and dispatch methods">
      * <tr>
      *     <th>Event Type</th>
@@ -680,7 +680,7 @@
      *     <td>No action (ignored)</td>
      * </tr>
      * </table>
-     * <p> </p>
+     * <p>
      * @param event an instance of <code>java.awt.AWTEvent</code>,
      *          or a subclass of it
      * @throws NullPointerException if <code>event</code> is <code>null</code>
diff --git a/jdk/src/share/classes/java/awt/FileDialog.java b/jdk/src/share/classes/java/awt/FileDialog.java
index 3739570..0fc63c7 100644
--- a/jdk/src/share/classes/java/awt/FileDialog.java
+++ b/jdk/src/share/classes/java/awt/FileDialog.java
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 1995, 2010, 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
@@ -457,9 +457,16 @@
      * specified file. This file becomes the default file if it is set
      * before the file dialog window is first shown.
      * <p>
+     * When the dialog is shown, the specified file is selected. The kind of
+     * selection depends on the file existence, the dialog type, and the native
+     * platform. E.g., the file could be highlighted in the file list, or a
+     * file name editbox could be populated with the file name.
+     * <p>
+     * This method accepts either a full file path, or a file name with an
+     * extension if used together with the {@code setDirectory} method.
+     * <p>
      * Specifying "" as the file is exactly equivalent to specifying
-     * <code>null</code>
-     * as the file.
+     * {@code null} as the file.
      *
      * @param    file   the file being set
      * @see      #getFile
diff --git a/jdk/src/share/classes/java/awt/FlowLayout.java b/jdk/src/share/classes/java/awt/FlowLayout.java
index 228035d..4675bbc 100644
--- a/jdk/src/share/classes/java/awt/FlowLayout.java
+++ b/jdk/src/share/classes/java/awt/FlowLayout.java
@@ -54,7 +54,7 @@
  * <p>
  * <img src="doc-files/FlowLayout-1.gif"
  * ALT="Graphic of Layout for Three Buttons"
- * ALIGN=center HSPACE=10 VSPACE=7>
+ * style="float:center; margin: 7px 10px;">
  * <p>
  * Here is the code for this applet:
  * <p>
diff --git a/jdk/src/share/classes/java/awt/FocusTraversalPolicy.java b/jdk/src/share/classes/java/awt/FocusTraversalPolicy.java
index 6b7f4e9..0d8323b 100644
--- a/jdk/src/share/classes/java/awt/FocusTraversalPolicy.java
+++ b/jdk/src/share/classes/java/awt/FocusTraversalPolicy.java
@@ -49,7 +49,7 @@
  * policy is used to perform the search operation.
  * <p>
  * Please see
- * <a href="http://java.sun.com/docs/books/tutorial/uiswing/misc/focus.html">
+ * <a href="http://docs.oracle.com/javase/tutorial/uiswing/misc/focus.html">
  * How to Use the Focus Subsystem</a>,
  * a section in <em>The Java Tutorial</em>, and the
  * <a href="../../java/awt/doc-files/FocusSpec.html">Focus Specification</a>
diff --git a/jdk/src/share/classes/java/awt/Font.java b/jdk/src/share/classes/java/awt/Font.java
index 67b09fa..3908b07 100644
--- a/jdk/src/share/classes/java/awt/Font.java
+++ b/jdk/src/share/classes/java/awt/Font.java
@@ -127,7 +127,7 @@
  * <p>
  * For a discussion of the relative advantages and disadvantages of using
  * physical or logical fonts, see the
- * <a href="http://java.sun.com/j2se/corejava/intl/reference/faqs/index.html#desktop-rendering">Internationalization FAQ</a>
+ * <a href="http://www.oracle.com/technetwork/java/javase/tech/faq-jsp-138165.html">Internationalization FAQ</a>
  * document.
  *
  * <h4>Font Faces and Names</h4>
diff --git a/jdk/src/share/classes/java/awt/FontMetrics.java b/jdk/src/share/classes/java/awt/FontMetrics.java
index 31f2e76..cd6c0fb 100644
--- a/jdk/src/share/classes/java/awt/FontMetrics.java
+++ b/jdk/src/share/classes/java/awt/FontMetrics.java
@@ -51,8 +51,8 @@
  * <li>{@link #charsWidth(char[], int, int)}
  * </ul>
  * <p>
- * <img src="doc-files/FontMetrics-1.gif" alt="The letter 'p' showing its 'reference point'" border=15 align
- * ALIGN=right HSPACE=10 VSPACE=7>
+ * <img src="doc-files/FontMetrics-1.gif" alt="The letter 'p' showing its 'reference point'"
+ * style="border:15px; float:right; margin: 7px 10px;">
  * Note that the implementations of these methods are
  * inefficient, so they are usually overridden with more efficient
  * toolkit-specific implementations.
diff --git a/jdk/src/share/classes/java/awt/Frame.java b/jdk/src/share/classes/java/awt/Frame.java
index c7f5d4b..7a7f02f 100644
--- a/jdk/src/share/classes/java/awt/Frame.java
+++ b/jdk/src/share/classes/java/awt/Frame.java
@@ -83,7 +83,7 @@
  * <img src="doc-files/MultiScreen.gif"
  * alt="Diagram of virtual device encompassing three physical screens and one primary physical screen. The primary physical screen
  * shows (0,0) coords while a different physical screen shows (-80,-100) coords."
- * ALIGN=center HSPACE=10 VSPACE=7>
+ * style="float:center; margin: 7px 10px;">
  * <p>
  * In such an environment, when calling <code>setLocation</code>,
  * you must pass a virtual coordinate to this method.  Similarly,
diff --git a/jdk/src/share/classes/java/awt/GraphicsDevice.java b/jdk/src/share/classes/java/awt/GraphicsDevice.java
index c619a2a..5e3901a 100644
--- a/jdk/src/share/classes/java/awt/GraphicsDevice.java
+++ b/jdk/src/share/classes/java/awt/GraphicsDevice.java
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 1997, 2009, 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
@@ -69,7 +69,7 @@
  * </pre>
  * <p>
  * For more information on full-screen exclusive mode API, see the
- * <a href="http://java.sun.com/docs/books/tutorial/extra/fullscreen/index.html">
+ * <a href="http://docs.oracle.com/javase/tutorial/extra/fullscreen/index.html">
  * Full-Screen Exclusive Mode API Tutorial</a>.
  *
  * @see GraphicsEnvironment
@@ -334,11 +334,12 @@
     }
 
     /**
-     * Returns the <code>Window</code> object representing the
+     * Returns the {@code Window} object representing the
      * full-screen window if the device is in full-screen mode.
      *
-     * @return the full-screen window, or <code>null</code> if the device is
-     * not in full-screen mode.
+     * @return the full-screen window, or {@code null} if the device is
+     * not in full-screen mode. The {@code Window} object can differ
+     * from the object previously set by {@code setFullScreenWindow}.
      * @see #setFullScreenWindow(Window)
      * @since 1.4
      */
diff --git a/jdk/src/share/classes/java/awt/GridBagLayout.java b/jdk/src/share/classes/java/awt/GridBagLayout.java
index fb306a8d..1362e57 100644
--- a/jdk/src/share/classes/java/awt/GridBagLayout.java
+++ b/jdk/src/share/classes/java/awt/GridBagLayout.java
@@ -125,9 +125,9 @@
  * <center><table BORDER=0 WIDTH=800
  *        SUMMARY="absolute, relative and baseline values as described above">
  * <tr>
- * <th><P ALIGN="LEFT">Absolute Values</th>
- * <th><P ALIGN="LEFT">Orientation Relative Values</th>
- * <th><P ALIGN="LEFT">Baseline Relative Values</th>
+ * <th><P STYLE="TEXT-ALIGN:LEFT">Absolute Values</th>
+ * <th><P STYLE="TEXT-ALIGN:LEFT">Orientation Relative Values</th>
+ * <th><P STYLE="TEXT-ALIGN:LEFT">Baseline Relative Values</th>
  * </tr>
  * <tr>
  * <td>
@@ -201,7 +201,7 @@
  * <tr ALIGN=CENTER>
  * <td>
  * <img src="doc-files/GridBagLayout-baseline.png"
- *  alt="The following text describes this graphic (Figure 1)." ALIGN=center>
+ *  alt="The following text describes this graphic (Figure 1)." style="float:center">
  * </td>
  * </table></center>
  * This layout consists of three components:
@@ -255,10 +255,10 @@
  * <center><table WIDTH=600 summary="layout">
  * <tr ALIGN=CENTER>
  * <td>
- * <img src="doc-files/GridBagLayout-1.gif" alt="The preceeding text describes this graphic (Figure 1)." ALIGN=center HSPACE=10 VSPACE=7>
+ * <img src="doc-files/GridBagLayout-1.gif" alt="The preceeding text describes this graphic (Figure 1)." style="float:center; margin: 7px 10px;">
  * </td>
  * <td>
- * <img src="doc-files/GridBagLayout-2.gif" alt="The preceeding text describes this graphic (Figure 2)." ALIGN=center HSPACE=10 VSPACE=7>
+ * <img src="doc-files/GridBagLayout-2.gif" alt="The preceeding text describes this graphic (Figure 2)." style="float:center; margin: 7px 10px;">
  * </td>
  * <tr ALIGN=CENTER>
  * <td>Figure 2: Horizontal, Left-to-Right</td>
diff --git a/jdk/src/share/classes/java/awt/GridLayout.java b/jdk/src/share/classes/java/awt/GridLayout.java
index b08802e..596208c 100644
--- a/jdk/src/share/classes/java/awt/GridLayout.java
+++ b/jdk/src/share/classes/java/awt/GridLayout.java
@@ -55,7 +55,7 @@
  * If the container's <code>ComponentOrientation</code> property is horizontal
  * and right-to-left, the example produces the output shown in Figure 2.
  * <p>
- * <center><table WIDTH=600 summary="layout">
+ * <table style="float:center" WIDTH=600 summary="layout">
  * <tr ALIGN=CENTER>
  * <td><img SRC="doc-files/GridLayout-1.gif"
  *      alt="Shows 6 buttons in rows of 2. Row 1 shows buttons 1 then 2.
@@ -73,7 +73,7 @@
  *
  * <td>Figure 2: Horizontal, Right-to-Left</td>
  * </tr>
- * </table></center>
+ * </table>
  * <p>
  * When both the number of rows and the number of columns have
  * been set to non-zero values, either by a constructor or
diff --git a/jdk/src/share/classes/java/awt/KeyboardFocusManager.java b/jdk/src/share/classes/java/awt/KeyboardFocusManager.java
index 72c3fdb..8f869fa 100644
--- a/jdk/src/share/classes/java/awt/KeyboardFocusManager.java
+++ b/jdk/src/share/classes/java/awt/KeyboardFocusManager.java
@@ -88,7 +88,7 @@
  * ClassLoader.
  * <p>
  * Please see
- * <a href="http://java.sun.com/docs/books/tutorial/uiswing/misc/focus.html">
+ * <a href="http://docs.oracle.com/javase/tutorial/uiswing/misc/focus.html">
  * How to Use the Focus Subsystem</a>,
  * a section in <em>The Java Tutorial</em>, and the
  * <a href="../../java/awt/doc-files/FocusSpec.html">Focus Specification</a>
@@ -590,6 +590,7 @@
      *
      * @see Component#requestFocus()
      * @see java.awt.event.FocusEvent#FOCUS_LOST
+     * @since 1.8
      */
     public void clearFocusOwner() {
         if (getFocusOwner() != null) {
diff --git a/jdk/src/share/classes/java/awt/Label.java b/jdk/src/share/classes/java/awt/Label.java
index c5f174a..1772875 100644
--- a/jdk/src/share/classes/java/awt/Label.java
+++ b/jdk/src/share/classes/java/awt/Label.java
@@ -46,7 +46,7 @@
  * produces the following labels:
  * <p>
  * <img src="doc-files/Label-1.gif" alt="Two labels: 'Hi There!' and 'Another label'"
- * ALIGN=center HSPACE=10 VSPACE=7>
+ * style="float:center; margin: 7px 10px;">
  *
  * @author      Sami Shaio
  * @since       JDK1.0
diff --git a/jdk/src/share/classes/java/awt/LinearGradientPaint.java b/jdk/src/share/classes/java/awt/LinearGradientPaint.java
index ffb5c9b..e9fbcfc 100644
--- a/jdk/src/share/classes/java/awt/LinearGradientPaint.java
+++ b/jdk/src/share/classes/java/awt/LinearGradientPaint.java
@@ -94,7 +94,7 @@
  * of the three cycle methods:
  * <p>
  * <center>
- * <img src = "doc-files/LinearGradientPaint.png">
+ * <img src = "doc-files/LinearGradientPaint.png" alt="LinearGradientPaint">
  * </center>
  *
  * @see java.awt.Paint
diff --git a/jdk/src/share/classes/java/awt/List.java b/jdk/src/share/classes/java/awt/List.java
index 92a1867..dba6ac0 100644
--- a/jdk/src/share/classes/java/awt/List.java
+++ b/jdk/src/share/classes/java/awt/List.java
@@ -61,7 +61,7 @@
  * scrolling list:
  * <p>
  * <img src="doc-files/List-1.gif"
- * alt="Shows a list containing: Venus, Earth, JavaSoft, and Mars. Javasoft is selected." ALIGN=center HSPACE=10 VSPACE=7>
+ * alt="Shows a list containing: Venus, Earth, JavaSoft, and Mars. Javasoft is selected." style="float:center; margin: 7px 10px;">
  * <p>
  * If the List allows multiple selections, then clicking on
  * an item that is already selected deselects it. In the preceding
diff --git a/jdk/src/share/classes/java/awt/MenuBar.java b/jdk/src/share/classes/java/awt/MenuBar.java
index feae49a..2c494ad 100644
--- a/jdk/src/share/classes/java/awt/MenuBar.java
+++ b/jdk/src/share/classes/java/awt/MenuBar.java
@@ -45,7 +45,7 @@
  * <img src="doc-files/MenuBar-1.gif"
  * alt="Diagram of MenuBar containing 2 menus: Examples and Options.
  * Examples menu is expanded showing items: Basic, Simple, Check, and More Examples."
- * ALIGN=center HSPACE=10 VSPACE=7>
+ * style="float:center; margin: 7px 10px;">
  * <p>
  * A menu bar handles keyboard shortcuts for menu items, passing them
  * along to its child menus.
diff --git a/jdk/src/share/classes/java/awt/MenuItem.java b/jdk/src/share/classes/java/awt/MenuItem.java
index 4838d18..b660e20 100644
--- a/jdk/src/share/classes/java/awt/MenuItem.java
+++ b/jdk/src/share/classes/java/awt/MenuItem.java
@@ -42,8 +42,8 @@
  * <p>
  * This picture of a menu bar shows five menu items:
  * <IMG SRC="doc-files/MenuBar-1.gif" alt="The following text describes this graphic."
- * ALIGN=CENTER HSPACE=10 VSPACE=7>
- * <br CLEAR=LEFT>
+ * style="float:center; margin: 7px 10px;">
+ * <br style="clear:left;">
  * The first two items are simple menu items, labeled
  * <code>"Basic"</code> and <code>"Simple"</code>.
  * Following these two items is a separator, which is itself
diff --git a/jdk/src/share/classes/java/awt/RadialGradientPaint.java b/jdk/src/share/classes/java/awt/RadialGradientPaint.java
index c9cc43a..a0bf944 100644
--- a/jdk/src/share/classes/java/awt/RadialGradientPaint.java
+++ b/jdk/src/share/classes/java/awt/RadialGradientPaint.java
@@ -80,14 +80,14 @@
  * from the focus point. The following figure shows that the distance AB
  * is equal to the distance BC, and the distance AD is equal to the distance DE.
  * <center>
- * <img src = "doc-files/RadialGradientPaint-3.png">
+ * <img src = "doc-files/RadialGradientPaint-3.png" alt="RadialGradientPaint-3">
  * </center>
  * If the gradient and graphics rendering transforms are uniformly scaled and
  * the user sets the focus so that it coincides with the center of the circle,
  * the gradient color proportions are equal for any line drawn from the center.
  * The following figure shows the distances AB, BC, AD, and DE. They are all equal.
  * <center>
- * <img src = "doc-files/RadialGradientPaint-4.png">
+ * <img src = "doc-files/RadialGradientPaint-4.png" alt="RadialGradientPaint-4">
  * </center>
  * Note that some minor variations in distances may occur due to sampling at
  * the granularity of a pixel.
@@ -117,7 +117,7 @@
  * (centered) focus for each of the three cycle methods:
  * <p>
  * <center>
- * <img src = "doc-files/RadialGradientPaint-1.png">
+ * <img src = "doc-files/RadialGradientPaint-1.png" alt="RadialGradientPaint-1">
  * </center>
  *
  * <p>
@@ -141,7 +141,7 @@
  * focus for each of the three cycle methods:
  * <p>
  * <center>
- * <img src = "doc-files/RadialGradientPaint-2.png">
+ * <img src = "doc-files/RadialGradientPaint-2.png" alt="RadialGradientPaint-2">
  * </center>
  *
  * @see java.awt.Paint
diff --git a/jdk/src/share/classes/java/awt/Scrollbar.java b/jdk/src/share/classes/java/awt/Scrollbar.java
index 8ecf578..9849480 100644
--- a/jdk/src/share/classes/java/awt/Scrollbar.java
+++ b/jdk/src/share/classes/java/awt/Scrollbar.java
@@ -42,7 +42,7 @@
  * the red, green, and blue components of a color:
  * <p>
  * <img src="doc-files/Scrollbar-1.gif" alt="Image shows 3 vertical sliders, side-by-side."
- * ALIGN=center HSPACE=10 VSPACE=7>
+ * style="float:center; margin: 7px 10px;">
  * <p>
  * Each scroll bar in this example could be created with
  * code similar to the following:
@@ -60,7 +60,7 @@
  * <p>
  * <img src="doc-files/Scrollbar-2.gif"
  * alt="Image shows horizontal slider with starting range of 0 and ending range of 300. The slider thumb is labeled 60."
- * ALIGN=center HSPACE=10 VSPACE=7>
+ * style="float:center; margin: 7px 10px;">
  * <p>
  * The value range represented by the bubble in this example
  * is the <em>visible amount</em>. The horizontal scroll bar
@@ -295,7 +295,7 @@
      * Constructs a new vertical scroll bar.
      * The default properties of the scroll bar are listed in
      * the following table:
-     * <p> </p>
+     * <p>
      * <table border=1 summary="Scrollbar default properties">
      * <tr>
      *   <th>Property</th>
diff --git a/jdk/src/share/classes/java/awt/SystemTray.java b/jdk/src/share/classes/java/awt/SystemTray.java
index 84e8926..20ba912 100644
--- a/jdk/src/share/classes/java/awt/SystemTray.java
+++ b/jdk/src/share/classes/java/awt/SystemTray.java
@@ -361,7 +361,7 @@
     /**
      * Adds a {@code PropertyChangeListener} to the list of listeners for the
      * specific property. The following properties are currently supported:
-     * <p> </p>
+     * <p>
      * <table border=1 summary="SystemTray properties">
      * <tr>
      *    <th>Property</th>
@@ -384,7 +384,7 @@
      *        The property is accessed by the {@link #getSystemTray} method.</td>
      * </tr>
      * </table>
-     * <p> </p>
+     * <p>
      * The {@code listener} listens to property changes only in this context.
      * <p>
      * If {@code listener} is {@code null}, no exception is thrown
diff --git a/jdk/src/share/classes/java/awt/TextArea.java b/jdk/src/share/classes/java/awt/TextArea.java
index 8b16d9e..6fc979f 100644
--- a/jdk/src/share/classes/java/awt/TextArea.java
+++ b/jdk/src/share/classes/java/awt/TextArea.java
@@ -42,7 +42,7 @@
  * The following image shows the appearance of a text area:
  * <p>
  * <img src="doc-files/TextArea-1.gif" alt="A TextArea showing the word 'Hello!'"
- * ALIGN=center HSPACE=10 VSPACE=7>
+ * style="float:center; margin: 7px 10px;">
  * <p>
  * This text area could be created by the following line of code:
  * <p>
diff --git a/jdk/src/share/classes/java/awt/TextComponent.java b/jdk/src/share/classes/java/awt/TextComponent.java
index 2065db6..331b20f 100644
--- a/jdk/src/share/classes/java/awt/TextComponent.java
+++ b/jdk/src/share/classes/java/awt/TextComponent.java
@@ -822,37 +822,6 @@
 // Accessibility support
 ////////////////
 
-
-    /**
-     *
-     */
-    int getIndexAtPoint(Point p) {
-        return -1;
-/* To be fully implemented in a future release
-        if (peer == null) {
-            return -1;
-        }
-        TextComponentPeer peer = (TextComponentPeer)this.peer;
-        return peer.getIndexAtPoint(p.x, p.y);
-*/
-    }
-
-
-    /**
-     *
-     */
-    Rectangle getCharacterBounds(int i) {
-        return null;
-/* To be fully implemented in a future release
-        if (peer == null) {
-            return null;
-        }
-        TextComponentPeer peer = (TextComponentPeer)this.peer;
-        return peer.getCharacterBounds(i);
-*/
-    }
-
-
     /**
      * Gets the AccessibleContext associated with this TextComponent.
      * For text components, the AccessibleContext takes the form of an
@@ -963,7 +932,7 @@
          * @return the zero-based index of the character under Point p.
          */
         public int getIndexAtPoint(Point p) {
-            return TextComponent.this.getIndexAtPoint(p);
+            return -1;
         }
 
         /**
@@ -976,7 +945,7 @@
          * @return the screen coordinates of the character's bounding box
          */
         public Rectangle getCharacterBounds(int i) {
-            return TextComponent.this.getCharacterBounds(i);
+            return null;
         }
 
         /**
diff --git a/jdk/src/share/classes/java/awt/TextField.java b/jdk/src/share/classes/java/awt/TextField.java
index cbaf649..cfdaf51 100644
--- a/jdk/src/share/classes/java/awt/TextField.java
+++ b/jdk/src/share/classes/java/awt/TextField.java
@@ -42,7 +42,7 @@
  * display the predefined text <code>"Hello"</code>.
  * <p>
  * <img src="doc-files/TextField-1.gif" alt="The preceding text describes this image."
- * ALIGN=center HSPACE=10 VSPACE=7>
+ * style="float:center; margin: 7px 10px;">
  * <p>
  * Here is the code that produces these four text fields:
  * <p>
diff --git a/jdk/src/share/classes/java/awt/Toolkit.java b/jdk/src/share/classes/java/awt/Toolkit.java
index de14eef..606df3e 100644
--- a/jdk/src/share/classes/java/awt/Toolkit.java
+++ b/jdk/src/share/classes/java/awt/Toolkit.java
@@ -83,7 +83,7 @@
  * <p>
  * <li>Moving the focus from one component to another.
  * <br>For more information, see
- * <a href="http://java.sun.com/docs/books/tutorial/uiswing/misc/focus.html#transferTiming">Timing
+ * <a href="http://docs.oracle.com/javase/tutorial/uiswing/misc/focus.html#transferTiming">Timing
  * Focus Transfers</a>, a section in
  * <a href="http://java.sun.com/docs/books/tutorial/uiswing/">The Swing
  * Tutorial</a>.
diff --git a/jdk/src/share/classes/java/awt/Window.java b/jdk/src/share/classes/java/awt/Window.java
index 7471683..6f66395 100644
--- a/jdk/src/share/classes/java/awt/Window.java
+++ b/jdk/src/share/classes/java/awt/Window.java
@@ -85,7 +85,7 @@
  * <p>
  * <img src="doc-files/MultiScreen.gif"
  * alt="Diagram shows virtual device containing 4 physical screens. Primary physical screen shows coords (0,0), other screen shows (-80,-100)."
- * ALIGN=center HSPACE=10 VSPACE=7>
+ * style="float:center; margin: 7px 10px;">
  * <p>
  * In such an environment, when calling {@code setLocation},
  * you must pass a virtual coordinate to this method.  Similarly,
@@ -226,6 +226,7 @@
     boolean     syncLWRequests = false;
     transient boolean beforeFirstShow = true;
     private transient boolean disposing = false;
+    transient WindowDisposerRecord disposerRecord = null;
 
     static final int OPENED = 0x01;
 
@@ -437,18 +438,28 @@
 
     transient Object anchor = new Object();
     static class WindowDisposerRecord implements sun.java2d.DisposerRecord {
-        final WeakReference<Window> owner;
+        WeakReference<Window> owner;
         final WeakReference<Window> weakThis;
         final WeakReference<AppContext> context;
+
         WindowDisposerRecord(AppContext context, Window victim) {
-            owner = new WeakReference<Window>(victim.getOwner());
             weakThis = victim.weakThis;
             this.context = new WeakReference<AppContext>(context);
         }
+
+        public void updateOwner() {
+            Window victim = weakThis.get();
+            owner = (victim == null)
+                    ? null
+                    : new WeakReference<Window>(victim.getOwner());
+        }
+
         public void dispose() {
-            Window parent = owner.get();
-            if (parent != null) {
-                parent.removeOwnedWindow(weakThis);
+            if (owner != null) {
+                Window parent = owner.get();
+                if (parent != null) {
+                    parent.removeOwnedWindow(weakThis);
+                }
             }
             AppContext ac = context.get();
             if (null != ac) {
@@ -502,6 +513,8 @@
         }
 
         modalExclusionType = Dialog.ModalExclusionType.NO_EXCLUDE;
+        disposerRecord = new WindowDisposerRecord(appContext, this);
+        sun.java2d.Disposer.addRecord(anchor, disposerRecord);
 
         SunToolkit.checkAndSetPolicy(this);
     }
@@ -617,11 +630,16 @@
         this.parent = owner;
         if (owner != null) {
             owner.addOwnedWindow(weakThis);
+            if (owner.isAlwaysOnTop()) {
+                try {
+                    setAlwaysOnTop(true);
+                } catch (SecurityException ignore) {
+                }
+            }
         }
 
-        // Fix for 6758673: this call is moved here from init(gc), because
         // WindowDisposerRecord requires a proper value of parent field.
-        Disposer.addRecord(anchor, new WindowDisposerRecord(appContext, this));
+        disposerRecord.updateOwner();
     }
 
     /**
@@ -1022,7 +1040,9 @@
             closeSplashScreen();
             Dialog.checkShouldBeBlocked(this);
             super.show();
-            locationByPlatform = false;
+            synchronized (getTreeLock()) {
+                this.locationByPlatform = false;
+            }
             for (int i = 0; i < ownedWindowList.size(); i++) {
                 Window child = ownedWindowList.elementAt(i).get();
                 if ((child != null) && child.showWithParent) {
@@ -1095,6 +1115,9 @@
             modalBlocker.unblockWindow(this);
         }
         super.hide();
+        synchronized (getTreeLock()) {
+            this.locationByPlatform = false;
+        }
     }
 
     final void clearMostRecentFocusOwnerOnHide() {
@@ -2180,8 +2203,8 @@
      * windows.  To detect if always-on-top windows are supported by the
      * current platform, use {@link Toolkit#isAlwaysOnTopSupported()} and
      * {@link Window#isAlwaysOnTopSupported()}.  If always-on-top mode
-     * isn't supported by the toolkit or for this window, calling this
-     * method has no effect.
+     * isn't supported for this window or this window's toolkit does not
+     * support always-on-top windows, calling this method has no effect.
      * <p>
      * If a SecurityManager is installed, the calling thread must be
      * granted the AWTPermission "setWindowAlwaysOnTop" in
@@ -2194,11 +2217,13 @@
      *        windows
      * @throws SecurityException if the calling thread does not have
      *         permission to set the value of always-on-top property
+     *
      * @see #isAlwaysOnTop
      * @see #toFront
      * @see #toBack
      * @see AWTPermission
      * @see #isAlwaysOnTopSupported
+     * @see #getToolkit
      * @see Toolkit#isAlwaysOnTopSupported
      * @since 1.5
      */
@@ -2224,6 +2249,15 @@
             }
             firePropertyChange("alwaysOnTop", oldAlwaysOnTop, alwaysOnTop);
         }
+        for (WeakReference<Window> ref : ownedWindowList) {
+            Window window = ref.get();
+            if (window != null) {
+                try {
+                    window.setAlwaysOnTop(alwaysOnTop);
+                } catch (SecurityException ignore) {
+                }
+            }
+        }
     }
 
     /**
@@ -2231,11 +2265,13 @@
      * window. Some platforms may not support always-on-top windows, some
      * may support only some kinds of top-level windows; for example,
      * a platform may not support always-on-top modal dialogs.
-     * @return {@code true}, if the always-on-top mode is
-     *         supported by the toolkit and for this window,
-     *         {@code false}, if always-on-top mode is not supported
-     *         for this window or toolkit doesn't support always-on-top windows.
+     *
+     * @return {@code true}, if the always-on-top mode is supported for
+     *         this window and this window's toolkit supports always-on-top windows,
+     *         {@code false} otherwise
+     *
      * @see #setAlwaysOnTop(boolean)
+     * @see #getToolkit
      * @see Toolkit#isAlwaysOnTopSupported
      * @since 1.6
      */
@@ -2774,6 +2810,7 @@
     void connectOwnedWindow(Window child) {
         child.parent = this;
         addOwnedWindow(child.weakThis);
+        child.disposerRecord.updateOwner();
     }
 
     private void addToWindowList() {
@@ -2936,7 +2973,8 @@
         weakThis = new WeakReference<>(this);
 
         anchor = new Object();
-        sun.java2d.Disposer.addRecord(anchor, new WindowDisposerRecord(appContext, this));
+        disposerRecord = new WindowDisposerRecord(appContext, this);
+        sun.java2d.Disposer.addRecord(anchor, disposerRecord);
 
         addToWindowList();
         initGC(null);
diff --git a/jdk/src/share/classes/java/awt/datatransfer/DataFlavor.java b/jdk/src/share/classes/java/awt/datatransfer/DataFlavor.java
index 7f1b388..ac14033 100644
--- a/jdk/src/share/classes/java/awt/datatransfer/DataFlavor.java
+++ b/jdk/src/share/classes/java/awt/datatransfer/DataFlavor.java
@@ -90,7 +90,7 @@
  * the same results.
  * <p>
  * For more information on the using data transfer with Swing see
- * the <a href="http://java.sun.com/docs/books/tutorial/uiswing/misc/dnd.html">
+ * the <a href="http://docs.oracle.com/javase/tutorial/uiswing/dnd/index.html">
  * How to Use Drag and Drop and Data Transfer</a>,
  * section in <em>Java Tutorial</em>.
  *
diff --git a/jdk/src/share/classes/java/awt/datatransfer/Transferable.java b/jdk/src/share/classes/java/awt/datatransfer/Transferable.java
index 56377da..3c5219d 100644
--- a/jdk/src/share/classes/java/awt/datatransfer/Transferable.java
+++ b/jdk/src/share/classes/java/awt/datatransfer/Transferable.java
@@ -32,7 +32,7 @@
  * for a transfer operation.
  * <p>
  * For information on using data transfer with Swing, see
- * <a href="http://java.sun.com/docs/books/tutorial/uiswing/misc/dnd.html">
+ * <a href="http://docs.oracle.com/javase/tutorial/uiswing/dnd/index.html">
  * How to Use Drag and Drop and Data Transfer</a>,
  * a section in <em>The Java Tutorial</em>, for more information.
  *
diff --git a/jdk/src/share/classes/java/awt/event/ActionEvent.java b/jdk/src/share/classes/java/awt/event/ActionEvent.java
index 08bd8db..d549db0 100644
--- a/jdk/src/share/classes/java/awt/event/ActionEvent.java
+++ b/jdk/src/share/classes/java/awt/event/ActionEvent.java
@@ -52,7 +52,7 @@
  * in the range from {@code ACTION_FIRST} to {@code ACTION_LAST}.
  *
  * @see ActionListener
- * @see <a href="http://java.sun.com/docs/books/tutorial/uiswing/events/actionlistener.html">Tutorial: How to Write an Action Listener</a>
+ * @see <a href="http://docs.oracle.com/javase/tutorial/uiswing/events/actionlistener.html">Tutorial: How to Write an Action Listener</a>
  *
  * @author Carl Quinn
  * @since 1.1
diff --git a/jdk/src/share/classes/java/awt/event/ActionListener.java b/jdk/src/share/classes/java/awt/event/ActionListener.java
index 78574c2..cb766d3 100644
--- a/jdk/src/share/classes/java/awt/event/ActionListener.java
+++ b/jdk/src/share/classes/java/awt/event/ActionListener.java
@@ -37,7 +37,7 @@
  * invoked.
  *
  * @see ActionEvent
- * @see <a href="http://java.sun.com/docs/books/tutorial/post1.0/ui/eventmodel.html">Tutorial: Java 1.1 Event Model</a>
+ * @see <a href="http://docs.oracle.com/javase/tutorial/uiswing/events/actionlistener.html">How to Write an Action Listener</a>
  *
  * @author Carl Quinn
  * @since 1.1
diff --git a/jdk/src/share/classes/java/awt/event/ComponentAdapter.java b/jdk/src/share/classes/java/awt/event/ComponentAdapter.java
index 46597da..028b8d3 100644
--- a/jdk/src/share/classes/java/awt/event/ComponentAdapter.java
+++ b/jdk/src/share/classes/java/awt/event/ComponentAdapter.java
@@ -44,7 +44,7 @@
  *
  * @see ComponentEvent
  * @see ComponentListener
- * @see <a href="http://java.sun.com/docs/books/tutorial/post1.0/ui/componentlistener.html">Tutorial: Writing a Component Listener</a>
+ * @see <a href="http://docs.oracle.com/javase/tutorial/uiswing/events/componentlistener.html">Tutorial: Writing a Component Listener</a>
  *
  * @author Carl Quinn
  * @since 1.1
diff --git a/jdk/src/share/classes/java/awt/event/ComponentEvent.java b/jdk/src/share/classes/java/awt/event/ComponentEvent.java
index 67149a7..d168f6c 100644
--- a/jdk/src/share/classes/java/awt/event/ComponentEvent.java
+++ b/jdk/src/share/classes/java/awt/event/ComponentEvent.java
@@ -60,7 +60,7 @@
  *
  * @see ComponentAdapter
  * @see ComponentListener
- * @see <a href="http://java.sun.com/docs/books/tutorial/post1.0/ui/componentlistener.html">Tutorial: Writing a Component Listener</a>
+ * @see <a href="http://docs.oracle.com/javase/tutorial/uiswing/events/componentlistener.html">Tutorial: Writing a Component Listener</a>
  *
  * @author Carl Quinn
  * @since 1.1
diff --git a/jdk/src/share/classes/java/awt/event/ComponentListener.java b/jdk/src/share/classes/java/awt/event/ComponentListener.java
index a64a1aa..8f0aad1 100644
--- a/jdk/src/share/classes/java/awt/event/ComponentListener.java
+++ b/jdk/src/share/classes/java/awt/event/ComponentListener.java
@@ -46,7 +46,7 @@
  *
  * @see ComponentAdapter
  * @see ComponentEvent
- * @see <a href="http://java.sun.com/docs/books/tutorial/post1.0/ui/componentlistener.html">Tutorial: Writing a Component Listener</a>
+ * @see <a href="http://docs.oracle.com/javase/tutorial/uiswing/events/componentlistener.html">Tutorial: Writing a Component Listener</a>
  *
  * @author Carl Quinn
  * @since 1.1
diff --git a/jdk/src/share/classes/java/awt/event/ContainerAdapter.java b/jdk/src/share/classes/java/awt/event/ContainerAdapter.java
index 3ce3b4d..61f6c30 100644
--- a/jdk/src/share/classes/java/awt/event/ContainerAdapter.java
+++ b/jdk/src/share/classes/java/awt/event/ContainerAdapter.java
@@ -44,7 +44,7 @@
  *
  * @see ContainerEvent
  * @see ContainerListener
- * @see <a href="http://java.sun.com/docs/books/tutorial/post1.0/ui/containerlistener.html">Tutorial: Writing a Container Listener</a>
+ * @see <a href="http://docs.oracle.com/javase/tutorial/uiswing/events/containerlistener.html">Tutorial: Writing a Container Listener</a>
  *
  * @author Amy Fowler
  * @since 1.1
diff --git a/jdk/src/share/classes/java/awt/event/ContainerEvent.java b/jdk/src/share/classes/java/awt/event/ContainerEvent.java
index 655acad..2d07046 100644
--- a/jdk/src/share/classes/java/awt/event/ContainerEvent.java
+++ b/jdk/src/share/classes/java/awt/event/ContainerEvent.java
@@ -52,7 +52,7 @@
  *
  * @see ContainerAdapter
  * @see ContainerListener
- * @see <a href="http://java.sun.com/docs/books/tutorial/post1.0/ui/containerlistener.html">Tutorial: Writing a Container Listener</a>
+ * @see <a href="http://docs.oracle.com/javase/tutorial/uiswing/events/containerlistener.html">Tutorial: Writing a Container Listener</a>
  *
  * @author Tim Prinzing
  * @author Amy Fowler
diff --git a/jdk/src/share/classes/java/awt/event/ContainerListener.java b/jdk/src/share/classes/java/awt/event/ContainerListener.java
index 6fb8321..3692e40 100644
--- a/jdk/src/share/classes/java/awt/event/ContainerListener.java
+++ b/jdk/src/share/classes/java/awt/event/ContainerListener.java
@@ -46,7 +46,7 @@
  *
  * @see ContainerAdapter
  * @see ContainerEvent
- * @see <a href="http://java.sun.com/docs/books/tutorial/post1.0/ui/containerlistener.html">Tutorial: Writing a Container Listener</a>
+ * @see <a href="http://docs.oracle.com/javase/tutorial/uiswing/events/containerlistener.html">Tutorial: Writing a Container Listener</a>
  *
  * @author Tim Prinzing
  * @author Amy Fowler
diff --git a/jdk/src/share/classes/java/awt/event/FocusAdapter.java b/jdk/src/share/classes/java/awt/event/FocusAdapter.java
index 00d9b4f..7511da7 100644
--- a/jdk/src/share/classes/java/awt/event/FocusAdapter.java
+++ b/jdk/src/share/classes/java/awt/event/FocusAdapter.java
@@ -44,7 +44,7 @@
  *
  * @see FocusEvent
  * @see FocusListener
- * @see <a href="http://java.sun.com/docs/books/tutorial/post1.0/ui/focuslistener.html">Tutorial: Writing a Focus Listener</a>
+ * @see <a href="http://docs.oracle.com/javase/tutorial/uiswing/events/focuslistener.html">Tutorial: Writing a Focus Listener</a>
  *
  * @author Carl Quinn
  * @since 1.1
diff --git a/jdk/src/share/classes/java/awt/event/FocusEvent.java b/jdk/src/share/classes/java/awt/event/FocusEvent.java
index e70b968..2f9e191 100644
--- a/jdk/src/share/classes/java/awt/event/FocusEvent.java
+++ b/jdk/src/share/classes/java/awt/event/FocusEvent.java
@@ -57,7 +57,7 @@
  *
  * @see FocusAdapter
  * @see FocusListener
- * @see <a href="http://java.sun.com/docs/books/tutorial/post1.0/ui/focuslistener.html">Tutorial: Writing a Focus Listener</a>
+ * @see <a href="http://docs.oracle.com/javase/tutorial/uiswing/events/focuslistener.html">Tutorial: Writing a Focus Listener</a>
  *
  * @author Carl Quinn
  * @author Amy Fowler
diff --git a/jdk/src/share/classes/java/awt/event/FocusListener.java b/jdk/src/share/classes/java/awt/event/FocusListener.java
index 5f71d50..9183425 100644
--- a/jdk/src/share/classes/java/awt/event/FocusListener.java
+++ b/jdk/src/share/classes/java/awt/event/FocusListener.java
@@ -42,7 +42,7 @@
  *
  * @see FocusAdapter
  * @see FocusEvent
- * @see <a href="http://java.sun.com/docs/books/tutorial/post1.0/ui/focuslistener.html">Tutorial: Writing a Focus Listener</a>
+ * @see <a href="http://docs.oracle.com/javase/tutorial/uiswing/events/focuslistener.html">Tutorial: Writing a Focus Listener</a>
  *
  * @author Carl Quinn
  * @since 1.1
diff --git a/jdk/src/share/classes/java/awt/event/InputEvent.java b/jdk/src/share/classes/java/awt/event/InputEvent.java
index 24965d2..14e926c 100644
--- a/jdk/src/share/classes/java/awt/event/InputEvent.java
+++ b/jdk/src/share/classes/java/awt/event/InputEvent.java
@@ -445,7 +445,7 @@
      * <PRE>
      *    int onmask = SHIFT_DOWN_MASK | BUTTON1_DOWN_MASK;
      *    int offmask = CTRL_DOWN_MASK;
-     *    if ((event.getModifiersEx() & (onmask | offmask)) == onmask) {
+     *    if ((event.getModifiersEx() &amp; (onmask | offmask)) == onmask) {
      *        ...
      *    }
      * </PRE>
diff --git a/jdk/src/share/classes/java/awt/event/ItemEvent.java b/jdk/src/share/classes/java/awt/event/ItemEvent.java
index b7c7e5e..2caee9e 100644
--- a/jdk/src/share/classes/java/awt/event/ItemEvent.java
+++ b/jdk/src/share/classes/java/awt/event/ItemEvent.java
@@ -58,7 +58,7 @@
  *
  * @see java.awt.ItemSelectable
  * @see ItemListener
- * @see <a href="http://java.sun.com/docs/books/tutorial/post1.0/ui/itemlistener.html">Tutorial: Writing an Item Listener</a>
+ * @see <a href="http://docs.oracle.com/javase/tutorial/uiswing/events/itemlistener.html">Tutorial: Writing an Item Listener</a>
  *
  * @since 1.1
  */
diff --git a/jdk/src/share/classes/java/awt/event/ItemListener.java b/jdk/src/share/classes/java/awt/event/ItemListener.java
index 8a8d3cb..3cc7fa8 100644
--- a/jdk/src/share/classes/java/awt/event/ItemListener.java
+++ b/jdk/src/share/classes/java/awt/event/ItemListener.java
@@ -40,7 +40,7 @@
  *
  * @see java.awt.ItemSelectable
  * @see ItemEvent
- * @see <a href="http://java.sun.com/docs/books/tutorial/post1.0/ui/itemlistener.html">Tutorial: Writing an Item Listener</a>
+ * @see <a href="http://docs.oracle.com/javase/tutorial/uiswing/events/itemlistener.html">Tutorial: Writing an Item Listener</a>
  *
  * @since 1.1
  */
diff --git a/jdk/src/share/classes/java/awt/event/KeyAdapter.java b/jdk/src/share/classes/java/awt/event/KeyAdapter.java
index c888101..3c0d61c 100644
--- a/jdk/src/share/classes/java/awt/event/KeyAdapter.java
+++ b/jdk/src/share/classes/java/awt/event/KeyAdapter.java
@@ -46,7 +46,7 @@
  *
  * @see KeyEvent
  * @see KeyListener
- * @see <a href="http://java.sun.com/docs/books/tutorial/post1.0/ui/keylistener.html">Tutorial: Writing a Key Listener</a>
+ * @see <a href="http://docs.oracle.com/javase/tutorial/uiswing/events/keylistener.html">Tutorial: Writing a Key Listener</a>
  *
  * @since 1.1
  */
diff --git a/jdk/src/share/classes/java/awt/event/KeyEvent.java b/jdk/src/share/classes/java/awt/event/KeyEvent.java
index bef1037..5f88e3a 100644
--- a/jdk/src/share/classes/java/awt/event/KeyEvent.java
+++ b/jdk/src/share/classes/java/awt/event/KeyEvent.java
@@ -145,7 +145,7 @@
  *
  * @see KeyAdapter
  * @see KeyListener
- * @see <a href="http://java.sun.com/docs/books/tutorial/post1.0/ui/keylistener.html">Tutorial: Writing a Key Listener</a>
+ * @see <a href="http://docs.oracle.com/javase/tutorial/uiswing/events/keylistener.html">Tutorial: Writing a Key Listener</a>
  *
  * @since 1.1
  */
diff --git a/jdk/src/share/classes/java/awt/event/MouseAdapter.java b/jdk/src/share/classes/java/awt/event/MouseAdapter.java
index e4de8db..b908a66 100644
--- a/jdk/src/share/classes/java/awt/event/MouseAdapter.java
+++ b/jdk/src/share/classes/java/awt/event/MouseAdapter.java
@@ -63,7 +63,7 @@
  * @see MouseListener
  * @see MouseMotionListener
  * @see MouseWheelListener
- * @see <a href="http://java.sun.com/docs/books/tutorial/post1.0/ui/mouselistener.html">Tutorial: Writing a Mouse Listener</a>
+ * @see <a href="http://docs.oracle.com/javase/tutorial/uiswing/events/mouselistener.html">Tutorial: Writing a Mouse Listener</a>
  *
  * @since 1.1
  */
diff --git a/jdk/src/share/classes/java/awt/event/MouseEvent.java b/jdk/src/share/classes/java/awt/event/MouseEvent.java
index 15cb6ee..4532c9f 100644
--- a/jdk/src/share/classes/java/awt/event/MouseEvent.java
+++ b/jdk/src/share/classes/java/awt/event/MouseEvent.java
@@ -146,12 +146,12 @@
  * {@link InputEvent#getMaskForButton(int) getMaskForButton(button)} method may be used
  * as button masks.
  * <p>
- * <code>MOUSE_DRAGGED</code> events are delivered to the <code>Component</code>
+ * {@code MOUSE_DRAGGED} events are delivered to the {@code Component}
  * in which the mouse button was pressed until the mouse button is released
  * (regardless of whether the mouse position is within the bounds of the
- * <code>Component</code>).  Due to platform-dependent Drag&Drop implementations,
- * <code>MOUSE_DRAGGED</code> events may not be delivered during a native
- * Drag&Drop operation.
+ * {@code Component}).  Due to platform-dependent Drag&amp;Drop implementations,
+ * {@code MOUSE_DRAGGED} events may not be delivered during a native
+ * Drag&amp;Drop operation.
  *
  * In a multi-screen environment mouse drag events are delivered to the
  * <code>Component</code> even if the mouse position is outside the bounds of the
@@ -182,8 +182,8 @@
  * @see MouseMotionAdapter
  * @see MouseMotionListener
  * @see MouseWheelListener
- * @see <a href="http://java.sun.com/docs/books/tutorial/post1.0/ui/mouselistener.html">Tutorial: Writing a Mouse Listener</a>
- * @see <a href="http://java.sun.com/docs/books/tutorial/post1.0/ui/mousemotionlistener.html">Tutorial: Writing a Mouse Motion Listener</a>
+ * @see <a href="http://docs.oracle.com/javase/tutorial/uiswing/events/mouselistener.html">Tutorial: Writing a Mouse Listener</a>
+ * @see <a href="http://docs.oracle.com/javase/tutorial/uiswing/events/mousemotionlistener.html">Tutorial: Writing a Mouse Motion Listener</a>
  *
  * @since 1.1
  */
@@ -327,7 +327,7 @@
      * For all other events the count will be 0.
      *
      * @serial
-     * @see #getClickCount().
+     * @see #getClickCount()
      */
     int clickCount;
 
@@ -403,7 +403,7 @@
 
     /**
      * Initialize JNI field and method IDs for fields that may be
-       accessed from C.
+     *  accessed from C.
      */
     private static native void initIDs();
 
diff --git a/jdk/src/share/classes/java/awt/event/MouseListener.java b/jdk/src/share/classes/java/awt/event/MouseListener.java
index a9605fc..534ed39 100644
--- a/jdk/src/share/classes/java/awt/event/MouseListener.java
+++ b/jdk/src/share/classes/java/awt/event/MouseListener.java
@@ -50,7 +50,7 @@
  *
  * @see MouseAdapter
  * @see MouseEvent
- * @see <a href="http://java.sun.com/docs/books/tutorial/post1.0/ui/mouselistener.html">Tutorial: Writing a Mouse Listener</a>
+ * @see <a href="http://docs.oracle.com/javase/tutorial/uiswing/events/mouselistener.html">Tutorial: Writing a Mouse Listener</a>
  *
  * @since 1.1
  */
diff --git a/jdk/src/share/classes/java/awt/event/MouseMotionAdapter.java b/jdk/src/share/classes/java/awt/event/MouseMotionAdapter.java
index d19bced..e349c9d 100644
--- a/jdk/src/share/classes/java/awt/event/MouseMotionAdapter.java
+++ b/jdk/src/share/classes/java/awt/event/MouseMotionAdapter.java
@@ -49,7 +49,7 @@
  *
  * @see MouseEvent
  * @see MouseMotionListener
- * @see <a href="http://java.sun.com/docs/books/tutorial/post1.0/ui/mousemotionlistener.html">Tutorial: Writing a Mouse Motion Listener</a>
+ * @see <a href="http://docs.oracle.com/javase/tutorial/uiswing/events/mousemotionlistener.html">Tutorial: Writing a Mouse Motion Listener</a>
  *
  * @since 1.1
  */
diff --git a/jdk/src/share/classes/java/awt/event/MouseMotionListener.java b/jdk/src/share/classes/java/awt/event/MouseMotionListener.java
index 4b8ff08..8bfb152 100644
--- a/jdk/src/share/classes/java/awt/event/MouseMotionListener.java
+++ b/jdk/src/share/classes/java/awt/event/MouseMotionListener.java
@@ -47,7 +47,7 @@
  *
  * @see MouseMotionAdapter
  * @see MouseEvent
- * @see <a href="http://java.sun.com/docs/books/tutorial/post1.0/ui/mousemotionlistener.html">Tutorial: Writing a Mouse Motion Listener</a>
+ * @see <a href="http://docs.oracle.com/javase/tutorial/uiswing/events/mousemotionlistener.html">Tutorial: Writing a Mouse Motion Listener</a>
  *
  * @since 1.1
  */
diff --git a/jdk/src/share/classes/java/awt/event/WindowAdapter.java b/jdk/src/share/classes/java/awt/event/WindowAdapter.java
index 38c5636..131431d 100644
--- a/jdk/src/share/classes/java/awt/event/WindowAdapter.java
+++ b/jdk/src/share/classes/java/awt/event/WindowAdapter.java
@@ -45,7 +45,7 @@
  *
  * @see WindowEvent
  * @see WindowListener
- * @see <a href="http://java.sun.com/docs/books/tutorial/post1.0/ui/windowlistener.html">Tutorial: Writing a Window Listener</a>
+ * @see <a href="http://docs.oracle.com/javase/tutorial/uiswing/events/windowlistener.html">Tutorial: Writing a Window Listener</a>
  *
  * @author Carl Quinn
  * @author Amy Fowler
diff --git a/jdk/src/share/classes/java/awt/event/WindowEvent.java b/jdk/src/share/classes/java/awt/event/WindowEvent.java
index 49e45f3..ef50829 100644
--- a/jdk/src/share/classes/java/awt/event/WindowEvent.java
+++ b/jdk/src/share/classes/java/awt/event/WindowEvent.java
@@ -52,7 +52,7 @@
  *
  * @see WindowAdapter
  * @see WindowListener
- * @see <a href="http://java.sun.com/docs/books/tutorial/post1.0/ui/windowlistener.html">Tutorial: Writing a Window Listener</a>
+ * @see <a href="http://docs.oracle.com/javase/tutorial/uiswing/events/windowlistener.html">Tutorial: Writing a Window Listener</a>
  *
  * @since JDK1.1
  */
diff --git a/jdk/src/share/classes/java/awt/event/WindowFocusListener.java b/jdk/src/share/classes/java/awt/event/WindowFocusListener.java
index 9835a6b..22bba01 100644
--- a/jdk/src/share/classes/java/awt/event/WindowFocusListener.java
+++ b/jdk/src/share/classes/java/awt/event/WindowFocusListener.java
@@ -47,7 +47,7 @@
  *
  * @see WindowAdapter
  * @see WindowEvent
- * @see <a href="http://java.sun.com/docs/books/tutorial/post1.0/ui/windowlistener.html">Tutorial: Writing a Window Listener</a>
+ * @see <a href="http://docs.oracle.com/javase/tutorial/uiswing/events/windowlistener.html">Tutorial: Writing a Window Listener</a>
  *
  * @since 1.4
  */
diff --git a/jdk/src/share/classes/java/awt/event/WindowListener.java b/jdk/src/share/classes/java/awt/event/WindowListener.java
index 4b3ff7c..9f752a3 100644
--- a/jdk/src/share/classes/java/awt/event/WindowListener.java
+++ b/jdk/src/share/classes/java/awt/event/WindowListener.java
@@ -44,7 +44,7 @@
  *
  * @see WindowAdapter
  * @see WindowEvent
- * @see <a href="http://java.sun.com/docs/books/tutorial/uiswing/events/windowlistener.html">Tutorial: How to Write Window Listeners</a>
+ * @see <a href="http://docs.oracle.com/javase/tutorial/uiswing/events/windowlistener.html">Tutorial: How to Write Window Listeners</a>
  *
  * @since 1.1
  */
diff --git a/jdk/src/share/classes/java/awt/font/TextAttribute.java b/jdk/src/share/classes/java/awt/font/TextAttribute.java
index 50d47da..c462636 100644
--- a/jdk/src/share/classes/java/awt/font/TextAttribute.java
+++ b/jdk/src/share/classes/java/awt/font/TextAttribute.java
@@ -97,10 +97,10 @@
  * <h4>Summary of attributes</h4>
  * <p>
  * <font size="-1">
- * <table align="center" border="0" cellspacing="0" cellpadding="2" width="%95"
+ * <table style="float:center" border="0" cellspacing="0" cellpadding="2" width="%95"
  *     summary="Key, value type, principal constants, and default value
  *     behavior of all TextAttributes">
- * <tr bgcolor="#ccccff">
+ * <tr style="background-color:#ccccff">
  * <th valign="TOP" align="CENTER">Key</th>
  * <th valign="TOP" align="CENTER">Value Type</th>
  * <th valign="TOP" align="CENTER">Principal Constants</th>
@@ -115,7 +115,7 @@
 </td>
  * <td valign="TOP">"Default" (use platform default)</td>
  * </tr>
- * <tr bgcolor="#eeeeff">
+ * <tr style="background-color:#eeeeff">
  * <td valign="TOP">{@link #WEIGHT}</td>
  * <td valign="TOP">Number</td>
  * <td valign="TOP">WEIGHT_REGULAR, WEIGHT_BOLD</td>
@@ -127,7 +127,7 @@
  * <td valign="TOP">WIDTH_CONDENSED, WIDTH_REGULAR,<br>WIDTH_EXTENDED</td>
  * <td valign="TOP">WIDTH_REGULAR</td>
  * </tr>
- * <tr bgcolor="#eeeeff">
+ * <tr style="background-color:#eeeeff">
  * <td valign="TOP">{@link #POSTURE}</td>
  * <td valign="TOP">Number</td>
  * <td valign="TOP">POSTURE_REGULAR, POSTURE_OBLIQUE</td>
@@ -139,7 +139,7 @@
  * <td valign="TOP">none</td>
  * <td valign="TOP">12.0</td>
  * </tr>
- * <tr bgcolor="#eeeeff">
+ * <tr style="background-color:#eeeeff">
  * <td valign="TOP">{@link #TRANSFORM}</td>
  * <td valign="TOP">{@link TransformAttribute}</td>
  * <td valign="TOP">See TransformAttribute {@link TransformAttribute#IDENTITY IDENTITY}</td>
@@ -151,7 +151,7 @@
  * <td valign="TOP">SUPERSCRIPT_SUPER, SUPERSCRIPT_SUB</td>
  * <td valign="TOP">0 (use the standard glyphs and metrics)</td>
  * </tr>
- * <tr bgcolor="#eeeeff">
+ * <tr style="background-color:#eeeeff">
  * <td valign="TOP">{@link #FONT}</td>
  * <td valign="TOP">{@link java.awt.Font}</td>
  * <td valign="TOP">none</td>
@@ -163,7 +163,7 @@
  * <td valign="TOP">none</td>
  * <td valign="TOP">null (draw text using font glyphs)</td>
  * </tr>
- * <tr bgcolor="#eeeeff">
+ * <tr style="background-color:#eeeeff">
  * <td valign="TOP">{@link #FOREGROUND}</td>
  * <td valign="TOP">{@link java.awt.Paint}</td>
  * <td valign="TOP">none</td>
@@ -175,7 +175,7 @@
  * <td valign="TOP">none</td>
  * <td valign="TOP">null (do not render background)</td>
  * </tr>
- * <tr bgcolor="#eeeeff">
+ * <tr style="background-color:#eeeeff">
  * <td valign="TOP">{@link #UNDERLINE}</td>
  * <td valign="TOP">Integer</td>
  * <td valign="TOP">UNDERLINE_ON</td>
@@ -187,7 +187,7 @@
  * <td valign="TOP">STRIKETHROUGH_ON</td>
  * <td valign="TOP">false (do not render strikethrough)</td>
  * </tr>
- * <tr bgcolor="#eeeeff">
+ * <tr style="background-color:#eeeeff">
  * <td valign="TOP">{@link #RUN_DIRECTION}</td>
  * <td valign="TOP">Boolean</td>
  * <td valign="TOP">RUN_DIRECTION_LTR<br>RUN_DIRECTION_RTL</td>
@@ -199,7 +199,7 @@
  * <td valign="TOP">none</td>
  * <td valign="TOP">0 (use base line direction)</td>
  * </tr>
- * <tr bgcolor="#eeeeff">
+ * <tr style="background-color:#eeeeff">
  * <td valign="TOP">{@link #JUSTIFICATION}</td>
  * <td valign="TOP">Number</td>
  * <td valign="TOP">JUSTIFICATION_FULL</td>
@@ -211,7 +211,7 @@
  * <td valign="TOP">(see class)</td>
  * <td valign="TOP">null (do not apply input highlighting)</td>
  * </tr>
- * <tr bgcolor="#eeeeff">
+ * <tr style="background-color:#eeeeff">
  * <td valign="TOP">{@link #INPUT_METHOD_UNDERLINE}</td>
  * <td valign="TOP">Integer</td>
  * <td valign="TOP">UNDERLINE_LOW_ONE_PIXEL,<br>UNDERLINE_LOW_TWO_PIXEL</td>
@@ -223,7 +223,7 @@
  * <td valign="TOP">SWAP_COLORS_ON</td>
  * <td valign="TOP">false (do not swap colors)</td>
  * </tr>
- * <tr bgcolor="#eeeeff">
+ * <tr style="background-color:#eeeeff">
  * <td valign="TOP">{@link #NUMERIC_SHAPING}</td>
  * <td valign="TOP">{@link java.awt.font.NumericShaper}</td>
  * <td valign="TOP">none</td>
@@ -235,7 +235,7 @@
  * <td valign="TOP">KERNING_ON</td>
  * <td valign="TOP">0 (do not request kerning)</td>
  * </tr>
- * <tr bgcolor="#eeeeff">
+ * <tr style="background-color:#eeeeff">
  * <td valign="TOP">{@link #LIGATURES}</td>
  * <td valign="TOP">Integer</td>
  * <td valign="TOP">LIGATURES_ON</td>
diff --git a/jdk/src/share/classes/java/awt/geom/AffineTransform.java b/jdk/src/share/classes/java/awt/geom/AffineTransform.java
index 751deac..0977cf8 100644
--- a/jdk/src/share/classes/java/awt/geom/AffineTransform.java
+++ b/jdk/src/share/classes/java/awt/geom/AffineTransform.java
@@ -47,7 +47,7 @@
  *      [ 1 ]   [   0    0    1   ] [ 1 ]   [         1         ]
  * </pre>
  * <p>
- * <a name="quadrantapproximation"><h4>Handling 90-Degree Rotations</h4></a>
+ * <a name="quadrantapproximation"></a><h4>Handling 90-Degree Rotations</h4>
  * <p>
  * In some variations of the <code>rotate</code> methods in the
  * <code>AffineTransform</code> class, a double-precision argument
diff --git a/jdk/src/share/classes/java/awt/geom/Line2D.java b/jdk/src/share/classes/java/awt/geom/Line2D.java
index 2eccbd0..a34e794 100644
--- a/jdk/src/share/classes/java/awt/geom/Line2D.java
+++ b/jdk/src/share/classes/java/awt/geom/Line2D.java
@@ -35,7 +35,7 @@
  * default coordinate system called <i>user space</i> in which the y-axis
  * values increase downward and x-axis values increase to the right.  For
  * more information on the user space coordinate system, see the
- * <a href="http://java.sun.com/j2se/1.3/docs/guide/2d/spec/j2d-intro.fm2.html#61857">
+ * <a href="http://docs.oracle.com/javase/1.3/docs/guide/2d/spec/j2d-intro.fm2.html#61857">
  * Coordinate Systems</a> section of the Java 2D Programmer's Guide.
  * <p>
  * This class is only the abstract superclass for all objects that
@@ -82,7 +82,7 @@
         public float y2;
 
         /**
-         * Constructs and initializes a Line with coordinates (0, 0) -> (0, 0).
+         * Constructs and initializes a Line with coordinates (0, 0) &rarr; (0, 0).
          * @since 1.2
          */
         public Float() {
@@ -249,7 +249,7 @@
         public double y2;
 
         /**
-         * Constructs and initializes a Line with coordinates (0, 0) -> (0, 0).
+         * Constructs and initializes a Line with coordinates (0, 0) &rarr; (0, 0).
          * @since 1.2
          */
         public Double() {
@@ -623,7 +623,7 @@
      *           specified line segment
      * @param y2 the Y coordinate of the end point of the
      *           specified line segment
-     * @return <true> if this line segment and the specified line segment
+     * @return {@code <true>} if this line segment and the specified line segment
      *                  intersect each other; <code>false</code> otherwise.
      * @since 1.2
      */
diff --git a/jdk/src/share/classes/java/awt/im/InputContext.java b/jdk/src/share/classes/java/awt/im/InputContext.java
index d835e69..e2223fc 100644
--- a/jdk/src/share/classes/java/awt/im/InputContext.java
+++ b/jdk/src/share/classes/java/awt/im/InputContext.java
@@ -118,7 +118,6 @@
      * Otherwise, an input method or keyboard layout that supports the requested
      * locale is selected in an implementation dependent way.</li>
      *
-     * <p>
      * </ul>
      * Before switching away from an input method, any currently uncommitted text
      * is committed. If no input method or keyboard layout supporting the requested
diff --git a/jdk/src/share/classes/java/awt/im/InputMethodHighlight.java b/jdk/src/share/classes/java/awt/im/InputMethodHighlight.java
index ffa99df..55905d9 100644
--- a/jdk/src/share/classes/java/awt/im/InputMethodHighlight.java
+++ b/jdk/src/share/classes/java/awt/im/InputMethodHighlight.java
@@ -51,8 +51,8 @@
 * mappings from abstract to concrete styles. Currently defined state values
 * are raw (unconverted) and converted.
 * These state values are recommended for use before and after the
-* main conversion step of text composition, say, before and after kana->kanji
-* or pinyin->hanzi conversion.
+* main conversion step of text composition, say, before and after kana-&gt;kanji
+* or pinyin-&gt;hanzi conversion.
 * The <code>variation</code> field allows input methods to express additional
 * information about the conversion results.
 * <p>
diff --git a/jdk/src/share/classes/java/awt/peer/ComponentPeer.java b/jdk/src/share/classes/java/awt/peer/ComponentPeer.java
index 40f310d..8f5942a 100644
--- a/jdk/src/share/classes/java/awt/peer/ComponentPeer.java
+++ b/jdk/src/share/classes/java/awt/peer/ComponentPeer.java
@@ -260,15 +260,6 @@
     ColorModel getColorModel();
 
     /**
-     * Returns the toolkit that is responsible for the component.
-     *
-     * @return the toolkit that is responsible for the component
-     *
-     * @see Component#getToolkit()
-     */
-    Toolkit getToolkit();
-
-    /**
      * Returns a graphics object to paint on the component.
      *
      * @return a graphics object to paint on the component
diff --git a/jdk/src/share/classes/java/awt/peer/TextComponentPeer.java b/jdk/src/share/classes/java/awt/peer/TextComponentPeer.java
index a7a36a3..a84bac2 100644
--- a/jdk/src/share/classes/java/awt/peer/TextComponentPeer.java
+++ b/jdk/src/share/classes/java/awt/peer/TextComponentPeer.java
@@ -60,11 +60,11 @@
     /**
      * Sets the content for the text component.
      *
-     * @param l the content to set
+     * @param text the content to set
      *
      * @see TextComponent#setText(String)
      */
-    void setText(String l);
+    void setText(String text);
 
     /**
      * Returns the start index of the current selection.
diff --git a/jdk/src/share/classes/java/awt/print/PrinterJob.java b/jdk/src/share/classes/java/awt/print/PrinterJob.java
index 2735ef7..6ac1133 100644
--- a/jdk/src/share/classes/java/awt/print/PrinterJob.java
+++ b/jdk/src/share/classes/java/awt/print/PrinterJob.java
@@ -98,7 +98,7 @@
      * Calling this method is equivalent to calling
      * {@link javax.print.PrintServiceLookup#lookupPrintServices(
      * DocFlavor, AttributeSet)
-     * <code>PrintServiceLookup.lookupPrintServices()</code>}
+     * PrintServiceLookup.lookupPrintServices()}
      * and specifying a Pageable DocFlavor.
      * @return a possibly empty array of 2D print services.
      * @since     1.4
@@ -136,8 +136,8 @@
      * <code>PrinterJob</code> instances which support print services.
      * Calling this method is equivalent to calling
      * {@link javax.print.StreamPrintServiceFactory#lookupStreamPrintServiceFactories(DocFlavor, String)
-     * <code>StreamPrintServiceFactory.lookupStreamPrintServiceFactories()
-     * </code>} and specifying a Pageable DocFlavor.
+     * StreamPrintServiceFactory.lookupStreamPrintServiceFactories()
+     * } and specifying a Pageable DocFlavor.
      *
      * @param mimeType the required output format, or null to mean any format.
      * @return a possibly empty array of 2D stream print service factories.
@@ -155,7 +155,7 @@
 
     /**
      * A <code>PrinterJob</code> object should be created using the
-     * static {@link #getPrinterJob() <code>getPrinterJob</code>} method.
+     * static {@link #getPrinterJob() getPrinterJob} method.
      */
     public PrinterJob() {
     }
diff --git a/jdk/src/share/classes/java/beans/EventHandler.java b/jdk/src/share/classes/java/beans/EventHandler.java
index b428f28..935f735 100644
--- a/jdk/src/share/classes/java/beans/EventHandler.java
+++ b/jdk/src/share/classes/java/beans/EventHandler.java
@@ -33,6 +33,7 @@
 import java.security.PrivilegedAction;
 
 import sun.reflect.misc.MethodUtil;
+import sun.reflect.misc.ReflectUtil;
 
 /**
  * The <code>EventHandler</code> class provides
@@ -677,22 +678,38 @@
      *
      * @see EventHandler
      */
-    @SuppressWarnings("unchecked")
     public static <T> T create(Class<T> listenerInterface,
                                Object target, String action,
                                String eventPropertyName,
                                String listenerMethodName)
     {
         // Create this first to verify target/action are non-null
-        EventHandler eventHandler = new EventHandler(target, action,
+        final EventHandler handler = new EventHandler(target, action,
                                                      eventPropertyName,
                                                      listenerMethodName);
         if (listenerInterface == null) {
             throw new NullPointerException(
                           "listenerInterface must be non-null");
         }
-        return (T)Proxy.newProxyInstance(target.getClass().getClassLoader(),
-                                         new Class<?>[] {listenerInterface},
-                                         eventHandler);
+        final ClassLoader loader = getClassLoader(listenerInterface);
+        final Class<?>[] interfaces = {listenerInterface};
+        return AccessController.doPrivileged(new PrivilegedAction<T>() {
+            @SuppressWarnings("unchecked")
+            public T run() {
+                return (T) Proxy.newProxyInstance(loader, interfaces, handler);
+            }
+        });
+    }
+
+    private static ClassLoader getClassLoader(Class<?> type) {
+        ReflectUtil.checkPackageAccess(type);
+        ClassLoader loader = type.getClassLoader();
+        if (loader == null) {
+            loader = Thread.currentThread().getContextClassLoader(); // avoid use of BCP
+            if (loader == null) {
+                loader = ClassLoader.getSystemClassLoader();
+            }
+        }
+        return loader;
     }
 }
diff --git a/jdk/src/share/classes/java/beans/Introspector.java b/jdk/src/share/classes/java/beans/Introspector.java
index acc0f77..fc8b218 100644
--- a/jdk/src/share/classes/java/beans/Introspector.java
+++ b/jdk/src/share/classes/java/beans/Introspector.java
@@ -87,7 +87,7 @@
  * <p>
  * For more information about introspection and design patterns, please
  * consult the
- *  <a href="http://java.sun.com/products/javabeans/docs/index.html">JavaBeans&trade; specification</a>.
+ *  <a href="http://www.oracle.com/technetwork/java/javase/documentation/spec-136004.html">JavaBeans&trade; specification</a>.
  */
 
 public class Introspector {
diff --git a/jdk/src/share/classes/java/io/File.java b/jdk/src/share/classes/java/io/File.java
index f11530d..bafcea5 100644
--- a/jdk/src/share/classes/java/io/File.java
+++ b/jdk/src/share/classes/java/io/File.java
@@ -1908,10 +1908,18 @@
             } else {
                 n = Math.abs(n);
             }
+
+            // Use only the file name from the supplied prefix
+            prefix = (new File(prefix)).getName();
+
             String name = prefix + Long.toString(n) + suffix;
             File f = new File(dir, name);
-            if (!name.equals(f.getName()) || f.isInvalid())
-                throw new IOException("Unable to create temporary file");
+            if (!name.equals(f.getName()) || f.isInvalid()) {
+                if (System.getSecurityManager() != null)
+                    throw new IOException("Unable to create temporary file");
+                else
+                    throw new IOException("Unable to create temporary file, " + f);
+            }
             return f;
         }
     }
diff --git a/jdk/src/share/classes/java/lang/Class.java b/jdk/src/share/classes/java/lang/Class.java
index a09aa2c..6d1aa00 100644
--- a/jdk/src/share/classes/java/lang/Class.java
+++ b/jdk/src/share/classes/java/lang/Class.java
@@ -3414,16 +3414,20 @@
     transient ClassValue.ClassValueMap classValueMap;
 
     /**
-     * Returns an AnnotatedType object that represents the use of a type to specify
-     * the superclass of the entity represented by this Class. (The <em>use</em> of type
-     * Foo to specify the superclass in '... extends Foo' is distinct from the
-     * <em>declaration</em> of type Foo.)
+     * Returns an {@code AnnotatedType} object that represents the use of a
+     * type to specify the superclass of the entity represented by this {@code
+     * Class} object. (The <em>use</em> of type Foo to specify the superclass
+     * in '...  extends Foo' is distinct from the <em>declaration</em> of type
+     * Foo.)
      *
-     * If this Class represents a class type whose declaration does not explicitly
-     * indicate an annotated superclass, the return value is null.
+     * <p> If this {@code Class} object represents a type whose declaration
+     * does not explicitly indicate an annotated superclass, then the return
+     * value is an {@code AnnotatedType} object representing an element with no
+     * annotations.
      *
-     * If this Class represents either the Object class, an interface type, an
-     * array type, a primitive type, or void, the return value is null.
+     * <p> If this {@code Class} represents either the {@code Object} class, an
+     * interface type, an array type, a primitive type, or void, the return
+     * value is {@code null}.
      *
      * @return an object representing the superclass
      * @since 1.8
@@ -3441,30 +3445,33 @@
     }
 
     /**
-     * Returns an array of AnnotatedType objects that represent the use of types to
-     * specify superinterfaces of the entity represented by this Class. (The <em>use</em>
-     * of type Foo to specify a superinterface in '... implements Foo' is
-     * distinct from the <em>declaration</em> of type Foo.)
+     * Returns an array of {@code AnnotatedType} objects that represent the use
+     * of types to specify superinterfaces of the entity represented by this
+     * {@code Class} object. (The <em>use</em> of type Foo to specify a
+     * superinterface in '... implements Foo' is distinct from the
+     * <em>declaration</em> of type Foo.)
      *
-     * If this Class represents a class, the return value is an array
-     * containing objects representing the uses of interface types to specify
-     * interfaces implemented by the class. The order of the objects in the
-     * array corresponds to the order of the interface types used in the
-     * 'implements' clause of the declaration of this Class.
-     *
-     * If this Class represents an interface, the return value is an array
-     * containing objects representing the uses of interface types to specify
-     * interfaces directly extended by the interface. The order of the objects in
+     * <p> If this {@code Class} object represents a class, the return value is
+     * an array containing objects representing the uses of interface types to
+     * specify interfaces implemented by the class. The order of the objects in
      * the array corresponds to the order of the interface types used in the
-     * 'extends' clause of the declaration of this Class.
+     * 'implements' clause of the declaration of this {@code Class} object.
      *
-     * If this Class represents a class or interface whose declaration does not
-     * explicitly indicate any annotated superinterfaces, the return value is an
+     * <p> If this {@code Class} object represents an interface, the return
+     * value is an array containing objects representing the uses of interface
+     * types to specify interfaces directly extended by the interface. The
+     * order of the objects in the array corresponds to the order of the
+     * interface types used in the 'extends' clause of the declaration of this
+     * {@code Class} object.
+     *
+     * <p> If this {@code Class} object represents a class or interface whose
+     * declaration does not explicitly indicate any annotated superinterfaces,
+     * the return value is an array of length 0.
+     *
+     * <p> If this {@code Class} object represents either the {@code Object}
+     * class, an array type, a primitive type, or void, the return value is an
      * array of length 0.
      *
-     * If this Class represents either the Object class, an array type, a
-     * primitive type, or void, the return value is an array of length 0.
-     *
      * @return an array representing the superinterfaces
      * @since 1.8
      */
diff --git a/jdk/src/share/classes/java/lang/invoke/AbstractValidatingLambdaMetafactory.java b/jdk/src/share/classes/java/lang/invoke/AbstractValidatingLambdaMetafactory.java
index 92a44a0..793a2d1 100644
--- a/jdk/src/share/classes/java/lang/invoke/AbstractValidatingLambdaMetafactory.java
+++ b/jdk/src/share/classes/java/lang/invoke/AbstractValidatingLambdaMetafactory.java
@@ -125,10 +125,7 @@
 
         this.implMethod = implMethod;
         this.implInfo = caller.revealDirect(implMethod);
-        // @@@ Temporary work-around pending resolution of 8005119
-        this.implKind = (implInfo.getReferenceKind() == MethodHandleInfo.REF_invokeSpecial)
-                        ? MethodHandleInfo.REF_invokeVirtual
-                        : implInfo.getReferenceKind();
+        this.implKind = implInfo.getReferenceKind();
         this.implIsInstanceMethod =
                 implKind == MethodHandleInfo.REF_invokeVirtual ||
                 implKind == MethodHandleInfo.REF_invokeSpecial ||
diff --git a/jdk/src/share/classes/java/lang/invoke/BoundMethodHandle.java b/jdk/src/share/classes/java/lang/invoke/BoundMethodHandle.java
index 846920a..abc3147 100644
--- a/jdk/src/share/classes/java/lang/invoke/BoundMethodHandle.java
+++ b/jdk/src/share/classes/java/lang/invoke/BoundMethodHandle.java
@@ -360,6 +360,10 @@
             return new Name(mh, mhName);
         }
 
+        NamedFunction getterFunction(int i) {
+            return new NamedFunction(getters[i]);
+        }
+
         static final SpeciesData EMPTY = new SpeciesData("", BoundMethodHandle.class);
 
         private SpeciesData(String types, Class<? extends BoundMethodHandle> clazz) {
@@ -394,6 +398,7 @@
         private boolean isPlaceholder() { return clazz == null; }
 
         private static final HashMap<String, SpeciesData> CACHE = new HashMap<>();
+        static { CACHE.put("", EMPTY); }  // make bootstrap predictable
         private static final boolean INIT_DONE;  // set after <clinit> finishes...
 
         SpeciesData extendWithType(char type) {
@@ -524,18 +529,18 @@
          * A concrete BMH species adheres to the following schema:
          *
          * <pre>
-         * class Species_<<types>> extends BoundMethodHandle {
-         *     <<fields>>
-         *     final SpeciesData speciesData() { return SpeciesData.get("<<types>>"); }
+         * class Species_[[types]] extends BoundMethodHandle {
+         *     [[fields]]
+         *     final SpeciesData speciesData() { return SpeciesData.get("[[types]]"); }
          * }
          * </pre>
          *
-         * The {@code <<types>>} signature is precisely the string that is passed to this
+         * The {@code [[types]]} signature is precisely the string that is passed to this
          * method.
          *
-         * The {@code <<fields>>} section consists of one field definition per character in
+         * The {@code [[fields]]} section consists of one field definition per character in
          * the type signature, adhering to the naming schema described in the definition of
-         * {@link #makeFieldName()}.
+         * {@link #makeFieldName}.
          *
          * For example, a concrete BMH species for two reference and one integral bound values
          * would have the following shape:
@@ -817,7 +822,7 @@
          * {@code <init>}. To avoid this, we add an indirection by invoking {@code <init>} through
          * {@link MethodHandle#linkToSpecial}.
          *
-         * The last {@link LambdaForm#Name Name} in the argument's form is expected to be the {@code void}
+         * The last {@link LambdaForm.Name Name} in the argument's form is expected to be the {@code void}
          * result of the {@code <init>} invocation. This entry is replaced.
          */
         private static MethodHandle linkConstructor(MethodHandle cmh) {
diff --git a/jdk/src/share/classes/java/lang/invoke/CallSite.java b/jdk/src/share/classes/java/lang/invoke/CallSite.java
index d834641..1d584d5 100644
--- a/jdk/src/share/classes/java/lang/invoke/CallSite.java
+++ b/jdk/src/share/classes/java/lang/invoke/CallSite.java
@@ -60,7 +60,7 @@
  * <p>
  * Here is a sample use of call sites and bootstrap methods which links every
  * dynamic call site to print its arguments:
-<blockquote><pre><!-- see indy-demo/src/PrintArgsDemo.java -->
+<blockquote><pre>{@code
 static void test() throws Throwable {
     // THE FOLLOWING LINE IS PSEUDOCODE FOR A JVM INSTRUCTION
     InvokeDynamic[#bootstrapDynamic].baz("baz arg", 2, 3.14);
@@ -79,7 +79,7 @@
   // ignore caller and name, but match the type:
   return new ConstantCallSite(printArgs.asType(type));
 }
-</pre></blockquote>
+}</pre></blockquote>
  * @author John Rose, JSR 292 EG
  */
 abstract
@@ -199,12 +199,12 @@
      * which has been linked to this call site.
      * <p>
      * This method is equivalent to the following code:
-     * <blockquote><pre>
+     * <blockquote><pre>{@code
      * MethodHandle getTarget, invoker, result;
      * getTarget = MethodHandles.publicLookup().bind(this, "getTarget", MethodType.methodType(MethodHandle.class));
      * invoker = MethodHandles.exactInvoker(this.type());
      * result = MethodHandles.foldArguments(invoker, getTarget)
-     * </pre></blockquote>
+     * }</pre></blockquote>
      *
      * @return a method handle which always invokes this call site's current target
      */
@@ -261,7 +261,7 @@
                              Object info,
                              // Caller information:
                              Class<?> callerClass) {
-        Object caller = IMPL_LOOKUP.in(callerClass);
+        MethodHandles.Lookup caller = IMPL_LOOKUP.in(callerClass);
         CallSite site;
         try {
             Object binding;
@@ -273,14 +273,44 @@
             } else {
                 Object[] argv = (Object[]) info;
                 maybeReBoxElements(argv);
-                if (3 + argv.length > 255)
-                    throw new BootstrapMethodError("too many bootstrap method arguments");
-                MethodType bsmType = bootstrapMethod.type();
-                if (bsmType.parameterCount() == 4 && bsmType.parameterType(3) == Object[].class)
-                    binding = bootstrapMethod.invoke(caller, name, type, argv);
-                else
-                    binding = MethodHandles.spreadInvoker(bsmType, 3)
-                        .invoke(bootstrapMethod, caller, name, type, argv);
+                switch (argv.length) {
+                case 0:
+                    binding = bootstrapMethod.invoke(caller, name, type);
+                    break;
+                case 1:
+                    binding = bootstrapMethod.invoke(caller, name, type,
+                                                     argv[0]);
+                    break;
+                case 2:
+                    binding = bootstrapMethod.invoke(caller, name, type,
+                                                     argv[0], argv[1]);
+                    break;
+                case 3:
+                    binding = bootstrapMethod.invoke(caller, name, type,
+                                                     argv[0], argv[1], argv[2]);
+                    break;
+                case 4:
+                    binding = bootstrapMethod.invoke(caller, name, type,
+                                                     argv[0], argv[1], argv[2], argv[3]);
+                    break;
+                case 5:
+                    binding = bootstrapMethod.invoke(caller, name, type,
+                                                     argv[0], argv[1], argv[2], argv[3], argv[4]);
+                    break;
+                case 6:
+                    binding = bootstrapMethod.invoke(caller, name, type,
+                                                     argv[0], argv[1], argv[2], argv[3], argv[4], argv[5]);
+                    break;
+                default:
+                    final int NON_SPREAD_ARG_COUNT = 3;  // (caller, name, type)
+                    if (NON_SPREAD_ARG_COUNT + argv.length > MethodType.MAX_MH_ARITY)
+                        throw new BootstrapMethodError("too many bootstrap method arguments");
+                    MethodType bsmType = bootstrapMethod.type();
+                    MethodType invocationType = MethodType.genericMethodType(NON_SPREAD_ARG_COUNT + argv.length);
+                    MethodHandle typedBSM = bootstrapMethod.asType(invocationType);
+                    MethodHandle spreader = invocationType.invokers().spreadInvoker(NON_SPREAD_ARG_COUNT);
+                    binding = spreader.invokeExact(typedBSM, (Object)caller, (Object)name, (Object)type, argv);
+                }
             }
             //System.out.println("BSM for "+name+type+" => "+binding);
             if (binding instanceof CallSite) {
diff --git a/jdk/src/share/classes/java/lang/invoke/DirectMethodHandle.java b/jdk/src/share/classes/java/lang/invoke/DirectMethodHandle.java
index b9c10d8..9c05451 100644
--- a/jdk/src/share/classes/java/lang/invoke/DirectMethodHandle.java
+++ b/jdk/src/share/classes/java/lang/invoke/DirectMethodHandle.java
@@ -257,12 +257,12 @@
         assert(names.length == nameCursor);
         if (doesAlloc) {
             // names = { argx,y,z,... new C, init method }
-            names[NEW_OBJ] = new Name(NF_allocateInstance, names[DMH_THIS]);
-            names[GET_MEMBER] = new Name(NF_constructorMethod, names[DMH_THIS]);
+            names[NEW_OBJ] = new Name(Lazy.NF_allocateInstance, names[DMH_THIS]);
+            names[GET_MEMBER] = new Name(Lazy.NF_constructorMethod, names[DMH_THIS]);
         } else if (needsInit) {
-            names[GET_MEMBER] = new Name(NF_internalMemberNameEnsureInit, names[DMH_THIS]);
+            names[GET_MEMBER] = new Name(Lazy.NF_internalMemberNameEnsureInit, names[DMH_THIS]);
         } else {
-            names[GET_MEMBER] = new Name(NF_internalMemberName, names[DMH_THIS]);
+            names[GET_MEMBER] = new Name(Lazy.NF_internalMemberName, names[DMH_THIS]);
         }
         Object[] outArgs = Arrays.copyOfRange(names, ARG_BASE, GET_MEMBER+1, Object[].class);
         assert(outArgs[outArgs.length-1] == names[GET_MEMBER]);  // look, shifted args!
@@ -637,18 +637,18 @@
         final int RESULT    = nameCursor-1;  // either the call or the cast
         Name[] names = arguments(nameCursor - ARG_LIMIT, mtype.invokerType());
         if (needsInit)
-            names[INIT_BAR] = new Name(NF_ensureInitialized, names[DMH_THIS]);
+            names[INIT_BAR] = new Name(Lazy.NF_ensureInitialized, names[DMH_THIS]);
         if (needsCast && !isGetter)
-            names[PRE_CAST] = new Name(NF_checkCast, names[DMH_THIS], names[SET_VALUE]);
+            names[PRE_CAST] = new Name(Lazy.NF_checkCast, names[DMH_THIS], names[SET_VALUE]);
         Object[] outArgs = new Object[1 + linkerType.parameterCount()];
         assert(outArgs.length == (isGetter ? 3 : 4));
         outArgs[0] = UNSAFE;
         if (isStatic) {
-            outArgs[1] = names[F_HOLDER]  = new Name(NF_staticBase, names[DMH_THIS]);
-            outArgs[2] = names[F_OFFSET]  = new Name(NF_staticOffset, names[DMH_THIS]);
+            outArgs[1] = names[F_HOLDER]  = new Name(Lazy.NF_staticBase, names[DMH_THIS]);
+            outArgs[2] = names[F_OFFSET]  = new Name(Lazy.NF_staticOffset, names[DMH_THIS]);
         } else {
-            outArgs[1] = names[OBJ_CHECK] = new Name(NF_checkBase, names[OBJ_BASE]);
-            outArgs[2] = names[F_OFFSET]  = new Name(NF_fieldOffset, names[DMH_THIS]);
+            outArgs[1] = names[OBJ_CHECK] = new Name(Lazy.NF_checkBase, names[OBJ_BASE]);
+            outArgs[2] = names[F_OFFSET]  = new Name(Lazy.NF_fieldOffset, names[DMH_THIS]);
         }
         if (!isGetter) {
             outArgs[3] = (needsCast ? names[PRE_CAST] : names[SET_VALUE]);
@@ -656,7 +656,7 @@
         for (Object a : outArgs)  assert(a != null);
         names[LINKER_CALL] = new Name(linker, outArgs);
         if (needsCast && isGetter)
-            names[POST_CAST] = new Name(NF_checkCast, names[DMH_THIS], names[LINKER_CALL]);
+            names[POST_CAST] = new Name(Lazy.NF_checkCast, names[DMH_THIS], names[LINKER_CALL]);
         for (Name n : names)  assert(n != null);
         String fieldOrStatic = (isStatic ? "Static" : "Field");
         String lambdaName = (linkerName + fieldOrStatic);  // significant only for debugging
@@ -665,48 +665,54 @@
         return new LambdaForm(lambdaName, ARG_LIMIT, names, RESULT);
     }
 
-    private static final NamedFunction
-            NF_internalMemberName,
-            NF_internalMemberNameEnsureInit,
-            NF_ensureInitialized,
-            NF_fieldOffset,
-            NF_checkBase,
-            NF_staticBase,
-            NF_staticOffset,
-            NF_checkCast,
-            NF_allocateInstance,
-            NF_constructorMethod;
-    static {
-        try {
-            NamedFunction nfs[] = {
-                NF_internalMemberName = new NamedFunction(DirectMethodHandle.class
-                    .getDeclaredMethod("internalMemberName", Object.class)),
-                NF_internalMemberNameEnsureInit = new NamedFunction(DirectMethodHandle.class
-                    .getDeclaredMethod("internalMemberNameEnsureInit", Object.class)),
-                NF_ensureInitialized = new NamedFunction(DirectMethodHandle.class
-                    .getDeclaredMethod("ensureInitialized", Object.class)),
-                NF_fieldOffset = new NamedFunction(DirectMethodHandle.class
-                    .getDeclaredMethod("fieldOffset", Object.class)),
-                NF_checkBase = new NamedFunction(DirectMethodHandle.class
-                    .getDeclaredMethod("checkBase", Object.class)),
-                NF_staticBase = new NamedFunction(DirectMethodHandle.class
-                    .getDeclaredMethod("staticBase", Object.class)),
-                NF_staticOffset = new NamedFunction(DirectMethodHandle.class
-                    .getDeclaredMethod("staticOffset", Object.class)),
-                NF_checkCast = new NamedFunction(DirectMethodHandle.class
-                    .getDeclaredMethod("checkCast", Object.class, Object.class)),
-                NF_allocateInstance = new NamedFunction(DirectMethodHandle.class
-                    .getDeclaredMethod("allocateInstance", Object.class)),
-                NF_constructorMethod = new NamedFunction(DirectMethodHandle.class
-                    .getDeclaredMethod("constructorMethod", Object.class))
-            };
-            for (NamedFunction nf : nfs) {
-                // Each nf must be statically invocable or we get tied up in our bootstraps.
-                assert(InvokerBytecodeGenerator.isStaticallyInvocable(nf.member)) : nf;
-                nf.resolve();
+    /**
+     * Pre-initialized NamedFunctions for bootstrapping purposes.
+     * Factored in an inner class to delay initialization until first usage.
+     */
+    private static class Lazy {
+        static final NamedFunction
+                NF_internalMemberName,
+                NF_internalMemberNameEnsureInit,
+                NF_ensureInitialized,
+                NF_fieldOffset,
+                NF_checkBase,
+                NF_staticBase,
+                NF_staticOffset,
+                NF_checkCast,
+                NF_allocateInstance,
+                NF_constructorMethod;
+        static {
+            try {
+                NamedFunction nfs[] = {
+                        NF_internalMemberName = new NamedFunction(DirectMethodHandle.class
+                                .getDeclaredMethod("internalMemberName", Object.class)),
+                        NF_internalMemberNameEnsureInit = new NamedFunction(DirectMethodHandle.class
+                                .getDeclaredMethod("internalMemberNameEnsureInit", Object.class)),
+                        NF_ensureInitialized = new NamedFunction(DirectMethodHandle.class
+                                .getDeclaredMethod("ensureInitialized", Object.class)),
+                        NF_fieldOffset = new NamedFunction(DirectMethodHandle.class
+                                .getDeclaredMethod("fieldOffset", Object.class)),
+                        NF_checkBase = new NamedFunction(DirectMethodHandle.class
+                                .getDeclaredMethod("checkBase", Object.class)),
+                        NF_staticBase = new NamedFunction(DirectMethodHandle.class
+                                .getDeclaredMethod("staticBase", Object.class)),
+                        NF_staticOffset = new NamedFunction(DirectMethodHandle.class
+                                .getDeclaredMethod("staticOffset", Object.class)),
+                        NF_checkCast = new NamedFunction(DirectMethodHandle.class
+                                .getDeclaredMethod("checkCast", Object.class, Object.class)),
+                        NF_allocateInstance = new NamedFunction(DirectMethodHandle.class
+                                .getDeclaredMethod("allocateInstance", Object.class)),
+                        NF_constructorMethod = new NamedFunction(DirectMethodHandle.class
+                                .getDeclaredMethod("constructorMethod", Object.class))
+                };
+                for (NamedFunction nf : nfs) {
+                    // Each nf must be statically invocable or we get tied up in our bootstraps.
+                    assert(InvokerBytecodeGenerator.isStaticallyInvocable(nf.member)) : nf;
+                    nf.resolve();
+                }
+            } catch (ReflectiveOperationException ex) {
+                throw newInternalError(ex);
             }
-        } catch (ReflectiveOperationException ex) {
-            throw newInternalError(ex);
         }
     }
 }
diff --git a/jdk/src/share/classes/java/lang/invoke/InvokeGeneric.java b/jdk/src/share/classes/java/lang/invoke/InvokeGeneric.java
deleted file mode 100644
index 81f663b..0000000
--- a/jdk/src/share/classes/java/lang/invoke/InvokeGeneric.java
+++ /dev/null
@@ -1,148 +0,0 @@
-/*
- * Copyright (c) 2009, 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.  Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please 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.invoke.util.*;
-import static java.lang.invoke.MethodHandles.Lookup.IMPL_LOOKUP;
-
-/**
- * Adapters which manage inexact MethodHandle.invoke calls.
- * The JVM calls one of these when the exact type match fails.
- * @author jrose
- */
-class InvokeGeneric {
-    // erased type for the call, which originates from an inexact invoke site
-    private final MethodType erasedCallerType;
-    // an invoker of type (MT, MH; A...) -> R
-    private final MethodHandle initialInvoker;
-
-    /** Compute and cache information for this adapter, so that it can
-     *  call out to targets of the erasure-family of the given erased type.
-     */
-    /*non-public*/ InvokeGeneric(MethodType erasedCallerType) throws ReflectiveOperationException {
-        assert(erasedCallerType.equals(erasedCallerType.erase()));
-        this.erasedCallerType = erasedCallerType;
-        this.initialInvoker = makeInitialInvoker();
-        assert initialInvoker.type().equals(erasedCallerType
-                                            .insertParameterTypes(0, MethodType.class, MethodHandle.class))
-            : initialInvoker.type();
-    }
-
-    private static MethodHandles.Lookup lookup() {
-        return IMPL_LOOKUP;
-    }
-
-    /** Return the adapter information for this type's erasure. */
-    /*non-public*/ static MethodHandle generalInvokerOf(MethodType erasedCallerType) throws ReflectiveOperationException {
-        InvokeGeneric gen = new InvokeGeneric(erasedCallerType);
-        return gen.initialInvoker;
-    }
-
-    private MethodHandle makeInitialInvoker() throws ReflectiveOperationException {
-        // postDispatch = #(MH'; MT, MH; A...){MH'(MT, MH; A)}
-        MethodHandle postDispatch = makePostDispatchInvoker();
-        MethodHandle invoker;
-        if (returnConversionPossible()) {
-            invoker = MethodHandles.foldArguments(postDispatch,
-                                                  dispatcher("dispatchWithConversion"));
-        } else {
-            invoker = MethodHandles.foldArguments(postDispatch, dispatcher("dispatch"));
-        }
-        return invoker;
-    }
-
-    private static final Class<?>[] EXTRA_ARGS = { MethodType.class, MethodHandle.class };
-    private MethodHandle makePostDispatchInvoker() {
-        // Take (MH'; MT, MH; A...) and run MH'(MT, MH; A...).
-        MethodType invokerType = erasedCallerType.insertParameterTypes(0, EXTRA_ARGS);
-        return invokerType.invokers().exactInvoker();
-    }
-    private MethodHandle dropDispatchArguments(MethodHandle targetInvoker) {
-        assert(targetInvoker.type().parameterType(0) == MethodHandle.class);
-        return MethodHandles.dropArguments(targetInvoker, 1, EXTRA_ARGS);
-    }
-
-    private MethodHandle dispatcher(String dispatchName) throws ReflectiveOperationException {
-        return lookup().bind(this, dispatchName,
-                             MethodType.methodType(MethodHandle.class,
-                                                   MethodType.class, MethodHandle.class));
-    }
-
-    static final boolean USE_AS_TYPE_PATH = true;
-
-    /** Return a method handle to invoke on the callerType, target, and remaining arguments.
-     *  The method handle must finish the call.
-     *  This is the first look at the caller type and target.
-     */
-    private MethodHandle dispatch(MethodType callerType, MethodHandle target) {
-        MethodType targetType = target.type();
-        if (USE_AS_TYPE_PATH || target.isVarargsCollector()) {
-            MethodHandle newTarget = target.asType(callerType);
-            targetType = callerType;
-            Invokers invokers = targetType.invokers();
-            MethodHandle invoker = invokers.erasedInvokerWithDrops;
-            if (invoker == null) {
-                invokers.erasedInvokerWithDrops = invoker =
-                    dropDispatchArguments(invokers.erasedInvoker());
-            }
-            return invoker.bindTo(newTarget);
-        }
-        throw new RuntimeException("NYI");
-    }
-
-    private MethodHandle dispatchWithConversion(MethodType callerType, MethodHandle target) {
-        MethodHandle finisher = dispatch(callerType, target);
-        if (returnConversionNeeded(callerType, target))
-            finisher = addReturnConversion(finisher, callerType.returnType());  //FIXME: slow
-        return finisher;
-    }
-
-    private boolean returnConversionPossible() {
-        Class<?> needType = erasedCallerType.returnType();
-        return !needType.isPrimitive();
-    }
-    private boolean returnConversionNeeded(MethodType callerType, MethodHandle target) {
-        Class<?> needType = callerType.returnType();
-        if (needType == erasedCallerType.returnType())
-            return false;  // no conversions possible, since must be primitive or Object
-        Class<?> haveType = target.type().returnType();
-        if (VerifyType.isNullConversion(haveType, needType) && !needType.isInterface())
-            return false;
-        return true;
-    }
-    private MethodHandle addReturnConversion(MethodHandle finisher, Class<?> type) {
-        // FIXME: This is slow because it creates a closure node on every call that requires a return cast.
-        MethodType finisherType = finisher.type();
-        MethodHandle caster = ValueConversions.identity(type);
-        caster = caster.asType(caster.type().changeParameterType(0, finisherType.returnType()));
-        finisher = MethodHandles.filterReturnValue(finisher, caster);
-        return finisher.asType(finisherType);
-    }
-
-    public String toString() {
-        return "InvokeGeneric"+erasedCallerType;
-    }
-}
diff --git a/jdk/src/share/classes/java/lang/invoke/InvokerBytecodeGenerator.java b/jdk/src/share/classes/java/lang/invoke/InvokerBytecodeGenerator.java
index 6228c07..7b6b413 100644
--- a/jdk/src/share/classes/java/lang/invoke/InvokerBytecodeGenerator.java
+++ b/jdk/src/share/classes/java/lang/invoke/InvokerBytecodeGenerator.java
@@ -242,9 +242,6 @@
 
     /**
      * Extract the MemberName of a newly-defined method.
-     *
-     * @param classFile
-     * @return
      */
     private MemberName loadMethod(byte[] classFile) {
         Class<?> invokerClass = loadAndInitializeInvokerClass(classFile, cpPatches(classFile));
@@ -253,10 +250,6 @@
 
     /**
      * Define a given class as anonymous class in the runtime system.
-     *
-     * @param classBytes
-     * @param patches
-     * @return
      */
     private static Class<?> loadAndInitializeInvokerClass(byte[] classBytes, Object[] patches) {
         Class<?> invokerClass = UNSAFE.defineAnonymousClass(HOST_CLASS, classBytes, patches);
@@ -264,14 +257,6 @@
         return invokerClass;
     }
 
-    /**
-     * TODO
-     *
-     * @param invokerClass
-     * @param name
-     * @param type
-     * @return
-     */
     private static MemberName resolveInvokerMember(Class<?> invokerClass, String name, MethodType type) {
         MemberName member = new MemberName(invokerClass, name, type, REF_invokeStatic);
         //System.out.println("resolveInvokerMember => "+member);
@@ -499,10 +484,6 @@
 
     /**
      * Generate customized bytecode for a given LambdaForm.
-     *
-     * @param form
-     * @param invokerType
-     * @return
      */
     static MemberName generateCustomizedCode(LambdaForm form, MethodType invokerType) {
         InvokerBytecodeGenerator g = new InvokerBytecodeGenerator("MH", form, invokerType);
@@ -565,8 +546,6 @@
 
     /**
      * Emit an invoke for the given name.
-     *
-     * @param name
      */
     void emitInvoke(Name name) {
         if (true) {
@@ -645,8 +624,6 @@
 
     /**
      * Emit an invoke for the given name, using the MemberName directly.
-     *
-     * @param name
      */
     void emitStaticInvoke(MemberName member, Name name) {
         assert(member.equals(name.function.member()));
@@ -690,9 +667,6 @@
 
     /**
      * Check if MemberName is a call to MethodHandleImpl.selectAlternative.
-     *
-     * @param member
-     * @return true if member is a call to MethodHandleImpl.selectAlternative
      */
     private boolean isSelectAlternative(MemberName member) {
         return member != null &&
@@ -704,14 +678,12 @@
      * Emit bytecode for the selectAlternative idiom.
      *
      * The pattern looks like (Cf. MethodHandleImpl.makeGuardWithTest):
-     *
+     * <blockquote><pre>{@code
      *   Lambda(a0:L,a1:I)=>{
      *     t2:I=foo.test(a1:I);
      *     t3:L=MethodHandleImpl.selectAlternative(t2:I,(MethodHandle(int)int),(MethodHandle(int)int));
      *     t4:I=MethodHandle.invokeBasic(t3:L,a1:I);t4:I}
-     *
-     * @param selectAlternativeName
-     * @param invokeBasicName
+     * }</pre></blockquote>
      */
     private void emitSelectAlternative(Name selectAlternativeName, Name invokeBasicName) {
         MethodType type = selectAlternativeName.function.methodType();
@@ -750,11 +722,6 @@
         mv.visitLabel(L_done);
     }
 
-    /**
-     *
-     * @param name
-     * @param paramIndex
-     */
     private void emitPushArgument(Name name, int paramIndex) {
         Object arg = name.arguments[paramIndex];
         char ptype = name.function.parameterType(paramIndex);
@@ -923,9 +890,6 @@
 
     /**
      * Generate bytecode for a LambdaForm.vmentry which calls interpretWithArguments.
-     *
-     * @param sig
-     * @return
      */
     static MemberName generateLambdaFormInterpreterEntryPoint(String sig) {
         assert(LambdaForm.isValidSignature(sig));
@@ -993,10 +957,6 @@
 
     /**
      * Generate bytecode for a NamedFunction invoker.
-     *
-     * @param srcType
-     * @param dstType
-     * @return
      */
     static MemberName generateNamedFunctionInvoker(MethodTypeForm typeForm) {
         MethodType invokerType = LambdaForm.NamedFunction.INVOKER_METHOD_TYPE;
diff --git a/jdk/src/share/classes/java/lang/invoke/Invokers.java b/jdk/src/share/classes/java/lang/invoke/Invokers.java
index 0ef6078..6214aad 100644
--- a/jdk/src/share/classes/java/lang/invoke/Invokers.java
+++ b/jdk/src/share/classes/java/lang/invoke/Invokers.java
@@ -44,6 +44,7 @@
 
     // exact invoker for the outgoing call
     private /*lazy*/ MethodHandle exactInvoker;
+    private /*lazy*/ MethodHandle basicInvoker;  // invokeBasic (unchecked exact)
 
     // erased (partially untyped but with primitives) invoker for the outgoing call
     // FIXME: get rid of
@@ -74,21 +75,7 @@
     /*non-public*/ MethodHandle exactInvoker() {
         MethodHandle invoker = exactInvoker;
         if (invoker != null)  return invoker;
-        MethodType mtype = targetType;
-        MethodType invokerType = mtype.invokerType();
-        LambdaForm lform;
-        final int MTYPE_ARG_APPENDED = 1;  // argument count for appended mtype value
-        if (mtype.parameterSlotCount() <= MethodType.MAX_MH_INVOKER_ARITY - MTYPE_ARG_APPENDED) {
-            lform = invokeForm(mtype, false, MethodTypeForm.LF_EX_INVOKER);
-            invoker = BoundMethodHandle.bindSingle(invokerType, lform, mtype);
-        } else {
-            // At maximum arity, we cannot afford an extra mtype argument,
-            // so build a fully customized (non-cached) invoker form.
-            lform = invokeForm(mtype, true, MethodTypeForm.LF_EX_INVOKER);
-            invoker = SimpleMethodHandle.make(invokerType, lform);
-        }
-        invoker = invoker.withInternalMemberName(MemberName.makeMethodHandleInvoke("invokeExact", mtype));
-        assert(checkInvoker(invoker));
+        invoker = makeExactOrGeneralInvoker(true);
         exactInvoker = invoker;
         return invoker;
     }
@@ -96,43 +83,56 @@
     /*non-public*/ MethodHandle generalInvoker() {
         MethodHandle invoker = generalInvoker;
         if (invoker != null)  return invoker;
-        MethodType mtype = targetType;
-        MethodType invokerType = mtype.invokerType();
-        LambdaForm lform;
-        final int MTYPE_ARG_APPENDED = 1;  // argument count for appended mtype value
-        assert(GENERIC_INVOKER_SLOP >= MTYPE_ARG_APPENDED);
-        if (mtype.parameterSlotCount() <= MethodType.MAX_MH_INVOKER_ARITY - GENERIC_INVOKER_SLOP) {
-            prepareForGenericCall(mtype);
-            lform = invokeForm(mtype, false, MethodTypeForm.LF_GEN_INVOKER);
-            invoker = BoundMethodHandle.bindSingle(invokerType, lform, mtype);
-        } else {
-            // At maximum arity, we cannot afford an extra mtype argument,
-            // so build a fully customized (non-cached) invoker form.
-            lform = invokeForm(mtype, true, MethodTypeForm.LF_GEN_INVOKER);
-            invoker = SimpleMethodHandle.make(invokerType, lform);
-        }
-        invoker = invoker.withInternalMemberName(MemberName.makeMethodHandleInvoke("invoke", mtype));
-        assert(checkInvoker(invoker));
+        invoker = makeExactOrGeneralInvoker(false);
         generalInvoker = invoker;
         return invoker;
     }
 
-    /*non-public*/ MethodHandle makeBasicInvoker() {
-        MethodHandle invoker = DirectMethodHandle.make(invokeBasicMethod(targetType));
-        assert(targetType == targetType.basicType());
-        // Note:  This is not cached here.  It is cached by the calling MethodTypeForm.
+    private MethodHandle makeExactOrGeneralInvoker(boolean isExact) {
+        MethodType mtype = targetType;
+        MethodType invokerType = mtype.invokerType();
+        int which = (isExact ? MethodTypeForm.LF_EX_INVOKER : MethodTypeForm.LF_GEN_INVOKER);
+        LambdaForm lform = invokeHandleForm(mtype, false, which);
+        MethodHandle invoker = BoundMethodHandle.bindSingle(invokerType, lform, mtype);
+        String whichName = (isExact ? "invokeExact" : "invoke");
+        invoker = invoker.withInternalMemberName(MemberName.makeMethodHandleInvoke(whichName, mtype));
         assert(checkInvoker(invoker));
+        maybeCompileToBytecode(invoker);
         return invoker;
     }
 
-    static MemberName invokeBasicMethod(MethodType type) {
-        type = type.basicType();
-        String name = "invokeBasic";
+    /** If the target type seems to be common enough, eagerly compile the invoker to bytecodes. */
+    private void maybeCompileToBytecode(MethodHandle invoker) {
+        final int EAGER_COMPILE_ARITY_LIMIT = 10;
+        if (targetType == targetType.erase() &&
+            targetType.parameterCount() < EAGER_COMPILE_ARITY_LIMIT) {
+            invoker.form.compileToBytecode();
+        }
+    }
+
+    /*non-public*/ MethodHandle basicInvoker() {
+        MethodHandle invoker = basicInvoker;
+        if (invoker != null)  return invoker;
+        MethodType basicType = targetType.basicType();
+        if (basicType != targetType) {
+            // double cache; not used significantly
+            return basicInvoker = basicType.invokers().basicInvoker();
+        }
+        MemberName method = invokeBasicMethod(basicType);
+        invoker = DirectMethodHandle.make(method);
+        assert(checkInvoker(invoker));
+        basicInvoker = invoker;
+        return invoker;
+    }
+
+    // This next one is called from LambdaForm.NamedFunction.<init>.
+    /*non-public*/ static MemberName invokeBasicMethod(MethodType basicType) {
+        assert(basicType == basicType.basicType());
         try {
             //Lookup.findVirtual(MethodHandle.class, name, type);
-            return IMPL_LOOKUP.resolveOrFail(REF_invokeVirtual, MethodHandle.class, name, type);
+            return IMPL_LOOKUP.resolveOrFail(REF_invokeVirtual, MethodHandle.class, "invokeBasic", basicType);
         } catch (ReflectiveOperationException ex) {
-            throw newInternalError("JVM cannot find invoker for "+type, ex);
+            throw newInternalError("JVM cannot find invoker for "+basicType, ex);
         }
     }
 
@@ -184,6 +184,7 @@
             vaInvoker = MethodHandles.filterArgument(arrayInvoker, 0, makeSpreader);
         }
         assert(vaInvoker.type().equals(spreadInvokerType.invokerType()));
+        maybeCompileToBytecode(vaInvoker);
         spreadInvokers[leadingArgCount] = vaInvoker;
         return vaInvoker;
     }
@@ -231,32 +232,38 @@
         return "Invokers"+targetType;
     }
 
-    static MemberName exactInvokerMethod(MethodType mtype, Object[] appendixResult) {
+    static MemberName methodHandleInvokeLinkerMethod(String name,
+                                                     MethodType mtype,
+                                                     Object[] appendixResult) {
+        int which;
+        switch (name) {
+        case "invokeExact":  which = MethodTypeForm.LF_EX_LINKER; break;
+        case "invoke":       which = MethodTypeForm.LF_GEN_LINKER; break;
+        default:             throw new InternalError("not invoker: "+name);
+        }
         LambdaForm lform;
-        final int MTYPE_ARG_APPENDED = 1;  // argument count for appended mtype value
-        if (mtype.parameterSlotCount() <= MethodType.MAX_MH_ARITY - MTYPE_ARG_APPENDED) {
-            lform = invokeForm(mtype, false, MethodTypeForm.LF_EX_LINKER);
+        if (mtype.parameterSlotCount() <= MethodType.MAX_MH_ARITY - MH_LINKER_ARG_APPENDED) {
+            lform = invokeHandleForm(mtype, false, which);
             appendixResult[0] = mtype;
         } else {
-            lform = invokeForm(mtype, true, MethodTypeForm.LF_EX_LINKER);
+            lform = invokeHandleForm(mtype, true, which);
         }
         return lform.vmentry;
     }
 
-    static MemberName genericInvokerMethod(MethodType mtype, Object[] appendixResult) {
-        LambdaForm lform;
-        final int MTYPE_ARG_APPENDED = 1;  // argument count for appended mtype value
-        if (mtype.parameterSlotCount() <= MethodType.MAX_MH_ARITY - (MTYPE_ARG_APPENDED + GENERIC_INVOKER_SLOP)) {
-            lform = invokeForm(mtype, false, MethodTypeForm.LF_GEN_LINKER);
-            appendixResult[0] = mtype;
-            prepareForGenericCall(mtype);
-        } else {
-            lform = invokeForm(mtype, true, MethodTypeForm.LF_GEN_LINKER);
-        }
-        return lform.vmentry;
-    }
+    // argument count to account for trailing "appendix value" (typically the mtype)
+    private static final int MH_LINKER_ARG_APPENDED = 1;
 
-    private static LambdaForm invokeForm(MethodType mtype, boolean customized, int which) {
+    /** Returns an adapter for invokeExact or generic invoke, as a MH or constant pool linker.
+     * If !customized, caller is responsible for supplying, during adapter execution,
+     * a copy of the exact mtype.  This is because the adapter might be generalized to
+     * a basic type.
+     * @param mtype the caller's method type (either basic or full-custom)
+     * @param customized whether to use a trailing appendix argument (to carry the mtype)
+     * @param which bit-encoded 0x01 whether it is a CP adapter ("linker") or MHs.invoker value ("invoker");
+     *                          0x02 whether it is for invokeExact or generic invoke
+     */
+    private static LambdaForm invokeHandleForm(MethodType mtype, boolean customized, int which) {
         boolean isCached;
         if (!customized) {
             mtype = mtype.basicType();  // normalize Z to I, String to Object, etc.
@@ -301,41 +308,24 @@
                 : Arrays.asList(mtype, customized, which, nameCursor, names.length);
         if (MTYPE_ARG >= INARG_LIMIT) {
             assert(names[MTYPE_ARG] == null);
-            names[MTYPE_ARG] = BoundMethodHandle.getSpeciesData("L").getterName(names[THIS_MH], 0);
+            NamedFunction getter = BoundMethodHandle.getSpeciesData("L").getterFunction(0);
+            names[MTYPE_ARG] = new Name(getter, names[THIS_MH]);
             // else if isLinker, then MTYPE is passed in from the caller (e.g., the JVM)
         }
 
         // Make the final call.  If isGeneric, then prepend the result of type checking.
-        MethodType outCallType;
-        Object[] outArgs;
+        MethodType outCallType = mtype.basicType();
+        Object[] outArgs = Arrays.copyOfRange(names, CALL_MH, OUTARG_LIMIT, Object[].class);
         Object mtypeArg = (customized ? mtype : names[MTYPE_ARG]);
         if (!isGeneric) {
             names[CHECK_TYPE] = new Name(NF_checkExactType, names[CALL_MH], mtypeArg);
             // mh.invokeExact(a*):R => checkExactType(mh, TYPEOF(a*:R)); mh.invokeBasic(a*)
-            outArgs = Arrays.copyOfRange(names, CALL_MH, OUTARG_LIMIT, Object[].class);
-            outCallType = mtype;
-        } else if (customized) {
-            names[CHECK_TYPE] = new Name(NF_asType, names[CALL_MH], mtypeArg);
-            // mh.invokeGeneric(a*):R =>
-            //  let mt=TYPEOF(a*:R), tmh=asType(mh, mt);
-            //    tmh.invokeBasic(a*)
-            outArgs = Arrays.copyOfRange(names, CALL_MH, OUTARG_LIMIT, Object[].class);
-            outCallType = mtype;
         } else {
             names[CHECK_TYPE] = new Name(NF_checkGenericType, names[CALL_MH], mtypeArg);
-            // mh.invokeGeneric(a*):R =>
-            //  let mt=TYPEOF(a*:R), gamh=checkGenericType(mh, mt);
-            //    gamh.invokeBasic(mt, mh, a*)
-            final int PREPEND_GAMH = 0, PREPEND_MT = 1, PREPEND_COUNT = 2;
-            assert(GENERIC_INVOKER_SLOP == PREPEND_COUNT);
-            outArgs = Arrays.copyOfRange(names, CALL_MH, OUTARG_LIMIT + PREPEND_COUNT, Object[].class);
-            // prepend arguments:
-            System.arraycopy(outArgs, 0, outArgs, PREPEND_COUNT, outArgs.length - PREPEND_COUNT);
-            outArgs[PREPEND_GAMH] = names[CHECK_TYPE];
-            outArgs[PREPEND_MT] = mtypeArg;
-            outCallType = mtype.insertParameterTypes(0, MethodType.class, MethodHandle.class);
+            // mh.invokeGeneric(a*):R => checkGenericType(mh, TYPEOF(a*:R)).invokeBasic(a*)
+            outArgs[0] = names[CHECK_TYPE];
         }
-        names[LINKER_CALL] = new Name(invokeBasicMethod(outCallType), outArgs);
+        names[LINKER_CALL] = new Name(outCallType, outArgs);
         lform = new LambdaForm(debugName, INARG_LIMIT, names);
         if (isLinker)
             lform.compileToBytecode();  // JVM needs a real methodOop
@@ -343,7 +333,6 @@
             lform = mtype.form().setCachedLambdaForm(which, lform);
         return lform;
     }
-    private static final int GENERIC_INVOKER_SLOP = 2;  // used elsewhere to avoid arity problems
 
     /*non-public*/ static
     WrongMethodTypeException newWrongMethodTypeException(MethodType actual, MethodType expected) {
@@ -362,47 +351,53 @@
             throw newWrongMethodTypeException(expected, actual);
     }
 
-    /** Static definition of MethodHandle.invokeGeneric checking code. */
+    /** Static definition of MethodHandle.invokeGeneric checking code.
+     * Directly returns the type-adjusted MH to invoke, as follows:
+     * {@code (R)MH.invoke(a*) => MH.asType(TYPEOF(a*:R)).invokeBasic(a*)}
+     */
     /*non-public*/ static
     @ForceInline
     Object checkGenericType(Object mhObj, Object expectedObj) {
         MethodHandle mh = (MethodHandle) mhObj;
         MethodType expected = (MethodType) expectedObj;
-        //MethodType actual = mh.type();
-        MethodHandle gamh = expected.form().genericInvoker;
-        if (gamh != null)  return gamh;
-        return prepareForGenericCall(expected);
-    }
-
-    /**
-     * Returns an adapter GA for invoking a MH with type adjustments.
-     * The MethodType of the generic invocation site is prepended to MH
-     * and its arguments as follows:
-     * {@code (R)MH.invoke(A*) => GA.invokeBasic(TYPEOF<A*,R>, MH, A*)}
-     */
-    /*non-public*/ static MethodHandle prepareForGenericCall(MethodType mtype) {
-        // force any needed adapters to be preconstructed
-        MethodTypeForm form = mtype.form();
-        MethodHandle gamh = form.genericInvoker;
-        if (gamh != null)  return gamh;
-        try {
-            // Trigger adapter creation.
-            gamh = InvokeGeneric.generalInvokerOf(form.erasedType);
-            form.genericInvoker = gamh;
-            return gamh;
-        } catch (Exception ex) {
-            throw newInternalError("Exception while resolving inexact invoke", ex);
-        }
+        if (mh.type() == expected)  return mh;
+        MethodHandle atc = mh.asTypeCache;
+        if (atc != null && atc.type() == expected)  return atc;
+        return mh.asType(expected);
+        /* Maybe add more paths here.  Possible optimizations:
+         * for (R)MH.invoke(a*),
+         * let MT0 = TYPEOF(a*:R), MT1 = MH.type
+         *
+         * if MT0==MT1 or MT1 can be safely called by MT0
+         *  => MH.invokeBasic(a*)
+         * if MT1 can be safely called by MT0[R := Object]
+         *  => MH.invokeBasic(a*) & checkcast(R)
+         * if MT1 can be safely called by MT0[* := Object]
+         *  => checkcast(A)* & MH.invokeBasic(a*) & checkcast(R)
+         * if a big adapter BA can be pulled out of (MT0,MT1)
+         *  => BA.invokeBasic(MT0,MH,a*)
+         * if a local adapter LA can cached on static CS0 = new GICS(MT0)
+         *  => CS0.LA.invokeBasic(MH,a*)
+         * else
+         *  => MH.asType(MT0).invokeBasic(A*)
+         */
     }
 
     static MemberName linkToCallSiteMethod(MethodType mtype) {
-        LambdaForm lform = callSiteForm(mtype);
+        LambdaForm lform = callSiteForm(mtype, false);
         return lform.vmentry;
     }
 
-    private static LambdaForm callSiteForm(MethodType mtype) {
+    static MemberName linkToTargetMethod(MethodType mtype) {
+        LambdaForm lform = callSiteForm(mtype, true);
+        return lform.vmentry;
+    }
+
+    // skipCallSite is true if we are optimizing a ConstantCallSite
+    private static LambdaForm callSiteForm(MethodType mtype, boolean skipCallSite) {
         mtype = mtype.basicType();  // normalize Z to I, String to Object, etc.
-        LambdaForm lform = mtype.form().cachedLambdaForm(MethodTypeForm.LF_CS_LINKER);
+        final int which = (skipCallSite ? MethodTypeForm.LF_MH_LINKER : MethodTypeForm.LF_CS_LINKER);
+        LambdaForm lform = mtype.form().cachedLambdaForm(which);
         if (lform != null)  return lform;
         // exactInvokerForm (Object,Object)Object
         //   link with java.lang.invoke.MethodHandle.invokeBasic(MethodHandle,Object,Object)Object/invokeSpecial
@@ -410,24 +405,26 @@
         final int OUTARG_LIMIT = ARG_BASE + mtype.parameterCount();
         final int INARG_LIMIT  = OUTARG_LIMIT + 1;
         int nameCursor = OUTARG_LIMIT;
-        final int CSITE_ARG    = nameCursor++;  // the last in-argument
-        final int CALL_MH      = nameCursor++;  // result of getTarget
+        final int APPENDIX_ARG = nameCursor++;  // the last in-argument
+        final int CSITE_ARG    = skipCallSite ? -1 : APPENDIX_ARG;
+        final int CALL_MH      = skipCallSite ? APPENDIX_ARG : nameCursor++;  // result of getTarget
         final int LINKER_CALL  = nameCursor++;
-        MethodType invokerFormType = mtype.appendParameterTypes(CallSite.class);
+        MethodType invokerFormType = mtype.appendParameterTypes(skipCallSite ? MethodHandle.class : CallSite.class);
         Name[] names = arguments(nameCursor - INARG_LIMIT, invokerFormType);
         assert(names.length == nameCursor);
-        assert(names[CSITE_ARG] != null);
-        names[CALL_MH] = new Name(NF_getCallSiteTarget, names[CSITE_ARG]);
+        assert(names[APPENDIX_ARG] != null);
+        if (!skipCallSite)
+            names[CALL_MH] = new Name(NF_getCallSiteTarget, names[CSITE_ARG]);
         // (site.)invokedynamic(a*):R => mh = site.getTarget(); mh.invokeBasic(a*)
         final int PREPEND_MH = 0, PREPEND_COUNT = 1;
         Object[] outArgs = Arrays.copyOfRange(names, ARG_BASE, OUTARG_LIMIT + PREPEND_COUNT, Object[].class);
         // prepend MH argument:
         System.arraycopy(outArgs, 0, outArgs, PREPEND_COUNT, outArgs.length - PREPEND_COUNT);
         outArgs[PREPEND_MH] = names[CALL_MH];
-        names[LINKER_CALL] = new Name(invokeBasicMethod(mtype), outArgs);
-        lform = new LambdaForm("linkToCallSite", INARG_LIMIT, names);
+        names[LINKER_CALL] = new Name(mtype, outArgs);
+        lform = new LambdaForm((skipCallSite ? "linkToTargetMethod" : "linkToCallSite"), INARG_LIMIT, names);
         lform.compileToBytecode();  // JVM needs a real methodOop
-        lform = mtype.form().setCachedLambdaForm(MethodTypeForm.LF_CS_LINKER, lform);
+        lform = mtype.form().setCachedLambdaForm(which, lform);
         return lform;
     }
 
diff --git a/jdk/src/share/classes/java/lang/invoke/LambdaForm.java b/jdk/src/share/classes/java/lang/invoke/LambdaForm.java
index f5dcf40..857cf26 100644
--- a/jdk/src/share/classes/java/lang/invoke/LambdaForm.java
+++ b/jdk/src/share/classes/java/lang/invoke/LambdaForm.java
@@ -50,7 +50,7 @@
  * The result of the lambda is defined as one of the names, often the last one.
  * <p>
  * Here is an approximate grammar:
- * <pre>
+ * <blockquote><pre>{@code
  * LambdaForm = "(" ArgName* ")=>{" TempName* Result "}"
  * ArgName = "a" N ":" T
  * TempName = "t" N ":" T "=" Function "(" Argument* ");"
@@ -60,7 +60,7 @@
  * NameRef = "a" N | "t" N
  * N = (any whole number)
  * T = "L" | "I" | "J" | "F" | "D" | "V"
- * </pre>
+ * }</pre></blockquote>
  * Names are numbered consecutively from left to right starting at zero.
  * (The letters are merely a taste of syntax sugar.)
  * Thus, the first temporary (if any) is always numbered N (where N=arity).
@@ -69,7 +69,7 @@
  * A lambda has a void result if and only if its result index is -1.
  * If a temporary has the type "V", it cannot be the subject of a NameRef,
  * even though possesses a number.
- * Note that all reference types are erased to "L", which stands for {@code Object).
+ * Note that all reference types are erased to "L", which stands for {@code Object}.
  * All subword types (boolean, byte, short, char) are erased to "I" which is {@code int}.
  * The other types stand for the usual primitive types.
  * <p>
@@ -89,7 +89,7 @@
  * encoded by using temporary expressions which call type-transformed identity functions.
  * <p>
  * Examples:
- * <pre>
+ * <blockquote><pre>{@code
  * (a0:J)=>{ a0 }
  *     == identity(long)
  * (a0:I)=>{ t1:V = System.out#println(a0); void }
@@ -113,14 +113,14 @@
  * (a0:L, a1:L)=>{ t2:L = BoundMethodHandle#argument(a0);
  *                 t3:L = Class#cast(t2,a1); t3 }
  *     == invoker for identity method handle which performs cast
- * </pre>
+ * }</pre></blockquote>
  * <p>
  * @author John Rose, JSR 292 EG
  */
 class LambdaForm {
     final int arity;
     final int result;
-    final Name[] names;
+    @Stable final Name[] names;
     final String debugName;
     MemberName vmentry;   // low-level behavior, or null if not yet prepared
     private boolean isCompiled;
@@ -457,7 +457,7 @@
             isCompiled = true;
             return vmentry;
         } catch (Error | Exception ex) {
-            throw newInternalError(this.toString(), ex);
+            throw newInternalError("compileToBytecode", ex);
         }
     }
 
@@ -683,8 +683,9 @@
     */
 
     static void traceInterpreter(String event, Object obj, Object... args) {
-        if (!TRACE_INTERPRETER)  return;
-        System.out.println("LFI: "+event+" "+(obj != null ? obj : "")+(args != null && args.length != 0 ? Arrays.asList(args) : ""));
+        if (TRACE_INTERPRETER) {
+            System.out.println("LFI: "+event+" "+(obj != null ? obj : "")+(args != null && args.length != 0 ? Arrays.asList(args) : ""));
+        }
     }
     static void traceInterpreter(String event, Object obj) {
         traceInterpreter(event, obj, (Object[])null);
@@ -971,8 +972,8 @@
 
     static class NamedFunction {
         final MemberName member;
-        MethodHandle resolvedHandle;
-        MethodHandle invoker;
+        @Stable MethodHandle resolvedHandle;
+        @Stable MethodHandle invoker;
 
         NamedFunction(MethodHandle resolvedHandle) {
             this(resolvedHandle.internalMemberName(), resolvedHandle);
@@ -982,6 +983,16 @@
             //resolvedHandle = eraseSubwordTypes(resolvedHandle);
             this.resolvedHandle = resolvedHandle;
         }
+        NamedFunction(MethodType basicInvokerType) {
+            assert(basicInvokerType == basicInvokerType.basicType()) : basicInvokerType;
+            if (basicInvokerType.parameterSlotCount() < MethodType.MAX_MH_INVOKER_ARITY) {
+                this.resolvedHandle = basicInvokerType.invokers().basicInvoker();
+                this.member = resolvedHandle.internalMemberName();
+            } else {
+                // necessary to pass BigArityTest
+                this.member = Invokers.invokeBasicMethod(basicInvokerType);
+            }
+        }
 
         // The next 3 constructors are used to break circular dependencies on MH.invokeStatic, etc.
         // Any LambdaForm containing such a member is not interpretable.
@@ -1229,7 +1240,7 @@
         }
 
         public String toString() {
-            if (member == null)  return resolvedHandle.toString();
+            if (member == null)  return String.valueOf(resolvedHandle);
             return member.getDeclaringClass().getSimpleName()+"."+member.getName();
         }
     }
@@ -1267,7 +1278,7 @@
         final char type;
         private short index;
         final NamedFunction function;
-        final Object[] arguments;
+        @Stable final Object[] arguments;
 
         private Name(int index, char type, NamedFunction function, Object[] arguments) {
             this.index = (short)index;
@@ -1279,6 +1290,10 @@
         Name(MethodHandle function, Object... arguments) {
             this(new NamedFunction(function), arguments);
         }
+        Name(MethodType functionType, Object... arguments) {
+            this(new NamedFunction(functionType), arguments);
+            assert(arguments[0] instanceof Name && ((Name)arguments[0]).type == 'L');
+        }
         Name(MemberName function, Object... arguments) {
             this(new NamedFunction(function), arguments);
         }
@@ -1426,8 +1441,6 @@
          * Does this Name precede the given binding node in some canonical order?
          * This predicate is used to order data bindings (via insertion sort)
          * with some stability.
-         * @param binding
-         * @return
          */
         boolean isSiblingBindingBefore(Name binding) {
             assert(!binding.isParam());
@@ -1622,4 +1635,12 @@
  */
 
     static { NamedFunction.initializeInvokers(); }
+
+    // The following hack is necessary in order to suppress TRACE_INTERPRETER
+    // during execution of the static initializes of this class.
+    // Turning on TRACE_INTERPRETER too early will cause
+    // stack overflows and other misbehavior during attempts to trace events
+    // that occur during LambdaForm.<clinit>.
+    // Therefore, do not move this line higher in this file, and do not remove.
+    private static final boolean TRACE_INTERPRETER = MethodHandleStatics.TRACE_INTERPRETER;
 }
diff --git a/jdk/src/share/classes/java/lang/invoke/MemberName.java b/jdk/src/share/classes/java/lang/invoke/MemberName.java
index 910574b..5b6cecb 100644
--- a/jdk/src/share/classes/java/lang/invoke/MemberName.java
+++ b/jdk/src/share/classes/java/lang/invoke/MemberName.java
@@ -70,13 +70,13 @@
  * @author jrose
  */
 /*non-public*/ final class MemberName implements Member, Cloneable {
-    private Class<?>   clazz;       // class in which the method is defined
-    private String     name;        // may be null if not yet materialized
-    private Object     type;        // may be null if not yet materialized
-    private int        flags;       // modifier bits; see reflect.Modifier
+    private Class<?> clazz;       // class in which the method is defined
+    private String   name;        // may be null if not yet materialized
+    private Object   type;        // may be null if not yet materialized
+    private int      flags;       // modifier bits; see reflect.Modifier
     //@Injected JVM_Method* vmtarget;
     //@Injected int         vmindex;
-    private Object     resolution;  // if null, this guy is resolved
+    private Object   resolution;  // if null, this guy is resolved
 
     /** Return the declaring class of this member.
      *  In the case of a bare name and type, the declaring class will be null.
@@ -98,7 +98,9 @@
     public String getName() {
         if (name == null) {
             expandFromVM();
-            if (name == null)  return null;
+            if (name == null) {
+                return null;
+            }
         }
         return name;
     }
@@ -119,28 +121,39 @@
     public MethodType getMethodType() {
         if (type == null) {
             expandFromVM();
-            if (type == null)  return null;
+            if (type == null) {
+                return null;
+            }
         }
-        if (!isInvocable())
+        if (!isInvocable()) {
             throw newIllegalArgumentException("not invocable, no method type");
-        if (type instanceof MethodType) {
-            return (MethodType) type;
         }
-        if (type instanceof String) {
-            String sig = (String) type;
-            MethodType res = MethodType.fromMethodDescriptorString(sig, getClassLoader());
-            this.type = res;
-            return res;
+
+        {
+            // Get a snapshot of type which doesn't get changed by racing threads.
+            final Object type = this.type;
+            if (type instanceof MethodType) {
+                return (MethodType) type;
+            }
         }
-        if (type instanceof Object[]) {
-            Object[] typeInfo = (Object[]) type;
-            Class<?>[] ptypes = (Class<?>[]) typeInfo[1];
-            Class<?> rtype = (Class<?>) typeInfo[0];
-            MethodType res = MethodType.methodType(rtype, ptypes);
-            this.type = res;
-            return res;
+
+        // type is not a MethodType yet.  Convert it thread-safely.
+        synchronized (this) {
+            if (type instanceof String) {
+                String sig = (String) type;
+                MethodType res = MethodType.fromMethodDescriptorString(sig, getClassLoader());
+                type = res;
+            } else if (type instanceof Object[]) {
+                Object[] typeInfo = (Object[]) type;
+                Class<?>[] ptypes = (Class<?>[]) typeInfo[1];
+                Class<?> rtype = (Class<?>) typeInfo[0];
+                MethodType res = MethodType.methodType(rtype, ptypes);
+                type = res;
+            }
+            // Make sure type is a MethodType for racing threads.
+            assert type instanceof MethodType : "bad method type " + type;
         }
-        throw new InternalError("bad method type "+type);
+        return (MethodType) type;
     }
 
     /** Return the actual type under which this method or constructor must be invoked.
@@ -173,21 +186,34 @@
     public Class<?> getFieldType() {
         if (type == null) {
             expandFromVM();
-            if (type == null)  return null;
+            if (type == null) {
+                return null;
+            }
         }
-        if (isInvocable())
+        if (isInvocable()) {
             throw newIllegalArgumentException("not a field or nested class, no simple type");
-        if (type instanceof Class<?>) {
-            return (Class<?>) type;
         }
-        if (type instanceof String) {
-            String sig = (String) type;
-            MethodType mtype = MethodType.fromMethodDescriptorString("()"+sig, getClassLoader());
-            Class<?> res = mtype.returnType();
-            this.type = res;
-            return res;
+
+        {
+            // Get a snapshot of type which doesn't get changed by racing threads.
+            final Object type = this.type;
+            if (type instanceof Class<?>) {
+                return (Class<?>) type;
+            }
         }
-        throw new InternalError("bad field type "+type);
+
+        // type is not a Class yet.  Convert it thread-safely.
+        synchronized (this) {
+            if (type instanceof String) {
+                String sig = (String) type;
+                MethodType mtype = MethodType.fromMethodDescriptorString("()"+sig, getClassLoader());
+                Class<?> res = mtype.returnType();
+                type = res;
+            }
+            // Make sure type is a Class for racing threads.
+            assert type instanceof Class<?> : "bad field type " + type;
+        }
+        return (Class<?>) type;
     }
 
     /** Utility method to produce either the method type or field type of this member. */
@@ -201,10 +227,10 @@
     public String getSignature() {
         if (type == null) {
             expandFromVM();
-            if (type == null)  return null;
+            if (type == null) {
+                return null;
+            }
         }
-        if (type instanceof String)
-            return (String) type;
         if (isInvocable())
             return BytecodeDescriptor.unparse(getMethodType());
         else
@@ -463,10 +489,17 @@
         //assert(referenceKindIsConsistent());  // do this after resolution
     }
 
+    /**
+     * Calls down to the VM to fill in the fields.  This method is
+     * synchronized to avoid racing calls.
+     */
     private void expandFromVM() {
-        if (!isResolved())  return;
-        if (type instanceof Object[])
-            type = null;  // don't saddle JVM w/ typeInfo
+        if (type != null) {
+            return;
+        }
+        if (!isResolved()) {
+            return;
+        }
         MethodHandleNatives.expand(this);
     }
 
@@ -523,6 +556,9 @@
         }
         throw new IllegalArgumentException(this.toString());
     }
+    /** If this MN is not REF_newInvokeSpecial, return a clone with that ref. kind.
+     *  In that case it must already be REF_invokeSpecial.
+     */
     public MemberName asConstructor() {
         switch (getReferenceKind()) {
         case REF_invokeSpecial:     return clone().changeReferenceKind(REF_newInvokeSpecial, REF_invokeSpecial);
@@ -530,6 +566,32 @@
         }
         throw new IllegalArgumentException(this.toString());
     }
+    /** If this MN is a REF_invokeSpecial, return a clone with the "normal" kind
+     *  REF_invokeVirtual; also switch either to REF_invokeInterface if clazz.isInterface.
+     *  The end result is to get a fully virtualized version of the MN.
+     *  (Note that resolving in the JVM will sometimes devirtualize, changing
+     *  REF_invokeVirtual of a final to REF_invokeSpecial, and REF_invokeInterface
+     *  in some corner cases to either of the previous two; this transform
+     *  undoes that change under the assumption that it occurred.)
+     */
+    public MemberName asNormalOriginal() {
+        byte normalVirtual = clazz.isInterface() ? REF_invokeInterface : REF_invokeVirtual;
+        byte refKind = getReferenceKind();
+        byte newRefKind = refKind;
+        MemberName result = this;
+        switch (refKind) {
+        case REF_invokeInterface:
+        case REF_invokeVirtual:
+        case REF_invokeSpecial:
+            newRefKind = normalVirtual;
+            break;
+        }
+        if (newRefKind == refKind)
+            return this;
+        result = clone().changeReferenceKind(newRefKind, refKind);
+        assert(this.referenceKindIsConsistentWith(result.getReferenceKind()));
+        return result;
+    }
     /** Create a name for the given reflected constructor.  The resulting name will be in a resolved state. */
     @SuppressWarnings("LeakingThisInConstructor")
     public MemberName(Constructor<?> ctor) {
@@ -627,7 +689,7 @@
 
     @Override
     public int hashCode() {
-        return Objects.hash(clazz, flags, name, getType());
+        return Objects.hash(clazz, getReferenceKind(), name, getType());
     }
     @Override
     public boolean equals(Object that) {
@@ -643,13 +705,14 @@
         if (this == that)  return true;
         if (that == null)  return false;
         return this.clazz == that.clazz
-                && this.flags == that.flags
+                && this.getReferenceKind() == that.getReferenceKind()
                 && Objects.equals(this.name, that.name)
                 && Objects.equals(this.getType(), that.getType());
     }
 
     // Construction from symbolic parts, for queries:
-    /** Create a field or type name from the given components:  Declaring class, name, type, reference kind.
+    /** Create a field or type name from the given components:
+     *  Declaring class, name, type, reference kind.
      *  The declaring class may be supplied as null if this is to be a bare name and type.
      *  The resulting name will in an unresolved state.
      */
@@ -673,21 +736,34 @@
      *  The resulting name will in an unresolved state.
      */
     public MemberName(Class<?> defClass, String name, MethodType type, byte refKind) {
-        @SuppressWarnings("LocalVariableHidesMemberVariable")
-        int flags = (name != null && name.equals(CONSTRUCTOR_NAME) ? IS_CONSTRUCTOR : IS_METHOD);
-        init(defClass, name, type, flagsMods(flags, 0, refKind));
+        int initFlags = (name != null && name.equals(CONSTRUCTOR_NAME) ? IS_CONSTRUCTOR : IS_METHOD);
+        init(defClass, name, type, flagsMods(initFlags, 0, refKind));
         initResolved(false);
     }
-//    /** Create a method or constructor name from the given components:  Declaring class, name, type, modifiers.
-//     *  It will be a constructor if and only if the name is {@code "&lt;init&gt;"}.
-//     *  The declaring class may be supplied as null if this is to be a bare name and type.
-//     *  The modifier flags default to zero.
-//     *  The resulting name will in an unresolved state.
-//     */
-//    public MemberName(Class<?> defClass, String name, MethodType type, Void unused) {
-//        this(defClass, name, type, REF_NONE);
-//    }
-
+    /** Create a method, constructor, or field name from the given components:
+     *  Reference kind, declaring class, name, type.
+     */
+    public MemberName(byte refKind, Class<?> defClass, String name, Object type) {
+        int kindFlags;
+        if (MethodHandleNatives.refKindIsField(refKind)) {
+            kindFlags = IS_FIELD;
+            if (!(type instanceof Class))
+                throw newIllegalArgumentException("not a field type");
+        } else if (MethodHandleNatives.refKindIsMethod(refKind)) {
+            kindFlags = IS_METHOD;
+            if (!(type instanceof MethodType))
+                throw newIllegalArgumentException("not a method type");
+        } else if (refKind == REF_newInvokeSpecial) {
+            kindFlags = IS_CONSTRUCTOR;
+            if (!(type instanceof MethodType) ||
+                !CONSTRUCTOR_NAME.equals(name))
+                throw newIllegalArgumentException("not a constructor type or name");
+        } else {
+            throw newIllegalArgumentException("bad reference kind "+refKind);
+        }
+        init(defClass, name, type, flagsMods(kindFlags, 0, refKind));
+        initResolved(false);
+    }
     /** Query whether this member name is resolved to a non-static, non-final method.
      */
     public boolean hasReceiverTypeDispatch() {
diff --git a/jdk/src/share/classes/java/lang/invoke/MethodHandle.java b/jdk/src/share/classes/java/lang/invoke/MethodHandle.java
index 613d223..14bc2b4 100644
--- a/jdk/src/share/classes/java/lang/invoke/MethodHandle.java
+++ b/jdk/src/share/classes/java/lang/invoke/MethodHandle.java
@@ -292,7 +292,7 @@
  * generates a single invokevirtual instruction with
  * the symbolic type descriptor indicated in the following comment.
  * In these examples, the helper method {@code assertEquals} is assumed to
- * be a method which calls {@link java.util.Objects#equals(Object,Object) Objects.equals }
+ * be a method which calls {@link java.util.Objects#equals(Object,Object) Objects.equals}
  * on its arguments, and asserts that the result is true.
  *
  * <h1>Exceptions</h1>
@@ -392,7 +392,7 @@
  * Java types.
  * <ul>
  * <li>Method types range over all possible arities,
- * from no arguments to up to 255 of arguments (a limit imposed by the JVM).
+ * from no arguments to up to the  <a href="MethodHandle.html#maxarity">maximum number</a> of allowed arguments.
  * Generics are not variadic, and so cannot represent this.</li>
  * <li>Method types can specify arguments of primitive types,
  * which Java generic types cannot range over.</li>
@@ -402,6 +402,22 @@
  * genericity with a Java type parameter.</li>
  * </ul>
  *
+ * <h1><a name="maxarity"></a>Arity limits</h1>
+ * The JVM imposes on all methods and constructors of any kind an absolute
+ * limit of 255 stacked arguments.  This limit can appear more restrictive
+ * in certain cases:
+ * <ul>
+ * <li>A {@code long} or {@code double} argument counts (for purposes of arity limits) as two argument slots.
+ * <li>A non-static method consumes an extra argument for the object on which the method is called.
+ * <li>A constructor consumes an extra argument for the object which is being constructed.
+ * <li>Since a method handle&rsquo;s {@code invoke} method (or other signature-polymorphic method) is non-virtual,
+ *     it consumes an extra argument for the method handle itself, in addition to any non-virtual receiver object.
+ * </ul>
+ * These limits imply that certain method handles cannot be created, solely because of the JVM limit on stacked arguments.
+ * For example, if a static JVM method accepts exactly 255 arguments, a method handle cannot be created for it.
+ * Attempts to create method handles with impossible method types lead to an {@link IllegalArgumentException}.
+ * In particular, a method handle&rsquo;s type must not have an arity of the exact maximum 255.
+ *
  * @see MethodType
  * @see MethodHandles
  * @author John Rose, JSR 292 EG
@@ -420,6 +436,8 @@
     private final MethodType type;
     /*private*/ final LambdaForm form;
     // form is not private so that invokers can easily fetch it
+    /*private*/ MethodHandle asTypeCache;
+    // asTypeCache is not private so that invokers can easily fetch it
 
     /**
      * Reports the type of this method handle.
@@ -557,10 +575,10 @@
     /*non-public*/ static native @PolymorphicSignature Object linkToInterface(Object... args) throws Throwable;
 
     /**
-     * Performs a variable arity invocation, passing the arguments in the given array
+     * Performs a variable arity invocation, passing the arguments in the given list
      * to the method handle, as if via an inexact {@link #invoke invoke} from a call site
      * which mentions only the type {@code Object}, and whose arity is the length
-     * of the argument array.
+     * of the argument list.
      * <p>
      * Specifically, execution proceeds as if by the following steps,
      * although the methods are not guaranteed to be called if the JVM
@@ -590,10 +608,10 @@
      * or forced to null if the return type is void.
      * <p>
      * This call is equivalent to the following code:
-     * <p><blockquote><pre>
+     * <p><blockquote><pre>{@code
      * MethodHandle invoker = MethodHandles.spreadInvoker(this.type(), 0);
      * Object result = invoker.invokeExact(this, arguments);
-     * </pre></blockquote>
+     * }</pre></blockquote>
      * <p>
      * Unlike the signature polymorphic methods {@code invokeExact} and {@code invoke},
      * {@code invokeWithArguments} can be accessed normally via the Core Reflection API and JNI.
@@ -626,7 +644,7 @@
      * <p>
      * This method is also equivalent to the following code:
      * <p><blockquote><pre>
-     * {@link #invokeWithArguments(Object...) invokeWithArguments}(arguments.toArray())
+     * {@link #invokeWithArguments(Object...) invokeWithArguments}{@code(arguments.toArray())}
      * </pre></blockquote>
      *
      * @param arguments the arguments to pass to the target
@@ -739,10 +757,24 @@
      * @see MethodHandles#explicitCastArguments
      */
     public MethodHandle asType(MethodType newType) {
-        if (!type.isConvertibleTo(newType)) {
-            throw new WrongMethodTypeException("cannot convert "+this+" to "+newType);
+        // Fast path alternative to a heavyweight {@code asType} call.
+        // Return 'this' if the conversion will be a no-op.
+        if (newType == type) {
+            return this;
         }
-        return convertArguments(newType);
+        // Return 'this.asTypeCache' if the conversion is already memoized.
+        MethodHandle atc = asTypeCache;
+        if (atc != null && newType == atc.type) {
+            return atc;
+        }
+        return asTypeUncached(newType);
+    }
+
+    /** Override this to change asType behavior. */
+    /*non-public*/ MethodHandle asTypeUncached(MethodType newType) {
+        if (!type.isConvertibleTo(newType))
+            throw new WrongMethodTypeException("cannot convert "+this+" to "+newType);
+        return asTypeCache = convertArguments(newType);
     }
 
     /**
@@ -772,6 +804,10 @@
      * to the target method handle.
      * (The array may also be null when zero elements are required.)
      * <p>
+     * If, when the adapter is called, the supplied array argument does
+     * not have the correct number of elements, the adapter will throw
+     * an {@link IllegalArgumentException} instead of invoking the target.
+     * <p>
      * Here are some simple examples of array-spreading method handles:
      * <blockquote><pre>{@code
 MethodHandle equals = publicLookup()
@@ -782,6 +818,12 @@
 MethodHandle eq2 = equals.asSpreader(Object[].class, 2);
 assert( (boolean) eq2.invokeExact(new Object[]{ "me", "me" }));
 assert(!(boolean) eq2.invokeExact(new Object[]{ "me", "thee" }));
+// try to spread from anything but a 2-array:
+for (int n = 0; n <= 10; n++) {
+  Object[] badArityArgs = (n == 2 ? null : new Object[n]);
+  try { assert((boolean) eq2.invokeExact(badArityArgs) && false); }
+  catch (IllegalArgumentException ex) { } // OK
+}
 // spread both arguments from a String array:
 MethodHandle eq2s = equals.asSpreader(String[].class, 2);
 assert( (boolean) eq2s.invokeExact(new String[]{ "me", "me" }));
@@ -815,10 +857,12 @@
      * @return a new method handle which spreads its final array argument,
      *         before calling the original method handle
      * @throws NullPointerException if {@code arrayType} is a null reference
-     * @throws IllegalArgumentException if {@code arrayType} is not an array type
-     * @throws IllegalArgumentException if target does not have at least
+     * @throws IllegalArgumentException if {@code arrayType} is not an array type,
+     *         or if target does not have at least
      *         {@code arrayLength} parameter types,
-     *         or if {@code arrayLength} is negative
+     *         or if {@code arrayLength} is negative,
+     *         or if the resulting method handle's type would have
+     *         <a href="MethodHandle.html#maxarity">too many parameters</a>
      * @throws WrongMethodTypeException if the implied {@code asType} call fails
      * @see #asCollector
      */
@@ -931,7 +975,9 @@
      * @throws NullPointerException if {@code arrayType} is a null reference
      * @throws IllegalArgumentException if {@code arrayType} is not an array type
      *         or {@code arrayType} is not assignable to this method handle's trailing parameter type,
-     *         or {@code arrayLength} is not a legal array size
+     *         or {@code arrayLength} is not a legal array size,
+     *         or the resulting method handle's type would have
+     *         <a href="MethodHandle.html#maxarity">too many parameters</a>
      * @throws WrongMethodTypeException if the implied {@code asType} call fails
      * @see #asSpreader
      * @see #asVarargsCollector
@@ -1226,9 +1272,9 @@
      * starting with the string {@code "MethodHandle"} and
      * ending with the string representation of the method handle's type.
      * In other words, this method returns a string equal to the value of:
-     * <blockquote><pre>
+     * <blockquote><pre>{@code
      * "MethodHandle" + type().toString()
-     * </pre></blockquote>
+     * }</pre></blockquote>
      * <p>
      * (<em>Note:</em>  Future releases of this API may add further information
      * to the string representation.
@@ -1285,6 +1331,11 @@
     }
 
     /*non-public*/
+    Class<?> internalCallerClass() {
+        return null;  // caller-bound MH for @CallerSensitive method returns caller
+    }
+
+    /*non-public*/
     MethodHandle withInternalMemberName(MemberName member) {
         if (member != null) {
             return MethodHandleImpl.makeWrappedMember(this, member);
@@ -1434,7 +1485,6 @@
      * Threads may continue running the old form indefinitely,
      * but it is likely that the new one will be preferred for new executions.
      * Use with discretion.
-     * @param newForm
      */
     /*non-public*/
     void updateForm(LambdaForm newForm) {
diff --git a/jdk/src/share/classes/java/lang/invoke/MethodHandleImpl.java b/jdk/src/share/classes/java/lang/invoke/MethodHandleImpl.java
index 5ab7f7a..0d6ed2d 100644
--- a/jdk/src/share/classes/java/lang/invoke/MethodHandleImpl.java
+++ b/jdk/src/share/classes/java/lang/invoke/MethodHandleImpl.java
@@ -314,13 +314,13 @@
     static class AsVarargsCollector extends MethodHandle {
         private final MethodHandle target;
         private final Class<?> arrayType;
-        private MethodHandle cache;
+        private /*@Stable*/ MethodHandle asCollectorCache;
 
         AsVarargsCollector(MethodHandle target, MethodType type, Class<?> arrayType) {
             super(type, reinvokerForm(target));
             this.target = target;
             this.arrayType = arrayType;
-            this.cache = target.asCollector(arrayType, 0);
+            this.asCollectorCache = target.asCollector(arrayType, 0);
         }
 
         @Override MethodHandle reinvokerTarget() { return target; }
@@ -336,18 +336,19 @@
         }
 
         @Override
-        public MethodHandle asType(MethodType newType) {
+        public MethodHandle asTypeUncached(MethodType newType) {
             MethodType type = this.type();
             int collectArg = type.parameterCount() - 1;
             int newArity = newType.parameterCount();
             if (newArity == collectArg+1 &&
                 type.parameterType(collectArg).isAssignableFrom(newType.parameterType(collectArg))) {
                 // if arity and trailing parameter are compatible, do normal thing
-                return asFixedArity().asType(newType);
+                return asTypeCache = asFixedArity().asType(newType);
             }
             // check cache
-            if (cache.type().parameterCount() == newArity)
-                return cache.asType(newType);
+            MethodHandle acc = asCollectorCache;
+            if (acc != null && acc.type().parameterCount() == newArity)
+                return asTypeCache = acc.asType(newType);
             // build and cache a collector
             int arrayLength = newArity - collectArg;
             MethodHandle collector;
@@ -357,8 +358,8 @@
             } catch (IllegalArgumentException ex) {
                 throw new WrongMethodTypeException("cannot build collector", ex);
             }
-            cache = collector;
-            return collector.asType(newType);
+            asCollectorCache = collector;
+            return asTypeCache = collector.asType(newType);
         }
 
         @Override
@@ -380,6 +381,10 @@
         MemberName internalMemberName() {
             return asFixedArity().internalMemberName();
         }
+        @Override
+        Class<?> internalCallerClass() {
+            return asFixedArity().internalCallerClass();
+        }
 
         /*non-public*/
         @Override
@@ -435,7 +440,7 @@
                 // Spread the array.
                 MethodHandle aload = MethodHandles.arrayElementGetter(spreadArgType);
                 Name array = names[argIndex];
-                names[nameCursor++] = new Name(NF_checkSpreadArgument, array, spreadArgCount);
+                names[nameCursor++] = new Name(Lazy.NF_checkSpreadArgument, array, spreadArgCount);
                 for (int j = 0; j < spreadArgCount; i++, j++) {
                     indexes[i] = nameCursor;
                     names[nameCursor++] = new Name(aload, array, j);
@@ -459,14 +464,8 @@
     }
 
     static void checkSpreadArgument(Object av, int n) {
-        // FIXME: regression test for bug 7141637 erroneously expects an NPE, and other tests may expect IAE
-        // but the actual exception raised by an arity mismatch should be WMTE
-        final boolean RAISE_RANDOM_EXCEPTIONS = true;  // FIXME: delete in JSR 292 M1
         if (av == null) {
             if (n == 0)  return;
-            int len;
-            if (RAISE_RANDOM_EXCEPTIONS)
-                len = ((Object[])av).length;  // throw NPE; but delete this after tests are fixed
         } else if (av instanceof Object[]) {
             int len = ((Object[])av).length;
             if (len == n)  return;
@@ -475,19 +474,23 @@
             if (len == n)  return;
         }
         // fall through to error:
-        if (RAISE_RANDOM_EXCEPTIONS)
-            throw newIllegalArgumentException("Array is not of length "+n);
-        throw new WrongMethodTypeException("Array is not of length "+n);
+        throw newIllegalArgumentException("array is not of length "+n);
     }
 
-    private static final NamedFunction NF_checkSpreadArgument;
-    static {
-        try {
-            NF_checkSpreadArgument = new NamedFunction(MethodHandleImpl.class
-                    .getDeclaredMethod("checkSpreadArgument", Object.class, int.class));
-            NF_checkSpreadArgument.resolve();
-        } catch (ReflectiveOperationException ex) {
-            throw newInternalError(ex);
+    /**
+     * Pre-initialized NamedFunctions for bootstrapping purposes.
+     * Factored in an inner class to delay initialization until first usage.
+     */
+    private static class Lazy {
+        static final NamedFunction NF_checkSpreadArgument;
+        static {
+            try {
+                NF_checkSpreadArgument = new NamedFunction(MethodHandleImpl.class
+                        .getDeclaredMethod("checkSpreadArgument", Object.class, int.class));
+                NF_checkSpreadArgument.resolve();
+            } catch (ReflectiveOperationException ex) {
+                throw newInternalError(ex);
+            }
         }
     }
 
@@ -832,7 +835,7 @@
             MethodHandle vamh = prepareForInvoker(mh);
             // Cache the result of makeInjectedInvoker once per argument class.
             MethodHandle bccInvoker = CV_makeInjectedInvoker.get(hostClass);
-            return restoreToType(bccInvoker.bindTo(vamh), mh.type(), mh.internalMemberName());
+            return restoreToType(bccInvoker.bindTo(vamh), mh.type(), mh.internalMemberName(), hostClass);
         }
 
         private static MethodHandle makeInjectedInvoker(Class<?> hostClass) {
@@ -887,10 +890,12 @@
         }
 
         // Undo the adapter effect of prepareForInvoker:
-        private static MethodHandle restoreToType(MethodHandle vamh, MethodType type, MemberName member) {
+        private static MethodHandle restoreToType(MethodHandle vamh, MethodType type,
+                                                  MemberName member,
+                                                  Class<?> hostClass) {
             MethodHandle mh = vamh.asCollector(Object[].class, type.parameterCount());
             mh = mh.asType(type);
-            mh = mh.withInternalMemberName(member);
+            mh = new WrappedMember(mh, type, member, hostClass);
             return mh;
         }
 
@@ -959,11 +964,13 @@
     static class WrappedMember extends MethodHandle {
         private final MethodHandle target;
         private final MemberName member;
+        private final Class<?> callerClass;
 
-        private WrappedMember(MethodHandle target, MethodType type, MemberName member) {
+        private WrappedMember(MethodHandle target, MethodType type, MemberName member, Class<?> callerClass) {
             super(type, reinvokerForm(target));
             this.target = target;
             this.member = member;
+            this.callerClass = callerClass;
         }
 
         @Override
@@ -971,23 +978,33 @@
             return target;
         }
         @Override
+        public MethodHandle asTypeUncached(MethodType newType) {
+            // This MH is an alias for target, except for the MemberName
+            // Drop the MemberName if there is any conversion.
+            return asTypeCache = target.asType(newType);
+        }
+        @Override
         MemberName internalMemberName() {
             return member;
         }
         @Override
+        Class<?> internalCallerClass() {
+            return callerClass;
+        }
+        @Override
         boolean isInvokeSpecial() {
             return target.isInvokeSpecial();
         }
         @Override
         MethodHandle viewAsType(MethodType newType) {
-            return new WrappedMember(target, newType, member);
+            return new WrappedMember(target, newType, member, callerClass);
         }
     }
 
     static MethodHandle makeWrappedMember(MethodHandle target, MemberName member) {
         if (member.equals(target.internalMemberName()))
             return target;
-        return new WrappedMember(target, target.type(), member);
+        return new WrappedMember(target, target.type(), member, null);
     }
 
 }
diff --git a/jdk/src/share/classes/java/lang/invoke/MethodHandleInfo.java b/jdk/src/share/classes/java/lang/invoke/MethodHandleInfo.java
index 72fd8e9..d63db84 100644
--- a/jdk/src/share/classes/java/lang/invoke/MethodHandleInfo.java
+++ b/jdk/src/share/classes/java/lang/invoke/MethodHandleInfo.java
@@ -32,9 +32,10 @@
 import static java.lang.invoke.MethodHandleStatics.*;
 
 /**
- * A symbolic reference obtained by cracking a method handle into its consitutent symbolic parts.
+ * A symbolic reference obtained by cracking a direct method handle
+ * into its consitutent symbolic parts.
  * To crack a direct method handle, call {@link Lookup#revealDirect Lookup.revealDirect}.
- * <p>
+ * <h1><a name="directmh"></a>Direct Method Handles</h1>
  * A <em>direct method handle</em> represents a method, constructor, or field without
  * any intervening argument bindings or other transformations.
  * The method, constructor, or field referred to by a direct method handle is called
@@ -56,11 +57,25 @@
  *     or {@link Lookup#unreflectSetter Lookup.unreflectSetter}
  *     to convert a {@link Field} into a method handle.
  * </ul>
- * In all of these cases, it is possible to crack the resulting direct method handle
+ *
+ * <h1>Restrictions on Cracking</h1>
+ * Given a suitable {@code Lookup} object, it is possible to crack any direct method handle
  * to recover a symbolic reference for the underlying method, constructor, or field.
  * Cracking must be done via a {@code Lookup} object equivalent to that which created
  * the target method handle, or which has enough access permissions to recreate
  * an equivalent method handle.
+ * <p>
+ * If the underlying method is <a href="MethodHandles.Lookup.html#callsens">caller sensitive</a>,
+ * the direct method handle will have been "bound" to a particular caller class, the
+ * {@linkplain java.lang.invoke.MethodHandles.Lookup#lookupClass() lookup class}
+ * of the lookup object used to create it.
+ * Cracking this method handle with a different lookup class will fail
+ * even if the underlying method is public (like {@code Class.forName}).
+ * <p>
+ * The requirement of lookup object matching provides a "fast fail" behavior
+ * for programs which may otherwise trust erroneous revelation of a method
+ * handle with symbolic information (or caller binding) from an unexpected scope.
+ * Use {@link java.lang.invoke.MethodHandles#reflectAs} to override this limitation.
  *
  * <h1><a name="refkinds"></a>Reference kinds</h1>
  * The <a href="MethodHandles.Lookup.html#lookups">Lookup Factory Methods</a>
@@ -190,7 +205,7 @@
      * @return the Java language modifiers for underlying member,
      *         or -1 if the member cannot be accessed
      * @see Modifier
-     * @see reflectAs
+     * @see #reflectAs
      */
     public int getModifiers();
 
diff --git a/jdk/src/share/classes/java/lang/invoke/MethodHandleNatives.java b/jdk/src/share/classes/java/lang/invoke/MethodHandleNatives.java
index 4f83e82..56cb245 100644
--- a/jdk/src/share/classes/java/lang/invoke/MethodHandleNatives.java
+++ b/jdk/src/share/classes/java/lang/invoke/MethodHandleNatives.java
@@ -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
@@ -233,20 +233,19 @@
     }
     static String refKindName(byte refKind) {
         assert(refKindIsValid(refKind));
-        return REFERENCE_KIND_NAME[refKind];
+        switch (refKind) {
+        case REF_getField:          return "getField";
+        case REF_getStatic:         return "getStatic";
+        case REF_putField:          return "putField";
+        case REF_putStatic:         return "putStatic";
+        case REF_invokeVirtual:     return "invokeVirtual";
+        case REF_invokeStatic:      return "invokeStatic";
+        case REF_invokeSpecial:     return "invokeSpecial";
+        case REF_newInvokeSpecial:  return "newInvokeSpecial";
+        case REF_invokeInterface:   return "invokeInterface";
+        default:                    return "REF_???";
+        }
     }
-    private static String[] REFERENCE_KIND_NAME = {
-            null,
-            "getField",
-            "getStatic",
-            "putField",
-            "putStatic",
-            "invokeVirtual",
-            "invokeStatic",
-            "invokeSpecial",
-            "newInvokeSpecial",
-            "invokeInterface"
-    };
 
     private static native int getNamedCon(int which, Object[] name);
     static boolean verifyConstants() {
@@ -294,12 +293,18 @@
         Class<?> caller = (Class<?>)callerObj;
         String name = nameObj.toString().intern();
         MethodType type = (MethodType)typeObj;
-        appendixResult[0] = CallSite.makeSite(bootstrapMethod,
+        CallSite callSite = CallSite.makeSite(bootstrapMethod,
                                               name,
                                               type,
                                               staticArguments,
                                               caller);
-        return Invokers.linkToCallSiteMethod(type);
+        if (callSite instanceof ConstantCallSite) {
+            appendixResult[0] = callSite.dynamicInvoker();
+            return Invokers.linkToTargetMethod(type);
+        } else {
+            appendixResult[0] = callSite;
+            return Invokers.linkToCallSiteMethod(type);
+        }
     }
 
     /**
@@ -388,12 +393,7 @@
                                      Object[] appendixResult) {
         try {
             if (defc == MethodHandle.class && refKind == REF_invokeVirtual) {
-                switch (name) {
-                case "invoke":
-                    return Invokers.genericInvokerMethod(fixMethodType(callerClass, type), appendixResult);
-                case "invokeExact":
-                    return Invokers.exactInvokerMethod(fixMethodType(callerClass, type), appendixResult);
-                }
+                return Invokers.methodHandleInvokeLinkerMethod(name, fixMethodType(callerClass, type), appendixResult);
             }
         } catch (Throwable ex) {
             if (ex instanceof LinkageError)
@@ -440,14 +440,34 @@
             Lookup lookup = IMPL_LOOKUP.in(callerClass);
             assert(refKindIsValid(refKind));
             return lookup.linkMethodHandleConstant((byte) refKind, defc, name, type);
+        } catch (IllegalAccessException ex) {
+            Error err = new IllegalAccessError(ex.getMessage());
+            throw initCauseFrom(err, ex);
+        } catch (NoSuchMethodException ex) {
+            Error err = new NoSuchMethodError(ex.getMessage());
+            throw initCauseFrom(err, ex);
+        } catch (NoSuchFieldException ex) {
+            Error err = new NoSuchFieldError(ex.getMessage());
+            throw initCauseFrom(err, ex);
         } catch (ReflectiveOperationException ex) {
             Error err = new IncompatibleClassChangeError();
-            err.initCause(ex);
-            throw err;
+            throw initCauseFrom(err, ex);
         }
     }
 
     /**
+     * Use best possible cause for err.initCause(), substituting the
+     * cause for err itself if the cause has the same (or better) type.
+     */
+    static private Error initCauseFrom(Error err, Exception ex) {
+        Throwable th = ex.getCause();
+        if (err.getClass().isInstance(th))
+           return (Error) th;
+        err.initCause(th == null ? ex : th);
+        return err;
+    }
+
+    /**
      * Is this method a caller-sensitive method?
      * I.e., does it call Reflection.getCallerClass or a similer method
      * to ask about the identity of its caller?
diff --git a/jdk/src/share/classes/java/lang/invoke/MethodHandleProxies.java b/jdk/src/share/classes/java/lang/invoke/MethodHandleProxies.java
index 246160c..13b1d21 100644
--- a/jdk/src/share/classes/java/lang/invoke/MethodHandleProxies.java
+++ b/jdk/src/share/classes/java/lang/invoke/MethodHandleProxies.java
@@ -107,6 +107,11 @@
      * such as abstract classes with single abstract methods.
      * Future versions of this API may also equip wrapper instances
      * with one or more additional public "marker" interfaces.
+     * <p>
+     * If a security manager is installed, this method is caller sensitive.
+     * During any invocation of the target method handle via the returned wrapper,
+     * the original creator of the wrapper (the caller) will be visible
+     * to context checks requested by the security manager.
      *
      * @param <T> the desired type of the wrapper, a single-method interface
      * @param intfc a class object representing {@code T}
diff --git a/jdk/src/share/classes/java/lang/invoke/MethodHandles.java b/jdk/src/share/classes/java/lang/invoke/MethodHandles.java
index f0f9447..369d14b 100644
--- a/jdk/src/share/classes/java/lang/invoke/MethodHandles.java
+++ b/jdk/src/share/classes/java/lang/invoke/MethodHandles.java
@@ -39,6 +39,7 @@
 import sun.security.util.SecurityConstants;
 import static java.lang.invoke.MethodHandleStatics.*;
 import static java.lang.invoke.MethodHandleNatives.Constants.*;
+import java.util.concurrent.ConcurrentHashMap;
 import sun.security.util.SecurityConstants;
 
 /**
@@ -48,7 +49,6 @@
  * <li>Lookup methods which help create method handles for methods and fields.
  * <li>Combinator methods, which combine or transform pre-existing method handles into new ones.
  * <li>Other factory methods to create method handles that emulate other common JVM operations or control flow patterns.
- * <li>Wrapper methods which can convert between method handles and interface types.
  * </ul>
  * <p>
  * @author John Rose, JSR 292 EG
@@ -65,12 +65,25 @@
     //// Method handle creation from ordinary methods.
 
     /**
-     * Returns a {@link Lookup lookup object} on the caller,
-     * which has the capability to access any method handle that the caller has access to,
-     * including direct method handles to private fields and methods.
+     * Returns a {@link Lookup lookup object} with
+     * full capabilities to emulate all supported bytecode behaviors of the caller.
+     * These capabilities include <a href="MethodHandles.Lookup.html#privacc">private access</a> to the caller.
+     * Factory methods on the lookup object can create
+     * <a href="MethodHandleInfo.html#directmh">direct method handles</a>
+     * for any member that the caller has access to via bytecodes,
+     * including protected and private fields and methods.
      * This lookup object is a <em>capability</em> which may be delegated to trusted agents.
      * Do not store it in place where untrusted code can access it.
-     * @return a lookup object for the caller of this method
+     * <p>
+     * This method is caller sensitive, which means that it may return different
+     * values to different callers.
+     * <p>
+     * For any given caller class {@code C}, the lookup object returned by this call
+     * has equivalent capabilities to any lookup object
+     * supplied by the JVM to the bootstrap method of an
+     * <a href="package-summary.html#indyinsn">invokedynamic instruction</a>
+     * executing in the same caller class {@code C}.
+     * @return a lookup object for the caller of this method, with private access
      */
     @CallerSensitive
     public static Lookup lookup() {
@@ -84,11 +97,17 @@
      * <p>
      * As a matter of pure convention, the {@linkplain Lookup#lookupClass lookup class}
      * of this lookup object will be {@link java.lang.Object}.
-     * <p>
+     *
+     * <p style="font-size:smaller;">
+     * <em>Discussion:</em>
      * The lookup class can be changed to any other class {@code C} using an expression of the form
-     * {@linkplain Lookup#in <code>publicLookup().in(C.class)</code>}.
+     * {@link Lookup#in publicLookup().in(C.class)}.
      * Since all classes have equal access to public names,
      * such a change would confer no new access rights.
+     * A public lookup object is always subject to
+     * <a href="MethodHandles.Lookup.html#secmgr">security manager checks</a>.
+     * Also, it cannot access
+     * <a href="MethodHandles.Lookup.html#callsens">caller sensitive methods</a>.
      * @return a lookup object which is trusted minimally
      */
     public static Lookup publicLookup() {
@@ -96,7 +115,8 @@
     }
 
     /**
-     * Performs an unchecked "crack" of a direct method handle.
+     * Performs an unchecked "crack" of a
+     * <a href="MethodHandleInfo.html#directmh">direct method handle</a>.
      * The result is as if the user had obtained a lookup object capable enough
      * to crack the target method handle, called
      * {@link java.lang.invoke.MethodHandles.Lookup#revealDirect Lookup.revealDirect}
@@ -149,10 +169,17 @@
      * <h1><a name="lookups"></a>Lookup Factory Methods</h1>
      * The factory methods on a {@code Lookup} object correspond to all major
      * use cases for methods, constructors, and fields.
+     * Each method handle created by a factory method is the functional
+     * equivalent of a particular <em>bytecode behavior</em>.
+     * (Bytecode behaviors are described in section 5.4.3.5 of the Java Virtual Machine Specification.)
      * Here is a summary of the correspondence between these factory methods and
      * the behavior the resulting method handles:
      * <table border=1 cellpadding=5 summary="lookup method behaviors">
-     * <tr><th>lookup expression</th><th>member</th><th>behavior</th></tr>
+     * <tr>
+     *     <th><a name="equiv"></a>lookup expression</th>
+     *     <th>member</th>
+     *     <th>bytecode behavior</th>
+     * </tr>
      * <tr>
      *     <td>{@link java.lang.invoke.MethodHandles.Lookup#findGetter lookup.findGetter(C.class,"f",FT.class)}</td>
      *     <td>{@code FT f;}</td><td>{@code (T) this.f;}</td>
@@ -228,10 +255,12 @@
      * In cases where the given member is of variable arity (i.e., a method or constructor)
      * the returned method handle will also be of {@linkplain MethodHandle#asVarargsCollector variable arity}.
      * In all other cases, the returned method handle will be of fixed arity.
-     * <p>
+     * <p style="font-size:smaller;">
+     * <em>Discussion:</em>
      * The equivalence between looked-up method handles and underlying
-     * class members can break down in a few ways:
-     * <ul>
+     * class members and bytecode behaviors
+     * can break down in a few ways:
+     * <ul style="font-size:smaller;">
      * <li>If {@code C} is not symbolically accessible from the lookup class's loader,
      * the lookup can still succeed, even when there is no equivalent
      * Java expression or bytecoded constant.
@@ -241,9 +270,13 @@
      * For example, lookups for {@code MethodHandle.invokeExact} and
      * {@code MethodHandle.invoke} will always succeed, regardless of requested type.
      * <li>If there is a security manager installed, it can forbid the lookup
-     * on various grounds (<a href="#secmgr">see below</a>).
-     * By contrast, the {@code ldc} instruction is not subject to
-     * security manager checks.
+     * on various grounds (<a href="MethodHandles.Lookup.html#secmgr">see below</a>).
+     * By contrast, the {@code ldc} instruction on a {@code CONSTANT_MethodHandle}
+     * constant is not subject to security manager checks.
+     * <li>If the looked-up method has a
+     * <a href="MethodHandle.html#maxarity">very large arity</a>,
+     * the method handle creation may fail, due to the method handle
+     * type having too many parameters.
      * </ul>
      *
      * <h1><a name="access"></a>Access checking</h1>
@@ -271,7 +304,8 @@
      * A lookup can fail, because
      * the containing class is not accessible to the lookup class, or
      * because the desired class member is missing, or because the
-     * desired class member is not accessible to the lookup class.
+     * desired class member is not accessible to the lookup class, or
+     * because the lookup object is not trusted enough to access the member.
      * In any of these cases, a {@code ReflectiveOperationException} will be
      * thrown from the attempted lookup.  The exact class will be one of
      * the following:
@@ -282,11 +316,23 @@
      * </ul>
      * <p>
      * In general, the conditions under which a method handle may be
-     * looked up for a method {@code M} are exactly equivalent to the conditions
-     * under which the lookup class could have compiled and resolved a call to {@code M}.
+     * looked up for a method {@code M} are no more restrictive than the conditions
+     * under which the lookup class could have compiled, verified, and resolved a call to {@code M}.
+     * Where the JVM would raise exceptions like {@code NoSuchMethodError},
+     * a method handle lookup will generally raise a corresponding
+     * checked exception, such as {@code NoSuchMethodException}.
      * And the effect of invoking the method handle resulting from the lookup
-     * is exactly equivalent to executing the compiled and resolved call to {@code M}.
+     * is <a href="MethodHandles.Lookup.html#equiv">exactly equivalent</a>
+     * to executing the compiled, verified, and resolved call to {@code M}.
      * The same point is true of fields and constructors.
+     * <p style="font-size:smaller;">
+     * <em>Discussion:</em>
+     * Access checks only apply to named and reflected methods,
+     * constructors, and fields.
+     * Other method handle creation methods, such as
+     * {@link MethodHandle#asType MethodHandle.asType},
+     * do not require any access checks, and are used
+     * independently of any {@code Lookup} object.
      * <p>
      * If the desired member is {@code protected}, the usual JVM rules apply,
      * including the requirement that the lookup class must be either be in the
@@ -300,6 +346,18 @@
      * (which will necessarily be a superclass of the lookup class)
      * to the lookup class itself.
      * <p>
+     * The JVM imposes a similar requirement on {@code invokespecial} instruction,
+     * that the receiver argument must match both the resolved method <em>and</em>
+     * the current class.  Again, this requirement is enforced by narrowing the
+     * type of the leading parameter to the resulting method handle.
+     * (See the Java Virtual Machine Specification, section 4.10.1.9.)
+     * <p>
+     * The JVM represents constructors and static initializer blocks as internal methods
+     * with special names ({@code "<init>"} and {@code "<clinit>"}).
+     * The internal syntax of invocation instructions allows them to refer to such internal
+     * methods as if they were normal methods, but the JVM bytecode verifier rejects them.
+     * A lookup of such an internal method will produce a {@code NoSuchMethodException}.
+     * <p>
      * In some cases, access between nested classes is obtained by the Java compiler by creating
      * an wrapper method to access a private method of another class
      * in the same top-level declaration.
@@ -313,6 +371,43 @@
      * which can transform a lookup on {@code C.E} into one on any of those other
      * classes, without special elevation of privilege.
      * <p>
+     * The accesses permitted to a given lookup object may be limited,
+     * according to its set of {@link #lookupModes lookupModes},
+     * to a subset of members normally accessible to the lookup class.
+     * For example, the {@link MethodHandles#publicLookup publicLookup}
+     * method produces a lookup object which is only allowed to access
+     * public members in public classes.
+     * The caller sensitive method {@link MethodHandles#lookup lookup}
+     * produces a lookup object with full capabilities relative to
+     * its caller class, to emulate all supported bytecode behaviors.
+     * Also, the {@link Lookup#in Lookup.in} method may produce a lookup object
+     * with fewer access modes than the original lookup object.
+     *
+     * <p style="font-size:smaller;">
+     * <a name="privacc"></a>
+     * <em>Discussion of private access:</em>
+     * We say that a lookup has <em>private access</em>
+     * if its {@linkplain #lookupModes lookup modes}
+     * include the possibility of accessing {@code private} members.
+     * As documented in the relevant methods elsewhere,
+     * only lookups with private access possess the following capabilities:
+     * <ul style="font-size:smaller;">
+     * <li>access private fields, methods, and constructors of the lookup class
+     * <li>create method handles which invoke <a href="MethodHandles.Lookup.html#callsens">caller sensitive</a> methods,
+     *     such as {@code Class.forName}
+     * <li>create method handles which {@link Lookup#findSpecial emulate invokespecial} instructions
+     * <li>avoid <a href="MethodHandles.Lookup.html#secmgr">package access checks</a>
+     *     for classes accessible to the lookup class
+     * <li>create {@link Lookup#in delegated lookup objects} which have private access to other classes
+     *     within the same package member
+     * </ul>
+     * <p style="font-size:smaller;">
+     * Each of these permissions is a consequence of the fact that a lookup object
+     * with private access can be securely traced back to an originating class,
+     * whose <a href="MethodHandles.Lookup.html#equiv">bytecode behaviors</a> and Java language access permissions
+     * can be reliably determined and emulated by method handles.
+     *
+     * <h1><a name="secmgr"></a>Security manager interactions</h1>
      * Although bytecode instructions can only refer to classes in
      * a related class loader, this API can search for methods in any
      * class, as long as a reference to its {@code Class} object is
@@ -325,16 +420,6 @@
      * and the Core Reflection API
      * (as found on {@link java.lang.Class Class}).
      * <p>
-     * Access checks only apply to named and reflected methods,
-     * constructors, and fields.
-     * Other method handle creation methods, such as
-     * {@link MethodHandle#asType MethodHandle.asType},
-     * do not require any access checks, and are done
-     * with static methods of {@link MethodHandles},
-     * independently of any {@code Lookup} object.
-     *
-     * <h1>Security manager interactions</h1>
-     * <a name="secmgr"></a>
      * If a security manager is present, member lookups are subject to
      * additional checks.
      * From one to three calls are made to the security manager.
@@ -347,26 +432,79 @@
      * member is actually defined.
      * The value {@code lookc} is defined as <em>not present</em>
      * if the current lookup object does not have
-     * {@linkplain java.lang.invoke.MethodHandles.Lookup#PRIVATE private access}.
+     * <a href="MethodHandles.Lookup.html#privacc">private access</a>.
      * The calls are made according to the following rules:
      * <ul>
-     * <li>If {@code lookc} is not present, or if its class loader is not
+     * <li><b>Step 1:</b>
+     *     If {@code lookc} is not present, or if its class loader is not
      *     the same as or an ancestor of the class loader of {@code refc},
      *     then {@link SecurityManager#checkPackageAccess
      *     smgr.checkPackageAccess(refcPkg)} is called,
      *     where {@code refcPkg} is the package of {@code refc}.
-     * <li>If the retrieved member is not public and
+     * <li><b>Step 2:</b>
+     *     If the retrieved member is not public and
      *     {@code lookc} is not present, then
      *     {@link SecurityManager#checkPermission smgr.checkPermission}
      *     with {@code RuntimePermission("accessDeclaredMembers")} is called.
-     * <li>If the retrieved member is not public,
+     * <li><b>Step 3:</b>
+     *     If the retrieved member is not public,
+     *     and if {@code lookc} is not present,
      *     and if {@code defc} and {@code refc} are different,
      *     then {@link SecurityManager#checkPackageAccess
      *     smgr.checkPackageAccess(defcPkg)} is called,
      *     where {@code defcPkg} is the package of {@code defc}.
      * </ul>
+     * Security checks are performed after other access checks have passed.
+     * Therefore, the above rules presuppose a member that is public,
+     * or else that is being accessed from a lookup class that has
+     * rights to access the member.
+     *
+     * <h1><a name="callsens"></a>Caller sensitive methods</h1>
+     * A small number of Java methods have a special property called caller sensitivity.
+     * A <em>caller-sensitive</em> method can behave differently depending on the
+     * identity of its immediate caller.
+     * <p>
+     * If a method handle for a caller-sensitive method is requested,
+     * the general rules for <a href="MethodHandles.Lookup.html#equiv">bytecode behaviors</a> apply,
+     * but they take account of the lookup class in a special way.
+     * The resulting method handle behaves as if it were called
+     * from an instruction contained in the lookup class,
+     * so that the caller-sensitive method detects the lookup class.
+     * (By contrast, the invoker of the method handle is disregarded.)
+     * Thus, in the case of caller-sensitive methods,
+     * different lookup classes may give rise to
+     * differently behaving method handles.
+     * <p>
+     * In cases where the lookup object is
+     * {@link MethodHandles#publicLookup() publicLookup()},
+     * or some other lookup object without
+     * <a href="MethodHandles.Lookup.html#privacc">private access</a>,
+     * the lookup class is disregarded.
+     * In such cases, no caller-sensitive method handle can be created,
+     * access is forbidden, and the lookup fails with an
+     * {@code IllegalAccessException}.
+     * <p style="font-size:smaller;">
+     * <em>Discussion:</em>
+     * For example, the caller-sensitive method
+     * {@link java.lang.Class#forName(String) Class.forName(x)}
+     * can return varying classes or throw varying exceptions,
+     * depending on the class loader of the class that calls it.
+     * A public lookup of {@code Class.forName} will fail, because
+     * there is no reasonable way to determine its bytecode behavior.
+     * <p style="font-size:smaller;">
+     * If an application caches method handles for broad sharing,
+     * it should use {@code publicLookup()} to create them.
+     * If there is a lookup of {@code Class.forName}, it will fail,
+     * and the application must take appropriate action in that case.
+     * It may be that a later lookup, perhaps during the invocation of a
+     * bootstrap method, can incorporate the specific identity
+     * of the caller, making the method accessible.
+     * <p style="font-size:smaller;">
+     * The function {@code MethodHandles.lookup} is caller sensitive
+     * so that there can be a secure foundation for lookups.
+     * Nearly all other methods in the JSR 292 API rely on lookup
+     * objects to check access requests.
      */
-    // FIXME in MR1: clarify that the bytecode behavior of a caller-ID method (like Class.forName) is relative to the lookupClass used to create the method handle, not the dynamic caller of the method handle
     public static final
     class Lookup {
         /** The class on behalf of whom the lookup is being performed. */
@@ -592,13 +730,23 @@
          * (Since static methods do not take receivers, there is no
          * additional receiver argument inserted into the method handle type,
          * as there would be with {@link #findVirtual findVirtual} or {@link #findSpecial findSpecial}.)
-         * The method and all its argument types must be accessible to the lookup class.
-         * If the method's class has not yet been initialized, that is done
-         * immediately, before the method handle is returned.
+         * The method and all its argument types must be accessible to the lookup object.
          * <p>
          * The returned method handle will have
          * {@linkplain MethodHandle#asVarargsCollector variable arity} if and only if
          * the method's variable arity modifier bit ({@code 0x0080}) is set.
+         * <p>
+         * 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
+import static java.lang.invoke.MethodHandles.*;
+import static java.lang.invoke.MethodType.*;
+...
+MethodHandle MH_asList = publicLookup().findStatic(Arrays.class,
+  "asList", methodType(List.class, Object[].class));
+assertEquals("[x, y]", MH_asList.invoke("x", "y").toString());
+         * }</pre></blockquote>
          * @param refc the class from which the method is accessed
          * @param name the name of the method
          * @param type the type of the method
@@ -615,7 +763,6 @@
         public
         MethodHandle findStatic(Class<?> refc, String name, MethodType type) throws NoSuchMethodException, IllegalAccessException {
             MemberName method = resolveOrFail(REF_invokeStatic, refc, name, type);
-            checkSecurityManager(refc, method);
             return getDirectMethod(REF_invokeStatic, refc, method, findBoundCallerClass(method));
         }
 
@@ -623,7 +770,7 @@
          * Produces a method handle for a virtual method.
          * The type of the method handle will be that of the method,
          * with the receiver type (usually {@code refc}) prepended.
-         * The method and all its argument types must be accessible to the lookup class.
+         * The method and all its argument types must be accessible to the lookup object.
          * <p>
          * When called, the handle will treat the first argument as a receiver
          * and dispatch on the receiver's type to determine which method
@@ -640,7 +787,7 @@
          * {@linkplain MethodHandle#asVarargsCollector variable arity} if and only if
          * the method's variable arity modifier bit ({@code 0x0080}) is set.
          * <p>
-         * Because of the general equivalence between {@code invokevirtual}
+         * Because of the general <a href="MethodHandles.Lookup.html#equiv">equivalence</a> between {@code invokevirtual}
          * instructions and method handles produced by {@code findVirtual},
          * if the class is {@code MethodHandle} and the name string is
          * {@code invokeExact} or {@code invoke}, the resulting
@@ -649,6 +796,34 @@
          * {@link java.lang.invoke.MethodHandles#invoker MethodHandles.invoker}
          * with the same {@code type} argument.
          *
+         * <b>Example:</b>
+         * <p><blockquote><pre>{@code
+import static java.lang.invoke.MethodHandles.*;
+import static java.lang.invoke.MethodType.*;
+...
+MethodHandle MH_concat = publicLookup().findVirtual(String.class,
+  "concat", methodType(String.class, String.class));
+MethodHandle MH_hashCode = publicLookup().findVirtual(Object.class,
+  "hashCode", methodType(int.class));
+MethodHandle MH_hashCode_String = publicLookup().findVirtual(String.class,
+  "hashCode", methodType(int.class));
+assertEquals("xy", (String) MH_concat.invokeExact("x", "y"));
+assertEquals("xy".hashCode(), (int) MH_hashCode.invokeExact((Object)"xy"));
+assertEquals("xy".hashCode(), (int) MH_hashCode_String.invokeExact("xy"));
+// interface method:
+MethodHandle MH_subSequence = publicLookup().findVirtual(CharSequence.class,
+  "subSequence", methodType(CharSequence.class, int.class, int.class));
+assertEquals("def", MH_subSequence.invoke("abcdefghi", 3, 6).toString());
+// constructor "internal method" must be accessed differently:
+MethodType MT_newString = methodType(void.class); //()V for new String()
+try { assertEquals("impossible", lookup()
+        .findVirtual(String.class, "<init>", MT_newString));
+ } catch (NoSuchMethodException ex) { } // OK
+MethodHandle MH_newString = publicLookup()
+  .findConstructor(String.class, MT_newString);
+assertEquals("", (String) MH_newString.invokeExact());
+         * }</pre></blockquote>
+         *
          * @param refc the class or interface from which the method is accessed
          * @param name the name of the method
          * @param type the type of the method, with the receiver argument omitted
@@ -669,7 +844,6 @@
             }
             byte refKind = (refc.isInterface() ? REF_invokeInterface : REF_invokeVirtual);
             MemberName method = resolveOrFail(refKind, refc, name, type);
-            checkSecurityManager(refc, method);
             return getDirectMethod(refKind, refc, method, findBoundCallerClass(method));
         }
         private MethodHandle findVirtualForMH(String name, MethodType type) {
@@ -687,16 +861,35 @@
          * the constructor of the specified type.
          * The parameter types of the method handle will be those of the constructor,
          * while the return type will be a reference to the constructor's class.
-         * The constructor and all its argument types must be accessible to the lookup class.
-         * If the constructor's class has not yet been initialized, that is done
-         * immediately, before the method handle is returned.
+         * The constructor and all its argument types must be accessible to the lookup object.
          * <p>
-         * Note:  The requested type must have a return type of {@code void}.
-         * This is consistent with the JVM's treatment of constructor type descriptors.
+         * The requested type must have a return type of {@code void}.
+         * (This is consistent with the JVM's treatment of constructor type descriptors.)
          * <p>
          * The returned method handle will have
          * {@linkplain MethodHandle#asVarargsCollector variable arity} if and only if
          * the constructor's variable arity modifier bit ({@code 0x0080}) is set.
+         * <p>
+         * 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
+import static java.lang.invoke.MethodHandles.*;
+import static java.lang.invoke.MethodType.*;
+...
+MethodHandle MH_newArrayList = publicLookup().findConstructor(
+  ArrayList.class, methodType(void.class, Collection.class));
+Collection orig = Arrays.asList("x", "y");
+Collection copy = (ArrayList) MH_newArrayList.invokeExact(orig);
+assert(orig != copy);
+assertEquals(orig, copy);
+// a variable-arity constructor:
+MethodHandle MH_newProcessBuilder = publicLookup().findConstructor(
+  ProcessBuilder.class, methodType(void.class, String[].class));
+ProcessBuilder pb = (ProcessBuilder)
+  MH_newProcessBuilder.invoke("x", "y", "z");
+assertEquals("[x, y, z]", pb.command().toString());
+         * }</pre></blockquote>
          * @param refc the class or interface from which the method is accessed
          * @param type the type of the method, with the receiver argument omitted, and a void return type
          * @return the desired method handle
@@ -711,31 +904,68 @@
         public MethodHandle findConstructor(Class<?> refc, MethodType type) throws NoSuchMethodException, IllegalAccessException {
             String name = "<init>";
             MemberName ctor = resolveOrFail(REF_newInvokeSpecial, refc, name, type);
-            checkSecurityManager(refc, ctor);
             return getDirectConstructor(refc, ctor);
         }
 
         /**
-         * Produces an early-bound method handle for a virtual method,
-         * as if called from an {@code invokespecial}
-         * instruction from {@code caller}.
+         * Produces an early-bound method handle for a virtual method.
+         * It will bypass checks for overriding methods on the receiver,
+         * <a href="MethodHandles.Lookup.html#equiv">as if called</a> from an {@code invokespecial}
+         * instruction from within the explicitly specified {@code specialCaller}.
          * The type of the method handle will be that of the method,
-         * with a suitably restricted receiver type (such as {@code caller}) prepended.
+         * with a suitably restricted receiver type prepended.
+         * (The receiver type will be {@code specialCaller} or a subtype.)
          * The method and all its argument types must be accessible
-         * to the caller.
+         * to the lookup object.
          * <p>
-         * When called, the handle will treat the first argument as a receiver,
-         * but will not dispatch on the receiver's type.
-         * (This direct invocation action is identical with that performed by an
-         * {@code invokespecial} instruction.)
-         * <p>
-         * If the explicitly specified caller class is not identical with the
-         * lookup class, or if this lookup object does not have private access
+         * Before method resolution,
+         * if the explicitly specified caller class is not identical with the
+         * lookup class, or if this lookup object does not have
+         * <a href="MethodHandles.Lookup.html#privacc">private access</a>
          * privileges, the access fails.
          * <p>
          * The returned method handle will have
          * {@linkplain MethodHandle#asVarargsCollector variable arity} if and only if
          * the method's variable arity modifier bit ({@code 0x0080}) is set.
+         * <p style="font-size:smaller;">
+         * <em>(Note:  JVM internal methods named {@code "<init>"} are not visible to this API,
+         * even though the {@code invokespecial} instruction can refer to them
+         * 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
+import static java.lang.invoke.MethodHandles.*;
+import static java.lang.invoke.MethodType.*;
+...
+static class Listie extends ArrayList {
+  public String toString() { return "[wee Listie]"; }
+  static Lookup lookup() { return MethodHandles.lookup(); }
+}
+...
+// no access to constructor via invokeSpecial:
+MethodHandle MH_newListie = Listie.lookup()
+  .findConstructor(Listie.class, methodType(void.class));
+Listie l = (Listie) MH_newListie.invokeExact();
+try { assertEquals("impossible", Listie.lookup().findSpecial(
+        Listie.class, "<init>", methodType(void.class), Listie.class));
+ } catch (NoSuchMethodException ex) { } // OK
+// access to super and self methods via invokeSpecial:
+MethodHandle MH_super = Listie.lookup().findSpecial(
+  ArrayList.class, "toString" , methodType(String.class), Listie.class);
+MethodHandle MH_this = Listie.lookup().findSpecial(
+  Listie.class, "toString" , methodType(String.class), Listie.class);
+MethodHandle MH_duper = Listie.lookup().findSpecial(
+  Object.class, "toString" , methodType(String.class), Listie.class);
+assertEquals("[]", (String) MH_super.invokeExact(l));
+assertEquals(""+l, (String) MH_this.invokeExact(l));
+assertEquals("[]", (String) MH_duper.invokeExact(l)); // ArrayList method
+try { assertEquals("inaccessible", Listie.lookup().findSpecial(
+        String.class, "toString", methodType(String.class), Listie.class));
+ } catch (IllegalAccessException ex) { } // OK
+Listie subl = new Listie() { public String toString() { return "[subclass]"; } };
+assertEquals(""+l, (String) MH_this.invokeExact(subl)); // Listie method
+         * }</pre></blockquote>
+         *
          * @param refc the class or interface from which the method is accessed
          * @param name the name of the method (which must not be "&lt;init&gt;")
          * @param type the type of the method, with the receiver argument omitted
@@ -754,7 +984,6 @@
             checkSpecialCaller(specialCaller);
             Lookup specialLookup = this.in(specialCaller);
             MemberName method = specialLookup.resolveOrFail(REF_invokeSpecial, refc, name, type);
-            checkSecurityManager(refc, method);
             return specialLookup.getDirectMethod(REF_invokeSpecial, refc, method, findBoundCallerClass(method));
         }
 
@@ -777,7 +1006,6 @@
          */
         public MethodHandle findGetter(Class<?> refc, String name, Class<?> type) throws NoSuchFieldException, IllegalAccessException {
             MemberName field = resolveOrFail(REF_getField, refc, name, type);
-            checkSecurityManager(refc, field);
             return getDirectField(REF_getField, refc, field);
         }
 
@@ -800,7 +1028,6 @@
          */
         public MethodHandle findSetter(Class<?> refc, String name, Class<?> type) throws NoSuchFieldException, IllegalAccessException {
             MemberName field = resolveOrFail(REF_putField, refc, name, type);
-            checkSecurityManager(refc, field);
             return getDirectField(REF_putField, refc, field);
         }
 
@@ -810,6 +1037,9 @@
          * value type.
          * The method handle will take no arguments.
          * Access checking is performed immediately on behalf of the lookup class.
+         * <p>
+         * If the returned method handle is invoked, the field's class will
+         * be initialized, if it has not already been initialized.
          * @param refc the class or interface from which the method is accessed
          * @param name the field's name
          * @param type the field's type
@@ -822,7 +1052,6 @@
          */
         public MethodHandle findStaticGetter(Class<?> refc, String name, Class<?> type) throws NoSuchFieldException, IllegalAccessException {
             MemberName field = resolveOrFail(REF_getStatic, refc, name, type);
-            checkSecurityManager(refc, field);
             return getDirectField(REF_getStatic, refc, field);
         }
 
@@ -832,6 +1061,9 @@
          * The method handle will take a single
          * argument, of the field's value type, the value to be stored.
          * Access checking is performed immediately on behalf of the lookup class.
+         * <p>
+         * If the returned method handle is invoked, the field's class will
+         * be initialized, if it has not already been initialized.
          * @param refc the class or interface from which the method is accessed
          * @param name the field's name
          * @param type the field's type
@@ -844,7 +1076,6 @@
          */
         public MethodHandle findStaticSetter(Class<?> refc, String name, Class<?> type) throws NoSuchFieldException, IllegalAccessException {
             MemberName field = resolveOrFail(REF_putStatic, refc, name, type);
-            checkSecurityManager(refc, field);
             return getDirectField(REF_putStatic, refc, field);
         }
 
@@ -852,7 +1083,7 @@
          * Produces an early-bound method handle for a non-static method.
          * The receiver must have a supertype {@code defc} in which a method
          * of the given name and type is accessible to the lookup class.
-         * The method and all its argument types must be accessible to the lookup class.
+         * The method and all its argument types must be accessible to the lookup object.
          * The type of the method handle will be that of the method,
          * without any insertion of an additional receiver parameter.
          * The given receiver will be bound into the method handle,
@@ -867,17 +1098,17 @@
          * the given receiver value will be bound to it.)
          * <p>
          * This is equivalent to the following code:
-         * <blockquote><pre>
+         * <blockquote><pre>{@code
 import static java.lang.invoke.MethodHandles.*;
 import static java.lang.invoke.MethodType.*;
 ...
-MethodHandle mh0 = lookup().{@link #findVirtual findVirtual}(defc, name, type);
-MethodHandle mh1 = mh0.{@link MethodHandle#bindTo bindTo}(receiver);
+MethodHandle mh0 = lookup().findVirtual(defc, name, type);
+MethodHandle mh1 = mh0.bindTo(receiver);
 MethodType mt1 = mh1.type();
 if (mh0.isVarargsCollector())
   mh1 = mh1.asVarargsCollector(mt1.parameterType(mt1.parameterCount()-1));
 return mh1;
-         * </pre></blockquote>
+         * }</pre></blockquote>
          * where {@code defc} is either {@code receiver.getClass()} or a super
          * type of that class, in which the requested method is accessible
          * to the lookup class.
@@ -893,17 +1124,19 @@
          * @exception SecurityException if a security manager is present and it
          *                              <a href="MethodHandles.Lookup.html#secmgr">refuses access</a>
          * @throws NullPointerException if any argument is null
+         * @see MethodHandle#bindTo
+         * @see #findVirtual
          */
         public MethodHandle bind(Object receiver, String name, MethodType type) throws NoSuchMethodException, IllegalAccessException {
             Class<? extends Object> refc = receiver.getClass(); // may get NPE
             MemberName method = resolveOrFail(REF_invokeSpecial, refc, name, type);
-            checkSecurityManager(refc, method);
             MethodHandle mh = getDirectMethodNoRestrict(REF_invokeSpecial, refc, method, findBoundCallerClass(method));
             return mh.bindReceiver(receiver).setVarargs(method);
         }
 
         /**
-         * Makes a direct method handle to <i>m</i>, if the lookup class has permission.
+         * Makes a <a href="MethodHandleInfo.html#directmh">direct method handle</a>
+         * to <i>m</i>, if the lookup class has permission.
          * If <i>m</i> is non-static, the receiver argument is treated as an initial argument.
          * If <i>m</i> is virtual, overriding is respected on every call.
          * Unlike the Core Reflection API, exceptions are <em>not</em> wrapped.
@@ -916,6 +1149,10 @@
          * The returned method handle will have
          * {@linkplain MethodHandle#asVarargsCollector variable arity} if and only if
          * the method's variable arity modifier bit ({@code 0x0080}) is set.
+         * <p>
+         * If <i>m</i> is static, and
+         * if the returned method handle is invoked, the method's class will
+         * be initialized, if it has not already been initialized.
          * @param m the reflected method
          * @return a method handle which can invoke the reflected method
          * @throws IllegalAccessException if access checking fails
@@ -934,7 +1171,7 @@
                 refKind = REF_invokeVirtual;
             assert(method.isMethod());
             Lookup lookup = m.isAccessible() ? IMPL_LOOKUP : this;
-            return lookup.getDirectMethod(refKind, method.getDeclaringClass(), method, findBoundCallerClass(method));
+            return lookup.getDirectMethodNoSecurityManager(refKind, method.getDeclaringClass(), method, findBoundCallerClass(method));
         }
         private MethodHandle unreflectForMH(Method m) {
             // these names require special lookups because they throw UnsupportedOperationException
@@ -946,13 +1183,21 @@
         /**
          * Produces a method handle for a reflected method.
          * It will bypass checks for overriding methods on the receiver,
-         * as if by a {@code invokespecial} instruction from within the {@code specialCaller}.
+         * <a href="MethodHandles.Lookup.html#equiv">as if called</a> from an {@code invokespecial}
+         * instruction from within the explicitly specified {@code specialCaller}.
          * The type of the method handle will be that of the method,
-         * with the special caller type prepended (and <em>not</em> the receiver of the method).
+         * with a suitably restricted receiver type prepended.
+         * (The receiver type will be {@code specialCaller} or a subtype.)
          * If the method's {@code accessible} flag is not set,
          * access checking is performed immediately on behalf of the lookup class,
          * as if {@code invokespecial} instruction were being linked.
          * <p>
+         * Before method resolution,
+         * if the explicitly specified caller class is not identical with the
+         * lookup class, or if this lookup object does not have
+         * <a href="MethodHandles.Lookup.html#privacc">private access</a>
+         * privileges, the access fails.
+         * <p>
          * The returned method handle will have
          * {@linkplain MethodHandle#asVarargsCollector variable arity} if and only if
          * the method's variable arity modifier bit ({@code 0x0080}) is set.
@@ -970,7 +1215,7 @@
             MemberName method = new MemberName(m, true);
             assert(method.isMethod());
             // ignore m.isAccessible:  this is a new kind of access
-            return specialLookup.getDirectMethod(REF_invokeSpecial, method.getDeclaringClass(), method, findBoundCallerClass(method));
+            return specialLookup.getDirectMethodNoSecurityManager(REF_invokeSpecial, method.getDeclaringClass(), method, findBoundCallerClass(method));
         }
 
         /**
@@ -987,6 +1232,9 @@
          * The returned method handle will have
          * {@linkplain MethodHandle#asVarargsCollector variable arity} if and only if
          * the constructor's variable arity modifier bit ({@code 0x0080}) is set.
+         * <p>
+         * If the returned method handle is invoked, the constructor's class will
+         * be initialized, if it has not already been initialized.
          * @param c the reflected constructor
          * @return a method handle which can invoke the reflected constructor
          * @throws IllegalAccessException if access checking fails
@@ -994,12 +1242,11 @@
          *                                is set and {@code asVarargsCollector} fails
          * @throws NullPointerException if the argument is null
          */
-        @SuppressWarnings("rawtypes")  // Will be Constructor<?> after JSR 292 MR
-        public MethodHandle unreflectConstructor(Constructor c) throws IllegalAccessException {
+        public MethodHandle unreflectConstructor(Constructor<?> c) throws IllegalAccessException {
             MemberName ctor = new MemberName(c);
             assert(ctor.isConstructor());
             Lookup lookup = c.isAccessible() ? IMPL_LOOKUP : this;
-            return lookup.getDirectConstructor(ctor.getDeclaringClass(), ctor);
+            return lookup.getDirectConstructorNoSecurityManager(ctor.getDeclaringClass(), ctor);
         }
 
         /**
@@ -1011,6 +1258,10 @@
          * the field.
          * If the field's {@code accessible} flag is not set,
          * access checking is performed immediately on behalf of the lookup class.
+         * <p>
+         * If the field is static, and
+         * if the returned method handle is invoked, the field's class will
+         * be initialized, if it has not already been initialized.
          * @param f the reflected field
          * @return a method handle which can load values from the reflected field
          * @throws IllegalAccessException if access checking fails
@@ -1025,7 +1276,7 @@
                     ? MethodHandleNatives.refKindIsSetter(field.getReferenceKind())
                     : MethodHandleNatives.refKindIsGetter(field.getReferenceKind()));
             Lookup lookup = f.isAccessible() ? IMPL_LOOKUP : this;
-            return lookup.getDirectField(field.getReferenceKind(), f.getDeclaringClass(), field);
+            return lookup.getDirectFieldNoSecurityManager(field.getReferenceKind(), f.getDeclaringClass(), field);
         }
 
         /**
@@ -1037,6 +1288,10 @@
          * the field, and the value to be stored.
          * If the field's {@code accessible} flag is not set,
          * access checking is performed immediately on behalf of the lookup class.
+         * <p>
+         * If the field is static, and
+         * if the returned method handle is invoked, the field's class will
+         * be initialized, if it has not already been initialized.
          * @param f the reflected field
          * @return a method handle which can store values into the reflected field
          * @throws IllegalAccessException if access checking fails
@@ -1047,17 +1302,21 @@
         }
 
         /**
-         * Cracks a direct method handle created by this lookup object or a similar one.
+         * Cracks a <a href="MethodHandleInfo.html#directmh">direct method handle</a>
+         * created by this lookup object or a similar one.
          * Security and access checks are performed to ensure that this lookup object
          * is capable of reproducing the target method handle.
          * This means that the cracking may fail if target is a direct method handle
          * but was created by an unrelated lookup object.
+         * This can happen if the method handle is <a href="MethodHandles.Lookup.html#callsens">caller sensitive</a>
+         * and was created by a lookup object for a different class.
          * @param target a direct method handle to crack into symbolic reference components
          * @return a symbolic reference which can be used to reconstruct this method handle from this lookup object
          * @exception SecurityException if a security manager is present and it
          *                              <a href="MethodHandles.Lookup.html#secmgr">refuses access</a>
          * @throws IllegalArgumentException if the target is not a direct method handle or if access checking fails
          * @exception NullPointerException if the target is {@code null}
+         * @see MethodHandleInfo
          * @since 1.8
          */
         public MethodHandleInfo revealDirect(MethodHandle target) {
@@ -1077,11 +1336,16 @@
                 refKind = REF_invokeInterface;
             // Check SM permissions and member access before cracking.
             try {
-                checkSecurityManager(defc, member);
                 checkAccess(refKind, defc, member);
+                checkSecurityManager(defc, member);
             } catch (IllegalAccessException ex) {
                 throw new IllegalArgumentException(ex);
             }
+            if (allowedModes != TRUSTED && member.isCallerSensitive()) {
+                Class<?> callerClass = target.internalCallerClass();
+                if (!hasPrivateAccess() || callerClass != lookupClass())
+                    throw new IllegalArgumentException("method handle is caller sensitive: "+callerClass);
+            }
             // Produce the handle to the results.
             return new InfoFromMemberName(this, member, refKind);
         }
@@ -1090,24 +1354,43 @@
 
         MemberName resolveOrFail(byte refKind, Class<?> refc, String name, Class<?> type) throws NoSuchFieldException, IllegalAccessException {
             checkSymbolicClass(refc);  // do this before attempting to resolve
-            name.getClass(); type.getClass();  // NPE
+            name.getClass();  // NPE
+            type.getClass();  // NPE
             return IMPL_NAMES.resolveOrFail(refKind, new MemberName(refc, name, type, refKind), lookupClassOrNull(),
                                             NoSuchFieldException.class);
         }
 
         MemberName resolveOrFail(byte refKind, Class<?> refc, String name, MethodType type) throws NoSuchMethodException, IllegalAccessException {
             checkSymbolicClass(refc);  // do this before attempting to resolve
-            name.getClass(); type.getClass();  // NPE
+            name.getClass();  // NPE
+            type.getClass();  // NPE
+            checkMethodName(refKind, name);  // NPE check on name
             return IMPL_NAMES.resolveOrFail(refKind, new MemberName(refc, name, type, refKind), lookupClassOrNull(),
                                             NoSuchMethodException.class);
         }
 
+        MemberName resolveOrFail(byte refKind, MemberName member) throws ReflectiveOperationException {
+            checkSymbolicClass(member.getDeclaringClass());  // do this before attempting to resolve
+            member.getName().getClass();  // NPE
+            member.getType().getClass();  // NPE
+            return IMPL_NAMES.resolveOrFail(refKind, member, lookupClassOrNull(),
+                                            ReflectiveOperationException.class);
+        }
+
         void checkSymbolicClass(Class<?> refc) throws IllegalAccessException {
+            refc.getClass();  // NPE
             Class<?> caller = lookupClassOrNull();
             if (caller != null && !VerifyAccess.isClassAccessible(refc, caller, allowedModes))
                 throw new MemberName(refc).makeAccessException("symbolic reference class is not public", this);
         }
 
+        /** Check name for an illegal leading "&lt;" character. */
+        void checkMethodName(byte refKind, String name) throws NoSuchMethodException {
+            if (name.startsWith("<") && refKind != REF_newInvokeSpecial)
+                throw new NoSuchMethodException("illegal method name: "+name);
+        }
+
+
         /**
          * Find my trustable caller class if m is a caller sensitive method.
          * If this lookup object has private access, then the caller class is the lookupClass.
@@ -1116,8 +1399,8 @@
         Class<?> findBoundCallerClass(MemberName m) throws IllegalAccessException {
             Class<?> callerClass = null;
             if (MethodHandleNatives.isCallerSensitive(m)) {
-                // Only full-power lookup is allowed to resolve caller-sensitive methods
-                if (isFullPowerLookup()) {
+                // Only lookups with private access are allowed to resolve caller-sensitive methods
+                if (hasPrivateAccess()) {
                     callerClass = lookupClass;
                 } else {
                     throw new IllegalAccessException("Attempt to lookup caller-sensitive method using restricted lookup object");
@@ -1126,7 +1409,7 @@
             return callerClass;
         }
 
-        private boolean isFullPowerLookup() {
+        private boolean hasPrivateAccess() {
             return (allowedModes & PRIVATE) != 0;
         }
 
@@ -1141,22 +1424,21 @@
             if (allowedModes == TRUSTED)  return;
 
             // Step 1:
-            if (!isFullPowerLookup() ||
+            boolean fullPowerLookup = hasPrivateAccess();
+            if (!fullPowerLookup ||
                 !VerifyAccess.classLoaderIsAncestor(lookupClass, refc)) {
                 ReflectUtil.checkPackageAccess(refc);
             }
 
             // Step 2:
             if (m.isPublic()) return;
-            Class<?> defc = m.getDeclaringClass();
-            {
-                if (!isFullPowerLookup()) {
-                    smgr.checkPermission(SecurityConstants.CHECK_MEMBER_ACCESS_PERMISSION);
-                }
+            if (!fullPowerLookup) {
+                smgr.checkPermission(SecurityConstants.CHECK_MEMBER_ACCESS_PERMISSION);
             }
 
             // Step 3:
-            if (defc != refc) {
+            Class<?> defc = m.getDeclaringClass();
+            if (!fullPowerLookup && defc != refc) {
                 ReflectUtil.checkPackageAccess(defc);
             }
         }
@@ -1185,6 +1467,7 @@
             throw m.makeAccessException(message, this);
         }
 
+        /** Check public/protected/private bits on the symbolic reference class and its member. */
         void checkAccess(byte refKind, Class<?> refc, MemberName m) throws IllegalAccessException {
             assert(m.referenceKindIsConsistentWith(refKind) &&
                    MethodHandleNatives.refKindIsValid(refKind) &&
@@ -1192,6 +1475,26 @@
             int allowedModes = this.allowedModes;
             if (allowedModes == TRUSTED)  return;
             int mods = m.getModifiers();
+            if (Modifier.isProtected(mods) &&
+                    refKind == REF_invokeVirtual &&
+                    m.getDeclaringClass() == Object.class &&
+                    m.getName().equals("clone") &&
+                    refc.isArray()) {
+                // The JVM does this hack also.
+                // (See ClassVerifier::verify_invoke_instructions
+                // and LinkResolver::check_method_accessability.)
+                // Because the JVM does not allow separate methods on array types,
+                // there is no separate method for int[].clone.
+                // All arrays simply inherit Object.clone.
+                // But for access checking logic, we make Object.clone
+                // (normally protected) appear to be public.
+                // Later on, when the DirectMethodHandle is created,
+                // its leading argument will be restricted to the
+                // requested array type.
+                // N.B. The return type is not adjusted, because
+                // that is *not* the bytecode behavior.
+                mods ^= Modifier.PROTECTED | Modifier.PUBLIC;
+            }
             if (Modifier.isFinal(mods) &&
                     MethodHandleNatives.refKindIsSetter(refKind))
                 throw m.makeAccessException("unexpected set of a final field", this);
@@ -1239,7 +1542,7 @@
         private void checkSpecialCaller(Class<?> specialCaller) throws IllegalAccessException {
             int allowedModes = this.allowedModes;
             if (allowedModes == TRUSTED)  return;
-            if ((allowedModes & PRIVATE) == 0
+            if (!hasPrivateAccess()
                 || (specialCaller != lookupClass()
                     && !(ALLOW_NESTMATE_ACCESS &&
                          VerifyAccess.isSamePackageMember(specialCaller, lookupClass()))))
@@ -1271,18 +1574,32 @@
             return mh.viewAsType(narrowType);
         }
 
+        /** Check access and get the requested method. */
         private MethodHandle getDirectMethod(byte refKind, Class<?> refc, MemberName method, Class<?> callerClass) throws IllegalAccessException {
-            return getDirectMethodCommon(refKind, refc, method,
-                    (refKind == REF_invokeSpecial ||
-                        (MethodHandleNatives.refKindHasReceiver(refKind) &&
-                            restrictProtectedReceiver(method))), callerClass);
+            final boolean doRestrict    = true;
+            final boolean checkSecurity = true;
+            return getDirectMethodCommon(refKind, refc, method, checkSecurity, doRestrict, callerClass);
         }
+        /** Check access and get the requested method, eliding receiver narrowing rules. */
         private MethodHandle getDirectMethodNoRestrict(byte refKind, Class<?> refc, MemberName method, Class<?> callerClass) throws IllegalAccessException {
-            return getDirectMethodCommon(refKind, refc, method, false, callerClass);
+            final boolean doRestrict    = false;
+            final boolean checkSecurity = true;
+            return getDirectMethodCommon(refKind, refc, method, checkSecurity, doRestrict, callerClass);
         }
+        /** Check access and get the requested method, eliding security manager checks. */
+        private MethodHandle getDirectMethodNoSecurityManager(byte refKind, Class<?> refc, MemberName method, Class<?> callerClass) throws IllegalAccessException {
+            final boolean doRestrict    = true;
+            final boolean checkSecurity = false;  // not needed for reflection or for linking CONSTANT_MH constants
+            return getDirectMethodCommon(refKind, refc, method, checkSecurity, doRestrict, callerClass);
+        }
+        /** Common code for all methods; do not call directly except from immediately above. */
         private MethodHandle getDirectMethodCommon(byte refKind, Class<?> refc, MemberName method,
+                                                   boolean checkSecurity,
                                                    boolean doRestrict, Class<?> callerClass) throws IllegalAccessException {
             checkMethod(refKind, refc, method);
+            // Optionally check with the security manager; this isn't needed for unreflect* calls.
+            if (checkSecurity)
+                checkSecurityManager(refc, method);
             assert(!method.isMethodHandleInvoke());
 
             Class<?> refcAsSuper;
@@ -1312,7 +1629,11 @@
             MethodHandle mh = DirectMethodHandle.make(refKind, refc, method);
             mh = maybeBindCaller(method, mh, callerClass);
             mh = mh.setVarargs(method);
-            if (doRestrict)
+            // Optionally narrow the receiver argument to refc using restrictReceiver.
+            if (doRestrict &&
+                   (refKind == REF_invokeSpecial ||
+                       (MethodHandleNatives.refKindHasReceiver(refKind) &&
+                           restrictProtectedReceiver(method))))
                 mh = restrictReceiver(method, mh, lookupClass());
             return mh;
         }
@@ -1322,14 +1643,29 @@
             if (allowedModes == TRUSTED || !MethodHandleNatives.isCallerSensitive(method))
                 return mh;
             Class<?> hostClass = lookupClass;
-            if ((allowedModes & PRIVATE) == 0)  // caller must use full-power lookup
+            if (!hasPrivateAccess())  // caller must have private access
                 hostClass = callerClass;  // callerClass came from a security manager style stack walk
             MethodHandle cbmh = MethodHandleImpl.bindCaller(mh, hostClass);
             // Note: caller will apply varargs after this step happens.
             return cbmh;
         }
+        /** Check access and get the requested field. */
         private MethodHandle getDirectField(byte refKind, Class<?> refc, MemberName field) throws IllegalAccessException {
+            final boolean checkSecurity = true;
+            return getDirectFieldCommon(refKind, refc, field, checkSecurity);
+        }
+        /** Check access and get the requested field, eliding security manager checks. */
+        private MethodHandle getDirectFieldNoSecurityManager(byte refKind, Class<?> refc, MemberName field) throws IllegalAccessException {
+            final boolean checkSecurity = false;  // not needed for reflection or for linking CONSTANT_MH constants
+            return getDirectFieldCommon(refKind, refc, field, checkSecurity);
+        }
+        /** Common code for all fields; do not call directly except from immediately above. */
+        private MethodHandle getDirectFieldCommon(byte refKind, Class<?> refc, MemberName field,
+                                                  boolean checkSecurity) throws IllegalAccessException {
             checkField(refKind, refc, field);
+            // Optionally check with the security manager; this isn't needed for unreflect* calls.
+            if (checkSecurity)
+                checkSecurityManager(refc, field);
             MethodHandle mh = DirectMethodHandle.make(refc, field);
             boolean doRestrict = (MethodHandleNatives.refKindHasReceiver(refKind) &&
                                     restrictProtectedReceiver(field));
@@ -1337,9 +1673,24 @@
                 mh = restrictReceiver(field, mh, lookupClass());
             return mh;
         }
+        /** Check access and get the requested constructor. */
         private MethodHandle getDirectConstructor(Class<?> refc, MemberName ctor) throws IllegalAccessException {
+            final boolean checkSecurity = true;
+            return getDirectConstructorCommon(refc, ctor, checkSecurity);
+        }
+        /** Check access and get the requested constructor, eliding security manager checks. */
+        private MethodHandle getDirectConstructorNoSecurityManager(Class<?> refc, MemberName ctor) throws IllegalAccessException {
+            final boolean checkSecurity = false;  // not needed for reflection or for linking CONSTANT_MH constants
+            return getDirectConstructorCommon(refc, ctor, checkSecurity);
+        }
+        /** Common code for all constructors; do not call directly except from immediately above. */
+        private MethodHandle getDirectConstructorCommon(Class<?> refc, MemberName ctor,
+                                                  boolean checkSecurity) throws IllegalAccessException {
             assert(ctor.isConstructor());
             checkAccess(REF_newInvokeSpecial, refc, ctor);
+            // Optionally check with the security manager; this isn't needed for unreflect* calls.
+            if (checkSecurity)
+                checkSecurityManager(refc, ctor);
             assert(!MethodHandleNatives.isCallerSensitive(ctor));  // maybeBindCaller not relevant here
             return DirectMethodHandle.make(ctor).setVarargs(ctor);
         }
@@ -1348,29 +1699,75 @@
          */
         /*non-public*/
         MethodHandle linkMethodHandleConstant(byte refKind, Class<?> defc, String name, Object type) throws ReflectiveOperationException {
-            MemberName resolved = null;
-            if (type instanceof MemberName) {
-                resolved = (MemberName) type;
-                if (!resolved.isResolved())  throw new InternalError("unresolved MemberName");
-                assert(name == null || name.equals(resolved.getName()));
+            if (!(type instanceof Class || type instanceof MethodType))
+                throw new InternalError("unresolved MemberName");
+            MemberName member = new MemberName(refKind, defc, name, type);
+            MethodHandle mh = LOOKASIDE_TABLE.get(member);
+            if (mh != null) {
+                checkSymbolicClass(defc);
+                return mh;
             }
+            MemberName resolved = resolveOrFail(refKind, member);
+            mh = getDirectMethodForConstant(refKind, defc, resolved);
+            if (mh instanceof DirectMethodHandle
+                    && canBeCached(refKind, defc, resolved)) {
+                MemberName key = mh.internalMemberName();
+                if (key != null) {
+                    key = key.asNormalOriginal();
+                }
+                if (member.equals(key)) {  // better safe than sorry
+                    LOOKASIDE_TABLE.put(key, (DirectMethodHandle) mh);
+                }
+            }
+            return mh;
+        }
+        private
+        boolean canBeCached(byte refKind, Class<?> defc, MemberName member) {
+            if (refKind == REF_invokeSpecial) {
+                return false;
+            }
+            if (!Modifier.isPublic(defc.getModifiers()) ||
+                    !Modifier.isPublic(member.getDeclaringClass().getModifiers()) ||
+                    !member.isPublic() ||
+                    member.isCallerSensitive()) {
+                return false;
+            }
+            ClassLoader loader = defc.getClassLoader();
+            if (!sun.misc.VM.isSystemDomainLoader(loader)) {
+                ClassLoader sysl = ClassLoader.getSystemClassLoader();
+                boolean found = false;
+                while (sysl != null) {
+                    if (loader == sysl) { found = true; break; }
+                    sysl = sysl.getParent();
+                }
+                if (!found) {
+                    return false;
+                }
+            }
+            try {
+                MemberName resolved2 = publicLookup().resolveOrFail(refKind,
+                    new MemberName(refKind, defc, member.getName(), member.getType()));
+                checkSecurityManager(defc, resolved2);
+            } catch (ReflectiveOperationException | SecurityException ex) {
+                return false;
+            }
+            return true;
+        }
+        private
+        MethodHandle getDirectMethodForConstant(byte refKind, Class<?> defc, MemberName member)
+                throws ReflectiveOperationException {
             if (MethodHandleNatives.refKindIsField(refKind)) {
-                MemberName field = (resolved != null) ? resolved
-                        : resolveOrFail(refKind, defc, name, (Class<?>) type);
-                return getDirectField(refKind, defc, field);
+                return getDirectFieldNoSecurityManager(refKind, defc, member);
             } else if (MethodHandleNatives.refKindIsMethod(refKind)) {
-                MemberName method = (resolved != null) ? resolved
-                        : resolveOrFail(refKind, defc, name, (MethodType) type);
-                return getDirectMethod(refKind, defc, method, lookupClass);
+                return getDirectMethodNoSecurityManager(refKind, defc, member, lookupClass);
             } else if (refKind == REF_newInvokeSpecial) {
-                assert(name == null || name.equals("<init>"));
-                MemberName ctor = (resolved != null) ? resolved
-                        : resolveOrFail(REF_newInvokeSpecial, defc, name, (MethodType) type);
-                return getDirectConstructor(defc, ctor);
+                return getDirectConstructorNoSecurityManager(defc, member);
             }
             // oops
-            throw new ReflectiveOperationException("bad MethodHandle constant #"+refKind+" "+name+" : "+type);
+            throw newIllegalArgumentException("bad MethodHandle constant #"+member);
         }
+
+        static ConcurrentHashMap<MemberName, DirectMethodHandle> LOOKASIDE_TABLE = new ConcurrentHashMap<>();
     }
 
     /**
@@ -1430,22 +1827,26 @@
      * <p>
      * Before invoking its target, the invoker will spread the final array, apply
      * reference casts as necessary, and unbox and widen primitive arguments.
+     * If, when the invoker is called, the supplied array argument does
+     * not have the correct number of elements, the invoker will throw
+     * an {@link IllegalArgumentException} instead of invoking the target.
      * <p>
      * This method is equivalent to the following code (though it may be more efficient):
-     * <p><blockquote><pre>
+     * <blockquote><pre>{@code
 MethodHandle invoker = MethodHandles.invoker(type);
 int spreadArgCount = type.parameterCount() - leadingArgCount;
 invoker = invoker.asSpreader(Object[].class, spreadArgCount);
 return invoker;
-     * </pre></blockquote>
-     * <p>
+     * }</pre></blockquote>
      * This method throws no reflective or security exceptions.
      * @param type the desired target type
      * @param leadingArgCount number of fixed arguments, to be passed unchanged to the target
      * @return a method handle suitable for invoking any method handle of the given type
      * @throws NullPointerException if {@code type} is null
      * @throws IllegalArgumentException if {@code leadingArgCount} is not in
-     *                  the range from 0 to {@code type.parameterCount()} inclusive
+     *                  the range from 0 to {@code type.parameterCount()} inclusive,
+     *                  or if the resulting method handle's type would have
+     *          <a href="MethodHandle.html#maxarity">too many parameters</a>
      */
     static public
     MethodHandle spreadInvoker(MethodType type, int leadingArgCount) {
@@ -1462,9 +1863,7 @@
      * an additional leading argument of type {@code MethodHandle}.
      * <p>
      * This method is equivalent to the following code (though it may be more efficient):
-     * <p><blockquote><pre>
-publicLookup().findVirtual(MethodHandle.class, "invokeExact", type)
-     * </pre></blockquote>
+     * {@code publicLookup().findVirtual(MethodHandle.class, "invokeExact", type)}
      *
      * <p style="font-size:smaller;">
      * <em>Discussion:</em>
@@ -1479,7 +1878,7 @@
      * If spreading, collecting, or other argument transformations are required,
      * they can be applied once to the invoker {@code X} and reused on many {@code M}
      * method handle values, as long as they are compatible with the type of {@code X}.
-     * <p>
+     * <p style="font-size:smaller;">
      * <em>(Note:  The invoker method is not available via the Core Reflection API.
      * An attempt to call {@linkplain java.lang.reflect.Method#invoke java.lang.reflect.Method.invoke}
      * on the declared {@code invokeExact} or {@code invoke} method will raise an
@@ -1488,6 +1887,8 @@
      * This method throws no reflective or security exceptions.
      * @param type the desired target type
      * @return a method handle suitable for invoking any method handle of the given type
+     * @throws IllegalArgumentException if the resulting method handle's type would have
+     *          <a href="MethodHandle.html#maxarity">too many parameters</a>
      */
     static public
     MethodHandle exactInvoker(MethodType type) {
@@ -1508,19 +1909,25 @@
      * If the target is a {@linkplain MethodHandle#asVarargsCollector variable arity method handle},
      * the required arity conversion will be made, again as if by {@link MethodHandle#asType asType}.
      * <p>
-     * A {@linkplain MethodType#genericMethodType general method type},
+     * This method is equivalent to the following code (though it may be more efficient):
+     * {@code publicLookup().findVirtual(MethodHandle.class, "invoke", type)}
+     * <p style="font-size:smaller;">
+     * <em>Discussion:</em>
+     * A {@linkplain MethodType#genericMethodType general method type} is one which
      * mentions only {@code Object} arguments and return values.
      * An invoker for such a type is capable of calling any method handle
      * of the same arity as the general type.
-     * <p>
-     * This method is equivalent to the following code (though it may be more efficient):
-     * <p><blockquote><pre>
-publicLookup().findVirtual(MethodHandle.class, "invoke", type)
-     * </pre></blockquote>
+     * <p style="font-size:smaller;">
+     * <em>(Note:  The invoker method is not available via the Core Reflection API.
+     * An attempt to call {@linkplain java.lang.reflect.Method#invoke java.lang.reflect.Method.invoke}
+     * on the declared {@code invokeExact} or {@code invoke} method will raise an
+     * {@link java.lang.UnsupportedOperationException UnsupportedOperationException}.)</em>
      * <p>
      * This method throws no reflective or security exceptions.
      * @param type the desired target type
      * @return a method handle suitable for invoking any method handle convertible to the given type
+     * @throws IllegalArgumentException if the resulting method handle's type would have
+     *          <a href="MethodHandle.html#maxarity">too many parameters</a>
      */
     static public
     MethodHandle invoker(MethodType type) {
@@ -1801,7 +2208,7 @@
      * they will come after.
      * <p>
      * <b>Example:</b>
-     * <p><blockquote><pre>
+     * <p><blockquote><pre>{@code
 import static java.lang.invoke.MethodHandles.*;
 import static java.lang.invoke.MethodType.*;
 ...
@@ -1812,11 +2219,11 @@
 MethodHandle d0 = dropArguments(cat, 0, bigType.parameterList().subList(0,2));
 assertEquals(bigType, d0.type());
 assertEquals("yz", (String) d0.invokeExact(123, "x", "y", "z"));
-     * </pre></blockquote>
+     * }</pre></blockquote>
      * <p>
      * This method is also equivalent to the following code:
      * <p><blockquote><pre>
-     * {@link #dropArguments(MethodHandle,int,Class...) dropArguments}(target, pos, valueTypes.toArray(new Class[0]))
+     * {@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
      * @param valueTypes the type(s) of the argument(s) to drop
@@ -1859,7 +2266,7 @@
      * they will come after.
      * <p>
      * <b>Example:</b>
-     * <p><blockquote><pre>
+     * <p><blockquote><pre>{@code
 import static java.lang.invoke.MethodHandles.*;
 import static java.lang.invoke.MethodType.*;
 ...
@@ -1874,11 +2281,11 @@
 assertEquals("xy", (String) d2.invokeExact("x", "y", "z"));
 MethodHandle d12 = dropArguments(cat, 1, int.class, boolean.class);
 assertEquals("xz", (String) d12.invokeExact("x", 12, true, "z"));
-     * </pre></blockquote>
+     * }</pre></blockquote>
      * <p>
      * This method is also equivalent to the following code:
      * <p><blockquote><pre>
-     * {@link #dropArguments(MethodHandle,int,List) dropArguments}(target, pos, Arrays.asList(valueTypes))
+     * {@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
      * @param valueTypes the type(s) of the argument(s) to drop
@@ -1889,7 +2296,8 @@
      *                              or if the {@code valueTypes} array or any of its elements is null
      * @throws IllegalArgumentException if any element of {@code valueTypes} is {@code void.class},
      *                  or if {@code pos} is negative or greater than the arity of the target,
-     *                  or if the new method handle's type would have too many parameters
+     *                  or if the new method handle's type would have
+     *                  <a href="MethodHandle.html#maxarity">too many parameters</a>
      */
     public static
     MethodHandle dropArguments(MethodHandle target, int pos, Class<?>... valueTypes) {
@@ -1923,8 +2331,8 @@
      * It is an error if there are elements of {@code filters}
      * (null or not)
      * which do not correspond to argument positions in the target.
-     * <b>Example:</b>
-     * <p><blockquote><pre>
+     * <p><b>Example:</b>
+     * <p><blockquote><pre>{@code
 import static java.lang.invoke.MethodHandles.*;
 import static java.lang.invoke.MethodType.*;
 ...
@@ -1939,15 +2347,15 @@
 assertEquals("xY", (String) f1.invokeExact("x", "y")); // xY
 MethodHandle f2 = filterArguments(cat, 0, upcase, upcase);
 assertEquals("XY", (String) f2.invokeExact("x", "y")); // XY
-     * </pre></blockquote>
+     * }</pre></blockquote>
      * <p> Here is pseudocode for the resulting adapter:
-     * <blockquote><pre>
+     * <blockquote><pre>{@code
      * V target(P... p, A[i]... a[i], B... b);
      * A[i] filter[i](V[i]);
      * T adapter(P... p, V[i]... v[i], B... b) {
      *   return target(p..., f[i](v[i])..., b...);
      * }
-     * </pre></blockquote>
+     * }</pre></blockquote>
      *
      * @param target the method handle to invoke after arguments are filtered
      * @param pos the position of the first argument to filter
@@ -1957,7 +2365,9 @@
      *                              or if the {@code filters} array is null
      * @throws IllegalArgumentException if a non-null element of {@code filters}
      *          does not match a corresponding argument type of target as described above,
-     *          or if the {@code pos+filters.length} is greater than {@code target.type().parameterCount()}
+     *          or if the {@code pos+filters.length} is greater than {@code target.type().parameterCount()},
+     *          or if the resulting method handle's type would have
+     *          <a href="MethodHandle.html#maxarity">too many parameters</a>
      */
     public static
     MethodHandle filterArguments(MethodHandle target, int pos, MethodHandle... filters) {
@@ -1989,15 +2399,120 @@
         return MethodHandleImpl.makeCollectArguments(target, filter, pos, false);
     }
 
-    // FIXME: Make this public in M1.
-    /*non-public*/ static
-    MethodHandle collectArguments(MethodHandle target, int pos, MethodHandle collector) {
+    /**
+     * Adapts a target method handle by pre-processing
+     * a sub-sequence of its arguments with a filter (another method handle).
+     * The pre-processed arguments are replaced by the result (if any) of the
+     * filter function.
+     * The target is then called on the modified (usually shortened) argument list.
+     * <p>
+     * If the filter returns a value, the target must accept that value as
+     * its argument in position {@code pos}, preceded and/or followed by
+     * any arguments not passed to the filter.
+     * If the filter returns void, the target must accept all arguments
+     * not passed to the filter.
+     * No arguments are reordered, and a result returned from the filter
+     * replaces (in order) the whole subsequence of arguments originally
+     * passed to the adapter.
+     * <p>
+     * The argument types (if any) of the filter
+     * replace zero or one argument types of the target, at position {@code pos},
+     * in the resulting adapted method handle.
+     * The return type of the filter (if any) must be identical to the
+     * argument type of the target at position {@code pos}, and that target argument
+     * is supplied by the return value of the filter.
+     * <p>
+     * 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
+import static java.lang.invoke.MethodHandles.*;
+import static java.lang.invoke.MethodType.*;
+...
+MethodHandle deepToString = publicLookup()
+  .findStatic(Arrays.class, "deepToString", methodType(String.class, Object[].class));
+
+MethodHandle ts1 = deepToString.asCollector(String[].class, 1);
+assertEquals("[strange]", (String) ts1.invokeExact("strange"));
+
+MethodHandle ts2 = deepToString.asCollector(String[].class, 2);
+assertEquals("[up, down]", (String) ts2.invokeExact("up", "down"));
+
+MethodHandle ts3 = deepToString.asCollector(String[].class, 3);
+MethodHandle ts3_ts2 = collectArguments(ts3, 1, ts2);
+assertEquals("[top, [up, down], strange]",
+             (String) ts3_ts2.invokeExact("top", "up", "down", "strange"));
+
+MethodHandle ts3_ts2_ts1 = collectArguments(ts3_ts2, 3, ts1);
+assertEquals("[top, [up, down], [strange]]",
+             (String) ts3_ts2_ts1.invokeExact("top", "up", "down", "strange"));
+
+MethodHandle ts3_ts2_ts3 = collectArguments(ts3_ts2, 1, ts3);
+assertEquals("[top, [[up, down, strange], charm], bottom]",
+             (String) ts3_ts2_ts3.invokeExact("top", "up", "down", "strange", "charm", "bottom"));
+     * }</pre></blockquote>
+     * <p> Here is pseudocode for the resulting adapter:
+     * <blockquote><pre>{@code
+     * T target(A...,V,C...);
+     * V filter(B...);
+     * T adapter(A... a,B... b,C... c) {
+     *   V v = filter(b...);
+     *   return target(a...,v,c...);
+     * }
+     * // and if the filter has no arguments:
+     * T target2(A...,V,C...);
+     * V filter2();
+     * T adapter2(A... a,C... c) {
+     *   V v = filter2();
+     *   return target2(a...,v,c...);
+     * }
+     * // and if the filter has a void return:
+     * T target3(A...,C...);
+     * void filter3(B...);
+     * void adapter3(A... a,B... b,C... c) {
+     *   filter3(b...);
+     *   return target3(a...,c...);
+     * }
+     * }</pre></blockquote>
+     * <p>
+     * A collection adapter {@code collectArguments(mh, 0, coll)} is equivalent to
+     * one which first "folds" the affected arguments, and then drops them, in separate
+     * steps as follows:
+     * <blockquote><pre>{@code
+     * mh = MethodHandles.dropArguments(mh, 1, coll.type().parameterList()); //step 2
+     * mh = MethodHandles.foldArguments(mh, coll); //step 1
+     * }</pre></blockquote>
+     * If the target method handle consumes no arguments besides than the result
+     * (if any) of the filter {@code coll}, then {@code collectArguments(mh, 0, coll)}
+     * is equivalent to {@code filterReturnValue(coll, mh)}.
+     * If the filter method handle {@code coll} consumes one argument and produces
+     * a non-void result, then {@code collectArguments(mh, N, coll)}
+     * is equivalent to {@code filterArguments(mh, N, coll)}.
+     * Other equivalences are possible but would require argument permutation.
+     *
+     * @param target the method handle to invoke after filtering the subsequence of arguments
+     * @param pos the position of the first adapter argument to pass to the filter,
+     *            and/or the target argument which receives the result of the filter
+     * @param filter method handle to call on the subsequence of arguments
+     * @return method handle which incorporates the specified argument subsequence filtering logic
+     * @throws NullPointerException if either argument is null
+     * @throws IllegalArgumentException if the return type of {@code filter}
+     *          is non-void and is not the same as the {@code pos} argument of the target,
+     *          or if {@code pos} is not between 0 and the target's arity, inclusive,
+     *          or if the resulting method handle's type would have
+     *          <a href="MethodHandle.html#maxarity">too many parameters</a>
+     * @see MethodHandles#foldArguments
+     * @see MethodHandles#filterArguments
+     * @see MethodHandles#filterReturnValue
+     */
+    public static
+    MethodHandle collectArguments(MethodHandle target, int pos, MethodHandle filter) {
         MethodType targetType = target.type();
-        MethodType filterType = collector.type();
+        MethodType filterType = filter.type();
         if (filterType.returnType() != void.class &&
             filterType.returnType() != targetType.parameterType(pos))
             throw newIllegalArgumentException("target and filter types do not match", targetType, filterType);
-        return MethodHandleImpl.makeCollectArguments(target, collector, pos, false);
+        return MethodHandleImpl.makeCollectArguments(target, filter, pos, false);
     }
 
     /**
@@ -2014,8 +2529,8 @@
      * in the resulting adapted method handle.
      * The argument type of the filter (if any) must be identical to the
      * return type of the target.
-     * <b>Example:</b>
-     * <p><blockquote><pre>
+     * <p><b>Example:</b>
+     * <p><blockquote><pre>{@code
 import static java.lang.invoke.MethodHandles.*;
 import static java.lang.invoke.MethodType.*;
 ...
@@ -2026,9 +2541,9 @@
 System.out.println((String) cat.invokeExact("x", "y")); // xy
 MethodHandle f0 = filterReturnValue(cat, length);
 System.out.println((int) f0.invokeExact("x", "y")); // 2
-     * </pre></blockquote>
+     * }</pre></blockquote>
      * <p> Here is pseudocode for the resulting adapter:
-     * <blockquote><pre>
+     * <blockquote><pre>{@code
      * V target(A...);
      * T filter(V);
      * T adapter(A... a) {
@@ -2049,7 +2564,7 @@
      *   V v = target3(a...);
      *   filter3(v);
      * }
-     * </pre></blockquote>
+     * }</pre></blockquote>
      * @param target the method handle to invoke before filtering the return value
      * @param filter method handle to call on the return value
      * @return method handle which incorporates the specified return value filtering logic
@@ -2105,8 +2620,8 @@
      * consider using {@link MethodHandle#asCollector asCollector} instead, since those
      * arguments will not need to be live on the stack on entry to the
      * target.)
-     * <b>Example:</b>
-     * <p><blockquote><pre>
+     * <p><b>Example:</b>
+     * <p><blockquote><pre>{@code
 import static java.lang.invoke.MethodHandles.*;
 import static java.lang.invoke.MethodType.*;
 ...
@@ -2119,9 +2634,9 @@
 MethodHandle catTrace = foldArguments(cat, trace);
 // also prints "boo":
 assertEquals("boojum", (String) catTrace.invokeExact("boo", "jum"));
-     * </pre></blockquote>
+     * }</pre></blockquote>
      * <p> Here is pseudocode for the resulting adapter:
-     * <blockquote><pre>
+     * <blockquote><pre>{@code
      * // there are N arguments in A...
      * T target(V, A[N]..., B...);
      * V combiner(A...);
@@ -2136,7 +2651,7 @@
      *   combiner2(a...);
      *   return target2(a..., b...);
      * }
-     * </pre></blockquote>
+     * }</pre></blockquote>
      * @param target the method handle to invoke after arguments are combined
      * @param combiner method handle to call initially on the incoming arguments
      * @return method handle which incorporates the specified argument folding logic
@@ -2179,7 +2694,7 @@
      * of the test must be boolean, and the test is allowed
      * to have fewer arguments than the other two method handles.
      * <p> Here is pseudocode for the resulting adapter:
-     * <blockquote><pre>
+     * <blockquote><pre>{@code
      * boolean test(A...);
      * T target(A...,B...);
      * T fallback(A...,B...);
@@ -2189,7 +2704,7 @@
      *   else
      *     return fallback(a..., b...);
      * }
-     * </pre></blockquote>
+     * }</pre></blockquote>
      * Note that the test arguments ({@code a...} in the pseudocode) cannot
      * be modified by execution of the test, and so are passed unchanged
      * from the caller to the target or fallback as appropriate.
@@ -2241,7 +2756,7 @@
      * (similarly to the predicate in {@link #guardWithTest guardWithTest}).
      * Also, the handler must have an extra leading parameter of {@code exType} or a supertype.
      * <p> Here is pseudocode for the resulting adapter:
-     * <blockquote><pre>
+     * <blockquote><pre>{@code
      * T target(A..., B...);
      * T handler(ExType, A...);
      * T adapter(A... a, B... b) {
@@ -2251,7 +2766,7 @@
      *     return handler(ex, a...);
      *   }
      * }
-     * </pre></blockquote>
+     * }</pre></blockquote>
      * Note that the saved arguments ({@code a...} in the pseudocode) cannot
      * be modified by execution of the target, and so are passed unchanged
      * from the caller to the handler, if the handler is invoked.
diff --git a/jdk/src/share/classes/java/lang/invoke/MethodType.java b/jdk/src/share/classes/java/lang/invoke/MethodType.java
index f55479f..5a73037 100644
--- a/jdk/src/share/classes/java/lang/invoke/MethodType.java
+++ b/jdk/src/share/classes/java/lang/invoke/MethodType.java
@@ -77,7 +77,8 @@
  * A method type may be loaded by an {@code ldc} instruction which refers
  * to a suitable {@code CONSTANT_MethodType} constant pool entry.
  * The entry refers to a {@code CONSTANT_Utf8} spelling for the descriptor string.
- * For more details, see the <a href="package-summary.html#mtcon">package summary</a>.
+ * (For full details on method type constants,
+ * see sections 4.4.8 and 5.4.3.5 of the Java Virtual Machine Specification.)
  * <p>
  * When the JVM materializes a {@code MethodType} from a descriptor string,
  * all classes named in the descriptor must be accessible, and will be loaded.
@@ -94,9 +95,9 @@
     private final Class<?>[] ptypes;
 
     // The remaining fields are caches of various sorts:
-    private MethodTypeForm form; // erased form, plus cached data about primitives
-    private MethodType wrapAlt;  // alternative wrapped/unwrapped version
-    private Invokers invokers;   // cache of handy higher-order adapters
+    private @Stable MethodTypeForm form; // erased form, plus cached data about primitives
+    private @Stable MethodType wrapAlt;  // alternative wrapped/unwrapped version
+    private @Stable Invokers invokers;   // cache of handy higher-order adapters
 
     /**
      * Check the given parameters for validity and store them into the final fields.
@@ -940,10 +941,10 @@
      * Instead, the return type and parameter type arrays are written directly
      * from the {@code writeObject} method, using two calls to {@code s.writeObject}
      * as follows:
-     * <blockquote><pre>
+     * <blockquote><pre>{@code
 s.writeObject(this.returnType());
 s.writeObject(this.parameterArray());
-     * </pre></blockquote>
+     * }</pre></blockquote>
      * <p>
      * The deserialized field values are checked as if they were
      * provided to the factory method {@link #methodType(Class,Class[]) methodType}.
diff --git a/jdk/src/share/classes/java/lang/invoke/MethodTypeForm.java b/jdk/src/share/classes/java/lang/invoke/MethodTypeForm.java
index 1106e97..09a07b1 100644
--- a/jdk/src/share/classes/java/lang/invoke/MethodTypeForm.java
+++ b/jdk/src/share/classes/java/lang/invoke/MethodTypeForm.java
@@ -28,6 +28,7 @@
 import sun.invoke.util.Wrapper;
 import static java.lang.invoke.MethodHandleStatics.*;
 import static java.lang.invoke.MethodHandleNatives.Constants.*;
+ import static java.lang.invoke.MethodHandles.Lookup.IMPL_LOOKUP;
 
 /**
  * Shared information for a group of method types, which differ
@@ -51,12 +52,13 @@
     final MethodType basicType;         // the canonical erasure, with primitives simplified
 
     // Cached adapter information:
-    /*lazy*/ MethodHandle genericInvoker; // JVM hook for inexact invoke
-    /*lazy*/ MethodHandle basicInvoker;   // cached instance of MH.invokeBasic
-    /*lazy*/ MethodHandle namedFunctionInvoker; // cached helper for LF.NamedFunction
+    @Stable String typeString;           // argument type signature characters
+    @Stable MethodHandle genericInvoker; // JVM hook for inexact invoke
+    @Stable MethodHandle basicInvoker;   // cached instance of MH.invokeBasic
+    @Stable MethodHandle namedFunctionInvoker; // cached helper for LF.NamedFunction
 
     // Cached lambda form information, for basic types only:
-    final LambdaForm[] lambdaForms;
+    final @Stable LambdaForm[] lambdaForms;
     // Indexes into lambdaForms:
     static final int
             LF_INVVIRTUAL     =  0,  // DMH invokeVirtual
@@ -73,7 +75,8 @@
             LF_GEN_LINKER     = 11,
             LF_GEN_INVOKER    = 12,
             LF_CS_LINKER      = 13,  // linkToCallSite_CS
-            LF_LIMIT          = 14;
+            LF_MH_LINKER      = 14,  // linkToCallSite_MH
+            LF_LIMIT          = 15;
 
     public MethodType erasedType() {
         return erasedType;
@@ -96,11 +99,24 @@
         assert(erasedType == basicType) : "erasedType: " + erasedType + " != basicType: " + basicType;  // primitives must be flattened also
         MethodHandle invoker = basicInvoker;
         if (invoker != null)  return invoker;
-        invoker = basicType.invokers().makeBasicInvoker();
+        invoker = DirectMethodHandle.make(invokeBasicMethod(basicType));
         basicInvoker = invoker;
         return invoker;
     }
 
+    // This next one is called from LambdaForm.NamedFunction.<init>.
+    /*non-public*/ static MemberName invokeBasicMethod(MethodType basicType) {
+        assert(basicType == basicType.basicType());
+        try {
+            // Do approximately the same as this public API call:
+            //   Lookup.findVirtual(MethodHandle.class, name, type);
+            // But bypass access and corner case checks, since we know exactly what we need.
+            return IMPL_LOOKUP.resolveOrFail(REF_invokeVirtual, MethodHandle.class, "invokeBasic", basicType);
+         } catch (ReflectiveOperationException ex) {
+            throw newInternalError("JVM cannot find invoker for "+basicType, ex);
+        }
+    }
+
     /**
      * Build an MTF for a given type, which must have all references erased to Object.
      * This MTF will stand for that type and all un-erased variations.
diff --git a/jdk/src/share/classes/java/lang/invoke/MutableCallSite.java b/jdk/src/share/classes/java/lang/invoke/MutableCallSite.java
index 37bd464..746c8d6 100644
--- a/jdk/src/share/classes/java/lang/invoke/MutableCallSite.java
+++ b/jdk/src/share/classes/java/lang/invoke/MutableCallSite.java
@@ -38,7 +38,7 @@
  * Here is an example of a mutable call site which introduces a
  * state variable into a method handle chain.
  * <!-- JavaDocExamplesTest.testMutableCallSite -->
- * <blockquote><pre>
+ * <blockquote><pre>{@code
 MutableCallSite name = new MutableCallSite(MethodType.methodType(String.class));
 MethodHandle MH_name = name.dynamicInvoker();
 MethodType MT_str1 = MethodType.methodType(String.class);
@@ -50,10 +50,10 @@
 name.setTarget(MethodHandles.constant(String.class, "Fred"));
 assertEquals("FRED", (String) worker1.invokeExact());
 // (mutation can be continued indefinitely)
- * </pre></blockquote>
+ * }</pre></blockquote>
  * <p>
  * The same call site may be used in several places at once.
- * <blockquote><pre>
+ * <blockquote><pre>{@code
 MethodType MT_str2 = MethodType.methodType(String.class, String.class);
 MethodHandle MH_cat = lookup().findVirtual(String.class,
   "concat", methodType(String.class, String.class));
@@ -63,7 +63,7 @@
 name.setTarget(MethodHandles.constant(String.class, "Wilma"));
 assertEquals("WILMA", (String) worker1.invokeExact());
 assertEquals("Wilma, dear?", (String) worker2.invokeExact());
- * </pre></blockquote>
+ * }</pre></blockquote>
  * <p>
  * <em>Non-synchronization of target values:</em>
  * A write to a mutable call site's target does not force other threads
diff --git a/jdk/src/share/classes/java/lang/invoke/Stable.java b/jdk/src/share/classes/java/lang/invoke/Stable.java
new file mode 100644
index 0000000..67a3b4f
--- /dev/null
+++ b/jdk/src/share/classes/java/lang/invoke/Stable.java
@@ -0,0 +1,73 @@
+/*
+ * Copyright (c) 2012, Oracle and/or its affiliates. All rights reserved.
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * This code is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU General Public License version 2 only, as
+ * published by the Free Software Foundation.  Oracle designates this
+ * particular file as subject to the "Classpath" exception as provided
+ * by Oracle in the LICENSE file that accompanied this code.
+ *
+ * This code is distributed in the hope that it will be useful, but WITHOUT
+ * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
+ * version 2 for more details (a copy is included in the LICENSE file that
+ * accompanied this code).
+ *
+ * You should have received a copy of the GNU General Public License version
+ * 2 along with this work; if not, write to the Free Software Foundation,
+ * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
+ *
+ * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
+ * or visit www.oracle.com if you need additional information or have any
+ * questions.
+ */
+
+package java.lang.invoke;
+
+import java.lang.annotation.*;
+
+/**
+ * A field may be annotated as stable if all of its component variables
+ * changes value at most once.
+ * A field's value counts as its component value.
+ * If the field is typed as an array, then all the non-null components
+ * of the array, of depth up to the rank of the field's array type,
+ * also count as component values.
+ * By extension, any variable (either array or field) which has annotated
+ * as stable is called a stable variable, and its non-null or non-zero
+ * value is called a stable value.
+ * <p>
+ * Since all fields begin with a default value of null for references
+ * (resp., zero for primitives), it follows that this annotation indicates
+ * that the first non-null (resp., non-zero) value stored in the field
+ * will never be changed.
+ * <p>
+ * If the field is not of an array type, there are no array elements,
+ * then the value indicated as stable is simply the value of the field.
+ * If the dynamic type of the field value is an array but the static type
+ * is not, the components of the array are <em>not</em> regarded as stable.
+ * <p>
+ * If the field is an array type, then both the field value and
+ * all the components of the field value (if the field value is non-null)
+ * are indicated to be stable.
+ * If the field type is an array type with rank {@code N &gt; 1},
+ * then each component of the field value (if the field value is non-null),
+ * is regarded as a stable array of rank {@code N-1}.
+ * <p>
+ * Fields which are declared {@code final} may also be annotated as stable.
+ * Since final fields already behave as stable values, such an annotation
+ * indicates no additional information, unless the type of the field is
+ * an array type.
+ * <p>
+ * It is (currently) undefined what happens if a field annotated as stable
+ * is given a third value.  In practice, if the JVM relies on this annotation
+ * to promote a field reference to a constant, it may be that the Java memory
+ * model would appear to be broken, if such a constant (the second value of the field)
+ * is used as the value of the field even after the field value has changed.
+ */
+/* package-private */
+@Target(ElementType.FIELD)
+@Retention(RetentionPolicy.RUNTIME)
+@interface Stable {
+}
diff --git a/jdk/src/share/classes/java/lang/invoke/SwitchPoint.java b/jdk/src/share/classes/java/lang/invoke/SwitchPoint.java
index 65fd1da..290f9f0 100644
--- a/jdk/src/share/classes/java/lang/invoke/SwitchPoint.java
+++ b/jdk/src/share/classes/java/lang/invoke/SwitchPoint.java
@@ -55,7 +55,7 @@
  * At that point {@code guardWithTest} may ignore {@code T} and return {@code F}.
  * <p>
  * Here is an example of a switch point in action:
- * <blockquote><pre>
+ * <blockquote><pre>{@code
 MethodHandle MH_strcat = MethodHandles.lookup()
     .findVirtual(String.class, "concat", MethodType.methodType(String.class, String.class));
 SwitchPoint spt = new SwitchPoint();
@@ -68,7 +68,7 @@
 SwitchPoint.invalidateAll(new SwitchPoint[]{ spt });
 assert(spt.hasBeenInvalidated());
 assertEquals("hodmet", (String) worker.invokeExact("met", "hod"));
- * </pre></blockquote>
+ * }</pre></blockquote>
  * <p style="font-size:smaller;">
  * <em>Discussion:</em>
  * Switch points are useful without subclassing.  They may also be subclassed.
@@ -82,7 +82,7 @@
  * <em>Implementation Note:</em>
  * A switch point behaves as if implemented on top of {@link MutableCallSite},
  * approximately as follows:
- * <blockquote><pre>
+ * <blockquote><pre>{@code
 public class SwitchPoint {
   private static final MethodHandle
     K_true  = MethodHandles.constant(boolean.class, true),
@@ -106,7 +106,7 @@
     MutableCallSite.syncAll(mcss.toArray(new MutableCallSite[0]));
   }
 }
- * </pre></blockquote>
+ * }</pre></blockquote>
  * @author Remi Forax, JSR 292 EG
  */
 public class SwitchPoint {
diff --git a/jdk/src/share/classes/java/lang/reflect/AnnotatedArrayType.java b/jdk/src/share/classes/java/lang/reflect/AnnotatedArrayType.java
index e84a336..f92b51d 100644
--- a/jdk/src/share/classes/java/lang/reflect/AnnotatedArrayType.java
+++ b/jdk/src/share/classes/java/lang/reflect/AnnotatedArrayType.java
@@ -27,17 +27,18 @@
 
 
 /**
- * AnnotatedArrayType represents the use of an array type, whose component
- * type may itself represent the annotated use of a type.
+ * {@code AnnotatedArrayType} represents the potentially annotated use of an
+ * array type, whose component type may itself represent the annotated use of a
+ * type.
  *
  * @since 1.8
  */
 public interface AnnotatedArrayType extends AnnotatedType {
 
     /**
-     * Returns the annotated generic component type of this array type.
+     * Returns the potentially annotated generic component type of this array type.
      *
-     * @return the annotated generic component type of this array type
+     * @return the potentially annotated generic component type of this array type
      */
     AnnotatedType  getAnnotatedGenericComponentType();
 }
diff --git a/jdk/src/share/classes/java/lang/reflect/AnnotatedParameterizedType.java b/jdk/src/share/classes/java/lang/reflect/AnnotatedParameterizedType.java
index 4fa089e..f1d43c9 100644
--- a/jdk/src/share/classes/java/lang/reflect/AnnotatedParameterizedType.java
+++ b/jdk/src/share/classes/java/lang/reflect/AnnotatedParameterizedType.java
@@ -26,17 +26,18 @@
 package java.lang.reflect;
 
 /**
- * AnnotatedParameterizedType represents the use of a parameterized type,
- * whose type arguments may themselves represent annotated uses of types.
+ * {@code AnnotatedParameterizedType} represents the potentially annotated use
+ * of a parameterized type, whose type arguments may themselves represent
+ * annotated uses of types.
  *
  * @since 1.8
  */
 public interface AnnotatedParameterizedType extends AnnotatedType {
 
     /**
-     * Returns the annotated actual type arguments of this parameterized type.
+     * Returns the potentially annotated actual type arguments of this parameterized type.
      *
-     * @return the annotated actual type arguments of this parameterized type
+     * @return the potentially annotated actual type arguments of this parameterized type
      */
     AnnotatedType[] getAnnotatedActualTypeArguments();
 }
diff --git a/jdk/src/share/classes/java/lang/reflect/AnnotatedType.java b/jdk/src/share/classes/java/lang/reflect/AnnotatedType.java
index d1ee79f..12d0bfc 100644
--- a/jdk/src/share/classes/java/lang/reflect/AnnotatedType.java
+++ b/jdk/src/share/classes/java/lang/reflect/AnnotatedType.java
@@ -26,10 +26,10 @@
 package java.lang.reflect;
 
 /**
- * AnnotatedType represents the annotated use of a type in the program
- * currently running in this VM. The use may be of any type in the Java
- * programming language, including an array type, a parameterized type, a type
- * variable, or a wildcard type.
+ * {@code AnnotatedType} represents the potentially annotated use of a type in
+ * the program currently running in this VM. The use may be of any type in the
+ * Java programming language, including an array type, a parameterized type, a
+ * type variable, or a wildcard type.
  *
  * @since 1.8
  */
diff --git a/jdk/src/share/classes/java/lang/reflect/AnnotatedTypeVariable.java b/jdk/src/share/classes/java/lang/reflect/AnnotatedTypeVariable.java
index 3580a14..7a39bae 100644
--- a/jdk/src/share/classes/java/lang/reflect/AnnotatedTypeVariable.java
+++ b/jdk/src/share/classes/java/lang/reflect/AnnotatedTypeVariable.java
@@ -26,18 +26,18 @@
 package java.lang.reflect;
 
 /**
- * AnnotatedTypeVariable represents the use of a type variable, whose
- * declaration may have bounds which themselves represent annotated uses of
- * types.
+ * {@code AnnotatedTypeVariable} represents the potentially annotated use of a
+ * type variable, whose declaration may have bounds which themselves represent
+ * annotated uses of types.
  *
  * @since 1.8
  */
 public interface AnnotatedTypeVariable extends AnnotatedType {
 
     /**
-     * Returns the annotated bounds of this type variable.
+     * Returns the potentially annotated bounds of this type variable.
      *
-     * @return the annotated bounds of this type variable
+     * @return the potentially annotated bounds of this type variable
      */
     AnnotatedType[] getAnnotatedBounds();
 }
diff --git a/jdk/src/share/classes/java/lang/reflect/AnnotatedWildcardType.java b/jdk/src/share/classes/java/lang/reflect/AnnotatedWildcardType.java
index c357eb9..2d15f6c 100644
--- a/jdk/src/share/classes/java/lang/reflect/AnnotatedWildcardType.java
+++ b/jdk/src/share/classes/java/lang/reflect/AnnotatedWildcardType.java
@@ -26,24 +26,25 @@
 package java.lang.reflect;
 
 /**
- * AnnotatedWildcardType represents the use of a wildcard type argument, whose
- * upper or lower bounds may themselves represent annotated uses of types.
+ * {@code AnnotatedWildcardType} represents the potentially annotated use of a
+ * wildcard type argument, whose upper or lower bounds may themselves represent
+ * annotated uses of types.
  *
  * @since 1.8
  */
 public interface AnnotatedWildcardType extends AnnotatedType {
 
     /**
-     * Returns the annotated lower bounds of this wildcard type.
+     * Returns the potentially annotated lower bounds of this wildcard type.
      *
-     * @return the annotated lower bounds of this wildcard type
+     * @return the potentially annotated lower bounds of this wildcard type
      */
     AnnotatedType[] getAnnotatedLowerBounds();
 
     /**
-     * Returns the annotated upper bounds of this wildcard type.
+     * Returns the potentially annotated upper bounds of this wildcard type.
      *
-     * @return the annotated upper bounds of this wildcard type
+     * @return the potentially annotated upper bounds of this wildcard type
      */
     AnnotatedType[] getAnnotatedUpperBounds();
 }
diff --git a/jdk/src/share/classes/java/lang/reflect/Constructor.java b/jdk/src/share/classes/java/lang/reflect/Constructor.java
index 0ed60dc..202a736 100644
--- a/jdk/src/share/classes/java/lang/reflect/Constructor.java
+++ b/jdk/src/share/classes/java/lang/reflect/Constructor.java
@@ -67,8 +67,6 @@
     private transient ConstructorRepository genericInfo;
     private byte[]              annotations;
     private byte[]              parameterAnnotations;
-    // This is set by the vm at Constructor creation
-    private byte[]              typeAnnotations;
 
     // Generics infrastructure
     // Accessor for factory
@@ -141,8 +139,6 @@
         res.root = this;
         // Might as well eagerly propagate this if already present
         res.constructorAccessor = constructorAccessor;
-
-        res.typeAnnotations = typeAnnotations;
         return res;
     }
 
@@ -155,10 +151,6 @@
     byte[] getAnnotationBytes() {
         return annotations;
     }
-    @Override
-    byte[] getTypeAnnotationBytes() {
-        return typeAnnotations;
-    }
 
     /**
      * {@inheritDoc}
diff --git a/jdk/src/share/classes/java/lang/reflect/Executable.java b/jdk/src/share/classes/java/lang/reflect/Executable.java
index 9d41a02..c92c9a5 100644
--- a/jdk/src/share/classes/java/lang/reflect/Executable.java
+++ b/jdk/src/share/classes/java/lang/reflect/Executable.java
@@ -51,7 +51,6 @@
      * Accessor method to allow code sharing
      */
     abstract byte[] getAnnotationBytes();
-    abstract byte[] getTypeAnnotationBytes();
 
     /**
      * Does the Executable have generic information.
@@ -287,12 +286,14 @@
      * this object.  Returns an array of length 0 if the executable
      * has no parameters.
      *
-     * The parameters of the underlying executable do not necessarily
+     * <p>The parameters of the underlying executable do not necessarily
      * have unique names, or names that are legal identifiers in the
      * Java programming language (JLS 3.8).
      *
+     * @throws MalformedParametersException if the class file contains
+     * a MethodParameters attribute that is improperly formatted.
      * @return an array of {@code Parameter} objects representing all
-     * the parameters to the executable this object represents
+     * the parameters to the executable this object represents.
      */
     public Parameter[] getParameters() {
         // TODO: This may eventually need to be guarded by security
@@ -316,6 +317,30 @@
         return out;
     }
 
+    private void verifyParameters(final Parameter[] parameters) {
+        final int mask = Modifier.FINAL | Modifier.SYNTHETIC | Modifier.MANDATED;
+
+        if (getParameterTypes().length != parameters.length)
+            throw new MalformedParametersException("Wrong number of parameters in MethodParameters attribute");
+
+        for (Parameter parameter : parameters) {
+            final String name = parameter.getRealName();
+            final int mods = parameter.getModifiers();
+
+            if (name != null) {
+                if (name.isEmpty() || name.indexOf('.') != -1 ||
+                    name.indexOf(';') != -1 || name.indexOf('[') != -1 ||
+                    name.indexOf('/') != -1) {
+                    throw new MalformedParametersException("Invalid parameter name \"" + name + "\"");
+                }
+            }
+
+            if (mods != (mods & mask)) {
+                throw new MalformedParametersException("Invalid parameter modifiers");
+            }
+        }
+    }
+
     private Parameter[] privateGetParameters() {
         // Use tmp to avoid multiple writes to a volatile.
         Parameter[] tmp = parameters;
@@ -323,7 +348,12 @@
         if (tmp == null) {
 
             // Otherwise, go to the JVM to get them
-            tmp = getParameters0();
+            try {
+                tmp = getParameters0();
+            } catch(IllegalArgumentException e) {
+                // Rethrow ClassFormatErrors
+                throw new MalformedParametersException("Invalid constant pool index");
+            }
 
             // If we get back nothing, then synthesize parameters
             if (tmp == null) {
@@ -331,6 +361,7 @@
                 tmp = synthesizeAllParams();
             } else {
                 hasRealParameterData = true;
+                verifyParameters(tmp);
             }
 
             parameters = tmp;
@@ -352,6 +383,12 @@
     private transient volatile Parameter[] parameters;
 
     private native Parameter[] getParameters0();
+    private native byte[] getTypeAnnotationBytes0();
+
+    // Needed by reflectaccess
+    byte[] getTypeAnnotationBytes() {
+        return getTypeAnnotationBytes0();
+    }
 
     /**
      * Returns an array of {@code Class} objects that represent the
@@ -514,18 +551,20 @@
     }
 
     /**
-     * Returns an AnnotatedType object that represents the use of a type to
+     * Returns an {@code AnnotatedType} object that represents the use of a type to
      * specify the return type of the method/constructor represented by this
      * Executable.
      *
-     * If this Executable represents a constructor, the AnnotatedType object
-     * represents the type of the constructed object.
+     * If this {@code Executable} object represents a constructor, the {@code
+     * AnnotatedType} object represents the type of the constructed object.
      *
-     * If this Executable represents a method, the AnnotatedType object
-     * represents the use of a type to specify the return type of the method.
+     * If this {@code Executable} object represents a method, the {@code
+     * AnnotatedType} object represents the use of a type to specify the return
+     * type of the method.
      *
-     * @return an object representing the return type of this method
-     * or constructor
+     * @return an object representing the return type of the method
+     * or constructor represented by this {@code Executable}
+     *
      * @since 1.8
      */
     public abstract AnnotatedType getAnnotatedReturnType();
@@ -539,7 +578,7 @@
      * @since 1.8
      */
     AnnotatedType getAnnotatedReturnType0(Type returnType) {
-        return TypeAnnotationParser.buildAnnotatedType(getTypeAnnotationBytes(),
+        return TypeAnnotationParser.buildAnnotatedType(getTypeAnnotationBytes0(),
                 sun.misc.SharedSecrets.getJavaLangAccess().
                         getConstantPool(getDeclaringClass()),
                 this,
@@ -549,25 +588,30 @@
     }
 
     /**
-     * Returns an AnnotatedType object that represents the use of a type to
-     * specify the receiver type of the method/constructor represented by this
-     * Executable. The receiver type of a method/constructor is available only
-     * if the method/constructor declares a formal parameter called 'this'.
+     * Returns an {@code AnnotatedType} object that represents the use of a
+     * type to specify the receiver type of the method/constructor represented
+     * by this Executable object. The receiver type of a method/constructor is
+     * available only if the method/constructor has a <em>receiver
+     * parameter</em> (JLS 8.4.1).
      *
-     * Returns null if this Executable represents a constructor or instance
-     * method that either declares no formal parameter called 'this', or
-     * declares a formal parameter called 'this' with no annotations on its
-     * type.
+     * If this {@code Executable} object represents a constructor or instance
+     * method that does not have a receiver parameter, or has a receiver
+     * parameter with no annotations on its type, then the return value is an
+     * {@code AnnotatedType} object representing an element with no
+     * annotations.
      *
-     * Returns null if this Executable represents a static method.
+     * If this {@code Executable} object represents a static method, then the
+     * return value is null.
      *
-     * @return an object representing the receiver type of the
-     * method or constructor represented by this Executable
+     * @return an object representing the receiver type of the method or
+     * constructor represented by this {@code Executable}
      *
      * @since 1.8
      */
     public AnnotatedType getAnnotatedReceiverType() {
-        return TypeAnnotationParser.buildAnnotatedType(getTypeAnnotationBytes(),
+        if (Modifier.isStatic(this.getModifiers()))
+            return null;
+        return TypeAnnotationParser.buildAnnotatedType(getTypeAnnotationBytes0(),
                 sun.misc.SharedSecrets.getJavaLangAccess().
                         getConstantPool(getDeclaringClass()),
                 this,
@@ -577,8 +621,8 @@
     }
 
     /**
-     * Returns an array of AnnotatedType objects that represent the use of
-     * types to specify formal parameter types of the method/constructor
+     * Returns an array of {@code AnnotatedType} objects that represent the use
+     * of types to specify formal parameter types of the method/constructor
      * represented by this Executable. The order of the objects in the array
      * corresponds to the order of the formal parameter types in the
      * declaration of the method/constructor.
@@ -587,12 +631,13 @@
      * parameters.
      *
      * @return an array of objects representing the types of the
-     * formal parameters of this method or constructor
+     * formal parameters of the method or constructor represented by this
+     * {@code Executable}
      *
      * @since 1.8
      */
     public AnnotatedType[] getAnnotatedParameterTypes() {
-        return TypeAnnotationParser.buildAnnotatedTypes(getTypeAnnotationBytes(),
+        return TypeAnnotationParser.buildAnnotatedTypes(getTypeAnnotationBytes0(),
                 sun.misc.SharedSecrets.getJavaLangAccess().
                         getConstantPool(getDeclaringClass()),
                 this,
@@ -602,8 +647,8 @@
     }
 
     /**
-     * Returns an array of AnnotatedType objects that represent the use of
-     * types to specify the declared exceptions of the method/constructor
+     * Returns an array of {@code AnnotatedType} objects that represent the use
+     * of types to specify the declared exceptions of the method/constructor
      * represented by this Executable. The order of the objects in the array
      * corresponds to the order of the exception types in the declaration of
      * the method/constructor.
@@ -612,12 +657,13 @@
      * exceptions.
      *
      * @return an array of objects representing the declared
-     * exceptions of this method or constructor
+     * exceptions of the method or constructor represented by this {@code
+     * Executable}
      *
      * @since 1.8
      */
     public AnnotatedType[] getAnnotatedExceptionTypes() {
-        return TypeAnnotationParser.buildAnnotatedTypes(getTypeAnnotationBytes(),
+        return TypeAnnotationParser.buildAnnotatedTypes(getTypeAnnotationBytes0(),
                 sun.misc.SharedSecrets.getJavaLangAccess().
                         getConstantPool(getDeclaringClass()),
                 this,
diff --git a/jdk/src/share/classes/java/lang/reflect/Field.java b/jdk/src/share/classes/java/lang/reflect/Field.java
index 4052e06..e84b6b2 100644
--- a/jdk/src/share/classes/java/lang/reflect/Field.java
+++ b/jdk/src/share/classes/java/lang/reflect/Field.java
@@ -82,8 +82,6 @@
     // currently only two levels deep (i.e., one root Field and
     // potentially many Field objects pointing to it.)
     private Field               root;
-    // This is set by the vm at Field creation
-    private byte[]              typeAnnotations;
 
     // Generics infrastructure
 
@@ -149,7 +147,6 @@
         res.fieldAccessor = fieldAccessor;
         res.overrideFieldAccessor = overrideFieldAccessor;
 
-        res.typeAnnotations = typeAnnotations;
         return res;
     }
 
@@ -1148,6 +1145,8 @@
         return declaredAnnotations;
     }
 
+    private native byte[] getTypeAnnotationBytes0();
+
     /**
      * Returns an AnnotatedType object that represents the use of a type to specify
      * the declared type of the field represented by this Field.
@@ -1157,7 +1156,7 @@
      * @since 1.8
      */
     public AnnotatedType getAnnotatedType() {
-        return TypeAnnotationParser.buildAnnotatedType(typeAnnotations,
+        return TypeAnnotationParser.buildAnnotatedType(getTypeAnnotationBytes0(),
                                                        sun.misc.SharedSecrets.getJavaLangAccess().
                                                            getConstantPool(getDeclaringClass()),
                                                        this,
diff --git a/jdk/src/share/classes/java/lang/reflect/MalformedParametersException.java b/jdk/src/share/classes/java/lang/reflect/MalformedParametersException.java
new file mode 100644
index 0000000..c68600b
--- /dev/null
+++ b/jdk/src/share/classes/java/lang/reflect/MalformedParametersException.java
@@ -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.  Oracle designates this
+ * particular file as subject to the "Classpath" exception as provided
+ * by Oracle in the LICENSE file that accompanied this code.
+ *
+ * This code is distributed in the hope that it will be useful, but WITHOUT
+ * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
+ * version 2 for more details (a copy is included in the LICENSE file that
+ * accompanied this code).
+ *
+ * You should have received a copy of the GNU General Public License version
+ * 2 along with this work; if not, write to the Free Software Foundation,
+ * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
+ *
+ * Please 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.reflect;
+
+/**
+ * Thrown when {@link java.lang.reflect.Executable#getParameters the
+ * java.lang.reflect package} attempts to read method parameters from
+ * a class file and determines that one or more parameters are
+ * malformed.
+ *
+ * <p>The following is a list of conditions under which this exception
+ * can be thrown:
+ * <ul>
+ * <li> The number of parameters (parameter_count) is wrong for the method
+ * <li> A constant pool index is out of bounds.
+ * <li> A constant pool index does not refer to a UTF-8 entry
+ * <li> A parameter's name is "", or contains an illegal character
+ * <li> The flags field contains an illegal flag (something other than
+ *     FINAL, SYNTHETIC, or MANDATED)
+ * </ul>
+ *
+ * See {@link java.lang.reflect.Executable#getParameters} for more
+ * information.
+ *
+ * @see java.lang.reflect.Executable#getParameters
+ * @since 1.8
+ */
+public class MalformedParametersException extends RuntimeException {
+
+    private static final long serialVersionUID = 20130919L;
+
+    public MalformedParametersException() {}
+
+    public MalformedParametersException(String reason) {
+        super(reason);
+    }
+}
diff --git a/jdk/src/share/classes/java/lang/reflect/Method.java b/jdk/src/share/classes/java/lang/reflect/Method.java
index 7c7abe4..b046a7a 100644
--- a/jdk/src/share/classes/java/lang/reflect/Method.java
+++ b/jdk/src/share/classes/java/lang/reflect/Method.java
@@ -80,8 +80,6 @@
     // currently only two levels deep (i.e., one root Method and
     // potentially many Method objects pointing to it.)
     private Method              root;
-    // This is set by the vm at Method creation
-    private byte[]              typeAnnotations;
 
     // Generics infrastructure
     private String getGenericSignature() {return signature;}
@@ -152,8 +150,6 @@
         res.root = this;
         // Might as well eagerly propagate this if already present
         res.methodAccessor = methodAccessor;
-
-        res.typeAnnotations = typeAnnotations;
         return res;
     }
 
@@ -166,10 +162,6 @@
     byte[] getAnnotationBytes() {
         return annotations;
     }
-    @Override
-    byte[] getTypeAnnotationBytes() {
-        return typeAnnotations;
-    }
 
     /**
      * {@inheritDoc}
diff --git a/jdk/src/share/classes/java/lang/reflect/Parameter.java b/jdk/src/share/classes/java/lang/reflect/Parameter.java
index 0568d9e..2285819 100644
--- a/jdk/src/share/classes/java/lang/reflect/Parameter.java
+++ b/jdk/src/share/classes/java/lang/reflect/Parameter.java
@@ -104,7 +104,7 @@
      * to the class file.
      */
     public boolean isNamePresent() {
-        return executable.hasRealParameterData();
+        return executable.hasRealParameterData() && name != null;
     }
 
     /**
@@ -182,6 +182,11 @@
             return name;
     }
 
+    // Package-private accessor to the real name field.
+    String getRealName() {
+        return name;
+    }
+
     /**
      * Returns a {@code Type} object that identifies the parameterized
      * type for the parameter represented by this {@code Parameter}
diff --git a/jdk/src/share/classes/java/net/URI.java b/jdk/src/share/classes/java/net/URI.java
index 77c2f7a..71c4f6d 100644
--- a/jdk/src/share/classes/java/net/URI.java
+++ b/jdk/src/share/classes/java/net/URI.java
@@ -188,7 +188,7 @@
  * URI
  *
  * <blockquote>
- * {@code http://java.sun.com/j2se/1.3/docs/guide/collections/designfaq.html#28}
+ * {@code http://docs.oracle.com/javase/1.3/docs/guide/collections/designfaq.html#28}
  * </blockquote>
  *
  * Resolving the relative URI
@@ -227,7 +227,7 @@
  * possible.  For example, relativizing the URI
  *
  * <blockquote>
- * {@code http://java.sun.com/j2se/1.3/docs/guide/index.html}
+ * {@code http://docs.oracle.com/javase/1.3/docs/guide/index.html}
  * </blockquote>
  *
  * against the base URI
diff --git a/jdk/src/share/classes/java/nio/file/Files.java b/jdk/src/share/classes/java/nio/file/Files.java
index f084040..0162944 100644
--- a/jdk/src/share/classes/java/nio/file/Files.java
+++ b/jdk/src/share/classes/java/nio/file/Files.java
@@ -2128,7 +2128,7 @@
     /**
      * Tests whether a file is a symbolic link.
      *
-     * <p> Where is it required to distinguish an I/O exception from the case
+     * <p> Where it is required to distinguish an I/O exception from the case
      * that the file is not a symbolic link then the file attributes can be
      * read with the {@link #readAttributes(Path,Class,LinkOption[])
      * readAttributes} method and the file type tested with the {@link
@@ -2164,7 +2164,7 @@
      * of the link is read. If the option {@link LinkOption#NOFOLLOW_LINKS
      * NOFOLLOW_LINKS} is present then symbolic links are not followed.
      *
-     * <p> Where is it required to distinguish an I/O exception from the case
+     * <p> Where it is required to distinguish an I/O exception from the case
      * that the file is not a directory then the file attributes can be
      * read with the {@link #readAttributes(Path,Class,LinkOption[])
      * readAttributes} method and the file type tested with the {@link
@@ -2201,7 +2201,7 @@
      * of the link is read. If the option {@link LinkOption#NOFOLLOW_LINKS
      * NOFOLLOW_LINKS} is present then symbolic links are not followed.
      *
-     * <p> Where is it required to distinguish an I/O exception from the case
+     * <p> Where it is required to distinguish an I/O exception from the case
      * that the file is not a regular file then the file attributes can be
      * read with the {@link #readAttributes(Path,Class,LinkOption[])
      * readAttributes} method and the file type tested with the {@link
@@ -3082,13 +3082,13 @@
      *          method is invoked to check read access to the file.
      */
     public static byte[] readAllBytes(Path path) throws IOException {
-        try (FileChannel fc = FileChannel.open(path);
-             InputStream is = Channels.newInputStream(fc)) {
-            long size = fc.size();
+        try (SeekableByteChannel sbc = Files.newByteChannel(path);
+             InputStream in = Channels.newInputStream(sbc)) {
+            long size = sbc.size();
             if (size > (long)MAX_BUFFER_SIZE)
                 throw new OutOfMemoryError("Required array size too large");
 
-            return read(is, (int)size);
+            return read(in, (int)size);
         }
     }
 
diff --git a/jdk/src/share/classes/java/nio/file/Path.java b/jdk/src/share/classes/java/nio/file/Path.java
index 39afd4d..2bcc9aa 100644
--- a/jdk/src/share/classes/java/nio/file/Path.java
+++ b/jdk/src/share/classes/java/nio/file/Path.java
@@ -315,7 +315,7 @@
      * and parent directory. In such file systems all occurrences of "{@code .}"
      * are considered redundant. If a "{@code ..}" is preceded by a
      * non-"{@code ..}" name then both names are considered redundant (the
-     * process to identify such names is repeated until is it no longer
+     * process to identify such names is repeated until it is no longer
      * applicable).
      *
      * <p> This method does not access the file system; the path may not locate
diff --git a/jdk/src/share/classes/java/security/SecureRandom.java b/jdk/src/share/classes/java/security/SecureRandom.java
index 5afec7b..b9ae722 100644
--- a/jdk/src/share/classes/java/security/SecureRandom.java
+++ b/jdk/src/share/classes/java/security/SecureRandom.java
@@ -578,39 +578,30 @@
     /**
      * Returns a {@code SecureRandom} object that was selected by using
      * the algorithms/providers specified in the {@code
-     * securerandom.strongAlgorithms} Security property.
+     * securerandom.strongAlgorithms} {@link Security} property.
      * <p>
      * Some situations require strong random values, such as when
      * creating high-value/long-lived secrets like RSA public/private
      * keys.  To help guide applications in selecting a suitable strong
-     * {@code SecureRandom} implementation, Java distributions should
+     * {@code SecureRandom} implementation, Java distributions
      * include a list of known strong {@code SecureRandom}
      * implementations in the {@code securerandom.strongAlgorithms}
      * Security property.
-     *
-     * <pre>
-     *     SecureRandom sr = SecureRandom.getStrongSecureRandom();
-     *
-     *     if (sr == null) {
-     *         // Decide if this is a problem, and whether to recover.
-     *         sr = new SecureRandom();
-     *         if (!goodEnough(sr)) {
-     *             return;
-     *         }
-     *     }
-     *
-     *     keyPairGenerator.initialize(2048, sr);
-     * </pre>
+     * <p>
+     * Every implementation of the Java platform is required to
+     * support at least one strong {@code SecureRandom} implementation.
      *
      * @return a strong {@code SecureRandom} implementation as indicated
-     * by the {@code securerandom.strongAlgorithms} Security property, or
-     * null if none are available.
+     * by the {@code securerandom.strongAlgorithms} Security property
+     *
+     * @throws NoSuchAlgorithmException if no algorithm is available
      *
      * @see Security#getProperty(String)
      *
      * @since 1.8
      */
-    public static SecureRandom getStrongSecureRandom() {
+    public static SecureRandom getInstanceStrong()
+            throws NoSuchAlgorithmException {
 
         String property = AccessController.doPrivileged(
             new PrivilegedAction<String>() {
@@ -622,7 +613,8 @@
             });
 
         if ((property == null) || (property.length() == 0)) {
-            return null;
+            throw new NoSuchAlgorithmException(
+                "Null/empty securerandom.strongAlgorithms Security Property");
         }
 
         String remainder = property;
@@ -649,7 +641,8 @@
             }
         }
 
-        return null;
+        throw new NoSuchAlgorithmException(
+            "No strong SecureRandom impls available: " + property);
     }
 
     // Declare serialVersionUID to be compatible with JDK1.1
diff --git a/jdk/src/share/classes/java/text/DecimalFormat.java b/jdk/src/share/classes/java/text/DecimalFormat.java
index c22e472..f89fd15 100644
--- a/jdk/src/share/classes/java/text/DecimalFormat.java
+++ b/jdk/src/share/classes/java/text/DecimalFormat.java
@@ -371,7 +371,7 @@
  * }
  * }</pre></blockquote>
  *
- * @see          <a href="http://java.sun.com/docs/books/tutorial/i18n/format/decimalFormat.html">Java Tutorial</a>
+ * @see          <a href="http://docs.oracle.com/javase/tutorial/i18n/format/decimalFormat.html">Java Tutorial</a>
  * @see          NumberFormat
  * @see          DecimalFormatSymbols
  * @see          ParsePosition
diff --git a/jdk/src/share/classes/java/text/SimpleDateFormat.java b/jdk/src/share/classes/java/text/SimpleDateFormat.java
index 5472b0a..fa9f673 100644
--- a/jdk/src/share/classes/java/text/SimpleDateFormat.java
+++ b/jdk/src/share/classes/java/text/SimpleDateFormat.java
@@ -412,7 +412,7 @@
  * If multiple threads access a format concurrently, it must be synchronized
  * externally.
  *
- * @see          <a href="http://java.sun.com/docs/books/tutorial/i18n/format/simpleDateFormat.html">Java Tutorial</a>
+ * @see          <a href="http://docs.oracle.com/javase/tutorial/i18n/format/simpleDateFormat.html">Java Tutorial</a>
  * @see          java.util.Calendar
  * @see          java.util.TimeZone
  * @see          DateFormat
diff --git a/jdk/src/share/classes/java/time/Duration.java b/jdk/src/share/classes/java/time/Duration.java
index ce2ba77..896a299 100644
--- a/jdk/src/share/classes/java/time/Duration.java
+++ b/jdk/src/share/classes/java/time/Duration.java
@@ -441,9 +441,13 @@
 
     //-----------------------------------------------------------------------
     /**
-     * Obtains a {@code Duration} representing the duration between two instants.
+     * Obtains a {@code Duration} representing the duration between two temporal objects.
      * <p>
-     * This calculates the duration between two temporal objects of the same type.
+     * This calculates the duration between two temporal objects. If the objects
+     * are of different types, then the duration is calculated based on the type
+     * of the first object. For example, if the first argument is a {@code LocalTime}
+     * then the second argument is converted to a {@code LocalTime}.
+     * <p>
      * The specified temporal objects must support the {@link ChronoUnit#SECONDS SECONDS} unit.
      * For full accuracy, either the {@link ChronoUnit#NANOS NANOS} unit or the
      * {@link ChronoField#NANO_OF_SECOND NANO_OF_SECOND} field should be supported.
diff --git a/jdk/src/share/classes/java/time/Instant.java b/jdk/src/share/classes/java/time/Instant.java
index 9d74e29..0e22c7b 100644
--- a/jdk/src/share/classes/java/time/Instant.java
+++ b/jdk/src/share/classes/java/time/Instant.java
@@ -362,6 +362,10 @@
      * @throws DateTimeException if unable to convert to an {@code Instant}
      */
     public static Instant from(TemporalAccessor temporal) {
+        if (temporal instanceof Instant) {
+            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);
@@ -370,7 +374,7 @@
     //-----------------------------------------------------------------------
     /**
      * Obtains an instance of {@code Instant} from a text string such as
-     * {@code 2007-12-03T10:15:30:00}.
+     * {@code 2007-12-03T10:15:30.00Z}.
      * <p>
      * The string must represent a valid instant in UTC and is parsed using
      * {@link DateTimeFormatter#ISO_INSTANT}.
@@ -1091,7 +1095,8 @@
      * The result will be negative if the end is before the start.
      * The calculation returns a whole number, representing the number of
      * complete units between the two instants.
-     * The {@code Temporal} passed to this method must be an {@code Instant}.
+     * The {@code Temporal} passed to this method is converted to a
+     * {@code Instant} using {@link #from(TemporalAccessor)}.
      * For example, the amount in days between two dates can be calculated
      * using {@code startInstant.until(endInstant, SECONDS)}.
      * <p>
@@ -1112,25 +1117,22 @@
      * <p>
      * If the unit is not a {@code ChronoUnit}, then the result of this method
      * is obtained by invoking {@code TemporalUnit.between(Temporal, Temporal)}
-     * passing {@code this} as the first argument and the input temporal as
-     * the second argument.
+     * passing {@code this} as the first argument and the converted input temporal
+     * as the second argument.
      * <p>
      * This instance is immutable and unaffected by this method call.
      *
-     * @param endInstant  the end date, which must be an {@code Instant}, not null
+     * @param endExclusive  the end date, exclusive, which is converted to an {@code Instant}, not null
      * @param unit  the unit to measure the amount in, not null
      * @return the amount of time between this instant and the end instant
-     * @throws DateTimeException if the amount cannot be calculated
+     * @throws DateTimeException if the amount cannot be calculated, or the end
+     *  temporal cannot be converted to an {@code Instant}
      * @throws UnsupportedTemporalTypeException if the unit is not supported
      * @throws ArithmeticException if numeric overflow occurs
      */
     @Override
-    public long until(Temporal endInstant, TemporalUnit unit) {
-        if (endInstant instanceof Instant == false) {
-            Objects.requireNonNull(endInstant, "endInstant");
-            throw new DateTimeException("Unable to calculate amount as objects are of two different types");
-        }
-        Instant end = (Instant) endInstant;
+    public long until(Temporal endExclusive, TemporalUnit unit) {
+        Instant end = Instant.from(endExclusive);
         if (unit instanceof ChronoUnit) {
             ChronoUnit f = (ChronoUnit) unit;
             switch (f) {
@@ -1145,7 +1147,7 @@
             }
             throw new UnsupportedTemporalTypeException("Unsupported unit: " + unit);
         }
-        return unit.between(this, endInstant);
+        return unit.between(this, end);
     }
 
     private long nanosUntil(Instant end) {
diff --git a/jdk/src/share/classes/java/time/LocalDate.java b/jdk/src/share/classes/java/time/LocalDate.java
index 3005658..f388959 100644
--- a/jdk/src/share/classes/java/time/LocalDate.java
+++ b/jdk/src/share/classes/java/time/LocalDate.java
@@ -353,6 +353,7 @@
      * @throws DateTimeException if unable to convert to a {@code LocalDate}
      */
     public static LocalDate from(TemporalAccessor temporal) {
+        Objects.requireNonNull(temporal, "temporal");
         LocalDate date = temporal.query(TemporalQuery.localDate());
         if (date == null) {
             throw new DateTimeException("Unable to obtain LocalDate from TemporalAccessor: " + temporal.getClass());
@@ -1125,6 +1126,11 @@
      */
     @Override
     public LocalDate plus(TemporalAmount amountToAdd) {
+        if (amountToAdd instanceof Period) {
+            Period periodToAdd = (Period) amountToAdd;
+            return plusMonths(periodToAdd.toTotalMonths()).plusDays(periodToAdd.getDays());
+        }
+        Objects.requireNonNull(amountToAdd, "amountToAdd");
         return (LocalDate) amountToAdd.addTo(this);
     }
 
@@ -1353,6 +1359,11 @@
      */
     @Override
     public LocalDate minus(TemporalAmount amountToSubtract) {
+        if (amountToSubtract instanceof Period) {
+            Period periodToSubtract = (Period) amountToSubtract;
+            return minusMonths(periodToSubtract.toTotalMonths()).minusDays(periodToSubtract.getDays());
+        }
+        Objects.requireNonNull(amountToSubtract, "amountToSubtract");
         return (LocalDate) amountToSubtract.subtractFrom(this);
     }
 
@@ -1531,7 +1542,8 @@
      * objects in terms of a single {@code TemporalUnit}.
      * The start and end points are {@code this} and the specified date.
      * The result will be negative if the end is before the start.
-     * The {@code Temporal} passed to this method must be a {@code LocalDate}.
+     * The {@code Temporal} passed to this method is converted to a
+     * {@code LocalDate} using {@link #from(TemporalAccessor)}.
      * For example, the amount in days between two dates can be calculated
      * using {@code startDate.until(endDate, DAYS)}.
      * <p>
@@ -1557,26 +1569,22 @@
      * <p>
      * If the unit is not a {@code ChronoUnit}, then the result of this method
      * is obtained by invoking {@code TemporalUnit.between(Temporal, Temporal)}
-     * passing {@code this} as the first argument and the input temporal as
-     * the second argument.
+     * passing {@code this} as the first argument and the converted input temporal
+     * as the second argument.
      * <p>
      * This instance is immutable and unaffected by this method call.
      *
-     * @param endDate  the end date, which must be a {@code LocalDate}, not null
+     * @param endExclusive  the end date, exclusive, which is converted to a {@code LocalDate}, not null
      * @param unit  the unit to measure the amount in, not null
      * @return the amount of time between this date and the end date
-     * @throws DateTimeException if the amount cannot be calculated
+     * @throws DateTimeException if the amount cannot be calculated, or the end
+     *  temporal cannot be converted to a {@code LocalDate}
      * @throws UnsupportedTemporalTypeException if the unit is not supported
      * @throws ArithmeticException if numeric overflow occurs
      */
     @Override
-    public long until(Temporal endDate, TemporalUnit unit) {
-        Objects.requireNonNull(unit, "unit");
-        if (endDate instanceof LocalDate == false) {
-            Objects.requireNonNull(endDate, "endDate");
-            throw new DateTimeException("Unable to calculate amount as objects are of two different types");
-        }
-        LocalDate end = (LocalDate) endDate;
+    public long until(Temporal endExclusive, TemporalUnit unit) {
+        LocalDate end = LocalDate.from(endExclusive);
         if (unit instanceof ChronoUnit) {
             switch ((ChronoUnit) unit) {
                 case DAYS: return daysUntil(end);
@@ -1590,7 +1598,7 @@
             }
             throw new UnsupportedTemporalTypeException("Unsupported unit: " + unit);
         }
-        return unit.between(this, endDate);
+        return unit.between(this, end);
     }
 
     long daysUntil(LocalDate end) {
@@ -1632,12 +1640,12 @@
      * </pre>
      * The choice should be made based on which makes the code more readable.
      *
-     * @param endDate  the end date, exclusive, which may be in any chronology, not null
+     * @param endDateExclusive  the end date, exclusive, which may be in any chronology, not null
      * @return the period between this date and the end date, not null
      */
     @Override
-    public Period until(ChronoLocalDate endDate) {
-        LocalDate end = LocalDate.from(endDate);
+    public Period until(ChronoLocalDate endDateExclusive) {
+        LocalDate end = LocalDate.from(endDateExclusive);
         long totalMonths = end.getProlepticMonth() - this.getProlepticMonth();  // safe
         int days = end.day - this.day;
         if (totalMonths > 0 && days < 0) {
diff --git a/jdk/src/share/classes/java/time/LocalDateTime.java b/jdk/src/share/classes/java/time/LocalDateTime.java
index de8b246..aed44dd 100644
--- a/jdk/src/share/classes/java/time/LocalDateTime.java
+++ b/jdk/src/share/classes/java/time/LocalDateTime.java
@@ -1129,6 +1129,11 @@
      */
     @Override
     public LocalDateTime plus(TemporalAmount amountToAdd) {
+        if (amountToAdd instanceof Period) {
+            Period periodToAdd = (Period) amountToAdd;
+            return with(date.plus(periodToAdd), time);
+        }
+        Objects.requireNonNull(amountToAdd, "amountToAdd");
         return (LocalDateTime) amountToAdd.addTo(this);
     }
 
@@ -1343,6 +1348,11 @@
      */
     @Override
     public LocalDateTime minus(TemporalAmount amountToSubtract) {
+        if (amountToSubtract instanceof Period) {
+            Period periodToSubtract = (Period) amountToSubtract;
+            return with(date.minus(periodToSubtract), time);
+        }
+        Objects.requireNonNull(amountToSubtract, "amountToSubtract");
         return (LocalDateTime) amountToSubtract.subtractFrom(this);
     }
 
@@ -1611,7 +1621,8 @@
      * objects in terms of a single {@code TemporalUnit}.
      * The start and end points are {@code this} and the specified date-time.
      * The result will be negative if the end is before the start.
-     * The {@code Temporal} passed to this method must be a {@code LocalDateTime}.
+     * The {@code Temporal} passed to this method is converted to a
+     * {@code LocalDateTime} using {@link #from(TemporalAccessor)}.
      * For example, the amount in days between two date-times can be calculated
      * using {@code startDateTime.until(endDateTime, DAYS)}.
      * <p>
@@ -1639,25 +1650,22 @@
      * <p>
      * If the unit is not a {@code ChronoUnit}, then the result of this method
      * is obtained by invoking {@code TemporalUnit.between(Temporal, Temporal)}
-     * passing {@code this} as the first argument and the input temporal as
-     * the second argument.
+     * passing {@code this} as the first argument and the converted input temporal
+     * as the second argument.
      * <p>
      * This instance is immutable and unaffected by this method call.
      *
-     * @param endDateTime  the end date-time, which must be a {@code LocalDateTime}, not null
+     * @param endExclusive  the end date, exclusive, which is converted to a {@code LocalDateTime}, not null
      * @param unit  the unit to measure the amount in, not null
      * @return the amount of time between this date-time and the end date-time
-     * @throws DateTimeException if the amount cannot be calculated
+     * @throws DateTimeException if the amount cannot be calculated, or the end
+     *  temporal cannot be converted to a {@code LocalDateTime}
      * @throws UnsupportedTemporalTypeException if the unit is not supported
      * @throws ArithmeticException if numeric overflow occurs
      */
     @Override
-    public long until(Temporal endDateTime, TemporalUnit unit) {
-        if (endDateTime instanceof LocalDateTime == false) {
-            Objects.requireNonNull(endDateTime, "endDateTime");
-            throw new DateTimeException("Unable to calculate amount as objects are of two different types");
-        }
-        LocalDateTime end = (LocalDateTime) endDateTime;
+    public long until(Temporal endExclusive, TemporalUnit unit) {
+        LocalDateTime end = LocalDateTime.from(endExclusive);
         if (unit instanceof ChronoUnit) {
             if (unit.isTimeBased()) {
                 long amount = date.daysUntil(end.date);
@@ -1711,7 +1719,7 @@
             }
             return date.until(endDate, unit);
         }
-        return unit.between(this, endDateTime);
+        return unit.between(this, end);
     }
 
     /**
diff --git a/jdk/src/share/classes/java/time/LocalTime.java b/jdk/src/share/classes/java/time/LocalTime.java
index a6270db..77ab2c7 100644
--- a/jdk/src/share/classes/java/time/LocalTime.java
+++ b/jdk/src/share/classes/java/time/LocalTime.java
@@ -394,6 +394,7 @@
      * @throws DateTimeException if unable to convert to a {@code LocalTime}
      */
     public static LocalTime from(TemporalAccessor temporal) {
+        Objects.requireNonNull(temporal, "temporal");
         LocalTime time = temporal.query(TemporalQuery.localTime());
         if (time == null) {
             throw new DateTimeException("Unable to obtain LocalTime from TemporalAccessor: " + temporal.getClass());
@@ -1330,7 +1331,8 @@
      * objects in terms of a single {@code TemporalUnit}.
      * The start and end points are {@code this} and the specified time.
      * The result will be negative if the end is before the start.
-     * The {@code Temporal} passed to this method must be a {@code LocalTime}.
+     * The {@code Temporal} passed to this method is converted to a
+     * {@code LocalTime} using {@link #from(TemporalAccessor)}.
      * For example, the amount in hours between two times can be calculated
      * using {@code startTime.until(endTime, HOURS)}.
      * <p>
@@ -1356,25 +1358,22 @@
      * <p>
      * If the unit is not a {@code ChronoUnit}, then the result of this method
      * is obtained by invoking {@code TemporalUnit.between(Temporal, Temporal)}
-     * passing {@code this} as the first argument and the input temporal as
-     * the second argument.
+     * passing {@code this} as the first argument and the converted input temporal
+     * as the second argument.
      * <p>
      * This instance is immutable and unaffected by this method call.
      *
-     * @param endTime  the end time, which must be a {@code LocalTime}, not null
+     * @param endExclusive  the end time, exclusive, which is converted to a {@code LocalTime}, not null
      * @param unit  the unit to measure the amount in, not null
      * @return the amount of time between this time and the end time
-     * @throws DateTimeException if the amount cannot be calculated
+     * @throws DateTimeException if the amount cannot be calculated, or the end
+     *  temporal cannot be converted to a {@code LocalTime}
      * @throws UnsupportedTemporalTypeException if the unit is not supported
      * @throws ArithmeticException if numeric overflow occurs
      */
     @Override
-    public long until(Temporal endTime, TemporalUnit unit) {
-        if (endTime instanceof LocalTime == false) {
-            Objects.requireNonNull(endTime, "endTime");
-            throw new DateTimeException("Unable to calculate amount as objects are of two different types");
-        }
-        LocalTime end = (LocalTime) endTime;
+    public long until(Temporal endExclusive, TemporalUnit unit) {
+        LocalTime end = LocalTime.from(endExclusive);
         if (unit instanceof ChronoUnit) {
             long nanosUntil = end.toNanoOfDay() - toNanoOfDay();  // no overflow
             switch ((ChronoUnit) unit) {
@@ -1388,7 +1387,7 @@
             }
             throw new UnsupportedTemporalTypeException("Unsupported unit: " + unit);
         }
-        return unit.between(this, endTime);
+        return unit.between(this, end);
     }
 
     /**
diff --git a/jdk/src/share/classes/java/time/MonthDay.java b/jdk/src/share/classes/java/time/MonthDay.java
index 2280782..67f5d4f 100644
--- a/jdk/src/share/classes/java/time/MonthDay.java
+++ b/jdk/src/share/classes/java/time/MonthDay.java
@@ -246,7 +246,8 @@
      * <p>
      * The conversion extracts the {@link ChronoField#MONTH_OF_YEAR MONTH_OF_YEAR} and
      * {@link ChronoField#DAY_OF_MONTH DAY_OF_MONTH} fields.
-     * The extraction is only permitted if the date-time has an ISO chronology.
+     * The extraction is only permitted if the temporal object has an ISO
+     * chronology, or can be converted to a {@code LocalDate}.
      * <p>
      * This method matches the signature of the functional interface {@link TemporalQuery}
      * allowing it to be used in queries via method reference, {@code MonthDay::from}.
diff --git a/jdk/src/share/classes/java/time/OffsetDateTime.java b/jdk/src/share/classes/java/time/OffsetDateTime.java
index f894e53..410c7f3 100644
--- a/jdk/src/share/classes/java/time/OffsetDateTime.java
+++ b/jdk/src/share/classes/java/time/OffsetDateTime.java
@@ -1592,7 +1592,8 @@
      * For example, the period in days between two date-times can be calculated
      * using {@code startDateTime.until(endDateTime, DAYS)}.
      * <p>
-     * The {@code Temporal} passed to this method must be an {@code OffsetDateTime}.
+     * The {@code Temporal} passed to this method is converted to a
+     * {@code OffsetDateTime} using {@link #from(TemporalAccessor)}.
      * If the offset differs between the two date-times, the specified
      * end date-time is normalized to have the same offset as this date-time.
      * <p>
@@ -1620,30 +1621,27 @@
      * <p>
      * If the unit is not a {@code ChronoUnit}, then the result of this method
      * is obtained by invoking {@code TemporalUnit.between(Temporal, Temporal)}
-     * passing {@code this} as the first argument and the input temporal as
-     * the second argument.
+     * passing {@code this} as the first argument and the converted input temporal
+     * as the second argument.
      * <p>
      * This instance is immutable and unaffected by this method call.
      *
-     * @param endDateTime  the end date-time, which must be an {@code OffsetDateTime}, not null
+     * @param endExclusive  the end date, exclusive, which is converted to an {@code OffsetDateTime}, not null
      * @param unit  the unit to measure the amount in, not null
      * @return the amount of time between this date-time and the end date-time
-     * @throws DateTimeException if the amount cannot be calculated
+     * @throws DateTimeException if the amount cannot be calculated, or the end
+     *  temporal cannot be converted to an {@code OffsetDateTime}
      * @throws UnsupportedTemporalTypeException if the unit is not supported
      * @throws ArithmeticException if numeric overflow occurs
      */
     @Override
-    public long until(Temporal endDateTime, TemporalUnit unit) {
-        if (endDateTime instanceof OffsetDateTime == false) {
-            Objects.requireNonNull(endDateTime, "endDateTime");
-            throw new DateTimeException("Unable to calculate amount as objects are of two different types");
-        }
+    public long until(Temporal endExclusive, TemporalUnit unit) {
+        OffsetDateTime end = OffsetDateTime.from(endExclusive);
         if (unit instanceof ChronoUnit) {
-            OffsetDateTime end = (OffsetDateTime) endDateTime;
             end = end.withOffsetSameInstant(offset);
             return dateTime.until(end.dateTime, unit);
         }
-        return unit.between(this, endDateTime);
+        return unit.between(this, end);
     }
 
     /**
diff --git a/jdk/src/share/classes/java/time/OffsetTime.java b/jdk/src/share/classes/java/time/OffsetTime.java
index 6c67ef8..a8dbf8a 100644
--- a/jdk/src/share/classes/java/time/OffsetTime.java
+++ b/jdk/src/share/classes/java/time/OffsetTime.java
@@ -1124,7 +1124,8 @@
      * For example, the period in hours between two times can be calculated
      * using {@code startTime.until(endTime, HOURS)}.
      * <p>
-     * The {@code Temporal} passed to this method must be an {@code OffsetTime}.
+     * The {@code Temporal} passed to this method is converted to a
+     * {@code OffsetTime} using {@link #from(TemporalAccessor)}.
      * If the offset differs between the two times, then the specified
      * end time is normalized to have the same offset as this time.
      * <p>
@@ -1150,26 +1151,23 @@
      * <p>
      * If the unit is not a {@code ChronoUnit}, then the result of this method
      * is obtained by invoking {@code TemporalUnit.between(Temporal, Temporal)}
-     * passing {@code this} as the first argument and the input temporal as
-     * the second argument.
+     * passing {@code this} as the first argument and the converted input temporal
+     * as the second argument.
      * <p>
      * This instance is immutable and unaffected by this method call.
      *
-     * @param endTime  the end time, which must be an {@code OffsetTime}, not null
+     * @param endExclusive  the end date, exclusive, which is converted to an {@code OffsetTime}, not null
      * @param unit  the unit to measure the amount in, not null
      * @return the amount of time between this time and the end time
-     * @throws DateTimeException if the amount cannot be calculated
+     * @throws DateTimeException if the amount cannot be calculated, or the end
+     *  temporal cannot be converted to an {@code OffsetTime}
      * @throws UnsupportedTemporalTypeException if the unit is not supported
      * @throws ArithmeticException if numeric overflow occurs
      */
     @Override
-    public long until(Temporal endTime, TemporalUnit unit) {
-        if (endTime instanceof OffsetTime == false) {
-            Objects.requireNonNull(endTime, "endTime");
-            throw new DateTimeException("Unable to calculate amount as objects are of two different types");
-        }
+    public long until(Temporal endExclusive, TemporalUnit unit) {
+        OffsetTime end = OffsetTime.from(endExclusive);
         if (unit instanceof ChronoUnit) {
-            OffsetTime end = (OffsetTime) endTime;
             long nanosUntil = end.toEpochNano() - toEpochNano();  // no overflow
             switch ((ChronoUnit) unit) {
                 case NANOS: return nanosUntil;
@@ -1182,7 +1180,7 @@
             }
             throw new UnsupportedTemporalTypeException("Unsupported unit: " + unit);
         }
-        return unit.between(this, endTime);
+        return unit.between(this, end);
     }
 
     /**
diff --git a/jdk/src/share/classes/java/time/Period.java b/jdk/src/share/classes/java/time/Period.java
index 161ce49..bd272a9 100644
--- a/jdk/src/share/classes/java/time/Period.java
+++ b/jdk/src/share/classes/java/time/Period.java
@@ -61,7 +61,6 @@
  */
 package java.time;
 
-import static java.time.temporal.ChronoField.MONTH_OF_YEAR;
 import static java.time.temporal.ChronoUnit.DAYS;
 import static java.time.temporal.ChronoUnit.MONTHS;
 import static java.time.temporal.ChronoUnit.YEARS;
@@ -70,17 +69,19 @@
 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.ChronoPeriod;
 import java.time.chrono.Chronology;
+import java.time.chrono.IsoChronology;
 import java.time.format.DateTimeParseException;
 import java.time.temporal.ChronoUnit;
 import java.time.temporal.Temporal;
+import java.time.temporal.TemporalAccessor;
 import java.time.temporal.TemporalAmount;
+import java.time.temporal.TemporalQuery;
 import java.time.temporal.TemporalUnit;
 import java.time.temporal.UnsupportedTemporalTypeException;
-import java.time.temporal.ValueRange;
 import java.util.Arrays;
 import java.util.Collections;
 import java.util.List;
@@ -89,12 +90,13 @@
 import java.util.regex.Pattern;
 
 /**
- * A date-based amount of time, such as '2 years, 3 months and 4 days'.
+ * A date-based amount of time in the ISO-8601 calendar system,
+ * such as '2 years, 3 months and 4 days'.
  * <p>
  * This class models a quantity or amount of time in terms of years, months and days.
  * See {@link Duration} for the time-based equivalent to this class.
  * <p>
- * Durations and period differ in their treatment of daylight savings time
+ * Durations and periods differ in their treatment of daylight savings time
  * when added to {@link ZonedDateTime}. A {@code Duration} will add an exact
  * number of seconds, thus a duration of one day is always exactly 24 hours.
  * By contrast, a {@code Period} will add a conceptual day, trying to maintain
@@ -110,14 +112,12 @@
  * {@link ChronoUnit#MONTHS MONTHS} and {@link ChronoUnit#DAYS DAYS}.
  * All three fields are always present, but may be set to zero.
  * <p>
- * The period may be used with any calendar system.
- * The meaning of a "year" or "month" is only applied when the object is added to a date.
+ * The ISO-8601 calendar system is the modern civil calendar system used today
+ * in most of the world. It is equivalent to the proleptic Gregorian calendar
+ * system, in which today's rules for leap years are applied for all time.
  * <p>
  * The period is modeled as a directed amount of time, meaning that individual parts of the
  * period may be negative.
- * <p>
- * The months and years fields may be {@linkplain #normalized() normalized}.
- * The normalization assumes a 12 month year, so is not appropriate for all calendar systems.
  *
  * @implSpec
  * This class is immutable and thread-safe.
@@ -125,7 +125,7 @@
  * @since 1.8
  */
 public final class Period
-        implements TemporalAmount, Serializable {
+        implements ChronoPeriod, Serializable {
 
     /**
      * A constant for a period of zero.
@@ -140,6 +140,7 @@
      */
     private final static Pattern PATTERN =
             Pattern.compile("([-+]?)P(?:([-+]?[0-9]+)Y)?(?:([-+]?[0-9]+)M)?(?:([-+]?[0-9]+)W)?(?:([-+]?[0-9]+)D)?", Pattern.CASE_INSENSITIVE);
+
     /**
      * The set of supported units.
      */
@@ -234,12 +235,14 @@
      * <p>
      * This obtains a period based on the specified amount.
      * A {@code TemporalAmount} represents an  amount of time, which may be
-     * date-based or time-based, which this factory extracts to a period.
+     * date-based or time-based, which this factory extracts to a {@code Period}.
      * <p>
      * The conversion loops around the set of units from the amount and uses
      * the {@link ChronoUnit#YEARS YEARS}, {@link ChronoUnit#MONTHS MONTHS}
      * and {@link ChronoUnit#DAYS DAYS} units to create a period.
      * If any other units are found then an exception is thrown.
+     * <p>
+     * If the amount is a {@code ChronoPeriod} then it must use the ISO chronology.
      *
      * @param amount  the temporal amount to convert, not null
      * @return the equivalent period, not null
@@ -247,6 +250,14 @@
      * @throws ArithmeticException if the amount of years, months or days exceeds an int
      */
     public static Period from(TemporalAmount amount) {
+        if (amount instanceof Period) {
+            return (Period) amount;
+        }
+        if (amount instanceof ChronoPeriod) {
+            if (IsoChronology.INSTANCE.equals(((ChronoPeriod) amount).getChronology()) == false) {
+                throw new DateTimeException("Period requires ISO chronology: " + amount);
+            }
+        }
         Objects.requireNonNull(amount, "amount");
         int years = 0;
         int months = 0;
@@ -358,13 +369,13 @@
      * The result of this method can be a negative period if the end is before the start.
      * The negative sign will be the same in each of year, month and day.
      *
-     * @param startDate  the start date, inclusive, not null
-     * @param endDate  the end date, exclusive, not null
+     * @param startDateInclusive  the start date, inclusive, not null
+     * @param endDateExclusive  the end date, exclusive, not null
      * @return the period between this date and the end date, not null
      * @see ChronoLocalDate#until(ChronoLocalDate)
      */
-    public static Period between(LocalDate startDate, LocalDate endDate) {
-        return startDate.until(endDate);
+    public static Period between(LocalDate startDateInclusive, LocalDate endDateExclusive) {
+        return startDateInclusive.until(endDateExclusive);
     }
 
     //-----------------------------------------------------------------------
@@ -439,6 +450,21 @@
         return SUPPORTED_UNITS;
     }
 
+    /**
+     * Gets the chronology of this period, which is the ISO calendar system.
+     * <p>
+     * The {@code Chronology} represents the calendar system in use.
+     * The ISO-8601 calendar system is the modern civil calendar system used today
+     * in most of the world. It is equivalent to the proleptic Gregorian calendar
+     * system, in which today's rules for leap years are applied for all time.
+     *
+     * @return the ISO chronology, not null
+     */
+    @Override
+    public IsoChronology getChronology() {
+        return IsoChronology.INSTANCE;
+    }
+
     //-----------------------------------------------------------------------
     /**
      * Checks if all three units of this period are zero.
@@ -468,7 +494,7 @@
      * <p>
      * This returns the years unit.
      * <p>
-     * The months unit is not normalized with the years unit.
+     * The months unit is not automatically normalized with the years unit.
      * This means that a period of "15 months" is different to a period
      * of "1 year and 3 months".
      *
@@ -483,7 +509,7 @@
      * <p>
      * This returns the months unit.
      * <p>
-     * The months unit is not normalized with the years unit.
+     * The months unit is not automatically normalized with the years unit.
      * This means that a period of "15 months" is different to a period
      * of "1 year and 3 months".
      *
@@ -511,7 +537,7 @@
      * This sets the amount of the years unit in a copy of this period.
      * The months and days units are unaffected.
      * <p>
-     * The months unit is not normalized with the years unit.
+     * The months unit is not automatically normalized with the years unit.
      * This means that a period of "15 months" is different to a period
      * of "1 year and 3 months".
      * <p>
@@ -533,7 +559,7 @@
      * This sets the amount of the months unit in a copy of this period.
      * The years and days units are unaffected.
      * <p>
-     * The months unit is not normalized with the years unit.
+     * The months unit is not automatically normalized with the years unit.
      * This means that a period of "15 months" is different to a period
      * of "1 year and 3 months".
      * <p>
@@ -572,21 +598,28 @@
      * Returns a copy of this period with the specified period added.
      * <p>
      * This operates separately on the years, months and days.
+     * No normalization is performed.
      * <p>
      * For example, "1 year, 6 months and 3 days" plus "2 years, 2 months and 2 days"
      * returns "3 years, 8 months and 5 days".
      * <p>
+     * The specified amount is typically an instance of {@code Period}.
+     * Other types are interpreted using {@link Period#from(TemporalAmount)}.
+     * <p>
      * This instance is immutable and unaffected by this method call.
      *
      * @param amountToAdd  the period to add, not null
      * @return a {@code Period} based on this period with the requested period added, not null
+     * @throws DateTimeException if the specified amount has a non-ISO chronology or
+     *  contains an invalid unit
      * @throws ArithmeticException if numeric overflow occurs
      */
-    public Period plus(Period amountToAdd) {
+    public Period plus(TemporalAmount amountToAdd) {
+        Period isoAmount = Period.from(amountToAdd);
         return create(
-                Math.addExact(years, amountToAdd.years),
-                Math.addExact(months, amountToAdd.months),
-                Math.addExact(days, amountToAdd.days));
+                Math.addExact(years, isoAmount.years),
+                Math.addExact(months, isoAmount.months),
+                Math.addExact(days, isoAmount.days));
     }
 
     /**
@@ -654,21 +687,28 @@
      * Returns a copy of this period with the specified period subtracted.
      * <p>
      * This operates separately on the years, months and days.
+     * No normalization is performed.
      * <p>
      * For example, "1 year, 6 months and 3 days" minus "2 years, 2 months and 2 days"
      * returns "-1 years, 4 months and 1 day".
      * <p>
+     * The specified amount is typically an instance of {@code Period}.
+     * Other types are interpreted using {@link Period#from(TemporalAmount)}.
+     * <p>
      * This instance is immutable and unaffected by this method call.
      *
      * @param amountToSubtract  the period to subtract, not null
      * @return a {@code Period} based on this period with the requested period subtracted, not null
+     * @throws DateTimeException if the specified amount has a non-ISO chronology or
+     *  contains an invalid unit
      * @throws ArithmeticException if numeric overflow occurs
      */
-    public Period minus(Period amountToSubtract) {
+    public Period minus(TemporalAmount amountToSubtract) {
+        Period isoAmount = Period.from(amountToSubtract);
         return create(
-                Math.subtractExact(years, amountToSubtract.years),
-                Math.subtractExact(months, amountToSubtract.months),
-                Math.subtractExact(days, amountToSubtract.days));
+                Math.subtractExact(years, isoAmount.years),
+                Math.subtractExact(months, isoAmount.months),
+                Math.subtractExact(days, isoAmount.days));
     }
 
     /**
@@ -766,8 +806,7 @@
 
     //-----------------------------------------------------------------------
     /**
-     * Returns a copy of this period with the years and months normalized
-     * using a 12 month year.
+     * Returns a copy of this period with the years and months normalized.
      * <p>
      * This normalizes the years and months units, leaving the days unit unchanged.
      * The months unit is adjusted to have an absolute value less than 11,
@@ -778,8 +817,6 @@
      * For example, a period of "1 year and -25 months" will be normalized to
      * "-1 year and -1 month".
      * <p>
-     * This normalization uses a 12 month year which is not valid for all calendar systems.
-     * <p>
      * This instance is immutable and unaffected by this method call.
      *
      * @return a {@code Period} based on this period with excess months normalized to years, not null
@@ -796,13 +833,11 @@
     }
 
     /**
-     * Gets the total number of months in this period using a 12 month year.
+     * Gets the total number of months in this period.
      * <p>
      * This returns the total number of months in the period by multiplying the
      * number of years by 12 and adding the number of months.
      * <p>
-     * This uses a 12 month year which is not valid for all calendar systems.
-     * <p>
      * This instance is immutable and unaffected by this method call.
      *
      * @return the total number of months in the period, may be negative
@@ -817,6 +852,7 @@
      * <p>
      * This returns a temporal object of the same observable type as the input
      * with this period added.
+     * If the temporal has a chronology, it must be the ISO chronology.
      * <p>
      * In most cases, it is clearer to reverse the calling pattern by using
      * {@link Temporal#plus(TemporalAmount)}.
@@ -826,10 +862,17 @@
      *   dateTime = dateTime.plus(thisPeriod);
      * </pre>
      * <p>
-     * The calculation will add the years, then months, then days.
-     * Only non-zero amounts will be added.
-     * If the date-time has a calendar system with a fixed number of months in a
-     * year, then the years and months will be combined before being added.
+     * The calculation operates as follows.
+     * First, the chronology of the temporal is checked to ensure it is ISO chronology or null.
+     * Second, if the months are zero, the years are added if non-zero, otherwise
+     * the combination of years and months is added if non-zero.
+     * Finally, any days are added.
+     * <p>
+     * This approach ensures that a partial period can be added to a partial date.
+     * For example, a period of years and/or months can be added to a {@code YearMonth},
+     * but a period including days cannot.
+     * The approach also adds years and months together when necessary, which ensures
+     * correct behaviour at the end of the month.
      * <p>
      * This instance is immutable and unaffected by this method call.
      *
@@ -840,18 +883,15 @@
      */
     @Override
     public Temporal addTo(Temporal temporal) {
-        Objects.requireNonNull(temporal, "temporal");
-        if ((years | months) != 0) {
-            long monthRange = monthRange(temporal);
-            if (monthRange >= 0) {
-                temporal = temporal.plus(years * monthRange + months, MONTHS);
-            } else {
-                if (years != 0) {
-                    temporal = temporal.plus(years, YEARS);
-                }
-                if (months != 0) {
-                    temporal = temporal.plus(months, MONTHS);
-                }
+        validateChrono(temporal);
+        if (months == 0) {
+            if (years != 0) {
+                temporal = temporal.plus(years, YEARS);
+            }
+        } else {
+            long totalMonths = toTotalMonths();
+            if (totalMonths != 0) {
+                temporal = temporal.plus(totalMonths, MONTHS);
             }
         }
         if (days != 0) {
@@ -865,6 +905,7 @@
      * <p>
      * This returns a temporal object of the same observable type as the input
      * with this period subtracted.
+     * If the temporal has a chronology, it must be the ISO chronology.
      * <p>
      * In most cases, it is clearer to reverse the calling pattern by using
      * {@link Temporal#minus(TemporalAmount)}.
@@ -874,10 +915,17 @@
      *   dateTime = dateTime.minus(thisPeriod);
      * </pre>
      * <p>
-     * The calculation will subtract the years, then months, then days.
-     * Only non-zero amounts will be subtracted.
-     * If the date-time has a calendar system with a fixed number of months in a
-     * year, then the years and months will be combined before being subtracted.
+     * The calculation operates as follows.
+     * First, the chronology of the temporal is checked to ensure it is ISO chronology or null.
+     * Second, if the months are zero, the years are subtracted if non-zero, otherwise
+     * the combination of years and months is subtracted if non-zero.
+     * Finally, any days are subtracted.
+     * <p>
+     * This approach ensures that a partial period can be subtracted from a partial date.
+     * For example, a period of years and/or months can be subtracted from a {@code YearMonth},
+     * but a period including days cannot.
+     * The approach also subtracts years and months together when necessary, which ensures
+     * correct behaviour at the end of the month.
      * <p>
      * This instance is immutable and unaffected by this method call.
      *
@@ -888,18 +936,15 @@
      */
     @Override
     public Temporal subtractFrom(Temporal temporal) {
-        Objects.requireNonNull(temporal, "temporal");
-        if ((years | months) != 0) {
-            long monthRange = monthRange(temporal);
-            if (monthRange >= 0) {
-                temporal = temporal.minus(years * monthRange + months, MONTHS);
-            } else {
-                if (years != 0) {
-                    temporal = temporal.minus(years, YEARS);
-                }
-                if (months != 0) {
-                    temporal = temporal.minus(months, MONTHS);
-                }
+        validateChrono(temporal);
+        if (months == 0) {
+            if (years != 0) {
+                temporal = temporal.minus(years, YEARS);
+            }
+        } else {
+            long totalMonths = toTotalMonths();
+            if (totalMonths != 0) {
+                temporal = temporal.minus(totalMonths, MONTHS);
             }
         }
         if (days != 0) {
@@ -909,26 +954,21 @@
     }
 
     /**
-     * Calculates the range of months based on the temporal.
-     *
-     * @param temporal  the temporal, not null
-     * @return the month range, negative if not fixed range
+     * Validates that the temporal has the correct chronology.
      */
-    private long monthRange(Temporal temporal) {
-        if (temporal.isSupported(MONTH_OF_YEAR)) {
-            ValueRange startRange = Chronology.from(temporal).range(MONTH_OF_YEAR);
-            if (startRange.isFixed() && startRange.isIntValue()) {
-                return startRange.getMaximum() - startRange.getMinimum() + 1;
-            }
+    private void validateChrono(TemporalAccessor temporal) {
+        Objects.requireNonNull(temporal, "temporal");
+        Chronology temporalChrono = temporal.query(TemporalQuery.chronology());
+        if (temporalChrono != null && IsoChronology.INSTANCE.equals(temporalChrono) == false) {
+            throw new DateTimeException("Chronology mismatch, expected: ISO, actual: " + temporalChrono.getId());
         }
-        return -1;
     }
 
     //-----------------------------------------------------------------------
     /**
      * Checks if this period is equal to another period.
      * <p>
-     * The comparison is based on the amounts held in the period.
+     * The comparison is based on the type {@code Period} and each of the three amounts.
      * To be equal, the years, months and days units must be individually equal.
      * Note that this means that a period of "15 Months" is not equal to a period
      * of "1 Year and 3 Months".
diff --git a/jdk/src/share/classes/java/time/Year.java b/jdk/src/share/classes/java/time/Year.java
index f51bda6..377dfd5 100644
--- a/jdk/src/share/classes/java/time/Year.java
+++ b/jdk/src/share/classes/java/time/Year.java
@@ -242,6 +242,7 @@
         if (temporal instanceof Year) {
             return (Year) temporal;
         }
+        Objects.requireNonNull(temporal, "temporal");
         try {
             if (IsoChronology.INSTANCE.equals(Chronology.from(temporal)) == false) {
                 temporal = LocalDate.from(temporal);
@@ -859,7 +860,8 @@
      * objects in terms of a single {@code TemporalUnit}.
      * The start and end points are {@code this} and the specified year.
      * The result will be negative if the end is before the start.
-     * The {@code Temporal} passed to this method must be a {@code Year}.
+     * The {@code Temporal} passed to this method is converted to a
+     * {@code Year} using {@link #from(TemporalAccessor)}.
      * For example, the period in decades between two year can be calculated
      * using {@code startYear.until(endYear, DECADES)}.
      * <p>
@@ -885,25 +887,22 @@
      * <p>
      * If the unit is not a {@code ChronoUnit}, then the result of this method
      * is obtained by invoking {@code TemporalUnit.between(Temporal, Temporal)}
-     * passing {@code this} as the first argument and the input temporal as
-     * the second argument.
+     * passing {@code this} as the first argument and the converted input temporal
+     * as the second argument.
      * <p>
      * This instance is immutable and unaffected by this method call.
      *
-     * @param endYear  the end year, which must be a {@code Year}, not null
+     * @param endExclusive  the end date, exclusive, which is converted to a {@code Year}, not null
      * @param unit  the unit to measure the amount in, not null
      * @return the amount of time between this year and the end year
-     * @throws DateTimeException if the amount cannot be calculated
+     * @throws DateTimeException if the amount cannot be calculated, or the end
+     *  temporal cannot be converted to a {@code Year}
      * @throws UnsupportedTemporalTypeException if the unit is not supported
      * @throws ArithmeticException if numeric overflow occurs
      */
     @Override
-    public long until(Temporal endYear, TemporalUnit unit) {
-        if (endYear instanceof Year == false) {
-            Objects.requireNonNull(endYear, "endYear");
-            throw new DateTimeException("Unable to calculate amount as objects are of two different types");
-        }
-        Year end = (Year) endYear;
+    public long until(Temporal endExclusive, TemporalUnit unit) {
+        Year end = Year.from(endExclusive);
         if (unit instanceof ChronoUnit) {
             long yearsUntil = ((long) end.year) - year;  // no overflow
             switch ((ChronoUnit) unit) {
@@ -915,7 +914,7 @@
             }
             throw new UnsupportedTemporalTypeException("Unsupported unit: " + unit);
         }
-        return unit.between(this, endYear);
+        return unit.between(this, end);
     }
 
     /**
diff --git a/jdk/src/share/classes/java/time/YearMonth.java b/jdk/src/share/classes/java/time/YearMonth.java
index 5416761..223c90a 100644
--- a/jdk/src/share/classes/java/time/YearMonth.java
+++ b/jdk/src/share/classes/java/time/YearMonth.java
@@ -245,6 +245,7 @@
         if (temporal instanceof YearMonth) {
             return (YearMonth) temporal;
         }
+        Objects.requireNonNull(temporal, "temporal");
         try {
             if (IsoChronology.INSTANCE.equals(Chronology.from(temporal)) == false) {
                 temporal = LocalDate.from(temporal);
@@ -992,7 +993,8 @@
      * objects in terms of a single {@code TemporalUnit}.
      * The start and end points are {@code this} and the specified year-month.
      * The result will be negative if the end is before the start.
-     * The {@code Temporal} passed to this method must be a {@code YearMonth}.
+     * The {@code Temporal} passed to this method is converted to a
+     * {@code YearMonth} using {@link #from(TemporalAccessor)}.
      * For example, the period in years between two year-months can be calculated
      * using {@code startYearMonth.until(endYearMonth, YEARS)}.
      * <p>
@@ -1018,25 +1020,22 @@
      * <p>
      * If the unit is not a {@code ChronoUnit}, then the result of this method
      * is obtained by invoking {@code TemporalUnit.between(Temporal, Temporal)}
-     * passing {@code this} as the first argument and the input temporal as
-     * the second argument.
+     * passing {@code this} as the first argument and the converted input temporal
+     * as the second argument.
      * <p>
      * This instance is immutable and unaffected by this method call.
      *
-     * @param endYearMonth  the end year-month, which must be a {@code YearMonth}, not null
+     * @param endExclusive  the end date, exclusive, which is converted to a {@code YearMonth}, not null
      * @param unit  the unit to measure the amount in, not null
      * @return the amount of time between this year-month and the end year-month
-     * @throws DateTimeException if the amount cannot be calculated
+     * @throws DateTimeException if the amount cannot be calculated, or the end
+     *  temporal cannot be converted to a {@code YearMonth}
      * @throws UnsupportedTemporalTypeException if the unit is not supported
      * @throws ArithmeticException if numeric overflow occurs
      */
     @Override
-    public long until(Temporal endYearMonth, TemporalUnit unit) {
-        if (endYearMonth instanceof YearMonth == false) {
-            Objects.requireNonNull(endYearMonth, "endYearMonth");
-            throw new DateTimeException("Unable to calculate amount as objects are of two different types");
-        }
-        YearMonth end = (YearMonth) endYearMonth;
+    public long until(Temporal endExclusive, TemporalUnit unit) {
+        YearMonth end = YearMonth.from(endExclusive);
         if (unit instanceof ChronoUnit) {
             long monthsUntil = end.getProlepticMonth() - getProlepticMonth();  // no overflow
             switch ((ChronoUnit) unit) {
@@ -1049,7 +1048,7 @@
             }
             throw new UnsupportedTemporalTypeException("Unsupported unit: " + unit);
         }
-        return unit.between(this, endYearMonth);
+        return unit.between(this, end);
     }
 
     /**
diff --git a/jdk/src/share/classes/java/time/ZoneOffset.java b/jdk/src/share/classes/java/time/ZoneOffset.java
index 2d63a97..3475e5f 100644
--- a/jdk/src/share/classes/java/time/ZoneOffset.java
+++ b/jdk/src/share/classes/java/time/ZoneOffset.java
@@ -333,6 +333,7 @@
      * @throws DateTimeException if unable to convert to an {@code ZoneOffset}
      */
     public static ZoneOffset from(TemporalAccessor temporal) {
+        Objects.requireNonNull(temporal, "temporal");
         ZoneOffset offset = temporal.query(TemporalQuery.offset());
         if (offset == null) {
             throw new DateTimeException("Unable to obtain ZoneOffset from TemporalAccessor: " + temporal.getClass());
diff --git a/jdk/src/share/classes/java/time/ZonedDateTime.java b/jdk/src/share/classes/java/time/ZonedDateTime.java
index 251ca88..1114ab4 100644
--- a/jdk/src/share/classes/java/time/ZonedDateTime.java
+++ b/jdk/src/share/classes/java/time/ZonedDateTime.java
@@ -1540,6 +1540,11 @@
      */
     @Override
     public ZonedDateTime plus(TemporalAmount amountToAdd) {
+        if (amountToAdd instanceof Period) {
+            Period periodToAdd = (Period) amountToAdd;
+            return resolveLocal(dateTime.plus(periodToAdd));
+        }
+        Objects.requireNonNull(amountToAdd, "amountToAdd");
         return (ZonedDateTime) amountToAdd.addTo(this);
     }
 
@@ -1787,6 +1792,11 @@
      */
     @Override
     public ZonedDateTime minus(TemporalAmount amountToSubtract) {
+        if (amountToSubtract instanceof Period) {
+            Period periodToSubtract = (Period) amountToSubtract;
+            return resolveLocal(dateTime.minus(periodToSubtract));
+        }
+        Objects.requireNonNull(amountToSubtract, "amountToSubtract");
         return (ZonedDateTime) amountToSubtract.subtractFrom(this);
     }
 
@@ -2034,7 +2044,8 @@
      * For example, the period in days between two date-times can be calculated
      * using {@code startDateTime.until(endDateTime, DAYS)}.
      * <p>
-     * The {@code Temporal} passed to this method must be a {@code ZonedDateTime}.
+     * The {@code Temporal} passed to this method is converted to a
+     * {@code ZonedDateTime} using {@link #from(TemporalAccessor)}.
      * If the time-zone differs between the two zoned date-times, the specified
      * end date-time is normalized to have the same zone as this date-time.
      * <p>
@@ -2076,26 +2087,23 @@
      * <p>
      * If the unit is not a {@code ChronoUnit}, then the result of this method
      * is obtained by invoking {@code TemporalUnit.between(Temporal, Temporal)}
-     * passing {@code this} as the first argument and the input temporal as
-     * the second argument.
+     * passing {@code this} as the first argument and the converted input temporal
+     * as the second argument.
      * <p>
      * This instance is immutable and unaffected by this method call.
      *
-     * @param endDateTime  the end date-time, which must be a {@code ZonedDateTime}, not null
+     * @param endExclusive  the end date, exclusive, which is converted to a {@code ZonedDateTime}, not null
      * @param unit  the unit to measure the amount in, not null
      * @return the amount of time between this date-time and the end date-time
-     * @throws DateTimeException if the amount cannot be calculated
+     * @throws DateTimeException if the amount cannot be calculated, or the end
+     *  temporal cannot be converted to a {@code ZonedDateTime}
      * @throws UnsupportedTemporalTypeException if the unit is not supported
      * @throws ArithmeticException if numeric overflow occurs
      */
     @Override
-    public long until(Temporal endDateTime, TemporalUnit unit) {
-        if (endDateTime instanceof ZonedDateTime == false) {
-            Objects.requireNonNull(endDateTime, "endDateTime");
-            throw new DateTimeException("Unable to calculate amount as objects are of two different types");
-        }
+    public long until(Temporal endExclusive, TemporalUnit unit) {
+        ZonedDateTime end = ZonedDateTime.from(endExclusive);
         if (unit instanceof ChronoUnit) {
-            ZonedDateTime end = (ZonedDateTime) endDateTime;
             end = end.withZoneSameInstant(zone);
             if (unit.isDateBased()) {
                 return dateTime.until(end.dateTime, unit);
@@ -2103,7 +2111,7 @@
                 return toOffsetDateTime().until(end.toOffsetDateTime(), unit);
             }
         }
-        return unit.between(this, endDateTime);
+        return unit.between(this, end);
     }
 
     /**
diff --git a/jdk/src/share/classes/java/time/chrono/ChronoLocalDate.java b/jdk/src/share/classes/java/time/chrono/ChronoLocalDate.java
index 923e896..58e4f5d 100644
--- a/jdk/src/share/classes/java/time/chrono/ChronoLocalDate.java
+++ b/jdk/src/share/classes/java/time/chrono/ChronoLocalDate.java
@@ -69,7 +69,6 @@
 import java.time.DateTimeException;
 import java.time.LocalDate;
 import java.time.LocalTime;
-import java.time.Period;
 import java.time.format.DateTimeFormatter;
 import java.time.temporal.ChronoField;
 import java.time.temporal.ChronoUnit;
@@ -292,6 +291,7 @@
         if (temporal instanceof ChronoLocalDate) {
             return (ChronoLocalDate) temporal;
         }
+        Objects.requireNonNull(temporal, "temporal");
         Chronology chrono = temporal.query(TemporalQuery.chronology());
         if (chrono == null) {
             throw new DateTimeException("Unable to obtain ChronoLocalDate from TemporalAccessor: " + temporal.getClass());
@@ -428,7 +428,7 @@
      */
     @Override
     default ChronoLocalDate with(TemporalAdjuster adjuster) {
-        return ChronoDateImpl.ensureValid(getChronology(), Temporal.super.with(adjuster));
+        return ChronoLocalDateImpl.ensureValid(getChronology(), Temporal.super.with(adjuster));
     }
 
     /**
@@ -442,7 +442,7 @@
         if (field instanceof ChronoField) {
             throw new UnsupportedTemporalTypeException("Unsupported field: " + field);
         }
-        return ChronoDateImpl.ensureValid(getChronology(), field.adjustInto(this, newValue));
+        return ChronoLocalDateImpl.ensureValid(getChronology(), field.adjustInto(this, newValue));
     }
 
     /**
@@ -452,7 +452,7 @@
      */
     @Override
     default ChronoLocalDate plus(TemporalAmount amount) {
-        return ChronoDateImpl.ensureValid(getChronology(), Temporal.super.plus(amount));
+        return ChronoLocalDateImpl.ensureValid(getChronology(), Temporal.super.plus(amount));
     }
 
     /**
@@ -465,7 +465,7 @@
         if (unit instanceof ChronoUnit) {
             throw new UnsupportedTemporalTypeException("Unsupported unit: " + unit);
         }
-        return ChronoDateImpl.ensureValid(getChronology(), unit.addTo(this, amountToAdd));
+        return ChronoLocalDateImpl.ensureValid(getChronology(), unit.addTo(this, amountToAdd));
     }
 
     /**
@@ -475,7 +475,7 @@
      */
     @Override
     default ChronoLocalDate minus(TemporalAmount amount) {
-        return ChronoDateImpl.ensureValid(getChronology(), Temporal.super.minus(amount));
+        return ChronoLocalDateImpl.ensureValid(getChronology(), Temporal.super.minus(amount));
     }
 
     /**
@@ -486,7 +486,7 @@
      */
     @Override
     default ChronoLocalDate minus(long amountToSubtract, TemporalUnit unit) {
-        return ChronoDateImpl.ensureValid(getChronology(), Temporal.super.minus(amountToSubtract, unit));
+        return ChronoLocalDateImpl.ensureValid(getChronology(), Temporal.super.minus(amountToSubtract, unit));
     }
 
     //-----------------------------------------------------------------------
@@ -561,8 +561,8 @@
      * objects in terms of a single {@code TemporalUnit}.
      * The start and end points are {@code this} and the specified date.
      * The result will be negative if the end is before the start.
-     * The {@code Temporal} passed to this method must be a
-     * {@code ChronoLocalDate} in the same chronology.
+     * The {@code Temporal} passed to this method is converted to a
+     * {@code ChronoLocalDate} using {@link Chronology#date(TemporalAccessor)}.
      * The calculation returns a whole number, representing the number of
      * complete units between the two dates.
      * For example, the amount in days between two dates can be calculated
@@ -586,25 +586,30 @@
      * <p>
      * If the unit is not a {@code ChronoUnit}, then the result of this method
      * is obtained by invoking {@code TemporalUnit.between(Temporal, Temporal)}
-     * passing {@code this} as the first argument and the input temporal as
+     * passing {@code this} as the first argument and the converted input temporal as
      * the second argument.
      * <p>
      * This instance is immutable and unaffected by this method call.
      *
-     * @param endDate  the end date, which must be a {@code ChronoLocalDate}
-     *  in the same chronology, not null
+     * @param endExclusive  the end date, exclusive, which is converted to a
+     *  {@code ChronoLocalDate} in the same chronology, not null
      * @param unit  the unit to measure the amount in, not null
      * @return the amount of time between this date and the end date
-     * @throws DateTimeException if the amount cannot be calculated
+     * @throws DateTimeException if the amount cannot be calculated, or the end
+     *  temporal cannot be converted to a {@code ChronoLocalDate}
+     * @throws UnsupportedTemporalTypeException if the unit is not supported
      * @throws ArithmeticException if numeric overflow occurs
      */
     @Override  // override for Javadoc
-    long until(Temporal endDate, TemporalUnit unit);
+    long until(Temporal endExclusive, TemporalUnit unit);
 
     /**
-     * Calculates the period between this date and another date as a {@code Period}.
+     * Calculates the period between this date and another date as a {@code ChronoPeriod}.
      * <p>
-     * This calculates the period between two dates in terms of years, months and days.
+     * This calculates the period between two dates. All supplied chronologies
+     * calculate the period using years, months and days, however the
+     * {@code ChronoPeriod} API allows the period to be represented using other units.
+     * <p>
      * The start and end points are {@code this} and the specified date.
      * The result will be negative if the end is before the start.
      * The negative sign will be the same in each of year, month and day.
@@ -614,12 +619,12 @@
      * <p>
      * This instance is immutable and unaffected by this method call.
      *
-     * @param endDate  the end date, exclusive, which may be in any chronology, not null
+     * @param endDateExclusive  the end date, exclusive, which may be in any chronology, not null
      * @return the period between this date and the end date, not null
      * @throws DateTimeException if the period cannot be calculated
      * @throws ArithmeticException if numeric overflow occurs
      */
-    Period until(ChronoLocalDate endDate);
+    ChronoPeriod until(ChronoLocalDate endDateExclusive);
 
     /**
      * Formats this date using the specified formatter.
diff --git a/jdk/src/share/classes/java/time/chrono/ChronoDateImpl.java b/jdk/src/share/classes/java/time/chrono/ChronoLocalDateImpl.java
similarity index 92%
rename from jdk/src/share/classes/java/time/chrono/ChronoDateImpl.java
rename to jdk/src/share/classes/java/time/chrono/ChronoLocalDateImpl.java
index 99ba58f..6cb115d 100644
--- a/jdk/src/share/classes/java/time/chrono/ChronoDateImpl.java
+++ b/jdk/src/share/classes/java/time/chrono/ChronoLocalDateImpl.java
@@ -140,7 +140,7 @@
  * @param <D> the ChronoLocalDate of this date-time
  * @since 1.8
  */
-abstract class ChronoDateImpl<D extends ChronoLocalDate>
+abstract class ChronoLocalDateImpl<D extends ChronoLocalDate>
         implements ChronoLocalDate, Temporal, TemporalAdjuster, Serializable {
 
     /**
@@ -170,7 +170,7 @@
     /**
      * Creates an instance.
      */
-    ChronoDateImpl() {
+    ChronoLocalDateImpl() {
     }
 
     @Override
@@ -309,7 +309,7 @@
      */
     @SuppressWarnings("unchecked")
     D minusYears(long yearsToSubtract) {
-        return (yearsToSubtract == Long.MIN_VALUE ? ((ChronoDateImpl<D>)plusYears(Long.MAX_VALUE)).plusYears(1) : plusYears(-yearsToSubtract));
+        return (yearsToSubtract == Long.MIN_VALUE ? ((ChronoLocalDateImpl<D>)plusYears(Long.MAX_VALUE)).plusYears(1) : plusYears(-yearsToSubtract));
     }
 
     /**
@@ -330,7 +330,7 @@
      */
     @SuppressWarnings("unchecked")
     D minusMonths(long monthsToSubtract) {
-        return (monthsToSubtract == Long.MIN_VALUE ? ((ChronoDateImpl<D>)plusMonths(Long.MAX_VALUE)).plusMonths(1) : plusMonths(-monthsToSubtract));
+        return (monthsToSubtract == Long.MIN_VALUE ? ((ChronoLocalDateImpl<D>)plusMonths(Long.MAX_VALUE)).plusMonths(1) : plusMonths(-monthsToSubtract));
     }
 
     /**
@@ -350,7 +350,7 @@
      */
     @SuppressWarnings("unchecked")
     D minusWeeks(long weeksToSubtract) {
-        return (weeksToSubtract == Long.MIN_VALUE ? ((ChronoDateImpl<D>)plusWeeks(Long.MAX_VALUE)).plusWeeks(1) : plusWeeks(-weeksToSubtract));
+        return (weeksToSubtract == Long.MIN_VALUE ? ((ChronoLocalDateImpl<D>)plusWeeks(Long.MAX_VALUE)).plusWeeks(1) : plusWeeks(-weeksToSubtract));
     }
 
     /**
@@ -368,26 +368,14 @@
      */
     @SuppressWarnings("unchecked")
     D minusDays(long daysToSubtract) {
-        return (daysToSubtract == Long.MIN_VALUE ? ((ChronoDateImpl<D>)plusDays(Long.MAX_VALUE)).plusDays(1) : plusDays(-daysToSubtract));
+        return (daysToSubtract == Long.MIN_VALUE ? ((ChronoLocalDateImpl<D>)plusDays(Long.MAX_VALUE)).plusDays(1) : plusDays(-daysToSubtract));
     }
 
     //-----------------------------------------------------------------------
-    /**
-     * {@inheritDoc}
-     * @throws DateTimeException {@inheritDoc}
-     * @throws ArithmeticException {@inheritDoc}
-     */
     @Override
-    public long until(Temporal endDateTime, TemporalUnit unit) {
-        Objects.requireNonNull(endDateTime, "endDateTime");
-        Objects.requireNonNull(unit, "unit");
-        if (endDateTime instanceof ChronoLocalDate == false) {
-            throw new DateTimeException("Unable to calculate amount as objects are of two different types");
-        }
-        ChronoLocalDate end = (ChronoLocalDate) endDateTime;
-        if (getChronology().equals(end.getChronology()) == false) {
-            throw new DateTimeException("Unable to calculate amount as objects have different chronologies");
-        }
+    public long until(Temporal endExclusive, TemporalUnit unit) {
+        Objects.requireNonNull(endExclusive, "endExclusive");
+        ChronoLocalDate end = getChronology().date(endExclusive);
         if (unit instanceof ChronoUnit) {
             switch ((ChronoUnit) unit) {
                 case DAYS: return daysUntil(end);
@@ -401,7 +389,8 @@
             }
             throw new UnsupportedTemporalTypeException("Unsupported unit: " + unit);
         }
-        return unit.between(this, endDateTime);
+        Objects.requireNonNull(unit, "unit");
+        return unit.between(this, end);
     }
 
     private long daysUntil(ChronoLocalDate end) {
@@ -411,7 +400,7 @@
     private long monthsUntil(ChronoLocalDate end) {
         ValueRange range = getChronology().range(MONTH_OF_YEAR);
         if (range.getMaximum() != 12) {
-            throw new IllegalStateException("ChronoDateImpl only supports Chronologies with 12 months per year");
+            throw new IllegalStateException("ChronoLocalDateImpl only supports Chronologies with 12 months per year");
         }
         long packed1 = getLong(PROLEPTIC_MONTH) * 32L + get(DAY_OF_MONTH);  // no overflow
         long packed2 = end.getLong(PROLEPTIC_MONTH) * 32L + end.get(DAY_OF_MONTH);  // no overflow
diff --git a/jdk/src/share/classes/java/time/chrono/ChronoLocalDateTime.java b/jdk/src/share/classes/java/time/chrono/ChronoLocalDateTime.java
index be93f0e..4c2ddfd 100644
--- a/jdk/src/share/classes/java/time/chrono/ChronoLocalDateTime.java
+++ b/jdk/src/share/classes/java/time/chrono/ChronoLocalDateTime.java
@@ -165,6 +165,7 @@
         if (temporal instanceof ChronoLocalDateTime) {
             return (ChronoLocalDateTime<?>) temporal;
         }
+        Objects.requireNonNull(temporal, "temporal");
         Chronology chrono = temporal.query(TemporalQuery.chronology());
         if (chrono == null) {
             throw new DateTimeException("Unable to obtain ChronoLocalDateTime from TemporalAccessor: " + temporal.getClass());
@@ -174,6 +175,18 @@
 
     //-----------------------------------------------------------------------
     /**
+     * Gets the chronology of this date-time.
+     * <p>
+     * The {@code Chronology} represents the calendar system in use.
+     * The era and other fields in {@link ChronoField} are defined by the chronology.
+     *
+     * @return the chronology, not null
+     */
+    default Chronology getChronology() {
+        return toLocalDate().getChronology();
+    }
+
+    /**
      * Gets the local date part of this date-time.
      * <p>
      * This returns a local date with the same year, month and day
@@ -250,7 +263,7 @@
      */
     @Override
     default ChronoLocalDateTime<D> with(TemporalAdjuster adjuster) {
-        return ChronoLocalDateTimeImpl.ensureValid(toLocalDate().getChronology(), Temporal.super.with(adjuster));
+        return ChronoLocalDateTimeImpl.ensureValid(getChronology(), Temporal.super.with(adjuster));
     }
 
     /**
@@ -268,7 +281,7 @@
      */
     @Override
     default ChronoLocalDateTime<D> plus(TemporalAmount amount) {
-        return ChronoLocalDateTimeImpl.ensureValid(toLocalDate().getChronology(), Temporal.super.plus(amount));
+        return ChronoLocalDateTimeImpl.ensureValid(getChronology(), Temporal.super.plus(amount));
     }
 
     /**
@@ -286,7 +299,7 @@
      */
     @Override
     default ChronoLocalDateTime<D> minus(TemporalAmount amount) {
-        return ChronoLocalDateTimeImpl.ensureValid(toLocalDate().getChronology(), Temporal.super.minus(amount));
+        return ChronoLocalDateTimeImpl.ensureValid(getChronology(), Temporal.super.minus(amount));
     }
 
     /**
@@ -296,7 +309,7 @@
      */
     @Override
     default ChronoLocalDateTime<D> minus(long amountToSubtract, TemporalUnit unit) {
-        return ChronoLocalDateTimeImpl.ensureValid(toLocalDate().getChronology(), Temporal.super.minus(amountToSubtract, unit));
+        return ChronoLocalDateTimeImpl.ensureValid(getChronology(), Temporal.super.minus(amountToSubtract, unit));
     }
 
     //-----------------------------------------------------------------------
@@ -326,7 +339,7 @@
         } else if (query == TemporalQuery.localTime()) {
             return (R) toLocalTime();
         } else if (query == TemporalQuery.chronology()) {
-            return (R) toLocalDate().getChronology();
+            return (R) getChronology();
         } else if (query == TemporalQuery.precision()) {
             return (R) NANOS;
         }
@@ -488,7 +501,7 @@
         if (cmp == 0) {
             cmp = toLocalTime().compareTo(other.toLocalTime());
             if (cmp == 0) {
-                cmp = toLocalDate().getChronology().compareTo(other.toLocalDate().getChronology());
+                cmp = getChronology().compareTo(other.getChronology());
             }
         }
         return cmp;
diff --git a/jdk/src/share/classes/java/time/chrono/ChronoLocalDateTimeImpl.java b/jdk/src/share/classes/java/time/chrono/ChronoLocalDateTimeImpl.java
index cd7f04e..e33e82e 100644
--- a/jdk/src/share/classes/java/time/chrono/ChronoLocalDateTimeImpl.java
+++ b/jdk/src/share/classes/java/time/chrono/ChronoLocalDateTimeImpl.java
@@ -69,7 +69,6 @@
 import java.io.ObjectOutput;
 import java.io.ObjectStreamException;
 import java.io.Serializable;
-import java.time.DateTimeException;
 import java.time.LocalTime;
 import java.time.ZoneId;
 import java.time.temporal.ChronoField;
@@ -187,9 +186,9 @@
     static <R extends ChronoLocalDate> ChronoLocalDateTimeImpl<R> ensureValid(Chronology chrono, Temporal temporal) {
         @SuppressWarnings("unchecked")
         ChronoLocalDateTimeImpl<R> other = (ChronoLocalDateTimeImpl<R>) temporal;
-        if (chrono.equals(other.toLocalDate().getChronology()) == false) {
+        if (chrono.equals(other.getChronology()) == false) {
             throw new ClassCastException("Chronology mismatch, required: " + chrono.getId()
-                    + ", actual: " + other.toLocalDate().getChronology().getId());
+                    + ", actual: " + other.getChronology().getId());
         }
         return other;
     }
@@ -220,7 +219,7 @@
             return this;
         }
         // Validate that the new Temporal is a ChronoLocalDate (and not something else)
-        D cd = ChronoDateImpl.ensureValid(date.getChronology(), newDate);
+        D cd = ChronoLocalDateImpl.ensureValid(date.getChronology(), newDate);
         return new ChronoLocalDateTimeImpl<>(cd, newTime);
     }
 
@@ -369,15 +368,10 @@
 
     //-----------------------------------------------------------------------
     @Override
-    public long until(Temporal endDateTime, TemporalUnit unit) {
-        if (endDateTime instanceof ChronoLocalDateTime == false) {
-            throw new DateTimeException("Unable to calculate amount as objects are of two different types");
-        }
+    public long until(Temporal endExclusive, TemporalUnit unit) {
+        Objects.requireNonNull(endExclusive, "endExclusive");
         @SuppressWarnings("unchecked")
-        ChronoLocalDateTime<D> end = (ChronoLocalDateTime<D>) endDateTime;
-        if (toLocalDate().getChronology().equals(end.toLocalDate().getChronology()) == false) {
-            throw new DateTimeException("Unable to calculate amount as objects have different chronologies");
-        }
+        ChronoLocalDateTime<D> end = (ChronoLocalDateTime<D>) getChronology().localDateTime(endExclusive);
         if (unit instanceof ChronoUnit) {
             if (unit.isTimeBased()) {
                 long amount = end.getLong(EPOCH_DAY) - date.getLong(EPOCH_DAY);
@@ -398,7 +392,8 @@
             }
             return date.until(endDate, unit);
         }
-        return unit.between(this, endDateTime);
+        Objects.requireNonNull(unit, "unit");
+        return unit.between(this, end);
     }
 
     //-----------------------------------------------------------------------
diff --git a/jdk/src/share/classes/java/time/chrono/ChronoPeriod.java b/jdk/src/share/classes/java/time/chrono/ChronoPeriod.java
new file mode 100644
index 0000000..0ac1d39
--- /dev/null
+++ b/jdk/src/share/classes/java/time/chrono/ChronoPeriod.java
@@ -0,0 +1,365 @@
+/*
+ * Copyright (c) 2013, Oracle and/or its affiliates. All rights reserved.
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * This code is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU General Public License version 2 only, as
+ * published by the Free Software Foundation.  Oracle designates this
+ * particular file as subject to the "Classpath" exception as provided
+ * by Oracle in the LICENSE file that accompanied this code.
+ *
+ * This code is distributed in the hope that it will be useful, but WITHOUT
+ * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
+ * version 2 for more details (a copy is included in the LICENSE file that
+ * accompanied this code).
+ *
+ * You should have received a copy of the GNU General Public License version
+ * 2 along with this work; if not, write to the Free Software Foundation,
+ * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
+ *
+ * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
+ * or visit www.oracle.com if you need additional information or have any
+ * questions.
+ */
+
+/*
+ * This file is available under and governed by the GNU General Public
+ * License version 2 only, as published by the Free Software Foundation.
+ * However, the following notice accompanied the original version of this
+ * file:
+ *
+ * Copyright (c) 2013, Stephen Colebourne & Michael Nascimento Santos
+ *
+ * All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions are met:
+ *
+ *  * Redistributions of source code must retain the above copyright notice,
+ *    this list of conditions and the following disclaimer.
+ *
+ *  * Redistributions in binary form must reproduce the above copyright notice,
+ *    this list of conditions and the following disclaimer in the documentation
+ *    and/or other materials provided with the distribution.
+ *
+ *  * Neither the name of JSR-310 nor the names of its contributors
+ *    may be used to endorse or promote products derived from this software
+ *    without specific prior written permission.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+ * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
+ * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
+ * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR
+ * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
+ * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
+ * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
+ * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
+ * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
+ * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
+ * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ */
+package java.time.chrono;
+
+import java.time.DateTimeException;
+import java.time.temporal.ChronoUnit;
+import java.time.temporal.Temporal;
+import java.time.temporal.TemporalAmount;
+import java.time.temporal.TemporalUnit;
+import java.time.temporal.UnsupportedTemporalTypeException;
+import java.util.List;
+import java.util.Objects;
+
+/**
+ * A date-based amount of time, such as '3 years, 4 months and 5 days' in an
+ * arbitrary chronology, intended for advanced globalization use cases.
+ * <p>
+ * This interface models a date-based amount of time in a calendar system.
+ * While most calendar systems use years, months and days, some do not.
+ * Therefore, this interface operates solely in terms of a set of supported
+ * units that are defined by the {@code Chronology}.
+ * The set of supported units is fixed for a given chronology.
+ * The amount of a supported unit may be set to zero.
+ * <p>
+ * The period is modeled as a directed amount of time, meaning that individual
+ * parts of the period may be negative.
+ *
+ * @implSpec
+ * 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 interface ChronoPeriod
+        extends TemporalAmount {
+
+    /**
+     * Obtains a {@code ChronoPeriod} consisting of amount of time between two dates.
+     * <p>
+     * The start date is included, but the end date is not.
+     * The period is calculated using {@link ChronoLocalDate#until(ChronoLocalDate)}.
+     * As such, the calculation is chronology specific.
+     * <p>
+     * The chronology of the first date is used.
+     * The chronology of the second date is ignored, with the date being converted
+     * to the target chronology system before the calculation starts.
+     * <p>
+     * The result of this method can be a negative period if the end is before the start.
+     * In most cases, the positive/negative sign will be the same in each of the supported fields.
+     *
+     * @param startDateInclusive  the start date, inclusive, specifying the chronology of the calculation, not null
+     * @param endDateExclusive  the end date, exclusive, in any chronology, not null
+     * @return the period between this date and the end date, not null
+     * @see ChronoLocalDate#until(ChronoLocalDate)
+     */
+    public static ChronoPeriod between(ChronoLocalDate startDateInclusive, ChronoLocalDate endDateExclusive) {
+        Objects.requireNonNull(startDateInclusive, "startDateInclusive");
+        Objects.requireNonNull(endDateExclusive, "endDateExclusive");
+        return startDateInclusive.until(endDateExclusive);
+    }
+
+    //-----------------------------------------------------------------------
+    /**
+     * Gets the value of the requested unit.
+     * <p>
+     * The supported units are chronology specific.
+     * They will typically be {@link ChronoUnit#YEARS YEARS},
+     * {@link ChronoUnit#MONTHS MONTHS} and {@link ChronoUnit#DAYS DAYS}.
+     * Requesting an unsupported unit will throw an exception.
+     *
+     * @param unit the {@code TemporalUnit} for which to return the value
+     * @return the long value of the unit
+     * @throws DateTimeException if the unit is not supported
+     * @throws UnsupportedTemporalTypeException if the unit is not supported
+     */
+    @Override
+    long get(TemporalUnit unit);
+
+    /**
+     * Gets the set of units supported by this period.
+     * <p>
+     * The supported units are chronology specific.
+     * They will typically be {@link ChronoUnit#YEARS YEARS},
+     * {@link ChronoUnit#MONTHS MONTHS} and {@link ChronoUnit#DAYS DAYS}.
+     * They are returned in order from largest to smallest.
+     * <p>
+     * This set can be used in conjunction with {@link #get(TemporalUnit)}
+     * to access the entire state of the period.
+     *
+     * @return a list containing the supported units, not null
+     */
+    @Override
+    List<TemporalUnit> getUnits();
+
+    /**
+     * Gets the chronology that defines the meaning of the supported units.
+     * <p>
+     * The period is defined by the chronology.
+     * It controls the supported units and restricts addition/subtraction
+     * to {@code ChronoLocalDate} instances of the same chronology.
+     *
+     * @return the chronology defining the period, not null
+     */
+    Chronology getChronology();
+
+    //-----------------------------------------------------------------------
+    /**
+     * Checks if all the supported units of this period are zero.
+     *
+     * @return true if this period is zero-length
+     */
+    default boolean isZero() {
+        for (TemporalUnit unit : getUnits()) {
+            if (get(unit) != 0) {
+                return false;
+            }
+        }
+        return true;
+    }
+
+    /**
+     * Checks if any of the supported units of this period are negative.
+     *
+     * @return true if any unit of this period is negative
+     */
+    default boolean isNegative() {
+        for (TemporalUnit unit : getUnits()) {
+            if (get(unit) < 0) {
+                return true;
+            }
+        }
+        return false;
+    }
+
+    //-----------------------------------------------------------------------
+    /**
+     * Returns a copy of this period with the specified period added.
+     * <p>
+     * If the specified amount is a {@code ChronoPeriod} then it must have
+     * the same chronology as this period. Implementations may choose to
+     * accept or reject other {@code TemporalAmount} implementations.
+     * <p>
+     * This instance is immutable and unaffected by this method call.
+     *
+     * @param amountToAdd  the period to add, not null
+     * @return a {@code ChronoPeriod} based on this period with the requested period added, not null
+     * @throws ArithmeticException if numeric overflow occurs
+     */
+    ChronoPeriod plus(TemporalAmount amountToAdd);
+
+    /**
+     * Returns a copy of this period with the specified period subtracted.
+     * <p>
+     * If the specified amount is a {@code ChronoPeriod} then it must have
+     * the same chronology as this period. Implementations may choose to
+     * accept or reject other {@code TemporalAmount} implementations.
+     * <p>
+     * This instance is immutable and unaffected by this method call.
+     *
+     * @param amountToSubtract  the period to subtract, not null
+     * @return a {@code ChronoPeriod} based on this period with the requested period subtracted, not null
+     * @throws ArithmeticException if numeric overflow occurs
+     */
+    ChronoPeriod minus(TemporalAmount amountToSubtract);
+
+    //-----------------------------------------------------------------------
+    /**
+     * Returns a new instance with each amount in this period in this period
+     * multiplied by the specified scalar.
+     * <p>
+     * This returns a period with each supported unit individually multiplied.
+     * For example, a period of "2 years, -3 months and 4 days" multiplied by
+     * 3 will return "6 years, -9 months and 12 days".
+     * No normalization is performed.
+     *
+     * @param scalar  the scalar to multiply by, not null
+     * @return a {@code ChronoPeriod} based on this period with the amounts multiplied
+     *  by the scalar, not null
+     * @throws ArithmeticException if numeric overflow occurs
+     */
+    ChronoPeriod multipliedBy(int scalar);
+
+    /**
+     * Returns a new instance with each amount in this period negated.
+     * <p>
+     * This returns a period with each supported unit individually negated.
+     * For example, a period of "2 years, -3 months and 4 days" will be
+     * negated to "-2 years, 3 months and -4 days".
+     * No normalization is performed.
+     *
+     * @return a {@code ChronoPeriod} based on this period with the amounts negated, not null
+     * @throws ArithmeticException if numeric overflow occurs, which only happens if
+     *  one of the units has the value {@code Long.MIN_VALUE}
+     */
+    default ChronoPeriod negated() {
+        return multipliedBy(-1);
+    }
+
+    //-----------------------------------------------------------------------
+    /**
+     * Returns a copy of this period with the amounts of each unit normalized.
+     * <p>
+     * The process of normalization is specific to each calendar system.
+     * For example, in the ISO calendar system, the years and months are
+     * normalized but the days are not, such that "15 months" would be
+     * normalized to "1 year and 3 months".
+     * <p>
+     * This instance is immutable and unaffected by this method call.
+     *
+     * @return a {@code ChronoPeriod} based on this period with the amounts of each
+     *  unit normalized, not null
+     * @throws ArithmeticException if numeric overflow occurs
+     */
+    ChronoPeriod normalized();
+
+    //-------------------------------------------------------------------------
+    /**
+     * Adds this period to the specified temporal object.
+     * <p>
+     * This returns a temporal object of the same observable type as the input
+     * with this period added.
+     * <p>
+     * In most cases, it is clearer to reverse the calling pattern by using
+     * {@link Temporal#plus(TemporalAmount)}.
+     * <pre>
+     *   // these two lines are equivalent, but the second approach is recommended
+     *   dateTime = thisPeriod.addTo(dateTime);
+     *   dateTime = dateTime.plus(thisPeriod);
+     * </pre>
+     * <p>
+     * The specified temporal must have the same chronology as this period.
+     * This returns a temporal with the non-zero supported units added.
+     * <p>
+     * This instance is immutable and unaffected by this method call.
+     *
+     * @param temporal  the temporal object to adjust, not null
+     * @return an object of the same type with the adjustment made, not null
+     * @throws DateTimeException if unable to add
+     * @throws ArithmeticException if numeric overflow occurs
+     */
+    @Override
+    Temporal addTo(Temporal temporal);
+
+    /**
+     * Subtracts this period from the specified temporal object.
+     * <p>
+     * This returns a temporal object of the same observable type as the input
+     * with this period subtracted.
+     * <p>
+     * In most cases, it is clearer to reverse the calling pattern by using
+     * {@link Temporal#minus(TemporalAmount)}.
+     * <pre>
+     *   // these two lines are equivalent, but the second approach is recommended
+     *   dateTime = thisPeriod.subtractFrom(dateTime);
+     *   dateTime = dateTime.minus(thisPeriod);
+     * </pre>
+     * <p>
+     * The specified temporal must have the same chronology as this period.
+     * This returns a temporal with the non-zero supported units subtracted.
+     * <p>
+     * This instance is immutable and unaffected by this method call.
+     *
+     * @param temporal  the temporal object to adjust, not null
+     * @return an object of the same type with the adjustment made, not null
+     * @throws DateTimeException if unable to subtract
+     * @throws ArithmeticException if numeric overflow occurs
+     */
+    @Override
+    Temporal subtractFrom(Temporal temporal);
+
+    //-----------------------------------------------------------------------
+    /**
+     * Checks if this period is equal to another period, including the chronology.
+     * <p>
+     * Compares this period with another ensuring that the type, each amount and
+     * the chronology are the same.
+     * Note that this means that a period of "15 Months" is not equal to a period
+     * of "1 Year and 3 Months".
+     *
+     * @param obj  the object to check, null returns false
+     * @return true if this is equal to the other period
+     */
+    @Override
+    boolean equals(Object obj);
+
+    /**
+     * A hash code for this period.
+     *
+     * @return a suitable hash code
+     */
+    @Override
+    int hashCode();
+
+    //-----------------------------------------------------------------------
+    /**
+     * Outputs this period as a {@code String}.
+     * <p>
+     * The output will include the period amounts and chronology.
+     *
+     * @return a string representation of this period, not null
+     */
+    @Override
+    String toString();
+
+}
diff --git a/jdk/src/share/classes/java/time/chrono/ChronoPeriodImpl.java b/jdk/src/share/classes/java/time/chrono/ChronoPeriodImpl.java
new file mode 100644
index 0000000..d301adb
--- /dev/null
+++ b/jdk/src/share/classes/java/time/chrono/ChronoPeriodImpl.java
@@ -0,0 +1,399 @@
+/*
+ * Copyright (c) 2013, Oracle and/or its affiliates. All rights reserved.
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * This code is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU General Public License version 2 only, as
+ * published by the Free Software Foundation.  Oracle designates this
+ * particular file as subject to the "Classpath" exception as provided
+ * by Oracle in the LICENSE file that accompanied this code.
+ *
+ * This code is distributed in the hope that it will be useful, but WITHOUT
+ * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
+ * version 2 for more details (a copy is included in the LICENSE file that
+ * accompanied this code).
+ *
+ * You should have received a copy of the GNU General Public License version
+ * 2 along with this work; if not, write to the Free Software Foundation,
+ * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
+ *
+ * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
+ * or visit www.oracle.com if you need additional information or have any
+ * questions.
+ */
+
+/*
+ * Copyright (c) 2013, Stephen Colebourne & Michael Nascimento Santos
+ *
+ * All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions are met:
+ *
+ *  * Redistributions of source code must retain the above copyright notice,
+ *    this list of conditions and the following disclaimer.
+ *
+ *  * Redistributions in binary form must reproduce the above copyright notice,
+ *    this list of conditions and the following disclaimer in the documentation
+ *    and/or other materials provided with the distribution.
+ *
+ *  * Neither the name of JSR-310 nor the names of its contributors
+ *    may be used to endorse or promote products derived from this software
+ *    without specific prior written permission.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+ * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
+ * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
+ * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR
+ * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
+ * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
+ * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
+ * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
+ * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
+ * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
+ * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ */
+package java.time.chrono;
+
+import static java.time.temporal.ChronoField.MONTH_OF_YEAR;
+import static java.time.temporal.ChronoUnit.DAYS;
+import static java.time.temporal.ChronoUnit.MONTHS;
+import static java.time.temporal.ChronoUnit.YEARS;
+
+import java.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.temporal.ChronoUnit;
+import java.time.temporal.Temporal;
+import java.time.temporal.TemporalAccessor;
+import java.time.temporal.TemporalAmount;
+import java.time.temporal.TemporalQuery;
+import java.time.temporal.TemporalUnit;
+import java.time.temporal.UnsupportedTemporalTypeException;
+import java.time.temporal.ValueRange;
+import java.util.Arrays;
+import java.util.Collections;
+import java.util.List;
+import java.util.Objects;
+
+/**
+ * A period expressed in terms of a standard year-month-day calendar system.
+ * <p>
+ * This class is used by applications seeking to handle dates in non-ISO calendar systems.
+ * For example, the Japanese, Minguo, Thai Buddhist and others.
+ *
+ * @implSpec
+ * This class is immutable nad thread-safe.
+ *
+ * @since 1.8
+ */
+final class ChronoPeriodImpl
+        implements ChronoPeriod, Serializable {
+    // this class is only used by JDK chronology implementations and makes assumptions based on that fact
+
+    /**
+     * Serialization version.
+     */
+    private static final long serialVersionUID = 57387258289L;
+
+    /**
+     * The set of supported units.
+     */
+    private final static List<TemporalUnit> SUPPORTED_UNITS =
+            Collections.unmodifiableList(Arrays.<TemporalUnit>asList(YEARS, MONTHS, DAYS));
+
+    /**
+     * The chronology.
+     */
+    private final Chronology chrono;
+    /**
+     * The number of years.
+     */
+    final int years;
+    /**
+     * The number of months.
+     */
+    final int months;
+    /**
+     * The number of days.
+     */
+    final int days;
+
+    /**
+     * Creates an instance.
+     */
+    ChronoPeriodImpl(Chronology chrono, int years, int months, int days) {
+        Objects.requireNonNull(chrono, "chrono");
+        this.chrono = chrono;
+        this.years = years;
+        this.months = months;
+        this.days = days;
+    }
+
+    //-----------------------------------------------------------------------
+    @Override
+    public long get(TemporalUnit unit) {
+        if (unit == ChronoUnit.YEARS) {
+            return years;
+        } else if (unit == ChronoUnit.MONTHS) {
+            return months;
+        } else if (unit == ChronoUnit.DAYS) {
+            return days;
+        } else {
+            throw new UnsupportedTemporalTypeException("Unsupported unit: " + unit);
+        }
+    }
+
+    @Override
+    public List<TemporalUnit> getUnits() {
+        return ChronoPeriodImpl.SUPPORTED_UNITS;
+    }
+
+    @Override
+    public Chronology getChronology() {
+        return chrono;
+    }
+
+    //-----------------------------------------------------------------------
+    @Override
+    public boolean isZero() {
+        return years == 0 && months == 0 && days == 0;
+    }
+
+    @Override
+    public boolean isNegative() {
+        return years < 0 || months < 0 || days < 0;
+    }
+
+    //-----------------------------------------------------------------------
+    @Override
+    public ChronoPeriod plus(TemporalAmount amountToAdd) {
+        ChronoPeriodImpl amount = validateAmount(amountToAdd);
+        return new ChronoPeriodImpl(
+                chrono,
+                Math.addExact(years, amount.years),
+                Math.addExact(months, amount.months),
+                Math.addExact(days, amount.days));
+    }
+
+    @Override
+    public ChronoPeriod minus(TemporalAmount amountToSubtract) {
+        ChronoPeriodImpl amount = validateAmount(amountToSubtract);
+        return new ChronoPeriodImpl(
+                chrono,
+                Math.subtractExact(years, amount.years),
+                Math.subtractExact(months, amount.months),
+                Math.subtractExact(days, amount.days));
+    }
+
+    /**
+     * Obtains an instance of {@code ChronoPeriodImpl} from a temporal amount.
+     *
+     * @param amount  the temporal amount to convert, not null
+     * @return the period, not null
+     */
+    private ChronoPeriodImpl validateAmount(TemporalAmount amount) {
+        Objects.requireNonNull(amount, "amount");
+        if (amount instanceof ChronoPeriodImpl == false) {
+            throw new DateTimeException("Unable to obtain ChronoPeriod from TemporalAmount: " + amount.getClass());
+        }
+        ChronoPeriodImpl period = (ChronoPeriodImpl) amount;
+        if (chrono.equals(period.getChronology()) == false) {
+            throw new ClassCastException("Chronology mismatch, expected: " + chrono.getId() + ", actual: " + period.getChronology().getId());
+        }
+        return period;
+    }
+
+    //-----------------------------------------------------------------------
+    @Override
+    public ChronoPeriod multipliedBy(int scalar) {
+        if (this.isZero() || scalar == 1) {
+            return this;
+        }
+        return new ChronoPeriodImpl(
+                chrono,
+                Math.multiplyExact(years, scalar),
+                Math.multiplyExact(months, scalar),
+                Math.multiplyExact(days, scalar));
+    }
+
+    //-----------------------------------------------------------------------
+    @Override
+    public ChronoPeriod normalized() {
+        long monthRange = monthRange();
+        if (monthRange > 0) {
+            long totalMonths = years * monthRange + months;
+            long splitYears = totalMonths / monthRange;
+            int splitMonths = (int) (totalMonths % monthRange);  // no overflow
+            if (splitYears == years && splitMonths == months) {
+                return this;
+            }
+            return new ChronoPeriodImpl(chrono, Math.toIntExact(splitYears), splitMonths, days);
+
+        }
+        return this;
+    }
+
+    /**
+     * Calculates the range of months.
+     *
+     * @return the month range, -1 if not fixed range
+     */
+    private long monthRange() {
+        ValueRange startRange = chrono.range(MONTH_OF_YEAR);
+        if (startRange.isFixed() && startRange.isIntValue()) {
+            return startRange.getMaximum() - startRange.getMinimum() + 1;
+        }
+        return -1;
+    }
+
+    //-------------------------------------------------------------------------
+    @Override
+    public Temporal addTo(Temporal temporal) {
+        validateChrono(temporal);
+        if (months == 0) {
+            if (years != 0) {
+                temporal = temporal.plus(years, YEARS);
+            }
+        } else {
+            long monthRange = monthRange();
+            if (monthRange > 0) {
+                temporal = temporal.plus(years * monthRange + months, MONTHS);
+            } else {
+                if (years != 0) {
+                    temporal = temporal.plus(years, YEARS);
+                }
+                temporal = temporal.plus(months, MONTHS);
+            }
+        }
+        if (days != 0) {
+            temporal = temporal.plus(days, DAYS);
+        }
+        return temporal;
+    }
+
+
+
+    @Override
+    public Temporal subtractFrom(Temporal temporal) {
+        validateChrono(temporal);
+        if (months == 0) {
+            if (years != 0) {
+                temporal = temporal.minus(years, YEARS);
+            }
+        } else {
+            long monthRange = monthRange();
+            if (monthRange > 0) {
+                temporal = temporal.minus(years * monthRange + months, MONTHS);
+            } else {
+                if (years != 0) {
+                    temporal = temporal.minus(years, YEARS);
+                }
+                temporal = temporal.minus(months, MONTHS);
+            }
+        }
+        if (days != 0) {
+            temporal = temporal.minus(days, DAYS);
+        }
+        return temporal;
+    }
+
+    /**
+     * Validates that the temporal has the correct chronology.
+     */
+    private void validateChrono(TemporalAccessor temporal) {
+        Objects.requireNonNull(temporal, "temporal");
+        Chronology temporalChrono = temporal.query(TemporalQuery.chronology());
+        if (temporalChrono != null && chrono.equals(temporalChrono) == false) {
+            throw new DateTimeException("Chronology mismatch, expected: " + chrono.getId() + ", actual: " + temporalChrono.getId());
+        }
+    }
+
+    //-----------------------------------------------------------------------
+    @Override
+    public boolean equals(Object obj) {
+        if (this == obj) {
+            return true;
+        }
+        if (obj instanceof ChronoPeriodImpl) {
+            ChronoPeriodImpl other = (ChronoPeriodImpl) obj;
+            return years == other.years && months == other.months &&
+                    days == other.days && chrono.equals(other.chrono);
+        }
+        return false;
+    }
+
+    @Override
+    public int hashCode() {
+        return (years + Integer.rotateLeft(months, 8) + Integer.rotateLeft(days, 16)) ^ chrono.hashCode();
+    }
+
+    //-----------------------------------------------------------------------
+    @Override
+    public String toString() {
+        if (isZero()) {
+            return getChronology().toString() + " P0D";
+        } else {
+            StringBuilder buf = new StringBuilder();
+            buf.append(getChronology().toString()).append(' ').append('P');
+            if (years != 0) {
+                buf.append(years).append('Y');
+            }
+            if (months != 0) {
+                buf.append(months).append('M');
+            }
+            if (days != 0) {
+                buf.append(days).append('D');
+            }
+            return buf.toString();
+        }
+    }
+
+    //-----------------------------------------------------------------------
+    /**
+     * Writes the Chronology using a
+     * <a href="../../../serialized-form.html#java.time.chrono.Ser">dedicated serialized form</a>.
+     * <pre>
+     *  out.writeByte(12);  // identifies this as a ChronoPeriodImpl
+     *  out.writeUTF(getId());  // the chronology
+     *  out.writeInt(years);
+     *  out.writeInt(months);
+     *  out.writeInt(days);
+     * </pre>
+     *
+     * @return the instance of {@code Ser}, not null
+     */
+    protected Object writeReplace() {
+        return new Ser(Ser.CHRONO_PERIOD_TYPE, this);
+    }
+
+    /**
+     * Defend against malicious streams.
+     * @return never
+     * @throws InvalidObjectException always
+     */
+    private Object readResolve() throws ObjectStreamException {
+        throw new InvalidObjectException("Deserialization via serialization delegate");
+    }
+
+    void writeExternal(DataOutput out) throws IOException {
+        out.writeUTF(chrono.getId());
+        out.writeInt(years);
+        out.writeInt(months);
+        out.writeInt(days);
+    }
+
+    static ChronoPeriodImpl readExternal(DataInput in) throws IOException {
+        Chronology chrono = Chronology.of(in.readUTF());
+        int years = in.readInt();
+        int months = in.readInt();
+        int days = in.readInt();
+        return new ChronoPeriodImpl(chrono, years, months, days);
+    }
+
+}
diff --git a/jdk/src/share/classes/java/time/chrono/ChronoZonedDateTime.java b/jdk/src/share/classes/java/time/chrono/ChronoZonedDateTime.java
index dd911fc..033ab99 100644
--- a/jdk/src/share/classes/java/time/chrono/ChronoZonedDateTime.java
+++ b/jdk/src/share/classes/java/time/chrono/ChronoZonedDateTime.java
@@ -166,6 +166,7 @@
         if (temporal instanceof ChronoZonedDateTime) {
             return (ChronoZonedDateTime<?>) temporal;
         }
+        Objects.requireNonNull(temporal, "temporal");
         Chronology chrono = temporal.query(TemporalQuery.chronology());
         if (chrono == null) {
             throw new DateTimeException("Unable to obtain ChronoZonedDateTime from TemporalAccessor: " + temporal.getClass());
@@ -246,6 +247,18 @@
     ChronoLocalDateTime<D> toLocalDateTime();
 
     /**
+     * Gets the chronology of this date-time.
+     * <p>
+     * The {@code Chronology} represents the calendar system in use.
+     * The era and other fields in {@link ChronoField} are defined by the chronology.
+     *
+     * @return the chronology, not null
+     */
+    default Chronology getChronology() {
+        return toLocalDate().getChronology();
+    }
+
+    /**
      * Gets the zone offset, such as '+01:00'.
      * <p>
      * This is the offset of the local date-time from UTC/Greenwich.
@@ -397,7 +410,7 @@
      */
     @Override
     default ChronoZonedDateTime<D> with(TemporalAdjuster adjuster) {
-        return ChronoZonedDateTimeImpl.ensureValid(toLocalDate().getChronology(), Temporal.super.with(adjuster));
+        return ChronoZonedDateTimeImpl.ensureValid(getChronology(), Temporal.super.with(adjuster));
     }
 
     /**
@@ -415,7 +428,7 @@
      */
     @Override
     default ChronoZonedDateTime<D> plus(TemporalAmount amount) {
-        return ChronoZonedDateTimeImpl.ensureValid(toLocalDate().getChronology(), Temporal.super.plus(amount));
+        return ChronoZonedDateTimeImpl.ensureValid(getChronology(), Temporal.super.plus(amount));
     }
 
     /**
@@ -433,7 +446,7 @@
      */
     @Override
     default ChronoZonedDateTime<D> minus(TemporalAmount amount) {
-        return ChronoZonedDateTimeImpl.ensureValid(toLocalDate().getChronology(), Temporal.super.minus(amount));
+        return ChronoZonedDateTimeImpl.ensureValid(getChronology(), Temporal.super.minus(amount));
     }
 
     /**
@@ -443,7 +456,7 @@
      */
     @Override
     default ChronoZonedDateTime<D> minus(long amountToSubtract, TemporalUnit unit) {
-        return ChronoZonedDateTimeImpl.ensureValid(toLocalDate().getChronology(), Temporal.super.minus(amountToSubtract, unit));
+        return ChronoZonedDateTimeImpl.ensureValid(getChronology(), Temporal.super.minus(amountToSubtract, unit));
     }
 
     //-----------------------------------------------------------------------
@@ -475,7 +488,7 @@
         } else if (query == TemporalQuery.localTime()) {
             return (R) toLocalTime();
         } else if (query == TemporalQuery.chronology()) {
-            return (R) toLocalDate().getChronology();
+            return (R) getChronology();
         } else if (query == TemporalQuery.precision()) {
             return (R) NANOS;
         }
@@ -562,7 +575,7 @@
                 if (cmp == 0) {
                     cmp = getZone().getId().compareTo(other.getZone().getId());
                     if (cmp == 0) {
-                        cmp = toLocalDate().getChronology().compareTo(other.toLocalDate().getChronology());
+                        cmp = getChronology().compareTo(other.getChronology());
                     }
                 }
             }
diff --git a/jdk/src/share/classes/java/time/chrono/ChronoZonedDateTimeImpl.java b/jdk/src/share/classes/java/time/chrono/ChronoZonedDateTimeImpl.java
index 1cc7b5b..5222db3 100644
--- a/jdk/src/share/classes/java/time/chrono/ChronoZonedDateTimeImpl.java
+++ b/jdk/src/share/classes/java/time/chrono/ChronoZonedDateTimeImpl.java
@@ -69,7 +69,6 @@
 import java.io.ObjectOutput;
 import java.io.ObjectStreamException;
 import java.io.Serializable;
-import java.time.DateTimeException;
 import java.time.Instant;
 import java.time.LocalDateTime;
 import java.time.ZoneId;
@@ -186,7 +185,7 @@
      */
     @SuppressWarnings("unchecked")
     private ChronoZonedDateTimeImpl<D> create(Instant instant, ZoneId zone) {
-        return (ChronoZonedDateTimeImpl<D>)ofInstant(toLocalDate().getChronology(), instant, zone);
+        return (ChronoZonedDateTimeImpl<D>)ofInstant(getChronology(), instant, zone);
     }
 
     /**
@@ -201,9 +200,9 @@
     static <R extends ChronoLocalDate> ChronoZonedDateTimeImpl<R> ensureValid(Chronology chrono, Temporal temporal) {
         @SuppressWarnings("unchecked")
         ChronoZonedDateTimeImpl<R> other = (ChronoZonedDateTimeImpl<R>) temporal;
-        if (chrono.equals(other.toLocalDate().getChronology()) == false) {
+        if (chrono.equals(other.getChronology()) == false) {
             throw new ClassCastException("Chronology mismatch, required: " + chrono.getId()
-                    + ", actual: " + other.toLocalDate().getChronology().getId());
+                    + ", actual: " + other.getChronology().getId());
         }
         return other;
     }
@@ -234,7 +233,7 @@
         if (trans != null && trans.isOverlap()) {
             ZoneOffset earlierOffset = trans.getOffsetBefore();
             if (earlierOffset.equals(offset) == false) {
-                return new ChronoZonedDateTimeImpl<D>(dateTime, earlierOffset, zone);
+                return new ChronoZonedDateTimeImpl<>(dateTime, earlierOffset, zone);
             }
         }
         return this;
@@ -246,7 +245,7 @@
         if (trans != null) {
             ZoneOffset offset = trans.getOffsetAfter();
             if (offset.equals(getOffset()) == false) {
-                return new ChronoZonedDateTimeImpl<D>(dateTime, offset, zone);
+                return new ChronoZonedDateTimeImpl<>(dateTime, offset, zone);
             }
         }
         return this;
@@ -294,7 +293,7 @@
             }
             return ofBest(dateTime.with(field, newValue), zone, offset);
         }
-        return ChronoZonedDateTimeImpl.ensureValid(toLocalDate().getChronology(), field.adjustInto(this, newValue));
+        return ChronoZonedDateTimeImpl.ensureValid(getChronology(), field.adjustInto(this, newValue));
     }
 
     //-----------------------------------------------------------------------
@@ -303,25 +302,21 @@
         if (unit instanceof ChronoUnit) {
             return with(dateTime.plus(amountToAdd, unit));
         }
-        return ChronoZonedDateTimeImpl.ensureValid(toLocalDate().getChronology(), unit.addTo(this, amountToAdd));   /// TODO: Generics replacement Risk!
+        return ChronoZonedDateTimeImpl.ensureValid(getChronology(), unit.addTo(this, amountToAdd));   /// TODO: Generics replacement Risk!
     }
 
     //-----------------------------------------------------------------------
     @Override
-    public long until(Temporal endDateTime, TemporalUnit unit) {
-        if (endDateTime instanceof ChronoZonedDateTime == false) {
-            throw new DateTimeException("Unable to calculate amount as objects are of two different types");
-        }
+    public long until(Temporal endExclusive, TemporalUnit unit) {
+        Objects.requireNonNull(endExclusive, "endExclusive");
         @SuppressWarnings("unchecked")
-        ChronoZonedDateTime<D> end = (ChronoZonedDateTime<D>) endDateTime;
-        if (toLocalDate().getChronology().equals(end.toLocalDate().getChronology()) == false) {
-            throw new DateTimeException("Unable to calculate amount as objects have different chronologies");
-        }
+        ChronoZonedDateTime<D> end = (ChronoZonedDateTime<D>) getChronology().zonedDateTime(endExclusive);
         if (unit instanceof ChronoUnit) {
             end = end.withZoneSameInstant(offset);
             return dateTime.until(end.toLocalDateTime(), unit);
         }
-        return unit.between(this, endDateTime);
+        Objects.requireNonNull(unit, "unit");
+        return unit.between(this, end);
     }
 
     //-----------------------------------------------------------------------
diff --git a/jdk/src/share/classes/java/time/chrono/Chronology.java b/jdk/src/share/classes/java/time/chrono/Chronology.java
index 36c9d31..ed40f41 100644
--- a/jdk/src/share/classes/java/time/chrono/Chronology.java
+++ b/jdk/src/share/classes/java/time/chrono/Chronology.java
@@ -91,14 +91,11 @@
 import java.time.Instant;
 import java.time.LocalDate;
 import java.time.LocalTime;
-import java.time.Month;
-import java.time.Year;
 import java.time.ZoneId;
 import java.time.format.DateTimeFormatterBuilder;
 import java.time.format.ResolverStyle;
 import java.time.format.TextStyle;
 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;
@@ -1192,6 +1189,38 @@
 
     //-----------------------------------------------------------------------
     /**
+     * Obtains a period for this chronology based on years, months and days.
+     * <p>
+     * This returns a period tied to this chronology using the specified
+     * years, months and days.  All supplied chronologies use periods
+     * based on years, months and days, however the {@code ChronoPeriod} API
+     * allows the period to be represented using other units.
+     *
+     * @implSpec
+     * The default implementation returns an implementation class suitable
+     * for most calendar systems. It is based solely on the three units.
+     * Normalization, addition and subtraction derive the number of months
+     * in a year from the {@link #range(ChronoField)}. If the number of
+     * months within a year is fixed, then the calculation approach for
+     * addition, subtraction and normalization is slightly different.
+     * <p>
+     * If implementing an unusual calendar system that is not based on
+     * years, months and days, or where you want direct control, then
+     * the {@code ChronoPeriod} interface must be directly implemented.
+     * <p>
+     * The returned period is immutable and thread-safe.
+     *
+     * @param years  the number of years, may be negative
+     * @param months  the number of years, may be negative
+     * @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) {
+        return new ChronoPeriodImpl(this, years, months, days);
+    }
+
+    //-----------------------------------------------------------------------
+    /**
      * Compares this chronology to another chronology.
      * <p>
      * The comparison order first by the chronology ID string, then by any
diff --git a/jdk/src/share/classes/java/time/chrono/HijrahDate.java b/jdk/src/share/classes/java/time/chrono/HijrahDate.java
index 8e385c9..d2c9929 100644
--- a/jdk/src/share/classes/java/time/chrono/HijrahDate.java
+++ b/jdk/src/share/classes/java/time/chrono/HijrahDate.java
@@ -73,7 +73,6 @@
 import java.time.DateTimeException;
 import java.time.LocalDate;
 import java.time.LocalTime;
-import java.time.Period;
 import java.time.ZoneId;
 import java.time.temporal.ChronoField;
 import java.time.temporal.TemporalAccessor;
@@ -109,7 +108,7 @@
  * @since 1.8
  */
 public final class HijrahDate
-        extends ChronoDateImpl<HijrahDate>
+        extends ChronoLocalDateImpl<HijrahDate>
         implements ChronoLocalDate, Serializable {
 
     /**
@@ -582,7 +581,7 @@
     }
 
     @Override
-    public Period until(ChronoLocalDate endDate) {
+    public ChronoPeriod until(ChronoLocalDate endDate) {
         // TODO: untested
         HijrahDate end = getChronology().date(endDate);
         long totalMonths = (end.prolepticYear - this.prolepticYear) * 12 + (end.monthOfYear - this.monthOfYear);  // safe
@@ -597,7 +596,7 @@
         }
         long years = totalMonths / 12;  // safe
         int months = (int) (totalMonths % 12);  // safe
-        return Period.of(Math.toIntExact(years), months, days);
+        return getChronology().period(Math.toIntExact(years), months, days);
     }
 
     //-----------------------------------------------------------------------
diff --git a/jdk/src/share/classes/java/time/chrono/IsoChronology.java b/jdk/src/share/classes/java/time/chrono/IsoChronology.java
index 2012e64..9638f6e 100644
--- a/jdk/src/share/classes/java/time/chrono/IsoChronology.java
+++ b/jdk/src/share/classes/java/time/chrono/IsoChronology.java
@@ -77,6 +77,7 @@
 import java.time.LocalDate;
 import java.time.LocalDateTime;
 import java.time.Month;
+import java.time.Period;
 import java.time.Year;
 import java.time.ZoneId;
 import java.time.ZonedDateTime;
@@ -567,6 +568,24 @@
 
     //-----------------------------------------------------------------------
     /**
+     * Obtains a period for this chronology based on years, months and days.
+     * <p>
+     * This returns a period tied to the ISO chronology using the specified
+     * years, months and days. See {@link Period} for further details.
+     *
+     * @param years  the number of years, may be negative
+     * @param months  the number of years, may be negative
+     * @param days  the number of years, may be negative
+     * @return the period in terms of this chronology, not null
+     * @return the ISO period, not null
+     */
+    @Override  // override with covariant return type
+    public Period period(int years, int months, int days) {
+        return Period.of(years, months, days);
+    }
+
+    //-----------------------------------------------------------------------
+    /**
      * Writes the Chronology using a
      * <a href="../../../serialized-form.html#java.time.chrono.Ser">dedicated serialized form</a>.
      * @serialData
diff --git a/jdk/src/share/classes/java/time/chrono/JapaneseDate.java b/jdk/src/share/classes/java/time/chrono/JapaneseDate.java
index 24ad7a9..ae4708d 100644
--- a/jdk/src/share/classes/java/time/chrono/JapaneseDate.java
+++ b/jdk/src/share/classes/java/time/chrono/JapaneseDate.java
@@ -61,10 +61,8 @@
 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_YEAR;
 import static java.time.temporal.ChronoField.MONTH_OF_YEAR;
 import static java.time.temporal.ChronoField.YEAR;
-import static java.time.temporal.ChronoField.YEAR_OF_ERA;
 
 import java.io.DataInput;
 import java.io.DataOutput;
@@ -76,7 +74,6 @@
 import java.time.LocalDate;
 import java.time.LocalTime;
 import java.time.Period;
-import java.time.Year;
 import java.time.ZoneId;
 import java.time.temporal.ChronoField;
 import java.time.temporal.TemporalAccessor;
@@ -119,7 +116,7 @@
  * @since 1.8
  */
 public final class JapaneseDate
-        extends ChronoDateImpl<JapaneseDate>
+        extends ChronoLocalDateImpl<JapaneseDate>
         implements ChronoLocalDate, Serializable {
 
     /**
@@ -662,8 +659,9 @@
     }
 
     @Override
-    public Period until(ChronoLocalDate endDate) {
-        return isoDate.until(endDate);
+    public ChronoPeriod until(ChronoLocalDate endDate) {
+        Period period = isoDate.until(endDate);
+        return getChronology().period(period.getYears(), period.getMonths(), period.getDays());
     }
 
     @Override  // override for performance
diff --git a/jdk/src/share/classes/java/time/chrono/MinguoDate.java b/jdk/src/share/classes/java/time/chrono/MinguoDate.java
index 16585e7..42e0dab 100644
--- a/jdk/src/share/classes/java/time/chrono/MinguoDate.java
+++ b/jdk/src/share/classes/java/time/chrono/MinguoDate.java
@@ -96,7 +96,7 @@
  * @since 1.8
  */
 public final class MinguoDate
-        extends ChronoDateImpl<MinguoDate>
+        extends ChronoLocalDateImpl<MinguoDate>
         implements ChronoLocalDate, Serializable {
 
     /**
@@ -421,8 +421,9 @@
     }
 
     @Override
-    public Period until(ChronoLocalDate endDate) {
-        return isoDate.until(endDate);
+    public ChronoPeriod until(ChronoLocalDate endDate) {
+        Period period = isoDate.until(endDate);
+        return getChronology().period(period.getYears(), period.getMonths(), period.getDays());
     }
 
     @Override  // override for performance
diff --git a/jdk/src/share/classes/java/time/chrono/Ser.java b/jdk/src/share/classes/java/time/chrono/Ser.java
index cc99f48..5a4e3c1 100644
--- a/jdk/src/share/classes/java/time/chrono/Ser.java
+++ b/jdk/src/share/classes/java/time/chrono/Ser.java
@@ -104,6 +104,7 @@
     static final byte HIJRAH_DATE_TYPE = 6;
     static final byte MINGUO_DATE_TYPE = 7;
     static final byte THAIBUDDHIST_DATE_TYPE = 8;
+    static final byte CHRONO_PERIOD_TYPE = 9;
 
     /** The type being serialized. */
     private byte type;
@@ -183,6 +184,9 @@
             case THAIBUDDHIST_DATE_TYPE:
                 ((ThaiBuddhistDate) object).writeExternal(out);
                 break;
+            case CHRONO_PERIOD_TYPE:
+                ((ChronoPeriodImpl) object).writeExternal(out);
+                break;
             default:
                 throw new InvalidClassException("Unknown serialized type");
         }
@@ -235,6 +239,7 @@
             case HIJRAH_DATE_TYPE: return HijrahDate.readExternal(in);
             case MINGUO_DATE_TYPE: return MinguoDate.readExternal(in);
             case THAIBUDDHIST_DATE_TYPE: return ThaiBuddhistDate.readExternal(in);
+            case CHRONO_PERIOD_TYPE: return ChronoPeriodImpl.readExternal(in);
             default: throw new StreamCorruptedException("Unknown serialized type");
         }
     }
diff --git a/jdk/src/share/classes/java/time/chrono/ThaiBuddhistDate.java b/jdk/src/share/classes/java/time/chrono/ThaiBuddhistDate.java
index 3d8f407..89895c8 100644
--- a/jdk/src/share/classes/java/time/chrono/ThaiBuddhistDate.java
+++ b/jdk/src/share/classes/java/time/chrono/ThaiBuddhistDate.java
@@ -96,7 +96,7 @@
  * @since 1.8
  */
 public final class ThaiBuddhistDate
-        extends ChronoDateImpl<ThaiBuddhistDate>
+        extends ChronoLocalDateImpl<ThaiBuddhistDate>
         implements ChronoLocalDate, Serializable {
 
     /**
@@ -421,8 +421,9 @@
     }
 
     @Override
-    public Period until(ChronoLocalDate endDate) {
-        return isoDate.until(endDate);
+    public ChronoPeriod until(ChronoLocalDate endDate) {
+        Period period = isoDate.until(endDate);
+        return getChronology().period(period.getYears(), period.getMonths(), period.getDays());
     }
 
     @Override  // override for performance
diff --git a/jdk/src/share/classes/java/time/format/Parsed.java b/jdk/src/share/classes/java/time/format/Parsed.java
index 42223d6..7413467 100644
--- a/jdk/src/share/classes/java/time/format/Parsed.java
+++ b/jdk/src/share/classes/java/time/format/Parsed.java
@@ -83,6 +83,8 @@
 import java.time.Period;
 import java.time.ZoneId;
 import java.time.chrono.ChronoLocalDate;
+import java.time.chrono.ChronoLocalDateTime;
+import java.time.chrono.ChronoZonedDateTime;
 import java.time.chrono.Chronology;
 import java.time.temporal.ChronoField;
 import java.time.temporal.TemporalAccessor;
@@ -260,11 +262,34 @@
             while (changedCount < 50) {
                 for (Map.Entry<TemporalField, Long> entry : fieldValues.entrySet()) {
                     TemporalField targetField = entry.getKey();
-                    ChronoLocalDate resolvedDate = targetField.resolve(fieldValues, chrono, zone, resolverStyle);
-                    if (resolvedDate != null) {
-                        updateCheckConflict(resolvedDate);
-                        changedCount++;
-                        continue outer;  // have to restart to avoid concurrent modification
+                    TemporalAccessor resolvedObject = targetField.resolve(fieldValues, chrono, zone, resolverStyle);
+                    if (resolvedObject != null) {
+                        if (resolvedObject instanceof ChronoZonedDateTime) {
+                            ChronoZonedDateTime czdt = (ChronoZonedDateTime) resolvedObject;
+                            if (zone.equals(czdt.getZone()) == false) {
+                                throw new DateTimeException("ChronoZonedDateTime must use the effective parsed zone: " + zone);
+                            }
+                            resolvedObject = czdt.toLocalDateTime();
+                        }
+                        if (resolvedObject instanceof ChronoLocalDateTime) {
+                            ChronoLocalDateTime cldt = (ChronoLocalDateTime) resolvedObject;
+                            updateCheckConflict(cldt.toLocalTime(), Period.ZERO);
+                            updateCheckConflict(cldt.toLocalDate());
+                            changedCount++;
+                            continue outer;  // have to restart to avoid concurrent modification
+                        }
+                        if (resolvedObject instanceof ChronoLocalDate) {
+                            updateCheckConflict((ChronoLocalDate) resolvedObject);
+                            changedCount++;
+                            continue outer;  // have to restart to avoid concurrent modification
+                        }
+                        if (resolvedObject instanceof LocalTime) {
+                            updateCheckConflict((LocalTime) resolvedObject, Period.ZERO);
+                            changedCount++;
+                            continue outer;  // have to restart to avoid concurrent modification
+                        }
+                        throw new DateTimeException("Method resolveFields() can only return ChronoZonedDateTime," +
+                                "ChronoLocalDateTime, ChronoLocalDate or LocalTime");
                     } else if (fieldValues.containsKey(targetField) == false) {
                         changedCount++;
                         continue outer;  // have to restart to avoid concurrent modification
@@ -302,7 +327,10 @@
             if (cld != null && date.equals(cld) == false) {
                 throw new DateTimeException("Conflict found: Fields resolved to two different dates: " + date + " " + cld);
             }
-        } else {
+        } else if (cld != null) {
+            if (chrono.equals(cld.getChronology()) == false) {
+                throw new DateTimeException("ChronoLocalDate must use the effective parsed chronology: " + chrono);
+            }
             date = cld;
         }
     }
diff --git a/jdk/src/share/classes/java/time/temporal/ChronoUnit.java b/jdk/src/share/classes/java/time/temporal/ChronoUnit.java
index 19a37e4..c704327 100644
--- a/jdk/src/share/classes/java/time/temporal/ChronoUnit.java
+++ b/jdk/src/share/classes/java/time/temporal/ChronoUnit.java
@@ -268,8 +268,8 @@
 
     //-----------------------------------------------------------------------
     @Override
-    public long between(Temporal temporal1, Temporal temporal2) {
-        return temporal1.until(temporal2, this);
+    public long between(Temporal temporal1Inclusive, Temporal temporal2Exclusive) {
+        return temporal1Inclusive.until(temporal2Exclusive, this);
     }
 
     //-----------------------------------------------------------------------
diff --git a/jdk/src/share/classes/java/time/temporal/IsoFields.java b/jdk/src/share/classes/java/time/temporal/IsoFields.java
index eae057a..bb19c29 100644
--- a/jdk/src/share/classes/java/time/temporal/IsoFields.java
+++ b/jdk/src/share/classes/java/time/temporal/IsoFields.java
@@ -684,13 +684,16 @@
         }
 
         @Override
-        public long between(Temporal temporal1, Temporal temporal2) {
+        public long between(Temporal temporal1Inclusive, Temporal temporal2Exclusive) {
+            if (temporal1Inclusive.getClass() != temporal2Exclusive.getClass()) {
+                return temporal1Inclusive.until(temporal2Exclusive, this);
+            }
             switch(this) {
                 case WEEK_BASED_YEARS:
-                    return Math.subtractExact(temporal2.getLong(WEEK_BASED_YEAR),
-                            temporal1.getLong(WEEK_BASED_YEAR));
+                    return Math.subtractExact(temporal2Exclusive.getLong(WEEK_BASED_YEAR),
+                            temporal1Inclusive.getLong(WEEK_BASED_YEAR));
                 case QUARTER_YEARS:
-                    return temporal1.until(temporal2, MONTHS) / 3;
+                    return temporal1Inclusive.until(temporal2Exclusive, MONTHS) / 3;
                 default:
                     throw new IllegalStateException("Unreachable");
             }
diff --git a/jdk/src/share/classes/java/time/temporal/Temporal.java b/jdk/src/share/classes/java/time/temporal/Temporal.java
index af8424c..9931c46 100644
--- a/jdk/src/share/classes/java/time/temporal/Temporal.java
+++ b/jdk/src/share/classes/java/time/temporal/Temporal.java
@@ -170,7 +170,8 @@
      * </pre>
      *
      * @implSpec
-     * Implementations must not alter either this object.
+     * <p>
+     * Implementations must not alter either this object or the specified temporal object.
      * Instead, an adjusted copy of the original must be returned.
      * This provides equivalent, safe behavior for immutable and mutable implementations.
      * <p>
@@ -209,7 +210,7 @@
      * is obtained by invoking {@code TemporalField.adjustInto(Temporal, long)}
      * passing {@code this} as the first argument.
      * <p>
-     * Implementations must not alter either this object or the specified temporal object.
+     * Implementations must not alter this object.
      * Instead, an adjusted copy of the original must be returned.
      * This provides equivalent, safe behavior for immutable and mutable implementations.
      *
@@ -232,16 +233,17 @@
      * <p>
      * Some example code indicating how and why this method is used:
      * <pre>
-     *  date = date.plus(period);                      // add a Period instance
-     *  date = date.plus(duration);                    // add a Duration instance
-     *  date = date.plus(workingDays(6));              // example user-written workingDays method
+     *  date = date.plus(period);                // add a Period instance
+     *  date = date.plus(duration);              // add a Duration instance
+     *  date = date.plus(workingDays(6));        // example user-written workingDays method
      * </pre>
      * <p>
      * Note that calling {@code plus} followed by {@code minus} is not guaranteed to
      * return the same date-time.
      *
      * @implSpec
-     * Implementations must not alter either this object.
+     * <p>
+     * Implementations must not alter either this object or the specified temporal object.
      * Instead, an adjusted copy of the original must be returned.
      * This provides equivalent, safe behavior for immutable and mutable implementations.
      * <p>
@@ -280,7 +282,7 @@
      * is obtained by invoking {@code TemporalUnit.addTo(Temporal, long)}
      * passing {@code this} as the first argument.
      * <p>
-     * Implementations must not alter either this object or the specified temporal object.
+     * Implementations must not alter this object.
      * Instead, an adjusted copy of the original must be returned.
      * This provides equivalent, safe behavior for immutable and mutable implementations.
      *
@@ -303,16 +305,17 @@
      * <p>
      * Some example code indicating how and why this method is used:
      * <pre>
-     *  date = date.minus(period);                      // subtract a Period instance
-     *  date = date.minus(duration);                    // subtract a Duration instance
-     *  date = date.minus(workingDays(6));              // example user-written workingDays method
+     *  date = date.minus(period);               // subtract a Period instance
+     *  date = date.minus(duration);             // subtract a Duration instance
+     *  date = date.minus(workingDays(6));       // example user-written workingDays method
      * </pre>
      * <p>
      * Note that calling {@code plus} followed by {@code minus} is not guaranteed to
      * return the same date-time.
      *
      * @implSpec
-     * Implementations must not alter either this object.
+     * <p>
+     * Implementations must not alter either this object or the specified temporal object.
      * Instead, an adjusted copy of the original must be returned.
      * This provides equivalent, safe behavior for immutable and mutable implementations.
      * <p>
@@ -345,7 +348,7 @@
      * @implSpec
      * Implementations must behave in a manor equivalent to the default method behavior.
      * <p>
-     * Implementations must not alter either this object or the specified temporal object.
+     * Implementations must not alter this object.
      * Instead, an adjusted copy of the original must be returned.
      * This provides equivalent, safe behavior for immutable and mutable implementations.
      * <p>
@@ -371,8 +374,9 @@
      * Calculates the amount of time until another temporal in terms of the specified unit.
      * <p>
      * This calculates the amount of time between two temporal objects
-     * of the same type in terms of a single {@code TemporalUnit}.
+     * in terms of a single {@code TemporalUnit}.
      * The start and end points are {@code this} and the specified temporal.
+     * The end point is converted to be of the same type as the start point if different.
      * The result will be negative if the end is before the start.
      * For example, the period in hours between two temporal objects can be
      * calculated using {@code startTime.until(endTime, HOURS)}.
@@ -409,31 +413,36 @@
      * <p>
      * If the unit is not a {@code ChronoUnit}, then the result of this method
      * is obtained by invoking {@code TemporalUnit.between(Temporal, Temporal)}
-     * passing {@code this} as the first argument and the input temporal as
+     * passing {@code this} as the first argument and the converted input temporal as
      * the second argument.
      * <p>
-     * In summary, implementations must behave in a manner equivalent to this code:
+     * In summary, implementations must behave in a manner equivalent to this pseudo-code:
      * <pre>
-     *  // check input temporal is the same type as this class
+     *  // convert the end temporal to the same type as this class
      *  if (unit instanceof ChronoUnit) {
      *    // if unit is supported, then calculate and return result
      *    // else throw UnsupportedTemporalTypeException for unsupported units
      *  }
-     *  return unit.between(this, endTemporal);
+     *  return unit.between(this, convertedEndTemporal);
      * </pre>
      * <p>
+     * Note that the unit's {@code between} method must only be invoked if the
+     * two temporal objects have exactly the same type evaluated by {@code getClass()}.
+     * <p>
      * Implementations must ensure that no observable state is altered when this
      * read-only method is invoked.
      *
-     * @param endTemporal  the end temporal, of the same type as this object, not null
+     * @param endExclusive  the end temporal, exclusive, converted to be of the
+     *  same type as this object, not null
      * @param unit  the unit to measure the amount in, not null
      * @return the amount of time between this temporal object and the specified one
      *  in terms of the unit; positive if the specified object is later than this one,
      *  negative if it is earlier than this one
-     * @throws DateTimeException if the amount cannot be calculated
+     * @throws DateTimeException if the amount cannot be calculated, or the end
+     *  temporal cannot be converted to the same type as this temporal
      * @throws UnsupportedTemporalTypeException if the unit is not supported
      * @throws ArithmeticException if numeric overflow occurs
      */
-    long until(Temporal endTemporal, TemporalUnit unit);
+    long until(Temporal endExclusive, TemporalUnit unit);
 
 }
diff --git a/jdk/src/share/classes/java/time/temporal/TemporalField.java b/jdk/src/share/classes/java/time/temporal/TemporalField.java
index e4d6b40..e757734 100644
--- a/jdk/src/share/classes/java/time/temporal/TemporalField.java
+++ b/jdk/src/share/classes/java/time/temporal/TemporalField.java
@@ -63,7 +63,6 @@
 
 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.Locale;
@@ -350,6 +349,10 @@
      * be acceptable for the date fields to be resolved into other {@code ChronoField}
      * 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.
      * <p>
      * The default implementation must return null.
@@ -358,13 +361,13 @@
      * @param chronology  the effective chronology, not null
      * @param zone  the effective zone, not null
      * @param resolverStyle  the requested type of resolve, not null
-     * @return the resolved date; null if resolving only changed the map,
-     *  or no resolve occurred
+     * @return the resolved temporal object; null if resolving only
+     *  changed the map, or no resolve occurred
      * @throws ArithmeticException if numeric overflow occurs
      * @throws DateTimeException if resolving results in an error. This must not be thrown
      *  by querying a field on the temporal without first checking if it is supported
      */
-    default ChronoLocalDate resolve(
+    default TemporalAccessor resolve(
             Map<TemporalField, Long> fieldValues, Chronology chronology,
             ZoneId zone, ResolverStyle resolverStyle) {
         return null;
diff --git a/jdk/src/share/classes/java/time/temporal/TemporalUnit.java b/jdk/src/share/classes/java/time/temporal/TemporalUnit.java
index 05577d7..1c41afa 100644
--- a/jdk/src/share/classes/java/time/temporal/TemporalUnit.java
+++ b/jdk/src/share/classes/java/time/temporal/TemporalUnit.java
@@ -231,7 +231,9 @@
      * Calculates the amount of time between two temporal objects.
      * <p>
      * This calculates the amount in terms of this unit. The start and end
-     * points are supplied as temporal objects and must be of the same type.
+     * points are supplied as temporal objects and must be of compatible types.
+     * The implementation will convert the second type to be an instance of the
+     * first type before the calculating the amount.
      * The result will be negative if the end is before the start.
      * For example, the amount in hours between two temporal objects can be
      * calculated using {@code HOURS.between(startTime, endTime)}.
@@ -264,15 +266,22 @@
      * If the unit is not supported an {@code UnsupportedTemporalTypeException} must be thrown.
      * Implementations must not alter the specified temporal objects.
      *
-     * @param temporal1  the base temporal object, not null
-     * @param temporal2  the other temporal object, not null
-     * @return the amount of time between temporal1 and temporal2 in terms of this unit;
-     *  positive if temporal2 is later than temporal1, negative if earlier
-     * @throws DateTimeException if the amount cannot be calculated
+     * @implSpec
+     * Implementations must begin by checking to if the two temporals have the
+     * same type using {@code getClass()}. If they do not, then the result must be
+     * obtained by calling {@code temporal1Inclusive.until(temporal2Exclusive, this)}.
+     *
+     * @param temporal1Inclusive  the base temporal object, not null
+     * @param temporal2Exclusive  the other temporal object, exclusive, not null
+     * @return the amount of time between temporal1Inclusive and temporal2Exclusive
+     *  in terms of this unit; positive if temporal2Exclusive is later than
+     *  temporal1Inclusive, negative if earlier
+     * @throws DateTimeException if the amount cannot be calculated, or the end
+     *  temporal cannot be converted to the same type as the start temporal
      * @throws UnsupportedTemporalTypeException if the unit is not supported by the temporal
      * @throws ArithmeticException if numeric overflow occurs
      */
-    long between(Temporal temporal1, Temporal temporal2);
+    long between(Temporal temporal1Inclusive, Temporal temporal2Exclusive);
 
     //-----------------------------------------------------------------------
     /**
diff --git a/jdk/src/share/classes/java/time/temporal/ValueRange.java b/jdk/src/share/classes/java/time/temporal/ValueRange.java
index e003f11..a48abaf 100644
--- a/jdk/src/share/classes/java/time/temporal/ValueRange.java
+++ b/jdk/src/share/classes/java/time/temporal/ValueRange.java
@@ -61,6 +61,7 @@
  */
 package java.time.temporal;
 
+import java.io.InvalidObjectException;
 import java.io.Serializable;
 import java.time.DateTimeException;
 
@@ -337,6 +338,21 @@
         }
     }
 
+    /**
+     * Return the ValueRange for the serialized values.
+     * The values are validated according to the constraints of the {@link #of}
+     * factory method.
+     * @return the ValueRange for the serialized fields
+     * @throws InvalidObjectException if the serialized object has invalid values
+     */
+    private Object readResolve() throws InvalidObjectException {
+        try {
+            return of(minSmallest, minLargest, maxSmallest, maxLargest);
+        } catch (IllegalArgumentException iae) {
+            throw new InvalidObjectException("Invalid serialized ValueRange: " + iae.getMessage());
+        }
+    }
+
     //-----------------------------------------------------------------------
     /**
      * Checks if this range is equal to another range.
diff --git a/jdk/src/share/classes/java/util/Arrays.java b/jdk/src/share/classes/java/util/Arrays.java
index 47c99ef..43463a5 100644
--- a/jdk/src/share/classes/java/util/Arrays.java
+++ b/jdk/src/share/classes/java/util/Arrays.java
@@ -1583,6 +1583,7 @@
      * @since 1.8
      */
     public static <T> void parallelPrefix(T[] array, BinaryOperator<T> op) {
+        Objects.requireNonNull(op);
         if (array.length > 0)
             new ArrayPrefixHelpers.CumulateTask<>
                     (null, op, array, 0, array.length).invoke();
@@ -1606,6 +1607,7 @@
      */
     public static <T> void parallelPrefix(T[] array, int fromIndex,
                                           int toIndex, BinaryOperator<T> op) {
+        Objects.requireNonNull(op);
         rangeCheck(array.length, fromIndex, toIndex);
         if (fromIndex < toIndex)
             new ArrayPrefixHelpers.CumulateTask<>
@@ -1627,6 +1629,7 @@
      * @since 1.8
      */
     public static void parallelPrefix(long[] array, LongBinaryOperator op) {
+        Objects.requireNonNull(op);
         if (array.length > 0)
             new ArrayPrefixHelpers.LongCumulateTask
                     (null, op, array, 0, array.length).invoke();
@@ -1649,6 +1652,7 @@
      */
     public static void parallelPrefix(long[] array, int fromIndex,
                                       int toIndex, LongBinaryOperator op) {
+        Objects.requireNonNull(op);
         rangeCheck(array.length, fromIndex, toIndex);
         if (fromIndex < toIndex)
             new ArrayPrefixHelpers.LongCumulateTask
@@ -1673,6 +1677,7 @@
      * @since 1.8
      */
     public static void parallelPrefix(double[] array, DoubleBinaryOperator op) {
+        Objects.requireNonNull(op);
         if (array.length > 0)
             new ArrayPrefixHelpers.DoubleCumulateTask
                     (null, op, array, 0, array.length).invoke();
@@ -1695,6 +1700,7 @@
      */
     public static void parallelPrefix(double[] array, int fromIndex,
                                       int toIndex, DoubleBinaryOperator op) {
+        Objects.requireNonNull(op);
         rangeCheck(array.length, fromIndex, toIndex);
         if (fromIndex < toIndex)
             new ArrayPrefixHelpers.DoubleCumulateTask
@@ -1716,6 +1722,7 @@
      * @since 1.8
      */
     public static void parallelPrefix(int[] array, IntBinaryOperator op) {
+        Objects.requireNonNull(op);
         if (array.length > 0)
             new ArrayPrefixHelpers.IntCumulateTask
                     (null, op, array, 0, array.length).invoke();
@@ -1738,6 +1745,7 @@
      */
     public static void parallelPrefix(int[] array, int fromIndex,
                                       int toIndex, IntBinaryOperator op) {
+        Objects.requireNonNull(op);
         rangeCheck(array.length, fromIndex, toIndex);
         if (fromIndex < toIndex)
             new ArrayPrefixHelpers.IntCumulateTask
diff --git a/jdk/src/share/classes/java/util/Calendar.java b/jdk/src/share/classes/java/util/Calendar.java
index 076b59d..0334241 100644
--- a/jdk/src/share/classes/java/util/Calendar.java
+++ b/jdk/src/share/classes/java/util/Calendar.java
@@ -1937,7 +1937,7 @@
 
     /**
      * Sets the values for the fields <code>YEAR</code>, <code>MONTH</code>,
-     * <code>DAY_OF_MONTH</code>, <code>HOUR</code>, <code>MINUTE</code>, and
+     * <code>DAY_OF_MONTH</code>, <code>HOUR_OF_DAY</code>, <code>MINUTE</code>, and
      * <code>SECOND</code>.
      * Previous values of other fields are retained.  If this is not desired,
      * call {@link #clear()} first.
diff --git a/jdk/src/share/classes/java/util/Collection.java b/jdk/src/share/classes/java/util/Collection.java
index dba273e..2ae8872 100644
--- a/jdk/src/share/classes/java/util/Collection.java
+++ b/jdk/src/share/classes/java/util/Collection.java
@@ -104,6 +104,13 @@
  * the specified behavior of underlying {@link Object} methods wherever the
  * implementor deems it appropriate.
  *
+ * <p>Some collection operations which perform recursive traversal of the
+ * collection may fail with an exception for self-referential instances where
+ * the collection directly or indirectly contains itself. This includes the
+ * {@code clone()}, {@code equals()}, {@code hashCode()} and {@code toString()}
+ * methods. Implementations may optionally handle the self-referential scenario,
+ * however most current implementations do not do so.
+ *
  * <p>This interface is a member of the
  * <a href="{@docRoot}/../technotes/guides/collections/index.html">
  * Java Collections Framework</a>.
@@ -379,8 +386,8 @@
 
     /**
      * Removes all of the elements of this collection that satisfy the given
-     * predicate.  Errors or runtime exceptions thrown by the predicate are
-     * relayed to the caller.
+     * predicate.  Errors or runtime exceptions thrown during iteration or by
+     * the predicate are relayed to the caller.
      *
      * @implSpec
      * The default implementation traverses all elements of the collection using
@@ -393,9 +400,10 @@
      *        removed
      * @return {@code true} if any elements were removed
      * @throws NullPointerException if the specified filter is null
-     * @throws UnsupportedOperationException if the {@code remove}
-     *         method is not supported by this collection's
-     *         {@link #iterator}
+     * @throws UnsupportedOperationException if elements cannot be removed
+     *         from this collection.  Implementations may throw this exception if a
+     *         matching element cannot be removed or if, in general, removal is not
+     *         supported.
      * @since 1.8
      */
     default boolean removeIf(Predicate<? super E> filter) {
@@ -502,12 +510,10 @@
     /**
      * Creates a {@link Spliterator} over the elements in this collection.
      *
-     * <p>The returned {@code Spliterator} must report the characteristic
-     * {@link Spliterator#SIZED}; implementations should document any additional
-     * characteristic values reported by the returned spliterator.  If
-     * this collection contains no elements then the returned spliterator is
-     * only required to report {@link Spliterator#SIZED} and is not required to
-     * report additional characteristic values (if any).
+     * Implementations should document characteristic values reported by the
+     * spliterator.  Such characteristic values are not required to be reported
+     * if the spliterator reports {@link Spliterator#SIZED} and this collection
+     * contains no elements.
      *
      * <p>The default implementation should be overridden by subclasses that
      * can return a more efficient spliterator.  In order to
@@ -533,9 +539,11 @@
      * <em><a href="Spliterator.html#binding">late-binding</a></em> spliterator
      * from the collections's {@code Iterator}.  The spliterator inherits the
      * <em>fail-fast</em> properties of the collection's iterator.
+     * <p>
+     * The created {@code Spliterator} reports {@link Spliterator#SIZED}.
      *
      * @implNote
-     * The returned {@code Spliterator} additionally reports
+     * The created {@code Spliterator} additionally reports
      * {@link Spliterator#SUBSIZED}.
      *
      * <p>If a spliterator covers no elements then the reporting of additional
diff --git a/jdk/src/share/classes/java/util/GregorianCalendar.java b/jdk/src/share/classes/java/util/GregorianCalendar.java
index 8381a4f..eadb5d0 100644
--- a/jdk/src/share/classes/java/util/GregorianCalendar.java
+++ b/jdk/src/share/classes/java/util/GregorianCalendar.java
@@ -41,11 +41,8 @@
 import java.io.IOException;
 import java.io.ObjectInputStream;
 import java.time.Instant;
-import java.time.ZoneId;
 import java.time.ZonedDateTime;
-import java.time.chrono.IsoChronology;
 import java.time.temporal.ChronoField;
-import java.time.temporal.TemporalQuery;
 import sun.util.calendar.BaseCalendar;
 import sun.util.calendar.CalendarDate;
 import sun.util.calendar.CalendarSystem;
@@ -867,6 +864,7 @@
      * <code>false</code> otherwise.
      * @see Calendar#compareTo(Calendar)
      */
+    @Override
     public boolean equals(Object obj) {
         return obj instanceof GregorianCalendar &&
             super.equals(obj) &&
@@ -876,6 +874,7 @@
     /**
      * Generates the hash code for this <code>GregorianCalendar</code> object.
      */
+    @Override
     public int hashCode() {
         return super.hashCode() ^ (int)gregorianCutoverDate;
     }
@@ -908,6 +907,7 @@
      * or if any calendar fields have out-of-range values in
      * non-lenient mode.
      */
+    @Override
     public void add(int field, int amount) {
         // If amount == 0, do nothing even the given field is out of
         // range. This is tested by JCK.
@@ -1106,6 +1106,7 @@
      * @see #add(int,int)
      * @see #set(int,int)
      */
+    @Override
     public void roll(int field, boolean up) {
         roll(field, up ? +1 : -1);
     }
@@ -1154,6 +1155,7 @@
      * @see #set(int,int)
      * @since 1.2
      */
+    @Override
     public void roll(int field, int amount) {
         // If amount == 0, do nothing even the given field is out of
         // range. This is tested by JCK.
@@ -1272,25 +1274,44 @@
                 int woy = internalGet(WEEK_OF_YEAR);
                 int value = woy + amount;
                 if (!isCutoverYear(y)) {
-                    // If the new value is in between min and max
-                    // (exclusive), then we can use the value.
-                    if (value > min && value < max) {
-                        set(WEEK_OF_YEAR, value);
-                        return;
-                    }
-                    long fd = getCurrentFixedDate();
-                    // Make sure that the min week has the current DAY_OF_WEEK
-                    long day1 = fd - (7 * (woy - min));
-                    if (calsys.getYearFromFixedDate(day1) != y) {
-                        min++;
-                    }
+                    int weekYear = getWeekYear();
+                    if (weekYear == y) {
+                        // If the new value is in between min and max
+                        // (exclusive), then we can use the value.
+                        if (value > min && value < max) {
+                            set(WEEK_OF_YEAR, value);
+                            return;
+                        }
+                        long fd = getCurrentFixedDate();
+                        // Make sure that the min week has the current DAY_OF_WEEK
+                        // in the calendar year
+                        long day1 = fd - (7 * (woy - min));
+                        if (calsys.getYearFromFixedDate(day1) != y) {
+                            min++;
+                        }
 
-                    // Make sure the same thing for the max week
-                    fd += 7 * (max - internalGet(WEEK_OF_YEAR));
-                    if (calsys.getYearFromFixedDate(fd) != y) {
-                        max--;
+                        // Make sure the same thing for the max week
+                        fd += 7 * (max - internalGet(WEEK_OF_YEAR));
+                        if (calsys.getYearFromFixedDate(fd) != y) {
+                            max--;
+                        }
+                    } else {
+                        // When WEEK_OF_YEAR and YEAR are out of sync,
+                        // adjust woy and amount to stay in the calendar year.
+                        if (weekYear > y) {
+                            if (amount < 0) {
+                                amount++;
+                            }
+                            woy = max;
+                        } else {
+                            if (amount > 0) {
+                                amount -= woy - max;
+                            }
+                            woy = min;
+                        }
                     }
-                    break;
+                    set(field, getRolledValue(woy, amount, min, max));
+                    return;
                 }
 
                 // Handle cutover here.
@@ -1510,6 +1531,7 @@
      * @see #getActualMinimum(int)
      * @see #getActualMaximum(int)
      */
+    @Override
     public int getMinimum(int field) {
         return MIN_VALUES[field];
     }
@@ -1533,6 +1555,7 @@
      * @see #getActualMinimum(int)
      * @see #getActualMaximum(int)
      */
+    @Override
     public int getMaximum(int field) {
         switch (field) {
         case MONTH:
@@ -1581,6 +1604,7 @@
      * @see #getActualMinimum(int)
      * @see #getActualMaximum(int)
      */
+    @Override
     public int getGreatestMinimum(int field) {
         if (field == DAY_OF_MONTH) {
             BaseCalendar.Date d = getGregorianCutoverDate();
@@ -1610,6 +1634,7 @@
      * @see #getActualMinimum(int)
      * @see #getActualMaximum(int)
      */
+    @Override
     public int getLeastMaximum(int field) {
         switch (field) {
         case MONTH:
@@ -1659,6 +1684,7 @@
      * @see #getActualMaximum(int)
      * @since 1.2
      */
+    @Override
     public int getActualMinimum(int field) {
         if (field == DAY_OF_MONTH) {
             GregorianCalendar gc = getNormalizedCalendar();
@@ -1702,6 +1728,7 @@
      * @see #getActualMinimum(int)
      * @since 1.2
      */
+    @Override
     public int getActualMaximum(int field) {
         final int fieldsForFixedMax = ERA_MASK|DAY_OF_WEEK_MASK|HOUR_MASK|AM_PM_MASK|
             HOUR_OF_DAY_MASK|MINUTE_MASK|SECOND_MASK|MILLISECOND_MASK|
@@ -1970,6 +1997,7 @@
             (internalGet(ZONE_OFFSET) + internalGet(DST_OFFSET));
     }
 
+    @Override
     public Object clone()
     {
         GregorianCalendar other = (GregorianCalendar) super.clone();
@@ -1987,6 +2015,7 @@
         return other;
     }
 
+    @Override
     public TimeZone getTimeZone() {
         TimeZone zone = super.getTimeZone();
         // To share the zone by CalendarDates
@@ -1997,6 +2026,7 @@
         return zone;
     }
 
+    @Override
     public void setTimeZone(TimeZone zone) {
         super.setTimeZone(zone);
         // To share the zone by CalendarDates
@@ -2227,6 +2257,7 @@
      * @see #getActualMaximum(int)
      * @since 1.7
      */
+    @Override
     public int getWeeksInWeekYear() {
         GregorianCalendar gc = getNormalizedCalendar();
         int weekYear = gc.getWeekYear();
@@ -2262,8 +2293,9 @@
      *
      * @see Calendar#complete
      */
+    @Override
     protected void computeFields() {
-        int mask = 0;
+        int mask;
         if (isPartiallyNormalized()) {
             // Determine which calendar fields need to be computed.
             mask = getSetStateFields();
@@ -2598,6 +2630,7 @@
      *
      * @exception IllegalArgumentException if any calendar fields are invalid.
      */
+    @Override
     protected void computeTime() {
         // In non-lenient mode, perform brief checking of calendar
         // fields which have been set externally. Through this
diff --git a/jdk/src/share/classes/java/util/List.java b/jdk/src/share/classes/java/util/List.java
index 65ad140..42a1acf 100644
--- a/jdk/src/share/classes/java/util/List.java
+++ b/jdk/src/share/classes/java/util/List.java
@@ -396,11 +396,13 @@
      * replacing the first element.
      *
      * @param operator the operator to apply to each element
-     * @throws UnsupportedOperationException if the {@code set}
-     *         operation is not supported by this list
+     * @throws UnsupportedOperationException if this list is unmodifiable.
+     *         Implementations may throw this exception if an element
+     *         cannot be replaced or if, in general, modification is not
+     *         supported
      * @throws NullPointerException if the specified operator is null or
-     *         if the element is replaced with a null value and this list
-     *         does not permit null elements
+     *         if the operator result is a null value and this list does
+     *         not permit null elements
      *         (<a href="Collection.html#optional-restrictions">optional</a>)
      * @since 1.8
      */
@@ -685,4 +687,3 @@
         return Spliterators.spliterator(this, Spliterator.ORDERED);
     }
 }
-
diff --git a/jdk/src/share/classes/java/util/Map.java b/jdk/src/share/classes/java/util/Map.java
index bf1ba83..d1695ef 100644
--- a/jdk/src/share/classes/java/util/Map.java
+++ b/jdk/src/share/classes/java/util/Map.java
@@ -86,10 +86,6 @@
  * Such exceptions are marked as "optional" in the specification for this
  * interface.
  *
- * <p>This interface is a member of the
- * <a href="{@docRoot}/../technotes/guides/collections/index.html">
- * Java Collections Framework</a>.
- *
  * <p>Many methods in Collections Framework interfaces are defined
  * in terms of the {@link Object#equals(Object) equals} method.  For
  * example, the specification for the {@link #containsKey(Object)
@@ -107,6 +103,17 @@
  * the specified behavior of underlying {@link Object} methods wherever the
  * implementor deems it appropriate.
  *
+ * <p>Some map operations which perform recursive traversal of the map may fail
+ * with an exception for self-referential instances where the map directly or
+ * indirectly contains itself. This includes the {@code clone()},
+ * {@code equals()}, {@code hashCode()} and {@code toString()} methods.
+ * Implementations may optionally handle the self-referential scenario, however
+ * most current implementations do not do so.
+ *
+ * <p>This interface is a member of the
+ * <a href="{@docRoot}/../technotes/guides/collections/index.html">
+ * Java Collections Framework</a>.
+ *
  * @param <K> the type of keys maintained by this map
  * @param <V> the type of mapped values
  *
diff --git a/jdk/src/share/classes/java/util/Optional.java b/jdk/src/share/classes/java/util/Optional.java
index ce2a33d..10b7923 100644
--- a/jdk/src/share/classes/java/util/Optional.java
+++ b/jdk/src/share/classes/java/util/Optional.java
@@ -85,6 +85,7 @@
      * Constructs an instance with the value present.
      *
      * @param value the non-null value to be present
+     * @throws NullPointerException if value is null
      */
     private Optional(T value) {
         this.value = Objects.requireNonNull(value);
@@ -96,6 +97,7 @@
      * @param <T> the class of the value
      * @param value the value to be present, which must be non-null
      * @return an {@code Optional} with the value present
+     * @throws NullPointerException if value is null
      */
     public static <T> Optional<T> of(T value) {
         return new Optional<>(value);
diff --git a/jdk/src/share/classes/java/util/Random.java b/jdk/src/share/classes/java/util/Random.java
index 2c0e013..2095c43 100644
--- a/jdk/src/share/classes/java/util/Random.java
+++ b/jdk/src/share/classes/java/util/Random.java
@@ -89,7 +89,7 @@
     private static final long addend = 0xBL;
     private static final long mask = (1L << 48) - 1;
 
-    private static final double DOUBLE_UNIT = 1.0 / (1L << 53);
+    private static final double DOUBLE_UNIT = 0x1.0p-53; // 1.0 / (1L << 53)
 
     // IllegalArgumentException messages
     static final String BadBound = "bound must be positive";
diff --git a/jdk/src/share/classes/java/util/Set.java b/jdk/src/share/classes/java/util/Set.java
index d47a06a..2703049 100644
--- a/jdk/src/share/classes/java/util/Set.java
+++ b/jdk/src/share/classes/java/util/Set.java
@@ -386,15 +386,18 @@
     /**
      * Creates a {@code Spliterator} over the elements in this set.
      *
-     * <p>The {@code Spliterator} reports {@link Spliterator#SIZED} and
-     * {@link Spliterator#DISTINCT}.  Implementations should document the
-     * reporting of additional characteristic values.
+     * <p>The {@code Spliterator} reports {@link Spliterator#DISTINCT}.
+     * Implementations should document the reporting of additional
+     * characteristic values.
      *
      * @implSpec
      * The default implementation creates a
      * <em><a href="Spliterator.html#binding">late-binding</a></em> spliterator
      * from the set's {@code Iterator}.  The spliterator inherits the
      * <em>fail-fast</em> properties of the set's iterator.
+     * <p>
+     * The created {@code Spliterator} additionally reports
+     * {@link Spliterator#SIZED}.
      *
      * @implNote
      * The created {@code Spliterator} additionally reports
diff --git a/jdk/src/share/classes/java/util/SortedSet.java b/jdk/src/share/classes/java/util/SortedSet.java
index 3e64804..3ea9329 100644
--- a/jdk/src/share/classes/java/util/SortedSet.java
+++ b/jdk/src/share/classes/java/util/SortedSet.java
@@ -223,10 +223,10 @@
     /**
      * Creates a {@code Spliterator} over the elements in this sorted set.
      *
-     * <p>The {@code Spliterator} reports {@link Spliterator#SIZED},
-     * {@link Spliterator#DISTINCT}, {@link Spliterator#SORTED} and
-     * {@link Spliterator#ORDERED}.  Implementations should document the
-     * reporting of additional characteristic values.
+     * <p>The {@code Spliterator} reports {@link Spliterator#DISTINCT},
+     * {@link Spliterator#SORTED} and {@link Spliterator#ORDERED}.
+     * Implementations should document the reporting of additional
+     * characteristic values.
      *
      * <p>The spliterator's comparator (see
      * {@link java.util.Spliterator#getComparator()}) must be {@code null} if
@@ -240,6 +240,9 @@
      * from the sorted set's {@code Iterator}.  The spliterator inherits the
      * <em>fail-fast</em> properties of the set's iterator.  The
      * spliterator's comparator is the same as the sorted set's comparator.
+     * <p>
+     * The created {@code Spliterator} additionally reports
+     * {@link Spliterator#SIZED}.
      *
      * @implNote
      * The created {@code Spliterator} additionally reports
diff --git a/jdk/src/share/classes/java/util/SplittableRandom.java b/jdk/src/share/classes/java/util/SplittableRandom.java
index c3f5c0b..00de113 100644
--- a/jdk/src/share/classes/java/util/SplittableRandom.java
+++ b/jdk/src/share/classes/java/util/SplittableRandom.java
@@ -107,29 +107,25 @@
      * Methods nextLong, nextInt, and derivatives do not return the
      * sequence (seed) values, but instead a hash-like bit-mix of
      * their bits, producing more independently distributed sequences.
-     * For nextLong, the mix64 bit-mixing function computes the same
-     * value as the "64-bit finalizer" function in Austin Appleby's
-     * MurmurHash3 algorithm.  See
-     * http://code.google.com/p/smhasher/wiki/MurmurHash3 , which
-     * comments: "The constants for the finalizers were generated by a
-     * simple simulated-annealing algorithm, and both avalanche all
-     * bits of 'h' to within 0.25% bias." The mix32 function is
-     * equivalent to (int)(mix64(seed) >>> 32), but faster because it
-     * omits a step that doesn't contribute to result.
+     * For nextLong, the mix64 function is based on David Stafford's
+     * (http://zimbry.blogspot.com/2011/09/better-bit-mixing-improving-on.html)
+     * "Mix13" variant of the "64-bit finalizer" function in Austin
+     * Appleby's MurmurHash3 algorithm (see
+     * http://code.google.com/p/smhasher/wiki/MurmurHash3). The mix32
+     * function is based on Stafford's Mix04 mix function, but returns
+     * the upper 32 bits cast as int.
      *
      * The split operation uses the current generator to form the seed
      * and gamma for another SplittableRandom.  To conservatively
      * avoid potential correlations between seed and value generation,
-     * gamma selection (method nextGamma) uses the "Mix13" constants
-     * for MurmurHash3 described by David Stafford
-     * (http://zimbry.blogspot.com/2011/09/better-bit-mixing-improving-on.html)
-     * To avoid potential weaknesses in bit-mixing transformations, we
-     * restrict gammas to odd values with at least 12 and no more than
-     * 52 bits set.  Rather than rejecting candidates with too few or
-     * too many bits set, method nextGamma flips some bits (which has
-     * the effect of mapping at most 4 to any given gamma value).
-     * This reduces the effective set of 64bit odd gamma values by
-     * about 2<sup>14</sup>, a very tiny percentage, and serves as an
+     * gamma selection (method mixGamma) uses different
+     * (Murmurhash3's) mix constants.  To avoid potential weaknesses
+     * in bit-mixing transformations, we restrict gammas to odd values
+     * with at least 24 0-1 or 1-0 bit transitions.  Rather than
+     * rejecting candidates with too few or too many bits set, method
+     * mixGamma flips some bits (which has the effect of mapping at
+     * most 4 to any given gamma value).  This reduces the effective
+     * set of 64bit odd gamma values by about 2%, and serves as an
      * automated screening for sequence constant selection that is
      * left as an empirical decision in some other hashing and crypto
      * algorithms.
@@ -140,14 +136,15 @@
      * avalanching.
      *
      * The default (no-argument) constructor, in essence, invokes
-     * split() for a common "seeder" SplittableRandom.  Unlike other
-     * cases, this split must be performed in a thread-safe manner, so
-     * we use an AtomicLong to represent the seed rather than use an
-     * explicit SplittableRandom. To bootstrap the seeder, we start
-     * off using a seed based on current time and host unless the
-     * java.util.secureRandomSeed property is set. This serves as a
-     * slimmed-down (and insecure) variant of SecureRandom that also
-     * avoids stalls that may occur when using /dev/random.
+     * split() for a common "defaultGen" SplittableRandom.  Unlike
+     * other cases, this split must be performed in a thread-safe
+     * manner, so we use an AtomicLong to represent the seed rather
+     * than use an explicit SplittableRandom. To bootstrap the
+     * defaultGen, we start off using a seed based on current time and
+     * network interface address unless the java.util.secureRandomSeed
+     * property is set. This serves as a slimmed-down (and insecure)
+     * variant of SecureRandom that also avoids stalls that may occur
+     * when using /dev/random.
      *
      * It is a relatively simple matter to apply the basic design here
      * to use 128 bit seeds. However, emulating 128bit arithmetic and
@@ -160,17 +157,16 @@
      */
 
     /**
-     * The initial gamma value for (unsplit) SplittableRandoms. Must
-     * be odd with at least 12 and no more than 52 bits set. Currently
-     * set to the golden ratio scaled to 64bits.
+     * The golden ratio scaled to 64bits, used as the initial gamma
+     * value for (unsplit) SplittableRandoms.
      */
-    private static final long INITIAL_GAMMA = 0x9e3779b97f4a7c15L;
+    private static final long GOLDEN_GAMMA = 0x9e3779b97f4a7c15L;
 
     /**
      * The least non-zero value returned by nextDouble(). This value
      * is scaled by a random value of 53 bits to produce a result.
      */
-    private static final double DOUBLE_UNIT = 1.0 / (1L << 53);
+    private static final double DOUBLE_UNIT = 0x1.0p-53; // 1.0 / (1L << 53);
 
     /**
      * The seed. Updated only via method nextSeed.
@@ -191,31 +187,31 @@
     }
 
     /**
-     * Computes MurmurHash3 64bit mix function.
+     * Computes Stafford variant 13 of 64bit mix function.
      */
     private static long mix64(long z) {
-        z = (z ^ (z >>> 33)) * 0xff51afd7ed558ccdL;
-        z = (z ^ (z >>> 33)) * 0xc4ceb9fe1a85ec53L;
-        return z ^ (z >>> 33);
+        z = (z ^ (z >>> 30)) * 0xbf58476d1ce4e5b9L;
+        z = (z ^ (z >>> 27)) * 0x94d049bb133111ebL;
+        return z ^ (z >>> 31);
     }
 
     /**
-     * Returns the 32 high bits of mix64(z) as int.
+     * Returns the 32 high bits of Stafford variant 4 mix64 function as int.
      */
     private static int mix32(long z) {
-        z = (z ^ (z >>> 33)) * 0xff51afd7ed558ccdL;
-        return (int)(((z ^ (z >>> 33)) * 0xc4ceb9fe1a85ec53L) >>> 32);
+        z = (z ^ (z >>> 33)) * 0x62a9d9ed799705f5L;
+        return (int)(((z ^ (z >>> 28)) * 0xcb24d0a5c88c35b3L) >>> 32);
     }
 
     /**
      * Returns the gamma value to use for a new split instance.
      */
-    private static long nextGamma(long z) {
-        z = (z ^ (z >>> 30)) * 0xbf58476d1ce4e5b9L; // Stafford "Mix13"
-        z = (z ^ (z >>> 27)) * 0x94d049bb133111ebL;
-        z = (z ^ (z >>> 31)) | 1L; // force to be odd
-        int n = Long.bitCount(z);  // ensure enough 0 and 1 bits
-        return (n < 12 || n > 52) ? z ^ 0xaaaaaaaaaaaaaaaaL : z;
+    private static long mixGamma(long z) {
+        z = (z ^ (z >>> 33)) * 0xff51afd7ed558ccdL; // MurmurHash3 mix constants
+        z = (z ^ (z >>> 33)) * 0xc4ceb9fe1a85ec53L;
+        z = (z ^ (z >>> 33)) | 1L;                  // force to be odd
+        int n = Long.bitCount(z ^ (z >>> 1));       // ensure enough transitions
+        return (n < 24) ? z ^ 0xaaaaaaaaaaaaaaaaL : z;
     }
 
     /**
@@ -228,7 +224,7 @@
     /**
      * The seed generator for default constructors.
      */
-    private static final AtomicLong seeder = new AtomicLong(initialSeed());
+    private static final AtomicLong defaultGen = new AtomicLong(initialSeed());
 
     private static long initialSeed() {
         String pp = java.security.AccessController.doPrivileged(
@@ -396,7 +392,7 @@
      * @param seed the initial seed
      */
     public SplittableRandom(long seed) {
-        this(seed, INITIAL_GAMMA);
+        this(seed, GOLDEN_GAMMA);
     }
 
     /**
@@ -405,8 +401,10 @@
      * of those of any other instances in the current program; and
      * may, and typically does, vary across program invocations.
      */
-    public SplittableRandom() { // emulate seeder.split()
-        this.gamma = nextGamma(this.seed = seeder.addAndGet(INITIAL_GAMMA));
+    public SplittableRandom() { // emulate defaultGen.split()
+        long s = defaultGen.getAndAdd(2 * GOLDEN_GAMMA);
+        this.seed = mix64(s);
+        this.gamma = mixGamma(s + GOLDEN_GAMMA);
     }
 
     /**
@@ -424,8 +422,7 @@
      * @return the new SplittableRandom instance
      */
     public SplittableRandom split() {
-        long s = nextSeed();
-        return new SplittableRandom(s, nextGamma(s));
+        return new SplittableRandom(nextLong(), mixGamma(nextSeed()));
     }
 
     /**
diff --git a/jdk/src/share/classes/java/util/concurrent/ThreadLocalRandom.java b/jdk/src/share/classes/java/util/concurrent/ThreadLocalRandom.java
index 2cd2b00..2606bed 100644
--- a/jdk/src/share/classes/java/util/concurrent/ThreadLocalRandom.java
+++ b/jdk/src/share/classes/java/util/concurrent/ThreadLocalRandom.java
@@ -194,8 +194,8 @@
     private static final long SEEDER_INCREMENT = 0xbb67ae8584caa73bL;
 
     // Constants from SplittableRandom
-    private static final double DOUBLE_UNIT = 1.0 / (1L << 53);
-    private static final float  FLOAT_UNIT  = 1.0f / (1 << 24);
+    private static final double DOUBLE_UNIT = 0x1.0p-53;  // 1.0  / (1L << 53)
+    private static final float  FLOAT_UNIT  = 0x1.0p-24f; // 1.0f / (1 << 24)
 
     /** Rarely-used holder for the second of a pair of Gaussians */
     private static final ThreadLocal<Double> nextLocalGaussian =
diff --git a/jdk/src/share/classes/java/util/stream/Node.java b/jdk/src/share/classes/java/util/stream/Node.java
index bf4c2c6..381d06d 100644
--- a/jdk/src/share/classes/java/util/stream/Node.java
+++ b/jdk/src/share/classes/java/util/stream/Node.java
@@ -149,7 +149,9 @@
     /**
      * Copies the content of this {@code Node} into an array, starting at a
      * given offset into the array.  It is the caller's responsibility to ensure
-     * there is sufficient room in the array.
+     * there is sufficient room in the array, otherwise unspecified behaviour
+     * will occur if the array length is less than the number of elements
+     * contained in this node.
      *
      * @param array the array into which to copy the contents of this
      *       {@code Node}
@@ -258,6 +260,12 @@
          */
         @Override
         default T[] asArray(IntFunction<T[]> generator) {
+            if (java.util.stream.Tripwire.ENABLED)
+                java.util.stream.Tripwire.trip(getClass(), "{0} calling Node.OfPrimitive.asArray");
+
+            long size = count();
+            if (size >= Nodes.MAX_ARRAY_SIZE)
+                throw new IllegalArgumentException(Nodes.BAD_SIZE);
             T[] boxed = generator.apply((int) count());
             copyInto(boxed, 0);
             return boxed;
diff --git a/jdk/src/share/classes/java/util/stream/Nodes.java b/jdk/src/share/classes/java/util/stream/Nodes.java
index 6871744..d69b9f6 100644
--- a/jdk/src/share/classes/java/util/stream/Nodes.java
+++ b/jdk/src/share/classes/java/util/stream/Nodes.java
@@ -60,6 +60,9 @@
      */
     static final long MAX_ARRAY_SIZE = Integer.MAX_VALUE - 8;
 
+    // IllegalArgumentException messages
+    static final String BAD_SIZE = "Stream size exceeds max array size";
+
     @SuppressWarnings("raw")
     private static final Node EMPTY_NODE = new EmptyNode.OfRef();
     private static final Node.OfInt EMPTY_INT_NODE = new EmptyNode.OfInt();
@@ -317,7 +320,7 @@
         long size = helper.exactOutputSizeIfKnown(spliterator);
         if (size >= 0 && spliterator.hasCharacteristics(Spliterator.SUBSIZED)) {
             if (size >= MAX_ARRAY_SIZE)
-                throw new IllegalArgumentException("Stream size exceeds max array size");
+                throw new IllegalArgumentException(BAD_SIZE);
             P_OUT[] array = generator.apply((int) size);
             new SizedCollectorTask.OfRef<>(spliterator, helper, array).invoke();
             return node(array);
@@ -354,7 +357,7 @@
         long size = helper.exactOutputSizeIfKnown(spliterator);
         if (size >= 0 && spliterator.hasCharacteristics(Spliterator.SUBSIZED)) {
             if (size >= MAX_ARRAY_SIZE)
-                throw new IllegalArgumentException("Stream size exceeds max array size");
+                throw new IllegalArgumentException(BAD_SIZE);
             int[] array = new int[(int) size];
             new SizedCollectorTask.OfInt<>(spliterator, helper, array).invoke();
             return node(array);
@@ -392,7 +395,7 @@
         long size = helper.exactOutputSizeIfKnown(spliterator);
         if (size >= 0 && spliterator.hasCharacteristics(Spliterator.SUBSIZED)) {
             if (size >= MAX_ARRAY_SIZE)
-                throw new IllegalArgumentException("Stream size exceeds max array size");
+                throw new IllegalArgumentException(BAD_SIZE);
             long[] array = new long[(int) size];
             new SizedCollectorTask.OfLong<>(spliterator, helper, array).invoke();
             return node(array);
@@ -430,7 +433,7 @@
         long size = helper.exactOutputSizeIfKnown(spliterator);
         if (size >= 0 && spliterator.hasCharacteristics(Spliterator.SUBSIZED)) {
             if (size >= MAX_ARRAY_SIZE)
-                throw new IllegalArgumentException("Stream size exceeds max array size");
+                throw new IllegalArgumentException(BAD_SIZE);
             double[] array = new double[(int) size];
             new SizedCollectorTask.OfDouble<>(spliterator, helper, array).invoke();
             return node(array);
@@ -460,7 +463,10 @@
      */
     public static <T> Node<T> flatten(Node<T> node, IntFunction<T[]> generator) {
         if (node.getChildCount() > 0) {
-            T[] array = generator.apply((int) node.count());
+            long size = node.count();
+            if (size >= MAX_ARRAY_SIZE)
+                throw new IllegalArgumentException(BAD_SIZE);
+            T[] array = generator.apply((int) size);
             new ToArrayTask.OfRef<>(node, array, 0).invoke();
             return node(array);
         } else {
@@ -483,7 +489,10 @@
      */
     public static Node.OfInt flattenInt(Node.OfInt node) {
         if (node.getChildCount() > 0) {
-            int[] array = new int[(int) node.count()];
+            long size = node.count();
+            if (size >= MAX_ARRAY_SIZE)
+                throw new IllegalArgumentException(BAD_SIZE);
+            int[] array = new int[(int) size];
             new ToArrayTask.OfInt(node, array, 0).invoke();
             return node(array);
         } else {
@@ -506,7 +515,10 @@
      */
     public static Node.OfLong flattenLong(Node.OfLong node) {
         if (node.getChildCount() > 0) {
-            long[] array = new long[(int) node.count()];
+            long size = node.count();
+            if (size >= MAX_ARRAY_SIZE)
+                throw new IllegalArgumentException(BAD_SIZE);
+            long[] array = new long[(int) size];
             new ToArrayTask.OfLong(node, array, 0).invoke();
             return node(array);
         } else {
@@ -529,7 +541,10 @@
      */
     public static Node.OfDouble flattenDouble(Node.OfDouble node) {
         if (node.getChildCount() > 0) {
-            double[] array = new double[(int) node.count()];
+            long size = node.count();
+            if (size >= MAX_ARRAY_SIZE)
+                throw new IllegalArgumentException(BAD_SIZE);
+            double[] array = new double[(int) size];
             new ToArrayTask.OfDouble(node, array, 0).invoke();
             return node(array);
         } else {
@@ -627,7 +642,7 @@
         @SuppressWarnings("unchecked")
         ArrayNode(long size, IntFunction<T[]> generator) {
             if (size >= MAX_ARRAY_SIZE)
-                throw new IllegalArgumentException("Stream size exceeds max array size");
+                throw new IllegalArgumentException(BAD_SIZE);
             this.array = generator.apply((int) size);
             this.curSize = 0;
         }
@@ -777,12 +792,17 @@
         public void copyInto(T[] array, int offset) {
             Objects.requireNonNull(array);
             left.copyInto(array, offset);
+            // Cast to int is safe since it is the callers responsibility to
+            // ensure that there is sufficient room in the array
             right.copyInto(array, offset + (int) left.count());
         }
 
         @Override
         public T[] asArray(IntFunction<T[]> generator) {
-            T[] array = generator.apply((int) count());
+            long size = count();
+            if (size >= MAX_ARRAY_SIZE)
+                throw new IllegalArgumentException(BAD_SIZE);
+            T[] array = generator.apply((int) size);
             copyInto(array, 0);
             return array;
         }
@@ -836,12 +856,17 @@
             @Override
             public void copyInto(T_ARR array, int offset) {
                 left.copyInto(array, offset);
+                // Cast to int is safe since it is the callers responsibility to
+                // ensure that there is sufficient room in the array
                 right.copyInto(array, offset + (int) left.count());
             }
 
             @Override
             public T_ARR asPrimitiveArray() {
-                T_ARR array = newArray((int) count());
+                long size = count();
+                if (size >= MAX_ARRAY_SIZE)
+                    throw new IllegalArgumentException(BAD_SIZE);
+                T_ARR array = newArray((int) size);
                 copyInto(array, 0);
                 return array;
             }
@@ -1287,7 +1312,7 @@
 
         IntArrayNode(long size) {
             if (size >= MAX_ARRAY_SIZE)
-                throw new IllegalArgumentException("Stream size exceeds max array size");
+                throw new IllegalArgumentException(BAD_SIZE);
             this.array = new int[(int) size];
             this.curSize = 0;
         }
@@ -1343,7 +1368,7 @@
 
         LongArrayNode(long size) {
             if (size >= MAX_ARRAY_SIZE)
-                throw new IllegalArgumentException("Stream size exceeds max array size");
+                throw new IllegalArgumentException(BAD_SIZE);
             this.array = new long[(int) size];
             this.curSize = 0;
         }
@@ -1397,7 +1422,7 @@
 
         DoubleArrayNode(long size) {
             if (size >= MAX_ARRAY_SIZE)
-                throw new IllegalArgumentException("Stream size exceeds max array size");
+                throw new IllegalArgumentException(BAD_SIZE);
             this.array = new double[(int) size];
             this.curSize = 0;
         }
@@ -1843,8 +1868,8 @@
                 task = task.makeChild(rightSplit, task.offset + leftSplitSize,
                                       task.length - leftSplitSize);
             }
-            if (task.offset + task.length >= MAX_ARRAY_SIZE)
-                throw new IllegalArgumentException("Stream size exceeds max array size");
+
+            assert task.offset + task.length < MAX_ARRAY_SIZE;
             T_SINK sink = (T_SINK) task;
             task.helper.wrapAndCopyInto(sink, rightSplit);
             task.propagateCompletion();
@@ -1854,10 +1879,13 @@
 
         @Override
         public void begin(long size) {
-            if(size > length)
+            if (size > length)
                 throw new IllegalStateException("size passed to Sink.begin exceeds array length");
+            // Casts to int are safe since absolute size is verified to be within
+            // bounds when the root concrete SizedCollectorTask is constructed
+            // with the shared array
             index = (int) offset;
-            fence = (int) offset + (int) length;
+            fence = index + (int) length;
         }
 
         @SuppressWarnings("serial")
diff --git a/jdk/src/share/classes/java/util/stream/SortedOps.java b/jdk/src/share/classes/java/util/stream/SortedOps.java
index 9df65e3..8dcabb4 100644
--- a/jdk/src/share/classes/java/util/stream/SortedOps.java
+++ b/jdk/src/share/classes/java/util/stream/SortedOps.java
@@ -278,7 +278,7 @@
     }
 
     /**
-     * {@link ForkJoinTask} for implementing sort on SIZED reference streams.
+     * {@link Sink} for implementing sort on SIZED reference streams.
      */
     private static final class SizedRefSortingSink<T> extends Sink.ChainedReference<T, T> {
         private final Comparator<? super T> comparator;
@@ -293,16 +293,12 @@
         @Override
         public void begin(long size) {
             if (size >= Nodes.MAX_ARRAY_SIZE)
-                throw new IllegalArgumentException("Stream size exceeds max array size");
+                throw new IllegalArgumentException(Nodes.BAD_SIZE);
             array = (T[]) new Object[(int) size];
         }
 
         @Override
         public void end() {
-            // Need to use offset rather than array.length since the downstream
-            // many be short-circuiting
-            // @@@ A better approach is to know if the downstream short-circuits
-            //     and check sink.cancellationRequested
             Arrays.sort(array, 0, offset, comparator);
             downstream.begin(offset);
             for (int i = 0; i < offset; i++)
@@ -331,6 +327,8 @@
 
         @Override
         public void begin(long size) {
+            if (size >= Nodes.MAX_ARRAY_SIZE)
+                throw new IllegalArgumentException(Nodes.BAD_SIZE);
             list = (size >= 0) ? new ArrayList<T>((int) size) : new ArrayList<T>();
         }
 
@@ -363,7 +361,7 @@
         @Override
         public void begin(long size) {
             if (size >= Nodes.MAX_ARRAY_SIZE)
-                throw new IllegalArgumentException("Stream size exceeds max array size");
+                throw new IllegalArgumentException(Nodes.BAD_SIZE);
             array = new int[(int) size];
         }
 
@@ -395,6 +393,8 @@
 
         @Override
         public void begin(long size) {
+            if (size >= Nodes.MAX_ARRAY_SIZE)
+                throw new IllegalArgumentException(Nodes.BAD_SIZE);
             b = (size > 0) ? new SpinedBuffer.OfInt((int) size) : new SpinedBuffer.OfInt();
         }
 
@@ -428,7 +428,7 @@
         @Override
         public void begin(long size) {
             if (size >= Nodes.MAX_ARRAY_SIZE)
-                throw new IllegalArgumentException("Stream size exceeds max array size");
+                throw new IllegalArgumentException(Nodes.BAD_SIZE);
             array = new long[(int) size];
         }
 
@@ -460,6 +460,8 @@
 
         @Override
         public void begin(long size) {
+            if (size >= Nodes.MAX_ARRAY_SIZE)
+                throw new IllegalArgumentException(Nodes.BAD_SIZE);
             b = (size > 0) ? new SpinedBuffer.OfLong((int) size) : new SpinedBuffer.OfLong();
         }
 
@@ -493,7 +495,7 @@
         @Override
         public void begin(long size) {
             if (size >= Nodes.MAX_ARRAY_SIZE)
-                throw new IllegalArgumentException("Stream size exceeds max array size");
+                throw new IllegalArgumentException(Nodes.BAD_SIZE);
             array = new double[(int) size];
         }
 
@@ -525,6 +527,8 @@
 
         @Override
         public void begin(long size) {
+            if (size >= Nodes.MAX_ARRAY_SIZE)
+                throw new IllegalArgumentException(Nodes.BAD_SIZE);
             b = (size > 0) ? new SpinedBuffer.OfDouble((int) size) : new SpinedBuffer.OfDouble();
         }
 
diff --git a/jdk/src/share/classes/java/util/stream/SpinedBuffer.java b/jdk/src/share/classes/java/util/stream/SpinedBuffer.java
index 7312c98..e7fac67 100644
--- a/jdk/src/share/classes/java/util/stream/SpinedBuffer.java
+++ b/jdk/src/share/classes/java/util/stream/SpinedBuffer.java
@@ -156,6 +156,9 @@
     public E get(long index) {
         // @@@ can further optimize by caching last seen spineIndex,
         // which is going to be right most of the time
+
+        // Casts to int are safe since the spine array index is the index minus
+        // the prior element count from the current spine
         if (spineIndex == 0) {
             if (index < elementIndex)
                 return curChunk[((int) index)];
@@ -201,11 +204,11 @@
      * elements into it.
      */
     public E[] asArray(IntFunction<E[]> arrayFactory) {
-        // @@@ will fail for size == MAX_VALUE
-        E[] result = arrayFactory.apply((int) count());
-
+        long size = count();
+        if (size >= Nodes.MAX_ARRAY_SIZE)
+            throw new IllegalArgumentException(Nodes.BAD_SIZE);
+        E[] result = arrayFactory.apply((int) size);
         copyInto(result, 0);
-
         return result;
     }
 
@@ -547,8 +550,10 @@
         }
 
         public T_ARR asPrimitiveArray() {
-            // @@@ will fail for size == MAX_VALUE
-            T_ARR result = newArray((int) count());
+            long size = count();
+            if (size >= Nodes.MAX_ARRAY_SIZE)
+                throw new IllegalArgumentException(Nodes.BAD_SIZE);
+            T_ARR result = newArray((int) size);
             copyInto(result, 0);
             return result;
         }
@@ -760,11 +765,13 @@
         }
 
         public int get(long index) {
+            // Casts to int are safe since the spine array index is the index minus
+            // the prior element count from the current spine
             int ch = chunkFor(index);
             if (spineIndex == 0 && ch == 0)
                 return curChunk[(int) index];
             else
-                return spine[ch][(int) (index-priorElementCount[ch])];
+                return spine[ch][(int) (index - priorElementCount[ch])];
         }
 
         @Override
@@ -871,11 +878,13 @@
         }
 
         public long get(long index) {
+            // Casts to int are safe since the spine array index is the index minus
+            // the prior element count from the current spine
             int ch = chunkFor(index);
             if (spineIndex == 0 && ch == 0)
                 return curChunk[(int) index];
             else
-                return spine[ch][(int) (index-priorElementCount[ch])];
+                return spine[ch][(int) (index - priorElementCount[ch])];
         }
 
         @Override
@@ -984,11 +993,13 @@
         }
 
         public double get(long index) {
+            // Casts to int are safe since the spine array index is the index minus
+            // the prior element count from the current spine
             int ch = chunkFor(index);
             if (spineIndex == 0 && ch == 0)
                 return curChunk[(int) index];
             else
-                return spine[ch][(int) (index-priorElementCount[ch])];
+                return spine[ch][(int) (index - priorElementCount[ch])];
         }
 
         @Override
diff --git a/jdk/src/share/classes/java/util/stream/Streams.java b/jdk/src/share/classes/java/util/stream/Streams.java
index 8af33f2..41f3ada 100644
--- a/jdk/src/share/classes/java/util/stream/Streams.java
+++ b/jdk/src/share/classes/java/util/stream/Streams.java
@@ -169,7 +169,9 @@
 
         private int splitPoint(long size) {
             int d = (size < BALANCED_SPLIT_THRESHOLD) ? 2 : RIGHT_BALANCED_SPLIT_RATIO;
-            // 2 <= size <= 2^32
+            // Cast to int is safe since:
+            //   2 <= size < 2^32
+            //   2 <= d <= 8
             return (int) (size / d);
         }
     }
diff --git a/jdk/src/share/classes/javax/imageio/plugins/bmp/BMPImageWriteParam.java b/jdk/src/share/classes/javax/imageio/plugins/bmp/BMPImageWriteParam.java
index de35f5f..230f720 100644
--- a/jdk/src/share/classes/javax/imageio/plugins/bmp/BMPImageWriteParam.java
+++ b/jdk/src/share/classes/javax/imageio/plugins/bmp/BMPImageWriteParam.java
@@ -29,6 +29,7 @@
 import javax.imageio.ImageWriteParam;
 
 import com.sun.imageio.plugins.bmp.BMPConstants;
+import com.sun.imageio.plugins.bmp.BMPCompressionTypes;
 
 /**
  * A subclass of <code>ImageWriteParam</code> for encoding images in
@@ -78,7 +79,7 @@
         super(locale);
 
         // Set compression types ("BI_RGB" denotes uncompressed).
-        compressionTypes = BMPConstants.compressionTypeNames.clone();
+        compressionTypes = BMPCompressionTypes.getCompressionTypes();
 
         // Set compression flag.
         canWriteCompressed = true;
diff --git a/jdk/src/share/classes/javax/management/Descriptor.java b/jdk/src/share/classes/javax/management/Descriptor.java
index 2337e2e..b07447a 100644
--- a/jdk/src/share/classes/javax/management/Descriptor.java
+++ b/jdk/src/share/classes/javax/management/Descriptor.java
@@ -319,7 +319,7 @@
  * <a href="modelmbean/ModelMBeanOperationInfo.html#descriptor"><!--
  * -->{@code ModelMBeanOperationInfo}</a>, as
  * well as the chapter "Model MBeans" of the <a
- * href="http://java.sun.com/products/JavaManagement/download.html">JMX
+ * href="http://www.oracle.com/technetwork/java/javase/tech/javamanagement-140525.html">JMX
  * Specification</a>.  The following table summarizes these fields.  Note
  * that when the Type in this table is Number, a String that is the decimal
  * representation of a Long can also be used.</p>
diff --git a/jdk/src/share/classes/javax/print/Doc.java b/jdk/src/share/classes/javax/print/Doc.java
index 04d92d2..1878731 100644
--- a/jdk/src/share/classes/javax/print/Doc.java
+++ b/jdk/src/share/classes/javax/print/Doc.java
@@ -65,8 +65,8 @@
  * representation object "consumes" the print data as the caller obtains the
  * print data, such as a print data representation object which is a stream.
  * Once the Print Job has called {@link #getPrintData()
- * <CODE>getPrintData()</CODE>} and obtained the stream, any further calls to
- * {@link #getPrintData() <CODE>getPrintData()</CODE>} will return the same
+ * getPrintData()} and obtained the stream, any further calls to
+ * {@link #getPrintData() getPrintData()} will return the same
  * stream object upon which reading may already be in progress, <I>not</I> a new
  * stream object that will re-read the print data from the beginning. Specifying
  * a doc object to behave this way simplifies the implementation of doc objects,
@@ -83,7 +83,7 @@
  * object is constructed. In this case the doc object might provide a "lazy"
  * implementation that generates the print data representation object (and/or
  * the print data) only when the Print Job calls for it (when the Print Job
- * calls the {@link #getPrintData() <CODE>getPrintData()</CODE>} method).
+ * calls the {@link #getPrintData() getPrintData()} method).
  * <P>
  * There is no restriction on the number of client threads that may be
  * simultaneously accessing the same doc. Therefore, all implementations of
diff --git a/jdk/src/share/classes/javax/print/DocFlavor.java b/jdk/src/share/classes/javax/print/DocFlavor.java
index 5b3f10c..c5d96af 100644
--- a/jdk/src/share/classes/javax/print/DocFlavor.java
+++ b/jdk/src/share/classes/javax/print/DocFlavor.java
@@ -53,7 +53,7 @@
  * <LI>
  * <B>Representation class name.</B> This specifies the fully-qualified name of
  * the class of the object from which the actual print data comes, as returned
- * by the {@link java.lang.Class#getName() <CODE>Class.getName()</CODE>} method.
+ * by the {@link java.lang.Class#getName() Class.getName()} method.
  * (Thus the class name for <CODE>byte[]</CODE> is <CODE>"[B"</CODE>, for
  * <CODE>char[]</CODE> it is <CODE>"[C"</CODE>.)
  * </UL>
@@ -174,7 +174,7 @@
  * platform for data (eg files) stored in that platform's encoding.
  * A CharSet which corresponds to this and is suitable for use in a
  * mime-type for a DocFlavor can be obtained
- * from {@link DocFlavor#hostEncoding <CODE>DocFlavor.hostEncoding</CODE>}
+ * from {@link DocFlavor#hostEncoding DocFlavor.hostEncoding}
  * This may not always be the primary IANA name but is guaranteed to be
  * understood by this VM.
  * For common flavors, the pre-defined *HOST DocFlavors may be used.
@@ -669,7 +669,7 @@
         /**
          * Doc flavor with MIME type = <CODE>"text/plain"</CODE>,
          * encoded in the host platform encoding.
-         * See {@link DocFlavor#hostEncoding <CODE>hostEncoding</CODE>}
+         * See {@link DocFlavor#hostEncoding hostEncoding}
          * Print data representation class name =
          * <CODE>"[B"</CODE> (byte array).
          */
@@ -728,7 +728,7 @@
         /**
          * Doc flavor with MIME type = <CODE>"text/html"</CODE>,
          * encoded in the host platform encoding.
-         * See {@link DocFlavor#hostEncoding <CODE>hostEncoding</CODE>}
+         * See {@link DocFlavor#hostEncoding hostEncoding}
          * Print data representation class name =
          * <CODE>"[B"</CODE> (byte array).
          */
@@ -838,7 +838,7 @@
     /**
      * Class DocFlavor.INPUT_STREAM provides predefined static constant
      * DocFlavor objects for example doc flavors using a byte stream ({@link
-     * java.io.InputStream <CODE>java.io.InputStream</CODE>}) as the print
+     * java.io.InputStream java.io.InputStream}) as the print
      * data representation class.
      * <P>
      *
@@ -868,7 +868,7 @@
         /**
          * Doc flavor with MIME type = <CODE>"text/plain"</CODE>,
          * encoded in the host platform encoding.
-         * See {@link DocFlavor#hostEncoding <CODE>hostEncoding</CODE>}
+         * See {@link DocFlavor#hostEncoding hostEncoding}
          * Print data representation class name =
          * <CODE>"java.io.InputStream"</CODE> (byte stream).
          */
@@ -925,7 +925,7 @@
         /**
          * Doc flavor with MIME type = <CODE>"text/html"</CODE>,
          * encoded in the host platform encoding.
-         * See {@link DocFlavor#hostEncoding <CODE>hostEncoding</CODE>}
+         * See {@link DocFlavor#hostEncoding hostEncoding}
          * Print data representation class name =
          * <CODE>"java.io.InputStream"</CODE> (byte stream).
          */
@@ -1041,7 +1041,7 @@
      * Class DocFlavor.URL provides predefined static constant DocFlavor
      * objects.
      * For example doc flavors using a Uniform Resource Locator ({@link
-     * java.net.URL <CODE>java.net.URL</CODE>}) as the print data
+     * java.net.URL java.net.URL}) as the print data
      * representation  class.
      * <P>
      *
@@ -1068,7 +1068,7 @@
         /**
          * Doc flavor with MIME type = <CODE>"text/plain"</CODE>,
          * encoded in the host platform encoding.
-         * See {@link DocFlavor#hostEncoding <CODE>hostEncoding</CODE>}
+         * See {@link DocFlavor#hostEncoding hostEncoding}
          * Print data representation class name =
          * <CODE>"java.net.URL"</CODE> (byte stream).
          */
@@ -1125,7 +1125,7 @@
         /**
          * Doc flavor with MIME type = <CODE>"text/html"</CODE>,
          * encoded in the host platform encoding.
-         * See {@link DocFlavor#hostEncoding <CODE>hostEncoding</CODE>}
+         * See {@link DocFlavor#hostEncoding hostEncoding}
          * Print data representation class name =
          * <CODE>"java.net.URL"</CODE> (byte stream).
          */
@@ -1280,7 +1280,7 @@
     /**
      * Class DocFlavor.STRING provides predefined static constant DocFlavor
      * objects for example doc flavors using a string ({@link java.lang.String
-     * <CODE>java.lang.String</CODE>}) as the print data representation class.
+     * java.lang.String}) as the print data representation class.
      * As such, the character set is Unicode.
      * <P>
      *
@@ -1328,7 +1328,7 @@
     /**
      * Class DocFlavor.READER provides predefined static constant DocFlavor
      * objects for example doc flavors using a character stream ({@link
-     * java.io.Reader <CODE>java.io.Reader</CODE>}) as the print data
+     * java.io.Reader java.io.Reader}) as the print data
      * representation class. As such, the character set is Unicode.
      * <P>
      *
diff --git a/jdk/src/share/classes/javax/print/MultiDoc.java b/jdk/src/share/classes/javax/print/MultiDoc.java
index 69a1756..4813a59 100644
--- a/jdk/src/share/classes/javax/print/MultiDoc.java
+++ b/jdk/src/share/classes/javax/print/MultiDoc.java
@@ -39,9 +39,9 @@
  * docs. A multidoc object is like a node in the linked list, containing the
  * current doc in the list and a pointer to the next node (multidoc) in the
  * list. The Print Job can call the multidoc's {@link #getDoc()
- * <CODE>getDoc()</CODE>} method to get the current doc. When it's ready to go
+ * getDoc()} method to get the current doc. When it's ready to go
  * on to the next doc, the Print Job can call the multidoc's {@link #next()
- * <CODE>next()</CODE>} method to get the next multidoc, which contains the
+ * next()} method to get the next multidoc, which contains the
  * next doc. So Print Job code for accessing a multidoc might look like this:
  * <PRE>
  *      void processMultiDoc(MultiDoc theMultiDoc) {
@@ -88,12 +88,12 @@
 * multiple docs to a Print Job, every Print Service proxy that supports
  * multidoc print jobs is required to access a MultiDoc object using the
  * interleaved pattern. That is, given a MultiDoc object, the print service
- * proxy will call {@link #getDoc() <CODE>getDoc()</CODE>} one or more times
+ * proxy will call {@link #getDoc() getDoc()} one or more times
  * until it successfully obtains the current Doc object. The print service proxy
  * will then obtain the current doc's print data, not proceeding until all the
  * print data is obtained or an unrecoverable error occurs. If it is able to
  * continue, the print service proxy will then call {@link #next()
- * <CODE>next()</CODE>} one or more times until it successfully obtains either
+ * next()} one or more times until it successfully obtains either
  * the next MultiDoc object or an indication that there are no more. An
  * implementation of interface MultiDoc can assume the print service proxy will
  * follow this interleaved pattern; for any other pattern of usage, the MultiDoc
diff --git a/jdk/src/share/classes/javax/print/attribute/standard/Finishings.java b/jdk/src/share/classes/javax/print/attribute/standard/Finishings.java
index 3f09cd9..65332e5 100644
--- a/jdk/src/share/classes/javax/print/attribute/standard/Finishings.java
+++ b/jdk/src/share/classes/javax/print/attribute/standard/Finishings.java
@@ -42,16 +42,16 @@
  * Standard Finishings values are:
  * <TABLE BORDER=0 CELLPADDING=0 CELLSPACING=0 WIDTH=100% SUMMARY="layout">
  * <TR>
- * <TD WIDTH=10%>
+ * <TD STYLE="WIDTH:10%">
  * &nbsp;
  * </TD>
- * <TD WIDTH=27%>
+ * <TD STYLE="WIDTH:27%">
  * {@link #NONE NONE}
  * </TD>
- * <TD WIDTH=27%>
+ * <TD STYLE="WIDTH:27%">
  * {@link #STAPLE STAPLE}
  * </TD>
- * <TD WIDTH=36%>
+ * <TD STYLE="WIDTH:36%">
  * {@link #EDGE_STITCH EDGE_STITCH}
  * </TD>
  * </TR>
@@ -78,70 +78,70 @@
  * corner or an edge as if the document were a portrait document:
  * <TABLE BORDER=0 CELLPADDING=0 CELLSPACING=0 WIDTH=100% SUMMARY="layout">
  * <TR>
- * <TD WIDTH=10%>
+ * <TD STYLE="WIDTH:10%">
  * &nbsp;
  * </TD>
- * <TD WIDTH=27%>
+ * <TD STYLE="WIDTH:27%">
  * {@link #STAPLE_TOP_LEFT STAPLE_TOP_LEFT}
  * </TD>
- * <TD WIDTH=27%>
+ * <TD STYLE="WIDTH:27%">
  * {@link #EDGE_STITCH_LEFT EDGE_STITCH_LEFT}
  * </TD>
- * <TD WIDTH=27%>
+ * <TD STYLE="WIDTH:27%">
  * {@link #STAPLE_DUAL_LEFT STAPLE_DUAL_LEFT}
  * </TD>
- * <TD WIDTH=9%>
+ * <TD STYLE="WIDTH:9%">
  * &nbsp;
  * </TD>
  * </TR>
  * <TR>
- * <TD WIDTH=10%>
+ * <TD STYLE="WIDTH:10%">
  * &nbsp;
  * </TD>
- * <TD WIDTH=27%>
+ * <TD STYLE="WIDTH:27%">
  * {@link #STAPLE_BOTTOM_LEFT STAPLE_BOTTOM_LEFT}
  * </TD>
- * <TD WIDTH=27%>
+ * <TD STYLE="WIDTH:27%">
  * {@link #EDGE_STITCH_TOP EDGE_STITCH_TOP}
  * </TD>
- * <TD WIDTH=27%>
+ * <TD STYLE="WIDTH:27%">
  * {@link #STAPLE_DUAL_TOP STAPLE_DUAL_TOP}
  * </TD>
- * <TD WIDTH=9%>
+ * <TD STYLE="WIDTH:9%">
  * &nbsp;
  * </TD>
  * </TR>
  * <TR>
- * <TD WIDTH=10%>
+ * <TD STYLE="WIDTH:10%">
  * &nbsp;
  * </TD>
- * <TD WIDTH=27%>
+ * <TD STYLE="WIDTH:27%">
  * {@link #STAPLE_TOP_RIGHT STAPLE_TOP_RIGHT}
  * </TD>
- * <TD WIDTH=27%>
+ * <TD STYLE="WIDTH:27%">
  * {@link #EDGE_STITCH_RIGHT EDGE_STITCH_RIGHT}
  * </TD>
- * <TD WIDTH=27%>
+ * <TD STYLE="WIDTH:27%">
  * {@link #STAPLE_DUAL_RIGHT STAPLE_DUAL_RIGHT}
  * </TD>
- * <TD WIDTH=9%>
+ * <TD STYLE="WIDTH:9%">
  * &nbsp;
  * </TD>
  * </TR>
  * <TR>
- * <TD WIDTH=10%>
+ * <TD STYLE="WIDTH:10%">
  * &nbsp;
  * </TD>
- * <TD WIDTH=27%>
+ * <TD STYLE="WIDTH:27%">
  * {@link #STAPLE_BOTTOM_RIGHT STAPLE_BOTTOM_RIGHT}
  * </TD>
- * <TD WIDTH=27%>
+ * <TD STYLE="WIDTH:27%">
  * {@link #EDGE_STITCH_BOTTOM EDGE_STITCH_BOTTOM}
  * </TD>
- * <TD WIDTH=27%>
+ * <TD STYLE="WIDTH:27%">
  * {@link #STAPLE_DUAL_BOTTOM STAPLE_DUAL_BOTTOM}
  * </TD>
- * <TD WIDTH=9%>
+ * <TD STYLE="WIDTH:9%">
  * &nbsp;
  * </TD>
  * </TR>
diff --git a/jdk/src/share/classes/javax/print/attribute/standard/JobStateReasons.java b/jdk/src/share/classes/javax/print/attribute/standard/JobStateReasons.java
index 9cb104b..d9e225f 100644
--- a/jdk/src/share/classes/javax/print/attribute/standard/JobStateReasons.java
+++ b/jdk/src/share/classes/javax/print/attribute/standard/JobStateReasons.java
@@ -110,7 +110,7 @@
      * The underlying hash set's initial capacity and load factor are as
      * specified in the superclass constructor {@link
      * java.util.HashSet#HashSet(java.util.Collection)
-     * <CODE>HashSet(Collection)</CODE>}.
+     * HashSet(Collection)}.
      *
      * @param  collection  Collection to copy.
      *
diff --git a/jdk/src/share/classes/javax/print/attribute/standard/MediaPrintableArea.java b/jdk/src/share/classes/javax/print/attribute/standard/MediaPrintableArea.java
index a800f7c..9f33f05 100644
--- a/jdk/src/share/classes/javax/print/attribute/standard/MediaPrintableArea.java
+++ b/jdk/src/share/classes/javax/print/attribute/standard/MediaPrintableArea.java
@@ -56,7 +56,7 @@
  * any specified finishings.
  * <code>PrintService</code> provides the method to query the supported
  * values of an attribute in a suitable context :
- * See  {@link javax.print.PrintService#getSupportedAttributeValues(Class,DocFlavor, AttributeSet) <code>PrintService.getSupportedAttributeValues()</code>}
+ * See  {@link javax.print.PrintService#getSupportedAttributeValues(Class,DocFlavor, AttributeSet) PrintService.getSupportedAttributeValues()}
  * <p>
  * The rectangular printable area is defined thus:
  * The (x,y) origin is positioned at the top-left of the paper in portrait
@@ -153,8 +153,8 @@
      * Get the printable area as an array of 4 values in the order
      * x, y, w, h. The values returned are in the given units.
      * @param  units
-     *     Unit conversion factor, e.g. {@link #INCH <CODE>INCH</CODE>} or
-     *     {@link #MM <CODE>MM</CODE>}.
+     *     Unit conversion factor, e.g. {@link #INCH INCH} or
+     *     {@link #MM MM}.
      *
      * @return printable area as array of x, y, w, h in the specified units.
      *
@@ -170,8 +170,8 @@
      * Get the x location of the origin of the printable area in the
      * specified units.
      * @param  units
-     *     Unit conversion factor, e.g. {@link #INCH <CODE>INCH</CODE>} or
-     *     {@link #MM <CODE>MM</CODE>}.
+     *     Unit conversion factor, e.g. {@link #INCH INCH} or
+     *     {@link #MM MM}.
      *
      * @return  x location of the origin of the printable area in the
      * specified units.
@@ -187,8 +187,8 @@
      * Get the y location of the origin of the printable area in the
      * specified units.
      * @param  units
-     *     Unit conversion factor, e.g. {@link #INCH <CODE>INCH</CODE>} or
-     *     {@link #MM <CODE>MM</CODE>}.
+     *     Unit conversion factor, e.g. {@link #INCH INCH} or
+     *     {@link #MM MM}.
      *
      * @return  y location of the origin of the printable area in the
      * specified units.
@@ -203,8 +203,8 @@
     /**
      * Get the width of the printable area in the specified units.
      * @param  units
-     *     Unit conversion factor, e.g. {@link #INCH <CODE>INCH</CODE>} or
-     *     {@link #MM <CODE>MM</CODE>}.
+     *     Unit conversion factor, e.g. {@link #INCH INCH} or
+     *     {@link #MM MM}.
      *
      * @return  width of the printable area in the specified units.
      *
@@ -218,8 +218,8 @@
     /**
      * Get the height of the printable area in the specified units.
      * @param  units
-     *     Unit conversion factor, e.g. {@link #INCH <CODE>INCH</CODE>} or
-     *     {@link #MM <CODE>MM</CODE>}.
+     *     Unit conversion factor, e.g. {@link #INCH INCH} or
+     *     {@link #MM MM}.
      *
      * @return  height of the printable area in the specified units.
      *
@@ -292,8 +292,8 @@
      * given units.
      *
      * @param  units
-     *     Unit conversion factor, e.g. {@link #INCH <CODE>INCH</CODE>} or
-     *     {@link #MM <CODE>MM</CODE>}.
+     *     Unit conversion factor, e.g. {@link #INCH INCH} or
+     *     {@link #MM MM}.
      * @param  unitsName
      *     Units name string, e.g. <CODE>"in"</CODE> or <CODE>"mm"</CODE>. If
      *     null, no units name is appended to the result.
diff --git a/jdk/src/share/classes/javax/print/attribute/standard/MultipleDocumentHandling.java b/jdk/src/share/classes/javax/print/attribute/standard/MultipleDocumentHandling.java
index 6c43fd6..30f4fe0 100644
--- a/jdk/src/share/classes/javax/print/attribute/standard/MultipleDocumentHandling.java
+++ b/jdk/src/share/classes/javax/print/attribute/standard/MultipleDocumentHandling.java
@@ -71,7 +71,7 @@
  * <UL>
  * <LI>
  * <A NAME="sdfi">{@link #SINGLE_DOCUMENT
- * <B><CODE>SINGLE_DOCUMENT</CODE></B>}</A>. If a print job has multiple
+ * <B>SINGLE_DOCUMENT</B>}</A>. If a print job has multiple
  * documents -- say, the document data is called <CODE>a</CODE> and
  * <CODE>b</CODE> -- then the result of processing all the document data
  * (<CODE>a</CODE> and then <CODE>b</CODE>) must be treated as a single sequence
@@ -86,7 +86,7 @@
  * <P>
  * <LI>
  * <A NAME="sducfi">{@link #SEPARATE_DOCUMENTS_UNCOLLATED_COPIES
- * <B><CODE>SEPARATE_DOCUMENTS_UNCOLLATED_COPIES</CODE></B>}</A>. If a print job
+ * <B>SEPARATE_DOCUMENTS_UNCOLLATED_COPIES</B>}</A>. If a print job
  * has multiple documents -- say, the document data is called <CODE>a</CODE> and
  * <CODE>b</CODE> -- then the result of processing the data in each document
  * instance must be treated as a single sequence of media sheets for finishing
@@ -99,7 +99,7 @@
  * <P>
  * <LI>
  * <A NAME="sdccfi">{@link #SEPARATE_DOCUMENTS_COLLATED_COPIES
- * <B><CODE>SEPARATE_DOCUMENTS_COLLATED_COPIES</CODE></B>}</A>. If a print job
+ * <B>SEPARATE_DOCUMENTS_COLLATED_COPIES</B>}</A>. If a print job
  * has multiple documents -- say, the document data is called <CODE>a</CODE> and
  * <CODE>b</CODE> -- then the result of processing the data in each document
  * instance must be treated as a single sequence of media sheets for finishing
@@ -112,7 +112,7 @@
  * <P>
  * <LI>
  * <A NAME="sdnsfi">{@link #SINGLE_DOCUMENT_NEW_SHEET
- * <B><CODE>SINGLE_DOCUMENT_NEW_SHEET</CODE></B>}</A>. Same as SINGLE_DOCUMENT,
+ * <B>SINGLE_DOCUMENT_NEW_SHEET</B>}</A>. Same as SINGLE_DOCUMENT,
  * except that the printer must ensure that the first impression of each
  * document instance in the job is placed on a new media sheet. This value
  * allows multiple documents to be stapled together with a single staple where
@@ -127,7 +127,7 @@
  * next document or document copy on to a new sheet.
  * <P>
  * In addition, if a {@link Finishings Finishings} attribute of
- * {@link Finishings#STAPLE <CODE>STAPLE</CODE>} is specified, then:
+ * {@link Finishings#STAPLE STAPLE} is specified, then:
  * <UL>
  * <LI>
  * With SINGLE_DOCUMENT, documents <CODE>a</CODE> and <CODE>b</CODE> are
diff --git a/jdk/src/share/classes/javax/print/attribute/standard/PrinterStateReasons.java b/jdk/src/share/classes/javax/print/attribute/standard/PrinterStateReasons.java
index 4870763..52758fa 100644
--- a/jdk/src/share/classes/javax/print/attribute/standard/PrinterStateReasons.java
+++ b/jdk/src/share/classes/javax/print/attribute/standard/PrinterStateReasons.java
@@ -129,7 +129,7 @@
      * Severity} mappings as the given map. The underlying hash map's initial
      * capacity and load factor are as specified in the superclass constructor
      * {@link java.util.HashMap#HashMap(java.util.Map)
-     * <CODE>HashMap(Map)</CODE>}.
+     * HashMap(Map)}.
      *
      * @param  map  Map to copy.
      *
diff --git a/jdk/src/share/classes/javax/print/attribute/standard/Sides.java b/jdk/src/share/classes/javax/print/attribute/standard/Sides.java
index eaff96b..93fed68 100644
--- a/jdk/src/share/classes/javax/print/attribute/standard/Sides.java
+++ b/jdk/src/share/classes/javax/print/attribute/standard/Sides.java
@@ -134,7 +134,7 @@
      * sides of consecutive media sheets, such that the orientation of each
      * pair of print-stream pages on the medium would be correct for the
      * reader as if for binding on the long edge. This imposition is also
-     * known as "duplex" (see {@link #DUPLEX <CODE>DUPLEX</CODE>}).
+     * known as "duplex" (see {@link #DUPLEX DUPLEX}).
      */
     public static final Sides TWO_SIDED_LONG_EDGE = new Sides(1);
 
@@ -143,19 +143,19 @@
      * sides of consecutive media sheets, such that the orientation of each
      * pair of print-stream pages on the medium would be correct for the
      * reader as if for binding on the short edge. This imposition is also
-     * known as "tumble" (see {@link #TUMBLE <CODE>TUMBLE</CODE>}).
+     * known as "tumble" (see {@link #TUMBLE TUMBLE}).
      */
     public static final Sides TWO_SIDED_SHORT_EDGE = new Sides(2);
 
     /**
      * An alias for "two sided long edge" (see {@link #TWO_SIDED_LONG_EDGE
-     * <CODE>TWO_SIDED_LONG_EDGE</CODE>}).
+     * TWO_SIDED_LONG_EDGE}).
      */
     public static final Sides DUPLEX = TWO_SIDED_LONG_EDGE;
 
     /**
      * An alias for "two sided short edge" (see {@link #TWO_SIDED_SHORT_EDGE
-     * <CODE>TWO_SIDED_SHORT_EDGE</CODE>}).
+     * TWO_SIDED_SHORT_EDGE}).
      */
     public static final Sides TUMBLE = TWO_SIDED_SHORT_EDGE;
 
diff --git a/jdk/src/share/classes/javax/swing/AbstractAction.java b/jdk/src/share/classes/javax/swing/AbstractAction.java
index 1d55a94..5b49dd9 100644
--- a/jdk/src/share/classes/javax/swing/AbstractAction.java
+++ b/jdk/src/share/classes/javax/swing/AbstractAction.java
@@ -49,7 +49,7 @@
  * future Swing releases. The current serialization support is
  * appropriate for short term storage or RMI between applications running
  * the same version of Swing.  As of 1.4, support for long term storage
- * of all JavaBeans<sup><font size="-2">TM</font></sup>
+ * of all JavaBeans&trade;
  * has been added to the <code>java.beans</code> package.
  * Please see {@link java.beans.XMLEncoder}.
  *
diff --git a/jdk/src/share/classes/javax/swing/AbstractButton.java b/jdk/src/share/classes/javax/swing/AbstractButton.java
index b8612f1..193317c 100644
--- a/jdk/src/share/classes/javax/swing/AbstractButton.java
+++ b/jdk/src/share/classes/javax/swing/AbstractButton.java
@@ -53,12 +53,12 @@
  * configuring a button.  Refer to <a href="Action.html#buttonActions">
  * Swing Components Supporting <code>Action</code></a> for more
  * details, and you can find more information in <a
- * href="http://java.sun.com/docs/books/tutorial/uiswing/misc/action.html">How
+ * href="http://docs.oracle.com/javase/tutorial/uiswing/misc/action.html">How
  * to Use Actions</a>, a section in <em>The Java Tutorial</em>.
  * <p>
  * For further information see
  * <a
- href="http://java.sun.com/docs/books/tutorial/uiswing/components/button.html">How to Use Buttons, Check Boxes, and Radio Buttons</a>,
+ href="http://docs.oracle.com/javase/tutorial/uiswing/components/button.html">How to Use Buttons, Check Boxes, and Radio Buttons</a>,
  * a section in <em>The Java Tutorial</em>.
  * <p>
  * <strong>Warning:</strong>
@@ -66,7 +66,7 @@
  * future Swing releases. The current serialization support is
  * appropriate for short term storage or RMI between applications running
  * the same version of Swing.  As of 1.4, support for long term storage
- * of all JavaBeans<sup><font size="-2">TM</font></sup>
+ * of all JavaBeans&trade;
  * has been added to the <code>java.beans</code> package.
  * Please see {@link java.beans.XMLEncoder}.
  *
@@ -1973,7 +1973,7 @@
      * future Swing releases. The current serialization support is
      * appropriate for short term storage or RMI between applications running
      * the same version of Swing.  As of 1.4, support for long term storage
-     * of all JavaBeans<sup><font size="-2">TM</font></sup>
+     * of all JavaBeans&trade;
      * has been added to the <code>java.beans</code> package.
      * Please see {@link java.beans.XMLEncoder}.
      */
@@ -2379,7 +2379,7 @@
      * future Swing releases. The current serialization support is
      * appropriate for short term storage or RMI between applications running
      * the same version of Swing.  As of 1.4, support for long term storage
-     * of all JavaBeans<sup><font size="-2">TM</font></sup>
+     * of all JavaBeans&trade;
      * has been added to the <code>java.beans</code> package.
      * Please see {@link java.beans.XMLEncoder}.
      * @since 1.4
diff --git a/jdk/src/share/classes/javax/swing/AbstractCellEditor.java b/jdk/src/share/classes/javax/swing/AbstractCellEditor.java
index 17ce6d2..f9efea5 100644
--- a/jdk/src/share/classes/javax/swing/AbstractCellEditor.java
+++ b/jdk/src/share/classes/javax/swing/AbstractCellEditor.java
@@ -43,7 +43,7 @@
  * future Swing releases. The current serialization support is
  * appropriate for short term storage or RMI between applications running
  * the same version of Swing.  As of 1.4, support for long term storage
- * of all JavaBeans<sup><font size="-2">TM</font></sup>
+ * of all JavaBeans&trade;
  * has been added to the <code>java.beans</code> package.
  * Please see {@link java.beans.XMLEncoder}.
  *
diff --git a/jdk/src/share/classes/javax/swing/AbstractListModel.java b/jdk/src/share/classes/javax/swing/AbstractListModel.java
index 9200102..7270c8f 100644
--- a/jdk/src/share/classes/javax/swing/AbstractListModel.java
+++ b/jdk/src/share/classes/javax/swing/AbstractListModel.java
@@ -38,7 +38,7 @@
  * future Swing releases. The current serialization support is
  * appropriate for short term storage or RMI between applications running
  * the same version of Swing.  As of 1.4, support for long term storage
- * of all JavaBeans<sup><font size="-2">TM</font></sup>
+ * of all JavaBeans&trade;
  * has been added to the <code>java.beans</code> package.
  * Please see {@link java.beans.XMLEncoder}.
  *
diff --git a/jdk/src/share/classes/javax/swing/BorderFactory.java b/jdk/src/share/classes/javax/swing/BorderFactory.java
index 33b1b00..1a1e4ab 100644
--- a/jdk/src/share/classes/javax/swing/BorderFactory.java
+++ b/jdk/src/share/classes/javax/swing/BorderFactory.java
@@ -35,7 +35,7 @@
  * possible, this factory will hand out references to shared
  * <code>Border</code> instances.
  * For further information and examples see
- * <a href="http://java.sun.com/docs/books/tutorial/uiswing/misc/border.html">How
+ * <a href="http://docs.oracle.com/javase/tutorial/uiswing/components/border.htmll">How
  to Use Borders</a>,
  * a section in <em>The Java Tutorial</em>.
  *
diff --git a/jdk/src/share/classes/javax/swing/BoundedRangeModel.java b/jdk/src/share/classes/javax/swing/BoundedRangeModel.java
index 3d077fc..c8348b9 100644
--- a/jdk/src/share/classes/javax/swing/BoundedRangeModel.java
+++ b/jdk/src/share/classes/javax/swing/BoundedRangeModel.java
@@ -71,8 +71,8 @@
  *
  * For an example of specifying custom bounded range models used by sliders,
  * see <a
- href="http://java.sun.com/docs/books/tutorial/uiswing/overview/anatomy.html">The Anatomy of a Swing-Based Program</a>
- * in <em>The Java Tutorial.</em>
+ href="http://www.oracle.com/technetwork/java/architecture-142923.html#separable">Separable model architecture</a>
+ * in <em>A Swing Architecture Overview.</em>
  *
  * @author Hans Muller
  * @see DefaultBoundedRangeModel
diff --git a/jdk/src/share/classes/javax/swing/Box.java b/jdk/src/share/classes/javax/swing/Box.java
index d1c1323..2f4c6e4 100644
--- a/jdk/src/share/classes/javax/swing/Box.java
+++ b/jdk/src/share/classes/javax/swing/Box.java
@@ -60,7 +60,7 @@
  * If you are implementing a <code>BoxLayout</code> you
  * can find further information and examples in
  * <a
- href="http://java.sun.com/docs/books/tutorial/uiswing/layout/box.html">How to Use BoxLayout</a>,
+ href="http://docs.oracle.com/javase/tutorial/uiswing/layout/box.html">How to Use BoxLayout</a>,
  * a section in <em>The Java Tutorial.</em>
  * <p>
  * <strong>Warning:</strong>
@@ -68,7 +68,7 @@
  * future Swing releases. The current serialization support is
  * appropriate for short term storage or RMI between applications running
  * the same version of Swing.  As of 1.4, support for long term storage
- * of all JavaBeans<sup><font size="-2">TM</font></sup>
+ * of all JavaBeans&trade;
  * has been added to the <code>java.beans</code> package.
  * Please see {@link java.beans.XMLEncoder}.
  *
@@ -298,7 +298,7 @@
      * future Swing releases. The current serialization support is
      * appropriate for short term storage or RMI between applications running
      * the same version of Swing.  As of 1.4, support for long term storage
-     * of all JavaBeans<sup><font size="-2">TM</font></sup>
+     * of all JavaBeans&trade;
      * has been added to the <code>java.beans</code> package.
      * Please see {@link java.beans.XMLEncoder}.
      */
diff --git a/jdk/src/share/classes/javax/swing/BoxLayout.java b/jdk/src/share/classes/javax/swing/BoxLayout.java
index de1703d..abe4b73 100644
--- a/jdk/src/share/classes/javax/swing/BoxLayout.java
+++ b/jdk/src/share/classes/javax/swing/BoxLayout.java
@@ -36,12 +36,12 @@
  * vertically or horizontally. The components will not wrap so, for
  * example, a vertical arrangement of components will stay vertically
  * arranged when the frame is resized.
- * <TABLE ALIGN="RIGHT" BORDER="0" SUMMARY="layout">
+ * <TABLE STYLE="FLOAT:RIGHT" BORDER="0" SUMMARY="layout">
  *    <TR>
  *      <TD ALIGN="CENTER">
- *         <P ALIGN="CENTER"><IMG SRC="doc-files/BoxLayout-1.gif"
+ *         <P STYLE="TEXT-ALIGN:CENTER"><IMG SRC="doc-files/BoxLayout-1.gif"
  *          alt="The following text describes this graphic."
- *          WIDTH="191" HEIGHT="201" ALIGN="BOTTOM" BORDER="0">
+ *          WIDTH="191" HEIGHT="201" STYLE="FLOAT:BOTTOM; BORDER:0">
  *      </TD>
  *    </TR>
  * </TABLE>
@@ -116,7 +116,7 @@
  * <p>
  * For further information and examples see
  * <a
- href="http://java.sun.com/docs/books/tutorial/uiswing/layout/box.html">How to Use BoxLayout</a>,
+ href="http://docs.oracle.com/javase/tutorial/uiswing/layout/box.html">How to Use BoxLayout</a>,
  * a section in <em>The Java Tutorial.</em>
  * <p>
  * <strong>Warning:</strong>
@@ -124,7 +124,7 @@
  * future Swing releases. The current serialization support is
  * appropriate for short term storage or RMI between applications running
  * the same version of Swing.  As of 1.4, support for long term storage
- * of all JavaBeans<sup><font size="-2">TM</font></sup>
+ * of all JavaBeans&trade;
  * has been added to the <code>java.beans</code> package.
  * Please see {@link java.beans.XMLEncoder}.
  *
diff --git a/jdk/src/share/classes/javax/swing/ButtonGroup.java b/jdk/src/share/classes/javax/swing/ButtonGroup.java
index c2971f7..7f6229d 100644
--- a/jdk/src/share/classes/javax/swing/ButtonGroup.java
+++ b/jdk/src/share/classes/javax/swing/ButtonGroup.java
@@ -51,7 +51,7 @@
  * Initially, all buttons in the group are unselected.
  * <p>
  * For examples and further information on using button groups see
- * <a href="http://java.sun.com/docs/books/tutorial/uiswing/components/button.html#radiobutton">How to Use Radio Buttons</a>,
+ * <a href="http://docs.oracle.com/javase/tutorial/uiswing/components/button.html#radiobutton">How to Use Radio Buttons</a>,
  * a section in <em>The Java Tutorial</em>.
  * <p>
  * <strong>Warning:</strong>
@@ -59,7 +59,7 @@
  * future Swing releases. The current serialization support is
  * appropriate for short term storage or RMI between applications running
  * the same version of Swing.  As of 1.4, support for long term storage
- * of all JavaBeans<sup><font size="-2">TM</font></sup>
+ * of all JavaBeans&trade;
  * has been added to the <code>java.beans</code> package.
  * Please see {@link java.beans.XMLEncoder}.
  *
diff --git a/jdk/src/share/classes/javax/swing/CellRendererPane.java b/jdk/src/share/classes/javax/swing/CellRendererPane.java
index 7523ef0..6a9f17b 100644
--- a/jdk/src/share/classes/javax/swing/CellRendererPane.java
+++ b/jdk/src/share/classes/javax/swing/CellRendererPane.java
@@ -57,7 +57,7 @@
  * future Swing releases. The current serialization support is
  * appropriate for short term storage or RMI between applications running
  * the same version of Swing.  As of 1.4, support for long term storage
- * of all JavaBeans<sup><font size="-2">TM</font></sup>
+ * of all JavaBeans&trade;
  * has been added to the <code>java.beans</code> package.
  * Please see {@link java.beans.XMLEncoder}.
  *
diff --git a/jdk/src/share/classes/javax/swing/DefaultBoundedRangeModel.java b/jdk/src/share/classes/javax/swing/DefaultBoundedRangeModel.java
index 418adf4..fb250ac 100644
--- a/jdk/src/share/classes/javax/swing/DefaultBoundedRangeModel.java
+++ b/jdk/src/share/classes/javax/swing/DefaultBoundedRangeModel.java
@@ -37,7 +37,7 @@
  * future Swing releases. The current serialization support is
  * appropriate for short term storage or RMI between applications running
  * the same version of Swing.  As of 1.4, support for long term storage
- * of all JavaBeans<sup><font size="-2">TM</font></sup>
+ * of all JavaBeans&trade;
  * has been added to the <code>java.beans</code> package.
  * Please see {@link java.beans.XMLEncoder}.
  *
diff --git a/jdk/src/share/classes/javax/swing/DefaultButtonModel.java b/jdk/src/share/classes/javax/swing/DefaultButtonModel.java
index 5eaec14..7c0fa3d 100644
--- a/jdk/src/share/classes/javax/swing/DefaultButtonModel.java
+++ b/jdk/src/share/classes/javax/swing/DefaultButtonModel.java
@@ -39,7 +39,7 @@
  * future Swing releases. The current serialization support is
  * appropriate for short term storage or RMI between applications running
  * the same version of Swing. As of 1.4, support for long term storage
- * of all JavaBeans<sup><font size="-2">TM</font></sup>
+ * of all JavaBeans&trade;
  * has been added to the <code>java.beans</code> package.
  * Please see {@link java.beans.XMLEncoder}.
  *
diff --git a/jdk/src/share/classes/javax/swing/DefaultCellEditor.java b/jdk/src/share/classes/javax/swing/DefaultCellEditor.java
index 1738e0e..60042a3 100644
--- a/jdk/src/share/classes/javax/swing/DefaultCellEditor.java
+++ b/jdk/src/share/classes/javax/swing/DefaultCellEditor.java
@@ -43,7 +43,7 @@
  * future Swing releases. The current serialization support is
  * appropriate for short term storage or RMI between applications running
  * the same version of Swing.  As of 1.4, support for long term storage
- * of all JavaBeans<sup><font size="-2">TM</font></sup>
+ * of all JavaBeans&trade;
  * has been added to the <code>java.beans</code> package.
  * Please see {@link java.beans.XMLEncoder}.
  *
diff --git a/jdk/src/share/classes/javax/swing/DefaultFocusManager.java b/jdk/src/share/classes/javax/swing/DefaultFocusManager.java
index 91304aa..4ebc54a 100644
--- a/jdk/src/share/classes/javax/swing/DefaultFocusManager.java
+++ b/jdk/src/share/classes/javax/swing/DefaultFocusManager.java
@@ -37,7 +37,7 @@
  * <code>java.awt.DefaultKeyboardFocusManager</code> instead.
  * <p>
  * Please see
- * <a href="http://java.sun.com/docs/books/tutorial/uiswing/misc/focus.html">
+ * <a href="http://docs.oracle.com/javase/tutorial/uiswing/misc/focus.html">
  * How to Use the Focus Subsystem</a>,
  * a section in <em>The Java Tutorial</em>, and the
  * <a href="../../java/awt/doc-files/FocusSpec.html">Focus Specification</a>
diff --git a/jdk/src/share/classes/javax/swing/DefaultListCellRenderer.java b/jdk/src/share/classes/javax/swing/DefaultListCellRenderer.java
index 85a10e2..4d7a649 100644
--- a/jdk/src/share/classes/javax/swing/DefaultListCellRenderer.java
+++ b/jdk/src/share/classes/javax/swing/DefaultListCellRenderer.java
@@ -63,7 +63,7 @@
  * future Swing releases. The current serialization support is
  * appropriate for short term storage or RMI between applications running
  * the same version of Swing.  As of 1.4, support for long term storage
- * of all JavaBeans<sup><font size="-2">TM</font></sup>
+ * of all JavaBeans&trade;
  * has been added to the <code>java.beans</code> package.
  * Please see {@link java.beans.XMLEncoder}.
  *
@@ -337,7 +337,7 @@
      * future Swing releases. The current serialization support is
      * appropriate for short term storage or RMI between applications running
      * the same version of Swing.  As of 1.4, support for long term storage
-     * of all JavaBeans<sup><font size="-2">TM</font></sup>
+     * of all JavaBeans&trade;
      * has been added to the <code>java.beans</code> package.
      * Please see {@link java.beans.XMLEncoder}.
      */
diff --git a/jdk/src/share/classes/javax/swing/DefaultListModel.java b/jdk/src/share/classes/javax/swing/DefaultListModel.java
index 5fc23ea..33efc4a 100644
--- a/jdk/src/share/classes/javax/swing/DefaultListModel.java
+++ b/jdk/src/share/classes/javax/swing/DefaultListModel.java
@@ -44,7 +44,7 @@
  * future Swing releases. The current serialization support is
  * appropriate for short term storage or RMI between applications running
  * the same version of Swing.  As of 1.4, support for long term storage
- * of all JavaBeans<sup><font size="-2">TM</font></sup>
+ * of all JavaBeans&trade;
  * has been added to the <code>java.beans</code> package.
  * Please see {@link java.beans.XMLEncoder}.
  *
diff --git a/jdk/src/share/classes/javax/swing/DefaultListSelectionModel.java b/jdk/src/share/classes/javax/swing/DefaultListSelectionModel.java
index 57fb5d7..8da0b42 100644
--- a/jdk/src/share/classes/javax/swing/DefaultListSelectionModel.java
+++ b/jdk/src/share/classes/javax/swing/DefaultListSelectionModel.java
@@ -41,7 +41,7 @@
  * future Swing releases. The current serialization support is
  * appropriate for short term storage or RMI between applications running
  * the same version of Swing.  As of 1.4, support for long term storage
- * of all JavaBeans<sup><font size="-2">TM</font></sup>
+ * of all JavaBeans&trade;
  * has been added to the <code>java.beans</code> package.
  * Please see {@link java.beans.XMLEncoder}.
  *
diff --git a/jdk/src/share/classes/javax/swing/DefaultSingleSelectionModel.java b/jdk/src/share/classes/javax/swing/DefaultSingleSelectionModel.java
index 65b3320..1d5ad7c 100644
--- a/jdk/src/share/classes/javax/swing/DefaultSingleSelectionModel.java
+++ b/jdk/src/share/classes/javax/swing/DefaultSingleSelectionModel.java
@@ -37,7 +37,7 @@
  * future Swing releases. The current serialization support is
  * appropriate for short term storage or RMI between applications running
  * the same version of Swing.  As of 1.4, support for long term storage
- * of all JavaBeans<sup><font size="-2">TM</font></sup>
+ * of all JavaBeans&trade;
  * has been added to the <code>java.beans</code> package.
  * Please see {@link java.beans.XMLEncoder}.
  *
diff --git a/jdk/src/share/classes/javax/swing/FocusManager.java b/jdk/src/share/classes/javax/swing/FocusManager.java
index 6afb84f..554a155 100644
--- a/jdk/src/share/classes/javax/swing/FocusManager.java
+++ b/jdk/src/share/classes/javax/swing/FocusManager.java
@@ -34,7 +34,7 @@
  * <code>java.awt.DefaultKeyboardFocusManager</code> instead.
  * <p>
  * Please see
- * <a href="http://java.sun.com/docs/books/tutorial/uiswing/misc/focus.html">
+ * <a href="http://docs.oracle.com/javase/tutorial/uiswing/misc/focus.html">
  * How to Use the Focus Subsystem</a>,
  * a section in <em>The Java Tutorial</em>, and the
  * <a href="../../java/awt/doc-files/FocusSpec.html">Focus Specification</a>
diff --git a/jdk/src/share/classes/javax/swing/ImageIcon.java b/jdk/src/share/classes/javax/swing/ImageIcon.java
index b16a62f..236d682 100644
--- a/jdk/src/share/classes/javax/swing/ImageIcon.java
+++ b/jdk/src/share/classes/javax/swing/ImageIcon.java
@@ -50,7 +50,7 @@
  *
  * <p>
  * For further information and examples of using image icons, see
- * <a href="http://java.sun.com/docs/books/tutorial/uiswing/misc/icon.html">How to Use Icons</a>
+ * <a href="http://docs.oracle.com/javase/tutorial/uiswing/components/icon.html">How to Use Icons</a>
  * in <em>The Java Tutorial.</em>
  *
  * <p>
@@ -59,7 +59,7 @@
  * future Swing releases. The current serialization support is
  * appropriate for short term storage or RMI between applications running
  * the same version of Swing.  As of 1.4, support for long term storage
- * of all JavaBeans<sup><font size="-2">TM</font></sup>
+ * of all JavaBeans&trade;
  * has been added to the <code>java.beans</code> package.
  * Please see {@link java.beans.XMLEncoder}.
  *
@@ -555,7 +555,7 @@
      * future Swing releases. The current serialization support is
      * appropriate for short term storage or RMI between applications running
      * the same version of Swing.  As of 1.4, support for long term storage
-     * of all JavaBeans<sup><font size="-2">TM</font></sup>
+     * of all JavaBeans&trade;
      * has been added to the <code>java.beans</code> package.
      * Please see {@link java.beans.XMLEncoder}.
      * @since 1.3
diff --git a/jdk/src/share/classes/javax/swing/JApplet.java b/jdk/src/share/classes/javax/swing/JApplet.java
index 0da6c3e..acb0203 100644
--- a/jdk/src/share/classes/javax/swing/JApplet.java
+++ b/jdk/src/share/classes/javax/swing/JApplet.java
@@ -40,7 +40,7 @@
  * in <em>The Java Tutorial</em>,
  * in the section
  * <a
- href="http://java.sun.com/docs/books/tutorial/uiswing/components/applet.html">How to Make Applets</a>.
+ href="http://docs.oracle.com/javase/tutorial/uiswing/components/applet.html">How to Make Applets</a>.
  * <p>
  * The <code>JApplet</code> class is slightly incompatible with
  * <code>java.applet.Applet</code>.  <code>JApplet</code> contains a
@@ -77,7 +77,7 @@
  * future Swing releases. The current serialization support is
  * appropriate for short term storage or RMI between applications running
  * the same version of Swing.  As of 1.4, support for long term storage
- * of all JavaBeans<sup><font size="-2">TM</font></sup>
+ * of all JavaBeans&trade;
  * has been added to the <code>java.beans</code> package.
  * Please see {@link java.beans.XMLEncoder}.
  *
@@ -183,7 +183,7 @@
      * are currently typed to {@code JComponent}.
      * <p>
      * Please see
-     * <a href="http://java.sun.com/docs/books/tutorial/uiswing/misc/dnd.html">
+     * <a href="http://docs.oracle.com/javase/tutorial/uiswing/dnd/index.html">
      * How to Use Drag and Drop and Data Transfer</a>, a section in
      * <em>The Java Tutorial</em>, for more information.
      *
diff --git a/jdk/src/share/classes/javax/swing/JButton.java b/jdk/src/share/classes/javax/swing/JButton.java
index 45e8757..0e97ba8 100644
--- a/jdk/src/share/classes/javax/swing/JButton.java
+++ b/jdk/src/share/classes/javax/swing/JButton.java
@@ -48,10 +48,10 @@
  * configuring a button.  Refer to <a href="Action.html#buttonActions">
  * Swing Components Supporting <code>Action</code></a> for more
  * details, and you can find more information in <a
- * href="http://java.sun.com/docs/books/tutorial/uiswing/misc/action.html">How
+ * href="http://docs.oracle.com/javase/tutorial/uiswing/misc/action.html">How
  * to Use Actions</a>, a section in <em>The Java Tutorial</em>.
  * <p>
- * See <a href="http://java.sun.com/docs/books/tutorial/uiswing/components/button.html">How to Use Buttons, Check Boxes, and Radio Buttons</a>
+ * See <a href="http://docs.oracle.com/javase/tutorial/uiswing/components/button.html">How to Use Buttons, Check Boxes, and Radio Buttons</a>
  * in <em>The Java Tutorial</em>
  * for information and examples of using buttons.
  * <p>
@@ -65,7 +65,7 @@
  * future Swing releases. The current serialization support is
  * appropriate for short term storage or RMI between applications running
  * the same version of Swing.  As of 1.4, support for long term storage
- * of all JavaBeans<sup><font size="-2">TM</font></sup>
+ * of all JavaBeans&trade;
  * has been added to the <code>java.beans</code> package.
  * Please see {@link java.beans.XMLEncoder}.
  *
@@ -304,7 +304,7 @@
      * future Swing releases. The current serialization support is
      * appropriate for short term storage or RMI between applications running
      * the same version of Swing.  As of 1.4, support for long term storage
-     * of all JavaBeans<sup><font size="-2">TM</font></sup>
+     * of all JavaBeans&trade;
      * has been added to the <code>java.beans</code> package.
      * Please see {@link java.beans.XMLEncoder}.
      */
diff --git a/jdk/src/share/classes/javax/swing/JCheckBox.java b/jdk/src/share/classes/javax/swing/JCheckBox.java
index 4d80e95..8fdbd17 100644
--- a/jdk/src/share/classes/javax/swing/JCheckBox.java
+++ b/jdk/src/share/classes/javax/swing/JCheckBox.java
@@ -40,7 +40,7 @@
  * An implementation of a check box -- an item that can be selected or
  * deselected, and which displays its state to the user.
  * By convention, any number of check boxes in a group can be selected.
- * See <a href="http://java.sun.com/docs/books/tutorial/uiswing/components/button.html">How to Use Buttons, Check Boxes, and Radio Buttons</a>
+ * See <a href="http://docs.oracle.com/javase/tutorial/uiswing/components/button.html">How to Use Buttons, Check Boxes, and Radio Buttons</a>
  * in <em>The Java Tutorial</em>
  * for examples and information on using check boxes.
  * <p>
@@ -50,7 +50,7 @@
  * configuring a button.  Refer to <a href="Action.html#buttonActions">
  * Swing Components Supporting <code>Action</code></a> for more
  * details, and you can find more information in <a
- * href="http://java.sun.com/docs/books/tutorial/uiswing/misc/action.html">How
+ * href="http://docs.oracle.com/javase/tutorial/uiswing/misc/action.html">How
  * to Use Actions</a>, a section in <em>The Java Tutorial</em>.
  * <p>
  * <strong>Warning:</strong> Swing is not thread safe. For more
@@ -63,7 +63,7 @@
  * future Swing releases. The current serialization support is
  * appropriate for short term storage or RMI between applications running
  * the same version of Swing.  As of 1.4, support for long term storage
- * of all JavaBeans<sup><font size="-2">TM</font></sup>
+ * of all JavaBeans&trade;
  * has been added to the <code>java.beans</code> package.
  * Please see {@link java.beans.XMLEncoder}.
  *
@@ -330,7 +330,7 @@
      * future Swing releases. The current serialization support is
      * appropriate for short term storage or RMI between applications running
      * the same version of Swing.  As of 1.4, support for long term storage
-     * of all JavaBeans<sup><font size="-2">TM</font></sup>
+     * of all JavaBeans&trade;
      * has been added to the <code>java.beans</code> package.
      * Please see {@link java.beans.XMLEncoder}.
      */
diff --git a/jdk/src/share/classes/javax/swing/JCheckBoxMenuItem.java b/jdk/src/share/classes/javax/swing/JCheckBoxMenuItem.java
index 8b42b72..3d924d3 100644
--- a/jdk/src/share/classes/javax/swing/JCheckBoxMenuItem.java
+++ b/jdk/src/share/classes/javax/swing/JCheckBoxMenuItem.java
@@ -59,12 +59,12 @@
  * configuring a menu item.  Refer to <a href="Action.html#buttonActions">
  * Swing Components Supporting <code>Action</code></a> for more
  * details, and you can find more information in <a
- * href="http://java.sun.com/docs/books/tutorial/uiswing/misc/action.html">How
+ * href="http://docs.oracle.com/javase/tutorial/uiswing/misc/action.html">How
  * to Use Actions</a>, a section in <em>The Java Tutorial</em>.
  * <p>
  * For further information and examples of using check box menu items,
  * see <a
- href="http://java.sun.com/docs/books/tutorial/uiswing/components/menu.html">How to Use Menus</a>,
+ href="http://docs.oracle.com/javase/tutorial/uiswing/components/menu.html">How to Use Menus</a>,
  * a section in <em>The Java Tutorial.</em>
  * <p>
  * <strong>Warning:</strong> Swing is not thread safe. For more
@@ -77,7 +77,7 @@
  * future Swing releases. The current serialization support is
  * appropriate for short term storage or RMI between applications running
  * the same version of Swing.  As of 1.4, support for long term storage
- * of all JavaBeans<sup><font size="-2">TM</font></sup>
+ * of all JavaBeans&trade;
  * has been added to the <code>java.beans</code> package.
  * Please see {@link java.beans.XMLEncoder}.
  *
@@ -289,7 +289,7 @@
      * future Swing releases. The current serialization support is
      * appropriate for short term storage or RMI between applications running
      * the same version of Swing.  As of 1.4, support for long term storage
-     * of all JavaBeans<sup><font size="-2">TM</font></sup>
+     * of all JavaBeans&trade;
      * has been added to the <code>java.beans</code> package.
      * Please see {@link java.beans.XMLEncoder}.
      */
diff --git a/jdk/src/share/classes/javax/swing/JColorChooser.java b/jdk/src/share/classes/javax/swing/JColorChooser.java
index eb3aff6..9fb2a35 100644
--- a/jdk/src/share/classes/javax/swing/JColorChooser.java
+++ b/jdk/src/share/classes/javax/swing/JColorChooser.java
@@ -42,7 +42,7 @@
  * a user to manipulate and select a color.
  * For information about using color choosers, see
  * <a
- href="http://java.sun.com/docs/books/tutorial/uiswing/components/colorchooser.html">How to Use Color Choosers</a>,
+ href="http://docs.oracle.com/javase/tutorial/uiswing/components/colorchooser.html">How to Use Color Choosers</a>,
  * a section in <em>The Java Tutorial</em>.
  *
  * <p>
@@ -69,7 +69,7 @@
  * future Swing releases. The current serialization support is
  * appropriate for short term storage or RMI between applications running
  * the same version of Swing.  As of 1.4, support for long term storage
- * of all JavaBeans<sup><font size="-2">TM</font></sup>
+ * of all JavaBeans&trade;
  * has been added to the <code>java.beans</code> package.
  * Please see {@link java.beans.XMLEncoder}.
  *
diff --git a/jdk/src/share/classes/javax/swing/JComboBox.java b/jdk/src/share/classes/javax/swing/JComboBox.java
index ba3bb8a..2d81a18 100644
--- a/jdk/src/share/classes/javax/swing/JComboBox.java
+++ b/jdk/src/share/classes/javax/swing/JComboBox.java
@@ -57,13 +57,13 @@
  * future Swing releases. The current serialization support is
  * appropriate for short term storage or RMI between applications running
  * the same version of Swing.  As of 1.4, support for long term storage
- * of all JavaBeans<sup><font size="-2">TM</font></sup>
+ * of all JavaBeans&trade;
  * has been added to the <code>java.beans</code> package.
  * Please see {@link java.beans.XMLEncoder}.
  *
  * <p>
- * See <a href="http://java.sun.com/docs/books/tutorial/uiswing/components/combobox.html">How to Use Combo Boxes</a>
- * in <a href="http://java.sun.com/Series/Tutorial/index.html"><em>The Java Tutorial</em></a>
+ * See <a href="http://docs.oracle.com/javase/tutorial/uiswing/components/combobox.html">How to Use Combo Boxes</a>
+ * in <a href="http://docs.oracle.com/javase/tutorial/"><em>The Java Tutorial</em></a>
  * for further information.
  * <p>
  * @see ComboBoxModel
@@ -350,9 +350,7 @@
      * by the look and feel.  Some look and feels always use
      * heavyweight popups, no matter what the value of this property.
      * <p>
-     * See the article <a href="http://java.sun.com/products/jfc/tsc/articles/mixing/index.html">Mixing Heavy and Light Components</a>
-     * on <a href="http://java.sun.com/products/jfc/tsc">
-     * <em>The Swing Connection</em></a>
+     * See the article <a href="http://www.oracle.com/technetwork/articles/java/mixing-components-433992.html">Mixing Heavy and Light Components</a>
      * This method fires a property changed event.
      *
      * @param aFlag if <code>true</code>, lightweight popups are desired
@@ -1610,7 +1608,7 @@
      * future Swing releases. The current serialization support is
      * appropriate for short term storage or RMI between applications running
      * the same version of Swing.  As of 1.4, support for long term storage
-     * of all JavaBeans<sup><font size="-2">TM</font></sup>
+     * of all JavaBeans&trade;
      * has been added to the <code>java.beans</code> package.
      * Please see {@link java.beans.XMLEncoder}.
      */
diff --git a/jdk/src/share/classes/javax/swing/JComponent.java b/jdk/src/share/classes/javax/swing/JComponent.java
index 1357659..a15ec70 100644
--- a/jdk/src/share/classes/javax/swing/JComponent.java
+++ b/jdk/src/share/classes/javax/swing/JComponent.java
@@ -78,7 +78,7 @@
  * that provide a place for other Swing components to paint themselves.
  * For an explanation of containment hierarchies, see
  * <a
- href="http://java.sun.com/docs/books/tutorial/uiswing/overview/hierarchy.html">Swing Components and the Containment Hierarchy</a>,
+ href="http://docs.oracle.com/javase/tutorial/uiswing/components/toplevel.html">Swing Components and the Containment Hierarchy</a>,
  * a section in <em>The Java Tutorial</em>.
  *
  * <p>
@@ -92,21 +92,20 @@
  *     <em>UI delegate</em> -- an object that descends from
  *     {@link javax.swing.plaf.ComponentUI}.
  *     See <a
- * href="http://java.sun.com/docs/books/tutorial/uiswing/misc/plaf.html">How
+ * href="http://docs.oracle.com/javase/tutorial/uiswing/lookandfeel/plaf.html">How
  *     to Set the Look and Feel</a>
  *     in <em>The Java Tutorial</em>
  *     for more information.
  * <li>Comprehensive keystroke handling.
  *     See the document <a
- * href="http://java.sun.com/products/jfc/tsc/special_report/kestrel/keybindings.html">Keyboard
- *     Bindings in Swing</a>,
- *     an article in <em>The Swing Connection</em>,
+ * href="http://docs.oracle.com/javase/tutorial/uiswing/misc/keybinding.html">How to Use Key Bindings</a>,
+ *     an article in <em>The Java Tutorial</em>,
  *     for more information.
  * <li>Support for tool tips --
  *     short descriptions that pop up when the cursor lingers
  *     over a component.
  *     See <a
- * href="http://java.sun.com/docs/books/tutorial/uiswing/components/tooltip.html">How
+ * href="http://docs.oracle.com/javase/tutorial/uiswing/components/tooltip.html">How
  *     to Use Tool Tips</a>
  *     in <em>The Java Tutorial</em>
  *     for more information.
@@ -124,15 +123,15 @@
  * <li>An infrastructure for painting
  *     that includes double buffering and support for borders.
  *     For more information see <a
- * href="http://java.sun.com/docs/books/tutorial/uiswing/overview/draw.html">Painting</a> and
- * <a href="http://java.sun.com/docs/books/tutorial/uiswing/misc/border.html">How
+ * href="http://www.oracle.com/technetwork/java/painting-140037.html#swing">Painting</a> and
+ * <a href="http://docs.oracle.com/javase/tutorial/uiswing/components/border.htmll">How
  *     to Use Borders</a>,
  *     both of which are sections in <em>The Java Tutorial</em>.
  * </ul>
  * For more information on these subjects, see the
  * <a href="package-summary.html#package_description">Swing package description</a>
  * and <em>The Java Tutorial</em> section
- * <a href="http://java.sun.com/docs/books/tutorial/uiswing/components/jcomponent.html">The JComponent Class</a>.
+ * <a href="http://docs.oracle.com/javase/tutorial/uiswing/components/jcomponent.html">The JComponent Class</a>.
  * <p>
  * <code>JComponent</code> and its subclasses document default values
  * for certain properties.  For example, <code>JTable</code> documents the
@@ -150,7 +149,7 @@
  * <p>
  * In release 1.4, the focus subsystem was rearchitected.
  * For more information, see
- * <a href="http://java.sun.com/docs/books/tutorial/uiswing/misc/focus.html">
+ * <a href="http://docs.oracle.com/javase/tutorial/uiswing/misc/focus.html">
  * How to Use the Focus Subsystem</a>,
  * a section in <em>The Java Tutorial</em>.
  * <p>
@@ -164,7 +163,7 @@
  * future Swing releases. The current serialization support is
  * appropriate for short term storage or RMI between applications running
  * the same version of Swing.  As of 1.4, support for long term storage
- * of all JavaBeans<sup><font size="-2">TM</font></sup>
+ * of all JavaBeans&trade;
  * has been added to the <code>java.beans</code> package.
  * Please see {@link java.beans.XMLEncoder}.
  *
@@ -1291,7 +1290,7 @@
     /**
      * In release 1.4, the focus subsystem was rearchitected.
      * For more information, see
-     * <a href="http://java.sun.com/docs/books/tutorial/uiswing/misc/focus.html">
+     * <a href="http://docs.oracle.com/javase/tutorial/uiswing/misc/focus.html">
      * How to Use the Focus Subsystem</a>,
      * a section in <em>The Java Tutorial</em>.
      * <p>
@@ -1353,7 +1352,7 @@
     /**
      * In release 1.4, the focus subsystem was rearchitected.
      * For more information, see
-     * <a href="http://java.sun.com/docs/books/tutorial/uiswing/misc/focus.html">
+     * <a href="http://docs.oracle.com/javase/tutorial/uiswing/misc/focus.html">
      * How to Use the Focus Subsystem</a>,
      * a section in <em>The Java Tutorial</em>.
      * <p>
@@ -1386,7 +1385,7 @@
     /**
      * In release 1.4, the focus subsystem was rearchitected.
      * For more information, see
-     * <a href="http://java.sun.com/docs/books/tutorial/uiswing/misc/focus.html">
+     * <a href="http://docs.oracle.com/javase/tutorial/uiswing/misc/focus.html">
      * How to Use the Focus Subsystem</a>,
      * a section in <em>The Java Tutorial</em>.
      * <p>
@@ -1419,7 +1418,7 @@
      * all, use the <code>setFocusable</code> method instead.
      * <p>
      * Please see
-     * <a href="http://java.sun.com/docs/books/tutorial/uiswing/misc/focus.html">
+     * <a href="http://docs.oracle.com/javase/tutorial/uiswing/misc/focus.html">
      * How to Use the Focus Subsystem</a>,
      * a section in <em>The Java Tutorial</em>,
      * for more information.
@@ -1438,7 +1437,7 @@
      * get focus; otherwise returns <code>false</code>.
      * <p>
      * Please see
-     * <a href="http://java.sun.com/docs/books/tutorial/uiswing/misc/focus.html">
+     * <a href="http://docs.oracle.com/javase/tutorial/uiswing/misc/focus.html">
      * How to Use the Focus Subsystem</a>,
      * a section in <em>The Java Tutorial</em>,
      * for more information.
@@ -1464,7 +1463,7 @@
      * its behavior is platform dependent. Instead we recommend the
      * use of {@link #requestFocusInWindow() requestFocusInWindow()}.
      * If you would like more information on focus, see
-     * <a href="http://java.sun.com/docs/books/tutorial/uiswing/misc/focus.html">
+     * <a href="http://docs.oracle.com/javase/tutorial/uiswing/misc/focus.html">
      * How to Use the Focus Subsystem</a>,
      * a section in <em>The Java Tutorial</em>.
      *
@@ -1487,7 +1486,7 @@
      * use of {@link #requestFocusInWindow(boolean)
      * requestFocusInWindow(boolean)}.
      * If you would like more information on focus, see
-     * <a href="http://java.sun.com/docs/books/tutorial/uiswing/misc/focus.html">
+     * <a href="http://docs.oracle.com/javase/tutorial/uiswing/misc/focus.html">
      * How to Use the Focus Subsystem</a>,
      * a section in <em>The Java Tutorial</em>.
      *
@@ -1509,7 +1508,7 @@
      * this method.
      * <p>
      * If you would like more information on focus, see
-     * <a href="http://java.sun.com/docs/books/tutorial/uiswing/misc/focus.html">
+     * <a href="http://docs.oracle.com/javase/tutorial/uiswing/misc/focus.html">
      * How to Use the Focus Subsystem</a>,
      * a section in <em>The Java Tutorial</em>.
      *
@@ -1530,7 +1529,7 @@
      * this method.
      * <p>
      * If you would like more information on focus, see
-     * <a href="http://java.sun.com/docs/books/tutorial/uiswing/misc/focus.html">
+     * <a href="http://docs.oracle.com/javase/tutorial/uiswing/misc/focus.html">
      * How to Use the Focus Subsystem</a>,
      * a section in <em>The Java Tutorial</em>.
      *
@@ -2595,7 +2594,7 @@
     /**
      * In release 1.4, the focus subsystem was rearchitected.
      * For more information, see
-     * <a href="http://java.sun.com/docs/books/tutorial/uiswing/misc/focus.html">
+     * <a href="http://docs.oracle.com/javase/tutorial/uiswing/misc/focus.html">
      * How to Use the Focus Subsystem</a>,
      * a section in <em>The Java Tutorial</em>.
      * <p>
@@ -2986,7 +2985,7 @@
      * Registers the text to display in a tool tip.
      * The text displays when the cursor lingers over the component.
      * <p>
-     * See <a href="http://java.sun.com/docs/books/tutorial/uiswing/components/tooltip.html">How to Use Tool Tips</a>
+     * See <a href="http://docs.oracle.com/javase/tutorial/uiswing/components/tooltip.html">How to Use Tool Tips</a>
      * in <em>The Java Tutorial</em>
      * for further documentation.
      *
@@ -3206,7 +3205,7 @@
      * default value for the system property is {@code false}.
      * <p>
      * Please see
-     * <a href="http://java.sun.com/docs/books/tutorial/uiswing/misc/dnd.html">
+     * <a href="http://docs.oracle.com/javase/tutorial/uiswing/dnd/index.html">
      * How to Use Drag and Drop and Data Transfer</a>,
      * a section in <em>The Java Tutorial</em>, for more information.
      *
@@ -3654,7 +3653,7 @@
      * future Swing releases. The current serialization support is
      * appropriate for short term storage or RMI between applications running
      * the same version of Swing.  As of 1.4, support for long term storage
-     * of all JavaBeans<sup><font size="-2">TM</font></sup>
+     * of all JavaBeans&trade;
      * has been added to the <code>java.beans</code> package.
      * Please see {@link java.beans.XMLEncoder}.
      */
diff --git a/jdk/src/share/classes/javax/swing/JDesktopPane.java b/jdk/src/share/classes/javax/swing/JDesktopPane.java
index 8d5342f..6ba0bc8 100644
--- a/jdk/src/share/classes/javax/swing/JDesktopPane.java
+++ b/jdk/src/share/classes/javax/swing/JDesktopPane.java
@@ -63,7 +63,7 @@
  * (closing, resizing, etc).
  * <p>
  * For further documentation and examples see
- * <a href="http://java.sun.com/docs/books/tutorial/uiswing/components/internalframe.html">How to Use Internal Frames</a>,
+ * <a href="http://docs.oracle.com/javase/tutorial/uiswing/components/internalframe.html">How to Use Internal Frames</a>,
  * a section in <em>The Java Tutorial</em>.
  * <p>
  * <strong>Warning:</strong> Swing is not thread safe. For more
@@ -76,7 +76,7 @@
  * future Swing releases. The current serialization support is
  * appropriate for short term storage or RMI between applications running
  * the same version of Swing.  As of 1.4, support for long term storage
- * of all JavaBeans<sup><font size="-2">TM</font></sup>
+ * of all JavaBeans&trade;
  * has been added to the <code>java.beans</code> package.
  * Please see {@link java.beans.XMLEncoder}.
  *
@@ -612,7 +612,7 @@
      * future Swing releases. The current serialization support is
      * appropriate for short term storage or RMI between applications running
      * the same version of Swing.  As of 1.4, support for long term storage
-     * of all JavaBeans<sup><font size="-2">TM</font></sup>
+     * of all JavaBeans&trade;
      * has been added to the <code>java.beans</code> package.
      * Please see {@link java.beans.XMLEncoder}.
      */
diff --git a/jdk/src/share/classes/javax/swing/JDialog.java b/jdk/src/share/classes/javax/swing/JDialog.java
index a53c4ab..2e4b2b7 100644
--- a/jdk/src/share/classes/javax/swing/JDialog.java
+++ b/jdk/src/share/classes/javax/swing/JDialog.java
@@ -35,7 +35,7 @@
  * For information about creating dialogs, see
  * <em>The Java Tutorial</em> section
  * <a
- href="http://java.sun.com/docs/books/tutorial/uiswing/components/dialog.html">How
+ href="http://docs.oracle.com/javase/tutorial/uiswing/components/dialog.html">How
  * to Make Dialogs</a>.
  *
  * <p>
@@ -77,7 +77,7 @@
  * future Swing releases. The current serialization support is
  * appropriate for short term storage or RMI between applications running
  * the same version of Swing.  As of 1.4, support for long term storage
- * of all JavaBeans<sup><font size="-2">TM</font></sup>
+ * of all JavaBeans&trade;
  * has been added to the {@code java.beans} package.
  * Please see {@link java.beans.XMLEncoder}.
  *
@@ -786,7 +786,7 @@
      * are currently typed to {@code JComponent}.
      * <p>
      * Please see
-     * <a href="http://java.sun.com/docs/books/tutorial/uiswing/misc/dnd.html">
+     * <a href="http://docs.oracle.com/javase/tutorial/uiswing/dnd/index.html">
      * How to Use Drag and Drop and Data Transfer</a>, a section in
      * <em>The Java Tutorial</em>, for more information.
      *
diff --git a/jdk/src/share/classes/javax/swing/JEditorPane.java b/jdk/src/share/classes/javax/swing/JEditorPane.java
index fa9aeb0..f4c5893 100644
--- a/jdk/src/share/classes/javax/swing/JEditorPane.java
+++ b/jdk/src/share/classes/javax/swing/JEditorPane.java
@@ -43,7 +43,7 @@
 /**
  * A text component to edit various kinds of content.
  * You can find how-to information and examples of using editor panes in
- * <a href="http://java.sun.com/docs/books/tutorial/uiswing/components/text.html">Using Text Components</a>,
+ * <a href="http://docs.oracle.com/javase/tutorial/uiswing/components/text.html">Using Text Components</a>,
  * a section in <em>The Java Tutorial.</em>
  *
  * <p>
@@ -179,7 +179,7 @@
  * future Swing releases. The current serialization support is
  * appropriate for short term storage or RMI between applications running
  * the same version of Swing.  As of 1.4, support for long term storage
- * of all JavaBeans<sup><font size="-2">TM</font></sup>
+ * of all JavaBeans&trade;
  * has been added to the <code>java.beans</code> package.
  * Please see {@link java.beans.XMLEncoder}.
  *
@@ -1636,7 +1636,7 @@
      * future Swing releases. The current serialization support is
      * appropriate for short term storage or RMI between applications running
      * the same version of Swing.  As of 1.4, support for long term storage
-     * of all JavaBeans<sup><font size="-2">TM</font></sup>
+     * of all JavaBeans&trade;
      * has been added to the <code>java.beans</code> package.
      * Please see {@link java.beans.XMLEncoder}.
      */
@@ -1690,7 +1690,7 @@
      * future Swing releases. The current serialization support is
      * appropriate for short term storage or RMI between applications running
      * the same version of Swing.  As of 1.4, support for long term storage
-     * of all JavaBeans<sup><font size="-2">TM</font></sup>
+     * of all JavaBeans&trade;
      * has been added to the <code>java.beans</code> package.
      * Please see {@link java.beans.XMLEncoder}.
      */
diff --git a/jdk/src/share/classes/javax/swing/JFileChooser.java b/jdk/src/share/classes/javax/swing/JFileChooser.java
index 61806b4..5f897e3 100644
--- a/jdk/src/share/classes/javax/swing/JFileChooser.java
+++ b/jdk/src/share/classes/javax/swing/JFileChooser.java
@@ -57,7 +57,7 @@
  * choose a file.
  * For information about using <code>JFileChooser</code>, see
  * <a
- href="http://java.sun.com/docs/books/tutorial/uiswing/components/filechooser.html">How to Use File Choosers</a>,
+ href="http://docs.oracle.com/javase/tutorial/uiswing/components/filechooser.html">How to Use File Choosers</a>,
  * a section in <em>The Java Tutorial</em>.
  *
  * <p>
diff --git a/jdk/src/share/classes/javax/swing/JFormattedTextField.java b/jdk/src/share/classes/javax/swing/JFormattedTextField.java
index 31f4017..e682c57 100644
--- a/jdk/src/share/classes/javax/swing/JFormattedTextField.java
+++ b/jdk/src/share/classes/javax/swing/JFormattedTextField.java
@@ -54,7 +54,7 @@
  * configuring what action should be taken when focus is lost. The possible
  * configurations are:
  * <table summary="Possible JFormattedTextField configurations and their descriptions">
- * <tr><th><p align="left">Value</p></th><th><p align="left">Description</p></th></tr>
+ * <tr><th><p style="text-align:left">Value</p></th><th><p style="text-align:left">Description</p></th></tr>
  * <tr><td>JFormattedTextField.REVERT
  *            <td>Revert the display to match that of <code>getValue</code>,
  *                possibly losing the current edit.
@@ -171,7 +171,7 @@
  * future Swing releases. The current serialization support is
  * appropriate for short term storage or RMI between applications running
  * the same version of Swing.  As of 1.4, support for long term storage
- * of all JavaBeans<sup><font size="-2">TM</font></sup>
+ * of all JavaBeans&trade;
  * has been added to the <code>java.beans</code> package.
  * Please see {@link java.beans.XMLEncoder}.
  *
diff --git a/jdk/src/share/classes/javax/swing/JFrame.java b/jdk/src/share/classes/javax/swing/JFrame.java
index aee994e..038c63b 100644
--- a/jdk/src/share/classes/javax/swing/JFrame.java
+++ b/jdk/src/share/classes/javax/swing/JFrame.java
@@ -40,7 +40,7 @@
  * You can find task-oriented documentation about using <code>JFrame</code>
  * in <em>The Java Tutorial</em>, in the section
  * <a
- href="http://java.sun.com/docs/books/tutorial/uiswing/components/frame.html">How to Make Frames</a>.
+ href="http://docs.oracle.com/javase/tutorial/uiswing/components/frame.html">How to Make Frames</a>.
  *
  * <p>
  * The <code>JFrame</code> class is slightly incompatible with <code>Frame</code>.
@@ -77,7 +77,7 @@
  * For more information on content panes
  * and other features that root panes provide,
  * see <a
- href="http://java.sun.com/docs/books/tutorial/uiswing/components/toplevel.html">Using Top-Level Containers</a> in <em>The Java Tutorial</em>.
+ href="http://docs.oracle.com/javase/tutorial/uiswing/components/toplevel.html">Using Top-Level Containers</a> in <em>The Java Tutorial</em>.
  * <p>
  * In a multi-screen environment, you can create a <code>JFrame</code>
  * on a different screen device.  See {@link java.awt.Frame} for more
@@ -93,7 +93,7 @@
  * future Swing releases. The current serialization support is
  * appropriate for short term storage or RMI between applications running
  * the same version of Swing.  As of 1.4, support for long term storage
- * of all JavaBeans<sup><font size="-2">TM</font></sup>
+ * of all JavaBeans&trade;
  * has been added to the <code>java.beans</code> package.
  * Please see {@link java.beans.XMLEncoder}.
  *
@@ -430,7 +430,7 @@
      * are currently typed to {@code JComponent}.
      * <p>
      * Please see
-     * <a href="http://java.sun.com/docs/books/tutorial/uiswing/misc/dnd.html">
+     * <a href="http://docs.oracle.com/javase/tutorial/uiswing/dnd/index.html">
      * How to Use Drag and Drop and Data Transfer</a>, a section in
      * <em>The Java Tutorial</em>, for more information.
      *
diff --git a/jdk/src/share/classes/javax/swing/JInternalFrame.java b/jdk/src/share/classes/javax/swing/JInternalFrame.java
index a0ba3a1..ad78df1 100644
--- a/jdk/src/share/classes/javax/swing/JInternalFrame.java
+++ b/jdk/src/share/classes/javax/swing/JInternalFrame.java
@@ -50,7 +50,7 @@
  * resizing, title display, and support for a menu bar.
  * For task-oriented documentation and examples of using internal frames,
  * see <a
- href="http://java.sun.com/docs/books/tutorial/uiswing/components/internalframe.html" target="_top">How to Use Internal Frames</a>,
+ href="http://docs.oracle.com/javase/tutorial/uiswing/components/internalframe.html" target="_top">How to Use Internal Frames</a>,
  * a section in <em>The Java Tutorial</em>.
  *
  * <p>
@@ -90,7 +90,7 @@
  * future Swing releases. The current serialization support is
  * appropriate for short term storage or RMI between applications running
  * the same version of Swing.  As of 1.4, support for long term storage
- * of all JavaBeans<sup><font size="-2">TM</font></sup>
+ * of all JavaBeans&trade;
  * has been added to the <code>java.beans</code> package.
  * Please see {@link java.beans.XMLEncoder}.
  *
@@ -2029,7 +2029,7 @@
      * future Swing releases. The current serialization support is
      * appropriate for short term storage or RMI between applications running
      * the same version of Swing.  As of 1.4, support for long term storage
-     * of all JavaBeans<sup><font size="-2">TM</font></sup>
+     * of all JavaBeans&trade;
      * has been added to the <code>java.beans</code> package.
      * Please see {@link java.beans.XMLEncoder}.
      */
@@ -2144,7 +2144,7 @@
      * future Swing releases. The current serialization support is
      * appropriate for short term storage or RMI between applications running
      * the same version of Swing.  As of 1.4, support for long term storage
-     * of all JavaBeans<sup><font size="-2">TM</font></sup>
+     * of all JavaBeans&trade;
      * has been added to the <code>java.beans</code> package.
      * Please see {@link java.beans.XMLEncoder}.
      *
@@ -2318,7 +2318,7 @@
          * future Swing releases. The current serialization support is
          * appropriate for short term storage or RMI between applications running
          * the same version of Swing.  As of 1.4, support for long term storage
-         * of all JavaBeans<sup><font size="-2">TM</font></sup>
+         * of all JavaBeans&trade;
          * has been added to the <code>java.beans</code> package.
          * Please see {@link java.beans.XMLEncoder}.
          */
diff --git a/jdk/src/share/classes/javax/swing/JLabel.java b/jdk/src/share/classes/javax/swing/JLabel.java
index 8223509..cf4ae39 100644
--- a/jdk/src/share/classes/javax/swing/JLabel.java
+++ b/jdk/src/share/classes/javax/swing/JLabel.java
@@ -80,7 +80,7 @@
  * should appear between the text and the image.
  * The default is 4 pixels.
  * <p>
- * See <a href="http://java.sun.com/docs/books/tutorial/uiswing/components/label.html">How to Use Labels</a>
+ * See <a href="http://docs.oracle.com/javase/tutorial/uiswing/components/label.html">How to Use Labels</a>
  * in <em>The Java Tutorial</em>
  * for further documentation.
  * <p>
@@ -94,7 +94,7 @@
  * future Swing releases. The current serialization support is
  * appropriate for short term storage or RMI between applications running
  * the same version of Swing.  As of 1.4, support for long term storage
- * of all JavaBeans<sup><font size="-2">TM</font></sup>
+ * of all JavaBeans&trade;
  * has been added to the <code>java.beans</code> package.
  * Please see {@link java.beans.XMLEncoder}.
  *
@@ -1064,7 +1064,7 @@
      * future Swing releases. The current serialization support is
      * appropriate for short term storage or RMI between applications running
      * the same version of Swing.  As of 1.4, support for long term storage
-     * of all JavaBeans<sup><font size="-2">TM</font></sup>
+     * of all JavaBeans&trade;
      * has been added to the <code>java.beans</code> package.
      * Please see {@link java.beans.XMLEncoder}.
      */
diff --git a/jdk/src/share/classes/javax/swing/JLayeredPane.java b/jdk/src/share/classes/javax/swing/JLayeredPane.java
index 3b61f28..075e535 100644
--- a/jdk/src/share/classes/javax/swing/JLayeredPane.java
+++ b/jdk/src/share/classes/javax/swing/JLayeredPane.java
@@ -41,15 +41,15 @@
  * container, where higher-numbered components sit &quot;on top&quot; of other
  * components.
  * For task-oriented documentation and examples of using layered panes see
- * <a href="http://java.sun.com/docs/books/tutorial/uiswing/components/layeredpane.html">How to Use a Layered Pane</a>,
+ * <a href="http://docs.oracle.com/javase/tutorial/uiswing/components/layeredpane.html">How to Use a Layered Pane</a>,
  * a section in <em>The Java Tutorial</em>.
  * <P>
- * <TABLE ALIGN="RIGHT" BORDER="0" SUMMARY="layout">
+ * <TABLE STYLE="FLOAT:RIGHT" BORDER="0" SUMMARY="layout">
  * <TR>
  *   <TD ALIGN="CENTER">
- *     <P ALIGN="CENTER"><IMG SRC="doc-files/JLayeredPane-1.gif"
+ *     <P STYLE="TEXT-ALIGN:CENTER"><IMG SRC="doc-files/JLayeredPane-1.gif"
  *     alt="The following text describes this image."
- *     WIDTH="269" HEIGHT="264" ALIGN="BOTTOM" BORDER="0">
+ *     WIDTH="269" HEIGHT="264" STYLE="FLOAT:BOTTOM; BORDER=0">
  *   </TD>
  * </TR>
  * </TABLE>
@@ -148,7 +148,7 @@
  * future Swing releases. The current serialization support is
  * appropriate for short term storage or RMI between applications running
  * the same version of Swing.  As of 1.4, support for long term storage
- * of all JavaBeans<sup><font size="-2">TM</font></sup>
+ * of all JavaBeans&trade;
  * has been added to the <code>java.beans</code> package.
  * Please see {@link java.beans.XMLEncoder}.
  *
@@ -765,7 +765,7 @@
      * future Swing releases. The current serialization support is
      * appropriate for short term storage or RMI between applications running
      * the same version of Swing.  As of 1.4, support for long term storage
-     * of all JavaBeans<sup><font size="-2">TM</font></sup>
+     * of all JavaBeans&trade;
      * has been added to the <code>java.beans</code> package.
      * Please see {@link java.beans.XMLEncoder}.
      */
diff --git a/jdk/src/share/classes/javax/swing/JList.java b/jdk/src/share/classes/javax/swing/JList.java
index ad22fc3..9b01625 100644
--- a/jdk/src/share/classes/javax/swing/JList.java
+++ b/jdk/src/share/classes/javax/swing/JList.java
@@ -253,15 +253,13 @@
  * future Swing releases. The current serialization support is
  * appropriate for short term storage or RMI between applications running
  * the same version of Swing.  As of 1.4, support for long term storage
- * of all JavaBeans<sup><font size="-2">TM</font></sup>
+ * of all JavaBeans&trade;
  * has been added to the <code>java.beans</code> package.
  * Please see {@link java.beans.XMLEncoder}.
  * <p>
- * See <a href="http://java.sun.com/docs/books/tutorial/uiswing/components/list.html">How to Use Lists</a>
- * in <a href="http://java.sun.com/Series/Tutorial/index.html"><em>The Java Tutorial</em></a>
+ * See <a href="http://docs.oracle.com/javase/tutorial/uiswing/components/list.html">How to Use Lists</a>
+ * in <a href="http://docs.oracle.com/javase/tutorial/"><em>The Java Tutorial</em></a>
  * for further documentation.
- * Also see the article <a href="http://java.sun.com/products/jfc/tsc/tech_topics/jlist_1/jlist.html">Advanced JList Programming</a>
- * in <a href="http://java.sun.com/products/jfc/tsc"><em>The Swing Connection</em></a>.
  * <p>
  * @see ListModel
  * @see AbstractListModel
@@ -972,7 +970,7 @@
      *
      * <table border="1"
      *  summary="Describes layouts VERTICAL, HORIZONTAL_WRAP, and VERTICAL_WRAP">
-     *   <tr><th><p align="left">Value</p></th><th><p align="left">Description</p></th></tr>
+     *   <tr><th><p style="text-align:left">Value</p></th><th><p style="text-align:left">Description</p></th></tr>
      *   <tr><td><code>VERTICAL</code>
      *       <td>Cells are layed out vertically in a single column.
      *   <tr><td><code>HORIZONTAL_WRAP</code>
@@ -2879,7 +2877,7 @@
      * future Swing releases. The current serialization support is
      * appropriate for short term storage or RMI between applications running
      * the same version of Swing.  As of 1.4, support for long term storage
-     * of all JavaBeans<sup><font size="-2">TM</font></sup>
+     * of all JavaBeans&trade;
      * has been added to the <code>java.beans</code> package.
      * Please see {@link java.beans.XMLEncoder}.
      */
diff --git a/jdk/src/share/classes/javax/swing/JMenu.java b/jdk/src/share/classes/javax/swing/JMenu.java
index 62b6f41..ad5f6fe 100644
--- a/jdk/src/share/classes/javax/swing/JMenu.java
+++ b/jdk/src/share/classes/javax/swing/JMenu.java
@@ -76,11 +76,11 @@
  * configuring a menu.  Refer to <a href="Action.html#buttonActions">
  * Swing Components Supporting <code>Action</code></a> for more
  * details, and you can find more information in <a
- * href="http://java.sun.com/docs/books/tutorial/uiswing/misc/action.html">How
+ * href="http://docs.oracle.com/javase/tutorial/uiswing/misc/action.html">How
  * to Use Actions</a>, a section in <em>The Java Tutorial</em>.
  * <p>
  * For information and examples of using menus see
- * <a href="http://java.sun.com/doc/books/tutorial/uiswing/components/menu.html">How to Use Menus</a>,
+ * <a href="http://docs.oracle.com/javase/tutorial/uiswing/components/menu.html">How to Use Menus</a>,
  * a section in <em>The Java Tutorial.</em>
  * <p>
  * <strong>Warning:</strong> Swing is not thread safe. For more
@@ -93,7 +93,7 @@
  * future Swing releases. The current serialization support is
  * appropriate for short term storage or RMI between applications running
  * the same version of Swing.  As of 1.4, support for long term storage
- * of all JavaBeans<sup><font size="-2">TM</font></sup>
+ * of all JavaBeans&trade;
  * has been added to the <code>java.beans</code> package.
  * Please see {@link java.beans.XMLEncoder}.
  *
@@ -1149,7 +1149,7 @@
      * future Swing releases. The current serialization support is
      * appropriate for short term storage or RMI between applications running
      * the same version of Swing.  As of 1.4, support for long term storage
-     * of all JavaBeans<sup><font size="-2">TM</font></sup>
+     * of all JavaBeans&trade;
      * has been added to the <code>java.beans</code> package.
      * Please see {@link java.beans.XMLEncoder}.
      */
@@ -1386,7 +1386,7 @@
      * future Swing releases. The current serialization support is
      * appropriate for short term storage or RMI between applications running
      * the same version of Swing.  As of 1.4, support for long term storage
-     * of all JavaBeans<sup><font size="-2">TM</font></sup>
+     * of all JavaBeans&trade;
      * has been added to the <code>java.beans</code> package.
      * Please see {@link java.beans.XMLEncoder}.
      */
diff --git a/jdk/src/share/classes/javax/swing/JMenuBar.java b/jdk/src/share/classes/javax/swing/JMenuBar.java
index 22dbe62..8e6683d 100644
--- a/jdk/src/share/classes/javax/swing/JMenuBar.java
+++ b/jdk/src/share/classes/javax/swing/JMenuBar.java
@@ -54,7 +54,7 @@
  * <p>
  * For information and examples of using menu bars see
  * <a
- href="http://java.sun.com/docs/books/tutorial/uiswing/components/menu.html">How to Use Menus</a>,
+ href="http://docs.oracle.com/javase/tutorial/uiswing/components/menu.html">How to Use Menus</a>,
  * a section in <em>The Java Tutorial.</em>
  * <p>
  * <strong>Warning:</strong> Swing is not thread safe. For more
@@ -67,7 +67,7 @@
  * future Swing releases. The current serialization support is
  * appropriate for short term storage or RMI between applications running
  * the same version of Swing.  As of 1.4, support for long term storage
- * of all JavaBeans<sup><font size="-2">TM</font></sup>
+ * of all JavaBeans&trade;
  * has been added to the <code>java.beans</code> package.
  * Please see {@link java.beans.XMLEncoder}.
  * <p>
@@ -502,7 +502,7 @@
      * future Swing releases. The current serialization support is
      * appropriate for short term storage or RMI between applications running
      * the same version of Swing.  As of 1.4, support for long term storage
-     * of all JavaBeans<sup><font size="-2">TM</font></sup>
+     * of all JavaBeans&trade;
      * has been added to the <code>java.beans</code> package.
      * Please see {@link java.beans.XMLEncoder}.
      */
diff --git a/jdk/src/share/classes/javax/swing/JMenuItem.java b/jdk/src/share/classes/javax/swing/JMenuItem.java
index e13dc8b..10b59bb 100644
--- a/jdk/src/share/classes/javax/swing/JMenuItem.java
+++ b/jdk/src/share/classes/javax/swing/JMenuItem.java
@@ -54,12 +54,12 @@
  * configuring a menu item.  Refer to <a href="Action.html#buttonActions">
  * Swing Components Supporting <code>Action</code></a> for more
  * details, and you can find more information in <a
- * href="http://java.sun.com/docs/books/tutorial/uiswing/misc/action.html">How
+ * href="http://docs.oracle.com/javase/tutorial/uiswing/misc/action.html">How
  * to Use Actions</a>, a section in <em>The Java Tutorial</em>.
  * <p>
  * For further documentation and for examples, see
  * <a
- href="http://java.sun.com/docs/books/tutorial/uiswing/components/menu.html">How to Use Menus</a>
+ href="http://docs.oracle.com/javase/tutorial/uiswing/components/menu.html">How to Use Menus</a>
  * in <em>The Java Tutorial.</em>
  * <p>
  * <strong>Warning:</strong> Swing is not thread safe. For more
@@ -72,7 +72,7 @@
  * future Swing releases. The current serialization support is
  * appropriate for short term storage or RMI between applications running
  * the same version of Swing.  As of 1.4, support for long term storage
- * of all JavaBeans<sup><font size="-2">TM</font></sup>
+ * of all JavaBeans&trade;
  * has been added to the <code>java.beans</code> package.
  * Please see {@link java.beans.XMLEncoder}.
  *
@@ -826,7 +826,7 @@
      * future Swing releases. The current serialization support is
      * appropriate for short term storage or RMI between applications running
      * the same version of Swing.  As of 1.4, support for long term storage
-     * of all JavaBeans<sup><font size="-2">TM</font></sup>
+     * of all JavaBeans&trade;
      * has been added to the <code>java.beans</code> package.
      * Please see {@link java.beans.XMLEncoder}.
      */
diff --git a/jdk/src/share/classes/javax/swing/JOptionPane.java b/jdk/src/share/classes/javax/swing/JOptionPane.java
index c532cf6..8bbd49d 100644
--- a/jdk/src/share/classes/javax/swing/JOptionPane.java
+++ b/jdk/src/share/classes/javax/swing/JOptionPane.java
@@ -62,7 +62,7 @@
  * prompts users for a value or informs them of something.
  * For information about using <code>JOptionPane</code>, see
  * <a
- href="http://java.sun.com/docs/books/tutorial/uiswing/components/dialog.html">How to Make Dialogs</a>,
+ href="http://docs.oracle.com/javase/tutorial/uiswing/components/dialog.html">How to Make Dialogs</a>,
  * a section in <em>The Java Tutorial</em>.
  *
  * <p>
@@ -108,16 +108,16 @@
  * the caller until the user's interaction is complete.
  * <p>
  *
- * <table cellspacing=6 cellpadding=4 border=0 align=right summary="layout">
+ * <table cellspacing=6 cellpadding=4 border=0 style="float:right" summary="layout">
  * <tr>
- *  <td bgcolor=#FFe0d0 rowspan=2>icon</td>
- *  <td bgcolor=#FFe0d0>message</td>
+ *  <td style="background-color:#FFe0d0" rowspan=2>icon</td>
+ *  <td style="background-color:#FFe0d0">message</td>
  * </tr>
  * <tr>
- *  <td bgcolor=#FFe0d0>input value</td>
+ *  <td style="background-color:#FFe0d0">input value</td>
  * </tr>
  * <tr>
- *   <td bgcolor=#FFe0d0 colspan=2>option buttons</td>
+ *   <td style="background-color:#FFe0d0" colspan=2>option buttons</td>
  * </tr>
  * </table>
  *
@@ -127,7 +127,7 @@
  * ultimately responsible for the final result.  In particular, the
  * look-and-feels will adjust the layout to accommodate the option pane's
  * <code>ComponentOrientation</code> property.
- * <br clear=all>
+ * <br style="clear:all">
  * <p>
  * <b>Parameters:</b><br>
  * The parameters to these methods follow consistent patterns:
@@ -298,7 +298,7 @@
  * future Swing releases. The current serialization support is
  * appropriate for short term storage or RMI between applications running
  * the same version of Swing.  As of 1.4, support for long term storage
- * of all JavaBeans<sup><font size="-2">TM</font></sup>
+ * of all JavaBeans&trade;
  * has been added to the <code>java.beans</code> package.
  * Please see {@link java.beans.XMLEncoder}.
  *
@@ -2573,7 +2573,7 @@
      * future Swing releases. The current serialization support is
      * appropriate for short term storage or RMI between applications running
      * the same version of Swing.  As of 1.4, support for long term storage
-     * of all JavaBeans<sup><font size="-2">TM</font></sup>
+     * of all JavaBeans&trade;
      * has been added to the <code>java.beans</code> package.
      * Please see {@link java.beans.XMLEncoder}.
      */
diff --git a/jdk/src/share/classes/javax/swing/JPanel.java b/jdk/src/share/classes/javax/swing/JPanel.java
index 7287a53..8ebfcb1 100644
--- a/jdk/src/share/classes/javax/swing/JPanel.java
+++ b/jdk/src/share/classes/javax/swing/JPanel.java
@@ -39,7 +39,7 @@
  * <code>JPanel</code> is a generic lightweight container.
  * For examples and task-oriented documentation for JPanel, see
  * <a
- href="http://java.sun.com/docs/books/tutorial/uiswing/components/panel.html">How to Use Panels</a>,
+ href="http://docs.oracle.com/javase/tutorial/uiswing/components/panel.html">How to Use Panels</a>,
  * a section in <em>The Java Tutorial</em>.
  * <p>
  * <strong>Warning:</strong> Swing is not thread safe. For more
@@ -52,7 +52,7 @@
  * future Swing releases. The current serialization support is
  * appropriate for short term storage or RMI between applications running
  * the same version of Swing.  As of 1.4, support for long term storage
- * of all JavaBeans<sup><font size="-2">TM</font></sup>
+ * of all JavaBeans&trade;
  * has been added to the <code>java.beans</code> package.
  * Please see {@link java.beans.XMLEncoder}.
  *
@@ -229,7 +229,7 @@
      * future Swing releases. The current serialization support is
      * appropriate for short term storage or RMI between applications running
      * the same version of Swing.  As of 1.4, support for long term storage
-     * of all JavaBeans<sup><font size="-2">TM</font></sup>
+     * of all JavaBeans&trade;
      * has been added to the <code>java.beans</code> package.
      * Please see {@link java.beans.XMLEncoder}.
      */
diff --git a/jdk/src/share/classes/javax/swing/JPasswordField.java b/jdk/src/share/classes/javax/swing/JPasswordField.java
index 1da3709..8a64694 100644
--- a/jdk/src/share/classes/javax/swing/JPasswordField.java
+++ b/jdk/src/share/classes/javax/swing/JPasswordField.java
@@ -39,7 +39,7 @@
  * the editing of a single line of text where the view indicates
  * something was typed, but does not show the original characters.
  * You can find further information and examples in
- * <a href="http://java.sun.com/docs/books/tutorial/uiswing/components/textfield.html">How to Use Text Fields</a>,
+ * <a href="http://docs.oracle.com/javase/tutorial/uiswing/components/textfield.html">How to Use Text Fields</a>,
  * a section in <em>The Java Tutorial.</em>
  * <p>
  * <code>JPasswordField</code> is intended
@@ -64,7 +64,7 @@
  * future Swing releases. The current serialization support is
  * appropriate for short term storage or RMI between applications running
  * the same version of Swing.  As of 1.4, support for long term storage
- * of all JavaBeans<sup><font size="-2">TM</font></sup>
+ * of all JavaBeans&trade;
  * has been added to the <code>java.beans</code> package.
  * Please see {@link java.beans.XMLEncoder}.
  *
@@ -399,7 +399,7 @@
      * future Swing releases. The current serialization support is
      * appropriate for short term storage or RMI between applications running
      * the same version of Swing.  As of 1.4, support for long term storage
-     * of all JavaBeans<sup><font size="-2">TM</font></sup>
+     * of all JavaBeans&trade;
      * has been added to the <code>java.beans</code> package.
      * Please see {@link java.beans.XMLEncoder}.
      */
diff --git a/jdk/src/share/classes/javax/swing/JPopupMenu.java b/jdk/src/share/classes/javax/swing/JPopupMenu.java
index 03532d1..3b9bbfc 100644
--- a/jdk/src/share/classes/javax/swing/JPopupMenu.java
+++ b/jdk/src/share/classes/javax/swing/JPopupMenu.java
@@ -58,7 +58,7 @@
  * <p>
  * For information and examples of using popup menus, see
  * <a
- href="http://java.sun.com/docs/books/tutorial/uiswing/components/menu.html">How to Use Menus</a>
+ href="http://docs.oracle.com/javase/tutorial/uiswing/components/menu.html">How to Use Menus</a>
  * in <em>The Java Tutorial.</em>
  * <p>
  * <strong>Warning:</strong> Swing is not thread safe. For more
@@ -71,7 +71,7 @@
  * future Swing releases. The current serialization support is
  * appropriate for short term storage or RMI between applications running
  * the same version of Swing.  As of 1.4, support for long term storage
- * of all JavaBeans<sup><font size="-2">TM</font></sup>
+ * of all JavaBeans&trade;
  * has been added to the <code>java.beans</code> package.
  * Please see {@link java.beans.XMLEncoder}.
  *
diff --git a/jdk/src/share/classes/javax/swing/JProgressBar.java b/jdk/src/share/classes/javax/swing/JProgressBar.java
index 2be3a57..606ff13 100644
--- a/jdk/src/share/classes/javax/swing/JProgressBar.java
+++ b/jdk/src/share/classes/javax/swing/JProgressBar.java
@@ -100,7 +100,7 @@
  * <p>
  *
  * For complete examples and further documentation see
- * <a href="http://java.sun.com/docs/books/tutorial/uiswing/components/progress.html" target="_top">How to Monitor Progress</a>,
+ * <a href="http://docs.oracle.com/javase/tutorial/uiswing/components/progress.html" target="_top">How to Monitor Progress</a>,
  * a section in <em>The Java Tutorial.</em>
  *
  * <p>
@@ -114,7 +114,7 @@
  * future Swing releases. The current serialization support is
  * appropriate for short term storage or RMI between applications running
  * the same version of Swing.  As of 1.4, support for long term storage
- * of all JavaBeans<sup><font size="-2">TM</font></sup>
+ * of all JavaBeans&trade;
  * has been added to the <code>java.beans</code> package.
  * Please see {@link java.beans.XMLEncoder}.
  *
@@ -643,7 +643,7 @@
      * future Swing releases. The current serialization support is
      * appropriate for short term storage or RMI between applications running
      * the same version of Swing.  As of 1.4, support for long term storage
-     * of all JavaBeans<sup><font size="-2">TM</font></sup>
+     * of all JavaBeans&trade;
      * has been added to the <code>java.beans</code> package.
      * Please see {@link java.beans.XMLEncoder}.
      */
@@ -910,7 +910,7 @@
      * <p>
      *
      * See
-     * <a href="http://java.sun.com/docs/books/tutorial/uiswing/components/progress.html" target="_top">How to Monitor Progress</a>
+     * <a href="http://docs.oracle.com/javase/tutorial/uiswing/components/progress.html" target="_top">How to Monitor Progress</a>
      * for examples of using indeterminate progress bars.
      *
      * @param newValue  <code>true</code> if the progress bar
@@ -1031,7 +1031,7 @@
      * future Swing releases. The current serialization support is
      * appropriate for short term storage or RMI between applications running
      * the same version of Swing.  As of 1.4, support for long term storage
-     * of all JavaBeans<sup><font size="-2">TM</font></sup>
+     * of all JavaBeans&trade;
      * has been added to the <code>java.beans</code> package.
      * Please see {@link java.beans.XMLEncoder}.
      */
diff --git a/jdk/src/share/classes/javax/swing/JRadioButton.java b/jdk/src/share/classes/javax/swing/JRadioButton.java
index 5d594ce..ad7a3ab 100644
--- a/jdk/src/share/classes/javax/swing/JRadioButton.java
+++ b/jdk/src/share/classes/javax/swing/JRadioButton.java
@@ -57,10 +57,10 @@
  * configuring a button.  Refer to <a href="Action.html#buttonActions">
  * Swing Components Supporting <code>Action</code></a> for more
  * details, and you can find more information in <a
- * href="http://java.sun.com/docs/books/tutorial/uiswing/misc/action.html">How
+ * href="http://docs.oracle.com/javase/tutorial/uiswing/misc/action.html">How
  * to Use Actions</a>, a section in <em>The Java Tutorial</em>.
  * <p>
- * See <a href="http://java.sun.com/docs/books/tutorial/uiswing/components/button.html">How to Use Buttons, Check Boxes, and Radio Buttons</a>
+ * See <a href="http://docs.oracle.com/javase/tutorial/uiswing/components/button.html">How to Use Buttons, Check Boxes, and Radio Buttons</a>
  * in <em>The Java Tutorial</em>
  * for further documentation.
  * <p>
@@ -74,7 +74,7 @@
  * future Swing releases. The current serialization support is
  * appropriate for short term storage or RMI between applications running
  * the same version of Swing.  As of 1.4, support for long term storage
- * of all JavaBeans<sup><font size="-2">TM</font></sup>
+ * of all JavaBeans&trade;
  * has been added to the <code>java.beans</code> package.
  * Please see {@link java.beans.XMLEncoder}.
  *
@@ -280,7 +280,7 @@
      * future Swing releases. The current serialization support is
      * appropriate for short term storage or RMI between applications running
      * the same version of Swing.  As of 1.4, support for long term storage
-     * of all JavaBeans<sup><font size="-2">TM</font></sup>
+     * of all JavaBeans&trade;
      * has been added to the <code>java.beans</code> package.
      * Please see {@link java.beans.XMLEncoder}.
      */
diff --git a/jdk/src/share/classes/javax/swing/JRadioButtonMenuItem.java b/jdk/src/share/classes/javax/swing/JRadioButtonMenuItem.java
index 1c4dd4c..897ba97 100644
--- a/jdk/src/share/classes/javax/swing/JRadioButtonMenuItem.java
+++ b/jdk/src/share/classes/javax/swing/JRadioButtonMenuItem.java
@@ -53,12 +53,12 @@
  * configuring a menu item.  Refer to <a href="Action.html#buttonActions">
  * Swing Components Supporting <code>Action</code></a> for more
  * details, and you can find more information in <a
- * href="http://java.sun.com/docs/books/tutorial/uiswing/misc/action.html">How
+ * href="http://docs.oracle.com/javase/tutorial/uiswing/misc/action.html">How
  * to Use Actions</a>, a section in <em>The Java Tutorial</em>.
  * <p>
  * For further documentation and examples see
  * <a
- href="http://java.sun.com/docs/books/tutorial/uiswing/components/menu.html">How to Use Menus</a>,
+ href="http://docs.oracle.com/javase/tutorial/uiswing/components/menu.html">How to Use Menus</a>,
  * a section in <em>The Java Tutorial.</em>
  * <p>
  * <strong>Warning:</strong> Swing is not thread safe. For more
@@ -71,7 +71,7 @@
  * future Swing releases. The current serialization support is
  * appropriate for short term storage or RMI between applications running
  * the same version of Swing.  As of 1.4, support for long term storage
- * of all JavaBeans<sup><font size="-2">TM</font></sup>
+ * of all JavaBeans&trade;
  * has been added to the <code>java.beans</code> package.
  * Please see {@link java.beans.XMLEncoder}.
  *
@@ -262,7 +262,7 @@
      * future Swing releases. The current serialization support is
      * appropriate for short term storage or RMI between applications running
      * the same version of Swing.  As of 1.4, support for long term storage
-     * of all JavaBeans<sup><font size="-2">TM</font></sup>
+     * of all JavaBeans&trade;
      * has been added to the <code>java.beans</code> package.
      * Please see {@link java.beans.XMLEncoder}.
      */
diff --git a/jdk/src/share/classes/javax/swing/JRootPane.java b/jdk/src/share/classes/javax/swing/JRootPane.java
index 1f41ccb..480af1b 100644
--- a/jdk/src/share/classes/javax/swing/JRootPane.java
+++ b/jdk/src/share/classes/javax/swing/JRootPane.java
@@ -43,13 +43,13 @@
  * <code>JFrame</code>, <code>JDialog</code>, <code>JWindow</code>,
  * <code>JApplet</code>, and <code>JInternalFrame</code>.
  * For task-oriented information on functionality provided by root panes
- * see <a href="http://java.sun.com/docs/books/tutorial/uiswing/components/rootpane.html">How to Use Root Panes</a>,
+ * see <a href="http://docs.oracle.com/javase/tutorial/uiswing/components/rootpane.html">How to Use Root Panes</a>,
  * a section in <em>The Java Tutorial</em>.
  *
  * <p>
  * The following image shows the relationships between
  * the classes that use root panes.
- * <p align=center><img src="doc-files/JRootPane-1.gif"
+ * <p style="text-align:center"><img src="doc-files/JRootPane-1.gif"
  * alt="The following text describes this graphic."
  * HEIGHT=484 WIDTH=629></p>
  * The &quot;heavyweight&quot; components (those that delegate to a peer, or native
@@ -69,7 +69,7 @@
  * can be used to obtain the <code>JRootPane</code> that contains
  * a given component.
  * </blockquote>
- * <table align="right" border="0" summary="layout">
+ * <table style="float:right" border="0" summary="layout">
  * <tr>
  * <td align="center">
  * <img src="doc-files/JRootPane-2.gif"
@@ -179,7 +179,7 @@
  * future Swing releases. The current serialization support is
  * appropriate for short term storage or RMI between applications running
  * the same version of Swing.  As of 1.4, support for long term storage
- * of all JavaBeans<sup><font size="-2">TM</font></sup>
+ * of all JavaBeans&trade;
  * has been added to the <code>java.beans</code> package.
  * Please see {@link java.beans.XMLEncoder}.
  *
@@ -898,7 +898,7 @@
      * future Swing releases. The current serialization support is
      * appropriate for short term storage or RMI between applications running
      * the same version of Swing.  As of 1.4, support for long term storage
-     * of all JavaBeans<sup><font size="-2">TM</font></sup>
+     * of all JavaBeans&trade;
      * has been added to the <code>java.beans</code> package.
      * Please see {@link java.beans.XMLEncoder}.
      */
@@ -1064,7 +1064,7 @@
      * future Swing releases. The current serialization support is
      * appropriate for short term storage or RMI between applications running
      * the same version of Swing.  As of 1.4, support for long term storage
-     * of all JavaBeans<sup><font size="-2">TM</font></sup>
+     * of all JavaBeans&trade;
      * has been added to the <code>java.beans</code> package.
      * Please see {@link java.beans.XMLEncoder}.
      */
diff --git a/jdk/src/share/classes/javax/swing/JScrollBar.java b/jdk/src/share/classes/javax/swing/JScrollBar.java
index 8cbbbc8..efcac81 100644
--- a/jdk/src/share/classes/javax/swing/JScrollBar.java
+++ b/jdk/src/share/classes/javax/swing/JScrollBar.java
@@ -67,7 +67,7 @@
  * future Swing releases. The current serialization support is
  * appropriate for short term storage or RMI between applications running
  * the same version of Swing.  As of 1.4, support for long term storage
- * of all JavaBeans<sup><font size="-2">TM</font></sup>
+ * of all JavaBeans&trade;
  * has been added to the <code>java.beans</code> package.
  * Please see {@link java.beans.XMLEncoder}.
  *
@@ -838,7 +838,7 @@
      * future Swing releases. The current serialization support is
      * appropriate for short term storage or RMI between applications running
      * the same version of Swing.  As of 1.4, support for long term storage
-     * of all JavaBeans<sup><font size="-2">TM</font></sup>
+     * of all JavaBeans&trade;
      * has been added to the <code>java.beans</code> package.
      * Please see {@link java.beans.XMLEncoder}.
      */
diff --git a/jdk/src/share/classes/javax/swing/JScrollPane.java b/jdk/src/share/classes/javax/swing/JScrollPane.java
index 25918e5..4c5f1e8 100644
--- a/jdk/src/share/classes/javax/swing/JScrollPane.java
+++ b/jdk/src/share/classes/javax/swing/JScrollPane.java
@@ -50,16 +50,16 @@
  * vertical and horizontal scroll bars, and optional row and
  * column heading viewports.
  * You can find task-oriented documentation of <code>JScrollPane</code> in
- *  <a href="http://java.sun.com/docs/books/tutorial/uiswing/components/scrollpane.html">How to Use Scroll Panes</a>,
+ *  <a href="http://docs.oracle.com/javase/tutorial/uiswing/components/scrollpane.html">How to Use Scroll Panes</a>,
  * a section in <em>The Java Tutorial</em>.  Note that
  * <code>JScrollPane</code> does not support heavyweight components.
  * <p>
- * <TABLE ALIGN="RIGHT" BORDER="0" SUMMARY="layout">
+ * <TABLE STYLE="FLOAT:RIGHT" BORDER="0" SUMMARY="layout">
  *    <TR>
  *    <TD ALIGN="CENTER">
- *      <P ALIGN="CENTER"><IMG SRC="doc-files/JScrollPane-1.gif"
+ *      <P STYLE="TEXT-ALIGN:CENTER"><IMG SRC="doc-files/JScrollPane-1.gif"
  *      alt="The following text describes this image."
- *      WIDTH="256" HEIGHT="248" ALIGN="BOTTOM" BORDER="0">
+ *      WIDTH="256" HEIGHT="248" STYLE="FLOAT:BOTTOM; BORDER:0px">
  *    </TD>
  *    </TR>
  * </TABLE>
@@ -146,7 +146,7 @@
  * future Swing releases. The current serialization support is
  * appropriate for short term storage or RMI between applications running
  * the same version of Swing.  As of 1.4, support for long term storage
- * of all JavaBeans<sup><font size="-2">TM</font></sup>
+ * of all JavaBeans&trade;
  * has been added to the <code>java.beans</code> package.
  * Please see {@link java.beans.XMLEncoder}.
  *
@@ -677,7 +677,7 @@
      * future Swing releases. The current serialization support is
      * appropriate for short term storage or RMI between applications running
      * the same version of Swing.  As of 1.4, support for long term storage
-     * of all JavaBeans<sup><font size="-2">TM</font></sup>
+     * of all JavaBeans&trade;
      * has been added to the <code>java.beans</code> package.
      * Please see {@link java.beans.XMLEncoder}.
      *
@@ -1437,7 +1437,7 @@
      * future Swing releases. The current serialization support is
      * appropriate for short term storage or RMI between applications running
      * the same version of Swing.  As of 1.4, support for long term storage
-     * of all JavaBeans<sup><font size="-2">TM</font></sup>
+     * of all JavaBeans&trade;
      * has been added to the <code>java.beans</code> package.
      * Please see {@link java.beans.XMLEncoder}.
      */
diff --git a/jdk/src/share/classes/javax/swing/JSeparator.java b/jdk/src/share/classes/javax/swing/JSeparator.java
index 8c5e14f..5f56ae3 100644
--- a/jdk/src/share/classes/javax/swing/JSeparator.java
+++ b/jdk/src/share/classes/javax/swing/JSeparator.java
@@ -47,7 +47,7 @@
  *
  * For more information and examples see
  * <a
- href="http://java.sun.com/docs/books/tutorial/uiswing/components/menu.html">How to Use Menus</a>,
+ href="http://docs.oracle.com/javase/tutorial/uiswing/components/menu.html">How to Use Menus</a>,
  * a section in <em>The Java Tutorial.</em>
  * <p>
  * <strong>Warning:</strong> Swing is not thread safe. For more
@@ -60,7 +60,7 @@
  * future Swing releases. The current serialization support is
  * appropriate for short term storage or RMI between applications running
  * the same version of Swing.  As of 1.4, support for long term storage
- * of all JavaBeans<sup><font size="-2">TM</font></sup>
+ * of all JavaBeans&trade;
  * has been added to the <code>java.beans</code> package.
  * Please see {@link java.beans.XMLEncoder}.
  *
@@ -276,7 +276,7 @@
      * future Swing releases. The current serialization support is
      * appropriate for short term storage or RMI between applications running
      * the same version of Swing.  As of 1.4, support for long term storage
-     * of all JavaBeans<sup><font size="-2">TM</font></sup>
+     * of all JavaBeans&trade;
      * has been added to the <code>java.beans</code> package.
      * Please see {@link java.beans.XMLEncoder}.
      */
diff --git a/jdk/src/share/classes/javax/swing/JSlider.java b/jdk/src/share/classes/javax/swing/JSlider.java
index 7a948d9..207ce7d 100644
--- a/jdk/src/share/classes/javax/swing/JSlider.java
+++ b/jdk/src/share/classes/javax/swing/JSlider.java
@@ -55,7 +55,7 @@
  * <p>
  * For further information and examples see
  * <a
- href="http://java.sun.com/docs/books/tutorial/uiswing/components/slider.html">How to Use Sliders</a>,
+ href="http://docs.oracle.com/javase/tutorial/uiswing/components/slider.html">How to Use Sliders</a>,
  * a section in <em>The Java Tutorial.</em>
  * <p>
  * <strong>Warning:</strong> Swing is not thread safe. For more
@@ -68,7 +68,7 @@
  * future Swing releases. The current serialization support is
  * appropriate for short term storage or RMI between applications running
  * the same version of Swing.  As of 1.4, support for long term storage
- * of all JavaBeans<sup><font size="-2">TM</font></sup>
+ * of all JavaBeans&trade;
  * has been added to the <code>java.beans</code> package.
  * Please see {@link java.beans.XMLEncoder}.
  *
@@ -1425,7 +1425,7 @@
      * future Swing releases. The current serialization support is
      * appropriate for short term storage or RMI between applications running
      * the same version of Swing.  As of 1.4, support for long term storage
-     * of all JavaBeans<sup><font size="-2">TM</font></sup>
+     * of all JavaBeans&trade;
      * has been added to the <code>java.beans</code> package.
      * Please see {@link java.beans.XMLEncoder}.
      */
diff --git a/jdk/src/share/classes/javax/swing/JSpinner.java b/jdk/src/share/classes/javax/swing/JSpinner.java
index d60f67c..d15bde3 100644
--- a/jdk/src/share/classes/javax/swing/JSpinner.java
+++ b/jdk/src/share/classes/javax/swing/JSpinner.java
@@ -93,7 +93,7 @@
  * </pre>
  * <p>
  * For information and examples of using spinner see
- * <a href="http://java.sun.com/doc/books/tutorial/uiswing/components/spinner.html">How to Use Spinners</a>,
+ * <a href="http://docs.oracle.com/javase/tutorial/uiswing/components/spinner.html">How to Use Spinners</a>,
  * a section in <em>The Java Tutorial.</em>
  * <p>
  * <strong>Warning:</strong> Swing is not thread safe. For more
@@ -106,7 +106,7 @@
  * future Swing releases. The current serialization support is
  * appropriate for short term storage or RMI between applications running
  * the same version of Swing.  As of 1.4, support for long term storage
- * of all JavaBeans<sup><font size="-2">TM</font></sup>
+ * of all JavaBeans&trade;
  * has been added to the <code>java.beans</code> package.
  * Please see {@link java.beans.XMLEncoder}.
  *
diff --git a/jdk/src/share/classes/javax/swing/JSplitPane.java b/jdk/src/share/classes/javax/swing/JSplitPane.java
index 622c70f..111a3e0 100644
--- a/jdk/src/share/classes/javax/swing/JSplitPane.java
+++ b/jdk/src/share/classes/javax/swing/JSplitPane.java
@@ -49,7 +49,7 @@
  * interactively resized by the user.
  * Information on using <code>JSplitPane</code> is in
  * <a
- href="http://java.sun.com/docs/books/tutorial/uiswing/components/splitpane.html">How to Use Split Panes</a> in
+ href="http://docs.oracle.com/javase/tutorial/uiswing/components/splitpane.html">How to Use Split Panes</a> in
  * <em>The Java Tutorial</em>.
  * <p>
  * The two <code>Component</code>s in a split pane can be aligned
@@ -89,7 +89,7 @@
  * future Swing releases. The current serialization support is
  * appropriate for short term storage or RMI between applications running
  * the same version of Swing.  As of 1.4, support for long term storage
- * of all JavaBeans<sup><font size="-2">TM</font></sup>
+ * of all JavaBeans&trade;
  * has been added to the <code>java.beans</code> package.
  * Please see {@link java.beans.XMLEncoder}.
  *
@@ -1152,7 +1152,7 @@
      * future Swing releases. The current serialization support is
      * appropriate for short term storage or RMI between applications running
      * the same version of Swing.  As of 1.4, support for long term storage
-     * of all JavaBeans<sup><font size="-2">TM</font></sup>
+     * of all JavaBeans&trade;
      * has been added to the <code>java.beans</code> package.
      * Please see {@link java.beans.XMLEncoder}.
      */
diff --git a/jdk/src/share/classes/javax/swing/JTabbedPane.java b/jdk/src/share/classes/javax/swing/JTabbedPane.java
index 6c71657..e6c0951 100644
--- a/jdk/src/share/classes/javax/swing/JTabbedPane.java
+++ b/jdk/src/share/classes/javax/swing/JTabbedPane.java
@@ -43,7 +43,7 @@
  * A component that lets the user switch between a group of components by
  * clicking on a tab with a given title and/or icon.
  * For examples and information on using tabbed panes see
- * <a href="http://java.sun.com/docs/books/tutorial/uiswing/components/tabbedpane.html">How to Use Tabbed Panes</a>,
+ * <a href="http://docs.oracle.com/javase/tutorial/uiswing/components/tabbedpane.html">How to Use Tabbed Panes</a>,
  * a section in <em>The Java Tutorial</em>.
  * <p>
  * Tabs/components are added to a <code>TabbedPane</code> object by using the
@@ -91,7 +91,7 @@
  * future Swing releases. The current serialization support is
  * appropriate for short term storage or RMI between applications running
  * the same version of Swing.  As of 1.4, support for long term storage
- * of all JavaBeans<sup><font size="-2">TM</font></sup>
+ * of all JavaBeans&trade;
  * has been added to the <code>java.beans</code> package.
  * Please see {@link java.beans.XMLEncoder}.
  *
@@ -207,7 +207,7 @@
     }
 
     /**
-     * Returns the UI object which implements the L&F for this component.
+     * Returns the UI object which implements the L&amp;F for this component.
      *
      * @return a <code>TabbedPaneUI</code> object
      * @see #setUI
@@ -217,7 +217,7 @@
     }
 
     /**
-     * Sets the UI object which implements the L&F for this component.
+     * Sets the UI object which implements the L&amp;F for this component.
      *
      * @param ui the new UI object
      * @see UIDefaults#getUI
@@ -250,7 +250,7 @@
 
     /**
      * Returns the name of the UI class that implements the
-     * L&F for this component.
+     * L&amp;F for this component.
      *
      * @return the string "TabbedPaneUI"
      * @see JComponent#getUIClassID
@@ -576,7 +576,7 @@
      *
      * @param index  the index to be selected
      * @exception IndexOutOfBoundsException if index is out of range
-     *            (index < -1 || index >= tab count)
+     *            {@code (index < -1 || index >= tab count)}
      *
      * @see #getSelectedIndex
      * @see SingleSelectionModel#setSelectedIndex
@@ -924,7 +924,7 @@
      * if added to other containers.
      * @param index the index of the tab to be removed
      * @exception IndexOutOfBoundsException if index is out of range
-     *            (index < 0 || index >= tab count)
+     *            {@code (index < 0 || index >= tab count)}
      *
      * @see #addTab
      * @see #insertTab
@@ -1043,7 +1043,7 @@
      * @param index the index of the component to remove from the
      *          <code>tabbedpane</code>
      * @exception IndexOutOfBoundsException if index is out of range
-     *            (index < 0 || index >= tab count)
+     *            {@code (index < 0 || index >= tab count)}
      * @see #addTab
      * @see #removeTabAt
      */
@@ -1105,7 +1105,7 @@
      * @param index  the index of the item being queried
      * @return the title at <code>index</code>
      * @exception IndexOutOfBoundsException if index is out of range
-     *            (index < 0 || index >= tab count)
+     *            {@code (index < 0 || index >= tab count)}
      * @see #setTitleAt
      */
     public String getTitleAt(int index) {
@@ -1118,7 +1118,7 @@
      * @param index  the index of the item being queried
      * @return the icon at <code>index</code>
      * @exception IndexOutOfBoundsException if index is out of range
-     *            (index < 0 || index >= tab count)
+     *            {@code (index < 0 || index >= tab count)}
      *
      * @see #setIconAt
      */
@@ -1137,7 +1137,7 @@
      * @param index  the index of the item being queried
      * @return the icon at <code>index</code>
      * @exception IndexOutOfBoundsException if index is out of range
-     *            (index < 0 || index >= tab count)
+     *            {@code (index < 0 || index >= tab count)}
      *
      * @see #setDisabledIconAt
      */
@@ -1155,7 +1155,7 @@
      * @param index  the index of the item being queried
      * @return a string containing the tool tip text at <code>index</code>
      * @exception IndexOutOfBoundsException if index is out of range
-     *            (index < 0 || index >= tab count)
+     *            {@code (index < 0 || index >= tab count)}
      *
      * @see #setToolTipTextAt
      * @since 1.3
@@ -1171,7 +1171,7 @@
      * @return the <code>Color</code> of the tab background at
      *          <code>index</code>
      * @exception IndexOutOfBoundsException if index is out of range
-     *            (index < 0 || index >= tab count)
+     *            {@code (index < 0 || index >= tab count)}
      *
      * @see #setBackgroundAt
      */
@@ -1186,7 +1186,7 @@
      * @return the <code>Color</code> of the tab foreground at
      *          <code>index</code>
      * @exception IndexOutOfBoundsException if index is out of range
-     *            (index < 0 || index >= tab count)
+     *            {@code (index < 0 || index >= tab count)}
      *
      * @see #setForegroundAt
      */
@@ -1202,7 +1202,7 @@
      * @return true if the tab at <code>index</code> is enabled;
      *          false otherwise
      * @exception IndexOutOfBoundsException if index is out of range
-     *            (index < 0 || index >= tab count)
+     *            {@code (index < 0 || index >= tab count)}
      *
      * @see #setEnabledAt
      */
@@ -1216,7 +1216,7 @@
      * @param index  the index of the item being queried
      * @return the <code>Component</code> at <code>index</code>
      * @exception IndexOutOfBoundsException if index is out of range
-     *            (index < 0 || index >= tab count)
+     *            {@code (index < 0 || index >= tab count)}
      *
      * @see #setComponentAt
      */
@@ -1281,7 +1281,7 @@
      *          <code>index</code> is not currently visible in the UI,
      *          or if there is no UI set on this <code>tabbedpane</code>
      * @exception IndexOutOfBoundsException if index is out of range
-     *            (index &lt; 0 || index &gt;= tab count)
+     *            {@code (index < 0 || index >= tab count)}
      */
     public Rectangle getBoundsAt(int index) {
         checkIndex(index);
@@ -1303,7 +1303,7 @@
      * @param index the tab index where the title should be set
      * @param title the title to be displayed in the tab
      * @exception IndexOutOfBoundsException if index is out of range
-     *            (index &lt; 0 || index &gt;= tab count)
+     *            {@code (index < 0 || index >= tab count)}
      *
      * @see #getTitleAt
      * @see #setTabComponentAt
@@ -1345,7 +1345,7 @@
      * @param index the tab index where the icon should be set
      * @param icon the icon to be displayed in the tab
      * @exception IndexOutOfBoundsException if index is out of range
-     *            (index < 0 || index >= tab count)
+     *            {@code (index < 0 || index >= tab count)}
      *
      * @see #setDisabledIconAt
      * @see #getIconAt
@@ -1389,7 +1389,7 @@
      * @param index the tab index where the disabled icon should be set
      * @param disabledIcon the icon to be displayed in the tab when disabled
      * @exception IndexOutOfBoundsException if index is out of range
-     *            (index &lt; 0 || index &gt;= tab count)
+     *            {@code (index < 0 || index >= tab count)}
      *
      * @see #getDisabledIconAt
      * @beaninfo
@@ -1414,7 +1414,7 @@
      * @param index the tab index where the tooltip text should be set
      * @param toolTipText the tooltip text to be displayed for the tab
      * @exception IndexOutOfBoundsException if index is out of range
-     *            (index &lt; 0 || index &gt;= tab count)
+     *            {@code (index < 0 || index >= tab count)}
      *
      * @see #getToolTipTextAt
      * @beaninfo
@@ -1443,14 +1443,14 @@
      * which can be <code>null</code>, in which case the tab's background color
      * will default to the background color of the <code>tabbedpane</code>.
      * An internal exception is raised if there is no tab at that index.
-     * <p/>
+     * <p>
      * It is up to the look and feel to honor this property, some may
      * choose to ignore it.
      *
      * @param index the tab index where the background should be set
      * @param background the color to be displayed in the tab's background
      * @exception IndexOutOfBoundsException if index is out of range
-     *            (index &lt; 0 || index &gt;= tab count)
+     *            {@code (index < 0 || index >= tab count)}
      *
      * @see #getBackgroundAt
      * @beaninfo
@@ -1476,14 +1476,14 @@
      * <code>null</code>, in which case the tab's foreground color
      * will default to the foreground color of this <code>tabbedpane</code>.
      * An internal exception is raised if there is no tab at that index.
-     * <p/>
+     * <p>
      * It is up to the look and feel to honor this property, some may
      * choose to ignore it.
      *
      * @param index the tab index where the foreground should be set
      * @param foreground the color to be displayed as the tab's foreground
      * @exception IndexOutOfBoundsException if index is out of range
-     *            (index &lt; 0 || index &gt;= tab count)
+     *            {@code (index < 0 || index >= tab count)}
      *
      * @see #getForegroundAt
      * @beaninfo
@@ -1510,7 +1510,7 @@
      * @param index the tab index which should be enabled/disabled
      * @param enabled whether or not the tab should be enabled
      * @exception IndexOutOfBoundsException if index is out of range
-     *            (index &lt; 0 || index &gt;= tab count)
+     *            {@code (index < 0 || index >= tab count)}
      *
      * @see #isEnabledAt
      */
@@ -1530,7 +1530,7 @@
      * @param index the tab index where this component is being placed
      * @param component the component for the tab
      * @exception IndexOutOfBoundsException if index is out of range
-     *            (index &lt; 0 || index &gt;= tab count)
+     *            {@code (index < 0 || index >= tab count)}
      *
      * @see #getComponentAt
      * @beaninfo
@@ -1605,8 +1605,8 @@
      * @param tabIndex the index of the tab that the mnemonic refers to
      * @param mnemonicIndex index into the <code>String</code> to underline
      * @exception IndexOutOfBoundsException if <code>tabIndex</code> is
-     *            out of range (<code>tabIndex < 0 || tabIndex >= tab
-     *            count</code>)
+     *            out of range ({@code tabIndex < 0 || tabIndex >= tab
+     *            count})
      * @exception IllegalArgumentException will be thrown if
      *            <code>mnemonicIndex</code> is &gt;= length of the tab
      *            title , or &lt; -1
@@ -1649,7 +1649,7 @@
      * @param tabIndex the index of the tab that the mnemonic refers to
      * @param mnemonic the key code which represents the mnemonic
      * @exception IndexOutOfBoundsException if <code>tabIndex</code> is out
-     *            of range (<code>tabIndex < 0 || tabIndex >= tab count</code>)
+     *            of range ({@code tabIndex < 0 || tabIndex >= tab count})
      * @see #getMnemonicAt(int)
      * @see #setDisplayedMnemonicIndexAt(int,int)
      *
@@ -1885,7 +1885,7 @@
      * future Swing releases. The current serialization support is
      * appropriate for short term storage or RMI between applications running
      * the same version of Swing.  As of 1.4, support for long term storage
-     * of all JavaBeans<sup><font size="-2">TM</font></sup>
+     * of all JavaBeans&trade;
      * has been added to the <code>java.beans</code> package.
      * Please see {@link java.beans.XMLEncoder}.
      */
@@ -2354,7 +2354,7 @@
     * @param component the component to render the title for the
     *                  specified tab
     * @exception IndexOutOfBoundsException if index is out of range
-    *            (index < 0 || index >= tab count)
+    *            {@code (index < 0 || index >= tab count)}
     * @exception IllegalArgumentException if component has already been
     *            added to this <code>JTabbedPane</code>
     *
@@ -2386,7 +2386,7 @@
      * @param index  the index of the item being queried
      * @return the tab component at <code>index</code>
      * @exception IndexOutOfBoundsException if index is out of range
-     *            (index < 0 || index >= tab count)
+     *            {@code (index < 0 || index >= tab count)}
      *
      * @see #setTabComponentAt
      * @since 1.6
diff --git a/jdk/src/share/classes/javax/swing/JTable.java b/jdk/src/share/classes/javax/swing/JTable.java
index cf47753..c366c6b 100644
--- a/jdk/src/share/classes/javax/swing/JTable.java
+++ b/jdk/src/share/classes/javax/swing/JTable.java
@@ -62,7 +62,7 @@
 /**
  * The <code>JTable</code> is used to display and edit regular two-dimensional tables
  * of cells.
- * See <a href="http://java.sun.com/docs/books/tutorial/uiswing/components/table.html">How to Use Tables</a>
+ * See <a href="http://docs.oracle.com/javase/tutorial/uiswing/components/table.html">How to Use Tables</a>
  * in <em>The Java Tutorial</em>
  * for task-oriented documentation and examples of using <code>JTable</code>.
  *
@@ -200,7 +200,7 @@
  * future Swing releases. The current serialization support is
  * appropriate for short term storage or RMI between applications running
  * the same version of Swing.  As of 1.4, support for long term storage
- * of all JavaBeans<sup><font size="-2">TM</font></sup>
+ * of all JavaBeans&trade;
  * has been added to the <code>java.beans</code> package.
  * Please see {@link java.beans.XMLEncoder}.
  *
@@ -2489,7 +2489,7 @@
      * The default value of this property is defined by the look
      * and feel implementation.
      * <p>
-     * This is a <a href="http://java.sun.com/docs/books/tutorial/javabeans/properties/bound.html">JavaBeans</a> bound property.
+     * This is a <a href="http://docs.oracle.com/javase/tutorial/javabeans/writing/properties.html">JavaBeans</a> bound property.
      *
      * @param selectionForeground  the <code>Color</code> to use in the foreground
      *                             for selected list items
@@ -2527,7 +2527,7 @@
      * The default value of this property is defined by the look
      * and feel implementation.
      * <p>
-     * This is a <a href="http://java.sun.com/docs/books/tutorial/javabeans/properties/bound.html">JavaBeans</a> bound property.
+     * This is a <a href="http://docs.oracle.com/javase/tutorial/javabeans/writing/properties.html">JavaBeans</a> bound property.
      *
      * @param selectionBackground  the <code>Color</code> to use for the background
      *                             of selected cells
@@ -6575,7 +6575,7 @@
      * future Swing releases. The current serialization support is
      * appropriate for short term storage or RMI between applications running
      * the same version of Swing.  As of 1.4, support for long term storage
-     * of all JavaBeans<sup><font size="-2">TM</font></sup>
+     * of all JavaBeans&trade;
      * has been added to the <code>java.beans</code> package.
      * Please see {@link java.beans.XMLEncoder}.
      */
diff --git a/jdk/src/share/classes/javax/swing/JTextArea.java b/jdk/src/share/classes/javax/swing/JTextArea.java
index 0af83fa..80b2bb7 100644
--- a/jdk/src/share/classes/javax/swing/JTextArea.java
+++ b/jdk/src/share/classes/javax/swing/JTextArea.java
@@ -44,7 +44,7 @@
  * compatibility with the <code>java.awt.TextArea</code> class where it can
  * reasonably do so.
  * You can find information and examples of using all the text components in
- * <a href="http://java.sun.com/docs/books/tutorial/uiswing/components/text.html">Using Text Components</a>,
+ * <a href="http://docs.oracle.com/javase/tutorial/uiswing/components/text.html">Using Text Components</a>,
  * a section in <em>The Java Tutorial.</em>
  *
  * <p>
@@ -112,7 +112,7 @@
  * future Swing releases. The current serialization support is
  * appropriate for short term storage or RMI between applications running
  * the same version of Swing.  As of 1.4, support for long term storage
- * of all JavaBeans<sup><font size="-2">TM</font></sup>
+ * of all JavaBeans&trade;
  * has been added to the <code>java.beans</code> package.
  * Please see {@link java.beans.XMLEncoder}.
  *
@@ -783,7 +783,7 @@
      * future Swing releases. The current serialization support is
      * appropriate for short term storage or RMI between applications running
      * the same version of Swing.  As of 1.4, support for long term storage
-     * of all JavaBeans<sup><font size="-2">TM</font></sup>
+     * of all JavaBeans&trade;
      * has been added to the <code>java.beans</code> package.
      * Please see {@link java.beans.XMLEncoder}.
      */
diff --git a/jdk/src/share/classes/javax/swing/JTextField.java b/jdk/src/share/classes/javax/swing/JTextField.java
index 2fd75f0..0e5e9aa 100644
--- a/jdk/src/share/classes/javax/swing/JTextField.java
+++ b/jdk/src/share/classes/javax/swing/JTextField.java
@@ -44,7 +44,7 @@
  * of a single line of text.
  * For information on and examples of using text fields,
  * see
- * <a href="http://java.sun.com/docs/books/tutorial/uiswing/components/textfield.html">How to Use Text Fields</a>
+ * <a href="http://docs.oracle.com/javase/tutorial/uiswing/components/textfield.html">How to Use Text Fields</a>
  * in <em>The Java Tutorial.</em>
  *
  * <p>
@@ -148,7 +148,7 @@
  * future Swing releases. The current serialization support is
  * appropriate for short term storage or RMI between applications running
  * the same version of Swing.  As of 1.4, support for long term storage
- * of all JavaBeans<sup><font size="-2">TM</font></sup>
+ * of all JavaBeans&trade;
  * has been added to the <code>java.beans</code> package.
  * Please see {@link java.beans.XMLEncoder}.
  *
@@ -939,7 +939,7 @@
      * future Swing releases. The current serialization support is
      * appropriate for short term storage or RMI between applications running
      * the same version of Swing.  As of 1.4, support for long term storage
-     * of all JavaBeans<sup><font size="-2">TM</font></sup>
+     * of all JavaBeans&trade;
      * has been added to the <code>java.beans</code> package.
      * Please see {@link java.beans.XMLEncoder}.
      */
diff --git a/jdk/src/share/classes/javax/swing/JTextPane.java b/jdk/src/share/classes/javax/swing/JTextPane.java
index b129bd8..a6a76ed 100644
--- a/jdk/src/share/classes/javax/swing/JTextPane.java
+++ b/jdk/src/share/classes/javax/swing/JTextPane.java
@@ -39,7 +39,7 @@
  * A text component that can be marked up with attributes that are
  * represented graphically.
  * You can find how-to information and examples of using text panes in
- * <a href="http://java.sun.com/docs/books/tutorial/uiswing/components/text.html">Using Text Components</a>,
+ * <a href="http://docs.oracle.com/javase/tutorial/uiswing/components/text.html">Using Text Components</a>,
  * a section in <em>The Java Tutorial.</em>
  *
  * <p>
@@ -68,7 +68,7 @@
  * future Swing releases. The current serialization support is
  * appropriate for short term storage or RMI between applications running
  * the same version of Swing.  As of 1.4, support for long term storage
- * of all JavaBeans<sup><font size="-2">TM</font></sup>
+ * of all JavaBeans&trade;
  * has been added to the <code>java.beans</code> package.
  * Please see {@link java.beans.XMLEncoder}.
  *
diff --git a/jdk/src/share/classes/javax/swing/JToggleButton.java b/jdk/src/share/classes/javax/swing/JToggleButton.java
index bda38db..3489a07 100644
--- a/jdk/src/share/classes/javax/swing/JToggleButton.java
+++ b/jdk/src/share/classes/javax/swing/JToggleButton.java
@@ -42,7 +42,7 @@
  * are subclasses of this class.
  * For information on using them see
  * <a
- href="http://java.sun.com/docs/books/tutorial/uiswing/components/button.html">How to Use Buttons, Check Boxes, and Radio Buttons</a>,
+ href="http://docs.oracle.com/javase/tutorial/uiswing/components/button.html">How to Use Buttons, Check Boxes, and Radio Buttons</a>,
  * a section in <em>The Java Tutorial</em>.
  * <p>
  * Buttons can be configured, and to some degree controlled, by
@@ -51,7 +51,7 @@
  * configuring a button.  Refer to <a href="Action.html#buttonActions">
  * Swing Components Supporting <code>Action</code></a> for more
  * details, and you can find more information in <a
- * href="http://java.sun.com/docs/books/tutorial/uiswing/misc/action.html">How
+ * href="http://docs.oracle.com/javase/tutorial/uiswing/misc/action.html">How
  * to Use Actions</a>, a section in <em>The Java Tutorial</em>.
  * <p>
  * <strong>Warning:</strong> Swing is not thread safe. For more
@@ -64,7 +64,7 @@
  * future Swing releases. The current serialization support is
  * appropriate for short term storage or RMI between applications running
  * the same version of Swing.  As of 1.4, support for long term storage
- * of all JavaBeans<sup><font size="-2">TM</font></sup>
+ * of all JavaBeans&trade;
  * has been added to the <code>java.beans</code> package.
  * Please see {@link java.beans.XMLEncoder}.
  *
@@ -218,7 +218,7 @@
      * future Swing releases. The current serialization support is
      * appropriate for short term storage or RMI between applications running
      * the same version of Swing.  As of 1.4, support for long term storage
-     * of all JavaBeans<sup><font size="-2">TM</font></sup>
+     * of all JavaBeans&trade;
      * has been added to the <code>java.beans</code> package.
      * Please see {@link java.beans.XMLEncoder}.
      */
@@ -380,7 +380,7 @@
      * future Swing releases. The current serialization support is
      * appropriate for short term storage or RMI between applications running
      * the same version of Swing.  As of 1.4, support for long term storage
-     * of all JavaBeans<sup><font size="-2">TM</font></sup>
+     * of all JavaBeans&trade;
      * has been added to the <code>java.beans</code> package.
      * Please see {@link java.beans.XMLEncoder}.
      */
diff --git a/jdk/src/share/classes/javax/swing/JToolBar.java b/jdk/src/share/classes/javax/swing/JToolBar.java
index b1a8c87..a47e861 100644
--- a/jdk/src/share/classes/javax/swing/JToolBar.java
+++ b/jdk/src/share/classes/javax/swing/JToolBar.java
@@ -52,7 +52,7 @@
  * <code>JToolBar</code> provides a component that is useful for
  * displaying commonly used <code>Action</code>s or controls.
  * For examples and information on using tool bars see
- * <a href="http://java.sun.com/docs/books/tutorial/uiswing/components/toolbar.html">How to Use Tool Bars</a>,
+ * <a href="http://docs.oracle.com/javase/tutorial/uiswing/components/toolbar.html">How to Use Tool Bars</a>,
  * a section in <em>The Java Tutorial</em>.
  *
  * <p>
@@ -74,7 +74,7 @@
  * future Swing releases. The current serialization support is
  * appropriate for short term storage or RMI between applications running
  * the same version of Swing.  As of 1.4, support for long term storage
- * of all JavaBeans<sup><font size="-2">TM</font></sup>
+ * of all JavaBeans&trade;
  * has been added to the <code>java.beans</code> package.
  * Please see {@link java.beans.XMLEncoder}.
  *
diff --git a/jdk/src/share/classes/javax/swing/JToolTip.java b/jdk/src/share/classes/javax/swing/JToolTip.java
index 77b29ea..6373fee 100644
--- a/jdk/src/share/classes/javax/swing/JToolTip.java
+++ b/jdk/src/share/classes/javax/swing/JToolTip.java
@@ -44,7 +44,7 @@
  * display can override <code>JComponent</code>'s <code>createToolTip</code>
  * method and use a subclass of this class.
  * <p>
- * See <a href="http://java.sun.com/docs/books/tutorial/uiswing/components/tooltip.html">How to Use Tool Tips</a>
+ * See <a href="http://docs.oracle.com/javase/tutorial/uiswing/components/tooltip.html">How to Use Tool Tips</a>
  * in <em>The Java Tutorial</em>
  * for further documentation.
  * <p>
@@ -58,7 +58,7 @@
  * future Swing releases. The current serialization support is
  * appropriate for short term storage or RMI between applications running
  * the same version of Swing.  As of 1.4, support for long term storage
- * of all JavaBeans<sup><font size="-2">TM</font></sup>
+ * of all JavaBeans&trade;
  * has been added to the <code>java.beans</code> package.
  * Please see {@link java.beans.XMLEncoder}.
  *
@@ -254,7 +254,7 @@
      * future Swing releases. The current serialization support is
      * appropriate for short term storage or RMI between applications running
      * the same version of Swing.  As of 1.4, support for long term storage
-     * of all JavaBeans<sup><font size="-2">TM</font></sup>
+     * of all JavaBeans&trade;
      * has been added to the <code>java.beans</code> package.
      * Please see {@link java.beans.XMLEncoder}.
      */
diff --git a/jdk/src/share/classes/javax/swing/JTree.java b/jdk/src/share/classes/javax/swing/JTree.java
index 56aaca1..fdacb72 100644
--- a/jdk/src/share/classes/javax/swing/JTree.java
+++ b/jdk/src/share/classes/javax/swing/JTree.java
@@ -44,7 +44,7 @@
  * <a name="jtree_description"></a>
  * A control that displays a set of hierarchical data as an outline.
  * You can find task-oriented documentation and examples of using trees in
- * <a href="http://java.sun.com/docs/books/tutorial/uiswing/components/tree.html">How to Use Trees</a>,
+ * <a href="http://docs.oracle.com/javase/tutorial/uiswing/components/tree.html">How to Use Trees</a>,
  * a section in <em>The Java Tutorial.</em>
  * <p>
  * A specific node in a tree can be identified either by a
@@ -130,7 +130,7 @@
  * future Swing releases. The current serialization support is
  * appropriate for short term storage or RMI between applications running
  * the same version of Swing.  As of 1.4, support for long term storage
- * of all JavaBeans<sup><font size="-2">TM</font></sup>
+ * of all JavaBeans&trade;
  * has been added to the <code>java.beans</code> package.
  * Please see {@link java.beans.XMLEncoder}.
  *</p>
@@ -3238,7 +3238,7 @@
      * future Swing releases. The current serialization support is
      * appropriate for short term storage or RMI between applications running
      * the same version of Swing.  As of 1.4, support for long term storage
-     * of all JavaBeans<sup><font size="-2">TM</font></sup>
+     * of all JavaBeans&trade;
      * has been added to the <code>java.beans</code> package.
      * Please see {@link java.beans.XMLEncoder}.
      */
@@ -3360,7 +3360,7 @@
      * future Swing releases. The current serialization support is
      * appropriate for short term storage or RMI between applications running
      * the same version of Swing.  As of 1.4, support for long term storage
-     * of all JavaBeans<sup><font size="-2">TM</font></sup>
+     * of all JavaBeans&trade;
      * has been added to the <code>java.beans</code> package.
      * Please see {@link java.beans.XMLEncoder}.
      */
@@ -3861,7 +3861,7 @@
      * future Swing releases. The current serialization support is
      * appropriate for short term storage or RMI between applications running
      * the same version of Swing.  As of 1.4, support for long term storage
-     * of all JavaBeans<sup><font size="-2">TM</font></sup>
+     * of all JavaBeans&trade;
      * has been added to the <code>java.beans</code> package.
      * Please see {@link java.beans.XMLEncoder}.
      */
@@ -4093,7 +4093,7 @@
      * future Swing releases. The current serialization support is
      * appropriate for short term storage or RMI between applications running
      * the same version of Swing.  As of 1.4, support for long term storage
-     * of all JavaBeans<sup><font size="-2">TM</font></sup>
+     * of all JavaBeans&trade;
      * has been added to the <code>java.beans</code> package.
      * Please see {@link java.beans.XMLEncoder}.
      */
diff --git a/jdk/src/share/classes/javax/swing/JViewport.java b/jdk/src/share/classes/javax/swing/JViewport.java
index 7d546a8..7f3346d 100644
--- a/jdk/src/share/classes/javax/swing/JViewport.java
+++ b/jdk/src/share/classes/javax/swing/JViewport.java
@@ -94,7 +94,7 @@
  * future Swing releases. The current serialization support is
  * appropriate for short term storage or RMI between applications running
  * the same version of Swing.  As of 1.4, support for long term storage
- * of all JavaBeans<sup><font size="-2">TM</font></sup>
+ * of all JavaBeans&trade;
  * has been added to the <code>java.beans</code> package.
  * Please see {@link java.beans.XMLEncoder}.
  *
@@ -1292,7 +1292,7 @@
      * future Swing releases. The current serialization support is
      * appropriate for short term storage or RMI between applications running
      * the same version of Swing.  As of 1.4, support for long term storage
-     * of all JavaBeans<sup><font size="-2">TM</font></sup>
+     * of all JavaBeans&trade;
      * has been added to the <code>java.beans</code> package.
      * Please see {@link java.beans.XMLEncoder}.
      */
@@ -1761,7 +1761,7 @@
      * future Swing releases. The current serialization support is
      * appropriate for short term storage or RMI between applications running
      * the same version of Swing.  As of 1.4, support for long term storage
-     * of all JavaBeans<sup><font size="-2">TM</font></sup>
+     * of all JavaBeans&trade;
      * has been added to the <code>java.beans</code> package.
      * Please see {@link java.beans.XMLEncoder}.
      */
diff --git a/jdk/src/share/classes/javax/swing/JWindow.java b/jdk/src/share/classes/javax/swing/JWindow.java
index f5d7b08..c49e942 100644
--- a/jdk/src/share/classes/javax/swing/JWindow.java
+++ b/jdk/src/share/classes/javax/swing/JWindow.java
@@ -76,7 +76,7 @@
  * future Swing releases. The current serialization support is
  * appropriate for short term storage or RMI between applications running
  * the same version of Swing.  As of 1.4, support for long term storage
- * of all JavaBeans<sup><font size="-2">TM</font></sup>
+ * of all JavaBeans&trade;
  * has been added to the <code>java.beans</code> package.
  * Please see {@link java.beans.XMLEncoder}.
  *
@@ -314,7 +314,7 @@
      * are currently typed to {@code JComponent}.
      * <p>
      * Please see
-     * <a href="http://java.sun.com/docs/books/tutorial/uiswing/misc/dnd.html">
+     * <a href="http://docs.oracle.com/javase/tutorial/uiswing/dnd/index.html">
      * How to Use Drag and Drop and Data Transfer</a>, a section in
      * <em>The Java Tutorial</em>, for more information.
      *
diff --git a/jdk/src/share/classes/javax/swing/KeyStroke.java b/jdk/src/share/classes/javax/swing/KeyStroke.java
index 9aaa15d..774eeb6 100644
--- a/jdk/src/share/classes/javax/swing/KeyStroke.java
+++ b/jdk/src/share/classes/javax/swing/KeyStroke.java
@@ -51,7 +51,7 @@
  * future Swing releases. The current serialization support is
  * appropriate for short term storage or RMI between applications running
  * the same version of Swing.  As of 1.4, support for long term storage
- * of all JavaBeans<sup><font size="-2">TM</font></sup>
+ * of all JavaBeans&trade;
  * has been added to the <code>java.beans</code> package.
  * Please see {@link java.beans.XMLEncoder}.
  *
diff --git a/jdk/src/share/classes/javax/swing/LookAndFeel.java b/jdk/src/share/classes/javax/swing/LookAndFeel.java
index 5b792c8..785512d 100644
--- a/jdk/src/share/classes/javax/swing/LookAndFeel.java
+++ b/jdk/src/share/classes/javax/swing/LookAndFeel.java
@@ -91,7 +91,7 @@
  * to provide a specific set of defaults. These are documented in the
  * classes that require the specific default.
  *
- * <h3><a name="#defaultRecommendation">ComponentUIs and defaults</a></h2>
+ * <h3><a name="#defaultRecommendation">ComponentUIs and defaults</a></h3>
  *
  * All {@code ComponentUIs} typically need to set various properties
  * on the {@code JComponent} the {@code ComponentUI} is providing the
@@ -590,7 +590,7 @@
      * Distinct look and feels should have different names, e.g.
      * a subclass of MotifLookAndFeel that changes the way a few components
      * are rendered should be called "CDE/Motif My Way"; something
-     * that would be useful to a user trying to select a L&F from a list
+     * that would be useful to a user trying to select a L&amp;F from a list
      * of names.
      *
      * @return short identifier for the look and feel
diff --git a/jdk/src/share/classes/javax/swing/OverlayLayout.java b/jdk/src/share/classes/javax/swing/OverlayLayout.java
index 89c47c0..6ea88c2 100644
--- a/jdk/src/share/classes/javax/swing/OverlayLayout.java
+++ b/jdk/src/share/classes/javax/swing/OverlayLayout.java
@@ -45,7 +45,7 @@
  * future Swing releases. The current serialization support is
  * appropriate for short term storage or RMI between applications running
  * the same version of Swing.  As of 1.4, support for long term storage
- * of all JavaBeans<sup><font size="-2">TM</font></sup>
+ * of all JavaBeans&trade;
  * has been added to the <code>java.beans</code> package.
  * Please see {@link java.beans.XMLEncoder}.
  *
diff --git a/jdk/src/share/classes/javax/swing/ProgressMonitor.java b/jdk/src/share/classes/javax/swing/ProgressMonitor.java
index ebfa738..72f5f57 100644
--- a/jdk/src/share/classes/javax/swing/ProgressMonitor.java
+++ b/jdk/src/share/classes/javax/swing/ProgressMonitor.java
@@ -71,7 +71,7 @@
  *
  * For further documentation and examples see
  * <a
- href="http://java.sun.com/docs/books/tutorial/uiswing/components/progress.html">How to Monitor Progress</a>,
+ href="http://docs.oracle.com/javase/tutorial/uiswing/components/progress.html">How to Monitor Progress</a>,
  * a section in <em>The Java Tutorial.</em>
  *
  * @see ProgressMonitorInputStream
diff --git a/jdk/src/share/classes/javax/swing/ProgressMonitorInputStream.java b/jdk/src/share/classes/javax/swing/ProgressMonitorInputStream.java
index 38f653b..43213c7 100644
--- a/jdk/src/share/classes/javax/swing/ProgressMonitorInputStream.java
+++ b/jdk/src/share/classes/javax/swing/ProgressMonitorInputStream.java
@@ -54,7 +54,7 @@
  * <p>
  *
  * For further documentation and examples see
- * <a href="http://java.sun.com/docs/books/tutorial/uiswing/components/progress.html">How to Monitor Progress</a>,
+ * <a href="http://docs.oracle.com/javase/tutorial/uiswing/components/progress.html">How to Monitor Progress</a>,
  * a section in <em>The Java Tutorial.</em>
  *
  * @see ProgressMonitor
diff --git a/jdk/src/share/classes/javax/swing/ScrollPaneLayout.java b/jdk/src/share/classes/javax/swing/ScrollPaneLayout.java
index 8d0ebd0..9aa581a 100644
--- a/jdk/src/share/classes/javax/swing/ScrollPaneLayout.java
+++ b/jdk/src/share/classes/javax/swing/ScrollPaneLayout.java
@@ -48,7 +48,7 @@
  * future Swing releases. The current serialization support is
  * appropriate for short term storage or RMI between applications running
  * the same version of Swing.  As of 1.4, support for long term storage
- * of all JavaBeans<sup><font size="-2">TM</font></sup>
+ * of all JavaBeans&trade;
  * has been added to the <code>java.beans</code> package.
  * Please see {@link java.beans.XMLEncoder}.
  *
diff --git a/jdk/src/share/classes/javax/swing/SizeRequirements.java b/jdk/src/share/classes/javax/swing/SizeRequirements.java
index a1def55..aa03f55 100644
--- a/jdk/src/share/classes/javax/swing/SizeRequirements.java
+++ b/jdk/src/share/classes/javax/swing/SizeRequirements.java
@@ -81,7 +81,7 @@
  * future Swing releases. The current serialization support is
  * appropriate for short term storage or RMI between applications running
  * the same version of Swing.  As of 1.4, support for long term storage
- * of all JavaBeans<sup><font size="-2">TM</font></sup>
+ * of all JavaBeans&trade;
  * has been added to the <code>java.beans</code> package.
  * Please see {@link java.beans.XMLEncoder}.
  *
diff --git a/jdk/src/share/classes/javax/swing/Spring.java b/jdk/src/share/classes/javax/swing/Spring.java
index 8da77ff..2b18313 100644
--- a/jdk/src/share/classes/javax/swing/Spring.java
+++ b/jdk/src/share/classes/javax/swing/Spring.java
@@ -109,7 +109,7 @@
  * If you are implementing a <code>SpringLayout</code> you
  * can find further information and examples in
  * <a
- href="http://java.sun.com/docs/books/tutorial/uiswing/layout/spring.html">How to Use SpringLayout</a>,
+ href="http://docs.oracle.com/javase/tutorial/uiswing/layout/spring.html">How to Use SpringLayout</a>,
  * a section in <em>The Java Tutorial.</em>
  * <p>
  * <strong>Warning:</strong>
@@ -117,7 +117,7 @@
  * future Swing releases. The current serialization support is
  * appropriate for short term storage or RMI between applications running
  * the same version of Swing.  As of 1.4, support for long term storage
- * of all JavaBeans<sup><font size="-2">TM</font></sup>
+ * of all JavaBeans&trade;
  * has been added to the <code>java.beans</code> package.
  * Please see {@link java.beans.XMLEncoder}.
  *
diff --git a/jdk/src/share/classes/javax/swing/SpringLayout.java b/jdk/src/share/classes/javax/swing/SpringLayout.java
index 72de456..699a9ce 100644
--- a/jdk/src/share/classes/javax/swing/SpringLayout.java
+++ b/jdk/src/share/classes/javax/swing/SpringLayout.java
@@ -36,7 +36,7 @@
 /**
  * A <code>SpringLayout</code> lays out the children of its associated container
  * according to a set of constraints.
- * See <a href="http://java.sun.com/docs/books/tutorial/uiswing/layout/spring.html">How to Use SpringLayout</a>
+ * See <a href="http://docs.oracle.com/javase/tutorial/uiswing/layout/spring.html">How to Use SpringLayout</a>
  * in <em>The Java Tutorial</em> for examples of using
  * <code>SpringLayout</code>.
  *
@@ -172,7 +172,7 @@
  * future Swing releases. The current serialization support is
  * appropriate for short term storage or RMI between applications running
  * the same version of Swing.  As of 1.4, support for long term storage
- * of all JavaBeans<sup><font size="-2">TM</font></sup>
+ * of all JavaBeans&trade;
  * has been added to the <code>java.beans</code> package.
  * Please see {@link java.beans.XMLEncoder}.
  *
diff --git a/jdk/src/share/classes/javax/swing/SwingUtilities.java b/jdk/src/share/classes/javax/swing/SwingUtilities.java
index 6bb308d..28d1f19 100644
--- a/jdk/src/share/classes/javax/swing/SwingUtilities.java
+++ b/jdk/src/share/classes/javax/swing/SwingUtilities.java
@@ -1280,7 +1280,7 @@
      * <p>
      * Additional documentation and examples for this method can be
      * found in
-     * <A HREF="http://download.oracle.com/javase/tutorial/uiswing/concurrency/index.html">Concurrency in Swing</a>.
+     * <A HREF="http://docs.oracle.com/javase/tutorial/uiswing/concurrency/index.html">Concurrency in Swing</a>.
      * <p>
      * As of 1.3 this method is just a cover for <code>java.awt.EventQueue.invokeLater()</code>.
      * <p>
@@ -1331,7 +1331,7 @@
      * <p>
      * Additional documentation and examples for this method can be
      * found in
-     * <A HREF="http://download.oracle.com/javase/tutorial/uiswing/concurrency/index.html">Concurrency in Swing</a>.
+     * <A HREF="http://docs.oracle.com/javase/tutorial/uiswing/concurrency/index.html">Concurrency in Swing</a>.
      * <p>
      * As of 1.3 this method is just a cover for
      * <code>java.awt.EventQueue.invokeAndWait()</code>.
diff --git a/jdk/src/share/classes/javax/swing/SwingWorker.java b/jdk/src/share/classes/javax/swing/SwingWorker.java
index f7b343d..5775bcb 100644
--- a/jdk/src/share/classes/javax/swing/SwingWorker.java
+++ b/jdk/src/share/classes/javax/swing/SwingWorker.java
@@ -50,7 +50,7 @@
  * When writing a multi-threaded application using Swing, there are
  * two constraints to keep in mind:
  * (refer to
- * <a href="http://download.oracle.com/javase/tutorial/uiswing/concurrency/index.html">
+ * <a href="http://docs.oracle.com/javase/tutorial/uiswing/concurrency/index.html">
  *   Concurrency in Swing
  * </a> for more details):
  * <ul>
diff --git a/jdk/src/share/classes/javax/swing/Timer.java b/jdk/src/share/classes/javax/swing/Timer.java
index e938a9d..e6e0430 100644
--- a/jdk/src/share/classes/javax/swing/Timer.java
+++ b/jdk/src/share/classes/javax/swing/Timer.java
@@ -121,7 +121,7 @@
  * <p>
  * You can find further documentation
  * and several examples of using timers by visiting
- * <a href="http://java.sun.com/docs/books/tutorial/uiswing/misc/timer.html"
+ * <a href="http://docs.oracle.com/javase/tutorial/uiswing/misc/timer.html"
  * target = "_top">How to Use Timers</a>,
  * a section in <em>The Java Tutorial.</em>
  * For more examples and help in choosing between
@@ -137,7 +137,7 @@
  * future Swing releases. The current serialization support is
  * appropriate for short term storage or RMI between applications running
  * the same version of Swing.  As of 1.4, support for long term storage
- * of all JavaBeans<sup><font size="-2">TM</font></sup>
+ * of all JavaBeans&trade;
  * has been added to the <code>java.beans</code> package.
  * Please see {@link java.beans.XMLEncoder}.
  *
diff --git a/jdk/src/share/classes/javax/swing/TransferHandler.java b/jdk/src/share/classes/javax/swing/TransferHandler.java
index b169a8e..016dd98 100644
--- a/jdk/src/share/classes/javax/swing/TransferHandler.java
+++ b/jdk/src/share/classes/javax/swing/TransferHandler.java
@@ -75,7 +75,7 @@
  * of the transfer, and <code>setForeground</code> for the target of a transfer.
  * <p>
  * Please see
- * <a href="http://java.sun.com/docs/books/tutorial/uiswing/misc/dnd.html">
+ * <a href="http://docs.oracle.com/javase/tutorial/uiswing/dnd/index.html">
  * How to Use Drag and Drop and Data Transfer</a>,
  * a section in <em>The Java Tutorial</em>, for more information.
  *
diff --git a/jdk/src/share/classes/javax/swing/UIDefaults.java b/jdk/src/share/classes/javax/swing/UIDefaults.java
index 51cbd9c..4812caa 100644
--- a/jdk/src/share/classes/javax/swing/UIDefaults.java
+++ b/jdk/src/share/classes/javax/swing/UIDefaults.java
@@ -64,7 +64,7 @@
  * future Swing releases. The current serialization support is
  * appropriate for short term storage or RMI between applications running
  * the same version of Swing.  As of 1.4, support for long term storage
- * of all JavaBeans<sup><font size="-2">TM</font></sup>
+ * of all JavaBeans&trade;
  * has been added to the <code>java.beans</code> package.
  * Please see {@link java.beans.XMLEncoder}.
  *
diff --git a/jdk/src/share/classes/javax/swing/UIManager.java b/jdk/src/share/classes/javax/swing/UIManager.java
index 17a7b9e..2ea4bdc 100644
--- a/jdk/src/share/classes/javax/swing/UIManager.java
+++ b/jdk/src/share/classes/javax/swing/UIManager.java
@@ -167,7 +167,7 @@
  * future Swing releases. The current serialization support is
  * appropriate for short term storage or RMI between applications running
  * the same version of Swing.  As of 1.4, support for long term storage
- * of all JavaBeans<sup><font size="-2">TM</font></sup>
+ * of all JavaBeans&trade;
  * has been added to the <code>java.beans</code> package.
  * Please see {@link java.beans.XMLEncoder}.
  *
diff --git a/jdk/src/share/classes/javax/swing/UnsupportedLookAndFeelException.java b/jdk/src/share/classes/javax/swing/UnsupportedLookAndFeelException.java
index 3ebf757..0ff3296 100644
--- a/jdk/src/share/classes/javax/swing/UnsupportedLookAndFeelException.java
+++ b/jdk/src/share/classes/javax/swing/UnsupportedLookAndFeelException.java
@@ -33,7 +33,7 @@
  * future Swing releases. The current serialization support is
  * appropriate for short term storage or RMI between applications running
  * the same version of Swing.  As of 1.4, support for long term storage
- * of all JavaBeans<sup><font size="-2">TM</font></sup>
+ * of all JavaBeans&trade;
  * has been added to the <code>java.beans</code> package.
  * Please see {@link java.beans.XMLEncoder}.
  *
diff --git a/jdk/src/share/classes/javax/swing/ViewportLayout.java b/jdk/src/share/classes/javax/swing/ViewportLayout.java
index b72c37d..aeac642 100644
--- a/jdk/src/share/classes/javax/swing/ViewportLayout.java
+++ b/jdk/src/share/classes/javax/swing/ViewportLayout.java
@@ -50,7 +50,7 @@
  * future Swing releases. The current serialization support is
  * appropriate for short term storage or RMI between applications running
  * the same version of Swing.  As of 1.4, support for long term storage
- * of all JavaBeans<sup><font size="-2">TM</font></sup>
+ * of all JavaBeans&trade;
  * has been added to the <code>java.beans</code> package.
  * Please see {@link java.beans.XMLEncoder}.
  *
diff --git a/jdk/src/share/classes/javax/swing/WindowConstants.java b/jdk/src/share/classes/javax/swing/WindowConstants.java
index c82fc41..0523758 100644
--- a/jdk/src/share/classes/javax/swing/WindowConstants.java
+++ b/jdk/src/share/classes/javax/swing/WindowConstants.java
@@ -36,7 +36,7 @@
  * use these constants.
  * For examples of setting the default window-closing operation, see
  * <a
- href="http://java.sun.com/docs/books/tutorial/uiswing/components/frame.html#windowevents">Responding to Window-Closing Events</a>,
+ href="http://docs.oracle.com/javase/tutorial/uiswing/components/frame.html#windowevents">Responding to Window-Closing Events</a>,
  * a section in <em>The Java Tutorial</em>.
  * @see JFrame#setDefaultCloseOperation(int)
  * @see JDialog#setDefaultCloseOperation(int)
diff --git a/jdk/src/share/classes/javax/swing/border/AbstractBorder.java b/jdk/src/share/classes/javax/swing/border/AbstractBorder.java
index e1d19fe..ee7ee28 100644
--- a/jdk/src/share/classes/javax/swing/border/AbstractBorder.java
+++ b/jdk/src/share/classes/javax/swing/border/AbstractBorder.java
@@ -40,7 +40,7 @@
  * future Swing releases. The current serialization support is
  * appropriate for short term storage or RMI between applications running
  * the same version of Swing.  As of 1.4, support for long term storage
- * of all JavaBeans<sup><font size="-2">TM</font></sup>
+ * of all JavaBeans&trade;
  * has been added to the <code>java.beans</code> package.
  * Please see {@link java.beans.XMLEncoder}.
  *
diff --git a/jdk/src/share/classes/javax/swing/border/BevelBorder.java b/jdk/src/share/classes/javax/swing/border/BevelBorder.java
index cb056eb..659bd7f 100644
--- a/jdk/src/share/classes/javax/swing/border/BevelBorder.java
+++ b/jdk/src/share/classes/javax/swing/border/BevelBorder.java
@@ -38,7 +38,7 @@
  * future Swing releases. The current serialization support is
  * appropriate for short term storage or RMI between applications running
  * the same version of Swing.  As of 1.4, support for long term storage
- * of all JavaBeans<sup><font size="-2">TM</font></sup>
+ * of all JavaBeans&trade;
  * has been added to the <code>java.beans</code> package.
  * Please see {@link java.beans.XMLEncoder}.
  *
diff --git a/jdk/src/share/classes/javax/swing/border/Border.java b/jdk/src/share/classes/javax/swing/border/Border.java
index ea73b4a..2e1d6c7 100644
--- a/jdk/src/share/classes/javax/swing/border/Border.java
+++ b/jdk/src/share/classes/javax/swing/border/Border.java
@@ -33,7 +33,7 @@
  * Interface describing an object capable of rendering a border
  * around the edges of a swing component.
  * For examples of using borders see
- * <a href="http://java.sun.com/docs/books/tutorial/uiswing/misc/border.html">How to Use Borders</a>,
+ * <a href="http://docs.oracle.com/javase/tutorial/uiswing/components/border.htmll">How to Use Borders</a>,
  * a section in <em>The Java Tutorial.</em>
  * <p>
  * In the Swing component set, borders supercede Insets as the
diff --git a/jdk/src/share/classes/javax/swing/border/CompoundBorder.java b/jdk/src/share/classes/javax/swing/border/CompoundBorder.java
index 56371a4..f1a6d85 100644
--- a/jdk/src/share/classes/javax/swing/border/CompoundBorder.java
+++ b/jdk/src/share/classes/javax/swing/border/CompoundBorder.java
@@ -37,18 +37,18 @@
  * For example, this class may be used to add blank margin space
  * to a component with an existing decorative border:
  * <p>
- * <code><pre>
+ * <pre>
  *    Border border = comp.getBorder();
  *    Border margin = new EmptyBorder(10,10,10,10);
  *    comp.setBorder(new CompoundBorder(border, margin));
- * </pre></code>
+ * </pre>
  * <p>
  * <strong>Warning:</strong>
  * Serialized objects of this class will not be compatible with
  * future Swing releases. The current serialization support is
  * appropriate for short term storage or RMI between applications running
  * the same version of Swing.  As of 1.4, support for long term storage
- * of all JavaBeans<sup><font size="-2">TM</font></sup>
+ * of all JavaBeans&trade;
  * has been added to the <code>java.beans</code> package.
  * Please see {@link java.beans.XMLEncoder}.
  *
diff --git a/jdk/src/share/classes/javax/swing/border/EmptyBorder.java b/jdk/src/share/classes/javax/swing/border/EmptyBorder.java
index a1b74c3..cc8da3a 100644
--- a/jdk/src/share/classes/javax/swing/border/EmptyBorder.java
+++ b/jdk/src/share/classes/javax/swing/border/EmptyBorder.java
@@ -40,7 +40,7 @@
  * future Swing releases. The current serialization support is
  * appropriate for short term storage or RMI between applications running
  * the same version of Swing.  As of 1.4, support for long term storage
- * of all JavaBeans<sup><font size="-2">TM</font></sup>
+ * of all JavaBeans&trade;
  * has been added to the <code>java.beans</code> package.
  * Please see {@link java.beans.XMLEncoder}.
  *
diff --git a/jdk/src/share/classes/javax/swing/border/EtchedBorder.java b/jdk/src/share/classes/javax/swing/border/EtchedBorder.java
index b7d72c9..3bb5c7e 100644
--- a/jdk/src/share/classes/javax/swing/border/EtchedBorder.java
+++ b/jdk/src/share/classes/javax/swing/border/EtchedBorder.java
@@ -44,7 +44,7 @@
  * future Swing releases. The current serialization support is
  * appropriate for short term storage or RMI between applications running
  * the same version of Swing.  As of 1.4, support for long term storage
- * of all JavaBeans<sup><font size="-2">TM</font></sup>
+ * of all JavaBeans&trade;
  * has been added to the <code>java.beans</code> package.
  * Please see {@link java.beans.XMLEncoder}.
  *
diff --git a/jdk/src/share/classes/javax/swing/border/LineBorder.java b/jdk/src/share/classes/javax/swing/border/LineBorder.java
index 980b0da..8d7abb9 100644
--- a/jdk/src/share/classes/javax/swing/border/LineBorder.java
+++ b/jdk/src/share/classes/javax/swing/border/LineBorder.java
@@ -44,7 +44,7 @@
  * future Swing releases. The current serialization support is
  * appropriate for short term storage or RMI between applications running
  * the same version of Swing.  As of 1.4, support for long term storage
- * of all JavaBeans<sup><font size="-2">TM</font></sup>
+ * of all JavaBeans&trade;
  * has been added to the <code>java.beans</code> package.
  * Please see {@link java.beans.XMLEncoder}.
  *
diff --git a/jdk/src/share/classes/javax/swing/border/MatteBorder.java b/jdk/src/share/classes/javax/swing/border/MatteBorder.java
index 80d49a7..53eaefa 100644
--- a/jdk/src/share/classes/javax/swing/border/MatteBorder.java
+++ b/jdk/src/share/classes/javax/swing/border/MatteBorder.java
@@ -40,7 +40,7 @@
  * future Swing releases. The current serialization support is
  * appropriate for short term storage or RMI between applications running
  * the same version of Swing.  As of 1.4, support for long term storage
- * of all JavaBeans<sup><font size="-2">TM</font></sup>
+ * of all JavaBeans&trade;
  * has been added to the <code>java.beans</code> package.
  * Please see {@link java.beans.XMLEncoder}.
  *
diff --git a/jdk/src/share/classes/javax/swing/border/SoftBevelBorder.java b/jdk/src/share/classes/javax/swing/border/SoftBevelBorder.java
index b23c13c..d11b420 100644
--- a/jdk/src/share/classes/javax/swing/border/SoftBevelBorder.java
+++ b/jdk/src/share/classes/javax/swing/border/SoftBevelBorder.java
@@ -40,7 +40,7 @@
  * future Swing releases. The current serialization support is
  * appropriate for short term storage or RMI between applications running
  * the same version of Swing.  As of 1.4, support for long term storage
- * of all JavaBeans<sup><font size="-2">TM</font></sup>
+ * of all JavaBeans&trade;
  * has been added to the <code>java.beans</code> package.
  * Please see {@link java.beans.XMLEncoder}.
  *
diff --git a/jdk/src/share/classes/javax/swing/border/TitledBorder.java b/jdk/src/share/classes/javax/swing/border/TitledBorder.java
index 244a45b..0eec042 100644
--- a/jdk/src/share/classes/javax/swing/border/TitledBorder.java
+++ b/jdk/src/share/classes/javax/swing/border/TitledBorder.java
@@ -60,7 +60,7 @@
  * future Swing releases. The current serialization support is
  * appropriate for short term storage or RMI between applications running
  * the same version of Swing.  As of 1.4, support for long term storage
- * of all JavaBeans<sup><font size="-2">TM</font></sup>
+ * of all JavaBeans&trade;
  * has been added to the <code>java.beans</code> package.
  * Please see {@link java.beans.XMLEncoder}.
  *
diff --git a/jdk/src/share/classes/javax/swing/colorchooser/AbstractColorChooserPanel.java b/jdk/src/share/classes/javax/swing/colorchooser/AbstractColorChooserPanel.java
index 99a20e3..58b5946 100644
--- a/jdk/src/share/classes/javax/swing/colorchooser/AbstractColorChooserPanel.java
+++ b/jdk/src/share/classes/javax/swing/colorchooser/AbstractColorChooserPanel.java
@@ -40,7 +40,7 @@
  * future Swing releases. The current serialization support is
  * appropriate for short term storage or RMI between applications running
  * the same version of Swing.  As of 1.4, support for long term storage
- * of all JavaBeans<sup><font size="-2">TM</font></sup>
+ * of all JavaBeans&trade;
  * has been added to the <code>java.beans</code> package.
  * Please see {@link java.beans.XMLEncoder}.
  *
@@ -85,7 +85,7 @@
     /**
      * Provides a hint to the look and feel as to the
      * <code>KeyEvent.VK</code> constant that can be used as a mnemonic to
-     * access the panel. A return value <= 0 indicates there is no mnemonic.
+     * access the panel. A return value &lt;= 0 indicates there is no mnemonic.
      * <p>
      * The return value here is a hint, it is ultimately up to the look
      * and feel to honor the return value in some meaningful way.
@@ -94,7 +94,7 @@
      * <code>AbstractColorChooserPanel</code> does not support a mnemonic,
      * subclasses wishing a mnemonic will need to override this.
      *
-     * @return KeyEvent.VK constant identifying the mnemonic; <= 0 for no
+     * @return KeyEvent.VK constant identifying the mnemonic; &lt;= 0 for no
      *         mnemonic
      * @see #getDisplayedMnemonicIndex
      * @since 1.4
@@ -107,7 +107,7 @@
      * Provides a hint to the look and feel as to the index of the character in
      * <code>getDisplayName</code> that should be visually identified as the
      * mnemonic. The look and feel should only use this if
-     * <code>getMnemonic</code> returns a value > 0.
+     * <code>getMnemonic</code> returns a value &gt; 0.
      * <p>
      * The return value here is a hint, it is ultimately up to the look
      * and feel to honor the return value in some meaningful way. For example,
diff --git a/jdk/src/share/classes/javax/swing/colorchooser/ColorChooserComponentFactory.java b/jdk/src/share/classes/javax/swing/colorchooser/ColorChooserComponentFactory.java
index 67eac20..ef3f401 100644
--- a/jdk/src/share/classes/javax/swing/colorchooser/ColorChooserComponentFactory.java
+++ b/jdk/src/share/classes/javax/swing/colorchooser/ColorChooserComponentFactory.java
@@ -37,7 +37,7 @@
  * future Swing releases. The current serialization support is
  * appropriate for short term storage or RMI between applications running
  * the same version of Swing.  As of 1.4, support for long term storage
- * of all JavaBeans<sup><font size="-2">TM</font></sup>
+ * of all JavaBeans&trade;
  * has been added to the <code>java.beans</code> package.
  * Please see {@link java.beans.XMLEncoder}.
  *
diff --git a/jdk/src/share/classes/javax/swing/colorchooser/DefaultPreviewPanel.java b/jdk/src/share/classes/javax/swing/colorchooser/DefaultPreviewPanel.java
index fa1a670..55bdf41 100644
--- a/jdk/src/share/classes/javax/swing/colorchooser/DefaultPreviewPanel.java
+++ b/jdk/src/share/classes/javax/swing/colorchooser/DefaultPreviewPanel.java
@@ -46,7 +46,7 @@
  * future Swing releases. The current serialization support is
  * appropriate for short term storage or RMI between applications running
  * the same version of Swing.  As of 1.4, support for long term storage
- * of all JavaBeans<sup><font size="-2">TM</font></sup>
+ * of all JavaBeans&trade;
  * has been added to the <code>java.beans</code> package.
  * Please see {@link java.beans.XMLEncoder}.
  *
diff --git a/jdk/src/share/classes/javax/swing/colorchooser/DefaultSwatchChooserPanel.java b/jdk/src/share/classes/javax/swing/colorchooser/DefaultSwatchChooserPanel.java
index 564a085..6fdcf42 100644
--- a/jdk/src/share/classes/javax/swing/colorchooser/DefaultSwatchChooserPanel.java
+++ b/jdk/src/share/classes/javax/swing/colorchooser/DefaultSwatchChooserPanel.java
@@ -45,7 +45,7 @@
  * future Swing releases. The current serialization support is
  * appropriate for short term storage or RMI between applications running
  * the same version of Swing.  As of 1.4, support for long term storage
- * of all JavaBeans<sup><font size="-2">TM</font></sup>
+ * of all JavaBeans&trade;
  * has been added to the <code>java.beans</code> package.
  * Please see {@link java.beans.XMLEncoder}.
  *
diff --git a/jdk/src/share/classes/javax/swing/event/AncestorEvent.java b/jdk/src/share/classes/javax/swing/event/AncestorEvent.java
index c166c19..0234d3e 100644
--- a/jdk/src/share/classes/javax/swing/event/AncestorEvent.java
+++ b/jdk/src/share/classes/javax/swing/event/AncestorEvent.java
@@ -37,7 +37,7 @@
  * future Swing releases. The current serialization support is
  * appropriate for short term storage or RMI between applications running
  * the same version of Swing.  As of 1.4, support for long term storage
- * of all JavaBeans<sup><font size="-2">TM</font></sup>
+ * of all JavaBeans&trade;
  * has been added to the <code>java.beans</code> package.
  * Please see {@link java.beans.XMLEncoder}.
  *
diff --git a/jdk/src/share/classes/javax/swing/event/CaretEvent.java b/jdk/src/share/classes/javax/swing/event/CaretEvent.java
index 7b47eb3..049ec5b 100644
--- a/jdk/src/share/classes/javax/swing/event/CaretEvent.java
+++ b/jdk/src/share/classes/javax/swing/event/CaretEvent.java
@@ -36,7 +36,7 @@
  * future Swing releases. The current serialization support is
  * appropriate for short term storage or RMI between applications running
  * the same version of Swing.  As of 1.4, support for long term storage
- * of all JavaBeans<sup><font size="-2">TM</font></sup>
+ * of all JavaBeans&trade;
  * has been added to the <code>java.beans</code> package.
  * Please see {@link java.beans.XMLEncoder}.
  *
@@ -56,7 +56,7 @@
     /**
      * Fetches the location of the caret.
      *
-     * @return the dot >= 0
+     * @return the dot &gt;= 0
      */
     public abstract int getDot();
 
@@ -65,7 +65,7 @@
      * selection.  If there is no selection, this
      * will be the same as dot.
      *
-     * @return the mark >= 0
+     * @return the mark &gt;= 0
      */
     public abstract int getMark();
 }
diff --git a/jdk/src/share/classes/javax/swing/event/ChangeEvent.java b/jdk/src/share/classes/javax/swing/event/ChangeEvent.java
index 7c351c4..4e93c29 100644
--- a/jdk/src/share/classes/javax/swing/event/ChangeEvent.java
+++ b/jdk/src/share/classes/javax/swing/event/ChangeEvent.java
@@ -36,7 +36,7 @@
  * future Swing releases. The current serialization support is
  * appropriate for short term storage or RMI between applications running
  * the same version of Swing.  As of 1.4, support for long term storage
- * of all JavaBeans<sup><font size="-2">TM</font></sup>
+ * of all JavaBeans&trade;
  * has been added to the <code>java.beans</code> package.
  * Please see {@link java.beans.XMLEncoder}.
  *
diff --git a/jdk/src/share/classes/javax/swing/event/DocumentEvent.java b/jdk/src/share/classes/javax/swing/event/DocumentEvent.java
index 707e698..9c9c796 100644
--- a/jdk/src/share/classes/javax/swing/event/DocumentEvent.java
+++ b/jdk/src/share/classes/javax/swing/event/DocumentEvent.java
@@ -45,14 +45,14 @@
      * Returns the offset within the document of the start
      * of the change.
      *
-     * @return the offset >= 0
+     * @return the offset &gt;= 0
      */
     public int getOffset();
 
     /**
      * Returns the length of the change.
      *
-     * @return the length >= 0
+     * @return the length &gt;= 0
      */
     public int getLength();
 
@@ -155,7 +155,7 @@
          * This is the location that children were added
          * and/or removed.
          *
-         * @return the index >= 0
+         * @return the index &gt;= 0
          */
         public int getIndex();
 
diff --git a/jdk/src/share/classes/javax/swing/event/EventListenerList.java b/jdk/src/share/classes/javax/swing/event/EventListenerList.java
index 237bf20..2d1e9ab 100644
--- a/jdk/src/share/classes/javax/swing/event/EventListenerList.java
+++ b/jdk/src/share/classes/javax/swing/event/EventListenerList.java
@@ -69,7 +69,7 @@
  *     Object[] listeners = listenerList.getListenerList();
  *     // Process the listeners last to first, notifying
  *     // those that are interested in this event
- *     for (int i = listeners.length-2; i>=0; i-=2) {
+ *     for (int i = listeners.length-2; i&gt;=0; i-=2) {
  *         if (listeners[i]==FooListener.class) {
  *             // Lazily create the event:
  *             if (fooEvent == null)
@@ -88,7 +88,7 @@
  * future Swing releases. The current serialization support is
  * appropriate for short term storage or RMI between applications running
  * the same version of Swing.  As of 1.4, support for long term storage
- * of all JavaBeans<sup><font size="-2">TM</font></sup>
+ * of all JavaBeans&trade;
  * has been added to the <code>java.beans</code> package.
  * Please see {@link java.beans.XMLEncoder}.
  *
diff --git a/jdk/src/share/classes/javax/swing/event/HyperlinkEvent.java b/jdk/src/share/classes/javax/swing/event/HyperlinkEvent.java
index f0e53d7..004038a 100644
--- a/jdk/src/share/classes/javax/swing/event/HyperlinkEvent.java
+++ b/jdk/src/share/classes/javax/swing/event/HyperlinkEvent.java
@@ -39,7 +39,7 @@
  * future Swing releases. The current serialization support is
  * appropriate for short term storage or RMI between applications running
  * the same version of Swing.  As of 1.4, support for long term storage
- * of all JavaBeans<sup><font size="-2">TM</font></sup>
+ * of all JavaBeans&trade;
  * has been added to the <code>java.beans</code> package.
  * Please see {@link java.beans.XMLEncoder}.
  *
diff --git a/jdk/src/share/classes/javax/swing/event/InternalFrameAdapter.java b/jdk/src/share/classes/javax/swing/event/InternalFrameAdapter.java
index 986d4c2..6ab9047 100644
--- a/jdk/src/share/classes/javax/swing/event/InternalFrameAdapter.java
+++ b/jdk/src/share/classes/javax/swing/event/InternalFrameAdapter.java
@@ -31,7 +31,7 @@
  * convenience for creating listener objects, and is functionally
  * equivalent to the WindowAdapter class in the AWT.
  * <p>
- * See <a href="http://java.sun.com/docs/books/tutorial/uiswing/events/internalframelistener.html">How to Write an Internal Frame Listener</a>
+ * See <a href="http://docs.oracle.com/javase/tutorial/uiswing/events/internalframelistener.html">How to Write an Internal Frame Listener</a>
  * in <em>The Java Tutorial</em>
  *
  * @see InternalFrameEvent
diff --git a/jdk/src/share/classes/javax/swing/event/InternalFrameEvent.java b/jdk/src/share/classes/javax/swing/event/InternalFrameEvent.java
index 9c2341d..f061581 100644
--- a/jdk/src/share/classes/javax/swing/event/InternalFrameEvent.java
+++ b/jdk/src/share/classes/javax/swing/event/InternalFrameEvent.java
@@ -34,7 +34,7 @@
  * although different IDs are used.
  * Help on handling internal frame events
  * is in
- * <a href="http://java.sun.com/docs/books/tutorial/uiswing/events/internalframelistener.html" target="_top">How to Write an Internal Frame Listener</a>,
+ * <a href="http://docs.oracle.com/javase/tutorial/uiswing/events/internalframelistener.html" target="_top">How to Write an Internal Frame Listener</a>,
  * a section in <em>The Java Tutorial</em>.
  * <p>
  * <strong>Warning:</strong>
@@ -42,7 +42,7 @@
  * future Swing releases. The current serialization support is
  * appropriate for short term storage or RMI between applications running
  * the same version of Swing.  As of 1.4, support for long term storage
- * of all JavaBeans<sup><font size="-2">TM</font></sup>
+ * of all JavaBeans&trade;
  * has been added to the <code>java.beans</code> package.
  * Please see {@link java.beans.XMLEncoder}.
  *
diff --git a/jdk/src/share/classes/javax/swing/event/InternalFrameListener.java b/jdk/src/share/classes/javax/swing/event/InternalFrameListener.java
index 823cad7..bf04ee2 100644
--- a/jdk/src/share/classes/javax/swing/event/InternalFrameListener.java
+++ b/jdk/src/share/classes/javax/swing/event/InternalFrameListener.java
@@ -32,7 +32,7 @@
  * This class is functionally equivalent to the WindowListener class
  * in the AWT.
  * <p>
- * See <a href="http://java.sun.com/docs/books/tutorial/uiswing/events/internalframelistener.html">How to Write an Internal Frame Listener</a>
+ * See <a href="http://docs.oracle.com/javase/tutorial/uiswing/events/internalframelistener.html">How to Write an Internal Frame Listener</a>
  * in <em>The Java Tutorial</em> for further documentation.
  *
  * @see java.awt.event.WindowListener
diff --git a/jdk/src/share/classes/javax/swing/event/ListDataEvent.java b/jdk/src/share/classes/javax/swing/event/ListDataEvent.java
index 3ccf01e..05f0ccd 100644
--- a/jdk/src/share/classes/javax/swing/event/ListDataEvent.java
+++ b/jdk/src/share/classes/javax/swing/event/ListDataEvent.java
@@ -36,7 +36,7 @@
  * future Swing releases. The current serialization support is
  * appropriate for short term storage or RMI between applications running
  * the same version of Swing.  As of 1.4, support for long term storage
- * of all JavaBeans<sup><font size="-2">TM</font></sup>
+ * of all JavaBeans&trade;
  * has been added to the <code>java.beans</code> package.
  * Please see {@link java.beans.XMLEncoder}.
  *
@@ -85,9 +85,9 @@
     public int getIndex1() { return index1; }
 
     /**
-     * Constructs a ListDataEvent object. If index0 is >
+     * Constructs a ListDataEvent object. If index0 is &gt;
      * index1, index0 and index1 will be swapped such that
-     * index0 will always be <= index1.
+     * index0 will always be &lt;= index1.
      *
      * @param source  the source Object (typically <code>this</code>)
      * @param type    an int specifying {@link #CONTENTS_CHANGED},
diff --git a/jdk/src/share/classes/javax/swing/event/ListSelectionEvent.java b/jdk/src/share/classes/javax/swing/event/ListSelectionEvent.java
index 41f2f3c..adbb2c8 100644
--- a/jdk/src/share/classes/javax/swing/event/ListSelectionEvent.java
+++ b/jdk/src/share/classes/javax/swing/event/ListSelectionEvent.java
@@ -42,7 +42,7 @@
  * future Swing releases. The current serialization support is
  * appropriate for short term storage or RMI between applications running
  * the same version of Swing.  As of 1.4, support for long term storage
- * of all JavaBeans<sup><font size="-2">TM</font></sup>
+ * of all JavaBeans&trade;
  * has been added to the <code>java.beans</code> package.
  * Please see {@link java.beans.XMLEncoder}.
  *
diff --git a/jdk/src/share/classes/javax/swing/event/MenuDragMouseEvent.java b/jdk/src/share/classes/javax/swing/event/MenuDragMouseEvent.java
index 905e76d..d2fcea6 100644
--- a/jdk/src/share/classes/javax/swing/event/MenuDragMouseEvent.java
+++ b/jdk/src/share/classes/javax/swing/event/MenuDragMouseEvent.java
@@ -41,7 +41,7 @@
  * future Swing releases. The current serialization support is
  * appropriate for short term storage or RMI between applications running
  * the same version of Swing.  As of 1.4, support for long term storage
- * of all JavaBeans<sup><font size="-2">TM</font></sup>
+ * of all JavaBeans&trade;
  * has been added to the <code>java.beans</code> package.
  * Please see {@link java.beans.XMLEncoder}.
  *
diff --git a/jdk/src/share/classes/javax/swing/event/MenuEvent.java b/jdk/src/share/classes/javax/swing/event/MenuEvent.java
index a506199..a88c6b1 100644
--- a/jdk/src/share/classes/javax/swing/event/MenuEvent.java
+++ b/jdk/src/share/classes/javax/swing/event/MenuEvent.java
@@ -37,7 +37,7 @@
  * future Swing releases. The current serialization support is
  * appropriate for short term storage or RMI between applications running
  * the same version of Swing.  As of 1.4, support for long term storage
- * of all JavaBeans<sup><font size="-2">TM</font></sup>
+ * of all JavaBeans&trade;
  * has been added to the <code>java.beans</code> package.
  * Please see {@link java.beans.XMLEncoder}.
  *
diff --git a/jdk/src/share/classes/javax/swing/event/MenuKeyEvent.java b/jdk/src/share/classes/javax/swing/event/MenuKeyEvent.java
index c932873..3575352 100644
--- a/jdk/src/share/classes/javax/swing/event/MenuKeyEvent.java
+++ b/jdk/src/share/classes/javax/swing/event/MenuKeyEvent.java
@@ -41,7 +41,7 @@
  * future Swing releases. The current serialization support is
  * appropriate for short term storage or RMI between applications running
  * the same version of Swing.  As of 1.4, support for long term storage
- * of all JavaBeans<sup><font size="-2">TM</font></sup>
+ * of all JavaBeans&trade;
  * has been added to the <code>java.beans</code> package.
  * Please see {@link java.beans.XMLEncoder}.
  *
diff --git a/jdk/src/share/classes/javax/swing/event/PopupMenuEvent.java b/jdk/src/share/classes/javax/swing/event/PopupMenuEvent.java
index ee1b28e..695f858 100644
--- a/jdk/src/share/classes/javax/swing/event/PopupMenuEvent.java
+++ b/jdk/src/share/classes/javax/swing/event/PopupMenuEvent.java
@@ -35,7 +35,7 @@
  * future Swing releases. The current serialization support is
  * appropriate for short term storage or RMI between applications running
  * the same version of Swing.  As of 1.4, support for long term storage
- * of all JavaBeans<sup><font size="-2">TM</font></sup>
+ * of all JavaBeans&trade;
  * has been added to the <code>java.beans</code> package.
  * Please see {@link java.beans.XMLEncoder}.
  *
diff --git a/jdk/src/share/classes/javax/swing/event/TableColumnModelEvent.java b/jdk/src/share/classes/javax/swing/event/TableColumnModelEvent.java
index 1f895c3..18f72a0 100644
--- a/jdk/src/share/classes/javax/swing/event/TableColumnModelEvent.java
+++ b/jdk/src/share/classes/javax/swing/event/TableColumnModelEvent.java
@@ -38,7 +38,7 @@
  * future Swing releases. The current serialization support is
  * appropriate for short term storage or RMI between applications running
  * the same version of Swing.  As of 1.4, support for long term storage
- * of all JavaBeans<sup><font size="-2">TM</font></sup>
+ * of all JavaBeans&trade;
  * has been added to the <code>java.beans</code> package.
  * Please see {@link java.beans.XMLEncoder}.
  *
diff --git a/jdk/src/share/classes/javax/swing/event/TableModelEvent.java b/jdk/src/share/classes/javax/swing/event/TableModelEvent.java
index 90ffa77..038ccb3 100644
--- a/jdk/src/share/classes/javax/swing/event/TableModelEvent.java
+++ b/jdk/src/share/classes/javax/swing/event/TableModelEvent.java
@@ -57,7 +57,7 @@
  * future Swing releases. The current serialization support is
  * appropriate for short term storage or RMI between applications running
  * the same version of Swing.  As of 1.4, support for long term storage
- * of all JavaBeans<sup><font size="-2">TM</font></sup>
+ * of all JavaBeans&trade;
  * has been added to the <code>java.beans</code> package.
  * Please see {@link java.beans.XMLEncoder}.
  *
diff --git a/jdk/src/share/classes/javax/swing/event/TreeExpansionEvent.java b/jdk/src/share/classes/javax/swing/event/TreeExpansionEvent.java
index 62b85d6..c91d7cd 100644
--- a/jdk/src/share/classes/javax/swing/event/TreeExpansionEvent.java
+++ b/jdk/src/share/classes/javax/swing/event/TreeExpansionEvent.java
@@ -34,15 +34,15 @@
  * <p>
  * For further documentation and examples see
  * the following sections in <em>The Java Tutorial</em>:
- * <a href="http://java.sun.com/docs/books/tutorial/uiswing/events/treeexpansionlistener.html">How to Write a Tree Expansion Listener</a> and
- * <a href="http://java.sun.com/docs/books/tutorial/uiswing/events/treewillexpandlistener.html">How to Write a Tree-Will-Expand Listener</a>.
+ * <a href="http://docs.oracle.com/javase/tutorial/uiswing/events/treeexpansionlistener.html">How to Write a Tree Expansion Listener</a> and
+ * <a href="http://docs.oracle.com/javase/tutorial/uiswing/events/treewillexpandlistener.html">How to Write a Tree-Will-Expand Listener</a>.
  * <p>
  * <strong>Warning:</strong>
  * Serialized objects of this class will not be compatible with
  * future Swing releases. The current serialization support is
  * appropriate for short term storage or RMI between applications running
  * the same version of Swing.  As of 1.4, support for long term storage
- * of all JavaBeans<sup><font size="-2">TM</font></sup>
+ * of all JavaBeans&trade;
  * has been added to the <code>java.beans</code> package.
  * Please see {@link java.beans.XMLEncoder}.
  *
diff --git a/jdk/src/share/classes/javax/swing/event/TreeExpansionListener.java b/jdk/src/share/classes/javax/swing/event/TreeExpansionListener.java
index 977fda1..7a2867b 100644
--- a/jdk/src/share/classes/javax/swing/event/TreeExpansionListener.java
+++ b/jdk/src/share/classes/javax/swing/event/TreeExpansionListener.java
@@ -32,7 +32,7 @@
   * a node.
   * For further documentation and examples see
   * <a
-  href="http://java.sun.com/docs/books/tutorial/uiswing/events/treeexpansionlistener.html">How to Write a Tree Expansion Listener</a>,
+  href="http://docs.oracle.com/javase/tutorial/uiswing/events/treeexpansionlistener.html">How to Write a Tree Expansion Listener</a>,
   * a section in <em>The Java Tutorial.</em>
   *
   * @author Scott Violet
diff --git a/jdk/src/share/classes/javax/swing/event/TreeModelEvent.java b/jdk/src/share/classes/javax/swing/event/TreeModelEvent.java
index 3c92dc1..e67552d 100644
--- a/jdk/src/share/classes/javax/swing/event/TreeModelEvent.java
+++ b/jdk/src/share/classes/javax/swing/event/TreeModelEvent.java
@@ -34,7 +34,7 @@
  * used to notify tree model listeners of the change.
  * For more information and examples see
  * <a
- href="http://java.sun.com/docs/books/tutorial/uiswing/events/treemodellistener.html">How to Write a Tree Model Listener</a>,
+ href="http://docs.oracle.com/javase/tutorial/uiswing/events/treemodellistener.html">How to Write a Tree Model Listener</a>,
  * a section in <em>The Java Tutorial.</em>
  * <p>
  * <strong>Warning:</strong>
@@ -42,7 +42,7 @@
  * future Swing releases. The current serialization support is
  * appropriate for short term storage or RMI between applications running
  * the same version of Swing.  As of 1.4, support for long term storage
- * of all JavaBeans<sup><font size="-2">TM</font></sup>
+ * of all JavaBeans&trade;
  * has been added to the <code>java.beans</code> package.
  * Please see {@link java.beans.XMLEncoder}.
  *
@@ -101,14 +101,14 @@
      * of initial-positions, you then need to convert the Vector of <code>Integer</code>
      * objects to an array of <code>int</code> to create the event.
      * <p>
-     * <b>Notes:</b><ul>
+     * <b>Notes:</b><ul style="list-style-type:none">
      * <li>Like the <code>insertNodeInto</code> method in the
      *    <code>DefaultTreeModel</code> class, <code>insertElementAt</code>
      *    appends to the <code>Vector</code> when the index matches the size
      *    of the vector. So you can use <code>insertElementAt(Integer, 0)</code>
-     *    even when the vector is empty.
-     * <ul>To create a node changed event for the root node, specify the parent
-     *     and the child indices as <code>null</code>.
+     *    even when the vector is empty.</li>
+     * <li>To create a node changed event for the root node, specify the parent
+     *     and the child indices as <code>null</code>.</li>
      * </ul>
      *
      * @param source the Object responsible for generating the event (typically
diff --git a/jdk/src/share/classes/javax/swing/event/TreeModelListener.java b/jdk/src/share/classes/javax/swing/event/TreeModelListener.java
index 309c9b7..b48fdfb 100644
--- a/jdk/src/share/classes/javax/swing/event/TreeModelListener.java
+++ b/jdk/src/share/classes/javax/swing/event/TreeModelListener.java
@@ -32,7 +32,7 @@
  * to changes in a TreeModel.
  * For further information and examples see
  * <a
- href="http://java.sun.com/docs/books/tutorial/uiswing/events/treemodellistener.html">How to Write a Tree Model Listener</a>,
+ href="http://docs.oracle.com/javase/tutorial/uiswing/events/treemodellistener.html">How to Write a Tree Model Listener</a>,
  * a section in <em>The Java Tutorial.</em>
  *
  * @author Rob Davis
diff --git a/jdk/src/share/classes/javax/swing/event/TreeSelectionEvent.java b/jdk/src/share/classes/javax/swing/event/TreeSelectionEvent.java
index 8924875..40deb71 100644
--- a/jdk/src/share/classes/javax/swing/event/TreeSelectionEvent.java
+++ b/jdk/src/share/classes/javax/swing/event/TreeSelectionEvent.java
@@ -40,7 +40,7 @@
  * future Swing releases. The current serialization support is
  * appropriate for short term storage or RMI between applications running
  * the same version of Swing.  As of 1.4, support for long term storage
- * of all JavaBeans<sup><font size="-2">TM</font></sup>
+ * of all JavaBeans&trade;
  * has been added to the <code>java.beans</code> package.
  * Please see {@link java.beans.XMLEncoder}.
  *
diff --git a/jdk/src/share/classes/javax/swing/event/TreeSelectionListener.java b/jdk/src/share/classes/javax/swing/event/TreeSelectionListener.java
index 7e2d0e8..6a344e3 100644
--- a/jdk/src/share/classes/javax/swing/event/TreeSelectionListener.java
+++ b/jdk/src/share/classes/javax/swing/event/TreeSelectionListener.java
@@ -32,7 +32,7 @@
  * changes.
  * For more information and examples see
  * <a
- href="http://java.sun.com/docs/books/tutorial/uiswing/events/treeselectionlistener.html">How to Write a Tree Selection Listener</a>,
+ href="http://docs.oracle.com/javase/tutorial/uiswing/events/treeselectionlistener.html">How to Write a Tree Selection Listener</a>,
  * a section in <em>The Java Tutorial.</em>
  *
  * @see javax.swing.tree.TreeSelectionModel
diff --git a/jdk/src/share/classes/javax/swing/event/TreeWillExpandListener.java b/jdk/src/share/classes/javax/swing/event/TreeWillExpandListener.java
index c78ce69..3afb1f1 100644
--- a/jdk/src/share/classes/javax/swing/event/TreeWillExpandListener.java
+++ b/jdk/src/share/classes/javax/swing/event/TreeWillExpandListener.java
@@ -32,7 +32,7 @@
   * The listener that's notified when a tree expands or collapses
   * a node.
   * For further information and examples see
-  * <a href="http://java.sun.com/docs/books/tutorial/uiswing/events/treewillexpandlistener.html">How to Write a Tree-Will-Expand Listener</a>,
+  * <a href="http://docs.oracle.com/javase/tutorial/uiswing/events/treewillexpandlistener.html">How to Write a Tree-Will-Expand Listener</a>,
   * a section in <em>The Java Tutorial.</em>
   *
   * @author Scott Violet
diff --git a/jdk/src/share/classes/javax/swing/event/UndoableEditEvent.java b/jdk/src/share/classes/javax/swing/event/UndoableEditEvent.java
index 546d41d..85d4c28 100644
--- a/jdk/src/share/classes/javax/swing/event/UndoableEditEvent.java
+++ b/jdk/src/share/classes/javax/swing/event/UndoableEditEvent.java
@@ -35,7 +35,7 @@
  * future Swing releases. The current serialization support is
  * appropriate for short term storage or RMI between applications running
  * the same version of Swing.  As of 1.4, support for long term storage
- * of all JavaBeans<sup><font size="-2">TM</font></sup>
+ * of all JavaBeans&trade;
  * has been added to the <code>java.beans</code> package.
  * Please see {@link java.beans.XMLEncoder}.
  *
diff --git a/jdk/src/share/classes/javax/swing/filechooser/FileFilter.java b/jdk/src/share/classes/javax/swing/filechooser/FileFilter.java
index 50584c3..8cc1586 100644
--- a/jdk/src/share/classes/javax/swing/filechooser/FileFilter.java
+++ b/jdk/src/share/classes/javax/swing/filechooser/FileFilter.java
@@ -39,7 +39,7 @@
  * For an example implementation of a simple file filter, see
  * <code><i>yourJDK</i>/demo/jfc/FileChooserDemo/ExampleFileFilter.java</code>.
  * For more information and examples see
- * <a href="http://java.sun.com/docs/books/tutorial/uiswing/components/filechooser.html">How to Use File Choosers</a>,
+ * <a href="http://docs.oracle.com/javase/tutorial/uiswing/components/filechooser.html">How to Use File Choosers</a>,
  * a section in <em>The Java Tutorial</em>.
  *
  * @see FileNameExtensionFilter
diff --git a/jdk/src/share/classes/javax/swing/filechooser/FileView.java b/jdk/src/share/classes/javax/swing/filechooser/FileView.java
index 7710705..30dffc1 100644
--- a/jdk/src/share/classes/javax/swing/filechooser/FileView.java
+++ b/jdk/src/share/classes/javax/swing/filechooser/FileView.java
@@ -31,9 +31,9 @@
 /**
  * <code>FileView</code> defines an abstract class that can be implemented
  * to provide the filechooser with UI information for a <code>File</code>.
- * Each L&F <code>JFileChooserUI</code> object implements this
+ * Each L&amp;F <code>JFileChooserUI</code> object implements this
  * class to pass back the correct icons and type descriptions specific to
- * that L&F. For example, the Microsoft Windows L&F returns the
+ * that L&amp;F. For example, the Microsoft Windows L&amp;F returns the
  * generic Windows icons for directories and generic files.
  * Additionally, you may want to provide your own <code>FileView</code> to
  * <code>JFileChooser</code> to return different icons or additional
@@ -44,7 +44,7 @@
  * <code>JFileChooser</code> first looks to see if there is a user defined
  * <code>FileView</code>, if there is, it gets type information from
  * there first. If <code>FileView</code> returns <code>null</code> for
- * any method, <code>JFileChooser</code> then uses the L&F specific
+ * any method, <code>JFileChooser</code> then uses the L&amp;F specific
  * view to get the information.
  * So, for example, if you provide a <code>FileView</code> class that
  * returns an <code>Icon</code> for JPG files, and returns <code>null</code>
@@ -57,7 +57,7 @@
  * <code><i>yourJDK</i>/demo/jfc/FileChooserDemo/ExampleFileView.java</code>.
  * For more information and examples see
  * <a
- href="http://java.sun.com/docs/books/tutorial/uiswing/components/filechooser.html">How to Use File Choosers</a>,
+ href="http://docs.oracle.com/javase/tutorial/uiswing/components/filechooser.html">How to Use File Choosers</a>,
  * a section in <em>The Java Tutorial</em>.
  *
  * @see javax.swing.JFileChooser
diff --git a/jdk/src/share/classes/javax/swing/plaf/BorderUIResource.java b/jdk/src/share/classes/javax/swing/plaf/BorderUIResource.java
index 69eea59..0e54934 100644
--- a/jdk/src/share/classes/javax/swing/plaf/BorderUIResource.java
+++ b/jdk/src/share/classes/javax/swing/plaf/BorderUIResource.java
@@ -51,7 +51,7 @@
  * future Swing releases. The current serialization support is
  * appropriate for short term storage or RMI between applications running
  * the same version of Swing.  As of 1.4, support for long term storage
- * of all JavaBeans<sup><font size="-2">TM</font></sup>
+ * of all JavaBeans&trade;
  * has been added to the <code>java.beans</code> package.
  * Please see {@link java.beans.XMLEncoder}.
  *
diff --git a/jdk/src/share/classes/javax/swing/plaf/ColorUIResource.java b/jdk/src/share/classes/javax/swing/plaf/ColorUIResource.java
index 97d957a..79eba04 100644
--- a/jdk/src/share/classes/javax/swing/plaf/ColorUIResource.java
+++ b/jdk/src/share/classes/javax/swing/plaf/ColorUIResource.java
@@ -37,7 +37,7 @@
  * future Swing releases. The current serialization support is
  * appropriate for short term storage or RMI between applications running
  * the same version of Swing.  As of 1.4, support for long term storage
- * of all JavaBeans<sup><font size="-2">TM</font></sup>
+ * of all JavaBeans&trade;
  * has been added to the <code>java.beans</code> package.
  * Please see {@link java.beans.XMLEncoder}.
  *
diff --git a/jdk/src/share/classes/javax/swing/plaf/DimensionUIResource.java b/jdk/src/share/classes/javax/swing/plaf/DimensionUIResource.java
index 4bb839d..49828dc 100644
--- a/jdk/src/share/classes/javax/swing/plaf/DimensionUIResource.java
+++ b/jdk/src/share/classes/javax/swing/plaf/DimensionUIResource.java
@@ -40,7 +40,7 @@
  * future Swing releases. The current serialization support is
  * appropriate for short term storage or RMI between applications running
  * the same version of Swing.  As of 1.4, support for long term storage
- * of all JavaBeans<sup><font size="-2">TM</font></sup>
+ * of all JavaBeans&trade;
  * has been added to the <code>java.beans</code> package.
  * Please see {@link java.beans.XMLEncoder}.
  *
diff --git a/jdk/src/share/classes/javax/swing/plaf/FontUIResource.java b/jdk/src/share/classes/javax/swing/plaf/FontUIResource.java
index 327e82d..f8966e8 100644
--- a/jdk/src/share/classes/javax/swing/plaf/FontUIResource.java
+++ b/jdk/src/share/classes/javax/swing/plaf/FontUIResource.java
@@ -39,7 +39,7 @@
  * future Swing releases. The current serialization support is
  * appropriate for short term storage or RMI between applications running
  * the same version of Swing.  As of 1.4, support for long term storage
- * of all JavaBeans<sup><font size="-2">TM</font></sup>
+ * of all JavaBeans&trade;
  * has been added to the <code>java.beans</code> package.
  * Please see {@link java.beans.XMLEncoder}.
  *
diff --git a/jdk/src/share/classes/javax/swing/plaf/IconUIResource.java b/jdk/src/share/classes/javax/swing/plaf/IconUIResource.java
index c88da15..2fd1032 100644
--- a/jdk/src/share/classes/javax/swing/plaf/IconUIResource.java
+++ b/jdk/src/share/classes/javax/swing/plaf/IconUIResource.java
@@ -44,7 +44,7 @@
  * future Swing releases. The current serialization support is
  * appropriate for short term storage or RMI between applications running
  * the same version of Swing.  As of 1.4, support for long term storage
- * of all JavaBeans<sup><font size="-2">TM</font></sup>
+ * of all JavaBeans&trade;
  * has been added to the <code>java.beans</code> package.
  * Please see {@link java.beans.XMLEncoder}.
  *
diff --git a/jdk/src/share/classes/javax/swing/plaf/InsetsUIResource.java b/jdk/src/share/classes/javax/swing/plaf/InsetsUIResource.java
index e608f1c..5da2498 100644
--- a/jdk/src/share/classes/javax/swing/plaf/InsetsUIResource.java
+++ b/jdk/src/share/classes/javax/swing/plaf/InsetsUIResource.java
@@ -39,7 +39,7 @@
  * future Swing releases. The current serialization support is
  * appropriate for short term storage or RMI between applications running
  * the same version of Swing.  As of 1.4, support for long term storage
- * of all JavaBeans<sup><font size="-2">TM</font></sup>
+ * of all JavaBeans&trade;
  * has been added to the <code>java.beans</code> package.
  * Please see {@link java.beans.XMLEncoder}.
  *
diff --git a/jdk/src/share/classes/javax/swing/plaf/basic/BasicArrowButton.java b/jdk/src/share/classes/javax/swing/plaf/basic/BasicArrowButton.java
index ca20f85..73b7926 100644
--- a/jdk/src/share/classes/javax/swing/plaf/basic/BasicArrowButton.java
+++ b/jdk/src/share/classes/javax/swing/plaf/basic/BasicArrowButton.java
@@ -39,7 +39,7 @@
  * future Swing releases. The current serialization support is
  * appropriate for short term storage or RMI between applications running
  * the same version of Swing.  As of 1.4, support for long term storage
- * of all JavaBeans<sup><font size="-2">TM</font></sup>
+ * of all JavaBeans&trade;
  * has been added to the <code>java.beans</code> package.
  * Please see {@link java.beans.XMLEncoder}.
  *
diff --git a/jdk/src/share/classes/javax/swing/plaf/basic/BasicCheckBoxUI.java b/jdk/src/share/classes/javax/swing/plaf/basic/BasicCheckBoxUI.java
index 792bd82..4c1d5c3 100644
--- a/jdk/src/share/classes/javax/swing/plaf/basic/BasicCheckBoxUI.java
+++ b/jdk/src/share/classes/javax/swing/plaf/basic/BasicCheckBoxUI.java
@@ -43,7 +43,7 @@
  * future Swing releases. The current serialization support is
  * appropriate for short term storage or RMI between applications running
  * the same version of Swing.  As of 1.4, support for long term storage
- * of all JavaBeans<sup><font size="-2">TM</font></sup>
+ * of all JavaBeans&trade;
  * has been added to the <code>java.beans</code> package.
  * Please see {@link java.beans.XMLEncoder}.
  *
diff --git a/jdk/src/share/classes/javax/swing/plaf/basic/BasicComboBoxEditor.java b/jdk/src/share/classes/javax/swing/plaf/basic/BasicComboBoxEditor.java
index c902252..07e0a0f 100644
--- a/jdk/src/share/classes/javax/swing/plaf/basic/BasicComboBoxEditor.java
+++ b/jdk/src/share/classes/javax/swing/plaf/basic/BasicComboBoxEditor.java
@@ -160,7 +160,7 @@
      * future Swing releases. The current serialization support is
      * appropriate for short term storage or RMI between applications running
      * the same version of Swing.  As of 1.4, support for long term storage
-     * of all JavaBeans<sup><font size="-2">TM</font></sup>
+     * of all JavaBeans&trade;
      * has been added to the <code>java.beans</code> package.
      * Please see {@link java.beans.XMLEncoder}.
      */
diff --git a/jdk/src/share/classes/javax/swing/plaf/basic/BasicComboBoxRenderer.java b/jdk/src/share/classes/javax/swing/plaf/basic/BasicComboBoxRenderer.java
index f2b5ddf..f98be00 100644
--- a/jdk/src/share/classes/javax/swing/plaf/basic/BasicComboBoxRenderer.java
+++ b/jdk/src/share/classes/javax/swing/plaf/basic/BasicComboBoxRenderer.java
@@ -41,7 +41,7 @@
  * future Swing releases. The current serialization support is
  * appropriate for short term storage or RMI between applications running
  * the same version of Swing.  As of 1.4, support for long term storage
- * of all JavaBeans<sup><font size="-2">TM</font></sup>
+ * of all JavaBeans&trade;
  * has been added to the <code>java.beans</code> package.
  * Please see {@link java.beans.XMLEncoder}.
  *
@@ -135,7 +135,7 @@
      * future Swing releases. The current serialization support is
      * appropriate for short term storage or RMI between applications running
      * the same version of Swing.  As of 1.4, support for long term storage
-     * of all JavaBeans<sup><font size="-2">TM</font></sup>
+     * of all JavaBeans&trade;
      * has been added to the <code>java.beans</code> package.
      * Please see {@link java.beans.XMLEncoder}.
      */
diff --git a/jdk/src/share/classes/javax/swing/plaf/basic/BasicComboBoxUI.java b/jdk/src/share/classes/javax/swing/plaf/basic/BasicComboBoxUI.java
index eec4800..37764cc 100644
--- a/jdk/src/share/classes/javax/swing/plaf/basic/BasicComboBoxUI.java
+++ b/jdk/src/share/classes/javax/swing/plaf/basic/BasicComboBoxUI.java
@@ -54,8 +54,7 @@
  * <p>
  * For adding specific actions,
  * overide <code>installKeyboardActions</code> to add actions in response to
- * KeyStroke bindings. See the article <a href="http://java.sun.com/products/jfc/tsc/special_report/kestrel/keybindings.html">Keyboard Bindings in Swing</a>
- * at <a href="http://java.sun.com/products/jfc/tsc"><em>The Swing Connection</em></a>.
+ * KeyStroke bindings. See the article <a href="http://docs.oracle.com/javase/tutorial/uiswing/misc/keybinding.html">How to Use Key Bindings</a>
  *
  * @author Arnaud Weber
  * @author Tom Santos
diff --git a/jdk/src/share/classes/javax/swing/plaf/basic/BasicComboPopup.java b/jdk/src/share/classes/javax/swing/plaf/basic/BasicComboPopup.java
index 38f591b..e3ed947 100644
--- a/jdk/src/share/classes/javax/swing/plaf/basic/BasicComboPopup.java
+++ b/jdk/src/share/classes/javax/swing/plaf/basic/BasicComboPopup.java
@@ -53,7 +53,7 @@
  * future Swing releases. The current serialization support is
  * appropriate for short term storage or RMI between applications running
  * the same version of Swing.  As of 1.4, support for long term storage
- * of all JavaBeans<sup><font size="-2">TM</font></sup>
+ * of all JavaBeans&trade;
  * has been added to the <code>java.beans</code> package.
  * Please see {@link java.beans.XMLEncoder}.
  *
diff --git a/jdk/src/share/classes/javax/swing/plaf/basic/BasicEditorPaneUI.java b/jdk/src/share/classes/javax/swing/plaf/basic/BasicEditorPaneUI.java
index 190519b..32bace0 100644
--- a/jdk/src/share/classes/javax/swing/plaf/basic/BasicEditorPaneUI.java
+++ b/jdk/src/share/classes/javax/swing/plaf/basic/BasicEditorPaneUI.java
@@ -44,7 +44,7 @@
  * future Swing releases. The current serialization support is
  * appropriate for short term storage or RMI between applications running
  * the same version of Swing.  As of 1.4, support for long term storage
- * of all JavaBeans<sup><font size="-2">TM</font></sup>
+ * of all JavaBeans&trade;
  * has been added to the <code>java.beans</code> package.
  * Please see {@link java.beans.XMLEncoder}.
  *
diff --git a/jdk/src/share/classes/javax/swing/plaf/basic/BasicIconFactory.java b/jdk/src/share/classes/javax/swing/plaf/basic/BasicIconFactory.java
index ddf9aec..6ea1cbc 100644
--- a/jdk/src/share/classes/javax/swing/plaf/basic/BasicIconFactory.java
+++ b/jdk/src/share/classes/javax/swing/plaf/basic/BasicIconFactory.java
@@ -42,7 +42,7 @@
  * future Swing releases. The current serialization support is
  * appropriate for short term storage or RMI between applications running
  * the same version of Swing.  As of 1.4, support for long term storage
- * of all JavaBeans<sup><font size="-2">TM</font></sup>
+ * of all JavaBeans&trade;
  * has been added to the <code>java.beans</code> package.
  * Please see {@link java.beans.XMLEncoder}.
  *
diff --git a/jdk/src/share/classes/javax/swing/plaf/basic/BasicInternalFrameTitlePane.java b/jdk/src/share/classes/javax/swing/plaf/basic/BasicInternalFrameTitlePane.java
index c6600b4..283ced6 100644
--- a/jdk/src/share/classes/javax/swing/plaf/basic/BasicInternalFrameTitlePane.java
+++ b/jdk/src/share/classes/javax/swing/plaf/basic/BasicInternalFrameTitlePane.java
@@ -50,7 +50,7 @@
  * future Swing releases. The current serialization support is
  * appropriate for short term storage or RMI between applications running
  * the same version of Swing.  As of 1.4, support for long term storage
- * of all JavaBeans<sup><font size="-2">TM</font></sup>
+ * of all JavaBeans&trade;
  * has been added to the <code>java.beans</code> package.
  * Please see {@link java.beans.XMLEncoder}.
  *
diff --git a/jdk/src/share/classes/javax/swing/plaf/basic/BasicListUI.java b/jdk/src/share/classes/javax/swing/plaf/basic/BasicListUI.java
index 28066de..eb8df7b 100644
--- a/jdk/src/share/classes/javax/swing/plaf/basic/BasicListUI.java
+++ b/jdk/src/share/classes/javax/swing/plaf/basic/BasicListUI.java
@@ -1488,7 +1488,7 @@
      * future Swing releases. The current serialization support is
      * appropriate for short term storage or RMI between applications running
      * the same version of Swing.  As of 1.4, support for long term storage
-     * of all JavaBeans<sup><font size="-2">TM</font></sup>
+     * of all JavaBeans&trade;
      * has been added to the <code>java.beans</code> package.
      * Please see {@link java.beans.XMLEncoder}.
      *
@@ -1592,7 +1592,7 @@
      * future Swing releases. The current serialization support is
      * appropriate for short term storage or RMI between applications running
      * the same version of Swing.  As of 1.4, support for long term storage
-     * of all JavaBeans<sup><font size="-2">TM</font></sup>
+     * of all JavaBeans&trade;
      * has been added to the <code>java.beans</code> package.
      * Please see {@link java.beans.XMLEncoder}.
      *
@@ -1650,7 +1650,7 @@
      * future Swing releases. The current serialization support is
      * appropriate for short term storage or RMI between applications running
      * the same version of Swing.  As of 1.4, support for long term storage
-     * of all JavaBeans<sup><font size="-2">TM</font></sup>
+     * of all JavaBeans&trade;
      * has been added to the <code>java.beans</code> package.
      * Please see {@link java.beans.XMLEncoder}.
      *
@@ -1717,7 +1717,7 @@
      * future Swing releases. The current serialization support is
      * appropriate for short term storage or RMI between applications running
      * the same version of Swing.  As of 1.4, support for long term storage
-     * of all JavaBeans<sup><font size="-2">TM</font></sup>
+     * of all JavaBeans&trade;
      * has been added to the <code>java.beans</code> package.
      * Please see {@link java.beans.XMLEncoder}.
      *
diff --git a/jdk/src/share/classes/javax/swing/plaf/basic/BasicLookAndFeel.java b/jdk/src/share/classes/javax/swing/plaf/basic/BasicLookAndFeel.java
index 2e808c4..b8aff8a 100644
--- a/jdk/src/share/classes/javax/swing/plaf/basic/BasicLookAndFeel.java
+++ b/jdk/src/share/classes/javax/swing/plaf/basic/BasicLookAndFeel.java
@@ -96,7 +96,7 @@
  * future Swing releases. The current serialization support is
  * appropriate for short term storage or RMI between applications running
  * the same version of Swing.  As of 1.4, support for long term storage
- * of all JavaBeans<sup><font size="-2">TM</font></sup>
+ * of all JavaBeans&trade;
  * has been added to the <code>java.beans</code> package.
  * Please see {@link java.beans.XMLEncoder}.
  *
diff --git a/jdk/src/share/classes/javax/swing/plaf/basic/BasicSplitPaneDivider.java b/jdk/src/share/classes/javax/swing/plaf/basic/BasicSplitPaneDivider.java
index 70b0bff..9a56bd7 100644
--- a/jdk/src/share/classes/javax/swing/plaf/basic/BasicSplitPaneDivider.java
+++ b/jdk/src/share/classes/javax/swing/plaf/basic/BasicSplitPaneDivider.java
@@ -53,7 +53,7 @@
  * future Swing releases. The current serialization support is
  * appropriate for short term storage or RMI between applications running
  * the same version of Swing.  As of 1.4, support for long term storage
- * of all JavaBeans<sup><font size="-2">TM</font></sup>
+ * of all JavaBeans&trade;
  * has been added to the <code>java.beans</code> package.
  * Please see {@link java.beans.XMLEncoder}.
  *
@@ -671,7 +671,7 @@
      * future Swing releases. The current serialization support is
      * appropriate for short term storage or RMI between applications running
      * the same version of Swing.  As of 1.4, support for long term storage
-     * of all JavaBeans<sup><font size="-2">TM</font></sup>
+     * of all JavaBeans&trade;
      * has been added to the <code>java.beans</code> package.
      * Please see {@link java.beans.XMLEncoder}.
      */
diff --git a/jdk/src/share/classes/javax/swing/plaf/basic/BasicTextAreaUI.java b/jdk/src/share/classes/javax/swing/plaf/basic/BasicTextAreaUI.java
index 0c57e4a..4a34184 100644
--- a/jdk/src/share/classes/javax/swing/plaf/basic/BasicTextAreaUI.java
+++ b/jdk/src/share/classes/javax/swing/plaf/basic/BasicTextAreaUI.java
@@ -43,7 +43,7 @@
  * future Swing releases. The current serialization support is
  * appropriate for short term storage or RMI between applications running
  * the same version of Swing.  As of 1.4, support for long term storage
- * of all JavaBeans<sup><font size="-2">TM</font></sup>
+ * of all JavaBeans&trade;
  * has been added to the <code>java.beans</code> package.
  * Please see {@link java.beans.XMLEncoder}.
  *
diff --git a/jdk/src/share/classes/javax/swing/plaf/basic/BasicTextFieldUI.java b/jdk/src/share/classes/javax/swing/plaf/basic/BasicTextFieldUI.java
index cc45d21..0083c34 100644
--- a/jdk/src/share/classes/javax/swing/plaf/basic/BasicTextFieldUI.java
+++ b/jdk/src/share/classes/javax/swing/plaf/basic/BasicTextFieldUI.java
@@ -45,7 +45,7 @@
  * future Swing releases. The current serialization support is
  * appropriate for short term storage or RMI between applications running
  * the same version of Swing.  As of 1.4, support for long term storage
- * of all JavaBeans<sup><font size="-2">TM</font></sup>
+ * of all JavaBeans&trade;
  * has been added to the <code>java.beans</code> package.
  * Please see {@link java.beans.XMLEncoder}.
  *
diff --git a/jdk/src/share/classes/javax/swing/plaf/basic/BasicTextPaneUI.java b/jdk/src/share/classes/javax/swing/plaf/basic/BasicTextPaneUI.java
index 5f3070d..1e460c4 100644
--- a/jdk/src/share/classes/javax/swing/plaf/basic/BasicTextPaneUI.java
+++ b/jdk/src/share/classes/javax/swing/plaf/basic/BasicTextPaneUI.java
@@ -41,7 +41,7 @@
  * future Swing releases. The current serialization support is
  * appropriate for short term storage or RMI between applications running
  * the same version of Swing.  As of 1.4, support for long term storage
- * of all JavaBeans<sup><font size="-2">TM</font></sup>
+ * of all JavaBeans&trade;
  * has been added to the <code>java.beans</code> package.
  * Please see {@link java.beans.XMLEncoder}.
  *
diff --git a/jdk/src/share/classes/javax/swing/plaf/basic/BasicTextUI.java b/jdk/src/share/classes/javax/swing/plaf/basic/BasicTextUI.java
index b00bcda..bec3faa 100644
--- a/jdk/src/share/classes/javax/swing/plaf/basic/BasicTextUI.java
+++ b/jdk/src/share/classes/javax/swing/plaf/basic/BasicTextUI.java
@@ -93,7 +93,7 @@
  * future Swing releases. The current serialization support is
  * appropriate for short term storage or RMI between applications running
  * the same version of Swing.  As of 1.4, support for long term storage
- * of all JavaBeans<sup><font size="-2">TM</font></sup>
+ * of all JavaBeans&trade;
  * has been added to the <code>java.beans</code> package.
  * Please see {@link java.beans.XMLEncoder}.
  *
diff --git a/jdk/src/share/classes/javax/swing/plaf/basic/ComboPopup.java b/jdk/src/share/classes/javax/swing/plaf/basic/ComboPopup.java
index b6950ed..c2a4fa2 100644
--- a/jdk/src/share/classes/javax/swing/plaf/basic/ComboPopup.java
+++ b/jdk/src/share/classes/javax/swing/plaf/basic/ComboPopup.java
@@ -40,7 +40,7 @@
  * future Swing releases. The current serialization support is
  * appropriate for short term storage or RMI between applications running
  * the same version of Swing.  As of 1.4, support for long term storage
- * of all JavaBeans<sup><font size="-2">TM</font></sup>
+ * of all JavaBeans&trade;
  * has been added to the <code>java.beans</code> package.
  * Please see {@link java.beans.XMLEncoder}.
  *
diff --git a/jdk/src/share/classes/javax/swing/plaf/metal/DefaultMetalTheme.java b/jdk/src/share/classes/javax/swing/plaf/metal/DefaultMetalTheme.java
index 4ff115b..b0b42cf 100644
--- a/jdk/src/share/classes/javax/swing/plaf/metal/DefaultMetalTheme.java
+++ b/jdk/src/share/classes/javax/swing/plaf/metal/DefaultMetalTheme.java
@@ -79,7 +79,7 @@
  * future Swing releases. The current serialization support is
  * appropriate for short term storage or RMI between applications running
  * the same version of Swing.  As of 1.4, support for long term storage
- * of all JavaBeans<sup><font size="-2">TM</font></sup>
+ * of all JavaBeans&trade;
  * has been added to the <code>java.beans</code> package.
  * Please see {@link java.beans.XMLEncoder}.
  *
diff --git a/jdk/src/share/classes/javax/swing/plaf/metal/MetalButtonUI.java b/jdk/src/share/classes/javax/swing/plaf/metal/MetalButtonUI.java
index 65dc2c2..3d02f9c 100644
--- a/jdk/src/share/classes/javax/swing/plaf/metal/MetalButtonUI.java
+++ b/jdk/src/share/classes/javax/swing/plaf/metal/MetalButtonUI.java
@@ -44,7 +44,7 @@
  * future Swing releases. The current serialization support is
  * appropriate for short term storage or RMI between applications running
  * the same version of Swing.  As of 1.4, support for long term storage
- * of all JavaBeans<sup><font size="-2">TM</font></sup>
+ * of all JavaBeans&trade;
  * has been added to the <code>java.beans</code> package.
  * Please see {@link java.beans.XMLEncoder}.
  *
diff --git a/jdk/src/share/classes/javax/swing/plaf/metal/MetalCheckBoxIcon.java b/jdk/src/share/classes/javax/swing/plaf/metal/MetalCheckBoxIcon.java
index c88ac8c..b321571 100644
--- a/jdk/src/share/classes/javax/swing/plaf/metal/MetalCheckBoxIcon.java
+++ b/jdk/src/share/classes/javax/swing/plaf/metal/MetalCheckBoxIcon.java
@@ -40,7 +40,7 @@
  * future Swing releases. The current serialization support is
  * appropriate for short term storage or RMI between applications running
  * the same version of Swing.  As of 1.4, support for long term storage
- * of all JavaBeans<sup><font size="-2">TM</font></sup>
+ * of all JavaBeans&trade;
  * has been added to the <code>java.beans</code> package.
  * Please see {@link java.beans.XMLEncoder}.
  *
diff --git a/jdk/src/share/classes/javax/swing/plaf/metal/MetalCheckBoxUI.java b/jdk/src/share/classes/javax/swing/plaf/metal/MetalCheckBoxUI.java
index 1ee6843..95ef177 100644
--- a/jdk/src/share/classes/javax/swing/plaf/metal/MetalCheckBoxUI.java
+++ b/jdk/src/share/classes/javax/swing/plaf/metal/MetalCheckBoxUI.java
@@ -44,7 +44,7 @@
  * future Swing releases. The current serialization support is
  * appropriate for short term storage or RMI between applications running
  * the same version of Swing.  As of 1.4, support for long term storage
- * of all JavaBeans<sup><font size="-2">TM</font></sup>
+ * of all JavaBeans&trade;
  * has been added to the <code>java.beans</code> package.
  * Please see {@link java.beans.XMLEncoder}.
  *
diff --git a/jdk/src/share/classes/javax/swing/plaf/metal/MetalComboBoxButton.java b/jdk/src/share/classes/javax/swing/plaf/metal/MetalComboBoxButton.java
index 5f76492..63a53bf 100644
--- a/jdk/src/share/classes/javax/swing/plaf/metal/MetalComboBoxButton.java
+++ b/jdk/src/share/classes/javax/swing/plaf/metal/MetalComboBoxButton.java
@@ -41,7 +41,7 @@
  * future Swing releases. The current serialization support is
  * appropriate for short term storage or RMI between applications running
  * the same version of Swing.  As of 1.4, support for long term storage
- * of all JavaBeans<sup><font size="-2">TM</font></sup>
+ * of all JavaBeans&trade;
  * has been added to the <code>java.beans</code> package.
  * Please see {@link java.beans.XMLEncoder}.
  *
diff --git a/jdk/src/share/classes/javax/swing/plaf/metal/MetalComboBoxEditor.java b/jdk/src/share/classes/javax/swing/plaf/metal/MetalComboBoxEditor.java
index a85458c..aa375fb 100644
--- a/jdk/src/share/classes/javax/swing/plaf/metal/MetalComboBoxEditor.java
+++ b/jdk/src/share/classes/javax/swing/plaf/metal/MetalComboBoxEditor.java
@@ -41,7 +41,7 @@
  * future Swing releases. The current serialization support is
  * appropriate for short term storage or RMI between applications running
  * the same version of Swing.  As of 1.4, support for long term storage
- * of all JavaBeans<sup><font size="-2">TM</font></sup>
+ * of all JavaBeans&trade;
  * has been added to the <code>java.beans</code> package.
  * Please see {@link java.beans.XMLEncoder}.
  *
@@ -129,7 +129,7 @@
      * future Swing releases. The current serialization support is
      * appropriate for short term storage or RMI between applications running
      * the same version of Swing.  As of 1.4, support for long term storage
-     * of all JavaBeans<sup><font size="-2">TM</font></sup>
+     * of all JavaBeans&trade;
      * has been added to the <code>java.beans</code> package.
      * Please see {@link java.beans.XMLEncoder}.
      */
diff --git a/jdk/src/share/classes/javax/swing/plaf/metal/MetalComboBoxUI.java b/jdk/src/share/classes/javax/swing/plaf/metal/MetalComboBoxUI.java
index e97416e..74f8830 100644
--- a/jdk/src/share/classes/javax/swing/plaf/metal/MetalComboBoxUI.java
+++ b/jdk/src/share/classes/javax/swing/plaf/metal/MetalComboBoxUI.java
@@ -43,7 +43,7 @@
  * future Swing releases. The current serialization support is
  * appropriate for short term storage or RMI between applications running
  * the same version of Swing.  As of 1.4, support for long term storage
- * of all JavaBeans<sup><font size="-2">TM</font></sup>
+ * of all JavaBeans&trade;
  * has been added to the <code>java.beans</code> package.
  * Please see {@link java.beans.XMLEncoder}.
  *
diff --git a/jdk/src/share/classes/javax/swing/plaf/metal/MetalIconFactory.java b/jdk/src/share/classes/javax/swing/plaf/metal/MetalIconFactory.java
index 63c1491..5b81f17 100644
--- a/jdk/src/share/classes/javax/swing/plaf/metal/MetalIconFactory.java
+++ b/jdk/src/share/classes/javax/swing/plaf/metal/MetalIconFactory.java
@@ -36,7 +36,7 @@
 
 /**
  * Factory object that vends <code>Icon</code>s for
- * the Java<sup><font size="-2">TM</font></sup> look and feel (Metal).
+ * the Java&trade; look and feel (Metal).
  * These icons are used extensively in Metal via the defaults mechanism.
  * While other look and feels often use GIFs for icons, creating icons
  * in code facilitates switching to other themes.
@@ -52,7 +52,7 @@
  * future Swing releases. The current serialization support is
  * appropriate for short term storage or RMI between applications running
  * the same version of Swing.  As of 1.4, support for long term storage
- * of all JavaBeans<sup><font size="-2">TM</font></sup>
+ * of all JavaBeans&trade;
  * has been added to the <code>java.beans</code> package.
  * Please see {@link java.beans.XMLEncoder}.
  *
@@ -1550,7 +1550,7 @@
      * future Swing releases. The current serialization support is
      * appropriate for short term storage or RMI between applications running
      * the same version of Swing.  As of 1.4, support for long term storage
-     * of all JavaBeans<sup><font size="-2">TM</font></sup>
+     * of all JavaBeans&trade;
      * has been added to the <code>java.beans</code> package.
      * Please see {@link java.beans.XMLEncoder}.
      */
@@ -1632,7 +1632,7 @@
      * future Swing releases. The current serialization support is
      * appropriate for short term storage or RMI between applications running
      * the same version of Swing.  As of 1.4, support for long term storage
-     * of all JavaBeans<sup><font size="-2">TM</font></sup>
+     * of all JavaBeans&trade;
      * has been added to the <code>java.beans</code> package.
      * Please see {@link java.beans.XMLEncoder}.
      */
@@ -1651,7 +1651,7 @@
      * future Swing releases. The current serialization support is
      * appropriate for short term storage or RMI between applications running
      * the same version of Swing.  As of 1.4, support for long term storage
-     * of all JavaBeans<sup><font size="-2">TM</font></sup>
+     * of all JavaBeans&trade;
      * has been added to the <code>java.beans</code> package.
      * Please see {@link java.beans.XMLEncoder}.
      */
@@ -1736,7 +1736,7 @@
      * future Swing releases. The current serialization support is
      * appropriate for short term storage or RMI between applications running
      * the same version of Swing.  As of 1.4, support for long term storage
-     * of all JavaBeans<sup><font size="-2">TM</font></sup>
+     * of all JavaBeans&trade;
      * has been added to the <code>java.beans</code> package.
      * Please see {@link java.beans.XMLEncoder}.
      */
diff --git a/jdk/src/share/classes/javax/swing/plaf/metal/MetalLookAndFeel.java b/jdk/src/share/classes/javax/swing/plaf/metal/MetalLookAndFeel.java
index 0ca32d2..76ece66 100644
--- a/jdk/src/share/classes/javax/swing/plaf/metal/MetalLookAndFeel.java
+++ b/jdk/src/share/classes/javax/swing/plaf/metal/MetalLookAndFeel.java
@@ -72,7 +72,7 @@
  * future Swing releases. The current serialization support is
  * appropriate for short term storage or RMI between applications running
  * the same version of Swing.  As of 1.4, support for long term storage
- * of all JavaBeans<sup><font size="-2">TM</font></sup>
+ * of all JavaBeans&trade;
  * has been added to the <code>java.beans</code> package.
  * Please see {@link java.beans.XMLEncoder}.
  *
@@ -293,8 +293,8 @@
      * <table border="1" cellpadding="1" cellspacing="0"
      *         summary="Metal's system color mapping">
      *  <tr valign="top"  align="left">
-     *    <th bgcolor="#CCCCFF" align="left">Key
-     *    <th bgcolor="#CCCCFF" align="left">Value
+     *    <th style="background-color:#CCCCFF" align="left">Key
+     *    <th style="background-color:#CCCCFF" align="left">Value
      *  <tr valign="top"  align="left">
      *    <td>"desktop"
      *    <td>{@code theme.getDesktopColor()}
@@ -2361,7 +2361,7 @@
     }
 
     // From the JLF Design Guidelines:
-    // http://java.sun.com/products/jlf/ed2/book/HIG.Visual2.html
+    // http://www.oracle.com/technetwork/java/jlf-135985.html
     private static class MetalLayoutStyle extends DefaultLayoutStyle {
         private static MetalLayoutStyle INSTANCE = new MetalLayoutStyle();
 
diff --git a/jdk/src/share/classes/javax/swing/plaf/metal/MetalProgressBarUI.java b/jdk/src/share/classes/javax/swing/plaf/metal/MetalProgressBarUI.java
index 44288ea..a2918b0 100644
--- a/jdk/src/share/classes/javax/swing/plaf/metal/MetalProgressBarUI.java
+++ b/jdk/src/share/classes/javax/swing/plaf/metal/MetalProgressBarUI.java
@@ -38,7 +38,7 @@
  * future Swing releases. The current serialization support is
  * appropriate for short term storage or RMI between applications running
  * the same version of Swing.  As of 1.4, support for long term storage
- * of all JavaBeans<sup><font size="-2">TM</font></sup>
+ * of all JavaBeans&trade;
  * has been added to the <code>java.beans</code> package.
  * Please see {@link java.beans.XMLEncoder}.
  *
diff --git a/jdk/src/share/classes/javax/swing/plaf/metal/MetalRadioButtonUI.java b/jdk/src/share/classes/javax/swing/plaf/metal/MetalRadioButtonUI.java
index 0dcadef..2743355 100644
--- a/jdk/src/share/classes/javax/swing/plaf/metal/MetalRadioButtonUI.java
+++ b/jdk/src/share/classes/javax/swing/plaf/metal/MetalRadioButtonUI.java
@@ -46,7 +46,7 @@
  * future Swing releases. The current serialization support is
  * appropriate for short term storage or RMI between applications running
  * the same version of Swing.  As of 1.4, support for long term storage
- * of all JavaBeans<sup><font size="-2">TM</font></sup>
+ * of all JavaBeans&trade;
  * has been added to the <code>java.beans</code> package.
  * Please see {@link java.beans.XMLEncoder}.
  *
diff --git a/jdk/src/share/classes/javax/swing/plaf/metal/MetalRootPaneUI.java b/jdk/src/share/classes/javax/swing/plaf/metal/MetalRootPaneUI.java
index d3b6e51..e2c6d51 100644
--- a/jdk/src/share/classes/javax/swing/plaf/metal/MetalRootPaneUI.java
+++ b/jdk/src/share/classes/javax/swing/plaf/metal/MetalRootPaneUI.java
@@ -56,7 +56,7 @@
  * future Swing releases. The current serialization support is
  * appropriate for short term storage or RMI between applications running
  * the same version of Swing.  As of 1.4, support for long term storage
- * of all JavaBeans<sup><font size="-2">TM</font></sup>
+ * of all JavaBeans&trade;
  * has been added to the <code>java.beans</code> package.
  * Please see {@link java.beans.XMLEncoder}.
  *
diff --git a/jdk/src/share/classes/javax/swing/plaf/metal/MetalScrollButton.java b/jdk/src/share/classes/javax/swing/plaf/metal/MetalScrollButton.java
index f6f0d6f..61616d4 100644
--- a/jdk/src/share/classes/javax/swing/plaf/metal/MetalScrollButton.java
+++ b/jdk/src/share/classes/javax/swing/plaf/metal/MetalScrollButton.java
@@ -43,7 +43,7 @@
  * future Swing releases. The current serialization support is
  * appropriate for short term storage or RMI between applications running
  * the same version of Swing.  As of 1.4, support for long term storage
- * of all JavaBeans<sup><font size="-2">TM</font></sup>
+ * of all JavaBeans&trade;
  * has been added to the <code>java.beans</code> package.
  * Please see {@link java.beans.XMLEncoder}.
  *
diff --git a/jdk/src/share/classes/javax/swing/plaf/metal/MetalScrollPaneUI.java b/jdk/src/share/classes/javax/swing/plaf/metal/MetalScrollPaneUI.java
index b4eadab..d1f5b7a 100644
--- a/jdk/src/share/classes/javax/swing/plaf/metal/MetalScrollPaneUI.java
+++ b/jdk/src/share/classes/javax/swing/plaf/metal/MetalScrollPaneUI.java
@@ -44,7 +44,7 @@
  * future Swing releases. The current serialization support is
  * appropriate for short term storage or RMI between applications running
  * the same version of Swing.  As of 1.4, support for long term storage
- * of all JavaBeans<sup><font size="-2">TM</font></sup>
+ * of all JavaBeans&trade;
  * has been added to the <code>java.beans</code> package.
  * Please see {@link java.beans.XMLEncoder}.
  *
diff --git a/jdk/src/share/classes/javax/swing/plaf/metal/MetalSeparatorUI.java b/jdk/src/share/classes/javax/swing/plaf/metal/MetalSeparatorUI.java
index 07d723e..17ac847 100644
--- a/jdk/src/share/classes/javax/swing/plaf/metal/MetalSeparatorUI.java
+++ b/jdk/src/share/classes/javax/swing/plaf/metal/MetalSeparatorUI.java
@@ -44,7 +44,7 @@
  * future Swing releases. The current serialization support is
  * appropriate for short term storage or RMI between applications running
  * the same version of Swing.  As of 1.4, support for long term storage
- * of all JavaBeans<sup><font size="-2">TM</font></sup>
+ * of all JavaBeans&trade;
  * has been added to the <code>java.beans</code> package.
  * Please see {@link java.beans.XMLEncoder}.
  *
diff --git a/jdk/src/share/classes/javax/swing/plaf/metal/MetalSliderUI.java b/jdk/src/share/classes/javax/swing/plaf/metal/MetalSliderUI.java
index 99d078c..8b50bb7 100644
--- a/jdk/src/share/classes/javax/swing/plaf/metal/MetalSliderUI.java
+++ b/jdk/src/share/classes/javax/swing/plaf/metal/MetalSliderUI.java
@@ -44,7 +44,7 @@
  * future Swing releases. The current serialization support is
  * appropriate for short term storage or RMI between applications running
  * the same version of Swing.  As of 1.4, support for long term storage
- * of all JavaBeans<sup><font size="-2">TM</font></sup>
+ * of all JavaBeans&trade;
  * has been added to the <code>java.beans</code> package.
  * Please see {@link java.beans.XMLEncoder}.
  *
diff --git a/jdk/src/share/classes/javax/swing/plaf/metal/MetalSplitPaneDivider.java b/jdk/src/share/classes/javax/swing/plaf/metal/MetalSplitPaneDivider.java
index 86b37b4..33ef49d 100644
--- a/jdk/src/share/classes/javax/swing/plaf/metal/MetalSplitPaneDivider.java
+++ b/jdk/src/share/classes/javax/swing/plaf/metal/MetalSplitPaneDivider.java
@@ -39,7 +39,7 @@
  * future Swing releases. The current serialization support is
  * appropriate for short term storage or RMI between applications running
  * the same version of Swing.  As of 1.4, support for long term storage
- * of all JavaBeans<sup><font size="-2">TM</font></sup>
+ * of all JavaBeans&trade;
  * has been added to the <code>java.beans</code> package.
  * Please see {@link java.beans.XMLEncoder}.
  *
diff --git a/jdk/src/share/classes/javax/swing/plaf/metal/MetalSplitPaneUI.java b/jdk/src/share/classes/javax/swing/plaf/metal/MetalSplitPaneUI.java
index f2b2ebc..8aaa409 100644
--- a/jdk/src/share/classes/javax/swing/plaf/metal/MetalSplitPaneUI.java
+++ b/jdk/src/share/classes/javax/swing/plaf/metal/MetalSplitPaneUI.java
@@ -37,7 +37,7 @@
  * future Swing releases. The current serialization support is
  * appropriate for short term storage or RMI between applications running
  * the same version of Swing.  As of 1.4, support for long term storage
- * of all JavaBeans<sup><font size="-2">TM</font></sup>
+ * of all JavaBeans&trade;
  * has been added to the <code>java.beans</code> package.
  * Please see {@link java.beans.XMLEncoder}.
  *
diff --git a/jdk/src/share/classes/javax/swing/plaf/metal/MetalTabbedPaneUI.java b/jdk/src/share/classes/javax/swing/plaf/metal/MetalTabbedPaneUI.java
index 667ccc5..23ead51 100644
--- a/jdk/src/share/classes/javax/swing/plaf/metal/MetalTabbedPaneUI.java
+++ b/jdk/src/share/classes/javax/swing/plaf/metal/MetalTabbedPaneUI.java
@@ -41,7 +41,7 @@
  * future Swing releases. The current serialization support is
  * appropriate for short term storage or RMI between applications running
  * the same version of Swing.  As of 1.4, support for long term storage
- * of all JavaBeans<sup><font size="-2">TM</font></sup>
+ * of all JavaBeans&trade;
  * has been added to the <code>java.beans</code> package.
  * Please see {@link java.beans.XMLEncoder}.
  *
diff --git a/jdk/src/share/classes/javax/swing/plaf/metal/MetalTextFieldUI.java b/jdk/src/share/classes/javax/swing/plaf/metal/MetalTextFieldUI.java
index 02ab7e7..8fe89f3 100644
--- a/jdk/src/share/classes/javax/swing/plaf/metal/MetalTextFieldUI.java
+++ b/jdk/src/share/classes/javax/swing/plaf/metal/MetalTextFieldUI.java
@@ -41,7 +41,7 @@
  * future Swing releases. The current serialization support is
  * appropriate for short term storage or RMI between applications running
  * the same version of Swing.  As of 1.4, support for long term storage
- * of all JavaBeans<sup><font size="-2">TM</font></sup>
+ * of all JavaBeans&trade;
  * has been added to the <code>java.beans</code> package.
  * Please see {@link java.beans.XMLEncoder}.
  *
diff --git a/jdk/src/share/classes/javax/swing/plaf/metal/MetalToggleButtonUI.java b/jdk/src/share/classes/javax/swing/plaf/metal/MetalToggleButtonUI.java
index 707ca92..d207cbb 100644
--- a/jdk/src/share/classes/javax/swing/plaf/metal/MetalToggleButtonUI.java
+++ b/jdk/src/share/classes/javax/swing/plaf/metal/MetalToggleButtonUI.java
@@ -49,7 +49,7 @@
  * future Swing releases. The current serialization support is
  * appropriate for short term storage or RMI between applications running
  * the same version of Swing.  As of 1.4, support for long term storage
- * of all JavaBeans<sup><font size="-2">TM</font></sup>
+ * of all JavaBeans&trade;
  * has been added to the <code>java.beans</code> package.
  * Please see {@link java.beans.XMLEncoder}.
  *
diff --git a/jdk/src/share/classes/javax/swing/plaf/metal/MetalToolTipUI.java b/jdk/src/share/classes/javax/swing/plaf/metal/MetalToolTipUI.java
index 914502e..38a39a0 100644
--- a/jdk/src/share/classes/javax/swing/plaf/metal/MetalToolTipUI.java
+++ b/jdk/src/share/classes/javax/swing/plaf/metal/MetalToolTipUI.java
@@ -45,7 +45,7 @@
  * future Swing releases. The current serialization support is
  * appropriate for short term storage or RMI between applications running
  * the same version of Swing.  As of 1.4, support for long term storage
- * of all JavaBeans<sup><font size="-2">TM</font></sup>
+ * of all JavaBeans&trade;
  * has been added to the <code>java.beans</code> package.
  * Please see {@link java.beans.XMLEncoder}.
  *
diff --git a/jdk/src/share/classes/javax/swing/plaf/metal/MetalTreeUI.java b/jdk/src/share/classes/javax/swing/plaf/metal/MetalTreeUI.java
index 131a5bd..29e7f45 100644
--- a/jdk/src/share/classes/javax/swing/plaf/metal/MetalTreeUI.java
+++ b/jdk/src/share/classes/javax/swing/plaf/metal/MetalTreeUI.java
@@ -46,7 +46,7 @@
  *
  * <table summary="Descriptions of supported hints: Angled, Horizontal, and None">
  *  <tr>
- *    <th><p align="left">Angled</p></th>
+ *    <th><p style="text-align:left">Angled</p></th>
  *    <td>A line is drawn connecting the child to the parent. For handling
  *          of the root node refer to
  *          {@link javax.swing.JTree#setRootVisible} and
@@ -54,11 +54,11 @@
  *    </td>
  *  </tr>
  *  <tr>
- *     <th><p align="left">Horizontal</p></th>
+ *     <th><p style="text-align:left">Horizontal</p></th>
  *     <td>A horizontal line is drawn dividing the children of the root node.</td>
  *  </tr>
  *  <tr>
- *      <th><p align="left">None</p></th>
+ *      <th><p style="text-align:left">None</p></th>
  *      <td>Do not draw any visual indication between nodes.</td>
  *  </tr>
  * </table>
diff --git a/jdk/src/share/classes/javax/swing/plaf/multi/MultiLookAndFeel.java b/jdk/src/share/classes/javax/swing/plaf/multi/MultiLookAndFeel.java
index 1007299..0e6c8e8 100644
--- a/jdk/src/share/classes/javax/swing/plaf/multi/MultiLookAndFeel.java
+++ b/jdk/src/share/classes/javax/swing/plaf/multi/MultiLookAndFeel.java
@@ -47,7 +47,7 @@
  * future Swing releases. The current serialization support is
  * appropriate for short term storage or RMI between applications running
  * the same version of Swing.  As of 1.4, support for long term storage
- * of all JavaBeans<sup><font size="-2">TM</font></sup>
+ * of all JavaBeans&trade;
  * has been added to the <code>java.beans</code> package.
  * Please see {@link java.beans.XMLEncoder}.
  *
diff --git a/jdk/src/share/classes/javax/swing/plaf/synth/SynthTextAreaUI.java b/jdk/src/share/classes/javax/swing/plaf/synth/SynthTextAreaUI.java
index f6b77bf..09b33ec 100644
--- a/jdk/src/share/classes/javax/swing/plaf/synth/SynthTextAreaUI.java
+++ b/jdk/src/share/classes/javax/swing/plaf/synth/SynthTextAreaUI.java
@@ -44,7 +44,7 @@
  * future Swing releases. The current serialization support is
  * appropriate for short term storage or RMI between applications running
  * the same version of Swing.  As of 1.4, support for long term storage
- * of all JavaBeans<sup><font size="-2">TM</font></sup>
+ * of all JavaBeans&trade;
  * has been added to the <code>java.beans</code> package.
  * Please see {@link java.beans.XMLEncoder}.
  *
diff --git a/jdk/src/share/classes/javax/swing/plaf/synth/SynthTextFieldUI.java b/jdk/src/share/classes/javax/swing/plaf/synth/SynthTextFieldUI.java
index d420d2d..9a1ae3e 100644
--- a/jdk/src/share/classes/javax/swing/plaf/synth/SynthTextFieldUI.java
+++ b/jdk/src/share/classes/javax/swing/plaf/synth/SynthTextFieldUI.java
@@ -43,7 +43,7 @@
  * future Swing releases. The current serialization support is
  * appropriate for short term storage or RMI between applications running
  * the same version of Swing.  As of 1.4, support for long term storage
- * of all JavaBeans<sup><font size="-2">TM</font></sup>
+ * of all JavaBeans&trade;
  * has been added to the <code>java.beans</code> package.
  * Please see {@link java.beans.XMLEncoder}.
  *
diff --git a/jdk/src/share/classes/javax/swing/plaf/synth/SynthTextPaneUI.java b/jdk/src/share/classes/javax/swing/plaf/synth/SynthTextPaneUI.java
index 3c5b4c2..8b21b4b 100644
--- a/jdk/src/share/classes/javax/swing/plaf/synth/SynthTextPaneUI.java
+++ b/jdk/src/share/classes/javax/swing/plaf/synth/SynthTextPaneUI.java
@@ -40,7 +40,7 @@
  * future Swing releases. The current serialization support is
  * appropriate for short term storage or RMI between applications running
  * the same version of Swing.  As of 1.4, support for long term storage
- * of all JavaBeans<sup><font size="-2">TM</font></sup>
+ * of all JavaBeans&trade;
  * has been added to the <code>java.beans</code> package.
  * Please see {@link java.beans.XMLEncoder}.
  *
diff --git a/jdk/src/share/classes/javax/swing/table/AbstractTableModel.java b/jdk/src/share/classes/javax/swing/table/AbstractTableModel.java
index b79290d..c9ea602 100644
--- a/jdk/src/share/classes/javax/swing/table/AbstractTableModel.java
+++ b/jdk/src/share/classes/javax/swing/table/AbstractTableModel.java
@@ -50,7 +50,7 @@
  * future Swing releases. The current serialization support is
  * appropriate for short term storage or RMI between applications running
  * the same version of Swing.  As of 1.4, support for long term storage
- * of all JavaBeans<sup><font size="-2">TM</font></sup>
+ * of all JavaBeans&trade;
  * has been added to the <code>java.beans</code> package.
  * Please see {@link java.beans.XMLEncoder}.
  *
diff --git a/jdk/src/share/classes/javax/swing/table/DefaultTableCellRenderer.java b/jdk/src/share/classes/javax/swing/table/DefaultTableCellRenderer.java
index 518b43c..61c6c9f 100644
--- a/jdk/src/share/classes/javax/swing/table/DefaultTableCellRenderer.java
+++ b/jdk/src/share/classes/javax/swing/table/DefaultTableCellRenderer.java
@@ -75,7 +75,7 @@
  * future Swing releases. The current serialization support is
  * appropriate for short term storage or RMI between applications running
  * the same version of Swing.  As of 1.4, support for long term storage
- * of all JavaBeans<sup><font size="-2">TM</font></sup>
+ * of all JavaBeans&trade;
  * has been added to the <code>java.beans</code> package.
  * Please see {@link java.beans.XMLEncoder}.
  *
@@ -150,7 +150,7 @@
 
     /**
      * Notification from the <code>UIManager</code> that the look and feel
-     * [L&F] has changed.
+     * [L&amp;F] has changed.
      * Replaces the current UI object with the latest version from the
      * <code>UIManager</code>.
      *
@@ -387,7 +387,7 @@
      * future Swing releases. The current serialization support is
      * appropriate for short term storage or RMI between applications running
      * the same version of Swing.  As of 1.4, support for long term storage
-     * of all JavaBeans<sup><font size="-2">TM</font></sup>
+     * of all JavaBeans&trade;
      * has been added to the <code>java.beans</code> package.
      * Please see {@link java.beans.XMLEncoder}.
      */
diff --git a/jdk/src/share/classes/javax/swing/table/DefaultTableColumnModel.java b/jdk/src/share/classes/javax/swing/table/DefaultTableColumnModel.java
index c0c30b0..4966489 100644
--- a/jdk/src/share/classes/javax/swing/table/DefaultTableColumnModel.java
+++ b/jdk/src/share/classes/javax/swing/table/DefaultTableColumnModel.java
@@ -44,7 +44,7 @@
  * future Swing releases. The current serialization support is
  * appropriate for short term storage or RMI between applications running
  * the same version of Swing.  As of 1.4, support for long term storage
- * of all JavaBeans<sup><font size="-2">TM</font></sup>
+ * of all JavaBeans&trade;
  * has been added to the <code>java.beans</code> package.
  * Please see {@link java.beans.XMLEncoder}.
  *
diff --git a/jdk/src/share/classes/javax/swing/table/DefaultTableModel.java b/jdk/src/share/classes/javax/swing/table/DefaultTableModel.java
index 623a719..5abf1e8 100644
--- a/jdk/src/share/classes/javax/swing/table/DefaultTableModel.java
+++ b/jdk/src/share/classes/javax/swing/table/DefaultTableModel.java
@@ -50,7 +50,7 @@
  * future Swing releases. The current serialization support is
  * appropriate for short term storage or RMI between applications running
  * the same version of Swing.  As of 1.4, support for long term storage
- * of all JavaBeans<sup><font size="-2">TM</font></sup>
+ * of all JavaBeans&trade;
  * has been added to the <code>java.beans</code> package.
  * Please see {@link java.beans.XMLEncoder}.
  *
@@ -418,15 +418,14 @@
      *
      *  <pre>
      *  Examples of moves:
-     *  <p>
+     *
      *  1. moveRow(1,3,5);
      *          a|B|C|D|e|f|g|h|i|j|k   - before
      *          a|e|f|g|h|B|C|D|i|j|k   - after
-     *  <p>
+     *
      *  2. moveRow(6,7,1);
      *          a|b|c|d|e|f|G|H|i|j|k   - before
      *          a|G|H|b|c|d|e|f|i|j|k   - after
-     *  <p>
      *  </pre>
      *
      * @param   start       the starting row index to be moved
diff --git a/jdk/src/share/classes/javax/swing/table/JTableHeader.java b/jdk/src/share/classes/javax/swing/table/JTableHeader.java
index 04420e2..65befd1 100644
--- a/jdk/src/share/classes/javax/swing/table/JTableHeader.java
+++ b/jdk/src/share/classes/javax/swing/table/JTableHeader.java
@@ -52,7 +52,7 @@
  * future Swing releases. The current serialization support is
  * appropriate for short term storage or RMI between applications running
  * the same version of Swing.  As of 1.4, support for long term storage
- * of all JavaBeans<sup><font size="-2">TM</font></sup>
+ * of all JavaBeans&trade;
  * has been added to the <code>java.beans</code> package.
  * Please see {@link java.beans.XMLEncoder}.
  *
@@ -437,7 +437,7 @@
 //
 
     /**
-     * Returns the look and feel (L&F) object that renders this component.
+     * Returns the look and feel (L&amp;F) object that renders this component.
      *
      * @return the <code>TableHeaderUI</code> object that renders this component
      */
@@ -446,9 +446,9 @@
     }
 
     /**
-     * Sets the look and feel (L&F) object that renders this component.
+     * Sets the look and feel (L&amp;F) object that renders this component.
      *
-     * @param ui  the <code>TableHeaderUI</code> L&F object
+     * @param ui  the <code>TableHeaderUI</code> L&amp;F object
      * @see UIDefaults#getUI
      */
     public void setUI(TableHeaderUI ui){
@@ -460,7 +460,7 @@
 
     /**
      * Notification from the <code>UIManager</code> that the look and feel
-     * (L&F) has changed.
+     * (L&amp;F) has changed.
      * Replaces the current UI object with the latest version from the
      * <code>UIManager</code>.
      *
@@ -478,7 +478,7 @@
 
     /**
      * Returns the suffix used to construct the name of the look and feel
-     * (L&F) class used to render this component.
+     * (L&amp;F) class used to render this component.
      * @return the string "TableHeaderUI"
      *
      * @return "TableHeaderUI"
@@ -776,7 +776,7 @@
      * future Swing releases. The current serialization support is
      * appropriate for short term storage or RMI between applications running
      * the same version of Swing.  As of 1.4, support for long term storage
-     * of all JavaBeans<sup><font size="-2">TM</font></sup>
+     * of all JavaBeans&trade;
      * has been added to the <code>java.beans</code> package.
      * Please see {@link java.beans.XMLEncoder}.
      */
diff --git a/jdk/src/share/classes/javax/swing/table/TableCellRenderer.java b/jdk/src/share/classes/javax/swing/table/TableCellRenderer.java
index f48c628..5257416 100644
--- a/jdk/src/share/classes/javax/swing/table/TableCellRenderer.java
+++ b/jdk/src/share/classes/javax/swing/table/TableCellRenderer.java
@@ -49,10 +49,10 @@
      * <pre>
      *     JTable.DropLocation dropLocation = table.getDropLocation();
      *     if (dropLocation != null
-     *             && !dropLocation.isInsertRow()
-     *             && !dropLocation.isInsertColumn()
-     *             && dropLocation.getRow() == row
-     *             && dropLocation.getColumn() == column) {
+     *             &amp;&amp; !dropLocation.isInsertRow()
+     *             &amp;&amp; !dropLocation.isInsertColumn()
+     *             &amp;&amp; dropLocation.getRow() == row
+     *             &amp;&amp; dropLocation.getColumn() == column) {
      *
      *         // this cell represents the current drop location
      *         // so render it specially, perhaps with a different color
diff --git a/jdk/src/share/classes/javax/swing/table/TableColumn.java b/jdk/src/share/classes/javax/swing/table/TableColumn.java
index af2a1b7..b7851e6 100644
--- a/jdk/src/share/classes/javax/swing/table/TableColumn.java
+++ b/jdk/src/share/classes/javax/swing/table/TableColumn.java
@@ -67,7 +67,7 @@
  * future Swing releases. The current serialization support is
  * appropriate for short term storage or RMI between applications running
  * the same version of Swing.  As of 1.4, support for long term storage
- * of all JavaBeans<sup><font size="-2">TM</font></sup>
+ * of all JavaBeans&trade;
  * has been added to the <code>java.beans</code> package.
  * Please see {@link java.beans.XMLEncoder}.
  *
diff --git a/jdk/src/share/classes/javax/swing/table/TableModel.java b/jdk/src/share/classes/javax/swing/table/TableModel.java
index 43544ee..2c4794b 100644
--- a/jdk/src/share/classes/javax/swing/table/TableModel.java
+++ b/jdk/src/share/classes/javax/swing/table/TableModel.java
@@ -40,7 +40,7 @@
  *      JTable table = new JTable(myData);
  *  </pre><p>
  *
- * For further documentation, see <a href="http://java.sun.com/docs/books/tutorial/uiswing/components/table.html#data">Creating a Table Model</a>
+ * For further documentation, see <a href="http://docs.oracle.com/javase/tutorial/uiswing/components/table.html#data">Creating a Table Model</a>
  * in <em>The Java Tutorial</em>.
  * <p>
  * @author Philip Milne
diff --git a/jdk/src/share/classes/javax/swing/text/AbstractDocument.java b/jdk/src/share/classes/javax/swing/text/AbstractDocument.java
index d9eefe3..e20d10a 100644
--- a/jdk/src/share/classes/javax/swing/text/AbstractDocument.java
+++ b/jdk/src/share/classes/javax/swing/text/AbstractDocument.java
@@ -90,7 +90,7 @@
  * future Swing releases. The current serialization support is
  * appropriate for short term storage or RMI between applications running
  * the same version of Swing.  As of 1.4, support for long term storage
- * of all JavaBeans<sup><font size="-2">TM</font></sup>
+ * of all JavaBeans&trade;
  * has been added to the <code>java.beans</code> package.
  * Please see {@link java.beans.XMLEncoder}.
  *
@@ -408,7 +408,7 @@
      * <p>
      * This method is thread safe, although most Swing methods
      * are not. Please see
-     * <A HREF="http://download.oracle.com/javase/tutorial/uiswing/concurrency/index.html">Concurrency
+     * <A HREF="http://docs.oracle.com/javase/tutorial/uiswing/concurrency/index.html">Concurrency
      * in Swing</A> for more information.
      *
      * @param r the renderer to execute
@@ -426,7 +426,7 @@
      * Returns the length of the data.  This is the number of
      * characters of content that represents the users data.
      *
-     * @return the length >= 0
+     * @return the length &gt;= 0
      * @see Document#getLength
      */
     public int getLength() {
@@ -569,11 +569,11 @@
      * <p>
      * This method is thread safe, although most Swing methods
      * are not. Please see
-     * <A HREF="http://download.oracle.com/javase/tutorial/uiswing/concurrency/index.html">Concurrency
+     * <A HREF="http://docs.oracle.com/javase/tutorial/uiswing/concurrency/index.html">Concurrency
      * in Swing</A> for more information.
      *
-     * @param offs the starting offset >= 0
-     * @param len the number of characters to remove >= 0
+     * @param offs the starting offset &gt;= 0
+     * @param len the number of characters to remove &gt;= 0
      * @exception BadLocationException  the given remove position is not a valid
      *   position within the document
      * @see Document#remove
@@ -682,10 +682,10 @@
      * <p>
      * This method is thread safe, although most Swing methods
      * are not. Please see
-     * <A HREF="http://download.oracle.com/javase/tutorial/uiswing/concurrency/index.html">Concurrency
+     * <A HREF="http://docs.oracle.com/javase/tutorial/uiswing/concurrency/index.html">Concurrency
      * in Swing</A> for more information.
      *
-     * @param offs the starting offset >= 0
+     * @param offs the starting offset &gt;= 0
      * @param str the string to insert; does nothing with null/empty strings
      * @param a the attributes for the inserted content
      * @exception BadLocationException  the given insert position is not a valid
@@ -777,8 +777,8 @@
     /**
      * Gets a sequence of text from the document.
      *
-     * @param offset the starting offset >= 0
-     * @param length the number of characters to retrieve >= 0
+     * @param offset the starting offset &gt;= 0
+     * @param length the number of characters to retrieve &gt;= 0
      * @return the text
      * @exception BadLocationException  the range given includes a position
      *   that is not a valid position within the document
@@ -810,7 +810,7 @@
      * &nbsp; Segment text = new Segment();
      * &nbsp; int offs = 0;
      * &nbsp; text.setPartialReturn(true);
-     * &nbsp; while (nleft > 0) {
+     * &nbsp; while (nleft &gt; 0) {
      * &nbsp;     doc.getText(offs, nleft, text);
      * &nbsp;     // do something with text
      * &nbsp;     nleft -= text.count;
@@ -818,8 +818,8 @@
      * &nbsp; }
      * </pre>
      *
-     * @param offset the starting offset >= 0
-     * @param length the number of characters to retrieve >= 0
+     * @param offset the starting offset &gt;= 0
+     * @param length the number of characters to retrieve &gt;= 0
      * @param txt the Segment object to retrieve the text into
      * @exception BadLocationException  the range given includes a position
      *   that is not a valid position within the document
@@ -837,10 +837,10 @@
      * <p>
      * This method is thread safe, although most Swing methods
      * are not. Please see
-     * <A HREF="http://download.oracle.com/javase/tutorial/uiswing/concurrency/index.html">Concurrency
+     * <A HREF="http://docs.oracle.com/javase/tutorial/uiswing/concurrency/index.html">Concurrency
      * in Swing</A> for more information.
      *
-     * @param offs the position in the model >= 0
+     * @param offs the position in the model &gt;= 0
      * @return the position
      * @exception BadLocationException  if the given position does not
      *   represent a valid location in the associated document
@@ -956,7 +956,7 @@
      * should keep in mind however that a paragraph should at least be the
      * unit of text over which to run the Unicode bidirectional algorithm.
      *
-     * @param pos the starting offset >= 0
+     * @param pos the starting offset &gt;= 0
      * @return the element */
     public abstract Element getParagraphElement(int pos);
 
@@ -1288,8 +1288,8 @@
      *
      * @param parent the parent element
      * @param a the attributes for the element
-     * @param p0 the beginning of the range >= 0
-     * @param p1 the end of the range >= p0
+     * @param p0 the beginning of the range &gt;= 0
+     * @param p1 the end of the range &gt;= p0
      * @return the new element
      */
     protected Element createLeafElement(Element parent, AttributeSet a, int p0, int p1) {
@@ -1610,7 +1610,7 @@
          * Creates a position within the content that will
          * track change as the content is mutated.
          *
-         * @param offset the offset in the content >= 0
+         * @param offset the offset in the content &gt;= 0
          * @return a Position
          * @exception BadLocationException for an invalid offset
          */
@@ -1619,14 +1619,14 @@
         /**
          * Current length of the sequence of character content.
          *
-         * @return the length >= 0
+         * @return the length &gt;= 0
          */
         public int length();
 
         /**
          * Inserts a string of characters into the sequence.
          *
-         * @param where   offset into the sequence to make the insertion >= 0
+         * @param where   offset into the sequence to make the insertion &gt;= 0
          * @param str     string to insert
          * @return  if the implementation supports a history mechanism,
          *    a reference to an <code>Edit</code> implementation will be returned,
@@ -1640,8 +1640,8 @@
          * Removes some portion of the sequence.
          *
          * @param where   The offset into the sequence to make the
-         *   insertion >= 0.
-         * @param nitems  The number of items in the sequence to remove >= 0.
+         *   insertion &gt;= 0.
+         * @param nitems  The number of items in the sequence to remove &gt;= 0.
          * @return  If the implementation supports a history mechansim,
          *    a reference to an Edit implementation will be returned,
          *    otherwise null.
@@ -1653,8 +1653,8 @@
         /**
          * Fetches a string of characters contained in the sequence.
          *
-         * @param where   Offset into the sequence to fetch >= 0.
-         * @param len     number of characters to copy >= 0.
+         * @param where   Offset into the sequence to fetch &gt;= 0.
+         * @param len     number of characters to copy &gt;= 0.
          * @return the string
          * @exception BadLocationException  Thrown if the area covered by
          *   the arguments is not contained in the character sequence.
@@ -1664,8 +1664,8 @@
         /**
          * Gets a sequence of characters and copies them into a Segment.
          *
-         * @param where the starting offset >= 0
-         * @param len the number of characters >= 0
+         * @param where the starting offset &gt;= 0
+         * @param len the number of characters &gt;= 0
          * @param txt the target location to copy into
          * @exception BadLocationException  Thrown if the area covered by
          *   the arguments is not contained in the character sequence.
@@ -1778,7 +1778,7 @@
      * future Swing releases. The current serialization support is
      * appropriate for short term storage or RMI between applications running
      * the same version of Swing.  As of 1.4, support for long term storage
-     * of all JavaBeans<sup><font size="-2">TM</font></sup>
+     * of all JavaBeans&trade;
      * has been added to the <code>java.beans</code> package.
      * Please see {@link java.beans.XMLEncoder}.
      */
@@ -1809,7 +1809,7 @@
          * Dumps a debugging representation of the element hierarchy.
          *
          * @param psOut the output stream
-         * @param indentAmount the indentation level >= 0
+         * @param indentAmount the indentation level &gt;= 0
          */
         public void dump(PrintStream psOut, int indentAmount) {
             PrintWriter out;
@@ -1867,7 +1867,7 @@
         /**
          * Gets the number of attributes that are defined.
          *
-         * @return the number of attributes >= 0
+         * @return the number of attributes &gt;= 0
          * @see AttributeSet#getAttributeCount
          */
         public int getAttributeCount() {
@@ -2116,21 +2116,21 @@
         /**
          * Gets the starting offset in the model for the element.
          *
-         * @return the offset >= 0
+         * @return the offset &gt;= 0
          */
         public abstract int getStartOffset();
 
         /**
          * Gets the ending offset in the model for the element.
          *
-         * @return the offset >= 0
+         * @return the offset &gt;= 0
          */
         public abstract int getEndOffset();
 
         /**
          * Gets a child element.
          *
-         * @param index the child index, >= 0 && < getElementCount()
+         * @param index the child index, &gt;= 0 &amp;&amp; &lt; getElementCount()
          * @return the child element
          */
         public abstract Element getElement(int index);
@@ -2138,15 +2138,15 @@
         /**
          * Gets the number of children for the element.
          *
-         * @return the number of children >= 0
+         * @return the number of children &gt;= 0
          */
         public abstract int getElementCount();
 
         /**
          * Gets the child element index closest to the given model offset.
          *
-         * @param offset the offset >= 0
-         * @return the element index >= 0
+         * @param offset the offset &gt;= 0
+         * @return the element index &gt;= 0
          */
         public abstract int getElementIndex(int offset);
 
@@ -2247,7 +2247,7 @@
      * future Swing releases. The current serialization support is
      * appropriate for short term storage or RMI between applications running
      * the same version of Swing.  As of 1.4, support for long term storage
-     * of all JavaBeans<sup><font size="-2">TM</font></sup>
+     * of all JavaBeans&trade;
      * has been added to the <code>java.beans</code> package.
      * Please see {@link java.beans.XMLEncoder}.
      */
@@ -2272,7 +2272,7 @@
          * Gets the child element that contains
          * the given model position.
          *
-         * @param pos the position >= 0
+         * @param pos the position &gt;= 0
          * @return the element, null if none
          */
         public Element positionToElement(int pos) {
@@ -2289,8 +2289,8 @@
         /**
          * Replaces content with a new set of elements.
          *
-         * @param offset the starting offset >= 0
-         * @param length the length to replace >= 0
+         * @param offset the starting offset &gt;= 0
+         * @param length the length to replace &gt;= 0
          * @param elems the new elements
          */
         public void replace(int offset, int length, Element[] elems) {
@@ -2342,7 +2342,7 @@
         /**
          * Gets the starting offset in the model for the element.
          *
-         * @return the offset >= 0
+         * @return the offset &gt;= 0
          */
         public int getStartOffset() {
             return children[0].getStartOffset();
@@ -2352,7 +2352,7 @@
          * Gets the ending offset in the model for the element.
          * @throws NullPointerException if this element has no children
          *
-         * @return the offset >= 0
+         * @return the offset &gt;= 0
          */
         public int getEndOffset() {
             Element child =
@@ -2363,7 +2363,7 @@
         /**
          * Gets a child element.
          *
-         * @param index the child index, >= 0 && < getElementCount()
+         * @param index the child index, &gt;= 0 &amp;&amp; &lt; getElementCount()
          * @return the child element, null if none
          */
         public Element getElement(int index) {
@@ -2376,7 +2376,7 @@
         /**
          * Gets the number of children for the element.
          *
-         * @return the number of children >= 0
+         * @return the number of children &gt;= 0
          */
         public int getElementCount()  {
             return nchildren;
@@ -2385,8 +2385,8 @@
         /**
          * Gets the child element index closest to the given model offset.
          *
-         * @param offset the offset >= 0
-         * @return the element index >= 0
+         * @param offset the offset &gt;= 0
+         * @return the element index &gt;= 0
          */
         public int getElementIndex(int offset) {
             int index;
@@ -2501,7 +2501,7 @@
      * future Swing releases. The current serialization support is
      * appropriate for short term storage or RMI between applications running
      * the same version of Swing.  As of 1.4, support for long term storage
-     * of all JavaBeans<sup><font size="-2">TM</font></sup>
+     * of all JavaBeans&trade;
      * has been added to the <code>java.beans</code> package.
      * Please see {@link java.beans.XMLEncoder}.
      *
@@ -2515,8 +2515,8 @@
          *
          * @param parent  The parent element
          * @param a       The element attributes
-         * @param offs0   The start offset >= 0
-         * @param offs1   The end offset >= offs0
+         * @param offs0   The start offset &gt;= 0
+         * @param offs1   The end offset &gt;= offs0
          * @since 1.4
          */
         public LeafElement(Element parent, AttributeSet a, int offs0, int offs1) {
@@ -2545,7 +2545,7 @@
         /**
          * Gets the starting offset in the model for the element.
          *
-         * @return the offset >= 0
+         * @return the offset &gt;= 0
          */
         public int getStartOffset() {
             return p0.getOffset();
@@ -2554,7 +2554,7 @@
         /**
          * Gets the ending offset in the model for the element.
          *
-         * @return the offset >= 0
+         * @return the offset &gt;= 0
          */
         public int getEndOffset() {
             return p1.getOffset();
@@ -2576,8 +2576,8 @@
         /**
          * Gets the child element index closest to the given model offset.
          *
-         * @param pos the offset >= 0
-         * @return the element index >= 0
+         * @param pos the offset &gt;= 0
+         * @return the element index &gt;= 0
          */
         public int getElementIndex(int pos) {
             return -1;
@@ -2586,7 +2586,7 @@
         /**
          * Gets a child element.
          *
-         * @param index the child index, >= 0 && < getElementCount()
+         * @param index the child index, &gt;= 0 &amp;&amp; &lt; getElementCount()
          * @return the child element
          */
         public Element getElement(int index) {
@@ -2596,7 +2596,7 @@
         /**
          * Returns the number of child elements.
          *
-         * @return the number of children >= 0
+         * @return the number of children &gt;= 0
          */
         public int getElementCount()  {
             return 0;
@@ -2731,8 +2731,8 @@
         /**
          * Constructs a change record.
          *
-         * @param offs the offset into the document of the change >= 0
-         * @param len  the length of the change >= 0
+         * @param offs the offset into the document of the change &gt;= 0
+         * @param len  the length of the change &gt;= 0
          * @param type the type of event (DocumentEvent.EventType)
          * @since 1.4
          */
@@ -2901,7 +2901,7 @@
         /**
          * Returns the offset within the document of the start of the change.
          *
-         * @return the offset >= 0
+         * @return the offset &gt;= 0
          * @see DocumentEvent#getOffset
          */
         public int getOffset() {
@@ -2911,7 +2911,7 @@
         /**
          * Returns the length of the change.
          *
-         * @return the length >= 0
+         * @return the length &gt;= 0
          * @see DocumentEvent#getLength
          */
         public int getLength() {
@@ -3024,7 +3024,7 @@
          * current model state for views that just attached to a model.
          *
          * @param e the element
-         * @param index the index into the model >= 0
+         * @param index the index into the model &gt;= 0
          * @param removed a set of elements that were removed
          * @param added a set of elements that were added
          */
@@ -3048,7 +3048,7 @@
         /**
          * Returns the index into the list of elements.
          *
-         * @return the index >= 0
+         * @return the index &gt;= 0
          */
         public int getIndex() {
             return index;
diff --git a/jdk/src/share/classes/javax/swing/text/AbstractWriter.java b/jdk/src/share/classes/javax/swing/text/AbstractWriter.java
index f3397e8..1a664ce 100644
--- a/jdk/src/share/classes/javax/swing/text/AbstractWriter.java
+++ b/jdk/src/share/classes/javax/swing/text/AbstractWriter.java
@@ -417,7 +417,7 @@
 
     /**
      * Increments the indent level. If indenting would cause
-     * <code>getIndentSpace()</code> *<code>getIndentLevel()</code> to be >
+     * <code>getIndentSpace()</code> *<code>getIndentLevel()</code> to be &gt;
      * than <code>getLineLength()</code> this will not cause an indent.
      */
     protected void incrIndent() {
@@ -663,7 +663,7 @@
     }
 
     /**
-     * Writes out the set of attributes as " <name>=<value>"
+     * Writes out the set of attributes as " &lt;name&gt;=&lt;value&gt;"
      * pairs. It throws an IOException when encountered.
      *
      * @param     attr an AttributeSet.
diff --git a/jdk/src/share/classes/javax/swing/text/AsyncBoxView.java b/jdk/src/share/classes/javax/swing/text/AsyncBoxView.java
index 7876a2c..7440eee 100644
--- a/jdk/src/share/classes/javax/swing/text/AsyncBoxView.java
+++ b/jdk/src/share/classes/javax/swing/text/AsyncBoxView.java
@@ -193,7 +193,7 @@
      * of the child at the given index.
      *
      * @param index the child index.  This should be a
-     *   value >= 0 and < getViewCount().
+     *   value &gt;= 0 and &lt; getViewCount().
      */
     protected ChildState getChildState(int index) {
         synchronized(stats) {
@@ -350,8 +350,8 @@
      * thread will not happen (i.e. the layout thread
      * acquires a read lock before doing anything).
      *
-     * @param offset the starting offset into the child views >= 0
-     * @param length the number of existing views to replace >= 0
+     * @param offset the starting offset into the child views &gt;= 0
+     * @param length the number of existing views to replace &gt;= 0
      * @param views the child views to insert
      */
     public void replace(int offset, int length, View[] views) {
@@ -417,7 +417,7 @@
      * the model.  This is implemented to fetch the view in the case
      * where there is a child view for each child element.
      *
-     * @param pos the position >= 0
+     * @param pos the position &gt;= 0
      * @return  index of the view representing the given position, or
      *   -1 if no view represents that position
      */
@@ -525,8 +525,8 @@
      * axis.  Since the minor axis is flexible, work is queued to resize
      * the children if the minor span changes.
      *
-     * @param width the width >= 0
-     * @param height the height >= 0
+     * @param width the width &gt;= 0
+     * @param height the height &gt;= 0
      */
     public void setSize(float width, float height) {
         setSpanOnAxis(X_AXIS, width);
@@ -618,7 +618,7 @@
      * axis.
      *
      * @param axis may be either View.X_AXIS or View.Y_AXIS
-     * @return   the span the view would like to be rendered into >= 0.
+     * @return   the span the view would like to be rendered into &gt;= 0.
      *           Typically the view is told to render into the span
      *           that is returned, although there is no guarantee.
      *           The parent may choose to resize or break the view.
@@ -643,7 +643,7 @@
      * axis.
      *
      * @param axis may be either View.X_AXIS or View.Y_AXIS
-     * @return  the span the view would like to be rendered into >= 0.
+     * @return  the span the view would like to be rendered into &gt;= 0.
      *           Typically the view is told to render into the span
      *           that is returned, although there is no guarantee.
      *           The parent may choose to resize or break the view.
@@ -671,7 +671,7 @@
      * axis.
      *
      * @param axis may be either View.X_AXIS or View.Y_AXIS
-     * @return   the span the view would like to be rendered into >= 0.
+     * @return   the span the view would like to be rendered into &gt;= 0.
      *           Typically the view is told to render into the span
      *           that is returned, although there is no guarantee.
      *           The parent may choose to resize or break the view.
@@ -690,7 +690,7 @@
      * the default is to not be a composite view this
      * returns 0.
      *
-     * @return the number of views >= 0
+     * @return the number of views &gt;= 0
      * @see View#getViewCount
      */
     public int getViewCount() {
@@ -703,7 +703,7 @@
      * Gets the nth child view.  Since there are no
      * children by default, this returns null.
      *
-     * @param n the number of the view to get, >= 0 && < getViewCount()
+     * @param n the number of the view to get, &gt;= 0 &amp;&amp; &lt; getViewCount()
      * @return the view
      */
     public View getView(int n) {
@@ -721,7 +721,7 @@
      * their location.  This returns null since the
      * default is to not have any child views.
      *
-     * @param index the index of the child, >= 0 && < getViewCount()
+     * @param index the index of the child, &gt;= 0 &amp;&amp; &lt; getViewCount()
      * @param a  the allocation to this view.
      * @return the allocation to the child
      */
@@ -736,7 +736,7 @@
      * to return -1 to indicate there is no valid child index for any
      * position.
      *
-     * @param pos the position >= 0
+     * @param pos the position &gt;= 0
      * @return  index of the view representing the given position, or
      *   -1 if no view represents that position
      * @since 1.3
@@ -749,7 +749,7 @@
      * Provides a mapping from the document model coordinate space
      * to the coordinate space of the view mapped to it.
      *
-     * @param pos the position to convert >= 0
+     * @param pos the position to convert &gt;= 0
      * @param a the allocated region to render into
      * @param b the bias toward the previous character or the
      *  next character represented by the offset, in case the
@@ -788,11 +788,11 @@
      * on the child view with a lock on the ChildState object
      * to avoid interaction with the layout thread.
      *
-     * @param x the X coordinate >= 0
-     * @param y the Y coordinate >= 0
+     * @param x the X coordinate &gt;= 0
+     * @param y the Y coordinate &gt;= 0
      * @param a the allocated region to render into
      * @return the location within the model that best represents the
-     *  given point in the view >= 0.  The biasReturn argument will be
+     *  given point in the view &gt;= 0.  The biasReturn argument will be
      * filled in to indicate that the point given is closer to the next
      * character in the model or the previous character in the model.
      */
@@ -828,16 +828,16 @@
      * they might not be in the same order found in the model, or they just
      * might not allow access to some of the locations in the model.
      *
-     * @param pos the position to convert >= 0
+     * @param pos the position to convert &gt;= 0
      * @param a the allocated region to render into
      * @param direction the direction from the current position that can
      *  be thought of as the arrow keys typically found on a keyboard;
      *  this may be one of the following:
-     *  <ul>
-     *  <code>SwingConstants.WEST</code>
-     *  <code>SwingConstants.EAST</code>
-     *  <code>SwingConstants.NORTH</code>
-     *  <code>SwingConstants.SOUTH</code>
+     *  <ul style="list-style-type:none">
+     *  <li><code>SwingConstants.WEST</code></li>
+     *  <li><code>SwingConstants.EAST</code></li>
+     *  <li><code>SwingConstants.NORTH</code></li>
+     *  <li><code>SwingConstants.SOUTH</code></li>
      *  </ul>
      * @param biasRet an array contain the bias that was checked
      * @return the location within the model that best represents the next
@@ -1007,8 +1007,8 @@
          * with one or more calls to getChildAllocation that
          * should also be in the synchronized block.
          *
-         * @param x the X coordinate >= 0
-         * @param y the Y coordinate >= 0
+         * @param x the X coordinate &gt;= 0
+         * @param y the Y coordinate &gt;= 0
          * @param a the allocation to the View
          * @return the nearest child index
          */
diff --git a/jdk/src/share/classes/javax/swing/text/AttributeSet.java b/jdk/src/share/classes/javax/swing/text/AttributeSet.java
index 659136d..dc146e5 100644
--- a/jdk/src/share/classes/javax/swing/text/AttributeSet.java
+++ b/jdk/src/share/classes/javax/swing/text/AttributeSet.java
@@ -89,7 +89,7 @@
      * Returns the number of attributes that are defined locally in this set.
      * Attributes that are defined in the parent set are not included.
      *
-     * @return the number of attributes >= 0
+     * @return the number of attributes &gt;= 0
      */
     public int getAttributeCount();
 
diff --git a/jdk/src/share/classes/javax/swing/text/BadLocationException.java b/jdk/src/share/classes/javax/swing/text/BadLocationException.java
index c900e61..62032ae 100644
--- a/jdk/src/share/classes/javax/swing/text/BadLocationException.java
+++ b/jdk/src/share/classes/javax/swing/text/BadLocationException.java
@@ -33,7 +33,7 @@
  * future Swing releases. The current serialization support is
  * appropriate for short term storage or RMI between applications running
  * the same version of Swing.  As of 1.4, support for long term storage
- * of all JavaBeans<sup><font size="-2">TM</font></sup>
+ * of all JavaBeans&trade;
  * has been added to the <code>java.beans</code> package.
  * Please see {@link java.beans.XMLEncoder}.
  *
diff --git a/jdk/src/share/classes/javax/swing/text/DateFormatter.java b/jdk/src/share/classes/javax/swing/text/DateFormatter.java
index 68310bc..b301bf9 100644
--- a/jdk/src/share/classes/javax/swing/text/DateFormatter.java
+++ b/jdk/src/share/classes/javax/swing/text/DateFormatter.java
@@ -39,7 +39,7 @@
  * future Swing releases. The current serialization support is
  * appropriate for short term storage or RMI between applications running
  * the same version of Swing.  As of 1.4, support for long term storage
- * of all JavaBeans<sup><font size="-2">TM</font></sup>
+ * of all JavaBeans&trade;
  * has been added to the <code>java.beans</code> package.
  * Please see {@link java.beans.XMLEncoder}.
  *
diff --git a/jdk/src/share/classes/javax/swing/text/DefaultCaret.java b/jdk/src/share/classes/javax/swing/text/DefaultCaret.java
index 0d2031c..7b06fb3 100644
--- a/jdk/src/share/classes/javax/swing/text/DefaultCaret.java
+++ b/jdk/src/share/classes/javax/swing/text/DefaultCaret.java
@@ -98,7 +98,7 @@
  * future Swing releases. The current serialization support is
  * appropriate for short term storage or RMI between applications running
  * the same version of Swing.  As of 1.4, support for long term storage
- * of all JavaBeans<sup><font size="-2">TM</font></sup>
+ * of all JavaBeans&trade;
  * has been added to the <code>java.beans</code> package.
  * Please see {@link java.beans.XMLEncoder}.
  *
@@ -237,7 +237,7 @@
      * <p>
      * This method is thread safe, although most Swing methods
      * are not. Please see
-     * <A HREF="http://download.oracle.com/javase/tutorial/uiswing/concurrency/index.html">Concurrency
+     * <A HREF="http://docs.oracle.com/javase/tutorial/uiswing/concurrency/index.html">Concurrency
      * in Swing</A> for more information.
      */
     protected final synchronized void repaint() {
diff --git a/jdk/src/share/classes/javax/swing/text/DefaultEditorKit.java b/jdk/src/share/classes/javax/swing/text/DefaultEditorKit.java
index cd31010..f47a1c6 100644
--- a/jdk/src/share/classes/javax/swing/text/DefaultEditorKit.java
+++ b/jdk/src/share/classes/javax/swing/text/DefaultEditorKit.java
@@ -840,7 +840,7 @@
      * future Swing releases. The current serialization support is
      * appropriate for short term storage or RMI between applications running
      * the same version of Swing.  As of 1.4, support for long term storage
-     * of all JavaBeans<sup><font size="-2">TM</font></sup>
+     * of all JavaBeans&trade;
      * has been added to the <code>java.beans</code> package.
      * Please see {@link java.beans.XMLEncoder}.
      *
@@ -899,7 +899,7 @@
      * future Swing releases. The current serialization support is
      * appropriate for short term storage or RMI between applications running
      * the same version of Swing.  As of 1.4, support for long term storage
-     * of all JavaBeans<sup><font size="-2">TM</font></sup>
+     * of all JavaBeans&trade;
      * has been added to the <code>java.beans</code> package.
      * Please see {@link java.beans.XMLEncoder}.
      *
@@ -947,7 +947,7 @@
      * future Swing releases. The current serialization support is
      * appropriate for short term storage or RMI between applications running
      * the same version of Swing.  As of 1.4, support for long term storage
-     * of all JavaBeans<sup><font size="-2">TM</font></sup>
+     * of all JavaBeans&trade;
      * has been added to the <code>java.beans</code> package.
      * Please see {@link java.beans.XMLEncoder}.
      *
@@ -989,7 +989,7 @@
      * future Swing releases. The current serialization support is
      * appropriate for short term storage or RMI between applications running
      * the same version of Swing.  As of 1.4, support for long term storage
-     * of all JavaBeans<sup><font size="-2">TM</font></sup>
+     * of all JavaBeans&trade;
      * has been added to the <code>java.beans</code> package.
      * Please see {@link java.beans.XMLEncoder}.
      *
@@ -1265,7 +1265,7 @@
      * future Swing releases. The current serialization support is
      * appropriate for short term storage or RMI between applications running
      * the same version of Swing.  As of 1.4, support for long term storage
-     * of all JavaBeans<sup><font size="-2">TM</font></sup>
+     * of all JavaBeans&trade;
      * has been added to the <code>java.beans</code> package.
      * Please see {@link java.beans.XMLEncoder}.
      *
@@ -1301,7 +1301,7 @@
      * future Swing releases. The current serialization support is
      * appropriate for short term storage or RMI between applications running
      * the same version of Swing.  As of 1.4, support for long term storage
-     * of all JavaBeans<sup><font size="-2">TM</font></sup>
+     * of all JavaBeans&trade;
      * has been added to the <code>java.beans</code> package.
      * Please see {@link java.beans.XMLEncoder}.
      *
@@ -1338,7 +1338,7 @@
      * future Swing releases. The current serialization support is
      * appropriate for short term storage or RMI between applications running
      * the same version of Swing.  As of 1.4, support for long term storage
-     * of all JavaBeans<sup><font size="-2">TM</font></sup>
+     * of all JavaBeans&trade;
      * has been added to the <code>java.beans</code> package.
      * Please see {@link java.beans.XMLEncoder}.
      *
@@ -1373,7 +1373,7 @@
      * future Swing releases. The current serialization support is
      * appropriate for short term storage or RMI between applications running
      * the same version of Swing.  As of 1.4, support for long term storage
-     * of all JavaBeans<sup><font size="-2">TM</font></sup>
+     * of all JavaBeans&trade;
      * has been added to the <code>java.beans</code> package.
      * Please see {@link java.beans.XMLEncoder}.
      *
diff --git a/jdk/src/share/classes/javax/swing/text/DefaultFormatter.java b/jdk/src/share/classes/javax/swing/text/DefaultFormatter.java
index b67966a..1933d38 100644
--- a/jdk/src/share/classes/javax/swing/text/DefaultFormatter.java
+++ b/jdk/src/share/classes/javax/swing/text/DefaultFormatter.java
@@ -50,7 +50,7 @@
  * future Swing releases. The current serialization support is
  * appropriate for short term storage or RMI between applications running
  * the same version of Swing.  As of 1.4, support for long term storage
- * of all JavaBeans<sup><font size="-2">TM</font></sup>
+ * of all JavaBeans&trade;
  * has been added to the <code>java.beans</code> package.
  * Please see {@link java.beans.XMLEncoder}.
  *
diff --git a/jdk/src/share/classes/javax/swing/text/DefaultFormatterFactory.java b/jdk/src/share/classes/javax/swing/text/DefaultFormatterFactory.java
index ad367df..7474dcb 100644
--- a/jdk/src/share/classes/javax/swing/text/DefaultFormatterFactory.java
+++ b/jdk/src/share/classes/javax/swing/text/DefaultFormatterFactory.java
@@ -64,7 +64,7 @@
  * future Swing releases. The current serialization support is
  * appropriate for short term storage or RMI between applications running
  * the same version of Swing.  As of 1.4, support for long term storage
- * of all JavaBeans<sup><font size="-2">TM</font></sup>
+ * of all JavaBeans&trade;
  * has been added to the <code>java.beans</code> package.
  * Please see {@link java.beans.XMLEncoder}.
  *
diff --git a/jdk/src/share/classes/javax/swing/text/DefaultStyledDocument.java b/jdk/src/share/classes/javax/swing/text/DefaultStyledDocument.java
index 4a6419e..ec94ebd 100644
--- a/jdk/src/share/classes/javax/swing/text/DefaultStyledDocument.java
+++ b/jdk/src/share/classes/javax/swing/text/DefaultStyledDocument.java
@@ -61,7 +61,7 @@
  * future Swing releases. The current serialization support is
  * appropriate for short term storage or RMI between applications running
  * the same version of Swing.  As of 1.4, support for long term storage
- * of all JavaBeans<sup><font size="-2">TM</font></sup>
+ * of all JavaBeans&trade;
  * has been added to the <code>java.beans</code> package.
  * Please see {@link java.beans.XMLEncoder}.
  *
@@ -173,7 +173,7 @@
      * <p>
      * This method is thread safe, although most Swing methods
      * are not. Please see
-     * <A HREF="http://download.oracle.com/javase/tutorial/uiswing/concurrency/index.html">Concurrency
+     * <A HREF="http://docs.oracle.com/javase/tutorial/uiswing/concurrency/index.html">Concurrency
      * in Swing</A> for more information.
      *
      * @param offset the starting offset &gt;= 0
@@ -426,7 +426,7 @@
      * <p>
      * This method is thread safe, although most Swing methods
      * are not. Please see
-     * <A HREF="http://download.oracle.com/javase/tutorial/uiswing/concurrency/index.html">Concurrency
+     * <A HREF="http://docs.oracle.com/javase/tutorial/uiswing/concurrency/index.html">Concurrency
      * in Swing</A> for more information.
      *
      * @param pos the offset from the start of the document &gt;= 0
@@ -483,7 +483,7 @@
      * <p>
      * This method is thread safe, although most Swing methods
      * are not. Please see
-     * <A HREF="http://download.oracle.com/javase/tutorial/uiswing/concurrency/index.html">Concurrency
+     * <A HREF="http://docs.oracle.com/javase/tutorial/uiswing/concurrency/index.html">Concurrency
      * in Swing</A> for more information.
      *
      * @param offset the offset in the document &gt;= 0
@@ -536,7 +536,7 @@
      * <p>
      * This method is thread safe, although most Swing methods
      * are not. Please see
-     * <A HREF="http://download.oracle.com/javase/tutorial/uiswing/concurrency/index.html">Concurrency
+     * <A HREF="http://docs.oracle.com/javase/tutorial/uiswing/concurrency/index.html">Concurrency
      * in Swing</A> for more information.
      *
      * @param offset the offset into the paragraph &gt;= 0
@@ -1124,7 +1124,7 @@
      * future Swing releases. The current serialization support is
      * appropriate for short term storage or RMI between applications running
      * the same version of Swing.  As of 1.4, support for long term storage
-     * of all JavaBeans<sup><font size="-2">TM</font></sup>
+     * of all JavaBeans&trade;
      * has been added to the <code>java.beans</code> package.
      * Please see {@link java.beans.XMLEncoder}.
      */
@@ -1155,7 +1155,7 @@
      * future Swing releases. The current serialization support is
      * appropriate for short term storage or RMI between applications running
      * the same version of Swing.  As of 1.4, support for long term storage
-     * of all JavaBeans<sup><font size="-2">TM</font></sup>
+     * of all JavaBeans&trade;
      * has been added to the <code>java.beans</code> package.
      * Please see {@link java.beans.XMLEncoder}.
      */
@@ -1390,7 +1390,7 @@
      * future Swing releases. The current serialization support is
      * appropriate for short term storage or RMI between applications running
      * the same version of Swing.  As of 1.4, support for long term storage
-     * of all JavaBeans<sup><font size="-2">TM</font></sup>
+     * of all JavaBeans&trade;
      * has been added to the <code>java.beans</code> package.
      * Please see {@link java.beans.XMLEncoder}.
      */
diff --git a/jdk/src/share/classes/javax/swing/text/Document.java b/jdk/src/share/classes/javax/swing/text/Document.java
index 5150570..5ce9b4c 100644
--- a/jdk/src/share/classes/javax/swing/text/Document.java
+++ b/jdk/src/share/classes/javax/swing/text/Document.java
@@ -46,7 +46,7 @@
  * used are the location between two characters.  As the diagram
  * below shows, a location in a text document can be referred to
  * as a position, or an offset. This position is zero-based.
- * <p align=center><img src="doc-files/Document-coord.gif"
+ * <p style="text-align:center"><img src="doc-files/Document-coord.gif"
  * alt="The following text describes this graphic.">
  * <p>
  * In the example, if the content of a document is the
@@ -69,7 +69,7 @@
  * Exactly what structure is modeled is up to a particular Document
  * implementation.  It might be as simple as no structure (i.e. a
  * simple text field), or it might be something like diagram below.
- * <p align=center><img src="doc-files/Document-structure.gif"
+ * <p style="text-align:center"><img src="doc-files/Document-structure.gif"
  * alt="Diagram shows Book->Chapter->Paragraph">
  * <p>
  * The unit of structure (i.e. a node of the tree) is referred to
@@ -122,7 +122,7 @@
  * generated since that edit is actually the source of the change
  * rather than a mutation to the <code>Document</code> made through its
  * api.
- * <p align=center><img src="doc-files/Document-notification.gif"
+ * <p style="text-align:center"><img src="doc-files/Document-notification.gif"
  * alt="The preceeding text describes this graphic.">
  * <p>
  * Referring to the above diagram, suppose that the component shown
@@ -187,7 +187,7 @@
      * Returns number of characters of content currently
      * in the document.
      *
-     * @return number of characters >= 0
+     * @return number of characters &gt;= 0
      */
     public int getLength();
 
@@ -267,7 +267,7 @@
      * For a removal, the end of the removal range is collapsed
      * down to the start of the range, and any marks in the removal
      * range are collapsed down to the start of the range.
-     * <p align=center><img src="doc-files/Document-remove.gif"
+     * <p style="text-align:center"><img src="doc-files/Document-remove.gif"
      *  alt="Diagram shows removal of 'quick' from 'The quick brown fox.'">
      * <p>
      * If the Document structure changed as result of the removal,
@@ -280,8 +280,8 @@
      * If the Document supports undo/redo, an UndoableEditEvent will
      * also be generated.
      *
-     * @param offs  the offset from the beginning >= 0
-     * @param len   the number of characters to remove >= 0
+     * @param offs  the offset from the beginning &gt;= 0
+     * @param len   the number of characters to remove &gt;= 0
      * @exception BadLocationException  some portion of the removal range
      *   was not a valid part of the document.  The location in the exception
      *   is the first bad position encountered.
@@ -300,7 +300,7 @@
      * insertUpdate method on the DocumentListener.
      * The offset and length of the generated DocumentEvent
      * will indicate what change was actually made to the Document.
-     * <p align=center><img src="doc-files/Document-insert.gif"
+     * <p style="text-align:center"><img src="doc-files/Document-insert.gif"
      *  alt="Diagram shows insertion of 'quick' in 'The quick brown fox'">
      * <p>
      * If the Document structure changed as result of the insertion,
@@ -313,7 +313,7 @@
      * If the Document supports undo/redo, an UndoableEditEvent will
      * also be generated.
      *
-     * @param offset  the offset into the document to insert the content >= 0.
+     * @param offset  the offset into the document to insert the content &gt;= 0.
      *    All positions that track change at or after the given location
      *    will move.
      * @param str    the string to insert
@@ -333,9 +333,9 @@
      * of the document.
      *
      * @param offset  the offset into the document representing the desired
-     *   start of the text >= 0
-     * @param length  the length of the desired string >= 0
-     * @return the text, in a String of length >= 0
+     *   start of the text &gt;= 0
+     * @param length  the length of the desired string &gt;= 0
+     * @return the text, in a String of length &gt;= 0
      * @exception BadLocationException  some portion of the given range
      *   was not a valid part of the document.  The location in the exception
      *   is the first bad position encountered.
@@ -361,7 +361,7 @@
      * &nbsp; Segment text = new Segment();
      * &nbsp; int offs = 0;
      * &nbsp; text.setPartialReturn(true);
-     * &nbsp; while (nleft > 0) {
+     * &nbsp; while (nleft &gt; 0) {
      * &nbsp;     doc.getText(offs, nleft, text);
      * &nbsp;     // do someting with text
      * &nbsp;     nleft -= text.count;
@@ -371,8 +371,8 @@
      * </code></pre>
      *
      * @param offset  the offset into the document representing the desired
-     *   start of the text >= 0
-     * @param length  the length of the desired string >= 0
+     *   start of the text &gt;= 0
+     * @param length  the length of the desired string &gt;= 0
      * @param txt the Segment object to return the text in
      *
      * @exception BadLocationException  Some portion of the given range
@@ -409,7 +409,7 @@
      * insertion is forced to a position that follows the
      * original position.
      *
-     * @param offs  the offset from the start of the document >= 0
+     * @param offs  the offset from the start of the document &gt;= 0
      * @return the position
      * @exception BadLocationException  if the given position does not
      *   represent a valid location in the associated document
diff --git a/jdk/src/share/classes/javax/swing/text/Element.java b/jdk/src/share/classes/javax/swing/text/Element.java
index b0510a2..cde494b 100644
--- a/jdk/src/share/classes/javax/swing/text/Element.java
+++ b/jdk/src/share/classes/javax/swing/text/Element.java
@@ -69,7 +69,7 @@
      * children, this will be the offset of the first child.
      * As a document position, there is an implied forward bias.
      *
-     * @return the starting offset >= 0 and < getEndOffset();
+     * @return the starting offset &gt;= 0 and &lt; getEndOffset();
      * @see Document
      * @see AbstractDocument
      */
@@ -87,8 +87,8 @@
      * the document. As a result of this, it is possible for this to
      * return a value greater than the length of the document.
      *
-     * @return the ending offset > getStartOffset() and
-     *     <= getDocument().getLength() + 1
+     * @return the ending offset &gt; getStartOffset() and
+     *     &lt;= getDocument().getLength() + 1
      * @see Document
      * @see AbstractDocument
      */
@@ -105,8 +105,8 @@
      * <code>getElementCount() - 1</code> if the location is
      * greater than or equal to the end offset.
      *
-     * @param offset the specified offset >= 0
-     * @return the element index >= 0
+     * @param offset the specified offset &gt;= 0
+     * @return the element index &gt;= 0
      */
     public int getElementIndex(int offset);
 
@@ -114,14 +114,14 @@
      * Gets the number of child elements contained by this element.
      * If this element is a leaf, a count of zero is returned.
      *
-     * @return the number of child elements >= 0
+     * @return the number of child elements &gt;= 0
      */
     public int getElementCount();
 
     /**
      * Fetches the child element at the given index.
      *
-     * @param index the specified index >= 0
+     * @param index the specified index &gt;= 0
      * @return the child element
      */
     public Element getElement(int index);
diff --git a/jdk/src/share/classes/javax/swing/text/InternationalFormatter.java b/jdk/src/share/classes/javax/swing/text/InternationalFormatter.java
index 52331d7..f7308d4 100644
--- a/jdk/src/share/classes/javax/swing/text/InternationalFormatter.java
+++ b/jdk/src/share/classes/javax/swing/text/InternationalFormatter.java
@@ -83,7 +83,7 @@
  * future Swing releases. The current serialization support is
  * appropriate for short term storage or RMI between applications running
  * the same version of Swing.  As of 1.4, support for long term storage
- * of all JavaBeans<sup><font size="-2">TM</font></sup>
+ * of all JavaBeans&trade;
  * has been added to the <code>java.beans</code> package.
  * Please see {@link java.beans.XMLEncoder}.
  *
diff --git a/jdk/src/share/classes/javax/swing/text/JTextComponent.java b/jdk/src/share/classes/javax/swing/text/JTextComponent.java
index c88b116..52052b7 100644
--- a/jdk/src/share/classes/javax/swing/text/JTextComponent.java
+++ b/jdk/src/share/classes/javax/swing/text/JTextComponent.java
@@ -84,7 +84,7 @@
  * support).
  * You can find information on how to use the functionality
  * this class provides in
- * <a href="http://java.sun.com/docs/books/tutorial/uiswing/components/generaltext.html">General Rules for Using Text Components</a>,
+ * <a href="http://docs.oracle.com/javase/tutorial/uiswing/components/generaltext.html">General Rules for Using Text Components</a>,
  * a section in <em>The Java Tutorial.</em>
  *
  * <p>
@@ -281,7 +281,7 @@
  * future Swing releases. The current serialization support is
  * appropriate for short term storage or RMI between applications running
  * the same version of Swing.  As of 1.4, support for long term storage
- * of all JavaBeans<sup><font size="-2">TM</font></sup>
+ * of all JavaBeans&trade;
  * has been added to the <code>java.beans</code> package.
  * Please see {@link java.beans.XMLEncoder}.
  *
@@ -1122,7 +1122,7 @@
      * future Swing releases. The current serialization support is
      * appropriate for short term storage or RMI between applications running
      * the same version of Swing.  As of 1.4, support for long term storage
-     * of all JavaBeans<sup><font size="-2">TM</font></sup>
+     * of all JavaBeans&trade;
      * has been added to the <code>java.beans</code> package.
      * Please see {@link java.beans.XMLEncoder}.
      */
@@ -2215,7 +2215,7 @@
      * <p>
      * This method is thread-safe, although most Swing methods are not. Please
      * see <A
-     * HREF="http://download.oracle.com/javase/tutorial/uiswing/concurrency/index.html">
+     * HREF="http://docs.oracle.com/javase/tutorial/uiswing/concurrency/index.html">
      * Concurrency in Swing</A> for more information.
      *
      * <p>
@@ -2473,7 +2473,7 @@
      * <p>
      * This method is thread-safe, although most Swing methods are not. Please
      * see <A
-     * HREF="http://download.oracle.com/javase/tutorial/uiswing/concurrency/index.html">
+     * HREF="http://docs.oracle.com/javase/tutorial/uiswing/concurrency/index.html">
      * Concurrency in Swing</A> for more information.
      *
      * <p>
@@ -2539,7 +2539,7 @@
      * future Swing releases. The current serialization support is
      * appropriate for short term storage or RMI between applications running
      * the same version of Swing.  As of 1.4, support for long term storage
-     * of all JavaBeans<sup><font size="-2">TM</font></sup>
+     * of all JavaBeans&trade;
      * has been added to the <code>java.beans</code> package.
      * Please see {@link java.beans.XMLEncoder}.
      */
diff --git a/jdk/src/share/classes/javax/swing/text/MaskFormatter.java b/jdk/src/share/classes/javax/swing/text/MaskFormatter.java
index a477e61..2285e4e 100644
--- a/jdk/src/share/classes/javax/swing/text/MaskFormatter.java
+++ b/jdk/src/share/classes/javax/swing/text/MaskFormatter.java
@@ -40,7 +40,7 @@
  * <table border=1 summary="Valid characters and their descriptions">
  * <tr>
  *    <th>Character&nbsp;</th>
- *    <th><p align="left">Description</p></th>
+ *    <th><p style="text-align:left">Description</p></th>
  * </tr>
  * <tr>
  *    <td>#</td>
@@ -143,7 +143,7 @@
  * future Swing releases. The current serialization support is
  * appropriate for short term storage or RMI between applications running
  * the same version of Swing.  As of 1.4, support for long term storage
- * of all JavaBeans<sup><font size="-2">TM</font></sup>
+ * of all JavaBeans&trade;
  * has been added to the <code>java.beans</code> package.
  * Please see {@link java.beans.XMLEncoder}.
  *
diff --git a/jdk/src/share/classes/javax/swing/text/NumberFormatter.java b/jdk/src/share/classes/javax/swing/text/NumberFormatter.java
index 9500dcc..1af2b30 100644
--- a/jdk/src/share/classes/javax/swing/text/NumberFormatter.java
+++ b/jdk/src/share/classes/javax/swing/text/NumberFormatter.java
@@ -83,7 +83,7 @@
  * future Swing releases. The current serialization support is
  * appropriate for short term storage or RMI between applications running
  * the same version of Swing.  As of 1.4, support for long term storage
- * of all JavaBeans<sup><font size="-2">TM</font></sup>
+ * of all JavaBeans&trade;
  * has been added to the <code>java.beans</code> package.
  * Please see {@link java.beans.XMLEncoder}.
  *
diff --git a/jdk/src/share/classes/javax/swing/text/PlainDocument.java b/jdk/src/share/classes/javax/swing/text/PlainDocument.java
index 8424faf..8c731da 100644
--- a/jdk/src/share/classes/javax/swing/text/PlainDocument.java
+++ b/jdk/src/share/classes/javax/swing/text/PlainDocument.java
@@ -48,7 +48,7 @@
  * future Swing releases. The current serialization support is
  * appropriate for short term storage or RMI between applications running
  * the same version of Swing.  As of 1.4, support for long term storage
- * of all JavaBeans<sup><font size="-2">TM</font></sup>
+ * of all JavaBeans&trade;
  * has been added to the <code>java.beans</code> package.
  * Please see {@link java.beans.XMLEncoder}.
  *
@@ -100,7 +100,7 @@
      * <p>
      * This method is thread safe, although most Swing methods
      * are not. Please see
-     * <A HREF="http://download.oracle.com/javase/tutorial/uiswing/concurrency/index.html">Concurrency
+     * <A HREF="http://docs.oracle.com/javase/tutorial/uiswing/concurrency/index.html">Concurrency
      * in Swing</A> for more information.
      *
      * @param offs the starting offset &gt;= 0
diff --git a/jdk/src/share/classes/javax/swing/text/SimpleAttributeSet.java b/jdk/src/share/classes/javax/swing/text/SimpleAttributeSet.java
index b0ad80e..8539687 100644
--- a/jdk/src/share/classes/javax/swing/text/SimpleAttributeSet.java
+++ b/jdk/src/share/classes/javax/swing/text/SimpleAttributeSet.java
@@ -41,7 +41,7 @@
  * future Swing releases. The current serialization support is
  * appropriate for short term storage or RMI between applications running
  * the same version of Swing.  As of 1.4, support for long term storage
- * of all JavaBeans<sup><font size="-2">TM</font></sup>
+ * of all JavaBeans&trade;
  * has been added to the <code>java.beans</code> package.
  * Please see {@link java.beans.XMLEncoder}.
  *
diff --git a/jdk/src/share/classes/javax/swing/text/StringContent.java b/jdk/src/share/classes/javax/swing/text/StringContent.java
index c834894..a62fcc4 100644
--- a/jdk/src/share/classes/javax/swing/text/StringContent.java
+++ b/jdk/src/share/classes/javax/swing/text/StringContent.java
@@ -44,7 +44,7 @@
  * future Swing releases. The current serialization support is
  * appropriate for short term storage or RMI between applications running
  * the same version of Swing.  As of 1.4, support for long term storage
- * of all JavaBeans<sup><font size="-2">TM</font></sup>
+ * of all JavaBeans&trade;
  * has been added to the <code>java.beans</code> package.
  * Please see {@link java.beans.XMLEncoder}.
  *
diff --git a/jdk/src/share/classes/javax/swing/text/StyleContext.java b/jdk/src/share/classes/javax/swing/text/StyleContext.java
index ac11b1f..dc004c6a 100644
--- a/jdk/src/share/classes/javax/swing/text/StyleContext.java
+++ b/jdk/src/share/classes/javax/swing/text/StyleContext.java
@@ -56,7 +56,7 @@
  * future Swing releases. The current serialization support is
  * appropriate for short term storage or RMI between applications running
  * the same version of Swing.  As of 1.4, support for long term storage
- * of all JavaBeans<sup><font size="-2">TM</font></sup>
+ * of all JavaBeans&trade;
  * has been added to the <code>java.beans</code> package.
  * Please see {@link java.beans.XMLEncoder}.
  *
@@ -292,7 +292,7 @@
      * <p>
      * This method is thread safe, although most Swing methods
      * are not. Please see
-     * <A HREF="http://download.oracle.com/javase/tutorial/uiswing/concurrency/index.html">Concurrency
+     * <A HREF="http://docs.oracle.com/javase/tutorial/uiswing/concurrency/index.html">Concurrency
      * in Swing</A> for more information.
      *
      * @param old the old attribute set
@@ -321,7 +321,7 @@
      * <p>
      * This method is thread safe, although most Swing methods
      * are not. Please see
-     * <A HREF="http://download.oracle.com/javase/tutorial/uiswing/concurrency/index.html">Concurrency
+     * <A HREF="http://docs.oracle.com/javase/tutorial/uiswing/concurrency/index.html">Concurrency
      * in Swing</A> for more information.
      *
      * @param old the old attribute set
@@ -349,7 +349,7 @@
      * <p>
      * This method is thread safe, although most Swing methods
      * are not. Please see
-     * <A HREF="http://download.oracle.com/javase/tutorial/uiswing/concurrency/index.html">Concurrency
+     * <A HREF="http://docs.oracle.com/javase/tutorial/uiswing/concurrency/index.html">Concurrency
      * in Swing</A> for more information.
      *
      * @param old the old set of attributes
@@ -377,7 +377,7 @@
      * <p>
      * This method is thread safe, although most Swing methods
      * are not. Please see
-     * <A HREF="http://download.oracle.com/javase/tutorial/uiswing/concurrency/index.html">Concurrency
+     * <A HREF="http://docs.oracle.com/javase/tutorial/uiswing/concurrency/index.html">Concurrency
      * in Swing</A> for more information.
      *
      * @param old the old attribute set
@@ -405,7 +405,7 @@
      * <p>
      * This method is thread safe, although most Swing methods
      * are not. Please see
-     * <A HREF="http://download.oracle.com/javase/tutorial/uiswing/concurrency/index.html">Concurrency
+     * <A HREF="http://docs.oracle.com/javase/tutorial/uiswing/concurrency/index.html">Concurrency
      * in Swing</A> for more information.
      *
      * @param old the old attribute set
@@ -445,7 +445,7 @@
      * <p>
      * This method is thread safe, although most Swing methods
      * are not. Please see
-     * <A HREF="http://download.oracle.com/javase/tutorial/uiswing/concurrency/index.html">Concurrency
+     * <A HREF="http://docs.oracle.com/javase/tutorial/uiswing/concurrency/index.html">Concurrency
      * in Swing</A> for more information.
      *
      * @param a the set to reclaim
@@ -1240,7 +1240,7 @@
      * future Swing releases. The current serialization support is
      * appropriate for short term storage or RMI between applications running
      * the same version of Swing.  As of 1.4, support for long term storage
-     * of all JavaBeans<sup><font size="-2">TM</font></sup>
+     * of all JavaBeans&trade;
      * has been added to the <code>java.beans</code> package.
      * Please see {@link java.beans.XMLEncoder}.
      */
diff --git a/jdk/src/share/classes/javax/swing/text/StyledEditorKit.java b/jdk/src/share/classes/javax/swing/text/StyledEditorKit.java
index 20832c6..57b8ac0 100644
--- a/jdk/src/share/classes/javax/swing/text/StyledEditorKit.java
+++ b/jdk/src/share/classes/javax/swing/text/StyledEditorKit.java
@@ -371,7 +371,7 @@
      * future Swing releases. The current serialization support is
      * appropriate for short term storage or RMI between applications running
      * the same version of Swing.  As of 1.4, support for long term storage
-     * of all JavaBeans<sup><font size="-2">TM</font></sup>
+     * of all JavaBeans&trade;
      * has been added to the <code>java.beans</code> package.
      * Please see {@link java.beans.XMLEncoder}.
      */
@@ -490,7 +490,7 @@
      * future Swing releases. The current serialization support is
      * appropriate for short term storage or RMI between applications running
      * the same version of Swing.  As of 1.4, support for long term storage
-     * of all JavaBeans<sup><font size="-2">TM</font></sup>
+     * of all JavaBeans&trade;
      * has been added to the <code>java.beans</code> package.
      * Please see {@link java.beans.XMLEncoder}.
      */
@@ -546,7 +546,7 @@
      * future Swing releases. The current serialization support is
      * appropriate for short term storage or RMI between applications running
      * the same version of Swing.  As of 1.4, support for long term storage
-     * of all JavaBeans<sup><font size="-2">TM</font></sup>
+     * of all JavaBeans&trade;
      * has been added to the <code>java.beans</code> package.
      * Please see {@link java.beans.XMLEncoder}.
      */
@@ -613,7 +613,7 @@
      * future Swing releases. The current serialization support is
      * appropriate for short term storage or RMI between applications running
      * the same version of Swing.  As of 1.4, support for long term storage
-     * of all JavaBeans<sup><font size="-2">TM</font></sup>
+     * of all JavaBeans&trade;
      * has been added to the <code>java.beans</code> package.
      * Please see {@link java.beans.XMLEncoder}.
      */
@@ -679,7 +679,7 @@
      * future Swing releases. The current serialization support is
      * appropriate for short term storage or RMI between applications running
      * the same version of Swing.  As of 1.4, support for long term storage
-     * of all JavaBeans<sup><font size="-2">TM</font></sup>
+     * of all JavaBeans&trade;
      * has been added to the <code>java.beans</code> package.
      * Please see {@link java.beans.XMLEncoder}.
      */
@@ -729,7 +729,7 @@
      * future Swing releases. The current serialization support is
      * appropriate for short term storage or RMI between applications running
      * the same version of Swing.  As of 1.4, support for long term storage
-     * of all JavaBeans<sup><font size="-2">TM</font></sup>
+     * of all JavaBeans&trade;
      * has been added to the <code>java.beans</code> package.
      * Please see {@link java.beans.XMLEncoder}.
      */
@@ -768,7 +768,7 @@
      * future Swing releases. The current serialization support is
      * appropriate for short term storage or RMI between applications running
      * the same version of Swing.  As of 1.4, support for long term storage
-     * of all JavaBeans<sup><font size="-2">TM</font></sup>
+     * of all JavaBeans&trade;
      * has been added to the <code>java.beans</code> package.
      * Please see {@link java.beans.XMLEncoder}.
      */
@@ -807,7 +807,7 @@
      * future Swing releases. The current serialization support is
      * appropriate for short term storage or RMI between applications running
      * the same version of Swing.  As of 1.4, support for long term storage
-     * of all JavaBeans<sup><font size="-2">TM</font></sup>
+     * of all JavaBeans&trade;
      * has been added to the <code>java.beans</code> package.
      * Please see {@link java.beans.XMLEncoder}.
      */
diff --git a/jdk/src/share/classes/javax/swing/text/TabSet.java b/jdk/src/share/classes/javax/swing/text/TabSet.java
index 690ca57..2a53516 100644
--- a/jdk/src/share/classes/javax/swing/text/TabSet.java
+++ b/jdk/src/share/classes/javax/swing/text/TabSet.java
@@ -37,7 +37,7 @@
  * future Swing releases. The current serialization support is
  * appropriate for short term storage or RMI between applications running
  * the same version of Swing.  As of 1.4, support for long term storage
- * of all JavaBeans<sup><font size="-2">TM</font></sup>
+ * of all JavaBeans&trade;
  * has been added to the <code>java.beans</code> package.
  * Please see {@link java.beans.XMLEncoder}.
  *
diff --git a/jdk/src/share/classes/javax/swing/text/TabStop.java b/jdk/src/share/classes/javax/swing/text/TabStop.java
index 70d5c16..a78ea24 100644
--- a/jdk/src/share/classes/javax/swing/text/TabStop.java
+++ b/jdk/src/share/classes/javax/swing/text/TabStop.java
@@ -37,7 +37,7 @@
  * future Swing releases. The current serialization support is
  * appropriate for short term storage or RMI between applications running
  * the same version of Swing.  As of 1.4, support for long term storage
- * of all JavaBeans<sup><font size="-2">TM</font></sup>
+ * of all JavaBeans&trade;
  * has been added to the <code>java.beans</code> package.
  * Please see {@link java.beans.XMLEncoder}.
  *
diff --git a/jdk/src/share/classes/javax/swing/text/TextAction.java b/jdk/src/share/classes/javax/swing/text/TextAction.java
index 9a5c937..bcfa7c3 100644
--- a/jdk/src/share/classes/javax/swing/text/TextAction.java
+++ b/jdk/src/share/classes/javax/swing/text/TextAction.java
@@ -52,7 +52,7 @@
  * future Swing releases. The current serialization support is
  * appropriate for short term storage or RMI between applications running
  * the same version of Swing.  As of 1.4, support for long term storage
- * of all JavaBeans<sup><font size="-2">TM</font></sup>
+ * of all JavaBeans&trade;
  * has been added to the <code>java.beans</code> package.
  * Please see {@link java.beans.XMLEncoder}.
  *
diff --git a/jdk/src/share/classes/javax/swing/text/View.java b/jdk/src/share/classes/javax/swing/text/View.java
index 7eed01e..1bd3520 100644
--- a/jdk/src/share/classes/javax/swing/text/View.java
+++ b/jdk/src/share/classes/javax/swing/text/View.java
@@ -68,7 +68,7 @@
     implementation, the minimum span will be &lt;= the preferred span which in turn
     will be &lt;= the maximum span.
     </p>
-    <p align=center><img src="doc-files/View-flexibility.jpg"
+    <p style="text-align:center"><img src="doc-files/View-flexibility.jpg"
                      alt="The above text describes this graphic.">
     <p>The minimum set of methods for layout are:
     <ul>
@@ -95,7 +95,7 @@
     This allows parent View implementations to cache the child requirements if
     desired.  The calling sequence looks something like the following:
     </p>
-    <p align=center>
+    <p style="text-align:center">
       <img src="doc-files/View-layout.jpg"
        alt="Sample calling sequence between parent view and child view:
        setSize, getMinimum, getPreferred, getMaximum, getAlignment, setSize">
@@ -293,7 +293,7 @@
     /**
      * Determines the desired alignment for this view along an
      * axis.  The desired alignment is returned.  This should be
-     * a value >= 0.0 and <= 1.0, where 0 indicates alignment at
+     * a value &gt;= 0.0 and &lt;= 1.0, where 0 indicates alignment at
      * the origin and 1.0 indicates alignment to the full span
      * away from the origin.  An alignment of 0.5 would be the
      * center of the view.
@@ -351,7 +351,7 @@
      * the default is to not be a composite view this
      * returns 0.
      *
-     * @return the number of views >= 0
+     * @return the number of views &gt;= 0
      * @see View#getViewCount
      */
     public int getViewCount() {
@@ -362,7 +362,7 @@
      * Gets the <i>n</i>th child view.  Since there are no
      * children by default, this returns <code>null</code>.
      *
-     * @param n the number of the view to get, >= 0 && < getViewCount()
+     * @param n the number of the view to get, &gt;= 0 &amp;&amp; &lt; getViewCount()
      * @return the view
      */
     public View getView(int n) {
@@ -393,7 +393,7 @@
      * Inserts a single child view.  This is a convenience
      * call to <code>replace</code>.
      *
-     * @param offs the offset of the view to insert before >= 0
+     * @param offs the offset of the view to insert before &gt;= 0
      * @param v the view
      * @see #replace
      * @since 1.3
@@ -428,9 +428,9 @@
      * a view has no children.
      *
      * @param offset the starting index into the child views to insert
-     *   the new views.  This should be a value >= 0 and <= getViewCount
+     *   the new views.  This should be a value &gt;= 0 and &lt;= getViewCount
      * @param length the number of existing child views to remove
-     *   This should be a value >= 0 and <= (getViewCount() - offset).
+     *   This should be a value &gt;= 0 and &lt;= (getViewCount() - offset).
      * @param views the child views to add.  This value can be
      *   <code>null</code> to indicate no children are being added
      *   (useful to remove).
@@ -445,7 +445,7 @@
      * to return -1 to indicate there is no valid child index for any
      * position.
      *
-     * @param pos the position >= 0
+     * @param pos the position &gt;= 0
      * @return  index of the view representing the given position, or
      *   -1 if no view represents that position
      * @since 1.3
@@ -461,7 +461,7 @@
      * their location.  This returns <code>null</code> since the
      * default is to not have any child views.
      *
-     * @param index the index of the child, >= 0 && <
+     * @param index the index of the child, &gt;= 0 &amp;&amp; &lt;
      *          <code>getViewCount()</code>
      * @param a  the allocation to this view
      * @return the allocation to the child
@@ -477,7 +477,7 @@
      * they might not be in the same order found in the model, or they just
      * might not allow access to some of the locations in the model.
      *
-     * @param pos the position to convert >= 0
+     * @param pos the position to convert &gt;= 0
      * @param a the allocated region in which to render
      * @param direction the direction from the current position that can
      *  be thought of as the arrow keys typically found on a keyboard.
@@ -566,7 +566,7 @@
      * from the document model coordinate space
      * to the view coordinate space.
      *
-     * @param pos the position of the desired character (>=0)
+     * @param pos the position of the desired character (&gt;=0)
      * @param a the area of the view, which encompasses the requested character
      * @param b the bias toward the previous character or the
      *  next character represented by the offset, in case the
@@ -592,17 +592,17 @@
      * to the view coordinate space. The specified region is
      * created as a union of the first and last character positions.
      *
-     * @param p0 the position of the first character (>=0)
+     * @param p0 the position of the first character (&gt;=0)
      * @param b0 the bias of the first character position,
      *  toward the previous character or the
      *  next character represented by the offset, in case the
      *  position is a boundary of two views; <code>b0</code> will have one
      *  of these values:
-     * <ul>
+     * <ul style="list-style-type:none">
      * <li> <code>Position.Bias.Forward</code>
      * <li> <code>Position.Bias.Backward</code>
      * </ul>
-     * @param p1 the position of the last character (>=0)
+     * @param p1 the position of the last character (&gt;=0)
      * @param b1 the bias for the second character position, defined
      *          one of the legal values shown above
      * @param a the area of the view, which encompasses the requested region
@@ -656,11 +656,11 @@
      * closer to the next character in the model or the previous
      * character in the model.
      *
-     * @param x the X coordinate >= 0
-     * @param y the Y coordinate >= 0
+     * @param x the X coordinate &gt;= 0
+     * @param y the Y coordinate &gt;= 0
      * @param a the allocated region in which to render
      * @return the location within the model that best represents the
-     *  given point in the view >= 0.  The <code>biasReturn</code>
+     *  given point in the view &gt;= 0.  The <code>biasReturn</code>
      *  argument will be
      * filled in to indicate that the point given is closer to the next
      * character in the model or the previous character in the model.
@@ -804,7 +804,7 @@
      * Fetches the portion of the model for which this view is
      * responsible.
      *
-     * @return the starting offset into the model >= 0
+     * @return the starting offset into the model &gt;= 0
      * @see View#getStartOffset
      */
     public int getStartOffset() {
@@ -815,7 +815,7 @@
      * Fetches the portion of the model for which this view is
      * responsible.
      *
-     * @return the ending offset into the model >= 0
+     * @return the ending offset into the model &gt;= 0
      * @see View#getEndOffset
      */
     public int getEndOffset() {
@@ -884,14 +884,14 @@
      * @param axis may be either <code>View.X_AXIS</code> or
      *          <code>View.Y_AXIS</code>
      * @param offset the location in the document model
-     *   that a broken fragment would occupy >= 0.  This
+     *   that a broken fragment would occupy &gt;= 0.  This
      *   would be the starting offset of the fragment
      *   returned
      * @param pos the position along the axis that the
-     *  broken view would occupy >= 0.  This may be useful for
+     *  broken view would occupy &gt;= 0.  This may be useful for
      *  things like tab calculations
      * @param len specifies the distance along the axis
-     *  where a potential break is desired >= 0
+     *  where a potential break is desired &gt;= 0
      * @return the fragment of the view that represents the
      *  given span, if the view can be broken.  If the view
      *  doesn't support breaking behavior, the view itself is
@@ -909,10 +909,10 @@
      * the view doesn't support fragmenting (the default), it
      * should return itself.
      *
-     * @param p0 the starting offset >= 0.  This should be a value
+     * @param p0 the starting offset &gt;= 0.  This should be a value
      *   greater or equal to the element starting offset and
      *   less than the element ending offset.
-     * @param p1 the ending offset > p0.  This should be a value
+     * @param p1 the ending offset &gt; p0.  This should be a value
      *   less than or equal to the elements end offset and
      *   greater than the elements starting offset.
      * @return the view fragment, or itself if the view doesn't
@@ -949,10 +949,10 @@
      * @param axis may be either <code>View.X_AXIS</code> or
      *          <code>View.Y_AXIS</code>
      * @param pos the potential location of the start of the
-     *   broken view >= 0.  This may be useful for calculating tab
+     *   broken view &gt;= 0.  This may be useful for calculating tab
      *   positions
      * @param len specifies the relative length from <em>pos</em>
-     *   where a potential break is desired >= 0
+     *   where a potential break is desired &gt;= 0
      * @return the weight, which should be a value between
      *   ForcedBreakWeight and BadBreakWeight
      * @see LabelView
@@ -986,8 +986,8 @@
      * layout of the view along the given axis, if it
      * has any layout duties.
      *
-     * @param width the width >= 0
-     * @param height the height >= 0
+     * @param width the width &gt;= 0
+     * @param height the height &gt;= 0
      */
     public void setSize(float width, float height) {
     }
@@ -1314,7 +1314,7 @@
      * implemented to default the bias to <code>Position.Bias.Forward</code>
      * which was previously implied.
      *
-     * @param pos the position to convert >= 0
+     * @param pos the position to convert &gt;= 0
      * @param a the allocated region in which to render
      * @return the bounding box of the given position is returned
      * @exception BadLocationException  if the given position does
@@ -1332,11 +1332,11 @@
      * Provides a mapping from the view coordinate space to the logical
      * coordinate space of the model.
      *
-     * @param x the X coordinate >= 0
-     * @param y the Y coordinate >= 0
+     * @param x the X coordinate &gt;= 0
+     * @param y the Y coordinate &gt;= 0
      * @param a the allocated region in which to render
      * @return the location within the model that best represents the
-     *  given point in the view >= 0
+     *  given point in the view &gt;= 0
      * @see View#viewToModel
      * @deprecated
      */
diff --git a/jdk/src/share/classes/javax/swing/text/html/HTMLDocument.java b/jdk/src/share/classes/javax/swing/text/html/HTMLDocument.java
index 71f2609..abbee80 100644
--- a/jdk/src/share/classes/javax/swing/text/html/HTMLDocument.java
+++ b/jdk/src/share/classes/javax/swing/text/html/HTMLDocument.java
@@ -195,14 +195,14 @@
  *     <th><code>setOuterHTML</code></th>
  *   </tr>
  *   <tr valign="top">
- *     <td nowrap="nowrap">
+ *     <td style="white-space:nowrap">
  *       <div style="background-color: silver;">
  *         <p>Paragraph 1</p>
  *         <p>Paragraph 2</p>
  *       </div>
  *     </td>
  * <!--insertAfterStart-->
- *     <td nowrap="nowrap">
+ *     <td style="white-space:nowrap">
  *       <div style="background-color: silver;">
  *         <ul style="color: red;">
  *           <li>List Item</li>
@@ -212,7 +212,7 @@
  *       </div>
  *     </td>
  * <!--insertBeforeEnd-->
- *     <td nowrap="nowrap">
+ *     <td style="white-space:nowrap">
  *       <div style="background-color: silver;">
  *         <p>Paragraph 1</p>
  *         <p>Paragraph 2</p>
@@ -222,7 +222,7 @@
  *       </div>
  *     </td>
  * <!--insertBeforeStart-->
- *     <td nowrap="nowrap">
+ *     <td style="white-space:nowrap">
  *       <ul style="color: red;">
  *         <li>List Item</li>
  *       </ul>
@@ -232,7 +232,7 @@
  *       </div>
  *     </td>
  * <!--insertAfterEnd-->
- *     <td nowrap="nowrap">
+ *     <td style="white-space:nowrap">
  *       <div style="background-color: silver;">
  *         <p>Paragraph 1</p>
  *         <p>Paragraph 2</p>
@@ -242,7 +242,7 @@
  *       </ul>
  *     </td>
  * <!--setInnerHTML-->
- *     <td nowrap="nowrap">
+ *     <td style="white-space:nowrap">
  *       <div style="background-color: silver;">
  *         <ul style="color: red;">
  *           <li>List Item</li>
@@ -250,7 +250,7 @@
  *       </div>
  *     </td>
  * <!--setOuterHTML-->
- *     <td nowrap="nowrap">
+ *     <td style="white-space:nowrap">
  *       <ul style="color: red;">
  *         <li>List Item</li>
  *       </ul>
@@ -475,7 +475,7 @@
      * <p>
      * This method is thread safe, although most Swing methods
      * are not. Please see
-     * <A HREF="http://download.oracle.com/javase/tutorial/uiswing/concurrency/index.html">Concurrency
+     * <A HREF="http://docs.oracle.com/javase/tutorial/uiswing/concurrency/index.html">Concurrency
      * in Swing</A> for more information.
      *
      * @param offset the offset into the paragraph (must be at least 0)
diff --git a/jdk/src/share/classes/javax/swing/text/html/Option.java b/jdk/src/share/classes/javax/swing/text/html/Option.java
index 9628fda..181b87c 100644
--- a/jdk/src/share/classes/javax/swing/text/html/Option.java
+++ b/jdk/src/share/classes/javax/swing/text/html/Option.java
@@ -38,7 +38,7 @@
  * future Swing releases. The current serialization support is
  * appropriate for short term storage or RMI between applications running
  * the same version of Swing.  As of 1.4, support for long term storage
- * of all JavaBeans<sup><font size="-2">TM</font></sup>
+ * of all JavaBeans&trade;
  * has been added to the <code>java.beans</code> package.
  * Please see {@link java.beans.XMLEncoder}.
  *
diff --git a/jdk/src/share/classes/javax/swing/tree/AbstractLayoutCache.java b/jdk/src/share/classes/javax/swing/tree/AbstractLayoutCache.java
index 8db55e6..412ae26 100644
--- a/jdk/src/share/classes/javax/swing/tree/AbstractLayoutCache.java
+++ b/jdk/src/share/classes/javax/swing/tree/AbstractLayoutCache.java
@@ -36,7 +36,7 @@
  * future Swing releases. The current serialization support is
  * appropriate for short term storage or RMI between applications running
  * the same version of Swing.  As of 1.4, support for long term storage
- * of all JavaBeans<sup><font size="-2">TM</font></sup>
+ * of all JavaBeans&trade;
  * has been added to the <code>java.beans</code> package.
  * Please see {@link java.beans.XMLEncoder}.
  *
diff --git a/jdk/src/share/classes/javax/swing/tree/DefaultMutableTreeNode.java b/jdk/src/share/classes/javax/swing/tree/DefaultMutableTreeNode.java
index e5b01a4..5e776a0 100644
--- a/jdk/src/share/classes/javax/swing/tree/DefaultMutableTreeNode.java
+++ b/jdk/src/share/classes/javax/swing/tree/DefaultMutableTreeNode.java
@@ -35,7 +35,7 @@
  * structure.
  * For examples of using default mutable tree nodes, see
  * <a
- href="http://java.sun.com/docs/books/tutorial/uiswing/components/tree.html">How to Use Trees</a>
+ href="http://docs.oracle.com/javase/tutorial/uiswing/components/tree.html">How to Use Trees</a>
  * in <em>The Java Tutorial.</em>
  *
  * <p>
@@ -76,7 +76,7 @@
  * future Swing releases. The current serialization support is
  * appropriate for short term storage or RMI between applications running
  * the same version of Swing.  As of 1.4, support for long term storage
- * of all JavaBeans<sup><font size="-2">TM</font></sup>
+ * of all JavaBeans&trade;
  * has been added to the <code>java.beans</code> package.
  * Please see {@link java.beans.XMLEncoder}.
  *
diff --git a/jdk/src/share/classes/javax/swing/tree/DefaultTreeCellEditor.java b/jdk/src/share/classes/javax/swing/tree/DefaultTreeCellEditor.java
index 5745a3c..6e69a1b 100644
--- a/jdk/src/share/classes/javax/swing/tree/DefaultTreeCellEditor.java
+++ b/jdk/src/share/classes/javax/swing/tree/DefaultTreeCellEditor.java
@@ -52,7 +52,7 @@
  * future Swing releases. The current serialization support is
  * appropriate for short term storage or RMI between applications running
  * the same version of Swing.  As of 1.4, support for long term storage
- * of all JavaBeans<sup><font size="-2">TM</font></sup>
+ * of all JavaBeans&trade;
  * has been added to the <code>java.beans</code> package.
  * Please see {@link java.beans.XMLEncoder}.
  *
diff --git a/jdk/src/share/classes/javax/swing/tree/DefaultTreeCellRenderer.java b/jdk/src/share/classes/javax/swing/tree/DefaultTreeCellRenderer.java
index d4b5826..942d6d6 100644
--- a/jdk/src/share/classes/javax/swing/tree/DefaultTreeCellRenderer.java
+++ b/jdk/src/share/classes/javax/swing/tree/DefaultTreeCellRenderer.java
@@ -49,7 +49,7 @@
  * <code>DefaultTreeCellRenderer</code> is not opaque and
  * unless you subclass paint you should not change this.
  * See <a
- href="http://java.sun.com/docs/books/tutorial/uiswing/components/tree.html">How to Use Trees</a>
+ href="http://docs.oracle.com/javase/tutorial/uiswing/components/tree.html">How to Use Trees</a>
  * in <em>The Java Tutorial</em>
  * for examples of customizing node display using this class.
  * <p>
@@ -95,7 +95,7 @@
  * future Swing releases. The current serialization support is
  * appropriate for short term storage or RMI between applications running
  * the same version of Swing.  As of 1.4, support for long term storage
- * of all JavaBeans<sup><font size="-2">TM</font></sup>
+ * of all JavaBeans&trade;
  * has been added to the <code>java.beans</code> package.
  * Please see {@link java.beans.XMLEncoder}.
  *
diff --git a/jdk/src/share/classes/javax/swing/tree/DefaultTreeModel.java b/jdk/src/share/classes/javax/swing/tree/DefaultTreeModel.java
index 794f11b..d3de672 100644
--- a/jdk/src/share/classes/javax/swing/tree/DefaultTreeModel.java
+++ b/jdk/src/share/classes/javax/swing/tree/DefaultTreeModel.java
@@ -33,7 +33,7 @@
 /**
  * A simple tree data model that uses TreeNodes.
  * For further information and examples that use DefaultTreeModel,
- * see <a href="http://java.sun.com/docs/books/tutorial/uiswing/components/tree.html">How to Use Trees</a>
+ * see <a href="http://docs.oracle.com/javase/tutorial/uiswing/components/tree.html">How to Use Trees</a>
  * in <em>The Java Tutorial.</em>
  * <p>
  * <strong>Warning:</strong>
@@ -41,7 +41,7 @@
  * future Swing releases. The current serialization support is
  * appropriate for short term storage or RMI between applications running
  * the same version of Swing.  As of 1.4, support for long term storage
- * of all JavaBeans<sup><font size="-2">TM</font></sup>
+ * of all JavaBeans&trade;
  * has been added to the <code>java.beans</code> package.
  * Please see {@link java.beans.XMLEncoder}.
  *
diff --git a/jdk/src/share/classes/javax/swing/tree/DefaultTreeSelectionModel.java b/jdk/src/share/classes/javax/swing/tree/DefaultTreeSelectionModel.java
index 6420139..f9f9839 100644
--- a/jdk/src/share/classes/javax/swing/tree/DefaultTreeSelectionModel.java
+++ b/jdk/src/share/classes/javax/swing/tree/DefaultTreeSelectionModel.java
@@ -53,7 +53,7 @@
  * future Swing releases. The current serialization support is
  * appropriate for short term storage or RMI between applications running
  * the same version of Swing.  As of 1.4, support for long term storage
- * of all JavaBeans<sup><font size="-2">TM</font></sup>
+ * of all JavaBeans&trade;
  * has been added to the <code>java.beans</code> package.
  * Please see {@link java.beans.XMLEncoder}.
  *
diff --git a/jdk/src/share/classes/javax/swing/tree/ExpandVetoException.java b/jdk/src/share/classes/javax/swing/tree/ExpandVetoException.java
index 3295b56..b13f50e 100644
--- a/jdk/src/share/classes/javax/swing/tree/ExpandVetoException.java
+++ b/jdk/src/share/classes/javax/swing/tree/ExpandVetoException.java
@@ -30,7 +30,7 @@
 /**
  * Exception used to stop and expand/collapse from happening.
  * See <a
- href="http://java.sun.com/docs/books/tutorial/uiswing/events/treewillexpandlistener.html">How to Write a Tree-Will-Expand Listener</a>
+ href="http://docs.oracle.com/javase/tutorial/uiswing/events/treewillexpandlistener.html">How to Write a Tree-Will-Expand Listener</a>
  * in <em>The Java Tutorial</em>
  * for further information and examples.
  *
diff --git a/jdk/src/share/classes/javax/swing/tree/FixedHeightLayoutCache.java b/jdk/src/share/classes/javax/swing/tree/FixedHeightLayoutCache.java
index 4f61aff..c3676dd 100644
--- a/jdk/src/share/classes/javax/swing/tree/FixedHeightLayoutCache.java
+++ b/jdk/src/share/classes/javax/swing/tree/FixedHeightLayoutCache.java
@@ -42,7 +42,7 @@
  * future Swing releases. The current serialization support is
  * appropriate for short term storage or RMI between applications running
  * the same version of Swing.  As of 1.4, support for long term storage
- * of all JavaBeans<sup><font size="-2">TM</font></sup>
+ * of all JavaBeans&trade;
  * has been added to the <code>java.beans</code> package.
  * Please see {@link java.beans.XMLEncoder}.
  *
diff --git a/jdk/src/share/classes/javax/swing/tree/TreeCellRenderer.java b/jdk/src/share/classes/javax/swing/tree/TreeCellRenderer.java
index 8c352cb..533e5e4 100644
--- a/jdk/src/share/classes/javax/swing/tree/TreeCellRenderer.java
+++ b/jdk/src/share/classes/javax/swing/tree/TreeCellRenderer.java
@@ -30,7 +30,7 @@
 /**
  * Defines the requirements for an object that displays a tree node.
  * See <a
- href="http://java.sun.com/docs/books/tutorial/uiswing/components/tree.html">How to Use Trees</a>
+ href="http://docs.oracle.com/javase/tutorial/uiswing/components/tree.html">How to Use Trees</a>
  * in <em>The Java Tutorial</em>
  * for an example of implementing a tree cell renderer
  * that displays custom icons.
diff --git a/jdk/src/share/classes/javax/swing/tree/TreeModel.java b/jdk/src/share/classes/javax/swing/tree/TreeModel.java
index b5a998c..49f1d9f 100644
--- a/jdk/src/share/classes/javax/swing/tree/TreeModel.java
+++ b/jdk/src/share/classes/javax/swing/tree/TreeModel.java
@@ -50,7 +50,7 @@
  * For further information on tree models,
  * including an example of a custom implementation,
  * see <a
- href="http://java.sun.com/docs/books/tutorial/uiswing/components/tree.html">How to Use Trees</a>
+ href="http://docs.oracle.com/javase/tutorial/uiswing/components/tree.html">How to Use Trees</a>
  * in <em>The Java Tutorial.</em>
  *
  * @see TreePath
diff --git a/jdk/src/share/classes/javax/swing/tree/TreeNode.java b/jdk/src/share/classes/javax/swing/tree/TreeNode.java
index 7db0f97..5931cc6 100644
--- a/jdk/src/share/classes/javax/swing/tree/TreeNode.java
+++ b/jdk/src/share/classes/javax/swing/tree/TreeNode.java
@@ -37,7 +37,7 @@
  *
  * For further information and examples of using tree nodes,
  * see <a
- href="http://java.sun.com/docs/books/tutorial/uiswing/components/tree.html">How to Use Tree Nodes</a>
+ href="http://docs.oracle.com/javase/tutorial/uiswing/components/tree.html">How to Use Tree Nodes</a>
  * in <em>The Java Tutorial.</em>
  *
  * @author Rob Davis
diff --git a/jdk/src/share/classes/javax/swing/tree/TreePath.java b/jdk/src/share/classes/javax/swing/tree/TreePath.java
index 33c42a7..53e285e 100644
--- a/jdk/src/share/classes/javax/swing/tree/TreePath.java
+++ b/jdk/src/share/classes/javax/swing/tree/TreePath.java
@@ -66,7 +66,7 @@
  * <p>
  * For further information and examples of using tree paths,
  * see <a
- href="http://java.sun.com/docs/books/tutorial/uiswing/components/tree.html">How to Use Trees</a>
+ href="http://docs.oracle.com/javase/tutorial/uiswing/components/tree.html">How to Use Trees</a>
  * in <em>The Java Tutorial.</em>
  * <p>
  * <strong>Warning:</strong>
@@ -74,7 +74,7 @@
  * future Swing releases. The current serialization support is
  * appropriate for short term storage or RMI between applications running
  * the same version of Swing.  As of 1.4, support for long term storage
- * of all JavaBeans<sup><font size="-2">TM</font></sup>
+ * of all JavaBeans&trade;
  * has been added to the <code>java.beans</code> package.
  * Please see {@link java.beans.XMLEncoder}.
  *
diff --git a/jdk/src/share/classes/javax/swing/tree/TreeSelectionModel.java b/jdk/src/share/classes/javax/swing/tree/TreeSelectionModel.java
index 4c491277..bc08aef 100644
--- a/jdk/src/share/classes/javax/swing/tree/TreeSelectionModel.java
+++ b/jdk/src/share/classes/javax/swing/tree/TreeSelectionModel.java
@@ -32,7 +32,7 @@
   * This interface represents the current state of the selection for
   * the tree component.
   * For information and examples of using tree selection models,
-  * see <a href="http://java.sun.com/docs/books/tutorial/uiswing/components/tree.html">How to Use Trees</a>
+  * see <a href="http://docs.oracle.com/javase/tutorial/uiswing/components/tree.html">How to Use Trees</a>
   * in <em>The Java Tutorial.</em>
   *
   * <p>
diff --git a/jdk/src/share/classes/javax/swing/tree/VariableHeightLayoutCache.java b/jdk/src/share/classes/javax/swing/tree/VariableHeightLayoutCache.java
index 5185194..f564724 100644
--- a/jdk/src/share/classes/javax/swing/tree/VariableHeightLayoutCache.java
+++ b/jdk/src/share/classes/javax/swing/tree/VariableHeightLayoutCache.java
@@ -43,7 +43,7 @@
  * future Swing releases. The current serialization support is
  * appropriate for short term storage or RMI between applications running
  * the same version of Swing.  As of 1.4, support for long term storage
- * of all JavaBeans<sup><font size="-2">TM</font></sup>
+ * of all JavaBeans&trade;
  * has been added to the <code>java.beans</code> package.
  * Please see {@link java.beans.XMLEncoder}.
  *
diff --git a/jdk/src/share/classes/javax/swing/undo/CannotRedoException.java b/jdk/src/share/classes/javax/swing/undo/CannotRedoException.java
index 59b89ad..e59e3f5 100644
--- a/jdk/src/share/classes/javax/swing/undo/CannotRedoException.java
+++ b/jdk/src/share/classes/javax/swing/undo/CannotRedoException.java
@@ -32,7 +32,7 @@
  * future Swing releases. The current serialization support is
  * appropriate for short term storage or RMI between applications running
  * the same version of Swing.  As of 1.4, support for long term storage
- * of all JavaBeans<sup><font size="-2">TM</font></sup>
+ * of all JavaBeans&trade;
  * has been added to the <code>java.beans</code> package.
  * Please see {@link java.beans.XMLEncoder}.
  *
diff --git a/jdk/src/share/classes/javax/swing/undo/CannotUndoException.java b/jdk/src/share/classes/javax/swing/undo/CannotUndoException.java
index 9974b82..2779eaa 100644
--- a/jdk/src/share/classes/javax/swing/undo/CannotUndoException.java
+++ b/jdk/src/share/classes/javax/swing/undo/CannotUndoException.java
@@ -33,7 +33,7 @@
  * future Swing releases. The current serialization support is
  * appropriate for short term storage or RMI between applications running
  * the same version of Swing.  As of 1.4, support for long term storage
- * of all JavaBeans<sup><font size="-2">TM</font></sup>
+ * of all JavaBeans&trade;
  * has been added to the <code>java.beans</code> package.
  * Please see {@link java.beans.XMLEncoder}.
  *
diff --git a/jdk/src/share/classes/javax/swing/undo/UndoManager.java b/jdk/src/share/classes/javax/swing/undo/UndoManager.java
index 0d9553f..23dc9b5 100644
--- a/jdk/src/share/classes/javax/swing/undo/UndoManager.java
+++ b/jdk/src/share/classes/javax/swing/undo/UndoManager.java
@@ -126,7 +126,7 @@
  * future Swing releases. The current serialization support is
  * appropriate for short term storage or RMI between applications running
  * the same version of Swing.  As of 1.4, support for long term storage
- * of all JavaBeans<sup><font size="-2">TM</font></sup>
+ * of all JavaBeans&trade;
  * has been added to the <code>java.beans</code> package.
  * Please see {@link java.beans.XMLEncoder}.
  *
diff --git a/jdk/src/share/classes/org/jcp/xml/dsig/internal/dom/XMLDSigRI.java b/jdk/src/share/classes/org/jcp/xml/dsig/internal/dom/XMLDSigRI.java
index 2cc8714..d4dd77b 100644
--- a/jdk/src/share/classes/org/jcp/xml/dsig/internal/dom/XMLDSigRI.java
+++ b/jdk/src/share/classes/org/jcp/xml/dsig/internal/dom/XMLDSigRI.java
@@ -28,7 +28,7 @@
  * ===========================================================================
  */
 /*
- * Copyright (c) 2005, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2005, 2013 Oracle and/or its affiliates. All rights reserved.
  */
 /*
  * $Id: XMLDSigRI.java 1400021 2012-10-19 10:16:04Z coheigea $
@@ -61,7 +61,7 @@
 
     public XMLDSigRI() {
         /* We are the XMLDSig provider */
-        super("XMLDSig", 1.8, INFO);
+        super("XMLDSig", 1.8d, INFO);
 
         final Map<Object, Object> map = new HashMap<Object, Object>();
         map.put("XMLSignatureFactory.DOM",
diff --git a/jdk/src/share/classes/sun/awt/NullComponentPeer.java b/jdk/src/share/classes/sun/awt/NullComponentPeer.java
index b32b8a4..50712de 100644
--- a/jdk/src/share/classes/sun/awt/NullComponentPeer.java
+++ b/jdk/src/share/classes/sun/awt/NullComponentPeer.java
@@ -141,10 +141,6 @@
         return new Dimension(1,1);
     }
 
-    public java.awt.Toolkit getToolkit() {
-        return null;
-    }
-
     public ColorModel getColorModel() {
         return null;
     }
diff --git a/jdk/src/share/classes/sun/awt/datatransfer/DataTransferer.java b/jdk/src/share/classes/sun/awt/datatransfer/DataTransferer.java
index 493d80a..821ccdc 100644
--- a/jdk/src/share/classes/sun/awt/datatransfer/DataTransferer.java
+++ b/jdk/src/share/classes/sun/awt/datatransfer/DataTransferer.java
@@ -1793,8 +1793,17 @@
             } catch (Exception e) {
                 throw new IOException(e.getMessage());
             }
+            // Target data is Image
+        } else if (DataFlavor.imageFlavor.equals(flavor)) {
+            if (!isImageFormat(format)) {
+                throw new IOException("data translation failed");
+            }
+            theObject = platformImageBytesToImage(inputStreamToByteArray(str), format);
         }
 
+        if (theObject == null) {
+            throw new IOException("data translation failed");
+        }
 
         return theObject;
 
diff --git a/jdk/src/share/classes/sun/font/FreetypeFontScaler.java b/jdk/src/share/classes/sun/font/FreetypeFontScaler.java
index 3edfe5f..b4d961a 100644
--- a/jdk/src/share/classes/sun/font/FreetypeFontScaler.java
+++ b/jdk/src/share/classes/sun/font/FreetypeFontScaler.java
@@ -169,7 +169,7 @@
 
     public synchronized void dispose() {
         if (nativeScaler != 0L) {
-            disposeNativeScaler(nativeScaler);
+            disposeNativeScaler(font.get(), nativeScaler);
             nativeScaler = 0L;
         }
     }
@@ -190,7 +190,7 @@
 
     synchronized int getGlyphCode(char charCode) throws FontScalerException {
         if (nativeScaler != 0L) {
-            return getGlyphCodeNative(nativeScaler, charCode);
+            return getGlyphCodeNative(font.get(), nativeScaler, charCode);
         }
         return FontScaler.getNullScaler().getGlyphCode(charCode);
     }
@@ -245,9 +245,9 @@
 
     private native long getLayoutTableCacheNative(long pScaler);
 
-    private native void disposeNativeScaler(long pScaler);
+    private native void disposeNativeScaler(Font2D font2D, long pScaler);
 
-    private native int getGlyphCodeNative(long pScaler, char charCode);
+    private native int getGlyphCodeNative(Font2D font, long pScaler, char charCode);
     private native int getNumGlyphsNative(long pScaler);
     private native int getMissingGlyphCodeNative(long pScaler);
 
diff --git a/jdk/src/share/classes/sun/invoke/WrapperInstance.java b/jdk/src/share/classes/sun/invoke/WrapperInstance.java
index ba918b4..6c545cf 100644
--- a/jdk/src/share/classes/sun/invoke/WrapperInstance.java
+++ b/jdk/src/share/classes/sun/invoke/WrapperInstance.java
@@ -30,7 +30,7 @@
 /**
  * Private API used inside of java.lang.invoke.MethodHandles.
  * Interface implemented by every object which is produced by
- * {@link java.lang.invoke.MethodHandles#asInstance MethodHandles.asInstance}.
+ * {@link java.lang.invoke.MethodHandleProxies#asInterfaceInstance MethodHandleProxies.asInterfaceInstance}.
  * The methods of this interface allow a caller to recover the parameters
  * to {@code asInstance}.
  * This allows applications to repeatedly convert between method handles
diff --git a/jdk/src/share/classes/sun/invoke/util/ValueConversions.java b/jdk/src/share/classes/sun/invoke/util/ValueConversions.java
index 912fab4..1158ccb 100644
--- a/jdk/src/share/classes/sun/invoke/util/ValueConversions.java
+++ b/jdk/src/share/classes/sun/invoke/util/ValueConversions.java
@@ -502,51 +502,6 @@
         }
     }
 
-    static MethodHandle collectArguments(MethodHandle mh, int pos, MethodHandle collector) {
-        // FIXME: API needs public MHs.collectArguments.
-        // Should be:
-        //   return MethodHandles.collectArguments(mh, 0, collector);
-        // The rest of this code is a workaround for not having that API.
-        if (COLLECT_ARGUMENTS != null) {
-            try {
-                return (MethodHandle)
-                    COLLECT_ARGUMENTS.invokeExact(mh, pos, collector);
-            } catch (Throwable ex) {
-                if (ex instanceof RuntimeException)
-                    throw (RuntimeException) ex;
-                if (ex instanceof Error)
-                    throw (Error) ex;
-                throw new Error(ex.getMessage(), ex);
-            }
-        }
-        // Emulate MHs.collectArguments using fold + drop.
-        // This is slightly inefficient.
-        // More seriously, it can put a MH over the 255-argument limit.
-        mh = MethodHandles.dropArguments(mh, 1, collector.type().parameterList());
-        mh = MethodHandles.foldArguments(mh, collector);
-        return mh;
-    }
-    private static final MethodHandle COLLECT_ARGUMENTS;
-    static {
-        MethodHandle mh = null;
-        try {
-            final java.lang.reflect.Method m = MethodHandles.class
-                .getDeclaredMethod("collectArguments",
-                    MethodHandle.class, int.class, MethodHandle.class);
-            AccessController.doPrivileged(new PrivilegedAction<Void>() {
-                    @Override
-                    public Void run() {
-                        m.setAccessible(true);
-                        return null;
-                    }
-                });
-            mh = IMPL_LOOKUP.unreflect(m);
-        } catch (ReflectiveOperationException ex) {
-            throw newInternalError(ex);
-        }
-        COLLECT_ARGUMENTS = mh;
-    }
-
     private static final EnumMap<Wrapper, MethodHandle>[] WRAPPER_CASTS
             = newWrapperCaches(1);
 
@@ -1050,12 +1005,12 @@
             if (mh == ARRAY_IDENTITY)
                 mh = rightFiller;
             else
-                mh = collectArguments(mh, 0, rightFiller);
+                mh = MethodHandles.collectArguments(mh, 0, rightFiller);
         }
         if (mh == ARRAY_IDENTITY)
             mh = leftCollector;
         else
-            mh = collectArguments(mh, 0, leftCollector);
+            mh = MethodHandles.collectArguments(mh, 0, leftCollector);
         return mh;
     }
 
@@ -1101,7 +1056,7 @@
         if (midLen == LEFT_ARGS)
             return rightFill;
         else
-            return collectArguments(rightFill, 0, midFill);
+            return MethodHandles.collectArguments(rightFill, 0, midFill);
     }
 
     // Type-polymorphic version of varargs maker.
diff --git a/jdk/src/share/classes/sun/invoke/util/VerifyAccess.java b/jdk/src/share/classes/sun/invoke/util/VerifyAccess.java
index 5070e97..3b65b58 100644
--- a/jdk/src/share/classes/sun/invoke/util/VerifyAccess.java
+++ b/jdk/src/share/classes/sun/invoke/util/VerifyAccess.java
@@ -172,7 +172,7 @@
      * Decide if the given method type, attributed to a member or symbolic
      * reference of a given reference class, is really visible to that class.
      * @param type the supposed type of a member or symbolic reference of refc
-     * @param refc
+     * @param refc the class attempting to make the reference
      */
     public static boolean isTypeVisible(Class<?> type, Class<?> refc) {
         if (type == refc)  return true;  // easy check
@@ -197,7 +197,7 @@
      * Decide if the given method type, attributed to a member or symbolic
      * reference of a given reference class, is really visible to that class.
      * @param type the supposed type of a member or symbolic reference of refc
-     * @param refc
+     * @param refc the class attempting to make the reference
      */
     public static boolean isTypeVisible(java.lang.invoke.MethodType type, Class<?> refc) {
         for (int n = -1, max = type.parameterCount(); n < max; n++) {
@@ -210,8 +210,8 @@
 
     /**
      * Test if two classes have the same class loader and package qualifier.
-     * @param class1
-     * @param class2
+     * @param class1 a class
+     * @param class2 another class
      * @return whether they are in the same package
      */
     public static boolean isSamePackage(Class<?> class1, Class<?> class2) {
@@ -244,8 +244,8 @@
     /**
      * Test if two classes are defined as part of the same package member (top-level class).
      * If this is true, they can share private access with each other.
-     * @param class1
-     * @param class2
+     * @param class1 a class
+     * @param class2 another class
      * @return whether they are identical or nested together
      */
     public static boolean isSamePackageMember(Class<?> class1, Class<?> class2) {
@@ -287,8 +287,8 @@
     /**
      * Is the class loader of parentClass identical to, or an ancestor of,
      * the class loader of childClass?
-     * @param parentClass
-     * @param childClass
+     * @param parentClass a class
+     * @param childClass another class, which may be a descendent of the first class
      * @return whether parentClass precedes or equals childClass in class loader order
      */
     public static boolean classLoaderIsAncestor(Class<?> parentClass, Class<?> childClass) {
diff --git a/jdk/src/share/classes/sun/invoke/util/VerifyType.java b/jdk/src/share/classes/sun/invoke/util/VerifyType.java
index e755a9e..b0c76ae 100644
--- a/jdk/src/share/classes/sun/invoke/util/VerifyType.java
+++ b/jdk/src/share/classes/sun/invoke/util/VerifyType.java
@@ -41,8 +41,8 @@
      * True if a value can be stacked as the source type and unstacked as the
      * destination type, without violating the JVM's type consistency.
      *
-     * @param call the type of a stacked value
-     * @param recv the type by which we'd like to treat it
+     * @param src the type of a stacked value
+     * @param dst the type by which we'd like to treat it
      * @return whether the retyping can be done without motion or reformatting
      */
     public static boolean isNullConversion(Class<?> src, Class<?> dst) {
@@ -67,9 +67,8 @@
 
     /**
      * Specialization of isNullConversion to reference types.
-
-     * @param call the type of a stacked value
-     * @param recv the reference type by which we'd like to treat it
+     * @param src the type of a stacked value
+     * @param dst the reference type by which we'd like to treat it
      * @return whether the retyping can be done without a cast
      */
     public static boolean isNullReferenceConversion(Class<?> src, Class<?> dst) {
diff --git a/jdk/src/share/classes/sun/java2d/SunGraphicsEnvironment.java b/jdk/src/share/classes/sun/java2d/SunGraphicsEnvironment.java
index 724fa2f..92a0d2d 100644
--- a/jdk/src/share/classes/sun/java2d/SunGraphicsEnvironment.java
+++ b/jdk/src/share/classes/sun/java2d/SunGraphicsEnvironment.java
@@ -25,6 +25,7 @@
 
 package sun.java2d;
 
+import java.awt.AWTError;
 import java.awt.Color;
 import java.awt.Font;
 import java.awt.Graphics2D;
@@ -165,7 +166,11 @@
      * Returns the default screen graphics device.
      */
     public GraphicsDevice getDefaultScreenDevice() {
-        return getScreenDevices()[0];
+        GraphicsDevice[] screens = getScreenDevices();
+        if (screens.length == 0) {
+            throw new AWTError("no screen devices");
+        }
+        return screens[0];
     }
 
     /**
diff --git a/jdk/src/share/classes/sun/reflect/annotation/AnnotatedTypeFactory.java b/jdk/src/share/classes/sun/reflect/annotation/AnnotatedTypeFactory.java
index e9f3f95..9e01fc5 100644
--- a/jdk/src/share/classes/sun/reflect/annotation/AnnotatedTypeFactory.java
+++ b/jdk/src/share/classes/sun/reflect/annotation/AnnotatedTypeFactory.java
@@ -118,6 +118,7 @@
 
     static final AnnotatedType EMPTY_ANNOTATED_TYPE = new AnnotatedTypeBaseImpl(null, LocationInfo.BASE_LOCATION,
                                                             new TypeAnnotation[0], new TypeAnnotation[0], null);
+    static final AnnotatedType[] EMPTY_ANNOTATED_TYPE_ARRAY = new AnnotatedType[0];
 
     private static class AnnotatedTypeBaseImpl implements AnnotatedType {
         private final Type type;
diff --git a/jdk/src/share/classes/sun/reflect/annotation/TypeAnnotationParser.java b/jdk/src/share/classes/sun/reflect/annotation/TypeAnnotationParser.java
index 6b9712a..bcf48ff 100644
--- a/jdk/src/share/classes/sun/reflect/annotation/TypeAnnotationParser.java
+++ b/jdk/src/share/classes/sun/reflect/annotation/TypeAnnotationParser.java
@@ -128,14 +128,18 @@
         for (int i = 0; i < size; i++) {
             @SuppressWarnings("unchecked")
             ArrayList<TypeAnnotation> list = l[i];
+            TypeAnnotation[] typeAnnotations;
             if (list != null) {
-                TypeAnnotation[] typeAnnotations = list.toArray(new TypeAnnotation[0]);
-                result[i] = AnnotatedTypeFactory.buildAnnotatedType(types[i],
-                                                                    LocationInfo.BASE_LOCATION,
-                                                                    typeAnnotations,
-                                                                    typeAnnotations,
-                                                                    decl);
+                typeAnnotations = list.toArray(new TypeAnnotation[list.size()]);
+            } else {
+                typeAnnotations = EMPTY_TYPE_ANNOTATION_ARRAY;
             }
+            result[i] = AnnotatedTypeFactory.buildAnnotatedType(types[i],
+                                                                LocationInfo.BASE_LOCATION,
+                                                                typeAnnotations,
+                                                                typeAnnotations,
+                                                                decl);
+
         }
         return result;
     }
@@ -174,6 +178,11 @@
     public static AnnotatedType[] buildAnnotatedInterfaces(byte[] rawAnnotations,
             ConstantPool cp,
             Class<?> decl) {
+        if (decl == Object.class ||
+                decl.isArray() ||
+                decl.isPrimitive() ||
+                decl == Void.TYPE)
+            return AnnotatedTypeFactory.EMPTY_ANNOTATED_TYPE_ARRAY;
         return buildAnnotatedTypes(rawAnnotations,
                                    cp,
                                    decl,
diff --git a/jdk/src/share/classes/sun/security/ec/SunEC.java b/jdk/src/share/classes/sun/security/ec/SunEC.java
index 539cea4..3189169 100644
--- a/jdk/src/share/classes/sun/security/ec/SunEC.java
+++ b/jdk/src/share/classes/sun/security/ec/SunEC.java
@@ -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
@@ -67,7 +67,7 @@
     }
 
     public SunEC() {
-        super("SunEC", 1.7d, "Sun Elliptic Curve provider (EC, ECDSA, ECDH)");
+        super("SunEC", 1.8d, "Sun Elliptic Curve provider (EC, ECDSA, ECDH)");
 
         // if there is no security manager installed, put directly into
         // the provider. Otherwise, create a temporary map and use a
diff --git a/jdk/src/share/classes/sun/security/jgss/SunProvider.java b/jdk/src/share/classes/sun/security/jgss/SunProvider.java
index a49cb8a..4239675 100644
--- a/jdk/src/share/classes/sun/security/jgss/SunProvider.java
+++ b/jdk/src/share/classes/sun/security/jgss/SunProvider.java
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2000, 2006, 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
@@ -62,7 +62,7 @@
 
     public SunProvider() {
         /* We are the Sun JGSS provider */
-        super("SunJGSS", 1.7d, INFO);
+        super("SunJGSS", 1.8d, INFO);
 
         AccessController.doPrivileged(
                         new java.security.PrivilegedAction<Void>() {
diff --git a/jdk/src/share/classes/sun/security/jgss/spnego/SpNegoContext.java b/jdk/src/share/classes/sun/security/jgss/spnego/SpNegoContext.java
index d6bc6d9..808acb2 100644
--- a/jdk/src/share/classes/sun/security/jgss/spnego/SpNegoContext.java
+++ b/jdk/src/share/classes/sun/security/jgss/spnego/SpNegoContext.java
@@ -525,6 +525,10 @@
 
                 // get the mechanism token
                 byte[] mechToken = initToken.getMechToken();
+                if (mechToken == null) {
+                    throw new GSSException(GSSException.FAILURE, -1,
+                            "mechToken is missing");
+                }
 
                 /*
                  * Select the best match between the list of mechs
diff --git a/jdk/src/share/classes/sun/security/jgss/wrapper/SunNativeProvider.java b/jdk/src/share/classes/sun/security/jgss/wrapper/SunNativeProvider.java
index b0e81aa..b0bb15d 100644
--- a/jdk/src/share/classes/sun/security/jgss/wrapper/SunNativeProvider.java
+++ b/jdk/src/share/classes/sun/security/jgss/wrapper/SunNativeProvider.java
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2005, 2012, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2005, 2013, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -120,7 +120,7 @@
 
     public SunNativeProvider() {
         /* We are the Sun NativeGSS provider */
-        super(NAME, 1.0, INFO);
+        super(NAME, 1.8d, INFO);
 
         if (MECH_MAP != null) {
             AccessController.doPrivileged(new PutAllAction(this, MECH_MAP));
diff --git a/jdk/src/share/classes/sun/security/pkcs11/Secmod.java b/jdk/src/share/classes/sun/security/pkcs11/Secmod.java
index 927a32a..1d2c5c0 100644
--- a/jdk/src/share/classes/sun/security/pkcs11/Secmod.java
+++ b/jdk/src/share/classes/sun/security/pkcs11/Secmod.java
@@ -756,8 +756,12 @@
             if (DEBUG) System.out.println("handles: " + handles.length);
 
             for (long handle : handles) {
-                TrustAttributes trust = new TrustAttributes(token, session, handle);
-                trustMap.put(trust.getHash(), trust);
+                try {
+                    TrustAttributes trust = new TrustAttributes(token, session, handle);
+                    trustMap.put(trust.getHash(), trust);
+                } catch (PKCS11Exception e) {
+                    // skip put on pkcs11 error
+                }
             }
         } finally {
             token.releaseSession(session);
diff --git a/jdk/src/share/classes/sun/security/pkcs11/SunPKCS11.java b/jdk/src/share/classes/sun/security/pkcs11/SunPKCS11.java
index ee9169b..b6dd35a 100644
--- a/jdk/src/share/classes/sun/security/pkcs11/SunPKCS11.java
+++ b/jdk/src/share/classes/sun/security/pkcs11/SunPKCS11.java
@@ -94,7 +94,7 @@
     }
 
     public SunPKCS11() {
-        super("SunPKCS11-Dummy", 1.7d, "SunPKCS11-Dummy");
+        super("SunPKCS11-Dummy", 1.8d, "SunPKCS11-Dummy");
         throw new ProviderException
             ("SunPKCS11 requires configuration file argument");
     }
@@ -127,7 +127,7 @@
     public SunPKCS11(String configName, InputStream configStream) {
         super("SunPKCS11-" +
             Config.getConfig(configName, configStream).getName(),
-            1.7d, Config.getConfig(configName, configStream).getDescription());
+            1.8d, Config.getConfig(configName, configStream).getDescription());
         this.configName = configName;
         this.config = Config.removeConfig(configName);
 
diff --git a/jdk/src/share/classes/sun/security/provider/MD4.java b/jdk/src/share/classes/sun/security/provider/MD4.java
index d04639f..346bc9d 100644
--- a/jdk/src/share/classes/sun/security/provider/MD4.java
+++ b/jdk/src/share/classes/sun/security/provider/MD4.java
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2005, 2012, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2005, 2013, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -65,7 +65,7 @@
     private final static Provider md4Provider;
 
     static {
-        md4Provider = new Provider("MD4Provider", 1.0d, "MD4 MessageDigest") {
+        md4Provider = new Provider("MD4Provider", 1.8d, "MD4 MessageDigest") {
             private static final long serialVersionUID = -8850464997518327965L;
         };
         AccessController.doPrivileged(new PrivilegedAction<Void>() {
diff --git a/jdk/src/share/classes/sun/security/provider/Sun.java b/jdk/src/share/classes/sun/security/provider/Sun.java
index 4af2be5..07ef2ff 100644
--- a/jdk/src/share/classes/sun/security/provider/Sun.java
+++ b/jdk/src/share/classes/sun/security/provider/Sun.java
@@ -47,7 +47,7 @@
 
     public Sun() {
         /* We are the SUN provider */
-        super("SUN", 1.8, INFO);
+        super("SUN", 1.8d, INFO);
 
         // if there is no security manager installed, put directly into
         // the provider. Otherwise, create a temporary map and use a
diff --git a/jdk/src/share/classes/sun/security/provider/VerificationProvider.java b/jdk/src/share/classes/sun/security/provider/VerificationProvider.java
index 082427d..296b034 100644
--- a/jdk/src/share/classes/sun/security/provider/VerificationProvider.java
+++ b/jdk/src/share/classes/sun/security/provider/VerificationProvider.java
@@ -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
@@ -61,7 +61,7 @@
     }
 
     public VerificationProvider() {
-        super("SunJarVerification", 1.7, "Jar Verification Provider");
+        super("SunJarVerification", 1.8d, "Jar Verification Provider");
         // register all algorithms normally registered by the Sun and SunRsaSign
         // providers, but only if they are missing
         if (ACTIVE == false) {
diff --git a/jdk/src/share/classes/sun/security/rsa/SunRsaSign.java b/jdk/src/share/classes/sun/security/rsa/SunRsaSign.java
index a00bf30..65ae02a 100644
--- a/jdk/src/share/classes/sun/security/rsa/SunRsaSign.java
+++ b/jdk/src/share/classes/sun/security/rsa/SunRsaSign.java
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2003, 2011, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2003, 2013, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -43,7 +43,7 @@
     private static final long serialVersionUID = 866040293550393045L;
 
     public SunRsaSign() {
-        super("SunRsaSign", 1.7d, "Sun RSA signature provider");
+        super("SunRsaSign", 1.8d, "Sun RSA signature provider");
 
         // if there is no security manager installed, put directly into
         // the provider. Otherwise, create a temporary map and use a
diff --git a/jdk/src/share/classes/sun/security/smartcardio/SunPCSC.java b/jdk/src/share/classes/sun/security/smartcardio/SunPCSC.java
index fa93192..c0cb856 100644
--- a/jdk/src/share/classes/sun/security/smartcardio/SunPCSC.java
+++ b/jdk/src/share/classes/sun/security/smartcardio/SunPCSC.java
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2005, 2006, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2005, 2013, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -40,7 +40,7 @@
     private static final long serialVersionUID = 6168388284028876579L;
 
     public SunPCSC() {
-        super("SunPCSC", 1.7d, "Sun PC/SC provider");
+        super("SunPCSC", 1.8d, "Sun PC/SC provider");
         AccessController.doPrivileged(new PrivilegedAction<Void>() {
             public Void run() {
                 put("TerminalFactory.PC/SC", "sun.security.smartcardio.SunPCSC$Factory");
diff --git a/jdk/src/share/classes/sun/security/ssl/ClientHandshaker.java b/jdk/src/share/classes/sun/security/ssl/ClientHandshaker.java
index 459a0ae..5c3abbc 100644
--- a/jdk/src/share/classes/sun/security/ssl/ClientHandshaker.java
+++ b/jdk/src/share/classes/sun/security/ssl/ClientHandshaker.java
@@ -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
@@ -92,6 +92,8 @@
     private List<SNIServerName> requestedServerNames =
             Collections.<SNIServerName>emptyList();
 
+    private boolean serverNamesAccepted = false;
+
     /*
      * Constructors
      */
@@ -567,7 +569,9 @@
         // check extensions
         for (HelloExtension ext : mesg.extensions.list()) {
             ExtensionType type = ext.type;
-            if ((type != ExtensionType.EXT_ELLIPTIC_CURVES)
+            if (type == ExtensionType.EXT_SERVER_NAME) {
+                serverNamesAccepted = true;
+            } else if ((type != ExtensionType.EXT_ELLIPTIC_CURVES)
                     && (type != ExtensionType.EXT_EC_POINT_FORMATS)
                     && (type != ExtensionType.EXT_SERVER_NAME)
                     && (type != ExtensionType.EXT_RENEGOTIATION_INFO)) {
@@ -864,15 +868,47 @@
             break;
         case K_KRB5:
         case K_KRB5_EXPORT:
-            String hostname = getHostSE();
-            if (hostname == null) {
-                throw new IOException("Hostname is required" +
-                                " to use Kerberos cipher suites");
+            String sniHostname = null;
+            for (SNIServerName serverName : requestedServerNames) {
+                if (serverName instanceof SNIHostName) {
+                    sniHostname = ((SNIHostName) serverName).getAsciiName();
+                    break;
+                }
             }
-            KerberosClientKeyExchange kerberosMsg =
-                new KerberosClientKeyExchange(
-                    hostname, isLoopbackSE(), getAccSE(), protocolVersion,
-                sslContext.getSecureRandom());
+
+            KerberosClientKeyExchange kerberosMsg = null;
+            if (sniHostname != null) {
+                // use first requested SNI hostname
+                try {
+                    kerberosMsg = new KerberosClientKeyExchange(
+                        sniHostname, getAccSE(), protocolVersion,
+                        sslContext.getSecureRandom());
+                } catch(IOException e) {
+                    if (serverNamesAccepted) {
+                        // server accepted requested SNI hostname,
+                        // so it must be used
+                        throw e;
+                    }
+                    // fallback to using hostname
+                    if (debug != null && Debug.isOn("handshake")) {
+                        System.out.println(
+                            "Warning, cannot use Server Name Indication: "
+                                + e.getMessage());
+                    }
+                }
+            }
+
+            if (kerberosMsg == null) {
+                String hostname = getHostSE();
+                if (hostname == null) {
+                    throw new IOException("Hostname is required" +
+                        " to use Kerberos cipher suites");
+                }
+                kerberosMsg = new KerberosClientKeyExchange(
+                     hostname, getAccSE(), protocolVersion,
+                     sslContext.getSecureRandom());
+            }
+
             // Record the principals involved in exchange
             session.setPeerPrincipal(kerberosMsg.getPeerPrincipal());
             session.setLocalPrincipal(kerberosMsg.getLocalPrincipal());
diff --git a/jdk/src/share/classes/sun/security/ssl/Handshaker.java b/jdk/src/share/classes/sun/security/ssl/Handshaker.java
index a923204..7fde1d2 100644
--- a/jdk/src/share/classes/sun/security/ssl/Handshaker.java
+++ b/jdk/src/share/classes/sun/security/ssl/Handshaker.java
@@ -335,14 +335,6 @@
         }
     }
 
-    boolean isLoopbackSE() {
-        if (conn != null) {
-            return conn.getInetAddress().isLoopbackAddress();
-        } else {
-            return false;
-        }
-    }
-
     int getPortSE() {
         if (conn != null) {
             return conn.getPort();
diff --git a/jdk/src/share/classes/sun/security/ssl/JsseJce.java b/jdk/src/share/classes/sun/security/ssl/JsseJce.java
index d128f2e..4c98772 100644
--- a/jdk/src/share/classes/sun/security/ssl/JsseJce.java
+++ b/jdk/src/share/classes/sun/security/ssl/JsseJce.java
@@ -110,7 +110,7 @@
         private static final long serialVersionUID = -3284138292032213752L;
 
         SunCertificates(final Provider p) {
-            super("SunCertificates", 1.0d, "SunJSSE internal");
+            super("SunCertificates", 1.8d, "SunJSSE internal");
             AccessController.doPrivileged(new PrivilegedAction<Object>() {
                 @Override
                 public Object run() {
diff --git a/jdk/src/share/classes/sun/security/ssl/KerberosClientKeyExchange.java b/jdk/src/share/classes/sun/security/ssl/KerberosClientKeyExchange.java
index 7b4decf..ff393d9 100644
--- a/jdk/src/share/classes/sun/security/ssl/KerberosClientKeyExchange.java
+++ b/jdk/src/share/classes/sun/security/ssl/KerberosClientKeyExchange.java
@@ -77,12 +77,12 @@
         // please won't check the value of impl variable
     }
 
-    public KerberosClientKeyExchange(String serverName, boolean isLoopback,
+    public KerberosClientKeyExchange(String serverName,
         AccessControlContext acc, ProtocolVersion protocolVersion,
         SecureRandom rand) throws IOException {
 
         if (impl != null) {
-            init(serverName, isLoopback, acc, protocolVersion, rand);
+            init(serverName, acc, protocolVersion, rand);
         } else {
             throw new IllegalStateException("Kerberos is unavailable");
         }
@@ -120,12 +120,12 @@
         impl.print(p);
     }
 
-    public void init(String serverName, boolean isLoopback,
+    public void init(String serverName,
         AccessControlContext acc, ProtocolVersion protocolVersion,
         SecureRandom rand) throws IOException {
 
         if (impl != null) {
-            impl.init(serverName, isLoopback, acc, protocolVersion, rand);
+            impl.init(serverName, acc, protocolVersion, rand);
         }
     }
 
diff --git a/jdk/src/share/classes/sun/security/ssl/ServerHandshaker.java b/jdk/src/share/classes/sun/security/ssl/ServerHandshaker.java
index 23b806f..85c1b4d 100644
--- a/jdk/src/share/classes/sun/security/ssl/ServerHandshaker.java
+++ b/jdk/src/share/classes/sun/security/ssl/ServerHandshaker.java
@@ -40,6 +40,8 @@
 
 import javax.security.auth.Subject;
 
+import sun.security.util.KeyUtil;
+import sun.security.action.GetPropertyAction;
 import sun.security.ssl.HandshakeMessage.*;
 import sun.security.ssl.CipherSuite.*;
 import sun.security.ssl.SignatureAndHashAlgorithm.*;
@@ -93,6 +95,50 @@
     // the preferable signature algorithm used by ServerKeyExchange message
     SignatureAndHashAlgorithm preferableSignatureAlgorithm;
 
+    // Flag to use smart ephemeral DH key which size matches the corresponding
+    // authentication key
+    private static final boolean useSmartEphemeralDHKeys;
+
+    // Flag to use legacy ephemeral DH key which size is 512 bits for
+    // exportable cipher suites, and 768 bits for others
+    private static final boolean useLegacyEphemeralDHKeys;
+
+    // The customized ephemeral DH key size for non-exportable cipher suites.
+    private static final int customizedDHKeySize;
+
+    static {
+        String property = AccessController.doPrivileged(
+                    new GetPropertyAction("jdk.tls.ephemeralDHKeySize"));
+        if (property == null || property.length() == 0) {
+            useLegacyEphemeralDHKeys = false;
+            useSmartEphemeralDHKeys = false;
+            customizedDHKeySize = -1;
+        } else if ("matched".equals(property)) {
+            useLegacyEphemeralDHKeys = false;
+            useSmartEphemeralDHKeys = true;
+            customizedDHKeySize = -1;
+        } else if ("legacy".equals(property)) {
+            useLegacyEphemeralDHKeys = true;
+            useSmartEphemeralDHKeys = false;
+            customizedDHKeySize = -1;
+        } else {
+            useLegacyEphemeralDHKeys = false;
+            useSmartEphemeralDHKeys = false;
+
+            try {
+                customizedDHKeySize = Integer.parseUnsignedInt(property);
+                if (customizedDHKeySize < 1024 || customizedDHKeySize > 2048) {
+                    throw new IllegalArgumentException(
+                        "Customized DH key size should be positive integer " +
+                        "between 1024 and 2048 bits, inclusive");
+                }
+            } catch (NumberFormatException nfe) {
+                throw new IllegalArgumentException(
+                        "Invalid system property jdk.tls.ephemeralDHKeySize");
+            }
+        }
+    }
+
     /*
      * Constructor ... use the keys found in the auth context.
      */
@@ -1107,7 +1153,7 @@
                 }
             }
 
-            setupEphemeralDHKeys(suite.exportable);
+            setupEphemeralDHKeys(suite.exportable, privateKey);
             break;
         case K_ECDHE_RSA:
             // need RSA certs for authentication
@@ -1144,7 +1190,8 @@
             if (setupPrivateKeyAndChain("DSA") == false) {
                 return false;
             }
-            setupEphemeralDHKeys(suite.exportable);
+
+            setupEphemeralDHKeys(suite.exportable, privateKey);
             break;
         case K_ECDHE_ECDSA:
             // get preferable peer signature algorithm for server key exchange
@@ -1188,7 +1235,7 @@
             break;
         case K_DH_ANON:
             // no certs needed for anonymous
-            setupEphemeralDHKeys(suite.exportable);
+            setupEphemeralDHKeys(suite.exportable, null);
             break;
         case K_ECDH_ANON:
             // no certs needed for anonymous
@@ -1237,15 +1284,70 @@
      * Acquire some "ephemeral" Diffie-Hellman  keys for this handshake.
      * We don't reuse these, for improved forward secrecy.
      */
-    private void setupEphemeralDHKeys(boolean export) {
+    private void setupEphemeralDHKeys(boolean export, Key key) {
         /*
-         * Diffie-Hellman keys ... we use 768 bit private keys due
-         * to the "use twice as many key bits as bits you want secret"
-         * rule of thumb, assuming we want the same size premaster
-         * secret with Diffie-Hellman and RSA key exchanges.  Except
-         * that exportable ciphers max out at 512 bits modulus values.
+         * 768 bits ephemeral DH private keys were used to be used in
+         * ServerKeyExchange except that exportable ciphers max out at 512
+         * bits modulus values. We still adhere to this behavior in legacy
+         * mode (system property "jdk.tls.ephemeralDHKeySize" is defined
+         * as "legacy").
+         *
+         * Old JDK (JDK 7 and previous) releases don't support DH keys bigger
+         * than 1024 bits. We have to consider the compatibility requirement.
+         * 1024 bits DH key is always used for non-exportable cipher suites
+         * in default mode (system property "jdk.tls.ephemeralDHKeySize"
+         * is not defined).
+         *
+         * However, if applications want more stronger strength, setting
+         * system property "jdk.tls.ephemeralDHKeySize" to "matched"
+         * is a workaround to use ephemeral DH key which size matches the
+         * corresponding authentication key. For example, if the public key
+         * size of an authentication certificate is 2048 bits, then the
+         * ephemeral DH key size should be 2048 bits accordingly unless
+         * the cipher suite is exportable.  This key sizing scheme keeps
+         * the cryptographic strength consistent between authentication
+         * keys and key-exchange keys.
+         *
+         * Applications may also want to customize the ephemeral DH key size
+         * to a fixed length for non-exportable cipher suites. This can be
+         * approached by setting system property "jdk.tls.ephemeralDHKeySize"
+         * to a valid positive integer between 1024 and 2048 bits, inclusive.
+         *
+         * Note that the minimum acceptable key size is 1024 bits except
+         * exportable cipher suites or legacy mode.
+         *
+         * Note that the maximum acceptable key size is 2048 bits because
+         * DH keys bigger than 2048 are not always supported by underlying
+         * JCE providers.
+         *
+         * Note that per RFC 2246, the key size limit of DH is 512 bits for
+         * exportable cipher suites.  Because of the weakness, exportable
+         * cipher suites are deprecated since TLS v1.1 and they are not
+         * enabled by default in Oracle provider. The legacy behavior is
+         * reserved and 512 bits DH key is always used for exportable
+         * cipher suites.
          */
-        dh = new DHCrypt((export ? 512 : 768), sslContext.getSecureRandom());
+        int keySize = export ? 512 : 1024;           // default mode
+        if (!export) {
+            if (useLegacyEphemeralDHKeys) {          // legacy mode
+                keySize = 768;
+            } else if (useSmartEphemeralDHKeys) {    // matched mode
+                if (key != null) {
+                    int ks = KeyUtil.getKeySize(key);
+                    // Note that SunJCE provider only supports 2048 bits DH
+                    // keys bigger than 1024.  Please DON'T use value other
+                    // than 1024 and 2048 at present.  We may improve the
+                    // underlying providers and key size here in the future.
+                    //
+                    // keySize = ks <= 1024 ? 1024 : (ks >= 2048 ? 2048 : ks);
+                    keySize = ks <= 1024 ? 1024 : 2048;
+                } // Otherwise, anonymous cipher suites, 1024-bit is used.
+            } else if (customizedDHKeySize > 0) {    // customized mode
+                keySize = customizedDHKeySize;
+            }
+        }
+
+        dh = new DHCrypt(keySize, sslContext.getSecureRandom());
     }
 
     // Setup the ephemeral ECDH parameters.
diff --git a/jdk/src/share/classes/sun/security/ssl/SunJSSE.java b/jdk/src/share/classes/sun/security/ssl/SunJSSE.java
index 08d03f7..aa55be1 100644
--- a/jdk/src/share/classes/sun/security/ssl/SunJSSE.java
+++ b/jdk/src/share/classes/sun/security/ssl/SunJSSE.java
@@ -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
@@ -131,7 +131,7 @@
 
     private SunJSSE(java.security.Provider cryptoProvider,
             String providerName) {
-        super("SunJSSE", 1.6d, fipsInfo + providerName + ")");
+        super("SunJSSE", 1.8d, fipsInfo + providerName + ")");
         subclassCheck();
         if (cryptoProvider == null) {
             // Calling Security.getProvider() will cause other providers to be
diff --git a/jdk/src/share/classes/sun/security/ssl/krb5/KerberosClientKeyExchangeImpl.java b/jdk/src/share/classes/sun/security/ssl/krb5/KerberosClientKeyExchangeImpl.java
index bd6f04e..1fb7708 100644
--- a/jdk/src/share/classes/sun/security/ssl/krb5/KerberosClientKeyExchangeImpl.java
+++ b/jdk/src/share/classes/sun/security/ssl/krb5/KerberosClientKeyExchangeImpl.java
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2003, 2012, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2003, 2013, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -105,12 +105,12 @@
      *          secret
      */
     @Override
-    public void init(String serverName, boolean isLoopback,
+    public void init(String serverName,
         AccessControlContext acc, ProtocolVersion protocolVersion,
         SecureRandom rand) throws IOException {
 
          // Get service ticket
-         KerberosTicket ticket = getServiceTicket(serverName, isLoopback, acc);
+         KerberosTicket ticket = getServiceTicket(serverName, acc);
          encodedTicket = ticket.getEncoded();
 
          // Record the Kerberos principals
@@ -292,25 +292,33 @@
     }
 
     // Similar to sun.security.jgss.krb5.Krb5InitCredenetial/Krb5Context
-    private static KerberosTicket getServiceTicket(String srvName,
-        boolean isLoopback, final AccessControlContext acc) throws IOException {
+    private static KerberosTicket getServiceTicket(String serverName,
+        final AccessControlContext acc) throws IOException {
 
-        // get the local hostname if srvName is loopback address
-        String serverName = srvName;
-        if (isLoopback) {
+        if ("localhost".equals(serverName) ||
+                "localhost.localdomain".equals(serverName)) {
+
+            if (debug != null && Debug.isOn("handshake")) {
+                System.out.println("Get the local hostname");
+            }
             String localHost = java.security.AccessController.doPrivileged(
                 new java.security.PrivilegedAction<String>() {
                 public String run() {
-                    String hostname;
                     try {
-                        hostname = InetAddress.getLocalHost().getHostName();
+                        return InetAddress.getLocalHost().getHostName();
                     } catch (java.net.UnknownHostException e) {
-                        hostname = "localhost";
+                        if (debug != null && Debug.isOn("handshake")) {
+                            System.out.println("Warning,"
+                                + " cannot get the local hostname: "
+                                + e.getMessage());
+                        }
+                        return null;
                     }
-                    return hostname;
                 }
             });
-          serverName = localHost;
+            if (localHost != null) {
+                serverName = localHost;
+            }
         }
 
         // Resolve serverName (possibly in IP addr form) to Kerberos principal
diff --git a/jdk/src/share/classes/sun/security/tools/keytool/Main.java b/jdk/src/share/classes/sun/security/tools/keytool/Main.java
index 02ea1d0..c5e0fe7 100644
--- a/jdk/src/share/classes/sun/security/tools/keytool/Main.java
+++ b/jdk/src/share/classes/sun/security/tools/keytool/Main.java
@@ -72,6 +72,8 @@
 import sun.security.util.Password;
 import javax.crypto.KeyGenerator;
 import javax.crypto.SecretKey;
+import javax.crypto.SecretKeyFactory;
+import javax.crypto.spec.PBEKeySpec;
 
 import sun.security.pkcs.PKCS9Attribute;
 import sun.security.tools.KeyStoreUtil;
@@ -190,6 +192,10 @@
             KEYPASS, KEYSTORE, STOREPASS, STORETYPE,
             PROVIDERNAME, PROVIDERCLASS, PROVIDERARG,
             PROVIDERPATH, V),
+        IMPORTPASS("Imports.a.password",
+            ALIAS, KEYPASS, KEYALG, KEYSIZE, KEYSTORE,
+            STOREPASS, STORETYPE, PROVIDERNAME, PROVIDERCLASS,
+            PROVIDERARG, PROVIDERPATH, V, PROTECTED),
         IMPORTKEYSTORE("Imports.one.or.all.entries.from.another.keystore",
             SRCKEYSTORE, DESTKEYSTORE, SRCSTORETYPE,
             DESTSTORETYPE, SRCSTOREPASS, DESTSTOREPASS,
@@ -409,6 +415,8 @@
                 command = GENKEYPAIR;
             } else if (collator.compare(flags, "-import") == 0) {
                 command = IMPORTCERT;
+            } else if (collator.compare(flags, "-importpassword") == 0) {
+                command = IMPORTPASS;
             }
             /*
              * Help
@@ -727,6 +735,7 @@
                         command != GENSECKEY &&
                         command != IDENTITYDB &&
                         command != IMPORTCERT &&
+                        command != IMPORTPASS &&
                         command != IMPORTKEYSTORE &&
                         command != PRINTCRL) {
                         throw new Exception(rb.getString
@@ -808,6 +817,7 @@
                         command == GENKEYPAIR ||
                         command == GENSECKEY ||
                         command == IMPORTCERT ||
+                        command == IMPORTPASS ||
                         command == IMPORTKEYSTORE ||
                         command == KEYCLONE ||
                         command == CHANGEALIAS ||
@@ -958,6 +968,13 @@
             }
             doGenSecretKey(alias, keyAlgName, keysize);
             kssave = true;
+        } else if (command == IMPORTPASS) {
+            if (keyAlgName == null) {
+                keyAlgName = "PBE";
+            }
+            // password is stored as a secret key
+            doGenSecretKey(alias, keyAlgName, keysize);
+            kssave = true;
         } else if (command == IDENTITYDB) {
             if (filename != null) {
                 try (InputStream inStream = new FileInputStream(filename)) {
@@ -1419,6 +1436,43 @@
         }
         return null;    // PKCS11, MSCAPI, or -protected
     }
+
+    /*
+     * Prompt the user for the password credential to be stored.
+     */
+    private char[] promptForCredential() throws Exception {
+        // Handle password supplied via stdin
+        if (System.console() == null) {
+            char[] importPass = Password.readPassword(System.in);
+            passwords.add(importPass);
+            return importPass;
+        }
+
+        int count;
+        for (count = 0; count < 3; count++) {
+            System.err.print(
+                rb.getString("Enter.the.password.to.be.stored."));
+            System.err.flush();
+            char[] entered = Password.readPassword(System.in);
+            passwords.add(entered);
+            System.err.print(rb.getString("Re.enter.password."));
+            char[] passAgain = Password.readPassword(System.in);
+            passwords.add(passAgain);
+            if (!Arrays.equals(entered, passAgain)) {
+                System.err.println(rb.getString("They.don.t.match.Try.again"));
+                continue;
+            }
+            return entered;
+        }
+
+        if (count == 3) {
+            throw new Exception(rb.getString
+                ("Too.many.failures.key.not.added.to.keystore"));
+        }
+
+        return null;
+    }
+
     /**
      * Creates a new secret key.
      */
@@ -1436,24 +1490,63 @@
             throw new Exception(form.format(source));
         }
 
+        // Use the keystore's default PBE algorithm for entry protection
+        boolean useDefaultPBEAlgorithm = true;
         SecretKey secKey = null;
-        KeyGenerator keygen = KeyGenerator.getInstance(keyAlgName);
-        if (keysize != -1) {
-            keygen.init(keysize);
-        } else if ("DES".equalsIgnoreCase(keyAlgName)) {
-            keygen.init(56);
-        } else if ("DESede".equalsIgnoreCase(keyAlgName)) {
-            keygen.init(168);
+
+        if (keyAlgName.toUpperCase().startsWith("PBE")) {
+            SecretKeyFactory factory = SecretKeyFactory.getInstance("PBE");
+
+            // User is prompted for PBE credential
+            secKey =
+                factory.generateSecret(new PBEKeySpec(promptForCredential()));
+
+            // Check whether a specific PBE algorithm was specified
+            if (!"PBE".equalsIgnoreCase(keyAlgName)) {
+                useDefaultPBEAlgorithm = false;
+            }
+
+            if (verbose) {
+                MessageFormat form = new MessageFormat(rb.getString(
+                    "Generated.keyAlgName.secret.key"));
+                Object[] source =
+                    {useDefaultPBEAlgorithm ? "PBE" : secKey.getAlgorithm()};
+                System.err.println(form.format(source));
+            }
         } else {
-            throw new Exception(rb.getString
-                ("Please.provide.keysize.for.secret.key.generation"));
+            KeyGenerator keygen = KeyGenerator.getInstance(keyAlgName);
+            if (keysize == -1) {
+                if ("DES".equalsIgnoreCase(keyAlgName)) {
+                    keysize = 56;
+                } else if ("DESede".equalsIgnoreCase(keyAlgName)) {
+                    keysize = 168;
+                } else {
+                    throw new Exception(rb.getString
+                        ("Please.provide.keysize.for.secret.key.generation"));
+                }
+            }
+            keygen.init(keysize);
+            secKey = keygen.generateKey();
+
+            if (verbose) {
+                MessageFormat form = new MessageFormat(rb.getString
+                    ("Generated.keysize.bit.keyAlgName.secret.key"));
+                Object[] source = {new Integer(keysize),
+                                    secKey.getAlgorithm()};
+                System.err.println(form.format(source));
+            }
         }
 
-        secKey = keygen.generateKey();
         if (keyPass == null) {
             keyPass = promptForKeyPass(alias, null, storePass);
         }
-        keyStore.setKeyEntry(alias, secKey, keyPass, null);
+
+        if (useDefaultPBEAlgorithm) {
+            keyStore.setKeyEntry(alias, secKey, keyPass, null);
+        } else {
+            keyStore.setEntry(alias, new KeyStore.SecretKeyEntry(secKey),
+                new KeyStore.PasswordProtection(keyPass, keyAlgName, null));
+        }
     }
 
     /**
diff --git a/jdk/src/share/classes/sun/security/tools/keytool/Resources.java b/jdk/src/share/classes/sun/security/tools/keytool/Resources.java
index 393aa3b..6199927 100644
--- a/jdk/src/share/classes/sun/security/tools/keytool/Resources.java
+++ b/jdk/src/share/classes/sun/security/tools/keytool/Resources.java
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2000, 2012, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2000, 2013, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -65,10 +65,16 @@
         {"Generates.certificate.from.a.certificate.request",
                 "Generates certificate from a certificate request"}, //-gencert
         {"Generates.CRL", "Generates CRL"}, //-gencrl
+        {"Generated.keyAlgName.secret.key",
+                "Generated {0} secret key"}, //-genseckey
+        {"Generated.keysize.bit.keyAlgName.secret.key",
+                "Generated {0}-bit {1} secret key"}, //-genseckey
         {"Imports.entries.from.a.JDK.1.1.x.style.identity.database",
                 "Imports entries from a JDK 1.1.x-style identity database"}, //-identitydb
         {"Imports.a.certificate.or.a.certificate.chain",
                 "Imports a certificate or a certificate chain"}, //-importcert
+        {"Imports.a.password",
+                "Imports a password"}, //-importpass
         {"Imports.one.or.all.entries.from.another.keystore",
                 "Imports one or all entries from another keystore"}, //-importkeystore
         {"Clones.a.key.entry",
@@ -220,6 +226,8 @@
         {"Must.specify.alias", "Must specify alias"},
         {"Keystore.password.must.be.at.least.6.characters",
                 "Keystore password must be at least 6 characters"},
+        {"Enter.the.password.to.be.stored.",
+                "Enter the password to be stored:  "},
         {"Enter.keystore.password.", "Enter keystore password:  "},
         {"Enter.source.keystore.password.", "Enter source keystore password:  "},
         {"Enter.destination.keystore.password.", "Enter destination keystore password:  "},
@@ -328,6 +336,7 @@
         {"New.prompt.", "New {0}: "},
         {"Passwords.must.differ", "Passwords must differ"},
         {"Re.enter.new.prompt.", "Re-enter new {0}: "},
+        {"Re.enter.passpword.", "Re-enter password: "},
         {"Re.enter.new.password.", "Re-enter new password: "},
         {"They.don.t.match.Try.again", "They don't match. Try again"},
         {"Enter.prompt.alias.name.", "Enter {0} alias name:  "},
diff --git a/jdk/src/share/classes/sun/swing/PrintingStatus.java b/jdk/src/share/classes/sun/swing/PrintingStatus.java
index af3658b..d5b7aee 100644
--- a/jdk/src/share/classes/sun/swing/PrintingStatus.java
+++ b/jdk/src/share/classes/sun/swing/PrintingStatus.java
@@ -43,7 +43,7 @@
  * <p/>
  * Methods of these class are thread safe, although most Swing methods
  * are not. Please see
- * <A HREF="http://download.oracle.com/javase/tutorial/uiswing/concurrency/index.html">Concurrency
+ * <A HREF="http://docs.oracle.com/javase/tutorial/uiswing/concurrency/index.html">Concurrency
  * in Swing</A> for more information.
  *
  * @author Alexander Potochkin
diff --git a/jdk/src/share/classes/sun/text/normalizer/UCharacter.java b/jdk/src/share/classes/sun/text/normalizer/UCharacter.java
index 728b903..015bd91 100644
--- a/jdk/src/share/classes/sun/text/normalizer/UCharacter.java
+++ b/jdk/src/share/classes/sun/text/normalizer/UCharacter.java
@@ -42,7 +42,7 @@
 /**
  * <p>
  * The UCharacter class provides extensions to the
- * <a href="http://java.sun.com/j2se/1.5/docs/api/java/lang/Character.html">
+ * <a href="http://docs.oracle.com/javase/1.5.0/docs/api/java/lang/Character.html">
  * java.lang.Character</a> class. These extensions provide support for
  * more Unicode properties and together with the <a href=../text/UTF16.html>UTF16</a>
  * class, provide support for supplementary characters (those with code
diff --git a/jdk/src/share/demo/jfc/FileChooserDemo/FileChooserDemo.java b/jdk/src/share/demo/jfc/FileChooserDemo/FileChooserDemo.java
index bfb74b4..e492e09 100644
--- a/jdk/src/share/demo/jfc/FileChooserDemo/FileChooserDemo.java
+++ b/jdk/src/share/demo/jfc/FileChooserDemo/FileChooserDemo.java
@@ -800,7 +800,7 @@
                      * NOTE: By default, the look and feel will be set to the
                      * Cross Platform Look and Feel (which is currently Metal).
                      * The following code tries to set the Look and Feel to Nimbus.
-                     * http://download.oracle.com/javase/tutorial/uiswing/lookandfeel/nimbus.html
+                     * http://docs.oracle.com/javase/tutorial/uiswing/lookandfeel/nimbus.html
                      */
                     try {
                         for (LookAndFeelInfo info : UIManager.
diff --git a/jdk/src/share/demo/management/JTop/JTop.java b/jdk/src/share/demo/management/JTop/JTop.java
index e3703c6..ab0cd94 100644
--- a/jdk/src/share/demo/management/JTop/JTop.java
+++ b/jdk/src/share/demo/management/JTop/JTop.java
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2005, 2011, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2005, 2013, Oracle and/or its affiliates. All rights reserved.
  *
  * Redistribution and use in source and binary forms, with or without
  * modification, are permitted provided that the following conditions
@@ -87,12 +87,36 @@
  */
 public class JTop extends JPanel {
 
+    private static class StatusBar extends JPanel {
+        private static final long serialVersionUID = -6483392381797633018L;
+        private final JLabel statusText;
+
+        public StatusBar(boolean defaultVisible) {
+            super(new GridLayout(1, 1));
+            statusText = new JLabel();
+            statusText.setVisible(defaultVisible);
+            add(statusText);
+        }
+
+        @Override
+        public Dimension getMaximumSize() {
+            Dimension maximum = super.getMaximumSize();
+            Dimension minimum = getMinimumSize();
+            return new Dimension(maximum.width, minimum.height);
+        }
+
+        public void setMessage(String text) {
+            statusText.setText(text);
+            statusText.setVisible(true);
+        }
+    }
     private static final long serialVersionUID = -1499762160973870696L;
     private MBeanServerConnection server;
     private ThreadMXBean tmbean;
     private MyTableModel tmodel;
+    private final StatusBar statusBar;
     public JTop() {
-        super(new GridLayout(1,0));
+        super(new GridBagLayout());
 
         tmodel = new MyTableModel();
         JTable table = new JTable(tmodel);
@@ -108,7 +132,22 @@
         JScrollPane scrollPane = new JScrollPane(table);
 
         // Add the scroll pane to this panel.
-        add(scrollPane);
+        GridBagConstraints c1 = new GridBagConstraints();
+        c1.fill = GridBagConstraints.BOTH;
+        c1.gridy = 0;
+        c1.gridx = 0;
+        c1.weightx = 1;
+        c1.weighty = 1;
+        add(scrollPane, c1);
+
+        statusBar = new StatusBar(false);
+        GridBagConstraints c2 = new GridBagConstraints();
+        c2.fill = GridBagConstraints.HORIZONTAL;
+        c2.gridy = 1;
+        c2.gridx = 0;
+        c2.weightx = 1.0;
+        c2.weighty = 0.0;
+        add(statusBar, c2);
     }
 
     // Set the MBeanServerConnection object for communicating
@@ -123,9 +162,13 @@
             e.printStackTrace();
         }
         if (!tmbean.isThreadCpuTimeSupported()) {
-            System.err.println("This VM does not support thread CPU time monitoring");
+            statusBar.setMessage("Monitored VM does not support thread CPU time measurement");
         } else {
-            tmbean.setThreadCpuTimeEnabled(true);
+            try {
+                tmbean.setThreadCpuTimeEnabled(true);
+            } catch (SecurityException e) {
+                statusBar.setMessage("Monitored VM does not have permission for enabling thread cpu time measurement");
+            }
         }
     }
 
diff --git a/jdk/src/share/javavm/export/jvm.h b/jdk/src/share/javavm/export/jvm.h
index 48181c06..caec0b9 100644
--- a/jdk/src/share/javavm/export/jvm.h
+++ b/jdk/src/share/javavm/export/jvm.h
@@ -472,6 +472,11 @@
 JNIEXPORT jbyteArray JNICALL
 JVM_GetClassTypeAnnotations(JNIEnv *env, jclass cls);
 
+JNIEXPORT jbyteArray JNICALL
+JVM_GetFieldTypeAnnotations(JNIEnv *env, jobject field);
+
+JNIEXPORT jbyteArray JNICALL
+JVM_GetMethodTypeAnnotations(JNIEnv *env, jobject method);
 
 /*
  * New (JDK 1.4) reflection implementation
diff --git a/jdk/src/share/lib/security/java.security-windows b/jdk/src/share/lib/security/java.security-windows
index cca53ae..1c371f0 100644
--- a/jdk/src/share/lib/security/java.security-windows
+++ b/jdk/src/share/lib/security/java.security-windows
@@ -127,7 +127,7 @@
 # This is a comma-separated list of algorithm and/or algorithm:provider
 # entries.
 #
-securerandom.strongAlgorithms=Windows-PRNG:SunMSCAPI
+securerandom.strongAlgorithms=Windows-PRNG:SunMSCAPI,SHA1PRNG:SUN
 
 #
 # Class to instantiate as the javax.security.auth.login.Configuration
diff --git a/jdk/src/share/native/java/lang/reflect/Executable.c b/jdk/src/share/native/java/lang/reflect/Executable.c
index f6133e8..1e32d5e 100644
--- a/jdk/src/share/native/java/lang/reflect/Executable.c
+++ b/jdk/src/share/native/java/lang/reflect/Executable.c
@@ -23,11 +23,7 @@
  * questions.
  */
 
-#include <string.h>
-#include <stdlib.h>
-
 #include "jni.h"
-#include "jni_util.h"
 #include "jvm.h"
 #include "java_lang_reflect_Executable.h"
 
@@ -36,3 +32,9 @@
                                                  jobject method) {
   return JVM_GetMethodParameters(env, method);
 }
+
+JNIEXPORT jbyteArray JNICALL
+Java_java_lang_reflect_Executable_getTypeAnnotationBytes0(JNIEnv *env,
+                                                          jobject method) {
+  return JVM_GetMethodTypeAnnotations(env, method);
+}
diff --git a/jdk/src/share/native/java/lang/reflect/Field.c b/jdk/src/share/native/java/lang/reflect/Field.c
new file mode 100644
index 0000000..7800abf
--- /dev/null
+++ b/jdk/src/share/native/java/lang/reflect/Field.c
@@ -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.  Oracle designates this
+ * particular file as subject to the "Classpath" exception as provided
+ * by Oracle in the LICENSE file that accompanied this code.
+ *
+ * This code is distributed in the hope that it will be useful, but WITHOUT
+ * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
+ * version 2 for more details (a copy is included in the LICENSE file that
+ * accompanied this code).
+ *
+ * You should have received a copy of the GNU General Public License version
+ * 2 along with this work; if not, write to the Free Software Foundation,
+ * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
+ *
+ * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
+ * or visit www.oracle.com if you need additional information or have any
+ * questions.
+ */
+
+#include "jni.h"
+#include "jvm.h"
+#include "java_lang_reflect_Field.h"
+
+JNIEXPORT jbyteArray JNICALL
+Java_java_lang_reflect_Field_getTypeAnnotationBytes0(JNIEnv *env,
+                                                     jobject field) {
+    return JVM_GetFieldTypeAnnotations(env, field);
+}
diff --git a/jdk/src/share/native/sun/font/freetypeScaler.c b/jdk/src/share/native/sun/font/freetypeScaler.c
index e84e77c..c562f54 100644
--- a/jdk/src/share/native/sun/font/freetypeScaler.c
+++ b/jdk/src/share/native/sun/font/freetypeScaler.c
@@ -252,7 +252,6 @@
         JNIEnv *env, jobject scaler, jobject font2D, jint type,
         jint indexInCollection, jboolean supportsCJK, jint filesize) {
     FTScalerInfo* scalerInfo = NULL;
-    FT_Stream ftstream;
     FT_Open_Args ft_open_args;
     int error;
     jobject bBuffer;
@@ -309,34 +308,36 @@
         }
     } else { /* Truetype */
         scalerInfo->fontData = (unsigned char*) malloc(FILEDATACACHESIZE);
-        ftstream = (FT_Stream) calloc(1, sizeof(FT_StreamRec));
 
-        if (ftstream != NULL && scalerInfo->fontData != NULL) {
-            scalerInfo->directBuffer = (*env)->NewDirectByteBuffer(env,
-                                        scalerInfo->fontData,
-                                        FILEDATACACHESIZE);
-            if (scalerInfo->directBuffer != NULL) {
-                scalerInfo->directBuffer = (*env)->NewGlobalRef(env,
-                                            scalerInfo->directBuffer);
-                ftstream->base = NULL;
-                ftstream->size = filesize;
-                ftstream->pos = 0;
-                ftstream->read = (FT_Stream_IoFunc) ReadTTFontFileFunc;
-                ftstream->close = (FT_Stream_CloseFunc) CloseTTFontFileFunc;
-                ftstream->pathname.pointer = (void *) scalerInfo;
+        if (scalerInfo->fontData != NULL) {
+            FT_Stream ftstream = (FT_Stream) calloc(1, sizeof(FT_StreamRec));
+            if (ftstream != NULL) {
+                scalerInfo->directBuffer = (*env)->NewDirectByteBuffer(env,
+                                           scalerInfo->fontData,
+                                           FILEDATACACHESIZE);
+                if (scalerInfo->directBuffer != NULL) {
+                    scalerInfo->directBuffer = (*env)->NewGlobalRef(env,
+                                               scalerInfo->directBuffer);
+                    ftstream->base = NULL;
+                    ftstream->size = filesize;
+                    ftstream->pos = 0;
+                    ftstream->read = (FT_Stream_IoFunc) ReadTTFontFileFunc;
+                    ftstream->close = (FT_Stream_CloseFunc) CloseTTFontFileFunc;
+                    ftstream->pathname.pointer = (void *) scalerInfo;
 
-                memset(&ft_open_args, 0, sizeof(FT_Open_Args));
-                ft_open_args.flags = FT_OPEN_STREAM;
-                ft_open_args.stream = ftstream;
+                    memset(&ft_open_args, 0, sizeof(FT_Open_Args));
+                    ft_open_args.flags = FT_OPEN_STREAM;
+                    ft_open_args.stream = ftstream;
 
-                error = FT_Open_Face(scalerInfo->library,
-                                     &ft_open_args,
-                                     indexInCollection,
-                                     &scalerInfo->face);
-           }
-           if (error || scalerInfo->directBuffer == NULL) {
-               free(ftstream);
-           }
+                    error = FT_Open_Face(scalerInfo->library,
+                                         &ft_open_args,
+                                         indexInCollection,
+                                         &scalerInfo->face);
+                }
+                if (error || scalerInfo->directBuffer == NULL) {
+                    free(ftstream);
+                }
+            }
         }
     }
 
@@ -902,13 +903,13 @@
  */
 JNIEXPORT void JNICALL
 Java_sun_font_FreetypeFontScaler_disposeNativeScaler(
-        JNIEnv *env, jobject scaler, jlong pScaler) {
+        JNIEnv *env, jobject scaler, jobject font2D, jlong pScaler) {
     FTScalerInfo* scalerInfo = (FTScalerInfo *) jlong_to_ptr(pScaler);
 
     /* Freetype functions *may* cause callback to java
        that can use cached values. Make sure our cache is up to date.
        NB: scaler context is not important at this point, can use NULL. */
-    int errCode = setupFTContext(env, scaler, scalerInfo, NULL);
+    int errCode = setupFTContext(env, font2D, scalerInfo, NULL);
     if (errCode) {
         return;
     }
@@ -957,7 +958,8 @@
  */
 JNIEXPORT jint JNICALL
 Java_sun_font_FreetypeFontScaler_getGlyphCodeNative(
-        JNIEnv *env, jobject scaler, jlong pScaler, jchar charCode) {
+        JNIEnv *env, jobject scaler,
+        jobject font2D, jlong pScaler, jchar charCode) {
 
     FTScalerInfo* scalerInfo = (FTScalerInfo *) jlong_to_ptr(pScaler);
     int errCode;
@@ -970,7 +972,7 @@
     /* Freetype functions *may* cause callback to java
        that can use cached values. Make sure our cache is up to date.
        Scaler context is not important here, can use NULL. */
-    errCode = setupFTContext(env, scaler, scalerInfo, NULL);
+    errCode = setupFTContext(env, font2D, scalerInfo, NULL);
     if (errCode) {
         return 0;
     }
diff --git a/jdk/src/share/native/sun/java2d/Disposer.c b/jdk/src/share/native/sun/java2d/Disposer.c
index 5379df6..6116317 100644
--- a/jdk/src/share/native/sun/java2d/Disposer.c
+++ b/jdk/src/share/native/sun/java2d/Disposer.c
@@ -38,10 +38,9 @@
 {
     addRecordMID = (*env)->GetStaticMethodID(env, disposerClass, "addRecord",
                                              "(Ljava/lang/Object;JJ)V");
-    if (addRecordMID == 0) {
-        JNU_ThrowNoSuchMethodError(env, "Disposer.addRecord");
+    if (addRecordMID != 0) {
+        dispClass = (*env)->NewGlobalRef(env, disposerClass);
     }
-    dispClass = (*env)->NewGlobalRef(env, disposerClass);
 }
 
 JNIEXPORT void JNICALL
@@ -50,6 +49,10 @@
     if (dispClass == NULL) {
         /* Needed to initialize the Disposer class as it may be not yet referenced */
         jclass clazz = (*env)->FindClass(env, "sun/java2d/Disposer");
+        if ((*env)->ExceptionCheck(env)) {
+            // If there's exception pending, we'll just return.
+            return;
+        }
     }
 
     (*env)->CallStaticVoidMethod(env, dispClass, addRecordMID,
diff --git a/jdk/src/share/native/sun/java2d/SurfaceData.c b/jdk/src/share/native/sun/java2d/SurfaceData.c
index 73d43ad..d72fa28 100644
--- a/jdk/src/share/native/sun/java2d/SurfaceData.c
+++ b/jdk/src/share/native/sun/java2d/SurfaceData.c
@@ -237,7 +237,9 @@
     SurfaceData_SetOps(env, sData, ops);
     if (ops != NULL) {
         memset(ops, 0, opsSize);
-        ops->sdObject = (*env)->NewWeakGlobalRef(env, sData);
+        if (!(*env)->ExceptionCheck(env)) {
+            ops->sdObject = (*env)->NewWeakGlobalRef(env, sData);
+        }
     }
     return ops;
 }
diff --git a/jdk/src/share/native/sun/java2d/loops/Blit.c b/jdk/src/share/native/sun/java2d/loops/Blit.c
index 58f2b94..d6302b3 100644
--- a/jdk/src/share/native/sun/java2d/loops/Blit.c
+++ b/jdk/src/share/native/sun/java2d/loops/Blit.c
@@ -60,8 +60,11 @@
     }
 
     srcOps = SurfaceData_GetOps(env, srcData);
+    if (srcOps == 0) {
+        return;
+    }
     dstOps = SurfaceData_GetOps(env, dstData);
-    if (srcOps == 0 || dstOps == 0) {
+    if (dstOps == 0) {
         return;
     }
 
diff --git a/jdk/src/share/native/sun/java2d/loops/BlitBg.c b/jdk/src/share/native/sun/java2d/loops/BlitBg.c
index 9738bec..fe3ba39 100644
--- a/jdk/src/share/native/sun/java2d/loops/BlitBg.c
+++ b/jdk/src/share/native/sun/java2d/loops/BlitBg.c
@@ -60,8 +60,11 @@
     }
 
     srcOps = SurfaceData_GetOps(env, srcData);
+    if (srcOps == 0) {
+        return;
+    }
     dstOps = SurfaceData_GetOps(env, dstData);
-    if (srcOps == 0 || dstOps == 0) {
+    if (dstOps == 0) {
         return;
     }
 
diff --git a/jdk/src/share/native/sun/java2d/loops/DrawPath.c b/jdk/src/share/native/sun/java2d/loops/DrawPath.c
index 6b51eee..d96c7f8 100644
--- a/jdk/src/share/native/sun/java2d/loops/DrawPath.c
+++ b/jdk/src/share/native/sun/java2d/loops/DrawPath.c
@@ -75,7 +75,8 @@
     CompositeInfo compInfo;
     jint ret;
     NativePrimitive *pPrim = GetNativePrim(env, self);
-    jint stroke = (*env)->GetIntField(env, sg2d, sg2dStrokeHintID);
+    jint stroke;
+    jboolean throwExc = JNI_FALSE;
 
     if (pPrim == NULL) {
         return;
@@ -84,6 +85,8 @@
         GrPrim_Sg2dGetCompInfo(env, sg2d, pPrim, &compInfo);
     }
 
+    stroke = (*env)->GetIntField(env, sg2d, sg2dStrokeHintID);
+
     sdOps = SurfaceData_GetOps(env, sData);
     if (sdOps == 0) {
         return;
@@ -112,6 +115,10 @@
     maxCoords = (*env)->GetArrayLength(env, coordsArray);
     coords = (jfloat*)(*env)->GetPrimitiveArrayCritical(
             env, coordsArray, NULL);
+    if (coords == NULL) {
+        SurfaceData_InvokeUnlock(env, sdOps, &rasInfo);
+        return;
+    }
 
     if (ret == SD_SLOWLOCK) {
         GrPrim_RefineBounds(&rasInfo.bounds, transX, transY,
@@ -157,22 +164,29 @@
                 drawHandler.yMax = rasInfo.bounds.y2;
                 drawHandler.pData = &dHData;
 
-                if (!doDrawPath(&drawHandler, NULL, transX, transY,
-                                coords, maxCoords, types, numTypes,
-                                (stroke == sunHints_INTVAL_STROKE_PURE)?
-                                    PH_STROKE_PURE : PH_STROKE_DEFAULT))
-                {
-                    JNU_ThrowArrayIndexOutOfBoundsException(env,
-                                                            "coords array");
-                }
+                if (types != NULL) {
+                    if (!doDrawPath(&drawHandler, NULL, transX, transY,
+                                    coords, maxCoords, types, numTypes,
+                                    (stroke == sunHints_INTVAL_STROKE_PURE)?
+                                            PH_STROKE_PURE : PH_STROKE_DEFAULT))
+                    {
+                        throwExc = JNI_TRUE;
+                    }
 
-                (*env)->ReleasePrimitiveArrayCritical(env, typesArray, types,
-                                                      JNI_ABORT);
+                    (*env)->ReleasePrimitiveArrayCritical(env, typesArray, types,
+                                                          JNI_ABORT);
+                }
             }
         }
         SurfaceData_InvokeRelease(env, sdOps, &rasInfo);
     }
     (*env)->ReleasePrimitiveArrayCritical(env, coordsArray, coords,
                                           JNI_ABORT);
+
+    if (throwExc) {
+        JNU_ThrowArrayIndexOutOfBoundsException(env,
+                                                "coords array");
+    }
+
     SurfaceData_InvokeUnlock(env, sdOps, &rasInfo);
 }
diff --git a/jdk/src/share/native/sun/java2d/loops/DrawPolygons.c b/jdk/src/share/native/sun/java2d/loops/DrawPolygons.c
index e7ab0a0..5cec234 100644
--- a/jdk/src/share/native/sun/java2d/loops/DrawPolygons.c
+++ b/jdk/src/share/native/sun/java2d/loops/DrawPolygons.c
@@ -186,10 +186,15 @@
         }
 
         xPointsPtr = (*env)->GetPrimitiveArrayCritical(env, xPointsArray, NULL);
-        yPointsPtr = (*env)->GetPrimitiveArrayCritical(env, yPointsArray, NULL);
-        if (!xPointsPtr || !yPointsPtr) {
+        if (!xPointsPtr) {
             ok = JNI_FALSE;
         }
+        if (ok) {
+            yPointsPtr = (*env)->GetPrimitiveArrayCritical(env, yPointsArray, NULL);
+            if (!yPointsPtr) {
+                ok = JNI_FALSE;
+            }
+        }
     }
 
     if (ok) {
diff --git a/jdk/src/share/native/sun/java2d/loops/FillPath.c b/jdk/src/share/native/sun/java2d/loops/FillPath.c
index 3411c57..a7b77c0 100644
--- a/jdk/src/share/native/sun/java2d/loops/FillPath.c
+++ b/jdk/src/share/native/sun/java2d/loops/FillPath.c
@@ -64,7 +64,8 @@
     CompositeInfo compInfo;
     jint ret;
     NativePrimitive *pPrim = GetNativePrim(env, self);
-    jint stroke = (*env)->GetIntField(env, sg2d, sg2dStrokeHintID);
+    jint stroke;
+    jboolean throwExc = JNI_FALSE;
 
     if (pPrim == NULL) {
         return;
@@ -73,6 +74,8 @@
         GrPrim_Sg2dGetCompInfo(env, sg2d, pPrim, &compInfo);
     }
 
+    stroke = (*env)->GetIntField(env, sg2d, sg2dStrokeHintID);
+
     sdOps = SurfaceData_GetOps(env, sData);
     if (sdOps == 0) {
         return;
@@ -102,6 +105,10 @@
     maxCoords = (*env)->GetArrayLength(env, coordsArray);
     coords = (jfloat*)(*env)->GetPrimitiveArrayCritical(
             env, coordsArray, NULL);
+    if (coords == NULL) {
+        SurfaceData_InvokeUnlock(env, sdOps, &rasInfo);
+        return;
+    }
 
     if (ret == SD_SLOWLOCK) {
         GrPrim_RefineBounds(&rasInfo.bounds, transX, transY,
@@ -146,24 +153,31 @@
                 drawHandler.yMax = rasInfo.bounds.y2;
                 drawHandler.pData = &dHData;
 
-                if (!doFillPath(&drawHandler,
-                                transX, transY, coords,
-                                maxCoords, types, numTypes,
-                                (stroke == sunHints_INTVAL_STROKE_PURE)?
-                                     PH_STROKE_PURE : PH_STROKE_DEFAULT,
-                                fillRule))
-                {
-                    JNU_ThrowArrayIndexOutOfBoundsException(env,
-                                                            "coords array");
-                }
+                if (types != NULL) {
+                    if (!doFillPath(&drawHandler,
+                                    transX, transY, coords,
+                                    maxCoords, types, numTypes,
+                                    (stroke == sunHints_INTVAL_STROKE_PURE)?
+                                            PH_STROKE_PURE : PH_STROKE_DEFAULT,
+                                    fillRule))
+                    {
+                        throwExc = JNI_TRUE;
+                    }
 
-                (*env)->ReleasePrimitiveArrayCritical(env, typesArray, types,
+                    (*env)->ReleasePrimitiveArrayCritical(env, typesArray, types,
                                                       JNI_ABORT);
+                }
             }
         }
         SurfaceData_InvokeRelease(env, sdOps, &rasInfo);
     }
     (*env)->ReleasePrimitiveArrayCritical(env, coordsArray, coords,
                                           JNI_ABORT);
+
+    if (throwExc) {
+        JNU_ThrowArrayIndexOutOfBoundsException(env,
+                                                "coords array");
+    }
+
     SurfaceData_InvokeUnlock(env, sdOps, &rasInfo);
 }
diff --git a/jdk/src/share/native/sun/java2d/loops/GraphicsPrimitiveMgr.c b/jdk/src/share/native/sun/java2d/loops/GraphicsPrimitiveMgr.c
index 7e32308..352a5eb 100644
--- a/jdk/src/share/native/sun/java2d/loops/GraphicsPrimitiveMgr.c
+++ b/jdk/src/share/native/sun/java2d/loops/GraphicsPrimitiveMgr.c
@@ -205,33 +205,36 @@
     RegisterFunc RegisterFourByteAbgr;
     RegisterFunc RegisterFourByteAbgrPre;
 
-    RegisterAnyByte(env);
-    RegisterByteBinary1Bit(env);
-    RegisterByteBinary2Bit(env);
-    RegisterByteBinary4Bit(env);
-    RegisterByteIndexed(env);
-    RegisterByteGray(env);
-    RegisterIndex8Gray(env);
-    RegisterIndex12Gray(env);
-    RegisterAnyShort(env);
-    RegisterUshort555Rgb(env);
-    RegisterUshort565Rgb(env);
-    RegisterUshort4444Argb(env);
-    RegisterUshort555Rgbx(env);
-    RegisterUshortGray(env);
-    RegisterUshortIndexed(env);
-    RegisterAny3Byte(env);
-    RegisterThreeByteBgr(env);
-    RegisterAnyInt(env);
-    RegisterIntArgb(env);
-    RegisterIntArgbPre(env);
-    RegisterIntArgbBm(env);
-    RegisterIntRgb(env);
-    RegisterIntBgr(env);
-    RegisterIntRgbx(env);
-    RegisterAny4Byte(env);
-    RegisterFourByteAbgr(env);
-    RegisterFourByteAbgrPre(env);
+    if (!RegisterAnyByte(env) ||
+        !RegisterByteBinary1Bit(env) ||
+        !RegisterByteBinary2Bit(env) ||
+        !RegisterByteBinary4Bit(env) ||
+        !RegisterByteIndexed(env) ||
+        !RegisterByteGray(env) ||
+        !RegisterIndex8Gray(env) ||
+        !RegisterIndex12Gray(env) ||
+        !RegisterAnyShort(env) ||
+        !RegisterUshort555Rgb(env) ||
+        !RegisterUshort565Rgb(env) ||
+        !RegisterUshort4444Argb(env) ||
+        !RegisterUshort555Rgbx(env) ||
+        !RegisterUshortGray(env) ||
+        !RegisterUshortIndexed(env) ||
+        !RegisterAny3Byte(env) ||
+        !RegisterThreeByteBgr(env) ||
+        !RegisterAnyInt(env) ||
+        !RegisterIntArgb(env) ||
+        !RegisterIntArgbPre(env) ||
+        !RegisterIntArgbBm(env) ||
+        !RegisterIntRgb(env) ||
+        !RegisterIntBgr(env) ||
+        !RegisterIntRgbx(env) ||
+        !RegisterAny4Byte(env) ||
+        !RegisterFourByteAbgr(env) ||
+        !RegisterFourByteAbgrPre(env))
+    {
+        return;
+    }
 }
 
 #define _StartOf(T)     ((T *) (&T##s))
diff --git a/jdk/src/share/native/sun/java2d/loops/MaskBlit.c b/jdk/src/share/native/sun/java2d/loops/MaskBlit.c
index 2c02341..83f9493 100644
--- a/jdk/src/share/native/sun/java2d/loops/MaskBlit.c
+++ b/jdk/src/share/native/sun/java2d/loops/MaskBlit.c
@@ -60,8 +60,11 @@
     }
 
     srcOps = SurfaceData_GetOps(env, srcData);
+    if (srcOps == 0) {
+        return;
+    }
     dstOps = SurfaceData_GetOps(env, dstData);
-    if (srcOps == 0 || dstOps == 0) {
+    if (dstOps == 0) {
         return;
     }
 
@@ -98,6 +101,13 @@
                  : 0);
             jint savesx = srcInfo.bounds.x1;
             jint savedx = dstInfo.bounds.x1;
+            if (maskArray != NULL && pMask == NULL) {
+                SurfaceData_InvokeRelease(env, dstOps, &dstInfo);
+                SurfaceData_InvokeRelease(env, srcOps, &srcInfo);
+                SurfaceData_InvokeUnlock(env, dstOps, &dstInfo);
+                SurfaceData_InvokeUnlock(env, srcOps, &srcInfo);
+                return;
+            }
             Region_StartIteration(env, &clipInfo);
             while (Region_NextIteration(&clipInfo, &span)) {
                 void *pSrc = PtrCoord(srcInfo.rasBase,
diff --git a/jdk/src/share/native/sun/java2d/loops/MaskFill.c b/jdk/src/share/native/sun/java2d/loops/MaskFill.c
index 0003675..2e5d3ed 100644
--- a/jdk/src/share/native/sun/java2d/loops/MaskFill.c
+++ b/jdk/src/share/native/sun/java2d/loops/MaskFill.c
@@ -84,6 +84,11 @@
                 (maskArray
                  ? (*env)->GetPrimitiveArrayCritical(env, maskArray, 0)
                  : 0);
+            if (maskArray != NULL && pMask == NULL) {
+                SurfaceData_InvokeRelease(env, sdOps, &rasInfo);
+                SurfaceData_InvokeUnlock(env, sdOps, &rasInfo);
+                return;
+            }
             maskoff += ((rasInfo.bounds.y1 - y) * maskscan +
                         (rasInfo.bounds.x1 - x));
             (*pPrim->funcs.maskfill)(pDst,
diff --git a/jdk/src/share/native/sun/java2d/loops/ScaledBlit.c b/jdk/src/share/native/sun/java2d/loops/ScaledBlit.c
index 625c366..486a984 100644
--- a/jdk/src/share/native/sun/java2d/loops/ScaledBlit.c
+++ b/jdk/src/share/native/sun/java2d/loops/ScaledBlit.c
@@ -296,8 +296,11 @@
     }
 
     srcOps = SurfaceData_GetOps(env, srcData);
+    if (srcOps == 0) {
+        return;
+    }
     dstOps = SurfaceData_GetOps(env, dstData);
-    if (srcOps == 0 || dstOps == 0) {
+    if (dstOps == 0) {
         return;
     }
 
diff --git a/jdk/src/share/native/sun/java2d/loops/TransformHelper.c b/jdk/src/share/native/sun/java2d/loops/TransformHelper.c
index 7233455..6d53054 100644
--- a/jdk/src/share/native/sun/java2d/loops/TransformHelper.c
+++ b/jdk/src/share/native/sun/java2d/loops/TransformHelper.c
@@ -326,8 +326,11 @@
     }
 
     srcOps = SurfaceData_GetOps(env, srcData);
+    if (srcOps == 0) {
+        return;
+    }
     dstOps = SurfaceData_GetOps(env, dstData);
-    if (srcOps == 0 || dstOps == 0) {
+    if (dstOps == 0) {
         return;
     }
 
@@ -411,7 +414,7 @@
     }
 
     if (pEdges == NULL) {
-        if (numedges > 0) {
+        if (!(*env)->ExceptionCheck(env) && numedges > 0) {
             JNU_ThrowInternalError(env, "Unable to allocate edge list");
         }
         SurfaceData_InvokeUnlock(env, dstOps, &dstInfo);
diff --git a/jdk/src/share/native/sun/java2d/pipe/BufferedRenderPipe.c b/jdk/src/share/native/sun/java2d/pipe/BufferedRenderPipe.c
index 62cc5ef..849fd2a 100644
--- a/jdk/src/share/native/sun/java2d/pipe/BufferedRenderPipe.c
+++ b/jdk/src/share/native/sun/java2d/pipe/BufferedRenderPipe.c
@@ -53,6 +53,7 @@
     unsigned char *bbuf;
     jint *ibuf;
     jint ipos;
+    jboolean hasException;
 
     J2dTraceLn2(J2D_TRACE_INFO,
                 "BufferedRenderPipe_fillSpans: bpos=%d limit=%d",
@@ -104,7 +105,10 @@
             ibuf[1] = spanCount;
 
             // flush the queue
-            JNU_CallMethodByName(env, NULL, rq, "flushNow", "(I)V", bpos);
+            JNU_CallMethodByName(env, &hasException, rq, "flushNow", "(I)V", bpos);
+            if (hasException) {
+                break;
+            }
 
             // now start a new operation
             ibuf = (jint *)bbuf;
diff --git a/jdk/src/share/native/sun/java2d/pipe/Region.c b/jdk/src/share/native/sun/java2d/pipe/Region.c
index 97c682c..4bafa10 100644
--- a/jdk/src/share/native/sun/java2d/pipe/Region.c
+++ b/jdk/src/share/native/sun/java2d/pipe/Region.c
@@ -260,6 +260,10 @@
             /* return; REMIND: What to do here? */
         }
         Region_StartIteration(env, &clipInfo);
+        if ((*env)->ExceptionCheck(env)) {
+            return 0;
+        }
+
         numrects = Region_CountIterationRects(&clipInfo);
         if ((unsigned long)numrects > initialBufferSize) {
             *pRect = (RECT_T *) SAFE_SIZE_ARRAY_ALLOC(malloc, numrects, sizeof(RECT_T));
diff --git a/jdk/src/share/native/sun/java2d/pipe/ShapeSpanIterator.c b/jdk/src/share/native/sun/java2d/pipe/ShapeSpanIterator.c
index e858027..2462307 100644
--- a/jdk/src/share/native/sun/java2d/pipe/ShapeSpanIterator.c
+++ b/jdk/src/share/native/sun/java2d/pipe/ShapeSpanIterator.c
@@ -653,12 +653,15 @@
                     pd->curx = x;
                     pd->cury = y;
                 }
+                (*env)->ReleasePrimitiveArrayCritical(env, yArray,
+                                                      yPoints, JNI_ABORT);
             }
-            (*env)->ReleasePrimitiveArrayCritical(env, yArray,
-                                                  yPoints, JNI_ABORT);
+            (*env)->ReleasePrimitiveArrayCritical(env, xArray,
+                                                  xPoints, JNI_ABORT);
         }
-        (*env)->ReleasePrimitiveArrayCritical(env, xArray,
-                                              xPoints, JNI_ABORT);
+        if (xPoints == NULL || yPoints == NULL) {
+            return;
+        }
     }
     if (!oom) {
         HANDLEENDPATH(pd, {oom = JNI_TRUE;});
diff --git a/jdk/src/share/native/sun/java2d/pipe/SpanClipRenderer.c b/jdk/src/share/native/sun/java2d/pipe/SpanClipRenderer.c
index ad53574..2b5190f 100644
--- a/jdk/src/share/native/sun/java2d/pipe/SpanClipRenderer.c
+++ b/jdk/src/share/native/sun/java2d/pipe/SpanClipRenderer.c
@@ -44,21 +44,27 @@
 {
     /* Region fields */
     pBandsArrayID = (*env)->GetFieldID(env, rc, "bands", "[I");
+    if (pBandsArrayID == NULL) {
+        return;
+    }
     pEndIndexID = (*env)->GetFieldID(env, rc, "endIndex", "I");
+    if (pEndIndexID == NULL) {
+        return;
+    }
 
     /* RegionIterator fields */
     pRegionID = (*env)->GetFieldID(env, ric, "region",
                                    "Lsun/java2d/pipe/Region;");
+    if (pRegionID == NULL) {
+        return;
+    }
     pCurIndexID = (*env)->GetFieldID(env, ric, "curIndex", "I");
+    if (pCurIndexID == NULL) {
+        return;
+    }
     pNumXbandsID = (*env)->GetFieldID(env, ric, "numXbands", "I");
-
-    if((pBandsArrayID == NULL)
-       || (pEndIndexID == NULL)
-       || (pRegionID == NULL)
-       || (pCurIndexID == NULL)
-       || (pNumXbandsID == NULL))
-    {
-        JNU_ThrowInternalError(env, "NULL field ID");
+    if (pNumXbandsID == NULL) {
+        return;
     }
 }
 
@@ -129,10 +135,14 @@
 
     if ((*env)->GetArrayLength(env, boxArray) < 4) {
         JNU_ThrowArrayIndexOutOfBoundsException(env, "band array");
+        return;
     }
     alphalen = (*env)->GetArrayLength(env, alphaTile);
 
     box = (*env)->GetPrimitiveArrayCritical(env, boxArray, 0);
+    if (box == NULL) {
+        return;
+    }
 
     w = box[2] - box[0];
     h = box[3] - box[1];
@@ -140,9 +150,14 @@
     if (alphalen < offset || (alphalen - offset) / tsize < h) {
         (*env)->ReleasePrimitiveArrayCritical(env, boxArray, box, 0);
         JNU_ThrowArrayIndexOutOfBoundsException(env, "alpha tile array");
+        return;
     }
 
     alpha = (*env)->GetPrimitiveArrayCritical(env, alphaTile, 0);
+    if (alpha == NULL) {
+        (*env)->ReleasePrimitiveArrayCritical(env, boxArray, box, 0);
+        return;
+    }
 
     fill(alpha, offset, tsize, 0, 0, w, h, (jbyte) 0xff);
 
@@ -182,6 +197,7 @@
 
     if ((*env)->GetArrayLength(env, boxArray) < 4) {
         JNU_ThrowArrayIndexOutOfBoundsException(env, "band array");
+        return;
     }
     alphalen = (*env)->GetArrayLength(env, alphaTile);
 
@@ -196,6 +212,9 @@
     }
 
     box = (*env)->GetPrimitiveArrayCritical(env, boxArray, 0);
+    if (box == NULL) {
+        return;
+    }
 
     lox = box[0];
     loy = box[1];
@@ -207,10 +226,20 @@
         (alphalen - offset - (hix-lox)) / tsize < (hiy - loy - 1)) {
         (*env)->ReleasePrimitiveArrayCritical(env, boxArray, box, 0);
         JNU_ThrowArrayIndexOutOfBoundsException(env, "alpha tile array");
+        return;
     }
 
     bands = (*env)->GetPrimitiveArrayCritical(env, bandsArray, 0);
+    if (bands == NULL) {
+        (*env)->ReleasePrimitiveArrayCritical(env, boxArray, box, 0);
+        return;
+    }
     alpha = (*env)->GetPrimitiveArrayCritical(env, alphaTile, 0);
+    if (alpha == NULL) {
+        (*env)->ReleasePrimitiveArrayCritical(env, bandsArray, bands, 0);
+        (*env)->ReleasePrimitiveArrayCritical(env, boxArray, box, 0);
+        return;
+    }
 
     curIndex = saveCurIndex;
     numXbands = saveNumXbands;
diff --git a/jdk/src/solaris/classes/sun/awt/X11/XBaseMenuWindow.java b/jdk/src/solaris/classes/sun/awt/X11/XBaseMenuWindow.java
index 783f4ac..2d611b7 100644
--- a/jdk/src/solaris/classes/sun/awt/X11/XBaseMenuWindow.java
+++ b/jdk/src/solaris/classes/sun/awt/X11/XBaseMenuWindow.java
@@ -116,6 +116,8 @@
     protected Point grabInputPoint = null;
     protected boolean hasPointerMoved = false;
 
+    private AppContext disposeAppContext;
+
     /************************************************
      *
      * Mapping data
@@ -174,6 +176,8 @@
     XBaseMenuWindow() {
         super(new XCreateWindowParams(new Object[] {
             DELAYED, Boolean.TRUE}));
+
+        disposeAppContext = AppContext.getAppContext();
     }
 
     /************************************************
@@ -904,12 +908,12 @@
      */
     public void dispose() {
         setDisposed(true);
-        InvocationEvent ev = new InvocationEvent(target, new Runnable() {
+
+        SunToolkit.invokeLaterOnAppContext(disposeAppContext, new Runnable()  {
             public void run() {
                 doDispose();
             }
         });
-        super.postEvent(ev);
     }
 
     /**
@@ -923,7 +927,6 @@
         if (oldData != null) {
             oldData.invalidate();
         }
-        XToolkit.targetDisposedPeer(target, this);
         destroy();
     }
 
diff --git a/jdk/src/solaris/classes/sun/awt/X11/XComponentPeer.java b/jdk/src/solaris/classes/sun/awt/X11/XComponentPeer.java
index aa74d92..d50351a 100644
--- a/jdk/src/solaris/classes/sun/awt/X11/XComponentPeer.java
+++ b/jdk/src/solaris/classes/sun/awt/X11/XComponentPeer.java
@@ -607,10 +607,6 @@
 
     public void layout() {}
 
-    public java.awt.Toolkit getToolkit() {
-        return Toolkit.getDefaultToolkit();
-    }
-
     void updateMotifColors(Color bg) {
         int red = bg.getRed();
         int green = bg.getGreen();
@@ -745,11 +741,11 @@
     }
 
     public boolean prepareImage(Image img, int w, int h, ImageObserver o) {
-        return getToolkit().prepareImage(img, w, h, o);
+        return Toolkit.getDefaultToolkit().prepareImage(img, w, h, o);
     }
 
     public int checkImage(Image img, int w, int h, ImageObserver o) {
-        return getToolkit().checkImage(img, w, h, o);
+        return Toolkit.getDefaultToolkit().checkImage(img, w, h, o);
     }
 
     public Dimension preferredSize() {
diff --git a/jdk/src/solaris/classes/sun/awt/X11/XSelection.java b/jdk/src/solaris/classes/sun/awt/X11/XSelection.java
index f19ad2f..36ebc8e 100644
--- a/jdk/src/solaris/classes/sun/awt/X11/XSelection.java
+++ b/jdk/src/solaris/classes/sun/awt/X11/XSelection.java
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2003, 2011, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2003, 2013, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -375,7 +375,7 @@
                                 XToolkit.awtUnlock();
                             }
 
-                            validateDataGetter(dataGetter);
+                            validateDataGetter(incrDataGetter);
 
                             if (incrDataGetter.getActualFormat() != 8) {
                                 throw new IOException("Unsupported data format: " +
diff --git a/jdk/src/solaris/classes/sun/awt/X11/XTextAreaPeer.java b/jdk/src/solaris/classes/sun/awt/X11/XTextAreaPeer.java
index 27465df..7c7b2d1 100644
--- a/jdk/src/solaris/classes/sun/awt/X11/XTextAreaPeer.java
+++ b/jdk/src/solaris/classes/sun/awt/X11/XTextAreaPeer.java
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2003, 2011, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2003, 2013, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -64,41 +64,20 @@
 import sun.awt.SunToolkit;
 
 
-class XTextAreaPeer extends XComponentPeer implements TextAreaPeer {
-    boolean editable;
+final class XTextAreaPeer extends XComponentPeer implements TextAreaPeer {
 
-    AWTTextPane textPane;
-    AWTTextArea jtext;
+    private final AWTTextPane textPane;
+    private final AWTTextArea jtext;
+    private final boolean firstChangeSkipped;
 
-    boolean firstChangeSkipped;
-
-    private final JavaMouseEventHandler javaMouseEventHandler
-        = new JavaMouseEventHandler( this );
-
-    /* FIXME  */
-
-    public long filterEvents(long mask) {
-        Thread.dumpStack();
-        return 0;
-    }
-
-    /* FIXME   */
-    public Rectangle getCharacterBounds(int i) {
-        Thread.dumpStack();
-        return null;
-    }
-
-    public int getIndexAtPoint(int x, int y) {
-        Thread.dumpStack();
-        return 0;
-    }
-
+    private final JavaMouseEventHandler javaMouseEventHandler =
+            new JavaMouseEventHandler(this);
 
     /**
      * Create a Text area.
      */
     XTextAreaPeer(TextArea target) {
-        super( target  );
+        super(target);
 
         // some initializations require that target be set even
         // though init(target) has not been called
@@ -106,8 +85,7 @@
 
         //ComponentAccessor.enableEvents(target,AWTEvent.MOUSE_WHEEL_EVENT_MASK);
 
-        firstChangeSkipped = false;
-        String text = ((TextArea)target).getText();
+        String text = target.getText();
         jtext = new AWTTextArea(text, this);
         jtext.setWrapStyleWord(true);
         jtext.getDocument().addDocumentListener(jtext);
@@ -143,29 +121,27 @@
 
         setFont(font);
 
+        // set the text of this object to the text of its target
+        setTextImpl(target.getText());  //?? should this be setText
+
         int start = target.getSelectionStart();
         int end = target.getSelectionEnd();
-
-        if (end > start) {
-            select(start, end);
-        }
         // Fix for 5100200
         // Restoring Motif behaviour
         // Since the end position of the selected text can be greater then the length of the text,
         // so we should set caret to max position of the text
-        int caretPosition = Math.min(end, text.length());
-        setCaretPosition(caretPosition);
-
+        setCaretPosition(Math.min(end, text.length()));
+        if (end > start) {
+            // Should be called after setText() and setCaretPosition()
+            select(start, end);
+        }
         setEditable(target.isEditable());
-
         setScrollBarVisibility();
-        // set the text of this object to the text of its target
-        setTextImpl(target.getText());  //?? should this be setText
-
         // After this line we should not change the component's text
         firstChangeSkipped = true;
     }
 
+    @Override
     public void dispose() {
         XToolkit.specialPeerMap.remove(jtext);
         // visible caret has a timer thread which must be stopped
@@ -175,7 +151,6 @@
         super.dispose();
     }
 
-
     /*
      * The method overrides one from XComponentPeer
      * If ignoreSubComponents=={@code true} it calls super.
@@ -201,7 +176,7 @@
         javaMouseEventHandler.setCursor();
     }
 
-    void setScrollBarVisibility() {
+    private void setScrollBarVisibility() {
         int visibility = ((TextArea)target).getScrollbarVisibility();
         jtext.setLineWrap(false);
 
@@ -229,10 +204,12 @@
     /**
      * Compute minimum size.
      */
+    @Override
     public Dimension getMinimumSize() {
         return getMinimumSize(10, 60);
     }
 
+    @Override
     public Dimension getPreferredSize(int rows, int cols) {
         return getMinimumSize(rows, cols);
     }
@@ -240,7 +217,7 @@
     /**
      * @see java.awt.peer.TextAreaPeer
      */
-
+    @Override
     public Dimension getMinimumSize(int rows, int cols) {
         /*    Dimension d = null;
               if (jtext != null) {
@@ -269,10 +246,12 @@
                              fm.getHeight() * rows + /*2*YMARGIN +*/ hsbheight);
     }
 
+    @Override
     public boolean isFocusable() {
         return true;
     }
 
+    @Override
     public void setVisible(boolean b) {
         super.setVisible(b);
         if (textPane != null)
@@ -283,27 +262,30 @@
         jtext.repaintNow();
     }
 
+    @Override
     public void focusGained(FocusEvent e) {
         super.focusGained(e);
         jtext.forwardFocusGained(e);
     }
 
+    @Override
     public void focusLost(FocusEvent e) {
         super.focusLost(e);
         jtext.forwardFocusLost(e);
     }
 
-
     /**
      * Paint the component
      * this method is called when the repaint instruction has been used
      */
+    @Override
     public void repaint() {
         if (textPane  != null)  {
             //textPane.validate();
             textPane.repaint();
         }
     }
+
     @Override
     void paintPeer(final Graphics g) {
         if (textPane  != null)  {
@@ -311,6 +293,7 @@
         }
     }
 
+    @Override
     public void setBounds(int x, int y, int width, int height, int op) {
         super.setBounds(x, y, width, height, op);
         if (textPane != null) {
@@ -337,21 +320,26 @@
         }
     }
 
+    @Override
     void handleJavaKeyEvent(KeyEvent e) {
         AWTAccessor.getComponentAccessor().processEvent(jtext,e);
     }
 
+    @Override
     public boolean handlesWheelScrolling() { return true; }
 
+    @Override
     void handleJavaMouseWheelEvent(MouseWheelEvent e) {
-        AWTAccessor.getComponentAccessor().processEvent(textPane,e);
+        AWTAccessor.getComponentAccessor().processEvent(textPane, e);
     }
 
+    @Override
     public void handleJavaMouseEvent( MouseEvent e ) {
         super.handleJavaMouseEvent( e );
         javaMouseEventHandler.handle( e );
     }
 
+    @Override
     void handleJavaInputMethodEvent(InputMethodEvent e) {
         if (jtext != null)
             jtext.processInputMethodEventPublic((InputMethodEvent)e);
@@ -360,13 +348,15 @@
     /**
      * @see java.awt.peer.TextComponentPeer
      */
+    @Override
     public void select(int s, int e) {
-        jtext.select(s,e);
+        jtext.select(s, e);
         // Fixed 5100806
         // We must take care that Swing components repainted correctly
         jtext.repaint();
     }
 
+    @Override
     public void setBackground(Color c) {
         super.setBackground(c);
 //          synchronized (getStateLock()) {
@@ -379,6 +369,7 @@
 //          repaintText();
     }
 
+    @Override
     public void setForeground(Color c) {
         super.setForeground(c);
 //          synchronized (getStateLock()) {
@@ -392,6 +383,7 @@
 //          repaintText();
     }
 
+    @Override
     public void setFont(Font f) {
         super.setFont(f);
 //          synchronized (getStateLock()) {
@@ -403,12 +395,11 @@
         textPane.validate();
     }
 
-
     /**
      * @see java.awt.peer.TextComponentPeer
      */
+    @Override
     public void setEditable(boolean editable) {
-        this.editable = editable;
         if (jtext != null) jtext.setEditable(editable);
         repaintText();
     }
@@ -416,6 +407,7 @@
     /**
      * @see java.awt.peer.ComponentPeer
      */
+    @Override
     public void setEnabled(boolean enabled) {
         super.setEnabled(enabled);
         if (jtext != null) {
@@ -427,6 +419,7 @@
     /**
      * @see java.awt.peer.TextComponentPeer
      */
+    @Override
     public InputMethodRequests getInputMethodRequests() {
         if (jtext != null) return jtext.getInputMethodRequests();
         else  return null;
@@ -435,6 +428,7 @@
     /**
      * @see java.awt.peer.TextComponentPeer
      */
+    @Override
     public int getSelectionStart() {
         return jtext.getSelectionStart();
     }
@@ -442,6 +436,7 @@
     /**
      * @see java.awt.peer.TextComponentPeer
      */
+    @Override
     public int getSelectionEnd() {
         return jtext.getSelectionEnd();
     }
@@ -449,6 +444,7 @@
     /**
      * @see java.awt.peer.TextComponentPeer
      */
+    @Override
     public String getText() {
         return jtext.getText();
     }
@@ -456,12 +452,13 @@
     /**
      * @see java.awt.peer.TextComponentPeer
      */
-    public void setText(String txt) {
-        setTextImpl(txt);
+    @Override
+    public void setText(String text) {
+        setTextImpl(text);
         repaintText();
     }
 
-    protected boolean setTextImpl(String txt) {
+    private void setTextImpl(String txt) {
         if (jtext != null) {
             // JTextArea.setText() posts two different events (remove & insert).
             // Since we make no differences between text events,
@@ -474,13 +471,13 @@
             }
             jtext.getDocument().addDocumentListener(jtext);
         }
-        return true;
     }
 
     /**
      * insert the text "txt on position "pos" in the array lines
      * @see java.awt.peer.TextAreaPeer
      */
+    @Override
     public void insert(String txt, int p) {
         if (jtext != null) {
             boolean doScroll = (p >= jtext.getDocument().getLength() && jtext.getDocument().getLength() != 0);
@@ -499,6 +496,7 @@
      * replace the text between the position "s" and "e" with "txt"
      * @see java.awt.peer.TextAreaPeer
      */
+    @Override
     public void replaceRange(String txt, int s, int e) {
         if (jtext != null) {
             // JTextArea.replaceRange() posts two different events.
@@ -516,6 +514,7 @@
      * to be implemented.
      * @see java.awt.peer.TextComponentPeer
      */
+    @Override
     public void setCaretPosition(int position) {
         jtext.setCaretPosition(position);
     }
@@ -524,54 +523,19 @@
      * to be implemented.
      * @see java.awt.peer.TextComponentPeer
      */
+    @Override
     public int getCaretPosition() {
         return jtext.getCaretPosition();
     }
 
-    /**
-     * DEPRECATED
-     * @see java.awt.peer.TextAreaPeer
-     */
-    public void insertText(String txt, int pos) {
-        insert(txt, pos);
-    }
+    final class AWTTextAreaUI extends MotifTextAreaUI {
 
-    /**
-     * DEPRECATED
-     * @see java.awt.peer.TextAreaPeer
-     */
-    public void replaceText(String txt, int start, int end) {
-        replaceRange(txt, start, end);
-    }
+        private JTextArea jta;
 
-    /**
-     * DEPRECATED
-     * @see java.awt.peer.TextAreaPeer
-     */
-    public Dimension minimumSize(int rows, int cols) {
-        return getMinimumSize(rows, cols);
-    }
-
-    /**
-     * DEPRECATED
-     * @see java.awt.peer.TextAreaPeer
-     */
-    public Dimension preferredSize(int rows, int cols) {
-        return getPreferredSize(rows, cols);
-    }
-
-
-    class  AWTTextAreaUI extends MotifTextAreaUI {
-        /**
-         * Creates a UI for a JTextArea.
-         *
-         * @param c the text field
-         * @return the UI
-         */
-        JTextArea jta;
-
+        @Override
         protected String getPropertyPrefix() { return "TextArea"; }
 
+        @Override
         public void installUI(JComponent c) {
             super.installUI(c);
 
@@ -627,6 +591,7 @@
             }
         }
 
+        @Override
         protected void installKeyboardActions() {
             super.installKeyboardActions();
 
@@ -644,13 +609,15 @@
             }
         }
 
+        @Override
         protected Caret createCaret() {
             return new XAWTCaret();
         }
     }
 
 
-    static class XAWTCaret extends DefaultCaret {
+    static final class XAWTCaret extends DefaultCaret {
+        @Override
         public void focusGained(FocusEvent e) {
             super.focusGained(e);
             if (getComponent().isEnabled()){
@@ -660,6 +627,7 @@
             getComponent().repaint();
         }
 
+        @Override
         public void focusLost(FocusEvent e) {
             super.focusLost(e);
             getComponent().repaint();
@@ -668,6 +636,7 @@
         // Fix for 5100950: textarea.getSelectedText() returns the de-selected text, on XToolkit
         // Restoring Motif behaviour
         // If the text is unhighlighted then we should sets the selection range to zero
+        @Override
         public void setSelectionVisible(boolean vis) {
             if (vis){
                 super.setSelectionVisible(vis);
@@ -678,16 +647,14 @@
         }
     }
 
+    final class XAWTScrollBarButton extends BasicArrowButton {
 
-    class XAWTScrollBarButton extends BasicArrowButton
-    {
-        UIDefaults uidefaults = XToolkit.getUIDefaults();
+        private UIDefaults uidefaults = XToolkit.getUIDefaults();
         private Color darkShadow = SystemColor.controlShadow;
         private Color lightShadow = SystemColor.controlLtHighlight;
         private Color buttonBack = uidefaults.getColor("ScrollBar.track");
 
-        public XAWTScrollBarButton(int direction)
-        {
+        XAWTScrollBarButton(int direction) {
             super(direction);
 
             switch (direction) {
@@ -707,6 +674,7 @@
             setForeground(uidefaults.getColor("ScrollBar.foreground"));
         }
 
+        @Override
         public Dimension getPreferredSize() {
             switch (direction) {
             case NORTH:
@@ -719,18 +687,22 @@
             }
         }
 
+        @Override
         public Dimension getMinimumSize() {
             return getPreferredSize();
         }
 
+        @Override
         public Dimension getMaximumSize() {
             return getPreferredSize();
         }
 
+        @Override
         public boolean isFocusTraversable() {
             return false;
         }
 
+        @Override
         public void paint(Graphics g)
         {
             int w = getWidth();
@@ -846,19 +818,16 @@
         }
     }
 
+    final class XAWTScrollBarUI extends BasicScrollBarUI {
 
-    class XAWTScrollBarUI extends BasicScrollBarUI
-    {
-        public XAWTScrollBarUI() {
-            super();
-        }
-
+        @Override
         protected void installDefaults()
         {
             super.installDefaults();
             scrollbar.setBorder(new BevelBorder(false,SystemColor.controlDkShadow,SystemColor.controlLtHighlight) );
         }
 
+        @Override
         protected void configureScrollBarColors() {
             UIDefaults uidefaults = XToolkit.getUIDefaults();
             Color bg = scrollbar.getBackground();
@@ -881,12 +850,14 @@
 
         }
 
+        @Override
         protected JButton createDecreaseButton(int orientation) {
             JButton b = new XAWTScrollBarButton(orientation);
             return b;
 
         }
 
+        @Override
         protected JButton createIncreaseButton(int orientation) {
             JButton b = new XAWTScrollBarButton(orientation);
             return b;
@@ -900,12 +871,14 @@
             return incrButton;
         }
 
+        @Override
         public void paint(Graphics g, JComponent c) {
             paintTrack(g, c, getTrackBounds());
             Rectangle thumbBounds = getThumbBounds();
             paintThumb(g, c, thumbBounds);
         }
 
+        @Override
         public void paintThumb(Graphics g, JComponent c, Rectangle thumbBounds)
         {
             if(!scrollbar.isEnabled()) {
@@ -934,17 +907,18 @@
         }
     }
 
+    final class AWTTextArea extends JTextArea implements DocumentListener {
 
-    class AWTTextArea extends JTextArea implements DocumentListener {
-        boolean isFocused = false;
-        XTextAreaPeer peer;
+        private boolean isFocused = false;
+        private final XTextAreaPeer peer;
 
-        public AWTTextArea(String text, XTextAreaPeer peer) {
+        AWTTextArea(String text, XTextAreaPeer peer) {
             super(text);
             setFocusable(false);
             this.peer = peer;
         }
 
+        @Override
         public void insertUpdate(DocumentEvent e) {
             if (peer != null) {
                 peer.postEvent(new TextEvent(peer.target,
@@ -952,6 +926,7 @@
             }
         }
 
+        @Override
         public void removeUpdate(DocumentEvent e) {
             if (peer != null) {
                 peer.postEvent(new TextEvent(peer.target,
@@ -959,6 +934,7 @@
             }
         }
 
+        @Override
         public void changedUpdate(DocumentEvent e) {
             if (peer != null) {
                 peer.postEvent(new TextEvent(peer.target,
@@ -979,6 +955,7 @@
             super.processFocusEvent(fe);
         }
 
+        @Override
         public boolean hasFocus() {
             return isFocused;
         }
@@ -999,6 +976,7 @@
             processInputMethodEvent(e);
         }
 
+        @Override
         public void updateUI() {
             ComponentUI ui = new AWTTextAreaUI();
             setUI(ui);
@@ -1006,6 +984,7 @@
 
         // Fix for 4915454 - override the default implementation to avoid
         // loading SystemFlavorMap and associated classes.
+        @Override
         public void setTransferHandler(TransferHandler newHandler) {
             TransferHandler oldHandler = (TransferHandler)
                 getClientProperty(AWTAccessor.getClientPropertyKeyAccessor()
@@ -1018,9 +997,8 @@
         }
     }
 
+    final class XAWTScrollPaneUI extends BasicScrollPaneUI {
 
-    class XAWTScrollPaneUI extends BasicScrollPaneUI
-    {
         private final Border vsbMarginBorderR = new EmptyBorder(0, 2, 0, 0);
         private final Border vsbMarginBorderL = new EmptyBorder(0, 0, 0, 2);
         private final Border hsbMarginBorder = new EmptyBorder(2, 0, 0, 0);
@@ -1030,12 +1008,14 @@
 
         private PropertyChangeListener propertyChangeHandler;
 
+        @Override
         protected void installListeners(JScrollPane scrollPane) {
             super.installListeners(scrollPane);
             propertyChangeHandler = createPropertyChangeHandler();
             scrollPane.addPropertyChangeListener(propertyChangeHandler);
         }
 
+        @Override
         public void paint(Graphics g, JComponent c) {
             Border vpBorder = scrollpane.getViewportBorder();
             if (vpBorder != null) {
@@ -1051,6 +1031,7 @@
 
         private PropertyChangeListener createPropertyChangeHandler() {
             return new PropertyChangeListener() {
+                    @Override
                     public void propertyChange(PropertyChangeEvent e) {
                         String propertyName = e.getPropertyName();
 
@@ -1075,7 +1056,7 @@
             return c.getComponentOrientation().isLeftToRight();
         }
 
-
+        @Override
         protected void installDefaults(JScrollPane scrollpane) {
             Border b = scrollpane.getBorder();
             UIDefaults uidefaults = XToolkit.getUIDefaults();
@@ -1102,6 +1083,7 @@
             }
         }
 
+        @Override
         protected void uninstallDefaults(JScrollPane c) {
             super.uninstallDefaults(c);
 
@@ -1123,15 +1105,15 @@
         }
     }
 
-
     private class AWTTextPane extends JScrollPane implements FocusListener {
-        JTextArea jtext;
-        XWindow xwin;
 
-        Color control = SystemColor.control;
-        Color focus = SystemColor.activeCaptionBorder;
+        private final JTextArea jtext;
+        private final XWindow xwin;
 
-        public AWTTextPane(JTextArea jt, XWindow xwin, Container parent) {
+        private final Color control = SystemColor.control;
+        private final Color focus = SystemColor.activeCaptionBorder;
+
+        AWTTextPane(JTextArea jt, XWindow xwin, Container parent) {
             super(jt);
             this.xwin = xwin;
             setDoubleBuffered(true);
@@ -1156,6 +1138,7 @@
             }
         }
 
+        @Override
         public void focusGained(FocusEvent e) {
             Graphics g = getGraphics();
             Rectangle r = getViewportBorderBounds();
@@ -1164,6 +1147,7 @@
             g.dispose();
         }
 
+        @Override
         public void focusLost(FocusEvent e) {
             Graphics g = getGraphics();
             Rectangle r = getViewportBorderBounds();
@@ -1176,19 +1160,23 @@
             return (Window) xwin.target;
         }
 
+        @Override
         public ComponentPeer getPeer() {
             return (ComponentPeer) (xwin);
         }
 
+        @Override
         public void updateUI() {
             ComponentUI ui = new XAWTScrollPaneUI();
             setUI(ui);
         }
 
+        @Override
         public JScrollBar createVerticalScrollBar() {
             return new XAWTScrollBar(JScrollBar.VERTICAL);
         }
 
+        @Override
         public JScrollBar createHorizontalScrollBar() {
             return new XAWTScrollBar(JScrollBar.HORIZONTAL);
         }
@@ -1197,18 +1185,19 @@
             return this.jtext;
         }
 
+        @Override
         public Graphics getGraphics() {
             return xwin.getGraphics();
         }
 
+        final class XAWTScrollBar extends ScrollBar {
 
-        class XAWTScrollBar extends ScrollBar {
-
-            public XAWTScrollBar(int i) {
+            XAWTScrollBar(int i) {
                 super(i);
                 setFocusable(false);
             }
 
+            @Override
             public void updateUI() {
                 ComponentUI ui = new XAWTScrollBarUI();
                 setUI(ui);
@@ -1222,12 +1211,13 @@
         private Color control = SystemColor.controlShadow;
         private boolean isRaised;
 
-        public BevelBorder(boolean isRaised, Color darkShadow, Color lightShadow) {
+        BevelBorder(boolean isRaised, Color darkShadow, Color lightShadow) {
             this.isRaised = isRaised;
             this.darkShadow = darkShadow;
             this.lightShadow = lightShadow;
         }
 
+        @Override
         public void paintBorder(Component c, Graphics g, int x, int y, int w, int h) {
             g.setColor((isRaised) ? lightShadow : darkShadow);
             g.drawLine(x, y, x+w-1, y);           // top
@@ -1246,10 +1236,12 @@
             g.drawLine(x+w-2, y+h-2, x+w-2, y+1); // right
         }
 
+        @Override
         public Insets getBorderInsets(Component c) {
             return getBorderInsets(c, new Insets(0,0,0,0));
         }
 
+        @Override
         public Insets getBorderInsets(Component c, Insets insets) {
             insets.top = insets.left = insets.bottom = insets.right = 2;
             return insets;
diff --git a/jdk/src/solaris/classes/sun/awt/X11/XTextFieldPeer.java b/jdk/src/solaris/classes/sun/awt/X11/XTextFieldPeer.java
index be948e2..3db7ed4 100644
--- a/jdk/src/solaris/classes/sun/awt/X11/XTextFieldPeer.java
+++ b/jdk/src/solaris/classes/sun/awt/X11/XTextFieldPeer.java
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2003, 2007, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2003, 2013, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -57,51 +57,47 @@
 import sun.awt.CausedFocusEvent;
 import sun.awt.AWTAccessor;
 
-public class XTextFieldPeer extends XComponentPeer implements TextFieldPeer {
+final class XTextFieldPeer extends XComponentPeer implements TextFieldPeer {
     private static final PlatformLogger log = PlatformLogger.getLogger("sun.awt.X11.XTextField");
 
-    String text;
-    XAWTTextField xtext;
+    private String text;
+    private final XAWTTextField xtext;
+    private final boolean firstChangeSkipped;
 
-    boolean firstChangeSkipped;
-
-    public XTextFieldPeer(TextField target) {
+    XTextFieldPeer(TextField target) {
         super(target);
-        int start, end;
-        firstChangeSkipped = false;
         text = target.getText();
         xtext = new XAWTTextField(text,this, target.getParent());
         xtext.getDocument().addDocumentListener(xtext);
         xtext.setCursor(target.getCursor());
         XToolkit.specialPeerMap.put(xtext,this);
 
-        TextField txt = (TextField) target;
         initTextField();
-        setText(txt.getText());
-        if (txt.echoCharIsSet()) {
-            setEchoChar(txt.getEchoChar());
+        setText(target.getText());
+        if (target.echoCharIsSet()) {
+            setEchoChar(target.getEchoChar());
         }
         else setEchoChar((char)0);
 
-        start = txt.getSelectionStart();
-        end = txt.getSelectionEnd();
-
-        if (end > start) {
-            select(start, end);
-        }
+        int start = target.getSelectionStart();
+        int end = target.getSelectionEnd();
         // Fix for 5100200
         // Restoring Motif behaviour
         // Since the end position of the selected text can be greater then the length of the text,
         // so we should set caret to max position of the text
-        int caretPosition = Math.min(end, text.length());
-        setCaretPosition(caretPosition);
+        setCaretPosition(Math.min(end, text.length()));
+        if (end > start) {
+            // Should be called after setText() and setCaretPosition()
+            select(start, end);
+        }
 
-        setEditable(txt.isEditable());
+        setEditable(target.isEditable());
 
         // After this line we should not change the component's text
         firstChangeSkipped = true;
     }
 
+    @Override
     public void dispose() {
         XToolkit.specialPeerMap.remove(xtext);
         // visible caret has a timer thread which must be stopped
@@ -141,10 +137,10 @@
         setFont(font);
     }
 
-
     /**
      * @see java.awt.peer.TextComponentPeer
      */
+    @Override
     public void setEditable(boolean editable) {
         if (xtext != null) {
             xtext.setEditable(editable);
@@ -155,6 +151,7 @@
     /**
      * @see java.awt.peer.ComponentPeer
      */
+    @Override
     public void setEnabled(boolean enabled) {
         super.setEnabled(enabled);
         if (xtext != null) {
@@ -166,22 +163,23 @@
     /**
      * @see java.awt.peer.TextComponentPeer
      */
-
+    @Override
     public InputMethodRequests getInputMethodRequests() {
         if (xtext != null) return xtext.getInputMethodRequests();
         else  return null;
 
     }
 
+    @Override
     void handleJavaInputMethodEvent(InputMethodEvent e) {
         if (xtext != null)
             xtext.processInputMethodEventImpl(e);
     }
 
-
     /**
      * @see java.awt.peer.TextFieldPeer
      */
+    @Override
     public void setEchoChar(char c) {
         if (xtext != null) {
             xtext.setEchoChar(c);
@@ -193,6 +191,7 @@
     /**
      * @see java.awt.peer.TextComponentPeer
      */
+    @Override
     public int getSelectionStart() {
         return xtext.getSelectionStart();
     }
@@ -200,6 +199,7 @@
     /**
      * @see java.awt.peer.TextComponentPeer
      */
+    @Override
     public int getSelectionEnd() {
         return xtext.getSelectionEnd();
     }
@@ -207,6 +207,7 @@
     /**
      * @see java.awt.peer.TextComponentPeer
      */
+    @Override
     public String getText() {
         return xtext.getText();
     }
@@ -214,12 +215,13 @@
     /**
      * @see java.awt.peer.TextComponentPeer
      */
-    public void setText(String txt) {
-        setXAWTTextField(txt);
+    @Override
+    public void setText(String text) {
+        setXAWTTextField(text);
         repaint();
     }
 
-    protected boolean setXAWTTextField(String txt) {
+    private void setXAWTTextField(String txt) {
         text = txt;
         if (xtext != null)  {
             // JTextField.setText() posts two different events (remove & insert).
@@ -234,29 +236,22 @@
             xtext.getDocument().addDocumentListener(xtext);
             xtext.setCaretPosition(0);
         }
-        return true;
     }
 
     /**
      * to be implemented.
      * @see java.awt.peer.TextComponentPeer
      */
+    @Override
     public void setCaretPosition(int position) {
         if (xtext != null) xtext.setCaretPosition(position);
     }
 
-    /**
-     * DEPRECATED
-     * @see java.awt.peer.TextFieldPeer
-     */
-    public void setEchoCharacter(char c) {
-        setEchoChar(c);
-    }
-
     void repaintText() {
         xtext.repaintNow();
     }
 
+    @Override
     public void setBackground(Color c) {
         if (log.isLoggable(PlatformLogger.Level.FINE)) {
             log.fine("target="+ target + ", old=" + background + ", new=" + c);
@@ -269,6 +264,7 @@
         repaintText();
     }
 
+    @Override
     public void setForeground(Color c) {
         foreground = c;
         if (xtext != null) {
@@ -279,6 +275,7 @@
         repaintText();
     }
 
+    @Override
     public void setFont(Font f) {
         synchronized (getStateLock()) {
             font = f;
@@ -290,14 +287,6 @@
     }
 
     /**
-     * DEPRECATED
-     * @see java.awt.peer.TextFieldPeer
-     */
-    public Dimension preferredSize(int cols) {
-        return getPreferredSize(cols);
-    }
-
-    /**
      * Deselects the the highlighted text.
      */
     public void deselect() {
@@ -308,20 +297,19 @@
         }
     }
 
-
     /**
      * to be implemented.
      * @see java.awt.peer.TextComponentPeer
      */
+    @Override
     public int getCaretPosition() {
         return xtext.getCaretPosition();
     }
 
-
-
     /**
      * @see java.awt.peer.TextComponentPeer
      */
+    @Override
     public void select(int s, int e) {
         xtext.select(s,e);
         // Fixed 5100806
@@ -329,29 +317,32 @@
         xtext.repaint();
     }
 
-
+    @Override
     public Dimension getMinimumSize() {
         return xtext.getMinimumSize();
     }
 
+    @Override
     public Dimension getPreferredSize() {
         return xtext.getPreferredSize();
     }
 
+    @Override
     public Dimension getPreferredSize(int cols) {
         return getMinimumSize(cols);
     }
 
     private static final int PADDING = 16;
 
+    @Override
     public Dimension getMinimumSize(int cols) {
         Font f = xtext.getFont();
         FontMetrics fm = xtext.getFontMetrics(f);
         return new Dimension(fm.charWidth('0') * cols + 10,
                              fm.getMaxDescent() + fm.getMaxAscent() + PADDING);
-
     }
 
+    @Override
     public boolean isFocusable() {
         return true;
     }
@@ -364,11 +355,10 @@
                                   modifiers));
     }
 
-
     protected void disposeImpl() {
     }
 
-
+    @Override
     public void repaint() {
         if (xtext  != null) xtext.repaint();
     }
@@ -377,27 +367,32 @@
         if (xtext  != null) xtext.paint(g);
     }
 
+    @Override
     public void print(Graphics g) {
         if (xtext != null) {
             xtext.print(g);
         }
     }
 
+    @Override
     public void focusLost(FocusEvent e) {
         super.focusLost(e);
         xtext.forwardFocusLost(e);
     }
 
+    @Override
     public void focusGained(FocusEvent e) {
         super.focusGained(e);
         xtext.forwardFocusGained(e);
     }
 
+    @Override
     void handleJavaKeyEvent(KeyEvent e) {
         AWTAccessor.getComponentAccessor().processEvent(xtext,e);
     }
 
 
+    @Override
     public void handleJavaMouseEvent( MouseEvent mouseEvent ) {
         super.handleJavaMouseEvent(mouseEvent);
         if (xtext != null)  {
@@ -410,26 +405,21 @@
         }
     }
 
-
     /**
      * DEPRECATED
      */
+    @Override
     public Dimension minimumSize() {
         return getMinimumSize();
     }
 
-    /**
-     * DEPRECATED
-     */
-    public Dimension minimumSize(int cols) {
-        return getMinimumSize(cols);
-    }
-
+    @Override
     public void setVisible(boolean b) {
         super.setVisible(b);
         if (xtext != null) xtext.setVisible(b);
     }
 
+    @Override
     public void setBounds(int x, int y, int width, int height, int op) {
         super.setBounds(x, y, width, height, op);
         if (xtext != null) {
@@ -456,47 +446,11 @@
         }
     }
 
+    final class AWTTextFieldUI extends MotifPasswordFieldUI {
 
-    //
-    // Accessibility support
-    //
+        private JTextField jtf;
 
-    // stub functions: to be fully implemented in a future release
-    public int getIndexAtPoint(int x, int y) { return -1; }
-    public Rectangle getCharacterBounds(int i) { return null; }
-    public long filterEvents(long mask) { return 0; }
-
-
-    /*  To be fully implemented in a future release
-
-        int oldSelectionStart;
-        int oldSelectionEnd;
-
-        public native int getIndexAtPoint(int x, int y);
-        public native Rectangle getCharacterBounds(int i);
-        public native long filterEvents(long mask);
-
-        /**
-         * Handle a change in the text selection endpoints
-         * (Note: could be simply a change in the caret location)
-         *
-         public void selectionValuesChanged(int start, int end) {
-         return;  // Need to write implemetation of this.
-         }
-    */
-
-
-    class  AWTTextFieldUI extends MotifPasswordFieldUI {
-
-        /**
-         * Creates a UI for a JTextField.
-         *
-         * @param c the text field
-         * @return the UI
-         */
-        JTextField jtf;
-
-
+        @Override
         protected String getPropertyPrefix() {
             JTextComponent comp = getComponent();
             if (comp instanceof JPasswordField && ((JPasswordField)comp).echoCharIsSet()) {
@@ -506,6 +460,7 @@
             }
         }
 
+        @Override
         public void installUI(JComponent c) {
             super.installUI(c);
 
@@ -562,6 +517,7 @@
             }
         }
 
+        @Override
         protected void installKeyboardActions() {
             super.installKeyboardActions();
 
@@ -579,21 +535,19 @@
             }
         }
 
+        @Override
         protected Caret createCaret() {
             return new XTextAreaPeer.XAWTCaret();
         }
     }
 
-    class XAWTTextField extends JPasswordField
-        implements ActionListener,
-                   DocumentListener
-    {
+    final class XAWTTextField extends JPasswordField
+            implements ActionListener, DocumentListener {
 
-        boolean isFocused = false;
+        private boolean isFocused = false;
+        private final XComponentPeer peer;
 
-        XComponentPeer peer;
-
-        public XAWTTextField(String text, XComponentPeer peer, Container parent) {
+        XAWTTextField(String text, XComponentPeer peer, Container parent) {
             super(text);
             this.peer = peer;
             setDoubleBuffered(true);
@@ -608,6 +562,7 @@
 
         }
 
+        @Override
         public void actionPerformed( ActionEvent actionEvent ) {
             peer.postEvent(new ActionEvent(peer.target,
                                            ActionEvent.ACTION_PERFORMED,
@@ -617,6 +572,7 @@
 
         }
 
+        @Override
         public void insertUpdate(DocumentEvent e) {
             if (peer != null) {
                 peer.postEvent(new TextEvent(peer.target,
@@ -624,6 +580,7 @@
             }
         }
 
+        @Override
         public void removeUpdate(DocumentEvent e) {
             if (peer != null) {
                 peer.postEvent(new TextEvent(peer.target,
@@ -631,6 +588,7 @@
             }
         }
 
+        @Override
         public void changedUpdate(DocumentEvent e) {
             if (peer != null) {
                 peer.postEvent(new TextEvent(peer.target,
@@ -638,33 +596,32 @@
             }
         }
 
+        @Override
         public ComponentPeer getPeer() {
             return (ComponentPeer) peer;
         }
 
-
         public void repaintNow() {
             paintImmediately(getBounds());
         }
 
+        @Override
         public Graphics getGraphics() {
             return peer.getGraphics();
         }
 
+        @Override
         public void updateUI() {
             ComponentUI ui = new AWTTextFieldUI();
             setUI(ui);
         }
 
-
         void forwardFocusGained( FocusEvent e) {
             isFocused = true;
             FocusEvent fe = CausedFocusEvent.retarget(e, this);
             super.processFocusEvent(fe);
-
         }
 
-
         void forwardFocusLost( FocusEvent e) {
             isFocused = false;
             FocusEvent fe = CausedFocusEvent.retarget(e, this);
@@ -672,11 +629,11 @@
 
         }
 
+        @Override
         public boolean hasFocus() {
             return isFocused;
         }
 
-
         public void processInputMethodEventImpl(InputMethodEvent e) {
             processInputMethodEvent(e);
         }
@@ -691,6 +648,7 @@
 
         // Fix for 4915454 - override the default implementation to avoid
         // loading SystemFlavorMap and associated classes.
+        @Override
         public void setTransferHandler(TransferHandler newHandler) {
             TransferHandler oldHandler = (TransferHandler)
                 getClientProperty(AWTAccessor.getClientPropertyKeyAccessor()
@@ -702,6 +660,7 @@
             firePropertyChange("transferHandler", oldHandler, newHandler);
         }
 
+        @Override
         public void setEchoChar(char c) {
             super.setEchoChar(c);
             ((AWTTextFieldUI)ui).installKeyboardActions();
diff --git a/jdk/src/solaris/classes/sun/awt/X11/XToolkit.java b/jdk/src/solaris/classes/sun/awt/X11/XToolkit.java
index 7fa438f..9f9a15d 100644
--- a/jdk/src/solaris/classes/sun/awt/X11/XToolkit.java
+++ b/jdk/src/solaris/classes/sun/awt/X11/XToolkit.java
@@ -240,9 +240,14 @@
                 @Override
                 public void dispatchEvent(XEvent ev) {
                     if (ev.get_type() == XConstants.ConfigureNotify) {
-                        ((X11GraphicsEnvironment)GraphicsEnvironment.
-                         getLocalGraphicsEnvironment()).
-                            displayChanged();
+                        awtUnlock();
+                        try {
+                            ((X11GraphicsEnvironment)GraphicsEnvironment.
+                             getLocalGraphicsEnvironment()).
+                                displayChanged();
+                        } finally {
+                            awtLock();
+                        }
                     }
                 }
             });
diff --git a/jdk/src/solaris/classes/sun/awt/X11GraphicsEnvironment.java b/jdk/src/solaris/classes/sun/awt/X11GraphicsEnvironment.java
index 4e1c816..60846b6 100644
--- a/jdk/src/solaris/classes/sun/awt/X11GraphicsEnvironment.java
+++ b/jdk/src/solaris/classes/sun/awt/X11GraphicsEnvironment.java
@@ -25,8 +25,8 @@
 
 package sun.awt;
 
+import java.awt.AWTError;
 import java.awt.GraphicsDevice;
-
 import java.awt.Point;
 import java.awt.Rectangle;
 import java.io.BufferedReader;
@@ -96,6 +96,7 @@
 
                     // Now check for XRender system property
                     boolean xRenderRequested = true;
+                    boolean xRenderIgnoreLinuxVersion = false;
                     String xProp = System.getProperty("sun.java2d.xrender");
                         if (xProp != null) {
                         if (xProp.equals("false") || xProp.equals("f")) {
@@ -104,6 +105,10 @@
                             xRenderRequested = true;
                             xRenderVerbose = true;
                         }
+
+                        if(xProp.equalsIgnoreCase("t") || xProp.equalsIgnoreCase("true")) {
+                            xRenderIgnoreLinuxVersion = true;
+                        }
                     }
 
                     // initialize the X11 display connection
@@ -121,7 +126,7 @@
 
                     // only attempt to initialize Xrender if it was requested
                     if (xRenderRequested) {
-                        xRenderAvailable = initXRender(xRenderVerbose);
+                        xRenderAvailable = initXRender(xRenderVerbose, xRenderIgnoreLinuxVersion);
                         if (xRenderVerbose && !xRenderAvailable) {
                             System.out.println(
                                          "Could not enable XRender pipeline");
@@ -159,7 +164,7 @@
     private static boolean xRenderVerbose;
     private static boolean xRenderAvailable;
 
-    private static native boolean initXRender(boolean verbose);
+    private static native boolean initXRender(boolean verbose, boolean ignoreLinuxVersion);
     public static boolean isXRenderAvailable() {
         return xRenderAvailable;
     }
@@ -200,7 +205,12 @@
      * Returns the default screen graphics device.
      */
     public GraphicsDevice getDefaultScreenDevice() {
-        return getScreenDevices()[getDefaultScreenNum()];
+        GraphicsDevice[] screens = getScreenDevices();
+        if (screens.length == 0) {
+            throw new AWTError("no screen devices");
+        }
+        int index = getDefaultScreenNum();
+        return screens[0 < index && index < screens.length ? index : 0];
     }
 
     public boolean isDisplayLocal() {
diff --git a/jdk/src/solaris/classes/sun/java2d/xr/GrowableRectArray.java b/jdk/src/solaris/classes/sun/java2d/xr/GrowableRectArray.java
index ee5bd62..7defecf 100644
--- a/jdk/src/solaris/classes/sun/java2d/xr/GrowableRectArray.java
+++ b/jdk/src/solaris/classes/sun/java2d/xr/GrowableRectArray.java
@@ -38,6 +38,20 @@
         super(RECT_SIZE, initialSize);
     }
 
+    public final void pushRectValues(int x, int y, int width, int height) {
+        int currSize = size;
+        size += RECT_SIZE;
+
+        if (size >= array.length) {
+            growArray();
+        }
+
+        array[currSize] = x;
+        array[currSize + 1] = y;
+        array[currSize + 2] = width;
+        array[currSize + 3] = height;
+    }
+
     public final void setX(int index, int x) {
         array[getCellIndex(index)] = x;
     }
diff --git a/jdk/src/solaris/classes/sun/java2d/xr/MaskTile.java b/jdk/src/solaris/classes/sun/java2d/xr/MaskTile.java
index 25d110f..c3315fa 100644
--- a/jdk/src/solaris/classes/sun/java2d/xr/MaskTile.java
+++ b/jdk/src/solaris/classes/sun/java2d/xr/MaskTile.java
@@ -41,98 +41,6 @@
         dirtyArea = new DirtyRegion();
     }
 
-    public void addRect(int x, int y, int width, int height) {
-        int index = rects.getNextIndex();
-        rects.setX(index, x);
-        rects.setY(index, y);
-        rects.setWidth(index, width);
-        rects.setHeight(index, height);
-    }
-
-    public void addLine(int x1, int y1, int x2, int y2) {
-        /*
-         * EXA is not able to accalerate diagonal lines, we try to "guide" it a
-         * bit to avoid excessive migration See project documentation for an
-         * detailed explanation
-         */
-        DirtyRegion region = new DirtyRegion();
-        region.setDirtyLineRegion(x1, y1, x2, y2);
-        int xDiff = region.x2 - region.x;
-        int yDiff = region.y2 - region.y;
-
-        if (xDiff == 0 || yDiff == 0) {
-            addRect(region.x, region.y,
-                    region.x2 - region.x + 1, region.y2 - region.y + 1);
-        } else if (xDiff == 1 && yDiff == 1) {
-            addRect(x1, y1, 1, 1);
-            addRect(x2, y2, 1, 1);
-        } else {
-            lineToRects(x1, y1, x2, y2);
-        }
-    }
-
-    private void lineToRects(int xstart, int ystart, int xend, int yend) {
-        int x, y, t, dx, dy, incx, incy, pdx, pdy, ddx, ddy, es, el, err;
-
-        /* Entfernung in beiden Dimensionen berechnen */
-        dx = xend - xstart;
-        dy = yend - ystart;
-
-        /* Vorzeichen des Inkrements bestimmen */
-        incx = dx > 0 ? 1 : (dx < 0) ? -1 : 0;
-        incy = dy > 0 ? 1 : (dy < 0) ? -1 : 0;
-        if (dx < 0)
-            dx = -dx;
-        if (dy < 0)
-            dy = -dy;
-
-        /* feststellen, welche Entfernung groesser ist */
-        if (dx > dy) {
-            /* x ist schnelle Richtung */
-            pdx = incx;
-            pdy = 0; /* pd. ist Parallelschritt */
-            ddx = incx;
-            ddy = incy; /* dd. ist Diagonalschritt */
-            es = dy;
-            el = dx; /* Fehlerschritte schnell, langsam */
-        } else {
-            /* y ist schnelle Richtung */
-            pdx = 0;
-            pdy = incy; /* pd. ist Parallelschritt */
-            ddx = incx;
-            ddy = incy; /* dd. ist Diagonalschritt */
-            es = dx;
-            el = dy; /* Fehlerschritte schnell, langsam */
-        }
-
-        /* Initialisierungen vor Schleifenbeginn */
-        x = xstart;
-        y = ystart;
-        err = el / 2;
-        addRect(x, y, 1, 1);
-
-        /* Pixel berechnen */
-        for (t = 0; t < el; ++t) /* t zaehlt die Pixel, el ist auch Anzahl */
-        {
-            /* Aktualisierung Fehlerterm */
-            err -= es;
-            if (err < 0) {
-                /* Fehlerterm wieder positiv (>=0) machen */
-                err += el;
-                /* Schritt in langsame Richtung, Diagonalschritt */
-                x += ddx;
-                y += ddy;
-            } else {
-                /* Schritt in schnelle Richtung, Parallelschritt */
-                x += pdx;
-                y += pdy;
-            }
-            addRect(x, y, 1, 1);
-            // SetPixel(x,y);
-            // System.out.println(x+":"+y);
-        }
-    }
-
     public void calculateDirtyAreas()
     {
         for (int i=0; i < rects.getSize(); i++) {
diff --git a/jdk/src/solaris/classes/sun/java2d/xr/MaskTileManager.java b/jdk/src/solaris/classes/sun/java2d/xr/MaskTileManager.java
index b7baf36..9b2be27 100644
--- a/jdk/src/solaris/classes/sun/java2d/xr/MaskTileManager.java
+++ b/jdk/src/solaris/classes/sun/java2d/xr/MaskTileManager.java
@@ -54,10 +54,6 @@
     int maskPixmap;
     int maskPicture;
     long maskGC;
-    int lineMaskPixmap;
-    int lineMaskPicture;
-    long drawLineGC;
-    long clearLineGC;
 
     public MaskTileManager(XRCompositeManager xrMgr, int parentXid) {
         tileList = new ArrayList<MaskTile>();
@@ -71,34 +67,6 @@
                             0, 0, MASK_SIZE, MASK_SIZE);
         maskGC = con.createGC(maskPixmap);
         con.setGCExposures(maskGC, false);
-
-        lineMaskPixmap = con.createPixmap(parentXid, 8, MASK_SIZE, MASK_SIZE);
-        lineMaskPicture =
-             con.createPicture(lineMaskPixmap, XRUtils.PictStandardA8);
-        con.renderRectangle(lineMaskPicture, XRUtils.PictOpClear,
-                          new XRColor(Color.black), 0, 0, MASK_SIZE, MASK_SIZE);
-
-        drawLineGC = con.createGC(lineMaskPixmap);
-        con.setGCExposures(drawLineGC, false);
-        con.setGCForeground(drawLineGC, 255);
-
-        clearLineGC = con.createGC(lineMaskPixmap);
-        con.setGCExposures(clearLineGC, false);
-        con.setGCForeground(clearLineGC, 0);
-    }
-
-    /**
-     * Adds a rectangle to the mask.
-     */
-    public void addRect(int x, int y, int width, int height) {
-        mainTile.addRect(x, y, width, height);
-    }
-
-    /**
-     * Adds a line to the mask.
-     */
-    public void addLine(int x1, int y1, int x2, int y2) {
-        mainTile.addLine(x1, y1, x2, y2);
     }
 
     /**
@@ -324,4 +292,11 @@
             rects.setY(index, 0);
         }
     }
+
+    /**
+     * @return MainTile to which rectangles are added before composition.
+     */
+    public MaskTile getMainTile() {
+        return mainTile;
+     }
 }
diff --git a/jdk/src/solaris/classes/sun/java2d/xr/XRDrawLine.java b/jdk/src/solaris/classes/sun/java2d/xr/XRDrawLine.java
new file mode 100644
index 0000000..66b595e
--- /dev/null
+++ b/jdk/src/solaris/classes/sun/java2d/xr/XRDrawLine.java
@@ -0,0 +1,425 @@
+/*
+ * 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.
+ */
+
+/**
+ * Bresenham line-drawing implementation decomposing line segments
+ * into a series of rectangles.
+ * This is required, because xrender doesn't support line primitives directly.
+ * The code here is an almost 1:1 port of the existing C-source contained in
+ * sun/java2d/loop/DrawLine.c and sun/java2d/loop/LoopMacros.h
+ */
+package sun.java2d.xr;
+
+public class XRDrawLine {
+    static final int BIG_MAX = ((1 << 29) - 1);
+    static final int BIG_MIN = (-(1 << 29));
+
+    static final int OUTCODE_TOP = 1;
+    static final int OUTCODE_BOTTOM = 2;
+    static final int OUTCODE_LEFT = 4;
+    static final int OUTCODE_RIGHT = 8;
+
+    int x1, y1, x2, y2;
+    int ucX1, ucY1, ucX2, ucY2;
+
+    DirtyRegion region = new DirtyRegion();
+
+    protected void rasterizeLine(GrowableRectArray rectBuffer, int _x1,
+            int _y1, int _x2, int _y2, int cxmin, int cymin, int cxmax,
+            int cymax, boolean clip, boolean overflowCheck) {
+        float diagF;
+        int error;
+        int steps;
+        int errminor, errmajor;
+        boolean xmajor;
+        int dx, dy, ax, ay;
+
+        initCoordinates(_x1, _y1, _x2, _y2, overflowCheck);
+
+        dx = x2 - x1;
+        dy = y2 - y1;
+        ax = Math.abs(dx);
+        ay = Math.abs(dy);
+        xmajor = (ax >= ay);
+        diagF = ((float) ax) / ay;
+
+        if (clip
+                && !clipCoordinates(cxmin, cymin, cxmax, cymax, xmajor, dx, dy,
+                        ax, ay)) {
+            // whole line was clipped away
+            return;
+        }
+
+        region.setDirtyLineRegion(x1, y1, x2, y2);
+        int xDiff = region.x2 - region.x;
+        int yDiff = region.y2 - region.y;
+
+        if (xDiff == 0 || yDiff == 0) {
+            // horizontal / diagonal lines can be represented by a single
+            // rectangle
+            rectBuffer.pushRectValues(region.x, region.y, region.x2 - region.x
+                    + 1, region.y2 - region.y + 1);
+            return;
+        }
+
+        // Setup bresenham
+        if (xmajor) {
+            errmajor = ay * 2;
+            errminor = ax * 2;
+            ax = -ax; /* For clipping adjustment below */
+            steps = x2 - x1;
+        } else {
+            errmajor = ax * 2;
+            errminor = ay * 2;
+            ay = -ay; /* For clipping adjustment below */
+            steps = y2 - y1;
+        }
+
+        if ((steps = (Math.abs(steps) + 1)) == 0) {
+            return;
+        }
+
+        error = -(errminor / 2);
+
+        if (y1 != ucY1) {
+            int ysteps = y1 - ucY1;
+            if (ysteps < 0) {
+                ysteps = -ysteps;
+            }
+            error += ysteps * ax * 2;
+        }
+
+        if (x1 != ucX1) {
+            int xsteps = x1 - ucX1;
+            if (xsteps < 0) {
+                xsteps = -xsteps;
+            }
+            error += xsteps * ay * 2;
+        }
+        error += errmajor;
+        errminor -= errmajor;
+
+        int xStep = (dx > 0 ? 1 : -1);
+        int yStep = (dy > 0 ? 1 : -1);
+        int orthogonalXStep = xmajor ? xStep : 0;
+        int orthogonalYStep = !xmajor ? yStep : 0;
+
+        /*
+         * For lines which proceed in one direction faster, we try to generate
+         * rectangles instead of points. Otherwise we try to avoid the extra
+         * work...
+         */
+        if (diagF <= 0.9 || diagF >= 1.1) {
+            lineToRects(rectBuffer, steps, error, errmajor, errminor, xStep,
+                    yStep, orthogonalXStep, orthogonalYStep);
+        } else {
+            lineToPoints(rectBuffer, steps, error, errmajor, errminor, xStep,
+                    yStep, orthogonalXStep, orthogonalYStep);
+        }
+    }
+
+    private void lineToPoints(GrowableRectArray rectBuffer, int steps,
+            int error, int errmajor, int errminor, int xStep, int yStep,
+            int orthogonalXStep, int orthogonalYStep) {
+        int x = x1, y = y1;
+
+        do {
+            rectBuffer.pushRectValues(x, y, 1, 1);
+
+            // "Traditional" Bresenham line drawing
+            if (error < 0) {
+                error += errmajor;
+                x += orthogonalXStep;
+                y += orthogonalYStep;
+            } else {
+                error -= errminor;
+                x += xStep;
+                y += yStep;
+            }
+        } while (--steps > 0);
+    }
+
+    private void lineToRects(GrowableRectArray rectBuffer, int steps,
+            int error, int errmajor, int errminor, int xStep, int yStep,
+            int orthogonalXStep, int orthogonalYStep) {
+        int x = x1, y = y1;
+        int rectX = Integer.MIN_VALUE, rectY = 0;
+        int rectW = 0, rectH = 0;
+
+        do {
+            // Combine the resulting rectangles
+            // for steps performed in a single direction.
+            if (y == rectY) {
+                if (x == (rectX + rectW)) {
+                    rectW++;
+                } else if (x == (rectX - 1)) {
+                    rectX--;
+                    rectW++;
+                }
+            } else if (x == rectX) {
+                if (y == (rectY + rectH)) {
+                    rectH++;
+                } else if (y == (rectY - 1)) {
+                    rectY--;
+                    rectH++;
+                }
+            } else {
+                // Diagonal step: add the previous rectangle to the list,
+                // iff it was "real" (= not initialized before the first
+                // iteration)
+                if (rectX != Integer.MIN_VALUE) {
+                    rectBuffer.pushRectValues(rectX, rectY, rectW, rectH);
+                }
+                rectX = x;
+                rectY = y;
+                rectW = rectH = 1;
+            }
+
+            // "Traditional" Bresenham line drawing
+            if (error < 0) {
+                error += errmajor;
+                x += orthogonalXStep;
+                y += orthogonalYStep;
+            } else {
+                error -= errminor;
+                x += xStep;
+                y += yStep;
+            }
+        } while (--steps > 0);
+
+        // Add last rectangle which isn't handled by the combination-code
+        // anymore
+        rectBuffer.pushRectValues(rectX, rectY, rectW, rectH);
+    }
+
+    private boolean clipCoordinates(int cxmin, int cymin, int cxmax, int cymax,
+            boolean xmajor, int dx, int dy, int ax, int ay) {
+        int outcode1, outcode2;
+
+        outcode1 = outcode(x1, y1, cxmin, cymin, cxmax, cymax);
+        outcode2 = outcode(x2, y2, cxmin, cymin, cxmax, cymax);
+
+        while ((outcode1 | outcode2) != 0) {
+            int xsteps = 0, ysteps = 0;
+
+            if ((outcode1 & outcode2) != 0) {
+                return false;
+            }
+
+            if (outcode1 != 0) {
+                if ((outcode1 & (OUTCODE_TOP | OUTCODE_BOTTOM)) != 0) {
+                    if ((outcode1 & OUTCODE_TOP) != 0) {
+                        y1 = cymin;
+                    } else {
+                        y1 = cymax;
+                    }
+                    ysteps = y1 - ucY1;
+                    if (ysteps < 0) {
+                        ysteps = -ysteps;
+                    }
+                    xsteps = 2 * ysteps * ax + ay;
+                    if (xmajor) {
+                        xsteps += ay - ax - 1;
+                    }
+                    xsteps = xsteps / (2 * ay);
+                    if (dx < 0) {
+                        xsteps = -xsteps;
+                    }
+                    x1 = ucX1 + (int) xsteps;
+                } else if ((outcode1 & (OUTCODE_LEFT | OUTCODE_RIGHT)) != 0) {
+                    if ((outcode1 & OUTCODE_LEFT) != 0) {
+                        x1 = cxmin;
+                    } else {
+                        x1 = cxmax;
+                    }
+                    xsteps = x1 - ucX1;
+                    if (xsteps < 0) {
+                        xsteps = -xsteps;
+                    }
+                    ysteps = 2 * xsteps * ay + ax;
+                    if (!xmajor) {
+                        ysteps += ax - ay - 1;
+                    }
+                    ysteps = ysteps / (2 * ax);
+                    if (dy < 0) {
+                        ysteps = -ysteps;
+                    }
+                    y1 = ucY1 + (int) ysteps;
+                }
+                outcode1 = outcode(x1, y1, cxmin, cymin, cxmax, cymax);
+            } else {
+                if ((outcode2 & (OUTCODE_TOP | OUTCODE_BOTTOM)) != 0) {
+                    if ((outcode2 & OUTCODE_TOP) != 0) {
+                        y2 = cymin;
+                    } else {
+                        y2 = cymax;
+                    }
+                    ysteps = y2 - ucY2;
+                    if (ysteps < 0) {
+                        ysteps = -ysteps;
+                    }
+                    xsteps = 2 * ysteps * ax + ay;
+                    if (xmajor) {
+                        xsteps += ay - ax;
+                    } else {
+                        xsteps -= 1;
+                    }
+                    xsteps = xsteps / (2 * ay);
+                    if (dx > 0) {
+                        xsteps = -xsteps;
+                    }
+                    x2 = ucX2 + (int) xsteps;
+                } else if ((outcode2 & (OUTCODE_LEFT | OUTCODE_RIGHT)) != 0) {
+                    if ((outcode2 & OUTCODE_LEFT) != 0) {
+                        x2 = cxmin;
+                    } else {
+                        x2 = cxmax;
+                    }
+                    xsteps = x2 - ucX2;
+                    if (xsteps < 0) {
+                        xsteps = -xsteps;
+                    }
+                    ysteps = 2 * xsteps * ay + ax;
+                    if (xmajor) {
+                        ysteps -= 1;
+                    } else {
+                        ysteps += ax - ay;
+                    }
+                    ysteps = ysteps / (2 * ax);
+                    if (dy > 0) {
+                        ysteps = -ysteps;
+                    }
+                    y2 = ucY2 + (int) ysteps;
+                }
+                outcode2 = outcode(x2, y2, cxmin, cymin, cxmax, cymax);
+            }
+        }
+
+        return true;
+    }
+
+    private void initCoordinates(int x1, int y1, int x2, int y2,
+            boolean checkOverflow) {
+        /*
+         * Part of calculating the Bresenham parameters for line stepping
+         * involves being able to store numbers that are twice the magnitude of
+         * the biggest absolute difference in coordinates. Since we want the
+         * stepping parameters to be stored in jints, we then need to avoid any
+         * absolute differences more than 30 bits. Thus, we need to preprocess
+         * the coordinates to reduce their range to 30 bits regardless of
+         * clipping. We need to cut their range back before we do the clipping
+         * because the Bresenham stepping values need to be calculated based on
+         * the "unclipped" coordinates.
+         *
+         * Thus, first we perform a "pre-clipping" stage to bring the
+         * coordinates within the 30-bit range and then we proceed to the
+         * regular clipping procedure, pretending that these were the original
+         * coordinates all along. Since this operation occurs based on a
+         * constant "pre-clip" rectangle of +/- 30 bits without any
+         * consideration for the final clip, the rounding errors that occur here
+         * will depend only on the line coordinates and be invariant with
+         * respect to the particular device/user clip rectangles in effect at
+         * the time. Thus, rendering a given large-range line will be consistent
+         * under a variety of clipping conditions.
+         */
+        if (checkOverflow
+                && (OverflowsBig(x1) || OverflowsBig(y1) || OverflowsBig(x2) || OverflowsBig(y2))) {
+            /*
+             * Use doubles to get us into range for "Big" arithmetic.
+             *
+             * The math of adjusting an endpoint for clipping can involve an
+             * intermediate result with twice the number of bits as the original
+             * coordinate range. Since we want to maintain as much as 30 bits of
+             * precision in the resulting coordinates, we will get roundoff here
+             * even using IEEE double-precision arithmetic which cannot carry 60
+             * bits of mantissa. Since the rounding errors will be consistent
+             * for a given set of input coordinates the potential roundoff error
+             * should not affect the consistency of our rendering.
+             */
+            double x1d = x1;
+            double y1d = y1;
+            double x2d = x2;
+            double y2d = y2;
+            double dxd = x2d - x1d;
+            double dyd = y2d - y1d;
+
+            if (x1 < BIG_MIN) {
+                y1d = y1 + (BIG_MIN - x1) * dyd / dxd;
+                x1d = BIG_MIN;
+            } else if (x1 > BIG_MAX) {
+                y1d = y1 - (x1 - BIG_MAX) * dyd / dxd;
+                x1d = BIG_MAX;
+            }
+            /* Use Y1d instead of _y1 for testing now as we may have modified it */
+            if (y1d < BIG_MIN) {
+                x1d = x1 + (BIG_MIN - y1) * dxd / dyd;
+                y1d = BIG_MIN;
+            } else if (y1d > BIG_MAX) {
+                x1d = x1 - (y1 - BIG_MAX) * dxd / dyd;
+                y1d = BIG_MAX;
+            }
+            if (x2 < BIG_MIN) {
+                y2d = y2 + (BIG_MIN - x2) * dyd / dxd;
+                x2d = BIG_MIN;
+            } else if (x2 > BIG_MAX) {
+                y2d = y2 - (x2 - BIG_MAX) * dyd / dxd;
+                x2d = BIG_MAX;
+            }
+            /* Use Y2d instead of _y2 for testing now as we may have modified it */
+            if (y2d < BIG_MIN) {
+                x2d = x2 + (BIG_MIN - y2) * dxd / dyd;
+                y2d = BIG_MIN;
+            } else if (y2d > BIG_MAX) {
+                x2d = x2 - (y2 - BIG_MAX) * dxd / dyd;
+                y2d = BIG_MAX;
+            }
+
+            x1 = (int) x1d;
+            y1 = (int) y1d;
+            x2 = (int) x2d;
+            y2 = (int) y2d;
+        }
+
+        this.x1 = ucX1 = x1;
+        this.y1 = ucY1 = y1;
+        this.x2 = ucX2 = x2;
+        this.y2 = ucY2 = y2;
+    }
+
+    private boolean OverflowsBig(int v) {
+        return ((v) != (((v) << 2) >> 2));
+    }
+
+    private int out(int v, int vmin, int vmax, int cmin, int cmax) {
+        return ((v < vmin) ? cmin : ((v > vmax) ? cmax : 0));
+    }
+
+    private int outcode(int x, int y, int xmin, int ymin, int xmax, int ymax) {
+        return out(y, ymin, ymax, OUTCODE_TOP, OUTCODE_BOTTOM)
+                | out(x, xmin, xmax, OUTCODE_LEFT, OUTCODE_RIGHT);
+    }
+}
diff --git a/jdk/src/solaris/classes/sun/java2d/xr/XRRenderer.java b/jdk/src/solaris/classes/sun/java2d/xr/XRRenderer.java
index 933f545..bad9e83 100644
--- a/jdk/src/solaris/classes/sun/java2d/xr/XRRenderer.java
+++ b/jdk/src/solaris/classes/sun/java2d/xr/XRRenderer.java
@@ -53,10 +53,15 @@
 public class XRRenderer implements PixelDrawPipe, PixelFillPipe, ShapeDrawPipe {
     XRDrawHandler drawHandler;
     MaskTileManager tileManager;
+    XRDrawLine lineGen;
+    GrowableRectArray rectBuffer;
 
     public XRRenderer(MaskTileManager tileManager) {
         this.tileManager = tileManager;
+        this.rectBuffer = tileManager.getMainTile().getRects();
+
         this.drawHandler = new XRDrawHandler();
+        this.lineGen = new XRDrawLine();
     }
 
     /**
@@ -77,19 +82,15 @@
         int transX2 = Region.clipAdd(x2, sg2d.transX);
         int transY2 = Region.clipAdd(y2, sg2d.transY);
 
-        // Non clipped fast path
-        if (compClip.contains(transX1, transY1)
-                && compClip.contains(transX2, transY2)) {
-            SunToolkit.awtLock();
-            try {
-                validateSurface(sg2d);
-                tileManager.addLine(transX1, transY1, transX2, transY2);
-                tileManager.fillMask((XRSurfaceData) sg2d.surfaceData);
-            } finally {
-                SunToolkit.awtUnlock();
-            }
-        } else {
-            draw(sg2d, new Line2D.Float(x1, y1, x2, y2));
+        SunToolkit.awtLock();
+        try {
+            validateSurface(sg2d);
+            lineGen.rasterizeLine(rectBuffer, transX1, transY1,
+                    transX2, transY2, compClip.getLoX(), compClip.getLoY(),
+                    compClip.getHiX(), compClip.getHiY(), true, true);
+            tileManager.fillMask((XRSurfaceData) sg2d.surfaceData);
+        } finally {
+            SunToolkit.awtUnlock();
         }
     }
 
@@ -148,7 +149,7 @@
         SunToolkit.awtLock();
         try {
             validateSurface(sg2d);
-            tileManager.addRect(x, y, width, height);
+            rectBuffer.pushRectValues(x, y, width, height);
             tileManager.fillMask((XRSurfaceData) sg2d.surfaceData);
         } finally {
             SunToolkit.awtUnlock();
@@ -199,11 +200,13 @@
     }
 
     private class XRDrawHandler extends ProcessPath.DrawHandler {
+        DirtyRegion region;
 
         XRDrawHandler() {
             // these are bogus values; the caller will use validate()
             // to ensure that they are set properly prior to each usage
             super(0, 0, 0, 0);
+            this.region = new DirtyRegion();
         }
 
         /**
@@ -218,15 +221,32 @@
         }
 
         public void drawLine(int x1, int y1, int x2, int y2) {
-            tileManager.addLine(x1, y1, x2, y2);
+            region.setDirtyLineRegion(x1, y1, x2, y2);
+            int xDiff = region.x2 - region.x;
+            int yDiff = region.y2 - region.y;
+
+            if (xDiff == 0 || yDiff == 0) {
+                // horizontal / diagonal lines can be represented by a single
+                // rectangle
+                rectBuffer.pushRectValues(region.x, region.y, region.x2 - region.x
+                        + 1, region.y2 - region.y + 1);
+            } else if (xDiff == 1 && yDiff == 1) {
+                // fast path for pattern commonly generated by
+                // ProcessPath.DrawHandler
+                rectBuffer.pushRectValues(x1, y1, 1, 1);
+                rectBuffer.pushRectValues(x2, y2, 1, 1);
+            } else {
+                lineGen.rasterizeLine(rectBuffer, x1, y1, x2, y2, 0, 0,
+                                      0, 0, false, false);
+            }
         }
 
         public void drawPixel(int x, int y) {
-            tileManager.addRect(x, y, 1, 1);
+            rectBuffer.pushRectValues(x, y, 1, 1);
         }
 
         public void drawScanline(int x1, int x2, int y) {
-            tileManager.addRect(x1, y, x2 - x1 + 1, 1);
+            rectBuffer.pushRectValues(x1, y, x2 - x1 + 1, 1);
         }
     }
 
@@ -263,7 +283,7 @@
             validateSurface(sg2d);
             int[] spanBox = new int[4];
             while (si.nextSpan(spanBox)) {
-                tileManager.addRect(spanBox[0] + transx,
+                rectBuffer.pushRectValues(spanBox[0] + transx,
                                     spanBox[1] + transy,
                                     spanBox[2] - spanBox[0],
                                     spanBox[3] - spanBox[1]);
diff --git a/jdk/src/solaris/classes/sun/java2d/xr/XRSurfaceData.java b/jdk/src/solaris/classes/sun/java2d/xr/XRSurfaceData.java
index fa05987..014a98b 100644
--- a/jdk/src/solaris/classes/sun/java2d/xr/XRSurfaceData.java
+++ b/jdk/src/solaris/classes/sun/java2d/xr/XRSurfaceData.java
@@ -457,15 +457,15 @@
         if (sg2d != null && sg2d.compositeState == SunGraphics2D.COMP_XOR) {
             if (validatedXorComp != sg2d.getComposite()) {
                 validatedXorComp = (XORComposite) sg2d.getComposite();
-                int xorpixelmod = validatedXorComp.getXorPixel();
                 renderQueue.setGCMode(xgc, false);
+            }
 
-                // validate pixel
-                int pixel = sg2d.pixel;
-                if (validatedGCForegroundPixel != pixel) {
-                    renderQueue.setGCForeground(xgc, pixel ^ xorpixelmod);
-                    validatedGCForegroundPixel = pixel;
-                }
+            // validate pixel
+            int pixel = sg2d.pixel;
+            if (validatedGCForegroundPixel != pixel) {
+                int xorpixelmod = validatedXorComp.getXorPixel();
+                renderQueue.setGCForeground(xgc, pixel ^ xorpixelmod);
+                validatedGCForegroundPixel = pixel;
             }
 
             if (updateGCClip) {
diff --git a/jdk/src/solaris/doc/sun/man/man1/ja/javaws.1 b/jdk/src/solaris/doc/sun/man/man1/ja/javaws.1
deleted file mode 100644
index 500e6a7..0000000
--- a/jdk/src/solaris/doc/sun/man/man1/ja/javaws.1
+++ /dev/null
@@ -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
- 
diff --git a/jdk/src/solaris/doc/sun/man/man1/javaws.1 b/jdk/src/solaris/doc/sun/man/man1/javaws.1
deleted file mode 100644
index a73df25..0000000
--- a/jdk/src/solaris/doc/sun/man/man1/javaws.1
+++ /dev/null
@@ -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
- 
diff --git a/jdk/src/solaris/native/sun/awt/awt_LoadLibrary.c b/jdk/src/solaris/native/sun/awt/awt_LoadLibrary.c
index 378db58..c056e8e 100644
--- a/jdk/src/solaris/native/sun/awt/awt_LoadLibrary.c
+++ b/jdk/src/solaris/native/sun/awt/awt_LoadLibrary.c
@@ -79,10 +79,8 @@
 
 
 #ifdef MACOSX
-  #define XAWT_PATH "/libawt_xawt.dylib"
   #define LWAWT_PATH "/libawt_lwawt.dylib"
   #define DEFAULT_PATH LWAWT_PATH
-  #define HEADLESS_PATH "/libawt_headless.dylib"
 #else
   #define XAWT_PATH "/libawt_xawt.so"
   #define DEFAULT_PATH XAWT_PATH
@@ -100,11 +98,6 @@
     struct utsname name;
     JNIEnv *env = (JNIEnv *)JNU_GetEnv(vm, JNI_VERSION_1_2);
     void *v;
-    char *envvar;
-    int xt_before_xm = 0;
-    int XAWT = 0;
-    jstring toolkit = NULL;
-    jstring propname = NULL;
     jstring fmanager = NULL;
     jstring fmProp = NULL;
 
@@ -124,56 +117,32 @@
     /*
      * The code below is responsible for:
      * 1. Loading appropriate awt library, i.e. libawt_xawt or libawt_headless
-     * 2. Setting "awt.toolkit" system property to use the appropriate Java toolkit class,
-     *    (if user has specified the toolkit in env varialble)
+     * 2. Set the "sun.font.fontmanager" system property.
      */
 
-    propname = (*env)->NewStringUTF(env, "awt.toolkit");
     fmProp = (*env)->NewStringUTF(env, "sun.font.fontmanager");
-    tk = DEFAULT_PATH; /* default value, may be changed below */
-
-    /* Check if toolkit is specified in env variable */
-    envvar = getenv("AWT_TOOLKIT");
-    if (envvar && (strstr(envvar, "XToolkit"))) {
-        toolkit = (*env)->NewStringUTF(env, "sun.awt.X11.XToolkit");
-        tk = XAWT_PATH;
-        fmanager = (*env)->NewStringUTF(env, "sun.awt.X11FontManager");
 #ifdef MACOSX
-    } else {
         fmanager = (*env)->NewStringUTF(env, "sun.font.CFontManager");
         tk = LWAWT_PATH;
+#else
+        fmanager = (*env)->NewStringUTF(env, "sun.awt.X11FontManager");
+        tk = XAWT_PATH;
 #endif
-    }
-    /* If user specified toolkit then set java system property */
-    if (toolkit && propname) {
-        JNU_CallStaticMethodByName (env,
-                    NULL,
-                    "java/lang/System",
-                    "setProperty",
-                    "(Ljava/lang/String;Ljava/lang/String;)Ljava/lang/String;",
-                    propname,toolkit);
-    }
     if (fmanager && fmProp) {
-        JNU_CallStaticMethodByName (env,
-                    NULL,
-                    "java/lang/System",
-                        "setProperty",
-                    "(Ljava/lang/String;Ljava/lang/String;)Ljava/lang/String;",
-                    fmProp, fmanager);
+        JNU_CallStaticMethodByName(env, NULL, "java/lang/System", "setProperty",
+                                   "(Ljava/lang/String;Ljava/lang/String;)Ljava/lang/String;",
+                                   fmProp, fmanager);
     }
 
-    /* Calculate library name to load */
+#ifndef MACOSX
     if (AWTIsHeadless()) {
         tk = HEADLESS_PATH;
     }
+#endif
+
+    /* Calculate library name to load */
     strncpy(p, tk, MAXPATHLEN-len-1);
 
-    if (toolkit) {
-        (*env)->DeleteLocalRef(env, toolkit);
-    }
-    if (propname) {
-        (*env)->DeleteLocalRef(env, propname);
-    }
     if (fmProp) {
         (*env)->DeleteLocalRef(env, fmProp);
     }
diff --git a/jdk/src/solaris/native/sun/java2d/x11/X11Renderer.c b/jdk/src/solaris/native/sun/java2d/x11/X11Renderer.c
index cfae03c..bbe32a0 100644
--- a/jdk/src/solaris/native/sun/java2d/x11/X11Renderer.c
+++ b/jdk/src/solaris/native/sun/java2d/x11/X11Renderer.c
@@ -465,9 +465,7 @@
 
     points = transformPoints(env, xcoordsArray, ycoordsArray, transx, transy,
                              pTmp, (int *)&npoints, isclosed);
-    if (points == 0) {
-        JNU_ThrowOutOfMemoryError(env, "translated coordinate array");
-    } else {
+    if (points != 0) {
         if (npoints == 2) {
             /*
              * Some X11 implementations fail to draw anything for
@@ -588,6 +586,7 @@
         NULL
     };
     PHStroke stroke;
+    jboolean ok = JNI_TRUE;
 
     if (xsdo == NULL) {
         return;
@@ -625,8 +624,6 @@
         types = (jbyte*)
             (*env)->GetPrimitiveArrayCritical(env, typesArray, NULL);
         if (types != NULL) {
-            jboolean ok;
-
             if (isFill) {
                 drawHandler.pDrawScanline = &drawScanline;
                 ok = doFillPath(&drawHandler,
@@ -643,14 +640,14 @@
                                 types, numTypes,
                                 stroke);
             }
-            if (!ok) {
-                JNU_ThrowArrayIndexOutOfBoundsException(env, "coords array");
-            }
             (*env)->ReleasePrimitiveArrayCritical(env, typesArray, types,
                                                   JNI_ABORT);
         }
         (*env)->ReleasePrimitiveArrayCritical(env, coordsArray, coords,
                                               JNI_ABORT);
+        if (!ok) {
+            JNU_ThrowArrayIndexOutOfBoundsException(env, "coords array");
+        }
     }
 
     XDHD_FREE_POINTS(&dHData);
@@ -893,9 +890,7 @@
 
     points = transformPoints(env, xcoordsArray, ycoordsArray, transx, transy,
                              pTmp, (int *)&npoints, JNI_FALSE);
-    if (points == 0) {
-        JNU_ThrowOutOfMemoryError(env, "translated coordinate array");
-    } else {
+    if (points != 0) {
         if (npoints > 2) {
             XFillPolygon(awt_display, xsdo->drawable, (GC) xgc,
                          points, npoints, Complex, CoordModeOrigin);
diff --git a/jdk/src/solaris/native/sun/java2d/x11/X11SurfaceData.c b/jdk/src/solaris/native/sun/java2d/x11/X11SurfaceData.c
index f944cff..a35d6fd 100644
--- a/jdk/src/solaris/native/sun/java2d/x11/X11SurfaceData.c
+++ b/jdk/src/solaris/native/sun/java2d/x11/X11SurfaceData.c
@@ -227,7 +227,7 @@
 #if defined(HEADLESS) || !defined(MITSHM)
     return JNI_FALSE;
 #else
-    return useMitShmPixmaps;
+    return (jboolean)useMitShmPixmaps;
 #endif /* HEADLESS, MITSHM */
 }
 
@@ -258,6 +258,7 @@
 {
 #ifndef HEADLESS
     X11SDOps *xsdo = (X11SDOps*)SurfaceData_InitOps(env, xsd, sizeof(X11SDOps));
+    jboolean hasException;
     if (xsdo == NULL) {
         JNU_ThrowOutOfMemoryError(env, "Initialization of SurfaceData failed.");
         return;
@@ -270,7 +271,10 @@
     xsdo->ReleasePixmapWithBg = X11SD_ReleasePixmapWithBg;
     xsdo->widget = NULL;
     if (peer != NULL) {
-        xsdo->drawable = JNU_CallMethodByName(env, NULL, peer, "getWindow", "()J").j;
+        xsdo->drawable = JNU_CallMethodByName(env, &hasException, peer, "getWindow", "()J").j;
+        if (hasException) {
+            return;
+        }
     } else {
         xsdo->drawable = 0;
     }
diff --git a/jdk/src/solaris/native/sun/java2d/x11/XRBackendNative.c b/jdk/src/solaris/native/sun/java2d/x11/XRBackendNative.c
index cbcf0c3..3a5c9ca 100644
--- a/jdk/src/solaris/native/sun/java2d/x11/XRBackendNative.c
+++ b/jdk/src/solaris/native/sun/java2d/x11/XRBackendNative.c
@@ -31,6 +31,10 @@
 
 #include <X11/extensions/Xrender.h>
 
+#ifdef __linux__
+    #include <sys/utsname.h>
+#endif
+
 /* On Solaris 10 updates 8, 9, the render.h file defines these
  * protocol values but does not define the structs in Xrender.h.
  * Thus in order to get these always defined on Solaris 10
@@ -131,7 +135,7 @@
 #define MAX_PAYLOAD (262140u - 36u)
 #define MAXUINT (0xffffffffu)
 
-static jboolean IsXRenderAvailable(jboolean verbose) {
+static jboolean IsXRenderAvailable(jboolean verbose, jboolean ignoreLinuxVersion) {
 
     void *xrenderlib;
 
@@ -253,6 +257,31 @@
     }
 #endif
 
+#ifdef __linux__
+    /*
+     * Check for Linux >= 3.5 (Ubuntu 12.04.02 LTS) to avoid hitting
+     * https://bugs.freedesktop.org/show_bug.cgi?id=48045
+     */
+    struct utsname utsbuf;
+    if(uname(&utsbuf) >= 0) {
+        int major, minor, revision;
+        if(sscanf(utsbuf.release, "%i.%i.%i", &major, &minor, &revision) == 3) {
+            if(major < 3 || (major == 3 && minor < 5)) {
+                if(!ignoreLinuxVersion) {
+                    available = JNI_FALSE;
+                }
+                else if(verbose) {
+                 printf("WARNING: Linux < 3.5 detected.\n"
+                        "The pipeline will be enabled, but graphical "
+                        "artifacts can occur with old graphic drivers.\n"
+                        "See the release notes for more details.\n");
+                        fflush(stdout);
+                }
+            }
+        }
+    }
+#endif // __linux__
+
     return available;
 }
 /*
@@ -262,7 +291,7 @@
  */
 JNIEXPORT jboolean JNICALL
 Java_sun_awt_X11GraphicsEnvironment_initXRender
-(JNIEnv *env, jclass x11ge, jboolean verbose)
+(JNIEnv *env, jclass x11ge, jboolean verbose, jboolean ignoreLinuxVersion)
 {
 #ifndef HEADLESS
     static jboolean xrenderAvailable = JNI_FALSE;
@@ -277,7 +306,7 @@
         }
 #endif
         AWT_LOCK();
-        xrenderAvailable = IsXRenderAvailable(verbose);
+        xrenderAvailable = IsXRenderAvailable(verbose, ignoreLinuxVersion);
         AWT_UNLOCK();
         firstTime = JNI_FALSE;
     }
@@ -297,7 +326,13 @@
     jlong fmt32;
 
     jfieldID a8ID = (*env)->GetStaticFieldID(env, cls, "FMTPTR_A8", "J");
+    if (a8ID == NULL) {
+        return;
+    }
     jfieldID argb32ID = (*env)->GetStaticFieldID(env, cls, "FMTPTR_ARGB32", "J");
+    if (argb32ID == NULL) {
+        return;
+    }
 
     if (awt_display == (Display *)NULL) {
         return;
@@ -317,6 +352,10 @@
     defaultImg = XCreateImage(awt_display, NULL, 8, ZPixmap, 0, maskData, 32, 32, 8, 0);
     defaultImg->data = maskData; //required?
     maskImgID = (*env)->GetStaticFieldID(env, cls, "MASK_XIMG", "J");
+    if (maskImgID == NULL) {
+       return;
+    }
+
     (*env)->SetStaticLongField(env, cls, maskImgID, ptr_to_jlong(defaultImg));
 }
 
diff --git a/jdk/src/solaris/native/sun/java2d/x11/XRSurfaceData.c b/jdk/src/solaris/native/sun/java2d/x11/XRSurfaceData.c
index b598a22..a9c762f 100644
--- a/jdk/src/solaris/native/sun/java2d/x11/XRSurfaceData.c
+++ b/jdk/src/solaris/native/sun/java2d/x11/XRSurfaceData.c
@@ -88,7 +88,13 @@
   J2dTraceLn(J2D_TRACE_INFO, "in XRSurfaceData_initIDs");
 
   pictID = (*env)->GetFieldID(env, xsd, "picture", "I");
+  if (pictID == NULL) {
+      return;
+  }
   xidID = (*env)->GetFieldID(env, xsd, "xid", "I");
+  if (xidID == NULL) {
+      return;
+  }
 
   XShared_initIDs(env, JNI_FALSE);
 #endif /* !HEADLESS */
diff --git a/jdk/src/windows/bin/cmdtoargs.c b/jdk/src/windows/bin/cmdtoargs.c
index 69f1aef..352b155 100644
--- a/jdk/src/windows/bin/cmdtoargs.c
+++ b/jdk/src/windows/bin/cmdtoargs.c
@@ -53,6 +53,16 @@
 static StdArg *stdargs;
 static int    stdargc;
 
+static int copyCh(USHORT ch, char* dest) {
+    if (HIBYTE(ch) == 0) {
+        *dest = (char)ch;
+        return 1;
+    } else {
+        *((USHORT *)dest) = ch;
+        return 2;
+    }
+}
+
 static char* next_arg(char* cmdline, char* arg, jboolean* wildcard) {
 
     char* src = cmdline;
@@ -61,31 +71,43 @@
     int quotes = 0;
     int slashes = 0;
 
-    char prev = 0;
-    char ch = 0;
+    // "prev"/"ch" may contain either a single byte, or a double byte
+    // character encoded in CP_ACP.
+    USHORT prev = 0;
+    USHORT ch = 0;
     int i;
     jboolean done = JNI_FALSE;
+    int charLength;
 
     *wildcard = JNI_FALSE;
-    while ((ch = *src) != 0 && !done) {
+    while (!done) {
+        charLength = CharNextExA(CP_ACP, src, 0) - src;
+        if (charLength == 0) {
+            break;
+        } else if (charLength == 1) {
+            ch = (USHORT)(UCHAR)src[0];
+        } else {
+            ch = ((USHORT *)src)[0];
+        }
+
         switch (ch) {
-        case '"':
+        case L'"':
             if (separator) {
                 done = JNI_TRUE;
                 break;
             }
-            if (prev == '\\') {
+            if (prev == L'\\') {
                 for (i = 1; i < slashes; i += 2) {
-                    *dest++ = prev;
+                    dest += copyCh(prev, dest);
                 }
                 if (slashes % 2 == 1) {
-                    *dest++ = ch;
+                    dest += copyCh(ch, dest);
                 } else {
                     quotes++;
                 }
-            } else if (prev == '"' && quotes % 2 == 0) {
+            } else if (prev == L'"' && quotes % 2 == 0) {
                 quotes++;
-                *dest++ = ch; // emit every other consecutive quote
+                dest += copyCh(ch, dest); // emit every other consecutive quote
             } else if (quotes == 0) {
                 quotes++; // starting quote
             } else {
@@ -94,7 +116,7 @@
             slashes = 0;
             break;
 
-        case '\\':
+        case L'\\':
             slashes++;
             if (separator) {
                 done = JNI_TRUE;
@@ -102,23 +124,23 @@
             }
             break;
 
-        case ' ':
-        case '\t':
-            if (prev == '\\') {
+        case L' ':
+        case L'\t':
+            if (prev == L'\\') {
                 for (i = 0 ; i < slashes; i++) {
-                   *dest++ = prev;
+                    dest += copyCh(prev, dest);
                 }
             }
             if (quotes % 2 == 1) {
-                *dest++ = ch;
+                dest += copyCh(ch, dest);
             } else {
                 separator = JNI_TRUE;
             }
             slashes = 0;
             break;
 
-        case '*':
-        case '?':
+        case L'*':
+        case L'?':
             if (separator) {
                 done = JNI_TRUE;
                 separator = JNI_FALSE;
@@ -127,36 +149,36 @@
             if (quotes % 2 == 0) {
                 *wildcard = JNI_TRUE;
             }
-            if (prev == '\\') {
+            if (prev == L'\\') {
                 for (i = 0 ; i < slashes ; i++) {
-                    *dest++ = prev;
+                    dest += copyCh(prev, dest);
                 }
             }
-            *dest++ = ch;
+            dest += copyCh(ch, dest);
             break;
 
         default:
-            if (prev == '\\') {
+            if (prev == L'\\') {
                 for (i = 0 ; i < slashes ; i++) {
-                   *dest++ = prev;
+                    dest += copyCh(prev, dest);
                 }
-                *dest++ = ch;
+                dest += copyCh(ch, dest);
             } else if (separator) {
                 done = JNI_TRUE;
             } else {
-                *dest++ = ch;
+                dest += copyCh(ch, dest);
             }
             slashes = 0;
         }
 
         if (!done) {
             prev = ch;
-            src++;
+            src += charLength;
         }
     }
-    if (prev == '\\') {
+    if (prev == L'\\') {
         for (i = 0; i < slashes; i++) {
-            *dest++ = prev;
+            dest += copyCh(prev, dest);
         }
     }
     *dest = 0;
diff --git a/jdk/src/windows/classes/java/net/PlainSocketImpl.java b/jdk/src/windows/classes/java/net/PlainSocketImpl.java
index 1b6287d..55ebc8e 100644
--- a/jdk/src/windows/classes/java/net/PlainSocketImpl.java
+++ b/jdk/src/windows/classes/java/net/PlainSocketImpl.java
@@ -191,14 +191,17 @@
     }
 
     protected synchronized void accept(SocketImpl s) throws IOException {
-        // pass in the real impl not the wrapper.
-        SocketImpl delegate = ((PlainSocketImpl)s).impl;
-        delegate.address = new InetAddress();
-        delegate.fd = new FileDescriptor();
-        impl.accept(delegate);
-
-        // set fd to delegate's fd to be compatible with older releases
-        s.fd = delegate.fd;
+        if (s instanceof PlainSocketImpl) {
+            // pass in the real impl not the wrapper.
+            SocketImpl delegate = ((PlainSocketImpl)s).impl;
+            delegate.address = new InetAddress();
+            delegate.fd = new FileDescriptor();
+            impl.accept(delegate);
+            // set fd to delegate's fd to be compatible with older releases
+            s.fd = delegate.fd;
+        } else {
+            impl.accept(s);
+        }
     }
 
     void setFileDescriptor(FileDescriptor fd) {
diff --git a/jdk/src/windows/classes/sun/awt/Win32GraphicsEnvironment.java b/jdk/src/windows/classes/sun/awt/Win32GraphicsEnvironment.java
index a3a48e2..d3bd07f 100644
--- a/jdk/src/windows/classes/sun/awt/Win32GraphicsEnvironment.java
+++ b/jdk/src/windows/classes/sun/awt/Win32GraphicsEnvironment.java
@@ -25,6 +25,7 @@
 
 package sun.awt;
 
+import java.awt.AWTError;
 import java.awt.GraphicsConfiguration;
 import java.awt.GraphicsDevice;
 import java.awt.GraphicsEnvironment;
@@ -93,7 +94,12 @@
     protected native int getDefaultScreen();
 
     public GraphicsDevice getDefaultScreenDevice() {
-        return getScreenDevices()[getDefaultScreen()];
+        GraphicsDevice[] screens = getScreenDevices();
+        if (screens.length == 0) {
+            throw new AWTError("no screen devices");
+        }
+        int index = getDefaultScreen();
+        return screens[0 < index && index < screens.length ? index : 0];
     }
 
     /**
diff --git a/jdk/src/windows/classes/sun/awt/windows/WButtonPeer.java b/jdk/src/windows/classes/sun/awt/windows/WButtonPeer.java
index f0811ac..f006c9a 100644
--- a/jdk/src/windows/classes/sun/awt/windows/WButtonPeer.java
+++ b/jdk/src/windows/classes/sun/awt/windows/WButtonPeer.java
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 1996, 2006, 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
@@ -29,7 +29,7 @@
 import java.awt.event.ActionEvent;
 import java.awt.event.KeyEvent;
 
-class WButtonPeer extends WComponentPeer implements ButtonPeer {
+final class WButtonPeer extends WComponentPeer implements ButtonPeer {
 
     static {
         initIDs();
@@ -84,13 +84,6 @@
     }
 
     /**
-     * DEPRECATED
-     */
-    public Dimension minimumSize() {
-        return getMinimumSize();
-    }
-
-    /**
      * Initialize JNI field and method IDs
      */
     private static native void initIDs();
diff --git a/jdk/src/windows/classes/sun/awt/windows/WCheckboxPeer.java b/jdk/src/windows/classes/sun/awt/windows/WCheckboxPeer.java
index a053757..efab531 100644
--- a/jdk/src/windows/classes/sun/awt/windows/WCheckboxPeer.java
+++ b/jdk/src/windows/classes/sun/awt/windows/WCheckboxPeer.java
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 1996, 2005, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 1996, 2013, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -28,7 +28,7 @@
 import java.awt.peer.*;
 import java.awt.event.ItemEvent;
 
-public class WCheckboxPeer extends WComponentPeer implements CheckboxPeer {
+final class WCheckboxPeer extends WComponentPeer implements CheckboxPeer {
 
     // CheckboxPeer implementation
 
@@ -100,12 +100,4 @@
             }
         });
     }
-
-    /**
-     * DEPRECATED
-     */
-    public Dimension minimumSize() {
-            return getMinimumSize();
-    }
-
 }
diff --git a/jdk/src/windows/classes/sun/awt/windows/WChoicePeer.java b/jdk/src/windows/classes/sun/awt/windows/WChoicePeer.java
index 8ecc83e..74f9548 100644
--- a/jdk/src/windows/classes/sun/awt/windows/WChoicePeer.java
+++ b/jdk/src/windows/classes/sun/awt/windows/WChoicePeer.java
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 1996, 2007, 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
@@ -32,7 +32,7 @@
 import java.awt.event.WindowAdapter;
 import sun.awt.SunToolkit;
 
-class WChoicePeer extends WComponentPeer implements ChoicePeer {
+final class WChoicePeer extends WComponentPeer implements ChoicePeer {
 
     // WComponentPeer overrides
 
@@ -151,12 +151,5 @@
         return fm.getHeight() * maxItems;
     }
 
-    /**
-     * DEPRECATED
-     */
-    public Dimension minimumSize() {
-            return getMinimumSize();
-    }
-
     native void closeList();
 }
diff --git a/jdk/src/windows/classes/sun/awt/windows/WComponentPeer.java b/jdk/src/windows/classes/sun/awt/windows/WComponentPeer.java
index da4135e..cb13413 100644
--- a/jdk/src/windows/classes/sun/awt/windows/WComponentPeer.java
+++ b/jdk/src/windows/classes/sun/awt/windows/WComponentPeer.java
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 1996, 2010, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 1996, 2013, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -50,7 +50,6 @@
 import sun.java2d.d3d.D3DSurfaceData;
 import sun.java2d.opengl.OGLSurfaceData;
 import sun.java2d.pipe.Region;
-import sun.awt.DisplayChangedListener;
 import sun.awt.PaintEventDispatcher;
 import sun.awt.SunToolkit;
 import sun.awt.event.IgnorePaintEvent;
@@ -546,9 +545,6 @@
             return null;
         }
     }
-    public java.awt.Toolkit getToolkit() {
-        return Toolkit.getDefaultToolkit();
-    }
 
     // fallback default font object
     final static Font defaultFont = new Font(Font.DIALOG, Font.PLAIN, 12);
@@ -739,11 +735,11 @@
     }
 
     public boolean prepareImage(Image img, int w, int h, ImageObserver o) {
-        return getToolkit().prepareImage(img, w, h, o);
+        return Toolkit.getDefaultToolkit().prepareImage(img, w, h, o);
     }
 
     public int checkImage(Image img, int w, int h, ImageObserver o) {
-        return getToolkit().checkImage(img, w, h, o);
+        return Toolkit.getDefaultToolkit().checkImage(img, w, h, o);
     }
 
     // Object overrides
@@ -887,13 +883,6 @@
     /**
      * DEPRECATED
      */
-    public Dimension minimumSize() {
-        return getMinimumSize();
-    }
-
-    /**
-     * DEPRECATED
-     */
     public Dimension preferredSize() {
         return getPreferredSize();
     }
diff --git a/jdk/src/windows/classes/sun/awt/windows/WLabelPeer.java b/jdk/src/windows/classes/sun/awt/windows/WLabelPeer.java
index f5984c2..259329d 100644
--- a/jdk/src/windows/classes/sun/awt/windows/WLabelPeer.java
+++ b/jdk/src/windows/classes/sun/awt/windows/WLabelPeer.java
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 1996, 2001, 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
@@ -27,7 +27,7 @@
 import java.awt.*;
 import java.awt.peer.*;
 
-class WLabelPeer extends WComponentPeer implements LabelPeer {
+final class WLabelPeer extends WComponentPeer implements LabelPeer {
 
     // ComponentPeer overrides
 
@@ -82,12 +82,4 @@
 
         super.initialize();
     }
-
-    /**
-     * DEPRECATED
-     */
-    public Dimension minimumSize() {
-            return getMinimumSize();
-    }
-
 }
diff --git a/jdk/src/windows/classes/sun/awt/windows/WListPeer.java b/jdk/src/windows/classes/sun/awt/windows/WListPeer.java
index 2cd4df7..0c090b5 100644
--- a/jdk/src/windows/classes/sun/awt/windows/WListPeer.java
+++ b/jdk/src/windows/classes/sun/awt/windows/WListPeer.java
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 1996, 2006, 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
@@ -29,13 +29,8 @@
 import java.awt.event.ActionEvent;
 import java.awt.event.ItemEvent;
 
-class WListPeer extends WComponentPeer implements ListPeer {
+final class WListPeer extends WComponentPeer implements ListPeer {
 
-    // ComponentPeer overrides
-
-    public Dimension minimumSize() {
-        return minimumSize(4);
-    }
     public boolean isFocusable() {
         return true;
     }
diff --git a/jdk/src/windows/classes/sun/awt/windows/WPrinterJob.java b/jdk/src/windows/classes/sun/awt/windows/WPrinterJob.java
index 519a0be..6f22231 100644
--- a/jdk/src/windows/classes/sun/awt/windows/WPrinterJob.java
+++ b/jdk/src/windows/classes/sun/awt/windows/WPrinterJob.java
@@ -96,7 +96,6 @@
 import javax.print.attribute.standard.JobMediaSheetsSupported;
 import javax.print.attribute.standard.PageRanges;
 import javax.print.attribute.Size2DSyntax;
-import javax.print.StreamPrintService;
 
 import sun.awt.Win32FontManager;
 
@@ -440,7 +439,7 @@
             throw new HeadlessException();
         }
 
-        if (getPrintService() instanceof StreamPrintService) {
+        if (!(getPrintService() instanceof Win32PrintService)) {
             return super.pageDialog(page);
         }
 
@@ -586,7 +585,7 @@
             attributes = new HashPrintRequestAttributeSet();
         }
 
-        if (getPrintService() instanceof StreamPrintService) {
+        if (!(getPrintService() instanceof Win32PrintService)) {
             return super.printDialog(attributes);
         }
 
@@ -611,7 +610,7 @@
     public void setPrintService(PrintService service)
         throws PrinterException {
         super.setPrintService(service);
-        if (service instanceof StreamPrintService) {
+        if (!(service instanceof Win32PrintService)) {
             return;
         }
         driverDoesMultipleCopies = false;
@@ -648,7 +647,7 @@
             }
 
             myService = PrintServiceLookup.lookupDefaultPrintService();
-            if (myService != null) {
+            if (myService instanceof Win32PrintService) {
                 try {
                     setNativePrintServiceIfNeeded(myService.getName());
                 } catch (Exception e) {
diff --git a/jdk/src/windows/classes/sun/awt/windows/WScrollbarPeer.java b/jdk/src/windows/classes/sun/awt/windows/WScrollbarPeer.java
index 655fcd8..65c41a3 100644
--- a/jdk/src/windows/classes/sun/awt/windows/WScrollbarPeer.java
+++ b/jdk/src/windows/classes/sun/awt/windows/WScrollbarPeer.java
@@ -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
@@ -28,8 +28,7 @@
 import java.awt.peer.*;
 import java.awt.event.AdjustmentEvent;
 
-class WScrollbarPeer extends WComponentPeer implements ScrollbarPeer {
-
+final class WScrollbarPeer extends WComponentPeer implements ScrollbarPeer {
 
     // Returns width for vertial scrollbar as SM_CXHSCROLL,
     // height for horizontal scrollbar as SM_CYVSCROLL
@@ -140,12 +139,4 @@
     public boolean shouldClearRectBeforePaint() {
         return false;
     }
-
-    /**
-     * DEPRECATED
-     */
-    public Dimension minimumSize() {
-        return getMinimumSize();
-    }
-
 }
diff --git a/jdk/src/windows/classes/sun/awt/windows/WTextAreaPeer.java b/jdk/src/windows/classes/sun/awt/windows/WTextAreaPeer.java
index 063cffc..746f277 100644
--- a/jdk/src/windows/classes/sun/awt/windows/WTextAreaPeer.java
+++ b/jdk/src/windows/classes/sun/awt/windows/WTextAreaPeer.java
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 1996, 2003, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 1996, 2013, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -30,34 +30,36 @@
 import java.awt.im.InputMethodRequests;
 
 
-class WTextAreaPeer extends WTextComponentPeer implements TextAreaPeer {
+final class WTextAreaPeer extends WTextComponentPeer implements TextAreaPeer {
 
     // WComponentPeer overrides
 
+    @Override
     public Dimension getMinimumSize() {
         return getMinimumSize(10, 60);
     }
 
     // TextAreaPeer implementation
 
-    /* This should eventually be a direct native method. */
-    public void insert(String txt, int pos) {
-        insertText(txt, pos);
+    @Override
+    public void insert(String text, int pos) {
+        replaceRange(text, pos, pos);
     }
 
-    /* This should eventually be a direct native method. */
-    public void replaceRange(String txt, int start, int end) {
-        replaceText(txt, start, end);
-    }
+    @Override
+    public native void replaceRange(String text, int start, int end);
 
+    @Override
     public Dimension getPreferredSize(int rows, int cols) {
         return getMinimumSize(rows, cols);
     }
+    @Override
     public Dimension getMinimumSize(int rows, int cols) {
         FontMetrics fm = getFontMetrics(((TextArea)target).getFont());
         return new Dimension(fm.charWidth('0') * cols + 20, fm.getHeight() * rows + 20);
     }
 
+    @Override
     public InputMethodRequests getInputMethodRequests() {
            return null;
     }
@@ -68,42 +70,6 @@
         super(target);
     }
 
+    @Override
     native void create(WComponentPeer parent);
-
-    // native callbacks
-
-
-    // deprecated methods
-
-    /**
-     * DEPRECATED but, for now, still called by insert(String, int).
-     */
-    public native void insertText(String txt, int pos);
-
-    /**
-     * DEPRECATED but, for now, still called by replaceRange(String, int, int).
-     */
-    public native void replaceText(String txt, int start, int end);
-
-    /**
-     * DEPRECATED
-     */
-    public Dimension minimumSize() {
-        return getMinimumSize();
-    }
-
-    /**
-     * DEPRECATED
-     */
-    public Dimension minimumSize(int rows, int cols) {
-        return getMinimumSize(rows, cols);
-    }
-
-    /**
-     * DEPRECATED
-     */
-    public Dimension preferredSize(int rows, int cols) {
-        return getPreferredSize(rows, cols);
-    }
-
 }
diff --git a/jdk/src/windows/classes/sun/awt/windows/WTextComponentPeer.java b/jdk/src/windows/classes/sun/awt/windows/WTextComponentPeer.java
index 5d6207d..762672a 100644
--- a/jdk/src/windows/classes/sun/awt/windows/WTextComponentPeer.java
+++ b/jdk/src/windows/classes/sun/awt/windows/WTextComponentPeer.java
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 1996, 2001, 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
@@ -38,14 +38,20 @@
 
     // TextComponentPeer implementation
 
+    @Override
     public void setEditable(boolean editable) {
         enableEditing(editable);
         setBackground(((TextComponent)target).getBackground());
     }
+    @Override
     public native String getText();
-    public native void setText(String txt);
+    @Override
+    public native void setText(String text);
+    @Override
     public native int getSelectionStart();
+    @Override
     public native int getSelectionEnd();
+    @Override
     public native void select(int selStart, int selEnd);
 
     // Toolkit & peer internals
@@ -54,6 +60,7 @@
         super(target);
     }
 
+    @Override
     void initialize() {
         TextComponent tc = (TextComponent)target;
         String text = tc.getText();
@@ -64,14 +71,12 @@
         select(tc.getSelectionStart(), tc.getSelectionEnd());
         setEditable(tc.isEditable());
 
-//      oldSelectionStart = -1; // accessibility support
-//      oldSelectionEnd = -1;   // accessibility support
-
         super.initialize();
     }
 
     native void enableEditing(boolean e);
 
+    @Override
     public boolean isFocusable() {
         return true;
     }
@@ -81,6 +86,7 @@
      * unfortunately resets the selection, but seems to be the
      * only way to get this to work.
      */
+    @Override
     public void setCaretPosition(int pos) {
         select(pos,pos);
     }
@@ -89,6 +95,7 @@
      * Get the caret position by looking up the end of the current
      * selection.
      */
+    @Override
     public int getCaretPosition() {
         return getSelectionStart();
     }
@@ -105,34 +112,8 @@
      */
     private static native void initIDs();
 
-    // stub functions: to be fully implemented in a future release
-    public int getIndexAtPoint(int x, int y) { return -1; }
-    public Rectangle getCharacterBounds(int i) { return null; }
-    public long filterEvents(long mask) { return 0; }
-
+    @Override
     public boolean shouldClearRectBeforePaint() {
         return false;
     }
-
-//
-// Accessibility support
-//
-
-/*  To be fully implemented in a future release
-
-    int oldSelectionStart;
-    int oldSelectionEnd;
-
-    public native int getIndexAtPoint(int x, int y);
-    public native Rectangle getCharacterBounds(int i);
-    public native long filterEvents(long mask);
-
-    /**
-     * Handle a change in the text selection endpoints
-     * (Note: could be simply a change in the caret location)
-     *
-    public void selectionValuesChanged(int start, int end) {
-        return;  // Need to write implementation of this.
-    }
-*/
 }
diff --git a/jdk/src/windows/classes/sun/awt/windows/WTextFieldPeer.java b/jdk/src/windows/classes/sun/awt/windows/WTextFieldPeer.java
index 200ac2f..387fbfc 100644
--- a/jdk/src/windows/classes/sun/awt/windows/WTextFieldPeer.java
+++ b/jdk/src/windows/classes/sun/awt/windows/WTextFieldPeer.java
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 1996, 2006, 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
@@ -31,16 +31,18 @@
 import java.awt.event.KeyEvent;
 import java.awt.im.InputMethodRequests;
 
-class WTextFieldPeer extends WTextComponentPeer implements TextFieldPeer {
+final class WTextFieldPeer extends WTextComponentPeer implements TextFieldPeer {
 
     // WComponentPeer overrides
 
+    @Override
     public Dimension getMinimumSize() {
         FontMetrics fm = getFontMetrics(((TextField)target).getFont());
         return new Dimension(fm.stringWidth(getText()) + 24,
                              fm.getHeight() + 8);
     }
 
+    @Override
     public boolean handleJavaKeyEvent(KeyEvent e) {
         switch (e.getID()) {
            case KeyEvent.KEY_TYPED:
@@ -56,35 +58,35 @@
 
     // TextFieldPeer implementation
 
+    @Override
+    public native void setEchoChar(char echoChar);
 
-    /* This should eventually be a direct native method. */
-    public void setEchoChar(char c) {
-        setEchoCharacter(c);
-    }
-
+    @Override
     public Dimension getPreferredSize(int cols) {
         return getMinimumSize(cols);
     }
 
+    @Override
     public Dimension getMinimumSize(int cols) {
         FontMetrics fm = getFontMetrics(((TextField)target).getFont());
         return new Dimension(fm.charWidth('0') * cols + 24, fm.getHeight() + 8);
     }
 
+    @Override
     public InputMethodRequests getInputMethodRequests() {
-           return null;
+        return null;
     }
 
-
-
     // Toolkit & peer internals
 
     WTextFieldPeer(TextField target) {
         super(target);
     }
 
+    @Override
     native void create(WComponentPeer parent);
 
+    @Override
     void initialize() {
         TextField tf = (TextField)target;
         if (tf.echoCharIsSet()) {
@@ -92,33 +94,4 @@
         }
         super.initialize();
     }
-
-    // deprecated methods
-
-    /**
-     * DEPRECATED but, for now, called by setEchoChar(char).
-     */
-    public native void setEchoCharacter(char c);
-
-    /**
-     * DEPRECATED
-     */
-    public Dimension minimumSize() {
-        return getMinimumSize();
-    }
-
-    /**
-     * DEPRECATED
-     */
-    public Dimension minimumSize(int cols) {
-        return getMinimumSize(cols);
-    }
-
-    /**
-     * DEPRECATED
-     */
-    public Dimension preferredSize(int cols) {
-        return getPreferredSize(cols);
-    }
-
 }
diff --git a/jdk/src/windows/classes/sun/security/mscapi/SunMSCAPI.java b/jdk/src/windows/classes/sun/security/mscapi/SunMSCAPI.java
index 1af6694..7725b27 100644
--- a/jdk/src/windows/classes/sun/security/mscapi/SunMSCAPI.java
+++ b/jdk/src/windows/classes/sun/security/mscapi/SunMSCAPI.java
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2005, 2012, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2005, 2013, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -56,7 +56,7 @@
     }
 
     public SunMSCAPI() {
-        super("SunMSCAPI", 1.7d, INFO);
+        super("SunMSCAPI", 1.8d, INFO);
 
         // if there is no security manager installed, put directly into
         // the provider. Otherwise, create a temporary map and use a
diff --git a/jdk/src/windows/demo/jvmti/hprof/hprof_md.c b/jdk/src/windows/demo/jvmti/hprof/hprof_md.c
index 90e15ed..67cf2f6 100644
--- a/jdk/src/windows/demo/jvmti/hprof/hprof_md.c
+++ b/jdk/src/windows/demo/jvmti/hprof/hprof_md.c
@@ -82,9 +82,6 @@
     struct sockaddr_in s;
     int fd;
 
-    /* create a socket */
-    fd = (int)socket(AF_INET, SOCK_STREAM, 0);
-
     /* find remote host's addr from name */
     if ((hentry = gethostbyname(hostname)) == NULL) {
         return -1;
@@ -97,8 +94,15 @@
     s.sin_port = htons(port);
     s.sin_family = AF_INET;
 
+    /* create a socket */
+    fd = (int)socket(AF_INET, SOCK_STREAM, 0);
+    if (INVALID_SOCKET == fd) {
+        return 0;
+    }
+
     /* now try connecting */
-    if (-1 == connect(fd, (struct sockaddr*)&s, sizeof(s))) {
+    if (SOCKET_ERROR == connect(fd, (struct sockaddr*)&s, sizeof(s))) {
+        closesocket(fd);
         return 0;
     }
     return fd;
diff --git a/jdk/src/windows/native/sun/windows/awt_TextArea.cpp b/jdk/src/windows/native/sun/windows/awt_TextArea.cpp
index 829e03a..e37679e 100644
--- a/jdk/src/windows/native/sun/windows/awt_TextArea.cpp
+++ b/jdk/src/windows/native/sun/windows/awt_TextArea.cpp
@@ -767,11 +767,11 @@
 
 /*
  * Class:     sun_awt_windows_WTextAreaPeer
- * Method:    replaceText
+ * Method:    replaceRange
  * Signature: (Ljava/lang/String;II)V
  */
 JNIEXPORT void JNICALL
-Java_sun_awt_windows_WTextAreaPeer_replaceText(JNIEnv *env, jobject self,
+Java_sun_awt_windows_WTextAreaPeer_replaceRange(JNIEnv *env, jobject self,
                                                jstring text,
                                                jint start, jint end)
 {
@@ -791,19 +791,4 @@
 
     CATCH_BAD_ALLOC;
 }
-
-/*
- * Class:     sun_awt_windows_WTextAreaPeer
- * Method:    insertText
- * Signature: (Ljava/lang/String;I)V
- */
-JNIEXPORT void JNICALL
-Java_sun_awt_windows_WTextAreaPeer_insertText(JNIEnv *env, jobject self,
-                                              jstring text, jint pos)
-{
-    Java_sun_awt_windows_WTextAreaPeer_replaceText(env, self, text, pos, pos);
-}
-
 } /* extern "C" */
-
-
diff --git a/jdk/src/windows/native/sun/windows/awt_TextComponent.cpp b/jdk/src/windows/native/sun/windows/awt_TextComponent.cpp
index eddcbca..2475ad6 100644
--- a/jdk/src/windows/native/sun/windows/awt_TextComponent.cpp
+++ b/jdk/src/windows/native/sun/windows/awt_TextComponent.cpp
@@ -987,30 +987,6 @@
 // Accessibility support
 //
 
-/* To be fully implemented in a future release
- *
- * Class:     sun_awt_windows_WTextComponentPeer
- * Method:    getIndexAtPoint
- * Signature: (II)I
- *
-JNIEXPORT jlong JNICALL
-Java_sun_awt_windows_WTextComponentPeer_filterEvents(JNIEnv *env, jobject self, jlong mask)
-{
-    TRY;
-
-    PDATA pData;
-    JNI_CHECK_PEER_RETURN_NULL(self);
-    AwtTextComponent* c = (AwtTextComponent*)pData;
-
-    jlong oldMask = c->javaEventsMask;
-    c->javaEventsMask = mask;
-
-    return oldMask;
-
-    CATCH_BAD_ALLOC_RET(0);
-}
-*/
-
 // [[[FIXME]]] need to switch to rich edit field; look for EN_SELCHANGE event instead
 /*
  * Handle WmKeyDown to catch keystrokes which may move the caret,
@@ -1051,112 +1027,4 @@
     return AwtComponent::WmKeyDown(wkey, repCnt, flags, system);
 }
 */
-
-/* To be fully implemented in a future release
- *
- * Class:     sun_awt_windows_WTextComponentPeer
- * Method:    getIndexAtPoint
- * Signature: (II)I
- *
-JNIEXPORT jint JNICALL
-Java_sun_awt_windows_WTextComponentPeer_getIndexAtPoint(JNIEnv *env, jobject self, jint x, jint y)
-{
-    TRY;
-
-    PDATA pData;
-//    JNI_CHECK_PEER_RETURN_VAL(self, -1);   [[[FIXME]]] Peter Korn -> should return -1 here
-    JNI_CHECK_PEER_RETURN_NULL(self);
-    AwtTextComponent* c = (AwtTextComponent*)pData;
-    int indicies = c->SendMessage(EM_CHARFROMPOS, (WPARAM) 0, (LPARAM) MAKELPARAM(x, y));
-    int index = LOWORD(indicies);   // index into the line the (x,y) coord is on
-    int lineIndex = c->SendMessage(EM_LINEINDEX, HIWORD(indicies));  // index of start of line
-    return (index + lineIndex);
-
-    CATCH_BAD_ALLOC_RET(-1);
-}
-*/
-
-/* To be fully implemented in a future release
- *
- * Class:     sun_awt_windows_WTextComponentPeer
- * Method:    getCharacterBounds
- * Signature: (I)Ljava/awt/Rectangle;
- *
-JNIEXPORT jobject JNICALL
-Java_sun_awt_windows_WTextComponentPeer_getCharacterBounds(JNIEnv *env, jobject self, jint i)
-{
-
-    //  loop through lines with EM_LINELENGTH?  e.g.:
-    //     line = 0; ttl = 0;   // index is passed in as 'i' above
-    //     while (ttl < index) {
-    //        ttl += SendMessage(EM_LINELENGTH, line++);
-    //     }
-    //     line-- (decrement back again)
-    //  alternately, we could use EM_LINEINDEX to the same effect; perhaps slightly cleaner:
-    //     computedIndex = 0; line = 0;
-    //     while (computedIndex < index) {
-    //        computedIndex = SendMessage(EM_LINEINDEX, 1 + line++);
-    //     }
-    //     line--;
-
-    // EM_POSFROMCHAR  - convert char index into a Point
-    // wParam = (LPPOINT) lpPoint;        // address of structure
-                                                  // receiving character position
-    // lParam = (LPARAM) wCharIndex;      // zero-based index of character
-    //
-    // still need to turn the above into a Rect somehow...
-    // (use font metrics on font info for letter to get height?  use
-    // getLineHeight type of message?).
-
-    // WM_GETFONT - get the font struct for the window control
-    // wParam = lParam = 0
-    // returns an HFONT
-    //  -or-
-    // GetTextMetrics(hDC) to get the text info for the font selected
-    // into the hDC of the control (tmHeight is what we want in the
-    // TEXTMETRIC struct).
-    // also GetCharWidth32() with the char at the index in question to get
-    // the width of that char
-    // *** Can't use GetTextMetrics/GetCharWidth32, as we don't have an hDC!! ***
-
-    TRY;
-
-    PDATA pData;
-    JNI_CHECK_PEER_RETURN_NULL(self);
-    AwtComponent* c = (AwtComponent*)pData;
-/*
-    int line = 0;
-    int lineIndex = 0;
-    while (lineIndex < i) {
-        lineIndex = c->SendMessage(EM_LINEINDEX, 1 + line++);
-    }
-    line--;     // line is now the line which contains our character at position 'i'
-    int offsetIndex = i - lineIndex;    // offsetIndex is now distance in on the line
-* /
-    POINT p;
-
-    c->SendMessage(EM_POSFROMCHAR, (WPARAM) &p, (LPARAM) i);    // x coord is meaningful; y may not be
-
-    // need to calculate charWidth, charHeight, and set p.y to something meangful
-
-    jint charWidth;
-    jint charHeight;
-
-/*
-    HFONT font = c->SendMessage(WM_GETFONT);
-    if (GetCharWidth32(c->hdc, i, i, &charWidth) != 0) {        // [[[FIXME]]] need to get hDC!
-
-        JNIEnv *env = (JNIEnv *)JNU_GetEnv(jvm, JNI_VERSION_1_2);
-        jobject rect = JNU_NewObjectByName(env, "java/awt/Rectangle", "(IIII)V",
-                                           (jint) p.x, (jint) p.y, charWidth, charHeight);
-
-        return rect;
-    }
-* /
-    return (jobject) 0;
-
-    CATCH_BAD_ALLOC_RET(0);
-}
-*/
-
 } /* extern "C" */
diff --git a/jdk/src/windows/native/sun/windows/awt_TextField.cpp b/jdk/src/windows/native/sun/windows/awt_TextField.cpp
index 6ed120d..e5afa40 100644
--- a/jdk/src/windows/native/sun/windows/awt_TextField.cpp
+++ b/jdk/src/windows/native/sun/windows/awt_TextField.cpp
@@ -316,12 +316,12 @@
 
 /*
  * Class:     sun_awt_windows_WTextFieldPeer
- * Method:    setEchoCharacter
+ * Method:    setEchoChar
  * Signature: (C)V
  */
 JNIEXPORT void JNICALL
-Java_sun_awt_windows_WTextFieldPeer_setEchoCharacter(JNIEnv *env, jobject self,
-                                                     jchar ch)
+Java_sun_awt_windows_WTextFieldPeer_setEchoChar(JNIEnv *env, jobject self,
+                                                jchar ch)
 {
     TRY;
 
diff --git a/jdk/src/windows/native/sun/windows/awt_Toolkit.cpp b/jdk/src/windows/native/sun/windows/awt_Toolkit.cpp
index cdb5247..ba8d6de 100644
--- a/jdk/src/windows/native/sun/windows/awt_Toolkit.cpp
+++ b/jdk/src/windows/native/sun/windows/awt_Toolkit.cpp
@@ -1516,10 +1516,19 @@
      * the mouse, not the Component with the input focus.
      */
 
-    if (msg.message == WM_MOUSEWHEEL &&
-        AwtToolkit::MainThread() == ::GetWindowThreadProcessId(hWndForWheel, NULL)) {
+    if (msg.message == WM_MOUSEWHEEL) {
             //i.e. mouse is over client area for this window
-            msg.hwnd = hWndForWheel;
+            DWORD hWndForWheelProcess;
+            DWORD hWndForWheelThread = ::GetWindowThreadProcessId(hWndForWheel, &hWndForWheelProcess);
+            if (::GetCurrentProcessId() == hWndForWheelProcess) {
+                if (AwtToolkit::MainThread() == hWndForWheelThread) {
+                    msg.hwnd = hWndForWheel;
+                } else {
+                    // Interop mode, redispatch the event to another toolkit.
+                    ::SendMessage(hWndForWheel, msg.message, mouseWParam, mouseLParam);
+                    return TRUE;
+                }
+            }
     }
 
     /*
diff --git a/jdk/test/ProblemList.txt b/jdk/test/ProblemList.txt
index 90ac26d..484fbc7 100644
--- a/jdk/test/ProblemList.txt
+++ b/jdk/test/ProblemList.txt
@@ -134,6 +134,9 @@
 # 8021230
 java/lang/ThreadLocal/ThreadLocalSupplierTest.java              generic-all
 
+# 8023201
+java/lang/instrument/RetransformBigClass.sh                     generic-all
+java/lang/instrument/RedefineBigClass.sh                        generic-all
 
 ############################################################################
 
@@ -163,9 +166,6 @@
 # 7027502
 demo/jvmti/hprof/MonitorTest.java                               generic-all
 
-# 8021186
-jdk/lambda/vm/DefaultMethodsTest.java                           generic-all 
-
 # 8024423 - JVMTI: GetLoadedClasses doesn't enumerate anonymous classes 
 demo/jvmti/hprof/HeapAllTest.java                               generic-all
 demo/jvmti/hprof/HeapBinaryFormatTest.java                      generic-all
@@ -322,6 +322,18 @@
 # 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
diff --git a/jdk/test/java/awt/Frame/MaximizedToMaximized/MaximizedToMaximized.java b/jdk/test/java/awt/Frame/MaximizedToMaximized/MaximizedToMaximized.java
new file mode 100644
index 0000000..83fcfa1
--- /dev/null
+++ b/jdk/test/java/awt/Frame/MaximizedToMaximized/MaximizedToMaximized.java
@@ -0,0 +1,76 @@
+/*
+ * 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.awt.Dimension;
+import java.awt.Frame;
+import java.awt.GraphicsDevice;
+import java.awt.GraphicsEnvironment;
+import java.awt.Insets;
+import java.awt.Rectangle;
+import java.awt.Toolkit;
+import sun.awt.SunToolkit;
+
+/**
+ * @test
+ * @bug 8007219
+ * @author Alexander Scherbatiy
+ * @summary Frame size reverts meaning of maximized attribute
+ * @run main MaximizedToMaximized
+ */
+public class MaximizedToMaximized {
+
+    public static void main(String[] args) throws Exception {
+
+       Frame frame = new Frame();
+        final Toolkit toolkit = Toolkit.getDefaultToolkit();
+        final GraphicsEnvironment graphicsEnvironment =
+                GraphicsEnvironment.getLocalGraphicsEnvironment();
+        final GraphicsDevice graphicsDevice =
+                graphicsEnvironment.getDefaultScreenDevice();
+
+        final Dimension screenSize = toolkit.getScreenSize();
+        final Insets screenInsets = toolkit.getScreenInsets(
+                graphicsDevice.getDefaultConfiguration());
+
+        final Rectangle availableScreenBounds = new Rectangle(screenSize);
+
+        availableScreenBounds.x += screenInsets.left;
+        availableScreenBounds.y += screenInsets.top;
+        availableScreenBounds.width -= (screenInsets.left + screenInsets.right);
+        availableScreenBounds.height -= (screenInsets.top + screenInsets.bottom);
+
+        frame.setBounds(availableScreenBounds.x, availableScreenBounds.y,
+                availableScreenBounds.width, availableScreenBounds.height);
+        frame.setVisible(true);
+
+        Rectangle frameBounds = frame.getBounds();
+        frame.setExtendedState(Frame.MAXIMIZED_BOTH);
+        ((SunToolkit) toolkit).realSync();
+
+        Rectangle maximizedFrameBounds = frame.getBounds();
+        if (maximizedFrameBounds.width < frameBounds.width
+                || maximizedFrameBounds.height < frameBounds.height) {
+            throw new RuntimeException("Maximized frame is smaller than non maximized");
+        }
+    }
+}
diff --git a/jdk/test/java/awt/Graphics/LineClipTest.java b/jdk/test/java/awt/Graphics/LineClipTest.java
new file mode 100644
index 0000000..43410f9
--- /dev/null
+++ b/jdk/test/java/awt/Graphics/LineClipTest.java
@@ -0,0 +1,504 @@
+/*
+ * Copyright (c) 2002, Oracle and/or its affiliates. All rights reserved.
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * This code is free software; you can redistribute 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   4780022 4862193 7179526
+ * @summary  Tests that clipped lines are drawn over the same pixels
+ * as unclipped lines (within the clip bounds)
+ * @run main/timeout=600/othervm -Dsun.java2d.ddforcevram=true LineClipTest
+ * @run main/timeout=600/othervm LineClipTest
+ */
+
+
+/**
+ * This app tests whether we are drawing clipped lines the same
+ * as unclipped lines.  The problem occurred when we started
+ * clipping d3d lines using simple integer clipping, which did not
+ * account for sub-pixel precision and ended up drawing very different
+ * pixels than the same line drawn unclipped.  A supposed fix
+ * to that problem used floating-point clipping instead, but there
+ * was some problem with very limited precision inside of d3d
+ * (presumably in hardware) that caused some variation in pixels.
+ * We decided that whatever the fix was, we needed a serious
+ * line check test to make sure that all kinds of different
+ * lines would be drawn exactly the same inside the clip area,
+ * regardless of whether clipping was enabled.  This test should
+ * check all kinds of different cases, such as lines that fall
+ * completely outside, completely inside, start outside and
+ * end inside, etc., and lines should end and originate in
+ * all quadrants of the space divided up by the clip box.
+ *
+ * The test works as follows:
+ * We create nine quadrants using the spaces bisected by the
+ * edges of the clip bounds (note that only one of these
+ * quadrants is actually visible when clipping is enabled).
+ * We create several points in each of these quadrants
+ * (three in each of the invisible quadrants, nine in the
+ * center/visible quadrant).  Our resulting grid looks like
+ * this:
+ *
+ *  x         x|x    x    x|x         x
+ *             |           |
+ *             |           |
+ *             |           |
+ *             |           |
+ *             |           |
+ *  x          |           |          x
+ *  -----------------------------------
+ *  x          |x    x    x|          x
+ *             |           |
+ *             |           |
+ *  x          |x    x    x|          x
+ *             |           |
+ *             |           |
+ *  x          |x    x    x|          x
+ *  -----------------------------------
+ *  x          |           |          x
+ *             |           |
+ *             |           |
+ *             |           |
+ *             |           |
+ *             |           |
+ *  x         x|x    x    x|x         x
+ *
+ * The test then draws lines from every point to every other
+ * point.  First, we draw unclipped lines in blue and
+ * then we draw clipped lines in red.
+ * At certain times (after every point during the default
+ * test, after every quadrant of lines if you run with the -quick
+ * option), we check for errors and draw the current image
+ * to the screen.  Error checking consists of copying the
+ * VolatileImage to a BufferedImage (because we need access
+ * to the pixels directly) and checking every pixel in the
+ * image.  The check is simple: everything outside the
+ * clip bounds should be blue (or the background color) and
+ * everything inside the clip bounds should be red (or the
+ * background color).  So any blue pixel inside or red
+ * pixel outside means that there was a drawing error and
+ * the test fails.
+ * There are 4 modes that the test can run in (dynamic mode is
+ * exclusive to the other modes, but the other modes are combinable):
+ *
+ *      (default): the clip is set
+ *      to a default size (100x100) and the test is run.
+ *
+ *      -quick: The error
+ *      check is run only after every quadrant of lines is
+ *      drawn.  This speeds up the test considerably with
+ *      some less accuracy in error checking (because pixels
+ *      from some lines may overdrawn pixels from other lines
+ *      before we have verified the correctness of those
+ *      pixels).
+ *
+ *      -dynamic: There is no error checking, but this version
+ *      of the test automatically resizes the clip bounds and
+ *      reruns the test over and over.  Nothing besides the
+ *      visual check verifies that the test is running correctly.
+ *
+ *      -rect: Instead of drawing lines, the test draws rectangles
+ *      to/from all points in all quadrants.  This tests similar
+ *      clipping functionality for drawRect().
+ *
+ *      n (where "n" is a number): sets the clip size to the
+ *      given value.  Just like the default test except that
+ *      the clip size is as specified.
+ *
+ * Note: this test must be run with the -Dsun.java2d.ddforcevram=true
+ * option to force the test image to stay in VRAM.  We currently
+ * punt VRAM images to system memory when we detect lots of
+ * reads.  Since we read the whole buffer on every error check
+ * to copy it to the BufferedImage), this causes us to punt the
+ * buffer.  A system memory surface will have no d3d capabilities,
+ * thus we are not testing the d3d line quality when this happens.
+ * By using the ddforcevram flag, we make sure the buffer
+ * stays put in VRAM and d3d is used to draw the lines.
+ */
+
+import javax.swing.*;
+import java.awt.*;
+import java.awt.image.*;
+
+
+public class LineClipTest extends Component implements Runnable {
+
+    int clipBumpVal = 5;
+    static int clipSize = 100;
+    int clipX1;
+    int clipY1;
+    static final int NUM_QUADS = 9;
+    Point quadrants[][] = new Point[NUM_QUADS][];
+    static boolean dynamic = false;
+    BufferedImage imageChecker = null;
+    Color unclippedColor = Color.blue;
+    Color clippedColor = Color.red;
+    int testW = -1, testH = -1;
+    VolatileImage testImage = null;
+    static boolean keepRunning = false;
+    static boolean quickTest = false;
+    static boolean rectTest = false;
+    static boolean runTestDone = false;
+    static Frame f = null;
+
+    /**
+     * Check for errors in the grid.  This error check consists of
+     * copying the buffer into a BufferedImage and reading all pixels
+     * in that image.  No pixel outside the clip bounds should be
+     * of the color clippedColor and no pixel inside should be
+     * of the color unclippedColor.  Any wrong color returns an error.
+     */
+    boolean gridError(Graphics g) {
+        boolean error = false;
+        if (imageChecker == null || (imageChecker.getWidth() != testW) ||
+            (imageChecker.getHeight() != testH))
+        {
+            // Recreate BufferedImage as necessary
+            GraphicsConfiguration gc = getGraphicsConfiguration();
+            ColorModel cm = gc.getColorModel();
+            WritableRaster wr =
+                cm.createCompatibleWritableRaster(getWidth(), getHeight());
+            imageChecker =
+                new BufferedImage(cm, wr,
+                                  cm.isAlphaPremultiplied(), null);
+        }
+        // Copy buffer to BufferedImage
+        Graphics gChecker = imageChecker.getGraphics();
+        gChecker.drawImage(testImage, 0, 0, this);
+
+        // Set up pixel colors to check against
+        int clippedPixelColor = clippedColor.getRGB();
+        int unclippedPixelColor = unclippedColor.getRGB();
+        int wrongPixelColor = clippedPixelColor;
+        boolean insideClip = false;
+        for (int row = 0; row < getHeight(); ++row) {
+            for (int col = 0; col < getWidth(); ++col) {
+                if (row >= clipY1 && row < (clipY1 + clipSize) &&
+                    col >= clipX1 && col < (clipX1 + clipSize))
+                {
+                    // Inside clip bounds - should not see unclipped color
+                    wrongPixelColor = unclippedPixelColor;
+                } else {
+                    // Outside clip - should not see clipped color
+                    wrongPixelColor = clippedPixelColor;
+                }
+                int pixel = imageChecker.getRGB(col, row);
+                if (pixel == wrongPixelColor) {
+                    System.out.println("FAILED: pixel = " +
+                                       Integer.toHexString(pixel) +
+                                       " at (x, y) = " + col + ", " + row);
+                    // Draw magenta rectangle around problem pixel in buffer
+                    // for visual feedback to user
+                    g.setColor(Color.magenta);
+                    g.drawRect(col - 1, row - 1, 2, 2);
+                    error = true;
+                }
+            }
+        }
+        return error;
+    }
+
+    /**
+     * Draw all test lines and check for errors (unless running
+     * with -dynamic option)
+     */
+    void drawLineGrid(Graphics screenGraphics, Graphics g) {
+        // Fill buffer with background color
+        g.setColor(Color.white);
+        g.fillRect(0, 0, getWidth(), getHeight());
+
+        // Now, iterate through all quadrants
+        for (int srcQuad = 0; srcQuad < NUM_QUADS; ++srcQuad) {
+            // Draw lines to all other quadrants
+            for (int dstQuad = 0; dstQuad < NUM_QUADS; ++dstQuad) {
+                for (int srcPoint = 0;
+                     srcPoint < quadrants[srcQuad].length;
+                     ++srcPoint)
+                {
+                    // For every point in the source quadrant
+                    int sx = quadrants[srcQuad][srcPoint].x;
+                    int sy = quadrants[srcQuad][srcPoint].y;
+                    for (int dstPoint = 0;
+                         dstPoint < quadrants[dstQuad].length;
+                         ++dstPoint)
+                    {
+                        int dx = quadrants[dstQuad][dstPoint].x;
+                        int dy = quadrants[dstQuad][dstPoint].y;
+                        if (!rectTest) {
+                            // Draw unclipped/clipped lines to every
+                            // point in the dst quadrant
+                            g.setColor(unclippedColor);
+                            g.drawLine(sx, sy, dx, dy);
+                            g.setClip(clipX1, clipY1, clipSize, clipSize);
+                            g.setColor(clippedColor);
+                            g.drawLine(sx,sy, dx, dy);
+                        } else {
+                            // Draw unclipped/clipped rectangles to every
+                            // point in the dst quadrant
+                            g.setColor(unclippedColor);
+                            int w = dx - sx;
+                            int h = dy - sy;
+                            g.drawRect(sx, sy, w, h);
+                            g.setClip(clipX1, clipY1, clipSize, clipSize);
+                            g.setColor(clippedColor);
+                            g.drawRect(sx, sy, w, h);
+                        }
+                        g.setClip(null);
+                    }
+                    if (!dynamic) {
+                        // Draw screen update for visual feedback
+                        screenGraphics.drawImage(testImage, 0, 0, this);
+                        // On default test, check for errors after every
+                        // src point
+                        if (!quickTest && gridError(g)) {
+                            throw new java.lang.RuntimeException("Failed");
+                        }
+                    }
+                }
+            }
+            if (!dynamic && quickTest && gridError(g)) {
+                // On quick test, check for errors only after every
+                // src quadrant
+                throw new java.lang.RuntimeException("Failed");
+                //return;
+            }
+        }
+        if (!dynamic) {
+            System.out.println("PASSED");
+            if (!keepRunning) {
+                f.dispose();
+            }
+        }
+    }
+
+    /**
+     * If we have not yet run the test, or if the window size has
+     * changed, or if we are running the test in -dynamic mode,
+     * run the test.  Then draw the test buffer to the screen
+     */
+    public void paint(Graphics g) {
+        if (dynamic || testImage == null ||
+            getWidth() != testW || getHeight() != testH)
+        {
+            runTest(g);
+        }
+        if (testImage != null) {
+            g.drawImage(testImage, 0, 0, this);
+        }
+    }
+
+    /*
+     * Create the quadrant of points and run the test to draw all the lines
+     */
+    public void runTest(Graphics screenGraphics) {
+        if (getWidth() == 0 || getHeight() == 0) {
+            // May get here before window is really ready
+            return;
+        }
+        clipX1 = (getWidth() - clipSize) / 2;
+        clipY1 = (getHeight() - clipSize) / 2;
+        int clipX2 = clipX1 + clipSize;
+        int clipY2 = clipY1 + clipSize;
+        int centerX = getWidth()/2;
+        int centerY = getHeight()/2;
+        int leftX = 0;
+        int topY = 0;
+        int rightX = getWidth() - 1;
+        int bottomY = getHeight() - 1;
+        int quadIndex = 0;
+        // Offsets are used to force diagonal (versus hor/vert) lines
+        int xOffset = 0;
+        int yOffset = 0;
+
+        if (quadrants[0] == null) {
+            for (int i = 0; i < 9; ++i) {
+                int numPoints = (i == 4) ? 9 : 3;
+                quadrants[i] = new Point[numPoints];
+            }
+        }
+        // Upper-left
+        quadrants[quadIndex] = new Point[] {
+            new Point(leftX + xOffset,          clipY1 - 1 - yOffset),
+            new Point(leftX + xOffset,          topY + yOffset),
+            new Point(clipX1 - 1 - xOffset,     topY + yOffset),
+        };
+
+        quadIndex++;
+        yOffset++;
+        // Upper-middle
+        quadrants[quadIndex] = new Point[] {
+            new Point(clipX1 + 1 + xOffset,     topY + yOffset),
+            new Point(centerX + xOffset,        topY + yOffset),
+            new Point(clipX2 - 1 - xOffset,     topY + yOffset),
+        };
+
+        quadIndex++;
+        ++yOffset;
+        // Upper-right
+        quadrants[quadIndex] = new Point[] {
+            new Point(clipX2 + 1 + xOffset,     topY + yOffset),
+            new Point(rightX - xOffset,         topY + yOffset),
+            new Point(rightX - xOffset,         clipY1 - 1 - yOffset),
+        };
+
+        quadIndex++;
+        yOffset = 0;
+        ++xOffset;
+        // Middle-left
+        quadrants[quadIndex] = new Point[] {
+            new Point(leftX + xOffset,          clipY1 + 1 + yOffset),
+            new Point(leftX + xOffset,          centerY + yOffset),
+            new Point(leftX + xOffset,          clipY2 - 1 - yOffset),
+        };
+
+        quadIndex++;
+        ++yOffset;
+        // Middle-middle
+        quadrants[quadIndex] = new Point[] {
+            new Point(clipX1 + 1 + xOffset,     clipY1 + 1 + yOffset),
+            new Point(centerX + xOffset,        clipY1 + 1 + yOffset),
+            new Point(clipX2 - 1 - xOffset,     clipY1 + 1 + yOffset),
+            new Point(clipX1 + 1 + xOffset,     centerY + yOffset),
+            new Point(centerX + xOffset,        centerY + yOffset),
+            new Point(clipX2 - 1 - xOffset,     centerY + yOffset),
+            new Point(clipX1 + 1 + xOffset,     clipY2 - 1 - yOffset),
+            new Point(centerX + xOffset,        clipY2 - 1 - yOffset),
+            new Point(clipX2 - 1 - xOffset,     clipY2 - 1 - yOffset),
+        };
+
+        quadIndex++;
+        ++yOffset;
+        // Middle-right
+        quadrants[quadIndex] = new Point[] {
+            new Point(rightX - xOffset,         clipY1 + 1 + yOffset),
+            new Point(rightX - xOffset,         centerY + yOffset),
+            new Point(rightX - xOffset,         clipY2 - 1 - yOffset),
+        };
+
+        quadIndex++;
+        yOffset = 0;
+        ++xOffset;
+        // Lower-left
+        quadrants[quadIndex] = new Point[] {
+            new Point(leftX + xOffset,          clipY2 + 1 + yOffset),
+            new Point(leftX + xOffset,          bottomY - yOffset),
+            new Point(clipX1 - 1 - xOffset,     bottomY - yOffset),
+        };
+
+        quadIndex++;
+        ++yOffset;
+        // Lower-middle
+        quadrants[quadIndex] = new Point[] {
+            new Point(clipX1 + 1 + xOffset,     bottomY - yOffset),
+            new Point(centerX + xOffset,        bottomY - yOffset),
+            new Point(clipX2 - 1 - xOffset,     bottomY - yOffset),
+        };
+
+        quadIndex++;
+        ++yOffset;
+        // Lower-right
+        quadrants[quadIndex] = new Point[] {
+            new Point(clipX2 + 1 + xOffset,     bottomY - yOffset),
+            new Point(rightX - xOffset,         bottomY - yOffset),
+            new Point(rightX - xOffset,         clipY2 + 1 + yOffset),
+        };
+
+
+        if (testImage != null) {
+            testImage.flush();
+        }
+        testW = getWidth();
+        testH = getHeight();
+        testImage = createVolatileImage(testW, testH);
+        Graphics g = testImage.getGraphics();
+        do {
+            int valCode = testImage.validate(getGraphicsConfiguration());
+            if (valCode == VolatileImage.IMAGE_INCOMPATIBLE) {
+                testImage.flush();
+                testImage = createVolatileImage(testW, testH);
+                g = testImage.getGraphics();
+            }
+            drawLineGrid(screenGraphics, g);
+        } while (testImage.contentsLost());
+        if (dynamic) {
+            // Draw clip box if dynamic
+            g.setClip(null);
+            g.setColor(Color.black);
+            g.drawRect(clipX1, clipY1, clipSize, clipSize);
+            screenGraphics.drawImage(testImage, 0, 0, this);
+        }
+        runTestDone = true;
+    }
+
+    /**
+     * When running -dynamic, resize the clip bounds and run the test
+     * over and over
+     */
+    public void run() {
+        while (true) {
+            clipSize += clipBumpVal;
+            if (clipSize > getWidth() || clipSize < 0) {
+                clipBumpVal = -clipBumpVal;
+                clipSize += clipBumpVal;
+            }
+            update(getGraphics());
+            try {
+                Thread.sleep(50);
+            } catch (Exception e) {}
+        }
+    }
+
+    public static void main(String args[]) {
+        for (int i = 0; i < args.length; ++i) {
+            if (args[i].equals("-dynamic")) {
+                dynamic = true;
+            } else if (args[i].equals("-rect")) {
+                rectTest = true;
+            } else if (args[i].equals("-quick")) {
+                quickTest = true;
+            } else if (args[i].equals("-keep")) {
+                keepRunning = true;
+            } else {
+                // could be clipSize
+                try {
+                    clipSize = Integer.parseInt(args[i]);
+                } catch (Exception e) {}
+            }
+        }
+        f = new Frame();
+        f.setSize(500, 500);
+        LineClipTest test = new LineClipTest();
+        f.add(test);
+        if (dynamic) {
+            Thread t = new Thread(test);
+            t.start();
+        }
+        f.setVisible(true);
+        while (!runTestDone) {
+            // need to make sure jtreg doesn't exit before the
+            // test is done...
+            try {
+                Thread.sleep(50);
+            } catch (Exception e) {}
+        }
+    }
+}
diff --git a/jdk/test/java/awt/InputMethods/InputMethodsTest/InputMethodsTest.html b/jdk/test/java/awt/InputMethods/InputMethodsTest/InputMethodsTest.html
new file mode 100644
index 0000000..b92e6c7
--- /dev/null
+++ b/jdk/test/java/awt/InputMethods/InputMethodsTest/InputMethodsTest.html
@@ -0,0 +1,17 @@
+<html>
+<head>
+<title> InputMethodsTest </title>
+</head>
+<body>
+<applet code="InputMethodsTest.class" width=350 height=200></applet>
+
+This test is for Linux only. For other platforms please simply push "Pass".
+
+Test run requires some Japanese input method to be installed.
+
+To test JDK-7146572 fix please perform the following steps:
+1. Switch on input method and type Japanese in the above text fields.
+2. Push "Disable Input Methods" button.
+3. Try to type Japanese again. If it can be done then the test is failed; otherwise passed.
+</body>
+</html>
diff --git a/jdk/test/java/awt/InputMethods/InputMethodsTest/InputMethodsTest.java b/jdk/test/java/awt/InputMethods/InputMethodsTest/InputMethodsTest.java
new file mode 100644
index 0000000..a5665c9
--- /dev/null
+++ b/jdk/test/java/awt/InputMethods/InputMethodsTest/InputMethodsTest.java
@@ -0,0 +1,90 @@
+/*
+ * 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 7146572 8024122
+  @summary Check if 'enableInputMethods' works properly for TextArea and TextField on Linux platform
+  @author a.stepanov
+  @run applet/manual=yesno InputMethodsTest.html
+*/
+
+
+import java.applet.Applet;
+import java.awt.*;
+import javax.swing.*;
+import java.awt.event.*;
+
+
+public class InputMethodsTest extends Applet {
+
+    TextArea txtArea = null;
+    TextField txtField = null;
+    JButton btnIM = null;
+    boolean inputMethodsEnabled = true;
+
+    public void init() {
+        this.setLayout(new BorderLayout());
+    }
+
+    public void start() {
+
+        setSize(350, 200);
+
+        JPanel panel = new JPanel();
+        panel.setLayout(new GridLayout(2, 1));
+
+        txtArea = new TextArea();
+        panel.add(txtArea);
+
+        txtField = new TextField();
+        panel.add(txtField);
+
+        add(panel, BorderLayout.CENTER);
+
+        btnIM = new JButton();
+        setBtnText();
+
+        btnIM.addActionListener(new ActionListener() {
+            @Override
+            public void actionPerformed(ActionEvent e) {
+                inputMethodsEnabled = !inputMethodsEnabled;
+                setBtnText();
+                txtArea.enableInputMethods(inputMethodsEnabled);
+                txtField.enableInputMethods(inputMethodsEnabled);
+            }
+        });
+
+        add(btnIM, BorderLayout.SOUTH);
+
+        validate();
+        setVisible(true);
+    }
+
+    private void setBtnText() {
+        String s = inputMethodsEnabled ? "Disable" : "Enable";
+        btnIM.setText(s +  " Input Methods");
+    }
+}
+
diff --git a/jdk/test/java/awt/List/NofocusListDblClickTest/NofocusListDblClickTest.java b/jdk/test/java/awt/List/NofocusListDblClickTest/NofocusListDblClickTest.java
new file mode 100644
index 0000000..6215ccb
--- /dev/null
+++ b/jdk/test/java/awt/List/NofocusListDblClickTest/NofocusListDblClickTest.java
@@ -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       6240202
+  @summary   Tests that non-focusable List in a Window generates ActionEvent.
+  @author    anton.tarasov@sun.com: area=awt-list
+  @run       main NofocusListDblClickTest
+*/
+
+import java.awt.*;
+import java.awt.event.*;
+import java.util.concurrent.atomic.AtomicInteger;
+import javax.swing.SwingUtilities;
+import sun.awt.SunToolkit;
+
+public class NofocusListDblClickTest {
+    static final int EXPECTED_ACTION_COUNT = 2;
+    static Robot robot;
+    static final AtomicInteger actionPerformed = new AtomicInteger(0);
+    static List lst;
+    private static final SunToolkit toolkit = (SunToolkit) Toolkit.getDefaultToolkit();
+
+    public static void main(String[] args) throws Exception {
+        SwingUtilities.invokeAndWait(new Runnable() {
+            public void run() {
+                createAndShowGUI();
+            }
+        });
+        toolkit.realSync();
+        Thread.sleep(1000);
+
+        robot = new Robot();
+        robot.setAutoDelay(50);
+        // ACTION_PERFORMED event happens only on even clicks
+        clickTwiceOn(lst);
+        Thread.sleep(500);
+        clickTwiceOn(lst);
+        toolkit.realSync();
+        Thread.sleep(1000);
+
+        synchronized (actionPerformed) {
+            if (actionPerformed.get() != EXPECTED_ACTION_COUNT) {
+                try {
+                    actionPerformed.wait(3000);
+                } catch (InterruptedException e) {
+                    System.out.println("Interrupted unexpectedly!");
+                    throw new RuntimeException(e);
+                }
+            }
+        }
+
+        if (actionPerformed.get() != EXPECTED_ACTION_COUNT) {
+            System.out.println("No ActionEvent was generated. " + actionPerformed.get());
+            throw new RuntimeException("Test failed!");
+        }
+
+        System.out.println("Test passed.");
+    }
+
+    public static void createAndShowGUI() {
+        Frame f = new Frame("Owner");
+        Window w = new Window(f);
+        lst = new List(3, true);
+        //this.setLayout (new BorderLayout ());
+        f.setBounds(800, 0, 100, 100);
+        w.setLocation(800, 150);
+
+        lst.add("item 0");
+        lst.add("item 1");
+        lst.add("item 2");
+
+        lst.setFocusable(false);
+
+        lst.addActionListener(new ActionListener() {
+                public void actionPerformed(ActionEvent e) {
+                    System.out.println(e.toString());
+                    synchronized (actionPerformed) {
+                        if (EXPECTED_ACTION_COUNT == actionPerformed.incrementAndGet()) {
+                            actionPerformed.notifyAll();
+                        }
+                    }
+                }
+            });
+
+        w.add(lst);
+        w.pack();
+
+        f.setVisible(true);
+        w.setVisible(true);
+    }
+
+    static void clickTwiceOn(Component c) throws Exception {
+        Point p = c.getLocationOnScreen();
+        Dimension d = c.getSize();
+
+        if (c instanceof Frame) {
+            robot.mouseMove(p.x + (int)(d.getWidth()/2), p.y + ((Frame)c).getInsets().top/2);
+        } else {
+            robot.mouseMove(p.x + (int)(d.getWidth()/2), p.y + (int)(d.getHeight()/2));
+        }
+
+        robot.mousePress(InputEvent.BUTTON1_MASK);
+        robot.mouseRelease(InputEvent.BUTTON1_MASK);
+        Thread.sleep(20);
+        robot.mousePress(InputEvent.BUTTON1_MASK);
+        robot.mouseRelease(InputEvent.BUTTON1_MASK);
+    }
+}
diff --git a/jdk/test/java/awt/TextArea/SelectionVisible/SelectionVisible.html b/jdk/test/java/awt/TextArea/SelectionVisible/SelectionVisible.html
new file mode 100644
index 0000000..efa092b
--- /dev/null
+++ b/jdk/test/java/awt/TextArea/SelectionVisible/SelectionVisible.html
@@ -0,0 +1,42 @@
+<html>
+<!--
+ 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
+ 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 4082144 7150100
+  @summary  Ensures that TextArea.select() works when called 
+            before setVisible() 
+  @author Eric.Hawkes: area=TextComponent
+  @run applet/manual=yesno SelectionVisible.html
+  -->
+<head>
+<title> SelectionVisible </title>
+</head>
+<body>
+
+<h1> SelectionVisible<br> Bugid: 4082144 </h1>
+
+<APPLET CODE="SelectionVisible.class" WIDTH=400 HEIGHT=160></APPLET>
+</body>
+</html>
diff --git a/jdk/test/java/awt/TextArea/SelectionVisible/SelectionVisible.java b/jdk/test/java/awt/TextArea/SelectionVisible/SelectionVisible.java
new file mode 100644
index 0000000..c34f75f
--- /dev/null
+++ b/jdk/test/java/awt/TextArea/SelectionVisible/SelectionVisible.java
@@ -0,0 +1,62 @@
+/*
+ * 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
+ * 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.applet.Applet;
+import java.awt.BorderLayout;
+import java.awt.Dimension;
+import java.awt.FlowLayout;
+import java.awt.Panel;
+import java.awt.TextArea;
+
+public final class SelectionVisible extends Applet {
+
+    TextArea tf;
+
+    @Override
+    public void init() {
+        tf = new TextArea(3, 20);
+        tf.setText("0123456789");
+        tf.select(0, 6);
+
+        final TextArea ta = new TextArea("INSTRUCTIONS:\n"
+                                                 + "The text 012345 should be selected in the TextArea.\n"
+                                                 + "If this is what you observe, then the test passes.\n"
+                                                 + "Otherwise, the test fails.", 40, 5,
+                                         TextArea.SCROLLBARS_NONE);
+        ta.setEditable(false);
+        ta.setPreferredSize(new Dimension(300, 70));
+        final Panel panel = new Panel();
+        panel.setLayout(new FlowLayout());
+        panel.add(tf);
+        setLayout(new BorderLayout());
+        add(ta, BorderLayout.CENTER);
+        add(panel, BorderLayout.PAGE_END);
+    }
+
+    @Override
+    public void start() {
+        setVisible(true);
+        tf.requestFocus();
+    }
+}
diff --git a/jdk/test/java/awt/TextField/SelectionVisible/SelectionVisible.html b/jdk/test/java/awt/TextField/SelectionVisible/SelectionVisible.html
new file mode 100644
index 0000000..31490d1
--- /dev/null
+++ b/jdk/test/java/awt/TextField/SelectionVisible/SelectionVisible.html
@@ -0,0 +1,42 @@
+<html>
+<!--
+ 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
+ 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 4082144 7150100
+  @summary  Ensures that TextField.select() works when called 
+            before setVisible() 
+  @author Eric.Hawkes: area=TextComponent
+  @run applet/manual=yesno SelectionVisible.html
+  -->
+<head>
+<title> SelectionVisible </title>
+</head>
+<body>
+
+<h1> SelectionVisible<br> Bugid: 4082144 </h1>
+
+<APPLET CODE="SelectionVisible.class" WIDTH=400 HEIGHT=160></APPLET>
+</body>
+</html>
diff --git a/jdk/test/java/awt/TextField/SelectionVisible/SelectionVisible.java b/jdk/test/java/awt/TextField/SelectionVisible/SelectionVisible.java
new file mode 100644
index 0000000..cccec8e
--- /dev/null
+++ b/jdk/test/java/awt/TextField/SelectionVisible/SelectionVisible.java
@@ -0,0 +1,63 @@
+/*
+ * 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
+ * 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.applet.Applet;
+import java.awt.BorderLayout;
+import java.awt.Dimension;
+import java.awt.FlowLayout;
+import java.awt.Panel;
+import java.awt.TextArea;
+import java.awt.TextField;
+
+public final class SelectionVisible extends Applet {
+
+    TextField tf;
+
+    @Override
+    public void init() {
+        tf = new TextField(20);
+        tf.setText("0123456789");
+        tf.select(0, 6);
+
+        final TextArea ta = new TextArea("INSTRUCTIONS:\n"
+                                         + "The text 012345 should be selected in the TextField.\n"
+                                         + "If this is what you observe, then the test passes.\n"
+                                         + "Otherwise, the test fails.", 40, 5,
+                                         TextArea.SCROLLBARS_NONE);
+        ta.setEditable(false);
+        ta.setPreferredSize(new Dimension(300, 70));
+        final Panel panel = new Panel();
+        panel.setLayout(new FlowLayout());
+        panel.add(tf);
+        setLayout(new BorderLayout());
+        add(ta, BorderLayout.CENTER);
+        add(panel, BorderLayout.PAGE_END);
+    }
+
+    @Override
+    public void start() {
+        setVisible(true);
+        tf.requestFocus();
+    }
+}
diff --git a/jdk/test/java/awt/Window/AlwaysOnTop/AlwaysOnTopFieldTest.java b/jdk/test/java/awt/Window/AlwaysOnTop/AlwaysOnTopFieldTest.java
new file mode 100644
index 0000000..965eb7f
--- /dev/null
+++ b/jdk/test/java/awt/Window/AlwaysOnTop/AlwaysOnTopFieldTest.java
@@ -0,0 +1,91 @@
+/*
+ * Copyright (c) 2013, Oracle and/or its affiliates. All rights reserved.
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * This code is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU General Public License version 2 only, as
+ * published by the Free Software Foundation.
+ *
+ * This code is distributed in the hope that it will be useful, but WITHOUT
+ * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
+ * version 2 for more details (a copy is included in the LICENSE file that
+ * accompanied this code).
+ *
+ * You should have received a copy of the GNU General Public License version
+ * 2 along with this work; if not, write to the Free Software Foundation,
+ * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
+ *
+ * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
+ * or visit www.oracle.com if you need additional information or have any
+ * questions.
+ */
+import java.awt.Dialog;
+import java.awt.Frame;
+import java.awt.Toolkit;
+import java.awt.Window;
+import sun.awt.SunToolkit;
+/**
+ * @test
+ * @bug 7081594
+ * @author Alexander Scherbatiy
+ * @summary Windows owned by an always-on-top window DO NOT automatically become always-on-top
+ * @run main AlwaysOnTopFieldTest
+ */
+public class AlwaysOnTopFieldTest {
+
+    public static void main(String[] args) {
+        SunToolkit toolkit = (SunToolkit) Toolkit.getDefaultToolkit();
+
+        Window window = new Frame("Window 1");
+        window.setSize(200, 200);
+        window.setAlwaysOnTop(true);
+        window.setVisible(true);
+        toolkit.realSync();
+
+        Dialog dialog = new Dialog(window, "Owned dialog 1");
+        dialog.setSize(200, 200);
+        dialog.setLocation(100, 100);
+        dialog.setVisible(true);
+        toolkit.realSync();
+
+        try {
+            if (!window.isAlwaysOnTop()) {
+                throw new RuntimeException("Window has wrong isAlwaysOnTop value");
+            }
+            if (!dialog.isAlwaysOnTop()) {
+                throw new RuntimeException("Dialog has wrong isAlwaysOnTop value");
+            }
+        } finally {
+            window.dispose();
+            dialog.dispose();
+        }
+
+        window = new Frame("Window 2");
+        window.setSize(200, 200);
+        window.setVisible(true);
+        toolkit.realSync();
+
+
+        dialog = new Dialog(window, "Owned dialog 2");
+        dialog.setSize(200, 200);
+        dialog.setLocation(100, 100);
+        dialog.setVisible(true);
+        toolkit.realSync();
+
+        window.setAlwaysOnTop(true);
+        toolkit.realSync();
+
+        try {
+            if (!window.isAlwaysOnTop()) {
+                throw new RuntimeException("Window has wrong isAlwaysOnTop value");
+            }
+            if (!dialog.isAlwaysOnTop()) {
+                throw new RuntimeException("Dialog has wrong isAlwaysOnTop value");
+            }
+        } finally {
+            window.dispose();
+            dialog.dispose();
+        }
+    }
+}
diff --git a/jdk/test/java/awt/Window/LocationByPlatform/LocationByPlatformTest.java b/jdk/test/java/awt/Window/LocationByPlatform/LocationByPlatformTest.java
new file mode 100644
index 0000000..44f670b
--- /dev/null
+++ b/jdk/test/java/awt/Window/LocationByPlatform/LocationByPlatformTest.java
@@ -0,0 +1,75 @@
+/*
+ * 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 7092283
+ * @author Alexander Scherbatiy
+ * @summary Property Window.locationByPlatform is not cleared by calling
+ *          setVisible(false)
+ * @run main LocationByPlatformTest
+ */
+import java.awt.Window;
+
+public class LocationByPlatformTest {
+
+    public static void main(String[] args) {
+
+        Window window = new Window(null);
+        window.setSize(100, 100);
+        window.setLocationByPlatform(true);
+
+        if (!window.isLocationByPlatform()) {
+            throw new RuntimeException("Location by platform is not set");
+        }
+
+        window.setLocation(10, 10);
+
+        if (window.isLocationByPlatform()) {
+            throw new RuntimeException("Location by platform is not cleared");
+        }
+
+        window.setLocationByPlatform(true);
+        window.setBounds(20, 20, 50, 50);
+
+        if (window.isLocationByPlatform()) {
+            throw new RuntimeException("Location by platform is not cleared");
+        }
+
+        window.setLocationByPlatform(true);
+        window.setVisible(false);
+
+        if (window.isLocationByPlatform()) {
+            throw new RuntimeException("Location by platform is not cleared");
+        }
+
+        window.setLocationByPlatform(true);
+        window.setVisible(true);
+
+        if (window.isLocationByPlatform()) {
+            throw new RuntimeException("Location by platform is not cleared");
+        }
+
+        window.dispose();
+    }
+}
diff --git a/jdk/test/java/awt/Window/WindowsLeak/WindowsLeak.java b/jdk/test/java/awt/Window/WindowsLeak/WindowsLeak.java
new file mode 100644
index 0000000..dd776a8
--- /dev/null
+++ b/jdk/test/java/awt/Window/WindowsLeak/WindowsLeak.java
@@ -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 8013563
+ * @summary Tests that windows are removed from windows list
+ * @run main/othervm -Xms32M -Xmx32M WindowsLeak
+*/
+
+import java.awt.*;
+import sun.awt.AppContext;
+
+import java.lang.ref.WeakReference;
+
+import java.util.Vector;
+
+public class WindowsLeak {
+
+    public static void main(String[] args) {
+        for (int i = 0; i < 100; i++)
+        {
+            Frame f = new Frame();
+            f.pack();
+            f.dispose();
+        }
+
+        Vector garbage = new Vector();
+        while (true)
+        {
+            try
+            {
+                garbage.add(new byte[1000]);
+            }
+            catch (OutOfMemoryError e)
+            {
+                break;
+            }
+        }
+        garbage = null;
+
+        Vector<WeakReference<Window>> windowList =
+                        (Vector<WeakReference<Window>>) AppContext.getAppContext().get(Window.class);
+
+        if (windowList != null && !windowList.isEmpty()) {
+            throw new RuntimeException("Test FAILED: Window list is not empty: " + windowList.size());
+        }
+
+        System.out.println("Test PASSED");
+    }
+}
diff --git a/jdk/test/java/awt/dnd/DropTargetEnterExitTest/ExtraDragEnterTest.java b/jdk/test/java/awt/dnd/DropTargetEnterExitTest/ExtraDragEnterTest.java
new file mode 100644
index 0000000..16d938f
--- /dev/null
+++ b/jdk/test/java/awt/dnd/DropTargetEnterExitTest/ExtraDragEnterTest.java
@@ -0,0 +1,133 @@
+/*
+ * Copyright (c) 2013, Oracle and/or its affiliates. All rights reserved.
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * This code is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU General Public License version 2 only, as
+ * published by the Free Software Foundation.
+ *
+ * This code is distributed in the hope that it will be useful, but WITHOUT
+ * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
+ * version 2 for more details (a copy is included in the LICENSE file that
+ * accompanied this code).
+ *
+ * You should have received a copy of the GNU General Public License version
+ * 2 along with this work; if not, write to the Free Software Foundation,
+ * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
+ *
+ * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
+ * or visit www.oracle.com if you need additional information or have any
+ * questions.
+ */
+
+/**
+ * @test
+ * @bug 8024163
+ * @summary Checks the dragEnter event is correctly generated
+ * @library ../../regtesthelpers
+ * @build Util
+ * @compile ExtraDragEnterTest.java
+ * @run main/othervm ExtraDragEnterTest
+ * @author Petr Pchelko
+ */
+
+import test.java.awt.regtesthelpers.Util;
+
+import javax.swing.*;
+import java.awt.*;
+import java.awt.datatransfer.StringSelection;
+import java.awt.dnd.DnDConstants;
+import java.awt.dnd.DragGestureEvent;
+import java.awt.dnd.DragGestureListener;
+import java.awt.dnd.DragSource;
+import java.awt.dnd.DropTarget;
+import java.awt.dnd.DropTargetAdapter;
+import java.awt.dnd.DropTargetDragEvent;
+import java.awt.dnd.DropTargetDropEvent;
+import java.awt.event.InputEvent;
+import java.util.concurrent.atomic.AtomicInteger;
+
+public class ExtraDragEnterTest {
+
+    private static final int FRAME_SIZE = 100;
+    private static final int FRAME_LOCATION = 100;
+
+    private static AtomicInteger dragEnterCalled = new AtomicInteger(0);
+
+    private static volatile Panel mainPanel;
+    private static volatile Frame f;
+
+    private static void initAndShowUI() {
+        f = new Frame("Test frame");
+        f.setBounds(FRAME_LOCATION,FRAME_LOCATION,FRAME_SIZE,FRAME_SIZE);
+        mainPanel = new Panel();
+        mainPanel.setBounds(0, 0, FRAME_SIZE, FRAME_SIZE);
+        mainPanel.setBackground(Color.black);
+        mainPanel.setLayout(new GridLayout(2, 1));
+
+        final DraggablePanel dragSource = new DraggablePanel();
+        dragSource.setBackground(Color.yellow);
+        dragSource.setDropTarget(null);
+        mainPanel.add(dragSource);
+
+        Panel dropTarget = new Panel();
+        dropTarget.setBackground(Color.red);
+        DropTarget dt = new DropTarget(dropTarget, new DropTargetAdapter() {
+            @Override public void drop(DropTargetDropEvent dtde) { }
+
+            @Override
+            public void dragEnter(DropTargetDragEvent dtde) {
+                dragEnterCalled.incrementAndGet();
+            }
+        });
+        dropTarget.setDropTarget(dt);
+        mainPanel.add(dropTarget);
+
+        f.add(mainPanel);
+        f.setVisible(true);
+    }
+
+    public static void main(String[] args) throws Throwable {
+        try {
+
+            SwingUtilities.invokeAndWait(new Runnable() {
+                @Override
+                public void run() {
+                    initAndShowUI();
+                }
+            });
+
+            Robot r = new Robot();
+            Util.waitForIdle(r);
+            Point leftCorner = new Point(mainPanel.getLocationOnScreen());
+            leftCorner.translate(5, 5);
+            Point rightCorner = new Point(mainPanel.getLocationOnScreen());
+            rightCorner.translate(mainPanel.getWidth(), mainPanel.getHeight());
+            rightCorner.translate(-5, -5);
+            Util.drag(r, leftCorner, rightCorner, InputEvent.BUTTON1_MASK);
+            Util.waitForIdle(r);
+
+            int called = dragEnterCalled.get();
+            if (called != 1) {
+                throw new RuntimeException("Failed. Drag enter called " + called + " times. Expected 1" );
+            }
+        } finally {
+            if (f != null) {
+                f.dispose();
+            }
+        }
+    }
+
+    private static class DraggablePanel extends Panel implements DragGestureListener {
+
+        public DraggablePanel() {
+            (new DragSource()).createDefaultDragGestureRecognizer(this, DnDConstants.ACTION_COPY, this);
+        }
+
+        @Override
+        public void dragGestureRecognized(DragGestureEvent dge) {
+            dge.startDrag(Cursor.getDefaultCursor(), new StringSelection("test"));
+        }
+    }
+}
diff --git a/jdk/test/java/awt/dnd/DropTargetEnterExitTest/MissedDragExitTest.java b/jdk/test/java/awt/dnd/DropTargetEnterExitTest/MissedDragExitTest.java
new file mode 100644
index 0000000..3863667
--- /dev/null
+++ b/jdk/test/java/awt/dnd/DropTargetEnterExitTest/MissedDragExitTest.java
@@ -0,0 +1,128 @@
+/*
+ * 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 8024163
+ * @summary Checks that dragExit is generated when the new DropTarget is created under the drag
+ * @library ../../regtesthelpers
+ * @build Util
+ * @compile MissedDragExitTest.java
+ * @run main/othervm MissedDragExitTest
+ * @author Petr Pchelko
+ */
+
+import test.java.awt.regtesthelpers.Util;
+
+import javax.swing.*;
+import java.awt.*;
+import java.awt.datatransfer.StringSelection;
+import java.awt.dnd.DnDConstants;
+import java.awt.dnd.DragGestureEvent;
+import java.awt.dnd.DragGestureListener;
+import java.awt.dnd.DragSource;
+import java.awt.dnd.DropTarget;
+import java.awt.dnd.DropTargetAdapter;
+import java.awt.dnd.DropTargetDragEvent;
+import java.awt.dnd.DropTargetDropEvent;
+import java.awt.dnd.DropTargetEvent;
+import java.awt.event.InputEvent;
+
+public class MissedDragExitTest {
+
+    private static final int FRAME_SIZE = 100;
+    private static final int FRAME_LOCATION = 100;
+
+    private static volatile boolean dragExitCalled = false;
+
+    private static volatile Frame f;
+
+    private static void initAndShowUI() {
+        f = new Frame("Test frame");
+        f.setBounds(FRAME_LOCATION,FRAME_LOCATION,FRAME_SIZE,FRAME_SIZE);
+
+        final DraggablePanel dragSource = new DraggablePanel();
+        dragSource.setBackground(Color.yellow);
+        DropTarget dt = new DropTarget(dragSource, new DropTargetAdapter() {
+            @Override public void drop(DropTargetDropEvent dtde) { }
+
+            @Override
+            public void dragExit(DropTargetEvent dte) {
+                dragExitCalled = true;
+            }
+
+            @Override
+            public void dragOver(DropTargetDragEvent dtde) {
+                Panel newDropTarget = new Panel();
+                newDropTarget.setDropTarget(new DropTarget());
+                newDropTarget.setBackground(Color.red);
+                newDropTarget.setBounds(0, 0, FRAME_SIZE, FRAME_SIZE);
+                dragSource.add(newDropTarget);
+            }
+        });
+        dragSource.setDropTarget(dt);
+        f.add(dragSource);
+
+        f.setVisible(true);
+    }
+
+    public static void main(String[] args) throws Throwable {
+        try {
+
+            SwingUtilities.invokeAndWait(new Runnable() {
+                @Override
+                public void run() {
+                    initAndShowUI();
+                }
+            });
+
+            Robot r = new Robot();
+            Util.waitForIdle(r);
+            Util.drag(r,
+                    new Point(FRAME_LOCATION + FRAME_SIZE / 3, FRAME_LOCATION + FRAME_SIZE / 3),
+                    new Point(FRAME_LOCATION + FRAME_SIZE / 3 * 2, FRAME_LOCATION + FRAME_SIZE / 3 * 2),
+                    InputEvent.BUTTON1_MASK);
+            Util.waitForIdle(r);
+
+            if (!dragExitCalled) {
+                throw new RuntimeException("Failed. Drag exit was not called" );
+            }
+        } finally {
+            if (f != null) {
+                f.dispose();
+            }
+        }
+    }
+
+    private static class DraggablePanel extends Panel implements DragGestureListener {
+
+        public DraggablePanel() {
+            (new DragSource()).createDefaultDragGestureRecognizer(this, DnDConstants.ACTION_COPY, this);
+        }
+
+        @Override
+        public void dragGestureRecognized(DragGestureEvent dge) {
+            dge.startDrag(Cursor.getDefaultCursor(), new StringSelection("test"));
+        }
+    }
+}
diff --git a/jdk/test/java/awt/print/PrinterJob/CustomPrintService/PrintDialog.java b/jdk/test/java/awt/print/PrinterJob/CustomPrintService/PrintDialog.java
new file mode 100644
index 0000000..d18ee86
--- /dev/null
+++ b/jdk/test/java/awt/print/PrinterJob/CustomPrintService/PrintDialog.java
@@ -0,0 +1,59 @@
+/*
+ * 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.awt.*;
+import java.awt.print.PrinterJob;
+import javax.print.PrintServiceLookup;
+
+/**
+ * @test
+ * @bug 6870661
+ * @summary Verify that no native dialog is opened for a custom PrintService
+ * @run main/manual PrintDialog
+ * @author reinhapa
+ */
+public class PrintDialog {
+
+    private static final String instructions =
+        "This test shows a non native print dialog having a 'test' print service\n" +
+        "selected. No other options are selectable on the General tab. The other\n" +
+        "tabs are as follows:\n" +
+        "Page Setup: Media & Margins enabled, Orientation disabled\n" +
+        "Appearance: All parts disabled\n\n" +
+        "Test passes if the dialog is shown as described above.";
+
+    public static void main(String[] args) throws Exception {
+        // instruction dialog
+        Frame instruction = new Frame("Verify that no native print dialog is showed");
+        instruction.add(new TextArea(instructions));
+        instruction.pack();
+        instruction.show();
+        // test begin
+        PrintServiceStub service = new PrintServiceStub("test");
+        PrintServiceLookup.registerService(service);
+        PrinterJob job = PrinterJob.getPrinterJob();
+        job.setPrintService(service);
+        job.printDialog();
+        System.out.println("test passed");
+    }
+}
diff --git a/jdk/test/java/awt/print/PrinterJob/CustomPrintService/PrintServiceStub.java b/jdk/test/java/awt/print/PrinterJob/CustomPrintService/PrintServiceStub.java
new file mode 100644
index 0000000..c430959
--- /dev/null
+++ b/jdk/test/java/awt/print/PrinterJob/CustomPrintService/PrintServiceStub.java
@@ -0,0 +1,160 @@
+/*
+ * 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.
+ */
+
+import java.util.HashMap;
+import java.util.HashSet;
+import java.util.Map;
+import java.util.Set;
+
+import javax.print.DocFlavor;
+import javax.print.DocPrintJob;
+import javax.print.PrintService;
+import javax.print.ServiceUIFactory;
+import javax.print.attribute.Attribute;
+import javax.print.attribute.AttributeSet;
+import javax.print.attribute.HashPrintServiceAttributeSet;
+import javax.print.attribute.PrintServiceAttribute;
+import javax.print.attribute.PrintServiceAttributeSet;
+import javax.print.attribute.standard.Media;
+import javax.print.attribute.standard.MediaSizeName;
+import javax.print.attribute.standard.PrinterInfo;
+import javax.print.attribute.standard.PrinterIsAcceptingJobs;
+import javax.print.attribute.standard.PrinterMakeAndModel;
+import javax.print.attribute.standard.PrinterName;
+import javax.print.attribute.standard.PrinterState;
+import javax.print.event.PrintServiceAttributeListener;
+
+/**
+ * Stub implementation of a custom {@link PrintService}.
+ *
+ * @author reinhapa
+ */
+public class PrintServiceStub implements PrintService {
+    private final String _name;
+    private final Set<DocFlavor> _flavors;
+    private final Map<Class<?>, Object> _attributes;
+
+    public PrintServiceStub(String name) {
+        _name = name;
+        _flavors = new HashSet<DocFlavor>();
+        _flavors.add(DocFlavor.SERVICE_FORMATTED.PAGEABLE);
+        _flavors.add(DocFlavor.SERVICE_FORMATTED.PRINTABLE);
+        _attributes = new HashMap<>();
+        _attributes.put(PrinterName.class, new PrinterName(name, null));
+        _attributes.put(PrinterState.class, PrinterState.IDLE);
+        _attributes.put(PrinterInfo.class, new PrinterInfo("Custom location",
+                null));
+        _attributes.put(PrinterIsAcceptingJobs.class,
+                PrinterIsAcceptingJobs.ACCEPTING_JOBS);
+        _attributes.put(PrinterMakeAndModel.class, new PrinterMakeAndModel(
+                "Custom printer", null));
+        _attributes.put(Media.class, new Media[] { MediaSizeName.ISO_A4 });
+    }
+
+    @Override
+    public String getName() {
+        return _name;
+    }
+
+    @Override
+    public boolean isDocFlavorSupported(DocFlavor flavor) {
+        return _flavors.contains(flavor);
+    }
+
+    @Override
+    public Object getSupportedAttributeValues(
+            Class<? extends Attribute> category, DocFlavor flavor,
+            AttributeSet attributes) {
+        return _attributes.get(category);
+    }
+
+    @Override
+    public boolean isAttributeCategorySupported(
+            Class<? extends Attribute> category) {
+        return _attributes.containsKey(category);
+    }
+
+    @Override
+    public <T extends PrintServiceAttribute> T getAttribute(Class<T> category) {
+        return category.cast(_attributes.get(category));
+    }
+
+    @Override
+    public PrintServiceAttributeSet getAttributes() {
+        return new HashPrintServiceAttributeSet(_attributes.values().toArray(
+                new PrintServiceAttribute[_attributes.size()]));
+    }
+
+    @Override
+    public DocFlavor[] getSupportedDocFlavors() {
+        return _flavors.toArray(new DocFlavor[_flavors.size()]);
+    }
+
+    // not implemented methods
+
+    @Override
+    public DocPrintJob createPrintJob() {
+        return null;
+    }
+
+    @Override
+    public void addPrintServiceAttributeListener(
+            PrintServiceAttributeListener listener) {
+
+    }
+
+    @Override
+    public void removePrintServiceAttributeListener(
+            PrintServiceAttributeListener listener) {
+
+    }
+
+    @Override
+    public Class<?>[] getSupportedAttributeCategories() {
+        return null;
+    }
+
+    @Override
+    public Object getDefaultAttributeValue(Class<? extends Attribute> category) {
+        return null;
+    }
+
+    @Override
+    public boolean isAttributeValueSupported(Attribute attrval,
+            DocFlavor flavor, AttributeSet attributes) {
+        return false;
+    }
+
+    @Override
+    public AttributeSet getUnsupportedAttributes(DocFlavor flavor,
+            AttributeSet attributes) {
+        return null;
+    }
+
+    @Override
+    public ServiceUIFactory getServiceUIFactory() {
+        return null;
+    }
+}
diff --git a/jdk/test/java/awt/print/PrinterJob/CustomPrintService/SetPrintServiceTest.java b/jdk/test/java/awt/print/PrinterJob/CustomPrintService/SetPrintServiceTest.java
new file mode 100644
index 0000000..a6bc7ff
--- /dev/null
+++ b/jdk/test/java/awt/print/PrinterJob/CustomPrintService/SetPrintServiceTest.java
@@ -0,0 +1,48 @@
+/*
+ * Copyright (c) 2013, Oracle and/or its affiliates. All rights reserved.
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * This code is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU General Public License version 2 only, as
+ * published by the Free Software Foundation.  Oracle designates this
+ * particular file as subject to the "Classpath" exception as provided
+ * by Oracle in the LICENSE file that accompanied this code.
+ *
+ * This code is distributed in the hope that it will be useful, but WITHOUT
+ * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
+ * version 2 for more details (a copy is included in the LICENSE file that
+ * accompanied this code).
+ *
+ * You should have received a copy of the GNU General Public License version
+ * 2 along with this work; if not, write to the Free Software Foundation,
+ * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
+ *
+ * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
+ * or visit www.oracle.com if you need additional information or have any
+ * questions.
+ */
+
+import java.awt.print.PrinterException;
+import java.awt.print.PrinterJob;
+
+/**
+ * @test
+ * @bug 6870661
+ * @summary tests setPrintService() with a custom implementation
+ * @author reinhapa
+ */
+public class SetPrintServiceTest {
+
+    public static void main(String[] args) {
+        PrintServiceStub service = new PrintServiceStub("CustomPrintService");
+        PrinterJob printerJob = PrinterJob.getPrinterJob();
+        try {
+            printerJob.setPrintService(service);
+            System.out.println("Test Passed");
+        } catch (PrinterException e) {
+            throw new RuntimeException("Test FAILED", e);
+        }
+    }
+
+}
diff --git a/jdk/test/java/io/File/createTempFile/SpecialTempFile.java b/jdk/test/java/io/File/createTempFile/SpecialTempFile.java
index 9a4cc01..8bb8d93 100644
--- a/jdk/test/java/io/File/createTempFile/SpecialTempFile.java
+++ b/jdk/test/java/io/File/createTempFile/SpecialTempFile.java
@@ -23,7 +23,7 @@
 
 /*
  * @test
- * @bug 8013827 8011950 8017212
+ * @bug 8013827 8011950 8017212 8025128
  * @summary Check whether File.createTempFile can handle special parameters
  * @author Dan Xu
  */
@@ -33,7 +33,9 @@
 
 public class SpecialTempFile {
 
-    private static void test(String name, String[] prefix, String[] suffix) {
+    private static void test(String name, String[] prefix, String[] suffix,
+                             boolean exceptionExpected) throws IOException
+    {
         if (prefix == null || suffix == null
             || prefix.length != suffix.length)
         {
@@ -41,24 +43,38 @@
         }
 
         final String exceptionMsg = "Unable to create temporary file";
-        final String errMsg = "IOException is expected";
+        String[] dirs = { null, "." };
 
         for (int i = 0; i < prefix.length; i++) {
             boolean exceptionThrown = false;
             File f = null;
-            System.out.println("In test " + name
-                               + ", creating temp file with prefix, "
-                               + prefix[i] + ", suffix, " + suffix[i]);
-            try {
-                f = File.createTempFile(prefix[i], suffix[i]);
-            } catch (IOException e) {
-                if (exceptionMsg.equals(e.getMessage()))
-                    exceptionThrown = true;
-                else
-                    System.out.println("Wrong error message:" + e.getMessage());
+
+            for (String dir: dirs) {
+                System.out.println("In test " + name +
+                                   ", creating temp file with prefix, " +
+                                   prefix[i] + ", suffix, " + suffix[i] +
+                                   ", in dir, " + dir);
+
+                try {
+                    if (dir == null || dir.isEmpty())
+                        f = File.createTempFile(prefix[i], suffix[i]);
+                    else
+                        f = File.createTempFile(prefix[i], suffix[i], new File(dir));
+                } catch (IOException e) {
+                    if (exceptionExpected) {
+                        if (e.getMessage().startsWith(exceptionMsg))
+                            exceptionThrown = true;
+                        else
+                            System.out.println("Wrong error message:" +
+                                               e.getMessage());
+                    } else {
+                        throw e;
+                    }
+                }
+
+                if (exceptionExpected && (!exceptionThrown || f != null))
+                    throw new RuntimeException("IOException is expected");
             }
-            if (!exceptionThrown || f != null)
-                throw new RuntimeException(errMsg);
         }
     }
 
@@ -71,7 +87,17 @@
         }
         String[] nulPre = { name + "\u0000" };
         String[] nulSuf = { ".test" };
-        test("NulName", nulPre, nulSuf);
+        test("NulName", nulPre, nulSuf, true);
+
+        // Test JDK-8025128
+        String[] goodPre = { "///..///", "/foo" };
+        String[] goodSuf = { ".temp", ".tmp" };
+        test("goodName", goodPre, goodSuf, false);
+
+        // Test JDK-8011950
+        String[] slashPre = { "temp", "///..///", "/foo" };
+        String[] slashSuf = { "///..///..", "///..///..", "///..///.." };
+        test("SlashedName", slashPre, slashSuf, true);
 
         // Windows tests
         if (!System.getProperty("os.name").startsWith("Windows"))
@@ -80,11 +106,6 @@
         // Test JDK-8013827
         String[] resvPre = { "LPT1.package.zip", "com7.4.package.zip" };
         String[] resvSuf = { ".temp", ".temp" };
-        test("ReservedName", resvPre, resvSuf);
-
-        // Test JDK-8011950
-        String[] slashPre = { "///..///", "temp", "///..///" };
-        String[] slashSuf = { ".temp", "///..///..", "///..///.." };
-        test("SlashedName", slashPre, slashSuf);
+        test("ReservedName", resvPre, resvSuf, true);
     }
 }
diff --git a/jdk/test/java/lang/annotation/typeAnnotations/GetAnnotatedInterfaces.java b/jdk/test/java/lang/annotation/typeAnnotations/GetAnnotatedInterfaces.java
new file mode 100644
index 0000000..6a6d256
--- /dev/null
+++ b/jdk/test/java/lang/annotation/typeAnnotations/GetAnnotatedInterfaces.java
@@ -0,0 +1,80 @@
+/*
+ * Copyright (c) 2013, Oracle and/or its affiliates. All rights reserved.
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * This code is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU General Public License version 2 only, as
+ * published by the Free Software Foundation.
+ *
+ * This code is distributed in the hope that it will be useful, but WITHOUT
+ * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
+ * version 2 for more details (a copy is included in the LICENSE file that
+ * accompanied this code).
+ *
+ * You should have received a copy of the GNU General Public License version
+ * 2 along with this work; if not, write to the Free Software Foundation,
+ * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
+ *
+ * Please 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 8022324
+ * @summary Test Class.getAnnotatedInterfaces() returns 0-length array as
+ *          specified.
+ */
+
+import java.lang.reflect.AnnotatedType;
+import java.util.Arrays;
+
+public class GetAnnotatedInterfaces {
+    private static final Class<?>[] testData = {
+        GetAnnotatedInterfaces.class,
+        (new Clz() {}).getClass(),
+        (new Object() {}).getClass(),
+        Object[].class,
+        Object[][].class,
+        Object[][][].class,
+        Object.class,
+        void.class,
+        int.class,
+    };
+
+    private static int failed = 0;
+    private static int tests = 0;
+
+    public static void main(String[] args) throws Exception {
+        testReturnsZeroLengthArray();
+
+        if (failed != 0)
+            throw new RuntimeException("Test failed, check log for details");
+        if (tests != 9)
+            throw new RuntimeException("Not all cases ran, failing");
+    }
+
+    private static void testReturnsZeroLengthArray() {
+        for (Class<?> toTest : testData) {
+            tests++;
+
+            AnnotatedType[] res = toTest.getAnnotatedInterfaces();
+
+            if (res == null) {
+                failed++;
+                System.out.println(toTest + ".class.getAnnotatedInterface() returns" +
+                        "'null' should zero length array");
+            } else if (res.length != 0) {
+                failed++;
+                System.out.println(toTest + ".class.getAnnotatedInterfaces() returns: "
+                        + Arrays.asList(res) + ", should be a zero length array of AnnotatedType");
+            }
+        }
+    }
+
+    interface If {}
+
+    static abstract class Clz {}
+}
diff --git a/jdk/test/java/lang/annotation/typeAnnotations/GetAnnotatedReceiverType.java b/jdk/test/java/lang/annotation/typeAnnotations/GetAnnotatedReceiverType.java
new file mode 100644
index 0000000..e3dd646
--- /dev/null
+++ b/jdk/test/java/lang/annotation/typeAnnotations/GetAnnotatedReceiverType.java
@@ -0,0 +1,83 @@
+/*
+ * 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 8024915
+ */
+
+import java.lang.reflect.AnnotatedType;
+import java.util.Arrays;
+
+public class GetAnnotatedReceiverType {
+    public void method() {}
+    public void method0(GetAnnotatedReceiverType this) {}
+    public static void method4() {}
+
+    class Inner0 {
+        public Inner0() {}
+    }
+
+    class Inner1 {
+        public Inner1(GetAnnotatedReceiverType GetAnnotatedReceiverType.this) {}
+    }
+
+    private static int failures = 0;
+    private static int tests = 0;
+
+    public static void main(String[] args) throws NoSuchMethodException {
+        checkEmptyAT(GetAnnotatedReceiverType.class.getMethod("method").getAnnotatedReceiverType(),
+                "getAnnotatedReceiverType for \"method\" should return an empty AnnotatedType");
+        checkEmptyAT(Inner0.class.getConstructor(GetAnnotatedReceiverType.class).getAnnotatedReceiverType(),
+                "getAnnotatedReceiverType for a ctor without a \"this\" should return an empty AnnotatedType");
+
+        checkEmptyAT(GetAnnotatedReceiverType.class.getMethod("method0").getAnnotatedReceiverType(),
+                "getAnnotatedReceiverType for \"method0\" should return an empty AnnotatedType");
+        checkEmptyAT(Inner1.class.getConstructor(GetAnnotatedReceiverType.class).getAnnotatedReceiverType(),
+                "getAnnotatedReceiverType for a ctor with a \"this\" should return an empty AnnotatedType");
+
+        checkNull(GetAnnotatedReceiverType.class.getMethod("method4").getAnnotatedReceiverType(),
+                "getAnnotatedReceiverType() on a static method should return null");
+
+        if (failures != 0)
+            throw new RuntimeException("Test failed, see log for details");
+        else if (tests != 5)
+            throw new RuntimeException("Not all cases ran, failing");
+    }
+
+    private static void checkNull(Object o, String msg) {
+        if (o != null) {
+            failures++;
+            System.err.println(msg);
+        }
+        tests++;
+    }
+
+    private static void checkEmptyAT(AnnotatedType a, String msg) {
+        if (a.getAnnotations().length != 0) {
+            failures++;
+            System.err.print(msg);
+        }
+        tests++;
+    }
+}
diff --git a/jdk/test/java/lang/annotation/typeAnnotations/GetAnnotatedSuperclass.java b/jdk/test/java/lang/annotation/typeAnnotations/GetAnnotatedSuperclass.java
index d112203..34b95a0 100644
--- a/jdk/test/java/lang/annotation/typeAnnotations/GetAnnotatedSuperclass.java
+++ b/jdk/test/java/lang/annotation/typeAnnotations/GetAnnotatedSuperclass.java
@@ -23,12 +23,16 @@
 
 /*
  * @test
- * @bug 8022343
- * @summary make sure Class.getAnnotatedSuperclass() returns null when specified to do so
+ * @bug 8022343 8007072
+ * @summary Test Class.getAnnotatedSuperclass() returns null/non-null
+ *          AnnotatedType as specified
  */
 
+import java.lang.reflect.AnnotatedType;
+import java.util.Arrays;
+
 public class GetAnnotatedSuperclass {
-    private static final Class<?>[] testData = {
+    private static final Class<?>[] nullTestData = {
         Object.class,
         If.class,
         Object[].class,
@@ -36,9 +40,31 @@
         int.class,
     };
 
+    private static final Class<?>[] nonNullTestData = {
+        Class.class,
+        GetAnnotatedSuperclass.class,
+        (new If() {}).getClass(),
+        (new Clz() {}).getClass(),
+        (new Object() {}).getClass(),
+    };
+
+    private static int failed = 0;
+    private static int tests = 0;
+
     public static void main(String[] args) throws Exception {
-        int failed = 0;
-        for (Class<?> toTest : testData) {
+        testReturnsNull();
+        testReturnsEmptyAT();
+
+        if (failed != 0)
+            throw new RuntimeException("Test failed, check log for details");
+        if (tests != 10)
+            throw new RuntimeException("Not all cases ran, failing");
+    }
+
+    private static void testReturnsNull() {
+        for (Class<?> toTest : nullTestData) {
+            tests++;
+
             Object res = toTest.getAnnotatedSuperclass();
 
             if (res != null) {
@@ -47,10 +73,26 @@
                         + res + ", should be null");
             }
         }
+    }
 
-        if (failed != 0)
-            throw new RuntimeException("Test failed, check log for details");
+    private static void testReturnsEmptyAT() {
+        for (Class<?> toTest : nonNullTestData) {
+            tests++;
+
+            AnnotatedType res = toTest.getAnnotatedSuperclass();
+
+            if (res == null) {
+                failed++;
+                System.out.println(toTest + ".getAnnotatedSuperclass() returns 'null' should  be non-null");
+            } else if (res.getAnnotations().length != 0) {
+                failed++;
+                System.out.println(toTest + ".getAnnotatedSuperclass() returns: "
+                        + Arrays.asList(res.getAnnotations()) + ", should be an empty AnnotatedType");
+            }
+        }
     }
 
     interface If {}
+
+    static abstract class Clz {}
 }
diff --git a/jdk/test/java/lang/invoke/8022701/BogoLoader.java b/jdk/test/java/lang/invoke/8022701/BogoLoader.java
new file mode 100644
index 0000000..e77be6f
--- /dev/null
+++ b/jdk/test/java/lang/invoke/8022701/BogoLoader.java
@@ -0,0 +1,156 @@
+/*
+ * Copyright (c) 2013, Oracle and/or its affiliates. All rights reserved.
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * This code is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU General Public License version 2 only, as
+ * published by the Free Software Foundation.
+ *
+ * This code is distributed in the hope that it will be useful, but WITHOUT
+ * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
+ * version 2 for more details (a copy is included in the LICENSE file that
+ * accompanied this code).
+ *
+ * You should have received a copy of the GNU General Public License version
+ * 2 along with this work; if not, write to the Free Software Foundation,
+ * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
+ *
+ * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
+ * or visit www.oracle.com if you need additional information or have any
+ * questions.
+ *
+ */
+
+import java.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.*;
+
+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;
+    }
+}
diff --git a/jdk/test/java/lang/invoke/8022701/InvokeSeveralWays.java b/jdk/test/java/lang/invoke/8022701/InvokeSeveralWays.java
new file mode 100644
index 0000000..a5099dd
--- /dev/null
+++ b/jdk/test/java/lang/invoke/8022701/InvokeSeveralWays.java
@@ -0,0 +1,106 @@
+/*
+ * Copyright (c) 2013, Oracle and/or its affiliates. All rights reserved.
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * This code is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU General Public License version 2 only, as
+ * published by the Free Software Foundation.
+ *
+ * This code is distributed in the hope that it will be useful, but WITHOUT
+ * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
+ * version 2 for more details (a copy is included in the LICENSE file that
+ * accompanied this code).
+ *
+ * You should have received a copy of the GNU General Public License version
+ * 2 along with this work; if not, write to the Free Software Foundation,
+ * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
+ *
+ * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
+ * or visit www.oracle.com if you need additional information or have any
+ * questions.
+ *
+ */
+
+import java.lang.reflect.InvocationTargetException;
+
+/**
+ * Tries various ways of ultimately invoking MethodSupplier.m(),
+ * except that m has been made inaccessible and some exception should be
+ * thrown instead.
+ */
+public class InvokeSeveralWays {
+    public static int test(String args[], Class expected) throws Exception {
+        int failures = 0;
+        try {
+            Class.forName("Invoker").getMethod("invoke").invoke(null);
+            System.out.println("FAIL: No exception throw, probably failed to load modified bytecodes for MethodSupplier");
+            failures++;
+        } catch (InvocationTargetException e) {
+            Throwable c = e.getCause();
+            if (expected.isInstance(c))
+               System.out.println("EXPECTED: " + expected.getName() + ", "+ c);
+            else {
+               failures++;
+               System.out.println("FAIL: Unexpected wrapped exception " + c);
+               e.printStackTrace(System.out);
+            }
+        } catch (Throwable e) {
+            failures++;
+            System.out.println("FAIL: Unexpected exception has been caught " + e);
+            e.printStackTrace(System.out);
+        }
+        System.out.println();
+        try {
+            Class.forName("Invoker").getMethod("invoke2").invoke(null);
+            System.out.println("FAIL: No exception throw, probably failed to load modified bytecodes for MethodSupplier");
+            failures++;
+        } catch (InvocationTargetException e) {
+            Throwable c = e.getCause();
+            if (expected.isInstance(c))
+               System.out.println("EXPECTED: " + expected.getName() + ", "+ c);
+            else {
+               failures++;
+               System.out.println("FAIL: Unexpected wrapped exception " + c);
+               e.printStackTrace(System.out);
+            }
+        } catch (Throwable e) {
+            failures++;
+            System.out.println("FAIL: Unexpected exception has been caught " + e);
+            e.printStackTrace(System.out);
+        }
+        System.out.println();
+        try {
+            Invoker.invoke();
+            System.out.println("FAIL: No exception throw, probably failed to load modified bytecodes for MethodSupplier");
+            failures++;
+        } catch (Throwable e) {
+            if (expected.isInstance(e))
+               System.out.println("EXPECTED: " + expected.getName() + ", "+ e);
+            else {
+            failures++;
+            System.out.println("FAIL: Unexpected exception has been caught " + e);
+            e.printStackTrace(System.out);
+            }
+        }
+        System.out.println();
+        try {
+            Invoker.invoke2();
+            System.out.println("FAIL: No exception throw, probably failed to load modified bytecodes for MethodSupplier");
+            failures++;
+         } catch (Throwable e) {
+            if (expected.isInstance(e))
+               System.out.println("EXPECTED: " + expected.getName() + ", "+ e);
+            else {
+                failures++;
+                System.out.println("FAIL: Unexpected exception has been caught " + e);
+                e.printStackTrace(System.out);
+            }
+        }
+        System.out.println();
+        if (failures > 0) {
+          System.out.println("Saw " + failures + " failures");
+        }
+        return failures;
+    }
+}
diff --git a/jdk/test/java/lang/invoke/8022701/Invoker.java b/jdk/test/java/lang/invoke/8022701/Invoker.java
new file mode 100644
index 0000000..a97159e
--- /dev/null
+++ b/jdk/test/java/lang/invoke/8022701/Invoker.java
@@ -0,0 +1,45 @@
+/*
+ * 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 Invoker {
+    /**
+     * Use a method handle to invoke m.
+     */
+    public static void invoke() {
+        MyFunctionalInterface fi = null;
+        fi = new MethodSupplier()::<Integer, String, Long>m;
+        fi.invokeMethodReference();
+    }
+    /**
+     * Invoke m directly.
+     */
+    public static void invoke2() {
+        MethodSupplier ms = new MethodSupplier();
+        ms.m();
+    }
+}
+
+interface MyFunctionalInterface {
+       void invokeMethodReference();
+}
diff --git a/jdk/test/java/lang/invoke/8022701/MHIllegalAccess.java b/jdk/test/java/lang/invoke/8022701/MHIllegalAccess.java
new file mode 100644
index 0000000..44aa9c9
--- /dev/null
+++ b/jdk/test/java/lang/invoke/8022701/MHIllegalAccess.java
@@ -0,0 +1,120 @@
+/*
+ * Copyright (c) 2013, Oracle and/or its affiliates. All rights reserved.
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * This code is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU General Public License version 2 only, as
+ * published by the Free Software Foundation.
+ *
+ * This code is distributed in the hope that it will be useful, but WITHOUT
+ * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
+ * version 2 for more details (a copy is included in the LICENSE file that
+ * accompanied this code).
+ *
+ * You should have received a copy of the GNU General Public License version
+ * 2 along with this work; if not, write to the Free Software Foundation,
+ * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
+ *
+ * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
+ * or visit www.oracle.com if you need additional information or have any
+ * questions.
+ *
+ */
+
+/**
+ * @test
+ * @bug 8022701
+ * @summary Illegal access exceptions via methodhandle invocations threw wrong error.
+ *
+ * @compile -XDignore.symbol.file BogoLoader.java InvokeSeveralWays.java MHIllegalAccess.java MethodSupplier.java
+ * @run main/othervm MHIllegalAccess
+ */
+
+import java.lang.reflect.InvocationTargetException;
+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;
+
+public class MHIllegalAccess implements Opcodes {
+
+   public static void main(String args[]) throws Throwable  {
+      System.out.println("Classpath is " + System.getProperty("java.class.path"));
+      System.out.println();
+
+      /**
+       * Make method m be private to provoke an IllegalAccessError.
+       */
+      BogoLoader.VisitorMaker privatize = new BogoLoader.VisitorMaker() {
+           public ClassVisitor make(ClassVisitor cv) {
+               return new ClassVisitor(Opcodes.ASM5, cv) {
+                   public MethodVisitor visitMethod(int access, String name, String desc,
+                           String signature, String[] exceptions) {
+                       if (name.equals("m"))
+                           access = (access | ACC_PRIVATE) & ~ (ACC_PUBLIC | ACC_PROTECTED);
+                           return super.visitMethod(access, name, desc, signature, exceptions);
+                   }
+               };
+           }
+       };
+
+     /**
+       * Rename method m as nemo to provoke a NoSuchMethodError.
+       */
+     BogoLoader.VisitorMaker changeName = new BogoLoader.VisitorMaker() {
+           public ClassVisitor make(ClassVisitor cv) {
+               return new ClassVisitor(Opcodes.ASM5, cv) {
+                   public MethodVisitor visitMethod(int access, String name, String desc,
+                           String signature, String[] exceptions) {
+                       if (name.equals("m"))
+                           name = "nemo";
+                           return super.visitMethod(access, name, desc, signature, exceptions);
+                   }
+               };
+           }
+       };
+
+      int failures = 0;
+      failures += testOneError(privatize, args, IllegalAccessError.class);
+      failures += testOneError(changeName, args, NoSuchMethodError.class);
+      if (failures > 0) {
+          System.out.println("Saw " + failures + " failures, see standard out for details");
+          throw new Error("FAIL test");
+      }
+   }
+
+   /**
+    *
+    * @param vm VisitorMaker, to be stored in a table and passed to a BogoLoader
+    * @param args A copy of the main args, to be passed on to InvokeSeveralWays.test
+    * @param expected The class of the exception that should be thrown after
+    *                 attempted invocation of MethodSupplier.m.
+    * @throws ClassNotFoundException
+    * @throws Throwable
+    */
+    private static int testOneError(BogoLoader.VisitorMaker vm, String[] args, Class expected) throws ClassNotFoundException, Throwable {
+      HashMap<String, BogoLoader.VisitorMaker> replace = new HashMap<String, BogoLoader.VisitorMaker>();
+      replace.put("MethodSupplier", vm);
+
+      HashSet<String> in_bogus = new HashSet<String>();
+        in_bogus.add("InvokeSeveralWays");
+        in_bogus.add("MyFunctionalInterface");
+        in_bogus.add("Invoker");
+
+        BogoLoader bl = new BogoLoader(in_bogus, replace);
+        Class<?> isw = bl.loadClass("InvokeSeveralWays");
+        Object[] arg_for_args = new Object[2];
+        arg_for_args[0] = args;
+        arg_for_args[1] = expected;
+        try {
+            Object result = isw.getMethod("test", String[].class, Class.class).invoke(null, arg_for_args);
+            return (Integer)result;
+        } catch (InvocationTargetException e) {
+            Throwable th = e.getCause();
+            throw th == null ? e : th;
+        }
+    }
+}
diff --git a/jdk/test/java/lang/invoke/8022701/MethodSupplier.java b/jdk/test/java/lang/invoke/8022701/MethodSupplier.java
new file mode 100644
index 0000000..4699a52
--- /dev/null
+++ b/jdk/test/java/lang/invoke/8022701/MethodSupplier.java
@@ -0,0 +1,36 @@
+/*
+ * 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.
+ *
+ */
+
+/*
+ * Note: this class is only used in this form to facilitate compilation of the
+ * rest of the code.  Before execution, the bytecodes are mutilated in a
+ * BogoLoader to either make m be private or have a different name.
+ */
+
+public class MethodSupplier {
+    public void m() {
+        System.out.println("good");
+    }
+}
+
diff --git a/jdk/test/java/lang/invoke/AccessControlTest.java b/jdk/test/java/lang/invoke/AccessControlTest.java
index 0ee0678..0d37ec6 100644
--- a/jdk/test/java/lang/invoke/AccessControlTest.java
+++ b/jdk/test/java/lang/invoke/AccessControlTest.java
@@ -133,7 +133,7 @@
         }
 
         /** Simulate all assertions from the spec. for Lookup.in:
-         * <hr/>
+         * <hr>
          * Creates a lookup on the specified new lookup class.
          * [A1] The resulting object will report the specified
          * class as its own {@link #lookupClass lookupClass}.
@@ -155,7 +155,7 @@
          * </ul>
          * Other than the above cases, the new lookup will have the same
          * access capabilities as the original. [A8]
-         * <hr/>
+         * <hr>
          */
         public LookupCase in(Class<?> c2) {
             Class<?> c1 = lookupClass();
diff --git a/jdk/test/java/lang/invoke/BigArityTest.java b/jdk/test/java/lang/invoke/BigArityTest.java
index d9584dd..3744bf9 100644
--- a/jdk/test/java/lang/invoke/BigArityTest.java
+++ b/jdk/test/java/lang/invoke/BigArityTest.java
@@ -93,6 +93,65 @@
     }
 
     @Test
+    public void asCollectorIAE01() throws ReflectiveOperationException {
+        final int [] INVALID_ARRAY_LENGTHS = {
+            Integer.MIN_VALUE, Integer.MIN_VALUE + 1, -2, -1, 255, 256, Integer.MAX_VALUE - 1, Integer.MAX_VALUE
+        };
+        MethodHandle target = MethodHandles.publicLookup().findStatic(Arrays.class,
+                "deepToString", MethodType.methodType(String.class, Object[].class));
+        int minbig = Integer.MAX_VALUE;
+        for (int invalidLength : INVALID_ARRAY_LENGTHS) {
+            if (minbig > invalidLength && invalidLength > 100)  minbig = invalidLength;
+            try {
+                target.asCollector(Object[].class, invalidLength);
+                assert(false) : invalidLength;
+            } catch (IllegalArgumentException ex) {
+                System.out.println("OK: "+ex);
+            }
+        }
+        // Sizes not in the above array are good:
+        target.asCollector(Object[].class, minbig-1);
+        for (int i = 2; i <= 10; i++)
+            target.asCollector(Object[].class, minbig-i);
+    }
+
+    @Test
+    public void invoker02() {
+        for (int i = 0; i < 255; i++) {
+            MethodType mt = MethodType.genericMethodType(i);
+            MethodType expMT = mt.insertParameterTypes(0, MethodHandle.class);
+            if (i < 254) {
+                assertEquals(expMT, MethodHandles.invoker(mt).type());
+            } else {
+                try {
+                    MethodHandles.invoker(mt);
+                    assert(false) : i;
+                } catch (IllegalArgumentException ex) {
+                    System.out.println("OK: "+ex);
+                }
+            }
+        }
+    }
+
+    @Test
+    public void exactInvoker02() {
+        for (int i = 0; i < 255; i++) {
+            MethodType mt = MethodType.genericMethodType(i);
+            MethodType expMT = mt.insertParameterTypes(0, MethodHandle.class);
+            if (i < 254) {
+                assertEquals(expMT, MethodHandles.exactInvoker(mt).type());
+            } else {
+                try {
+                    MethodHandles.exactInvoker(mt);
+                    assert(false) : i;
+                } catch (IllegalArgumentException ex) {
+                    System.out.println("OK: "+ex);
+                }
+            }
+        }
+    }
+
+    @Test
     public void testBoundaryValues() throws Throwable {
         for (int badArity : new int[]{ -1, MAX_JVM_ARITY+1, MAX_JVM_ARITY }) {
             try {
@@ -102,6 +161,37 @@
                 System.out.println("OK: "+ex);
             }
         }
+        final int MAX_MH_ARITY      = MAX_JVM_ARITY - 1;  // mh.invoke(arg*[N])
+        final int MAX_INVOKER_ARITY = MAX_MH_ARITY - 1;   // inv.invoke(mh, arg*[N])
+        for (int arity : new int[]{ 0, 1, MAX_MH_ARITY-2, MAX_MH_ARITY-1, MAX_MH_ARITY }) {
+            MethodHandle mh = MH_hashArguments(arity);
+            if (arity < MAX_INVOKER_ARITY) {
+                MethodHandle ximh = MethodHandles.exactInvoker(mh.type());
+                MethodHandle gimh = MethodHandles.invoker(mh.type());
+                MethodHandle simh = MethodHandles.spreadInvoker(mh.type(), 0);
+                if (arity != 0) {
+                    simh = MethodHandles.spreadInvoker(mh.type(), 1);
+                } else {
+                    try {
+                        simh = MethodHandles.spreadInvoker(mh.type(), 1);
+                        assert(false) : arity;
+                    } catch (IllegalArgumentException ex) {
+                        System.out.println("OK: "+ex);
+                    }
+                }
+                if (arity != 0) {
+                    simh = MethodHandles.spreadInvoker(mh.type(), arity-1);
+                } else {
+                    try {
+                        simh = MethodHandles.spreadInvoker(mh.type(), arity-1);
+                        assert(false) : arity;
+                    } catch (IllegalArgumentException ex) {
+                        System.out.println("OK: "+ex);
+                    }
+                }
+                simh = MethodHandles.spreadInvoker(mh.type(), arity);
+            }
+        }
     }
 
     // Make sure the basic argument spreading and varargs mechanisms are working.
@@ -133,7 +223,7 @@
             if (cls == Object[].class)
                 r = smh.invokeExact(tail);
             else if (cls == Integer[].class)
-                r = smh.invokeExact((Integer[]) tail);
+                r = smh.invokeExact((Integer[]) tail); //warning OK, see 8019340
             else
                 r = smh.invoke(tail);
             assertEquals(r0, r);
@@ -235,21 +325,41 @@
             MethodHandle mh_VA = mh.asSpreader(cls, arity);
             assert(mh_VA.type().parameterType(0) == cls);
             testArities(cls, arity, iterations, verbose, mh, mh_VA);
+            // mh_CA will collect arguments of a particular type and pass them to mh_VA
+            MethodHandle mh_CA = mh_VA.asCollector(cls, arity);
+            MethodHandle mh_VA2 = mh_CA.asSpreader(cls, arity);
+            assert(mh_CA.type().equals(mh.type()));
+            assert(mh_VA2.type().equals(mh_VA.type()));
             if (cls != Object[].class) {
-                // mh_CA will collect arguments of a particular type and pass them to mh_VA
-                MethodHandle mh_CA = mh_VA.asCollector(cls, arity);
-                MethodHandle mh_VA2 = mh_CA.asSpreader(cls, arity);
                 try {
                     mh_VA2.invokeWithArguments(new Object[arity]);
                     throw new AssertionError("should not reach");
                 } catch (ClassCastException | WrongMethodTypeException ex) {
                 }
-                assert(mh_CA.type().equals(mh.type()));
-                assert(mh_VA2.type().equals(mh_VA.type()));
-                testArities(cls, arity, iterations, false, mh_CA, mh_VA2);
             }
+            int iterations_VA = iterations / 100;
+            testArities(cls, arity, iterations_VA, false, mh_CA, mh_VA2);
         }
     }
+
+   /**
+     * Tests calls to {@link BigArityTest#hashArguments hashArguments} as related to a single given arity N.
+     * Applies the given {@code mh} to a set of N integer arguments, checking the answer.
+     * Also applies the varargs variation {@code mh_VA} to an array of type C[] (given by {@code cls}).
+     * Test steps:
+     * <ul>
+     * <li>mh_VA.invokeExact(new C[]{ arg, ... })</li>
+     * <li>mh.invokeWithArguments((Object[]) new C[]{ arg, ... })</li>
+     * <li>exactInvoker(mh.type()).invokeWithArguments(new Object[]{ mh, arg, ... })</li>
+     * <li>invoker(mh.type()).invokeWithArguments(new Object[]{ mh, arg, ... })</li>
+     * </ul>
+     * @param cls     array type for varargs call (one of Object[], Number[], Integer[], Comparable[])
+     * @param arity   N, the number of arguments to {@code mh} and length of its varargs array, in [0..255]
+     * @param iterations  number of times to repeat each test step (at least 4)
+     * @param verbose are we printing extra output?
+     * @param mh      a fixed-arity version of {@code hashArguments}
+     * @param mh_VA   a variable-arity version of {@code hashArguments}, accepting the given array type {@code cls}
+     */
     private void testArities(Class<? extends Object[]> cls,
                              int arity,
                              int iterations,
@@ -292,7 +402,7 @@
             if (cls == Object[].class)
                 r = mh_VA.invokeExact(args);
             else if (cls == Integer[].class)
-                r = mh_VA.invokeExact((Integer[])args);
+                r = mh_VA.invokeExact((Integer[])args); //warning OK, see 8019340
             else
                 r = mh_VA.invoke(args);
             assertEquals(r0, r);
@@ -392,10 +502,16 @@
     a[0xE0], a[0xE1], a[0xE2], a[0xE3], a[0xE4], a[0xE5], a[0xE6], a[0xE7], a[0xE8], a[0xE9], a[0xEA], a[0xEB], a[0xEC], a[0xED], a[0xEE], a[0xEF],
     a[0xF0], a[0xF1], a[0xF2], a[0xF3], a[0xF4], a[0xF5], a[0xF6], a[0xF7],
     // </editor-fold>
-    a[0xF8], a[0xF9], a[0xFA], a[0xFB]);
+    a[0xF8], a[0xF9], a[0xFA], a[0xFB]); // hashArguments_252
         assertEquals(r0, r);
         MethodType mt = MethodType.genericMethodType(ARITY);
         MethodHandle mh = MethodHandles.lookup().findStatic(BigArityTest.class, "hashArguments_"+ARITY, mt);
+        test252(mh, a, r0);
+        MethodHandle mh_CA = MH_hashArguments_VA.asFixedArity().asCollector(Object[].class, ARITY);
+        test252(mh_CA, a, r0);
+    }
+    public void test252(MethodHandle mh, Object[] a, Object r0) throws Throwable {
+        Object r;
         r = mh.invokeExact(
     // <editor-fold defaultstate="collapsed" desc="a[0x00], a[0x01], a[0x02], a[0x03], a[0x04], ...">
     a[0x00], a[0x01], a[0x02], a[0x03], a[0x04], a[0x05], a[0x06], a[0x07], a[0x08], a[0x09], a[0x0A], a[0x0B], a[0x0C], a[0x0D], a[0x0E], a[0x0F],
@@ -599,10 +715,16 @@
     a[0xE0], a[0xE1], a[0xE2], a[0xE3], a[0xE4], a[0xE5], a[0xE6], a[0xE7], a[0xE8], a[0xE9], a[0xEA], a[0xEB], a[0xEC], a[0xED], a[0xEE], a[0xEF],
     a[0xF0], a[0xF1], a[0xF2], a[0xF3], a[0xF4], a[0xF5], a[0xF6], a[0xF7],
     // </editor-fold>
-    a[0xF8], a[0xF9], a[0xFA], a[0xFB], a[0xFC]);
+    a[0xF8], a[0xF9], a[0xFA], a[0xFB], a[0xFC]); // hashArguments_253
         assertEquals(r0, r);
         MethodType mt = MethodType.genericMethodType(ARITY);
         MethodHandle mh = MethodHandles.lookup().findStatic(BigArityTest.class, "hashArguments_"+ARITY, mt);
+        test253(mh, a, r0);
+        MethodHandle mh_CA = MH_hashArguments_VA.asFixedArity().asCollector(Object[].class, ARITY);
+        test253(mh_CA, a, r0);
+    }
+    public void test253(MethodHandle mh, Object[] a, Object r0) throws Throwable {
+        Object r;
         r = mh.invokeExact(
     // <editor-fold defaultstate="collapsed" desc="a[0x00], a[0x01], a[0x02], a[0x03], a[0x04], ...">
     a[0x00], a[0x01], a[0x02], a[0x03], a[0x04], a[0x05], a[0x06], a[0x07], a[0x08], a[0x09], a[0x0A], a[0x0B], a[0x0C], a[0x0D], a[0x0E], a[0x0F],
@@ -648,7 +770,6 @@
     // </editor-fold>
     a[0xF8], a[0xF9], a[0xFA], a[0xFB], a[0xFC]);
         assertEquals(r0, r);
-        // FIXME: This next one fails, because it uses an internal invoker of arity 255.
         r = ximh.invokeWithArguments(cat(mh,a));
         assertEquals(r0, r);
         MethodHandle gimh = MethodHandles.invoker(mh.type());
@@ -674,7 +795,6 @@
     // </editor-fold>
     a[0xF8], a[0xF9], a[0xFA], a[0xFB], a[0xFC]);
         assertEquals(r0, r);
-        // FIXME: This next one fails, because it uses an internal invoker of arity 255.
         r = gimh.invokeWithArguments(cat(mh,a));
         assertEquals(r0, r);
         mh = mh.asType(mh.type().changeParameterType(0x10, Integer.class));
@@ -808,10 +928,16 @@
     a[0xE0], a[0xE1], a[0xE2], a[0xE3], a[0xE4], a[0xE5], a[0xE6], a[0xE7], a[0xE8], a[0xE9], a[0xEA], a[0xEB], a[0xEC], a[0xED], a[0xEE], a[0xEF],
     a[0xF0], a[0xF1], a[0xF2], a[0xF3], a[0xF4], a[0xF5], a[0xF6], a[0xF7],
     // </editor-fold>
-    a[0xF8], a[0xF9], a[0xFA], a[0xFB], a[0xFC], a[0xFD]);
+    a[0xF8], a[0xF9], a[0xFA], a[0xFB], a[0xFC], a[0xFD]); // hashArguments_254
         assertEquals(r0, r);
         MethodType mt = MethodType.genericMethodType(ARITY);
         MethodHandle mh = MethodHandles.lookup().findStatic(BigArityTest.class, "hashArguments_"+ARITY, mt);
+        test254(mh, a, r0);
+        MethodHandle mh_CA = MH_hashArguments_VA.asFixedArity().asCollector(Object[].class, ARITY);
+        test254(mh_CA, a, r0);
+    }
+    public void test254(MethodHandle mh, Object[] a, Object r0) throws Throwable {
+        Object r;
         r = mh.invokeExact(
     // <editor-fold defaultstate="collapsed" desc="a[0x00], a[0x01], a[0x02], a[0x03], a[0x04], ...">
     a[0x00], a[0x01], a[0x02], a[0x03], a[0x04], a[0x05], a[0x06], a[0x07], a[0x08], a[0x09], a[0x0A], a[0x0B], a[0x0C], a[0x0D], a[0x0E], a[0x0F],
@@ -833,7 +959,6 @@
     // </editor-fold>
     a[0xF8], a[0xF9], a[0xFA], a[0xFB], a[0xFC], a[0xFD]);
         assertEquals(r0, r);
-        // FIXME: This next one fails, because it uses an internal invoker of arity 255.
         r = mh.invokeWithArguments(a);
         assertEquals(r0, r);
         try {
@@ -998,7 +1123,7 @@
     a[0xE0], a[0xE1], a[0xE2], a[0xE3], a[0xE4], a[0xE5], a[0xE6], a[0xE7], a[0xE8], a[0xE9], a[0xEA], a[0xEB], a[0xEC], a[0xED], a[0xEE], a[0xEF],
     a[0xF0], a[0xF1], a[0xF2], a[0xF3], a[0xF4], a[0xF5], a[0xF6], a[0xF7],
     // </editor-fold>
-    a[0xF8], a[0xF9], a[0xFA], a[0xFB], a[0xFC], a[0xFD], a[0xFE]);
+    a[0xF8], a[0xF9], a[0xFA], a[0xFB], a[0xFC], a[0xFD], a[0xFE]); // hashArguments_255
         assertEquals(r0, r);
         MethodType mt = MethodType.genericMethodType(ARITY);
         MethodHandle mh;
diff --git a/jdk/test/java/lang/invoke/CallStaticInitOrder.java b/jdk/test/java/lang/invoke/CallStaticInitOrder.java
new file mode 100644
index 0000000..83808f8
--- /dev/null
+++ b/jdk/test/java/lang/invoke/CallStaticInitOrder.java
@@ -0,0 +1,275 @@
+/*
+ * Copyright (c) 2013, Oracle and/or its affiliates. All rights reserved.
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * This code is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU General Public License version 2 only, as
+ * published by the Free Software Foundation.
+ *
+ * This code is distributed in the hope that it will be useful, but WITHOUT
+ * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
+ * version 2 for more details (a copy is included in the LICENSE file that
+ * accompanied this code).
+ *
+ * You should have received a copy of the GNU General Public License version
+ * 2 along with this work; if not, write to the Free Software Foundation,
+ * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
+ *
+ * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
+ * or visit www.oracle.com if you need additional information or have any
+ * questions.
+ *
+ */
+
+/**
+ * @test
+ * @summary static initializer invocation order
+ *
+ * @build indify.Indify
+ * @compile CallStaticInitOrder.java
+ * @run main/othervm
+ *      indify.Indify
+ *      --expand-properties --classpath ${test.classes}
+ *      --java test.java.lang.invoke.CallStaticInitOrder
+ */
+
+package test.java.lang.invoke;
+
+import java.io.*;
+
+import java.lang.invoke.*;
+import static java.lang.invoke.MethodHandles.*;
+import static java.lang.invoke.MethodType.*;
+
+public class CallStaticInitOrder {
+    private static int TICK;
+    private static synchronized int tick(String event) {
+        int n = ++TICK;
+        System.out.println("event #"+n+" = "+event);
+        return n;
+    }
+
+    static int Init1Tick;
+    private static class Init1 {
+        static { Init1Tick = tick("foo -> Init1.<clinit>"); }
+        static int foo() { return Init1Tick; }
+    }
+
+    static int Init2Tick;
+    private static class Init2 {
+        static { Init2Tick = tick("bar -> Init2.<clinit>"); }
+        static int bar() { return Init2Tick; }
+    }
+
+    static int Init3Tick;
+    private static class Init3 {
+        static { Init3Tick = tick("baz -> Init3.<clinit>"); }
+        static int baz() { return Init3Tick; }
+    }
+
+    static int Init4Tick;
+    private static class Init4 {
+        static { Init4Tick = tick("bat -> Init4.<clinit>"); }
+        static int bat() { return Init4Tick; }
+    }
+
+    static int Init5Tick;
+    private static class Init5 {
+        static { Init5Tick = tick("read bang -> Init5.<clinit>"); }
+        static int bang = Init5Tick;
+    }
+
+    static int Init6Tick;
+    private static class Init6 {
+        static { Init6Tick = tick("write pong -> Init6.<clinit>"); }
+        static int pong;
+    }
+
+    private static final MutableCallSite CONSTANT_CS_baz;
+    private static MethodHandle MH_foo() throws ReflectiveOperationException {
+        return lookup().findStatic(Init1.class, "foo", methodType(int.class));
+    }
+    private static final MethodHandle CONSTANT_MH_bar;
+    private static MethodHandle MH_baz() throws ReflectiveOperationException {
+        return lookup().findStatic(Init3.class, "baz", methodType(int.class));
+    }
+    private static final MethodHandle CONSTANT_MH_bat;
+    private static final MethodHandle CONSTANT_MH_bangGetter;
+    private static final MethodHandle CONSTANT_MH_pongSetter;
+    static {
+        try {
+            int t1 = tick("CallStaticInitOrder.<clinit>");
+            {
+                CONSTANT_CS_baz = new MutableCallSite(methodType(int.class));
+                // MH_foo() := lookup().findStatic(Init1.class, "foo", methodType(int.class));
+                CONSTANT_MH_bar = lookup().findStatic(Init2.class, "bar", methodType(int.class));
+                // MH_baz() := lookup().findStatic(Init3.class, "baz", methodType(int.class));
+                CONSTANT_MH_bat = lookup().unreflect(Init4.class.getDeclaredMethod("bat"));
+                CONSTANT_MH_bangGetter = lookup().findStaticGetter(Init5.class, "bang", int.class);
+                MethodHandle pongSetter = lookup().findStaticSetter(Init6.class, "pong", int.class);
+                MethodHandle tickGetter = lookup().findStaticGetter(CallStaticInitOrder.class, "Init6Tick", int.class);
+                CONSTANT_MH_pongSetter = filterReturnValue(insertArguments(pongSetter, 0, -99), tickGetter);
+            }
+            int t2 = tick("CallStaticInitOrder.<clinit> done");
+            assertEquals(t1+1, t2);  // no ticks in between
+        } catch (Exception ex) {
+            throw new InternalError(ex.toString());
+        }
+    }
+
+    public static void main(String... av) throws Throwable {
+        testInit();
+        if (LAST_LOSER != null)  throw LAST_LOSER;
+    }
+
+    private static Throwable LAST_LOSER;
+
+    private static void assertEquals(int expected, int actual) {
+        if (expected != actual) {
+            Throwable loser = new AssertionError("expected: " + expected + ", actual: " + actual);
+            if (LAST_LOSER != null)
+                LAST_LOSER.printStackTrace(System.out);
+            LAST_LOSER = loser;
+        }
+    }
+
+    private static void testInit() throws Throwable {
+        System.out.println("runFoo = "+runFoo());
+        System.out.println("runBar = "+runBar());
+        try {
+            runBaz();
+        } catch (IllegalStateException ex) {
+            tick("runBaz throw/catch");
+        }
+        CONSTANT_CS_baz.setTarget(MH_baz());
+        System.out.println("runBaz = "+runBaz());
+        System.out.println("runBat = "+runBat());
+        System.out.println("runBang = "+runBang());
+        System.out.println("runPong = "+runPong());
+    }
+
+    private static int runFoo() throws Throwable {
+        assertEquals(Init1Tick, 0);  // Init1 not initialized yet
+        int t1 = tick("runFoo");
+        int t2 = (int) INDY_foo().invokeExact();
+        int t3 = tick("runFoo done");
+        assertEquals(Init1Tick, t2);  // when Init1 was initialized
+        assertEquals(t1+2, t3);  // exactly two ticks in between
+        assertEquals(t1+1, t2);  // init happened inside
+        return t2;
+    }
+    private static MethodHandle INDY_foo() throws Throwable {
+        shouldNotCallThis();
+        return ((CallSite) MH_bsm().invoke(lookup(), "foo", methodType(int.class))).dynamicInvoker();
+    }
+
+    private static int runBar() throws Throwable {
+        assertEquals(Init2Tick, 0);  // Init2 not initialized yet
+        int t1 = tick("runBar");
+        int t2 = (int) INDY_bar().invokeExact();
+        int t3 = tick("runBar done");
+        assertEquals(Init2Tick, t2);  // when Init2 was initialized
+        assertEquals(t1+2, t3);  // exactly two ticks in between
+        assertEquals(t1+1, t2);  // init happened inside
+        return t2;
+    }
+    private static MethodHandle INDY_bar() throws Throwable {
+        shouldNotCallThis();
+        return ((CallSite) MH_bsm().invoke(lookup(), "bar", methodType(int.class))).dynamicInvoker();
+    }
+
+    private static int runBaz() throws Throwable {
+        assertEquals(Init3Tick, 0);  // Init3 not initialized yet
+        int t1 = tick("runBaz");
+        int t2 = (int) INDY_baz().invokeExact();
+        int t3 = tick("runBaz done");
+        assertEquals(Init3Tick, t2);  // when Init3 was initialized
+        assertEquals(t1+2, t3);  // exactly two ticks in between
+        assertEquals(t1+1, t2);  // init happened inside
+        return t2;
+    }
+    private static MethodHandle INDY_baz() throws Throwable {
+        shouldNotCallThis();
+        return ((CallSite) MH_bsm().invoke(lookup(), "baz", methodType(int.class))).dynamicInvoker();
+    }
+
+    private static int runBat() throws Throwable {
+        assertEquals(Init4Tick, 0);  // Init4 not initialized yet
+        int t1 = tick("runBat");
+        int t2 = (int) INDY_bat().invokeExact();
+        int t3 = tick("runBat done");
+        assertEquals(Init4Tick, t2);  // when Init4 was initialized
+        assertEquals(t1+2, t3);  // exactly two ticks in between
+        assertEquals(t1+1, t2);  // init happened inside
+        return t2;
+    }
+    private static MethodHandle INDY_bat() throws Throwable {
+        shouldNotCallThis();
+        return ((CallSite) MH_bsm().invoke(lookup(), "bat", methodType(int.class))).dynamicInvoker();
+    }
+
+    private static int runBang() throws Throwable {
+        assertEquals(Init5Tick, 0);  // Init5 not initialized yet
+        int t1 = tick("runBang");
+        int t2 = (int) INDY_bang().invokeExact();
+        int t3 = tick("runBang done");
+        assertEquals(Init5Tick, t2);  // when Init5 was initialized
+        assertEquals(t1+2, t3);  // exactly two ticks in between
+        assertEquals(t1+1, t2);  // init happened inside
+        return t2;
+    }
+    private static MethodHandle INDY_bang() throws Throwable {
+        shouldNotCallThis();
+        return ((CallSite) MH_bsm().invoke(lookup(), "bang", methodType(int.class))).dynamicInvoker();
+    }
+
+    private static int runPong() throws Throwable {
+        assertEquals(Init6Tick, 0);  // Init6 not initialized yet
+        int t1 = tick("runPong");
+        int t2 = (int) INDY_pong().invokeExact();
+        int t3 = tick("runPong done");
+        assertEquals(Init6Tick, t2);  // when Init6 was initialized
+        assertEquals(t1+2, t3);  // exactly two ticks in between
+        assertEquals(t1+1, t2);  // init happened inside
+        return t2;
+    }
+    private static MethodHandle INDY_pong() throws Throwable {
+        shouldNotCallThis();
+        return ((CallSite) MH_bsm().invoke(lookup(), "pong", methodType(int.class))).dynamicInvoker();
+    }
+
+    private static CallSite bsm(Lookup caller, String name, MethodType type) throws ReflectiveOperationException {
+        System.out.println("bsm "+name+type);
+        CallSite res;
+        switch (name) {
+        case "foo":
+            res = new ConstantCallSite(MH_foo()); break;
+        case "bar":
+            res = new ConstantCallSite(CONSTANT_MH_bar); break;
+        case "baz":
+            res = CONSTANT_CS_baz; break;
+        case "bat":
+            res = new ConstantCallSite(CONSTANT_MH_bat); break;
+        case "bang":
+            res = new ConstantCallSite(CONSTANT_MH_bangGetter); break;
+        case "pong":
+            res = new ConstantCallSite(CONSTANT_MH_pongSetter); break;
+        default:
+            res = null;
+        }
+        if (res == null || !res.type().equals(type)) {
+            throw new AssertionError(String.valueOf(res));
+        }
+        return res;
+    }
+    private static MethodHandle MH_bsm() throws ReflectiveOperationException {
+        shouldNotCallThis();
+        return lookup().findStatic(lookup().lookupClass(), "bsm",
+                                   methodType(CallSite.class, Lookup.class, String.class, MethodType.class));
+    }
+    private static void shouldNotCallThis() {
+        // if this gets called, the transformation has not taken place
+        throw new AssertionError("this code should be statically transformed away by Indify");
+    }
+}
diff --git a/jdk/test/java/lang/invoke/JavaDocExamplesTest.java b/jdk/test/java/lang/invoke/JavaDocExamplesTest.java
index 0de2015..194564f 100644
--- a/jdk/test/java/lang/invoke/JavaDocExamplesTest.java
+++ b/jdk/test/java/lang/invoke/JavaDocExamplesTest.java
@@ -53,7 +53,11 @@
     }
 
     public void run() throws Throwable {
+        testMisc();
+        testFindStatic();
+        testFindConstructor();
         testFindVirtual();
+        testFindSpecial();
         testPermuteArguments();
         testDropArguments();
         testFilterArguments();
@@ -99,7 +103,8 @@
 
 {}
 
-    @Test public void testFindVirtual() throws Throwable {
+    @Test public void testMisc() throws Throwable {
+// Extra tests, not from javadoc:
 {}
 MethodHandle CONCAT_3 = LOOKUP.findVirtual(String.class,
   "concat", methodType(String.class, String.class));
@@ -114,6 +119,92 @@
 {}
     }
 
+    @Test public void testFindStatic() throws Throwable {
+{}
+MethodHandle MH_asList = publicLookup().findStatic(Arrays.class,
+  "asList", methodType(List.class, Object[].class));
+assertEquals("[x, y]", MH_asList.invoke("x", "y").toString());
+{}
+    }
+
+    @Test public void testFindVirtual() throws Throwable {
+{}
+MethodHandle MH_concat = publicLookup().findVirtual(String.class,
+  "concat", methodType(String.class, String.class));
+MethodHandle MH_hashCode = publicLookup().findVirtual(Object.class,
+  "hashCode", methodType(int.class));
+MethodHandle MH_hashCode_String = publicLookup().findVirtual(String.class,
+  "hashCode", methodType(int.class));
+assertEquals("xy", (String) MH_concat.invokeExact("x", "y"));
+assertEquals("xy".hashCode(), (int) MH_hashCode.invokeExact((Object)"xy"));
+assertEquals("xy".hashCode(), (int) MH_hashCode_String.invokeExact("xy"));
+// interface method:
+MethodHandle MH_subSequence = publicLookup().findVirtual(CharSequence.class,
+  "subSequence", methodType(CharSequence.class, int.class, int.class));
+assertEquals("def", MH_subSequence.invoke("abcdefghi", 3, 6).toString());
+// constructor "internal method" must be accessed differently:
+MethodType MT_newString = methodType(void.class); //()V for new String()
+try { assertEquals("impossible", lookup()
+        .findVirtual(String.class, "<init>", MT_newString));
+ } catch (NoSuchMethodException ex) { } // OK
+MethodHandle MH_newString = publicLookup()
+  .findConstructor(String.class, MT_newString);
+assertEquals("", (String) MH_newString.invokeExact());
+{}
+    }
+
+    @Test public void testFindConstructor() throws Throwable {
+{}
+MethodHandle MH_newArrayList = publicLookup().findConstructor(
+  ArrayList.class, methodType(void.class, Collection.class));
+Collection orig = Arrays.asList("x", "y");
+Collection copy = (ArrayList) MH_newArrayList.invokeExact(orig);
+assert(orig != copy);
+assertEquals(orig, copy);
+// a variable-arity constructor:
+MethodHandle MH_newProcessBuilder = publicLookup().findConstructor(
+  ProcessBuilder.class, methodType(void.class, String[].class));
+ProcessBuilder pb = (ProcessBuilder)
+  MH_newProcessBuilder.invoke("x", "y", "z");
+assertEquals("[x, y, z]", pb.command().toString());
+{}
+    }
+
+// for testFindSpecial
+{}
+static class Listie extends ArrayList {
+  public String toString() { return "[wee Listie]"; }
+  static Lookup lookup() { return MethodHandles.lookup(); }
+}
+{}
+
+    @Test public void testFindSpecial() throws Throwable {
+{}
+// no access to constructor via invokeSpecial:
+MethodHandle MH_newListie = Listie.lookup()
+  .findConstructor(Listie.class, methodType(void.class));
+Listie l = (Listie) MH_newListie.invokeExact();
+try { assertEquals("impossible", Listie.lookup().findSpecial(
+        Listie.class, "<init>", methodType(void.class), Listie.class));
+ } catch (NoSuchMethodException ex) { } // OK
+// access to super and self methods via invokeSpecial:
+MethodHandle MH_super = Listie.lookup().findSpecial(
+  ArrayList.class, "toString" , methodType(String.class), Listie.class);
+MethodHandle MH_this = Listie.lookup().findSpecial(
+  Listie.class, "toString" , methodType(String.class), Listie.class);
+MethodHandle MH_duper = Listie.lookup().findSpecial(
+  Object.class, "toString" , methodType(String.class), Listie.class);
+assertEquals("[]", (String) MH_super.invokeExact(l));
+assertEquals(""+l, (String) MH_this.invokeExact(l));
+assertEquals("[]", (String) MH_duper.invokeExact(l)); // ArrayList method
+try { assertEquals("inaccessible", Listie.lookup().findSpecial(
+        String.class, "toString", methodType(String.class), Listie.class));
+ } catch (IllegalAccessException ex) { } // OK
+Listie subl = new Listie() { public String toString() { return "[subclass]"; } };
+assertEquals(""+l, (String) MH_this.invokeExact(subl)); // Listie method
+{}
+    }
+
     @Test public void testPermuteArguments() throws Throwable {
         {{
 {} /// JAVADOC
@@ -190,6 +281,28 @@
             }}
     }
 
+    @Test public void testCollectArguments() throws Throwable {
+        {{
+{} /// JAVADOC
+MethodHandle deepToString = publicLookup()
+  .findStatic(Arrays.class, "deepToString", methodType(String.class, Object[].class));
+MethodHandle ts1 = deepToString.asCollector(String[].class, 1);
+assertEquals("[strange]", (String) ts1.invokeExact("strange"));
+MethodHandle ts2 = deepToString.asCollector(String[].class, 2);
+assertEquals("[up, down]", (String) ts2.invokeExact("up", "down"));
+MethodHandle ts3 = deepToString.asCollector(String[].class, 3);
+MethodHandle ts3_ts2 = collectArguments(ts3, 1, ts2);
+assertEquals("[top, [up, down], strange]",
+             (String) ts3_ts2.invokeExact("top", "up", "down", "strange"));
+MethodHandle ts3_ts2_ts1 = collectArguments(ts3_ts2, 3, ts1);
+assertEquals("[top, [up, down], [strange]]",
+             (String) ts3_ts2_ts1.invokeExact("top", "up", "down", "strange"));
+MethodHandle ts3_ts2_ts3 = collectArguments(ts3_ts2, 1, ts3);
+assertEquals("[top, [[up, down, strange], charm], bottom]",
+             (String) ts3_ts2_ts3.invokeExact("top", "up", "down", "strange", "charm", "bottom"));
+            }}
+    }
+
     @Test public void testFoldArguments() throws Throwable {
         {{
 {} /// JAVADOC
@@ -264,6 +377,12 @@
 MethodHandle eq2 = equals.asSpreader(Object[].class, 2);
 assert( (boolean) eq2.invokeExact(new Object[]{ "me", "me" }));
 assert(!(boolean) eq2.invokeExact(new Object[]{ "me", "thee" }));
+// try to spread from anything but a 2-array:
+for (int n = 0; n <= 10; n++) {
+  Object[] badArityArgs = (n == 2 ? null : new Object[n]);
+  try { assert((boolean) eq2.invokeExact(badArityArgs) && false); }
+  catch (IllegalArgumentException ex) { } // OK
+}
 // spread both arguments from a String array:
 MethodHandle eq2s = equals.asSpreader(String[].class, 2);
 assert( (boolean) eq2s.invokeExact(new String[]{ "me", "me" }));
diff --git a/jdk/test/java/lang/invoke/MethodHandlesTest.java b/jdk/test/java/lang/invoke/MethodHandlesTest.java
index d7e3626..37da9b0 100644
--- a/jdk/test/java/lang/invoke/MethodHandlesTest.java
+++ b/jdk/test/java/lang/invoke/MethodHandlesTest.java
@@ -140,7 +140,7 @@
         Object actual   = calledLog.get(calledLog.size() - 1);
         if (expected.equals(actual) && verbosity < 9)  return;
         System.out.println("assertCalled "+name+":");
-        System.out.println("expected:   "+expected);
+        System.out.println("expected:   "+deepToString(expected));
         System.out.println("actual:     "+actual);
         System.out.println("ex. types:  "+getClasses(expected));
         System.out.println("act. types: "+getClasses(actual));
@@ -148,7 +148,25 @@
     }
     static void printCalled(MethodHandle target, String name, Object... args) {
         if (verbosity >= 3)
-            System.out.println("calling MH="+target+" to "+name+Arrays.toString(args));
+            System.out.println("calling MH="+target+" to "+name+deepToString(args));
+    }
+    static String deepToString(Object x) {
+        if (x == null)  return "null";
+        if (x instanceof Collection)
+            x = ((Collection)x).toArray();
+        if (x instanceof Object[]) {
+            Object[] ax = (Object[]) x;
+            ax = Arrays.copyOf(ax, ax.length, Object[].class);
+            for (int i = 0; i < ax.length; i++)
+                ax[i] = deepToString(ax[i]);
+            x = Arrays.deepToString(ax);
+        }
+        if (x.getClass().isArray())
+            try {
+                x = Arrays.class.getMethod("toString", x.getClass()).invoke(null, x);
+            } catch (ReflectiveOperationException ex) { throw new Error(ex); }
+        assert(!(x instanceof Object[]));
+        return x.toString();
     }
 
     static Object castToWrapper(Object value, Class<?> dst) {
@@ -230,6 +248,12 @@
                     { param = c; break; }
             }
         }
+        if (param.isArray()) {
+            Class<?> ctype = param.getComponentType();
+            Object arg = Array.newInstance(ctype, 2);
+            Array.set(arg, 0, randomArg(ctype));
+            return arg;
+        }
         if (param.isInterface() && param.isAssignableFrom(List.class))
             return Arrays.asList("#"+nextArg());
         if (param.isInterface() || param.isAssignableFrom(String.class))
@@ -253,6 +277,9 @@
             args[i] = randomArg(param);
         return args;
     }
+    static Object[] randomArgs(List<Class<?>> params) {
+        return randomArgs(params.toArray(new Class<?>[params.size()]));
+    }
 
     @SafeVarargs @SuppressWarnings("varargs")
     static <T, E extends T> T[] array(Class<T[]> atype, E... a) {
@@ -323,6 +350,11 @@
         }
         return list.asType(listType);
     }
+    /** Variation of varargsList, but with the given ptypes and rtype. */
+    static MethodHandle varargsList(List<Class<?>> ptypes, Class<?> rtype) {
+        MethodHandle list = varargsList(ptypes.size(), rtype);
+        return list.asType(MethodType.methodType(rtype, ptypes));
+    }
     private static MethodHandle LIST_TO_STRING, LIST_TO_INT;
     private static String listToString(List<?> x) { return x.toString(); }
     private static int listToInt(List<?> x) { return x.toString().hashCode(); }
@@ -363,6 +395,7 @@
         protected Example(String name) { this.name = name; }
         @SuppressWarnings("LeakingThisInConstructor")
         protected Example(int x) { this(); called("protected <init>", this, x); }
+        //Example(Void x) { does not exist; lookup elicts NoSuchMethodException }
         @Override public String toString() { return name; }
 
         public void            v0()     { called("v0", this); }
@@ -463,6 +496,9 @@
         return lookup.in(defc);
     }
 
+    /** Is findVirtual (etc.) of "&lt;init&lt;" supposed to elicit a NoSuchMethodException? */
+    final static boolean INIT_REF_CAUSES_NSME = true;
+
     @Test
     public void testFindStatic() throws Throwable {
         if (CAN_SKIP_WORKING)  return;
@@ -483,6 +519,8 @@
         testFindStatic(Example.class, Object.class, "s7", float.class, double.class);
 
         testFindStatic(false, PRIVATE, Example.class, void.class, "bogus");
+        testFindStatic(false, PRIVATE, Example.class, void.class, "<init>", int.class);
+        testFindStatic(false, PRIVATE, Example.class, void.class, "<init>", Void.class);
         testFindStatic(false, PRIVATE, Example.class, void.class, "v0");
     }
 
@@ -505,11 +543,12 @@
             target = maybeMoveIn(lookup, defc).findStatic(defc, methodName, type);
         } catch (ReflectiveOperationException ex) {
             noAccess = ex;
+            assertExceptionClass(
+                (name.contains("bogus") || INIT_REF_CAUSES_NSME && name.contains("<init>"))
+                ?   NoSuchMethodException.class
+                :   IllegalAccessException.class,
+                noAccess);
             if (verbosity >= 5)  ex.printStackTrace(System.out);
-            if (name.contains("bogus"))
-                assertTrue(noAccess instanceof NoSuchMethodException);
-            else
-                assertTrue(noAccess instanceof IllegalAccessException);
         }
         if (verbosity >= 3)
             System.out.println("findStatic "+lookup+": "+defc.getName()+"."+name+"/"+type+" => "+target
@@ -527,6 +566,13 @@
             System.out.print(':');
     }
 
+    static void assertExceptionClass(Class<? extends Throwable> expected,
+                                     Throwable actual) {
+        if (expected.isInstance(actual))  return;
+        actual.printStackTrace();
+        assertEquals(expected, actual.getClass());
+    }
+
     static final boolean DEBUG_METHOD_HANDLE_NAMES = Boolean.getBoolean("java.lang.invoke.MethodHandle.DEBUG_NAMES");
 
     // rough check of name string
@@ -556,6 +602,8 @@
         testFindVirtual(PubExample.class, void.class, "Pub/pro_v0");
 
         testFindVirtual(false, PRIVATE, Example.class, Example.class, void.class, "bogus");
+        testFindVirtual(false, PRIVATE, Example.class, Example.class, void.class, "<init>", int.class);
+        testFindVirtual(false, PRIVATE, Example.class, Example.class, void.class, "<init>", Void.class);
         testFindVirtual(false, PRIVATE, Example.class, Example.class, void.class, "s0");
 
         // test dispatch
@@ -568,6 +616,16 @@
         testFindVirtual(IntExample.Impl.class, IntExample.class, void.class, "Int/v0");
     }
 
+    @Test
+    public void testFindVirtualClone() throws Throwable {
+        // test some ad hoc system methods
+        testFindVirtual(false, PUBLIC, Object.class, Object.class, "clone");
+        testFindVirtual(true, PUBLIC, Object[].class, Object.class, "clone");
+        testFindVirtual(true, PUBLIC, int[].class, Object.class, "clone");
+        for (Class<?> cls : new Class<?>[]{ boolean[].class, long[].class, float[].class, char[].class })
+            testFindVirtual(true, PUBLIC, cls, Object.class, "clone");
+    }
+
     void testFindVirtual(Class<?> defc, Class<?> ret, String name, Class<?>... params) throws Throwable {
         Class<?> rcvc = defc;
         testFindVirtual(rcvc, defc, ret, name, params);
@@ -580,6 +638,9 @@
     void testFindVirtual(Lookup lookup, Class<?> rcvc, Class<?> defc, Class<?> ret, String name, Class<?>... params) throws Throwable {
         testFindVirtual(true, lookup, rcvc, defc, ret, name, params);
     }
+    void testFindVirtual(boolean positive, Lookup lookup, Class<?> defc, Class<?> ret, String name, Class<?>... params) throws Throwable {
+        testFindVirtual(positive, lookup, defc, defc, ret, name, params);
+    }
     void testFindVirtual(boolean positive, Lookup lookup, Class<?> rcvc, Class<?> defc, Class<?> ret, String name, Class<?>... params) throws Throwable {
         countTest(positive);
         String methodName = name.substring(1 + name.indexOf('/'));  // foo/bar => foo
@@ -591,11 +652,12 @@
             target = maybeMoveIn(lookup, defc).findVirtual(defc, methodName, type);
         } catch (ReflectiveOperationException ex) {
             noAccess = ex;
+            assertExceptionClass(
+                (name.contains("bogus") || INIT_REF_CAUSES_NSME && name.contains("<init>"))
+                ?   NoSuchMethodException.class
+                :   IllegalAccessException.class,
+                noAccess);
             if (verbosity >= 5)  ex.printStackTrace(System.out);
-            if (name.contains("bogus"))
-                assertTrue(noAccess instanceof NoSuchMethodException);
-            else
-                assertTrue(noAccess instanceof IllegalAccessException);
         }
         if (verbosity >= 3)
             System.out.println("findVirtual "+lookup+": "+defc.getName()+"."+name+"/"+type+" => "+target
@@ -618,8 +680,21 @@
         Object[] argsWithSelf = randomArgs(paramsWithSelf);
         if (selfc.isAssignableFrom(rcvc) && rcvc != selfc)  argsWithSelf[0] = randomArg(rcvc);
         printCalled(target, name, argsWithSelf);
-        target.invokeWithArguments(argsWithSelf);
-        assertCalled(name, argsWithSelf);
+        Object res = target.invokeWithArguments(argsWithSelf);
+        if (Example.class.isAssignableFrom(defc) || IntExample.class.isAssignableFrom(defc)) {
+            assertCalled(name, argsWithSelf);
+        } else if (name.equals("clone")) {
+            // Ad hoc method call outside Example.  For Object[].clone.
+            printCalled(target, name, argsWithSelf);
+            assertEquals(MethodType.methodType(Object.class, rcvc), target.type());
+            Object orig = argsWithSelf[0];
+            assertEquals(orig.getClass(), res.getClass());
+            if (res instanceof Object[])
+                assertArrayEquals((Object[])res, (Object[])argsWithSelf[0]);
+            assert(Arrays.deepEquals(new Object[]{res}, new Object[]{argsWithSelf[0]}));
+        } else {
+            assert(false) : Arrays.asList(positive, lookup, rcvc, defc, ret, name, deepToString(params));
+        }
         if (verbosity >= 1)
             System.out.print(':');
     }
@@ -632,11 +707,11 @@
         testFindSpecial(SubExample.class, Example.class, void.class, "pkg_v0");
         testFindSpecial(RemoteExample.class, PubExample.class, void.class, "Pub/pro_v0");
         // Do some negative testing:
-        testFindSpecial(false, EXAMPLE, SubExample.class, Example.class, void.class, "bogus");
-        testFindSpecial(false, PRIVATE, SubExample.class, Example.class, void.class, "bogus");
         for (Lookup lookup : new Lookup[]{ PRIVATE, EXAMPLE, PACKAGE, PUBLIC }) {
             testFindSpecial(false, lookup, Object.class, Example.class, void.class, "v0");
+            testFindSpecial(false, lookup, SubExample.class, Example.class, void.class, "bogus");
             testFindSpecial(false, lookup, SubExample.class, Example.class, void.class, "<init>", int.class);
+            testFindSpecial(false, lookup, SubExample.class, Example.class, void.class, "<init>", Void.class);
             testFindSpecial(false, lookup, SubExample.class, Example.class, void.class, "s0");
         }
     }
@@ -662,19 +737,25 @@
         countTest(positive);
         String methodName = name.substring(1 + name.indexOf('/'));  // foo/bar => foo
         MethodType type = MethodType.methodType(ret, params);
+        Lookup specialLookup = maybeMoveIn(lookup, specialCaller);
+        boolean specialAccessOK = (specialLookup.lookupClass() == specialCaller &&
+                                   (specialLookup.lookupModes() & Lookup.PRIVATE) != 0);
         MethodHandle target = null;
         Exception noAccess = null;
         try {
             if (verbosity >= 4)  System.out.println("lookup via "+lookup+" of "+defc+" "+name+type);
-            if (verbosity >= 5)  System.out.println("  lookup => "+maybeMoveIn(lookup, specialCaller));
-            target = maybeMoveIn(lookup, specialCaller).findSpecial(defc, methodName, type, specialCaller);
+            if (verbosity >= 5)  System.out.println("  lookup => "+specialLookup);
+            target = specialLookup.findSpecial(defc, methodName, type, specialCaller);
         } catch (ReflectiveOperationException ex) {
             noAccess = ex;
+            assertExceptionClass(
+                (!specialAccessOK)  // this check should happen first
+                ?   IllegalAccessException.class
+                : (name.contains("bogus") || INIT_REF_CAUSES_NSME && name.contains("<init>"))
+                ?   NoSuchMethodException.class
+                : IllegalAccessException.class,
+                noAccess);
             if (verbosity >= 5)  ex.printStackTrace(System.out);
-            if (name.contains("bogus"))
-                assertTrue(noAccess instanceof NoSuchMethodException);
-            else
-                assertTrue(noAccess instanceof IllegalAccessException);
         }
         if (verbosity >= 3)
             System.out.println("findSpecial from "+specialCaller.getName()+" to "+defc.getName()+"."+name+"/"+type+" => "+target
@@ -719,7 +800,7 @@
             target = lookup.findConstructor(defc, type);
         } catch (ReflectiveOperationException ex) {
             noAccess = ex;
-            assertTrue(noAccess instanceof IllegalAccessException);
+            assertTrue(noAccess.getClass().getName(), noAccess instanceof IllegalAccessException);
         }
         if (verbosity >= 3)
             System.out.println("findConstructor "+defc.getName()+".<init>/"+type+" => "+target
@@ -750,6 +831,8 @@
         testBind(Example.class, Object.class, "v2", int.class, Object.class);
         testBind(Example.class, Object.class, "v2", int.class, int.class);
         testBind(false, PRIVATE, Example.class, void.class, "bogus");
+        testBind(false, PRIVATE, Example.class, void.class, "<init>", int.class);
+        testBind(false, PRIVATE, Example.class, void.class, "<init>", Void.class);
         testBind(SubExample.class, void.class, "Sub/v0");
         testBind(SubExample.class, void.class, "Sub/pkg_v0");
         testBind(IntExample.Impl.class, void.class, "Int/v0");
@@ -773,11 +856,12 @@
             target = maybeMoveIn(lookup, defc).bind(receiver, methodName, type);
         } catch (ReflectiveOperationException ex) {
             noAccess = ex;
+            assertExceptionClass(
+                (name.contains("bogus") || INIT_REF_CAUSES_NSME && name.contains("<init>"))
+                ?   NoSuchMethodException.class
+                :   IllegalAccessException.class,
+                noAccess);
             if (verbosity >= 5)  ex.printStackTrace(System.out);
-            if (name.contains("bogus"))
-                assertTrue(noAccess instanceof NoSuchMethodException);
-            else
-                assertTrue(noAccess instanceof IllegalAccessException);
         }
         if (verbosity >= 3)
             System.out.println("bind "+receiver+"."+name+"/"+type+" => "+target
@@ -840,6 +924,10 @@
         countTest(positive);
         String methodName = name.substring(1 + name.indexOf('/'));  // foo/bar => foo
         MethodType type = MethodType.methodType(ret, params);
+        Lookup specialLookup = (specialCaller != null ? maybeMoveIn(lookup, specialCaller) : null);
+        boolean specialAccessOK = (specialCaller != null &&
+                                   specialLookup.lookupClass() == specialCaller &&
+                                   (specialLookup.lookupModes() & Lookup.PRIVATE) != 0);
         Method rmethod = defc.getDeclaredMethod(methodName, params);
         MethodHandle target = null;
         Exception noAccess = null;
@@ -848,16 +936,15 @@
         try {
             if (verbosity >= 4)  System.out.println("lookup via "+lookup+" of "+defc+" "+name+type);
             if (isSpecial)
-                target = maybeMoveIn(lookup, specialCaller).unreflectSpecial(rmethod, specialCaller);
+                target = specialLookup.unreflectSpecial(rmethod, specialCaller);
             else
                 target = maybeMoveIn(lookup, defc).unreflect(rmethod);
         } catch (ReflectiveOperationException ex) {
             noAccess = ex;
+            assertExceptionClass(
+                IllegalAccessException.class,  // NSME is impossible, since it was already reflected
+                noAccess);
             if (verbosity >= 5)  ex.printStackTrace(System.out);
-            if (name.contains("bogus"))
-                assertTrue(noAccess instanceof NoSuchMethodException);
-            else
-                assertTrue(noAccess instanceof IllegalAccessException);
         }
         if (verbosity >= 3)
             System.out.println("unreflect"+(isSpecial?"Special":"")+" "+defc.getName()+"."+name+"/"+type
@@ -1091,11 +1178,12 @@
         } catch (ReflectiveOperationException ex) {
             mh = null;
             noAccess = ex;
+            assertExceptionClass(
+                (fname.contains("bogus"))
+                ?   NoSuchFieldException.class
+                :   IllegalAccessException.class,
+                noAccess);
             if (verbosity >= 5)  ex.printStackTrace(System.out);
-            if (fname.contains("bogus"))
-                assertTrue(noAccess instanceof NoSuchFieldException);
-            else
-                assertTrue(noAccess instanceof IllegalAccessException);
         }
         if (verbosity >= 3)
             System.out.println("find"+(isStatic?"Static":"")+(isGetter?"Getter":"Setter")+" "+fclass.getName()+"."+fname+"/"+ftype
@@ -1753,24 +1841,24 @@
     }
 
     @Test  // SLOW
-    public void testCollectArguments() throws Throwable {
+    public void testAsCollector() throws Throwable {
         if (CAN_SKIP_WORKING)  return;
-        startTest("collectArguments");
+        startTest("asCollector");
         for (Class<?> argType : new Class<?>[]{Object.class, Integer.class, int.class}) {
             if (verbosity >= 3)
-                System.out.println("collectArguments "+argType);
+                System.out.println("asCollector "+argType);
             for (int nargs = 0; nargs < 50; nargs++) {
                 if (CAN_TEST_LIGHTLY && nargs > 11)  break;
                 for (int pos = 0; pos <= nargs; pos++) {
                     if (CAN_TEST_LIGHTLY && pos > 2 && pos < nargs-2)  continue;
                     if (nargs > 10 && pos > 4 && pos < nargs-4 && pos % 10 != 3)
                         continue;
-                    testCollectArguments(argType, pos, nargs);
+                    testAsCollector(argType, pos, nargs);
                 }
             }
         }
     }
-    public void testCollectArguments(Class<?> argType, int pos, int nargs) throws Throwable {
+    public void testAsCollector(Class<?> argType, int pos, int nargs) throws Throwable {
         countTest();
         // fake up a MH with the same type as the desired adapter:
         MethodHandle fake = varargsArray(nargs);
@@ -1917,37 +2005,108 @@
     }
 
     @Test
+    public void testCollectArguments() throws Throwable {
+        if (CAN_SKIP_WORKING)  return;
+        startTest("collectArguments");
+        testFoldOrCollectArguments(true);
+    }
+
+    @Test
     public void testFoldArguments() throws Throwable {
         if (CAN_SKIP_WORKING)  return;
         startTest("foldArguments");
-        for (int nargs = 0; nargs <= 4; nargs++) {
-            for (int fold = 0; fold <= nargs; fold++) {
-                for (int pos = 0; pos <= nargs; pos++) {
-                    testFoldArguments(nargs, pos, fold);
+        testFoldOrCollectArguments(false);
+    }
+
+    void testFoldOrCollectArguments(boolean isCollect) throws Throwable {
+        for (Class<?> lastType : new Class<?>[]{ Object.class, String.class, int.class }) {
+            for (Class<?> collectType : new Class<?>[]{ Object.class, String.class, int.class, void.class }) {
+                int maxArity = 10;
+                if (collectType != String.class)  maxArity = 5;
+                if (lastType != Object.class)  maxArity = 4;
+                for (int nargs = 0; nargs <= maxArity; nargs++) {
+                    ArrayList<Class<?>> argTypes = new ArrayList<>(Collections.nCopies(nargs, Object.class));
+                    int maxMix = 20;
+                    if (collectType != Object.class)  maxMix = 0;
+                    Map<Object,Integer> argTypesSeen = new HashMap<>();
+                    for (int mix = 0; mix <= maxMix; mix++) {
+                        if (!mixArgs(argTypes, mix, argTypesSeen))  continue;
+                        for (int collect = 0; collect <= nargs; collect++) {
+                            for (int pos = 0; pos <= nargs - collect; pos++) {
+                                testFoldOrCollectArguments(argTypes, pos, collect, collectType, lastType, isCollect);
+                            }
+                        }
+                    }
                 }
             }
         }
     }
 
-    void testFoldArguments(int nargs, int pos, int fold) throws Throwable {
-        if (pos != 0)  return;  // can fold only at pos=0 for now
+    boolean mixArgs(List<Class<?>> argTypes, int mix, Map<Object,Integer> argTypesSeen) {
+        assert(mix >= 0);
+        if (mix == 0)  return true;  // no change
+        if ((mix >>> argTypes.size()) != 0)  return false;
+        for (int i = 0; i < argTypes.size(); i++) {
+            if (i >= 31)  break;
+            boolean bit = (mix & (1 << i)) != 0;
+            if (bit) {
+                Class<?> type = argTypes.get(i);
+                if (type == Object.class)
+                    type = String.class;
+                else if (type == String.class)
+                    type = int.class;
+                else
+                    type = Object.class;
+                argTypes.set(i, type);
+            }
+        }
+        Integer prev = argTypesSeen.put(new ArrayList<>(argTypes), mix);
+        if (prev != null) {
+            if (verbosity >= 4)  System.out.println("mix "+prev+" repeated "+mix+": "+argTypes);
+            return false;
+        }
+        if (verbosity >= 3)  System.out.println("mix "+mix+" = "+argTypes);
+        return true;
+    }
+
+    void testFoldOrCollectArguments(List<Class<?>> argTypes,  // argument types minus the inserted combineType
+                                    int pos, int fold, // position and length of the folded arguments
+                                    Class<?> combineType, // type returned from the combiner
+                                    Class<?> lastType,  // type returned from the target
+                                    boolean isCollect) throws Throwable {
+        int nargs = argTypes.size();
+        if (pos != 0 && !isCollect)  return;  // can fold only at pos=0 for now
         countTest();
-        MethodHandle target = varargsList(1 + nargs);
-        MethodHandle combine = varargsList(fold).asType(MethodType.genericMethodType(fold));
-        List<Object> argsToPass = Arrays.asList(randomArgs(nargs, Object.class));
+        List<Class<?>> combineArgTypes = argTypes.subList(pos, pos + fold);
+        List<Class<?>> targetArgTypes = new ArrayList<>(argTypes);
+        if (isCollect)  // does targret see arg[pos..pos+cc-1]?
+            targetArgTypes.subList(pos, pos + fold).clear();
+        if (combineType != void.class)
+            targetArgTypes.add(pos, combineType);
+        MethodHandle target = varargsList(targetArgTypes, lastType);
+        MethodHandle combine = varargsList(combineArgTypes, combineType);
+        List<Object> argsToPass = Arrays.asList(randomArgs(argTypes));
         if (verbosity >= 3)
-            System.out.println("fold "+target+" with "+combine);
-        MethodHandle target2 = MethodHandles.foldArguments(target, combine);
+            System.out.println((isCollect ? "collect" : "fold")+" "+target+" with "+combine);
+        MethodHandle target2;
+        if (isCollect)
+            target2 = MethodHandles.collectArguments(target, pos, combine);
+        else
+            target2 = MethodHandles.foldArguments(target, combine);
         // Simulate expected effect of combiner on arglist:
-        List<Object> expected = new ArrayList<>(argsToPass);
-        List<Object> argsToFold = expected.subList(pos, pos + fold);
+        List<Object> expectedList = new ArrayList<>(argsToPass);
+        List<Object> argsToFold = expectedList.subList(pos, pos + fold);
         if (verbosity >= 3)
-            System.out.println("fold: "+argsToFold+" into "+target2);
+            System.out.println((isCollect ? "collect" : "fold")+": "+argsToFold+" into "+target2);
         Object foldedArgs = combine.invokeWithArguments(argsToFold);
-        argsToFold.add(0, foldedArgs);
+        if (isCollect)
+            argsToFold.clear();
+        if (combineType != void.class)
+            argsToFold.add(0, foldedArgs);
         Object result = target2.invokeWithArguments(argsToPass);
         if (verbosity >= 3)
             System.out.println("result: "+result);
+        Object expected = target.invokeWithArguments(expectedList);
         if (!expected.equals(result))
             System.out.println("*** fail at n/p/f = "+nargs+"/"+pos+"/"+fold+": "+argsToPass+" => "+result+" != "+expected);
         assertEquals(expected, result);
diff --git a/jdk/test/java/lang/invoke/RevealDirectTest.java b/jdk/test/java/lang/invoke/RevealDirectTest.java
index f05b190..1aa15da8 100644
--- a/jdk/test/java/lang/invoke/RevealDirectTest.java
+++ b/jdk/test/java/lang/invoke/RevealDirectTest.java
@@ -104,6 +104,9 @@
         private static Lookup localLookup() { return lookup(); }
         private static List<Member> members() { return getMembers(lookup().lookupClass()); };
     }
+    static class Nestmate {
+        private static Lookup localLookup() { return lookup(); }
+    }
 
     static boolean VERBOSE = false;
 
@@ -152,7 +155,10 @@
                                   getMembers(Method.class, "invoke"));
         mems = callerSensitive(true, publicOnly(mems));
         // CS methods cannot be looked up with publicLookup
-        testOnMembersNoLookup("testCallerSensitiveNegative", mems, publicLookup());
+        testOnMembersNoLookup("testCallerSensitiveNegative/1", mems, publicLookup());
+        // CS methods have to be revealed with a matching lookupClass
+        testOnMembersNoReveal("testCallerSensitiveNegative/2", mems, Simple.localLookup(), publicLookup());
+        testOnMembersNoReveal("testCallerSensitiveNegative/3", mems, Simple.localLookup(), Nestmate.localLookup());
     }
     @Test public void testMethodHandleNatives() throws Throwable {
         if (VERBOSE)  System.out.println("@Test testMethodHandleNatives");
@@ -703,7 +709,7 @@
             try {
                 info = revLookup.revealDirect(mh);
                 if (expectEx2)  throw new AssertionError("unexpected revelation for negative test");
-            } catch (Throwable ex2) {
+            } catch (IllegalArgumentException|SecurityException ex2) {
                 if (VERBOSE)  System.out.println("  "+variation+": "+res+" => "+mh.getClass().getName()+" => (EX2)"+ex2);
                 if (expectEx2)
                     continue;  // this is OK; we expected the reflect to fail
diff --git a/jdk/test/java/lang/invoke/TestPrivateMember.java b/jdk/test/java/lang/invoke/TestPrivateMember.java
index f2c0bc1..cf710c0 100644
--- a/jdk/test/java/lang/invoke/TestPrivateMember.java
+++ b/jdk/test/java/lang/invoke/TestPrivateMember.java
@@ -47,7 +47,10 @@
         MethodHandles.Lookup lookup = MethodHandles.lookup();
         MethodType mt = MethodType.methodType(void.class);
         try {
-            MethodHandle mh = lookup.findStatic(Class.class, "checkInitted", mt);
+            Class<?> checkInittedHolder = TestPrivateMemberPackageSibling.class;
+            // Original model:  checkInittedHolder = Class.class;
+            // Not using Class.checkInitted because it could change without notice.
+            MethodHandle mh = lookup.findStatic(checkInittedHolder, "checkInitted", mt);
             throw new RuntimeException("IllegalAccessException not thrown");
         } catch (IllegalAccessException e) {
             // okay
@@ -55,3 +58,7 @@
         }
     }
 }
+
+class TestPrivateMemberPackageSibling {
+    private static void checkInitted() { }
+}
diff --git a/jdk/test/java/lang/reflect/Parameter/BadClassFiles.java b/jdk/test/java/lang/reflect/Parameter/BadClassFiles.java
new file mode 100644
index 0000000..581d4ef
--- /dev/null
+++ b/jdk/test/java/lang/reflect/Parameter/BadClassFiles.java
@@ -0,0 +1,462 @@
+/*
+ * Copyright (c) 2013, Oracle and/or its affiliates. All rights reserved.
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * This code is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU General Public License version 2 only, as
+ * published by the Free Software Foundation.
+ *
+ * This code is distributed in the hope that it will be useful, but WITHOUT
+ * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
+ * version 2 for more details (a copy is included in the LICENSE file that
+ * accompanied this code).
+ *
+ * You should have received a copy of the GNU General Public License version
+ * 2 along with this work; if not, write to the Free Software Foundation,
+ * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
+ *
+ * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
+ * or visit www.oracle.com if you need additional information or have any
+ * questions.
+ */
+
+/*
+ * @test
+ * @run main BadClassFiles
+ * @summary The reflection API should throw the correct exceptions.
+ */
+import java.lang.Class;
+import java.lang.reflect.Method;
+import java.lang.reflect.Parameter;
+import java.lang.reflect.MalformedParametersException;
+import java.lang.ClassLoader;
+import java.lang.ClassNotFoundException;
+import java.io.File;
+import java.io.FileOutputStream;
+import java.io.IOException;
+
+public class BadClassFiles {
+    private int errors = 0;
+
+
+    /* Class files were created by compiling the following source and
+     * then editing it:
+     *
+     * public class EmptyName {
+     *     public void m(int a, int b) {}
+     * }
+     *
+     */
+    private static final byte[] EmptyName_bytes = {
+        -54,-2,-70,-66,0,0,0,52,
+        0,18,10,0,3,0,15,7,
+        0,16,7,0,17,1,0,6,
+        60,105,110,105,116,62,1,0,
+        3,40,41,86,1,0,4,67,
+        111,100,101,1,0,15,76,105,
+        110,101,78,117,109,98,101,114,
+        84,97,98,108,101,1,0,1,
+        109,1,0,5,40,73,73,41,
+        86,1,0,16,77,101,116,104,
+        111,100,80,97,114,97,109,101,
+        116,101,114,115,1,0,0,1,
+        0,1,98,1,0,10,83,111,
+        117,114,99,101,70,105,108,101,
+        1,0,14,69,109,112,116,121,
+        78,97,109,101,46,106,97,118,
+        97,12,0,4,0,5,1,0,
+        9,69,109,112,116,121,78,97,
+        109,101,1,0,16,106,97,118,
+        97,47,108,97,110,103,47,79,
+        98,106,101,99,116,0,33,0,
+        2,0,3,0,0,0,0,0,
+        2,0,1,0,4,0,5,0,
+        1,0,6,0,0,0,29,0,
+        1,0,1,0,0,0,5,42,
+        -73,0,1,-79,0,0,0,1,
+        0,7,0,0,0,6,0,1,
+        0,0,0,1,0,1,0,8,
+        0,9,0,2,0,6,0,0,
+        0,25,0,0,0,3,0,0,
+        0,1,-79,0,0,0,1,0,
+        7,0,0,0,6,0,1,0,
+        0,0,2,0,10,0,0,0,
+        9,2,0,11,0,0,0,12,
+        0,0,0,1,0,13,0,0,
+        0,2,0,14
+    };
+
+    private static final byte[] BadModifiers_bytes = {
+        -54,-2,-70,-66,0,0,0,52,
+        0,18,10,0,3,0,15,7,
+        0,16,7,0,17,1,0,6,
+        60,105,110,105,116,62,1,0,
+        3,40,41,86,1,0,4,67,
+        111,100,101,1,0,15,76,105,
+        110,101,78,117,109,98,101,114,
+        84,97,98,108,101,1,0,1,
+        109,1,0,5,40,73,73,41,
+        86,1,0,16,77,101,116,104,
+        111,100,80,97,114,97,109,101,
+        116,101,114,115,1,0,1,97,
+        1,0,1,98,1,0,10,83,
+        111,117,114,99,101,70,105,108,
+        101,1,0,17,66,97,100,77,
+        111,100,105,102,105,101,114,115,
+        46,106,97,118,97,12,0,4,
+        0,5,1,0,12,66,97,100,
+        77,111,100,105,102,105,101,114,
+        115,1,0,16,106,97,118,97,
+        47,108,97,110,103,47,79,98,
+        106,101,99,116,0,33,0,2,
+        0,3,0,0,0,0,0,2,
+        0,1,0,4,0,5,0,1,
+        0,6,0,0,0,29,0,1,
+        0,1,0,0,0,5,42,-73,
+        0,1,-79,0,0,0,1,0,
+        7,0,0,0,6,0,1,0,
+        0,0,1,0,1,0,8,0,
+        9,0,2,0,6,0,0,0,
+        25,0,0,0,3,0,0,0,
+        1,-79,0,0,0,1,0,7,
+        0,0,0,6,0,1,0,0,
+        0,2,0,10,0,0,0,9,
+        2,0,11,0,51,51,12,0,
+        0,0,1,0,13,0,0,0,
+        2,0,14
+    };
+
+    private static final byte[] BadNameIndex_bytes = {
+        -54,-2,-70,-66,0,0,0,52,
+        0,18,10,0,3,0,15,7,
+        0,16,7,0,17,1,0,6,
+        60,105,110,105,116,62,1,0,
+        3,40,41,86,1,0,4,67,
+        111,100,101,1,0,15,76,105,
+        110,101,78,117,109,98,101,114,
+        84,97,98,108,101,1,0,1,
+        109,1,0,5,40,73,73,41,
+        86,1,0,16,77,101,116,104,
+        111,100,80,97,114,97,109,101,
+        116,101,114,115,1,0,1,97,
+        1,0,1,98,1,0,10,83,
+        111,117,114,99,101,70,105,108,
+        101,1,0,17,66,97,100,78,
+        97,109,101,73,110,100,101,120,
+        46,106,97,118,97,12,0,4,
+        0,5,1,0,12,66,97,100,
+        78,97,109,101,73,110,100,101,
+        120,1,0,16,106,97,118,97,
+        47,108,97,110,103,47,79,98,
+        106,101,99,116,0,33,0,2,
+        0,3,0,0,0,0,0,2,
+        0,1,0,4,0,5,0,1,
+        0,6,0,0,0,29,0,1,
+        0,1,0,0,0,5,42,-73,
+        0,1,-79,0,0,0,1,0,
+        7,0,0,0,6,0,1,0,
+        0,0,1,0,1,0,8,0,
+        9,0,2,0,6,0,0,0,
+        25,0,0,0,3,0,0,0,
+        1,-79,0,0,0,1,0,7,
+        0,0,0,6,0,1,0,0,
+        0,2,0,10,0,0,0,9,
+        2,0,1,0,0,0,12,0,
+        0,0,1,0,13,0,0,0,
+        2,0,14
+    };
+
+    private static final byte[] NameIndexOutOfBounds_bytes = {
+        -54,-2,-70,-66,0,0,0,52,
+        0,18,10,0,3,0,15,7,
+        0,16,7,0,17,1,0,6,
+        60,105,110,105,116,62,1,0,
+        3,40,41,86,1,0,4,67,
+        111,100,101,1,0,15,76,105,
+        110,101,78,117,109,98,101,114,
+        84,97,98,108,101,1,0,1,
+        109,1,0,5,40,73,73,41,
+        86,1,0,16,77,101,116,104,
+        111,100,80,97,114,97,109,101,
+        116,101,114,115,1,0,1,97,
+        1,0,1,98,1,0,10,83,
+        111,117,114,99,101,70,105,108,
+        101,1,0,25,78,97,109,101,
+        73,110,100,101,120,79,117,116,
+        79,102,66,111,117,110,100,115,
+        46,106,97,118,97,12,0,4,
+        0,5,1,0,20,78,97,109,
+        101,73,110,100,101,120,79,117,
+        116,79,102,66,111,117,110,100,
+        115,1,0,16,106,97,118,97,
+        47,108,97,110,103,47,79,98,
+        106,101,99,116,0,33,0,2,
+        0,3,0,0,0,0,0,2,
+        0,1,0,4,0,5,0,1,
+        0,6,0,0,0,29,0,1,
+        0,1,0,0,0,5,42,-73,
+        0,1,-79,0,0,0,1,0,
+        7,0,0,0,6,0,1,0,
+        0,0,1,0,1,0,8,0,
+        9,0,2,0,6,0,0,0,
+        25,0,0,0,3,0,0,0,
+        1,-79,0,0,0,1,0,7,
+        0,0,0,6,0,1,0,0,
+        0,2,0,10,0,0,0,9,
+        2,0,-1,0,0,0,12,0,
+        0,0,1,0,13,0,0,0,
+        2,0,14
+
+    };
+
+    private static final byte[] ExtraParams_bytes = {
+        -54,-2,-70,-66,0,0,0,52,
+        0,18,10,0,3,0,15,7,
+        0,16,7,0,17,1,0,6,
+        60,105,110,105,116,62,1,0,
+        3,40,41,86,1,0,4,67,
+        111,100,101,1,0,15,76,105,
+        110,101,78,117,109,98,101,114,
+        84,97,98,108,101,1,0,1,
+        109,1,0,5,40,73,73,41,
+        86,1,0,16,77,101,116,104,
+        111,100,80,97,114,97,109,101,
+        116,101,114,115,1,0,1,97,
+        1,0,1,98,1,0,10,83,
+        111,117,114,99,101,70,105,108,
+        101,1,0,16,69,120,116,114,
+        97,80,97,114,97,109,115,46,
+        106,97,118,97,12,0,4,0,
+        5,1,0,11,69,120,116,114,
+        97,80,97,114,97,109,115,1,
+        0,16,106,97,118,97,47,108,
+        97,110,103,47,79,98,106,101,
+        99,116,0,33,0,2,0,3,
+        0,0,0,0,0,2,0,1,
+        0,4,0,5,0,1,0,6,
+        0,0,0,29,0,1,0,1,
+        0,0,0,5,42,-73,0,1,
+        -79,0,0,0,1,0,7,0,
+        0,0,6,0,1,0,0,0,
+        1,0,1,0,8,0,9,0,
+        2,0,6,0,0,0,25,0,
+        0,0,3,0,0,0,1,-79,
+        0,0,0,1,0,7,0,0,
+        0,6,0,1,0,0,0,2,
+        0,10,0,0,0,13,3,0,
+        11,0,0,0,12,0,0,0,
+        11,0,0,0,1,0,13,0,
+        0,0,2,0,14
+    };
+
+    private static final byte[] BadName1_bytes = {
+        -54,-2,-70,-66,0,0,0,52,
+        0,18,10,0,3,0,15,7,
+        0,16,7,0,17,1,0,6,
+        60,105,110,105,116,62,1,0,
+        3,40,41,86,1,0,4,67,
+        111,100,101,1,0,15,76,105,
+        110,101,78,117,109,98,101,114,
+        84,97,98,108,101,1,0,1,
+        109,1,0,5,40,73,73,41,
+        86,1,0,16,77,101,116,104,
+        111,100,80,97,114,97,109,101,
+        116,101,114,115,1,0,1,46,
+        1,0,1,98,1,0,10,83,
+        111,117,114,99,101,70,105,108,
+        101,1,0,13,66,97,100,78,
+        97,109,101,49,46,106,97,118,
+        97,12,0,4,0,5,1,0,
+        8,66,97,100,78,97,109,101,
+        49,1,0,16,106,97,118,97,
+        47,108,97,110,103,47,79,98,
+        106,101,99,116,0,33,0,2,
+        0,3,0,0,0,0,0,2,
+        0,1,0,4,0,5,0,1,
+        0,6,0,0,0,29,0,1,
+        0,1,0,0,0,5,42,-73,
+        0,1,-79,0,0,0,1,0,
+        7,0,0,0,6,0,1,0,
+        0,0,1,0,1,0,8,0,
+        9,0,2,0,6,0,0,0,
+        25,0,0,0,3,0,0,0,
+        1,-79,0,0,0,1,0,7,
+        0,0,0,6,0,1,0,0,
+        0,2,0,10,0,0,0,9,
+        2,0,11,0,0,0,12,0,
+        0,0,1,0,13,0,0,0,
+        2,0,14
+    };
+
+    private static final byte[] BadName2_bytes = {
+        -54,-2,-70,-66,0,0,0,52,
+        0,18,10,0,3,0,15,7,
+        0,16,7,0,17,1,0,6,
+        60,105,110,105,116,62,1,0,
+        3,40,41,86,1,0,4,67,
+        111,100,101,1,0,15,76,105,
+        110,101,78,117,109,98,101,114,
+        84,97,98,108,101,1,0,1,
+        109,1,0,5,40,73,73,41,
+        86,1,0,16,77,101,116,104,
+        111,100,80,97,114,97,109,101,
+        116,101,114,115,1,0,1,91,
+        1,0,1,98,1,0,10,83,
+        111,117,114,99,101,70,105,108,
+        101,1,0,13,66,97,100,78,
+        97,109,101,50,46,106,97,118,
+        97,12,0,4,0,5,1,0,
+        8,66,97,100,78,97,109,101,
+        50,1,0,16,106,97,118,97,
+        47,108,97,110,103,47,79,98,
+        106,101,99,116,0,33,0,2,
+        0,3,0,0,0,0,0,2,
+        0,1,0,4,0,5,0,1,
+        0,6,0,0,0,29,0,1,
+        0,1,0,0,0,5,42,-73,
+        0,1,-79,0,0,0,1,0,
+        7,0,0,0,6,0,1,0,
+        0,0,1,0,1,0,8,0,
+        9,0,2,0,6,0,0,0,
+        25,0,0,0,3,0,0,0,
+        1,-79,0,0,0,1,0,7,
+        0,0,0,6,0,1,0,0,
+        0,2,0,10,0,0,0,9,
+        2,0,11,0,0,0,12,0,
+        0,0,1,0,13,0,0,0,
+        2,0,14
+    };
+
+    private static final byte[] BadName3_bytes = {
+        -54,-2,-70,-66,0,0,0,52,
+        0,18,10,0,3,0,15,7,
+        0,16,7,0,17,1,0,6,
+        60,105,110,105,116,62,1,0,
+        3,40,41,86,1,0,4,67,
+        111,100,101,1,0,15,76,105,
+        110,101,78,117,109,98,101,114,
+        84,97,98,108,101,1,0,1,
+        109,1,0,5,40,73,73,41,
+        86,1,0,16,77,101,116,104,
+        111,100,80,97,114,97,109,101,
+        116,101,114,115,1,0,1,59,
+        1,0,1,98,1,0,10,83,
+        111,117,114,99,101,70,105,108,
+        101,1,0,13,66,97,100,78,
+        97,109,101,51,46,106,97,118,
+        97,12,0,4,0,5,1,0,
+        8,66,97,100,78,97,109,101,
+        51,1,0,16,106,97,118,97,
+        47,108,97,110,103,47,79,98,
+        106,101,99,116,0,33,0,2,
+        0,3,0,0,0,0,0,2,
+        0,1,0,4,0,5,0,1,
+        0,6,0,0,0,29,0,1,
+        0,1,0,0,0,5,42,-73,
+        0,1,-79,0,0,0,1,0,
+        7,0,0,0,6,0,1,0,
+        0,0,1,0,1,0,8,0,
+        9,0,2,0,6,0,0,0,
+        25,0,0,0,3,0,0,0,
+        1,-79,0,0,0,1,0,7,
+        0,0,0,6,0,1,0,0,
+        0,2,0,10,0,0,0,9,
+        2,0,11,0,0,0,12,0,
+        0,0,1,0,13,0,0,0,
+        2,0,14
+    };
+
+    private static final byte[] BadName4_bytes = {
+        -54,-2,-70,-66,0,0,0,52,
+        0,18,10,0,3,0,15,7,
+        0,16,7,0,17,1,0,6,
+        60,105,110,105,116,62,1,0,
+        3,40,41,86,1,0,4,67,
+        111,100,101,1,0,15,76,105,
+        110,101,78,117,109,98,101,114,
+        84,97,98,108,101,1,0,1,
+        109,1,0,5,40,73,73,41,
+        86,1,0,16,77,101,116,104,
+        111,100,80,97,114,97,109,101,
+        116,101,114,115,1,0,1,47,
+        1,0,1,98,1,0,10,83,
+        111,117,114,99,101,70,105,108,
+        101,1,0,13,66,97,100,78,
+        97,109,101,52,46,106,97,118,
+        97,12,0,4,0,5,1,0,
+        8,66,97,100,78,97,109,101,
+        52,1,0,16,106,97,118,97,
+        47,108,97,110,103,47,79,98,
+        106,101,99,116,0,33,0,2,
+        0,3,0,0,0,0,0,2,
+        0,1,0,4,0,5,0,1,
+        0,6,0,0,0,29,0,1,
+        0,1,0,0,0,5,42,-73,
+        0,1,-79,0,0,0,1,0,
+        7,0,0,0,6,0,1,0,
+        0,0,1,0,1,0,8,0,
+        9,0,2,0,6,0,0,0,
+        25,0,0,0,3,0,0,0,
+        1,-79,0,0,0,1,0,7,
+        0,0,0,6,0,1,0,0,
+        0,2,0,10,0,0,0,9,
+        2,0,11,0,0,0,12,0,
+        0,0,1,0,13,0,0,0,
+        2,0,14
+    };
+
+    private static class InMemoryClassLoader extends ClassLoader {
+        public Class<?> defineClass(String name, byte[] b) {
+            return defineClass(name, b, 0, b.length);
+        }
+    };
+
+    private static final InMemoryClassLoader loader = new InMemoryClassLoader();
+
+    private final Class<?>[] classes;
+
+    private BadClassFiles() throws ClassNotFoundException {
+        classes = new Class<?>[] {
+            loader.defineClass("EmptyName", EmptyName_bytes),
+            loader.defineClass("BadModifiers", BadModifiers_bytes),
+            loader.defineClass("BadNameIndex", BadNameIndex_bytes),
+            loader.defineClass("NameIndexOutOfBounds", NameIndexOutOfBounds_bytes),
+            loader.defineClass("ExtraParams", ExtraParams_bytes),
+            // Name with .
+            loader.defineClass("BadName1", BadName1_bytes),
+            // Name with [
+            loader.defineClass("BadName2", BadName2_bytes),
+            // Name with ;
+            loader.defineClass("BadName3", BadName3_bytes),
+            // Name with /
+            loader.defineClass("BadName4", BadName4_bytes)
+        };
+    }
+
+    public static void main(String... args)
+        throws NoSuchMethodException, IOException, ClassNotFoundException {
+        new BadClassFiles().run();
+    }
+
+    public void assertBadParameters(Class<?> cls) throws NoSuchMethodException {
+        try {
+            System.err.println("Trying " + cls);
+            final Method method = cls.getMethod("m", int.class, int.class);
+            final Parameter[] params = method.getParameters();
+            System.err.println("Name " + params[0].getName());
+            System.err.println("Did not see expected exception");
+            errors++;
+        } catch(MalformedParametersException e) {
+            System.err.println("Expected exception seen");
+        }
+    }
+
+    public void run() throws NoSuchMethodException {
+        for (Class<?> cls : classes)
+            assertBadParameters(cls);
+
+        if (errors != 0)
+            throw new RuntimeException(errors + " errors in test");
+    }
+}
diff --git a/jdk/test/java/lang/reflect/Parameter/GetAnnotatedTypeTest.java b/jdk/test/java/lang/reflect/Parameter/GetAnnotatedTypeTest.java
new file mode 100644
index 0000000..2fcf0b8
--- /dev/null
+++ b/jdk/test/java/lang/reflect/Parameter/GetAnnotatedTypeTest.java
@@ -0,0 +1,39 @@
+/*
+ * Copyright (c) 2013, Oracle and/or its affiliates. All rights reserved.
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * This code is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU General Public License version 2 only, as
+ * published by the Free Software Foundation.
+ *
+ * This code is distributed in the hope that it will be useful, but WITHOUT
+ * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
+ * version 2 for more details (a copy is included in the LICENSE file that
+ * accompanied this code).
+ *
+ * You should have received a copy of the GNU General Public License version
+ * 2 along with this work; if not, write to the Free Software Foundation,
+ * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
+ *
+ * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
+ * or visit www.oracle.com if you need additional information or have any
+ * questions.
+ */
+
+/*
+ * @test
+ * @compile -parameters GetAnnotatedTypeTest.java
+ * @run main GetAnnotatedTypeTest
+ * @summary javac should generate method parameters correctly.
+ */
+
+public class GetAnnotatedTypeTest {
+
+    public void meth(Object param) {}
+
+    public static void main(String[] args) throws NoSuchMethodException {
+        if (GetAnnotatedTypeTest.class.getMethod("meth", Object.class).getParameters()[0].getAnnotatedType().getType() != Object.class)
+            throw new RuntimeException("Parameter did not have the expected annotated type");
+    }
+}
diff --git a/jdk/test/java/net/PlainSocketImpl/CustomSocketImplFactory.java b/jdk/test/java/net/PlainSocketImpl/CustomSocketImplFactory.java
new file mode 100644
index 0000000..9ec1eee
--- /dev/null
+++ b/jdk/test/java/net/PlainSocketImpl/CustomSocketImplFactory.java
@@ -0,0 +1,107 @@
+/*
+ * 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 8024952
+ * @summary ClassCastException in PlainSocketImpl.accept() when using custom socketImpl
+ * @run main/othervm CustomSocketImplFactory
+ */
+
+import java.net.*;
+import java.io.*;
+
+public class CustomSocketImplFactory implements SocketImplFactory {
+
+    @Override
+    public SocketImpl createSocketImpl() {
+        try {
+            SocketImpl s = new CustomSocketImpl();
+            System.out.println("Created " + s);
+            return s;
+        } catch (Exception e) {
+            throw new RuntimeException(e);
+        }
+    }
+
+    public static void main(String[] args) throws Exception {
+
+        Socket.setSocketImplFactory(new CustomSocketImplFactory());
+        try (ServerSocket ss = new ServerSocket(0)) {
+            ss.setSoTimeout(1);
+            ss.accept();
+            System.out.println("PASS");
+        } catch (SocketTimeoutException | NullPointerException e) {
+            // Not a real socket impl
+        }
+    }
+
+    class CustomSocketImpl extends SocketImpl {
+
+        public void create(boolean stream) throws IOException {
+        }
+
+        public void connect(String host, int port) throws IOException {
+        }
+
+        public void connect(InetAddress addr, int port) throws IOException {
+        }
+
+        public void connect(SocketAddress addr, int timeout) throws IOException {
+        }
+
+        public void bind(InetAddress host, int port) throws IOException {
+        }
+
+        public void listen(int backlog) throws IOException {
+        }
+
+        public void accept(SocketImpl s) throws IOException {
+        }
+
+        public InputStream getInputStream() throws IOException {
+            return null;
+        }
+
+        public OutputStream getOutputStream() throws IOException {
+            return null;
+        }
+
+        public int available() throws IOException {
+            return 0;
+        }
+
+        public void close() throws IOException {
+        }
+
+        public void sendUrgentData(int data) throws IOException {
+        }
+
+        public Object getOption(int i) throws SocketException {
+            return null;
+        }
+
+        public void setOption(int i, Object o) throws SocketException {
+        }
+    }
+}
diff --git a/jdk/test/java/nio/file/Files/BytesAndLines.java b/jdk/test/java/nio/file/Files/BytesAndLines.java
index 15fb6a4..6c36c12 100644
--- a/jdk/test/java/nio/file/Files/BytesAndLines.java
+++ b/jdk/test/java/nio/file/Files/BytesAndLines.java
@@ -22,7 +22,9 @@
  */
 
 /* @test
- * @bug 7006126 8020669
+ * @bug 7006126 8020669 8024788
+ * @build BytesAndLines PassThroughFileSystem
+ * @run main BytesAndLines
  * @summary Unit test for methods for Files readAllBytes, readAllLines and
  *     and write methods.
  */
@@ -92,6 +94,16 @@
             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");
+        }
     }
 
 
diff --git a/jdk/test/java/security/Provider/ProviderVersionCheck.java b/jdk/test/java/security/Provider/ProviderVersionCheck.java
new file mode 100644
index 0000000..555d1df
--- /dev/null
+++ b/jdk/test/java/security/Provider/ProviderVersionCheck.java
@@ -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.
+ */
+
+import java.security.Provider;
+import java.security.Security;
+import java.lang.Exception;
+
+/*
+ * @test
+ * @bug 7122707
+ * @run main/othervm ProviderVersionCheck
+ * @summary Verify all providers in the default Providers list have the proper
+ * version for the release
+ * @author Anthony Scarpino
+ */
+
+public class ProviderVersionCheck {
+
+    public static void main(String arg[]) throws Exception{
+
+        boolean failure = false;
+
+        for (Provider p: Security.getProviders()) {
+            System.out.print(p.getName() + " ");
+            if (p.getVersion() != 1.8d) {
+                System.out.println("failed. " + "Version received was " +
+                        p.getVersion());
+                failure = true;
+            } else {
+                System.out.println("passed.");
+            }
+        }
+
+        if (failure) {
+            throw new Exception("Provider(s) failed to have the expected " +
+                    "version value.");
+        }
+    }
+
+}
diff --git a/jdk/test/java/time/tck/java/time/AbstractTCKTest.java b/jdk/test/java/time/tck/java/time/AbstractTCKTest.java
index ff7fc02..29c2aa9 100644
--- a/jdk/test/java/time/tck/java/time/AbstractTCKTest.java
+++ b/jdk/test/java/time/tck/java/time/AbstractTCKTest.java
@@ -68,6 +68,8 @@
 import java.io.ObjectStreamConstants;
 import java.io.Serializable;
 import java.lang.reflect.Field;
+import java.util.Arrays;
+import java.util.Formatter;
 
 /**
  * Base test class.
@@ -131,10 +133,10 @@
             assertEquals(dis.readByte(), ObjectStreamConstants.TC_NULL);  // no superclasses
             if (expectedBytes.length < 256) {
                 assertEquals(dis.readByte(), ObjectStreamConstants.TC_BLOCKDATA);
-                assertEquals(dis.readUnsignedByte(), expectedBytes.length);
+                assertEquals(dis.readUnsignedByte(), expectedBytes.length, "blockdata length incorrect");
             } else {
                 assertEquals(dis.readByte(), ObjectStreamConstants.TC_BLOCKDATALONG);
-                assertEquals(dis.readInt(), expectedBytes.length);
+                assertEquals(dis.readInt(), expectedBytes.length, "blockdatalong length incorrect");
             }
             byte[] input = new byte[expectedBytes.length];
             dis.readFully(input);
@@ -162,4 +164,33 @@
         }
     }
 
+
+    /**
+     * Utility method to dump a byte array in a java syntax.
+     * @param bytes and array of bytes
+     * @return a string containing the bytes formatted in java syntax
+     */
+    protected static String dumpSerialStream(byte[] bytes) {
+        StringBuilder sb = new StringBuilder(bytes.length * 5);
+        Formatter fmt = new Formatter(sb);
+        fmt.format("    byte[] bytes = {" );
+        final int linelen = 10;
+        for (int i = 0; i < bytes.length; i++) {
+            if (i % linelen == 0) {
+                fmt.format("%n        ");
+            }
+            fmt.format(" %3d,", bytes[i] & 0xff);
+            if ((i % linelen) == (linelen-1) || i == bytes.length - 1) {
+                fmt.format("  /*");
+                int s = i / linelen * linelen;
+                int k = i % linelen;
+                for (int j = 0; j <= k && s + j < bytes.length; j++) {
+                    fmt.format(" %c", bytes[s + j] & 0xff);
+                }
+                fmt.format(" */");
+            }
+        }
+        fmt.format("%n    };%n");
+        return sb.toString();
+    }
 }
diff --git a/jdk/test/java/time/tck/java/time/TCKClock_Fixed.java b/jdk/test/java/time/tck/java/time/TCKClock_Fixed.java
index ef9f12a..3dc567d 100644
--- a/jdk/test/java/time/tck/java/time/TCKClock_Fixed.java
+++ b/jdk/test/java/time/tck/java/time/TCKClock_Fixed.java
@@ -80,12 +80,6 @@
     private static final ZoneId PARIS = ZoneId.of("Europe/Paris");
     private static final Instant INSTANT = LocalDateTime.of(2008, 6, 30, 11, 30, 10, 500).atZone(ZoneOffset.ofHours(2)).toInstant();
 
-    //-----------------------------------------------------------------------
-    public void test_isSerializable() throws IOException, ClassNotFoundException {
-        assertSerializable(Clock.fixed(INSTANT, ZoneOffset.UTC));
-        assertSerializable(Clock.fixed(INSTANT, PARIS));
-    }
-
     //-------------------------------------------------------------------------
     public void test_fixed_InstantZoneId() {
         Clock test = Clock.fixed(INSTANT, PARIS);
diff --git a/jdk/test/java/time/tck/java/time/TCKClock_Offset.java b/jdk/test/java/time/tck/java/time/TCKClock_Offset.java
index 3bab2ac..644c1a6 100644
--- a/jdk/test/java/time/tck/java/time/TCKClock_Offset.java
+++ b/jdk/test/java/time/tck/java/time/TCKClock_Offset.java
@@ -62,7 +62,6 @@
 import static org.testng.Assert.assertEquals;
 import static org.testng.Assert.assertSame;
 
-import java.io.IOException;
 import java.time.Clock;
 import java.time.Duration;
 import java.time.Instant;
@@ -84,11 +83,6 @@
     private static final Duration OFFSET = Duration.ofSeconds(2);
 
     //-----------------------------------------------------------------------
-    public void test_isSerializable() throws IOException, ClassNotFoundException {
-        assertSerializable(Clock.offset(Clock.system(PARIS), OFFSET));
-    }
-
-    //-----------------------------------------------------------------------
     public void test_offset_ClockDuration() {
         Clock test = Clock.offset(Clock.fixed(INSTANT, PARIS), OFFSET);
         //System.out.println(test.instant());
diff --git a/jdk/test/java/time/tck/java/time/TCKClock_System.java b/jdk/test/java/time/tck/java/time/TCKClock_System.java
index b5440b2..94f3b57 100644
--- a/jdk/test/java/time/tck/java/time/TCKClock_System.java
+++ b/jdk/test/java/time/tck/java/time/TCKClock_System.java
@@ -62,7 +62,6 @@
 import static org.testng.Assert.assertEquals;
 import static org.testng.Assert.fail;
 
-import java.io.IOException;
 import java.time.Clock;
 import java.time.Instant;
 import java.time.ZoneId;
@@ -80,13 +79,6 @@
     private static final ZoneId PARIS = ZoneId.of("Europe/Paris");
 
     //-----------------------------------------------------------------------
-    public void test_isSerializable() throws IOException, ClassNotFoundException {
-        assertSerializable(Clock.systemUTC());
-        assertSerializable(Clock.systemDefaultZone());
-        assertSerializable(Clock.system(PARIS));
-    }
-
-    //-----------------------------------------------------------------------
     public void test_instant() {
         Clock system = Clock.systemUTC();
         assertEquals(system.getZone(), ZoneOffset.UTC);
diff --git a/jdk/test/java/time/tck/java/time/TCKClock_Tick.java b/jdk/test/java/time/tck/java/time/TCKClock_Tick.java
index b245d14..c221237 100644
--- a/jdk/test/java/time/tck/java/time/TCKClock_Tick.java
+++ b/jdk/test/java/time/tck/java/time/TCKClock_Tick.java
@@ -62,7 +62,6 @@
 import static org.testng.Assert.assertEquals;
 import static org.testng.Assert.assertSame;
 
-import java.io.IOException;
 import java.time.Clock;
 import java.time.Duration;
 import java.time.Instant;
@@ -81,16 +80,7 @@
 
     private static final ZoneId MOSCOW = ZoneId.of("Europe/Moscow");
     private static final ZoneId PARIS = ZoneId.of("Europe/Paris");
-    private static final Duration AMOUNT = Duration.ofSeconds(2);
     private static final ZonedDateTime ZDT = LocalDateTime.of(2008, 6, 30, 11, 30, 10, 500).atZone(ZoneOffset.ofHours(2));
-    private static final Instant INSTANT = ZDT.toInstant();
-
-    //-----------------------------------------------------------------------
-    public void test_isSerializable() throws IOException, ClassNotFoundException {
-        assertSerializable(Clock.tickSeconds(PARIS));
-        assertSerializable(Clock.tickMinutes(MOSCOW));
-        assertSerializable(Clock.tick(Clock.fixed(INSTANT, PARIS), AMOUNT));
-    }
 
     //-----------------------------------------------------------------------
     public void test_tick_ClockDuration_250millis() {
diff --git a/jdk/test/java/time/tck/java/time/TCKDuration.java b/jdk/test/java/time/tck/java/time/TCKDuration.java
index bae2cf6..c12e914 100644
--- a/jdk/test/java/time/tck/java/time/TCKDuration.java
+++ b/jdk/test/java/time/tck/java/time/TCKDuration.java
@@ -77,6 +77,7 @@
 import java.time.DateTimeException;
 import java.time.Duration;
 import java.time.Instant;
+import java.time.LocalDate;
 import java.time.LocalDateTime;
 import java.time.LocalTime;
 import java.time.Period;
@@ -104,26 +105,6 @@
     private static final long CYCLE_SECS = 146097L * 86400L;
 
     //-----------------------------------------------------------------------
-    @Test
-    public void test_serialization() throws Exception {
-        assertSerializable(Duration.ofHours(5));
-        assertSerializable(Duration.ofHours(0));
-        assertSerializable(Duration.ofHours(-5));
-    }
-
-    @Test
-    public void test_serialization_format() throws Exception {
-        ByteArrayOutputStream baos = new ByteArrayOutputStream();
-        try (DataOutputStream dos = new DataOutputStream(baos) ) {
-            dos.writeByte(1);
-            dos.writeLong(654321);
-            dos.writeInt(123456789);
-        }
-        byte[] bytes = baos.toByteArray();
-        assertSerializedBySer(Duration.ofSeconds(654321, 123456789), bytes);
-    }
-
-    //-----------------------------------------------------------------------
     // constants
     //-----------------------------------------------------------------------
     @Test
@@ -863,10 +844,17 @@
         assertEquals(Duration.between(end, start), Duration.between(start, end).negated());
     }
 
-    @Test(expectedExceptions=DateTimeException.class)
+    @Test
     public void factory_between_TemporalTemporal_mixedTypes() {
         Instant start = Instant.ofEpochSecond(1);
         ZonedDateTime end = Instant.ofEpochSecond(4).atZone(ZoneOffset.UTC);
+        assertEquals(Duration.between(start, end), Duration.ofSeconds(3));
+    }
+
+    @Test(expectedExceptions=DateTimeException.class)
+    public void factory_between_TemporalTemporal_invalidMixedTypes() {
+        Instant start = Instant.ofEpochSecond(1);
+        LocalDate end = LocalDate.of(2010, 6, 20);
         Duration.between(start, end);
     }
 
diff --git a/jdk/test/java/time/tck/java/time/TCKInstant.java b/jdk/test/java/time/tck/java/time/TCKInstant.java
index 05d7b83..bf6ac9e 100644
--- a/jdk/test/java/time/tck/java/time/TCKInstant.java
+++ b/jdk/test/java/time/tck/java/time/TCKInstant.java
@@ -84,6 +84,7 @@
 import java.time.Duration;
 import java.time.Instant;
 import java.time.LocalDateTime;
+import java.time.LocalTime;
 import java.time.OffsetDateTime;
 import java.time.ZoneId;
 import java.time.ZoneOffset;
@@ -155,24 +156,6 @@
     }
 
     //-----------------------------------------------------------------------
-    @Test
-    public void test_serialization() throws Exception {
-        assertSerializable(Instant.ofEpochMilli(134l));
-    }
-
-    @Test
-    public void test_serialization_format() throws Exception {
-        ByteArrayOutputStream baos = new ByteArrayOutputStream();
-        try (DataOutputStream dos = new DataOutputStream(baos) ) {
-            dos.writeByte(2);
-            dos.writeLong(654321);
-            dos.writeInt(123456789);
-        }
-        byte[] bytes = baos.toByteArray();
-        assertSerializedBySer(Instant.ofEpochSecond(654321, 123456789), bytes);
-    }
-
-    //-----------------------------------------------------------------------
     private void check(Instant instant, long epochSecs, int nos) {
         assertEquals(instant.getEpochSecond(), epochSecs);
         assertEquals(instant.getNano(), nos);
@@ -1818,7 +1801,7 @@
     }
 
     @Test(dataProvider="periodUntilUnit")
-    public void test_periodUntil_TemporalUnit(long seconds1, int nanos1, long seconds2, long nanos2, TemporalUnit unit, long expected) {
+    public void test_until_TemporalUnit(long seconds1, int nanos1, long seconds2, long nanos2, TemporalUnit unit, long expected) {
         Instant i1 = Instant.ofEpochSecond(seconds1, nanos1);
         Instant i2 = Instant.ofEpochSecond(seconds2, nanos2);
         long amount = i1.until(i2, unit);
@@ -1826,25 +1809,46 @@
     }
 
     @Test(dataProvider="periodUntilUnit")
-    public void test_periodUntil_TemporalUnit_negated(long seconds1, int nanos1, long seconds2, long nanos2, TemporalUnit unit, long expected) {
+    public void test_until_TemporalUnit_negated(long seconds1, int nanos1, long seconds2, long nanos2, TemporalUnit unit, long expected) {
         Instant i1 = Instant.ofEpochSecond(seconds1, nanos1);
         Instant i2 = Instant.ofEpochSecond(seconds2, nanos2);
         long amount = i2.until(i1, unit);
         assertEquals(amount, -expected);
     }
 
+    @Test(dataProvider="periodUntilUnit")
+    public void test_until_TemporalUnit_between(long seconds1, int nanos1, long seconds2, long nanos2, TemporalUnit unit, long expected) {
+        Instant i1 = Instant.ofEpochSecond(seconds1, nanos1);
+        Instant i2 = Instant.ofEpochSecond(seconds2, nanos2);
+        long amount = unit.between(i1, i2);
+        assertEquals(amount, expected);
+    }
+
+    @Test
+    public void test_until_convertedType() {
+        Instant start = Instant.ofEpochSecond(12, 3000);
+        OffsetDateTime end = start.plusSeconds(2).atOffset(ZoneOffset.ofHours(2));
+        assertEquals(start.until(end, SECONDS), 2);
+    }
+
+    @Test(expectedExceptions=DateTimeException.class)
+    public void test_until_invalidType() {
+        Instant start = Instant.ofEpochSecond(12, 3000);
+        start.until(LocalTime.of(11, 30), SECONDS);
+    }
+
     @Test(expectedExceptions = UnsupportedTemporalTypeException.class)
-    public void test_periodUntil_TemporalUnit_unsupportedUnit() {
+    public void test_until_TemporalUnit_unsupportedUnit() {
         TEST_12345_123456789.until(TEST_12345_123456789, MONTHS);
     }
 
     @Test(expectedExceptions = NullPointerException.class)
-    public void test_periodUntil_TemporalUnit_nullEnd() {
+    public void test_until_TemporalUnit_nullEnd() {
         TEST_12345_123456789.until(null, HOURS);
     }
 
     @Test(expectedExceptions = NullPointerException.class)
-    public void test_periodUntil_TemporalUnit_nullUnit() {
+    public void test_until_TemporalUnit_nullUnit() {
         TEST_12345_123456789.until(TEST_12345_123456789, null);
     }
 
diff --git a/jdk/test/java/time/tck/java/time/TCKLocalDate.java b/jdk/test/java/time/tck/java/time/TCKLocalDate.java
index 597dd4f..cb41a70 100644
--- a/jdk/test/java/time/tck/java/time/TCKLocalDate.java
+++ b/jdk/test/java/time/tck/java/time/TCKLocalDate.java
@@ -196,28 +196,6 @@
         return list;
     }
 
-
-    //-----------------------------------------------------------------------
-    @Test
-    public void test_serialization() throws Exception {
-        assertSerializable(TEST_2007_07_15);
-        assertSerializable(LocalDate.MIN);
-        assertSerializable(LocalDate.MAX);
-    }
-
-    @Test
-    public void test_serialization_format() throws Exception {
-        ByteArrayOutputStream baos = new ByteArrayOutputStream();
-        try (DataOutputStream dos = new DataOutputStream(baos) ) {
-            dos.writeByte(3);
-            dos.writeInt(2012);
-            dos.writeByte(9);
-            dos.writeByte(16);
-        }
-        byte[] bytes = baos.toByteArray();
-        assertSerializedBySer(LocalDate.of(2012, 9, 16), bytes);
-    }
-
     //-----------------------------------------------------------------------
     private void check(LocalDate test, int y, int m, int d) {
         assertEquals(test.getYear(), y);
@@ -1745,29 +1723,48 @@
     }
 
     @Test(dataProvider="periodUntilUnit")
-    public void test_periodUntil_TemporalUnit(LocalDate date1, LocalDate date2, TemporalUnit unit, long expected) {
+    public void test_until_TemporalUnit(LocalDate date1, LocalDate date2, TemporalUnit unit, long expected) {
         long amount = date1.until(date2, unit);
         assertEquals(amount, expected);
     }
 
     @Test(dataProvider="periodUntilUnit")
-    public void test_periodUntil_TemporalUnit_negated(LocalDate date1, LocalDate date2, TemporalUnit unit, long expected) {
+    public void test_until_TemporalUnit_negated(LocalDate date1, LocalDate date2, TemporalUnit unit, long expected) {
         long amount = date2.until(date1, unit);
         assertEquals(amount, -expected);
     }
 
+    @Test(dataProvider="periodUntilUnit")
+    public void test_until_TemporalUnit_between(LocalDate date1, LocalDate date2, TemporalUnit unit, long expected) {
+        long amount = unit.between(date1, date2);
+        assertEquals(amount, expected);
+    }
+
+    @Test
+    public void test_until_convertedType() {
+        LocalDate start = LocalDate.of(2010, 6, 30);
+        OffsetDateTime end = start.plusDays(2).atStartOfDay().atOffset(OFFSET_PONE);
+        assertEquals(start.until(end, DAYS), 2);
+    }
+
+    @Test(expectedExceptions=DateTimeException.class)
+    public void test_until_invalidType() {
+        LocalDate start = LocalDate.of(2010, 6, 30);
+        start.until(LocalTime.of(11, 30), DAYS);
+    }
+
     @Test(expectedExceptions = UnsupportedTemporalTypeException.class)
-    public void test_periodUntil_TemporalUnit_unsupportedUnit() {
+    public void test_until_TemporalUnit_unsupportedUnit() {
         TEST_2007_07_15.until(TEST_2007_07_15, HOURS);
     }
 
     @Test(expectedExceptions = NullPointerException.class)
-    public void test_periodUntil_TemporalUnit_nullEnd() {
+    public void test_until_TemporalUnit_nullEnd() {
         TEST_2007_07_15.until(null, DAYS);
     }
 
     @Test(expectedExceptions = NullPointerException.class)
-    public void test_periodUntil_TemporalUnit_nullUnit() {
+    public void test_until_TemporalUnit_nullUnit() {
         TEST_2007_07_15.until(TEST_2007_07_15, null);
     }
 
diff --git a/jdk/test/java/time/tck/java/time/TCKLocalDateTime.java b/jdk/test/java/time/tck/java/time/TCKLocalDateTime.java
index f55bdb4..62b53b3 100644
--- a/jdk/test/java/time/tck/java/time/TCKLocalDateTime.java
+++ b/jdk/test/java/time/tck/java/time/TCKLocalDateTime.java
@@ -242,31 +242,6 @@
     }
 
     //-----------------------------------------------------------------------
-    @Test
-    public void test_serialization() throws Exception {
-        assertSerializable(TEST_2007_07_15_12_30_40_987654321);
-        assertSerializable(LocalDateTime.MIN);
-        assertSerializable(LocalDateTime.MAX);
-    }
-
-    @Test
-    public void test_serialization_format() throws Exception {
-        ByteArrayOutputStream baos = new ByteArrayOutputStream();
-        try (DataOutputStream dos = new DataOutputStream(baos) ) {
-            dos.writeByte(5);
-            dos.writeInt(2012);
-            dos.writeByte(9);
-            dos.writeByte(16);
-            dos.writeByte(22);
-            dos.writeByte(17);
-            dos.writeByte(59);
-            dos.writeInt(459_000_000);
-        }
-        byte[] bytes = baos.toByteArray();
-        assertSerializedBySer(LocalDateTime.of(2012, 9, 16, 22, 17, 59, 459_000_000), bytes);
-    }
-
-    //-----------------------------------------------------------------------
     // constants
     //-----------------------------------------------------------------------
     @Test
@@ -2920,24 +2895,43 @@
     }
 
     @Test(dataProvider="periodUntilUnit")
-    public void test_periodUntil_TemporalUnit(LocalDateTime dt1, LocalDateTime dt2, TemporalUnit unit, long expected) {
+    public void test_until_TemporalUnit(LocalDateTime dt1, LocalDateTime dt2, TemporalUnit unit, long expected) {
         long amount = dt1.until(dt2, unit);
         assertEquals(amount, expected);
     }
 
     @Test(dataProvider="periodUntilUnit")
-    public void test_periodUntil_TemporalUnit_negated(LocalDateTime dt1, LocalDateTime dt2, TemporalUnit unit, long expected) {
+    public void test_until_TemporalUnit_negated(LocalDateTime dt1, LocalDateTime dt2, TemporalUnit unit, long expected) {
         long amount = dt2.until(dt1, unit);
         assertEquals(amount, -expected);
     }
 
+    @Test(dataProvider="periodUntilUnit")
+    public void test_until_TemporalUnit_between(LocalDateTime dt1, LocalDateTime dt2, TemporalUnit unit, long expected) {
+        long amount = unit.between(dt1, dt2);
+        assertEquals(amount, expected);
+    }
+
+    @Test
+    public void test_until_convertedType() {
+        LocalDateTime start = LocalDateTime.of(2010, 6, 30, 2, 30);
+        OffsetDateTime end = start.plusDays(2).atOffset(OFFSET_PONE);
+        assertEquals(start.until(end, DAYS), 2);
+    }
+
+    @Test(expectedExceptions=DateTimeException.class)
+    public void test_until_invalidType() {
+        LocalDateTime start = LocalDateTime.of(2010, 6, 30, 2, 30);
+        start.until(LocalTime.of(11, 30), DAYS);
+    }
+
     @Test(expectedExceptions = NullPointerException.class)
-    public void test_periodUntil_TemporalUnit_nullEnd() {
+    public void test_until_TemporalUnit_nullEnd() {
         TEST_2007_07_15_12_30_40_987654321.until(null, HOURS);
     }
 
     @Test(expectedExceptions = NullPointerException.class)
-    public void test_periodUntil_TemporalUnit_nullUnit() {
+    public void test_until_TemporalUnit_nullUnit() {
         TEST_2007_07_15_12_30_40_987654321.until(TEST_2007_07_15_12_30_40_987654321, null);
     }
 
diff --git a/jdk/test/java/time/tck/java/time/TCKLocalTime.java b/jdk/test/java/time/tck/java/time/TCKLocalTime.java
index dbba80d..bac3f85 100644
--- a/jdk/test/java/time/tck/java/time/TCKLocalTime.java
+++ b/jdk/test/java/time/tck/java/time/TCKLocalTime.java
@@ -191,64 +191,7 @@
     }
 
     //-----------------------------------------------------------------------
-    @Test
-    public void test_serialization() throws Exception {
-        assertSerializable(TEST_12_30_40_987654321);
-        assertSerializable(LocalTime.MIN);
-        assertSerializable(LocalTime.MAX);
-    }
 
-    @Test
-    public void test_serialization_format_h() throws Exception {
-        ByteArrayOutputStream baos = new ByteArrayOutputStream();
-        try (DataOutputStream dos = new DataOutputStream(baos) ) {
-            dos.writeByte(4);
-            dos.writeByte(-1 - 22);
-        }
-        byte[] bytes = baos.toByteArray();
-        assertSerializedBySer(LocalTime.of(22, 0), bytes);
-    }
-
-    @Test
-    public void test_serialization_format_hm() throws Exception {
-        ByteArrayOutputStream baos = new ByteArrayOutputStream();
-        try (DataOutputStream dos = new DataOutputStream(baos) ) {
-            dos.writeByte(4);
-            dos.writeByte(22);
-            dos.writeByte(-1 - 17);
-        }
-        byte[] bytes = baos.toByteArray();
-        assertSerializedBySer(LocalTime.of(22, 17), bytes);
-    }
-
-    @Test
-    public void test_serialization_format_hms() throws Exception {
-        ByteArrayOutputStream baos = new ByteArrayOutputStream();
-        try (DataOutputStream dos = new DataOutputStream(baos) ) {
-            dos.writeByte(4);
-            dos.writeByte(22);
-            dos.writeByte(17);
-            dos.writeByte(-1 - 59);
-        }
-        byte[] bytes = baos.toByteArray();
-        assertSerializedBySer(LocalTime.of(22, 17, 59), bytes);
-    }
-
-    @Test
-    public void test_serialization_format_hmsn() throws Exception {
-        ByteArrayOutputStream baos = new ByteArrayOutputStream();
-        try (DataOutputStream dos = new DataOutputStream(baos) ) {
-            dos.writeByte(4);
-            dos.writeByte(22);
-            dos.writeByte(17);
-            dos.writeByte(59);
-            dos.writeInt(459_000_000);
-        }
-        byte[] bytes = baos.toByteArray();
-        assertSerializedBySer(LocalTime.of(22, 17, 59, 459_000_000), bytes);
-    }
-
-    //-----------------------------------------------------------------------
     private void check(LocalTime test, int h, int m, int s, int n) {
         assertEquals(test.getHour(), h);
         assertEquals(test.getMinute(), m);
@@ -2028,29 +1971,48 @@
     }
 
     @Test(dataProvider="periodUntilUnit")
-    public void test_periodUntil_TemporalUnit(LocalTime time1, LocalTime time2, TemporalUnit unit, long expected) {
+    public void test_until_TemporalUnit(LocalTime time1, LocalTime time2, TemporalUnit unit, long expected) {
         long amount = time1.until(time2, unit);
         assertEquals(amount, expected);
     }
 
     @Test(dataProvider="periodUntilUnit")
-    public void test_periodUntil_TemporalUnit_negated(LocalTime time1, LocalTime time2, TemporalUnit unit, long expected) {
+    public void test_until_TemporalUnit_negated(LocalTime time1, LocalTime time2, TemporalUnit unit, long expected) {
         long amount = time2.until(time1, unit);
         assertEquals(amount, -expected);
     }
 
+    @Test(dataProvider="periodUntilUnit")
+    public void test_until_TemporalUnit_between(LocalTime time1, LocalTime time2, TemporalUnit unit, long expected) {
+        long amount = unit.between(time1, time2);
+        assertEquals(amount, expected);
+    }
+
+    @Test
+    public void test_until_convertedType() {
+        LocalTime start = LocalTime.of(11, 30);
+        LocalDateTime end = start.plusSeconds(2).atDate(LocalDate.of(2010, 6, 30));
+        assertEquals(start.until(end, SECONDS), 2);
+    }
+
+    @Test(expectedExceptions=DateTimeException.class)
+    public void test_until_invalidType() {
+        LocalTime start = LocalTime.of(11, 30);
+        start.until(LocalDate.of(2010, 6, 30), SECONDS);
+    }
+
     @Test(expectedExceptions = UnsupportedTemporalTypeException.class)
-    public void test_periodUntil_TemporalUnit_unsupportedUnit() {
+    public void test_until_TemporalUnit_unsupportedUnit() {
         TEST_12_30_40_987654321.until(TEST_12_30_40_987654321, DAYS);
     }
 
     @Test(expectedExceptions = NullPointerException.class)
-    public void test_periodUntil_TemporalUnit_nullEnd() {
+    public void test_until_TemporalUnit_nullEnd() {
         TEST_12_30_40_987654321.until(null, HOURS);
     }
 
     @Test(expectedExceptions = NullPointerException.class)
-    public void test_periodUntil_TemporalUnit_nullUnit() {
+    public void test_until_TemporalUnit_nullUnit() {
         TEST_12_30_40_987654321.until(TEST_12_30_40_987654321, null);
     }
 
diff --git a/jdk/test/java/time/tck/java/time/TCKMonthDay.java b/jdk/test/java/time/tck/java/time/TCKMonthDay.java
index f2a2b93..e9b1730 100644
--- a/jdk/test/java/time/tck/java/time/TCKMonthDay.java
+++ b/jdk/test/java/time/tck/java/time/TCKMonthDay.java
@@ -137,24 +137,6 @@
     }
 
     //-----------------------------------------------------------------------
-    @Test
-    public void test_serialization() throws ClassNotFoundException, IOException {
-        assertSerializable(TEST_07_15);
-    }
-
-    @Test
-    public void test_serialization_format() throws Exception {
-        ByteArrayOutputStream baos = new ByteArrayOutputStream();
-        try (DataOutputStream dos = new DataOutputStream(baos) ) {
-            dos.writeByte(13);       // java.time.temporal.Ser.MONTH_DAY_TYPE
-            dos.writeByte(9);
-            dos.writeByte(16);
-        }
-        byte[] bytes = baos.toByteArray();
-        assertSerializedBySer(MonthDay.of(9, 16), bytes);
-    }
-
-    //-----------------------------------------------------------------------
     void check(MonthDay test, int m, int d) {
         assertEquals(test.getMonth().getValue(), m);
         assertEquals(test.getDayOfMonth(), d);
diff --git a/jdk/test/java/time/tck/java/time/TCKOffsetDateTime.java b/jdk/test/java/time/tck/java/time/TCKOffsetDateTime.java
index 7cfc2a6..0ced814 100644
--- a/jdk/test/java/time/tck/java/time/TCKOffsetDateTime.java
+++ b/jdk/test/java/time/tck/java/time/TCKOffsetDateTime.java
@@ -91,6 +91,13 @@
 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.FOREVER;
+import static java.time.temporal.ChronoUnit.HALF_DAYS;
+import static java.time.temporal.ChronoUnit.HOURS;
+import static java.time.temporal.ChronoUnit.MICROS;
+import static java.time.temporal.ChronoUnit.MILLIS;
+import static java.time.temporal.ChronoUnit.MINUTES;
+import static java.time.temporal.ChronoUnit.MONTHS;
 import static java.time.temporal.ChronoUnit.NANOS;
 import static java.time.temporal.ChronoUnit.SECONDS;
 import static org.testng.Assert.assertEquals;
@@ -210,43 +217,6 @@
     }
 
     //-----------------------------------------------------------------------
-    @Test
-    public void test_serialization() throws Exception {
-        assertSerializable(TEST_2008_6_30_11_30_59_000000500);
-        assertSerializable(OffsetDateTime.MIN);
-        assertSerializable(OffsetDateTime.MAX);
-    }
-
-    @Test
-    public void test_serialization_format() throws Exception {
-        ByteArrayOutputStream baos = new ByteArrayOutputStream();
-        try (DataOutputStream dos = new DataOutputStream(baos) ) {
-            dos.writeByte(10);       // java.time.Ser.OFFSET_DATE_TIME_TYPE
-        }
-        byte[] bytes = baos.toByteArray();
-        ByteArrayOutputStream baosDateTime = new ByteArrayOutputStream();
-        try (DataOutputStream dos = new DataOutputStream(baosDateTime) ) {
-            dos.writeByte(5);
-            dos.writeInt(2012);
-            dos.writeByte(9);
-            dos.writeByte(16);
-            dos.writeByte(22);
-            dos.writeByte(17);
-            dos.writeByte(59);
-            dos.writeInt(464_000_000);
-        }
-        byte[] bytesDateTime = baosDateTime.toByteArray();
-        ByteArrayOutputStream baosOffset = new ByteArrayOutputStream();
-        try (DataOutputStream dos = new DataOutputStream(baosOffset) ) {
-            dos.writeByte(8);
-            dos.writeByte(4);  // quarter hours stored: 3600 / 900
-        }
-        byte[] bytesOffset = baosOffset.toByteArray();
-        LocalDateTime ldt = LocalDateTime.of(2012, 9, 16, 22, 17, 59, 464_000_000);
-        assertSerializedBySer(OffsetDateTime.of(ldt, ZoneOffset.ofHours(1)), bytes, bytesDateTime, bytesOffset);
-    }
-
-    //-----------------------------------------------------------------------
     // constants
     //-----------------------------------------------------------------------
     @Test
@@ -1166,6 +1136,74 @@
     }
 
     //-----------------------------------------------------------------------
+    // until(Temporal, TemporalUnit)
+    //-----------------------------------------------------------------------
+    @DataProvider(name="periodUntilUnit")
+    Object[][] data_untilUnit() {
+        return new Object[][] {
+                {OffsetDateTime.of(2010, 6, 30, 1, 1, 1, 0, OFFSET_PONE), OffsetDateTime.of(2010, 6, 30, 13, 1, 1, 0, OFFSET_PONE), HALF_DAYS, 1},
+                {OffsetDateTime.of(2010, 6, 30, 1, 1, 1, 0, OFFSET_PONE), OffsetDateTime.of(2010, 6, 30, 2, 1, 1, 0, OFFSET_PONE), HOURS, 1},
+                {OffsetDateTime.of(2010, 6, 30, 1, 1, 1, 0, OFFSET_PONE), OffsetDateTime.of(2010, 6, 30, 2, 1, 1, 0, OFFSET_PONE), MINUTES, 60},
+                {OffsetDateTime.of(2010, 6, 30, 1, 1, 1, 0, OFFSET_PONE), OffsetDateTime.of(2010, 6, 30, 2, 1, 1, 0, OFFSET_PONE), SECONDS, 3600},
+                {OffsetDateTime.of(2010, 6, 30, 1, 1, 1, 0, OFFSET_PONE), OffsetDateTime.of(2010, 6, 30, 2, 1, 1, 0, OFFSET_PONE), MILLIS, 3600*1000},
+                {OffsetDateTime.of(2010, 6, 30, 1, 1, 1, 0, OFFSET_PONE), OffsetDateTime.of(2010, 6, 30, 2, 1, 1, 0, OFFSET_PONE), MICROS, 3600*1000*1000L},
+                {OffsetDateTime.of(2010, 6, 30, 1, 1, 1, 0, OFFSET_PONE), OffsetDateTime.of(2010, 6, 30, 2, 1, 1, 0, OFFSET_PONE), NANOS, 3600*1000*1000L*1000},
+
+                {OffsetDateTime.of(2010, 6, 30, 1, 1, 1, 0, OFFSET_PONE), OffsetDateTime.of(2010, 6, 30, 14, 1, 1, 0, OFFSET_PTWO), HALF_DAYS, 1},
+                {OffsetDateTime.of(2010, 6, 30, 1, 1, 1, 0, OFFSET_PONE), OffsetDateTime.of(2010, 6, 30, 3, 1, 1, 0, OFFSET_PTWO), HOURS, 1},
+                {OffsetDateTime.of(2010, 6, 30, 1, 1, 1, 0, OFFSET_PONE), OffsetDateTime.of(2010, 6, 30, 3, 1, 1, 0, OFFSET_PTWO), MINUTES, 60},
+                {OffsetDateTime.of(2010, 6, 30, 1, 1, 1, 0, OFFSET_PONE), OffsetDateTime.of(2010, 6, 30, 3, 1, 1, 0, OFFSET_PTWO), SECONDS, 3600},
+                {OffsetDateTime.of(2010, 6, 30, 1, 1, 1, 0, OFFSET_PONE), OffsetDateTime.of(2010, 6, 30, 3, 1, 1, 0, OFFSET_PTWO), MILLIS, 3600*1000},
+                {OffsetDateTime.of(2010, 6, 30, 1, 1, 1, 0, OFFSET_PONE), OffsetDateTime.of(2010, 6, 30, 3, 1, 1, 0, OFFSET_PTWO), MICROS, 3600*1000*1000L},
+                {OffsetDateTime.of(2010, 6, 30, 1, 1, 1, 0, OFFSET_PONE), OffsetDateTime.of(2010, 6, 30, 3, 1, 1, 0, OFFSET_PTWO), NANOS, 3600*1000*1000L*1000},
+
+                {OffsetDateTime.of(2010, 6, 30, 1, 1, 1, 0, OFFSET_PONE), OffsetDateTime.of(2010, 7, 1, 1, 1, 0, 999999999, OFFSET_PONE), DAYS, 0},
+                {OffsetDateTime.of(2010, 6, 30, 1, 1, 1, 0, OFFSET_PONE), OffsetDateTime.of(2010, 7, 1, 1, 1, 1, 0, OFFSET_PONE), DAYS, 1},
+                {OffsetDateTime.of(2010, 6, 30, 1, 1, 1, 0, OFFSET_PONE), OffsetDateTime.of(2010, 8, 29, 1, 1, 1, 0, OFFSET_PONE), MONTHS, 1},
+                {OffsetDateTime.of(2010, 6, 30, 1, 1, 1, 0, OFFSET_PONE), OffsetDateTime.of(2010, 8, 30, 1, 1, 1, 0, OFFSET_PONE), MONTHS, 2},
+                {OffsetDateTime.of(2010, 6, 30, 1, 1, 1, 0, OFFSET_PONE), OffsetDateTime.of(2010, 8, 31, 1, 1, 1, 0, OFFSET_PONE), MONTHS, 2},
+        };
+    }
+
+    @Test(dataProvider="periodUntilUnit")
+    public void test_until_TemporalUnit(OffsetDateTime odt1, OffsetDateTime odt2, TemporalUnit unit, long expected) {
+        long amount = odt1.until(odt2, unit);
+        assertEquals(amount, expected);
+    }
+
+    @Test(dataProvider="periodUntilUnit")
+    public void test_until_TemporalUnit_negated(OffsetDateTime odt1, OffsetDateTime odt2, TemporalUnit unit, long expected) {
+        long amount = odt2.until(odt1, unit);
+        assertEquals(amount, -expected);
+    }
+
+    @Test(dataProvider="periodUntilUnit")
+    public void test_until_TemporalUnit_between(OffsetDateTime odt1, OffsetDateTime odt2, TemporalUnit unit, long expected) {
+        long amount = unit.between(odt1, odt2);
+        assertEquals(amount, expected);
+    }
+
+    @Test
+    public void test_until_convertedType() {
+        OffsetDateTime odt = OffsetDateTime.of(2010, 6, 30, 1, 1, 1, 0, OFFSET_PONE);
+        ZonedDateTime zdt = odt.plusSeconds(3).toZonedDateTime();
+        assertEquals(odt.until(zdt, SECONDS), 3);
+    }
+
+    @Test(expectedExceptions=DateTimeException.class)
+    public void test_until_invalidType() {
+        OffsetDateTime odt = OffsetDateTime.of(2010, 6, 30, 1, 1, 1, 0, OFFSET_PONE);
+        odt.until(Instant.ofEpochSecond(12), SECONDS);
+    }
+
+    @Test(expectedExceptions=DateTimeException.class)
+    public void test_until_invalidTemporalUnit() {
+        OffsetDateTime odt1 = OffsetDateTime.of(2010, 6, 30, 1, 1, 1, 0, OFFSET_PONE);
+        OffsetDateTime odt2 = OffsetDateTime.of(2010, 6, 30, 2, 1, 1, 0, OFFSET_PONE);
+        odt1.until(odt2, FOREVER);
+    }
+
+    //-----------------------------------------------------------------------
     // format(DateTimeFormatter)
     //-----------------------------------------------------------------------
     @Test
diff --git a/jdk/test/java/time/tck/java/time/TCKOffsetTime.java b/jdk/test/java/time/tck/java/time/TCKOffsetTime.java
index b3d7e5b..5bc2312 100644
--- a/jdk/test/java/time/tck/java/time/TCKOffsetTime.java
+++ b/jdk/test/java/time/tck/java/time/TCKOffsetTime.java
@@ -184,40 +184,6 @@
     }
 
     //-----------------------------------------------------------------------
-    @Test
-    public void test_serialization() throws Exception {
-        assertSerializable(TEST_11_30_59_500_PONE);
-        assertSerializable(OffsetTime.MIN);
-        assertSerializable(OffsetTime.MAX);
-    }
-
-    @Test
-    public void test_serialization_format() throws Exception {
-        ByteArrayOutputStream baos = new ByteArrayOutputStream();
-        try (DataOutputStream dos = new DataOutputStream(baos) ) {
-            dos.writeByte(9);       // java.time.Ser.OFFSET_TIME_TYPE
-        }
-        byte[] bytes = baos.toByteArray();
-        ByteArrayOutputStream baosTime = new ByteArrayOutputStream();
-        try (DataOutputStream dos = new DataOutputStream(baosTime) ) {
-            dos.writeByte(4);
-            dos.writeByte(22);
-            dos.writeByte(17);
-            dos.writeByte(59);
-            dos.writeInt(464_000_000);
-        }
-        byte[] bytesTime = baosTime.toByteArray();
-        ByteArrayOutputStream baosOffset = new ByteArrayOutputStream();
-        try (DataOutputStream dos = new DataOutputStream(baosOffset) ) {
-            dos.writeByte(8);
-            dos.writeByte(4);  // quarter hours stored: 3600 / 900
-        }
-        byte[] bytesOffset = baosOffset.toByteArray();
-        assertSerializedBySer(OffsetTime.of(22, 17, 59, 464_000_000, ZoneOffset.ofHours(1)), bytes,
-                bytesTime, bytesOffset);
-    }
-
-    //-----------------------------------------------------------------------
     // constants
     //-----------------------------------------------------------------------
     @Test
@@ -1103,49 +1069,61 @@
     // until(Temporal, TemporalUnit)
     //-----------------------------------------------------------------------
     @DataProvider(name="periodUntilUnit")
-    Object[][] data_periodUntilUnit() {
+    Object[][] data_untilUnit() {
         return new Object[][] {
-            {OffsetTime.of(LocalTime.of(1, 1, 1), ZoneOffset.ofHours(1)), OffsetTime.of(LocalTime.of(13, 1, 1), ZoneOffset.ofHours(1)), HALF_DAYS, 1},
-            {OffsetTime.of(LocalTime.of(1, 1, 1), ZoneOffset.ofHours(1)), OffsetTime.of(LocalTime.of(2, 1, 1), ZoneOffset.ofHours(1)), HOURS, 1},
-            {OffsetTime.of(LocalTime.of(1, 1, 1), ZoneOffset.ofHours(1)), OffsetTime.of(LocalTime.of(2, 1, 1), ZoneOffset.ofHours(1)), MINUTES, 60},
-            {OffsetTime.of(LocalTime.of(1, 1, 1), ZoneOffset.ofHours(1)), OffsetTime.of(LocalTime.of(2, 1, 1), ZoneOffset.ofHours(1)), SECONDS, 3600},
-            {OffsetTime.of(LocalTime.of(1, 1, 1), ZoneOffset.ofHours(1)), OffsetTime.of(LocalTime.of(2, 1, 1), ZoneOffset.ofHours(1)), MILLIS, 3600*1000},
-            {OffsetTime.of(LocalTime.of(1, 1, 1), ZoneOffset.ofHours(1)), OffsetTime.of(LocalTime.of(2, 1, 1), ZoneOffset.ofHours(1)), MICROS, 3600*1000*1000L},
-            {OffsetTime.of(LocalTime.of(1, 1, 1), ZoneOffset.ofHours(1)), OffsetTime.of(LocalTime.of(2, 1, 1), ZoneOffset.ofHours(1)), NANOS, 3600*1000*1000L*1000},
+                {OffsetTime.of(1, 1, 1, 0, OFFSET_PONE), OffsetTime.of(13, 1, 1, 0, OFFSET_PONE), HALF_DAYS, 1},
+                {OffsetTime.of(1, 1, 1, 0, OFFSET_PONE), OffsetTime.of(2, 1, 1, 0, OFFSET_PONE), HOURS, 1},
+                {OffsetTime.of(1, 1, 1, 0, OFFSET_PONE), OffsetTime.of(2, 1, 1, 0, OFFSET_PONE), MINUTES, 60},
+                {OffsetTime.of(1, 1, 1, 0, OFFSET_PONE), OffsetTime.of(2, 1, 1, 0, OFFSET_PONE), SECONDS, 3600},
+                {OffsetTime.of(1, 1, 1, 0, OFFSET_PONE), OffsetTime.of(2, 1, 1, 0, OFFSET_PONE), MILLIS, 3600*1000},
+                {OffsetTime.of(1, 1, 1, 0, OFFSET_PONE), OffsetTime.of(2, 1, 1, 0, OFFSET_PONE), MICROS, 3600*1000*1000L},
+                {OffsetTime.of(1, 1, 1, 0, OFFSET_PONE), OffsetTime.of(2, 1, 1, 0, OFFSET_PONE), NANOS, 3600*1000*1000L*1000},
 
-            {OffsetTime.of(LocalTime.of(1, 1, 1), ZoneOffset.ofHours(1)), OffsetTime.of(LocalTime.of(14, 1, 1), ZoneOffset.ofHours(2)), HALF_DAYS, 1},
-            {OffsetTime.of(LocalTime.of(1, 1, 1), ZoneOffset.ofHours(1)), OffsetTime.of(LocalTime.of(3, 1, 1), ZoneOffset.ofHours(2)), HOURS, 1},
-            {OffsetTime.of(LocalTime.of(1, 1, 1), ZoneOffset.ofHours(1)), OffsetTime.of(LocalTime.of(3, 1, 1), ZoneOffset.ofHours(2)), MINUTES, 60},
-            {OffsetTime.of(LocalTime.of(1, 1, 1), ZoneOffset.ofHours(1)), OffsetTime.of(LocalTime.of(3, 1, 1), ZoneOffset.ofHours(2)), SECONDS, 3600},
-            {OffsetTime.of(LocalTime.of(1, 1, 1), ZoneOffset.ofHours(1)), OffsetTime.of(LocalTime.of(3, 1, 1), ZoneOffset.ofHours(2)), MILLIS, 3600*1000},
-            {OffsetTime.of(LocalTime.of(1, 1, 1), ZoneOffset.ofHours(1)), OffsetTime.of(LocalTime.of(3, 1, 1), ZoneOffset.ofHours(2)), MICROS, 3600*1000*1000L},
-            {OffsetTime.of(LocalTime.of(1, 1, 1), ZoneOffset.ofHours(1)), OffsetTime.of(LocalTime.of(3, 1, 1), ZoneOffset.ofHours(2)), NANOS, 3600*1000*1000L*1000},
+                {OffsetTime.of(1, 1, 1, 0, OFFSET_PONE), OffsetTime.of(14, 1, 1, 0, OFFSET_PTWO), HALF_DAYS, 1},
+                {OffsetTime.of(1, 1, 1, 0, OFFSET_PONE), OffsetTime.of(3, 1, 1, 0, OFFSET_PTWO), HOURS, 1},
+                {OffsetTime.of(1, 1, 1, 0, OFFSET_PONE), OffsetTime.of(3, 1, 1, 0, OFFSET_PTWO), MINUTES, 60},
+                {OffsetTime.of(1, 1, 1, 0, OFFSET_PONE), OffsetTime.of(3, 1, 1, 0, OFFSET_PTWO), SECONDS, 3600},
+                {OffsetTime.of(1, 1, 1, 0, OFFSET_PONE), OffsetTime.of(3, 1, 1, 0, OFFSET_PTWO), MILLIS, 3600*1000},
+                {OffsetTime.of(1, 1, 1, 0, OFFSET_PONE), OffsetTime.of(3, 1, 1, 0, OFFSET_PTWO), MICROS, 3600*1000*1000L},
+                {OffsetTime.of(1, 1, 1, 0, OFFSET_PONE), OffsetTime.of(3, 1, 1, 0, OFFSET_PTWO), NANOS, 3600*1000*1000L*1000},
         };
     }
 
     @Test(dataProvider="periodUntilUnit")
-    public void test_periodUntil_TemporalUnit(OffsetTime offsetTime1, OffsetTime offsetTime2, TemporalUnit unit, long expected) {
+    public void test_until_TemporalUnit(OffsetTime offsetTime1, OffsetTime offsetTime2, TemporalUnit unit, long expected) {
         long amount = offsetTime1.until(offsetTime2, unit);
         assertEquals(amount, expected);
     }
 
     @Test(dataProvider="periodUntilUnit")
-    public void test_periodUntil_TemporalUnit_negated(OffsetTime offsetTime1, OffsetTime offsetTime2, TemporalUnit unit, long expected) {
+    public void test_until_TemporalUnit_negated(OffsetTime offsetTime1, OffsetTime offsetTime2, TemporalUnit unit, long expected) {
         long amount = offsetTime2.until(offsetTime1, unit);
         assertEquals(amount, -expected);
     }
 
-    @Test(expectedExceptions=DateTimeException.class)
-    public void test_periodUntil_InvalidType() {
-        OffsetTime offsetTime = OffsetTime.of(LocalTime.of(1, 1, 1), ZoneOffset.ofHours(1));
-        OffsetDateTime offsetDateTime = offsetTime.atDate(LocalDate.of(1980, 2, 10));
-        offsetTime.until(offsetDateTime, SECONDS);
+    @Test(dataProvider="periodUntilUnit")
+    public void test_until_TemporalUnit_between(OffsetTime offsetTime1, OffsetTime offsetTime2, TemporalUnit unit, long expected) {
+        long amount = unit.between(offsetTime1, offsetTime2);
+        assertEquals(amount, expected);
+    }
+
+    @Test
+    public void test_until_convertedType() {
+        OffsetTime offsetTime = OffsetTime.of(1, 1, 1, 0, OFFSET_PONE);
+        OffsetDateTime offsetDateTime = offsetTime.plusSeconds(3).atDate(LocalDate.of(1980, 2, 10));
+        assertEquals(offsetTime.until(offsetDateTime, SECONDS), 3);
     }
 
     @Test(expectedExceptions=DateTimeException.class)
-    public void test_periodUntil_InvalidTemporalUnit() {
-        OffsetTime offsetTime1 = OffsetTime.of(LocalTime.of(1, 1, 1), ZoneOffset.ofHours(1));
-        OffsetTime offsetTime2 = OffsetTime.of(LocalTime.of(2, 1, 1), ZoneOffset.ofHours(1));
+    public void test_until_invalidType() {
+        OffsetTime offsetTime = OffsetTime.of(1, 1, 1, 0, OFFSET_PONE);
+        offsetTime.until(LocalDate.of(1980, 2, 10), SECONDS);
+    }
+
+    @Test(expectedExceptions=DateTimeException.class)
+    public void test_until_invalidTemporalUnit() {
+        OffsetTime offsetTime1 = OffsetTime.of(1, 1, 1, 0, OFFSET_PONE);
+        OffsetTime offsetTime2 = OffsetTime.of(2, 1, 1, 0, OFFSET_PONE);
         offsetTime1.until(offsetTime2, MONTHS);
     }
 
diff --git a/jdk/test/java/time/tck/java/time/TCKPeriod.java b/jdk/test/java/time/tck/java/time/TCKPeriod.java
index 7a06b95..7743512 100644
--- a/jdk/test/java/time/tck/java/time/TCKPeriod.java
+++ b/jdk/test/java/time/tck/java/time/TCKPeriod.java
@@ -60,6 +60,7 @@
 package tck.java.time;
 
 import static java.time.temporal.ChronoUnit.DAYS;
+import static java.time.temporal.ChronoUnit.HOURS;
 import static java.time.temporal.ChronoUnit.YEARS;
 import static org.testng.Assert.assertEquals;
 
@@ -67,6 +68,7 @@
 import java.time.Duration;
 import java.time.LocalDate;
 import java.time.Period;
+import java.time.chrono.ThaiBuddhistChronology;
 import java.time.format.DateTimeParseException;
 import java.time.temporal.ChronoUnit;
 import java.time.temporal.Temporal;
@@ -87,14 +89,6 @@
 public class TCKPeriod extends AbstractTCKTest {
 
     //-----------------------------------------------------------------------
-    @Test
-    public void test_serialization() throws Exception {
-        assertSerializable(Period.ZERO);
-        assertSerializable(Period.ofDays(1));
-        assertSerializable(Period.of(1, 2, 3));
-    }
-
-    //-----------------------------------------------------------------------
     // ofYears(int)
     //-----------------------------------------------------------------------
     @Test
@@ -221,6 +215,41 @@
     }
 
     @Test(expectedExceptions = DateTimeException.class)
+    public void factory_from_TemporalAmount_DaysHours() {
+        TemporalAmount amount = new TemporalAmount() {
+            @Override
+            public long get(TemporalUnit unit) {
+                if (unit == DAYS) {
+                    return 1;
+                } else {
+                    return 2;
+                }
+            }
+            @Override
+            public List<TemporalUnit> getUnits() {
+                List<TemporalUnit> list = new ArrayList<>();
+                list.add(DAYS);
+                list.add(HOURS);
+                return list;
+            }
+            @Override
+            public Temporal addTo(Temporal temporal) {
+                throw new UnsupportedOperationException();
+            }
+            @Override
+            public Temporal subtractFrom(Temporal temporal) {
+                throw new UnsupportedOperationException();
+            }
+        };
+        Period.from(amount);
+    }
+
+    @Test(expectedExceptions = DateTimeException.class)
+    public void factory_from_TemporalAmount_NonISO() {
+        Period.from(ThaiBuddhistChronology.INSTANCE.period(1, 1, 1));
+    }
+
+    @Test(expectedExceptions = DateTimeException.class)
     public void factory_from_TemporalAmount_Duration() {
         Period.from(Duration.ZERO);
     }
@@ -602,10 +631,45 @@
     }
 
     @Test(dataProvider="plus")
-    public void test_plus(Period base, Period add, Period expected) {
+    public void test_plus_TemporalAmount(Period base, Period add, Period expected) {
         assertEquals(base.plus(add), expected);
     }
 
+    @Test(expectedExceptions = DateTimeException.class)
+    public void test_plus_TemporalAmount_nonISO() {
+        pymd(4, 5, 6).plus(ThaiBuddhistChronology.INSTANCE.period(1, 0, 0));
+    }
+
+    @Test(expectedExceptions = DateTimeException.class)
+    public void test_plus_TemporalAmount_DaysHours() {
+        TemporalAmount amount = new TemporalAmount() {
+            @Override
+            public long get(TemporalUnit unit) {
+                if (unit == DAYS) {
+                    return 1;
+                } else {
+                    return 2;
+                }
+            }
+            @Override
+            public List<TemporalUnit> getUnits() {
+                List<TemporalUnit> list = new ArrayList<>();
+                list.add(DAYS);
+                list.add(HOURS);
+                return list;
+            }
+            @Override
+            public Temporal addTo(Temporal temporal) {
+                throw new UnsupportedOperationException();
+            }
+            @Override
+            public Temporal subtractFrom(Temporal temporal) {
+                throw new UnsupportedOperationException();
+            }
+        };
+        pymd(4, 5, 6).plus(amount);
+    }
+
     //-----------------------------------------------------------------------
     // plusYears()
     //-----------------------------------------------------------------------
@@ -712,10 +776,45 @@
     }
 
     @Test(dataProvider="minus")
-    public void test_minus(Period base, Period subtract, Period expected) {
+    public void test_minus_TemporalAmount(Period base, Period subtract, Period expected) {
         assertEquals(base.minus(subtract), expected);
     }
 
+    @Test(expectedExceptions = DateTimeException.class)
+    public void test_minus_TemporalAmount_nonISO() {
+        pymd(4, 5, 6).minus(ThaiBuddhistChronology.INSTANCE.period(1, 0, 0));
+    }
+
+    @Test(expectedExceptions = DateTimeException.class)
+    public void test_minus_TemporalAmount_DaysHours() {
+        TemporalAmount amount = new TemporalAmount() {
+            @Override
+            public long get(TemporalUnit unit) {
+                if (unit == DAYS) {
+                    return 1;
+                } else {
+                    return 2;
+                }
+            }
+            @Override
+            public List<TemporalUnit> getUnits() {
+                List<TemporalUnit> list = new ArrayList<>();
+                list.add(DAYS);
+                list.add(HOURS);
+                return list;
+            }
+            @Override
+            public Temporal addTo(Temporal temporal) {
+                throw new UnsupportedOperationException();
+            }
+            @Override
+            public Temporal subtractFrom(Temporal temporal) {
+                throw new UnsupportedOperationException();
+            }
+        };
+        pymd(4, 5, 6).minus(amount);
+    }
+
     //-----------------------------------------------------------------------
     // minusYears()
     //-----------------------------------------------------------------------
diff --git a/jdk/test/java/time/tck/java/time/TCKYear.java b/jdk/test/java/time/tck/java/time/TCKYear.java
index 53f0db0..59d464a 100644
--- a/jdk/test/java/time/tck/java/time/TCKYear.java
+++ b/jdk/test/java/time/tck/java/time/TCKYear.java
@@ -65,10 +65,8 @@
 import static java.time.temporal.ChronoUnit.CENTURIES;
 import static java.time.temporal.ChronoUnit.DAYS;
 import static java.time.temporal.ChronoUnit.DECADES;
-import static java.time.temporal.ChronoUnit.HOURS;
 import static java.time.temporal.ChronoUnit.MILLENNIA;
 import static java.time.temporal.ChronoUnit.MONTHS;
-import static java.time.temporal.ChronoUnit.WEEKS;
 import static java.time.temporal.ChronoUnit.YEARS;
 import static org.testng.Assert.assertEquals;
 import static org.testng.Assert.assertTrue;
@@ -90,8 +88,8 @@
 import java.time.YearMonth;
 import java.time.ZoneId;
 import java.time.ZoneOffset;
-import java.time.chrono.IsoEra;
 import java.time.chrono.IsoChronology;
+import java.time.chrono.IsoEra;
 import java.time.format.DateTimeFormatter;
 import java.time.format.DateTimeParseException;
 import java.time.temporal.ChronoField;
@@ -152,25 +150,6 @@
     }
 
     //-----------------------------------------------------------------------
-    @Test
-    public void test_serialization() throws Exception {
-        assertSerializable(Year.of(2));
-        assertSerializable(Year.of(0));
-        assertSerializable(Year.of(-2));
-    }
-
-    @Test
-    public void test_serialization_format() throws Exception {
-        ByteArrayOutputStream baos = new ByteArrayOutputStream();
-        try (DataOutputStream dos = new DataOutputStream(baos) ) {
-            dos.writeByte(11);       // java.time.temporal.Ser.YEAR_TYPE
-            dos.writeInt(2012);
-        }
-        byte[] bytes = baos.toByteArray();
-        assertSerializedBySer(Year.of(2012), bytes);
-    }
-
-    //-----------------------------------------------------------------------
     // now()
     //-----------------------------------------------------------------------
     @Test
@@ -248,17 +227,17 @@
 
     //-----------------------------------------------------------------------
     @Test
-    public void test_factory_CalendricalObject() {
+    public void test_from_TemporalAccessor() {
         assertEquals(Year.from(LocalDate.of(2007, 7, 15)), Year.of(2007));
     }
 
     @Test(expectedExceptions=DateTimeException.class)
-    public void test_factory_CalendricalObject_invalid_noDerive() {
+    public void test_from_TemporalAccessor_invalid_noDerive() {
         Year.from(LocalTime.of(12, 30));
     }
 
     @Test(expectedExceptions=NullPointerException.class)
-    public void test_factory_CalendricalObject_null() {
+    public void test_from_TemporalAccessor_null() {
         Year.from((TemporalAccessor) null);
     }
 
@@ -616,13 +595,13 @@
         };
     }
 
-    @Test(groups={"tck"}, dataProvider="plus_long_TemporalUnit")
+    @Test(dataProvider="plus_long_TemporalUnit")
     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 {
             try {
-                Year result = base.plus(amount, unit);
+                base.plus(amount, unit);
                 fail();
             } catch (Exception ex) {
                 assertTrue(expectedEx.isInstance(ex));
@@ -748,7 +727,7 @@
         };
     }
 
-    @Test(groups={"tck"}, dataProvider="minus_long_TemporalUnit")
+    @Test(dataProvider="minus_long_TemporalUnit")
     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);
@@ -807,7 +786,7 @@
     //-----------------------------------------------------------------------
     // with(TemporalField, long)
     //-----------------------------------------------------------------------
-    @Test(groups={"tck"})
+    @Test
     public void test_with() {
         Year base = Year.of(5);
         Year result = base.with(ChronoField.ERA, 0);
@@ -942,29 +921,48 @@
     }
 
     @Test(dataProvider="periodUntilUnit")
-    public void test_periodUntil_TemporalUnit(Year year1, Year year2, TemporalUnit unit, long expected) {
+    public void test_until_TemporalUnit(Year year1, Year year2, TemporalUnit unit, long expected) {
         long amount = year1.until(year2, unit);
         assertEquals(amount, expected);
     }
 
     @Test(dataProvider="periodUntilUnit")
-    public void test_periodUntil_TemporalUnit_negated(Year year1, Year year2, TemporalUnit unit, long expected) {
+    public void test_until_TemporalUnit_negated(Year year1, Year year2, TemporalUnit unit, long expected) {
         long amount = year2.until(year1, unit);
         assertEquals(amount, -expected);
     }
 
+    @Test(dataProvider="periodUntilUnit")
+    public void test_until_TemporalUnit_between(Year year1, Year year2, TemporalUnit unit, long expected) {
+        long amount = unit.between(year1, year2);
+        assertEquals(amount, expected);
+    }
+
+    @Test
+    public void test_until_convertedType() {
+        Year start = Year.of(2010);
+        YearMonth end = start.plusYears(2).atMonth(Month.APRIL);
+        assertEquals(start.until(end, YEARS), 2);
+    }
+
+    @Test(expectedExceptions=DateTimeException.class)
+    public void test_until_invalidType() {
+        Year start = Year.of(2010);
+        start.until(LocalTime.of(11, 30), YEARS);
+    }
+
     @Test(expectedExceptions = UnsupportedTemporalTypeException.class)
-    public void test_periodUntil_TemporalUnit_unsupportedUnit() {
+    public void test_until_TemporalUnit_unsupportedUnit() {
         TEST_2008.until(TEST_2008, MONTHS);
     }
 
     @Test(expectedExceptions = NullPointerException.class)
-    public void test_periodUntil_TemporalUnit_nullEnd() {
+    public void test_until_TemporalUnit_nullEnd() {
         TEST_2008.until(null, DAYS);
     }
 
     @Test(expectedExceptions = NullPointerException.class)
-    public void test_periodUntil_TemporalUnit_nullUnit() {
+    public void test_until_TemporalUnit_nullUnit() {
         TEST_2008.until(TEST_2008, null);
     }
 
diff --git a/jdk/test/java/time/tck/java/time/TCKYearMonth.java b/jdk/test/java/time/tck/java/time/TCKYearMonth.java
index 66f691b..bb16839 100644
--- a/jdk/test/java/time/tck/java/time/TCKYearMonth.java
+++ b/jdk/test/java/time/tck/java/time/TCKYearMonth.java
@@ -70,7 +70,6 @@
 import static java.time.temporal.ChronoUnit.HOURS;
 import static java.time.temporal.ChronoUnit.MILLENNIA;
 import static java.time.temporal.ChronoUnit.MONTHS;
-import static java.time.temporal.ChronoUnit.WEEKS;
 import static java.time.temporal.ChronoUnit.YEARS;
 import static org.testng.Assert.assertEquals;
 import static org.testng.Assert.assertTrue;
@@ -157,24 +156,6 @@
     }
 
     //-----------------------------------------------------------------------
-    @Test
-    public void test_serialization() throws IOException, ClassNotFoundException {
-        assertSerializable(TEST_2008_06);
-    }
-
-    @Test
-    public void test_serialization_format() throws Exception {
-        ByteArrayOutputStream baos = new ByteArrayOutputStream();
-        try (DataOutputStream dos = new DataOutputStream(baos) ) {
-            dos.writeByte(12);       // java.time.temporal.Ser.YEAR_MONTH_TYPE
-            dos.writeInt(2012);
-            dos.writeByte(9);
-        }
-        byte[] bytes = baos.toByteArray();
-        assertSerializedBySer(YearMonth.of(2012, 9), bytes);
-    }
-
-    //-----------------------------------------------------------------------
     void check(YearMonth test, int y, int m) {
         assertEquals(test.getYear(), y);
         assertEquals(test.getMonth().getValue(), m);
@@ -288,17 +269,17 @@
 
     //-----------------------------------------------------------------------
     @Test
-    public void test_factory_CalendricalObject() {
+    public void test_from_TemporalAccessor() {
         assertEquals(YearMonth.from(LocalDate.of(2007, 7, 15)), YearMonth.of(2007, 7));
     }
 
     @Test(expectedExceptions=DateTimeException.class)
-    public void test_factory_CalendricalObject_invalid_noDerive() {
+    public void test_from_TemporalAccessor_invalid_noDerive() {
         YearMonth.from(LocalTime.of(12, 30));
     }
 
     @Test(expectedExceptions=NullPointerException.class)
-    public void test_factory_CalendricalObject_null() {
+    public void test_from_TemporalAccessor_null() {
         YearMonth.from((TemporalAccessor) null);
     }
 
@@ -786,7 +767,7 @@
         };
     }
 
-    @Test(groups={"tck"}, dataProvider="plus_long_TemporalUnit")
+    @Test(dataProvider="plus_long_TemporalUnit")
     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);
@@ -838,7 +819,7 @@
         };
     }
 
-    @Test(groups={"tck"}, dataProvider="plus_TemporalAmount")
+    @Test(dataProvider="plus_TemporalAmount")
     public void test_plus_TemporalAmount(YearMonth base, TemporalAmount temporalAmount, YearMonth expectedYearMonth, Class expectedEx) {
         if (expectedEx == null) {
             assertEquals(base.plus(temporalAmount), expectedYearMonth);
@@ -1001,7 +982,7 @@
         };
     }
 
-    @Test(groups={"tck"}, dataProvider="minus_long_TemporalUnit")
+    @Test(dataProvider="minus_long_TemporalUnit")
     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);
@@ -1053,7 +1034,7 @@
         };
     }
 
-    @Test(groups={"tck"}, dataProvider="minus_TemporalAmount")
+    @Test(dataProvider="minus_TemporalAmount")
     public void test_minus_TemporalAmount(YearMonth base, TemporalAmount temporalAmount, YearMonth expectedYearMonth, Class expectedEx) {
         if (expectedEx == null) {
             assertEquals(base.minus(temporalAmount), expectedYearMonth);
@@ -1261,29 +1242,48 @@
     }
 
     @Test(dataProvider="periodUntilUnit")
-    public void test_periodUntil_TemporalUnit(YearMonth ym1, YearMonth ym2, TemporalUnit unit, long expected) {
+    public void test_until_TemporalUnit(YearMonth ym1, YearMonth ym2, TemporalUnit unit, long expected) {
         long amount = ym1.until(ym2, unit);
         assertEquals(amount, expected);
     }
 
     @Test(dataProvider="periodUntilUnit")
-    public void test_periodUntil_TemporalUnit_negated(YearMonth ym1, YearMonth ym2, TemporalUnit unit, long expected) {
+    public void test_until_TemporalUnit_negated(YearMonth ym1, YearMonth ym2, TemporalUnit unit, long expected) {
         long amount = ym2.until(ym1, unit);
         assertEquals(amount, -expected);
     }
 
+    @Test(dataProvider="periodUntilUnit")
+    public void test_until_TemporalUnit_between(YearMonth ym1, YearMonth ym2, TemporalUnit unit, long expected) {
+        long amount = unit.between(ym1, ym2);
+        assertEquals(amount, expected);
+    }
+
+    @Test
+    public void test_until_convertedType() {
+        YearMonth start = YearMonth.of(2010, 6);
+        LocalDate end = start.plusMonths(2).atDay(12);
+        assertEquals(start.until(end, MONTHS), 2);
+    }
+
+    @Test(expectedExceptions=DateTimeException.class)
+    public void test_until_invalidType() {
+        YearMonth start = YearMonth.of(2010, 6);
+        start.until(LocalTime.of(11, 30), MONTHS);
+    }
+
     @Test(expectedExceptions = UnsupportedTemporalTypeException.class)
-    public void test_periodUntil_TemporalUnit_unsupportedUnit() {
+    public void test_until_TemporalUnit_unsupportedUnit() {
         TEST_2008_06.until(TEST_2008_06, HOURS);
     }
 
     @Test(expectedExceptions = NullPointerException.class)
-    public void test_periodUntil_TemporalUnit_nullEnd() {
+    public void test_until_TemporalUnit_nullEnd() {
         TEST_2008_06.until(null, DAYS);
     }
 
     @Test(expectedExceptions = NullPointerException.class)
-    public void test_periodUntil_TemporalUnit_nullUnit() {
+    public void test_until_TemporalUnit_nullUnit() {
         TEST_2008_06.until(TEST_2008_06, null);
     }
 
diff --git a/jdk/test/java/time/tck/java/time/TCKZoneId.java b/jdk/test/java/time/tck/java/time/TCKZoneId.java
index c63b393..0d47403 100644
--- a/jdk/test/java/time/tck/java/time/TCKZoneId.java
+++ b/jdk/test/java/time/tck/java/time/TCKZoneId.java
@@ -93,110 +93,6 @@
 public class TCKZoneId extends AbstractTCKTest {
 
     //-----------------------------------------------------------------------
-    @Test
-    public void test_serialization() throws Exception {
-        assertSerializable(ZoneId.of("Europe/London"));
-        assertSerializable(ZoneId.of("America/Chicago"));
-    }
-
-    @Test
-    public void test_serialization_format() throws Exception {
-        ByteArrayOutputStream baos = new ByteArrayOutputStream();
-        try (DataOutputStream dos = new DataOutputStream(baos) ) {
-            dos.writeByte(7);
-            dos.writeUTF("Europe/London");
-        }
-        byte[] bytes = baos.toByteArray();
-        assertSerializedBySer(ZoneId.of("Europe/London"), bytes);
-    }
-
-    @Test
-    public void test_deserialization_lenient_characters() throws Exception {
-        // an ID can be loaded without validation during deserialization
-        String id = "QWERTYUIOPASDFGHJKLZXCVBNM~/._+-";
-        ZoneId deser = deserialize(id);
-        // getId, equals, hashCode, toString and normalized are OK
-        assertEquals(deser.getId(), id);
-        assertEquals(deser.toString(), id);
-        assertEquals(deser, deser);
-        assertEquals(deser.hashCode(), deser.hashCode());
-        assertEquals(deser.normalized(), deser);
-        // getting the rules is not
-        try {
-            deser.getRules();
-            fail();
-        } catch (ZoneRulesException ex) {
-            // expected
-        }
-    }
-
-    @Test(expectedExceptions=DateTimeException.class)
-    public void test_deserialization_lenient_badCharacters() throws Exception {
-        // an ID can be loaded without validation during deserialization
-        // but there is a check to ensure the ID format is valid
-        deserialize("|!?");
-    }
-
-    @Test(dataProvider="offsetBasedValid")
-    public void test_deserialization_lenient_offsetNotAllowed_noPrefix(String input, String resolvedId) throws Exception {
-        ZoneId deserialized = deserialize(input);
-        assertEquals(deserialized, ZoneId.of(input));
-        assertEquals(deserialized, ZoneId.of(resolvedId));
-    }
-
-    @Test(dataProvider="offsetBasedValidPrefix")
-    public void test_deserialization_lenient_offsetNotAllowed_prefixUTC(String input, String resolvedId, String offsetId) throws Exception {
-        ZoneId deserialized = deserialize("UTC" + input);
-        assertEquals(deserialized, ZoneId.of("UTC" + input));
-        assertEquals(deserialized, ZoneId.of("UTC" + resolvedId));
-    }
-
-    @Test(dataProvider="offsetBasedValidPrefix")
-    public void test_deserialization_lenient_offsetNotAllowed_prefixGMT(String input, String resolvedId, String offsetId) throws Exception {
-        ZoneId deserialized = deserialize("GMT" + input);
-        assertEquals(deserialized, ZoneId.of("GMT" + input));
-        assertEquals(deserialized, ZoneId.of("GMT" + resolvedId));
-    }
-
-    @Test(dataProvider="offsetBasedValidPrefix")
-    public void test_deserialization_lenient_offsetNotAllowed_prefixUT(String input, String resolvedId, String offsetId) throws Exception {
-        ZoneId deserialized = deserialize("UT" + input);
-        assertEquals(deserialized, ZoneId.of("UT" + input));
-        assertEquals(deserialized, ZoneId.of("UT" + resolvedId));
-    }
-
-    private ZoneId deserialize(String id) throws Exception {
-        String serClass = ZoneId.class.getPackage().getName() + ".Ser";
-        Class<?> serCls = Class.forName(serClass);
-        Field field = serCls.getDeclaredField("serialVersionUID");
-        field.setAccessible(true);
-        long serVer = (Long) field.get(null);
-        ByteArrayOutputStream baos = new ByteArrayOutputStream();
-        try (DataOutputStream dos = new DataOutputStream(baos)) {
-            dos.writeShort(ObjectStreamConstants.STREAM_MAGIC);
-            dos.writeShort(ObjectStreamConstants.STREAM_VERSION);
-            dos.writeByte(ObjectStreamConstants.TC_OBJECT);
-            dos.writeByte(ObjectStreamConstants.TC_CLASSDESC);
-            dos.writeUTF(serClass);
-            dos.writeLong(serVer);
-            dos.writeByte(ObjectStreamConstants.SC_EXTERNALIZABLE | ObjectStreamConstants.SC_BLOCK_DATA);
-            dos.writeShort(0);  // number of fields
-            dos.writeByte(ObjectStreamConstants.TC_ENDBLOCKDATA);  // end of classdesc
-            dos.writeByte(ObjectStreamConstants.TC_NULL);  // no superclasses
-            dos.writeByte(ObjectStreamConstants.TC_BLOCKDATA);
-            dos.writeByte(1 + 2 + id.length());  // length of data (1 byte + 2 bytes UTF length + 32 bytes UTF)
-            dos.writeByte(7);  // ZoneId
-            dos.writeUTF(id);
-            dos.writeByte(ObjectStreamConstants.TC_ENDBLOCKDATA);  // end of blockdata
-        }
-        ZoneId deser = null;
-        try (ObjectInputStream ois = new ObjectInputStream(new ByteArrayInputStream(baos.toByteArray()))) {
-            deser = (ZoneId) ois.readObject();
-        }
-        return deser;
-    }
-
-    //-----------------------------------------------------------------------
     // OLD_SHORT_IDS
     //-----------------------------------------------------------------------
     public void test_constant_OLD_IDS_PRE_2005() {
diff --git a/jdk/test/java/time/tck/java/time/TCKZoneOffset.java b/jdk/test/java/time/tck/java/time/TCKZoneOffset.java
index 94f2eb5..cf9098a 100644
--- a/jdk/test/java/time/tck/java/time/TCKZoneOffset.java
+++ b/jdk/test/java/time/tck/java/time/TCKZoneOffset.java
@@ -121,46 +121,6 @@
     }
 
     //-----------------------------------------------------------------------
-    @Test
-    public void test_serialization() throws Exception {
-        assertSerializable(ZoneOffset.of("+01:30"));
-    }
-
-    @Test
-    public void test_serialization_format_quarterPositive() throws Exception {
-        ByteArrayOutputStream baos = new ByteArrayOutputStream();
-        try (DataOutputStream dos = new DataOutputStream(baos) ) {
-            dos.writeByte(8);
-            dos.writeByte(6);  // stored as quarter hours
-        }
-        byte[] bytes = baos.toByteArray();
-        assertSerializedBySer(ZoneOffset.ofHoursMinutes(1, 30), bytes);
-    }
-
-    @Test
-    public void test_serialization_format_quarterNegative() throws Exception {
-        ByteArrayOutputStream baos = new ByteArrayOutputStream();
-        try (DataOutputStream dos = new DataOutputStream(baos) ) {
-            dos.writeByte(8);
-            dos.writeByte(-10);  // stored as quarter hours
-        }
-        byte[] bytes = baos.toByteArray();
-        assertSerializedBySer(ZoneOffset.ofHoursMinutes(-2, -30), bytes);
-    }
-
-    @Test
-    public void test_serialization_format_full() throws Exception {
-        ByteArrayOutputStream baos = new ByteArrayOutputStream();
-        try (DataOutputStream dos = new DataOutputStream(baos) ) {
-            dos.writeByte(8);
-            dos.writeByte(127);
-            dos.writeInt(53265);
-        }
-        byte[] bytes = baos.toByteArray();
-        assertSerializedBySer(ZoneOffset.ofTotalSeconds(53265), bytes);
-    }
-
-    //-----------------------------------------------------------------------
     // constants
     //-----------------------------------------------------------------------
     @Test
diff --git a/jdk/test/java/time/tck/java/time/TCKZonedDateTime.java b/jdk/test/java/time/tck/java/time/TCKZonedDateTime.java
index d1db67f..4c5319d 100644
--- a/jdk/test/java/time/tck/java/time/TCKZonedDateTime.java
+++ b/jdk/test/java/time/tck/java/time/TCKZonedDateTime.java
@@ -223,54 +223,6 @@
     }
 
     //-----------------------------------------------------------------------
-    @Test
-    public void test_serialization() throws ClassNotFoundException, IOException {
-        assertSerializable(TEST_DATE_TIME);
-    }
-
-    @Test
-    public void test_serialization_format_zoneId() throws Exception {
-        ByteArrayOutputStream baos = new ByteArrayOutputStream();
-        try (DataOutputStream dos = new DataOutputStream(baos) ) {
-            dos.writeByte(6);
-            dos.writeInt(2012); // date
-            dos.writeByte(9);
-            dos.writeByte(16);
-            dos.writeByte(22);  // time
-            dos.writeByte(17);
-            dos.writeByte(59);
-            dos.writeInt(470_000_000);
-            dos.writeByte(4);  // offset
-            dos.writeByte(7);  // zoneId
-            dos.writeUTF("Europe/London");
-        }
-        byte[] bytes = baos.toByteArray();
-        ZonedDateTime zdt = LocalDateTime.of(2012, 9, 16, 22, 17, 59, 470_000_000).atZone(ZoneId.of("Europe/London"));
-        assertSerializedBySer(zdt, bytes);
-    }
-
-    @Test
-    public void test_serialization_format_zoneOffset() throws Exception {
-        ByteArrayOutputStream baos = new ByteArrayOutputStream();
-        try (DataOutputStream dos = new DataOutputStream(baos) ) {
-            dos.writeByte(6);
-            dos.writeInt(2012); // date
-            dos.writeByte(9);
-            dos.writeByte(16);
-            dos.writeByte(22);  // time
-            dos.writeByte(17);
-            dos.writeByte(59);
-            dos.writeInt(470_000_000);
-            dos.writeByte(4);  // offset
-            dos.writeByte(8);  // zoneId
-            dos.writeByte(4);
-        }
-        byte[] bytes = baos.toByteArray();
-        ZonedDateTime zdt = LocalDateTime.of(2012, 9, 16, 22, 17, 59, 470_000_000).atZone(ZoneOffset.ofHours(1));
-        assertSerializedBySer(zdt, bytes);
-    }
-
-    //-----------------------------------------------------------------------
     // now()
     //-----------------------------------------------------------------------
     @Test
@@ -2049,7 +2001,7 @@
     // compare results to OffsetDateTime.until, especially wrt dates
 
     @Test(dataProvider="plusDays")
-    public void test_periodUntil_days(ZonedDateTime base, long expected, ZonedDateTime end) {
+    public void test_until_days(ZonedDateTime base, long expected, ZonedDateTime end) {
         if (base.toLocalTime().equals(end.toLocalTime()) == false) {
             return;  // avoid DST gap input values
         }
@@ -2057,27 +2009,27 @@
     }
 
     @Test(dataProvider="plusTime")
-    public void test_periodUntil_hours(ZonedDateTime base, long expected, ZonedDateTime end) {
+    public void test_until_hours(ZonedDateTime base, long expected, ZonedDateTime end) {
         assertEquals(base.until(end, HOURS), expected);
     }
 
     @Test(dataProvider="plusTime")
-    public void test_periodUntil_minutes(ZonedDateTime base, long expected, ZonedDateTime end) {
+    public void test_until_minutes(ZonedDateTime base, long expected, ZonedDateTime end) {
         assertEquals(base.until(end, MINUTES), expected * 60);
     }
 
     @Test(dataProvider="plusTime")
-    public void test_periodUntil_seconds(ZonedDateTime base, long expected, ZonedDateTime end) {
+    public void test_until_seconds(ZonedDateTime base, long expected, ZonedDateTime end) {
         assertEquals(base.until(end, SECONDS), expected * 3600);
     }
 
     @Test(dataProvider="plusTime")
-    public void test_periodUntil_nanos(ZonedDateTime base, long expected, ZonedDateTime end) {
+    public void test_until_nanos(ZonedDateTime base, long expected, ZonedDateTime end) {
         assertEquals(base.until(end, NANOS), expected * 3600_000_000_000L);
     }
 
     @Test
-    public void test_periodUntil_parisLondon() {
+    public void test_until_parisLondon() {
         ZonedDateTime midnightLondon = LocalDate.of(2012, 6, 28).atStartOfDay(ZONE_LONDON);
         ZonedDateTime midnightParis1 = LocalDate.of(2012, 6, 29).atStartOfDay(ZONE_PARIS);
         ZonedDateTime oneAm1 = LocalDateTime.of(2012, 6, 29, 1, 0).atZone(ZONE_PARIS);
@@ -2093,7 +2045,7 @@
     }
 
     @Test
-    public void test_periodUntil_gap() {
+    public void test_until_gap() {
         ZonedDateTime before = TEST_PARIS_GAP_2008_03_30_02_30.withHour(0).withMinute(0).atZone(ZONE_PARIS);
         ZonedDateTime after = TEST_PARIS_GAP_2008_03_30_02_30.withHour(0).withMinute(0).plusDays(1).atZone(ZONE_PARIS);
 
@@ -2102,7 +2054,7 @@
     }
 
     @Test
-    public void test_periodUntil_overlap() {
+    public void test_until_overlap() {
         ZonedDateTime before = TEST_PARIS_OVERLAP_2008_10_26_02_30.withHour(0).withMinute(0).atZone(ZONE_PARIS);
         ZonedDateTime after = TEST_PARIS_OVERLAP_2008_10_26_02_30.withHour(0).withMinute(0).plusDays(1).atZone(ZONE_PARIS);
 
@@ -2111,17 +2063,17 @@
     }
 
     @Test(expectedExceptions=DateTimeException.class)
-    public void test_periodUntil_differentType() {
+    public void test_until_differentType() {
         TEST_DATE_TIME_PARIS.until(TEST_LOCAL_2008_06_30_11_30_59_500, DAYS);
     }
 
     @Test(expectedExceptions=NullPointerException.class)
-    public void test_periodUntil_nullTemporal() {
+    public void test_until_nullTemporal() {
         TEST_DATE_TIME_PARIS.until(null, DAYS);
     }
 
     @Test(expectedExceptions=NullPointerException.class)
-    public void test_periodUntil_nullUnit() {
+    public void test_until_nullUnit() {
         TEST_DATE_TIME_PARIS.until(TEST_DATE_TIME_PARIS, null);
     }
 
diff --git a/jdk/test/java/time/tck/java/time/chrono/CopticDate.java b/jdk/test/java/time/tck/java/time/chrono/CopticDate.java
index eca228a..c0da697 100644
--- a/jdk/test/java/time/tck/java/time/chrono/CopticDate.java
+++ b/jdk/test/java/time/tck/java/time/chrono/CopticDate.java
@@ -297,18 +297,12 @@
     }
 
     @Override
-    public long until(Temporal endDateTime, TemporalUnit unit) {
-        if (endDateTime instanceof ChronoLocalDate == false) {
-            throw new DateTimeException("Unable to calculate period between objects of two different types");
-        }
-        ChronoLocalDate end = (ChronoLocalDate) endDateTime;
-        if (getChronology().equals(end.getChronology()) == false) {
-            throw new DateTimeException("Unable to calculate period between two different chronologies");
-        }
+    public long until(Temporal endExclusive, TemporalUnit unit) {
+        CopticDate end = getChronology().date(endExclusive);
         if (unit instanceof ChronoUnit) {
             return LocalDate.from(this).until(end, unit);  // TODO: this is wrong
         }
-        return unit.between(this, endDateTime);
+        return unit.between(this, end);
     }
 
     @Override
@@ -354,4 +348,27 @@
                 .append(dom < 10 ? "-0" : "-").append(dom);
         return buf.toString();
     }
+
+    @Override
+    public boolean equals(Object obj) {
+        if (this == obj) {
+            return true;
+        }
+        if (obj instanceof CopticDate) {
+            CopticDate cd = (CopticDate)obj;
+            if (this.prolepticYear == cd.prolepticYear &&
+                    this.month == cd.month &&
+                    this.day == cd.day) {
+                return true;
+            }
+        }
+        return false;
+    }
+
+    @Override
+    public int hashCode() {
+        long epDay = toEpochDay();
+        return getChronology().hashCode() ^ ((int) (epDay ^ (epDay >>> 32)));
+    }
+
 }
diff --git a/jdk/test/java/time/tck/java/time/chrono/TCKChronoLocalDate.java b/jdk/test/java/time/tck/java/time/chrono/TCKChronoLocalDate.java
index 92f083e..3200135 100644
--- a/jdk/test/java/time/tck/java/time/chrono/TCKChronoLocalDate.java
+++ b/jdk/test/java/time/tck/java/time/chrono/TCKChronoLocalDate.java
@@ -306,23 +306,6 @@
         }
     }
 
-    //-----------------------------------------------------------------------
-    // Test Serialization of Calendars
-    //-----------------------------------------------------------------------
-    @Test( dataProvider="calendars")
-    public void test_ChronoSerialization(Chronology chrono) throws Exception {
-        LocalDate ref = LocalDate.of(2013, 1, 5);
-        ChronoLocalDate orginal = chrono.date(ref);
-        ByteArrayOutputStream baos = new ByteArrayOutputStream();
-        ObjectOutputStream out = new ObjectOutputStream(baos);
-        out.writeObject(orginal);
-        out.close();
-        ByteArrayInputStream bais = new ByteArrayInputStream(baos.toByteArray());
-        ObjectInputStream in = new ObjectInputStream(bais);
-        @SuppressWarnings("unchecked")
-        ChronoLocalDate ser = (ChronoLocalDate) in.readObject();
-        assertEquals(ser, orginal, "deserialized date is wrong");
-    }
 
     //-----------------------------------------------------------------------
     @Test(dataProvider="calendars")
diff --git a/jdk/test/java/time/tck/java/time/chrono/TCKChronoLocalDateTime.java b/jdk/test/java/time/tck/java/time/chrono/TCKChronoLocalDateTime.java
index 129a190..51b68bb 100644
--- a/jdk/test/java/time/tck/java/time/chrono/TCKChronoLocalDateTime.java
+++ b/jdk/test/java/time/tck/java/time/chrono/TCKChronoLocalDateTime.java
@@ -318,23 +318,6 @@
     }
 
     //-----------------------------------------------------------------------
-    // Test Serialization of ISO via chrono API
-    //-----------------------------------------------------------------------
-    @Test( dataProvider="calendars")
-    public void test_ChronoLocalDateTimeSerialization(Chronology chrono) throws Exception {
-        LocalDateTime ref = LocalDate.of(2013, 1, 5).atTime(12, 1, 2, 3);
-        ChronoLocalDateTime<?> orginal = chrono.date(ref).atTime(ref.toLocalTime());
-        ByteArrayOutputStream baos = new ByteArrayOutputStream();
-        ObjectOutputStream out = new ObjectOutputStream(baos);
-        out.writeObject(orginal);
-        out.close();
-        ByteArrayInputStream bais = new ByteArrayInputStream(baos.toByteArray());
-        ObjectInputStream in = new ObjectInputStream(bais);
-        ChronoLocalDateTime<?> ser = (ChronoLocalDateTime<?>) in.readObject();
-        assertEquals(ser, orginal, "deserialized date is wrong");
-    }
-
-    //-----------------------------------------------------------------------
     @Test(dataProvider="calendars")
     public void test_from_TemporalAccessor(Chronology chrono) {
         LocalDateTime refDateTime = LocalDateTime.of(2013, 1, 1, 12, 30);
@@ -361,6 +344,13 @@
     }
 
     //-----------------------------------------------------------------------
+    @Test(dataProvider="calendars")
+    public void test_getChronology(Chronology chrono) {
+        ChronoLocalDateTime test = chrono.localDateTime(LocalDateTime.of(2010, 6, 30, 11, 30));
+        assertEquals(test.getChronology(), chrono);
+    }
+
+    //-----------------------------------------------------------------------
     /**
      * FixedAdjusted returns a fixed Temporal in all adjustments.
      * Construct an adjuster with the Temporal that should be returned from adjust.
diff --git a/jdk/test/java/time/tck/java/time/chrono/TCKChronoPeriod.java b/jdk/test/java/time/tck/java/time/chrono/TCKChronoPeriod.java
new file mode 100644
index 0000000..58a1c35
--- /dev/null
+++ b/jdk/test/java/time/tck/java/time/chrono/TCKChronoPeriod.java
@@ -0,0 +1,279 @@
+/*
+ * Copyright (c) 2013, Oracle and/or its affiliates. All rights reserved.
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * This code is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU General Public License version 2 only, as
+ * published by the Free Software Foundation.  Oracle designates this
+ * particular file as subject to the "Classpath" exception as provided
+ * by Oracle in the LICENSE file that accompanied this code.
+ *
+ * This code is distributed in the hope that it will be useful, but WITHOUT
+ * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
+ * version 2 for more details (a copy is included in the LICENSE file that
+ * accompanied this code).
+ *
+ * You should have received a copy of the GNU General Public License version
+ * 2 along with this work; if not, write to the Free Software Foundation,
+ * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
+ *
+ * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
+ * or visit www.oracle.com if you need additional information or have any
+ * questions.
+ */
+
+/*
+ * Copyright (c) 2013, Stephen Colebourne & Michael Nascimento Santos
+ *
+ * All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions are met:
+ *
+ *  * Redistributions of source code must retain the above copyright notice,
+ *    this list of conditions and the following disclaimer.
+ *
+ *  * Redistributions in binary form must reproduce the above copyright notice,
+ *    this list of conditions and the following disclaimer in the documentation
+ *    and/or other materials provided with the distribution.
+ *
+ *  * Neither the name of JSR-310 nor the names of its contributors
+ *    may be used to endorse or promote products derived from this software
+ *    without specific prior written permission.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+ * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
+ * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
+ * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR
+ * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
+ * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
+ * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
+ * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
+ * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
+ * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
+ * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ */
+package tck.java.time.chrono;
+
+import static java.time.temporal.ChronoUnit.DAYS;
+import static java.time.temporal.ChronoUnit.HOURS;
+import static java.time.temporal.ChronoUnit.MONTHS;
+import static java.time.temporal.ChronoUnit.YEARS;
+import static org.testng.Assert.assertEquals;
+
+import java.io.ByteArrayInputStream;
+import java.io.ByteArrayOutputStream;
+import java.io.ObjectInputStream;
+import java.io.ObjectOutputStream;
+import java.time.DateTimeException;
+import java.time.LocalDate;
+import java.time.Period;
+import java.time.chrono.ChronoLocalDate;
+import java.time.chrono.ChronoPeriod;
+import java.time.chrono.Chronology;
+import java.time.chrono.HijrahChronology;
+import java.time.chrono.IsoChronology;
+import java.time.chrono.JapaneseChronology;
+import java.time.chrono.MinguoChronology;
+import java.time.chrono.ThaiBuddhistChronology;
+import java.time.temporal.Temporal;
+import java.time.temporal.UnsupportedTemporalTypeException;
+
+import org.testng.annotations.DataProvider;
+import org.testng.annotations.Test;
+
+public class TCKChronoPeriod {
+
+    //-----------------------------------------------------------------------
+    // regular data factory for names and descriptions of available calendars
+    //-----------------------------------------------------------------------
+    @DataProvider(name = "calendars")
+    Chronology[][] data_of_calendars() {
+        return new Chronology[][]{
+                    {HijrahChronology.INSTANCE},
+                    {IsoChronology.INSTANCE},
+                    {JapaneseChronology.INSTANCE},
+                    {MinguoChronology.INSTANCE},
+                    {ThaiBuddhistChronology.INSTANCE}};
+    }
+
+    //-----------------------------------------------------------------------
+    // Test Serialization of Calendars
+    //-----------------------------------------------------------------------
+    @Test(dataProvider="calendars")
+    public void test_serialization(Chronology chrono) throws Exception {
+        ChronoPeriod period = chrono.period(1, 2, 3);
+        ByteArrayOutputStream baos = new ByteArrayOutputStream();
+        ObjectOutputStream out = new ObjectOutputStream(baos);
+        out.writeObject(period);
+        out.close();
+        ByteArrayInputStream bais = new ByteArrayInputStream(baos.toByteArray());
+
+        ObjectInputStream in = new ObjectInputStream(bais);
+        ChronoPeriod ser = (ChronoPeriod) in.readObject();
+        assertEquals(ser, period, "deserialized ChronoPeriod is wrong");
+    }
+
+    @Test(dataProvider="calendars")
+    public void test_get(Chronology chrono) {
+        ChronoPeriod period = chrono.period(1, 2, 3);
+        assertEquals(period.get(YEARS), 1);
+        assertEquals(period.get(MONTHS), 2);
+        assertEquals(period.get(DAYS), 3);
+    }
+
+    @Test(dataProvider="calendars", expectedExceptions=UnsupportedTemporalTypeException.class)
+    public void test_get_unsupported(Chronology chrono) {
+        ChronoPeriod period = chrono.period(1, 2, 3);
+        period.get(HOURS);
+    }
+
+    @Test(dataProvider="calendars")
+    public void test_getUnits(Chronology chrono) {
+        ChronoPeriod period = chrono.period(1, 2, 3);
+        assertEquals(period.getUnits().size(), 3);
+        assertEquals(period.getUnits().get(0), YEARS);
+        assertEquals(period.getUnits().get(1), MONTHS);
+        assertEquals(period.getUnits().get(2), DAYS);
+    }
+
+    @Test(dataProvider="calendars")
+    public void test_getChronology(Chronology chrono) {
+        ChronoPeriod period = chrono.period(1, 2, 3);
+        assertEquals(period.getChronology(), chrono);
+    }
+
+    @Test(dataProvider="calendars")
+    public void test_isZero_isNegative(Chronology chrono) {
+        ChronoPeriod periodPositive = chrono.period(1, 2, 3);
+        assertEquals(periodPositive.isZero(), false);
+        assertEquals(periodPositive.isNegative(), false);
+
+        ChronoPeriod periodZero = chrono.period(0, 0, 0);
+        assertEquals(periodZero.isZero(), true);
+        assertEquals(periodZero.isNegative(), false);
+
+        ChronoPeriod periodNegative = chrono.period(-1, 0, 0);
+        assertEquals(periodNegative.isZero(), false);
+        assertEquals(periodNegative.isNegative(), true);
+    }
+
+    //-----------------------------------------------------------------------
+    @Test(dataProvider="calendars")
+    public void test_plus(Chronology chrono) {
+        ChronoPeriod period = chrono.period(1, 2, 3);
+        ChronoPeriod period2 = chrono.period(2, 3, 4);
+        ChronoPeriod result = period.plus(period2);
+        assertEquals(result, chrono.period(3, 5, 7));
+    }
+
+    @Test(dataProvider="calendars", expectedExceptions=DateTimeException.class)
+    public void test_plus_wrongChrono(Chronology chrono) {
+        ChronoPeriod period = chrono.period(1, 2, 3);
+        ChronoPeriod isoPeriod = Period.of(2, 3, 4);
+        ChronoPeriod thaiPeriod = ThaiBuddhistChronology.INSTANCE.period(2, 3, 4);
+        // one of these two will fail
+        period.plus(isoPeriod);
+        period.plus(thaiPeriod);
+    }
+
+    @Test(dataProvider="calendars")
+    public void test_minus(Chronology chrono) {
+        ChronoPeriod period = chrono.period(1, 2, 3);
+        ChronoPeriod period2 = chrono.period(2, 3, 4);
+        ChronoPeriod result = period.minus(period2);
+        assertEquals(result, chrono.period(-1, -1, -1));
+    }
+
+    @Test(dataProvider="calendars", expectedExceptions=DateTimeException.class)
+    public void test_minus_wrongChrono(Chronology chrono) {
+        ChronoPeriod period = chrono.period(1, 2, 3);
+        ChronoPeriod isoPeriod = Period.of(2, 3, 4);
+        ChronoPeriod thaiPeriod = ThaiBuddhistChronology.INSTANCE.period(2, 3, 4);
+        // one of these two will fail
+        period.minus(isoPeriod);
+        period.minus(thaiPeriod);
+    }
+
+    //-----------------------------------------------------------------------
+    @Test(dataProvider="calendars")
+    public void test_addTo(Chronology chrono) {
+        ChronoPeriod period = chrono.period(1, 2, 3);
+        ChronoLocalDate date = chrono.dateNow();
+        Temporal result = period.addTo(date);
+        assertEquals(result, date.plus(14, MONTHS).plus(3, DAYS));
+    }
+
+    @Test(dataProvider="calendars", expectedExceptions=DateTimeException.class)
+    public void test_addTo_wrongChrono(Chronology chrono) {
+        ChronoPeriod period = chrono.period(1, 2, 3);
+        ChronoLocalDate isoDate = LocalDate.of(2000, 1, 1);
+        ChronoLocalDate thaiDate = ThaiBuddhistChronology.INSTANCE.date(2000, 1, 1);
+        // one of these two will fail
+        period.addTo(isoDate);
+        period.addTo(thaiDate);
+    }
+
+    @Test(dataProvider="calendars")
+    public void test_subtractFrom(Chronology chrono) {
+        ChronoPeriod period = chrono.period(1, 2, 3);
+        ChronoLocalDate date = chrono.dateNow();
+        Temporal result = period.subtractFrom(date);
+        assertEquals(result, date.minus(14, MONTHS).minus(3, DAYS));
+    }
+
+    @Test(dataProvider="calendars", expectedExceptions=DateTimeException.class)
+    public void test_subtractFrom_wrongChrono(Chronology chrono) {
+        ChronoPeriod period = chrono.period(1, 2, 3);
+        ChronoLocalDate isoDate = LocalDate.of(2000, 1, 1);
+        ChronoLocalDate thaiDate = ThaiBuddhistChronology.INSTANCE.date(2000, 1, 1);
+        // one of these two will fail
+        period.subtractFrom(isoDate);
+        period.subtractFrom(thaiDate);
+    }
+
+    //-----------------------------------------------------------------------
+    @Test(dataProvider="calendars")
+    public void test_negated(Chronology chrono) {
+        ChronoPeriod period = chrono.period(1, 2, 3);
+        assertEquals(period.negated(), chrono.period(-1, -2, -3));
+    }
+
+    @Test(dataProvider="calendars")
+    public void test_multipliedBy(Chronology chrono) {
+        ChronoPeriod period = chrono.period(1, 2, 3);
+        assertEquals(period.multipliedBy(3), chrono.period(3, 6, 9));
+    }
+
+    //-----------------------------------------------------------------------
+    @Test(dataProvider="calendars")
+    public void test_equals_equal(Chronology chrono) {
+        ChronoPeriod a1 = chrono.period(1, 2, 3);
+        ChronoPeriod a2 = chrono.period(1, 2, 3);
+        assertEquals(a1, a1);
+        assertEquals(a1, a2);
+        assertEquals(a2, a1);
+        assertEquals(a2, a2);
+        assertEquals(a1.hashCode(), a2.hashCode());
+    }
+
+    @Test(dataProvider="calendars")
+    public void test_equals_notEqual(Chronology chrono) {
+        ChronoPeriod a = chrono.period(1, 2, 3);
+        ChronoPeriod b = chrono.period(2, 2, 3);
+        assertEquals(a.equals(b), false);
+        assertEquals(b.equals(a), false);
+        assertEquals(a.equals(""), false);
+        assertEquals(a.equals(null), false);
+    }
+
+    @Test(dataProvider="calendars")
+    public void test_toString(Chronology chrono) {
+        ChronoPeriod period = chrono.period(1, 2, 3);
+        if (period instanceof Period == false) {
+            assertEquals(period.toString(), chrono.getId() + " P1Y2M3D");
+        }
+    }
+
+}
diff --git a/jdk/test/java/time/tck/java/time/chrono/TCKChronoZonedDateTime.java b/jdk/test/java/time/tck/java/time/chrono/TCKChronoZonedDateTime.java
index 3b89857..0cabcca 100644
--- a/jdk/test/java/time/tck/java/time/chrono/TCKChronoZonedDateTime.java
+++ b/jdk/test/java/time/tck/java/time/chrono/TCKChronoZonedDateTime.java
@@ -321,24 +321,6 @@
     }
 
     //-----------------------------------------------------------------------
-    // Test Serialization of ISO via chrono API
-    //-----------------------------------------------------------------------
-    @Test( dataProvider="calendars")
-    public void test_ChronoZonedDateTimeSerialization(Chronology chrono) throws Exception {
-        ZonedDateTime ref = LocalDate.of(2013, 1, 5).atTime(12, 1, 2, 3).atZone(ZoneId.of("GMT+01:23"));
-        ChronoZonedDateTime<?> orginal = chrono.date(ref).atTime(ref.toLocalTime()).atZone(ref.getZone());
-        ByteArrayOutputStream baos = new ByteArrayOutputStream();
-        ObjectOutputStream out = new ObjectOutputStream(baos);
-        out.writeObject(orginal);
-        out.close();
-        ByteArrayInputStream bais = new ByteArrayInputStream(baos.toByteArray());
-        ObjectInputStream in = new ObjectInputStream(bais);
-        @SuppressWarnings("unchecked")
-        ChronoZonedDateTime<?> ser = (ChronoZonedDateTime<?>) in.readObject();
-        assertEquals(ser, orginal, "deserialized date is wrong");
-    }
-
-    //-----------------------------------------------------------------------
     @Test(dataProvider="calendars")
     public void test_from_TemporalAccessor(Chronology chrono) {
         ZonedDateTime refDateTime = ZonedDateTime.of(2013, 1, 1, 12, 30, 0, 0, ZoneId.of("Europe/Paris"));
@@ -363,6 +345,13 @@
     }
 
     //-----------------------------------------------------------------------
+    @Test(dataProvider="calendars")
+    public void test_getChronology(Chronology chrono) {
+        ChronoZonedDateTime test = chrono.zonedDateTime(ZonedDateTime.of(2010, 6, 30, 11, 30, 0, 0, ZoneOffset.UTC));
+        assertEquals(test.getChronology(), chrono);
+    }
+
+    //-----------------------------------------------------------------------
     /**
      * FixedAdjusted returns a fixed Temporal in all adjustments.
      * Construct an adjuster with the Temporal that should be returned from adjust.
diff --git a/jdk/test/java/time/tck/java/time/chrono/TCKChronology.java b/jdk/test/java/time/tck/java/time/chrono/TCKChronology.java
index 363f2b9..38f85fe 100644
--- a/jdk/test/java/time/tck/java/time/chrono/TCKChronology.java
+++ b/jdk/test/java/time/tck/java/time/chrono/TCKChronology.java
@@ -64,7 +64,6 @@
 import static org.testng.Assert.assertSame;
 import static org.testng.Assert.assertTrue;
 
-import java.util.Locale;
 import java.io.ByteArrayInputStream;
 import java.io.ByteArrayOutputStream;
 import java.io.ObjectInputStream;
@@ -338,20 +337,4 @@
         Chronology chrono = Chronology.of("FooFoo");
     }
 
-    //-----------------------------------------------------------------------
-    // serialization; serialize and check each calendar system
-    //-----------------------------------------------------------------------
-    @Test(dataProvider = "calendarNameAndType")
-    public void test_chronoSerializationSingleton(String id, String _calendarType) throws Exception {
-        Chronology original = Chronology.of(id);
-        ByteArrayOutputStream baos = new ByteArrayOutputStream();
-        ObjectOutputStream out = new ObjectOutputStream(baos);
-        out.writeObject(original);
-        out.close();
-        ByteArrayInputStream bais = new ByteArrayInputStream(baos.toByteArray());
-        ObjectInputStream in = new ObjectInputStream(bais);
-        Chronology ser = (Chronology) in.readObject();
-        assertEquals(ser, original, "Deserialized Chronology is not correct");
-    }
-
 }
diff --git a/jdk/test/java/time/tck/java/time/chrono/TCKJapaneseChronology.java b/jdk/test/java/time/tck/java/time/chrono/TCKJapaneseChronology.java
index e9d963c..fd53b0f 100644
--- a/jdk/test/java/time/tck/java/time/chrono/TCKJapaneseChronology.java
+++ b/jdk/test/java/time/tck/java/time/chrono/TCKJapaneseChronology.java
@@ -79,6 +79,7 @@
 import java.time.ZoneId;
 import java.time.ZoneOffset;
 import java.time.chrono.ChronoLocalDate;
+import java.time.chrono.ChronoPeriod;
 import java.time.chrono.Chronology;
 import java.time.chrono.Era;
 import java.time.chrono.IsoChronology;
@@ -87,6 +88,7 @@
 import java.time.chrono.JapaneseEra;
 import java.time.chrono.MinguoChronology;
 import java.time.chrono.MinguoDate;
+import java.time.chrono.ThaiBuddhistChronology;
 import java.time.format.ResolverStyle;
 import java.time.temporal.ChronoField;
 import java.time.temporal.ChronoUnit;
@@ -615,8 +617,8 @@
     public void test_periodUntilDate() {
         JapaneseDate mdate1 = JapaneseDate.of(1970, 1, 1);
         JapaneseDate mdate2 = JapaneseDate.of(1971, 2, 2);
-        Period period = mdate1.until(mdate2);
-        assertEquals(period, Period.of(1, 1, 1));
+        ChronoPeriod period = mdate1.until(mdate2);
+        assertEquals(period, JapaneseChronology.INSTANCE.period(1, 1, 1));
     }
 
     @Test
@@ -632,8 +634,8 @@
         JapaneseDate mdate1 = JapaneseDate.of(1970, 1, 1);
         JapaneseDate mdate2 = JapaneseDate.of(1971, 2, 2);
         MinguoDate ldate2 = MinguoChronology.INSTANCE.date(mdate2);
-        Period period = mdate1.until(ldate2);
-        assertEquals(period, Period.of(1, 1, 1));
+        ChronoPeriod period = mdate1.until(ldate2);
+        assertEquals(period, JapaneseChronology.INSTANCE.period(1, 1, 1));
     }
 
     //-----------------------------------------------------------------------
diff --git a/jdk/test/java/time/tck/java/time/chrono/TCKMinguoChronology.java b/jdk/test/java/time/tck/java/time/chrono/TCKMinguoChronology.java
index 50ddf70c..ad98e91 100644
--- a/jdk/test/java/time/tck/java/time/chrono/TCKMinguoChronology.java
+++ b/jdk/test/java/time/tck/java/time/chrono/TCKMinguoChronology.java
@@ -69,13 +69,13 @@
 import java.time.LocalTime;
 import java.time.Month;
 import java.time.OffsetDateTime;
-import java.time.Period;
 import java.time.Year;
 import java.time.ZoneId;
 import java.time.ZoneOffset;
 import java.time.ZonedDateTime;
 import java.time.chrono.ChronoLocalDate;
 import java.time.chrono.ChronoLocalDateTime;
+import java.time.chrono.ChronoPeriod;
 import java.time.chrono.ChronoZonedDateTime;
 import java.time.chrono.Chronology;
 import java.time.chrono.Era;
@@ -84,8 +84,6 @@
 import java.time.chrono.MinguoChronology;
 import java.time.chrono.MinguoDate;
 import java.time.chrono.MinguoEra;
-import java.time.chrono.MinguoChronology;
-import java.time.chrono.MinguoDate;
 import java.time.chrono.ThaiBuddhistChronology;
 import java.time.chrono.ThaiBuddhistDate;
 import java.time.format.ResolverStyle;
@@ -499,8 +497,8 @@
     public void test_periodUntilDate() {
         MinguoDate mdate1 = MinguoDate.of(1970, 1, 1);
         MinguoDate mdate2 = MinguoDate.of(1971, 2, 2);
-        Period period = mdate1.until(mdate2);
-        assertEquals(period, Period.of(1, 1, 1));
+        ChronoPeriod period = mdate1.until(mdate2);
+        assertEquals(period, MinguoChronology.INSTANCE.period(1, 1, 1));
     }
 
     @Test
@@ -516,8 +514,8 @@
         MinguoDate mdate1 = MinguoDate.of(1970, 1, 1);
         MinguoDate mdate2 = MinguoDate.of(1971, 2, 2);
         ThaiBuddhistDate ldate2 = ThaiBuddhistChronology.INSTANCE.date(mdate2);
-        Period period = mdate1.until(ldate2);
-        assertEquals(period, Period.of(1, 1, 1));
+        ChronoPeriod period = mdate1.until(ldate2);
+        assertEquals(period, MinguoChronology.INSTANCE.period(1, 1, 1));
     }
 
     //-----------------------------------------------------------------------
diff --git a/jdk/test/java/time/tck/java/time/chrono/TCKTestServiceLoader.java b/jdk/test/java/time/tck/java/time/chrono/TCKTestServiceLoader.java
index b67f011..1518c0c 100644
--- a/jdk/test/java/time/tck/java/time/chrono/TCKTestServiceLoader.java
+++ b/jdk/test/java/time/tck/java/time/chrono/TCKTestServiceLoader.java
@@ -60,10 +60,6 @@
 
 import static org.testng.Assert.assertEquals;
 
-import java.io.ByteArrayInputStream;
-import java.io.ByteArrayOutputStream;
-import java.io.ObjectInputStream;
-import java.io.ObjectOutputStream;
 import java.time.LocalDate;
 import java.time.chrono.ChronoLocalDate;
 import java.time.chrono.Chronology;
@@ -78,29 +74,11 @@
 public class TCKTestServiceLoader {
 
      @Test
-     public void test_CopticServiceLoader() {
+     public void test_TestServiceLoader() {
         Chronology chrono = Chronology.of("Coptic");
         ChronoLocalDate copticDate = chrono.date(1729, 4, 27);
         LocalDate ld = LocalDate.from(copticDate);
         assertEquals(ld, LocalDate.of(2013, 1, 5), "CopticDate does not match LocalDate");
     }
 
-
-    //-----------------------------------------------------------------------
-    // Test Serialization of Loaded Coptic Calendar
-    //-----------------------------------------------------------------------
-    @Test
-    public void test_ChronoSerialization() throws Exception {
-        Chronology chrono = Chronology.of("Coptic");
-        ByteArrayOutputStream baos = new ByteArrayOutputStream();
-        ObjectOutputStream out = new ObjectOutputStream(baos);
-        out.writeObject(chrono);
-        out.close();
-        ByteArrayInputStream bais = new ByteArrayInputStream(baos.toByteArray());
-
-        ObjectInputStream in = new ObjectInputStream(bais);
-        @SuppressWarnings("unchecked")
-        Chronology ser = (Chronology) in.readObject();
-        assertEquals(ser, chrono, "deserialized Chronology is wrong");
-    }
 }
diff --git a/jdk/test/java/time/tck/java/time/chrono/TCKThaiBuddhistChronology.java b/jdk/test/java/time/tck/java/time/chrono/TCKThaiBuddhistChronology.java
index e57847c..5557641 100644
--- a/jdk/test/java/time/tck/java/time/chrono/TCKThaiBuddhistChronology.java
+++ b/jdk/test/java/time/tck/java/time/chrono/TCKThaiBuddhistChronology.java
@@ -72,11 +72,11 @@
 import java.time.LocalDate;
 import java.time.LocalDateTime;
 import java.time.Month;
-import java.time.Period;
 import java.time.Year;
 import java.time.ZoneId;
 import java.time.ZoneOffset;
 import java.time.chrono.ChronoLocalDate;
+import java.time.chrono.ChronoPeriod;
 import java.time.chrono.Chronology;
 import java.time.chrono.Era;
 import java.time.chrono.IsoChronology;
@@ -458,8 +458,8 @@
     public void test_periodUntilDate() {
         ThaiBuddhistDate mdate1 = ThaiBuddhistDate.of(1, 1, 1);
         ThaiBuddhistDate mdate2 = ThaiBuddhistDate.of(2, 2, 2);
-        Period period = mdate1.until(mdate2);
-        assertEquals(period, Period.of(1, 1, 1));
+        ChronoPeriod period = mdate1.until(mdate2);
+        assertEquals(period, ThaiBuddhistChronology.INSTANCE.period(1, 1, 1));
     }
 
     @Test
@@ -475,8 +475,8 @@
         ThaiBuddhistDate mdate1 = ThaiBuddhistDate.of(1, 1, 1);
         ThaiBuddhistDate mdate2 = ThaiBuddhistDate.of(2, 2, 2);
         MinguoDate ldate2 = MinguoChronology.INSTANCE.date(mdate2);
-        Period period = mdate1.until(ldate2);
-        assertEquals(period, Period.of(1, 1, 1));
+        ChronoPeriod period = mdate1.until(ldate2);
+        assertEquals(period, ThaiBuddhistChronology.INSTANCE.period(1, 1, 1));
     }
 
     //-----------------------------------------------------------------------
diff --git a/jdk/test/java/time/tck/java/time/chrono/serial/TCKChronoLocalDateSerialization.java b/jdk/test/java/time/tck/java/time/chrono/serial/TCKChronoLocalDateSerialization.java
new file mode 100644
index 0000000..af6e9fb
--- /dev/null
+++ b/jdk/test/java/time/tck/java/time/chrono/serial/TCKChronoLocalDateSerialization.java
@@ -0,0 +1,164 @@
+/*
+ * Copyright (c) 2012, 2013, Oracle and/or its affiliates. All rights reserved.
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * This code is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU General Public License version 2 only, as
+ * published by the Free Software Foundation.  Oracle designates this
+ * particular file as subject to the "Classpath" exception as provided
+ * by Oracle in the LICENSE file that accompanied this code.
+ *
+ * This code is distributed in the hope that it will be useful, but WITHOUT
+ * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
+ * version 2 for more details (a copy is included in the LICENSE file that
+ * accompanied this code).
+ *
+ * You should have received a copy of the GNU General Public License version
+ * 2 along with this work; if not, write to the Free Software Foundation,
+ * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
+ *
+ * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
+ * or visit www.oracle.com if you need additional information or have any
+ * questions.
+ */
+
+/*
+ * Copyright (c) 2008-2012, Stephen Colebourne & Michael Nascimento Santos
+ *
+ * All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions are met:
+ *
+ *  * Redistributions of source code must retain the above copyright notice,
+ *    this list of conditions and the following disclaimer.
+ *
+ *  * Redistributions in binary form must reproduce the above copyright notice,
+ *    this list of conditions and the following disclaimer in the documentation
+ *    and/or other materials provided with the distribution.
+ *
+ *  * Neither the name of JSR-310 nor the names of its contributors
+ *    may be used to endorse or promote products derived from this software
+ *    without specific prior written permission.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+ * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
+ * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
+ * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR
+ * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
+ * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
+ * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
+ * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
+ * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
+ * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
+ * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ */
+package tck.java.time.chrono.serial;
+
+import static java.time.temporal.ChronoField.DAY_OF_MONTH;
+import static java.time.temporal.ChronoField.MONTH_OF_YEAR;
+import static java.time.temporal.ChronoField.YEAR;
+
+import java.io.ByteArrayOutputStream;
+import java.io.DataOutputStream;
+import java.io.ObjectStreamConstants;
+import java.time.chrono.ChronoLocalDate;
+import java.time.chrono.HijrahChronology;
+import java.time.chrono.HijrahDate;
+import java.time.chrono.JapaneseDate;
+import java.time.chrono.JapaneseEra;
+import java.time.chrono.MinguoDate;
+import java.time.chrono.ThaiBuddhistDate;
+
+import org.testng.annotations.DataProvider;
+import org.testng.annotations.Test;
+
+
+
+import tck.java.time.AbstractTCKTest;
+
+/**
+ * Test serialization of built-in chronologies.
+ */
+@Test
+public class TCKChronoLocalDateSerialization extends AbstractTCKTest {
+
+    static final int CHRONO_TYPE = 1;            // java.time.chrono.Ser.CHRONO_TYPE
+    static final int JAPANESE_DATE_TYPE = 4;     // java.time.chrono.Ser.JAPANESE_DATE_TYPE
+    static final int HIJRAH_DATE_TYPE = 6;       // java.time.chrono.Ser.HIJRAH_DATE_TYPE
+    static final int MINGUO_DATE_TYPE = 7;       // java.time.chrono.Ser.MINGUO_DATE_TYPE
+    static final int THAIBUDDHIST_DATE_TYPE = 8; // java.time.chrono.Ser.THAIBUDDHIST_DATE_TYPE
+
+    //-----------------------------------------------------------------------
+    // Regular data factory for names and descriptions of available calendars
+    //-----------------------------------------------------------------------
+    @DataProvider(name = "calendars")
+    Object[][] data_of_calendars() {
+        return new Object[][]{
+            {JapaneseDate.of(JapaneseEra.HEISEI, 25, 01, 05), JAPANESE_DATE_TYPE},
+            {MinguoDate.of(102, 01, 05),                      MINGUO_DATE_TYPE},
+            {ThaiBuddhistDate.of(2556, 01, 05),               THAIBUDDHIST_DATE_TYPE},
+        };
+    }
+
+
+    //-----------------------------------------------------------------------
+    // Test Serialization of Calendars
+    //-----------------------------------------------------------------------
+    @Test( dataProvider="calendars")
+    public void test_ChronoSerialization(ChronoLocalDate date, int dateType) throws Exception {
+        assertSerializable(date);
+    }
+
+    //-----------------------------------------------------------------------
+    // Test that serialization produces exact sequence of bytes
+    //-----------------------------------------------------------------------
+    @Test(dataProvider="calendars")
+    private void test_serialization_format(ChronoLocalDate date, int dateType) throws Exception {
+        ByteArrayOutputStream baos = new ByteArrayOutputStream();
+        try (DataOutputStream dos = new DataOutputStream(baos) ) {
+            dos.writeByte(dateType);
+            dos.writeInt(date.get(YEAR));
+            dos.writeByte(date.get(MONTH_OF_YEAR));
+            dos.writeByte(date.get(DAY_OF_MONTH));
+        }
+        byte[] bytes = baos.toByteArray();
+        assertSerializedBySer(date, bytes);
+    }
+
+    //-----------------------------------------------------------------------
+    // Test HijrajDate serialization is a type, Chronology, year, month, day
+    //-----------------------------------------------------------------------
+    @Test()
+    public void test_hijrahSerialization_format() throws Exception {
+        HijrahChronology chrono = HijrahChronology.INSTANCE;
+        HijrahDate date = HijrahDate.of(1433, 10, 29);
+        ByteArrayOutputStream baos = new ByteArrayOutputStream();
+
+        // Expect the type of the HijrahDate in the stream
+        byte[] hijrahDateBytes = new byte[] {HIJRAH_DATE_TYPE};
+
+        // Literal reference to Hijrah-Umalqura Chronology
+        byte[] hijrahChronoBytes = new byte[] {
+            115, 113, 0, 126, 0, 0,                        /* p w \u0001 \u0006 s q \u0000 ~ \u0000 \u0000 */
+            119, 18, 1, 0, 15, 72, 105, 106, 114, 97,      /* w \u0012 \u0001 \u0000 \u000f H i j r a */
+            104, 45, 117, 109, 97, 108, 113, 117, 114, 97, /* h - u m a l q u r a */
+            120,                                           /*  \u001d x */
+        };
+
+        // Build the sequence that represents the data in the stream
+        baos = new ByteArrayOutputStream();
+        try (DataOutputStream dos = new DataOutputStream(baos) ) {
+            dos.writeByte(ObjectStreamConstants.TC_BLOCKDATA);
+            dos.writeByte(6);   // 6 bytes follow
+            dos.writeInt(date.get(YEAR));
+            dos.writeByte(date.get(MONTH_OF_YEAR));
+            dos.writeByte(date.get(DAY_OF_MONTH));
+            dos.writeByte(ObjectStreamConstants.TC_ENDBLOCKDATA);
+        }
+        byte[] dateBytes = baos.toByteArray();
+
+        assertSerializedBySer(date, hijrahDateBytes, hijrahChronoBytes, dateBytes);
+    }
+}
diff --git a/jdk/test/java/time/tck/java/time/chrono/TCKChronologySerialization.java b/jdk/test/java/time/tck/java/time/chrono/serial/TCKChronoLocalDateTimeSerialization.java
similarity index 63%
copy from jdk/test/java/time/tck/java/time/chrono/TCKChronologySerialization.java
copy to jdk/test/java/time/tck/java/time/chrono/serial/TCKChronoLocalDateTimeSerialization.java
index 35620ad..8da904b 100644
--- a/jdk/test/java/time/tck/java/time/chrono/TCKChronologySerialization.java
+++ b/jdk/test/java/time/tck/java/time/chrono/serial/TCKChronoLocalDateTimeSerialization.java
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2013, 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
@@ -24,7 +24,7 @@
  */
 
 /*
- * Copyright (c) 2013, Stephen Colebourne & Michael Nascimento Santos
+ * Copyright (c) 2008-2012, Stephen Colebourne & Michael Nascimento Santos
  *
  * All rights reserved.
  *
@@ -54,15 +54,14 @@
  * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
  * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
  */
-package tck.java.time.chrono;
+package tck.java.time.chrono.serial;
 
-import static org.testng.Assert.assertEquals;
+import org.testng.annotations.DataProvider;
+import org.testng.annotations.Test;
 
-import java.io.ByteArrayInputStream;
-import java.io.ByteArrayOutputStream;
-import java.io.ObjectInputStream;
-import java.io.ObjectOutputStream;
-import java.io.PrintStream;
+import java.time.LocalDate;
+import java.time.LocalDateTime;
+import java.time.chrono.ChronoLocalDateTime;
 import java.time.chrono.Chronology;
 import java.time.chrono.HijrahChronology;
 import java.time.chrono.IsoChronology;
@@ -70,13 +69,16 @@
 import java.time.chrono.MinguoChronology;
 import java.time.chrono.ThaiBuddhistChronology;
 
-import org.testng.annotations.DataProvider;
-import org.testng.annotations.Test;
+import tck.java.time.AbstractTCKTest;
 
-public class TCKChronologySerialization {
+/**
+ * Test serialization of ChronoLocalDateTime for all built-in chronologies.
+ */
+@Test
+public class TCKChronoLocalDateTimeSerialization extends AbstractTCKTest {
 
     //-----------------------------------------------------------------------
-    // regular data factory for names and descriptions of available calendars
+    // regular data factory for available calendars
     //-----------------------------------------------------------------------
     @DataProvider(name = "calendars")
     Chronology[][] data_of_calendars() {
@@ -89,48 +91,13 @@
     }
 
     //-----------------------------------------------------------------------
-    // Test Serialization of Calendars
+    // Test Serialization of ChronoLocalDateTime
     //-----------------------------------------------------------------------
     @Test(dataProvider="calendars")
-    public void test_ChronoSerialization(Chronology chrono) throws Exception {
-        ByteArrayOutputStream baos = new ByteArrayOutputStream();
-        ObjectOutputStream out = new ObjectOutputStream(baos);
-        out.writeObject(chrono);
-        out.close();
-
-        byte[] bytes = baos.toByteArray();
-        ByteArrayInputStream bais = new ByteArrayInputStream(bytes);
-
-        ObjectInputStream in = new ObjectInputStream(bais);
-        @SuppressWarnings("unchecked")
-        Chronology ser = (Chronology) in.readObject();
-        assertEquals(ser, chrono, "deserialized Chronology is wrong");
-    }
-
-    /**
-     * Utility method to dump a byte array in a java syntax.
-     * @param bytes and array of bytes
-     * @param os the outputstream to receive the output.
-     */
-    static void dumpSerialStream(byte[] bytes, PrintStream os) {
-        os.printf("    byte[] bytes = {" );
-        final int linelen = 10;
-        for (int i = 0; i < bytes.length; i++) {
-            if (i % linelen == 0) {
-                os.printf("%n        ");
-            }
-            os.printf(" %3d,", bytes[i] & 0xff);
-            if ((i % linelen) == (linelen-1) || i == bytes.length - 1) {
-                os.printf("  /*");
-                int s = i / linelen * linelen;
-                int k = i % linelen;
-                for (int j = 0; j <= k && s + j < bytes.length; j++) {
-                    os.printf(" %c", bytes[s + j] & 0xff);
-                }
-                os.printf(" */");
-            }
-        }
-        os.printf("%n    };%n");
+    public void test_ChronoLocalDateTimeSerialization(Chronology chrono) throws Exception {
+        LocalDateTime ref = LocalDate.of(2013, 1, 5).atTime(12, 1, 2, 3);
+        ChronoLocalDateTime<?> original = chrono.date(ref).atTime(ref.toLocalTime());
+        assertSerializable(original);
     }
 
 }
diff --git a/jdk/test/java/time/tck/java/time/chrono/TCKChronologySerialization.java b/jdk/test/java/time/tck/java/time/chrono/serial/TCKChronoZonedDateTimeSerialization.java
similarity index 63%
copy from jdk/test/java/time/tck/java/time/chrono/TCKChronologySerialization.java
copy to jdk/test/java/time/tck/java/time/chrono/serial/TCKChronoZonedDateTimeSerialization.java
index 35620ad..c941453 100644
--- a/jdk/test/java/time/tck/java/time/chrono/TCKChronologySerialization.java
+++ b/jdk/test/java/time/tck/java/time/chrono/serial/TCKChronoZonedDateTimeSerialization.java
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2013, 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
@@ -24,7 +24,7 @@
  */
 
 /*
- * Copyright (c) 2013, Stephen Colebourne & Michael Nascimento Santos
+ * Copyright (c) 2008-2012, Stephen Colebourne & Michael Nascimento Santos
  *
  * All rights reserved.
  *
@@ -54,26 +54,27 @@
  * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
  * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
  */
-package tck.java.time.chrono;
+package tck.java.time.chrono.serial;
 
-import static org.testng.Assert.assertEquals;
-
-import java.io.ByteArrayInputStream;
-import java.io.ByteArrayOutputStream;
-import java.io.ObjectInputStream;
-import java.io.ObjectOutputStream;
-import java.io.PrintStream;
+import java.time.LocalDate;
+import java.time.ZoneId;
+import java.time.ZonedDateTime;
+import java.time.chrono.ChronoZonedDateTime;
 import java.time.chrono.Chronology;
 import java.time.chrono.HijrahChronology;
 import java.time.chrono.IsoChronology;
 import java.time.chrono.JapaneseChronology;
 import java.time.chrono.MinguoChronology;
 import java.time.chrono.ThaiBuddhistChronology;
-
 import org.testng.annotations.DataProvider;
 import org.testng.annotations.Test;
+import tck.java.time.AbstractTCKTest;
 
-public class TCKChronologySerialization {
+/**
+ * Test assertions that must be true for all built-in chronologies.
+ */
+@Test
+public class TCKChronoZonedDateTimeSerialization extends AbstractTCKTest {
 
     //-----------------------------------------------------------------------
     // regular data factory for names and descriptions of available calendars
@@ -85,52 +86,18 @@
                     {IsoChronology.INSTANCE},
                     {JapaneseChronology.INSTANCE},
                     {MinguoChronology.INSTANCE},
-                    {ThaiBuddhistChronology.INSTANCE}};
+                    {ThaiBuddhistChronology.INSTANCE},
+        };
     }
 
     //-----------------------------------------------------------------------
-    // Test Serialization of Calendars
+    // Test Serialization of ISO via chrono API
     //-----------------------------------------------------------------------
-    @Test(dataProvider="calendars")
-    public void test_ChronoSerialization(Chronology chrono) throws Exception {
-        ByteArrayOutputStream baos = new ByteArrayOutputStream();
-        ObjectOutputStream out = new ObjectOutputStream(baos);
-        out.writeObject(chrono);
-        out.close();
-
-        byte[] bytes = baos.toByteArray();
-        ByteArrayInputStream bais = new ByteArrayInputStream(bytes);
-
-        ObjectInputStream in = new ObjectInputStream(bais);
-        @SuppressWarnings("unchecked")
-        Chronology ser = (Chronology) in.readObject();
-        assertEquals(ser, chrono, "deserialized Chronology is wrong");
-    }
-
-    /**
-     * Utility method to dump a byte array in a java syntax.
-     * @param bytes and array of bytes
-     * @param os the outputstream to receive the output.
-     */
-    static void dumpSerialStream(byte[] bytes, PrintStream os) {
-        os.printf("    byte[] bytes = {" );
-        final int linelen = 10;
-        for (int i = 0; i < bytes.length; i++) {
-            if (i % linelen == 0) {
-                os.printf("%n        ");
-            }
-            os.printf(" %3d,", bytes[i] & 0xff);
-            if ((i % linelen) == (linelen-1) || i == bytes.length - 1) {
-                os.printf("  /*");
-                int s = i / linelen * linelen;
-                int k = i % linelen;
-                for (int j = 0; j <= k && s + j < bytes.length; j++) {
-                    os.printf(" %c", bytes[s + j] & 0xff);
-                }
-                os.printf(" */");
-            }
-        }
-        os.printf("%n    };%n");
+    @Test( dataProvider="calendars")
+    public void test_ChronoZonedDateTimeSerialization(Chronology chrono) throws Exception {
+        ZonedDateTime ref = LocalDate.of(2013, 1, 5).atTime(12, 1, 2, 3).atZone(ZoneId.of("GMT+01:23"));
+        ChronoZonedDateTime<?> original = chrono.date(ref).atTime(ref.toLocalTime()).atZone(ref.getZone());
+        assertSerializable(original);
     }
 
 }
diff --git a/jdk/test/java/time/tck/java/time/chrono/TCKChronologySerialization.java b/jdk/test/java/time/tck/java/time/chrono/serial/TCKChronologySerialization.java
similarity index 70%
rename from jdk/test/java/time/tck/java/time/chrono/TCKChronologySerialization.java
rename to jdk/test/java/time/tck/java/time/chrono/serial/TCKChronologySerialization.java
index 35620ad..7f9e30d 100644
--- a/jdk/test/java/time/tck/java/time/chrono/TCKChronologySerialization.java
+++ b/jdk/test/java/time/tck/java/time/chrono/serial/TCKChronologySerialization.java
@@ -54,15 +54,11 @@
  * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
  * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
  */
-package tck.java.time.chrono;
+package tck.java.time.chrono.serial;
 
-import static org.testng.Assert.assertEquals;
-
-import java.io.ByteArrayInputStream;
 import java.io.ByteArrayOutputStream;
-import java.io.ObjectInputStream;
-import java.io.ObjectOutputStream;
-import java.io.PrintStream;
+import java.io.DataOutputStream;
+
 import java.time.chrono.Chronology;
 import java.time.chrono.HijrahChronology;
 import java.time.chrono.IsoChronology;
@@ -73,10 +69,15 @@
 import org.testng.annotations.DataProvider;
 import org.testng.annotations.Test;
 
-public class TCKChronologySerialization {
+import tck.java.time.AbstractTCKTest;
+
+@Test
+public class TCKChronologySerialization extends AbstractTCKTest {
+
+    static final int CHRONO_TYPE = 1;            // java.time.chrono.Ser.CHRONO_TYPE
 
     //-----------------------------------------------------------------------
-    // regular data factory for names and descriptions of available calendars
+    // Regular data factory for available calendars
     //-----------------------------------------------------------------------
     @DataProvider(name = "calendars")
     Chronology[][] data_of_calendars() {
@@ -92,45 +93,22 @@
     // Test Serialization of Calendars
     //-----------------------------------------------------------------------
     @Test(dataProvider="calendars")
-    public void test_ChronoSerialization(Chronology chrono) throws Exception {
-        ByteArrayOutputStream baos = new ByteArrayOutputStream();
-        ObjectOutputStream out = new ObjectOutputStream(baos);
-        out.writeObject(chrono);
-        out.close();
-
-        byte[] bytes = baos.toByteArray();
-        ByteArrayInputStream bais = new ByteArrayInputStream(bytes);
-
-        ObjectInputStream in = new ObjectInputStream(bais);
-        @SuppressWarnings("unchecked")
-        Chronology ser = (Chronology) in.readObject();
-        assertEquals(ser, chrono, "deserialized Chronology is wrong");
+    public void test_chronoSerialization(Chronology chrono) throws Exception {
+        assertSerializable(chrono);
     }
 
-    /**
-     * Utility method to dump a byte array in a java syntax.
-     * @param bytes and array of bytes
-     * @param os the outputstream to receive the output.
-     */
-    static void dumpSerialStream(byte[] bytes, PrintStream os) {
-        os.printf("    byte[] bytes = {" );
-        final int linelen = 10;
-        for (int i = 0; i < bytes.length; i++) {
-            if (i % linelen == 0) {
-                os.printf("%n        ");
-            }
-            os.printf(" %3d,", bytes[i] & 0xff);
-            if ((i % linelen) == (linelen-1) || i == bytes.length - 1) {
-                os.printf("  /*");
-                int s = i / linelen * linelen;
-                int k = i % linelen;
-                for (int j = 0; j <= k && s + j < bytes.length; j++) {
-                    os.printf(" %c", bytes[s + j] & 0xff);
-                }
-                os.printf(" */");
-            }
+    //-----------------------------------------------------------------------
+    // Test that serialization produces exact sequence of bytes
+    //-----------------------------------------------------------------------
+    @Test(dataProvider="calendars")
+    private void test_serializationBytes(Chronology chrono) throws Exception {
+        ByteArrayOutputStream baos = new ByteArrayOutputStream();
+        try (DataOutputStream dos = new DataOutputStream(baos) ) {
+            dos.writeByte(CHRONO_TYPE);
+            dos.writeUTF(chrono.getId());
         }
-        os.printf("%n    };%n");
+        byte[] bytes = baos.toByteArray();
+        assertSerializedBySer(chrono, bytes);
     }
 
 }
diff --git a/jdk/test/java/time/tck/java/time/chrono/serial/TCKCopticSerialization.java b/jdk/test/java/time/tck/java/time/chrono/serial/TCKCopticSerialization.java
new file mode 100644
index 0000000..0fc489e
--- /dev/null
+++ b/jdk/test/java/time/tck/java/time/chrono/serial/TCKCopticSerialization.java
@@ -0,0 +1,82 @@
+/*
+ * Copyright (c) 2013, Oracle and/or its affiliates. All rights reserved.
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * This code is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU General Public License version 2 only, as
+ * published by the Free Software Foundation.
+ *
+ * This code is distributed in the hope that it will be useful, but WITHOUT
+ * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
+ * version 2 for more details (a copy is included in the LICENSE file that
+ * accompanied this code).
+ *
+ * You should have received a copy of the GNU General Public License version
+ * 2 along with this work; if not, write to the Free Software Foundation,
+ * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
+ *
+ * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
+ * or visit www.oracle.com if you need additional information or have any
+ * questions.
+ */
+
+/*
+ * This file is available under and governed by the GNU General Public
+ * License version 2 only, as published by the Free Software Foundation.
+ * However, the following notice accompanied the original version of this
+ * file:
+ *
+ * Copyright (c) 2011-2012, Stephen Colebourne & Michael Nascimento Santos
+ *
+ * All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions are met:
+ *
+ *  * Redistributions of source code must retain the above copyright notice,
+ *    this list of conditions and the following disclaimer.
+ *
+ *  * Redistributions in binary form must reproduce the above copyright notice,
+ *    this list of conditions and the following disclaimer in the documentation
+ *    and/or other materials provided with the distribution.
+ *
+ *  * Neither the name of JSR-310 nor the names of its contributors
+ *    may be used to endorse or promote products derived from this software
+ *    without specific prior written permission.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+ * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
+ * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
+ * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR
+ * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
+ * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
+ * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
+ * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
+ * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
+ * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
+ * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ */
+package tck.java.time.chrono.serial;
+
+import java.io.IOException;
+import java.time.chrono.ChronoLocalDate;
+import java.time.chrono.Chronology;
+
+import org.testng.annotations.Test;
+import tck.java.time.AbstractTCKTest;
+
+/**
+ * Tests the serialization of ChronoLocalDate using a CopticDate.
+ */
+@Test
+public class TCKCopticSerialization extends AbstractTCKTest {
+
+    @Test
+    public void test_eraSerialization() throws IOException, ClassNotFoundException {
+        Chronology chrono = Chronology.of("Coptic");
+        ChronoLocalDate copticDate = chrono.date(1729, 4, 27);
+        assertSerializable(copticDate);
+    }
+
+}
diff --git a/jdk/test/java/time/tck/java/time/chrono/serial/TCKEraSerialization.java b/jdk/test/java/time/tck/java/time/chrono/serial/TCKEraSerialization.java
new file mode 100644
index 0000000..8df56ba
--- /dev/null
+++ b/jdk/test/java/time/tck/java/time/chrono/serial/TCKEraSerialization.java
@@ -0,0 +1,135 @@
+/*
+ * Copyright (c) 2013, Oracle and/or its affiliates. All rights reserved.
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * This code is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU General Public License version 2 only, as
+ * published by the Free Software Foundation.
+ *
+ * This code is distributed in the hope that it will be useful, but WITHOUT
+ * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
+ * version 2 for more details (a copy is included in the LICENSE file that
+ * accompanied this code).
+ *
+ * You should have received a copy of the GNU General Public License version
+ * 2 along with this work; if not, write to the Free Software Foundation,
+ * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
+ *
+ * Please 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) 2011-2012, Stephen Colebourne & Michael Nascimento Santos
+ *
+ * All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions are met:
+ *
+ *  * Redistributions of source code must retain the above copyright notice,
+ *    this list of conditions and the following disclaimer.
+ *
+ *  * Redistributions in binary form must reproduce the above copyright notice,
+ *    this list of conditions and the following disclaimer in the documentation
+ *    and/or other materials provided with the distribution.
+ *
+ *  * Neither the name of JSR-310 nor the names of its contributors
+ *    may be used to endorse or promote products derived from this software
+ *    without specific prior written permission.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+ * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
+ * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
+ * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR
+ * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
+ * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
+ * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
+ * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
+ * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
+ * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
+ * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ */
+package tck.java.time.chrono.serial;
+
+
+import static java.time.temporal.ChronoField.DAY_OF_MONTH;
+import static java.time.temporal.ChronoField.MONTH_OF_YEAR;
+import static java.time.temporal.ChronoField.YEAR;
+
+import java.io.ByteArrayOutputStream;
+import java.io.DataOutputStream;
+import java.io.IOException;
+import java.time.chrono.ChronoLocalDate;
+import java.time.chrono.Era;
+import java.time.chrono.HijrahEra;
+import java.time.chrono.IsoEra;
+import java.time.chrono.JapaneseEra;
+import java.time.chrono.MinguoEra;
+import java.time.chrono.ThaiBuddhistEra;
+
+import org.testng.annotations.DataProvider;
+import org.testng.annotations.Test;
+
+import tck.java.time.AbstractTCKTest;
+
+/**
+ * Tests the built-in Eras are serializable.
+ * Note that the serialized form of IsoEra, MinguoEra, ThaiBuddhistEra,
+ * and HijrahEra are defined and provided by Enum.
+ * The serialized form of these types are not tested, only that they are
+ * serializable.
+ */
+@Test
+public class TCKEraSerialization extends AbstractTCKTest {
+
+    static final int JAPANESE_ERA_TYPE = 5;     // java.time.chrono.Ser.JAPANESE_ERA
+
+
+    //-----------------------------------------------------------------------
+    // Regular data factory for the available Eras
+    //-----------------------------------------------------------------------
+    @DataProvider(name = "Eras")
+    Era[][] data_of_calendars() {
+        return new Era[][] {
+                    {HijrahEra.AH},
+                    {IsoEra.BCE},
+                    {IsoEra.CE},
+                    {MinguoEra.BEFORE_ROC},
+                    {MinguoEra.ROC},
+                    {ThaiBuddhistEra.BEFORE_BE},
+                    {ThaiBuddhistEra.BE},
+        };
+    }
+
+    @Test(dataProvider="Eras")
+    public void test_eraSerialization(Era era) throws IOException, ClassNotFoundException {
+        assertSerializableSame(era);
+    }
+
+    //-----------------------------------------------------------------------
+    // Test JapaneseEra serialization produces exact sequence of bytes
+    //-----------------------------------------------------------------------
+    @Test
+    private void test_JapaneseErasSerialization() throws Exception {
+        for (JapaneseEra era : JapaneseEra.values()) {
+            assertSerializableSame(era);
+
+            ByteArrayOutputStream baos = new ByteArrayOutputStream();
+            try (DataOutputStream dos = new DataOutputStream(baos) ) {
+                dos.writeByte(JAPANESE_ERA_TYPE);
+                dos.writeByte(era.getValue());
+            }
+            byte[] bytes = baos.toByteArray();
+            assertSerializedBySer(era, bytes);
+        }
+    }
+
+}
diff --git a/jdk/test/java/time/tck/java/time/format/TCKDateTimeParseResolver.java b/jdk/test/java/time/tck/java/time/format/TCKDateTimeParseResolver.java
index 9b249f1..4ef0131 100644
--- a/jdk/test/java/time/tck/java/time/format/TCKDateTimeParseResolver.java
+++ b/jdk/test/java/time/tck/java/time/format/TCKDateTimeParseResolver.java
@@ -90,20 +90,33 @@
 import static java.time.temporal.ChronoField.SECOND_OF_MINUTE;
 import static java.time.temporal.ChronoField.YEAR;
 import static java.time.temporal.ChronoField.YEAR_OF_ERA;
+import static java.time.temporal.ChronoUnit.DAYS;
+import static java.time.temporal.ChronoUnit.FOREVER;
+import static java.time.temporal.ChronoUnit.NANOS;
 import static org.testng.Assert.assertEquals;
 import static org.testng.Assert.fail;
 
 import java.time.LocalDate;
+import java.time.LocalDateTime;
 import java.time.LocalTime;
 import java.time.Period;
+import java.time.ZoneId;
+import java.time.ZonedDateTime;
+import java.time.chrono.Chronology;
+import java.time.chrono.ThaiBuddhistChronology;
 import java.time.format.DateTimeFormatter;
 import java.time.format.DateTimeFormatterBuilder;
 import java.time.format.DateTimeParseException;
 import java.time.format.ResolverStyle;
+import java.time.temporal.ChronoUnit;
 import java.time.temporal.IsoFields;
+import java.time.temporal.Temporal;
 import java.time.temporal.TemporalAccessor;
 import java.time.temporal.TemporalField;
 import java.time.temporal.TemporalQuery;
+import java.time.temporal.TemporalUnit;
+import java.time.temporal.ValueRange;
+import java.util.Map;
 
 import org.testng.annotations.DataProvider;
 import org.testng.annotations.Test;
@@ -872,4 +885,210 @@
         }
     }
 
+    //-----------------------------------------------------------------------
+    @Test
+    public void test_fieldResolvesToLocalTime() {
+        TemporalField field = new TemporalField() {
+            @Override
+            public TemporalUnit getBaseUnit() {
+                throw new UnsupportedOperationException();
+            }
+            @Override
+            public TemporalUnit getRangeUnit() {
+                throw new UnsupportedOperationException();
+            }
+            @Override
+            public ValueRange range() {
+                throw new UnsupportedOperationException();
+            }
+            @Override
+            public boolean isDateBased() {
+                throw new UnsupportedOperationException();
+            }
+            @Override
+            public boolean isTimeBased() {
+                throw new UnsupportedOperationException();
+            }
+            @Override
+            public boolean isSupportedBy(TemporalAccessor temporal) {
+                throw new UnsupportedOperationException();
+            }
+            @Override
+            public ValueRange rangeRefinedBy(TemporalAccessor temporal) {
+                throw new UnsupportedOperationException();
+            }
+            @Override
+            public long getFrom(TemporalAccessor temporal) {
+                throw new UnsupportedOperationException();
+            }
+            @Override
+            public <R extends Temporal> R adjustInto(R temporal, long newValue) {
+                throw new UnsupportedOperationException();
+            }
+            @Override
+            public TemporalAccessor resolve(
+                    Map<TemporalField, Long> fieldValues, Chronology chronology,
+                    ZoneId zone, 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));
+    }
+
+    @Test
+    public void test_fieldResolvesToChronoLocalDateTime() {
+        TemporalField field = new TemporalField() {
+            @Override
+            public TemporalUnit getBaseUnit() {
+                throw new UnsupportedOperationException();
+            }
+            @Override
+            public TemporalUnit getRangeUnit() {
+                throw new UnsupportedOperationException();
+            }
+            @Override
+            public ValueRange range() {
+                throw new UnsupportedOperationException();
+            }
+            @Override
+            public boolean isDateBased() {
+                throw new UnsupportedOperationException();
+            }
+            @Override
+            public boolean isTimeBased() {
+                throw new UnsupportedOperationException();
+            }
+            @Override
+            public boolean isSupportedBy(TemporalAccessor temporal) {
+                throw new UnsupportedOperationException();
+            }
+            @Override
+            public ValueRange rangeRefinedBy(TemporalAccessor temporal) {
+                throw new UnsupportedOperationException();
+            }
+            @Override
+            public long getFrom(TemporalAccessor temporal) {
+                throw new UnsupportedOperationException();
+            }
+            @Override
+            public <R extends Temporal> R adjustInto(R temporal, long newValue) {
+                throw new UnsupportedOperationException();
+            }
+            @Override
+            public TemporalAccessor resolve(
+                    Map<TemporalField, Long> fieldValues, Chronology chronology,
+                    ZoneId zone, 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));
+    }
+
+    @Test(expectedExceptions = DateTimeParseException.class)
+    public void test_fieldResolvesWrongChrono() {
+        TemporalField field = new TemporalField() {
+            @Override
+            public TemporalUnit getBaseUnit() {
+                throw new UnsupportedOperationException();
+            }
+            @Override
+            public TemporalUnit getRangeUnit() {
+                throw new UnsupportedOperationException();
+            }
+            @Override
+            public ValueRange range() {
+                throw new UnsupportedOperationException();
+            }
+            @Override
+            public boolean isDateBased() {
+                throw new UnsupportedOperationException();
+            }
+            @Override
+            public boolean isTimeBased() {
+                throw new UnsupportedOperationException();
+            }
+            @Override
+            public boolean isSupportedBy(TemporalAccessor temporal) {
+                throw new UnsupportedOperationException();
+            }
+            @Override
+            public ValueRange rangeRefinedBy(TemporalAccessor temporal) {
+                throw new UnsupportedOperationException();
+            }
+            @Override
+            public long getFrom(TemporalAccessor temporal) {
+                throw new UnsupportedOperationException();
+            }
+            @Override
+            public <R extends Temporal> R adjustInto(R temporal, long newValue) {
+                throw new UnsupportedOperationException();
+            }
+            @Override
+            public TemporalAccessor resolve(
+                    Map<TemporalField, Long> fieldValues, Chronology chronology,
+                    ZoneId zone, ResolverStyle resolverStyle) {
+                return ThaiBuddhistChronology.INSTANCE.dateNow();
+            }
+        };
+        DateTimeFormatter f = new DateTimeFormatterBuilder().appendValue(field).toFormatter();
+        f.parse("1234567890");
+    }
+
+    @Test(expectedExceptions = DateTimeParseException.class)
+    public void test_fieldResolvesWrongZone() {
+        TemporalField field = new TemporalField() {
+            @Override
+            public TemporalUnit getBaseUnit() {
+                throw new UnsupportedOperationException();
+            }
+            @Override
+            public TemporalUnit getRangeUnit() {
+                throw new UnsupportedOperationException();
+            }
+            @Override
+            public ValueRange range() {
+                throw new UnsupportedOperationException();
+            }
+            @Override
+            public boolean isDateBased() {
+                throw new UnsupportedOperationException();
+            }
+            @Override
+            public boolean isTimeBased() {
+                throw new UnsupportedOperationException();
+            }
+            @Override
+            public boolean isSupportedBy(TemporalAccessor temporal) {
+                throw new UnsupportedOperationException();
+            }
+            @Override
+            public ValueRange rangeRefinedBy(TemporalAccessor temporal) {
+                throw new UnsupportedOperationException();
+            }
+            @Override
+            public long getFrom(TemporalAccessor temporal) {
+                throw new UnsupportedOperationException();
+            }
+            @Override
+            public <R extends Temporal> R adjustInto(R temporal, long newValue) {
+                throw new UnsupportedOperationException();
+            }
+            @Override
+            public TemporalAccessor resolve(
+                    Map<TemporalField, Long> fieldValues, Chronology chronology,
+                    ZoneId zone, ResolverStyle resolverStyle) {
+                return ZonedDateTime.of(2010, 6, 30, 12, 30, 0, 0, ZoneId.of("Europe/Paris"));
+            }
+        };
+        DateTimeFormatter f = new DateTimeFormatterBuilder().appendValue(field).toFormatter().withZone(ZoneId.of("Europe/London"));
+        f.parse("1234567890");
+    }
+
 }
diff --git a/jdk/test/java/time/tck/java/time/serial/TCKClockSerialization.java b/jdk/test/java/time/tck/java/time/serial/TCKClockSerialization.java
new file mode 100644
index 0000000..d3ef560
--- /dev/null
+++ b/jdk/test/java/time/tck/java/time/serial/TCKClockSerialization.java
@@ -0,0 +1,114 @@
+/*
+ * Copyright (c) 2012, 2013, Oracle and/or its affiliates. All rights reserved.
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * This code is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU General Public License version 2 only, as
+ * published by the Free Software Foundation.
+ *
+ * This code is distributed in the hope that it will be useful, but WITHOUT
+ * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
+ * version 2 for more details (a copy is included in the LICENSE file that
+ * accompanied this code).
+ *
+ * You should have received a copy of the GNU General Public License version
+ * 2 along with this work; if not, write to the Free Software Foundation,
+ * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
+ *
+ * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
+ * or visit www.oracle.com if you need additional information or have any
+ * questions.
+ */
+
+/*
+ * This file is available under and governed by the GNU General Public
+ * License version 2 only, as published by the Free Software Foundation.
+ * However, the following notice accompanied the original version of this
+ * file:
+ *
+ * Copyright (c) 2008-2012 Stephen Colebourne & Michael Nascimento Santos
+ *
+ * All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions are met:
+ *
+ *  * Redistributions of source code must retain the above copyright notice,
+ *    this list of conditions and the following disclaimer.
+ *
+ *  * Redistributions in binary form must reproduce the above copyright notice,
+ *    this list of conditions and the following disclaimer in the documentation
+ *    and/or other materials provided with the distribution.
+ *
+ *  * Neither the name of JSR-310 nor the names of its contributors
+ *    may be used to endorse or promote products derived from this software
+ *    without specific prior written permission.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+ * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
+ * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
+ * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR
+ * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
+ * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
+ * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
+ * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
+ * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
+ * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
+ * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ */
+package tck.java.time.serial;
+
+
+import java.io.IOException;
+import java.time.Clock;
+import java.time.Duration;
+import java.time.Instant;
+import java.time.LocalDateTime;
+import java.time.ZoneId;
+import java.time.ZoneOffset;
+import java.time.ZonedDateTime;
+
+import org.testng.annotations.Test;
+
+import tck.java.time.AbstractTCKTest;
+
+/**
+ * Test system and offset clocks serialization.
+ */
+@Test
+public class TCKClockSerialization extends AbstractTCKTest {
+
+    private static final ZoneId MOSCOW = ZoneId.of("Europe/Moscow");
+    private static final ZoneId PARIS = ZoneId.of("Europe/Paris");
+
+    private static final Duration AMOUNT = Duration.ofSeconds(2);
+    private static final ZonedDateTime ZDT = LocalDateTime.of(2008, 6, 30, 11, 30, 10, 500).atZone(ZoneOffset.ofHours(2));
+    private static final Instant INSTANT = ZDT.toInstant();
+
+    //-----------------------------------------------------------------------
+    public void test_systemClockSerializable() throws IOException, ClassNotFoundException {
+        assertSerializable(Clock.systemUTC());
+        assertSerializable(Clock.systemDefaultZone());
+        assertSerializable(Clock.system(PARIS));
+    }
+
+    //-----------------------------------------------------------------------
+    public void test_offsetClockSerializable() throws IOException, ClassNotFoundException {
+        assertSerializable(Clock.offset(Clock.system(PARIS), AMOUNT));
+    }
+
+    //-----------------------------------------------------------------------
+    public void test_tickClockSerializable() throws IOException, ClassNotFoundException {
+        assertSerializable(Clock.tickSeconds(PARIS));
+        assertSerializable(Clock.tickMinutes(MOSCOW));
+        assertSerializable(Clock.tick(Clock.fixed(INSTANT, PARIS), AMOUNT));
+    }
+
+    //-----------------------------------------------------------------------
+    public void test_fixedClockSerializable() throws IOException, ClassNotFoundException {
+        assertSerializable(Clock.fixed(INSTANT, ZoneOffset.UTC));
+        assertSerializable(Clock.fixed(INSTANT, PARIS));
+    }
+
+}
diff --git a/jdk/test/java/time/tck/java/time/serial/TCKDurationSerialization.java b/jdk/test/java/time/tck/java/time/serial/TCKDurationSerialization.java
new file mode 100644
index 0000000..15d079b
--- /dev/null
+++ b/jdk/test/java/time/tck/java/time/serial/TCKDurationSerialization.java
@@ -0,0 +1,113 @@
+/*
+ * Copyright (c) 2012, 2013, Oracle and/or its affiliates. All rights reserved.
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * This code is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU General Public License version 2 only, as
+ * published by the Free Software Foundation.
+ *
+ * This code is distributed in the hope that it will be useful, but WITHOUT
+ * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
+ * version 2 for more details (a copy is included in the LICENSE file that
+ * accompanied this code).
+ *
+ * You should have received a copy of the GNU General Public License version
+ * 2 along with this work; if not, write to the Free Software Foundation,
+ * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
+ *
+ * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
+ * or visit www.oracle.com if you need additional information or have any
+ * questions.
+ */
+
+/*
+ * This file is available under and governed by the GNU General Public
+ * License version 2 only, as published by the Free Software Foundation.
+ * However, the following notice accompanied the original version of this
+ * file:
+ *
+ * Copyright (c) 2007-2012, Stephen Colebourne & Michael Nascimento Santos
+ *
+ * All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions are met:
+ *
+ *  * Redistributions of source code must retain the above copyright notice,
+ *    this list of conditions and the following disclaimer.
+ *
+ *  * Redistributions in binary form must reproduce the above copyright notice,
+ *    this list of conditions and the following disclaimer in the documentation
+ *    and/or other materials provided with the distribution.
+ *
+ *  * Neither the name of JSR-310 nor the names of its contributors
+ *    may be used to endorse or promote products derived from this software
+ *    without specific prior written permission.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+ * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
+ * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
+ * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR
+ * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
+ * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
+ * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
+ * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
+ * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
+ * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
+ * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ */
+package tck.java.time.serial;
+
+import static org.testng.Assert.assertTrue;
+
+import org.testng.annotations.Test;
+import tck.java.time.AbstractTCKTest;
+
+import java.io.ByteArrayOutputStream;
+import java.io.DataOutputStream;
+import java.io.Serializable;
+import java.time.Duration;
+
+/**
+ * Test Duration serialization.
+ */
+@Test
+public class TCKDurationSerialization extends AbstractTCKTest {
+
+    //-----------------------------------------------------------------------
+    @Test
+    public void test_interfaces() {
+        assertTrue(Serializable.class.isAssignableFrom(Duration.class));
+        assertTrue(Comparable.class.isAssignableFrom(Duration.class));
+    }
+
+    //-----------------------------------------------------------------------
+    @Test
+    public void test_serialization() throws Exception {
+        assertSerializable(Duration.ofHours(5));
+        assertSerializable(Duration.ofHours(0));
+        assertSerializable(Duration.ofHours(-5));
+    }
+
+    @Test
+    public void test_serialization_format() throws Exception {
+        ByteArrayOutputStream baos = new ByteArrayOutputStream();
+        try (DataOutputStream dos = new DataOutputStream(baos) ) {
+            dos.writeByte(1);
+            dos.writeLong(654321);
+            dos.writeInt(123456789);
+        }
+        byte[] bytes = baos.toByteArray();
+        assertSerializedBySer(Duration.ofSeconds(654321, 123456789), bytes);
+    }
+
+    //-----------------------------------------------------------------------
+    // serialization
+    //-----------------------------------------------------------------------
+    @Test
+    public void test_deserializationSingleton() throws Exception {
+        assertSerializableSame(Duration.ZERO);
+    }
+
+}
diff --git a/jdk/test/java/time/tck/java/time/serial/TCKInstantSerialization.java b/jdk/test/java/time/tck/java/time/serial/TCKInstantSerialization.java
new file mode 100644
index 0000000..34a7a51
--- /dev/null
+++ b/jdk/test/java/time/tck/java/time/serial/TCKInstantSerialization.java
@@ -0,0 +1,95 @@
+/*
+ * Copyright (c) 2012, 2013, Oracle and/or its affiliates. All rights reserved.
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * This code is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU General Public License version 2 only, as
+ * published by the Free Software Foundation.
+ *
+ * This code is distributed in the hope that it will be useful, but WITHOUT
+ * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
+ * version 2 for more details (a copy is included in the LICENSE file that
+ * accompanied this code).
+ *
+ * You should have received a copy of the GNU General Public License version
+ * 2 along with this work; if not, write to the Free Software Foundation,
+ * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
+ *
+ * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
+ * or visit www.oracle.com if you need additional information or have any
+ * questions.
+ */
+
+/*
+ * This file is available under and governed by the GNU General Public
+ * License version 2 only, as published by the Free Software Foundation.
+ * However, the following notice accompanied the original version of this
+ * file:
+ *
+ * Copyright (c) 2007-2012, Stephen Colebourne & Michael Nascimento Santos
+ *
+ * All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions are met:
+ *
+ *  * Redistributions of source code must retain the above copyright notice,
+ *    this list of conditions and the following disclaimer.
+ *
+ *  * Redistributions in binary form must reproduce the above copyright notice,
+ *    this list of conditions and the following disclaimer in the documentation
+ *    and/or other materials provided with the distribution.
+ *
+ *  * Neither the name of JSR-310 nor the names of its contributors
+ *    may be used to endorse or promote products derived from this software
+ *    without specific prior written permission.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+ * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
+ * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
+ * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR
+ * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
+ * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
+ * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
+ * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
+ * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
+ * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
+ * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ */
+package tck.java.time.serial;
+
+import org.testng.annotations.BeforeMethod;
+import org.testng.annotations.Test;
+import tck.java.time.AbstractTCKTest;
+
+import java.io.ByteArrayOutputStream;
+import java.io.DataOutputStream;
+import java.time.Instant;
+
+/**
+ * Test Instant serialization.
+ */
+@Test
+public class TCKInstantSerialization extends AbstractTCKTest {
+
+    //-----------------------------------------------------------------------
+    @Test
+    public void test_serialization() throws Exception {
+        assertSerializable(Instant.ofEpochMilli(134l));
+    }
+
+    @Test
+    public void test_serialization_format() throws Exception {
+        ByteArrayOutputStream baos = new ByteArrayOutputStream();
+        try (DataOutputStream dos = new DataOutputStream(baos) ) {
+            dos.writeByte(2);
+            dos.writeLong(654321);
+            dos.writeInt(123456789);
+        }
+        byte[] bytes = baos.toByteArray();
+        assertSerializedBySer(Instant.ofEpochSecond(654321, 123456789), bytes);
+    }
+
+
+}
diff --git a/jdk/test/java/time/tck/java/time/serial/TCKLocalDateSerialization.java b/jdk/test/java/time/tck/java/time/serial/TCKLocalDateSerialization.java
new file mode 100644
index 0000000..c42fa5e
--- /dev/null
+++ b/jdk/test/java/time/tck/java/time/serial/TCKLocalDateSerialization.java
@@ -0,0 +1,105 @@
+/*
+ * Copyright (c) 2012, 2013, Oracle and/or its affiliates. All rights reserved.
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * This code is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU General Public License version 2 only, as
+ * published by the Free Software Foundation.
+ *
+ * This code is distributed in the hope that it will be useful, but WITHOUT
+ * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
+ * version 2 for more details (a copy is included in the LICENSE file that
+ * accompanied this code).
+ *
+ * You should have received a copy of the GNU General Public License version
+ * 2 along with this work; if not, write to the Free Software Foundation,
+ * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
+ *
+ * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
+ * or visit www.oracle.com if you need additional information or have any
+ * questions.
+ */
+
+/*
+ * This file is available under and governed by the GNU General Public
+ * License version 2 only, as published by the Free Software Foundation.
+ * However, the following notice accompanied the original version of this
+ * file:
+ *
+ * Copyright (c) 2007-2012, Stephen Colebourne & Michael Nascimento Santos
+ *
+ * All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions are met:
+ *
+ *  * Redistributions of source code must retain the above copyright notice,
+ *    this list of conditions and the following disclaimer.
+ *
+ *  * Redistributions in binary form must reproduce the above copyright notice,
+ *    this list of conditions and the following disclaimer in the documentation
+ *    and/or other materials provided with the distribution.
+ *
+ *  * Neither the name of JSR-310 nor the names of its contributors
+ *    may be used to endorse or promote products derived from this software
+ *    without specific prior written permission.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+ * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
+ * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
+ * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR
+ * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
+ * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
+ * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
+ * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
+ * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
+ * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
+ * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ */
+package tck.java.time.serial;
+
+import org.testng.annotations.BeforeMethod;
+import org.testng.annotations.Test;
+import tck.java.time.AbstractTCKTest;
+
+import java.io.ByteArrayOutputStream;
+import java.io.DataOutputStream;
+import java.time.LocalDate;
+
+/**
+ * Test LocalDate serialization.
+ */
+@Test
+public class TCKLocalDateSerialization extends AbstractTCKTest {
+
+    private LocalDate TEST_2007_07_15;
+
+    @BeforeMethod
+    public void setUp() {
+        TEST_2007_07_15 = LocalDate.of(2007, 7, 15);
+    }
+
+
+    //-----------------------------------------------------------------------
+    @Test
+    public void test_serialization() throws Exception {
+        assertSerializable(TEST_2007_07_15);
+        assertSerializable(LocalDate.MIN);
+        assertSerializable(LocalDate.MAX);
+    }
+
+    @Test
+    public void test_serialization_format() throws Exception {
+        ByteArrayOutputStream baos = new ByteArrayOutputStream();
+        try (DataOutputStream dos = new DataOutputStream(baos) ) {
+            dos.writeByte(3);
+            dos.writeInt(2012);
+            dos.writeByte(9);
+            dos.writeByte(16);
+        }
+        byte[] bytes = baos.toByteArray();
+        assertSerializedBySer(LocalDate.of(2012, 9, 16), bytes);
+    }
+
+}
diff --git a/jdk/test/java/time/tck/java/time/serial/TCKLocalDateTimeSerialization.java b/jdk/test/java/time/tck/java/time/serial/TCKLocalDateTimeSerialization.java
new file mode 100644
index 0000000..aa73976
--- /dev/null
+++ b/jdk/test/java/time/tck/java/time/serial/TCKLocalDateTimeSerialization.java
@@ -0,0 +1,102 @@
+/*
+ * Copyright (c) 2012, 2013, Oracle and/or its affiliates. All rights reserved.
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * This code is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU General Public License version 2 only, as
+ * published by the Free Software Foundation.
+ *
+ * This code is distributed in the hope that it will be useful, but WITHOUT
+ * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
+ * version 2 for more details (a copy is included in the LICENSE file that
+ * accompanied this code).
+ *
+ * You should have received a copy of the GNU General Public License version
+ * 2 along with this work; if not, write to the Free Software Foundation,
+ * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
+ *
+ * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
+ * or visit www.oracle.com if you need additional information or have any
+ * questions.
+ */
+
+/*
+ * This file is available under and governed by the GNU General Public
+ * License version 2 only, as published by the Free Software Foundation.
+ * However, the following notice accompanied the original version of this
+ * file:
+ *
+ * Copyright (c) 2008-2012, Stephen Colebourne & Michael Nascimento Santos
+ *
+ * All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions are met:
+ *
+ *  * Redistributions of source code must retain the above copyright notice,
+ *    this list of conditions and the following disclaimer.
+ *
+ *  * Redistributions in binary form must reproduce the above copyright notice,
+ *    this list of conditions and the following disclaimer in the documentation
+ *    and/or other materials provided with the distribution.
+ *
+ *  * Neither the name of JSR-310 nor the names of its contributors
+ *    may be used to endorse or promote products derived from this software
+ *    without specific prior written permission.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+ * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
+ * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
+ * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR
+ * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
+ * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
+ * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
+ * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
+ * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
+ * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
+ * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ */
+package tck.java.time.serial;
+
+import org.testng.annotations.Test;
+import tck.java.time.AbstractTCKTest;
+
+import java.io.ByteArrayOutputStream;
+import java.io.DataOutputStream;
+import java.time.LocalDateTime;
+
+/**
+ * Test serialization of LocalDateTime.
+ */
+@Test
+public class TCKLocalDateTimeSerialization extends AbstractTCKTest {
+
+    private LocalDateTime TEST_2007_07_15_12_30_40_987654321 = LocalDateTime.of(2007, 7, 15, 12, 30, 40, 987654321);
+
+    //-----------------------------------------------------------------------
+    @Test
+    public void test_serialization() throws Exception {
+        assertSerializable(TEST_2007_07_15_12_30_40_987654321);
+        assertSerializable(LocalDateTime.MIN);
+        assertSerializable(LocalDateTime.MAX);
+    }
+
+    @Test
+    public void test_serialization_format() throws Exception {
+        ByteArrayOutputStream baos = new ByteArrayOutputStream();
+        try (DataOutputStream dos = new DataOutputStream(baos) ) {
+            dos.writeByte(5);
+            dos.writeInt(2012);
+            dos.writeByte(9);
+            dos.writeByte(16);
+            dos.writeByte(22);
+            dos.writeByte(17);
+            dos.writeByte(59);
+            dos.writeInt(459_000_000);
+        }
+        byte[] bytes = baos.toByteArray();
+        assertSerializedBySer(LocalDateTime.of(2012, 9, 16, 22, 17, 59, 459_000_000), bytes);
+    }
+
+}
diff --git a/jdk/test/java/time/tck/java/time/serial/TCKLocalTimeSerialization.java b/jdk/test/java/time/tck/java/time/serial/TCKLocalTimeSerialization.java
new file mode 100644
index 0000000..d78de65
--- /dev/null
+++ b/jdk/test/java/time/tck/java/time/serial/TCKLocalTimeSerialization.java
@@ -0,0 +1,145 @@
+/*
+ * Copyright (c) 2012, 2013, Oracle and/or its affiliates. All rights reserved.
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * This code is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU General Public License version 2 only, as
+ * published by the Free Software Foundation.
+ *
+ * This code is distributed in the hope that it will be useful, but WITHOUT
+ * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
+ * version 2 for more details (a copy is included in the LICENSE file that
+ * accompanied this code).
+ *
+ * You should have received a copy of the GNU General Public License version
+ * 2 along with this work; if not, write to the Free Software Foundation,
+ * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
+ *
+ * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
+ * or visit www.oracle.com if you need additional information or have any
+ * questions.
+ */
+
+/*
+ * This file is available under and governed by the GNU General Public
+ * License version 2 only, as published by the Free Software Foundation.
+ * However, the following notice accompanied the original version of this
+ * file:
+ *
+ * Copyright (c) 2007-2012, Stephen Colebourne & Michael Nascimento Santos
+ *
+ * All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions are met:
+ *
+ *  * Redistributions of source code must retain the above copyright notice,
+ *    this list of conditions and the following disclaimer.
+ *
+ *  * Redistributions in binary form must reproduce the above copyright notice,
+ *    this list of conditions and the following disclaimer in the documentation
+ *    and/or other materials provided with the distribution.
+ *
+ *  * Neither the name of JSR-310 nor the names of its contributors
+ *    may be used to endorse or promote products derived from this software
+ *    without specific prior written permission.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+ * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
+ * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
+ * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR
+ * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
+ * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
+ * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
+ * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
+ * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
+ * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
+ * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ */
+package tck.java.time.serial;
+
+import org.testng.annotations.BeforeMethod;
+import org.testng.annotations.Test;
+import tck.java.time.AbstractTCKTest;
+
+import java.io.ByteArrayOutputStream;
+import java.io.DataOutputStream;
+import java.time.LocalTime;
+
+/**
+ * Test LocalTime serialization.
+ */
+@Test
+public class TCKLocalTimeSerialization extends AbstractTCKTest {
+
+
+    private LocalTime TEST_12_30_40_987654321;
+
+
+    @BeforeMethod
+    public void setUp() {
+        TEST_12_30_40_987654321 = LocalTime.of(12, 30, 40, 987654321);
+    }
+
+
+    //-----------------------------------------------------------------------
+    @Test
+    public void test_serialization() throws Exception {
+        assertSerializable(TEST_12_30_40_987654321);
+        assertSerializable(LocalTime.MIN);
+        assertSerializable(LocalTime.MAX);
+    }
+
+    @Test
+    public void test_serialization_format_h() throws Exception {
+        ByteArrayOutputStream baos = new ByteArrayOutputStream();
+        try (DataOutputStream dos = new DataOutputStream(baos) ) {
+            dos.writeByte(4);
+            dos.writeByte(-1 - 22);
+        }
+        byte[] bytes = baos.toByteArray();
+        assertSerializedBySer(LocalTime.of(22, 0), bytes);
+    }
+
+    @Test
+    public void test_serialization_format_hm() throws Exception {
+        ByteArrayOutputStream baos = new ByteArrayOutputStream();
+        try (DataOutputStream dos = new DataOutputStream(baos) ) {
+            dos.writeByte(4);
+            dos.writeByte(22);
+            dos.writeByte(-1 - 17);
+        }
+        byte[] bytes = baos.toByteArray();
+        assertSerializedBySer(LocalTime.of(22, 17), bytes);
+    }
+
+    @Test
+    public void test_serialization_format_hms() throws Exception {
+        ByteArrayOutputStream baos = new ByteArrayOutputStream();
+        try (DataOutputStream dos = new DataOutputStream(baos) ) {
+            dos.writeByte(4);
+            dos.writeByte(22);
+            dos.writeByte(17);
+            dos.writeByte(-1 - 59);
+        }
+        byte[] bytes = baos.toByteArray();
+        assertSerializedBySer(LocalTime.of(22, 17, 59), bytes);
+    }
+
+    @Test
+    public void test_serialization_format_hmsn() throws Exception {
+        ByteArrayOutputStream baos = new ByteArrayOutputStream();
+        try (DataOutputStream dos = new DataOutputStream(baos) ) {
+            dos.writeByte(4);
+            dos.writeByte(22);
+            dos.writeByte(17);
+            dos.writeByte(59);
+            dos.writeInt(459_000_000);
+        }
+        byte[] bytes = baos.toByteArray();
+        assertSerializedBySer(LocalTime.of(22, 17, 59, 459_000_000), bytes);
+    }
+
+
+}
diff --git a/jdk/test/java/time/tck/java/time/serial/TCKMonthDaySerialization.java b/jdk/test/java/time/tck/java/time/serial/TCKMonthDaySerialization.java
new file mode 100644
index 0000000..8650e7e
--- /dev/null
+++ b/jdk/test/java/time/tck/java/time/serial/TCKMonthDaySerialization.java
@@ -0,0 +1,102 @@
+/*
+ * Copyright (c) 2012, 2013, Oracle and/or its affiliates. All rights reserved.
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * This code is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU General Public License version 2 only, as
+ * published by the Free Software Foundation.
+ *
+ * This code is distributed in the hope that it will be useful, but WITHOUT
+ * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
+ * version 2 for more details (a copy is included in the LICENSE file that
+ * accompanied this code).
+ *
+ * You should have received a copy of the GNU General Public License version
+ * 2 along with this work; if not, write to the Free Software Foundation,
+ * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
+ *
+ * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
+ * or visit www.oracle.com if you need additional information or have any
+ * questions.
+ */
+
+/*
+ * This file is available under and governed by the GNU General Public
+ * License version 2 only, as published by the Free Software Foundation.
+ * However, the following notice accompanied the original version of this
+ * file:
+ *
+ * Copyright (c) 2008-2012, Stephen Colebourne & Michael Nascimento Santos
+ *
+ * All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions are met:
+ *
+ *  * Redistributions of source code must retain the above copyright notice,
+ *    this list of conditions and the following disclaimer.
+ *
+ *  * Redistributions in binary form must reproduce the above copyright notice,
+ *    this list of conditions and the following disclaimer in the documentation
+ *    and/or other materials provided with the distribution.
+ *
+ *  * Neither the name of JSR-310 nor the names of its contributors
+ *    may be used to endorse or promote products derived from this software
+ *    without specific prior written permission.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+ * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
+ * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
+ * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR
+ * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
+ * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
+ * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
+ * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
+ * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
+ * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
+ * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ */
+package tck.java.time.serial;
+
+import org.testng.annotations.BeforeMethod;
+import org.testng.annotations.Test;
+import tck.java.time.AbstractTCKTest;
+
+import java.io.ByteArrayOutputStream;
+import java.io.DataOutputStream;
+import java.io.IOException;
+import java.time.MonthDay;
+
+/**
+ * Test MonthDay serialization.
+ */
+@Test
+public class TCKMonthDaySerialization extends AbstractTCKTest {
+
+    private MonthDay TEST_07_15;
+
+    @BeforeMethod
+    public void setUp() {
+        TEST_07_15 = MonthDay.of(7, 15);
+    }
+
+    //-----------------------------------------------------------------------
+    @Test
+    public void test_serialization() throws ClassNotFoundException, IOException {
+        assertSerializable(TEST_07_15);
+    }
+
+    @Test
+    public void test_serialization_format() throws Exception {
+        ByteArrayOutputStream baos = new ByteArrayOutputStream();
+        try (DataOutputStream dos = new DataOutputStream(baos) ) {
+            dos.writeByte(13);       // java.time.temporal.Ser.MONTH_DAY_TYPE
+            dos.writeByte(9);
+            dos.writeByte(16);
+        }
+        byte[] bytes = baos.toByteArray();
+        assertSerializedBySer(MonthDay.of(9, 16), bytes);
+    }
+
+}
diff --git a/jdk/test/java/time/tck/java/time/serial/TCKOffsetDateTimeSerialization.java b/jdk/test/java/time/tck/java/time/serial/TCKOffsetDateTimeSerialization.java
new file mode 100644
index 0000000..371014f
--- /dev/null
+++ b/jdk/test/java/time/tck/java/time/serial/TCKOffsetDateTimeSerialization.java
@@ -0,0 +1,124 @@
+/*
+ * Copyright (c) 2012, 2013, Oracle and/or its affiliates. All rights reserved.
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * This code is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU General Public License version 2 only, as
+ * published by the Free Software Foundation.
+ *
+ * This code is distributed in the hope that it will be useful, but WITHOUT
+ * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
+ * version 2 for more details (a copy is included in the LICENSE file that
+ * accompanied this code).
+ *
+ * You should have received a copy of the GNU General Public License version
+ * 2 along with this work; if not, write to the Free Software Foundation,
+ * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
+ *
+ * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
+ * or visit www.oracle.com if you need additional information or have any
+ * questions.
+ */
+
+/*
+ * This file is available under and governed by the GNU General Public
+ * License version 2 only, as published by the Free Software Foundation.
+ * However, the following notice accompanied the original version of this
+ * file:
+ *
+ * Copyright (c) 2008-2012, Stephen Colebourne & Michael Nascimento Santos
+ *
+ * All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions are met:
+ *
+ *  * Redistributions of source code must retain the above copyright notice,
+ *    this list of conditions and the following disclaimer.
+ *
+ *  * Redistributions in binary form must reproduce the above copyright notice,
+ *    this list of conditions and the following disclaimer in the documentation
+ *    and/or other materials provided with the distribution.
+ *
+ *  * Neither the name of JSR-310 nor the names of its contributors
+ *    may be used to endorse or promote products derived from this software
+ *    without specific prior written permission.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+ * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
+ * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
+ * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR
+ * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
+ * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
+ * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
+ * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
+ * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
+ * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
+ * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ */
+package tck.java.time.serial;
+
+import org.testng.annotations.BeforeMethod;
+import org.testng.annotations.Test;
+import tck.java.time.AbstractTCKTest;
+
+import java.io.ByteArrayOutputStream;
+import java.io.DataOutputStream;
+import java.time.LocalDateTime;
+import java.time.OffsetDateTime;
+import java.time.ZoneOffset;
+
+/**
+ * Test OffsetDateTime serialization.
+ */
+@Test
+public class TCKOffsetDateTimeSerialization extends AbstractTCKTest {
+
+    private static final ZoneOffset OFFSET_PONE = ZoneOffset.ofHours(1);
+    private OffsetDateTime TEST_2008_6_30_11_30_59_000000500;
+
+    @BeforeMethod
+    public void setUp() {
+        TEST_2008_6_30_11_30_59_000000500 = OffsetDateTime.of(2008, 6, 30, 11, 30, 59, 500, OFFSET_PONE);
+    }
+
+    //-----------------------------------------------------------------------
+    @Test
+    public void test_serialization() throws Exception {
+        assertSerializable(TEST_2008_6_30_11_30_59_000000500);
+        assertSerializable(OffsetDateTime.MIN);
+        assertSerializable(OffsetDateTime.MAX);
+    }
+
+    @Test
+    public void test_serialization_format() throws Exception {
+        ByteArrayOutputStream baos = new ByteArrayOutputStream();
+        try (DataOutputStream dos = new DataOutputStream(baos) ) {
+            dos.writeByte(10);       // java.time.Ser.OFFSET_DATE_TIME_TYPE
+        }
+        byte[] bytes = baos.toByteArray();
+        ByteArrayOutputStream baosDateTime = new ByteArrayOutputStream();
+        try (DataOutputStream dos = new DataOutputStream(baosDateTime) ) {
+            dos.writeByte(5);
+            dos.writeInt(2012);
+            dos.writeByte(9);
+            dos.writeByte(16);
+            dos.writeByte(22);
+            dos.writeByte(17);
+            dos.writeByte(59);
+            dos.writeInt(464_000_000);
+        }
+        byte[] bytesDateTime = baosDateTime.toByteArray();
+        ByteArrayOutputStream baosOffset = new ByteArrayOutputStream();
+        try (DataOutputStream dos = new DataOutputStream(baosOffset) ) {
+            dos.writeByte(8);
+            dos.writeByte(4);  // quarter hours stored: 3600 / 900
+        }
+        byte[] bytesOffset = baosOffset.toByteArray();
+        LocalDateTime ldt = LocalDateTime.of(2012, 9, 16, 22, 17, 59, 464_000_000);
+        assertSerializedBySer(OffsetDateTime.of(ldt, ZoneOffset.ofHours(1)), bytes, bytesDateTime, bytesOffset);
+    }
+
+
+}
diff --git a/jdk/test/java/time/tck/java/time/serial/TCKOffsetTimeSerialization.java b/jdk/test/java/time/tck/java/time/serial/TCKOffsetTimeSerialization.java
new file mode 100644
index 0000000..ee04e1e
--- /dev/null
+++ b/jdk/test/java/time/tck/java/time/serial/TCKOffsetTimeSerialization.java
@@ -0,0 +1,122 @@
+/*
+ * Copyright (c) 2012, 2013, Oracle and/or its affiliates. All rights reserved.
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * This code is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU General Public License version 2 only, as
+ * published by the Free Software Foundation.
+ *
+ * This code is distributed in the hope that it will be useful, but WITHOUT
+ * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
+ * version 2 for more details (a copy is included in the LICENSE file that
+ * accompanied this code).
+ *
+ * You should have received a copy of the GNU General Public License version
+ * 2 along with this work; if not, write to the Free Software Foundation,
+ * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
+ *
+ * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
+ * or visit www.oracle.com if you need additional information or have any
+ * questions.
+ */
+
+/*
+ * This file is available under and governed by the GNU General Public
+ * License version 2 only, as published by the Free Software Foundation.
+ * However, the following notice accompanied the original version of this
+ * file:
+ *
+ * Copyright (c) 2008-2012, Stephen Colebourne & Michael Nascimento Santos
+ *
+ * All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions are met:
+ *
+ *  * Redistributions of source code must retain the above copyright notice,
+ *    this list of conditions and the following disclaimer.
+ *
+ *  * Redistributions in binary form must reproduce the above copyright notice,
+ *    this list of conditions and the following disclaimer in the documentation
+ *    and/or other materials provided with the distribution.
+ *
+ *  * Neither the name of JSR-310 nor the names of its contributors
+ *    may be used to endorse or promote products derived from this software
+ *    without specific prior written permission.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+ * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
+ * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
+ * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR
+ * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
+ * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
+ * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
+ * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
+ * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
+ * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
+ * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ */
+package tck.java.time.serial;
+
+import org.testng.annotations.BeforeMethod;
+import org.testng.annotations.Test;
+import tck.java.time.AbstractTCKTest;
+
+import java.io.ByteArrayOutputStream;
+import java.io.DataOutputStream;
+import java.time.OffsetTime;
+import java.time.ZoneOffset;
+
+/**
+ * Test OffsetTime serialization.
+ */
+@Test
+public class TCKOffsetTimeSerialization extends AbstractTCKTest {
+
+    private static final ZoneOffset OFFSET_PONE = ZoneOffset.ofHours(1);
+    private OffsetTime TEST_11_30_59_500_PONE;
+
+    @BeforeMethod
+    public void setUp() {
+        TEST_11_30_59_500_PONE = OffsetTime.of(11, 30, 59, 500, OFFSET_PONE);
+    }
+
+
+
+    //-----------------------------------------------------------------------
+    @Test
+    public void test_serialization() throws Exception {
+        assertSerializable(TEST_11_30_59_500_PONE);
+        assertSerializable(OffsetTime.MIN);
+        assertSerializable(OffsetTime.MAX);
+    }
+
+    @Test
+    public void test_serialization_format() throws Exception {
+        ByteArrayOutputStream baos = new ByteArrayOutputStream();
+        try (DataOutputStream dos = new DataOutputStream(baos) ) {
+            dos.writeByte(9);       // java.time.Ser.OFFSET_TIME_TYPE
+        }
+        byte[] bytes = baos.toByteArray();
+        ByteArrayOutputStream baosTime = new ByteArrayOutputStream();
+        try (DataOutputStream dos = new DataOutputStream(baosTime) ) {
+            dos.writeByte(4);
+            dos.writeByte(22);
+            dos.writeByte(17);
+            dos.writeByte(59);
+            dos.writeInt(464_000_000);
+        }
+        byte[] bytesTime = baosTime.toByteArray();
+        ByteArrayOutputStream baosOffset = new ByteArrayOutputStream();
+        try (DataOutputStream dos = new DataOutputStream(baosOffset) ) {
+            dos.writeByte(8);
+            dos.writeByte(4);  // quarter hours stored: 3600 / 900
+        }
+        byte[] bytesOffset = baosOffset.toByteArray();
+        assertSerializedBySer(OffsetTime.of(22, 17, 59, 464_000_000, ZoneOffset.ofHours(1)), bytes,
+                bytesTime, bytesOffset);
+    }
+
+
+}
diff --git a/jdk/test/java/time/tck/java/time/serial/TCKPeriodSerialization.java b/jdk/test/java/time/tck/java/time/serial/TCKPeriodSerialization.java
new file mode 100644
index 0000000..57bb92f
--- /dev/null
+++ b/jdk/test/java/time/tck/java/time/serial/TCKPeriodSerialization.java
@@ -0,0 +1,81 @@
+/*
+ * Copyright (c) 2012, 2013, Oracle and/or its affiliates. All rights reserved.
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * This code is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU General Public License version 2 only, as
+ * published by the Free Software Foundation.
+ *
+ * This code is distributed in the hope that it will be useful, but WITHOUT
+ * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
+ * version 2 for more details (a copy is included in the LICENSE file that
+ * accompanied this code).
+ *
+ * You should have received a copy of the GNU General Public License version
+ * 2 along with this work; if not, write to the Free Software Foundation,
+ * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
+ *
+ * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
+ * or visit www.oracle.com if you need additional information or have any
+ * questions.
+ */
+
+/*
+ * This file is available under and governed by the GNU General Public
+ * License version 2 only, as published by the Free Software Foundation.
+ * However, the following notice accompanied the original version of this
+ * file:
+ *
+ * Copyright (c) 2008-2012, Stephen Colebourne & Michael Nascimento Santos
+ *
+ * All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions are met:
+ *
+ *  * Redistributions of source code must retain the above copyright notice,
+ *    this list of conditions and the following disclaimer.
+ *
+ *  * Redistributions in binary form must reproduce the above copyright notice,
+ *    this list of conditions and the following disclaimer in the documentation
+ *    and/or other materials provided with the distribution.
+ *
+ *  * Neither the name of JSR-310 nor the names of its contributors
+ *    may be used to endorse or promote products derived from this software
+ *    without specific prior written permission.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+ * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
+ * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
+ * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR
+ * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
+ * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
+ * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
+ * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
+ * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
+ * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
+ * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ */
+package tck.java.time.serial;
+
+import org.testng.annotations.Test;
+import tck.java.time.AbstractTCKTest;
+
+import java.time.Period;
+
+/**
+ * Test serialization of Period.
+ */
+@Test
+public class TCKPeriodSerialization extends AbstractTCKTest {
+
+    //-----------------------------------------------------------------------
+    @Test
+    public void test_serialization() throws Exception {
+        assertSerializable(Period.ZERO);
+        assertSerializable(Period.ofDays(1));
+        assertSerializable(Period.of(1, 2, 3));
+    }
+
+}
diff --git a/jdk/test/java/time/tck/java/time/serial/TCKYearMonthSerialization.java b/jdk/test/java/time/tck/java/time/serial/TCKYearMonthSerialization.java
new file mode 100644
index 0000000..878b163
--- /dev/null
+++ b/jdk/test/java/time/tck/java/time/serial/TCKYearMonthSerialization.java
@@ -0,0 +1,103 @@
+/*
+ * Copyright (c) 2012, 2013, Oracle and/or its affiliates. All rights reserved.
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * This code is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU General Public License version 2 only, as
+ * published by the Free Software Foundation.
+ *
+ * This code is distributed in the hope that it will be useful, but WITHOUT
+ * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
+ * version 2 for more details (a copy is included in the LICENSE file that
+ * accompanied this code).
+ *
+ * You should have received a copy of the GNU General Public License version
+ * 2 along with this work; if not, write to the Free Software Foundation,
+ * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
+ *
+ * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
+ * or visit www.oracle.com if you need additional information or have any
+ * questions.
+ */
+
+/*
+ * This file is available under and governed by the GNU General Public
+ * License version 2 only, as published by the Free Software Foundation.
+ * However, the following notice accompanied the original version of this
+ * file:
+ *
+ * Copyright (c) 2008-2012, Stephen Colebourne & Michael Nascimento Santos
+ *
+ * All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions are met:
+ *
+ *  * Redistributions of source code must retain the above copyright notice,
+ *    this list of conditions and the following disclaimer.
+ *
+ *  * Redistributions in binary form must reproduce the above copyright notice,
+ *    this list of conditions and the following disclaimer in the documentation
+ *    and/or other materials provided with the distribution.
+ *
+ *  * Neither the name of JSR-310 nor the names of its contributors
+ *    may be used to endorse or promote products derived from this software
+ *    without specific prior written permission.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+ * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
+ * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
+ * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR
+ * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
+ * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
+ * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
+ * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
+ * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
+ * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
+ * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ */
+package tck.java.time.serial;
+
+import org.testng.annotations.BeforeMethod;
+import org.testng.annotations.Test;
+import tck.java.time.AbstractTCKTest;
+
+import java.io.ByteArrayOutputStream;
+import java.io.DataOutputStream;
+import java.io.IOException;
+import java.time.YearMonth;
+
+/**
+ * Test serialization of YearMonth.
+ */
+@Test
+public class TCKYearMonthSerialization extends AbstractTCKTest {
+
+    private YearMonth TEST_2008_06;
+
+    @BeforeMethod
+    public void setUp() {
+        TEST_2008_06 = YearMonth.of(2008, 6);
+    }
+
+
+    //-----------------------------------------------------------------------
+    @Test
+    public void test_serialization() throws IOException, ClassNotFoundException {
+        assertSerializable(TEST_2008_06);
+    }
+
+    @Test
+    public void test_serialization_format() throws Exception {
+        ByteArrayOutputStream baos = new ByteArrayOutputStream();
+        try (DataOutputStream dos = new DataOutputStream(baos) ) {
+            dos.writeByte(12);       // java.time.temporal.Ser.YEAR_MONTH_TYPE
+            dos.writeInt(2012);
+            dos.writeByte(9);
+        }
+        byte[] bytes = baos.toByteArray();
+        assertSerializedBySer(YearMonth.of(2012, 9), bytes);
+    }
+
+}
diff --git a/jdk/test/java/time/tck/java/time/serial/TCKYearSerialization.java b/jdk/test/java/time/tck/java/time/serial/TCKYearSerialization.java
new file mode 100644
index 0000000..12f3955
--- /dev/null
+++ b/jdk/test/java/time/tck/java/time/serial/TCKYearSerialization.java
@@ -0,0 +1,94 @@
+/*
+ * Copyright (c) 2012, 2013, Oracle and/or its affiliates. All rights reserved.
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * This code is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU General Public License version 2 only, as
+ * published by the Free Software Foundation.
+ *
+ * This code is distributed in the hope that it will be useful, but WITHOUT
+ * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
+ * version 2 for more details (a copy is included in the LICENSE file that
+ * accompanied this code).
+ *
+ * You should have received a copy of the GNU General Public License version
+ * 2 along with this work; if not, write to the Free Software Foundation,
+ * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
+ *
+ * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
+ * or visit www.oracle.com if you need additional information or have any
+ * questions.
+ */
+
+/*
+ * This file is available under and governed by the GNU General Public
+ * License version 2 only, as published by the Free Software Foundation.
+ * However, the following notice accompanied the original version of this
+ * file:
+ *
+ * Copyright (c) 2008-2012, Stephen Colebourne & Michael Nascimento Santos
+ *
+ * All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions are met:
+ *
+ *  * Redistributions of source code must retain the above copyright notice,
+ *    this list of conditions and the following disclaimer.
+ *
+ *  * Redistributions in binary form must reproduce the above copyright notice,
+ *    this list of conditions and the following disclaimer in the documentation
+ *    and/or other materials provided with the distribution.
+ *
+ *  * Neither the name of JSR-310 nor the names of its contributors
+ *    may be used to endorse or promote products derived from this software
+ *    without specific prior written permission.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+ * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
+ * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
+ * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR
+ * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
+ * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
+ * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
+ * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
+ * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
+ * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
+ * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ */
+package tck.java.time.serial;
+
+import org.testng.annotations.Test;
+import tck.java.time.AbstractTCKTest;
+
+import java.io.ByteArrayOutputStream;
+import java.io.DataOutputStream;
+import java.time.Year;
+
+/**
+ * Test Year serialization.
+ */
+@Test
+public class TCKYearSerialization extends AbstractTCKTest {
+
+    //-----------------------------------------------------------------------
+    @Test
+    public void test_serialization() throws Exception {
+        assertSerializable(Year.of(2));
+        assertSerializable(Year.of(0));
+        assertSerializable(Year.of(-2));
+    }
+
+    @Test
+    public void test_serialization_format() throws Exception {
+        ByteArrayOutputStream baos = new ByteArrayOutputStream();
+        try (DataOutputStream dos = new DataOutputStream(baos) ) {
+            dos.writeByte(11);       // java.time.temporal.Ser.YEAR_TYPE
+            dos.writeInt(2012);
+        }
+        byte[] bytes = baos.toByteArray();
+        assertSerializedBySer(Year.of(2012), bytes);
+    }
+
+}
diff --git a/jdk/test/java/time/tck/java/time/serial/TCKZoneIdSerialization.java b/jdk/test/java/time/tck/java/time/serial/TCKZoneIdSerialization.java
new file mode 100644
index 0000000..c6f3abe
--- /dev/null
+++ b/jdk/test/java/time/tck/java/time/serial/TCKZoneIdSerialization.java
@@ -0,0 +1,263 @@
+/*
+ * Copyright (c) 2012, 2013, Oracle and/or its affiliates. All rights reserved.
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * This code is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU General Public License version 2 only, as
+ * published by the Free Software Foundation.
+ *
+ * This code is distributed in the hope that it will be useful, but WITHOUT
+ * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
+ * version 2 for more details (a copy is included in the LICENSE file that
+ * accompanied this code).
+ *
+ * You should have received a copy of the GNU General Public License version
+ * 2 along with this work; if not, write to the Free Software Foundation,
+ * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
+ *
+ * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
+ * or visit www.oracle.com if you need additional information or have any
+ * questions.
+ */
+
+/*
+ * This file is available under and governed by the GNU General Public
+ * License version 2 only, as published by the Free Software Foundation.
+ * However, the following notice accompanied the original version of this
+ * file:
+ *
+ * Copyright (c) 2008-2012, Stephen Colebourne & Michael Nascimento Santos
+ *
+ * All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions are met:
+ *
+ *  * Redistributions of source code must retain the above copyright notice,
+ *    this list of conditions and the following disclaimer.
+ *
+ *  * Redistributions in binary form must reproduce the above copyright notice,
+ *    this list of conditions and the following disclaimer in the documentation
+ *    and/or other materials provided with the distribution.
+ *
+ *  * Neither the name of JSR-310 nor the names of its contributors
+ *    may be used to endorse or promote products derived from this software
+ *    without specific prior written permission.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+ * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
+ * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
+ * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR
+ * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
+ * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
+ * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
+ * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
+ * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
+ * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
+ * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ */
+package tck.java.time.serial;
+
+import org.testng.annotations.DataProvider;
+import org.testng.annotations.Test;
+import tck.java.time.AbstractTCKTest;
+
+import java.io.*;
+import java.lang.reflect.Field;
+import java.time.DateTimeException;
+import java.time.ZoneId;
+import java.time.zone.ZoneRulesException;
+
+import static org.testng.Assert.assertEquals;
+import static org.testng.Assert.fail;
+
+/**
+ * Test serialization of ZoneId.
+ */
+@Test
+public class TCKZoneIdSerialization extends AbstractTCKTest {
+
+    //-----------------------------------------------------------------------
+    @Test
+    public void test_serialization() throws Exception {
+        assertSerializable(ZoneId.of("Europe/London"));
+        assertSerializable(ZoneId.of("America/Chicago"));
+    }
+
+    @Test
+    public void test_serialization_format() throws Exception {
+        ByteArrayOutputStream baos = new ByteArrayOutputStream();
+        try (DataOutputStream dos = new DataOutputStream(baos) ) {
+            dos.writeByte(7);
+            dos.writeUTF("Europe/London");
+        }
+        byte[] bytes = baos.toByteArray();
+        assertSerializedBySer(ZoneId.of("Europe/London"), bytes);
+    }
+
+    @Test
+    public void test_deserialization_lenient_characters() throws Exception {
+        // an ID can be loaded without validation during deserialization
+        String id = "QWERTYUIOPASDFGHJKLZXCVBNM~/._+-";
+        ZoneId deser = deserialize(id);
+        // getId, equals, hashCode, toString and normalized are OK
+        assertEquals(deser.getId(), id);
+        assertEquals(deser.toString(), id);
+        assertEquals(deser, deser);
+        assertEquals(deser.hashCode(), deser.hashCode());
+        assertEquals(deser.normalized(), deser);
+        // getting the rules is not
+        try {
+            deser.getRules();
+            fail();
+        } catch (ZoneRulesException ex) {
+            // expected
+        }
+    }
+
+    @Test(expectedExceptions=DateTimeException.class)
+    public void test_deserialization_lenient_badCharacters() throws Exception {
+        // an ID can be loaded without validation during deserialization
+        // but there is a check to ensure the ID format is valid
+        deserialize("|!?");
+    }
+
+    @Test(dataProvider="offsetBasedValid")
+    public void test_deserialization_lenient_offsetNotAllowed_noPrefix(String input, String resolvedId) throws Exception {
+        ZoneId deserialized = deserialize(input);
+        assertEquals(deserialized, ZoneId.of(input));
+        assertEquals(deserialized, ZoneId.of(resolvedId));
+    }
+
+    @Test(dataProvider="offsetBasedValidPrefix")
+    public void test_deserialization_lenient_offsetNotAllowed_prefixUTC(String input, String resolvedId, String offsetId) throws Exception {
+        ZoneId deserialized = deserialize("UTC" + input);
+        assertEquals(deserialized, ZoneId.of("UTC" + input));
+        assertEquals(deserialized, ZoneId.of("UTC" + resolvedId));
+    }
+
+    @Test(dataProvider="offsetBasedValidPrefix")
+    public void test_deserialization_lenient_offsetNotAllowed_prefixGMT(String input, String resolvedId, String offsetId) throws Exception {
+        ZoneId deserialized = deserialize("GMT" + input);
+        assertEquals(deserialized, ZoneId.of("GMT" + input));
+        assertEquals(deserialized, ZoneId.of("GMT" + resolvedId));
+    }
+
+    @Test(dataProvider="offsetBasedValidPrefix")
+    public void test_deserialization_lenient_offsetNotAllowed_prefixUT(String input, String resolvedId, String offsetId) throws Exception {
+        ZoneId deserialized = deserialize("UT" + input);
+        assertEquals(deserialized, ZoneId.of("UT" + input));
+        assertEquals(deserialized, ZoneId.of("UT" + resolvedId));
+    }
+
+    private ZoneId deserialize(String id) throws Exception {
+        String serClass = ZoneId.class.getPackage().getName() + ".Ser";
+        Class<?> serCls = Class.forName(serClass);
+        Field field = serCls.getDeclaredField("serialVersionUID");
+        field.setAccessible(true);
+        long serVer = (Long) field.get(null);
+        ByteArrayOutputStream baos = new ByteArrayOutputStream();
+        try (DataOutputStream dos = new DataOutputStream(baos)) {
+            dos.writeShort(ObjectStreamConstants.STREAM_MAGIC);
+            dos.writeShort(ObjectStreamConstants.STREAM_VERSION);
+            dos.writeByte(ObjectStreamConstants.TC_OBJECT);
+            dos.writeByte(ObjectStreamConstants.TC_CLASSDESC);
+            dos.writeUTF(serClass);
+            dos.writeLong(serVer);
+            dos.writeByte(ObjectStreamConstants.SC_EXTERNALIZABLE | ObjectStreamConstants.SC_BLOCK_DATA);
+            dos.writeShort(0);  // number of fields
+            dos.writeByte(ObjectStreamConstants.TC_ENDBLOCKDATA);  // end of classdesc
+            dos.writeByte(ObjectStreamConstants.TC_NULL);  // no superclasses
+            dos.writeByte(ObjectStreamConstants.TC_BLOCKDATA);
+            dos.writeByte(1 + 2 + id.length());  // length of data (1 byte + 2 bytes UTF length + 32 bytes UTF)
+            dos.writeByte(7);  // ZoneId
+            dos.writeUTF(id);
+            dos.writeByte(ObjectStreamConstants.TC_ENDBLOCKDATA);  // end of blockdata
+        }
+        ZoneId deser = null;
+        try (ObjectInputStream ois = new ObjectInputStream(new ByteArrayInputStream(baos.toByteArray()))) {
+            deser = (ZoneId) ois.readObject();
+        }
+        return deser;
+    }
+
+    //-----------------------------------------------------------------------
+    // regular factory and .normalized()
+    //-----------------------------------------------------------------------
+    @DataProvider(name="offsetBasedValid")
+    Object[][] data_offsetBasedValid() {
+        return new Object[][] {
+                {"Z", "Z"},
+                {"+0", "Z"},
+                {"-0", "Z"},
+                {"+00", "Z"},
+                {"+0000", "Z"},
+                {"+00:00", "Z"},
+                {"+000000", "Z"},
+                {"+00:00:00", "Z"},
+                {"-00", "Z"},
+                {"-0000", "Z"},
+                {"-00:00", "Z"},
+                {"-000000", "Z"},
+                {"-00:00:00", "Z"},
+                {"+5", "+05:00"},
+                {"+01", "+01:00"},
+                {"+0100", "+01:00"},
+                {"+01:00", "+01:00"},
+                {"+010000", "+01:00"},
+                {"+01:00:00", "+01:00"},
+                {"+12", "+12:00"},
+                {"+1234", "+12:34"},
+                {"+12:34", "+12:34"},
+                {"+123456", "+12:34:56"},
+                {"+12:34:56", "+12:34:56"},
+                {"-02", "-02:00"},
+                {"-5", "-05:00"},
+                {"-0200", "-02:00"},
+                {"-02:00", "-02:00"},
+                {"-020000", "-02:00"},
+                {"-02:00:00", "-02:00"},
+        };
+    }
+
+    //-----------------------------------------------------------------------
+    @DataProvider(name="offsetBasedValidPrefix")
+    Object[][] data_offsetBasedValidPrefix() {
+        return new Object[][] {
+                {"", "", "Z"},
+                {"+0", "", "Z"},
+                {"-0", "", "Z"},
+                {"+00", "", "Z"},
+                {"+0000", "", "Z"},
+                {"+00:00", "", "Z"},
+                {"+000000", "", "Z"},
+                {"+00:00:00", "", "Z"},
+                {"-00", "", "Z"},
+                {"-0000", "", "Z"},
+                {"-00:00", "", "Z"},
+                {"-000000", "", "Z"},
+                {"-00:00:00", "", "Z"},
+                {"+5", "+05:00", "+05:00"},
+                {"+01", "+01:00", "+01:00"},
+                {"+0100", "+01:00", "+01:00"},
+                {"+01:00", "+01:00", "+01:00"},
+                {"+010000", "+01:00", "+01:00"},
+                {"+01:00:00", "+01:00", "+01:00"},
+                {"+12", "+12:00", "+12:00"},
+                {"+1234", "+12:34", "+12:34"},
+                {"+12:34", "+12:34", "+12:34"},
+                {"+123456", "+12:34:56", "+12:34:56"},
+                {"+12:34:56", "+12:34:56", "+12:34:56"},
+                {"-02", "-02:00", "-02:00"},
+                {"-5", "-05:00", "-05:00"},
+                {"-0200", "-02:00", "-02:00"},
+                {"-02:00", "-02:00", "-02:00"},
+                {"-020000", "-02:00", "-02:00"},
+                {"-02:00:00", "-02:00", "-02:00"},
+        };
+    }
+
+
+
+}
diff --git a/jdk/test/java/time/tck/java/time/serial/TCKZoneOffsetSerialization.java b/jdk/test/java/time/tck/java/time/serial/TCKZoneOffsetSerialization.java
new file mode 100644
index 0000000..223d466
--- /dev/null
+++ b/jdk/test/java/time/tck/java/time/serial/TCKZoneOffsetSerialization.java
@@ -0,0 +1,118 @@
+/*
+ * Copyright (c) 2012, 2013, Oracle and/or its affiliates. All rights reserved.
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * This code is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU General Public License version 2 only, as
+ * published by the Free Software Foundation.
+ *
+ * This code is distributed in the hope that it will be useful, but WITHOUT
+ * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
+ * version 2 for more details (a copy is included in the LICENSE file that
+ * accompanied this code).
+ *
+ * You should have received a copy of the GNU General Public License version
+ * 2 along with this work; if not, write to the Free Software Foundation,
+ * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
+ *
+ * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
+ * or visit www.oracle.com if you need additional information or have any
+ * questions.
+ */
+
+/*
+ * This file is available under and governed by the GNU General Public
+ * License version 2 only, as published by the Free Software Foundation.
+ * However, the following notice accompanied the original version of this
+ * file:
+ *
+ * Copyright (c) 2008-2012, Stephen Colebourne & Michael Nascimento Santos
+ *
+ * All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions are met:
+ *
+ *  * Redistributions of source code must retain the above copyright notice,
+ *    this list of conditions and the following disclaimer.
+ *
+ *  * Redistributions in binary form must reproduce the above copyright notice,
+ *    this list of conditions and the following disclaimer in the documentation
+ *    and/or other materials provided with the distribution.
+ *
+ *  * Neither the name of JSR-310 nor the names of its contributors
+ *    may be used to endorse or promote products derived from this software
+ *    without specific prior written permission.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+ * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
+ * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
+ * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR
+ * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
+ * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
+ * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
+ * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
+ * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
+ * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
+ * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ */
+package tck.java.time.serial;
+
+import org.testng.annotations.Test;
+import tck.java.time.AbstractTCKTest;
+
+import java.io.ByteArrayOutputStream;
+import java.io.DataOutputStream;
+import java.time.ZoneOffset;
+
+/**
+ * Test serialization of ZoneOffset.
+ */
+@Test
+public class TCKZoneOffsetSerialization extends AbstractTCKTest {
+
+
+
+    //-----------------------------------------------------------------------
+    @Test
+    public void test_serialization() throws Exception {
+        assertSerializable(ZoneOffset.of("+01:30"));
+    }
+
+    @Test
+    public void test_serialization_format_quarterPositive() throws Exception {
+        ByteArrayOutputStream baos = new ByteArrayOutputStream();
+        try (DataOutputStream dos = new DataOutputStream(baos) ) {
+            dos.writeByte(8);
+            dos.writeByte(6);  // stored as quarter hours
+        }
+        byte[] bytes = baos.toByteArray();
+        assertSerializedBySer(ZoneOffset.ofHoursMinutes(1, 30), bytes);
+    }
+
+    @Test
+    public void test_serialization_format_quarterNegative() throws Exception {
+        ByteArrayOutputStream baos = new ByteArrayOutputStream();
+        try (DataOutputStream dos = new DataOutputStream(baos) ) {
+            dos.writeByte(8);
+            dos.writeByte(-10);  // stored as quarter hours
+        }
+        byte[] bytes = baos.toByteArray();
+        assertSerializedBySer(ZoneOffset.ofHoursMinutes(-2, -30), bytes);
+    }
+
+    @Test
+    public void test_serialization_format_full() throws Exception {
+        ByteArrayOutputStream baos = new ByteArrayOutputStream();
+        try (DataOutputStream dos = new DataOutputStream(baos) ) {
+            dos.writeByte(8);
+            dos.writeByte(127);
+            dos.writeInt(53265);
+        }
+        byte[] bytes = baos.toByteArray();
+        assertSerializedBySer(ZoneOffset.ofTotalSeconds(53265), bytes);
+    }
+
+
+}
diff --git a/jdk/test/java/time/tck/java/time/serial/TCKZonedDateTimeSerialization.java b/jdk/test/java/time/tck/java/time/serial/TCKZonedDateTimeSerialization.java
new file mode 100644
index 0000000..bde33ac
--- /dev/null
+++ b/jdk/test/java/time/tck/java/time/serial/TCKZonedDateTimeSerialization.java
@@ -0,0 +1,142 @@
+/*
+ * Copyright (c) 2012, 2013, Oracle and/or its affiliates. All rights reserved.
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * This code is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU General Public License version 2 only, as
+ * published by the Free Software Foundation.
+ *
+ * This code is distributed in the hope that it will be useful, but WITHOUT
+ * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
+ * version 2 for more details (a copy is included in the LICENSE file that
+ * accompanied this code).
+ *
+ * You should have received a copy of the GNU General Public License version
+ * 2 along with this work; if not, write to the Free Software Foundation,
+ * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
+ *
+ * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
+ * or visit www.oracle.com if you need additional information or have any
+ * questions.
+ */
+
+/*
+ * This file is available under and governed by the GNU General Public
+ * License version 2 only, as published by the Free Software Foundation.
+ * However, the following notice accompanied the original version of this
+ * file:
+ *
+ * Copyright (c) 2008-2012, Stephen Colebourne & Michael Nascimento Santos
+ *
+ * All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions are met:
+ *
+ *  * Redistributions of source code must retain the above copyright notice,
+ *    this list of conditions and the following disclaimer.
+ *
+ *  * Redistributions in binary form must reproduce the above copyright notice,
+ *    this list of conditions and the following disclaimer in the documentation
+ *    and/or other materials provided with the distribution.
+ *
+ *  * Neither the name of JSR-310 nor the names of its contributors
+ *    may be used to endorse or promote products derived from this software
+ *    without specific prior written permission.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+ * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
+ * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
+ * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR
+ * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
+ * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
+ * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
+ * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
+ * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
+ * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
+ * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ */
+package tck.java.time.serial;
+
+import org.testng.annotations.BeforeMethod;
+import org.testng.annotations.Test;
+import tck.java.time.AbstractTCKTest;
+
+import java.io.ByteArrayOutputStream;
+import java.io.DataOutputStream;
+import java.io.IOException;
+import java.time.LocalDateTime;
+import java.time.ZoneId;
+import java.time.ZoneOffset;
+import java.time.ZonedDateTime;
+
+/**
+ * Test serialization of ZonedDateTime.
+ */
+@Test
+public class TCKZonedDateTimeSerialization extends AbstractTCKTest {
+
+    private static final ZoneOffset OFFSET_0100 = ZoneOffset.ofHours(1);
+    private static final ZoneId ZONE_0100 = OFFSET_0100;
+    private static final ZoneId ZONE_PARIS = ZoneId.of("Europe/Paris");
+    private LocalDateTime TEST_LOCAL_2008_06_30_11_30_59_500;
+    private ZonedDateTime TEST_DATE_TIME;
+
+
+    @BeforeMethod
+    public void setUp() {
+        TEST_LOCAL_2008_06_30_11_30_59_500 = LocalDateTime.of(2008, 6, 30, 11, 30, 59, 500);
+        TEST_DATE_TIME = ZonedDateTime.of(TEST_LOCAL_2008_06_30_11_30_59_500, ZONE_0100);
+    }
+
+
+    //-----------------------------------------------------------------------
+    @Test
+    public void test_serialization() throws ClassNotFoundException, IOException {
+        assertSerializable(TEST_DATE_TIME);
+    }
+
+    @Test
+    public void test_serialization_format_zoneId() throws Exception {
+        ByteArrayOutputStream baos = new ByteArrayOutputStream();
+        try (DataOutputStream dos = new DataOutputStream(baos) ) {
+            dos.writeByte(6);
+            dos.writeInt(2012); // date
+            dos.writeByte(9);
+            dos.writeByte(16);
+            dos.writeByte(22);  // time
+            dos.writeByte(17);
+            dos.writeByte(59);
+            dos.writeInt(470_000_000);
+            dos.writeByte(4);  // offset
+            dos.writeByte(7);  // zoneId
+            dos.writeUTF("Europe/London");
+        }
+        byte[] bytes = baos.toByteArray();
+        ZonedDateTime zdt = LocalDateTime.of(2012, 9, 16, 22, 17, 59, 470_000_000).atZone(ZoneId.of("Europe/London"));
+        assertSerializedBySer(zdt, bytes);
+    }
+
+    @Test
+    public void test_serialization_format_zoneOffset() throws Exception {
+        ByteArrayOutputStream baos = new ByteArrayOutputStream();
+        try (DataOutputStream dos = new DataOutputStream(baos) ) {
+            dos.writeByte(6);
+            dos.writeInt(2012); // date
+            dos.writeByte(9);
+            dos.writeByte(16);
+            dos.writeByte(22);  // time
+            dos.writeByte(17);
+            dos.writeByte(59);
+            dos.writeInt(470_000_000);
+            dos.writeByte(4);  // offset
+            dos.writeByte(8);  // zoneId
+            dos.writeByte(4);
+        }
+        byte[] bytes = baos.toByteArray();
+        ZonedDateTime zdt = LocalDateTime.of(2012, 9, 16, 22, 17, 59, 470_000_000).atZone(ZoneOffset.ofHours(1));
+        assertSerializedBySer(zdt, bytes);
+    }
+
+}
diff --git a/jdk/test/java/time/tck/java/time/temporal/TCKIsoFields.java b/jdk/test/java/time/tck/java/time/temporal/TCKIsoFields.java
index 7159b31..d607571 100644
--- a/jdk/test/java/time/tck/java/time/temporal/TCKIsoFields.java
+++ b/jdk/test/java/time/tck/java/time/temporal/TCKIsoFields.java
@@ -70,11 +70,13 @@
 
 import java.time.DayOfWeek;
 import java.time.LocalDate;
+import java.time.LocalDateTime;
 import java.time.format.DateTimeFormatter;
 import java.time.format.DateTimeFormatterBuilder;
 import java.time.format.DateTimeParseException;
 import java.time.format.ResolverStyle;
 import java.time.temporal.IsoFields;
+import java.time.temporal.Temporal;
 import java.time.temporal.ValueRange;
 
 import org.testng.annotations.DataProvider;
@@ -276,14 +278,21 @@
                 {LocalDate.of(2000, 1, 1), LocalDate.of(1998, 12, 31), -4},
                 {LocalDate.of(2000, 1, 1), LocalDate.of(1998, 10, 2), -4},
                 {LocalDate.of(2000, 1, 1), LocalDate.of(1998, 10, 1), -5},
+
+                {LocalDate.of(2000, 1, 1), LocalDateTime.of(2001, 4, 5, 0, 0), 5},
         };
     }
 
     @Test(dataProvider="quartersBetween")
-    public void test_quarters_between(LocalDate start, LocalDate end, long expected) {
+    public void test_quarters_between(LocalDate start, Temporal end, long expected) {
         assertEquals(IsoFields.QUARTER_YEARS.between(start, end), expected);
     }
 
+    @Test(dataProvider="quartersBetween")
+    public void test_quarters_between_until(LocalDate start, Temporal end, long expected) {
+        assertEquals(start.until(end, IsoFields.QUARTER_YEARS), expected);
+    }
+
     //-----------------------------------------------------------------------
     //-----------------------------------------------------------------------
     //-----------------------------------------------------------------------
diff --git a/jdk/test/java/time/tck/java/time/temporal/TCKJulianFields.java b/jdk/test/java/time/tck/java/time/temporal/TCKJulianFields.java
index 711792f..a15c31d 100644
--- a/jdk/test/java/time/tck/java/time/temporal/TCKJulianFields.java
+++ b/jdk/test/java/time/tck/java/time/temporal/TCKJulianFields.java
@@ -76,7 +76,7 @@
 import tck.java.time.AbstractTCKTest;
 
 /**
- * Test.
+ * Test Julian Fields.
  */
 @Test
 public class TCKJulianFields extends AbstractTCKTest {
@@ -86,16 +86,6 @@
     private static final LocalDate NOV12_1945 = LocalDate.of(1945, 11, 12);
     private static final LocalDate JAN01_0001 = LocalDate.of(1, 1, 1);
 
-    //-----------------------------------------------------------------------
-    @DataProvider(name="julian_fields")
-    Object[][] julian_samples() {
-        return new Object[][] {
-            {JulianFields.JULIAN_DAY},
-            {JulianFields.MODIFIED_JULIAN_DAY},
-            {JulianFields.RATA_DIE},
-        };
-    }
-
     @DataProvider(name="samples")
     Object[][] data_samples() {
         return new Object[][] {
@@ -122,11 +112,6 @@
     }
 
     //-----------------------------------------------------------------------
-    @Test(dataProvider="julian_fields")
-    public void test_serializable(TemporalField field) throws IOException, ClassNotFoundException {
-        assertSerializable(field);
-    }
-
     public void test_basics() {
         assertEquals(JulianFields.JULIAN_DAY.isDateBased(), true);
         assertEquals(JulianFields.JULIAN_DAY.isTimeBased(), false);
diff --git a/jdk/test/java/time/tck/java/time/temporal/TCKWeekFields.java b/jdk/test/java/time/tck/java/time/temporal/TCKWeekFields.java
index 4367ee9..f2e9488 100644
--- a/jdk/test/java/time/tck/java/time/temporal/TCKWeekFields.java
+++ b/jdk/test/java/time/tck/java/time/temporal/TCKWeekFields.java
@@ -713,12 +713,6 @@
         }
     }
 
-    //-----------------------------------------------------------------------
-    @Test(dataProvider="weekFields")
-    public void test_serializable_singleton(DayOfWeek firstDayOfWeek, int minDays) throws IOException, ClassNotFoundException {
-        WeekFields weekDef = WeekFields.of(firstDayOfWeek, minDays);
-        assertSerializableSame(weekDef);  // spec state singleton
-    }
 
     //-----------------------------------------------------------------------
     @DataProvider(name="weekFields")
diff --git a/jdk/test/java/time/tck/java/time/temporal/serial/TCKChronoFieldSerialization.java b/jdk/test/java/time/tck/java/time/temporal/serial/TCKChronoFieldSerialization.java
new file mode 100644
index 0000000..a80869d
--- /dev/null
+++ b/jdk/test/java/time/tck/java/time/temporal/serial/TCKChronoFieldSerialization.java
@@ -0,0 +1,145 @@
+/*
+ * Copyright (c) 2012, 2013, Oracle and/or its affiliates. All rights reserved.
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * This code is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU General Public License version 2 only, as
+ * published by the Free Software Foundation.  Oracle designates this
+ * particular file as subject to the "Classpath" exception as provided
+ * by Oracle in the LICENSE file that accompanied this code.
+ *
+ * This code is distributed in the hope that it will be useful, but WITHOUT
+ * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
+ * version 2 for more details (a copy is included in the LICENSE file that
+ * accompanied this code).
+ *
+ * You should have received a copy of the GNU General Public License version
+ * 2 along with this work; if not, write to the Free Software Foundation,
+ * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
+ *
+ * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
+ * or visit www.oracle.com if you need additional information or have any
+ * questions.
+ */
+
+/*
+ * Copyright (c) 2008-2012, Stephen Colebourne & Michael Nascimento Santos
+ *
+ * All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions are met:
+ *
+ *  * Redistributions of source code must retain the above copyright notice,
+ *    this list of conditions and the following disclaimer.
+ *
+ *  * Redistributions in binary form must reproduce the above copyright notice,
+ *    this list of conditions and the following disclaimer in the documentation
+ *    and/or other materials provided with the distribution.
+ *
+ *  * Neither the name of JSR-310 nor the names of its contributors
+ *    may be used to endorse or promote products derived from this software
+ *    without specific prior written permission.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+ * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
+ * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
+ * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR
+ * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
+ * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
+ * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
+ * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
+ * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
+ * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
+ * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ */
+package tck.java.time.temporal.serial;
+
+import static java.time.temporal.ChronoField.ALIGNED_DAY_OF_WEEK_IN_MONTH;
+import static java.time.temporal.ChronoField.ALIGNED_DAY_OF_WEEK_IN_YEAR;
+import static java.time.temporal.ChronoField.ALIGNED_WEEK_OF_MONTH;
+import static java.time.temporal.ChronoField.ALIGNED_WEEK_OF_YEAR;
+import static java.time.temporal.ChronoField.AMPM_OF_DAY;
+import static java.time.temporal.ChronoField.CLOCK_HOUR_OF_AMPM;
+import static java.time.temporal.ChronoField.CLOCK_HOUR_OF_DAY;
+import static java.time.temporal.ChronoField.DAY_OF_MONTH;
+import static java.time.temporal.ChronoField.DAY_OF_WEEK;
+import static java.time.temporal.ChronoField.DAY_OF_YEAR;
+import static java.time.temporal.ChronoField.EPOCH_DAY;
+import static java.time.temporal.ChronoField.HOUR_OF_AMPM;
+import static java.time.temporal.ChronoField.HOUR_OF_DAY;
+import static java.time.temporal.ChronoField.MICRO_OF_DAY;
+import static java.time.temporal.ChronoField.MICRO_OF_SECOND;
+import static java.time.temporal.ChronoField.MILLI_OF_DAY;
+import static java.time.temporal.ChronoField.MILLI_OF_SECOND;
+import static java.time.temporal.ChronoField.MINUTE_OF_DAY;
+import static java.time.temporal.ChronoField.MINUTE_OF_HOUR;
+import static java.time.temporal.ChronoField.MONTH_OF_YEAR;
+import static java.time.temporal.ChronoField.NANO_OF_DAY;
+import static java.time.temporal.ChronoField.NANO_OF_SECOND;
+import static java.time.temporal.ChronoField.PROLEPTIC_MONTH;
+import static java.time.temporal.ChronoField.SECOND_OF_DAY;
+import static java.time.temporal.ChronoField.SECOND_OF_MINUTE;
+import static java.time.temporal.ChronoField.YEAR;
+import static java.time.temporal.ChronoField.YEAR_OF_ERA;
+import static java.time.temporal.ChronoField.ERA;
+
+import java.io.IOException;
+import java.time.temporal.ChronoField;
+
+import org.testng.annotations.DataProvider;
+import org.testng.annotations.Test;
+
+import tck.java.time.AbstractTCKTest;
+
+/**
+ * Test serialization of ChronoField.
+ */
+@Test
+public class TCKChronoFieldSerialization extends AbstractTCKTest {
+
+    //-----------------------------------------------------------------------
+    // List of Fields
+    //-----------------------------------------------------------------------
+    @DataProvider(name="fieldBased")
+    Object[][] data_fieldBased() {
+        return new Object[][] {
+                {DAY_OF_WEEK},
+                {ALIGNED_DAY_OF_WEEK_IN_MONTH},
+                {ALIGNED_DAY_OF_WEEK_IN_YEAR},
+                {DAY_OF_MONTH},
+                {DAY_OF_YEAR},
+                {EPOCH_DAY},
+                {ALIGNED_WEEK_OF_MONTH},
+                {ALIGNED_WEEK_OF_YEAR},
+                {MONTH_OF_YEAR},
+                {PROLEPTIC_MONTH},
+                {YEAR_OF_ERA},
+                {YEAR},
+                {ERA},
+
+                {AMPM_OF_DAY},
+                {CLOCK_HOUR_OF_DAY},
+                {HOUR_OF_DAY},
+                {CLOCK_HOUR_OF_AMPM},
+                {HOUR_OF_AMPM},
+                {MINUTE_OF_DAY},
+                {MINUTE_OF_HOUR},
+                {SECOND_OF_DAY},
+                {SECOND_OF_MINUTE},
+                {MILLI_OF_DAY},
+                {MILLI_OF_SECOND},
+                {MICRO_OF_DAY},
+                {MICRO_OF_SECOND},
+                {NANO_OF_DAY},
+                {NANO_OF_SECOND},
+        };
+    }
+
+    @Test(dataProvider = "fieldBased")
+    public void test_fieldSerializable(ChronoField field) throws IOException, ClassNotFoundException {
+        assertSerializableSame(field);
+    }
+
+}
diff --git a/jdk/test/java/time/tck/java/time/temporal/serial/TCKChronoUnitSerialization.java b/jdk/test/java/time/tck/java/time/temporal/serial/TCKChronoUnitSerialization.java
new file mode 100644
index 0000000..15e34c6
--- /dev/null
+++ b/jdk/test/java/time/tck/java/time/temporal/serial/TCKChronoUnitSerialization.java
@@ -0,0 +1,122 @@
+/*
+ * Copyright (c) 2012, 2013, Oracle and/or its affiliates. All rights reserved.
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * This code is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU General Public License version 2 only, as
+ * published by the Free Software Foundation.  Oracle designates this
+ * particular file as subject to the "Classpath" exception as provided
+ * by Oracle in the LICENSE file that accompanied this code.
+ *
+ * This code is distributed in the hope that it will be useful, but WITHOUT
+ * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
+ * version 2 for more details (a copy is included in the LICENSE file that
+ * accompanied this code).
+ *
+ * You should have received a copy of the GNU General Public License version
+ * 2 along with this work; if not, write to the Free Software Foundation,
+ * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
+ *
+ * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
+ * or visit www.oracle.com if you need additional information or have any
+ * questions.
+ */
+
+/*
+ * Copyright (c) 2008-2012, Stephen Colebourne & Michael Nascimento Santos
+ *
+ * All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions are met:
+ *
+ *  * Redistributions of source code must retain the above copyright notice,
+ *    this list of conditions and the following disclaimer.
+ *
+ *  * Redistributions in binary form must reproduce the above copyright notice,
+ *    this list of conditions and the following disclaimer in the documentation
+ *    and/or other materials provided with the distribution.
+ *
+ *  * Neither the name of JSR-310 nor the names of its contributors
+ *    may be used to endorse or promote products derived from this software
+ *    without specific prior written permission.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+ * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
+ * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
+ * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR
+ * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
+ * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
+ * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
+ * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
+ * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
+ * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
+ * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ */
+package tck.java.time.temporal.serial;
+
+import static java.time.temporal.ChronoUnit.CENTURIES;
+import static java.time.temporal.ChronoUnit.DAYS;
+import static java.time.temporal.ChronoUnit.DECADES;
+import static java.time.temporal.ChronoUnit.ERAS;
+import static java.time.temporal.ChronoUnit.FOREVER;
+import static java.time.temporal.ChronoUnit.HALF_DAYS;
+import static java.time.temporal.ChronoUnit.HOURS;
+import static java.time.temporal.ChronoUnit.MICROS;
+import static java.time.temporal.ChronoUnit.MILLENNIA;
+import static java.time.temporal.ChronoUnit.MILLIS;
+import static java.time.temporal.ChronoUnit.MINUTES;
+import static java.time.temporal.ChronoUnit.MONTHS;
+import static java.time.temporal.ChronoUnit.NANOS;
+import static java.time.temporal.ChronoUnit.SECONDS;
+import static java.time.temporal.ChronoUnit.WEEKS;
+import static java.time.temporal.ChronoUnit.YEARS;
+
+import java.io.IOException;
+import java.time.temporal.ChronoUnit;
+
+import org.testng.annotations.DataProvider;
+import org.testng.annotations.Test;
+
+import tck.java.time.AbstractTCKTest;
+
+/**
+ * Test.
+ */
+@Test
+public class TCKChronoUnitSerialization extends AbstractTCKTest {
+
+    //-----------------------------------------------------------------------
+    // ChronoUnits
+    //-----------------------------------------------------------------------
+    @DataProvider(name="chronoUnit")
+    Object[][] data_chronoUnit() {
+        return new Object[][] {
+                {FOREVER},
+                {ERAS},
+                {MILLENNIA},
+                {CENTURIES},
+                {DECADES},
+                {YEARS},
+                {MONTHS},
+                {WEEKS},
+                {DAYS},
+
+                {HALF_DAYS},
+                {HOURS},
+                {MINUTES},
+                {SECONDS},
+                {MICROS},
+                {MILLIS},
+                {NANOS},
+
+        };
+    }
+
+    @Test(dataProvider = "chronoUnit")
+    public void test_unitType(ChronoUnit unit) throws IOException, ClassNotFoundException {
+        assertSerializableSame(unit);
+    }
+
+}
diff --git a/jdk/test/java/time/tck/java/time/temporal/serial/TCKJulianFieldsSerialization.java b/jdk/test/java/time/tck/java/time/temporal/serial/TCKJulianFieldsSerialization.java
new file mode 100644
index 0000000..53047f8
--- /dev/null
+++ b/jdk/test/java/time/tck/java/time/temporal/serial/TCKJulianFieldsSerialization.java
@@ -0,0 +1,94 @@
+/*
+ * Copyright (c) 2012, 2013, Oracle and/or its affiliates. All rights reserved.
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * This code is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU General Public License version 2 only, as
+ * published by the Free Software Foundation.
+ *
+ * This code is distributed in the hope that it will be useful, but WITHOUT
+ * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
+ * version 2 for more details (a copy is included in the LICENSE file that
+ * accompanied this code).
+ *
+ * You should have received a copy of the GNU General Public License version
+ * 2 along with this work; if not, write to the Free Software Foundation,
+ * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
+ *
+ * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
+ * or visit www.oracle.com if you need additional information or have any
+ * questions.
+ */
+
+/*
+ * This file is available under and governed by the GNU General Public
+ * License version 2 only, as published by the Free Software Foundation.
+ * However, the following notice accompanied the original version of this
+ * file:
+ *
+ * Copyright (c) 2008-2012, Stephen Colebourne & Michael Nascimento Santos
+ *
+ * All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions are met:
+ *
+ *  * Redistributions of source code must retain the above copyright notice,
+ *    this list of conditions and the following disclaimer.
+ *
+ *  * Redistributions in binary form must reproduce the above copyright notice,
+ *    this list of conditions and the following disclaimer in the documentation
+ *    and/or other materials provided with the distribution.
+ *
+ *  * Neither the name of JSR-310 nor the names of its contributors
+ *    may be used to endorse or promote products derived from this software
+ *    without specific prior written permission.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+ * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
+ * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
+ * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR
+ * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
+ * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
+ * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
+ * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
+ * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
+ * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
+ * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ */
+package tck.java.time.temporal.serial;
+
+import java.io.IOException;
+import java.time.temporal.JulianFields;
+import java.time.temporal.TemporalField;
+
+import org.testng.annotations.DataProvider;
+import org.testng.annotations.Test;
+
+import tck.java.time.AbstractTCKTest;
+
+/**
+ * Test serialization of JulianFields
+ */
+@Test
+public class TCKJulianFieldsSerialization extends AbstractTCKTest {
+
+    //-----------------------------------------------------------------------
+    @DataProvider(name="julian_fields")
+    Object[][] julian_samples() {
+        return new Object[][] {
+            {JulianFields.JULIAN_DAY},
+            {JulianFields.MODIFIED_JULIAN_DAY},
+            {JulianFields.RATA_DIE},
+        };
+    }
+
+
+    //-----------------------------------------------------------------------
+    @Test(dataProvider="julian_fields")
+    public void test_serializable(TemporalField field) throws IOException, ClassNotFoundException {
+        assertSerializable(field);
+    }
+
+}
diff --git a/jdk/test/java/time/tck/java/time/temporal/serial/TCKValueRangeSerialization.java b/jdk/test/java/time/tck/java/time/temporal/serial/TCKValueRangeSerialization.java
new file mode 100644
index 0000000..9114bec
--- /dev/null
+++ b/jdk/test/java/time/tck/java/time/temporal/serial/TCKValueRangeSerialization.java
@@ -0,0 +1,120 @@
+/*
+ * Copyright (c) 2012, 2013, Oracle and/or its affiliates. All rights reserved.
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * This code is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU General Public License version 2 only, as
+ * published by the Free Software Foundation.
+ *
+ * This code is distributed in the hope that it will be useful, but WITHOUT
+ * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
+ * version 2 for more details (a copy is included in the LICENSE file that
+ * accompanied this code).
+ *
+ * You should have received a copy of the GNU General Public License version
+ * 2 along with this work; if not, write to the Free Software Foundation,
+ * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
+ *
+ * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
+ * or visit www.oracle.com if you need additional information or have any
+ * questions.
+ */
+
+/*
+ * This file is available under and governed by the GNU General Public
+ * License version 2 only, as published by the Free Software Foundation.
+ * However, the following notice accompanied the original version of this
+ * file:
+ *
+ * Copyright (c) 2009-2012, Stephen Colebourne & Michael Nascimento Santos
+ *
+ * All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions are met:
+ *
+ *  * Redistributions of source code must retain the above copyright notice,
+ *    this list of conditions and the following disclaimer.
+ *
+ *  * Redistributions in binary form must reproduce the above copyright notice,
+ *    this list of conditions and the following disclaimer in the documentation
+ *    and/or other materials provided with the distribution.
+ *
+ *  * Neither the name of JSR-310 nor the names of its contributors
+ *    may be used to endorse or promote products derived from this software
+ *    without specific prior written permission.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+ * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
+ * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
+ * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR
+ * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
+ * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
+ * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
+ * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
+ * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
+ * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
+ * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ */
+package tck.java.time.temporal.serial;
+
+import static org.testng.Assert.assertEquals;
+
+import java.io.ByteArrayOutputStream;
+import java.io.IOException;
+import java.io.ObjectOutputStream;
+import java.time.temporal.ValueRange;
+
+import org.testng.annotations.Test;
+
+import tck.java.time.AbstractTCKTest;
+
+/**
+ * Test serialization of ValueRange.
+ */
+@Test
+public class TCKValueRangeSerialization extends AbstractTCKTest {
+
+    //-----------------------------------------------------------------------
+    // Serialization
+    //-----------------------------------------------------------------------
+    public void test_serialization() throws Exception {
+        ValueRange range = ValueRange.of(1, 2, 3, 4);
+        assertSerializable(range);
+    }
+
+
+    /**
+     * Verify Serialized bytes of a ValueRange.
+     * @throws IOException if thrown during serialization is an unexpected test tailure
+     */
+    public void test_valueRangeSerialized() throws IOException {
+        byte[] expected = {
+            (byte)172, (byte)237,   0,   5, 115, 114,   0,  29, 106,  97, /* \u00ac \u00ed \u0000 \u0005 s r \u0000 \u001d j a */
+            118,  97,  46, 116, 105, 109, 101,  46, 116, 101, /* v a . t i m e . t e */
+            109, 112, 111, 114,  97, 108,  46,  86,  97, 108, /* m p o r a l . V a l */
+            117, 101,  82,  97, 110, 103, 101, (byte)154, 113, (byte)169, /* u e R a n g e \u009a q \u00a9 */
+             86, (byte)242, (byte)205,  90, (byte)184,   2,   0,   4,  74,   0, /* V \u00f2 \u00cd Z \u00b8 \u0002 \u0000 \u0004 J \u0000 */
+             10, 109,  97, 120,  76,  97, 114, 103, 101, 115, /*  m a x L a r g e s */
+            116,  74,   0,  11, 109,  97, 120,  83, 109,  97, /* t J \u0000 \u000b m a x S m a */
+            108, 108, 101, 115, 116,  74,   0,  10, 109, 105,/* l l e s t J \u0000 m i */
+            110,  76,  97, 114, 103, 101, 115, 116,  74,   0, /* n L a r g e s t J \u0000 */
+             11, 109, 105, 110,  83, 109,  97, 108, 108, 101, /* \u000b m i n S m a l l e */
+            115, 116, 120, 112,   0,   0,   0,   0,   0,   0, /* s t x p \u0000 \u0000 \u0000 \u0000 \u0000 \u0000 */
+              0,  40,   0,   0,   0,   0,   0,   0,   0,  30, /* \u0000 ( \u0000 \u0000 \u0000 \u0000 \u0000 \u0000 \u0000 \u001e */
+              0,   0,   0,   0,   0,   0,   0,  20,   0,   0, /* \u0000 \u0000 \u0000 \u0000 \u0000 \u0000 \u0000 \u0014 \u0000 \u0000 */
+              0,   0,   0,   0,   0,  10,                     /* \u0000 \u0000 \u0000 \u0000 \u0000 */
+        };
+
+        ValueRange range = ValueRange.of(10, 20, 30, 40);
+        try (ByteArrayOutputStream baos = new ByteArrayOutputStream();
+            ObjectOutputStream oos = new ObjectOutputStream(baos) ) {
+            oos.writeObject(range);
+
+            byte[] actual = baos.toByteArray();
+            assertEquals(actual, expected, "Serialized bytes incorrect");
+        }
+    }
+
+}
diff --git a/jdk/test/java/time/tck/java/time/temporal/serial/TCKWeekFieldsSerialization.java b/jdk/test/java/time/tck/java/time/temporal/serial/TCKWeekFieldsSerialization.java
new file mode 100644
index 0000000..43f45a8
--- /dev/null
+++ b/jdk/test/java/time/tck/java/time/temporal/serial/TCKWeekFieldsSerialization.java
@@ -0,0 +1,94 @@
+/*
+ * Copyright (c) 2012, 2013, Oracle and/or its affiliates. All rights reserved.
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * This code is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU General Public License version 2 only, as
+ * published by the Free Software Foundation.  Oracle designates this
+ * particular file as subject to the "Classpath" exception as provided
+ * by Oracle in the LICENSE file that accompanied this code.
+ *
+ * This code is distributed in the hope that it will be useful, but WITHOUT
+ * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
+ * version 2 for more details (a copy is included in the LICENSE file that
+ * accompanied this code).
+ *
+ * You should have received a copy of the GNU General Public License version
+ * 2 along with this work; if not, write to the Free Software Foundation,
+ * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
+ *
+ * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
+ * or visit www.oracle.com if you need additional information or have any
+ * questions.
+ */
+
+/*
+ * Copyright (c) 2008-2012, Stephen Colebourne & Michael Nascimento Santos
+ *
+ * All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions are met:
+ *
+ *  * Redistributions of source code must retain the above copyright notice,
+ *    this list of conditions and the following disclaimer.
+ *
+ *  * Redistributions in binary form must reproduce the above copyright notice,
+ *    this list of conditions and the following disclaimer in the documentation
+ *    and/or other materials provided with the distribution.
+ *
+ *  * Neither the name of JSR-310 nor the names of its contributors
+ *    may be used to endorse or promote products derived from this software
+ *    without specific prior written permission.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+ * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
+ * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
+ * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR
+ * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
+ * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
+ * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
+ * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
+ * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
+ * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
+ * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ */
+package tck.java.time.temporal.serial;
+
+import org.testng.annotations.DataProvider;
+import org.testng.annotations.Test;
+import tck.java.time.AbstractTCKTest;
+
+import java.io.IOException;
+import java.time.DayOfWeek;
+import java.time.temporal.WeekFields;
+
+/**
+ * Test serialization of WeekFields.
+ */
+@Test
+public class TCKWeekFieldsSerialization extends AbstractTCKTest {
+
+    //-----------------------------------------------------------------------
+    @Test(dataProvider="weekFields")
+    public void test_serializable_singleton(DayOfWeek firstDayOfWeek, int minDays) throws IOException, ClassNotFoundException {
+        WeekFields weekDef = WeekFields.of(firstDayOfWeek, minDays);
+        assertSerializableSame(weekDef);  // spec state singleton
+    }
+
+    //-----------------------------------------------------------------------
+    @DataProvider(name="weekFields")
+    Object[][] data_weekFields() {
+        Object[][] objects = new Object[49][];
+        int i = 0;
+        for (DayOfWeek firstDayOfWeek : DayOfWeek.values()) {
+            for (int minDays = 1; minDays <= 7; minDays++) {
+                objects[i++] = new Object[] {firstDayOfWeek, minDays};
+            }
+        }
+        return objects;
+    }
+
+
+}
diff --git a/jdk/test/java/time/tck/java/time/zone/TCKFixedZoneRules.java b/jdk/test/java/time/tck/java/time/zone/TCKFixedZoneRules.java
index 418d1ad..08df543 100644
--- a/jdk/test/java/time/tck/java/time/zone/TCKFixedZoneRules.java
+++ b/jdk/test/java/time/tck/java/time/zone/TCKFixedZoneRules.java
@@ -107,25 +107,7 @@
     //-----------------------------------------------------------------------
     // Basics
     //-----------------------------------------------------------------------
-    @Test(dataProvider="rules")
-    public void test_serialization(ZoneRules test, ZoneOffset expectedOffset) throws Exception {
-        ByteArrayOutputStream baos = new ByteArrayOutputStream();
-        ObjectOutputStream out = new ObjectOutputStream(baos);
-        out.writeObject(test);
-        baos.close();
-        byte[] bytes = baos.toByteArray();
 
-        ByteArrayInputStream bais = new ByteArrayInputStream(bytes);
-        ObjectInputStream in = new ObjectInputStream(bais);
-        ZoneRules result = (ZoneRules) in.readObject();
-
-        assertEquals(result, test);
-        assertEquals(result.getClass(), test.getClass());
-    }
-
-    //-----------------------------------------------------------------------
-    // basics
-    //-----------------------------------------------------------------------
     @Test(dataProvider="rules")
     public void test_getOffset_Instant(ZoneRules test, ZoneOffset expectedOffset) {
         assertEquals(test.getOffset(INSTANT), expectedOffset);
diff --git a/jdk/test/java/time/tck/java/time/zone/TCKZoneOffsetTransition.java b/jdk/test/java/time/tck/java/time/zone/TCKZoneOffsetTransition.java
index c5da309..9cd4262 100644
--- a/jdk/test/java/time/tck/java/time/zone/TCKZoneOffsetTransition.java
+++ b/jdk/test/java/time/tck/java/time/zone/TCKZoneOffsetTransition.java
@@ -127,7 +127,6 @@
         assertEquals(test.getOffsetBefore(), OFFSET_0200);
         assertEquals(test.getOffsetAfter(), OFFSET_0300);
         assertEquals(test.getDuration(), Duration.of(1, HOURS));
-        assertSerializable(test);
     }
 
     @Test
@@ -143,23 +142,8 @@
         assertEquals(test.getOffsetBefore(), OFFSET_0300);
         assertEquals(test.getOffsetAfter(), OFFSET_0200);
         assertEquals(test.getDuration(), Duration.of(-1, HOURS));
-        assertSerializable(test);
     }
 
-    //-----------------------------------------------------------------------
-    @Test
-    public void test_serialization_unusual1() throws Exception {
-        LocalDateTime ldt = LocalDateTime.of(Year.MAX_VALUE, 12, 31, 1, 31, 53);
-        ZoneOffsetTransition test = ZoneOffsetTransition.of(ldt, ZoneOffset.of("+02:04:56"), ZoneOffset.of("-10:02:34"));
-        assertSerializable(test);
-    }
-
-    @Test
-    public void test_serialization_unusual2() throws Exception {
-        LocalDateTime ldt = LocalDateTime.of(Year.MIN_VALUE, 1, 1, 12, 1, 3);
-        ZoneOffsetTransition test = ZoneOffsetTransition.of(ldt, ZoneOffset.of("+02:04:56"), ZoneOffset.of("+10:02:34"));
-        assertSerializable(test);
-    }
 
     //-----------------------------------------------------------------------
     // isValidOffset()
diff --git a/jdk/test/java/time/tck/java/time/zone/TCKZoneOffsetTransitionRule.java b/jdk/test/java/time/tck/java/time/zone/TCKZoneOffsetTransitionRule.java
index fedded7..58e2ff5 100644
--- a/jdk/test/java/time/tck/java/time/zone/TCKZoneOffsetTransitionRule.java
+++ b/jdk/test/java/time/tck/java/time/zone/TCKZoneOffsetTransitionRule.java
@@ -173,7 +173,6 @@
         assertEquals(test.getStandardOffset(), OFFSET_0200);
         assertEquals(test.getOffsetBefore(), OFFSET_0200);
         assertEquals(test.getOffsetAfter(), OFFSET_0300);
-        assertSerializable(test);
     }
 
     @Test
@@ -190,7 +189,6 @@
         assertEquals(test.getStandardOffset(), OFFSET_0200);
         assertEquals(test.getOffsetBefore(), OFFSET_0200);
         assertEquals(test.getOffsetAfter(), OFFSET_0300);
-        assertSerializable(test);
     }
 
     @Test
@@ -207,34 +205,8 @@
         assertEquals(test.getStandardOffset(), OFFSET_0200);
         assertEquals(test.getOffsetBefore(), OFFSET_0200);
         assertEquals(test.getOffsetAfter(), OFFSET_0300);
-        assertSerializable(test);
     }
 
-    @Test
-    public void test_serialization_unusualOffsets() throws Exception {
-        ZoneOffsetTransitionRule test = ZoneOffsetTransitionRule.of(
-                Month.MARCH, 20, null, TIME_0100, false, TimeDefinition.STANDARD,
-                ZoneOffset.ofHoursMinutesSeconds(-12, -20, -50),
-                ZoneOffset.ofHoursMinutesSeconds(-4, -10, -34),
-                ZoneOffset.ofHours(-18));
-        assertSerializable(test);
-    }
-
-    @Test
-    public void test_serialization_endOfDay() throws Exception {
-        ZoneOffsetTransitionRule test = ZoneOffsetTransitionRule.of(
-                Month.MARCH, 20, DayOfWeek.FRIDAY, LocalTime.MIDNIGHT, true, TimeDefinition.UTC,
-                OFFSET_0200, OFFSET_0200, OFFSET_0300);
-        assertSerializable(test);
-    }
-
-    @Test
-    public void test_serialization_unusualTime() throws Exception {
-        ZoneOffsetTransitionRule test = ZoneOffsetTransitionRule.of(
-                Month.MARCH, 20, DayOfWeek.WEDNESDAY, LocalTime.of(13, 34, 56), false, TimeDefinition.STANDARD,
-                OFFSET_0200, OFFSET_0200, OFFSET_0300);
-        assertSerializable(test);
-    }
 
     //-----------------------------------------------------------------------
     // createTransition()
diff --git a/jdk/test/java/time/tck/java/time/zone/TCKZoneRules.java b/jdk/test/java/time/tck/java/time/zone/TCKZoneRules.java
index af07063..19f8239 100644
--- a/jdk/test/java/time/tck/java/time/zone/TCKZoneRules.java
+++ b/jdk/test/java/time/tck/java/time/zone/TCKZoneRules.java
@@ -103,28 +103,7 @@
     private static final int OVERLAP = 2;
     private static final int GAP = 0;
 
-    //-----------------------------------------------------------------------
-    // Basics
-    //-----------------------------------------------------------------------
-    public void test_serialization_loaded() throws Exception {
-        assertSerialization(europeLondon());
-        assertSerialization(europeParis());
-        assertSerialization(americaNewYork());
-    }
 
-    private void assertSerialization(ZoneRules test) throws Exception {
-        ByteArrayOutputStream baos = new ByteArrayOutputStream();
-        ObjectOutputStream out = new ObjectOutputStream(baos);
-        out.writeObject(test);
-        baos.close();
-        byte[] bytes = baos.toByteArray();
-
-        ByteArrayInputStream bais = new ByteArrayInputStream(bytes);
-        ObjectInputStream in = new ObjectInputStream(bais);
-        ZoneRules result = (ZoneRules) in.readObject();
-
-        assertEquals(result, test);
-    }
 
     //-----------------------------------------------------------------------
     // Europe/London
diff --git a/jdk/test/java/time/tck/java/time/zone/serial/TCKFixedZoneRulesSerialization.java b/jdk/test/java/time/tck/java/time/zone/serial/TCKFixedZoneRulesSerialization.java
new file mode 100644
index 0000000..790e54f
--- /dev/null
+++ b/jdk/test/java/time/tck/java/time/zone/serial/TCKFixedZoneRulesSerialization.java
@@ -0,0 +1,117 @@
+/*
+ * Copyright (c) 2012, 2013, Oracle and/or its affiliates. All rights reserved.
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * This code is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU General Public License version 2 only, as
+ * published by the Free Software Foundation.
+ *
+ * This code is distributed in the hope that it will be useful, but WITHOUT
+ * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
+ * version 2 for more details (a copy is included in the LICENSE file that
+ * accompanied this code).
+ *
+ * You should have received a copy of the GNU General Public License version
+ * 2 along with this work; if not, write to the Free Software Foundation,
+ * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
+ *
+ * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
+ * or visit www.oracle.com if you need additional information or have any
+ * questions.
+ */
+
+/*
+ * This file is available under and governed by the GNU General Public
+ * License version 2 only, as published by the Free Software Foundation.
+ * However, the following notice accompanied the original version of this
+ * file:
+ *
+ * Copyright (c) 2010-2012, Stephen Colebourne & Michael Nascimento Santos
+ *
+ * All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions are met:
+ *
+ *  * Redistributions of source code must retain the above copyright notice,
+ *    this list of conditions and the following disclaimer.
+ *
+ *  * Redistributions in binary form must reproduce the above copyright notice,
+ *    this list of conditions and the following disclaimer in the documentation
+ *    and/or other materials provided with the distribution.
+ *
+ *  * Neither the name of JSR-310 nor the names of its contributors
+ *    may be used to endorse or promote products derived from this software
+ *    without specific prior written permission.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+ * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
+ * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
+ * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR
+ * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
+ * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
+ * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
+ * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
+ * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
+ * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
+ * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ */
+package tck.java.time.zone.serial;
+
+import org.testng.annotations.DataProvider;
+import org.testng.annotations.Test;
+
+import java.io.ByteArrayInputStream;
+import java.io.ByteArrayOutputStream;
+import java.io.ObjectInputStream;
+import java.io.ObjectOutputStream;
+import java.time.ZoneOffset;
+import java.time.zone.ZoneRules;
+
+import static org.testng.Assert.assertEquals;
+
+/**
+ * Test serialization of ZoneRules for fixed offset time-zones.
+ */
+@Test
+public class TCKFixedZoneRulesSerialization {
+
+    private static final ZoneOffset OFFSET_PONE = ZoneOffset.ofHours(1);
+    private static final ZoneOffset OFFSET_PTWO = ZoneOffset.ofHours(2);
+    private static final ZoneOffset OFFSET_M18 = ZoneOffset.ofHours(-18);
+
+    private ZoneRules make(ZoneOffset offset) {
+        return offset.getRules();
+    }
+
+    @DataProvider(name="rules")
+    Object[][] data_rules() {
+        return new Object[][] {
+            {make(OFFSET_PONE), OFFSET_PONE},
+            {make(OFFSET_PTWO), OFFSET_PTWO},
+            {make(OFFSET_M18), OFFSET_M18},
+        };
+    }
+
+    //-----------------------------------------------------------------------
+    // Basics
+    //-----------------------------------------------------------------------
+    @Test(dataProvider="rules")
+    public void test_serialization(ZoneRules test, ZoneOffset expectedOffset) throws Exception {
+        ByteArrayOutputStream baos = new ByteArrayOutputStream();
+        ObjectOutputStream out = new ObjectOutputStream(baos);
+        out.writeObject(test);
+        baos.close();
+        byte[] bytes = baos.toByteArray();
+
+        ByteArrayInputStream bais = new ByteArrayInputStream(bytes);
+        ObjectInputStream in = new ObjectInputStream(bais);
+        ZoneRules result = (ZoneRules) in.readObject();
+
+        assertEquals(result, test);
+        assertEquals(result.getClass(), test.getClass());
+    }
+
+
+}
diff --git a/jdk/test/java/time/tck/java/time/zone/serial/TCKZoneOffsetTransitionRuleSerialization.java b/jdk/test/java/time/tck/java/time/zone/serial/TCKZoneOffsetTransitionRuleSerialization.java
new file mode 100644
index 0000000..9e4bf9b
--- /dev/null
+++ b/jdk/test/java/time/tck/java/time/zone/serial/TCKZoneOffsetTransitionRuleSerialization.java
@@ -0,0 +1,136 @@
+/*
+ * Copyright (c) 2012, 2013, Oracle and/or its affiliates. All rights reserved.
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * This code is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU General Public License version 2 only, as
+ * published by the Free Software Foundation.
+ *
+ * This code is distributed in the hope that it will be useful, but WITHOUT
+ * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
+ * version 2 for more details (a copy is included in the LICENSE file that
+ * accompanied this code).
+ *
+ * You should have received a copy of the GNU General Public License version
+ * 2 along with this work; if not, write to the Free Software Foundation,
+ * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
+ *
+ * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
+ * or visit www.oracle.com if you need additional information or have any
+ * questions.
+ */
+
+/*
+ * This file is available under and governed by the GNU General Public
+ * License version 2 only, as published by the Free Software Foundation.
+ * However, the following notice accompanied the original version of this
+ * file:
+ *
+ * Copyright (c) 2010-2012, Stephen Colebourne & Michael Nascimento Santos
+ *
+ * All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions are met:
+ *
+ *  * Redistributions of source code must retain the above copyright notice,
+ *    this list of conditions and the following disclaimer.
+ *
+ *  * Redistributions in binary form must reproduce the above copyright notice,
+ *    this list of conditions and the following disclaimer in the documentation
+ *    and/or other materials provided with the distribution.
+ *
+ *  * Neither the name of JSR-310 nor the names of its contributors
+ *    may be used to endorse or promote products derived from this software
+ *    without specific prior written permission.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+ * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
+ * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
+ * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR
+ * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
+ * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
+ * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
+ * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
+ * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
+ * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
+ * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ */
+package tck.java.time.zone.serial;
+
+import java.time.DayOfWeek;
+import java.time.LocalTime;
+import java.time.Month;
+import java.time.ZoneOffset;
+import java.time.zone.ZoneOffsetTransitionRule;
+import java.time.zone.ZoneOffsetTransitionRule.TimeDefinition;
+
+import org.testng.annotations.Test;
+import tck.java.time.AbstractTCKTest;
+
+/**
+ * Test ZoneOffsetTransitionRule serialization.
+ */
+@Test
+public class TCKZoneOffsetTransitionRuleSerialization extends AbstractTCKTest {
+
+    private static final LocalTime TIME_0100 = LocalTime.of(1, 0);
+    private static final ZoneOffset OFFSET_0200 = ZoneOffset.ofHours(2);
+    private static final ZoneOffset OFFSET_0300 = ZoneOffset.ofHours(3);
+
+
+    //-----------------------------------------------------------------------
+    // Test serialization
+    //-----------------------------------------------------------------------
+    @Test
+    public void test_serialization_unusualOffsets() throws Exception {
+        ZoneOffsetTransitionRule test = ZoneOffsetTransitionRule.of(
+                Month.MARCH, 20, null, TIME_0100, false, TimeDefinition.STANDARD,
+                ZoneOffset.ofHoursMinutesSeconds(-12, -20, -50),
+                ZoneOffset.ofHoursMinutesSeconds(-4, -10, -34),
+                ZoneOffset.ofHours(-18));
+        assertSerializable(test);
+    }
+
+    @Test
+    public void test_serialization_endOfDay() throws Exception {
+        ZoneOffsetTransitionRule test = ZoneOffsetTransitionRule.of(
+                Month.MARCH, 20, DayOfWeek.FRIDAY, LocalTime.MIDNIGHT, true, TimeDefinition.UTC,
+                OFFSET_0200, OFFSET_0200, OFFSET_0300);
+        assertSerializable(test);
+    }
+
+    @Test
+    public void test_serialization_unusualTime() throws Exception {
+        ZoneOffsetTransitionRule test = ZoneOffsetTransitionRule.of(
+                Month.MARCH, 20, DayOfWeek.WEDNESDAY, LocalTime.of(13, 34, 56), false, TimeDefinition.STANDARD,
+                OFFSET_0200, OFFSET_0200, OFFSET_0300);
+        assertSerializable(test);
+    }
+
+    @Test
+    public void test_serialization_floatingWeek() throws Exception {
+        ZoneOffsetTransitionRule test = ZoneOffsetTransitionRule.of(
+                Month.MARCH, 20, DayOfWeek.SUNDAY, TIME_0100, false, TimeDefinition.WALL,
+                OFFSET_0200, OFFSET_0200, OFFSET_0300);
+        assertSerializable(test);
+    }
+
+    @Test
+    public void test_serialization_floatingWeekBackwards() throws Exception {
+        ZoneOffsetTransitionRule test = ZoneOffsetTransitionRule.of(
+                Month.MARCH, -1, DayOfWeek.SUNDAY, TIME_0100, false, TimeDefinition.WALL,
+                OFFSET_0200, OFFSET_0200, OFFSET_0300);
+        assertSerializable(test);
+    }
+
+    @Test
+    public void test_serialization_fixedDate() throws Exception {
+        ZoneOffsetTransitionRule test = ZoneOffsetTransitionRule.of(
+                Month.MARCH, 20, null, TIME_0100, false, TimeDefinition.WALL,
+                OFFSET_0200, OFFSET_0200, OFFSET_0300);
+        assertSerializable(test);
+    }
+
+}
diff --git a/jdk/test/java/time/tck/java/time/zone/serial/TCKZoneOffsetTransitionSerialization.java b/jdk/test/java/time/tck/java/time/zone/serial/TCKZoneOffsetTransitionSerialization.java
new file mode 100644
index 0000000..e70fc74
--- /dev/null
+++ b/jdk/test/java/time/tck/java/time/zone/serial/TCKZoneOffsetTransitionSerialization.java
@@ -0,0 +1,113 @@
+/*
+ * Copyright (c) 2012, 2013, Oracle and/or its affiliates. All rights reserved.
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * This code is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU General Public License version 2 only, as
+ * published by the Free Software Foundation.
+ *
+ * This code is distributed in the hope that it will be useful, but WITHOUT
+ * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
+ * version 2 for more details (a copy is included in the LICENSE file that
+ * accompanied this code).
+ *
+ * You should have received a copy of the GNU General Public License version
+ * 2 along with this work; if not, write to the Free Software Foundation,
+ * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
+ *
+ * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
+ * or visit www.oracle.com if you need additional information or have any
+ * questions.
+ */
+
+/*
+ * This file is available under and governed by the GNU General Public
+ * License version 2 only, as published by the Free Software Foundation.
+ * However, the following notice accompanied the original version of this
+ * file:
+ *
+ * Copyright (c) 2010-2012, Stephen Colebourne & Michael Nascimento Santos
+ *
+ * All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions are met:
+ *
+ *  * Redistributions of source code must retain the above copyright notice,
+ *    this list of conditions and the following disclaimer.
+ *
+ *  * Redistributions in binary form must reproduce the above copyright notice,
+ *    this list of conditions and the following disclaimer in the documentation
+ *    and/or other materials provided with the distribution.
+ *
+ *  * Neither the name of JSR-310 nor the names of its contributors
+ *    may be used to endorse or promote products derived from this software
+ *    without specific prior written permission.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+ * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
+ * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
+ * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR
+ * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
+ * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
+ * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
+ * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
+ * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
+ * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
+ * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ */
+package tck.java.time.zone.serial;
+
+import static java.time.temporal.ChronoUnit.HOURS;
+
+import java.time.Duration;
+import org.testng.annotations.Test;
+import tck.java.time.AbstractTCKTest;
+
+import java.time.LocalDateTime;
+import java.time.Year;
+import java.time.ZoneOffset;
+import java.time.zone.ZoneOffsetTransition;
+
+/**
+ * Test serialization of ZoneOffsetTransition.
+ */
+@Test
+public class TCKZoneOffsetTransitionSerialization extends AbstractTCKTest {
+
+    private static final ZoneOffset OFFSET_0200 = ZoneOffset.ofHours(2);
+    private static final ZoneOffset OFFSET_0300 = ZoneOffset.ofHours(3);
+
+    //-----------------------------------------------------------------------
+    @Test
+    public void test_serialization_unusual1() throws Exception {
+        LocalDateTime ldt = LocalDateTime.of(Year.MAX_VALUE, 12, 31, 1, 31, 53);
+        ZoneOffsetTransition test = ZoneOffsetTransition.of(ldt, ZoneOffset.of("+02:04:56"), ZoneOffset.of("-10:02:34"));
+        assertSerializable(test);
+    }
+
+    @Test
+    public void test_serialization_unusual2() throws Exception {
+        LocalDateTime ldt = LocalDateTime.of(Year.MIN_VALUE, 1, 1, 12, 1, 3);
+        ZoneOffsetTransition test = ZoneOffsetTransition.of(ldt, ZoneOffset.of("+02:04:56"), ZoneOffset.of("+10:02:34"));
+        assertSerializable(test);
+    }
+
+    @Test
+    public void test_serialization_gap() throws Exception {
+        LocalDateTime before = LocalDateTime.of(2010, 3, 31, 1, 0);
+        LocalDateTime after = LocalDateTime.of(2010, 3, 31, 2, 0);
+        ZoneOffsetTransition test = ZoneOffsetTransition.of(before, OFFSET_0200, OFFSET_0300);
+        assertSerializable(test);
+    }
+
+    @Test
+    public void test_serialization_overlap() throws Exception {
+        LocalDateTime before = LocalDateTime.of(2010, 10, 31, 1, 0);
+        LocalDateTime after = LocalDateTime.of(2010, 10, 31, 0, 0);
+        ZoneOffsetTransition test = ZoneOffsetTransition.of(before, OFFSET_0300, OFFSET_0200);
+        assertSerializable(test);
+    }
+
+}
diff --git a/jdk/test/java/time/tck/java/time/zone/serial/TCKZoneRulesSerialization.java b/jdk/test/java/time/tck/java/time/zone/serial/TCKZoneRulesSerialization.java
new file mode 100644
index 0000000..8023796
--- /dev/null
+++ b/jdk/test/java/time/tck/java/time/zone/serial/TCKZoneRulesSerialization.java
@@ -0,0 +1,122 @@
+/*
+ * Copyright (c) 2012, 2013, Oracle and/or its affiliates. All rights reserved.
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * This code is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU General Public License version 2 only, as
+ * published by the Free Software Foundation.
+ *
+ * This code is distributed in the hope that it will be useful, but WITHOUT
+ * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
+ * version 2 for more details (a copy is included in the LICENSE file that
+ * accompanied this code).
+ *
+ * You should have received a copy of the GNU General Public License version
+ * 2 along with this work; if not, write to the Free Software Foundation,
+ * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
+ *
+ * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
+ * or visit www.oracle.com if you need additional information or have any
+ * questions.
+ */
+
+/*
+ * This file is available under and governed by the GNU General Public
+ * License version 2 only, as published by the Free Software Foundation.
+ * However, the following notice accompanied the original version of this
+ * file:
+ *
+ * Copyright (c) 2008-2012, Stephen Colebourne & Michael Nascimento Santos
+ *
+ * All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions are met:
+ *
+ *  * Redistributions of source code must retain the above copyright notice,
+ *    this list of conditions and the following disclaimer.
+ *
+ *  * Redistributions in binary form must reproduce the above copyright notice,
+ *    this list of conditions and the following disclaimer in the documentation
+ *    and/or other materials provided with the distribution.
+ *
+ *  * Neither the name of JSR-310 nor the names of its contributors
+ *    may be used to endorse or promote products derived from this software
+ *    without specific prior written permission.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+ * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
+ * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
+ * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR
+ * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
+ * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
+ * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
+ * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
+ * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
+ * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
+ * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ */
+package tck.java.time.zone.serial;
+
+import org.testng.annotations.Test;
+
+import java.io.ByteArrayInputStream;
+import java.io.ByteArrayOutputStream;
+import java.io.ObjectInputStream;
+import java.io.ObjectOutputStream;
+import java.time.ZoneId;
+import java.time.zone.ZoneRules;
+
+import static org.testng.Assert.assertEquals;
+
+/**
+ * Test serialization of ZoneRules.
+ */
+@Test
+public class TCKZoneRulesSerialization {
+
+    public void test_serialization_loaded() throws Exception {
+        assertSerialization(europeLondon());
+        assertSerialization(europeParis());
+        assertSerialization(americaNewYork());
+    }
+
+    private void assertSerialization(ZoneRules test) throws Exception {
+        ByteArrayOutputStream baos = new ByteArrayOutputStream();
+        ObjectOutputStream out = new ObjectOutputStream(baos);
+        out.writeObject(test);
+        baos.close();
+        byte[] bytes = baos.toByteArray();
+
+        ByteArrayInputStream bais = new ByteArrayInputStream(bytes);
+        ObjectInputStream in = new ObjectInputStream(bais);
+        ZoneRules result = (ZoneRules) in.readObject();
+
+        assertEquals(result, test);
+    }
+
+    //-----------------------------------------------------------------------
+    // Europe/London
+    //-----------------------------------------------------------------------
+    private ZoneRules europeLondon() {
+        return ZoneId.of("Europe/London").getRules();
+    }
+
+
+    //-----------------------------------------------------------------------
+    // Europe/Paris
+    //-----------------------------------------------------------------------
+    private ZoneRules europeParis() {
+        return ZoneId.of("Europe/Paris").getRules();
+    }
+
+    //-----------------------------------------------------------------------
+    // America/New_York
+    //-----------------------------------------------------------------------
+    private ZoneRules americaNewYork() {
+        return ZoneId.of("America/New_York").getRules();
+    }
+
+
+}
diff --git a/jdk/test/java/time/test/java/time/AbstractTest.java b/jdk/test/java/time/test/java/time/AbstractTest.java
index 6d4d134..97f1cf4 100644
--- a/jdk/test/java/time/test/java/time/AbstractTest.java
+++ b/jdk/test/java/time/test/java/time/AbstractTest.java
@@ -63,11 +63,6 @@
 import static org.testng.Assert.assertSame;
 import static org.testng.Assert.assertTrue;
 
-import java.io.ByteArrayInputStream;
-import java.io.ByteArrayOutputStream;
-import java.io.IOException;
-import java.io.ObjectInputStream;
-import java.io.ObjectOutputStream;
 import java.lang.reflect.Constructor;
 import java.lang.reflect.Field;
 import java.lang.reflect.Modifier;
@@ -87,27 +82,6 @@
         return true;
     }
 
-    protected static void assertSerializable(Object o) throws IOException, ClassNotFoundException {
-        Object deserialisedObject = writeThenRead(o);
-        assertEquals(deserialisedObject, o);
-    }
-
-    protected static void assertSerializableAndSame(Object o) throws IOException, ClassNotFoundException {
-        Object deserialisedObject = writeThenRead(o);
-        assertSame(deserialisedObject, o);
-    }
-
-    private static Object writeThenRead(Object o) throws IOException, ClassNotFoundException {
-        ByteArrayOutputStream baos = new ByteArrayOutputStream();
-        try (ObjectOutputStream oos = new ObjectOutputStream(baos) ) {
-            oos.writeObject(o);
-        }
-
-        try (ObjectInputStream ois = new ObjectInputStream(new ByteArrayInputStream(baos.toByteArray()))) {
-            return ois.readObject();
-        }
-    }
-
     protected static void assertImmutable(Class<?> cls) {
         assertTrue(Modifier.isPublic(cls.getModifiers()));
         assertTrue(Modifier.isFinal(cls.getModifiers()));
diff --git a/jdk/test/java/time/test/java/time/TestDuration.java b/jdk/test/java/time/test/java/time/TestDuration.java
index 23aedd8..2b20433 100644
--- a/jdk/test/java/time/test/java/time/TestDuration.java
+++ b/jdk/test/java/time/test/java/time/TestDuration.java
@@ -63,11 +63,6 @@
 import static org.testng.Assert.assertSame;
 import static org.testng.Assert.assertTrue;
 
-import java.io.ByteArrayInputStream;
-import java.io.ByteArrayOutputStream;
-import java.io.ObjectInputStream;
-import java.io.ObjectOutputStream;
-import java.io.Serializable;
 import java.time.Duration;
 
 import org.testng.annotations.Test;
@@ -84,29 +79,6 @@
         assertImmutable(Duration.class);
     }
 
-    //-----------------------------------------------------------------------
-    @Test
-    public void test_interfaces() {
-        assertTrue(Serializable.class.isAssignableFrom(Duration.class));
-        assertTrue(Comparable.class.isAssignableFrom(Duration.class));
-    }
-
-    //-----------------------------------------------------------------------
-    // serialization
-    //-----------------------------------------------------------------------
-    @Test
-    public void test_deserializationSingleton() throws Exception {
-        Duration orginal = Duration.ZERO;
-        ByteArrayOutputStream baos = new ByteArrayOutputStream();
-        ObjectOutputStream out = new ObjectOutputStream(baos);
-        out.writeObject(orginal);
-        out.close();
-        ByteArrayInputStream bais = new ByteArrayInputStream(baos.toByteArray());
-        ObjectInputStream in = new ObjectInputStream(bais);
-        Duration ser = (Duration) in.readObject();
-        assertSame(ser, Duration.ZERO);
-    }
-
     @Test
     public void plus_zeroReturnsThis() {
         Duration t = Duration.ofSeconds(-1);
diff --git a/jdk/test/java/time/test/java/time/chrono/TestUmmAlQuraChronology.java b/jdk/test/java/time/test/java/time/chrono/TestUmmAlQuraChronology.java
index 3e7cce4..05a6d4b 100644
--- a/jdk/test/java/time/test/java/time/chrono/TestUmmAlQuraChronology.java
+++ b/jdk/test/java/time/test/java/time/chrono/TestUmmAlQuraChronology.java
@@ -26,9 +26,9 @@
 package test.java.time.chrono;
 
 import static java.time.temporal.ChronoField.DAY_OF_MONTH;
+import static java.time.temporal.ChronoField.DAY_OF_YEAR;
 import static java.time.temporal.ChronoField.MONTH_OF_YEAR;
 import static java.time.temporal.ChronoField.YEAR;
-import static java.time.temporal.ChronoField.DAY_OF_YEAR;
 import static org.testng.Assert.assertEquals;
 import static org.testng.Assert.assertTrue;
 import static org.testng.Assert.fail;
@@ -39,12 +39,12 @@
 import java.time.LocalDateTime;
 import java.time.LocalTime;
 import java.time.OffsetDateTime;
-import java.time.Period;
 import java.time.ZoneId;
 import java.time.ZoneOffset;
 import java.time.ZonedDateTime;
 import java.time.chrono.ChronoLocalDate;
 import java.time.chrono.ChronoLocalDateTime;
+import java.time.chrono.ChronoPeriod;
 import java.time.chrono.ChronoZonedDateTime;
 import java.time.chrono.Chronology;
 import java.time.chrono.HijrahChronology;
@@ -330,26 +330,26 @@
     @DataProvider(name="datesForPeriod")
     Object[][] data_Period() {
         return new Object[][] {
-            {HijrahDate.of(1350, 5, 15), HijrahDate.of(1434, 7, 20), Period.of(84, 2, 5)},
-            {HijrahDate.of(1403, 5, 28), HijrahDate.of(1434, 7, 20), Period.of(31, 1, 22)},
-            {HijrahDate.of(1434, 7, 20), HijrahDate.of(1484, 2, 15), Period.of(49, 6, 24)},
-            {HijrahDate.of(1500, 6, 12), HijrahDate.of(1450, 4, 21), Period.of(-50, -1, -20)},
-            {HijrahDate.of(1549, 3, 11), HijrahDate.of(1550, 3, 10), Period.of(0, 11, 28)},
+            {HijrahDate.of(1350, 5, 15), HijrahDate.of(1434, 7, 20), HijrahChronology.INSTANCE.period(84, 2, 5)},
+            {HijrahDate.of(1403, 5, 28), HijrahDate.of(1434, 7, 20), HijrahChronology.INSTANCE.period(31, 1, 22)},
+            {HijrahDate.of(1434, 7, 20), HijrahDate.of(1484, 2, 15), HijrahChronology.INSTANCE.period(49, 6, 24)},
+            {HijrahDate.of(1500, 6, 12), HijrahDate.of(1450, 4, 21), HijrahChronology.INSTANCE.period(-50, -1, -20)},
+            {HijrahDate.of(1549, 3, 11), HijrahDate.of(1550, 3, 10), HijrahChronology.INSTANCE.period(0, 11, 28)},
         };
     }
 
     // Test to get the Period between two given dates
     @Test(dataProvider="datesForPeriod")
-    public void test_until(HijrahDate h1, HijrahDate h2, Period p) {
-        Period period = h1.until(h2);
+    public void test_until(HijrahDate h1, HijrahDate h2, ChronoPeriod p) {
+        ChronoPeriod period = h1.until(h2);
         assertEquals(period, p);
     }
 
     // Test to get the Period between dates in different chronologies
     @Test(dataProvider="datesForPeriod")
-    public void test_periodUntilDiffChrono(HijrahDate h1, HijrahDate h2, Period p) {
+    public void test_periodUntilDiffChrono(HijrahDate h1, HijrahDate h2, ChronoPeriod p) {
         MinguoDate m = MinguoChronology.INSTANCE.date(h2);
-        Period period = h1.until(m);
+        ChronoPeriod period = h1.until(m);
         assertEquals(period, p);
     }
 
diff --git a/jdk/test/java/time/test/java/time/temporal/TestDateTimeValueRange.java b/jdk/test/java/time/test/java/time/temporal/TestDateTimeValueRange.java
index 67a4083..4fa31f2 100644
--- a/jdk/test/java/time/test/java/time/temporal/TestDateTimeValueRange.java
+++ b/jdk/test/java/time/test/java/time/temporal/TestDateTimeValueRange.java
@@ -88,19 +88,6 @@
     }
 
     //-----------------------------------------------------------------------
-    // Serialization
-    //-----------------------------------------------------------------------
-    public void test_serialization() throws Exception {
-        Object obj = ValueRange.of(1, 2, 3, 4);
-        ByteArrayOutputStream baos = new ByteArrayOutputStream();
-        ObjectOutputStream oos = new ObjectOutputStream(baos);
-        oos.writeObject(obj);
-        oos.close();
-        ObjectInputStream ois = new ObjectInputStream(new ByteArrayInputStream(baos.toByteArray()));
-        assertEquals(ois.readObject(), obj);
-    }
-
-    //-----------------------------------------------------------------------
     // of(long,long)
     //-----------------------------------------------------------------------
     public void test_of_longlong() {
diff --git a/jdk/test/java/util/Arrays/ParallelPrefix.java b/jdk/test/java/util/Arrays/ParallelPrefix.java
index 072de79..8d0d788 100644
--- a/jdk/test/java/util/Arrays/ParallelPrefix.java
+++ b/jdk/test/java/util/Arrays/ParallelPrefix.java
@@ -22,7 +22,7 @@
  */
 
 /**
- * @test
+ * @test 8014076 8025067
  * @summary unit test for Arrays.ParallelPrefix().
  * @author Tristan Yan
  * @run testng ParallelPrefix
@@ -54,30 +54,44 @@
     private final static int LARGE_ARRAY_SIZE = 1 << 12;
 
     private final static int[] ARRAY_SIZE_COLLECTION  = new int[]{
-        SMALL_ARRAY_SIZE, THRESHOLD_ARRAY_SIZE,MEDIUM_ARRAY_SIZE, LARGE_ARRAY_SIZE};
+        SMALL_ARRAY_SIZE,
+        THRESHOLD_ARRAY_SIZE,
+        MEDIUM_ARRAY_SIZE,
+        LARGE_ARRAY_SIZE
+    };
 
     @DataProvider
     public static Object[][] intSet(){
-        return genericData(size -> IntStream.range(0, size).toArray(), new IntBinaryOperator[]{Integer::sum, Integer::min});
+        return genericData(size -> IntStream.range(0, size).toArray(),
+                new IntBinaryOperator[]{
+                    Integer::sum,
+                    Integer::min});
     }
 
     @DataProvider
     public static Object[][] longSet(){
-        return genericData(size -> LongStream.range(0, size).toArray(), new LongBinaryOperator[]{Long::sum, Long::min});
+        return genericData(size -> LongStream.range(0, size).toArray(),
+                new LongBinaryOperator[]{
+                    Long::sum,
+                    Long::min});
     }
 
     @DataProvider
     public static Object[][] doubleSet(){
         return genericData(size -> IntStream.range(0, size).mapToDouble(i -> (double)i).toArray(),
-                new DoubleBinaryOperator[]{Double::sum, Double::min});
+                new DoubleBinaryOperator[]{
+                    Double::sum,
+                    Double::min});
     }
 
     @DataProvider
     public static Object[][] stringSet(){
         Function<Integer, String[]> stringsFunc = size ->
                 IntStream.range(0, size).mapToObj(Integer::toString).toArray(String[]::new);
-        BinaryOperator<String> cancatBop = String::concat;
-        return genericData(stringsFunc,  new BinaryOperator[]{cancatBop});
+        BinaryOperator<String> concat = String::concat;
+        return genericData(stringsFunc,
+                (BinaryOperator<String>[]) new BinaryOperator[]{
+                    concat });
     }
 
     private static <T, OPS> Object[][] genericData(Function<Integer, T> generateFunc, OPS[] ops) {
@@ -161,5 +175,123 @@
         Arrays.parallelPrefix(parallelRangeResult, op);
         assertEquals(parallelRangeResult, Arrays.copyOfRange(sequentialResult, fromIndex, toIndex));
     }
+
+    @Test
+    public void testNPEs() {
+        // null array
+        assertThrows( () -> Arrays.parallelPrefix((int[]) null, Integer::max),
+                NullPointerException.class, "should throw NPE");
+        assertThrows( () -> Arrays.parallelPrefix((long []) null, Long::max),
+                NullPointerException.class, "should throw NPE");
+        assertThrows( () -> Arrays.parallelPrefix((double []) null, Double::max),
+                NullPointerException.class, "should throw NPE");
+        assertThrows( () -> Arrays.parallelPrefix((String []) null, String::concat),
+                NullPointerException.class, "should throw NPE");
+
+        // null array w/ range
+        assertThrows( () -> Arrays.parallelPrefix((int[]) null, 0, 0, Integer::max),
+                NullPointerException.class, "should throw NPE");
+        assertThrows( () -> Arrays.parallelPrefix((long []) null, 0, 0, Long::max),
+                NullPointerException.class, "should throw NPE");
+        assertThrows( () -> Arrays.parallelPrefix((double []) null, 0, 0, Double::max),
+                NullPointerException.class, "should throw NPE");
+        assertThrows( () -> Arrays.parallelPrefix((String []) null, 0, 0, String::concat),
+                NullPointerException.class, "should throw NPE");
+
+        // null op
+        assertThrows( () -> Arrays.parallelPrefix(new int[] {}, null),
+                NullPointerException.class, "should throw NPE");
+        assertThrows( () -> Arrays.parallelPrefix(new long[] {}, null),
+                NullPointerException.class, "should throw NPE");
+        assertThrows( () -> Arrays.parallelPrefix(new double[] {}, null),
+                NullPointerException.class, "should throw NPE");
+        assertThrows( () -> Arrays.parallelPrefix(new String[] {}, null),
+                NullPointerException.class, "should throw NPE");
+
+        // null op w/ range
+        assertThrows( () -> Arrays.parallelPrefix(new int[] {}, 0, 0, null),
+                NullPointerException.class, "should throw NPE");
+        assertThrows( () -> Arrays.parallelPrefix(new long[] {}, 0, 0, null),
+                NullPointerException.class, "should throw NPE");
+        assertThrows( () -> Arrays.parallelPrefix(new double[] {}, 0, 0, null),
+                NullPointerException.class, "should throw NPE");
+        assertThrows( () -> Arrays.parallelPrefix(new String[] {}, 0, 0, null),
+                NullPointerException.class, "should throw NPE");
+    }
+
+    @Test
+    public void testIAEs() {
+        assertThrows( () -> Arrays.parallelPrefix(new int[] {}, 1, 0, Integer::max),
+                IllegalArgumentException.class, "should throw IAE");
+        assertThrows( () -> Arrays.parallelPrefix(new long[] {}, 1, 0, Long::max),
+                IllegalArgumentException.class, "should throw IAE");
+        assertThrows( () -> Arrays.parallelPrefix(new double[] {}, 1, 0, Double::max),
+                IllegalArgumentException.class, "should throw IAE");
+        assertThrows( () -> Arrays.parallelPrefix(new String[] {}, 1, 0, String::concat),
+                IllegalArgumentException.class, "should throw IAE");
+    }
+
+    @Test
+    public void testAIOBEs() {
+        // bad "fromIndex"
+        assertThrows( () -> Arrays.parallelPrefix(new int[] {}, -1, 0, Integer::max),
+                ArrayIndexOutOfBoundsException.class, "should throw AIOBE");
+        assertThrows( () -> Arrays.parallelPrefix(new long[] {}, -1, 0, Long::max),
+                ArrayIndexOutOfBoundsException.class, "should throw AIOBE");
+        assertThrows( () -> Arrays.parallelPrefix(new double[] {}, -1, 0, Double::max),
+                ArrayIndexOutOfBoundsException.class, "should throw AIOBE");
+        assertThrows( () -> Arrays.parallelPrefix(new String[] {}, -1, 0, String::concat),
+                ArrayIndexOutOfBoundsException.class, "should throw AIOBE");
+
+        // bad "toIndex"
+        assertThrows( () -> Arrays.parallelPrefix(new int[] {}, 0, 1, Integer::max),
+                ArrayIndexOutOfBoundsException.class, "should throw AIOBE");
+        assertThrows( () -> Arrays.parallelPrefix(new long[] {}, 0, 1, Long::max),
+                ArrayIndexOutOfBoundsException.class, "should throw AIOBE");
+        assertThrows( () -> Arrays.parallelPrefix(new double[] {}, 0, 1, Double::max),
+                ArrayIndexOutOfBoundsException.class, "should throw AIOBE");
+        assertThrows( () -> Arrays.parallelPrefix(new String[] {}, 0, 1, String::concat),
+                ArrayIndexOutOfBoundsException.class, "should throw AIOBE");
+    }
+
+    // "library" code
+
+    public interface Thrower<T extends Throwable> {
+
+        public void run() throws T;
+    }
+
+
+    public static <T extends Throwable> void assertThrows(Thrower<T> thrower, Class<T> throwable) {
+        assertThrows(thrower, throwable, null);
+    }
+
+    public static <T extends Throwable> void assertThrows(Thrower<T> thrower, Class<T> throwable, String message) {
+        Throwable thrown;
+        try {
+            thrower.run();
+            thrown = null;
+        } catch (Throwable caught) {
+            thrown = caught;
+        }
+
+        assertInstance(thrown, throwable,
+            ((null != message) ? message : "") +
+            " Failed to throw " + throwable.getCanonicalName());
+    }
+
+    public static <T extends Throwable> void assertThrows(Class<T> throwable, String message, Thrower<T>... throwers) {
+        for(Thrower<T> thrower : throwers) {
+            assertThrows(thrower, throwable, message);
+        }
+    }
+
+    public static void assertInstance(Object actual, Class<?> expected) {
+        assertInstance(expected.isInstance(actual), null);
+    }
+
+    public static void assertInstance(Object actual, Class<?> expected, String message) {
+        assertTrue(expected.isInstance(actual), message);
+    }
 }
 
diff --git a/jdk/test/java/util/Calendar/Bug6902861.java b/jdk/test/java/util/Calendar/Bug6902861.java
new file mode 100644
index 0000000..e8633f3
--- /dev/null
+++ b/jdk/test/java/util/Calendar/Bug6902861.java
@@ -0,0 +1,69 @@
+/*
+ * 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 6902861
+ * @summary Test for a workaround when WEEK_OF_YEAR and YEAR are out of sync.
+ */
+
+import java.util.*;
+import static java.util.GregorianCalendar.*;
+
+public class Bug6902861 {
+    static int errors = 0;
+
+    public static void main(String [] args) {
+        Locale loc = Locale.getDefault();
+        try {
+            Locale.setDefault(Locale.GERMANY);
+            test(2010, JANUARY, 1, +1, 1);
+            test(2010, JANUARY, 1, +2, 2);
+            test(2010, JANUARY, 1, -1, 52);
+            test(2010, JANUARY, 1, -2, 51);
+            test(2008, DECEMBER, 31, +1, 1);
+            test(2008, DECEMBER, 31, +2, 2);
+            test(2008, DECEMBER, 31, -1, 52);
+            test(2008, DECEMBER, 31, -2, 51);
+            if (errors > 0) {
+                throw new RuntimeException("Failed");
+            }
+        } finally {
+            Locale.setDefault(loc);
+        }
+    }
+
+    static void test(int year, int month, int dayOfMonth, int amount, int expected) {
+        Calendar calendar = new GregorianCalendar(year, month, dayOfMonth);
+        int week = calendar.get(WEEK_OF_YEAR); // fix the date
+        calendar.roll(WEEK_OF_YEAR, amount);
+        int got = calendar.get(WEEK_OF_YEAR);
+        int y = calendar.get(YEAR);
+        if (got != expected || y != year) {
+            String date = String.format("%04d-%02d-%02d", year, month+1, dayOfMonth);
+            System.err.printf("%s: roll %+d: got: %d,%2d; expected: %d,%2d%n",
+                              date, amount, y, got, year, expected);
+            errors++;
+        }
+    }
+}
diff --git a/jdk/test/java/util/Collection/MOAT.java b/jdk/test/java/util/Collection/MOAT.java
index a039461..945335a 100644
--- a/jdk/test/java/util/Collection/MOAT.java
+++ b/jdk/test/java/util/Collection/MOAT.java
@@ -207,8 +207,8 @@
                new Fun(){void f(){ it.next(); }});
 
         try { it.remove(); }
-        catch (IllegalStateException _) { pass(); }
-        catch (UnsupportedOperationException _) { pass(); }
+        catch (IllegalStateException ignored) { pass(); }
+        catch (UnsupportedOperationException ignored) { pass(); }
         catch (Throwable t) { unexpected(t); }
 
         if (rnd.nextBoolean())
@@ -280,9 +280,9 @@
         testEmptyCollection(m.values());
 
         try { check(! m.containsValue(null)); }
-        catch (NullPointerException _) { /* OK */ }
+        catch (NullPointerException ignored) { /* OK */ }
         try { check(! m.containsKey(null)); }
-        catch (NullPointerException _) { /* OK */ }
+        catch (NullPointerException ignored) { /* OK */ }
         check(! m.containsValue(1));
         check(! m.containsKey(1));
     }
@@ -710,8 +710,8 @@
             l.addAll(-1, Collections.<Integer>emptyList());
             fail("Expected IndexOutOfBoundsException not thrown");
         }
-        catch (UnsupportedOperationException _) {/* OK */}
-        catch (IndexOutOfBoundsException _) {/* OK */}
+        catch (UnsupportedOperationException ignored) {/* OK */}
+        catch (IndexOutOfBoundsException ignored) {/* OK */}
         catch (Throwable t) { unexpected(t); }
 
 //      equal(l instanceof Serializable,
diff --git a/jdk/test/java/util/Spliterator/SpliteratorCharacteristics.java b/jdk/test/java/util/Spliterator/SpliteratorCharacteristics.java
index 37fbcc7..f226a82 100644
--- a/jdk/test/java/util/Spliterator/SpliteratorCharacteristics.java
+++ b/jdk/test/java/util/Spliterator/SpliteratorCharacteristics.java
@@ -23,7 +23,7 @@
 
 /**
  * @test
- * @bug 8020156 8020009 8022326 8012913 8024405
+ * @bug 8020156 8020009 8022326 8012913 8024405 8024408
  * @run testng SpliteratorCharacteristics
  */
 
@@ -46,6 +46,7 @@
 import java.util.Spliterators;
 import java.util.TreeMap;
 import java.util.TreeSet;
+import java.util.WeakHashMap;
 import java.util.concurrent.ConcurrentSkipListMap;
 import java.util.concurrent.ConcurrentSkipListSet;
 import java.util.function.Supplier;
@@ -185,6 +186,11 @@
                                  Spliterator.SIZED | Spliterator.DISTINCT);
     }
 
+    public void testWeakHashMap() {
+        assertMapCharacteristics(new WeakHashMap<>(),
+                                 Spliterator.DISTINCT);
+    }
+
     public void testHashSet() {
         assertSetCharacteristics(new HashSet<>(),
                                  Spliterator.SIZED | Spliterator.DISTINCT);
diff --git a/jdk/test/java/util/TreeMap/Clone.java b/jdk/test/java/util/TreeMap/Clone.java
index efffa6a..aed33de 100644
--- a/jdk/test/java/util/TreeMap/Clone.java
+++ b/jdk/test/java/util/TreeMap/Clone.java
@@ -27,7 +27,6 @@
  * @summary Verify that cloned TreeMap gets new keyset
  * @author david.buck@oracle.com
  * @run main/othervm Clone
- * @run main/othervm -XX:+AggressiveOpts Clone
  */
 
 import java.util.TreeMap;
diff --git a/jdk/test/java/util/stream/bootlib/java/util/stream/OpTestCase.java b/jdk/test/java/util/stream/bootlib/java/util/stream/OpTestCase.java
index 115a37d..9be4be7 100644
--- a/jdk/test/java/util/stream/bootlib/java/util/stream/OpTestCase.java
+++ b/jdk/test/java/util/stream/bootlib/java/util/stream/OpTestCase.java
@@ -30,7 +30,6 @@
 import java.util.Collections;
 import java.util.EnumMap;
 import java.util.EnumSet;
-import java.util.HashMap;
 import java.util.HashSet;
 import java.util.List;
 import java.util.Map;
@@ -41,7 +40,6 @@
 import java.util.function.Consumer;
 import java.util.function.Function;
 
-import org.testng.Assert;
 import org.testng.annotations.Test;
 
 /**
@@ -397,14 +395,68 @@
 
     // Exercise terminal operations
 
-    static enum TerminalTestScenario {
-        SINGLE_SEQUENTIAL,
-        SINGLE_SEQUENTIAL_SHORT_CIRCUIT,
-        SINGLE_PARALLEL,
-        ALL_SEQUENTIAL,
-        ALL_SEQUENTIAL_SHORT_CIRCUIT,
-        ALL_PARALLEL,
-        ALL_PARALLEL_SEQUENTIAL,
+    interface BaseTerminalTestScenario<U, R, S_OUT extends BaseStream<U, S_OUT>> {
+        boolean requiresSingleStageSource();
+
+        boolean requiresParallelSource();
+
+        default R run(Function<S_OUT, R> terminalF, S_OUT source, StreamShape shape) {
+            return terminalF.apply(source);
+        }
+    }
+
+    @SuppressWarnings({"rawtypes", "unchecked"})
+    static enum TerminalTestScenario implements BaseTerminalTestScenario {
+        SINGLE_SEQUENTIAL(true, false),
+
+        SINGLE_SEQUENTIAL_SHORT_CIRCUIT(true, false) {
+            @Override
+            public Object run(Function terminalF, BaseStream source, StreamShape shape) {
+                source = (BaseStream) chain(source, new ShortCircuitOp(shape));
+                return terminalF.apply(source);
+            }
+        },
+
+        SINGLE_PARALLEL(true, true),
+
+        ALL_SEQUENTIAL(false, false),
+
+        ALL_SEQUENTIAL_SHORT_CIRCUIT(false, false) {
+            @Override
+            public Object run(Function terminalF, BaseStream source, StreamShape shape) {
+                source = (BaseStream) chain(source, new ShortCircuitOp(shape));
+                return terminalF.apply(source);
+            }
+        },
+
+        ALL_PARALLEL(false, true),
+
+        ALL_PARALLEL_SEQUENTIAL(false, false) {
+            @Override
+            public Object run(Function terminalF, BaseStream source, StreamShape shape) {
+                return terminalF.apply(source.sequential());
+            }
+        },
+        ;
+
+        private final boolean requiresSingleStageSource;
+        private final boolean isParallel;
+
+        TerminalTestScenario(boolean requiresSingleStageSource, boolean isParallel) {
+            this.requiresSingleStageSource = requiresSingleStageSource;
+            this.isParallel = isParallel;
+        }
+
+        @Override
+        public boolean requiresSingleStageSource() {
+            return requiresSingleStageSource;
+        }
+
+        @Override
+        public boolean requiresParallelSource() {
+            return isParallel;
+        }
+
     }
 
     @SuppressWarnings({"rawtypes", "unchecked"})
@@ -415,8 +467,6 @@
 
         R refResult;
 
-        Set<TerminalTestScenario> testSet = EnumSet.allOf(TerminalTestScenario.class);
-
         ResultAsserter<R> resultAsserter = (act, exp, ord, par) -> LambdaTestHelpers.assertContentsEqual(act, exp);
 
         private ExerciseDataTerminalBuilder(TestData<T, S_IN> data, Function<S_IN, S_OUT> streamF, Function<S_OUT, R> terminalF) {
@@ -442,27 +492,6 @@
             return this;
         }
 
-        public ExerciseDataTerminalBuilder<T, U, R, S_IN, S_OUT> without(TerminalTestScenario... tests) {
-            return without(Arrays.asList(tests));
-        }
-
-        public ExerciseDataTerminalBuilder<T, U, R, S_IN, S_OUT> without(Collection<TerminalTestScenario> tests) {
-            testSet.removeAll(tests);
-            if (testSet.isEmpty()) {
-                throw new IllegalStateException("Terminal test scenario set is empty");
-            }
-            return this;
-        }
-
-        public ExerciseDataTerminalBuilder<T, U, R, S_IN, S_OUT> with(TerminalTestScenario... tests) {
-            return with(Arrays.asList(tests));
-        }
-
-        public ExerciseDataTerminalBuilder<T, U, R, S_IN, S_OUT> with(Collection<TerminalTestScenario> tests) {
-            testSet.addAll(tests);
-            return this;
-        }
-
         // Build method
 
         public R exercise() {
@@ -471,70 +500,36 @@
             boolean isOrdered = StreamOpFlag.ORDERED.isKnown(ap.getStreamFlags());
             StreamShape shape = ap.getOutputShape();
 
+            EnumSet<TerminalTestScenario> tests = EnumSet.allOf(TerminalTestScenario.class);
+            // Sequentially collect the output that will be input to the terminal op
             Node<U> node = ap.evaluateToArrayNode(size -> (U[]) new Object[size]);
             if (refResult == null) {
-                // Sequentially collect the output that will be input to the terminal op
-                refResult = terminalF.apply((S_OUT) createPipeline(shape, node.spliterator(),
-                                                                   StreamOpFlag.IS_ORDERED | StreamOpFlag.IS_SIZED,
-                                                                   false));
-            } else if (testSet.contains(TerminalTestScenario.SINGLE_SEQUENTIAL)) {
+                // Induce the reference result
                 S_OUT source = (S_OUT) createPipeline(shape, node.spliterator(),
                                                       StreamOpFlag.IS_ORDERED | StreamOpFlag.IS_SIZED,
                                                       false);
-                R result = terminalF.apply(source);
-                LambdaTestHelpers.launderAssertion(() -> resultAsserter.assertResult(result, refResult, isOrdered, false),
-                                                   () -> String.format("Single sequential: %s != %s", refResult, result));
+
+                refResult = (R) TerminalTestScenario.SINGLE_SEQUENTIAL.run(terminalF, source, shape);
+                tests.remove(TerminalTestScenario.SINGLE_SEQUENTIAL);
             }
 
-            if (testSet.contains(TerminalTestScenario.SINGLE_SEQUENTIAL_SHORT_CIRCUIT)) {
-                S_OUT source = (S_OUT) createPipeline(shape, node.spliterator(),
-                                                      StreamOpFlag.IS_ORDERED | StreamOpFlag.IS_SIZED,
-                                                      false);
-                // Force short-circuit
-                source = (S_OUT) chain(source, new ShortCircuitOp<U>(shape));
-                R result = terminalF.apply(source);
-                LambdaTestHelpers.launderAssertion(() -> resultAsserter.assertResult(result, refResult, isOrdered, false),
-                                                   () -> String.format("Single sequential pull: %s != %s", refResult, result));
-            }
+            for (BaseTerminalTestScenario test : tests) {
+                S_OUT source;
+                if (test.requiresSingleStageSource()) {
+                    source = (S_OUT) createPipeline(shape, node.spliterator(),
+                                                    StreamOpFlag.IS_ORDERED | StreamOpFlag.IS_SIZED,
+                                                    test.requiresParallelSource());
+                }
+                else {
+                    source = streamF.apply(test.requiresParallelSource()
+                                           ? data.parallelStream() : data.stream());
+                }
 
-            if (testSet.contains(TerminalTestScenario.SINGLE_PARALLEL)) {
-                S_OUT source = (S_OUT) createPipeline(shape, node.spliterator(),
-                                                      StreamOpFlag.IS_ORDERED | StreamOpFlag.IS_SIZED,
-                                                      true);
-                R result = terminalF.apply(source);
-                LambdaTestHelpers.launderAssertion(() -> resultAsserter.assertResult(result, refResult, isOrdered, true),
-                                                   () -> String.format("Single parallel: %s != %s", refResult, result));
-            }
+                R result = (R) test.run(terminalF, source, shape);
 
-            if (testSet.contains(TerminalTestScenario.ALL_SEQUENTIAL)) {
-                // This may forEach or tryAdvance depending on the terminal op implementation
-                S_OUT source = streamF.apply(data.stream());
-                R result = terminalF.apply(source);
-                LambdaTestHelpers.launderAssertion(() -> resultAsserter.assertResult(result, refResult, isOrdered, false),
-                                                   () -> String.format("All sequential: %s != %s", refResult, result));
-            }
-
-            if (testSet.contains(TerminalTestScenario.ALL_SEQUENTIAL_SHORT_CIRCUIT)) {
-                S_OUT source = streamF.apply(data.stream());
-                // Force short-circuit
-                source = (S_OUT) chain(source, new ShortCircuitOp<U>(shape));
-                R result = terminalF.apply(source);
-                LambdaTestHelpers.launderAssertion(() -> resultAsserter.assertResult(result, refResult, isOrdered, false),
-                                                   () -> String.format("All sequential pull: %s != %s", refResult, result));
-            }
-
-            if (testSet.contains(TerminalTestScenario.ALL_PARALLEL)) {
-                S_OUT source = streamF.apply(data.parallelStream());
-                R result = terminalF.apply(source);
-                LambdaTestHelpers.launderAssertion(() -> resultAsserter.assertResult(result, refResult, isOrdered, true),
-                                                   () -> String.format("All parallel: %s != %s", refResult, result));
-            }
-
-            if (testSet.contains(TerminalTestScenario.ALL_PARALLEL_SEQUENTIAL)) {
-                S_OUT source = streamF.apply(data.parallelStream());
-                R result = terminalF.apply(source.sequential());
-                LambdaTestHelpers.launderAssertion(() -> resultAsserter.assertResult(result, refResult, isOrdered, false),
-                                                   () -> String.format("All parallel then sequential: %s != %s", refResult, result));
+                LambdaTestHelpers.launderAssertion(
+                        () -> resultAsserter.assertResult(result, refResult, isOrdered, test.requiresParallelSource()),
+                        () -> String.format("%s: %s != %s", test, refResult, result));
             }
 
             return refResult;
@@ -596,10 +591,10 @@
 
     // Test data
 
-    private class ShortCircuitOp<T> implements StatelessTestOp<T,T> {
+    static class ShortCircuitOp<T> implements StatelessTestOp<T,T> {
         private final StreamShape shape;
 
-        private ShortCircuitOp(StreamShape shape) {
+        ShortCircuitOp(StreamShape shape) {
             this.shape = shape;
         }
 
diff --git a/jdk/test/java/util/stream/test/org/openjdk/tests/java/util/stream/ExplodeOpTest.java b/jdk/test/java/util/stream/test/org/openjdk/tests/java/util/stream/ExplodeOpTest.java
index 4332a0c..cbd9534 100644
--- a/jdk/test/java/util/stream/test/org/openjdk/tests/java/util/stream/ExplodeOpTest.java
+++ b/jdk/test/java/util/stream/test/org/openjdk/tests/java/util/stream/ExplodeOpTest.java
@@ -64,6 +64,9 @@
         result = exerciseOps(data, s -> s.flatMap(mfNull));
         assertEquals(0, result.size());
 
+        result = exerciseOps(data, s-> s.flatMap(e -> Stream.empty()));
+        assertEquals(0, result.size());
+
         exerciseOps(data, s -> s.flatMap(mfLt));
         exerciseOps(data, s -> s.flatMap(integerRangeMapper));
         exerciseOps(data, s -> s.flatMap((Integer e) -> IntStream.range(0, e).boxed().limit(10)));
diff --git a/jdk/test/java/util/stream/test/org/openjdk/tests/java/util/stream/ForEachOpTest.java b/jdk/test/java/util/stream/test/org/openjdk/tests/java/util/stream/ForEachOpTest.java
index d5bb72c..e7337e6 100644
--- a/jdk/test/java/util/stream/test/org/openjdk/tests/java/util/stream/ForEachOpTest.java
+++ b/jdk/test/java/util/stream/test/org/openjdk/tests/java/util/stream/ForEachOpTest.java
@@ -69,7 +69,7 @@
         };
     }
 
-    @Test
+    @Test(groups = { "serialization-hostile" })
     public void testForEachOrdered() {
         List<Integer> input = countTo(10000);
         TestData.OfRef<Integer> data = TestData.Factory.ofCollection("[1, 10000]", input);
@@ -116,7 +116,7 @@
 
     //
 
-    @Test
+    @Test(groups = { "serialization-hostile" })
     public void testIntForEachOrdered() {
         List<Integer> input = countTo(10000);
         TestData.OfInt data = TestData.Factory.ofIntSupplier("[1, 10000]",
@@ -164,7 +164,7 @@
 
     //
 
-    @Test
+    @Test(groups = { "serialization-hostile" })
     public void testLongForEachOrdered() {
         List<Integer> input = countTo(10000);
         TestData.OfLong data = TestData.Factory.ofLongSupplier("[1, 10000]",
@@ -212,7 +212,7 @@
 
     //
 
-    @Test
+    @Test(groups = { "serialization-hostile" })
     public void testDoubleForEachOrdered() {
         List<Integer> input = countTo(10000);
         TestData.OfDouble data = TestData.Factory.ofDoubleSupplier("[1, 10000]",
diff --git a/jdk/test/java/util/stream/test/org/openjdk/tests/java/util/stream/SliceOpTest.java b/jdk/test/java/util/stream/test/org/openjdk/tests/java/util/stream/SliceOpTest.java
index b8c9b54..a023486 100644
--- a/jdk/test/java/util/stream/test/org/openjdk/tests/java/util/stream/SliceOpTest.java
+++ b/jdk/test/java/util/stream/test/org/openjdk/tests/java/util/stream/SliceOpTest.java
@@ -147,7 +147,8 @@
         return Math.max(0, dataSize - skip);
     }
 
-    @Test(dataProvider = "StreamTestData<Integer>", dataProviderClass = StreamTestDataProvider.class)
+    @Test(dataProvider = "StreamTestData<Integer>", dataProviderClass = StreamTestDataProvider.class,
+          groups = { "serialization-hostile" })
     public void testSkipOps(String name, TestData.OfRef<Integer> data) {
         List<Integer> skips = sizes(data.size());
 
@@ -169,7 +170,8 @@
         }
     }
 
-    @Test(dataProvider = "StreamTestData<Integer>", dataProviderClass = StreamTestDataProvider.class)
+    @Test(dataProvider = "StreamTestData<Integer>", dataProviderClass = StreamTestDataProvider.class,
+          groups = { "serialization-hostile" })
     public void testSkipLimitOps(String name, TestData.OfRef<Integer> data) {
         List<Integer> skips = sizes(data.size());
         List<Integer> limits = skips;
@@ -242,7 +244,8 @@
         testSkipLimitOps("testSkipLimitOpsWithNonSplittingSpliterator", data);
     }
 
-    @Test(dataProvider = "StreamTestData<Integer>", dataProviderClass = StreamTestDataProvider.class)
+    @Test(dataProvider = "StreamTestData<Integer>", dataProviderClass = StreamTestDataProvider.class,
+          groups = { "serialization-hostile" })
     public void testLimitOps(String name, TestData.OfRef<Integer> data) {
         List<Integer> limits = sizes(data.size());
 
diff --git a/jdk/test/java/util/stream/test/org/openjdk/tests/java/util/stream/SortedOpTest.java b/jdk/test/java/util/stream/test/org/openjdk/tests/java/util/stream/SortedOpTest.java
index 6c8cab2..960e614 100644
--- a/jdk/test/java/util/stream/test/org/openjdk/tests/java/util/stream/SortedOpTest.java
+++ b/jdk/test/java/util/stream/test/org/openjdk/tests/java/util/stream/SortedOpTest.java
@@ -26,6 +26,8 @@
 
 import java.util.*;
 import java.util.Spliterators;
+import java.util.function.Function;
+import java.util.function.Supplier;
 import java.util.stream.*;
 
 import static java.util.stream.LambdaTestHelpers.*;
@@ -37,6 +39,69 @@
  */
 @Test
 public class SortedOpTest extends OpTestCase {
+
+    public void testRefStreamTooLarge() {
+        Function<LongStream, Stream<Long>> f = s ->
+                // Clear the SORTED flag
+                s.mapToObj(i -> i)
+                .sorted();
+
+        testStreamTooLarge(f, Stream::findFirst);
+    }
+
+    public void testIntStreamTooLarge() {
+        Function<LongStream, IntStream> f = s ->
+                // Clear the SORTED flag
+                s.mapToInt(i -> (int) i)
+                .sorted();
+
+        testStreamTooLarge(f, IntStream::findFirst);
+    }
+
+    public void testLongStreamTooLarge() {
+        Function<LongStream, LongStream> f = s ->
+                // Clear the SORTED flag
+                s.map(i -> i)
+                .sorted();
+
+        testStreamTooLarge(f, LongStream::findFirst);
+    }
+
+    public void testDoubleStreamTooLarge() {
+        Function<LongStream, DoubleStream> f = s ->
+                // Clear the SORTED flag
+                s.mapToDouble(i -> (double) i)
+                .sorted();
+
+        testStreamTooLarge(f, DoubleStream::findFirst);
+    }
+
+    <T, S extends BaseStream<T, S>> void testStreamTooLarge(Function<LongStream, S> s,
+                                                            Function<S, ?> terminal) {
+        // Set up conditions for a large input > maximum array size
+        Supplier<LongStream> input = () -> LongStream.range(0, 1L + Integer.MAX_VALUE);
+
+        // Transformation functions
+        List<Function<LongStream, LongStream>> transforms = Arrays.asList(
+                ls -> ls,
+                ls -> ls.parallel(),
+                // Clear the SIZED flag
+                ls -> ls.limit(Long.MAX_VALUE),
+                ls -> ls.limit(Long.MAX_VALUE).parallel());
+
+        for (Function<LongStream, LongStream> transform : transforms) {
+            RuntimeException caught = null;
+            try {
+                terminal.apply(s.apply(transform.apply(input.get())));
+            } catch (RuntimeException e) {
+                caught = e;
+            }
+            assertNotNull(caught, "Expected an instance of exception IllegalArgumentException but no exception thrown");
+            assertTrue(caught instanceof IllegalArgumentException,
+                       String.format("Expected an instance of exception IllegalArgumentException but got %s", caught));
+        }
+    }
+
     public void testSorted() {
         assertCountSum(countTo(0).stream().sorted(), 0, 0);
         assertCountSum(countTo(10).stream().sorted(), 10, 55);
diff --git a/jdk/test/java/util/stream/test/org/openjdk/tests/java/util/stream/StreamBuilderTest.java b/jdk/test/java/util/stream/test/org/openjdk/tests/java/util/stream/StreamBuilderTest.java
index cbf87b1..d8d46fd 100644
--- a/jdk/test/java/util/stream/test/org/openjdk/tests/java/util/stream/StreamBuilderTest.java
+++ b/jdk/test/java/util/stream/test/org/openjdk/tests/java/util/stream/StreamBuilderTest.java
@@ -97,7 +97,7 @@
         checkISE(() -> sb.build());
     }
 
-    @Test(dataProvider = "sizes")
+    @Test(dataProvider = "sizes", groups = { "serialization-hostile" })
     public void testStreamBuilder(int size) {
         testStreamBuilder(size, (s) -> {
             Stream.Builder<Integer> sb = Stream.builder();
@@ -159,7 +159,7 @@
         checkISE(() -> sb.build());
     }
 
-    @Test(dataProvider = "sizes")
+    @Test(dataProvider = "sizes", groups = { "serialization-hostile" })
     public void testIntStreamBuilder(int size) {
         testIntStreamBuilder(size, (s) -> {
             IntStream.Builder sb = IntStream.builder();
@@ -221,7 +221,7 @@
         checkISE(() -> sb.build());
     }
 
-    @Test(dataProvider = "sizes")
+    @Test(dataProvider = "sizes", groups = { "serialization-hostile" })
     public void testLongStreamBuilder(int size) {
         testLongStreamBuilder(size, (s) -> {
             LongStream.Builder sb = LongStream.builder();
@@ -282,7 +282,7 @@
         checkISE(() -> sb.build());
     }
 
-    @Test(dataProvider = "sizes")
+    @Test(dataProvider = "sizes", groups = { "serialization-hostile" })
     public void testDoubleStreamBuilder(int size) {
         testDoubleStreamBuilder(size, (s) -> {
             DoubleStream.Builder sb = DoubleStream.builder();
diff --git a/jdk/test/java/util/stream/test/org/openjdk/tests/java/util/stream/TabulatorsTest.java b/jdk/test/java/util/stream/test/org/openjdk/tests/java/util/stream/TabulatorsTest.java
index 52f3c21..f539df5 100644
--- a/jdk/test/java/util/stream/test/org/openjdk/tests/java/util/stream/TabulatorsTest.java
+++ b/jdk/test/java/util/stream/test/org/openjdk/tests/java/util/stream/TabulatorsTest.java
@@ -609,7 +609,7 @@
     @Test(dataProvider = "StreamTestData<Integer>", dataProviderClass = StreamTestDataProvider.class)
     public void testComposeFinisher(String name, TestData.OfRef<Integer> data) throws ReflectiveOperationException {
         List<Integer> asList = exerciseTerminalOps(data, s -> s.collect(toList()));
-        List<Integer> asImmutableList = exerciseTerminalOps(data, s -> s.collect(collectingAndThen(toList(), Collections::<Integer>unmodifiableList)));
+        List<Integer> asImmutableList = exerciseTerminalOps(data, s -> s.collect(collectingAndThen(toList(), Collections::unmodifiableList)));
         assertEquals(asList, asImmutableList);
         try {
             asImmutableList.add(0);
diff --git a/jdk/test/java/util/stream/test/org/openjdk/tests/java/util/stream/ToArrayOpTest.java b/jdk/test/java/util/stream/test/org/openjdk/tests/java/util/stream/ToArrayOpTest.java
index 04475e8..5132d9d 100644
--- a/jdk/test/java/util/stream/test/org/openjdk/tests/java/util/stream/ToArrayOpTest.java
+++ b/jdk/test/java/util/stream/test/org/openjdk/tests/java/util/stream/ToArrayOpTest.java
@@ -165,7 +165,8 @@
         };
     }
 
-    @Test(dataProvider = "StreamTestData<Integer>", dataProviderClass = StreamTestDataProvider.class)
+    @Test(dataProvider = "StreamTestData<Integer>", dataProviderClass = StreamTestDataProvider.class,
+          groups = { "serialization-hostile" })
     public void testStatefulOpPermutations(String name, TestData.OfRef<Integer> data) {
         for (Function<Stream<Integer>, Stream<Integer>> f : statefulOpPermutations) {
             withData(data).terminal(f, s -> s.toArray())
diff --git a/jdk/test/javax/imageio/plugins/wbmp/StreamResetTest.java b/jdk/test/javax/imageio/plugins/wbmp/StreamResetTest.java
new file mode 100644
index 0000000..a51880e
--- /dev/null
+++ b/jdk/test/javax/imageio/plugins/wbmp/StreamResetTest.java
@@ -0,0 +1,97 @@
+/*
+ * 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     8022632
+ * @summary Test verifies that SPI of WBMP image reader
+ *           restores the stream position if an IOException
+ *           occurs during processing of image header.
+ * @run     main StreamResetTest
+ */
+
+
+import java.io.IOException;
+import javax.imageio.ImageIO;
+import javax.imageio.ImageReader;
+import javax.imageio.spi.ImageReaderSpi;
+import javax.imageio.stream.ImageInputStreamImpl;
+
+public class StreamResetTest {
+
+    public static void main(String[] args) {
+        IOException expectedException = null;
+        TestStream iis = new TestStream();
+
+        ImageReader wbmp = ImageIO.getImageReadersByFormatName("WBMP").next();
+        if (wbmp == null) {
+            System.out.println("No WBMP reader: skip the test");
+            return;
+        }
+
+        ImageReaderSpi spi = wbmp.getOriginatingProvider();
+
+        iis.checkPosition();
+
+        try {
+            spi.canDecodeInput(iis);
+        } catch (IOException e) {
+            expectedException = e;
+        }
+
+        if (expectedException == null) {
+            throw new RuntimeException("Test FAILED: stream was not used");
+        }
+
+        iis.checkPosition();
+
+        System.out.println("Test PASSED");
+
+    }
+
+    private static class TestStream extends ImageInputStreamImpl {
+        private final int errorPos = 1;
+
+        @Override
+        public int read() throws IOException {
+            if (streamPos == errorPos) {
+                throw new IOException("Test exception");
+            }
+            streamPos++;
+
+            return 0x03;
+        }
+
+        @Override
+        public int read(byte[] b, int off, int len) throws IOException {
+            streamPos += len;
+            return len;
+        }
+
+        public void checkPosition() {
+            if (streamPos != 0) {
+                throw new RuntimeException("Test FAILED");
+            }
+        }
+    }
+}
diff --git a/jdk/test/javax/swing/JInternalFrame/Test6505027.java b/jdk/test/javax/swing/JInternalFrame/Test6505027.java
index 241ea78..36c3db3 100644
--- a/jdk/test/javax/swing/JInternalFrame/Test6505027.java
+++ b/jdk/test/javax/swing/JInternalFrame/Test6505027.java
@@ -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
@@ -96,8 +96,10 @@
         SwingUtilities.convertPointToScreen(point, this.table);
 
         Robot robot = new Robot();
+        robot.setAutoDelay(50);
         robot.mouseMove(point.x + 1, point.y + 1);
         robot.mousePress(InputEvent.BUTTON1_MASK);
+        robot.mouseRelease(InputEvent.BUTTON1_MASK);
     }
 
     public static void validate() {
diff --git a/jdk/test/javax/swing/JScrollBar/bug4202954/bug4202954.java b/jdk/test/javax/swing/JScrollBar/bug4202954/bug4202954.java
new file mode 100644
index 0000000..cf5b572
--- /dev/null
+++ b/jdk/test/javax/swing/JScrollBar/bug4202954/bug4202954.java
@@ -0,0 +1,151 @@
+/*
+ * Copyright (c) 2013, Oracle and/or its affiliates. All rights reserved.
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * This code is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU General Public License version 2 only, as
+ * published by the Free Software Foundation.
+ *
+ * This code is distributed in the hope that it will be useful, but WITHOUT
+ * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
+ * version 2 for more details (a copy is included in the LICENSE file that
+ * accompanied this code).
+ *
+ * You should have received a copy of the GNU General Public License version
+ * 2 along with this work; if not, write to the Free Software Foundation,
+ * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
+ *
+ * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
+ * or visit www.oracle.com if you need additional information or have any
+ * questions.
+ */
+/* @test
+   @bug 4202954
+   @library ../../regtesthelpers
+   @build Util
+   @author Michael C. Albers
+   @run main bug4202954
+*/
+
+import java.awt.*;
+import java.awt.event.InputEvent;
+import javax.swing.*;
+import sun.awt.*;
+
+public class bug4202954 {
+    static JScrollPane buttonScrollPane;
+    private static final SunToolkit toolkit = (SunToolkit) Toolkit.getDefaultToolkit();
+    static Robot robot;
+    public static void main(String[] args) throws Exception {
+        if (OSInfo.getOSType() == OSInfo.OSType.MACOSX) {
+            UIManager.setLookAndFeel(UIManager.getCrossPlatformLookAndFeelClassName());
+        }
+
+        SwingUtilities.invokeAndWait(new Runnable() {
+            public void run() {
+                createAndShowGUI();
+            }
+        });
+        Point centerOfScrollPane = Util.getCenterPoint(buttonScrollPane);
+        JButton rightScrollButton = findJButton(buttonScrollPane.getHorizontalScrollBar(), centerOfScrollPane.x, centerOfScrollPane.y);
+        JButton bottomScrollButton = findJButton(buttonScrollPane.getVerticalScrollBar(), centerOfScrollPane.x, centerOfScrollPane.y);
+
+        if (rightScrollButton == null || bottomScrollButton == null) {
+            String errMessage = "Test can't be executed: ";
+            errMessage = errMessage + rightScrollButton == null ? "can't find right button for horizontal scroll bar; " : ""
+                    + bottomScrollButton == null ? "can't find bottom scroll button for vertical scroll bar" : "";
+            throw new RuntimeException(errMessage);
+        }
+
+        robot = new Robot();
+        robot.setAutoDelay(50);
+
+        // test right, left and middle mouse buttons for horizontal scroll bar
+        if (!doTest(rightScrollButton, InputEvent.BUTTON1_DOWN_MASK, true)) {
+            throw new RuntimeException("Test failed: right arrow button didn't respond on left mouse button.");
+        }
+        if (!doTest(rightScrollButton, InputEvent.BUTTON2_DOWN_MASK, false)) {
+            throw new RuntimeException("Test failed: right arrow button respond on right mouse button.");
+        }
+        if (!doTest(rightScrollButton, InputEvent.BUTTON3_DOWN_MASK, false)) {
+            throw new RuntimeException("Test failed: right arrow button respond on middle mouse button.");
+        }
+
+        // test right, left and middle mouse buttons for vertical scroll bar
+        if (!doTest(bottomScrollButton, InputEvent.BUTTON1_DOWN_MASK, true)) {
+            throw new RuntimeException("Test failed: bottom arrow button didn't respond on left mouse button.");
+        }
+        if (!doTest(bottomScrollButton, InputEvent.BUTTON2_DOWN_MASK, false)) {
+            throw new RuntimeException("Test failed: bottom arrow button respond on right mouse button.");
+        }
+        if (!doTest(bottomScrollButton, InputEvent.BUTTON3_DOWN_MASK, false)) {
+            throw new RuntimeException("Test failed: bottom arrow button respond on middle mouse button.");
+        }
+    }
+    public static void createAndShowGUI() {
+        JPanel buttonPanel = new JPanel();
+        buttonPanel.setLayout(new GridLayout(5,5, 15,15));
+        int buttonCount = 1;
+        while (buttonCount <= 25) {
+            buttonPanel.add(new JButton("Button #"+buttonCount));
+            buttonCount++;
+        }
+        buttonScrollPane = new JScrollPane();
+        buttonScrollPane.setViewportView(buttonPanel);
+
+        JFrame testFrame = new JFrame("bug4202954");
+        testFrame.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
+        testFrame.setLayout(new BorderLayout());
+        testFrame.add(BorderLayout.CENTER, buttonScrollPane);
+        testFrame.setSize(450, 100);
+        testFrame.setVisible(true);
+    }
+    public static JButton findJButton(final JScrollBar scrollBar, final int minX, final int minY) throws Exception {
+        JButton button = Util.invokeOnEDT(new java.util.concurrent.Callable<JButton>() {
+            @Override
+            public JButton call() throws Exception {
+                for (Component c: scrollBar.getComponents()) {
+                    if (c instanceof JButton) {
+                        Point p = c.getLocationOnScreen();
+                        if (p.x > minX && p.y > minY) {
+                            return (JButton) c;
+                        }
+                    }
+                }
+                return null;
+            }
+        });
+        return button;
+    }
+    public static void clickMouseOnComponent(Component c, int buttons) throws Exception {
+        Point p = Util.getCenterPoint(c);
+        robot.mouseMove(p.x, p.y);
+        robot.mousePress(buttons);
+        robot.mouseRelease(buttons);
+    }
+    public static boolean doTest(JButton scrollButton, int buttons, boolean expectScroll) throws Exception {
+        java.util.concurrent.Callable<Integer> horizontalValue = new java.util.concurrent.Callable<Integer>() {
+            @Override
+            public Integer call() throws Exception {
+                return buttonScrollPane.getHorizontalScrollBar().getValue();
+            }
+        };
+        java.util.concurrent.Callable<Integer> verticalValue = new java.util.concurrent.Callable<Integer>() {
+            @Override
+            public Integer call() throws Exception {
+                return buttonScrollPane.getVerticalScrollBar().getValue();
+            }
+        };
+        Integer oldHValue = Util.invokeOnEDT(horizontalValue);
+        Integer oldVValue = Util.invokeOnEDT(verticalValue);
+
+        clickMouseOnComponent(scrollButton, buttons);
+        toolkit.realSync();
+
+        int newHValue = Util.invokeOnEDT(horizontalValue);
+        int newVValue = Util.invokeOnEDT(verticalValue);
+
+        return (oldHValue != newHValue || oldVValue != newVValue) == expectScroll;
+    }
+}
diff --git a/jdk/test/javax/swing/JSpinner/4973721/bug4973721.java b/jdk/test/javax/swing/JSpinner/4973721/bug4973721.java
new file mode 100644
index 0000000..f94ce86
--- /dev/null
+++ b/jdk/test/javax/swing/JSpinner/4973721/bug4973721.java
@@ -0,0 +1,120 @@
+/*
+ * Copyright (c) 2013, Oracle and/or its affiliates. All rights reserved.
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * This code is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU General Public License version 2 only, as
+ * published by the Free Software Foundation.
+ *
+ * This code is distributed in the hope that it will be useful, but WITHOUT
+ * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
+ * version 2 for more details (a copy is included in the LICENSE file that
+ * accompanied this code).
+ *
+ * You should have received a copy of the GNU General Public License version
+ * 2 along with this work; if not, write to the Free Software Foundation,
+ * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
+ *
+ * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
+ * or visit www.oracle.com if you need additional information or have any
+ * questions.
+ */
+/* @test
+   @bug 4973721
+   @summary Up and Down Arrow key buttons are not working for the JSpinner in Synth LAF
+   @library ../../regtesthelpers
+   @build Util
+   @author Oleg Mokhovikov
+   @run main bug4973721
+*/
+
+import java.awt.Robot;
+import java.awt.Toolkit;
+import javax.swing.event.ChangeListener;
+import javax.swing.event.ChangeEvent;
+import java.awt.event.KeyEvent;
+import java.awt.event.FocusListener;
+import java.awt.event.FocusEvent;
+import javax.swing.*;
+import sun.awt.SunToolkit;
+
+public class bug4973721 implements ChangeListener, FocusListener {
+    static volatile boolean bStateChanged = false;
+    static volatile boolean bFocusGained = false;
+    static JSpinner spinner;
+    static final Object listener = new bug4973721();
+    private static final SunToolkit toolkit = (SunToolkit) Toolkit.getDefaultToolkit();
+
+    public void focusLost(FocusEvent e) {}
+
+    public synchronized void focusGained(FocusEvent e) {
+        System.out.println("focusGained");
+        bFocusGained = true;
+        notifyAll();
+    }
+
+    public synchronized void stateChanged(ChangeEvent e) {
+        System.out.println("stateChanged");
+        bStateChanged = true;
+        notifyAll();
+    }
+
+    public static void main(String[] args) throws Exception {
+        UIManager.setLookAndFeel("javax.swing.plaf.synth.SynthLookAndFeel");
+
+        SwingUtilities.invokeAndWait(new Runnable() {
+            public void run() {
+                final JFrame frame = new JFrame();
+                spinner = new JSpinner();
+                frame.getContentPane().add(spinner);
+                frame.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
+
+                frame.pack();
+                frame.setVisible(true);
+                spinner.addChangeListener((ChangeListener)listener);
+                spinner.addFocusListener((FocusListener)listener);
+                spinner.requestFocus();
+
+            }
+        });
+
+        synchronized(listener) {
+            if (!bFocusGained) {
+                System.out.println("waiting focusGained...");
+                try { listener.wait(5000); } catch (InterruptedException e) {}
+            }
+        }
+
+        boolean hasFocus = Util.invokeOnEDT(new java.util.concurrent.Callable<Boolean>() {
+            @Override
+            public Boolean call() throws Exception {
+                return spinner.hasFocus();
+            }
+        });
+
+        if (!bFocusGained && !hasFocus) {
+            throw new RuntimeException("Couldn't request focus for spinner");
+        }
+        Robot robot = new Robot();
+        robot.setAutoDelay(50);
+
+        Util.hitKeys(robot, KeyEvent.VK_UP);
+        toolkit.realSync();
+        Thread.sleep(1000);
+
+        if (!bStateChanged) {
+            throw new RuntimeException("Up arrow key button doesn't work for a spinner in Synth L&F");
+        }
+
+        bStateChanged = false;
+
+        Util.hitKeys(robot, KeyEvent.VK_DOWN);
+        toolkit.realSync();
+        Thread.sleep(1000);
+
+        if (!bStateChanged) {
+            throw new RuntimeException("Down arrow key button doesn't work for a spinner in Synth L&F");
+        }
+    }
+}
diff --git a/jdk/test/javax/swing/JSplitPane/4514858/bug4514858.java b/jdk/test/javax/swing/JSplitPane/4514858/bug4514858.java
new file mode 100644
index 0000000..38deb96
--- /dev/null
+++ b/jdk/test/javax/swing/JSplitPane/4514858/bug4514858.java
@@ -0,0 +1,210 @@
+/*
+ * 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 4514858 4164779
+   @summary F6, F8 Ctrl-TAB and Ctrl-Shift-TAB in JSplitPane
+   @author Andrey Pikalev
+   @run main/manual bug4514858
+*/
+
+import javax.swing.*;
+import javax.swing.border.TitledBorder;
+import java.awt.*;
+import java.awt.event.*;
+
+
+public class bug4514858  implements ActionListener {
+
+    static String intructions = "Test the F6, F8, Ctrl-TAB and Ctrl-Shift-TAB keybinding functionality in JSplitPane\n" +
+            "with different LookAndFeels (switch LookAndFeel with the buttoms at the bottom of the\n" +
+            "frame \"Test\"):\n\n" +
+            "1. Move focus to the button \"Button 1\" in the frame \"Test\". Then press F6 several times.\n" +
+            "The focus should cycle between five buttons in order from 1 to 5.\n\n" +
+            "2. Move focus to the button \"Button 2\" in the frame \"Test\". Then press F8 three times.\n" +
+            "The splitters of the splitpanes should be highlited in order:\n" +
+            "\"JSplitPane 3\", \"JSplitPane 2\", \"JSplitPane 1\".\n\n" +
+            "3. Move focus to the button \"Button 2\" in the frame \"Test\". Press Ctrl-TAB.\n" +
+            "The focus should go to the \"Button 4\". Then press Ctrl-TAB again.\n" +
+            "The focus should go to the first enabled button at the bottom of frame.\n\n" +
+            "4. Move focus to the button \"Button 4\" in the frame \"Test\". Press Ctrl-Shift-TAB three times.\n" +
+            "The focus should go through the button \"Button 3\", then \"Button 1\", then to the last\n" +
+            "enabled button at the bottom of frame.";
+    static Test test = new Test();
+    JFrame fr;
+    public static void main(String[] argv) throws Exception {
+        UIManager.setLookAndFeel(UIManager.getCrossPlatformLookAndFeelClassName());
+        SwingUtilities.invokeAndWait(new Runnable() {
+            public void run() {
+                new bug4514858().createAndShowGUI();
+            }
+        });
+        test.waitTestResult();
+    }
+    public void createAndShowGUI() {
+        fr = new JFrame("Test");
+
+        //-------------------------------------------------------------
+        JButton left2 = new JButton("Button 1");
+
+        JButton left3 = new JButton("Button 2");
+        JButton right3 = new JButton("Button 3");
+
+        JSplitPane right2 = new JSplitPane(JSplitPane.VERTICAL_SPLIT, left3, right3);
+        right2.setBorder(new TitledBorder("JSplitPane 3"));
+
+        JSplitPane left1 = new JSplitPane(JSplitPane.HORIZONTAL_SPLIT, left2, right2);
+        left1.setBorder(new TitledBorder("JSplitPane 2"));
+
+        JButton left4 = new JButton("Button 4");
+        JButton right4 = new JButton("Button 5");
+
+        JSplitPane right1 = new JSplitPane(JSplitPane.HORIZONTAL_SPLIT, left4, right4);
+        right1.setBorder(new TitledBorder("JSplitPane 4"));
+
+        JSplitPane sp = new JSplitPane(JSplitPane.VERTICAL_SPLIT, left1, right1);
+        sp.setBorder(new TitledBorder("JSplitPane 1"));
+        fr.getContentPane().add(sp);
+
+        //-------------------------------------------------------------
+        JPanel p = new JPanel();
+
+        JButton metal = new JButton("Metal");
+        metal.setActionCommand("Metal");
+        metal.setEnabled(isSupportedLAF("javax.swing.plaf.metal.MetalLookAndFeel"));
+        metal.addActionListener(this);
+        p.add(metal);
+
+        JButton motif = new JButton("Motif");
+        motif.setActionCommand("Motif");
+        motif.setEnabled(isSupportedLAF("com.sun.java.swing.plaf.motif.MotifLookAndFeel"));
+        motif.addActionListener(this);
+        p.add(motif);
+
+        JButton windows = new JButton("Windows");
+        windows.setActionCommand("Windows");
+        windows.setEnabled(isSupportedLAF("com.sun.java.swing.plaf.windows.WindowsLookAndFeel"));
+        windows.addActionListener(this);
+        p.add(windows);
+
+        fr.getContentPane().add(p, BorderLayout.SOUTH);
+
+        fr.pack();
+        fr.setVisible(true);
+
+        JFrame instrFrame = test.createTestFrame("bug4514858 instructions", null, intructions, 250);
+        instrFrame.setBounds(fr.getWidth() + 50, fr.getHeight(), 600, 400);
+        instrFrame.setVisible(true);
+    }
+
+    private boolean isSupportedLAF(String str) {
+        try {
+            Class c = Class.forName(str);
+            LookAndFeel laf = (LookAndFeel)c.newInstance();
+            return laf.isSupportedLookAndFeel();
+        } catch (Exception e) {
+            return false;
+        }
+    }
+
+    public void actionPerformed(ActionEvent e) {
+        String s = e.getActionCommand();
+        if (s.equals("Metal")) {
+            s = "javax.swing.plaf.metal.MetalLookAndFeel";
+        } else if (s.equals("Motif")) {
+            s = "com.sun.java.swing.plaf.motif.MotifLookAndFeel";
+        } else {
+            s = "com.sun.java.swing.plaf.windows.WindowsLookAndFeel";
+        }
+        try {
+            UIManager.setLookAndFeel(s);
+            SwingUtilities.updateComponentTreeUI(fr);
+            fr.pack();
+        } catch(Exception ex) {
+            ex.printStackTrace();
+            throw new RuntimeException(ex);
+        }
+    }
+   static class Test {
+        private boolean pass;
+        JFrame createTestFrame(String name, Component topComponent, String instructions, int instrHeight) {
+            final String PASS = "Pass";
+            final String FAIL = "Fail";
+            JFrame frame = new JFrame(name);
+            frame.setLayout(new BorderLayout());
+
+            JPanel testButtonsPanel = new JPanel();
+            testButtonsPanel.setMaximumSize(new Dimension(Integer.MAX_VALUE, 20));
+
+            ActionListener btnAL = new ActionListener() {
+                public void actionPerformed(ActionEvent event) {
+                    switch (event.getActionCommand()) {
+                        case PASS:
+                            pass();
+                            break;
+                        default:
+                            throw new RuntimeException("Test failed.");
+                    }
+                }
+            };
+            JButton passBtn = new JButton(PASS);
+            passBtn.addActionListener(btnAL);
+            passBtn.setActionCommand(PASS);
+
+            JButton failBtn = new JButton(FAIL);
+            failBtn.addActionListener(btnAL);
+            failBtn.setActionCommand(FAIL);
+
+            testButtonsPanel.add(BorderLayout.WEST, passBtn);
+            testButtonsPanel.add(BorderLayout.EAST, failBtn);
+
+            JTextArea instrText = new JTextArea();
+            instrText.setLineWrap(true);
+            instrText.setEditable(false);
+            JScrollPane instrScrollPane = new JScrollPane(instrText);
+            instrScrollPane.setMaximumSize(new Dimension(Integer.MAX_VALUE, instrHeight));
+            instrText.append(instructions);
+
+            JPanel servicePanel = new JPanel();
+            servicePanel.setLayout(new BorderLayout());
+            if (topComponent == null) {
+                frame.add(BorderLayout.CENTER, instrScrollPane);
+            } else {
+                servicePanel.add(BorderLayout.CENTER, instrScrollPane);
+                frame.add(BorderLayout.CENTER, topComponent);
+            }
+            servicePanel.add(BorderLayout.SOUTH, testButtonsPanel);
+
+            frame.add(BorderLayout.SOUTH, servicePanel);
+            return frame;
+        }
+        synchronized void pass() {
+            pass = true;
+            notifyAll();
+        }
+        synchronized void waitTestResult() throws InterruptedException {
+            while (!pass) {
+                wait();
+            }
+        }
+    }
+}
diff --git a/jdk/test/javax/swing/PopupFactory/6276087/NonOpaquePopupMenuTest.java b/jdk/test/javax/swing/PopupFactory/6276087/NonOpaquePopupMenuTest.java
index c816734..467aee5 100644
--- a/jdk/test/javax/swing/PopupFactory/6276087/NonOpaquePopupMenuTest.java
+++ b/jdk/test/javax/swing/PopupFactory/6276087/NonOpaquePopupMenuTest.java
@@ -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
@@ -70,6 +70,7 @@
         Point p = getMenuClickPoint();
         robot.mouseMove(p.x, p.y);
         robot.mousePress(InputEvent.BUTTON1_MASK);
+        robot.mouseRelease(InputEvent.BUTTON1_MASK);
 
         toolkit.realSync();
 
diff --git a/jdk/test/javax/swing/plaf/synth/SynthButtonUI/6276188/bug6276188.java b/jdk/test/javax/swing/plaf/synth/SynthButtonUI/6276188/bug6276188.java
new file mode 100644
index 0000000..7d6d8ea
--- /dev/null
+++ b/jdk/test/javax/swing/plaf/synth/SynthButtonUI/6276188/bug6276188.java
@@ -0,0 +1,81 @@
+/*
+ * Copyright (c) 2013, Oracle and/or its affiliates. All rights reserved.
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * This code is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU General Public License version 2 only, as
+ * published by the Free Software Foundation.
+ *
+ * This code is distributed in the hope that it will be useful, but WITHOUT
+ * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
+ * version 2 for more details (a copy is included in the LICENSE file that
+ * accompanied this code).
+ *
+ * You should have received a copy of the GNU General Public License version
+ * 2 along with this work; if not, write to the Free Software Foundation,
+ * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
+ *
+ * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
+ * or visit www.oracle.com if you need additional information or have any
+ * questions.
+ */
+/**
+ * @test 1.4 08/08/05
+ * @bug 6276188
+ * @library ../../../../regtesthelpers
+ * @build Util
+ * @author Romain Guy
+ * @summary Tests PRESSED and MOUSE_OVER and FOCUSED state for buttons with Synth.
+ * @run main bug6276188
+ */
+import java.awt.*;
+import java.awt.image.*;
+import java.awt.event.*;
+
+import javax.swing.*;
+import javax.swing.plaf.synth.*;
+import sun.awt.SunToolkit;
+
+public class bug6276188 extends JFrame {
+
+    private static JButton button;
+    private static Point p;
+    private static final SunToolkit toolkit = (SunToolkit) Toolkit.getDefaultToolkit();
+
+    public static void main(String[] args) throws Throwable {
+        SynthLookAndFeel lookAndFeel = new SynthLookAndFeel();
+        lookAndFeel.load(bug6276188.class.getResourceAsStream("bug6276188.xml"), bug6276188.class);
+
+        UIManager.setLookAndFeel(lookAndFeel);
+        SwingUtilities.invokeAndWait(new Runnable() {
+            public void run() {
+                JFrame testFrame = new JFrame();
+                testFrame.setLayout(new BorderLayout());
+                testFrame.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
+                testFrame.add(BorderLayout.CENTER, button = new JButton());
+
+                testFrame.setSize(new Dimension(320, 200));
+                testFrame.setVisible(true);
+            }
+        });
+
+        p = Util.getCenterPoint(button);
+
+        Robot robot = new Robot();
+        robot.setAutoDelay(50);
+
+        robot.mouseMove(p.x , p.y);
+        robot.mousePress(InputEvent.BUTTON1_MASK);
+        toolkit.realSync();
+        robot.delay(1000);
+
+        Color color = robot.getPixelColor(p.x, p.y);
+        robot.mouseRelease(InputEvent.BUTTON1_MASK);
+        boolean red = color.getRed() > 0 && color.getGreen() == 0 && color.getBlue() == 0;
+        if (!red) {
+            System.err.println("Red: " + color.getRed() + "; Green: " + color.getGreen() + "; Blue: " + color.getBlue());
+            throw new RuntimeException("Synth ButtonUI does not handle PRESSED & MOUSE_OVER state");
+        }
+    }
+}
diff --git a/jdk/test/javax/swing/plaf/synth/SynthButtonUI/6276188/bug6276188.xml b/jdk/test/javax/swing/plaf/synth/SynthButtonUI/6276188/bug6276188.xml
new file mode 100644
index 0000000..c6bc6ce
--- /dev/null
+++ b/jdk/test/javax/swing/plaf/synth/SynthButtonUI/6276188/bug6276188.xml
@@ -0,0 +1,19 @@
+<synth>
+  <style id="backingStyle">
+    <font name="Dialog" size="12" />
+    
+    <state>
+      <color value="green" type="BACKGROUND" />
+      <color value="black" type="FOREGROUND" />
+    </state>
+  </style>
+  <bind style="backingStyle" type="REGION" key=".*" />
+
+  <style id="buttonStyle">
+    <state value="PRESSED and MOUSE_OVER">
+      <imagePainter method="buttonBackground" path="red.gif" center="true" />
+    </state>
+  </style>
+  <bind style="buttonStyle" type="REGION" key="Button" />
+</synth>
+  
diff --git a/jdk/test/javax/swing/plaf/synth/SynthButtonUI/6276188/red.gif b/jdk/test/javax/swing/plaf/synth/SynthButtonUI/6276188/red.gif
new file mode 100644
index 0000000..12e1f75
--- /dev/null
+++ b/jdk/test/javax/swing/plaf/synth/SynthButtonUI/6276188/red.gif
Binary files differ
diff --git a/jdk/test/javax/xml/jaxp/parsers/8024707/TestFunc.java b/jdk/test/javax/xml/jaxp/parsers/8024707/TestFunc.java
new file mode 100644
index 0000000..69f181d
--- /dev/null
+++ b/jdk/test/javax/xml/jaxp/parsers/8024707/TestFunc.java
@@ -0,0 +1,35 @@
+/*
+ * Copyright (c) 2013, Oracle and/or its affiliates. All rights reserved.
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * This code is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU General Public License version 2 only, as
+ * published by the Free Software Foundation.
+ *
+ * This code is distributed in the hope that it will be useful, but WITHOUT
+ * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
+ * version 2 for more details (a copy is included in the LICENSE file that
+ * accompanied this code).
+ *
+ * You should have received a copy of the GNU General Public License version
+ * 2 along with this work; if not, write to the Free Software Foundation,
+ * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
+ *
+ * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
+ * or visit www.oracle.com if you need additional information or have any
+ * questions.
+ */
+
+import org.w3c.dom.Node;
+import org.w3c.dom.NodeList;
+
+/**
+ * bug 8024707
+ */
+
+public class TestFunc {
+        public static Node test( NodeList list ) {
+            return list.item(0);
+        }
+}
diff --git a/jdk/test/javax/xml/jaxp/parsers/8024707/XSLT.java b/jdk/test/javax/xml/jaxp/parsers/8024707/XSLT.java
new file mode 100644
index 0000000..e6a03f5
--- /dev/null
+++ b/jdk/test/javax/xml/jaxp/parsers/8024707/XSLT.java
@@ -0,0 +1,51 @@
+/*
+ * Copyright (c) 2013, Oracle and/or its affiliates. All rights reserved.
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * This code is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU General Public License version 2 only, as
+ * published by the Free Software Foundation.
+ *
+ * This code is distributed in the hope that it will be useful, but WITHOUT
+ * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
+ * version 2 for more details (a copy is included in the LICENSE file that
+ * accompanied this code).
+ *
+ * You should have received a copy of the GNU General Public License version
+ * 2 along with this work; if not, write to the Free Software Foundation,
+ * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
+ *
+ * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
+ * or visit www.oracle.com if you need additional information or have any
+ * questions.
+ */
+
+/**
+ * @test
+ * @bug 8024707
+ * @summary Test for XSLT extension function with 1 element sized nodelist
+ * @compile TestFunc.java XSLT.java
+ * @run main/othervm XSLT
+ * @author aleksej.efimov@oracle.com
+ */
+
+import javax.xml.transform.*;
+import javax.xml.transform.stream.*;
+import java.io.ByteArrayOutputStream;
+
+public class XSLT {
+    static final String XMLTOTRANSFORM = "/in.xml";
+    static final String XSLTRANSFORMER = "/test.xsl";
+    static final String EXPECTEDRESULT = "<?xml version=\"1.0\" encoding=\"UTF-8\"?>inp1_1";
+
+    public static void main(String[] args) throws Exception {
+        ByteArrayOutputStream resStream = new ByteArrayOutputStream();
+        TransformerFactory trf = TransformerFactory.newInstance();
+        Transformer tr = trf.newTransformer( new StreamSource(System.getProperty("test.src", ".")+XSLTRANSFORMER));
+        tr.transform( new StreamSource(System.getProperty("test.src", ".")+XMLTOTRANSFORM), new StreamResult(resStream));
+        System.out.println("Transformation completed. Result:"+resStream.toString());
+        if (!resStream.toString().equals(EXPECTEDRESULT))
+            throw new RuntimeException("Incorrect transformation result");
+    }
+}
diff --git a/jdk/test/javax/xml/jaxp/parsers/8024707/in.xml b/jdk/test/javax/xml/jaxp/parsers/8024707/in.xml
new file mode 100644
index 0000000..2cd3116
--- /dev/null
+++ b/jdk/test/javax/xml/jaxp/parsers/8024707/in.xml
@@ -0,0 +1,4 @@
+<?xml version="1.0" encoding="UTF-8"?>

+<root>

+<input1><seq-elem1>inp1_1</seq-elem1></input1>
+</root>

diff --git a/jdk/test/javax/xml/jaxp/parsers/8024707/test.xsl b/jdk/test/javax/xml/jaxp/parsers/8024707/test.xsl
new file mode 100644
index 0000000..59c5063
--- /dev/null
+++ b/jdk/test/javax/xml/jaxp/parsers/8024707/test.xsl
@@ -0,0 +1,10 @@
+<?xml version="1.0" encoding="UTF-8"?>

+<xsl:transform exclude-result-prefixes="cscdt_ufunc" version="1.0"

+    xmlns:xsl="http://www.w3.org/1999/XSL/Transform"

+    xmlns:cscdt_ufunc="http://xml.apache.org/xalan/java">

+    <xsl:template match="/">

+        <xsl:value-of

+            select="cscdt_ufunc:TestFunc.test(/root/input1/seq-elem1)"

+        />

+    </xsl:template>

+</xsl:transform>

diff --git a/jdk/test/javax/xml/ws/clientjar/TestService.java b/jdk/test/javax/xml/ws/clientjar/TestService.java
new file mode 100644
index 0000000..94646e7
--- /dev/null
+++ b/jdk/test/javax/xml/ws/clientjar/TestService.java
@@ -0,0 +1,39 @@
+/*
+ * Copyright (c) 2013, Oracle and/or its affiliates. All rights reserved.
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * This code is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU General Public License version 2 only, as
+ * published by the Free Software Foundation.
+ *
+ * This code is distributed in the hope that it will be useful, but WITHOUT
+ * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
+ * version 2 for more details (a copy is included in the LICENSE file that
+ * accompanied this code).
+ *
+ * You should have received a copy of the GNU General Public License version
+ * 2 along with this work; if not, write to the Free Software Foundation,
+ * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
+ *
+ * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
+ * or visit www.oracle.com if you need additional information or have any
+ * questions.
+ */
+
+import javax.jws.WebService;
+
+@WebService(serviceName ="TestService", targetNamespace = "http://test/jaxws/sample/")
+public class TestService {
+    public void foo() {
+        try {
+            bar();
+        } catch (Exception e) {
+            throw new AssertionError(e);
+        }
+    }
+
+    private void bar() {
+        // nothing done
+    }
+}
diff --git a/jdk/test/javax/xml/ws/clientjar/TestWsImport.java b/jdk/test/javax/xml/ws/clientjar/TestWsImport.java
new file mode 100644
index 0000000..add1c2a
--- /dev/null
+++ b/jdk/test/javax/xml/ws/clientjar/TestWsImport.java
@@ -0,0 +1,151 @@
+/*
+ * Copyright (c) 2013, Oracle and/or its affiliates. All rights reserved.
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * This code is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU General Public License version 2 only, as
+ * published by the Free Software Foundation.
+ *
+ * This code is distributed in the hope that it will be useful, but WITHOUT
+ * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
+ * version 2 for more details (a copy is included in the LICENSE file that
+ * accompanied this code).
+ *
+ * You should have received a copy of the GNU General Public License version
+ * 2 along with this work; if not, write to the Free Software Foundation,
+ * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
+ *
+ * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
+ * or visit www.oracle.com if you need additional information or have any
+ * questions.
+ */
+
+/*
+ * @test
+ * @bug 8016271
+ * @summary wsimport -clientjar does not create portable jar on windows due to hardcoded '\'
+ * @run main/othervm TestWsImport
+ */
+
+import javax.xml.namespace.QName;
+import javax.xml.ws.Endpoint;
+import javax.xml.ws.Service;
+import java.io.InputStreamReader;
+import java.io.IOException;
+import java.io.BufferedReader;
+import java.io.File;
+import java.net.InetSocketAddress;
+import java.net.URL;
+import java.nio.file.Files;
+import java.nio.file.FileVisitResult;
+import java.nio.file.Path;
+import java.nio.file.Paths;
+import java.nio.file.SimpleFileVisitor;
+import java.nio.file.attribute.BasicFileAttributes;
+import static java.nio.file.FileVisitResult.*;
+import java.util.Enumeration;
+import java.util.jar.JarFile;
+
+import com.sun.net.httpserver.HttpContext;
+import com.sun.net.httpserver.HttpServer;
+
+public class TestWsImport {
+
+    public static void main(String[] args) throws IOException {
+
+        String javaHome = System.getProperty("java.home");
+        if (javaHome.endsWith("jre")) {
+            javaHome = new File(javaHome).getParent();
+        }
+        String wsimport = javaHome + File.separator + "bin" + File.separator + "wsimport";
+        if (System.getProperty("os.name").startsWith("Windows")) {
+            wsimport = wsimport.concat(".exe");
+        }
+
+        Endpoint endpoint = Endpoint.create(new TestService());
+        HttpServer httpServer = null;
+        try {
+            // Manually create HttpServer here using ephemeral address for port
+            // so as to not end up with attempt to bind to an in-use port
+            httpServer = HttpServer.create(new InetSocketAddress(0), 0);
+            HttpContext httpContext = httpServer.createContext("/hello");
+            int port = httpServer.getAddress().getPort();
+            System.out.println("port = " + port);
+            httpServer.start();
+            endpoint.publish(httpContext);
+            String address = "http://localhost:" + port + "/hello";
+
+            Service service = Service.create(new URL(address + "?wsdl"),
+                new QName("http://test/jaxws/sample/",
+                "TestService"));
+
+            String[] wsargs = {
+                wsimport,
+                "-p",
+                "wstest",
+                "-J-Djavax.xml.accessExternalSchema=all",
+                address + "?wsdl",
+                "-clientjar",
+                "wsjar.jar"
+            };
+            ProcessBuilder pb = new ProcessBuilder(wsargs);
+            pb.redirectErrorStream(true);
+            Process p = pb.start();
+            BufferedReader r = new BufferedReader(new InputStreamReader(p.getInputStream()));
+            String s = r.readLine();
+            while (s != null) {
+                System.out.println(s.trim());
+                s = r.readLine();
+            }
+            p.waitFor();
+            p.destroy();
+
+            try (JarFile jarFile = new JarFile("wsjar.jar")) {
+                for (Enumeration em = jarFile.entries(); em.hasMoreElements();) {
+                    String fileName = em.nextElement().toString();
+                    if (fileName.contains("\\")) {
+                        throw new RuntimeException("\"\\\" character detected in jar file: " + fileName);
+                    }
+                }
+            }
+        } catch (Exception e) {
+            e.printStackTrace();
+            throw new RuntimeException(e.getMessage());
+        } finally {
+            endpoint.stop();
+            if (httpServer != null) {
+                httpServer.stop(0);
+            }
+            Path p = Paths.get("wsjar.jar");
+            Files.deleteIfExists(p);
+            p = Paths.get("wstest");
+            if (Files.exists(p)) {
+                try {
+                    Files.walkFileTree(p, new SimpleFileVisitor<Path>() {
+                        @Override
+                        public FileVisitResult visitFile(Path file,
+                            BasicFileAttributes attrs) throws IOException {
+
+                            Files.delete(file);
+                            return CONTINUE;
+                        }
+                        @Override
+                        public FileVisitResult postVisitDirectory(Path dir,
+                            IOException exc) throws IOException {
+
+                            if (exc == null) {
+                                Files.delete(dir);
+                                return CONTINUE;
+                            } else {
+                                throw exc;
+                            }
+                        }
+                    });
+                } catch (IOException ioe) {
+                    ioe.printStackTrace();
+                }
+            }
+        }
+    }
+}
diff --git a/jdk/test/jdk/lambda/vm/DefaultMethodsTest.java b/jdk/test/jdk/lambda/vm/DefaultMethodsTest.java
index a02ce75..aabd8f9 100644
--- a/jdk/test/jdk/lambda/vm/DefaultMethodsTest.java
+++ b/jdk/test/jdk/lambda/vm/DefaultMethodsTest.java
@@ -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
@@ -387,37 +387,6 @@
     }
 
     /**
-     * interface I<T> { default int m(T t) { return 99; } }
-     * Class C implements I<String> { public int m() { return 88; } }
-     *
-     * TEST: C c = new C(); c.m() == 88;
-     * TEST: I i = new C(); i.m() == 88;
-     */
-    public void testSelfFill() {
-        // This test ensures that a concrete method overrides a default method
-        // that matches at the language-level, but has a different method
-        // signature due to erasure.
-
-        // debugTest();
-
-        DefaultMethod dm = new DefaultMethod(
-            "int", "m", "return 99;", new MethodParameter("T", "t"));
-        ConcreteMethod cm = new ConcreteMethod(
-            "int", "m", "return 88;", AccessFlag.PUBLIC,
-            new MethodParameter("String", "s"));
-
-        Interface I = new Interface("I", new TypeParameter("T"), dm);
-        Class C = new Class("C", I.with("String"), cm);
-
-        AbstractMethod pm = new AbstractMethod(
-            "int", "m", new MethodParameter("T", "t"));
-
-        assertInvokeVirtualEquals(new Integer(88), C, cm, "-1", "\"string\"");
-        assertInvokeInterfaceEquals(
-            new Integer(88), C, I.with("String"), pm, "\"string\"");
-    }
-
-    /**
      * interface I { default int m() { return 99; } }
      * class C implements I {}
      *
@@ -470,58 +439,6 @@
         compiler.cleanup();
     }
 
-    /**
-     * interface I<T,V,W> { default int m(T t, V v, W w) { return 99; } }
-     * interface J<T,V> extends I<String,T,V> { int m(T t, V v, String w); } }
-     * interface K<T> extends J<String,T> { int m(T t, String v, String w); } }
-     * class C implements K<String> {
-     *     public int m(String t, String v, String w) { return 88; }
-     * }
-     *
-     * TEST: I<String,String,String> i = new C(); i.m("A","B","C") == 88;
-     * TEST: J<String,String> j = new C(); j.m("A","B","C") == 88;
-     * TEST: K<String> k = new C(); k.m("A","B","C") == 88;
-     */
-    public void testBridges() {
-        DefaultMethod dm = new DefaultMethod("int", stdMethodName, "return 99;",
-            new MethodParameter("T", "t"), new MethodParameter("V", "v"),
-            new MethodParameter("W", "w"));
-
-        AbstractMethod pm0 = new AbstractMethod("int", stdMethodName,
-            new MethodParameter("T", "t"), new MethodParameter("V", "v"),
-            new MethodParameter("W", "w"));
-
-        AbstractMethod pm1 = new AbstractMethod("int", stdMethodName,
-            new MethodParameter("T", "t"), new MethodParameter("V", "v"),
-            new MethodParameter("String", "w"));
-
-        AbstractMethod pm2 = new AbstractMethod("int", stdMethodName,
-            new MethodParameter("T", "t"), new MethodParameter("String", "v"),
-            new MethodParameter("String", "w"));
-
-        ConcreteMethod cm = new ConcreteMethod("int",stdMethodName,"return 88;",
-            AccessFlag.PUBLIC,
-            new MethodParameter("String", "t"),
-            new MethodParameter("String", "v"),
-            new MethodParameter("String", "w"));
-
-        Interface I = new Interface("I", new TypeParameter("T"),
-            new TypeParameter("V"), new TypeParameter("W"), dm);
-        Interface J = new Interface("J",
-            new TypeParameter("T"), new TypeParameter("V"),
-            I.with("String", "T", "V"), pm1);
-        Interface K = new Interface("K", new TypeParameter("T"),
-            J.with("String", "T"), pm2);
-        Class C = new Class("C", K.with("String"), cm);
-
-        String[] args = new String[] { "\"A\"", "\"B\"", "\"C\"" };
-        assertInvokeInterfaceEquals(new Integer(88), C,
-            I.with("String", "String", "String"), pm0, args);
-        assertInvokeInterfaceEquals(new Integer(88), C,
-            J.with("String", "String"), pm1, args);
-        assertInvokeInterfaceEquals(new Integer(88), C,
-            K.with("String"), pm2, args);
-    }
 
     /**
      * interface J { default int m() { return 88; } }
@@ -665,33 +582,6 @@
 
     /**
      * interface I { default Integer m() { return new Integer(88); } }
-     * class C { Number m() { return new Integer(99); } }
-     * class D extends C implements I {}
-     * class S { Object foo() { return (new D()).m(); } // link sig: ()LInteger;
-     * TEST: S s = new S(); s.foo() == new Integer(99)
-     */
-    public void testCovarBridge() {
-        Interface I = new Interface("I", new DefaultMethod(
-            "Integer", "m", "return new Integer(88);"));
-        Class C = new Class("C", new ConcreteMethod(
-            "Number", "m", "return new Integer(99);", AccessFlag.PUBLIC));
-        Class D = new Class("D", I, C);
-
-        ConcreteMethod DstubMethod = new ConcreteMethod(
-            "Integer", "m", "return null;", AccessFlag.PUBLIC);
-        Class Dstub = new Class("D", DstubMethod);
-
-        ConcreteMethod toCall = new ConcreteMethod(
-            "Object", "foo", "return (new D()).m();", AccessFlag.PUBLIC);
-        Class S = new Class("S", D, toCall);
-        S.addCompilationDependency(Dstub);
-        S.addCompilationDependency(DstubMethod);
-
-        assertInvokeVirtualEquals(new Integer(99), S, toCall, "null");
-    }
-
-    /**
-     * interface I { default Integer m() { return new Integer(88); } }
      * class C { int m() { return 99; } }
      * class D extends C implements I {}
      * class S { Object foo() { return (new D()).m(); } // link sig: ()LInteger;
@@ -737,69 +627,6 @@
         assertInvokeVirtualEquals(99, C);
     }
 
-    /**
-     * interface I<T,V,W> { int m(T t, V v, W w); }
-     * interface J<T,V> implements I<T,V,String> { int m(T t, V v, String w); }
-     * interface K<T> implements J<T,String> {
-     *     int m(T t, String v, String w); { return 99; } }
-     * class C implements K<String> {
-     *     public int m(Object t, Object v, String w) { return 77; }
-     * }
-     * TEST C = new C(); ((I)c).m(Object,Object,Object) == 99
-     * TEST C = new C(); ((J)c).m(Object,Object,String) == 77
-     * TEST C = new C(); ((K)c).m(Object,String,String) == 99
-     *
-     * Test that a erased-signature-matching method does not implement
-     * non-language-level matching methods
-     */
-    public void testNonConcreteFill() {
-        AbstractMethod ipm = new AbstractMethod("int", "m",
-            new MethodParameter("T", "t"),
-            new MethodParameter("V", "s"),
-            new MethodParameter("W", "w"));
-        Interface I = new Interface("I",
-            new TypeParameter("T"),
-            new TypeParameter("V"),
-            new TypeParameter("W"), ipm);
-
-        AbstractMethod jpm = new AbstractMethod("int", "m",
-            new MethodParameter("T", "t"),
-            new MethodParameter("V", "s"),
-            new MethodParameter("String", "w"));
-        Interface J = new Interface("J",
-            new TypeParameter("T"),
-            new TypeParameter("V"),
-            I.with("T", "V", "String"), jpm);
-
-        AbstractMethod kpm = new AbstractMethod("int", "m",
-            new MethodParameter("T", "t"),
-            new MethodParameter("String", "s"),
-            new MethodParameter("String", "w"));
-        Interface K = new Interface("K",
-            new TypeParameter("T"),
-            J.with("T", "String"),
-            new DefaultMethod("int", "m", "return 99;",
-                new MethodParameter("T", "t"),
-                new MethodParameter("String", "v"),
-                new MethodParameter("String", "w")));
-
-        Class C = new Class("C",
-            K.with("String"),
-            new ConcreteMethod("int", "m", "return 77;",
-                AccessFlag.PUBLIC,
-                new MethodParameter("Object", "t"),
-                new MethodParameter("Object", "v"),
-                new MethodParameter("String", "w")));
-
-        String a = "\"\"";
-        assertInvokeInterfaceEquals(99, C,
-            K.with("String"), kpm, a, a, a);
-        assertInvokeInterfaceEquals(77, C,
-            J.with("String", "String"), jpm, a, a, a);
-        assertInvokeInterfaceEquals(99, C,
-            I.with("String", "String", "String"), ipm, a, a, a);
-    }
-
     public void testStrictfpDefault() {
         try {
             java.lang.Class.forName("vm.StrictfpDefault");
diff --git a/jdk/test/sun/java2d/AcceleratedXORModeTest.java b/jdk/test/sun/java2d/AcceleratedXORModeTest.java
new file mode 100644
index 0000000..e255cc3
--- /dev/null
+++ b/jdk/test/sun/java2d/AcceleratedXORModeTest.java
@@ -0,0 +1,143 @@
+/*
+ * 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     8024343
+* @summary Test verifies that accelerated pipelines
+*          correctly draws primitives in XOR mode.
+* @run main/othervm -Dsun.java2d.xrender=True AcceleratedXORModeTest
+*/
+
+import java.awt.Color;
+import java.awt.Graphics2D;
+import java.awt.GraphicsConfiguration;
+import java.awt.GraphicsEnvironment;
+import java.awt.image.BufferedImage;
+import java.awt.image.VolatileImage;
+import java.io.File;
+import java.io.IOException;
+import javax.imageio.ImageIO;
+
+public class AcceleratedXORModeTest {
+    public static void main(String argv[]) {
+        String fileName = argv.length > 0 ? argv[0] : null;
+        new AcceleratedXORModeTest(fileName).test();
+    }
+
+    static final Color backColor = Color.red;
+    static final Color color1 = Color.green;
+    static final Color color2 = Color.yellow;
+    static final Color xorColor1 = Color.blue;
+    static final Color xorColor2 = Color.white;
+
+    static final int width = 700, height = 300;
+
+    VolatileImage vImg = null;
+    String fileName;
+
+    public AcceleratedXORModeTest(String fileName) {
+        this.fileName = fileName;
+    }
+
+    void draw(Graphics2D g) {
+        g.setColor(backColor);
+        g.fillRect(0, 0, width, height);
+        g.setXORMode(xorColor1);
+        drawPattern(g, 100);
+        g.setXORMode(xorColor2);
+        drawPattern(g, 400);
+        g.dispose();
+    }
+
+    void test(BufferedImage bi) {
+        comparePattern(bi, 150, xorColor1.getRGB());
+        comparePattern(bi, 450, xorColor2.getRGB());
+    }
+
+    void comparePattern(BufferedImage bi, int startX, int xorColor) {
+        int[] expectedColors = {
+            backColor.getRGB() ^ color1.getRGB() ^ xorColor,
+            backColor.getRGB() ^ color1.getRGB() ^ xorColor ^
+                color2.getRGB() ^ xorColor,
+            backColor.getRGB() ^ color2.getRGB() ^ xorColor
+        };
+        for (int i = 0; i < 3; i++) {
+            int x = startX + 100 * i;
+            int rgb = bi.getRGB(x, 150);
+            if (rgb != expectedColors[i]) {
+                String msg = "Colors mismatch: x = " + x +
+                        ", got " + new Color(rgb) + ", expected " +
+                        new Color(expectedColors[i]);
+                System.err.println(msg);
+                write(bi);
+                throw new RuntimeException("FAILED: " + msg);
+            }
+        }
+    }
+
+    void drawPattern(Graphics2D g, int x) {
+        g.setColor(color1);
+        g.fillRect(x, 0, 200, 300);
+        g.setColor(color2);
+        g.fillRect(x+100, 0, 200, 300);
+    }
+
+    GraphicsConfiguration getDefaultGC() {
+        return GraphicsEnvironment.getLocalGraphicsEnvironment().
+                getDefaultScreenDevice().getDefaultConfiguration();
+    }
+
+    void createVImg() {
+        if (vImg != null) {
+            vImg.flush();
+            vImg = null;
+        }
+        vImg = getDefaultGC().createCompatibleVolatileImage(width, height);
+    }
+
+    void write(BufferedImage bi) {
+        if (fileName != null) {
+            try {
+                ImageIO.write(bi, "png", new File(fileName));
+            } catch (IOException e) {
+                System.err.println("Can't write image file " + fileName);
+            }
+        }
+    }
+
+    void test() {
+        createVImg();
+        do {
+            int valCode = vImg.validate(getDefaultGC());
+            if (valCode == VolatileImage.IMAGE_INCOMPATIBLE) {
+                createVImg();
+            }
+            Graphics2D g = vImg.createGraphics();
+            draw(g);
+            BufferedImage bi = vImg.getSnapshot();
+            test(bi);
+            write(bi);
+        } while (vImg.contentsLost());
+    }
+}
diff --git a/jdk/test/sun/management/jdp/JdpTest.sh b/jdk/test/sun/management/jdp/JdpTest.sh
index 3a0a74c..12698e4 100644
--- a/jdk/test/sun/management/jdp/JdpTest.sh
+++ b/jdk/test/sun/management/jdp/JdpTest.sh
@@ -84,15 +84,29 @@
   ${TESTJAVA}/bin/java -server $* -cp ${_testclasses} ${testappname}  >> ${_logname} 2>&1 &
  _last_pid=$!
 
-  npid=`_get_pid`
-  if [ "${npid}" = "" ]
-  then
-     echo "ERROR: Test app not started. Please check machine resources before filing a bug."
-     if [ "${_jtreg}" = "yes" ]
-     then
-       exit 255
-     fi
-  fi
+# wait until VM is actually starts. 
+# please note, if vm doesn't start for some reason
+# jtreg kills the test by timeout. Don't file a bug.
+  cnt=1 
+  while true
+  do
+    npid=`_get_pid`
+    if [ "${npid}" != "" ]
+    then
+      break
+    fi
+    if [ "${cnt}" = "10" ]
+    then
+      echo "ERROR: Test app not started. Please check machine resources before filing a bug."
+      if [ "${_jtreg}" = "yes" ]
+      then
+          exit 255
+      fi
+      break
+    fi
+    cnt=`expr $cnt + 1`
+    sleep 1
+  done
 }
 
 _get_pid(){
diff --git a/jdk/test/sun/security/jgss/spnego/MechTokenMissing.java b/jdk/test/sun/security/jgss/spnego/MechTokenMissing.java
new file mode 100644
index 0000000..98ded50
--- /dev/null
+++ b/jdk/test/sun/security/jgss/spnego/MechTokenMissing.java
@@ -0,0 +1,53 @@
+/*
+ * 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 8024861
+ * @summary Incomplete token triggers GSS-API NullPointerException
+ */
+
+import org.ietf.jgss.GSSContext;
+import org.ietf.jgss.GSSCredential;
+import org.ietf.jgss.GSSException;
+import org.ietf.jgss.GSSManager;
+
+public class MechTokenMissing {
+    public static void main(String[] args) throws Exception {
+        GSSCredential cred = null;
+        GSSContext ctx = GSSManager.getInstance().createContext(cred);
+
+        String var =
+            /*0000*/ "60 1C 06 06 2B 06 01 05 05 02 A0 12 30 10 A0 0E " +
+            /*0010*/ "30 0C 06 0A 2B 06 01 04 01 82 37 02 02 0A ";
+        byte[] token = new byte[var.length()/3];
+        for (int i=0; i<token.length; i++) {
+            token[i] = Integer.valueOf(var.substring(3*i,3*i+2), 16).byteValue();
+        }
+        try {
+            ctx.acceptSecContext(token, 0, token.length);
+        } catch (GSSException gsse) {
+            System.out.println("Expected exception: " + gsse);
+        }
+    }
+}
diff --git a/jdk/test/sun/security/krb5/auto/SSL.java b/jdk/test/sun/security/krb5/auto/SSL.java
index 8d64460..aab2622 100644
--- a/jdk/test/sun/security/krb5/auto/SSL.java
+++ b/jdk/test/sun/security/krb5/auto/SSL.java
@@ -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
@@ -23,11 +23,12 @@
 
 /*
  * @test
- * @bug 6894643 6913636 8005523
+ * @bug 6894643 6913636 8005523 8025123
  * @summary Test JSSE Kerberos ciphersuite
 
  * @run main/othervm SSL TLS_KRB5_WITH_RC4_128_SHA
  * @run main/othervm SSL TLS_KRB5_WITH_RC4_128_SHA unbound
+ * @run main/othervm SSL TLS_KRB5_WITH_RC4_128_SHA unbound sni
  * @run main/othervm SSL TLS_KRB5_WITH_3DES_EDE_CBC_SHA
  * @run main/othervm SSL TLS_KRB5_WITH_3DES_EDE_CBC_MD5
  * @run main/othervm SSL TLS_KRB5_WITH_DES_CBC_SHA
@@ -44,6 +45,9 @@
 import javax.net.ssl.*;
 import java.security.Principal;
 import java.util.Date;
+import java.util.List;
+import java.util.ArrayList;
+import java.util.Locale;
 import javax.security.auth.kerberos.ServicePermission;
 import sun.security.jgss.GSSUtil;
 import sun.security.krb5.PrincipalName;
@@ -56,6 +60,8 @@
     private static int loopCount = 0;
     private static volatile String server;
     private static volatile int port;
+    private static String sniHostname = null;
+    private static String sniMatcherPattern = null;
 
     private static String permChecks = "";
 
@@ -84,11 +90,11 @@
         System.setSecurityManager(new SSL());
 
         KDC kdc = KDC.create(OneKDC.REALM);
-        // Run this after KDC, so our own DNS service can be started
-        try {
-            server = InetAddress.getLocalHost().getHostName().toLowerCase();
-        } catch (java.net.UnknownHostException e) {
-            server = "localhost";
+        server = "host." + OneKDC.REALM.toLowerCase(Locale.US);
+
+        if (args.length > 2) {
+            sniHostname = "test." + server;
+            sniMatcherPattern = ".*";
         }
 
         kdc.addPrincipal(OneKDC.USER, OneKDC.PASS);
@@ -98,15 +104,21 @@
 
         // Add 3 versions of keys into keytab
         KeyTab ktab = KeyTab.create(OneKDC.KTAB);
+        String serviceName = null;
+        if (sniHostname != null) {
+            serviceName = "host/" + sniHostname;
+        } else {
+            serviceName = "host/" + server;
+        }
         PrincipalName service = new PrincipalName(
-                "host/" + server, PrincipalName.KRB_NT_SRV_HST);
+            serviceName, PrincipalName.KRB_NT_SRV_HST);
         ktab.addEntry(service, "pass1".toCharArray(), 1, true);
         ktab.addEntry(service, "pass2".toCharArray(), 2, true);
         ktab.addEntry(service, "pass3".toCharArray(), 3, true);
         ktab.save();
 
         // and use the middle one as the real key
-        kdc.addPrincipal("host/" + server, "pass2".toCharArray());
+        kdc.addPrincipal(serviceName, "pass2".toCharArray());
 
 
         // JAAS config entry name ssl
@@ -118,7 +130,7 @@
                 "    com.sun.security.auth.module.Krb5LoginModule required\n" +
                 (unbound ?
                     "    principal=*\n" :
-                    "    principal=\"host/" + server + "\"\n") +
+                    "    principal=\"" + serviceName + "\"\n") +
                 "    useKeyTab=true\n" +
                 "    keyTab=" + OneKDC.KTAB + "\n" +
                 "    isInitiator=false\n" +
@@ -153,7 +165,7 @@
         }
 
         c = Context.fromUserPass(OneKDC.USER, OneKDC.PASS, false);
-        c.startAsClient("host/" + server, GSSUtil.GSS_KRB5_MECH_OID);
+        c.startAsClient(serviceName, GSSUtil.GSS_KRB5_MECH_OID);
         c.doAs(new JsseClientAction(), null);
 
         // Add another version of key, make sure it can be loaded
@@ -161,10 +173,10 @@
         ktab = KeyTab.getInstance(OneKDC.KTAB);
         ktab.addEntry(service, "pass4".toCharArray(), 4, true);
         ktab.save();
-        kdc.addPrincipal("host/" + server, "pass4".toCharArray());
+        kdc.addPrincipal(serviceName, "pass4".toCharArray());
 
         c = Context.fromUserPass(OneKDC.USER, OneKDC.PASS, false);
-        c.startAsClient("host/" + server, GSSUtil.GSS_KRB5_MECH_OID);
+        c.startAsClient(serviceName, GSSUtil.GSS_KRB5_MECH_OID);
         c.doAs(new JsseClientAction(), null);
 
         // Permission checking check. Please note this is highly
@@ -199,6 +211,14 @@
             sslSocket.setEnabledCipherSuites(enabledSuites);
             // Should check for exception if enabledSuites is not supported
 
+            if (sniHostname != null) {
+                List<SNIServerName> serverNames = new ArrayList<>();
+                serverNames.add(new SNIHostName(sniHostname));
+                SSLParameters params = sslSocket.getSSLParameters();
+                params.setServerNames(serverNames);
+                sslSocket.setSSLParameters(params);
+            }
+
             BufferedReader in = new BufferedReader(new InputStreamReader(
                 sslSocket.getInputStream()));
             BufferedWriter out = new BufferedWriter(new OutputStreamWriter(
@@ -242,6 +262,14 @@
             sslServerSocket.setEnabledCipherSuites(enabledSuites);
             // Should check for exception if enabledSuites is not supported
 
+            if (sniMatcherPattern != null) {
+                List<SNIMatcher> matchers = new ArrayList<>();
+                matchers.add(SNIHostName.createSNIMatcher(sniMatcherPattern));
+                SSLParameters params = sslServerSocket.getSSLParameters();
+                params.setSNIMatchers(matchers);
+                sslServerSocket.setSSLParameters(params);
+            }
+
             while (loopCount++ < LOOP_LIMIT) {
                 System.out.println("Waiting for incoming connection...");
 
diff --git a/jdk/test/sun/security/pkcs11/KeyStore/SecretKeysBasic.sh b/jdk/test/sun/security/pkcs11/KeyStore/SecretKeysBasic.sh
index 3033455..ddfc9da 100644
--- a/jdk/test/sun/security/pkcs11/KeyStore/SecretKeysBasic.sh
+++ b/jdk/test/sun/security/pkcs11/KeyStore/SecretKeysBasic.sh
@@ -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
@@ -143,7 +143,8 @@
 cd ${TESTSRC}
 ${TESTJAVA}${FS}bin${FS}java ${TESTVMOPTS} \
 	-DDIR=${TESTSRC}${FS}BasicData${FS} \
-        -classpath ${TESTCLASSES}${PS}${TESTSRC}${FS}loader.jar \
+        -classpath \
+        ${TESTCLASSES}${PS}${TESTCLASSES}${FS}..${PS}${TESTSRC}${FS}loader.jar \
         -DCUSTOM_DB_DIR=${TESTCLASSES} \
         -DCUSTOM_P11_CONFIG=${TESTSRC}${FS}BasicData${FS}p11-${token}.txt \
 	-DNO_DEFAULT=true \
diff --git a/jdk/test/sun/security/provider/SecureRandom/StrongSecureRandom.java b/jdk/test/sun/security/provider/SecureRandom/StrongSecureRandom.java
index 5050d1f..2a45522 100644
--- a/jdk/test/sun/security/provider/SecureRandom/StrongSecureRandom.java
+++ b/jdk/test/sun/security/provider/SecureRandom/StrongSecureRandom.java
@@ -120,7 +120,14 @@
 
     private static void testStrongInstance(boolean expected) throws Exception {
 
-        boolean result = (SecureRandom.getStrongSecureRandom() != null);
+        boolean result;
+
+        try {
+            SecureRandom.getInstanceStrong();
+            result = true;
+        } catch (NoSuchAlgorithmException e) {
+            result = false;
+        }
 
         if (expected != result) {
             throw new Exception("Received: " + result);
diff --git a/jdk/test/sun/security/ssl/com/sun/net/ssl/internal/ssl/DHKeyExchange/DHEKeySizing.java b/jdk/test/sun/security/ssl/com/sun/net/ssl/internal/ssl/DHKeyExchange/DHEKeySizing.java
new file mode 100644
index 0000000..3c61f76
--- /dev/null
+++ b/jdk/test/sun/security/ssl/com/sun/net/ssl/internal/ssl/DHKeyExchange/DHEKeySizing.java
@@ -0,0 +1,477 @@
+/*
+ * 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.
+ */
+
+//
+// SunJSSE does not support dynamic system properties, no way to re-use
+// system properties in samevm/agentvm mode.
+//
+
+/*
+ * @test
+ * @bug 6956398
+ * @summary make ephemeral DH key match the length of the certificate key
+ * @run main/othervm
+ *      DHEKeySizing SSL_DHE_RSA_EXPORT_WITH_DES40_CBC_SHA true 1318 75
+ * @run main/othervm -Djdk.tls.ephemeralDHKeySize=matched
+ *      DHEKeySizing SSL_DHE_RSA_EXPORT_WITH_DES40_CBC_SHA true 1318 75
+ * @run main/othervm -Djdk.tls.ephemeralDHKeySize=legacy
+ *      DHEKeySizing SSL_DHE_RSA_EXPORT_WITH_DES40_CBC_SHA true 1318 75
+ * @run main/othervm -Djdk.tls.ephemeralDHKeySize=1024
+ *      DHEKeySizing SSL_DHE_RSA_EXPORT_WITH_DES40_CBC_SHA true 1318 75
+ *
+ * @run main/othervm
+ *      DHEKeySizing SSL_DH_anon_EXPORT_WITH_DES40_CBC_SHA true 292 75
+ *
+ * @run main/othervm
+ *      DHEKeySizing TLS_DHE_RSA_WITH_AES_128_CBC_SHA  false 1510 139
+ * @run main/othervm -Djdk.tls.ephemeralDHKeySize=legacy
+ *      DHEKeySizing TLS_DHE_RSA_WITH_AES_128_CBC_SHA  false 1414 107
+ * @run main/othervm -Djdk.tls.ephemeralDHKeySize=matched
+ *      DHEKeySizing TLS_DHE_RSA_WITH_AES_128_CBC_SHA  false 1894 267
+ * @run main/othervm -Djdk.tls.ephemeralDHKeySize=1024
+ *      DHEKeySizing TLS_DHE_RSA_WITH_AES_128_CBC_SHA  false 1510 139
+ *
+ * @run main/othervm
+ *      DHEKeySizing SSL_DH_anon_WITH_RC4_128_MD5  false 484 139
+ * @run main/othervm -Djdk.tls.ephemeralDHKeySize=legacy
+ *      DHEKeySizing SSL_DH_anon_WITH_RC4_128_MD5  false 388 107
+ * @run main/othervm -Djdk.tls.ephemeralDHKeySize=matched
+ *      DHEKeySizing SSL_DH_anon_WITH_RC4_128_MD5  false 484 139
+ * @run main/othervm -Djdk.tls.ephemeralDHKeySize=1024
+ *      DHEKeySizing SSL_DH_anon_WITH_RC4_128_MD5  false 484 139
+ */
+
+/*
+ * This is a simple hack to test key sizes of Diffie-Hellman key exchanging
+ * during SSL/TLS handshaking.
+ *
+ * The record length of DH ServerKeyExchange and ClientKeyExchange.
+ * ServerKeyExchange message are wrapped in ServerHello series messages, which
+ * contains ServerHello, Certificate and ServerKeyExchange message.
+ *
+ *    struct {
+ *        opaque dh_p<1..2^16-1>;
+ *        opaque dh_g<1..2^16-1>;
+ *        opaque dh_Ys<1..2^16-1>;
+ *    } ServerDHParams;     // Ephemeral DH parameters
+ *
+ *    struct {
+ *        select (PublicValueEncoding) {
+ *            case implicit: struct { };
+ *            case explicit: opaque dh_Yc<1..2^16-1>;
+ *        } dh_public;
+ *    } ClientDiffieHellmanPublic;
+ *
+ * Fomr above structures, it is clear that if the DH key size increasing 128
+ * bits (16 bytes), the ServerHello series messages increases 48 bytes
+ * (becuase dh_p, dh_g and dh_Ys each increase 16 bytes) and ClientKeyExchange
+ * increases 16 bytes (because of the size increasing of dh_Yc).
+ *
+ * Here is a summary of the record length in the test case.
+ *
+ *            |  ServerHello Series  |  ClientKeyExchange | ServerHello Anon
+ *   512-bit  |          1318 bytes  |           75 bytes |        292 bytes
+ *   768-bit  |          1414 bytes  |          107 bytes |        388 bytes
+ *  1024-bit  |          1510 bytes  |          139 bytes |        484 bytes
+ *  2048-bit  |          1894 bytes  |          267 bytes |        484 bytes
+ */
+
+import javax.net.ssl.*;
+import javax.net.ssl.SSLEngineResult.*;
+import java.io.*;
+import java.nio.*;
+import java.security.KeyStore;
+import java.security.KeyFactory;
+import java.security.cert.Certificate;
+import java.security.cert.CertificateFactory;
+import java.security.spec.PKCS8EncodedKeySpec;
+import java.security.spec.*;
+import java.security.interfaces.*;
+import java.util.Base64;
+
+public class DHEKeySizing {
+
+    private static boolean debug = true;
+
+    private SSLContext sslc;
+    private SSLEngine ssle1;    // client
+    private SSLEngine ssle2;    // server
+
+    private ByteBuffer appOut1;         // write side of ssle1
+    private ByteBuffer appIn1;          // read side of ssle1
+    private ByteBuffer appOut2;         // write side of ssle2
+    private ByteBuffer appIn2;          // read side of ssle2
+
+    private ByteBuffer oneToTwo;        // "reliable" transport ssle1->ssle2
+    private ByteBuffer twoToOne;        // "reliable" transport ssle2->ssle1
+
+    /*
+     * Where do we find the keystores?
+     */
+    // Certificates and key used in the test.
+    static String trustedCertStr =
+        "-----BEGIN CERTIFICATE-----\n" +
+        "MIIC8jCCAdqgAwIBAgIEUjkuRzANBgkqhkiG9w0BAQUFADA7MR0wGwYDVQQLExRT\n" +
+        "dW5KU1NFIFRlc3QgU2VyaXZjZTENMAsGA1UEChMESmF2YTELMAkGA1UEBhMCVVMw\n" +
+        "HhcNMTMwOTE4MDQzODMxWhcNMTMxMjE3MDQzODMxWjA7MR0wGwYDVQQLExRTdW5K\n" +
+        "U1NFIFRlc3QgU2VyaXZjZTENMAsGA1UEChMESmF2YTELMAkGA1UEBhMCVVMwggEi\n" +
+        "MA0GCSqGSIb3DQEBAQUAA4IBDwAwggEKAoIBAQCO+IGeaskJAvEcYc7pCl9neK3E\n" +
+        "a28fwWLtChufYNaC9hQfZlUdETWYjV7fZJVJKT/oLzdDNMWuVA0LKXArpI3thLNK\n" +
+        "QLXisdF9hKPlZRDazACL9kWUUtJ0FzpEySK4e8wW/z9FuU6e6iO19FbjxAfInJqk\n" +
+        "3EDiEhB5g73S2vtvPCxgq2DvWw9TDl/LIqdKG2JCS93koXCCaHmQ7MrIOqHPd+8r\n" +
+        "RbGpatXT9qyHKppUv9ATxVygO4rA794mgCFxpT+fkhz+NEB0twTkM65T1hnnOv5n\n" +
+        "ZIxkcjBggt85UlZtnP3b9P7SYxsWIa46Oc38Od2f3YejfVg6B+PqPgWNl3+/AgMB\n" +
+        "AAEwDQYJKoZIhvcNAQEFBQADggEBAAlrP6DFLRPSy0IgQhcI2i56tR/na8pezSte\n" +
+        "ZHcCdaCZPDy4UP8mpLJ9QCjEB5VJv8hPm4xdK7ULnKGOGHgYqDpV2ZHvQlhV1woQ\n" +
+        "TZGb/LM3c6kAs0j4j9KM2fq3iYUYexjIkS1KzsziflxMM6igS9BRMBR2LQyU+cYq\n" +
+        "YEsFzkF7Aj2ET4v/+tgot9mRr2NioJcaJkdsPDpMU3IKB1cczfu+OuLQ/GCG0Fqu\n" +
+        "6ijCeCqfnaAbemHbJeVZZ6Qgka3uC2YMntLBmLkhqEo1d9zGYLoh7oWL77y5ibQZ\n" +
+        "LK5/H/zikcu579TWjlDHcqL3arCwBcrtsjSaPrRSWMrWV/6c0qw=\n" +
+        "-----END CERTIFICATE-----";
+
+    // Private key in the format of PKCS#8
+    static String targetPrivateKey =
+        "MIIEvQIBADANBgkqhkiG9w0BAQEFAASCBKcwggSjAgEAAoIBAQCO+IGeaskJAvEc\n" +
+        "Yc7pCl9neK3Ea28fwWLtChufYNaC9hQfZlUdETWYjV7fZJVJKT/oLzdDNMWuVA0L\n" +
+        "KXArpI3thLNKQLXisdF9hKPlZRDazACL9kWUUtJ0FzpEySK4e8wW/z9FuU6e6iO1\n" +
+        "9FbjxAfInJqk3EDiEhB5g73S2vtvPCxgq2DvWw9TDl/LIqdKG2JCS93koXCCaHmQ\n" +
+        "7MrIOqHPd+8rRbGpatXT9qyHKppUv9ATxVygO4rA794mgCFxpT+fkhz+NEB0twTk\n" +
+        "M65T1hnnOv5nZIxkcjBggt85UlZtnP3b9P7SYxsWIa46Oc38Od2f3YejfVg6B+Pq\n" +
+        "PgWNl3+/AgMBAAECggEAPdb5Ycc4m4A9QBSCRcRpzbyiFLKPh0HDg1n65q4hOtYr\n" +
+        "kAVYTVFTSF/lqGS+Ob3w2YIKujQKSUQrvCc5UHdFuHXMgxKIWbymK0+DAMb9SlYw\n" +
+        "6lkkcWp9gx9E4dnJ/df2SAAxovvrKMuHlL1SFASHhVtPfH2URvSfUaANLDXxyYOs\n" +
+        "8BX0Nr6wazhWjLjXo9yIGnKSvFfB8XisYcA78kEgas43zhmIGCDPqaYyyffOfRbx\n" +
+        "pM1KNwGmlN86iWR1CbwA/wwhcMySWQueS+s7cHbpRqZIYJF9jEeELiwi0vxjealS\n" +
+        "EMuHYedIRFMWaDIq9XyjrvXamHb0Z25jlXBNZHaM0QKBgQDE9adl+zAezR/n79vw\n" +
+        "0XiX2Fx1UEo3ApZHuoA2Q/PcBk+rlKqqQ3IwTcy6Wo648wK7v6Nq7w5nEWcsf0dU\n" +
+        "QA2Ng/AJEev/IfF34x7sKGYxtk1gcE0EuSBA3R+ocEZxnNw1Ryd5nUU24s8d4jCP\n" +
+        "Mkothnyaim+zE2raDlEtVc0CaQKBgQC509av+02Uq5oMjzbQp5PBJfQFjATOQT15\n" +
+        "eefYnVYurkQ1kcVfixkrO2ORhg4SjmI2Z5hJDgGtXdwgidpzkad+R2epS5qLMyno\n" +
+        "lQVpY6bMpEZ7Mos0yQygxnm8uNohEcTExOe+nP5fNJVpzBsGmfeyYOhnPQlf6oqf\n" +
+        "0cHizedb5wKBgQC/l5LyMil6HOGHlhzmIm3jj7VI7QR0hJC5T6N+phVml8ESUDjA\n" +
+        "DYHbmSKouISTRtkG14FY+RiSjCxH7bvuKazFV2289PETquogTA/9e8MFYqfcQwG4\n" +
+        "sXi9gBxWlnj/9a2EKiYtOB5nKLR/BlNkSHA93tAA6N+FXEMZwMmYhxk42QKBgAuY\n" +
+        "HQgD3PZOsqDf+qKQIhbmAFCsSMx5o5VFtuJ8BpmJA/Z3ruHkMuDQpsi4nX4o5hXQ\n" +
+        "5t6AAjjH52kcUMXvK40kdWJJtk3DFnVNfvXxYsHX6hHbuHXFqYUKfSP6QJnZmvZP\n" +
+        "9smcz/4usLfWJUWHK740b6upUkFqx9Vq5/b3s9y3AoGAdM5TW7LkkOFsdMGVAUzR\n" +
+        "9iXmCWElHTK2Pcp/3yqDBHSfiQx6Yp5ANyPnE9NBM0yauCfOyBB2oxLO4Rdv3Rqk\n" +
+        "9V9kyR/YAGr7dJaPcQ7pZX0OpkzgueAOJYPrx5VUzPYUtklYV1ycFZTfKlpFCxT+\n" +
+        "Ei6KUo0NXSdUIcB4yib1J10=";
+
+    static char passphrase[] = "passphrase".toCharArray();
+
+    /*
+     * Majority of the test case is here, setup is done below.
+     */
+
+    private void createSSLEngines() throws Exception {
+        ssle1 = sslc.createSSLEngine("client", 1);
+        ssle1.setUseClientMode(true);
+
+        ssle2 = sslc.createSSLEngine("server", 2);
+        ssle2.setUseClientMode(false);
+    }
+
+    private boolean isHandshaking(SSLEngine e) {
+        return (e.getHandshakeStatus() != HandshakeStatus.NOT_HANDSHAKING);
+    }
+
+    private void checkResult(ByteBuffer bbIn, ByteBuffer bbOut,
+            SSLEngineResult result,
+            Status status, HandshakeStatus hsStatus,
+            int consumed, int produced)
+            throws Exception {
+
+        if ((status != null) && (result.getStatus() != status)) {
+            throw new Exception("Unexpected Status: need = " + status +
+                " got = " + result.getStatus());
+        }
+
+        if ((hsStatus != null) && (result.getHandshakeStatus() != hsStatus)) {
+            throw new Exception("Unexpected hsStatus: need = " + hsStatus +
+                " got = " + result.getHandshakeStatus());
+        }
+
+        if ((consumed != -1) && (consumed != result.bytesConsumed())) {
+            throw new Exception("Unexpected consumed: need = " + consumed +
+                " got = " + result.bytesConsumed());
+        }
+
+        if ((produced != -1) && (produced != result.bytesProduced())) {
+            throw new Exception("Unexpected produced: need = " + produced +
+                " got = " + result.bytesProduced());
+        }
+
+        if ((consumed != -1) && (bbIn.position() != result.bytesConsumed())) {
+            throw new Exception("Consumed " + bbIn.position() +
+                " != " + consumed);
+        }
+
+        if ((produced != -1) && (bbOut.position() != result.bytesProduced())) {
+            throw new Exception("produced " + bbOut.position() +
+                " != " + produced);
+        }
+    }
+
+    private void test(String cipherSuite, boolean exportable,
+            int lenServerKeyEx, int lenClientKeyEx) throws Exception {
+
+        createSSLEngines();
+        createBuffers();
+
+        SSLEngineResult result1;        // ssle1's results from last operation
+        SSLEngineResult result2;        // ssle2's results from last operation
+
+        String[] suites = new String [] {cipherSuite};
+
+        ssle1.setEnabledCipherSuites(suites);
+        ssle2.setEnabledCipherSuites(suites);
+
+        log("======================================");
+        log("===================");
+        log("client hello");
+        result1 = ssle1.wrap(appOut1, oneToTwo);
+        checkResult(appOut1, oneToTwo, result1,
+            Status.OK, HandshakeStatus.NEED_UNWRAP, 0, -1);
+        oneToTwo.flip();
+
+        result2 = ssle2.unwrap(oneToTwo, appIn2);
+        checkResult(oneToTwo, appIn2, result2,
+            Status.OK, HandshakeStatus.NEED_TASK, result1.bytesProduced(), 0);
+        runDelegatedTasks(ssle2);
+        oneToTwo.compact();
+
+        log("===================");
+        log("ServerHello");
+        result2 = ssle2.wrap(appOut2, twoToOne);
+        checkResult(appOut2, twoToOne, result2,
+            Status.OK, HandshakeStatus.NEED_UNWRAP, 0, -1);
+        twoToOne.flip();
+
+        log("Message length of ServerHello series: " + twoToOne.remaining());
+        if (lenServerKeyEx != twoToOne.remaining()) {
+            throw new Exception(
+                "Expected to generate ServerHello series messages of " +
+                lenServerKeyEx + " bytes, but not " + twoToOne.remaining());
+        }
+
+        result1 = ssle1.unwrap(twoToOne, appIn1);
+        checkResult(twoToOne, appIn1, result1,
+            Status.OK, HandshakeStatus.NEED_TASK, result2.bytesProduced(), 0);
+        runDelegatedTasks(ssle1);
+        twoToOne.compact();
+
+        log("===================");
+        log("Key Exchange");
+        result1 = ssle1.wrap(appOut1, oneToTwo);
+        checkResult(appOut1, oneToTwo, result1,
+            Status.OK, HandshakeStatus.NEED_WRAP, 0, -1);
+        oneToTwo.flip();
+
+        log("Message length of ClientKeyExchange: " + oneToTwo.remaining());
+        if (lenClientKeyEx != oneToTwo.remaining()) {
+            throw new Exception(
+                "Expected to generate ClientKeyExchange message of " +
+                lenClientKeyEx + " bytes, but not " + oneToTwo.remaining());
+        }
+        result2 = ssle2.unwrap(oneToTwo, appIn2);
+        checkResult(oneToTwo, appIn2, result2,
+            Status.OK, HandshakeStatus.NEED_TASK, result1.bytesProduced(), 0);
+        runDelegatedTasks(ssle2);
+        oneToTwo.compact();
+
+        log("===================");
+        log("Client CCS");
+        result1 = ssle1.wrap(appOut1, oneToTwo);
+        checkResult(appOut1, oneToTwo, result1,
+            Status.OK, HandshakeStatus.NEED_WRAP, 0, -1);
+        oneToTwo.flip();
+
+        result2 = ssle2.unwrap(oneToTwo, appIn2);
+        checkResult(oneToTwo, appIn2, result2,
+            Status.OK, HandshakeStatus.NEED_UNWRAP,
+            result1.bytesProduced(), 0);
+        oneToTwo.compact();
+
+        log("===================");
+        log("Client Finished");
+        result1 = ssle1.wrap(appOut1, oneToTwo);
+        checkResult(appOut1, oneToTwo, result1,
+            Status.OK, HandshakeStatus.NEED_UNWRAP, 0, -1);
+        oneToTwo.flip();
+
+        result2 = ssle2.unwrap(oneToTwo, appIn2);
+        checkResult(oneToTwo, appIn2, result2,
+            Status.OK, HandshakeStatus.NEED_WRAP,
+            result1.bytesProduced(), 0);
+        oneToTwo.compact();
+
+        log("===================");
+        log("Server CCS");
+        result2 = ssle2.wrap(appOut2, twoToOne);
+        checkResult(appOut2, twoToOne, result2,
+            Status.OK, HandshakeStatus.NEED_WRAP, 0, -1);
+        twoToOne.flip();
+
+        result1 = ssle1.unwrap(twoToOne, appIn1);
+        checkResult(twoToOne, appIn1, result1,
+            Status.OK, HandshakeStatus.NEED_UNWRAP, result2.bytesProduced(), 0);
+        twoToOne.compact();
+
+        log("===================");
+        log("Server Finished");
+        result2 = ssle2.wrap(appOut2, twoToOne);
+        checkResult(appOut2, twoToOne, result2,
+            Status.OK, HandshakeStatus.FINISHED, 0, -1);
+        twoToOne.flip();
+
+        result1 = ssle1.unwrap(twoToOne, appIn1);
+        checkResult(twoToOne, appIn1, result1,
+            Status.OK, HandshakeStatus.FINISHED, result2.bytesProduced(), 0);
+        twoToOne.compact();
+
+        log("===================");
+        log("Check Session/Ciphers");
+        String cs = ssle1.getSession().getCipherSuite();
+        if (!cs.equals(suites[0])) {
+            throw new Exception("suites not equal: " + cs + "/" + suites[0]);
+        }
+
+        cs = ssle2.getSession().getCipherSuite();
+        if (!cs.equals(suites[0])) {
+            throw new Exception("suites not equal: " + cs + "/" + suites[0]);
+        }
+
+        log("===================");
+        log("Done with SSL/TLS handshaking");
+    }
+
+    public static void main(String args[]) throws Exception {
+        if (args.length != 4) {
+            System.out.println(
+                "Usage: java DHEKeySizing cipher-suite " +
+                "exportable(true|false)\n" +
+                "    size-of-server-hello-record size-of-client-key-exchange");
+            throw new Exception("Incorrect usage!");
+        }
+
+        (new DHEKeySizing()).test(args[0],
+                Boolean.parseBoolean(args[1]),
+                Integer.parseInt(args[2]),
+                Integer.parseInt(args[3]));
+        System.out.println("Test Passed.");
+    }
+
+    /*
+     * **********************************************************
+     * Majority of the test case is above, below is just setup stuff
+     * **********************************************************
+     */
+
+    public DHEKeySizing() throws Exception {
+        sslc = getSSLContext();
+    }
+
+    /*
+     * Create an initialized SSLContext to use for this test.
+     */
+    private SSLContext getSSLContext() throws Exception {
+
+        // generate certificate from cert string
+        CertificateFactory cf = CertificateFactory.getInstance("X.509");
+
+        // create a key store
+        KeyStore ts = KeyStore.getInstance("JKS");
+        KeyStore ks = KeyStore.getInstance("JKS");
+        ts.load(null, null);
+        ks.load(null, null);
+
+        // import the trused cert
+        ByteArrayInputStream is =
+                    new ByteArrayInputStream(trustedCertStr.getBytes());
+        Certificate trusedCert = cf.generateCertificate(is);
+        is.close();
+        ts.setCertificateEntry("rsa-trusted-2048", trusedCert);
+
+        // generate the private key.
+        String keySpecStr = targetPrivateKey;
+        PKCS8EncodedKeySpec priKeySpec = new PKCS8EncodedKeySpec(
+                            Base64.getMimeDecoder().decode(keySpecStr));
+        KeyFactory kf = KeyFactory.getInstance("RSA");
+        RSAPrivateKey priKey = (RSAPrivateKey)kf.generatePrivate(priKeySpec);
+
+        Certificate[] chain = new Certificate[1];
+        chain[0] = trusedCert;
+
+        // import the key entry.
+        ks.setKeyEntry("rsa-key-2048", priKey, passphrase, chain);
+
+        // create SSL context
+        KeyManagerFactory kmf = KeyManagerFactory.getInstance("SunX509");
+        kmf.init(ks, passphrase);
+
+        TrustManagerFactory tmf = TrustManagerFactory.getInstance("SunX509");
+        tmf.init(ts);
+
+        SSLContext sslCtx = SSLContext.getInstance("TLS");
+        sslCtx.init(kmf.getKeyManagers(), tmf.getTrustManagers(), null);
+
+        return sslCtx;
+    }
+
+    private void createBuffers() {
+        // Size the buffers as appropriate.
+
+        SSLSession session = ssle1.getSession();
+        int appBufferMax = session.getApplicationBufferSize();
+        int netBufferMax = session.getPacketBufferSize();
+
+        appIn1 = ByteBuffer.allocateDirect(appBufferMax + 50);
+        appIn2 = ByteBuffer.allocateDirect(appBufferMax + 50);
+
+        oneToTwo = ByteBuffer.allocateDirect(netBufferMax);
+        twoToOne = ByteBuffer.allocateDirect(netBufferMax);
+
+        appOut1 = ByteBuffer.wrap("Hi Engine2, I'm SSLEngine1".getBytes());
+        appOut2 = ByteBuffer.wrap("Hello Engine1, I'm SSLEngine2".getBytes());
+
+        log("AppOut1 = " + appOut1);
+        log("AppOut2 = " + appOut2);
+        log("");
+    }
+
+    private static void runDelegatedTasks(SSLEngine engine) throws Exception {
+
+        Runnable runnable;
+        while ((runnable = engine.getDelegatedTask()) != null) {
+            log("running delegated task...");
+            runnable.run();
+        }
+    }
+
+    private static void log(String str) {
+        if (debug) {
+            System.out.println(str);
+        }
+    }
+}
diff --git a/jdk/test/sun/security/tools/keytool/StorePasswords.java b/jdk/test/sun/security/tools/keytool/StorePasswords.java
new file mode 100644
index 0000000..e1f0c27
--- /dev/null
+++ b/jdk/test/sun/security/tools/keytool/StorePasswords.java
@@ -0,0 +1,186 @@
+/*
+ * Copyright (c) 2013, Oracle and/or its affiliates. All rights reserved.
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * This code is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU General Public License version 2 only, as
+ * published by the Free Software Foundation.
+ *
+ * This code is distributed in the hope that it will be useful, but WITHOUT
+ * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
+ * version 2 for more details (a copy is included in the LICENSE file that
+ * accompanied this code).
+ *
+ * You should have received a copy of the GNU General Public License version
+ * 2 along with this work; if not, write to the Free Software Foundation,
+ * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
+ *
+ * Please 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 8008296
+ * @summary Store and retrieve user passwords using PKCS#12 keystore
+ */
+
+import java.io.*;
+import java.security.*;
+import java.util.*;
+import javax.crypto.*;
+import javax.crypto.spec.*;
+
+/*
+ * Store and retrieve passwords protected by a selection of PBE algorithms,
+ * using a PKCS#12 keystore.
+ */
+public class StorePasswords {
+
+    private static final String[] PBE_ALGORITHMS = new String[] {
+        "default PBE algorithm",
+        "PBEWithMD5AndDES",
+        "PBEWithSHA1AndDESede",
+        "PBEWithSHA1AndRC2_40",
+        "PBEWithSHA1AndRC2_128",
+        "PBEWithSHA1AndRC4_40",
+        "PBEWithSHA1AndRC4_128",
+        "PBEWithHmacSHA1AndAES_128",
+        "PBEWithHmacSHA224AndAES_128",
+        "PBEWithHmacSHA256AndAES_128",
+        "PBEWithHmacSHA384AndAES_128",
+        "PBEWithHmacSHA512AndAES_128",
+        "PBEWithHmacSHA1AndAES_256",
+        "PBEWithHmacSHA224AndAES_256",
+        "PBEWithHmacSHA256AndAES_256",
+        "PBEWithHmacSHA384AndAES_256",
+        "PBEWithHmacSHA512AndAES_256"
+    };
+
+    private static final String KEYSTORE = "mykeystore.p12";
+    private static final char[] KEYSTORE_PWD = "changeit".toCharArray();
+    private static final char[] ENTRY_PWD = "protectit".toCharArray();
+    private static final char[] USER_PWD = "hello1".toCharArray();
+
+    public static void main(String[] args) throws Exception {
+
+        new File(KEYSTORE).delete();
+
+        int storeCount = store();
+        int recoverCount = recover();
+
+        if (recoverCount != storeCount) {
+            throw new Exception("Stored " + storeCount + " user passwords, " +
+                "recovered " + recoverCount + " user passwords");
+        }
+        System.out.println("\nStored " + storeCount + " user passwords, " +
+            "recovered " + recoverCount + " user passwords");
+    }
+
+    private static int store() throws Exception {
+        int count = 0;
+        // Load an empty PKCS#12 keystore
+        KeyStore keystore = KeyStore.getInstance("PKCS12");
+        System.out.println("\nLoading PKCS#12 keystore...");
+        keystore.load(null, null);
+
+        // Derive a PBE key from the password
+        PBEKeySpec keySpec = new PBEKeySpec(USER_PWD);
+        SecretKeyFactory factory = SecretKeyFactory.getInstance("PBE");
+        SecretKey key = factory.generateSecret(keySpec);
+        PBEParameterSpec specWithEightByteSalt =
+            new PBEParameterSpec("NaClNaCl".getBytes(), 1024);
+
+        // Store the user password in a keystore entry (for each algorithm)
+        for (String algorithm : PBE_ALGORITHMS) {
+
+            try {
+                System.out.println("Storing user password '" +
+                    new String(USER_PWD) + "' (protected by " + algorithm +
+                    ")");
+
+                if (algorithm.equals("default PBE algorithm")) {
+                     keystore.setKeyEntry(
+                         "this entry is protected by " + algorithm, key,
+                         ENTRY_PWD, null);
+                } else {
+                    keystore.setEntry(
+                        "this entry is protected by " + algorithm,
+                        new KeyStore.SecretKeyEntry(key),
+                        new KeyStore.PasswordProtection(ENTRY_PWD, algorithm,
+                            null));
+                }
+                count++;
+
+            } catch (KeyStoreException e) {
+                Throwable inner = e.getCause();
+                if (inner instanceof UnrecoverableKeyException) {
+                    Throwable inner2 = inner.getCause();
+                    if (inner2 instanceof InvalidAlgorithmParameterException) {
+                        System.out.println("...re-trying due to: " +
+                            inner2.getMessage());
+
+                        // Some PBE algorithms demand an 8-byte salt
+                        keystore.setEntry(
+                            "this entry is protected by " + algorithm,
+                            new KeyStore.SecretKeyEntry(key),
+                            new KeyStore.PasswordProtection(ENTRY_PWD,
+                                algorithm, specWithEightByteSalt));
+                        count++;
+
+                    } else if (inner2  instanceof InvalidKeyException) {
+                        System.out.println("...skipping due to: " +
+                            inner2.getMessage());
+                        // Unsupported crypto keysize
+                        continue;
+                    }
+                } else {
+                    throw e;
+                }
+            }
+        }
+
+        // Store the PKCS#12 keystore
+        System.out.println("Storing PKCS#12 keystore to: " + KEYSTORE);
+        keystore.store(new FileOutputStream(KEYSTORE), KEYSTORE_PWD);
+
+        return count;
+    }
+
+    private static int recover() throws Exception {
+        int count = 0;
+        // 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);
+
+        SecretKey key;
+        SecretKeyFactory factory;
+        PBEKeySpec keySpec;
+
+        // Retrieve each user password from the keystore
+        for (String algorithm : PBE_ALGORITHMS) {
+            key = (SecretKey) keystore.getKey("this entry is protected by " +
+                algorithm, ENTRY_PWD);
+
+            if (key != null) {
+                count++;
+                factory = SecretKeyFactory.getInstance(key.getAlgorithm());
+                keySpec =
+                    (PBEKeySpec) factory.getKeySpec(key, PBEKeySpec.class);
+                char[] pwd = keySpec.getPassword();
+                System.out.println("Recovered user password '" +
+                     new String(pwd) + "' (protected by " + algorithm + ")");
+
+                if (!Arrays.equals(USER_PWD, pwd)) {
+                    throw new Exception("Failed to recover the user password " +
+                        "protected by " + algorithm);
+                }
+            }
+        }
+
+        return count;
+    }
+}
diff --git a/jdk/test/sun/security/tools/keytool/StorePasswordsByShell.sh b/jdk/test/sun/security/tools/keytool/StorePasswordsByShell.sh
new file mode 100644
index 0000000..7347f34
--- /dev/null
+++ b/jdk/test/sun/security/tools/keytool/StorePasswordsByShell.sh
@@ -0,0 +1,140 @@
+#
+# Copyright (c) 2013, Oracle and/or its affiliates. All rights reserved.
+# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+#
+# This code is free software; you can redistribute it and/or modify it
+# under the terms of the GNU General Public License version 2 only, as
+# published by the Free Software Foundation.
+#
+# This code is distributed in the hope that it will be useful, but WITHOUT
+# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
+# version 2 for more details (a copy is included in the LICENSE file that
+# accompanied this code).
+#
+# You should have received a copy of the GNU General Public License version
+# 2 along with this work; if not, write to the Free Software Foundation,
+# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
+#
+# Please 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 8008296
+# @summary confirm that keytool correctly imports user passwords
+#
+# @run shell StorePasswordsByShell.sh
+
+# set a few environment variables so that the shell-script can run stand-alone
+# in the source directory
+if [ "${TESTSRC}" = "" ] ; then
+   TESTSRC="."
+fi 
+  
+if [ "${TESTCLASSES}" = "" ] ; then
+   TESTCLASSES="." 
+fi
+  
+if [ "${TESTJAVA}" = "" ] ; then
+   echo "TESTJAVA not set.  Test cannot execute."
+   echo "FAILED!!!"
+   exit 1
+fi
+
+# set platform-dependent variables
+OS=`uname -s`
+case "$OS" in
+  SunOS )
+    PATHSEP=":"
+    FILESEP="/"
+    ;;
+  Linux )
+    PATHSEP=":"
+    FILESEP="/"
+    ;;
+  Darwin ) 
+    PATHSEP=":"
+    FILESEP="/"
+    ;;
+  CYGWIN* )
+    PATHSEP=";"
+    FILESEP="/"
+    ;;
+  Windows* )
+    PATHSEP=";"
+    FILESEP="\\"
+    ;;
+  * )
+    echo "Unrecognized system!"
+    exit 1;
+    ;;
+esac
+
+PBE_ALGORITHMS="\
+ default-PBE-algorithm \
+ PBEWithMD5AndDES \
+ PBEWithSHA1AndDESede \
+ PBEWithSHA1AndRC2_40 \
+ PBEWithSHA1AndRC2_128 
+ PBEWithSHA1AndRC4_40 \
+ PBEWithSHA1AndRC4_128 \
+ PBEWithHmacSHA1AndAES_128 \
+ PBEWithHmacSHA224AndAES_128 \
+ PBEWithHmacSHA256AndAES_128 \
+ PBEWithHmacSHA384AndAES_128 \
+ PBEWithHmacSHA512AndAES_128 \
+ PBEWithHmacSHA1AndAES_256 \
+ PBEWithHmacSHA224AndAES_256 \
+ PBEWithHmacSHA256AndAES_256 \
+ PBEWithHmacSHA384AndAES_256 \
+ PBEWithHmacSHA512AndAES_256"
+
+USER_PWD="hello1\n"
+ALIAS_PREFIX="this entry is protected by "
+COUNTER=0
+
+# cleanup
+rm mykeystore.p12 > /dev/null 2>&1
+
+echo
+for i in $PBE_ALGORITHMS; do
+
+    if [ $i = "default-PBE-algorithm" ]; then
+        KEYALG=""
+    else
+        KEYALG="-keyalg ${i}"
+    fi
+
+    if [ $COUNTER -lt 5 ]; then
+        IMPORTPASSWORD="-importpassword"
+    else
+        IMPORTPASSWORD="-importpass"
+    fi
+
+    echo "Storing user password (protected by ${i})"
+    echo "${USER_PWD}" | \
+        ${TESTJAVA}${FILESEP}bin${FILESEP}keytool ${IMPORTPASSWORD} \
+            -storetype pkcs12 -keystore mykeystore.p12 -storepass changeit \
+            -alias "${ALIAS_PREFIX}${i}" ${KEYALG} > /dev/null 2>&1
+    if [ $? -ne 0 ]; then
+        echo Error
+    else
+        echo OK
+        COUNTER=`expr ${COUNTER} + 1`
+    fi
+done
+echo
+
+COUNTER2=`${TESTJAVA}${FILESEP}bin${FILESEP}keytool -list -storetype pkcs12 \
+  -keystore mykeystore.p12 -storepass changeit | grep -c "${ALIAS_PREFIX}"`
+
+RESULT="stored ${COUNTER} user passwords, detected ${COUNTER2} user passwords"
+if [ $COUNTER -ne $COUNTER2 -o $COUNTER -lt 11 ]; then
+    echo "ERROR: $RESULT"
+    exit 1
+else
+    echo "OK: $RESULT"
+    exit 0
+fi
diff --git a/jdk/test/tools/launcher/DiacriticTest.java b/jdk/test/tools/launcher/DiacriticTest.java
index 44107ba..e43cedf 100644
--- a/jdk/test/tools/launcher/DiacriticTest.java
+++ b/jdk/test/tools/launcher/DiacriticTest.java
@@ -54,7 +54,13 @@
                 "}\n";
         ArrayList<String> content = new ArrayList<>();
         content.add(source);
-        createFile(sourceFile, content);
+        try {
+            createFile(sourceFile, content);
+        } catch (java.nio.file.InvalidPathException ipe) {
+            System.out.println("The locale or file system is configured in a way " +
+                               "that prevents file creation. Real testing impossible.");
+            return;
+        }
 
         HashMap<String, String> env = new HashMap<>();
         env.put("LC_CTYPE", "UTF-8");
diff --git a/jdk/test/tools/launcher/I18NArgTest.java b/jdk/test/tools/launcher/I18NArgTest.java
new file mode 100644
index 0000000..d3a28be
--- /dev/null
+++ b/jdk/test/tools/launcher/I18NArgTest.java
@@ -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.
+ */
+
+/*
+ * @test
+ * @bug 8016110
+ * @summary verify Japanese character in an argument are treated correctly
+ * @compile -XDignore.symbol.file I18NArgTest.java
+ * @run main I18NArgTest
+ */
+import java.io.IOException;
+
+public class I18NArgTest extends TestHelper {
+    public static void main(String... args) throws IOException {
+        if (!isWindows) {
+            return;
+        }
+        if (!"MS932".equals(System.getProperty("sun.jnu.encoding"))) {
+            System.err.println("MS932 encoding not set, test skipped");
+            return;
+        }
+        if (args.length == 0) {
+            execTest(0x30bd); // MS932 Katakana SO, 0x835C
+        } else {
+            testCharacters(args);
+        }
+    }
+    static void execTest(int unicodeValue) {
+        String hexValue = Integer.toHexString(unicodeValue);
+        String unicodeStr = Character.toString((char)unicodeValue);
+        execTest("\"" + unicodeStr + "\"", hexValue);
+        execTest("\\" + unicodeStr + "\\", hexValue);
+        execTest(" " + unicodeStr + " ", hexValue);
+        execTest("'" + unicodeStr + "'", hexValue);
+        execTest("\t" + unicodeStr + "\t", hexValue);
+        execTest("*" + unicodeStr + "*", hexValue);
+        execTest("?" + unicodeStr + "?", hexValue);
+
+        execTest("\"" + unicodeStr + unicodeStr + "\"", hexValue + hexValue);
+        execTest("\\" + unicodeStr + unicodeStr + "\\", hexValue + hexValue);
+        execTest(" " + unicodeStr + unicodeStr + " ", hexValue + hexValue);
+        execTest("'" + unicodeStr + unicodeStr + "'", hexValue + hexValue);
+        execTest("\t" + unicodeStr + unicodeStr + "\t", hexValue + hexValue);
+        execTest("*" + unicodeStr + unicodeStr + "*", hexValue + hexValue);
+        execTest("?" + unicodeStr + unicodeStr + "?", hexValue + hexValue);
+
+        execTest("\"" + unicodeStr + "a" + unicodeStr + "\"", hexValue + "61" + hexValue);
+        execTest("\\" + unicodeStr + "a" + unicodeStr + "\\", hexValue + "61" + hexValue);
+        execTest(" " + unicodeStr + "a" + unicodeStr + " ", hexValue + "61"+ hexValue);
+        execTest("'" + unicodeStr + "a" + unicodeStr + "'", hexValue + "61"+ hexValue);
+        execTest("\t" + unicodeStr + "a" + unicodeStr + "\t", hexValue + "61"+ hexValue);
+        execTest("*" + unicodeStr + "a" + unicodeStr + "*", hexValue + "61"+ hexValue);
+        execTest("?" + unicodeStr + "a" + unicodeStr + "?", hexValue + "61"+ hexValue);
+
+        execTest("\"" + unicodeStr + "\u00b1" + unicodeStr + "\"", hexValue + "b1" + hexValue);
+        execTest("\\" + unicodeStr + "\u00b1" + unicodeStr + "\\", hexValue + "b1" + hexValue);
+        execTest(" " + unicodeStr + "\u00b1" + unicodeStr + " ", hexValue + "b1"+ hexValue);
+        execTest("'" + unicodeStr + "\u00b1" + unicodeStr + "'", hexValue + "b1"+ hexValue);
+        execTest("\t" + unicodeStr + "\u00b1" + unicodeStr + "\t", hexValue + "b1"+ hexValue);
+        execTest("*" + unicodeStr + "\u00b1" + unicodeStr + "*", hexValue + "b1"+ hexValue);
+        execTest("?" + unicodeStr + "\u00b1" + unicodeStr + "?", hexValue + "b1"+ hexValue);
+    }
+    static void execTest(String unicodeStr, String hexValue) {
+        TestResult tr = doExec(javaCmd,
+                "-Dtest.src=" + TEST_SOURCES_DIR.getAbsolutePath(),
+                "-Dtest.classes=" + TEST_CLASSES_DIR.getAbsolutePath(),
+                "-cp", TEST_CLASSES_DIR.getAbsolutePath(),
+                "I18NArgTest", unicodeStr, hexValue);
+        System.out.println(tr.testOutput);
+        if (!tr.isOK()) {
+            System.err.println(tr);
+            throw new RuntimeException("test fails");
+        }
+    }
+    static void testCharacters(String... args) {
+        String input = args[0];
+        String expected = args[1];
+        String hexValue = "";
+        for (int i = 0; i < input.length(); i++) {
+            hexValue = hexValue.concat(Integer.toHexString((int)input.charAt(i)));
+        }
+        System.out.println("input:" + input);
+        System.out.println("expected:" + expected);
+        System.out.println("obtained:" + hexValue);
+        if (!hexValue.contains(expected)) {
+            String message = "Error: output does not contain expected value" +
+                "expected:" + expected + " obtained:" + hexValue;
+            throw new RuntimeException(message);
+        }
+    }
+}
diff --git a/langtools/.hgtags b/langtools/.hgtags
index 4b927fb..8ae4f89 100644
--- a/langtools/.hgtags
+++ b/langtools/.hgtags
@@ -232,3 +232,4 @@
 252f872b8a2f81a416f9127e77924ca56a4578b0 jdk8-b108
 985abf1cd327169a317d4ff4f318a8162a5cd47d jdk8-b109
 41541097533aa3933a018c8c1c426c1871dfd76e jdk8-b110
+af6244ba81b6b8d1bf4ab06587a2067e021e4570 jdk8-b111
diff --git a/langtools/makefiles/BuildLangtools.gmk b/langtools/makefiles/BuildLangtools.gmk
index 57d216b..9932c11 100644
--- a/langtools/makefiles/BuildLangtools.gmk
+++ b/langtools/makefiles/BuildLangtools.gmk
@@ -32,44 +32,49 @@
 
 # The BOOT_JAVAC setup uses the bootdir compiler to compile the tools
 # and the bootstrap javac, to be run by the bootdir jvm.
-$(eval $(call SetupJavaCompiler,BOOT_JAVAC,\
-	JAVAC:=$(JAVAC),\
-        SERVER_DIR:=$(SJAVAC_SERVER_DIR),\
-        SERVER_JVM:=$(SJAVAC_SERVER_JAVA),\
-        FLAGS:=-XDignore.symbol.file=true -g -Xlint:all$(COMMA)-deprecation -Werror))
+$(eval $(call SetupJavaCompiler,BOOT_JAVAC, \
+    JAVAC := $(JAVAC), \
+    SERVER_DIR := $(SJAVAC_SERVER_DIR), \
+    SERVER_JVM := $(SJAVAC_SERVER_JAVA), \
+    FLAGS := -XDignore.symbol.file=true -g -Xlint:all$(COMMA)-deprecation -Werror))
 
 # javax.tools.JavaCompilerTool isn't really a suffix but this gets the file copied.
-RESOURCE_SUFFIXES:=.gif .xml .css .js javax.tools.JavaCompilerTool
+RESOURCE_SUFFIXES := .gif .xml .css .js javax.tools.JavaCompilerTool
 
 # Now setup the compilation of the properties compilation tool. You can depend
 # upon $(BUILD_TOOLS) to trigger a compilation of the tools. Note that we
 # add src/share/classes to the sourcepath. This is necessary since the GenStubs
 # program needs to be linked and run towards the new javac sources.
-$(eval $(call SetupJavaCompilation,BUILD_TOOLS,\
-		SETUP:=BOOT_JAVAC,\
-		DISABLE_SJAVAC:=true,\
-                ADD_JAVAC_FLAGS:=-Xprefer:source,\
-		SRC:=$(LANGTOOLS_TOPDIR)/make/tools $(LANGTOOLS_TOPDIR)/src/share/classes,\
-		INCLUDES:=compileproperties genstubs,\
-		BIN:=$(LANGTOOLS_OUTPUTDIR)/btclasses))
+$(eval $(call SetupJavaCompilation,BUILD_TOOLS, \
+    SETUP := BOOT_JAVAC, \
+    DISABLE_SJAVAC := true, \
+    ADD_JAVAC_FLAGS := -Xprefer:source, \
+    SRC := $(LANGTOOLS_TOPDIR)/make/tools $(LANGTOOLS_TOPDIR)/src/share/classes, \
+    INCLUDES := compileproperties genstubs, \
+    BIN := $(LANGTOOLS_OUTPUTDIR)/btclasses))
 
 # The compileprops tools compiles a properties file into a resource bundle.
-TOOL_COMPILEPROPS_CMD:=$(JAVA) -cp $(LANGTOOLS_OUTPUTDIR)/btclasses compileproperties.CompileProperties -quiet
+TOOL_COMPILEPROPS_CMD := $(JAVA) -cp $(LANGTOOLS_OUTPUTDIR)/btclasses compileproperties.CompileProperties -quiet
+
 # Lookup the properties that need to be compiled into resource bundles.
-PROPSOURCES:=$(shell $(FIND) $(LANGTOOLS_TOPDIR)/src/share/classes -name "*.properties")
+PROPSOURCES := $(shell $(FIND) $(LANGTOOLS_TOPDIR)/src/share/classes -name "*.properties")
+
 # Strip away prefix and suffix, leaving for example only: "com/sun/tools/javac/resources/javac_zh_CN"
-PROPPATHS:=$(patsubst $(LANGTOOLS_TOPDIR)/src/share/classes/%.properties,%,$(PROPSOURCES))
+PROPPATHS := $(patsubst $(LANGTOOLS_TOPDIR)/src/share/classes/%.properties, %, $(PROPSOURCES))
+
 # Generate the list of java files to be created.
-PROPJAVAS:=$(patsubst %,$(LANGTOOLS_OUTPUTDIR)/gensrc/%.java,$(PROPPATHS))
+PROPJAVAS := $(patsubst %, $(LANGTOOLS_OUTPUTDIR)/gensrc/%.java, $(PROPPATHS))
+
 # Generate the package dirs for the tobe generated java files.
-PROPDIRS:=$(dir $(PROPJAVAS))
+PROPDIRS := $(dir $(PROPJAVAS))
+
 # Now generate a sequence of "-compile ...javac_zh_CN.properties ...javac_zh_CN.java java.util.ListResourceBundle"
 # suitable to be fed into the CompileProperties command.
-PROPCMDLINE:=$(subst _SPACE_,$(SPACE),$(join $(addprefix -compile_SPACE_,$(PROPSOURCES)), \
-		$(addsuffix _SPACE_java.util.ListResourceBundle,$(addprefix _SPACE_$(LANGTOOLS_OUTPUTDIR)/gensrc/,$(addsuffix .java,$(PROPPATHS))))))
+PROPCMDLINE := $(subst _SPACE_, $(SPACE), $(join $(addprefix -compile_SPACE_, $(PROPSOURCES)), \
+    $(addsuffix _SPACE_java.util.ListResourceBundle, $(addprefix _SPACE_$(LANGTOOLS_OUTPUTDIR)/gensrc/, $(addsuffix .java, $(PROPPATHS))))))
 
 # Now setup the rule for the generation of the resource bundles.
-$(LANGTOOLS_OUTPUTDIR)/gensrc/_the_props.d : $(PROPSOURCES) $(BUILD_TOOLS)
+$(LANGTOOLS_OUTPUTDIR)/gensrc/_the_props.d: $(PROPSOURCES) $(BUILD_TOOLS)
 	$(RM) -r $(@D)/*
 	$(MKDIR) -p $(@D) $(PROPDIRS)
 	$(PRINTF) "jdk=$(JDK_VERSION)\nfull=$(FULL_VERSION)\nrelease=$(RELEASE)\n" > $(LANGTOOLS_OUTPUTDIR)/gensrc/com/sun/tools/javah/resources/version.properties
@@ -78,115 +83,119 @@
 	$(PRINTF) "jdk=$(JDK_VERSION)\nfull=$(FULL_VERSION)\nrelease=$(RELEASE)\n" > $(LANGTOOLS_OUTPUTDIR)/gensrc/com/sun/tools/jdeps/resources/version.properties
 	$(ECHO) Compiling $(words $(PROPSOURCES) v1 v2 v3) properties into resource bundles
 	$(TOOL_COMPILEPROPS_CMD) $(PROPCMDLINE) \
-		-compile 	$(LANGTOOLS_OUTPUTDIR)/gensrc/com/sun/tools/javah/resources/version.properties \
-				$(LANGTOOLS_OUTPUTDIR)/gensrc/com/sun/tools/javah/resources/version.java \
-				java.util.ListResourceBundle \
-		-compile 	$(LANGTOOLS_OUTPUTDIR)/gensrc/com/sun/tools/javap/resources/version.properties \
-				$(LANGTOOLS_OUTPUTDIR)/gensrc/com/sun/tools/javap/resources/version.java \
-				java.util.ListResourceBundle \
-		-compile	$(LANGTOOLS_OUTPUTDIR)/gensrc/com/sun/tools/javac/resources/version.properties \
-				$(LANGTOOLS_OUTPUTDIR)/gensrc/com/sun/tools/javac/resources/version.java \
-				java.util.ListResourceBundle \
-		-compile	$(LANGTOOLS_OUTPUTDIR)/gensrc/com/sun/tools/jdeps/resources/version.properties \
-				$(LANGTOOLS_OUTPUTDIR)/gensrc/com/sun/tools/jdeps/resources/version.java \
-				java.util.ListResourceBundle
-	$(ECHO) PROPS_ARE_CREATED=yes > $@
+	    -compile $(LANGTOOLS_OUTPUTDIR)/gensrc/com/sun/tools/javah/resources/version.properties \
+	        $(LANGTOOLS_OUTPUTDIR)/gensrc/com/sun/tools/javah/resources/version.java \
+	        java.util.ListResourceBundle \
+	    -compile $(LANGTOOLS_OUTPUTDIR)/gensrc/com/sun/tools/javap/resources/version.properties \
+	        $(LANGTOOLS_OUTPUTDIR)/gensrc/com/sun/tools/javap/resources/version.java \
+	        java.util.ListResourceBundle \
+	    -compile $(LANGTOOLS_OUTPUTDIR)/gensrc/com/sun/tools/javac/resources/version.properties \
+	        $(LANGTOOLS_OUTPUTDIR)/gensrc/com/sun/tools/javac/resources/version.java \
+	        java.util.ListResourceBundle \
+	    -compile $(LANGTOOLS_OUTPUTDIR)/gensrc/com/sun/tools/jdeps/resources/version.properties \
+	        $(LANGTOOLS_OUTPUTDIR)/gensrc/com/sun/tools/jdeps/resources/version.java \
+	        java.util.ListResourceBundle
+	$(ECHO) PROPS_ARE_CREATED = yes > $@
 
 # Trigger the generation of the resource bundles. After the resource bundles have
 # been compiled, then the makefile will restart and the newly created java files
 # will become part of the build further along in the makefile.
 -include $(LANGTOOLS_OUTPUTDIR)/gensrc/_the_props.d
 
-ifeq ($(PROPS_ARE_CREATED),yes)
-        # Setup the rules to build a dist/bootstrap/lib/javac.jar, ie a smaller intermediate javac
-        # that can be compiled with an old javac. The intermediate javac is then used
-        # to compile javac again and to build the complete new jdk.
-        $(eval $(call SetupJavaCompilation,BUILD_BOOTSTRAP_LANGTOOLS,\
-		SETUP:=BOOT_JAVAC,\
-		DISABLE_SJAVAC:=true,\
-		SRC:=$(LANGTOOLS_TOPDIR)/src/share/classes $(LANGTOOLS_OUTPUTDIR)/gensrc,\
-		EXCLUDES:=com/sun/tools/javac/nio,\
-		COPY:=$(RESOURCE_SUFFIXES),\
-		BIN:=$(LANGTOOLS_OUTPUTDIR)/btclasses/bootstrap))
+ifeq ($(PROPS_ARE_CREATED), yes)
+  # Setup the rules to build a dist/bootstrap/lib/javac.jar, ie a smaller intermediate javac
+  # that can be compiled with an old javac. The intermediate javac is then used
+  # to compile javac again and to build the complete new jdk.
+  $(eval $(call SetupJavaCompilation,BUILD_BOOTSTRAP_LANGTOOLS, \
+      SETUP := BOOT_JAVAC, \
+      DISABLE_SJAVAC := true, \
+      SRC := $(LANGTOOLS_TOPDIR)/src/share/classes $(LANGTOOLS_OUTPUTDIR)/gensrc, \
+      EXCLUDES := com/sun/tools/javac/nio, \
+      COPY := $(RESOURCE_SUFFIXES), \
+      BIN := $(LANGTOOLS_OUTPUTDIR)/btclasses/bootstrap))
 
-        $(eval $(call SetupArchive,ARCHIVE_BOOTSTRAP_JAVAC,$(BUILD_BOOTSTRAP_LANGTOOLS),\
-		SRCS:=$(LANGTOOLS_OUTPUTDIR)/btclasses/bootstrap,\
-		JAR:=$(LANGTOOLS_OUTPUTDIR)/dist/bootstrap/lib/javac.jar,\
-		SUFFIXES:=.class $(RESOURCE_SUFFIXES)))
+  $(eval $(call SetupArchive,ARCHIVE_BOOTSTRAP_JAVAC, $(BUILD_BOOTSTRAP_LANGTOOLS), \
+      SRCS := $(LANGTOOLS_OUTPUTDIR)/btclasses/bootstrap, \
+      JAR := $(LANGTOOLS_OUTPUTDIR)/dist/bootstrap/lib/javac.jar, \
+      SUFFIXES := .class $(RESOURCE_SUFFIXES)))
 
-        # GenStubs is used to bootstrap any dependencies from javac to the new JDK that is not 
-        # yet built. It is currently not needed but might be again in the future. The following
-        # exercises the functionality to verify that it works.
-        TOOL_GENSTUBS_CMD=$(JAVA) \
-             "-Xbootclasspath/p:$(LANGTOOLS_OUTPUTDIR)/dist/bootstrap/lib/javac.jar" \
-             -classpath $(LANGTOOLS_OUTPUTDIR)/btclasses \
-             genstubs.GenStubs
-        # We fetch source from the JDK...
-        JDKS=$(JDK_TOPDIR)/src/share/classes
-        # Build the list of classes to generate stubs from. java/util/function/Predicate.java isn't
-        # currently needed, but is used as a demo for now.
-	 STUBSOURCES:=$(shell $(FIND) $(JDKS) -name "*.java" | $(GREP) \
-		    -e "$(JDKS)/java/util/function/Predicate.java")
-        # Rewrite the file names into class names because the GenStubs tool require this.
-        STUBCLASSES:=$(subst /,.,$(patsubst $(JDKS)/%.java,%,$(STUBSOURCES)))
+  # GenStubs is used to bootstrap any dependencies from javac to the new JDK that is not
+  # yet built. It is currently not needed but might be again in the future. The following
+  # exercises the functionality to verify that it works.
+  TOOL_GENSTUBS_CMD = $(JAVA) \
+       "-Xbootclasspath/p:$(LANGTOOLS_OUTPUTDIR)/dist/bootstrap/lib/javac.jar" \
+       -classpath $(LANGTOOLS_OUTPUTDIR)/btclasses \
+       genstubs.GenStubs
 
-        # Now setup the build recipe for genstubs.
-        $(LANGTOOLS_OUTPUTDIR)/genstubs/_the_stubs.d : $(STUBSOURCES) $(BUILD_TOOLS) \
-				$(LANGTOOLS_OUTPUTDIR)/dist/bootstrap/lib/javac.jar \
-				$(LANGTOOLS_OUTPUTDIR)/gensrc/_the_props.d
-	       	$(MKDIR) -p $(@D)
-		$(MKDIR) -p $(LANGTOOLS_OUTPUTDIR)/tmpstubs
-	       	$(ECHO) $(LOG_INFO) Generating stubs from JDK sources.
-	       	($(TOOL_GENSTUBS_CMD) -s $(LANGTOOLS_OUTPUTDIR)/tmpstubs -sourcepath $(JDKS) $(STUBCLASSES) && $(ECHO) STUBS_ARE_CREATED=yes > $@)
-		if $(DIFF) -x "_the*" -rq $(LANGTOOLS_OUTPUTDIR)/tmpstubs $(LANGTOOLS_OUTPUTDIR)/genstubs > /dev/null 2>&1; then \
-			$(ECHO) $(LOG_INFO) No changes in the stubs!; \
-			$(RM) -r $(LANGTOOLS_OUTPUTDIR)/tmpstubs; \
-		else \
-			$(ECHO) $(LOG_INFO) Changes in stubs detected!; \
-			$(RM) -r $(@D); \
-			$(MV) $(LANGTOOLS_OUTPUTDIR)/tmpstubs $(@D); \
-		fi
-		$(ECHO) STUBS_ARE_CREATED=yes > $@
+  # We fetch source from the JDK...
+  JDKS = $(JDK_TOPDIR)/src/share/classes
 
-        # Trigger a generation of the genstubs java source code and a restart
-        # of the makefile to make sure that the following build setup use the 
-        # newly created java files.
-        -include $(LANGTOOLS_OUTPUTDIR)/genstubs/_the_stubs.d
+  # Build the list of classes to generate stubs from. java/util/function/Predicate.java isn't
+  # currently needed, but is used as a demo for now.
 
-	ifeq ($(STUBS_ARE_CREATED),yes)
-                # Setup a compiler configuration using the intermediate javac in dist/bootstrap/lib/javac.jar
-                # that generates code for the new jdk that is being built.
-                # The code compiled by this compiler setup, cannot necessarily be run with the bootstrap jvm.
-                $(eval $(call SetupJavaCompiler,GENERATE_NEWBYTECODE,\
-                  JVM:=$(JAVA),\
-                  JAVAC:="-Xbootclasspath/p:$(LANGTOOLS_OUTPUTDIR)/dist/bootstrap/lib/javac.jar" \
-			 -cp $(LANGTOOLS_OUTPUTDIR)/dist/bootstrap/lib/javac.jar \
-			 com.sun.tools.javac.Main,\
-                  FLAGS:=-XDignore.symbol.file=true -Xlint:all$(COMMA)-deprecation -Werror,\
-                  SERVER_DIR:=$(SJAVAC_SERVER_DIR),\
-                  SERVER_JVM:=$(SJAVAC_SERVER_JAVA)))
+  STUBSOURCES := $(shell $(FIND) $(JDKS) -name "*.java" | $(GREP) \
+      -e "$(JDKS)/java/util/function/Predicate.java")
 
-                $(eval $(call SetupJavaCompilation,BUILD_FULL_JAVAC,\
-			SETUP:=GENERATE_NEWBYTECODE,\
-			SRC:=$(LANGTOOLS_TOPDIR)/src/share/classes $(LANGTOOLS_OUTPUTDIR)/gensrc \
-			     $(LANGTOOLS_OUTPUTDIR)/genstubs,\
-			EXCLUDES:=java/util java/io java/nio,\
-			COPY:=$(RESOURCE_SUFFIXES),\
-			BIN:=$(LANGTOOLS_OUTPUTDIR)/classes))
+  # Rewrite the file names into class names because the GenStubs tool require this.
+  STUBCLASSES := $(subst /,., $(patsubst $(JDKS)/%.java, %, $(STUBSOURCES)))
 
-                $(eval $(call SetupArchive,ARCHIVE_FULL_JAVAC,$(BUILD_FULL_JAVAC),\
-			SETUP:=GENERATE_NEWBYTECODE,\
-			SRCS:=$(LANGTOOLS_OUTPUTDIR)/classes,\
-			SUFFIXES:=.class $(RESOURCE_SUFFIXES),\
-			JAR:=$(LANGTOOLS_OUTPUTDIR)/dist/lib/classes.jar))
+  # Now setup the build recipe for genstubs.
+  $(LANGTOOLS_OUTPUTDIR)/genstubs/_the_stubs.d: $(STUBSOURCES) $(BUILD_TOOLS) \
+      $(LANGTOOLS_OUTPUTDIR)/dist/bootstrap/lib/javac.jar \
+      $(LANGTOOLS_OUTPUTDIR)/gensrc/_the_props.d
+	$(MKDIR) -p $(@D)
+	$(MKDIR) -p $(LANGTOOLS_OUTPUTDIR)/tmpstubs
+	$(ECHO) $(LOG_INFO) Generating stubs from JDK sources.
+	($(TOOL_GENSTUBS_CMD) -s $(LANGTOOLS_OUTPUTDIR)/tmpstubs -sourcepath $(JDKS) $(STUBCLASSES) && $(ECHO) STUBS_ARE_CREATED = yes > $@)
+	if $(DIFF) -x "_the*" -rq $(LANGTOOLS_OUTPUTDIR)/tmpstubs $(LANGTOOLS_OUTPUTDIR)/genstubs > /dev/null 2>&1; then \
+	  $(ECHO) $(LOG_INFO) No changes in the stubs!; \
+	  $(RM) -r $(LANGTOOLS_OUTPUTDIR)/tmpstubs; \
+	else \
+	  $(ECHO) $(LOG_INFO) Changes in stubs detected!; \
+	  $(RM) -r $(@D); \
+	  $(MV) $(LANGTOOLS_OUTPUTDIR)/tmpstubs $(@D); \
+	fi
+	$(ECHO) STUBS_ARE_CREATED = yes > $@
 
-                $(eval $(call SetupZipArchive,ZIP_FULL_JAVAC_SOURCE,\
-			SRC:=$(LANGTOOLS_TOPDIR)/src/share/classes $(LANGTOOLS_OUTPUTDIR)/gensrc,\
-			ZIP:=$(LANGTOOLS_OUTPUTDIR)/dist/lib/src.zip))
+  # Trigger a generation of the genstubs java source code and a restart
+  # of the makefile to make sure that the following build setup use the
+  # newly created java files.
+  -include $(LANGTOOLS_OUTPUTDIR)/genstubs/_the_stubs.d
 
-                all: 		$(LANGTOOLS_OUTPUTDIR)/dist/lib/classes.jar \
-				$(LANGTOOLS_OUTPUTDIR)/dist/lib/src.zip \
-	                 	$(LANGTOOLS_OUTPUTDIR)/dist/bootstrap/lib/javac.jar
+  ifeq ($(STUBS_ARE_CREATED), yes)
+    # Setup a compiler configuration using the intermediate javac in dist/bootstrap/lib/javac.jar
+    # that generates code for the new jdk that is being built.
+    # The code compiled by this compiler setup, cannot necessarily be run with the bootstrap jvm.
+    $(eval $(call SetupJavaCompiler,GENERATE_NEWBYTECODE, \
+        JVM := $(JAVA), \
+        JAVAC := "-Xbootclasspath/p:$(LANGTOOLS_OUTPUTDIR)/dist/bootstrap/lib/javac.jar" \
+            -cp $(LANGTOOLS_OUTPUTDIR)/dist/bootstrap/lib/javac.jar \
+            com.sun.tools.javac.Main, \
+        FLAGS := -XDignore.symbol.file=true -Xlint:all$(COMMA)-deprecation -Werror, \
+        SERVER_DIR := $(SJAVAC_SERVER_DIR), \
+        SERVER_JVM := $(SJAVAC_SERVER_JAVA)))
 
-        endif
+    $(eval $(call SetupJavaCompilation,BUILD_FULL_JAVAC, \
+        SETUP := GENERATE_NEWBYTECODE, \
+        SRC := $(LANGTOOLS_TOPDIR)/src/share/classes $(LANGTOOLS_OUTPUTDIR)/gensrc \
+            $(LANGTOOLS_OUTPUTDIR)/genstubs, \
+        EXCLUDES := java/util java/io java/nio, \
+        COPY := $(RESOURCE_SUFFIXES), \
+        BIN := $(LANGTOOLS_OUTPUTDIR)/classes))
+
+    $(eval $(call SetupArchive,ARCHIVE_FULL_JAVAC, $(BUILD_FULL_JAVAC), \
+        SETUP := GENERATE_NEWBYTECODE, \
+        SRCS := $(LANGTOOLS_OUTPUTDIR)/classes, \
+        SUFFIXES := .class $(RESOURCE_SUFFIXES), \
+        JAR := $(LANGTOOLS_OUTPUTDIR)/dist/lib/classes.jar))
+
+    $(eval $(call SetupZipArchive,ZIP_FULL_JAVAC_SOURCE, \
+        SRC := $(LANGTOOLS_TOPDIR)/src/share/classes $(LANGTOOLS_OUTPUTDIR)/gensrc, \
+        ZIP := $(LANGTOOLS_OUTPUTDIR)/dist/lib/src.zip))
+
+    all: $(LANGTOOLS_OUTPUTDIR)/dist/lib/classes.jar \
+        $(LANGTOOLS_OUTPUTDIR)/dist/lib/src.zip \
+        $(LANGTOOLS_OUTPUTDIR)/dist/bootstrap/lib/javac.jar
+
+  endif
 endif
diff --git a/langtools/makefiles/Makefile b/langtools/makefiles/Makefile
index 9539fe0..c7d0dd0 100644
--- a/langtools/makefiles/Makefile
+++ b/langtools/makefiles/Makefile
@@ -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 ===================================================)
diff --git a/langtools/src/share/classes/com/sun/source/doctree/AttributeTree.java b/langtools/src/share/classes/com/sun/source/doctree/AttributeTree.java
index aa757f6..1ef1d63 100644
--- a/langtools/src/share/classes/com/sun/source/doctree/AttributeTree.java
+++ b/langtools/src/share/classes/com/sun/source/doctree/AttributeTree.java
@@ -33,9 +33,9 @@
  *
  * @since 1.8
  */
-@jdk.Supported
+@jdk.Exported
 public interface AttributeTree extends DocTree {
-    @jdk.Supported
+    @jdk.Exported
     enum ValueKind { EMPTY, UNQUOTED, SINGLE, DOUBLE };
 
     Name getName();
diff --git a/langtools/src/share/classes/com/sun/source/doctree/AuthorTree.java b/langtools/src/share/classes/com/sun/source/doctree/AuthorTree.java
index 7391fd2..5df14f3 100644
--- a/langtools/src/share/classes/com/sun/source/doctree/AuthorTree.java
+++ b/langtools/src/share/classes/com/sun/source/doctree/AuthorTree.java
@@ -35,7 +35,7 @@
  *
  * @since 1.8
  */
-@jdk.Supported
+@jdk.Exported
 public interface AuthorTree extends BlockTagTree {
     List<? extends DocTree> getName();
 }
diff --git a/langtools/src/share/classes/com/sun/source/doctree/BlockTagTree.java b/langtools/src/share/classes/com/sun/source/doctree/BlockTagTree.java
index 0af9fc5..9f70939 100644
--- a/langtools/src/share/classes/com/sun/source/doctree/BlockTagTree.java
+++ b/langtools/src/share/classes/com/sun/source/doctree/BlockTagTree.java
@@ -31,7 +31,7 @@
  *
  * @since 1.8
  */
-@jdk.Supported
+@jdk.Exported
 public interface BlockTagTree extends DocTree {
     String getTagName();
 }
diff --git a/langtools/src/share/classes/com/sun/source/doctree/CommentTree.java b/langtools/src/share/classes/com/sun/source/doctree/CommentTree.java
index a4ad14f..c821c12 100644
--- a/langtools/src/share/classes/com/sun/source/doctree/CommentTree.java
+++ b/langtools/src/share/classes/com/sun/source/doctree/CommentTree.java
@@ -33,7 +33,7 @@
  *
  * @since 1.8
  */
-@jdk.Supported
+@jdk.Exported
 public interface CommentTree extends DocTree {
     String getBody();
 }
diff --git a/langtools/src/share/classes/com/sun/source/doctree/DeprecatedTree.java b/langtools/src/share/classes/com/sun/source/doctree/DeprecatedTree.java
index 974b9b5..6757f43 100644
--- a/langtools/src/share/classes/com/sun/source/doctree/DeprecatedTree.java
+++ b/langtools/src/share/classes/com/sun/source/doctree/DeprecatedTree.java
@@ -35,7 +35,7 @@
  *
  * @since 1.8
  */
-@jdk.Supported
+@jdk.Exported
 public interface DeprecatedTree extends BlockTagTree {
     List<? extends DocTree> getBody();
 }
diff --git a/langtools/src/share/classes/com/sun/source/doctree/DocCommentTree.java b/langtools/src/share/classes/com/sun/source/doctree/DocCommentTree.java
index 903f76f..8c55e69 100644
--- a/langtools/src/share/classes/com/sun/source/doctree/DocCommentTree.java
+++ b/langtools/src/share/classes/com/sun/source/doctree/DocCommentTree.java
@@ -35,7 +35,7 @@
  *
  * @since 1.8
  */
-@jdk.Supported
+@jdk.Exported
 public interface DocCommentTree extends DocTree {
     List<? extends DocTree> getFirstSentence();
     List<? extends DocTree> getBody();
diff --git a/langtools/src/share/classes/com/sun/source/doctree/DocRootTree.java b/langtools/src/share/classes/com/sun/source/doctree/DocRootTree.java
index 7e01e54..e0c3c91 100644
--- a/langtools/src/share/classes/com/sun/source/doctree/DocRootTree.java
+++ b/langtools/src/share/classes/com/sun/source/doctree/DocRootTree.java
@@ -33,5 +33,5 @@
  *
  * @since 1.8
  */
-@jdk.Supported
+@jdk.Exported
 public interface DocRootTree extends InlineTagTree { }
diff --git a/langtools/src/share/classes/com/sun/source/doctree/DocTree.java b/langtools/src/share/classes/com/sun/source/doctree/DocTree.java
index 4f1cc00..b6269d4 100644
--- a/langtools/src/share/classes/com/sun/source/doctree/DocTree.java
+++ b/langtools/src/share/classes/com/sun/source/doctree/DocTree.java
@@ -30,9 +30,9 @@
  *
  * @since 1.8
  */
-@jdk.Supported
+@jdk.Exported
 public interface DocTree {
-    @jdk.Supported
+    @jdk.Exported
     enum Kind {
         /**
          * Used for instances of {@link AttributeTree}
diff --git a/langtools/src/share/classes/com/sun/source/doctree/DocTreeVisitor.java b/langtools/src/share/classes/com/sun/source/doctree/DocTreeVisitor.java
index 71b548e..67e67f8 100644
--- a/langtools/src/share/classes/com/sun/source/doctree/DocTreeVisitor.java
+++ b/langtools/src/share/classes/com/sun/source/doctree/DocTreeVisitor.java
@@ -54,7 +54,7 @@
  *
  * @since 1.8
  */
-@jdk.Supported
+@jdk.Exported
 public interface DocTreeVisitor<R,P> {
     R visitAttribute(AttributeTree node, P p);
     R visitAuthor(AuthorTree node, P p);
diff --git a/langtools/src/share/classes/com/sun/source/doctree/EndElementTree.java b/langtools/src/share/classes/com/sun/source/doctree/EndElementTree.java
index ae01e34..9e201b0 100644
--- a/langtools/src/share/classes/com/sun/source/doctree/EndElementTree.java
+++ b/langtools/src/share/classes/com/sun/source/doctree/EndElementTree.java
@@ -35,7 +35,7 @@
  *
  * @since 1.8
  */
-@jdk.Supported
+@jdk.Exported
 public interface EndElementTree extends DocTree {
     Name getName();
 }
diff --git a/langtools/src/share/classes/com/sun/source/doctree/EntityTree.java b/langtools/src/share/classes/com/sun/source/doctree/EntityTree.java
index fb86c6d..d9bbed8 100644
--- a/langtools/src/share/classes/com/sun/source/doctree/EntityTree.java
+++ b/langtools/src/share/classes/com/sun/source/doctree/EntityTree.java
@@ -36,7 +36,7 @@
  *
  * @since 1.8
  */
-@jdk.Supported
+@jdk.Exported
 public interface EntityTree extends DocTree {
     Name getName();
 }
diff --git a/langtools/src/share/classes/com/sun/source/doctree/ErroneousTree.java b/langtools/src/share/classes/com/sun/source/doctree/ErroneousTree.java
index 0229294..ea5e632 100644
--- a/langtools/src/share/classes/com/sun/source/doctree/ErroneousTree.java
+++ b/langtools/src/share/classes/com/sun/source/doctree/ErroneousTree.java
@@ -32,7 +32,7 @@
  *
  * @since 1.8
  */
-@jdk.Supported
+@jdk.Exported
 public interface ErroneousTree extends TextTree {
     /**
      * Gets a diagnostic object giving details about
diff --git a/langtools/src/share/classes/com/sun/source/doctree/IdentifierTree.java b/langtools/src/share/classes/com/sun/source/doctree/IdentifierTree.java
index 5257cbf..73419d7 100644
--- a/langtools/src/share/classes/com/sun/source/doctree/IdentifierTree.java
+++ b/langtools/src/share/classes/com/sun/source/doctree/IdentifierTree.java
@@ -35,7 +35,7 @@
  *
  * @since 1.8
  */
-@jdk.Supported
+@jdk.Exported
 public interface IdentifierTree extends DocTree {
     Name getName();
 }
diff --git a/langtools/src/share/classes/com/sun/source/doctree/InheritDocTree.java b/langtools/src/share/classes/com/sun/source/doctree/InheritDocTree.java
index b853d6a8..444558a 100644
--- a/langtools/src/share/classes/com/sun/source/doctree/InheritDocTree.java
+++ b/langtools/src/share/classes/com/sun/source/doctree/InheritDocTree.java
@@ -34,5 +34,5 @@
  *
  * @since 1.8
  */
-@jdk.Supported
+@jdk.Exported
 public interface InheritDocTree extends InlineTagTree { }
diff --git a/langtools/src/share/classes/com/sun/source/doctree/InlineTagTree.java b/langtools/src/share/classes/com/sun/source/doctree/InlineTagTree.java
index 411b04e..7b8ec24 100644
--- a/langtools/src/share/classes/com/sun/source/doctree/InlineTagTree.java
+++ b/langtools/src/share/classes/com/sun/source/doctree/InlineTagTree.java
@@ -31,7 +31,7 @@
  *
  * @since 1.8
  */
-@jdk.Supported
+@jdk.Exported
 public interface InlineTagTree extends DocTree {
     String getTagName();
 }
diff --git a/langtools/src/share/classes/com/sun/source/doctree/LinkTree.java b/langtools/src/share/classes/com/sun/source/doctree/LinkTree.java
index 4c7c687..ba7d6e9 100644
--- a/langtools/src/share/classes/com/sun/source/doctree/LinkTree.java
+++ b/langtools/src/share/classes/com/sun/source/doctree/LinkTree.java
@@ -36,7 +36,7 @@
  *
  * @since 1.8
  */
-@jdk.Supported
+@jdk.Exported
 public interface LinkTree extends InlineTagTree {
     ReferenceTree getReference();
     List<? extends DocTree> getLabel();
diff --git a/langtools/src/share/classes/com/sun/source/doctree/LiteralTree.java b/langtools/src/share/classes/com/sun/source/doctree/LiteralTree.java
index b2cd282..6c5d0d8 100644
--- a/langtools/src/share/classes/com/sun/source/doctree/LiteralTree.java
+++ b/langtools/src/share/classes/com/sun/source/doctree/LiteralTree.java
@@ -34,7 +34,7 @@
  *
  * @since 1.8
  */
-@jdk.Supported
+@jdk.Exported
 public interface LiteralTree extends InlineTagTree {
     TextTree getBody();
 }
diff --git a/langtools/src/share/classes/com/sun/source/doctree/ParamTree.java b/langtools/src/share/classes/com/sun/source/doctree/ParamTree.java
index f0090bb..6793531 100644
--- a/langtools/src/share/classes/com/sun/source/doctree/ParamTree.java
+++ b/langtools/src/share/classes/com/sun/source/doctree/ParamTree.java
@@ -35,7 +35,7 @@
  *
  * @since 1.8
  */
-@jdk.Supported
+@jdk.Exported
 public interface ParamTree extends BlockTagTree {
     boolean isTypeParameter();
     IdentifierTree getName();
diff --git a/langtools/src/share/classes/com/sun/source/doctree/ReferenceTree.java b/langtools/src/share/classes/com/sun/source/doctree/ReferenceTree.java
index 0bbfcdc..76a0311 100644
--- a/langtools/src/share/classes/com/sun/source/doctree/ReferenceTree.java
+++ b/langtools/src/share/classes/com/sun/source/doctree/ReferenceTree.java
@@ -33,7 +33,7 @@
  *
  * @since 1.8
  */
-@jdk.Supported
+@jdk.Exported
 public interface ReferenceTree extends DocTree {
     String getSignature();
 }
diff --git a/langtools/src/share/classes/com/sun/source/doctree/ReturnTree.java b/langtools/src/share/classes/com/sun/source/doctree/ReturnTree.java
index e948ca9..72bdf5b 100644
--- a/langtools/src/share/classes/com/sun/source/doctree/ReturnTree.java
+++ b/langtools/src/share/classes/com/sun/source/doctree/ReturnTree.java
@@ -35,7 +35,7 @@
  *
  * @since 1.8
  */
-@jdk.Supported
+@jdk.Exported
 public interface ReturnTree extends BlockTagTree {
     List<? extends DocTree> getDescription();
 }
diff --git a/langtools/src/share/classes/com/sun/source/doctree/SeeTree.java b/langtools/src/share/classes/com/sun/source/doctree/SeeTree.java
index 8d09ff2..1ddac77 100644
--- a/langtools/src/share/classes/com/sun/source/doctree/SeeTree.java
+++ b/langtools/src/share/classes/com/sun/source/doctree/SeeTree.java
@@ -38,7 +38,7 @@
  *
  * @since 1.8
  */
-@jdk.Supported
+@jdk.Exported
 public interface SeeTree extends BlockTagTree {
     List<? extends DocTree> getReference();
 }
diff --git a/langtools/src/share/classes/com/sun/source/doctree/SerialDataTree.java b/langtools/src/share/classes/com/sun/source/doctree/SerialDataTree.java
index 2044f5d..b281e37 100644
--- a/langtools/src/share/classes/com/sun/source/doctree/SerialDataTree.java
+++ b/langtools/src/share/classes/com/sun/source/doctree/SerialDataTree.java
@@ -35,7 +35,7 @@
  *
  * @since 1.8
  */
-@jdk.Supported
+@jdk.Exported
 public interface SerialDataTree extends BlockTagTree {
     List<? extends DocTree> getDescription();
 }
diff --git a/langtools/src/share/classes/com/sun/source/doctree/SerialFieldTree.java b/langtools/src/share/classes/com/sun/source/doctree/SerialFieldTree.java
index cae5ff9..6ea77ba 100644
--- a/langtools/src/share/classes/com/sun/source/doctree/SerialFieldTree.java
+++ b/langtools/src/share/classes/com/sun/source/doctree/SerialFieldTree.java
@@ -35,7 +35,7 @@
  *
  * @since 1.8
  */
-@jdk.Supported
+@jdk.Exported
 public interface SerialFieldTree extends BlockTagTree {
     IdentifierTree getName();
     ReferenceTree getType();
diff --git a/langtools/src/share/classes/com/sun/source/doctree/SerialTree.java b/langtools/src/share/classes/com/sun/source/doctree/SerialTree.java
index c95ae9b..3812569 100644
--- a/langtools/src/share/classes/com/sun/source/doctree/SerialTree.java
+++ b/langtools/src/share/classes/com/sun/source/doctree/SerialTree.java
@@ -35,7 +35,7 @@
  *
  * @since 1.8
  */
-@jdk.Supported
+@jdk.Exported
 public interface SerialTree extends BlockTagTree {
     List<? extends DocTree> getDescription();
 }
diff --git a/langtools/src/share/classes/com/sun/source/doctree/SinceTree.java b/langtools/src/share/classes/com/sun/source/doctree/SinceTree.java
index f6600d0..d21be4c 100644
--- a/langtools/src/share/classes/com/sun/source/doctree/SinceTree.java
+++ b/langtools/src/share/classes/com/sun/source/doctree/SinceTree.java
@@ -35,7 +35,7 @@
  *
  * @since 1.8
  */
-@jdk.Supported
+@jdk.Exported
 public interface SinceTree extends BlockTagTree {
     List<? extends DocTree> getBody();
 }
diff --git a/langtools/src/share/classes/com/sun/source/doctree/StartElementTree.java b/langtools/src/share/classes/com/sun/source/doctree/StartElementTree.java
index e72e21d..1bac6e5 100644
--- a/langtools/src/share/classes/com/sun/source/doctree/StartElementTree.java
+++ b/langtools/src/share/classes/com/sun/source/doctree/StartElementTree.java
@@ -36,7 +36,7 @@
  *
  * @since 1.8
  */
-@jdk.Supported
+@jdk.Exported
 public interface StartElementTree extends DocTree {
     Name getName();
     List<? extends DocTree> getAttributes();
diff --git a/langtools/src/share/classes/com/sun/source/doctree/TextTree.java b/langtools/src/share/classes/com/sun/source/doctree/TextTree.java
index 40fcf37..1d03109 100644
--- a/langtools/src/share/classes/com/sun/source/doctree/TextTree.java
+++ b/langtools/src/share/classes/com/sun/source/doctree/TextTree.java
@@ -30,7 +30,7 @@
  *
  * @since 1.8
  */
-@jdk.Supported
+@jdk.Exported
 public interface TextTree extends DocTree {
     String getBody();
 }
diff --git a/langtools/src/share/classes/com/sun/source/doctree/ThrowsTree.java b/langtools/src/share/classes/com/sun/source/doctree/ThrowsTree.java
index c86729c..cde8360 100644
--- a/langtools/src/share/classes/com/sun/source/doctree/ThrowsTree.java
+++ b/langtools/src/share/classes/com/sun/source/doctree/ThrowsTree.java
@@ -38,7 +38,7 @@
  *
  * @since 1.8
  */
-@jdk.Supported
+@jdk.Exported
 public interface ThrowsTree extends BlockTagTree {
     ReferenceTree getExceptionName();
     List<? extends DocTree> getDescription();
diff --git a/langtools/src/share/classes/com/sun/source/doctree/UnknownBlockTagTree.java b/langtools/src/share/classes/com/sun/source/doctree/UnknownBlockTagTree.java
index 113691e..701cdbf 100644
--- a/langtools/src/share/classes/com/sun/source/doctree/UnknownBlockTagTree.java
+++ b/langtools/src/share/classes/com/sun/source/doctree/UnknownBlockTagTree.java
@@ -35,7 +35,7 @@
  * @since 1.8
  *
  */
-@jdk.Supported
+@jdk.Exported
 public interface UnknownBlockTagTree extends BlockTagTree {
     List<? extends DocTree> getContent();
 }
diff --git a/langtools/src/share/classes/com/sun/source/doctree/UnknownInlineTagTree.java b/langtools/src/share/classes/com/sun/source/doctree/UnknownInlineTagTree.java
index f9072ff..a67b6e8 100644
--- a/langtools/src/share/classes/com/sun/source/doctree/UnknownInlineTagTree.java
+++ b/langtools/src/share/classes/com/sun/source/doctree/UnknownInlineTagTree.java
@@ -35,7 +35,7 @@
  * @since 1.8
  *
  */
-@jdk.Supported
+@jdk.Exported
 public interface UnknownInlineTagTree extends InlineTagTree {
     List<? extends DocTree> getContent();
 }
diff --git a/langtools/src/share/classes/com/sun/source/doctree/ValueTree.java b/langtools/src/share/classes/com/sun/source/doctree/ValueTree.java
index 91f6373..bc7f2f9 100644
--- a/langtools/src/share/classes/com/sun/source/doctree/ValueTree.java
+++ b/langtools/src/share/classes/com/sun/source/doctree/ValueTree.java
@@ -33,7 +33,7 @@
  *
  * @since 1.8
  */
-@jdk.Supported
+@jdk.Exported
 public interface ValueTree extends InlineTagTree {
     ReferenceTree getReference();
 }
diff --git a/langtools/src/share/classes/com/sun/source/doctree/VersionTree.java b/langtools/src/share/classes/com/sun/source/doctree/VersionTree.java
index d36ba1e..b54ddeb 100644
--- a/langtools/src/share/classes/com/sun/source/doctree/VersionTree.java
+++ b/langtools/src/share/classes/com/sun/source/doctree/VersionTree.java
@@ -36,7 +36,7 @@
  *
  * @since 1.8
  */
-@jdk.Supported
+@jdk.Exported
 public interface VersionTree extends BlockTagTree {
     List<? extends DocTree> getBody();
 }
diff --git a/langtools/src/share/classes/com/sun/source/doctree/package-info.java b/langtools/src/share/classes/com/sun/source/doctree/package-info.java
index 888fb79..96767e6 100644
--- a/langtools/src/share/classes/com/sun/source/doctree/package-info.java
+++ b/langtools/src/share/classes/com/sun/source/doctree/package-info.java
@@ -31,5 +31,5 @@
  * @since 1.8
  * @see <a href="http://download.oracle.com/javase/6/docs/technotes/tools/solaris/javadoc.html#javadoctags">http://download.oracle.com/javase/6/docs/technotes/tools/solaris/javadoc.html#javadoctags</a>
  */
-@jdk.Supported
+@jdk.Exported
 package com.sun.source.doctree;
diff --git a/langtools/src/share/classes/com/sun/source/tree/AnnotatedTypeTree.java b/langtools/src/share/classes/com/sun/source/tree/AnnotatedTypeTree.java
index f9f3014..37fc95b 100644
--- a/langtools/src/share/classes/com/sun/source/tree/AnnotatedTypeTree.java
+++ b/langtools/src/share/classes/com/sun/source/tree/AnnotatedTypeTree.java
@@ -41,7 +41,7 @@
  * @author Mahmood Ali
  * @since 1.8
  */
-@jdk.Supported
+@jdk.Exported
 public interface AnnotatedTypeTree extends ExpressionTree {
     List<? extends AnnotationTree> getAnnotations();
     ExpressionTree getUnderlyingType();
diff --git a/langtools/src/share/classes/com/sun/source/tree/AnnotationTree.java b/langtools/src/share/classes/com/sun/source/tree/AnnotationTree.java
index 5a785ee..01c6c42 100644
--- a/langtools/src/share/classes/com/sun/source/tree/AnnotationTree.java
+++ b/langtools/src/share/classes/com/sun/source/tree/AnnotationTree.java
@@ -42,7 +42,7 @@
  * @author Jonathan Gibbons
  * @since 1.6
  */
-@jdk.Supported
+@jdk.Exported
 public interface AnnotationTree extends ExpressionTree {
     Tree getAnnotationType();
     List<? extends ExpressionTree> getArguments();
diff --git a/langtools/src/share/classes/com/sun/source/tree/ArrayAccessTree.java b/langtools/src/share/classes/com/sun/source/tree/ArrayAccessTree.java
index 97696c6..a8c9699 100644
--- a/langtools/src/share/classes/com/sun/source/tree/ArrayAccessTree.java
+++ b/langtools/src/share/classes/com/sun/source/tree/ArrayAccessTree.java
@@ -39,7 +39,7 @@
  * @author Jonathan Gibbons
  * @since 1.6
  */
-@jdk.Supported
+@jdk.Exported
 public interface ArrayAccessTree extends ExpressionTree {
     ExpressionTree getExpression();
     ExpressionTree getIndex();
diff --git a/langtools/src/share/classes/com/sun/source/tree/ArrayTypeTree.java b/langtools/src/share/classes/com/sun/source/tree/ArrayTypeTree.java
index b6275be..c253a3b 100644
--- a/langtools/src/share/classes/com/sun/source/tree/ArrayTypeTree.java
+++ b/langtools/src/share/classes/com/sun/source/tree/ArrayTypeTree.java
@@ -39,7 +39,7 @@
  * @author Jonathan Gibbons
  * @since 1.6
  */
-@jdk.Supported
+@jdk.Exported
 public interface ArrayTypeTree extends Tree {
     Tree getType();
 }
diff --git a/langtools/src/share/classes/com/sun/source/tree/AssertTree.java b/langtools/src/share/classes/com/sun/source/tree/AssertTree.java
index 90ca3c5..f2c824e 100644
--- a/langtools/src/share/classes/com/sun/source/tree/AssertTree.java
+++ b/langtools/src/share/classes/com/sun/source/tree/AssertTree.java
@@ -41,7 +41,7 @@
  * @author Jonathan Gibbons
  * @since 1.6
  */
-@jdk.Supported
+@jdk.Exported
 public interface AssertTree extends StatementTree {
     ExpressionTree getCondition();
     ExpressionTree getDetail();
diff --git a/langtools/src/share/classes/com/sun/source/tree/AssignmentTree.java b/langtools/src/share/classes/com/sun/source/tree/AssignmentTree.java
index a2cc602..63f671f 100644
--- a/langtools/src/share/classes/com/sun/source/tree/AssignmentTree.java
+++ b/langtools/src/share/classes/com/sun/source/tree/AssignmentTree.java
@@ -39,7 +39,7 @@
  * @author Jonathan Gibbons
  * @since 1.6
  */
-@jdk.Supported
+@jdk.Exported
 public interface AssignmentTree extends ExpressionTree {
     ExpressionTree getVariable();
     ExpressionTree getExpression();
diff --git a/langtools/src/share/classes/com/sun/source/tree/BinaryTree.java b/langtools/src/share/classes/com/sun/source/tree/BinaryTree.java
index 9767c0e..f280fc1 100644
--- a/langtools/src/share/classes/com/sun/source/tree/BinaryTree.java
+++ b/langtools/src/share/classes/com/sun/source/tree/BinaryTree.java
@@ -40,7 +40,7 @@
  * @author Jonathan Gibbons
  * @since 1.6
  */
-@jdk.Supported
+@jdk.Exported
 public interface BinaryTree extends ExpressionTree {
     ExpressionTree getLeftOperand();
     ExpressionTree getRightOperand();
diff --git a/langtools/src/share/classes/com/sun/source/tree/BlockTree.java b/langtools/src/share/classes/com/sun/source/tree/BlockTree.java
index 278e257..8d15bd7 100644
--- a/langtools/src/share/classes/com/sun/source/tree/BlockTree.java
+++ b/langtools/src/share/classes/com/sun/source/tree/BlockTree.java
@@ -45,7 +45,7 @@
  * @author Jonathan Gibbons
  * @since 1.6
  */
-@jdk.Supported
+@jdk.Exported
 public interface BlockTree extends StatementTree {
     boolean isStatic();
     List<? extends StatementTree> getStatements();
diff --git a/langtools/src/share/classes/com/sun/source/tree/BreakTree.java b/langtools/src/share/classes/com/sun/source/tree/BreakTree.java
index f07eda0..c51731b 100644
--- a/langtools/src/share/classes/com/sun/source/tree/BreakTree.java
+++ b/langtools/src/share/classes/com/sun/source/tree/BreakTree.java
@@ -43,7 +43,7 @@
  * @author Jonathan Gibbons
  * @since 1.6
  */
-@jdk.Supported
+@jdk.Exported
 public interface BreakTree extends StatementTree {
     Name getLabel();
 }
diff --git a/langtools/src/share/classes/com/sun/source/tree/CaseTree.java b/langtools/src/share/classes/com/sun/source/tree/CaseTree.java
index 5dc5b78..01e61c3 100644
--- a/langtools/src/share/classes/com/sun/source/tree/CaseTree.java
+++ b/langtools/src/share/classes/com/sun/source/tree/CaseTree.java
@@ -45,7 +45,7 @@
  * @author Jonathan Gibbons
  * @since 1.6
  */
-@jdk.Supported
+@jdk.Exported
 public interface CaseTree extends Tree {
     /**
      * @return null if and only if this Case is {@code default:}
diff --git a/langtools/src/share/classes/com/sun/source/tree/CatchTree.java b/langtools/src/share/classes/com/sun/source/tree/CatchTree.java
index 6e68963..f2a5452 100644
--- a/langtools/src/share/classes/com/sun/source/tree/CatchTree.java
+++ b/langtools/src/share/classes/com/sun/source/tree/CatchTree.java
@@ -40,7 +40,7 @@
  * @author Jonathan Gibbons
  * @since 1.6
  */
-@jdk.Supported
+@jdk.Exported
 public interface CatchTree extends Tree {
     VariableTree getParameter();
     BlockTree getBlock();
diff --git a/langtools/src/share/classes/com/sun/source/tree/ClassTree.java b/langtools/src/share/classes/com/sun/source/tree/ClassTree.java
index f675b27..9a2303f 100644
--- a/langtools/src/share/classes/com/sun/source/tree/ClassTree.java
+++ b/langtools/src/share/classes/com/sun/source/tree/ClassTree.java
@@ -48,7 +48,7 @@
  * @author Jonathan Gibbons
  * @since 1.6
  */
-@jdk.Supported
+@jdk.Exported
 public interface ClassTree extends StatementTree {
     ModifiersTree getModifiers();
     Name getSimpleName();
diff --git a/langtools/src/share/classes/com/sun/source/tree/CompilationUnitTree.java b/langtools/src/share/classes/com/sun/source/tree/CompilationUnitTree.java
index 086b71f..9ded6b6 100644
--- a/langtools/src/share/classes/com/sun/source/tree/CompilationUnitTree.java
+++ b/langtools/src/share/classes/com/sun/source/tree/CompilationUnitTree.java
@@ -37,7 +37,7 @@
  * @author Peter von der Ah&eacute;
  * @since 1.6
  */
-@jdk.Supported
+@jdk.Exported
 public interface CompilationUnitTree extends Tree {
     List<? extends AnnotationTree> getPackageAnnotations();
     ExpressionTree getPackageName();
diff --git a/langtools/src/share/classes/com/sun/source/tree/CompoundAssignmentTree.java b/langtools/src/share/classes/com/sun/source/tree/CompoundAssignmentTree.java
index 9ca04da..d3dca97 100644
--- a/langtools/src/share/classes/com/sun/source/tree/CompoundAssignmentTree.java
+++ b/langtools/src/share/classes/com/sun/source/tree/CompoundAssignmentTree.java
@@ -40,7 +40,7 @@
  * @author Jonathan Gibbons
  * @since 1.6
  */
-@jdk.Supported
+@jdk.Exported
 public interface CompoundAssignmentTree extends ExpressionTree {
     ExpressionTree getVariable();
     ExpressionTree getExpression();
diff --git a/langtools/src/share/classes/com/sun/source/tree/ConditionalExpressionTree.java b/langtools/src/share/classes/com/sun/source/tree/ConditionalExpressionTree.java
index b2ce400..b50a6a3 100644
--- a/langtools/src/share/classes/com/sun/source/tree/ConditionalExpressionTree.java
+++ b/langtools/src/share/classes/com/sun/source/tree/ConditionalExpressionTree.java
@@ -39,7 +39,7 @@
  * @author Jonathan Gibbons
  * @since 1.6
  */
-@jdk.Supported
+@jdk.Exported
 public interface ConditionalExpressionTree extends ExpressionTree {
     ExpressionTree getCondition();
     ExpressionTree getTrueExpression();
diff --git a/langtools/src/share/classes/com/sun/source/tree/ContinueTree.java b/langtools/src/share/classes/com/sun/source/tree/ContinueTree.java
index 0634957..6dd9992 100644
--- a/langtools/src/share/classes/com/sun/source/tree/ContinueTree.java
+++ b/langtools/src/share/classes/com/sun/source/tree/ContinueTree.java
@@ -42,7 +42,7 @@
  * @author Jonathan Gibbons
  * @since 1.6
  */
-@jdk.Supported
+@jdk.Exported
 public interface ContinueTree extends StatementTree {
     Name getLabel();
 }
diff --git a/langtools/src/share/classes/com/sun/source/tree/DoWhileLoopTree.java b/langtools/src/share/classes/com/sun/source/tree/DoWhileLoopTree.java
index d6a1837..ef59fbe 100644
--- a/langtools/src/share/classes/com/sun/source/tree/DoWhileLoopTree.java
+++ b/langtools/src/share/classes/com/sun/source/tree/DoWhileLoopTree.java
@@ -41,7 +41,7 @@
  * @author Jonathan Gibbons
  * @since 1.6
  */
-@jdk.Supported
+@jdk.Exported
 public interface DoWhileLoopTree extends StatementTree {
     ExpressionTree getCondition();
     StatementTree getStatement();
diff --git a/langtools/src/share/classes/com/sun/source/tree/EmptyStatementTree.java b/langtools/src/share/classes/com/sun/source/tree/EmptyStatementTree.java
index 1882685..6548eaf 100644
--- a/langtools/src/share/classes/com/sun/source/tree/EmptyStatementTree.java
+++ b/langtools/src/share/classes/com/sun/source/tree/EmptyStatementTree.java
@@ -39,5 +39,5 @@
  * @author Jonathan Gibbons
  * @since 1.6
  */
-@jdk.Supported
+@jdk.Exported
 public interface EmptyStatementTree extends StatementTree {}
diff --git a/langtools/src/share/classes/com/sun/source/tree/EnhancedForLoopTree.java b/langtools/src/share/classes/com/sun/source/tree/EnhancedForLoopTree.java
index 9f2051a..943b762 100644
--- a/langtools/src/share/classes/com/sun/source/tree/EnhancedForLoopTree.java
+++ b/langtools/src/share/classes/com/sun/source/tree/EnhancedForLoopTree.java
@@ -40,7 +40,7 @@
  * @author Jonathan Gibbons
  * @since 1.6
  */
-@jdk.Supported
+@jdk.Exported
 public interface EnhancedForLoopTree extends StatementTree {
     VariableTree getVariable();
     ExpressionTree getExpression();
diff --git a/langtools/src/share/classes/com/sun/source/tree/ErroneousTree.java b/langtools/src/share/classes/com/sun/source/tree/ErroneousTree.java
index 8591cc3..36748b4 100644
--- a/langtools/src/share/classes/com/sun/source/tree/ErroneousTree.java
+++ b/langtools/src/share/classes/com/sun/source/tree/ErroneousTree.java
@@ -34,7 +34,7 @@
  * @author Jonathan Gibbons
  * @since 1.6
  */
-@jdk.Supported
+@jdk.Exported
 public interface ErroneousTree extends ExpressionTree {
     List<? extends Tree> getErrorTrees();
 }
diff --git a/langtools/src/share/classes/com/sun/source/tree/ExpressionStatementTree.java b/langtools/src/share/classes/com/sun/source/tree/ExpressionStatementTree.java
index cc78a8b..3eab1f8 100644
--- a/langtools/src/share/classes/com/sun/source/tree/ExpressionStatementTree.java
+++ b/langtools/src/share/classes/com/sun/source/tree/ExpressionStatementTree.java
@@ -39,7 +39,7 @@
  * @author Jonathan Gibbons
  * @since 1.6
  */
-@jdk.Supported
+@jdk.Exported
 public interface ExpressionStatementTree extends StatementTree {
     ExpressionTree getExpression();
 }
diff --git a/langtools/src/share/classes/com/sun/source/tree/ExpressionTree.java b/langtools/src/share/classes/com/sun/source/tree/ExpressionTree.java
index d0e9b40..f3a7ed3 100644
--- a/langtools/src/share/classes/com/sun/source/tree/ExpressionTree.java
+++ b/langtools/src/share/classes/com/sun/source/tree/ExpressionTree.java
@@ -35,5 +35,5 @@
  * @author Jonathan Gibbons
  * @since 1.6
  */
-@jdk.Supported
+@jdk.Exported
 public interface ExpressionTree extends Tree {}
diff --git a/langtools/src/share/classes/com/sun/source/tree/ForLoopTree.java b/langtools/src/share/classes/com/sun/source/tree/ForLoopTree.java
index 7adea33..baa9c11 100644
--- a/langtools/src/share/classes/com/sun/source/tree/ForLoopTree.java
+++ b/langtools/src/share/classes/com/sun/source/tree/ForLoopTree.java
@@ -42,7 +42,7 @@
  * @author Jonathan Gibbons
  * @since 1.6
  */
-@jdk.Supported
+@jdk.Exported
 public interface ForLoopTree extends StatementTree {
     List<? extends StatementTree> getInitializer();
     ExpressionTree getCondition();
diff --git a/langtools/src/share/classes/com/sun/source/tree/IdentifierTree.java b/langtools/src/share/classes/com/sun/source/tree/IdentifierTree.java
index dc662c0..2a1c484 100644
--- a/langtools/src/share/classes/com/sun/source/tree/IdentifierTree.java
+++ b/langtools/src/share/classes/com/sun/source/tree/IdentifierTree.java
@@ -41,7 +41,7 @@
  * @author Jonathan Gibbons
  * @since 1.6
  */
-@jdk.Supported
+@jdk.Exported
 public interface IdentifierTree extends ExpressionTree {
     Name getName();
 }
diff --git a/langtools/src/share/classes/com/sun/source/tree/IfTree.java b/langtools/src/share/classes/com/sun/source/tree/IfTree.java
index ad88dd5..227d918 100644
--- a/langtools/src/share/classes/com/sun/source/tree/IfTree.java
+++ b/langtools/src/share/classes/com/sun/source/tree/IfTree.java
@@ -45,7 +45,7 @@
  * @author Jonathan Gibbons
  * @since 1.6
  */
-@jdk.Supported
+@jdk.Exported
 public interface IfTree extends StatementTree {
     ExpressionTree getCondition();
     StatementTree getThenStatement();
diff --git a/langtools/src/share/classes/com/sun/source/tree/ImportTree.java b/langtools/src/share/classes/com/sun/source/tree/ImportTree.java
index 8eb61ac..46cd1a8 100644
--- a/langtools/src/share/classes/com/sun/source/tree/ImportTree.java
+++ b/langtools/src/share/classes/com/sun/source/tree/ImportTree.java
@@ -41,7 +41,7 @@
  * @author Jonathan Gibbons
  * @since 1.6
  */
-@jdk.Supported
+@jdk.Exported
 public interface ImportTree extends Tree {
     boolean isStatic();
     /**
diff --git a/langtools/src/share/classes/com/sun/source/tree/InstanceOfTree.java b/langtools/src/share/classes/com/sun/source/tree/InstanceOfTree.java
index a7d6325..b8e8100 100644
--- a/langtools/src/share/classes/com/sun/source/tree/InstanceOfTree.java
+++ b/langtools/src/share/classes/com/sun/source/tree/InstanceOfTree.java
@@ -39,7 +39,7 @@
  * @author Jonathan Gibbons
  * @since 1.6
  */
-@jdk.Supported
+@jdk.Exported
 public interface InstanceOfTree extends ExpressionTree {
     ExpressionTree getExpression();
     Tree getType();
diff --git a/langtools/src/share/classes/com/sun/source/tree/IntersectionTypeTree.java b/langtools/src/share/classes/com/sun/source/tree/IntersectionTypeTree.java
index 7476564..147571e 100644
--- a/langtools/src/share/classes/com/sun/source/tree/IntersectionTypeTree.java
+++ b/langtools/src/share/classes/com/sun/source/tree/IntersectionTypeTree.java
@@ -34,7 +34,7 @@
  *
  * @since 1.8
  */
-@jdk.Supported
+@jdk.Exported
 public interface IntersectionTypeTree extends Tree {
     List<? extends Tree> getBounds();
 }
diff --git a/langtools/src/share/classes/com/sun/source/tree/LabeledStatementTree.java b/langtools/src/share/classes/com/sun/source/tree/LabeledStatementTree.java
index 644189f..424cc20 100644
--- a/langtools/src/share/classes/com/sun/source/tree/LabeledStatementTree.java
+++ b/langtools/src/share/classes/com/sun/source/tree/LabeledStatementTree.java
@@ -41,7 +41,7 @@
  * @author Jonathan Gibbons
  * @since 1.6
  */
-@jdk.Supported
+@jdk.Exported
 public interface LabeledStatementTree extends StatementTree {
     Name getLabel();
     StatementTree getStatement();
diff --git a/langtools/src/share/classes/com/sun/source/tree/LambdaExpressionTree.java b/langtools/src/share/classes/com/sun/source/tree/LambdaExpressionTree.java
index ffd230d..b7e69a8 100644
--- a/langtools/src/share/classes/com/sun/source/tree/LambdaExpressionTree.java
+++ b/langtools/src/share/classes/com/sun/source/tree/LambdaExpressionTree.java
@@ -37,14 +37,14 @@
  *   (x,y)-> { return x + y; }
  * }</pre>
  */
-@jdk.Supported
+@jdk.Exported
 public interface LambdaExpressionTree extends ExpressionTree {
 
     /**
      * Lambda expressions come in two forms: (i) expression lambdas, whose body
      * is an expression, and (ii) statement lambdas, whose body is a block
      */
-    @jdk.Supported
+    @jdk.Exported
     public enum BodyKind {
         /** enum constant for expression lambdas */
         EXPRESSION,
diff --git a/langtools/src/share/classes/com/sun/source/tree/LineMap.java b/langtools/src/share/classes/com/sun/source/tree/LineMap.java
index 4c0c29b..f8b2cca 100644
--- a/langtools/src/share/classes/com/sun/source/tree/LineMap.java
+++ b/langtools/src/share/classes/com/sun/source/tree/LineMap.java
@@ -31,7 +31,7 @@
  *
  * @since 1.6
  */
-@jdk.Supported
+@jdk.Exported
 public interface LineMap {
     /**
      * Find the start position of a line.
diff --git a/langtools/src/share/classes/com/sun/source/tree/LiteralTree.java b/langtools/src/share/classes/com/sun/source/tree/LiteralTree.java
index adc3937..b166051 100644
--- a/langtools/src/share/classes/com/sun/source/tree/LiteralTree.java
+++ b/langtools/src/share/classes/com/sun/source/tree/LiteralTree.java
@@ -40,7 +40,7 @@
  * @author Jonathan Gibbons
  * @since 1.6
  */
-@jdk.Supported
+@jdk.Exported
 public interface LiteralTree extends ExpressionTree {
     Object getValue();
 }
diff --git a/langtools/src/share/classes/com/sun/source/tree/MemberReferenceTree.java b/langtools/src/share/classes/com/sun/source/tree/MemberReferenceTree.java
index 03b8a6a8..939c0c6 100644
--- a/langtools/src/share/classes/com/sun/source/tree/MemberReferenceTree.java
+++ b/langtools/src/share/classes/com/sun/source/tree/MemberReferenceTree.java
@@ -39,14 +39,14 @@
  *
  * @since 1.8
  */
-@jdk.Supported
+@jdk.Exported
 public interface MemberReferenceTree extends ExpressionTree {
 
     /**
      * There are two kinds of member references: (i) method references and
      * (ii) constructor references
      */
-    @jdk.Supported
+    @jdk.Exported
     public enum ReferenceMode {
         /** enum constant for method references */
         INVOKE,
diff --git a/langtools/src/share/classes/com/sun/source/tree/MemberSelectTree.java b/langtools/src/share/classes/com/sun/source/tree/MemberSelectTree.java
index 8b1b8e4..d40a6a3 100644
--- a/langtools/src/share/classes/com/sun/source/tree/MemberSelectTree.java
+++ b/langtools/src/share/classes/com/sun/source/tree/MemberSelectTree.java
@@ -41,7 +41,7 @@
  * @author Jonathan Gibbons
  * @since 1.6
  */
-@jdk.Supported
+@jdk.Exported
 public interface MemberSelectTree extends ExpressionTree {
     ExpressionTree getExpression();
     Name getIdentifier();
diff --git a/langtools/src/share/classes/com/sun/source/tree/MethodInvocationTree.java b/langtools/src/share/classes/com/sun/source/tree/MethodInvocationTree.java
index 2ccbeae..1b6ae13 100644
--- a/langtools/src/share/classes/com/sun/source/tree/MethodInvocationTree.java
+++ b/langtools/src/share/classes/com/sun/source/tree/MethodInvocationTree.java
@@ -43,7 +43,7 @@
  * @author Jonathan Gibbons
  * @since 1.6
  */
-@jdk.Supported
+@jdk.Exported
 public interface MethodInvocationTree extends ExpressionTree {
     List<? extends Tree> getTypeArguments();
     ExpressionTree getMethodSelect();
diff --git a/langtools/src/share/classes/com/sun/source/tree/MethodTree.java b/langtools/src/share/classes/com/sun/source/tree/MethodTree.java
index 987c374..bef5d8b 100644
--- a/langtools/src/share/classes/com/sun/source/tree/MethodTree.java
+++ b/langtools/src/share/classes/com/sun/source/tree/MethodTree.java
@@ -46,7 +46,7 @@
  * @author Jonathan Gibbons
  * @since 1.6
  */
-@jdk.Supported
+@jdk.Exported
 public interface MethodTree extends Tree {
     ModifiersTree getModifiers();
     Name getName();
diff --git a/langtools/src/share/classes/com/sun/source/tree/ModifiersTree.java b/langtools/src/share/classes/com/sun/source/tree/ModifiersTree.java
index 3fae9c0..ea22e06 100644
--- a/langtools/src/share/classes/com/sun/source/tree/ModifiersTree.java
+++ b/langtools/src/share/classes/com/sun/source/tree/ModifiersTree.java
@@ -45,7 +45,7 @@
  * @author Jonathan Gibbons
  * @since 1.6
  */
-@jdk.Supported
+@jdk.Exported
 public interface ModifiersTree extends Tree {
     Set<Modifier> getFlags();
     List<? extends AnnotationTree> getAnnotations();
diff --git a/langtools/src/share/classes/com/sun/source/tree/NewArrayTree.java b/langtools/src/share/classes/com/sun/source/tree/NewArrayTree.java
index 3cd2f62..f951366 100644
--- a/langtools/src/share/classes/com/sun/source/tree/NewArrayTree.java
+++ b/langtools/src/share/classes/com/sun/source/tree/NewArrayTree.java
@@ -43,7 +43,7 @@
  * @author Jonathan Gibbons
  * @since 1.6
  */
-@jdk.Supported
+@jdk.Exported
 public interface NewArrayTree extends ExpressionTree {
     Tree getType();
     List<? extends ExpressionTree> getDimensions();
diff --git a/langtools/src/share/classes/com/sun/source/tree/NewClassTree.java b/langtools/src/share/classes/com/sun/source/tree/NewClassTree.java
index 561d411..a30cb30 100644
--- a/langtools/src/share/classes/com/sun/source/tree/NewClassTree.java
+++ b/langtools/src/share/classes/com/sun/source/tree/NewClassTree.java
@@ -48,7 +48,7 @@
  * @author Jonathan Gibbons
  * @since 1.6
  */
-@jdk.Supported
+@jdk.Exported
 public interface NewClassTree extends ExpressionTree {
     ExpressionTree getEnclosingExpression();
     List<? extends Tree> getTypeArguments();
diff --git a/langtools/src/share/classes/com/sun/source/tree/ParameterizedTypeTree.java b/langtools/src/share/classes/com/sun/source/tree/ParameterizedTypeTree.java
index c51aad5..d054dbd 100644
--- a/langtools/src/share/classes/com/sun/source/tree/ParameterizedTypeTree.java
+++ b/langtools/src/share/classes/com/sun/source/tree/ParameterizedTypeTree.java
@@ -41,7 +41,7 @@
  * @author Jonathan Gibbons
  * @since 1.6
  */
-@jdk.Supported
+@jdk.Exported
 public interface ParameterizedTypeTree extends Tree {
     Tree getType();
     List<? extends Tree> getTypeArguments();
diff --git a/langtools/src/share/classes/com/sun/source/tree/ParenthesizedTree.java b/langtools/src/share/classes/com/sun/source/tree/ParenthesizedTree.java
index 2e0cd4d..7c939242 100644
--- a/langtools/src/share/classes/com/sun/source/tree/ParenthesizedTree.java
+++ b/langtools/src/share/classes/com/sun/source/tree/ParenthesizedTree.java
@@ -40,7 +40,7 @@
  * @author Jonathan Gibbons
  * @since 1.6
  */
-@jdk.Supported
+@jdk.Exported
 public interface ParenthesizedTree extends ExpressionTree {
     ExpressionTree getExpression();
 }
diff --git a/langtools/src/share/classes/com/sun/source/tree/PrimitiveTypeTree.java b/langtools/src/share/classes/com/sun/source/tree/PrimitiveTypeTree.java
index 0b98b59..1c07a03 100644
--- a/langtools/src/share/classes/com/sun/source/tree/PrimitiveTypeTree.java
+++ b/langtools/src/share/classes/com/sun/source/tree/PrimitiveTypeTree.java
@@ -41,7 +41,7 @@
  * @author Jonathan Gibbons
  * @since 1.6
  */
-@jdk.Supported
+@jdk.Exported
 public interface PrimitiveTypeTree extends Tree {
     TypeKind getPrimitiveTypeKind();
 }
diff --git a/langtools/src/share/classes/com/sun/source/tree/ReturnTree.java b/langtools/src/share/classes/com/sun/source/tree/ReturnTree.java
index b8d451b..8fa1680 100644
--- a/langtools/src/share/classes/com/sun/source/tree/ReturnTree.java
+++ b/langtools/src/share/classes/com/sun/source/tree/ReturnTree.java
@@ -40,7 +40,7 @@
  * @author Jonathan Gibbons
  * @since 1.6
  */
-@jdk.Supported
+@jdk.Exported
 public interface ReturnTree extends StatementTree {
     ExpressionTree getExpression();
 }
diff --git a/langtools/src/share/classes/com/sun/source/tree/Scope.java b/langtools/src/share/classes/com/sun/source/tree/Scope.java
index 17b79be..071ec96 100644
--- a/langtools/src/share/classes/com/sun/source/tree/Scope.java
+++ b/langtools/src/share/classes/com/sun/source/tree/Scope.java
@@ -48,7 +48,7 @@
  *
  * @since 1.6
  */
-@jdk.Supported
+@jdk.Exported
 public interface Scope {
     /**
      * Returns the enclosing scope.
diff --git a/langtools/src/share/classes/com/sun/source/tree/StatementTree.java b/langtools/src/share/classes/com/sun/source/tree/StatementTree.java
index 2bae01c..c558ea2 100644
--- a/langtools/src/share/classes/com/sun/source/tree/StatementTree.java
+++ b/langtools/src/share/classes/com/sun/source/tree/StatementTree.java
@@ -35,5 +35,5 @@
  * @author Jonathan Gibbons
  * @since 1.6
  */
-@jdk.Supported
+@jdk.Exported
 public interface StatementTree extends Tree {}
diff --git a/langtools/src/share/classes/com/sun/source/tree/SwitchTree.java b/langtools/src/share/classes/com/sun/source/tree/SwitchTree.java
index 3d8a11f..cc1dbdd 100644
--- a/langtools/src/share/classes/com/sun/source/tree/SwitchTree.java
+++ b/langtools/src/share/classes/com/sun/source/tree/SwitchTree.java
@@ -43,7 +43,7 @@
  * @author Jonathan Gibbons
  * @since 1.6
  */
-@jdk.Supported
+@jdk.Exported
 public interface SwitchTree extends StatementTree {
     ExpressionTree getExpression();
     List<? extends CaseTree> getCases();
diff --git a/langtools/src/share/classes/com/sun/source/tree/SynchronizedTree.java b/langtools/src/share/classes/com/sun/source/tree/SynchronizedTree.java
index 579e075..afdd126 100644
--- a/langtools/src/share/classes/com/sun/source/tree/SynchronizedTree.java
+++ b/langtools/src/share/classes/com/sun/source/tree/SynchronizedTree.java
@@ -40,7 +40,7 @@
  * @author Jonathan Gibbons
  * @since 1.6
  */
-@jdk.Supported
+@jdk.Exported
 public interface SynchronizedTree extends StatementTree {
     ExpressionTree getExpression();
     BlockTree getBlock();
diff --git a/langtools/src/share/classes/com/sun/source/tree/ThrowTree.java b/langtools/src/share/classes/com/sun/source/tree/ThrowTree.java
index 474b588..8348168 100644
--- a/langtools/src/share/classes/com/sun/source/tree/ThrowTree.java
+++ b/langtools/src/share/classes/com/sun/source/tree/ThrowTree.java
@@ -39,7 +39,7 @@
  * @author Jonathan Gibbons
  * @since 1.6
  */
-@jdk.Supported
+@jdk.Exported
 public interface ThrowTree extends StatementTree {
     ExpressionTree getExpression();
 }
diff --git a/langtools/src/share/classes/com/sun/source/tree/Tree.java b/langtools/src/share/classes/com/sun/source/tree/Tree.java
index 306991d..b416f08 100644
--- a/langtools/src/share/classes/com/sun/source/tree/Tree.java
+++ b/langtools/src/share/classes/com/sun/source/tree/Tree.java
@@ -39,13 +39,13 @@
  *
  * @since 1.6
  */
-@jdk.Supported
+@jdk.Exported
 public interface Tree {
 
     /**
      * Enumerates all kinds of trees.
      */
-    @jdk.Supported
+    @jdk.Exported
     public enum Kind {
 
         ANNOTATED_TYPE(AnnotatedTypeTree.class),
diff --git a/langtools/src/share/classes/com/sun/source/tree/TreeVisitor.java b/langtools/src/share/classes/com/sun/source/tree/TreeVisitor.java
index 386e714..9a03ef2 100644
--- a/langtools/src/share/classes/com/sun/source/tree/TreeVisitor.java
+++ b/langtools/src/share/classes/com/sun/source/tree/TreeVisitor.java
@@ -56,7 +56,7 @@
  *
  * @since 1.6
  */
-@jdk.Supported
+@jdk.Exported
 public interface TreeVisitor<R,P> {
     R visitAnnotatedType(AnnotatedTypeTree node, P p);
     R visitAnnotation(AnnotationTree node, P p);
diff --git a/langtools/src/share/classes/com/sun/source/tree/TryTree.java b/langtools/src/share/classes/com/sun/source/tree/TryTree.java
index 0b7b19e..2ca79cf 100644
--- a/langtools/src/share/classes/com/sun/source/tree/TryTree.java
+++ b/langtools/src/share/classes/com/sun/source/tree/TryTree.java
@@ -45,7 +45,7 @@
  * @author Jonathan Gibbons
  * @since 1.6
  */
-@jdk.Supported
+@jdk.Exported
 public interface TryTree extends StatementTree {
     BlockTree getBlock();
     List<? extends CatchTree> getCatches();
diff --git a/langtools/src/share/classes/com/sun/source/tree/TypeCastTree.java b/langtools/src/share/classes/com/sun/source/tree/TypeCastTree.java
index 77ad546..6464e4b 100644
--- a/langtools/src/share/classes/com/sun/source/tree/TypeCastTree.java
+++ b/langtools/src/share/classes/com/sun/source/tree/TypeCastTree.java
@@ -39,7 +39,7 @@
  * @author Jonathan Gibbons
  * @since 1.6
  */
-@jdk.Supported
+@jdk.Exported
 public interface TypeCastTree extends ExpressionTree {
     Tree getType();
     ExpressionTree getExpression();
diff --git a/langtools/src/share/classes/com/sun/source/tree/TypeParameterTree.java b/langtools/src/share/classes/com/sun/source/tree/TypeParameterTree.java
index 6dd469a..2737dff 100644
--- a/langtools/src/share/classes/com/sun/source/tree/TypeParameterTree.java
+++ b/langtools/src/share/classes/com/sun/source/tree/TypeParameterTree.java
@@ -46,7 +46,7 @@
  * @author Jonathan Gibbons
  * @since 1.6
  */
-@jdk.Supported
+@jdk.Exported
 public interface TypeParameterTree extends Tree {
     Name getName();
     List<? extends Tree> getBounds();
diff --git a/langtools/src/share/classes/com/sun/source/tree/UnaryTree.java b/langtools/src/share/classes/com/sun/source/tree/UnaryTree.java
index cb0da5e..3dfbedd 100644
--- a/langtools/src/share/classes/com/sun/source/tree/UnaryTree.java
+++ b/langtools/src/share/classes/com/sun/source/tree/UnaryTree.java
@@ -42,7 +42,7 @@
  * @author Jonathan Gibbons
  * @since 1.6
  */
-@jdk.Supported
+@jdk.Exported
 public interface UnaryTree extends ExpressionTree {
     ExpressionTree getExpression();
 }
diff --git a/langtools/src/share/classes/com/sun/source/tree/UnionTypeTree.java b/langtools/src/share/classes/com/sun/source/tree/UnionTypeTree.java
index 57b9892..97da031 100644
--- a/langtools/src/share/classes/com/sun/source/tree/UnionTypeTree.java
+++ b/langtools/src/share/classes/com/sun/source/tree/UnionTypeTree.java
@@ -34,7 +34,7 @@
  *
  * @since 1.7
  */
-@jdk.Supported
+@jdk.Exported
 public interface UnionTypeTree extends Tree {
     List<? extends Tree> getTypeAlternatives();
 }
diff --git a/langtools/src/share/classes/com/sun/source/tree/VariableTree.java b/langtools/src/share/classes/com/sun/source/tree/VariableTree.java
index 86fce99..de60550 100644
--- a/langtools/src/share/classes/com/sun/source/tree/VariableTree.java
+++ b/langtools/src/share/classes/com/sun/source/tree/VariableTree.java
@@ -42,7 +42,7 @@
  * @author Jonathan Gibbons
  * @since 1.6
  */
-@jdk.Supported
+@jdk.Exported
 public interface VariableTree extends StatementTree {
     ModifiersTree getModifiers();
     Name getName();
diff --git a/langtools/src/share/classes/com/sun/source/tree/WhileLoopTree.java b/langtools/src/share/classes/com/sun/source/tree/WhileLoopTree.java
index e7c4351..30dcf30 100644
--- a/langtools/src/share/classes/com/sun/source/tree/WhileLoopTree.java
+++ b/langtools/src/share/classes/com/sun/source/tree/WhileLoopTree.java
@@ -41,7 +41,7 @@
  * @author Jonathan Gibbons
  * @since 1.6
  */
-@jdk.Supported
+@jdk.Exported
 public interface WhileLoopTree extends StatementTree {
     ExpressionTree getCondition();
     StatementTree getStatement();
diff --git a/langtools/src/share/classes/com/sun/source/tree/WildcardTree.java b/langtools/src/share/classes/com/sun/source/tree/WildcardTree.java
index d60f797..4b87891 100644
--- a/langtools/src/share/classes/com/sun/source/tree/WildcardTree.java
+++ b/langtools/src/share/classes/com/sun/source/tree/WildcardTree.java
@@ -44,7 +44,7 @@
  * @author Jonathan Gibbons
  * @since 1.6
  */
-@jdk.Supported
+@jdk.Exported
 public interface WildcardTree extends Tree {
     Tree getBound();
 }
diff --git a/langtools/src/share/classes/com/sun/source/tree/package-info.java b/langtools/src/share/classes/com/sun/source/tree/package-info.java
index 7df58d8..22d1c9b 100644
--- a/langtools/src/share/classes/com/sun/source/tree/package-info.java
+++ b/langtools/src/share/classes/com/sun/source/tree/package-info.java
@@ -31,5 +31,5 @@
  * @author Jonathan Gibbons
  * @since 1.6
  */
-@jdk.Supported
+@jdk.Exported
 package com.sun.source.tree;
diff --git a/langtools/src/share/classes/com/sun/source/util/DocSourcePositions.java b/langtools/src/share/classes/com/sun/source/util/DocSourcePositions.java
index d249da1..dc0eaa4 100644
--- a/langtools/src/share/classes/com/sun/source/util/DocSourcePositions.java
+++ b/langtools/src/share/classes/com/sun/source/util/DocSourcePositions.java
@@ -36,7 +36,7 @@
  *
  * @since 1.8
  */
-@jdk.Supported
+@jdk.Exported
 public interface DocSourcePositions extends SourcePositions {
 
     /**
diff --git a/langtools/src/share/classes/com/sun/source/util/DocTreePath.java b/langtools/src/share/classes/com/sun/source/util/DocTreePath.java
index 0720630..3a801aa 100644
--- a/langtools/src/share/classes/com/sun/source/util/DocTreePath.java
+++ b/langtools/src/share/classes/com/sun/source/util/DocTreePath.java
@@ -35,7 +35,7 @@
  *
  * @since 1.8
  */
-@jdk.Supported
+@jdk.Exported
 public class DocTreePath implements Iterable<DocTree> {
     /**
      * Gets a documentation tree path for a tree node within a compilation unit.
diff --git a/langtools/src/share/classes/com/sun/source/util/DocTreePathScanner.java b/langtools/src/share/classes/com/sun/source/util/DocTreePathScanner.java
index 326c155..d069a34 100644
--- a/langtools/src/share/classes/com/sun/source/util/DocTreePathScanner.java
+++ b/langtools/src/share/classes/com/sun/source/util/DocTreePathScanner.java
@@ -36,7 +36,7 @@
  *
  * @since 1.8
  */
-@jdk.Supported
+@jdk.Exported
 public class DocTreePathScanner<R, P> extends DocTreeScanner<R, P> {
     /**
      * Scan a tree from a position identified by a TreePath.
diff --git a/langtools/src/share/classes/com/sun/source/util/DocTreeScanner.java b/langtools/src/share/classes/com/sun/source/util/DocTreeScanner.java
index 4121f29..19f0b09 100644
--- a/langtools/src/share/classes/com/sun/source/util/DocTreeScanner.java
+++ b/langtools/src/share/classes/com/sun/source/util/DocTreeScanner.java
@@ -67,7 +67,7 @@
  *
  * @since 1.8
  */
-@jdk.Supported
+@jdk.Exported
 public class DocTreeScanner<R,P> implements DocTreeVisitor<R,P> {
 
     /**
diff --git a/langtools/src/share/classes/com/sun/source/util/DocTrees.java b/langtools/src/share/classes/com/sun/source/util/DocTrees.java
index cd23e78..b8d076a 100644
--- a/langtools/src/share/classes/com/sun/source/util/DocTrees.java
+++ b/langtools/src/share/classes/com/sun/source/util/DocTrees.java
@@ -37,7 +37,7 @@
  *
  * @since 1.8
  */
-@jdk.Supported
+@jdk.Exported
 public abstract class DocTrees extends Trees {
     /**
      * Gets a DocTrees object for a given CompilationTask.
diff --git a/langtools/src/share/classes/com/sun/source/util/JavacTask.java b/langtools/src/share/classes/com/sun/source/util/JavacTask.java
index e65e8d6..b515ddb 100644
--- a/langtools/src/share/classes/com/sun/source/util/JavacTask.java
+++ b/langtools/src/share/classes/com/sun/source/util/JavacTask.java
@@ -48,7 +48,7 @@
  * @author Jonathan Gibbons
  * @since 1.6
  */
-@jdk.Supported
+@jdk.Exported
 public abstract class JavacTask implements CompilationTask {
 
     /**
diff --git a/langtools/src/share/classes/com/sun/source/util/Plugin.java b/langtools/src/share/classes/com/sun/source/util/Plugin.java
index 06f7418..06f2daf 100644
--- a/langtools/src/share/classes/com/sun/source/util/Plugin.java
+++ b/langtools/src/share/classes/com/sun/source/util/Plugin.java
@@ -48,7 +48,7 @@
  *
  * @since 1.8
  */
-@jdk.Supported
+@jdk.Exported
 public interface Plugin {
     /**
      * Get the user-friendly name of this plug-in.
diff --git a/langtools/src/share/classes/com/sun/source/util/SimpleDocTreeVisitor.java b/langtools/src/share/classes/com/sun/source/util/SimpleDocTreeVisitor.java
index 25e8010..3072c27 100644
--- a/langtools/src/share/classes/com/sun/source/util/SimpleDocTreeVisitor.java
+++ b/langtools/src/share/classes/com/sun/source/util/SimpleDocTreeVisitor.java
@@ -32,7 +32,7 @@
  *
  * @since 1.8
  */
-@jdk.Supported
+@jdk.Exported
 public class SimpleDocTreeVisitor<R,P> implements DocTreeVisitor<R, P> {
     protected final R DEFAULT_VALUE;
 
diff --git a/langtools/src/share/classes/com/sun/source/util/SimpleTreeVisitor.java b/langtools/src/share/classes/com/sun/source/util/SimpleTreeVisitor.java
index d8bf052..4ae4ac1 100644
--- a/langtools/src/share/classes/com/sun/source/util/SimpleTreeVisitor.java
+++ b/langtools/src/share/classes/com/sun/source/util/SimpleTreeVisitor.java
@@ -33,7 +33,7 @@
  * @author Peter von der Ah&eacute;
  * @since 1.6
  */
-@jdk.Supported
+@jdk.Exported
 public class SimpleTreeVisitor <R,P> implements TreeVisitor<R,P> {
     protected final R DEFAULT_VALUE;
 
diff --git a/langtools/src/share/classes/com/sun/source/util/SourcePositions.java b/langtools/src/share/classes/com/sun/source/util/SourcePositions.java
index 4494d32..9c4d02d 100644
--- a/langtools/src/share/classes/com/sun/source/util/SourcePositions.java
+++ b/langtools/src/share/classes/com/sun/source/util/SourcePositions.java
@@ -35,7 +35,7 @@
  * @author Peter von der Ah&eacute;
  * @since 1.6
  */
-@jdk.Supported
+@jdk.Exported
 public interface SourcePositions {
 
     /**
diff --git a/langtools/src/share/classes/com/sun/source/util/TaskEvent.java b/langtools/src/share/classes/com/sun/source/util/TaskEvent.java
index d49a9d5..6682a09 100644
--- a/langtools/src/share/classes/com/sun/source/util/TaskEvent.java
+++ b/langtools/src/share/classes/com/sun/source/util/TaskEvent.java
@@ -36,14 +36,14 @@
  * @author Jonathan Gibbons
  * @since 1.6
  */
-@jdk.Supported
+@jdk.Exported
 public final class TaskEvent
 {
     /**
      * Kind of task event.
      * @since 1.6
      */
-    @jdk.Supported
+    @jdk.Exported
     public enum Kind {
         /**
          * For events related to the parsing of a file.
diff --git a/langtools/src/share/classes/com/sun/source/util/TaskListener.java b/langtools/src/share/classes/com/sun/source/util/TaskListener.java
index 3909975..97f31fb 100644
--- a/langtools/src/share/classes/com/sun/source/util/TaskListener.java
+++ b/langtools/src/share/classes/com/sun/source/util/TaskListener.java
@@ -32,7 +32,7 @@
  * @author Jonathan Gibbons
  * @since 1.6
  */
-@jdk.Supported
+@jdk.Exported
 public interface TaskListener
 {
     public void started(TaskEvent e);
diff --git a/langtools/src/share/classes/com/sun/source/util/TreePath.java b/langtools/src/share/classes/com/sun/source/util/TreePath.java
index 1d23b08..8c7cb02 100644
--- a/langtools/src/share/classes/com/sun/source/util/TreePath.java
+++ b/langtools/src/share/classes/com/sun/source/util/TreePath.java
@@ -36,7 +36,7 @@
  * @author Jonathan Gibbons
  * @since 1.6
  */
-@jdk.Supported
+@jdk.Exported
 public class TreePath implements Iterable<Tree> {
     /**
      * Gets a tree path for a tree node within a compilation unit.
diff --git a/langtools/src/share/classes/com/sun/source/util/TreePathScanner.java b/langtools/src/share/classes/com/sun/source/util/TreePathScanner.java
index 54f8a99..967bcfd 100644
--- a/langtools/src/share/classes/com/sun/source/util/TreePathScanner.java
+++ b/langtools/src/share/classes/com/sun/source/util/TreePathScanner.java
@@ -38,7 +38,7 @@
  * @author Jonathan Gibbons
  * @since 1.6
  */
-@jdk.Supported
+@jdk.Exported
 public class TreePathScanner<R, P> extends TreeScanner<R, P> {
 
     /**
diff --git a/langtools/src/share/classes/com/sun/source/util/TreeScanner.java b/langtools/src/share/classes/com/sun/source/util/TreeScanner.java
index 38ba501..c709f59 100644
--- a/langtools/src/share/classes/com/sun/source/util/TreeScanner.java
+++ b/langtools/src/share/classes/com/sun/source/util/TreeScanner.java
@@ -68,7 +68,7 @@
  * @author Jonathan Gibbons
  * @since 1.6
  */
-@jdk.Supported
+@jdk.Exported
 public class TreeScanner<R,P> implements TreeVisitor<R,P> {
 
     /** Scan a single node.
diff --git a/langtools/src/share/classes/com/sun/source/util/Trees.java b/langtools/src/share/classes/com/sun/source/util/Trees.java
index 439b684..8c9643f 100644
--- a/langtools/src/share/classes/com/sun/source/util/Trees.java
+++ b/langtools/src/share/classes/com/sun/source/util/Trees.java
@@ -51,7 +51,7 @@
  *
  * @author Peter von der Ah&eacute;
  */
-@jdk.Supported
+@jdk.Exported
 public abstract class Trees {
     /**
      * Gets a Trees object for a given CompilationTask.
diff --git a/langtools/src/share/classes/com/sun/source/util/package-info.java b/langtools/src/share/classes/com/sun/source/util/package-info.java
index 7e9659b..01a7888 100644
--- a/langtools/src/share/classes/com/sun/source/util/package-info.java
+++ b/langtools/src/share/classes/com/sun/source/util/package-info.java
@@ -30,5 +30,5 @@
  * @author Jonathan Gibbons
  * @since 1.6
  */
-@jdk.Supported
+@jdk.Exported
 package com.sun.source.util;
diff --git a/langtools/src/share/classes/com/sun/tools/doclets/formats/html/AbstractMemberWriter.java b/langtools/src/share/classes/com/sun/tools/doclets/formats/html/AbstractMemberWriter.java
index 8ca5691..e44e4a3 100644
--- a/langtools/src/share/classes/com/sun/tools/doclets/formats/html/AbstractMemberWriter.java
+++ b/langtools/src/share/classes/com/sun/tools/doclets/formats/html/AbstractMemberWriter.java
@@ -413,7 +413,7 @@
     protected void addDeprecatedAPI(List<Doc> deprmembers, String headingKey,
             String tableSummary, String[] tableHeader, Content contentTree) {
         if (deprmembers.size() > 0) {
-            Content table = HtmlTree.TABLE(0, 3, 0, tableSummary,
+            Content table = HtmlTree.TABLE(HtmlStyle.deprecatedSummary, 0, 3, 0, tableSummary,
                 writer.getTableCaption(configuration.getResource(headingKey)));
             table.addContent(writer.getSummaryTableHeader(tableHeader, "col"));
             Content tbody = new HtmlTree(HtmlTag.TBODY);
@@ -453,7 +453,7 @@
         List<? extends ProgramElementDoc> members = mems;
         boolean printedUseTableHeader = false;
         if (members.size() > 0) {
-            Content table = HtmlTree.TABLE(0, 3, 0, tableSummary,
+            Content table = HtmlTree.TABLE(HtmlStyle.useSummary, 0, 3, 0, tableSummary,
                     writer.getTableCaption(heading));
             Content tbody = new HtmlTree(HtmlTag.TBODY);
             Iterator<? extends ProgramElementDoc> it = members.iterator();
diff --git a/langtools/src/share/classes/com/sun/tools/doclets/formats/html/ClassUseWriter.java b/langtools/src/share/classes/com/sun/tools/doclets/formats/html/ClassUseWriter.java
index 2c48f82..75bc023 100644
--- a/langtools/src/share/classes/com/sun/tools/doclets/formats/html/ClassUseWriter.java
+++ b/langtools/src/share/classes/com/sun/tools/doclets/formats/html/ClassUseWriter.java
@@ -263,7 +263,7 @@
      * @param contentTree the content tree to which the packages list will be added
      */
     protected void addPackageList(Content contentTree) throws IOException {
-        Content table = HtmlTree.TABLE(0, 3, 0, useTableSummary,
+        Content table = HtmlTree.TABLE(HtmlStyle.useSummary, 0, 3, 0, useTableSummary,
                 getTableCaption(configuration.getResource(
                 "doclet.ClassUse_Packages.that.use.0",
                 getLink(new LinkInfoImpl(configuration, LinkInfoImpl.Kind.CLASS_USE_HEADER, classdoc
@@ -298,7 +298,7 @@
                 pkgToPackageAnnotations.isEmpty()) {
             return;
         }
-        Content table = HtmlTree.TABLE(0, 3, 0, useTableSummary,
+        Content table = HtmlTree.TABLE(HtmlStyle.useSummary, 0, 3, 0, useTableSummary,
                 getTableCaption(configuration.getResource(
                 "doclet.ClassUse_PackageAnnotation",
                 getLink(new LinkInfoImpl(configuration,
diff --git a/langtools/src/share/classes/com/sun/tools/doclets/formats/html/ConstantsSummaryWriterImpl.java b/langtools/src/share/classes/com/sun/tools/doclets/formats/html/ConstantsSummaryWriterImpl.java
index 02dfdb3..cb9ab3e 100644
--- a/langtools/src/share/classes/com/sun/tools/doclets/formats/html/ConstantsSummaryWriterImpl.java
+++ b/langtools/src/share/classes/com/sun/tools/doclets/formats/html/ConstantsSummaryWriterImpl.java
@@ -207,7 +207,7 @@
      * @return the table caption and header
      */
     protected Content getClassName(Content classStr) {
-        Content table = HtmlTree.TABLE(0, 3, 0, constantsTableSummary,
+        Content table = HtmlTree.TABLE(HtmlStyle.constantsSummary, 0, 3, 0, constantsTableSummary,
                 getTableCaption(classStr));
         table.addContent(getSummaryTableHeader(constantsTableHeader, "col"));
         return table;
diff --git a/langtools/src/share/classes/com/sun/tools/doclets/formats/html/HtmlDoclet.java b/langtools/src/share/classes/com/sun/tools/doclets/formats/html/HtmlDoclet.java
index bf61cd1..3877a93 100644
--- a/langtools/src/share/classes/com/sun/tools/doclets/formats/html/HtmlDoclet.java
+++ b/langtools/src/share/classes/com/sun/tools/doclets/formats/html/HtmlDoclet.java
@@ -194,6 +194,10 @@
                             .getClassBuilder(curr, prev, next, classtree);
                     classBuilder.build();
                 }
+            } catch (IOException e) {
+                throw new DocletAbortException(e);
+            } catch (DocletAbortException de) {
+                throw de;
             } catch (Exception e) {
                 e.printStackTrace();
                 throw new DocletAbortException(e);
diff --git a/langtools/src/share/classes/com/sun/tools/doclets/formats/html/HtmlDocletWriter.java b/langtools/src/share/classes/com/sun/tools/doclets/formats/html/HtmlDocletWriter.java
index b3bfdcb..3bdcf6a 100644
--- a/langtools/src/share/classes/com/sun/tools/doclets/formats/html/HtmlDocletWriter.java
+++ b/langtools/src/share/classes/com/sun/tools/doclets/formats/html/HtmlDocletWriter.java
@@ -356,7 +356,7 @@
         if(classes.length > 0) {
             Arrays.sort(classes);
             Content caption = getTableCaption(new RawHtml(label));
-            Content table = HtmlTree.TABLE(HtmlStyle.packageSummary, 0, 3, 0,
+            Content table = HtmlTree.TABLE(HtmlStyle.typeSummary, 0, 3, 0,
                     tableSummary, caption);
             table.addContent(getSummaryTableHeader(tableHeader, "col"));
             Content tbody = new HtmlTree(HtmlTag.TBODY);
@@ -937,7 +937,7 @@
     protected void addPackageDeprecatedAPI(List<Doc> deprPkgs, String headingKey,
             String tableSummary, String[] tableHeader, Content contentTree) {
         if (deprPkgs.size() > 0) {
-            Content table = HtmlTree.TABLE(0, 3, 0, tableSummary,
+            Content table = HtmlTree.TABLE(HtmlStyle.deprecatedSummary, 0, 3, 0, tableSummary,
                     getTableCaption(configuration.getResource(headingKey)));
             table.addContent(getSummaryTableHeader(tableHeader, "col"));
             Content tbody = new HtmlTree(HtmlTag.TBODY);
diff --git a/langtools/src/share/classes/com/sun/tools/doclets/formats/html/PackageUseWriter.java b/langtools/src/share/classes/com/sun/tools/doclets/formats/html/PackageUseWriter.java
index 5814c37..e2fba89 100644
--- a/langtools/src/share/classes/com/sun/tools/doclets/formats/html/PackageUseWriter.java
+++ b/langtools/src/share/classes/com/sun/tools/doclets/formats/html/PackageUseWriter.java
@@ -151,7 +151,7 @@
      * @param contentTree the content tree to which the package list will be added
      */
     protected void addPackageList(Content contentTree) throws IOException {
-        Content table = HtmlTree.TABLE(0, 3, 0, useTableSummary,
+        Content table = HtmlTree.TABLE(HtmlStyle.useSummary, 0, 3, 0, useTableSummary,
                 getTableCaption(configuration.getResource(
                 "doclet.ClassUse_Packages.that.use.0",
                 getPackageLink(pkgdoc, Util.getPackageName(pkgdoc)))));
@@ -196,7 +196,7 @@
             }
             String tableSummary = configuration.getText("doclet.Use_Table_Summary",
                     configuration.getText("doclet.classes"));
-            Content table = HtmlTree.TABLE(0, 3, 0, tableSummary,
+            Content table = HtmlTree.TABLE(HtmlStyle.useSummary, 0, 3, 0, tableSummary,
                     getTableCaption(configuration.getResource(
                     "doclet.ClassUse_Classes.in.0.used.by.1",
                     getPackageLink(pkgdoc, Util.getPackageName(pkgdoc)),
diff --git a/langtools/src/share/classes/com/sun/tools/doclets/formats/html/PackageWriterImpl.java b/langtools/src/share/classes/com/sun/tools/doclets/formats/html/PackageWriterImpl.java
index 16be6c3..f0325b5 100644
--- a/langtools/src/share/classes/com/sun/tools/doclets/formats/html/PackageWriterImpl.java
+++ b/langtools/src/share/classes/com/sun/tools/doclets/formats/html/PackageWriterImpl.java
@@ -169,7 +169,7 @@
         if(classes.length > 0) {
             Arrays.sort(classes);
             Content caption = getTableCaption(new RawHtml(label));
-            Content table = HtmlTree.TABLE(HtmlStyle.packageSummary, 0, 3, 0,
+            Content table = HtmlTree.TABLE(HtmlStyle.typeSummary, 0, 3, 0,
                     tableSummary, caption);
             table.addContent(getSummaryTableHeader(tableHeader, "col"));
             Content tbody = new HtmlTree(HtmlTag.TBODY);
diff --git a/langtools/src/share/classes/com/sun/tools/doclets/formats/html/SubWriterHolderWriter.java b/langtools/src/share/classes/com/sun/tools/doclets/formats/html/SubWriterHolderWriter.java
index ce6a0fd..4e15a00 100644
--- a/langtools/src/share/classes/com/sun/tools/doclets/formats/html/SubWriterHolderWriter.java
+++ b/langtools/src/share/classes/com/sun/tools/doclets/formats/html/SubWriterHolderWriter.java
@@ -92,7 +92,7 @@
         else {
             caption = getTableCaption(mw.getCaption());
         }
-        Content table = HtmlTree.TABLE(HtmlStyle.overviewSummary, 0, 3, 0,
+        Content table = HtmlTree.TABLE(HtmlStyle.memberSummary, 0, 3, 0,
                 mw.getTableSummary(), caption);
         table.addContent(getSummaryTableHeader(mw.getSummaryTableHeader(cd), "col"));
         for (int i = 0; i < tableContents.size(); i++) {
diff --git a/langtools/src/share/classes/com/sun/tools/doclets/formats/html/markup/HtmlStyle.java b/langtools/src/share/classes/com/sun/tools/doclets/formats/html/markup/HtmlStyle.java
index 5bf1c32..fc49d7f 100644
--- a/langtools/src/share/classes/com/sun/tools/doclets/formats/html/markup/HtmlStyle.java
+++ b/langtools/src/share/classes/com/sun/tools/doclets/formats/html/markup/HtmlStyle.java
@@ -48,8 +48,11 @@
     colFirst,
     colLast,
     colOne,
+    constantsSummary,
     constantValuesContainer,
     contentContainer,
+    deprecatedContent,
+    deprecatedSummary,
     description,
     details,
     docSummary,
@@ -61,11 +64,11 @@
     inheritance,
     italic,
     legalCopy,
+    memberSummary,
     nameValue,
     navBarCell1Rev,
     navList,
     overviewSummary,
-    packageSummary,
     rowColor,
     serializedFormContainer,
     skipNav,
@@ -76,9 +79,10 @@
     subNavList,
     subTitle,
     summary,
-    deprecatedContent,
     tabEnd,
     tableTab,
     title,
-    topNav;
+    topNav,
+    typeSummary,
+    useSummary;
 }
diff --git a/langtools/src/share/classes/com/sun/tools/doclets/formats/html/markup/HtmlTree.java b/langtools/src/share/classes/com/sun/tools/doclets/formats/html/markup/HtmlTree.java
index ce38afe..e0badbe 100644
--- a/langtools/src/share/classes/com/sun/tools/doclets/formats/html/markup/HtmlTree.java
+++ b/langtools/src/share/classes/com/sun/tools/doclets/formats/html/markup/HtmlTree.java
@@ -619,25 +619,6 @@
     }
 
     /**
-     * Generates a Table tag with border, width and summary attributes and
-     * some content.
-     *
-     * @param border border for the table
-     * @param width width of the table
-     * @param summary summary for the table
-     * @param body content for the table
-     * @return an HtmlTree object for the TABLE tag
-     */
-    public static HtmlTree TABLE(int border, int width, String summary,
-            Content body) {
-        HtmlTree htmltree = new HtmlTree(HtmlTag.TABLE, nullCheck(body));
-        htmltree.addAttr(HtmlAttr.BORDER, Integer.toString(border));
-        htmltree.addAttr(HtmlAttr.WIDTH, Integer.toString(width));
-        htmltree.addAttr(HtmlAttr.SUMMARY, nullCheck(summary));
-        return htmltree;
-    }
-
-    /**
      * Generates a Table tag with style class, border, cell padding,
      * cellspacing and summary attributes and some content.
      *
@@ -662,22 +643,6 @@
     }
 
     /**
-     * Generates a Table tag with border, cell padding,
-     * cellspacing and summary attributes and some content.
-     *
-     * @param border border for the table
-     * @param cellPadding cell padding for the table
-     * @param cellSpacing cell spacing for the table
-     * @param summary summary for the table
-     * @param body content for the table
-     * @return an HtmlTree object for the TABLE tag
-     */
-    public static HtmlTree TABLE(int border, int cellPadding,
-            int cellSpacing, String summary, Content body) {
-        return TABLE(null, border, cellPadding, cellSpacing, summary, body);
-    }
-
-    /**
      * Generates a TD tag with style class attribute and some content.
      *
      * @param styleClass style for the tag
diff --git a/langtools/src/share/classes/com/sun/tools/doclets/formats/html/markup/HtmlWriter.java b/langtools/src/share/classes/com/sun/tools/doclets/formats/html/markup/HtmlWriter.java
index e1da065..0764a6b 100644
--- a/langtools/src/share/classes/com/sun/tools/doclets/formats/html/markup/HtmlWriter.java
+++ b/langtools/src/share/classes/com/sun/tools/doclets/formats/html/markup/HtmlWriter.java
@@ -310,8 +310,12 @@
         if(winTitle != null && winTitle.length() > 0) {
             script.addAttr(HtmlAttr.TYPE, "text/javascript");
             String scriptCode = "<!--" + DocletConstants.NL +
-                    "    if (location.href.indexOf('is-external=true') == -1) {" + DocletConstants.NL +
-                    "        parent.document.title=\"" + winTitle + "\";" + DocletConstants.NL +
+                    "    try {" + DocletConstants.NL +
+                    "        if (location.href.indexOf('is-external=true') == -1) {" + DocletConstants.NL +
+                    "            parent.document.title=\"" + winTitle + "\";" + DocletConstants.NL +
+                    "        }" + DocletConstants.NL +
+                    "    }" + DocletConstants.NL +
+                    "    catch(err) {" + DocletConstants.NL +
                     "    }" + DocletConstants.NL +
                     "//-->" + DocletConstants.NL;
             RawHtml scriptContent = new RawHtml(scriptCode);
diff --git a/langtools/src/share/classes/com/sun/tools/doclets/internal/toolkit/AbstractDoclet.java b/langtools/src/share/classes/com/sun/tools/doclets/internal/toolkit/AbstractDoclet.java
index 40c4a98..39fde45 100644
--- a/langtools/src/share/classes/com/sun/tools/doclets/internal/toolkit/AbstractDoclet.java
+++ b/langtools/src/share/classes/com/sun/tools/doclets/internal/toolkit/AbstractDoclet.java
@@ -83,6 +83,16 @@
         } catch (Configuration.Fault f) {
             root.printError(f.getMessage());
             return false;
+        } catch (DocletAbortException e) {
+            Throwable cause = e.getCause();
+            if (cause != null) {
+                if (cause.getLocalizedMessage() != null) {
+                    root.printError(cause.getLocalizedMessage());
+                } else {
+                    root.printError(cause.toString());
+                }
+            }
+            return false;
         } catch (Exception exc) {
             exc.printStackTrace();
             return false;
diff --git a/langtools/src/share/classes/com/sun/tools/doclets/internal/toolkit/builders/AbstractBuilder.java b/langtools/src/share/classes/com/sun/tools/doclets/internal/toolkit/builders/AbstractBuilder.java
index 74b4f04..00f0b2b 100644
--- a/langtools/src/share/classes/com/sun/tools/doclets/internal/toolkit/builders/AbstractBuilder.java
+++ b/langtools/src/share/classes/com/sun/tools/doclets/internal/toolkit/builders/AbstractBuilder.java
@@ -140,7 +140,7 @@
             configuration.root.printError("Unknown element: " + component);
             throw new DocletAbortException(e);
         } catch (InvocationTargetException e) {
-            e.getCause().printStackTrace();
+            throw new DocletAbortException(e.getCause());
         } catch (Exception e) {
             e.printStackTrace();
             configuration.root.printError("Exception " +
diff --git a/langtools/src/share/classes/com/sun/tools/doclets/internal/toolkit/resources/stylesheet.css b/langtools/src/share/classes/com/sun/tools/doclets/internal/toolkit/resources/stylesheet.css
index bf1bc94..140b86b 100644
--- a/langtools/src/share/classes/com/sun/tools/doclets/internal/toolkit/resources/stylesheet.css
+++ b/langtools/src/share/classes/com/sun/tools/doclets/internal/toolkit/resources/stylesheet.css
@@ -348,27 +348,16 @@
 /*
 Table styles
 */
-.contentContainer table, .classUseContainer table, .constantValuesContainer table {
+.overviewSummary, .memberSummary, .typeSummary, .useSummary, .constantsSummary, .deprecatedSummary {
     border-bottom:1px solid #9eadc0;
+    margin:0 0 12px 0px;
     width:100%;
 }
-.contentContainer ul li table, .classUseContainer ul li table, .constantValuesContainer ul li table {
-    width:100%;
+.overviewSummary, .memberSummary  {
+    padding:0px;
 }
-.contentContainer .description table, .contentContainer .details table {
-    border-bottom:none;
-}
-.contentContainer ul li table th.colOne, .contentContainer ul li table th.colFirst, .contentContainer ul li table th.colLast, .classUseContainer ul li table th, .constantValuesContainer ul li table th, .contentContainer ul li table td.colOne, .contentContainer ul li table td.colFirst, .contentContainer ul li table td.colLast, .classUseContainer ul li table td, .constantValuesContainer ul li table td{
-    vertical-align:top;
-    padding-right:20px;
-}
-.contentContainer ul li table th.colLast, .classUseContainer ul li table th.colLast,.constantValuesContainer ul li table th.colLast,
-.contentContainer ul li table td.colLast, .classUseContainer ul li table td.colLast,.constantValuesContainer ul li table td.colLast,
-.contentContainer ul li table th.colOne, .classUseContainer ul li table th.colOne,
-.contentContainer ul li table td.colOne, .classUseContainer ul li table td.colOne {
-    padding-right:3px;
-}
-.overviewSummary caption, .packageSummary caption, .contentContainer ul.blockList li.blockList caption, .summary caption, .classUseContainer caption, .constantValuesContainer caption {
+.overviewSummary caption, .memberSummary caption, .typeSummary caption,
+.useSummary caption, .constantsSummary caption, .deprecatedSummary caption {
     position:relative;
     text-align:left;
     background-repeat:no-repeat;
@@ -379,10 +368,18 @@
     padding:0px;
     margin:0px;
 }
-caption a:link, caption a:hover, caption a:active, caption a:visited {
+.overviewSummary caption a:link, .memberSummary caption a:link, .typeSummary caption a:link,
+.useSummary caption a:link, .constantsSummary caption a:link, .deprecatedSummary caption a:link,
+.overviewSummary caption a:hover, .memberSummary caption a:hover, .typeSummary caption a:hover,
+.useSummary caption a:hover, .constantsSummary caption a:hover, .deprecatedSummary caption a:hover,
+.overviewSummary caption a:active, .memberSummary caption a:active, .typeSummary caption a:active,
+.useSummary caption a:active, .constantsSummary caption a:active, .deprecatedSummary caption a:active,
+.overviewSummary caption a:visited, .memberSummary caption a:visited, .typeSummary caption a:visited,
+.useSummary caption a:visited, .constantsSummary caption a:visited, .deprecatedSummary caption a:visited {
     color:#FFFFFF;
 }
-.overviewSummary caption span, .packageSummary caption span, .contentContainer ul.blockList li.blockList caption span, .summary caption span, .classUseContainer caption span, .constantValuesContainer caption span {
+.overviewSummary caption span, .memberSummary caption span, .typeSummary caption span,
+.useSummary caption span, .constantsSummary caption span, .deprecatedSummary caption span {
     white-space:nowrap;
     padding-top:8px;
     padding-left:8px;
@@ -390,7 +387,7 @@
     float:left;
     background-image:url(resources/titlebar.gif);
 }
-.contentContainer ul.blockList li.blockList caption span.activeTableTab span {
+.memberSummary caption span.activeTableTab span {
     white-space:nowrap;
     padding-top:8px;
     padding-left:8px;
@@ -398,7 +395,7 @@
     float:left;
     background-image:url(resources/activetitlebar.gif);
 }
-.contentContainer ul.blockList li.blockList caption span.tableTab span {
+.memberSummary caption span.tableTab span {
     white-space:nowrap;
     padding-top:8px;
     padding-left:8px;
@@ -406,14 +403,15 @@
     float:left;
     background-image:url(resources/titlebar.gif);
 }
-.contentContainer ul.blockList li.blockList caption span.tableTab, .contentContainer ul.blockList li.blockList caption span.activeTableTab {
+.memberSummary caption span.tableTab, .memberSummary caption span.activeTableTab {
     padding-top:0px;
     padding-left:0px;
     background-image:none;
     float:none;
     display:inline-block;
 }
-.overviewSummary .tabEnd, .packageSummary .tabEnd, .contentContainer ul.blockList li.blockList .tabEnd, .summary .tabEnd, .classUseContainer .tabEnd, .constantValuesContainer .tabEnd {
+.overviewSummary .tabEnd, .memberSummary .tabEnd, .typeSummary .tabEnd,
+.useSummary .tabEnd, .constantsSummary .tabEnd, .deprecatedSummary .tabEnd {
     width:10px;
     background-image:url(resources/titlebar_end.gif);
     background-repeat:no-repeat;
@@ -421,7 +419,7 @@
     position:relative;
     float:left;
 }
-.contentContainer ul.blockList li.blockList .activeTableTab .tabEnd {
+.memberSummary .activeTableTab .tabEnd {
     width:10px;
     margin-right:5px;
     background-image:url(resources/activetitlebar_end.gif);
@@ -430,7 +428,7 @@
     position:relative;
     float:left;
 }
-.contentContainer ul.blockList li.blockList .tableTab .tabEnd {
+.memberSummary .tableTab .tabEnd {
     width:10px;
     margin-right:5px;
     background-image:url(resources/titlebar_end.gif);
@@ -439,33 +437,23 @@
     position:relative;
     float:left;
 }
-ul.blockList ul.blockList li.blockList table {
-    margin:0 0 12px 0px;
-    width:100%;
-}
-.tableSubHeadingColor {
-    background-color: #EEEEFF;
-}
-.altColor {
-    background-color:#eeeeef;
-}
-.rowColor {
-    background-color:#ffffff;
-}
-.overviewSummary td, .packageSummary td, .contentContainer ul.blockList li.blockList td, .summary td, .classUseContainer td, .constantValuesContainer td {
+.overviewSummary td, .memberSummary td, .typeSummary td,
+.useSummary td, .constantsSummary td, .deprecatedSummary td {
     text-align:left;
     padding:3px 3px 3px 7px;
 }
-th.colFirst, th.colLast, th.colOne, .constantValuesContainer th {
+th.colOne, th.colFirst, th.colLast, .useSummary th, .constantsSummary th,
+td.colOne, td.colFirst, td.colLast, .useSummary td, .constantsSummary td{
+    vertical-align:top;
+    padding-right:3px;
+}
+th.colFirst, th.colLast, th.colOne, .constantsSummary th {
     background:#dee3e9;
     border-top:1px solid #9eadc0;
     border-bottom:1px solid #9eadc0;
     text-align:left;
     padding:3px 3px 3px 7px;
 }
-td.colOne a:link, td.colOne a:active, td.colOne a:visited, td.colOne a:hover, td.colFirst a:link, td.colFirst a:active, td.colFirst a:visited, td.colFirst a:hover, td.colLast a:link, td.colLast a:active, td.colLast a:visited, td.colLast a:hover, .constantValuesContainer td a:link, .constantValuesContainer td a:active, .constantValuesContainer td a:visited, .constantValuesContainer td a:hover {
-    font-weight:bold;
-}
 td.colFirst, th.colFirst {
     border-left:1px solid #9eadc0;
     white-space:nowrap;
@@ -477,18 +465,25 @@
     border-right:1px solid #9eadc0;
     border-left:1px solid #9eadc0;
 }
-table.overviewSummary  {
-    padding:0px;
-    margin-left:0px;
-}
-table.overviewSummary td.colFirst, table.overviewSummary th.colFirst,
-table.overviewSummary td.colOne, table.overviewSummary th.colOne {
+.overviewSummary td.colFirst, .overviewSummary th.colFirst,
+.overviewSummary td.colOne, .overviewSummary th.colOne,
+.memberSummary td.colFirst, .memberSummary th.colFirst,
+.memberSummary td.colOne, .memberSummary th.colOne,
+.typeSummary td.colFirst{
     width:25%;
     vertical-align:middle;
 }
-table.packageSummary td.colFirst, table.overviewSummary th.colFirst {
-    width:25%;
-    vertical-align:middle;
+td.colOne a:link, td.colOne a:active, td.colOne a:visited, td.colOne a:hover, td.colFirst a:link, td.colFirst a:active, td.colFirst a:visited, td.colFirst a:hover, td.colLast a:link, td.colLast a:active, td.colLast a:visited, td.colLast a:hover, .constantValuesContainer td a:link, .constantValuesContainer td a:active, .constantValuesContainer td a:visited, .constantValuesContainer td a:hover {
+    font-weight:bold;
+}
+.tableSubHeadingColor {
+    background-color: #EEEEFF;
+}
+.altColor {
+    background-color:#eeeeef;
+}
+.rowColor {
+    background-color:#ffffff;
 }
 /*
 Content styles
diff --git a/langtools/src/share/classes/com/sun/tools/javac/Main.java b/langtools/src/share/classes/com/sun/tools/javac/Main.java
index 43300b6..5ad9d4b 100644
--- a/langtools/src/share/classes/com/sun/tools/javac/Main.java
+++ b/langtools/src/share/classes/com/sun/tools/javac/Main.java
@@ -31,7 +31,7 @@
  * The programmatic interface for the Java Programming Language
  * compiler, javac.
  */
-@jdk.Supported
+@jdk.Exported
 public class Main {
 
     /** Main entry point for the launcher.
diff --git a/langtools/src/share/classes/com/sun/tools/javac/api/JavacTool.java b/langtools/src/share/classes/com/sun/tools/javac/api/JavacTool.java
index d1ef902..1988106 100644
--- a/langtools/src/share/classes/com/sun/tools/javac/api/JavacTool.java
+++ b/langtools/src/share/classes/com/sun/tools/javac/api/JavacTool.java
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2005, 2012, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2005, 2013, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -120,7 +120,6 @@
         try {
             ClientCodeWrapper ccw = ClientCodeWrapper.instance(context);
 
-            final String kindMsg = "All compilation units must be of SOURCE kind";
             if (options != null)
                 for (String option : options)
                     option.getClass(); // null check
@@ -132,8 +131,11 @@
             if (compilationUnits != null) {
                 compilationUnits = ccw.wrapJavaFileObjects(compilationUnits); // implicit null check
                 for (JavaFileObject cu : compilationUnits) {
-                    if (cu.getKind() != JavaFileObject.Kind.SOURCE)
+                    if (cu.getKind() != JavaFileObject.Kind.SOURCE) {
+                        String kindMsg = "Compilation unit is not of SOURCE kind: "
+                                + "\"" + cu.getName() + "\"";
                         throw new IllegalArgumentException(kindMsg);
+                    }
                 }
             }
 
diff --git a/langtools/src/share/classes/com/sun/tools/javac/code/Symbol.java b/langtools/src/share/classes/com/sun/tools/javac/code/Symbol.java
index 7a65bd0..6d9eea7 100644
--- a/langtools/src/share/classes/com/sun/tools/javac/code/Symbol.java
+++ b/langtools/src/share/classes/com/sun/tools/javac/code/Symbol.java
@@ -327,7 +327,8 @@
     public boolean isStatic() {
         return
             (flags() & STATIC) != 0 ||
-            (owner.flags() & INTERFACE) != 0 && kind != MTH;
+            (owner.flags() & INTERFACE) != 0 && kind != MTH &&
+             name != name.table.names._this;
     }
 
     public boolean isInterface() {
@@ -1060,6 +1061,12 @@
                 return ElementKind.CLASS;
         }
 
+        @Override
+        public Set<Modifier> getModifiers() {
+            long flags = flags();
+            return Flags.asModifierSet(flags & ~DEFAULT);
+        }
+
         public NestingKind getNestingKind() {
             complete();
             if (owner.kind == PCK)
diff --git a/langtools/src/share/classes/com/sun/tools/javac/code/Type.java b/langtools/src/share/classes/com/sun/tools/javac/code/Type.java
index 699ac7e..56e4d41 100644
--- a/langtools/src/share/classes/com/sun/tools/javac/code/Type.java
+++ b/langtools/src/share/classes/com/sun/tools/javac/code/Type.java
@@ -1651,6 +1651,9 @@
         public <R, P> R accept(TypeVisitor<R, P> v, P p) {
             return v.visitNoType(this, p);
         }
+
+        @Override
+        public boolean isCompound() { return false; }
     }
 
     /** Represents VOID.
@@ -1672,6 +1675,9 @@
         }
 
         @Override
+        public boolean isCompound() { return false; }
+
+        @Override
         public <R, P> R accept(TypeVisitor<R, P> v, P p) {
             return v.visitNoType(this, p);
         }
@@ -1698,6 +1704,9 @@
         }
 
         @Override
+        public boolean isCompound() { return false; }
+
+        @Override
         public <R, P> R accept(TypeVisitor<R, P> v, P p) {
             return v.visitNull(this, p);
         }
diff --git a/langtools/src/share/classes/com/sun/tools/javac/code/Types.java b/langtools/src/share/classes/com/sun/tools/javac/code/Types.java
index 84eaf4a..b5c512e 100644
--- a/langtools/src/share/classes/com/sun/tools/javac/code/Types.java
+++ b/langtools/src/share/classes/com/sun/tools/javac/code/Types.java
@@ -244,7 +244,7 @@
             public Type visitClassType(ClassType t, Symbol sym) {
                 if (t.tsym == sym)
                     return t;
-                Type base = asSuper(sym.type, t.tsym);
+                Type base = asSuper(sym.type, t);
                 if (base == null)
                     return null;
                 ListBuffer<Type> from = new ListBuffer<Type>();
@@ -687,7 +687,7 @@
                         (t.flags() & SYNTHETIC) == 0;
             }
         };
-        private boolean pendingBridges(ClassSymbol origin, TypeSymbol s) {
+        private boolean pendingBridges(ClassSymbol origin, TypeSymbol sym) {
             //a symbol will be completed from a classfile if (a) symbol has
             //an associated file object with CLASS kind and (b) the symbol has
             //not been entered
@@ -696,11 +696,11 @@
                     enter.getEnv(origin) == null) {
                 return false;
             }
-            if (origin == s) {
+            if (origin == sym) {
                 return true;
             }
             for (Type t : interfaces(origin.type)) {
-                if (pendingBridges((ClassSymbol)t.tsym, s)) {
+                if (pendingBridges((ClassSymbol)t.tsym, sym)) {
                     return true;
                 }
             }
@@ -761,7 +761,7 @@
             } else if (t.hasTag(TYPEVAR)) {
                 return isSubtypeUnchecked(t.getUpperBound(), s, warn);
             } else if (!s.isRaw()) {
-                Type t2 = asSuper(t, s.tsym);
+                Type t2 = asSuper(t, s);
                 if (t2 != null && t2.isRaw()) {
                     if (isReifiable(s)) {
                         warn.silentWarn(LintCategory.UNCHECKED);
@@ -914,7 +914,7 @@
 
             @Override
             public Boolean visitClassType(ClassType t, Type s) {
-                Type sup = asSuper(t, s.tsym);
+                Type sup = asSuper(t, s);
                 return sup != null
                     && sup.tsym == s.tsym
                     // You're not allowed to write
@@ -1935,30 +1935,42 @@
      * @param t a type
      * @param sym a symbol
      */
-    public Type asSuper(Type t, Symbol sym) {
-        return asSuper.visit(t, sym);
+    public Type asSuper(Type t, Symbol s) {
+        return asSuper(t, s.type);
+    }
+
+    public Type asSuper(Type t, Type s) {
+        return asSuper.visit(t, s);
     }
     // where
-        private SimpleVisitor<Type,Symbol> asSuper = new SimpleVisitor<Type,Symbol>() {
+        private SimpleVisitor<Type,Type> asSuper = new SimpleVisitor<Type,Type>() {
 
-            public Type visitType(Type t, Symbol sym) {
+            public Type visitType(Type t, Type s) {
                 return null;
             }
 
             @Override
-            public Type visitClassType(ClassType t, Symbol sym) {
-                if (t.tsym == sym)
+            public Type visitClassType(ClassType t, Type s) {
+                if (t.tsym == s.tsym)
                     return t;
 
                 Type st = supertype(t);
-                if (st.hasTag(CLASS) || st.hasTag(TYPEVAR) || st.hasTag(ERROR)) {
-                    Type x = asSuper(st, sym);
+
+                switch(st.getTag()) {
+                default: break;
+                case CLASS:
+                case ARRAY:
+                case TYPEVAR:
+                case ERROR: {
+                    Type x = asSuper(st, s);
                     if (x != null)
                         return x;
+                } break;
                 }
-                if ((sym.flags() & INTERFACE) != 0) {
+
+                if ((s.tsym.flags() & INTERFACE) != 0) {
                     for (List<Type> l = interfaces(t); l.nonEmpty(); l = l.tail) {
-                        Type x = asSuper(l.head, sym);
+                        Type x = asSuper(l.head, s);
                         if (x != null)
                             return x;
                     }
@@ -1967,22 +1979,20 @@
             }
 
             @Override
-            public Type visitArrayType(ArrayType t, Symbol sym) {
-                return isSubtype(t, sym.type) ? sym.type : null;
+            public Type visitArrayType(ArrayType t, Type s) {
+                return isSubtype(t, s) ? s : null;
             }
 
             @Override
-            public Type visitTypeVar(TypeVar t, Symbol sym) {
-                if (t.tsym == sym)
+            public Type visitTypeVar(TypeVar t, Type s) {
+                if (t.tsym == s.tsym)
                     return t;
                 else
-                    return asSuper(t.bound, sym);
+                    return asSuper(t.bound, s);
             }
 
             @Override
-            public Type visitErrorType(ErrorType t, Symbol sym) {
-                return t;
-            }
+            public Type visitErrorType(ErrorType t, Type s) { return t; }
         };
 
     /**
@@ -3563,9 +3573,9 @@
             //step 3 - for each element G in MEC, compute lci(Inv(G))
             List<Type> candidates = List.nil();
             for (Type erasedSupertype : mec) {
-                List<Type> lci = List.of(asSuper(ts.head, erasedSupertype.tsym));
+                List<Type> lci = List.of(asSuper(ts.head, erasedSupertype));
                 for (Type t : ts) {
-                    lci = intersect(lci, List.of(asSuper(t, erasedSupertype.tsym)));
+                    lci = intersect(lci, List.of(asSuper(t, erasedSupertype)));
                 }
                 candidates = candidates.appendList(lci);
             }
@@ -3985,7 +3995,7 @@
         // The arguments to the supers could be unified here to
         // get a more accurate analysis
         while (commonSupers.nonEmpty()) {
-            Type t1 = asSuper(from, commonSupers.head.tsym);
+            Type t1 = asSuper(from, commonSupers.head);
             Type t2 = commonSupers.head; // same as asSuper(to, commonSupers.head.tsym);
             if (disjointTypes(t1.getTypeArguments(), t2.getTypeArguments()))
                 return false;
@@ -4016,7 +4026,7 @@
             from = target;
         }
         Assert.check((from.tsym.flags() & FINAL) != 0);
-        Type t1 = asSuper(from, to.tsym);
+        Type t1 = asSuper(from, to);
         if (t1 == null) return false;
         Type t2 = to;
         if (disjointTypes(t1.getTypeArguments(), t2.getTypeArguments()))
diff --git a/langtools/src/share/classes/com/sun/tools/javac/comp/Annotate.java b/langtools/src/share/classes/com/sun/tools/javac/comp/Annotate.java
index 3a0997b..709d818 100644
--- a/langtools/src/share/classes/com/sun/tools/javac/comp/Annotate.java
+++ b/langtools/src/share/classes/com/sun/tools/javac/comp/Annotate.java
@@ -310,6 +310,7 @@
     Attribute enterAttributeValue(Type expected,
                                   JCExpression tree,
                                   Env<AttrContext> env) {
+        Type original = expected;
         //first, try completing the attribution value sym - if a completion
         //error is thrown, we should recover gracefully, and display an
         //ordinary resolution diagnostic.
@@ -317,7 +318,54 @@
             expected.tsym.complete();
         } catch(CompletionFailure e) {
             log.error(tree.pos(), "cant.resolve", Kinds.kindName(e.sym), e.sym);
-            return new Attribute.Error(expected);
+            expected = syms.errType;
+        }
+        if (expected.hasTag(ARRAY)) {
+            if (!tree.hasTag(NEWARRAY)) {
+                tree = make.at(tree.pos).
+                    NewArray(null, List.<JCExpression>nil(), List.of(tree));
+            }
+            JCNewArray na = (JCNewArray)tree;
+            if (na.elemtype != null) {
+                log.error(na.elemtype.pos(), "new.not.allowed.in.annotation");
+            }
+            ListBuffer<Attribute> buf = new ListBuffer<Attribute>();
+            for (List<JCExpression> l = na.elems; l.nonEmpty(); l=l.tail) {
+                buf.append(enterAttributeValue(types.elemtype(expected),
+                                               l.head,
+                                               env));
+            }
+            na.type = expected;
+            return new Attribute.
+                Array(expected, buf.toArray(new Attribute[buf.length()]));
+        }
+        if (tree.hasTag(NEWARRAY)) { //error recovery
+            if (!expected.isErroneous())
+                log.error(tree.pos(), "annotation.value.not.allowable.type");
+            JCNewArray na = (JCNewArray)tree;
+            if (na.elemtype != null) {
+                log.error(na.elemtype.pos(), "new.not.allowed.in.annotation");
+            }
+            for (List<JCExpression> l = na.elems; l.nonEmpty(); l=l.tail) {
+                enterAttributeValue(syms.errType,
+                                    l.head,
+                                    env);
+            }
+            return new Attribute.Error(original);
+        }
+        if ((expected.tsym.flags() & Flags.ANNOTATION) != 0) {
+            if (tree.hasTag(ANNOTATION)) {
+                return enterAnnotation((JCAnnotation)tree, expected, env);
+            } else {
+                log.error(tree.pos(), "annotation.value.must.be.annotation");
+                expected = syms.errType;
+            }
+        }
+        if (tree.hasTag(ANNOTATION)) { //error recovery
+            if (!expected.isErroneous())
+                log.error(tree.pos(), "annotation.not.valid.for.type", expected);
+            enterAnnotation((JCAnnotation)tree, syms.errType, env);
+            return new Attribute.Error(original);
         }
         if (expected.isPrimitive() || types.isSameType(expected, syms.stringType)) {
             Type result = attr.attribExpr(tree, env, expected);
@@ -353,33 +401,6 @@
             return new Attribute.Class(types,
                                        (((JCFieldAccess) tree).selected).type);
         }
-        if ((expected.tsym.flags() & Flags.ANNOTATION) != 0) {
-            if (!tree.hasTag(ANNOTATION)) {
-                log.error(tree.pos(), "annotation.value.must.be.annotation");
-                expected = syms.errorType;
-            }
-            return enterAnnotation((JCAnnotation)tree, expected, env);
-        }
-        if (expected.hasTag(ARRAY)) { // should really be isArray()
-            if (!tree.hasTag(NEWARRAY)) {
-                tree = make.at(tree.pos).
-                    NewArray(null, List.<JCExpression>nil(), List.of(tree));
-            }
-            JCNewArray na = (JCNewArray)tree;
-            if (na.elemtype != null) {
-                log.error(na.elemtype.pos(), "new.not.allowed.in.annotation");
-                return new Attribute.Error(expected);
-            }
-            ListBuffer<Attribute> buf = new ListBuffer<Attribute>();
-            for (List<JCExpression> l = na.elems; l.nonEmpty(); l=l.tail) {
-                buf.append(enterAttributeValue(types.elemtype(expected),
-                                               l.head,
-                                               env));
-            }
-            na.type = expected;
-            return new Attribute.
-                Array(expected, buf.toArray(new Attribute[buf.length()]));
-        }
         if (expected.hasTag(CLASS) &&
             (expected.tsym.flags() & Flags.ENUM) != 0) {
             attr.attribExpr(tree, env, expected);
@@ -394,6 +415,7 @@
             VarSymbol enumerator = (VarSymbol) sym;
             return new Attribute.Enum(expected, enumerator);
         }
+        //error recovery:
         if (!expected.isErroneous())
             log.error(tree.pos(), "annotation.value.not.allowable.type");
         return new Attribute.Error(attr.attribExpr(tree, env, expected));
diff --git a/langtools/src/share/classes/com/sun/tools/javac/comp/Attr.java b/langtools/src/share/classes/com/sun/tools/javac/comp/Attr.java
index f9673de..3b84040 100644
--- a/langtools/src/share/classes/com/sun/tools/javac/comp/Attr.java
+++ b/langtools/src/share/classes/com/sun/tools/javac/comp/Attr.java
@@ -58,6 +58,7 @@
 import static com.sun.tools.javac.code.Kinds.ERRONEOUS;
 import static com.sun.tools.javac.code.TypeTag.*;
 import static com.sun.tools.javac.code.TypeTag.WILDCARD;
+import static com.sun.tools.javac.code.TypeTag.ARRAY;
 import static com.sun.tools.javac.tree.JCTree.Tag.*;
 
 /** This is the main context-dependent analysis phase in GJC. It
@@ -797,28 +798,32 @@
                    JCTree tree,
                    Env<AttrContext> env,
                    boolean classExpected,
-                   boolean interfaceExpected,
+                   boolean interfaceOrArrayExpected,
                    boolean checkExtensible) {
         if (t.isErroneous())
             return t;
-        if (t.hasTag(TYPEVAR) && !classExpected && !interfaceExpected) {
+        if (t.hasTag(TYPEVAR) && !classExpected && !interfaceOrArrayExpected) {
             // check that type variable is already visible
             if (t.getUpperBound() == null) {
                 log.error(tree.pos(), "illegal.forward.ref");
                 return types.createErrorType(t);
             }
-        } else {
+        } else if (classExpected) {
             t = chk.checkClassType(tree.pos(), t, checkExtensible|!allowGenerics);
+        } else {
+            t = chk.checkClassOrArrayType(tree.pos(), t,
+                                          checkExtensible|!allowGenerics);
         }
-        if (interfaceExpected && (t.tsym.flags() & INTERFACE) == 0) {
+        if (interfaceOrArrayExpected &&
+            !(t.tsym.isInterface() || t.getTag() == ARRAY)) {
             log.error(tree.pos(), "intf.expected.here");
             // return errType is necessary since otherwise there might
             // be undetected cycles which cause attribution to loop
             return types.createErrorType(t);
         } else if (checkExtensible &&
                    classExpected &&
-                   (t.tsym.flags() & INTERFACE) != 0) {
-                log.error(tree.pos(), "no.intf.expected.here");
+                   t.tsym.isInterface()) {
+            log.error(tree.pos(), "no.intf.expected.here");
             return types.createErrorType(t);
         }
         if (checkExtensible &&
@@ -829,6 +834,12 @@
         chk.checkNonCyclic(tree.pos(), t);
         return t;
     }
+    //where
+        private Object asTypeParam(Type t) {
+            return (t.hasTag(TYPEVAR))
+                                    ? diags.fragment("type.parameter", t)
+                                    : t;
+        }
 
     Type attribIdentAsEnumType(Env<AttrContext> env, JCIdent id) {
         Assert.check((env.enclClass.sym.flags() & ENUM) != 0);
@@ -4058,8 +4069,7 @@
     }
 
     public void visitAnnotation(JCAnnotation tree) {
-        log.error(tree.pos(), "annotation.not.valid.for.type", pt());
-        result = tree.type = syms.errType;
+        Assert.error("should be handled in Annotate");
     }
 
     public void visitAnnotatedType(JCAnnotatedType tree) {
diff --git a/langtools/src/share/classes/com/sun/tools/javac/comp/Check.java b/langtools/src/share/classes/com/sun/tools/javac/comp/Check.java
index 453bc70..720b150 100644
--- a/langtools/src/share/classes/com/sun/tools/javac/comp/Check.java
+++ b/langtools/src/share/classes/com/sun/tools/javac/comp/Check.java
@@ -706,6 +706,37 @@
         return t;
     }
 
+    // Analog of checkClassType that calls checkClassOrArrayType instead
+    Type checkClassOrArrayType(DiagnosticPosition pos,
+                               Type t, boolean noBounds) {
+        t = checkClassOrArrayType(pos, t);
+        if (noBounds && t.isParameterized()) {
+            List<Type> args = t.getTypeArguments();
+            while (args.nonEmpty()) {
+                if (args.head.hasTag(WILDCARD))
+                    return typeTagError(pos,
+                                        diags.fragment("type.req.exact"),
+                                        args.head);
+                args = args.tail;
+            }
+        }
+        return t;
+    }
+
+    /** Check that type is a reifiable class, interface or array type.
+     *  @param pos           Position to be used for error reporting.
+     *  @param t             The type to be checked.
+     */
+    Type checkReifiableReferenceType(DiagnosticPosition pos, Type t) {
+        t = checkClassOrArrayType(pos, t);
+        if (!t.isErroneous() && !types.isReifiable(t)) {
+            log.error(pos, "illegal.generic.type.for.instof");
+            return types.createErrorType(t);
+        } else {
+            return t;
+        }
+    }
+
     /** Check that type is a reference type, i.e. a class, interface or array type
      *  or a type variable.
      *  @param pos           Position to be used for error reporting.
@@ -2210,6 +2241,9 @@
             seen = seen.prepend(tv);
             for (Type b : types.getBounds(tv))
                 checkNonCyclic1(pos, b, seen);
+        } else if (t.hasTag(ARRAY)) {
+            final ArrayType at = (ArrayType)t.unannotatedType();
+            checkNonCyclic1(pos, at.elemtype, seen);
         }
     }
 
diff --git a/langtools/src/share/classes/com/sun/tools/javac/main/JavaCompiler.java b/langtools/src/share/classes/com/sun/tools/javac/main/JavaCompiler.java
index 39a59f6..89b95f0 100644
--- a/langtools/src/share/classes/com/sun/tools/javac/main/JavaCompiler.java
+++ b/langtools/src/share/classes/com/sun/tools/javac/main/JavaCompiler.java
@@ -1743,13 +1743,4 @@
         shouldStopPolicyIfError = prev.shouldStopPolicyIfError;
         shouldStopPolicyIfNoError = prev.shouldStopPolicyIfNoError;
     }
-
-    public static void enableLogging() {
-        Logger logger = Logger.getLogger(com.sun.tools.javac.Main.class.getPackage().getName());
-        logger.setLevel(Level.ALL);
-        for (Handler h : logger.getParent().getHandlers()) {
-            h.setLevel(Level.ALL);
-       }
-
-    }
 }
diff --git a/langtools/src/share/classes/com/sun/tools/javac/parser/JavacParser.java b/langtools/src/share/classes/com/sun/tools/javac/parser/JavacParser.java
index 57a492f..d466563 100644
--- a/langtools/src/share/classes/com/sun/tools/javac/parser/JavacParser.java
+++ b/langtools/src/share/classes/com/sun/tools/javac/parser/JavacParser.java
@@ -3002,8 +3002,9 @@
         int pos = token.pos;
         Name name;
         if (lambdaParameter && token.kind == UNDERSCORE) {
-            syntaxError(pos, "expected", IDENTIFIER);
+            log.error(pos, "underscore.as.identifier.in.lambda");
             name = token.name();
+            nextToken();
         } else {
             if (allowThisIdent) {
                 JCExpression pn = qualident(false);
diff --git a/langtools/src/share/classes/com/sun/tools/javac/processing/JavacProcessingEnvironment.java b/langtools/src/share/classes/com/sun/tools/javac/processing/JavacProcessingEnvironment.java
index 7aca9f5..95816d2 100644
--- a/langtools/src/share/classes/com/sun/tools/javac/processing/JavacProcessingEnvironment.java
+++ b/langtools/src/share/classes/com/sun/tools/javac/processing/JavacProcessingEnvironment.java
@@ -1034,6 +1034,13 @@
                 } else {
                     discoverAndRunProcs(context, annotationsPresent, topLevelClasses, packageInfoFiles);
                 }
+            } catch (Throwable t) {
+                // we're specifically expecting Abort here, but if any Throwable
+                // comes by, we should flush all deferred diagnostics, rather than
+                // drop them on the ground.
+                deferredDiagnosticHandler.reportDeferredDiagnostics();
+                log.popDiagnosticHandler(deferredDiagnosticHandler);
+                throw t;
             } finally {
                 if (!taskListener.isEmpty())
                     taskListener.finished(new TaskEvent(TaskEvent.Kind.ANNOTATION_PROCESSING_ROUND));
diff --git a/langtools/src/share/classes/com/sun/tools/javac/resources/compiler.properties b/langtools/src/share/classes/com/sun/tools/javac/resources/compiler.properties
index a87abc3..f8174d4 100644
--- a/langtools/src/share/classes/com/sun/tools/javac/resources/compiler.properties
+++ b/langtools/src/share/classes/com/sun/tools/javac/resources/compiler.properties
@@ -2224,6 +2224,10 @@
     ''_'' used as an identifier\n\
     (use of ''_'' as an identifier might not be supported in releases after Java SE 8)
 
+compiler.err.underscore.as.identifier.in.lambda=\
+    ''_'' used as an identifier\n\
+    (use of ''_'' as an identifier is forbidden for lambda parameters)
+
 compiler.err.enum.as.identifier=\
     as of release 5, ''enum'' is a keyword, and may not be used as an identifier\n\
     (use -source 1.4 or lower to use ''enum'' as an identifier)
diff --git a/langtools/src/share/classes/com/sun/tools/javac/sym/CreateSymbols.java b/langtools/src/share/classes/com/sun/tools/javac/sym/CreateSymbols.java
index 6ee1a18..8a930be 100644
--- a/langtools/src/share/classes/com/sun/tools/javac/sym/CreateSymbols.java
+++ b/langtools/src/share/classes/com/sun/tools/javac/sym/CreateSymbols.java
@@ -107,15 +107,21 @@
             if (renv.processingOver())
                 createSymbols();
         } catch (IOException e) {
+            CharSequence msg = e.getLocalizedMessage();
+            if (msg == null)
+                msg = e.toString();
             processingEnv.getMessager()
-                .printMessage(Diagnostic.Kind.ERROR, e.getLocalizedMessage());
+                .printMessage(Diagnostic.Kind.ERROR, msg);
         } catch (Throwable t) {
             t.printStackTrace();
             Throwable cause = t.getCause();
             if (cause == null)
                 cause = t;
+            CharSequence msg = cause.getLocalizedMessage();
+            if (msg == null)
+                msg = cause.toString();
             processingEnv.getMessager()
-                .printMessage(Diagnostic.Kind.ERROR, cause.getLocalizedMessage());
+                .printMessage(Diagnostic.Kind.ERROR, msg);
         }
         return true;
     }
diff --git a/langtools/src/share/classes/com/sun/tools/javap/ClassWriter.java b/langtools/src/share/classes/com/sun/tools/javap/ClassWriter.java
index 14a9258..02fec47 100644
--- a/langtools/src/share/classes/com/sun/tools/javap/ClassWriter.java
+++ b/langtools/src/share/classes/com/sun/tools/javap/ClassWriter.java
@@ -232,6 +232,12 @@
                 return t.accept(this, new StringBuilder()).toString();
             }
 
+            String printTypeArgs(List<? extends TypeParamType> typeParamTypes) {
+                StringBuilder builder = new StringBuilder();
+                appendIfNotEmpty(builder, "<", typeParamTypes, "> ");
+                return builder.toString();
+            }
+
             public StringBuilder visitSimpleType(SimpleType type, StringBuilder sb) {
                 sb.append(getJavaName(type.name));
                 return sb;
@@ -438,7 +444,7 @@
 
         writeModifiers(flags.getMethodModifiers());
         if (methodType != null) {
-            writeListIfNotEmpty("<", methodType.typeParamTypes, "> ");
+            print(new JavaTypePrinter(false).printTypeArgs(methodType.typeParamTypes));
         }
         if (getName(m).equals("<init>")) {
             print(getJavaName(classFile));
diff --git a/langtools/src/share/classes/javax/lang/model/element/Element.java b/langtools/src/share/classes/javax/lang/model/element/Element.java
index bc007cf..a57f7b8 100644
--- a/langtools/src/share/classes/javax/lang/model/element/Element.java
+++ b/langtools/src/share/classes/javax/lang/model/element/Element.java
@@ -202,6 +202,7 @@
      * @return {@code true} if the specified object represents the same
      *          element as this
      */
+    @Override
     boolean equals(Object obj);
 
     /**
@@ -209,6 +210,7 @@
      *
      * @see #equals
      */
+    @Override
     int hashCode();
 
 
@@ -219,11 +221,18 @@
      * Elements#getAllAnnotationMirrors(Element)
      * getAllAnnotationMirrors}.
      *
-     * @see ElementFilter
      * @since 1.6
      */
     @Override
     List<? extends AnnotationMirror> getAnnotationMirrors();
+
+    /**
+     * {@inheritDoc}
+     * @since 1.6
+     */
+    @Override
+    <A extends Annotation> A getAnnotation(Class<A> annotationType);
+
     /**
      * Applies a visitor to this element.
      *
diff --git a/langtools/src/share/classes/javax/tools/Diagnostic.java b/langtools/src/share/classes/javax/tools/Diagnostic.java
index fd781aa..03b11fd 100644
--- a/langtools/src/share/classes/javax/tools/Diagnostic.java
+++ b/langtools/src/share/classes/javax/tools/Diagnostic.java
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2005, 2006, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2005, 2013, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -49,6 +49,15 @@
 
     /**
      * Kinds of diagnostics, for example, error or warning.
+     *
+     * The kind of a diagnostic can be used to determine how the
+     * diagnostic should be presented to the user. For example,
+     * errors might be colored red or prefixed with the word "Error",
+     * while warnings might be colored yellow or prefixed with the
+     * word "Warning". There is no requirement that the Kind
+     * should imply any inherent semantic meaning to the message
+     * of the diagnostic: for example, a tool might provide an
+     * option to report all warnings as errors.
      */
     enum Kind {
         /**
@@ -63,7 +72,7 @@
         /**
          * Problem similar to a warning, but is mandated by the tool's
          * specification.  For example, the Java&trade; Language
-         * Specification, 3rd Ed. mandates warnings on certain
+         * Specification mandates warnings on certain
          * unchecked operations and the use of deprecated methods.
          */
         MANDATORY_WARNING,
diff --git a/langtools/src/share/classes/jdk/Supported.java b/langtools/src/share/classes/jdk/Exported.java
similarity index 89%
rename from langtools/src/share/classes/jdk/Supported.java
rename to langtools/src/share/classes/jdk/Exported.java
index f5bf1c5..dc9a939 100644
--- a/langtools/src/share/classes/jdk/Supported.java
+++ b/langtools/src/share/classes/jdk/Exported.java
@@ -28,8 +28,9 @@
 import java.lang.annotation.*;
 
 /**
-  * Indicates whether or not a JDK specific type or package is a
-  * supported part of the JDK.
+  * Indicates whether or not a JDK specific type or package is an
+  * exported part of the JDK suitable for use outside of the JDK
+  * implementation itself.
   *
   * This annotation should only be applied to types and packages
   * <em>outside</em> of the Java SE namespaces of {@code java.*} and
@@ -44,10 +45,10 @@
 @Documented
 @Retention(RetentionPolicy.RUNTIME)
 @Target({ElementType.TYPE, ElementType.PACKAGE})
-@Supported
-public @interface Supported {
+@Exported
+public @interface Exported {
     /**
-     * Whether or not this package or type is a supported part of the JDK.
+     * Whether or not the annotated type or package is an exported part of the JDK.
      */
     boolean value() default true;
 }
diff --git a/langtools/test/Makefile b/langtools/test/Makefile
index 35313f1..ab8b245 100644
--- a/langtools/test/Makefile
+++ b/langtools/test/Makefile
@@ -7,7 +7,7 @@
 # A full product build (or "control" build) creates a complete JDK image.
 # To test a product build, set TESTJAVA to the path for the image.
 #
-# A langtools build just builds the langtools components of a JDK. 
+# A langtools build just builds the langtools components of a JDK.
 # To test a langtools build, set TESTJAVA to the path for a recent JDK
 # build, and set TESTBOOTCLASSPATH to the compiled langtools classes --
 # for example build/classes or dist/lib/classes.jar.
@@ -122,10 +122,10 @@
   TESTJAVA = $(SLASH_JAVA)/re/jdk/1.7.0/promoted/latest/binaries/$(PLATFORM)-$(ARCH)
 endif
 
-# PRODUCT_HOME is a JPRT variable pointing to a directory containing the output from 
+# PRODUCT_HOME is a JPRT variable pointing to a directory containing the output from
 # make/Makefile
 # For langtools, this is a directory containing build and dist
-# For a control build, this is build/$(PRODUCT)-$(ARCH)/XYZ-image 
+# For a control build, this is build/$(PRODUCT)-$(ARCH)/XYZ-image
 #	(i.e, j2sdk-image or jdk-module-image)
 ifdef PRODUCT_HOME
   ifeq ($(shell [ -r $(PRODUCT_HOME)/dist/lib/classes.jar ]; echo $$?),0)
@@ -139,13 +139,13 @@
 ifdef TESTBOOTCLASSPATH
   JTREG_OPTIONS += -Xbootclasspath/p:$(TESTBOOTCLASSPATH)
 ### In the following, -refvmoptions is an undocumented option
-### The following does not work JCK 7 b30 2/6/2010. Awaiting b31. 
+### The following does not work JCK 7 b30 2/6/2010. Awaiting b31.
   JCK_OPTIONS += \
 	-vmoptions:-Xbootclasspath/p:$(TESTBOOTCLASSPATH) \
 	-refvmoptions:-Xbootclasspath/p:$(TESTBOOTCLASSPATH)
 endif
 
-# Concurrency is the number of tests that can execute at once. 
+# Concurrency is the number of tests that can execute at once.
 # On an otherwise empty machine, suggest setting to (#cpus + 2)
 # If unset, the default is (#cpus)
 ### RFE: determine and use #cpus
@@ -206,7 +206,7 @@
 # Exit -- used for final "normal" exit from "make". Redefine to "true" to avoid
 # having make exit with non-zero return code.
 EXIT = exit
-# Function to exit shell if exit code of preceding command is greater than or equal 
+# Function to exit shell if exit code of preceding command is greater than or equal
 # to a given level. Redefine function or preceding FATAL_*_EXIT codes as needed.
 EXIT_IF_FATAL = status=$$?; if [ $$status -ge $(1) ]; then exit $$status ; fi
 
@@ -217,8 +217,8 @@
 # Root of all test results
 TEST_OUTPUT_DIR = $(TEST_ROOT)/../build/$(PLATFORM)-$(ARCH)/test/langtools
 ABS_TEST_OUTPUT_DIR := \
-	$(shell mkdir -p $(TEST_ROOT)/../build/$(PLATFORM)-$(ARCH)/test/langtools; \
-		cd  $(TEST_ROOT)/../build/$(PLATFORM)-$(ARCH)/test/langtools; \
+	$(shell mkdir -p $(TEST_OUTPUT_DIR); \
+		cd  $(TEST_OUTPUT_DIR); \
 		pwd $(CYGPATH))
 # Subdirectories for different test runs
 JTREG_OUTPUT_DIR = $(ABS_TEST_OUTPUT_DIR)/jtreg
@@ -255,7 +255,7 @@
 # JT_JAVA
 #	Version of java used to run jtreg.  Should normally be the same as TESTJAVA
 # TESTJAVA
-# 	Version of java to be tested.  
+# 	Version of java to be tested.
 # JTREG_OPTIONS
 #	Additional options for jtreg
 # JTREG_TESTDIRS
@@ -311,7 +311,7 @@
 #	Version of java used to run JCK.  Should normally be the same as TESTJAVA
 #       Default is JDK 7
 # TESTJAVA
-# 	Version of java to be tested.  
+# 	Version of java to be tested.
 # JCK_COMPILER_OPTIONS
 #	Additional options for JCK-compiler
 # JCK_COMPILER_TESTDIRS
@@ -360,7 +360,7 @@
 # JT_JAVA
 #	Version of java used to run JCK.  Should normally be the same as TESTJAVA
 # TESTJAVA
-# 	Version of java to be tested.  
+# 	Version of java to be tested.
 # JCK_RUNTIME_OPTIONS
 #	Additional options for JCK-runtime
 # JCK_RUNTIME_TESTDIRS
diff --git a/langtools/test/com/sun/javadoc/JavascriptWinTitle/JavascriptWinTitle.java b/langtools/test/com/sun/javadoc/JavascriptWinTitle/JavascriptWinTitle.java
index ae24b4d..c6913c6 100644
--- a/langtools/test/com/sun/javadoc/JavascriptWinTitle/JavascriptWinTitle.java
+++ b/langtools/test/com/sun/javadoc/JavascriptWinTitle/JavascriptWinTitle.java
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2002, 2010, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2002, 2013, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -23,7 +23,7 @@
 
 /*
  * @test
- * @bug 4645058 4747738 4855054
+ * @bug 4645058 4747738 4855054 8024756
  * @summary  Javascript IE load error when linked by -linkoffline
  *           Window title shouldn't change when loading left frames (javascript)
  * @author dkramer
@@ -115,9 +115,13 @@
 
             // Test that win title javascript is followed by NOSCRIPT code.
             {"<script type=\"text/javascript\"><!--" + LS +
-                     "    if (location.href.indexOf('is-external=true') == -1) {" + LS +
-                     "        parent.document.title=\"C (Window Title)\";" + LS +
-                     "    }" + LS + "//-->" + LS + "</script>",
+            "    try {" + LS +
+            "        if (location.href.indexOf('is-external=true') == -1) {" + LS +
+            "            parent.document.title=\"C (Window Title)\";" + LS +
+            "        }" + LS +
+            "    }" + LS +
+            "    catch(err) {" + LS +
+            "    }" + LS + "//-->" + LS + "</script>",
              TMPDEST_DIR1 + FS + "p1" + FS + "C.html"
             }
 
diff --git a/langtools/test/com/sun/javadoc/testHtmlTableStyles/TestHtmlTableStyles.java b/langtools/test/com/sun/javadoc/testHtmlTableStyles/TestHtmlTableStyles.java
new file mode 100644
index 0000000..bc03449
--- /dev/null
+++ b/langtools/test/com/sun/javadoc/testHtmlTableStyles/TestHtmlTableStyles.java
@@ -0,0 +1,110 @@
+/*
+ * Copyright (c) 2013, Oracle and/or its affiliates. All rights reserved.
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * This code is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU General Public License version 2 only, as
+ * published by the Free Software Foundation.
+ *
+ * This code is distributed in the hope that it will be useful, but WITHOUT
+ * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
+ * version 2 for more details (a copy is included in the LICENSE file that
+ * accompanied this code).
+ *
+ * You should have received a copy of the GNU General Public License version
+ * 2 along with this work; if not, write to the Free Software Foundation,
+ * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
+ *
+ * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
+ * or visit www.oracle.com if you need additional information or have any
+ * questions.
+ */
+
+/*
+ * @test
+ * @bug 8008164
+ * @summary Test styles on HTML tables generated by javadoc.
+ * @author Bhavesh Patel
+ * @library ../lib/
+ * @build JavadocTester TestHtmlTableStyles
+ * @run main TestHtmlTableStyles
+ */
+
+public class TestHtmlTableStyles extends JavadocTester {
+
+    private static final String BUG_ID = "8008164";
+
+    //Input for string search tests.
+    private static final String[][] TEST = {
+        {BUG_ID + FS + "pkg1" + FS + "TestTable.html",
+            "<table border cellpadding=3 cellspacing=1>"
+        },
+        {BUG_ID + FS + "pkg1" + FS + "TestTable.html",
+            "<table class=\"memberSummary\" border=\"0\" cellpadding=\"3\" " +
+            "cellspacing=\"0\" summary=\"Field Summary table, listing fields, " +
+            "and an explanation\">"
+        },
+        {BUG_ID + FS + "pkg1" + FS + "TestTable.html",
+            "<table class=\"memberSummary\" border=\"0\" cellpadding=\"3\" " +
+            "cellspacing=\"0\" summary=\"Constructor Summary table, listing " +
+            "constructors, and an explanation\">"
+        },
+        {BUG_ID + FS + "pkg1" + FS + "TestTable.html",
+            "<table class=\"memberSummary\" border=\"0\" cellpadding=\"3\" " +
+            "cellspacing=\"0\" summary=\"Method Summary table, listing methods, " +
+            "and an explanation\">"
+        },
+        {BUG_ID + FS + "pkg1" + FS + "package-summary.html",
+            "<table class=\"typeSummary\" border=\"0\" cellpadding=\"3\" " +
+            "cellspacing=\"0\" summary=\"Class Summary table, listing classes, " +
+            "and an explanation\">"
+        },
+        {BUG_ID + FS + "pkg1" + FS + "class-use" + FS + "TestTable.html",
+            "<table class=\"useSummary\" border=\"0\" cellpadding=\"3\" " +
+            "cellspacing=\"0\" summary=\"Use table, listing fields, and an explanation\">"
+        },
+        {BUG_ID + FS + "overview-summary.html",
+            "<table class=\"overviewSummary\" border=\"0\" cellpadding=\"3\" " +
+            "cellspacing=\"0\" summary=\"Packages table, listing packages, and an explanation\">"
+        },
+        {BUG_ID + FS + "deprecated-list.html",
+            "<table class=\"deprecatedSummary\" border=\"0\" cellpadding=\"3\" " +
+            "cellspacing=\"0\" summary=\"Deprecated Methods table, listing " +
+            "deprecated methods, and an explanation\">"
+        },
+        {BUG_ID + FS + "constant-values.html",
+            "<table class=\"constantsSummary\" border=\"0\" cellpadding=\"3\" " +
+            "cellspacing=\"0\" summary=\"Constant Field Values table, listing " +
+            "constant fields, and values\">"
+        },
+    };
+
+    private static final String[] ARGS = new String[] {
+        "-d", BUG_ID, "-sourcepath", SRC_DIR, "-use", "pkg1", "pkg2"
+    };
+
+    /**
+     * The entry point of the test.
+     * @param args the array of command line arguments.
+     */
+    public static void main(String[] args) throws Exception {
+        TestHtmlTableStyles tester = new TestHtmlTableStyles();
+        run(tester, ARGS, TEST, NO_TEST);
+        tester.printSummary();
+    }
+
+    /**
+     * {@inheritDoc}
+     */
+    public String getBugId() {
+        return BUG_ID;
+    }
+
+    /**
+     * {@inheritDoc}
+     */
+    public String getBugName() {
+        return getClass().getName();
+    }
+}
diff --git a/langtools/test/com/sun/javadoc/testHtmlTableStyles/pkg1/TestTable.java b/langtools/test/com/sun/javadoc/testHtmlTableStyles/pkg1/TestTable.java
new file mode 100644
index 0000000..866c3f4
--- /dev/null
+++ b/langtools/test/com/sun/javadoc/testHtmlTableStyles/pkg1/TestTable.java
@@ -0,0 +1,84 @@
+/*
+ * 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 pkg1;
+
+/**
+ * Testing table in documentation comment. In the generated documentation, it
+ * should be displayed as a regular table and not have any styles that the javadoc
+ * generated tables have.
+ *
+ * <table border cellpadding=3 cellspacing=1>
+ * <caption>Summary of test table</caption>
+ *  <tr>
+ *    <td></td>
+ *    <td align=center colspan = 2> First Element (Head)</td>
+ *    <td align=center colspan = 2> Last Element (Tail)</td>
+ *  </tr>
+ *  <tr>
+ *    <td></td>
+ *    <td align=center><em>Throws exception</em></td>
+ *    <td align=center><em>Special value</em></td>
+ *    <td align=center><em>Throws exception</em></td>
+ *    <td align=center><em>Special value</em></td>
+ *  </tr>
+ *  <tr>
+ *    <td>Insert</td>
+ *    <td>addFirst(e)</td>
+ *    <td>offerFirst(e)</td>
+ *    <td>addLast(e)</td>
+ *    <td>offerLast(e)</td>
+ *  </tr>
+ *  <tr>
+ *    <td>Remove</td>
+ *    <td>removeFirst()</td>
+ *    <td>pollFirst()</td>
+ *    <td>removeLast()</td>
+ *    <td>pollLast()</td>
+ *  </tr>
+ * </table>
+ */
+public class TestTable
+{
+    /**
+     * Field in Class.
+     */
+    public String field;
+
+    /**
+     * Field constant in Class.
+     */
+    public static final int fieldCnst = 0;
+
+    /**
+     * Method in Class.
+     */
+    public void methodInClass(int i) {}
+
+    /**
+     * Deprecated method in Class.
+     * @deprecated Do not use it.
+     */
+    public void deprMethod() {}
+
+}
diff --git a/langtools/test/com/sun/javadoc/testHtmlTableStyles/pkg2/TestUse.java b/langtools/test/com/sun/javadoc/testHtmlTableStyles/pkg2/TestUse.java
new file mode 100644
index 0000000..8414e49
--- /dev/null
+++ b/langtools/test/com/sun/javadoc/testHtmlTableStyles/pkg2/TestUse.java
@@ -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 pkg2;
+
+import pkg1.*;
+
+/**
+ * Testing use of TestTable.
+ */
+public class TestUse
+{
+    public TestTable tTable;
+}
diff --git a/langtools/test/com/sun/javadoc/testHtmlTableTags/TestHtmlTableTags.java b/langtools/test/com/sun/javadoc/testHtmlTableTags/TestHtmlTableTags.java
index c6b14e0..5d90617 100644
--- a/langtools/test/com/sun/javadoc/testHtmlTableTags/TestHtmlTableTags.java
+++ b/langtools/test/com/sun/javadoc/testHtmlTableTags/TestHtmlTableTags.java
@@ -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
@@ -23,7 +23,7 @@
 
 /*
  * @test
- * @bug      6786688
+ * @bug      6786688 8008164
  * @summary  HTML tables should have table summary, caption and table headers.
  * @author   Bhavesh Patel
  * @library  ../lib/
@@ -50,121 +50,121 @@
 
         //Package summary
         {BUG_ID + FS + "pkg1" + FS + "package-summary.html",
-            "<table class=\"packageSummary\" border=\"0\" cellpadding=\"3\"" +
+            "<table class=\"typeSummary\" border=\"0\" cellpadding=\"3\"" +
             " cellspacing=\"0\" summary=\"Class Summary table, " +
             "listing classes, and an explanation\">"
         },
         {BUG_ID + FS + "pkg1" + FS + "package-summary.html",
-            "<table class=\"packageSummary\" border=\"0\" cellpadding=\"3\"" +
+            "<table class=\"typeSummary\" border=\"0\" cellpadding=\"3\"" +
             " cellspacing=\"0\" summary=\"Interface Summary table, " +
             "listing interfaces, and an explanation\">"
         },
         {BUG_ID + FS + "pkg2" + FS + "package-summary.html",
-            "<table class=\"packageSummary\" border=\"0\" cellpadding=\"3\"" +
+            "<table class=\"typeSummary\" border=\"0\" cellpadding=\"3\"" +
             " cellspacing=\"0\" summary=\"Enum Summary table, " +
             "listing enums, and an explanation\">"
         },
         {BUG_ID + FS + "pkg2" + FS + "package-summary.html",
-            "<table class=\"packageSummary\" border=\"0\" cellpadding=\"3\"" +
+            "<table class=\"typeSummary\" border=\"0\" cellpadding=\"3\"" +
             " cellspacing=\"0\" summary=\"Annotation Types Summary table, " +
             "listing annotation types, and an explanation\">"
         },
         // Class documentation
         {BUG_ID + FS + "pkg1" + FS + "C1.html",
-            "<table class=\"overviewSummary\" border=\"0\" cellpadding=\"3\" " +
+            "<table class=\"memberSummary\" border=\"0\" cellpadding=\"3\" " +
             "cellspacing=\"0\" summary=\"Field Summary table, listing fields, " +
             "and an explanation\">"
         },
         {BUG_ID + FS + "pkg1" + FS + "C1.html",
-            "<table class=\"overviewSummary\" border=\"0\" cellpadding=\"3\" " +
+            "<table class=\"memberSummary\" border=\"0\" cellpadding=\"3\" " +
             "cellspacing=\"0\" summary=\"Method Summary table, listing methods, " +
             "and an explanation\">"
         },
         {BUG_ID + FS + "pkg2" + FS + "C2.html",
-            "<table class=\"overviewSummary\" border=\"0\" cellpadding=\"3\" " +
+            "<table class=\"memberSummary\" border=\"0\" cellpadding=\"3\" " +
             "cellspacing=\"0\" summary=\"Nested Class Summary table, listing " +
             "nested classes, and an explanation\">"
         },
         {BUG_ID + FS + "pkg2" + FS + "C2.html",
-            "<table class=\"overviewSummary\" border=\"0\" cellpadding=\"3\" " +
+            "<table class=\"memberSummary\" border=\"0\" cellpadding=\"3\" " +
             "cellspacing=\"0\" summary=\"Constructor Summary table, listing " +
             "constructors, and an explanation\">"
         },
         {BUG_ID + FS + "pkg2" + FS + "C2.ModalExclusionType.html",
-            "<table class=\"overviewSummary\" border=\"0\" cellpadding=\"3\" " +
+            "<table class=\"memberSummary\" border=\"0\" cellpadding=\"3\" " +
             "cellspacing=\"0\" summary=\"Enum Constant Summary table, listing " +
             "enum constants, and an explanation\">"
         },
         {BUG_ID + FS + "pkg2" + FS + "C3.html",
-            "<table class=\"overviewSummary\" border=\"0\" cellpadding=\"3\" " +
+            "<table class=\"memberSummary\" border=\"0\" cellpadding=\"3\" " +
             "cellspacing=\"0\" summary=\"Required Element Summary table, " +
             "listing required elements, and an explanation\">"
         },
         {BUG_ID + FS + "pkg2" + FS + "C4.html",
-            "<table class=\"overviewSummary\" border=\"0\" cellpadding=\"3\" " +
+            "<table class=\"memberSummary\" border=\"0\" cellpadding=\"3\" " +
             "cellspacing=\"0\" summary=\"Optional Element Summary table, " +
             "listing optional elements, and an explanation\">"
         },
         // Class use documentation
         {BUG_ID + FS + "pkg1" + FS + "class-use" + FS + "I1.html",
-            "<table border=\"0\" cellpadding=\"3\" cellspacing=\"0\" summary=\"Use " +
+            "<table class=\"useSummary\" border=\"0\" cellpadding=\"3\" cellspacing=\"0\" summary=\"Use " +
             "table, listing packages, and an explanation\">"
         },
         {BUG_ID + FS + "pkg1" + FS + "class-use" + FS + "C1.html",
-            "<table border=\"0\" cellpadding=\"3\" cellspacing=\"0\" summary=\"Use " +
+            "<table class=\"useSummary\" border=\"0\" cellpadding=\"3\" cellspacing=\"0\" summary=\"Use " +
             "table, listing fields, and an explanation\">"
         },
         {BUG_ID + FS + "pkg1" + FS + "class-use" + FS + "C1.html",
-            "<table border=\"0\" cellpadding=\"3\" cellspacing=\"0\" summary=\"Use " +
+            "<table class=\"useSummary\" border=\"0\" cellpadding=\"3\" cellspacing=\"0\" summary=\"Use " +
             "table, listing methods, and an explanation\">"
         },
         {BUG_ID + FS + "pkg2" + FS + "class-use" + FS + "C2.html",
-            "<table border=\"0\" cellpadding=\"3\" cellspacing=\"0\" summary=\"Use " +
+            "<table class=\"useSummary\" border=\"0\" cellpadding=\"3\" cellspacing=\"0\" summary=\"Use " +
             "table, listing fields, and an explanation\">"
         },
         {BUG_ID + FS + "pkg2" + FS + "class-use" + FS + "C2.html",
-            "<table border=\"0\" cellpadding=\"3\" cellspacing=\"0\" summary=\"Use " +
+            "<table class=\"useSummary\" border=\"0\" cellpadding=\"3\" cellspacing=\"0\" summary=\"Use " +
             "table, listing methods, and an explanation\">"
         },
         {BUG_ID + FS + "pkg2" + FS + "class-use" + FS + "C2.ModalExclusionType.html",
-            "<table border=\"0\" cellpadding=\"3\" cellspacing=\"0\" summary=\"Use " +
+            "<table class=\"useSummary\" border=\"0\" cellpadding=\"3\" cellspacing=\"0\" summary=\"Use " +
             "table, listing packages, and an explanation\">"
         },
         {BUG_ID + FS + "pkg2" + FS + "class-use" + FS + "C2.ModalExclusionType.html",
-            "<table border=\"0\" cellpadding=\"3\" cellspacing=\"0\" summary=\"Use " +
+            "<table class=\"useSummary\" border=\"0\" cellpadding=\"3\" cellspacing=\"0\" summary=\"Use " +
             "table, listing methods, and an explanation\">"
         },
         // Package use documentation
         {BUG_ID + FS + "pkg1" + FS + "package-use.html",
-            "<table border=\"0\" cellpadding=\"3\" cellspacing=\"0\" summary=\"Use " +
+            "<table class=\"useSummary\" border=\"0\" cellpadding=\"3\" cellspacing=\"0\" summary=\"Use " +
             "table, listing packages, and an explanation\">"
         },
         {BUG_ID + FS + "pkg1" + FS + "package-use.html",
-            "<table border=\"0\" cellpadding=\"3\" cellspacing=\"0\" summary=\"Use " +
+            "<table class=\"useSummary\" border=\"0\" cellpadding=\"3\" cellspacing=\"0\" summary=\"Use " +
             "table, listing classes, and an explanation\">"
         },
         {BUG_ID + FS + "pkg2" + FS + "package-use.html",
-            "<table border=\"0\" cellpadding=\"3\" cellspacing=\"0\" summary=\"Use " +
+            "<table class=\"useSummary\" border=\"0\" cellpadding=\"3\" cellspacing=\"0\" summary=\"Use " +
             "table, listing packages, and an explanation\">"
         },
         {BUG_ID + FS + "pkg2" + FS + "package-use.html",
-            "<table border=\"0\" cellpadding=\"3\" cellspacing=\"0\" summary=\"Use " +
+            "<table class=\"useSummary\" border=\"0\" cellpadding=\"3\" cellspacing=\"0\" summary=\"Use " +
             "table, listing classes, and an explanation\">"
         },
         // Deprecated
         {BUG_ID + FS + "deprecated-list.html",
-            "<table border=\"0\" cellpadding=\"3\" cellspacing=\"0\" " +
+            "<table class=\"deprecatedSummary\" border=\"0\" cellpadding=\"3\" cellspacing=\"0\" " +
             "summary=\"Deprecated Fields table, listing deprecated fields, " +
             "and an explanation\">"
         },
         {BUG_ID + FS + "deprecated-list.html",
-            "<table border=\"0\" cellpadding=\"3\" cellspacing=\"0\" " +
+            "<table class=\"deprecatedSummary\" border=\"0\" cellpadding=\"3\" cellspacing=\"0\" " +
             "summary=\"Deprecated Methods table, listing deprecated methods, " +
             "and an explanation\">"
         },
         // Constant values
         {BUG_ID + FS + "constant-values.html",
-            "<table border=\"0\" cellpadding=\"3\" cellspacing=\"0\" " +
+            "<table class=\"constantsSummary\" border=\"0\" cellpadding=\"3\" cellspacing=\"0\" " +
             "summary=\"Constant Field Values table, listing " +
             "constant fields, and values\">"
         },
diff --git a/langtools/test/com/sun/javadoc/testJavascript/TestJavascript.java b/langtools/test/com/sun/javadoc/testJavascript/TestJavascript.java
index 2860209..96487f0 100644
--- a/langtools/test/com/sun/javadoc/testJavascript/TestJavascript.java
+++ b/langtools/test/com/sun/javadoc/testJavascript/TestJavascript.java
@@ -23,7 +23,7 @@
 
 /*
  * @test
- * @bug      4665566 4855876 7025314 8012375 8015997 8016328
+ * @bug      4665566 4855876 7025314 8012375 8015997 8016328 8024756
  * @summary  Verify that the output has the right javascript.
  * @author   jamieh
  * @library  ../lib/
@@ -104,9 +104,13 @@
 
         //Make sure title javascript only runs if is-external is not true
         {BUG_ID + FS + "pkg" + FS + "C.html",
-                "    if (location.href.indexOf('is-external=true') == -1) {" + NL +
-                "        parent.document.title=\"C\";" + NL +
-                        "    }"},
+            "    try {" + NL +
+            "        if (location.href.indexOf('is-external=true') == -1) {" + NL +
+            "            parent.document.title=\"C\";" + NL +
+            "        }" + NL +
+            "    }" + NL +
+            "    catch(err) {" + NL +
+            "    }"},
     };
 
     private static final String[][] NEGATED_TEST = NO_TEST;
diff --git a/langtools/test/com/sun/javadoc/testProfiles/TestProfiles.java b/langtools/test/com/sun/javadoc/testProfiles/TestProfiles.java
index 4dd70ea..1d30824 100644
--- a/langtools/test/com/sun/javadoc/testProfiles/TestProfiles.java
+++ b/langtools/test/com/sun/javadoc/testProfiles/TestProfiles.java
@@ -23,7 +23,7 @@
 
 /*
  * @test
- * @bug      8006124 8009684 8016921 8023700 8024096
+ * @bug      8006124 8009684 8016921 8023700 8024096 8008164
  * @summary  Test javadoc support for profiles.
  * @author   Bhavesh Patel, Evgeniya Stepanova
  * @library  ../lib/
@@ -137,7 +137,7 @@
         },
         // need to add teststring when JDK-8015496 will be fixed
         //Test exception in profiles
-        {PROFILE_BUG_ID + FS + "compact1-summary.html","<table class=\"packageSummary\" "
+        {PROFILE_BUG_ID + FS + "compact1-summary.html","<table class=\"typeSummary\" "
             + "border=\"0\" cellpadding=\"3\" cellspacing=\"0\" "
             + "summary=\"Exception Summary table, listing exceptions, and an explanation\">"
             + NL + "<caption><span>Exception Summary</span><span class=\"tabEnd\">"
@@ -149,7 +149,7 @@
         },
         //Test errors in profiles
         {PROFILE_BUG_ID + FS + "compact1-summary.html",
-            "<table class=\"packageSummary\" border=\"0\" cellpadding=\"3\" cellspacing=\"0\" "
+            "<table class=\"typeSummary\" border=\"0\" cellpadding=\"3\" cellspacing=\"0\" "
             + "summary=\"Error Summary table, listing errors, and an explanation\">"
             + NL + "<caption><span>Error Summary</span><span class=\"tabEnd\">&nbsp;"
             + "</span></caption>" + NL + "<tr>" + NL + "<th class=\"colFirst\""
diff --git a/langtools/test/com/sun/javadoc/testStylesheet/TestStylesheet.java b/langtools/test/com/sun/javadoc/testStylesheet/TestStylesheet.java
index b6192fb..e9fa72d 100644
--- a/langtools/test/com/sun/javadoc/testStylesheet/TestStylesheet.java
+++ b/langtools/test/com/sun/javadoc/testStylesheet/TestStylesheet.java
@@ -23,7 +23,7 @@
 
 /*
  * @test
- * @bug      4494033 7028815 7052425 8007338 8023608
+ * @bug      4494033 7028815 7052425 8007338 8023608 8008164
  * @summary  Run tests on doclet stylesheet.
  * @author   jamieh
  * @library  ../lib/
@@ -59,10 +59,8 @@
         {BUG_ID + FS + "stylesheet.css",
             "ul {" + NL + "    list-style-type:disc;" + NL + "}"},
         {BUG_ID + FS + "stylesheet.css",
-            ".overviewSummary caption, .packageSummary caption, " +
-            ".contentContainer ul.blockList li.blockList caption, " +
-            ".summary caption, .classUseContainer caption, " +
-            ".constantValuesContainer caption {" + NL +
+            ".overviewSummary caption, .memberSummary caption, .typeSummary caption," + NL +
+            ".useSummary caption, .constantsSummary caption, .deprecatedSummary caption {" + NL +
             "    position:relative;" + NL +
             "    text-align:left;" + NL +
             "    background-repeat:no-repeat;" + NL +
@@ -74,10 +72,8 @@
             "    margin:0px;" + NL +
             "}"},
         {BUG_ID + FS + "stylesheet.css",
-            ".overviewSummary caption span, .packageSummary caption span, " +
-            ".contentContainer ul.blockList li.blockList caption span, " +
-            ".summary caption span, .classUseContainer caption span, " +
-            ".constantValuesContainer caption span {" + NL +
+            ".overviewSummary caption span, .memberSummary caption span, .typeSummary caption span," + NL +
+            ".useSummary caption span, .constantsSummary caption span, .deprecatedSummary caption span {" + NL +
             "    white-space:nowrap;" + NL +
             "    padding-top:8px;" + NL +
             "    padding-left:8px;" + NL +
@@ -86,8 +82,7 @@
             "    background-image:url(resources/titlebar.gif);" + NL +
             "}"},
         {BUG_ID + FS + "stylesheet.css",
-            ".contentContainer ul.blockList li.blockList caption " +
-            "span.activeTableTab span {" + NL +
+            ".memberSummary caption span.activeTableTab span {" + NL +
             "    white-space:nowrap;" + NL +
             "    padding-top:8px;" + NL +
             "    padding-left:8px;" + NL +
@@ -96,7 +91,7 @@
             "    background-image:url(resources/activetitlebar.gif);" + NL +
             "}"},
         {BUG_ID + FS + "stylesheet.css",
-            ".contentContainer ul.blockList li.blockList caption span.tableTab span {" + NL +
+            ".memberSummary caption span.tableTab span {" + NL +
             "    white-space:nowrap;" + NL +
             "    padding-top:8px;" + NL +
             "    padding-left:8px;" + NL +
@@ -105,8 +100,7 @@
             "    background-image:url(resources/titlebar.gif);" + NL +
             "}"},
         {BUG_ID + FS + "stylesheet.css",
-            ".contentContainer ul.blockList li.blockList caption span.tableTab, " +
-            ".contentContainer ul.blockList li.blockList caption span.activeTableTab {" + NL +
+            ".memberSummary caption span.tableTab, .memberSummary caption span.activeTableTab {" + NL +
             "    padding-top:0px;" + NL +
             "    padding-left:0px;" + NL +
             "    background-image:none;" + NL +
diff --git a/langtools/test/tools/javac/ArraysInIntersections.java b/langtools/test/tools/javac/ArraysInIntersections.java
new file mode 100644
index 0000000..e058c1d
--- /dev/null
+++ b/langtools/test/tools/javac/ArraysInIntersections.java
@@ -0,0 +1,39 @@
+/*
+ * Copyright (c) 2013, Oracle and/or its affiliates. All rights reserved.
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * This code is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU General Public License version 2 only, as
+ * published by the Free Software Foundation.
+ *
+ * This code is distributed in the hope that it will be useful, but WITHOUT
+ * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
+ * version 2 for more details (a copy is included in the LICENSE file that
+ * accompanied this code).
+ *
+ * You should have received a copy of the GNU General Public License version
+ * 2 along with this work; if not, write to the Free Software Foundation,
+ * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
+ *
+ * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
+ * or visit www.oracle.com if you need additional information or have any
+ * questions.
+ */
+
+/*
+ * @test
+ * @bug 8021339
+ * @summary Allow arrays in intersection types
+ * @compile ArraysInIntersections.java
+ */
+
+import java.io.Serializable;
+
+public class ArraysInIntersections<T extends Serializable & Integer[]> {
+
+    public <S extends Serializable & Integer[]> Object m() {
+        return (Serializable & Integer[]) new Integer[1];
+    }
+
+}
diff --git a/langtools/test/tools/javac/InferArraysInIntersections.java b/langtools/test/tools/javac/InferArraysInIntersections.java
new file mode 100644
index 0000000..c22041c
--- /dev/null
+++ b/langtools/test/tools/javac/InferArraysInIntersections.java
@@ -0,0 +1,38 @@
+/*
+ * Copyright (c) 2013, Oracle and/or its affiliates. All rights reserved.
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * This code is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU General Public License version 2 only, as
+ * published by the Free Software Foundation.
+ *
+ * This code is distributed in the hope that it will be useful, but WITHOUT
+ * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
+ * version 2 for more details (a copy is included in the LICENSE file that
+ * accompanied this code).
+ *
+ * You should have received a copy of the GNU General Public License version
+ * 2 along with this work; if not, write to the Free Software Foundation,
+ * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
+ *
+ * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
+ * or visit www.oracle.com if you need additional information or have any
+ * questions.
+ */
+
+/*
+ * @test
+ * @bug 8021339
+ * @summary Allow arrays in intersection types
+ * @compile -doe -XDrawDiagnostics InferArraysInIntersections.java
+ */
+import java.util.*;
+
+class InferArraysInIntersections {
+   <T> T m(List<? super T> t) { return null; }
+
+   void test(List<char[]> lc) {
+      Runnable r = m(lc); //inference fails here
+   }
+}
diff --git a/langtools/test/tools/javac/annotations/neg/8022765/T8022765.java b/langtools/test/tools/javac/annotations/neg/8022765/T8022765.java
new file mode 100644
index 0000000..9f501c5
--- /dev/null
+++ b/langtools/test/tools/javac/annotations/neg/8022765/T8022765.java
@@ -0,0 +1,141 @@
+/**
+ * @test /nodynamiccopyright/
+ * @bug 8022765
+ * @summary javac should not crash for incorrect attribute values
+ * @build VerifyAnnotationsAttributed
+ * @run main VerifyAnnotationsAttributed T8022765.java
+ * @compile/fail/ref=T8022765.out -XDrawDiagnostics T8022765.java
+ */
+@Ann(@Override)
+@Primitive(@Override)
+@Str(@Override)
+@En(@Override)
+@ArrAnn(@Override)
+@ArrPrimitive(@Override)
+@ArrStr(@Override)
+@ArrEn(@Override)
+class AnnC { }
+
+class PrimitiveC {
+    private static final int C = 1;
+    @Ann(C)
+    @Primitive(C)
+    @Str(C)
+    @En(C)
+    @ArrAnn(C)
+    @ArrPrimitive(C)
+    @ArrStr(C)
+    @ArrEn(C)
+    class I {
+    }
+}
+
+class StringC {
+
+    private static final String C = "";
+
+    @Ann(C)
+    @Primitive(C)
+    @Str(C)
+    @En(C)
+    @ArrAnn(C)
+    @ArrPrimitive(C)
+    @ArrStr(C)
+    @ArrEn(C)
+    class I {
+    }
+}
+
+@Ann(E.A)
+@Primitive(E.A)
+@Str(E.A)
+@En(E.A)
+@ArrAnn(E.A)
+@ArrPrimitive(E.A)
+@ArrStr(E.A)
+@ArrEn(E.A)
+class EnC { }
+
+@Ann({@Override})
+@Primitive({@Override})
+@Str({@Override})
+@En({@Override})
+@ArrAnn({@Override})
+@ArrPrimitive({@Override})
+@ArrStr({@Override})
+@ArrEn({@Override})
+class ArrAnnC { }
+
+class ArrPrimitiveC {
+    private static final int C = 1;
+    @Ann({C})
+    @Primitive({C})
+    @Str({C})
+    @En({C})
+    @ArrAnn({C})
+    @ArrPrimitive({C})
+    @ArrStr({C})
+    @ArrEn({C})
+    class I {
+    }
+}
+
+class ArrStringC {
+    private static final String C = "";
+    @Ann({C})
+    @Primitive({C})
+    @Str({C})
+    @En({C})
+    @ArrAnn({C})
+    @ArrPrimitive({C})
+    @ArrStr({C})
+    @ArrEn({C})
+    class I {
+    }
+}
+
+@Ann({E.A})
+@Primitive({E.A})
+@Str({E.A})
+@En({E.A})
+@ArrAnn({E.A})
+@ArrPrimitive({E.A})
+@ArrStr({E.A})
+@ArrEn({E.A})
+class ArrEnC { }
+
+@interface Ann {
+    Override value();
+}
+
+@interface Primitive {
+    int value();
+}
+
+@interface Str {
+    String value();
+}
+
+@interface En {
+    E value();
+}
+
+@interface ArrAnn {
+    Override[] value();
+}
+
+@interface ArrPrimitive {
+    int[] value();
+}
+
+@interface ArrStr {
+    String[] value();
+}
+
+@interface ArrEn {
+    E[] value();
+}
+
+enum E {
+    A;
+}
diff --git a/langtools/test/tools/javac/annotations/neg/8022765/T8022765.out b/langtools/test/tools/javac/annotations/neg/8022765/T8022765.out
new file mode 100644
index 0000000..d1cb0df
--- /dev/null
+++ b/langtools/test/tools/javac/annotations/neg/8022765/T8022765.out
@@ -0,0 +1,57 @@
+T8022765.java:10:12: compiler.err.annotation.not.valid.for.type: int
+T8022765.java:11:6: compiler.err.annotation.not.valid.for.type: java.lang.String
+T8022765.java:12:5: compiler.err.annotation.not.valid.for.type: E
+T8022765.java:14:15: compiler.err.annotation.not.valid.for.type: int
+T8022765.java:15:9: compiler.err.annotation.not.valid.for.type: java.lang.String
+T8022765.java:16:8: compiler.err.annotation.not.valid.for.type: E
+T8022765.java:21:10: compiler.err.annotation.value.must.be.annotation
+T8022765.java:23:10: compiler.err.prob.found.req: (compiler.misc.inconvertible.types: int, java.lang.String)
+T8022765.java:24:9: compiler.err.prob.found.req: (compiler.misc.inconvertible.types: int, E)
+T8022765.java:25:13: compiler.err.annotation.value.must.be.annotation
+T8022765.java:27:13: compiler.err.prob.found.req: (compiler.misc.inconvertible.types: int, java.lang.String)
+T8022765.java:28:12: compiler.err.prob.found.req: (compiler.misc.inconvertible.types: int, E)
+T8022765.java:37:10: compiler.err.annotation.value.must.be.annotation
+T8022765.java:38:16: compiler.err.prob.found.req: (compiler.misc.inconvertible.types: java.lang.String, int)
+T8022765.java:40:9: compiler.err.prob.found.req: (compiler.misc.inconvertible.types: java.lang.String, E)
+T8022765.java:41:13: compiler.err.annotation.value.must.be.annotation
+T8022765.java:42:19: compiler.err.prob.found.req: (compiler.misc.inconvertible.types: java.lang.String, int)
+T8022765.java:44:12: compiler.err.prob.found.req: (compiler.misc.inconvertible.types: java.lang.String, E)
+T8022765.java:49:7: compiler.err.annotation.value.must.be.annotation
+T8022765.java:50:13: compiler.err.prob.found.req: (compiler.misc.inconvertible.types: E, int)
+T8022765.java:51:7: compiler.err.prob.found.req: (compiler.misc.inconvertible.types: E, java.lang.String)
+T8022765.java:53:10: compiler.err.annotation.value.must.be.annotation
+T8022765.java:54:16: compiler.err.prob.found.req: (compiler.misc.inconvertible.types: E, int)
+T8022765.java:55:10: compiler.err.prob.found.req: (compiler.misc.inconvertible.types: E, java.lang.String)
+T8022765.java:59:6: compiler.err.annotation.value.not.allowable.type
+T8022765.java:60:12: compiler.err.annotation.value.not.allowable.type
+T8022765.java:61:6: compiler.err.annotation.value.not.allowable.type
+T8022765.java:62:5: compiler.err.annotation.value.not.allowable.type
+T8022765.java:64:16: compiler.err.annotation.not.valid.for.type: int
+T8022765.java:65:10: compiler.err.annotation.not.valid.for.type: java.lang.String
+T8022765.java:66:9: compiler.err.annotation.not.valid.for.type: E
+T8022765.java:71:10: compiler.err.annotation.value.not.allowable.type
+T8022765.java:72:16: compiler.err.annotation.value.not.allowable.type
+T8022765.java:73:10: compiler.err.annotation.value.not.allowable.type
+T8022765.java:74:9: compiler.err.annotation.value.not.allowable.type
+T8022765.java:75:14: compiler.err.annotation.value.must.be.annotation
+T8022765.java:77:14: compiler.err.prob.found.req: (compiler.misc.inconvertible.types: int, java.lang.String)
+T8022765.java:78:13: compiler.err.prob.found.req: (compiler.misc.inconvertible.types: int, E)
+T8022765.java:85:10: compiler.err.annotation.value.not.allowable.type
+T8022765.java:86:16: compiler.err.annotation.value.not.allowable.type
+T8022765.java:87:10: compiler.err.annotation.value.not.allowable.type
+T8022765.java:88:9: compiler.err.annotation.value.not.allowable.type
+T8022765.java:89:14: compiler.err.annotation.value.must.be.annotation
+T8022765.java:90:20: compiler.err.prob.found.req: (compiler.misc.inconvertible.types: java.lang.String, int)
+T8022765.java:92:13: compiler.err.prob.found.req: (compiler.misc.inconvertible.types: java.lang.String, E)
+T8022765.java:97:6: compiler.err.annotation.value.not.allowable.type
+T8022765.java:97:8: compiler.err.attribute.value.must.be.constant
+T8022765.java:98:12: compiler.err.annotation.value.not.allowable.type
+T8022765.java:98:14: compiler.err.attribute.value.must.be.constant
+T8022765.java:99:6: compiler.err.annotation.value.not.allowable.type
+T8022765.java:99:8: compiler.err.attribute.value.must.be.constant
+T8022765.java:100:5: compiler.err.annotation.value.not.allowable.type
+T8022765.java:100:7: compiler.err.attribute.value.must.be.constant
+T8022765.java:101:11: compiler.err.annotation.value.must.be.annotation
+T8022765.java:102:17: compiler.err.prob.found.req: (compiler.misc.inconvertible.types: E, int)
+T8022765.java:103:11: compiler.err.prob.found.req: (compiler.misc.inconvertible.types: E, java.lang.String)
+56 errors
\ No newline at end of file
diff --git a/langtools/test/tools/javac/annotations/neg/8022765/VerifyAnnotationsAttributed.java b/langtools/test/tools/javac/annotations/neg/8022765/VerifyAnnotationsAttributed.java
new file mode 100644
index 0000000..2902965
--- /dev/null
+++ b/langtools/test/tools/javac/annotations/neg/8022765/VerifyAnnotationsAttributed.java
@@ -0,0 +1,78 @@
+/*
+ * Copyright (c) 2013, Oracle and/or its affiliates. All rights reserved.
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * This code is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU General Public License version 2 only, as
+ * published by the Free Software Foundation.
+ *
+ * This code is distributed in the hope that it will be useful, but WITHOUT
+ * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
+ * version 2 for more details (a copy is included in the LICENSE file that
+ * accompanied this code).
+ *
+ * You should have received a copy of the GNU General Public License version
+ * 2 along with this work; if not, write to the Free Software Foundation,
+ * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
+ *
+ * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
+ * or visit www.oracle.com if you need additional information or have any
+ * questions.
+ */
+import com.sun.source.tree.CompilationUnitTree;
+import com.sun.source.tree.IdentifierTree;
+import com.sun.source.tree.MemberSelectTree;
+import com.sun.source.util.JavacTask;
+import com.sun.source.util.TreePathScanner;
+import com.sun.source.util.Trees;
+import com.sun.tools.javac.api.JavacTool;
+import com.sun.tools.javac.file.JavacFileManager;
+import java.io.File;
+import java.io.IOException;
+import java.net.URISyntaxException;
+import java.util.Collections;
+import javax.lang.model.element.Element;
+import javax.lang.model.element.ElementKind;
+
+public class VerifyAnnotationsAttributed {
+    public static void main(String... args) throws IOException, URISyntaxException {
+        if (args.length != 1) throw new IllegalStateException("Must provide class name!");
+        File testSrc = new File(System.getProperty("test.src"));
+        File testFile = new File(testSrc, args[0]);
+        if (!testFile.canRead()) throw new IllegalStateException("Cannot read the test source");
+        JavacFileManager fm = JavacTool.create().getStandardFileManager(null, null, null);
+        JavacTask task = JavacTool.create().getTask(null,
+                                                    fm,
+                                                    null,
+                                                    Collections.<String>emptyList(),
+                                                    null,
+                                                    fm.getJavaFileObjects(testFile));
+        final Trees trees = Trees.instance(task);
+        final CompilationUnitTree cut = task.parse().iterator().next();
+        task.analyze();
+
+        //ensure all the annotation attributes are annotated meaningfully
+        //all the attributes in the test file should contain either an identifier
+        //or a select, so only checking those for a reasonable Element/Symbol.
+        new TreePathScanner<Void, Void>() {
+            @Override
+            public Void visitIdentifier(IdentifierTree node, Void p) {
+                verifyAttributedMeaningfully();
+                return super.visitIdentifier(node, p);
+            }
+            @Override
+            public Void visitMemberSelect(MemberSelectTree node, Void p) {
+                verifyAttributedMeaningfully();
+                return super.visitMemberSelect(node, p);
+            }
+            private void verifyAttributedMeaningfully() {
+                Element el = trees.getElement(getCurrentPath());
+
+                if (el == null || el.getKind() == ElementKind.OTHER) {
+                    throw new IllegalStateException("Not attributed properly: " + getCurrentPath().getParentPath().getLeaf());
+                }
+            }
+        }.scan(cut, null);
+    }
+}
diff --git a/langtools/test/tools/javac/api/TestJavacTask.java b/langtools/test/tools/javac/api/TestJavacTask.java
index f1f8558..3e01377 100644
--- a/langtools/test/tools/javac/api/TestJavacTask.java
+++ b/langtools/test/tools/javac/api/TestJavacTask.java
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2005, 2006, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2005, 2013, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -23,8 +23,8 @@
 
 /*
  * @test
- * @bug     4813736
- * @summary Provide a basic test of access to the Java Model from javac
+ * @bug     4813736 8015073
+ * @summary Provide a basic test of access to the Java Model from javac, and error messages
  * @author  Peter von der Ah\u00e9
  * @run main TestJavacTask TestJavacTask.java
  */
@@ -40,21 +40,36 @@
 import javax.tools.ToolProvider;
 
 public class TestJavacTask {
-
-    static JavacTaskImpl getTask(JavaCompiler compiler, File... file) {
+    static final JavaCompiler compiler = ToolProvider.getSystemJavaCompiler();
+    static JavacTaskImpl getTask(File... file) {
         StandardJavaFileManager fm = compiler.getStandardFileManager(null, null, null);
         Iterable<? extends JavaFileObject> files =
             fm.getJavaFileObjectsFromFiles(Arrays.asList(file));
         return (JavacTaskImpl)compiler.getTask(null, fm, null, null, null, files);
     }
 
-    public static void main(String... args) throws IOException {
-        JavaCompiler tool = ToolProvider.getSystemJavaCompiler();
+    static void basicTest(String... args) throws IOException {
         String srcdir = System.getProperty("test.src");
         File file = new File(srcdir, args[0]);
-        JavacTaskImpl task = getTask(tool, file);
+        JavacTaskImpl task = getTask(file);
         for (TypeElement clazz : task.enter(task.parse()))
             System.out.println(clazz.getSimpleName());
     }
 
+    static void checkKindError() {
+        final File testFile = new File("Test.java "); // <-note trailing space!
+        try {
+            getTask(testFile);
+        } catch (IllegalArgumentException iae) {
+            if (!iae.getMessage().contains("\"" + testFile.getName() + "\"")) {
+                System.err.println("Got message: " + iae.getMessage());
+                throw new RuntimeException("Error: expected string not found");
+            }
+        }
+    }
+
+    public static void main(String... args) throws IOException {
+        basicTest(args);
+        checkKindError();
+    }
 }
diff --git a/langtools/test/tools/javac/diags/examples/UnderscoreInLambdaExpression.java b/langtools/test/tools/javac/diags/examples/UnderscoreInLambdaExpression.java
new file mode 100644
index 0000000..586ab76
--- /dev/null
+++ b/langtools/test/tools/javac/diags/examples/UnderscoreInLambdaExpression.java
@@ -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.
+ *
+ * This code is distributed in the hope that it will be useful, but WITHOUT
+ * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
+ * version 2 for more details (a copy is included in the LICENSE file that
+ * accompanied this code).
+ *
+ * You should have received a copy of the GNU General Public License version
+ * 2 along with this work; if not, write to the Free Software Foundation,
+ * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
+ *
+ * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
+ * or visit www.oracle.com if you need additional information or have any
+ * questions.
+ */
+
+// key: compiler.err.underscore.as.identifier.in.lambda
+public class UnderscoreInLambdaExpression {
+    java.util.function.Function<String,String> f = _ -> "x";
+}
diff --git a/langtools/test/tools/javac/enum/EnumAsIdentifier.java b/langtools/test/tools/javac/enum/EnumAsIdentifier.java
new file mode 100644
index 0000000..30bc822
--- /dev/null
+++ b/langtools/test/tools/javac/enum/EnumAsIdentifier.java
@@ -0,0 +1,16 @@
+/**
+ * @test    /nodynamiccopyright/
+ * @bug     8025537
+ * @author  sogoel
+ * @summary enum keyword used as an identifier
+ * @compile/ref=EnumAsIdentifier4.out -XDrawDiagnostics -source 1.4 EnumAsIdentifier.java
+ * @compile/fail/ref=EnumAsIdentifier5.out -XDrawDiagnostics -source 1.5 EnumAsIdentifier.java
+ * @compile/fail/ref=EnumAsIdentifier.out -XDrawDiagnostics EnumAsIdentifier.java
+ */
+
+public class EnumAsIdentifier {
+
+    int enum = 0;
+
+}
+
diff --git a/langtools/test/tools/javac/enum/EnumAsIdentifier.out b/langtools/test/tools/javac/enum/EnumAsIdentifier.out
new file mode 100644
index 0000000..eeb9e84
--- /dev/null
+++ b/langtools/test/tools/javac/enum/EnumAsIdentifier.out
@@ -0,0 +1,2 @@
+EnumAsIdentifier.java:13:9: compiler.err.enum.as.identifier
+1 error
diff --git a/langtools/test/tools/javac/enum/EnumAsIdentifier4.out b/langtools/test/tools/javac/enum/EnumAsIdentifier4.out
new file mode 100644
index 0000000..40c72a8
--- /dev/null
+++ b/langtools/test/tools/javac/enum/EnumAsIdentifier4.out
@@ -0,0 +1,6 @@
+- compiler.warn.source.no.bootclasspath: 1.4
+- compiler.warn.option.obsolete.source: 1.4
+- compiler.warn.option.obsolete.target: 1.4
+- compiler.warn.option.obsolete.suppression
+EnumAsIdentifier.java:13:9: compiler.warn.enum.as.identifier
+5 warnings
diff --git a/langtools/test/tools/javac/enum/EnumAsIdentifier5.out b/langtools/test/tools/javac/enum/EnumAsIdentifier5.out
new file mode 100644
index 0000000..dead5c4
--- /dev/null
+++ b/langtools/test/tools/javac/enum/EnumAsIdentifier5.out
@@ -0,0 +1,6 @@
+- compiler.warn.source.no.bootclasspath: 1.5
+- compiler.warn.option.obsolete.source: 1.5
+- compiler.warn.option.obsolete.suppression
+EnumAsIdentifier.java:13:9: compiler.err.enum.as.identifier
+1 error
+3 warnings
diff --git a/langtools/test/tools/javac/enum/EnumMembersOrder.java b/langtools/test/tools/javac/enum/EnumMembersOrder.java
new file mode 100644
index 0000000..be91ed7
--- /dev/null
+++ b/langtools/test/tools/javac/enum/EnumMembersOrder.java
@@ -0,0 +1,20 @@
+/**
+ * @test    /nodynamiccopyright/
+ * @bug     8025537 5028491
+ * @author  sogoel
+ * @summary enum constants should precede other enum members
+ * @compile/fail/ref=EnumMembersOrder.out -XDrawDiagnostics EnumMembersOrder.java
+ */
+
+enum Days {
+
+    Days(String d) { day = d; } // constructor
+
+    // enum constants
+    WEEKEND("SAT"),
+    WEEKDAY("MON");
+
+    private String day;
+
+}
+
diff --git a/langtools/test/tools/javac/enum/EnumMembersOrder.out b/langtools/test/tools/javac/enum/EnumMembersOrder.out
new file mode 100644
index 0000000..d89a3d7
--- /dev/null
+++ b/langtools/test/tools/javac/enum/EnumMembersOrder.out
@@ -0,0 +1,7 @@
+EnumMembersOrder.java:11:16: compiler.err.expected: ')'
+EnumMembersOrder.java:11:17: compiler.err.expected3: ',', '}', ';'
+EnumMembersOrder.java:11:19: compiler.err.expected: '}'
+EnumMembersOrder.java:11:31: compiler.err.expected3: class, interface, enum
+EnumMembersOrder.java:17:13: compiler.err.expected3: class, interface, enum
+EnumMembersOrder.java:19:1: compiler.err.expected3: class, interface, enum
+6 errors
diff --git a/langtools/test/tools/javac/generics/OverrideBridge.java b/langtools/test/tools/javac/generics/OverrideBridge.java
deleted file mode 100644
index 9c9af07..0000000
--- a/langtools/test/tools/javac/generics/OverrideBridge.java
+++ /dev/null
@@ -1,166 +0,0 @@
-/*
- * 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 6337171 6996415
- * @ignore 6996758: Investigate better override bridges strategy
- * @summary  javac should create bridge methods when type variable bounds restricted
- * @run main OverrideBridge
- */
-
-// fix, and test, has been disabled as a consequence of 6996415
-
-import java.io.*;
-import java.net.URI;
-import java.util.ArrayList;
-import java.util.Arrays;
-import java.util.List;
-import java.util.Map;
-import java.util.HashMap;
-import javax.tools.JavaCompiler;
-import javax.tools.JavaFileObject;
-import javax.tools.SimpleJavaFileObject;
-import javax.tools.ToolProvider;
-
-import com.sun.source.util.JavacTask;
-import com.sun.tools.classfile.ClassFile;
-import com.sun.tools.classfile.ConstantPoolException;
-import com.sun.tools.classfile.Descriptor.InvalidDescriptor;
-import com.sun.tools.classfile.Method;
-
-public class OverrideBridge {
-
-    enum Implementation {
-        IMPLICIT(""),
-        EXPLICIT("@Override public abstract X m(X x);");
-
-        String impl;
-
-        Implementation(String impl) {
-            this.impl = impl;
-        }
-    }
-
-    static class JavaSource extends SimpleJavaFileObject {
-
-        final static String sourceStub =
-                        "abstract class A<X> {\n" +
-                        "   public abstract X m(X x);\n" +
-                        "}\n" +
-                        "interface I<X> {\n" +
-                        "X m(X x);\n" +
-                        "}\n" +
-                        "abstract class B<X extends B<X>> extends A<X> implements I<X> { #B }\n" +
-                        "abstract class C<X extends C<X>> extends B<X>  { #C }\n" +
-                        "abstract class D<X extends D<X>> extends C<X>  { #D }\n";
-
-        String source;
-
-        public JavaSource(Implementation implB, Implementation implC, Implementation implD) {
-            super(URI.create("myfo:/Test.java"), JavaFileObject.Kind.SOURCE);
-            source = sourceStub.replace("#B", implB.impl).replace("#C", implC.impl).replace("#D", implD.impl);
-        }
-
-        @Override
-        public CharSequence getCharContent(boolean ignoreEncodingErrors) {
-            return source;
-        }
-    }
-
-    public static void main(String... args) throws Exception {
-        Map<ClassFile, List<Method>> refMembers =
-                compile(Implementation.EXPLICIT, Implementation.EXPLICIT, Implementation.EXPLICIT, "ref");
-        int i = 0;
-        for (Implementation implB : Implementation.values()) {
-            for (Implementation implC : Implementation.values()) {
-                for (Implementation implD : Implementation.values()) {
-                    Map<ClassFile, List<Method>> membersToCheck = compile(implB, implC, implD, "out_" + i++);
-                    check(refMembers, membersToCheck);
-                }
-            }
-        }
-    }
-
-    static String workDir = System.getProperty("user.dir");
-
-    static Map<ClassFile, List<Method>> compile(Implementation implB, Implementation implC, Implementation implD, String destPath) throws Exception {
-        File destDir = new File(workDir, destPath); destDir.mkdir();
-        final JavaCompiler tool = ToolProvider.getSystemJavaCompiler();
-        JavaSource source = new JavaSource(implB, implC, implD);
-        JavacTask ct = (JavacTask)tool.getTask(null, null, null,
-                Arrays.asList("-d", destPath), null, Arrays.asList(source));
-        ct.generate();
-        Map<ClassFile, List<Method>> members = new HashMap<>();
-        addMembers(destDir, members);
-        return members;
-    }
-
-    static void addMembers(File destDir, Map<ClassFile, List<Method>> members) {
-        String[] names = { "B.class", "C.class", "D.class" };
-        try {
-            for (String name : names) {
-                File f = new File(destDir, name);
-                ClassFile cf = ClassFile.read(f);
-                members.put(cf, readMethod(cf, "m"));
-            }
-        } catch (Exception e) {
-            e.printStackTrace();
-            throw new Error("error reading classes");
-        }
-    }
-
-    static List<Method> readMethod(ClassFile cf, String name) throws ConstantPoolException {
-        List<Method> buf = new ArrayList<>();
-        for (Method m : cf.methods) {
-            if (m.getName(cf.constant_pool).equals(name)) {
-                buf.add(m);
-            }
-        }
-        return buf;
-    }
-
-    static void check(Map<ClassFile, List<Method>> refMembers, Map<ClassFile, List<Method>> membersToCheck) throws ConstantPoolException, InvalidDescriptor {
-        for (Map.Entry<ClassFile, List<Method>> ref : refMembers.entrySet()) {
-            ClassFile cRef = ref.getKey();
-            for (Method mRef : ref.getValue()) {
-                boolean ok = false;
-                for (Map.Entry<ClassFile, List<Method>> toCheck : membersToCheck.entrySet()) {
-                    ClassFile cToCheck = toCheck.getKey();
-                    for (Method mToCheck : toCheck.getValue()) {
-                        if (cRef.getName().equals(cToCheck.getName()) &&
-                                mRef.descriptor.getReturnType(cRef.constant_pool).equals(
-                                mToCheck.descriptor.getReturnType(cToCheck.constant_pool)) &&
-                                mRef.descriptor.getParameterTypes(cRef.constant_pool).equals(
-                                mToCheck.descriptor.getParameterTypes(cToCheck.constant_pool))) {
-                            ok = true;
-                        }
-                    }
-                }
-                if (!ok) {
-                    throw new AssertionError("Matching method descriptor for " + mRef.descriptor.getParameterTypes(cRef.constant_pool) + "not found");
-                }
-            }
-        }
-    }
-}
diff --git a/langtools/test/tools/javac/generics/typevars/6680106/T6680106.out b/langtools/test/tools/javac/generics/typevars/6680106/T6680106.out
index ae3b659..0a9ffa8 100644
--- a/langtools/test/tools/javac/generics/typevars/6680106/T6680106.out
+++ b/langtools/test/tools/javac/generics/typevars/6680106/T6680106.out
@@ -1,13 +1,7 @@
-T6680106.java:11:25: compiler.err.type.found.req: T[], (compiler.misc.type.req.class)
-T6680106.java:12:25: compiler.err.type.found.req: S[], (compiler.misc.type.req.class)
-T6680106.java:12:40: compiler.err.type.found.req: T[], (compiler.misc.type.req.class)
-T6680106.java:13:25: compiler.err.type.found.req: S[], (compiler.misc.type.req.class)
-T6680106.java:13:40: compiler.err.type.found.req: U[], (compiler.misc.type.req.class)
-T6680106.java:13:55: compiler.err.type.found.req: T[], (compiler.misc.type.req.class)
-T6680106.java:14:30: compiler.err.type.found.req: T[], (compiler.misc.type.req.class)
-T6680106.java:15:30: compiler.err.type.found.req: S[], (compiler.misc.type.req.class)
-T6680106.java:15:50: compiler.err.type.found.req: T[], (compiler.misc.type.req.class)
-T6680106.java:16:30: compiler.err.type.found.req: S[], (compiler.misc.type.req.class)
-T6680106.java:16:50: compiler.err.type.found.req: U[], (compiler.misc.type.req.class)
-T6680106.java:16:70: compiler.err.type.found.req: T[], (compiler.misc.type.req.class)
-12 errors
+T6680106.java:11:14: compiler.err.cyclic.inheritance: T
+T6680106.java:12:14: compiler.err.cyclic.inheritance: T
+T6680106.java:13:14: compiler.err.cyclic.inheritance: T
+T6680106.java:14:14: compiler.err.cyclic.inheritance: T
+T6680106.java:15:14: compiler.err.cyclic.inheritance: T
+T6680106.java:16:14: compiler.err.cyclic.inheritance: T
+6 errors
diff --git a/langtools/test/tools/javac/lambda/8024497/CrashUsingReturningThisRefLambdaFromDefaultMetTest.java b/langtools/test/tools/javac/lambda/8024497/CrashUsingReturningThisRefLambdaFromDefaultMetTest.java
new file mode 100644
index 0000000..f5c014b
--- /dev/null
+++ b/langtools/test/tools/javac/lambda/8024497/CrashUsingReturningThisRefLambdaFromDefaultMetTest.java
@@ -0,0 +1,41 @@
+/*
+ * Copyright (c) 2013, Oracle and/or its affiliates. All rights reserved.
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * This code is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU General Public License version 2 only, as
+ * published by the Free Software Foundation.
+ *
+ * This code is distributed in the hope that it will be useful, but WITHOUT
+ * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
+ * version 2 for more details (a copy is included in the LICENSE file that
+ * accompanied this code).
+ *
+ * You should have received a copy of the GNU General Public License version
+ * 2 along with this work; if not, write to the Free Software Foundation,
+ * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
+ *
+ * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
+ * or visit www.oracle.com if you need additional information or have any
+ * questions.
+ */
+
+/*
+ * @test
+ * @bug 8024497
+ * @summary crash returning this-referencing lambda from default method
+ * @compile CrashUsingReturningThisRefLambdaFromDefaultMetTest.java
+ */
+
+interface SuperInterface {}
+
+interface CrashUsingReturningThisRefLambdaFromDefaultMetTest extends SuperInterface {
+    default Runnable getAction() {
+        return () -> {
+            SuperInterface.super.getClass();
+            this.getClass();
+            CrashUsingReturningThisRefLambdaFromDefaultMetTest.this.getClass();
+        };
+    }
+}
diff --git a/langtools/test/tools/javac/lambda/methodReference/BridgeMethod.java b/langtools/test/tools/javac/lambda/methodReference/BridgeMethod.java
index bf70432..4464a08 100644
--- a/langtools/test/tools/javac/lambda/methodReference/BridgeMethod.java
+++ b/langtools/test/tools/javac/lambda/methodReference/BridgeMethod.java
@@ -108,9 +108,10 @@
         System.out.println("methods in SAM conversion of N:");
         for(Method m : methods) {
             System.out.println(m.toGenericString());
-            assertTrue(m.getName().equals("m"));
-            Class<?> returnType = m.getReturnType();
-            assertTrue(types.remove(returnType.getName()));
+            if (m.getName().equals("m")) {
+                Class<?> returnType = m.getReturnType();
+                assertTrue(types.remove(returnType.getName()));
+            }
         }
         assertTrue(types.size() == 1); //there's a bridge
     }
diff --git a/langtools/test/tools/javac/processing/errors/TestBadProcessor.java b/langtools/test/tools/javac/processing/errors/TestBadProcessor.java
new file mode 100644
index 0000000..881b2d8
--- /dev/null
+++ b/langtools/test/tools/javac/processing/errors/TestBadProcessor.java
@@ -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 8022163
+ * @summary javac exits with 0 status and no messages on error to construct an ann-procesor
+ */
+
+import java.io.*;
+
+public class TestBadProcessor {
+    public static void main(String... args) throws Exception {
+        new TestBadProcessor().run();
+    }
+
+    public static final String badAnnoProcSrc =
+        "import java.util.*;\n" +
+        "import javax.annotation.processing.*;\n" +
+        "import javax.lang.model.element.*;\n" +
+
+        "public class AnnoProc extends AbstractProcessor {\n" +
+        "    public AnnoProc() {\n" +
+        "        throw new Error();\n" +
+        "    }\n" +
+
+        "    public boolean process(Set<? extends TypeElement> elems, \n" +
+        "                        RoundEnvironment rEnv) {\n" +
+        "        return false;\n" +
+        "    }\n" +
+        "}\n";
+
+    public void run() throws Exception {
+        // setup
+        File srcDir = new File("src");
+        File classesDir = new File("classes");
+        classesDir.mkdirs();
+        File srcFile = writeFile(srcDir, "AnnoProc.java", badAnnoProcSrc);
+        compile("-d", classesDir.getPath(), srcFile.getPath());
+        writeFile(classesDir, "META-INF/services/javax.annotation.processing.Processor", "AnnoProc");
+
+        // run the primary compilation
+        int rc;
+        StringWriter sw = new StringWriter();
+        try (PrintWriter pw = new PrintWriter(sw)) {
+            String[] args = { "-processorpath", classesDir.getPath(), srcFile.getPath() };
+            rc = com.sun.tools.javac.Main.compile(args, pw);
+        }
+
+        // verify that it failed as expected, with the expected message
+        String out = sw.toString();
+        System.err.println(out);
+        String expect = "error: Bad service configuration file, " +
+                "or exception thrown while constructing Processor object: " +
+                "javax.annotation.processing.Processor: " +
+                "Provider AnnoProc could not be instantiated: java.lang.Error";
+        if (!out.trim().equals(expect)) {
+            System.err.println("expected: " + expect);
+            error("output not as expected");
+        }
+
+        if (rc == 0) {
+            error("unexpected exit code: " + rc + "; expected: not zero");
+        }
+
+        // summary
+        if (errors > 0)
+            throw new Exception(errors + " errors found");
+    }
+
+    void compile(String... args) throws Exception {
+        int rc;
+        StringWriter sw = new StringWriter();
+        try (PrintWriter pw = new PrintWriter(sw)) {
+            rc = com.sun.tools.javac.Main.compile(args, pw);
+        }
+        String out = sw.toString();
+        if (!out.isEmpty())
+            System.err.println(out);
+        if (rc != 0)
+            throw new Exception("compilation failed");
+    }
+
+    File writeFile(File dir, String path, String body) throws IOException {
+        File f = new File(dir, path);
+        f.getParentFile().mkdirs();
+        try (FileWriter out = new FileWriter(f)) {
+            out.write(body);
+        }
+        return f;
+    }
+
+    void error(String msg) {
+        System.err.println("Error: " + msg);
+        errors++;
+    }
+
+    int errors;
+}
diff --git a/langtools/test/tools/javac/processing/model/element/TestTypeElement.java b/langtools/test/tools/javac/processing/model/element/TestTypeElement.java
new file mode 100644
index 0000000..5ef3a91
--- /dev/null
+++ b/langtools/test/tools/javac/processing/model/element/TestTypeElement.java
@@ -0,0 +1,63 @@
+/*
+ * Copyright (c) 2013, Oracle and/or its affiliates. All rights reserved.
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * This code is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU General Public License version 2 only, as
+ * published by the Free Software Foundation.
+ *
+ * This code is distributed in the hope that it will be useful, but WITHOUT
+ * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
+ * version 2 for more details (a copy is included in the LICENSE file that
+ * accompanied this code).
+ *
+ * You should have received a copy of the GNU General Public License version
+ * 2 along with this work; if not, write to the Free Software Foundation,
+ * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
+ *
+ * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
+ * or visit www.oracle.com if you need additional information or have any
+ * questions.
+ */
+
+/*
+ * @test
+ * @bug 8025118
+ * @summary Verify that TypeElement for interfaces does not have
+ *          Modifier.DEFAULT in getModifiers()
+ * @library /tools/javac/lib
+ * @build   JavacTestingAbstractProcessor TestTypeElement
+ * @compile -processor TestTypeElement -proc:only TestTypeElement.java
+ */
+
+import java.util.Set;
+import javax.annotation.processing.*;
+import javax.lang.model.element.*;
+import static javax.tools.Diagnostic.Kind.*;
+
+/**
+ * Verify that TypeElement for interfaces does not have Modifier.DEFAULT in getModifiers().
+ */
+public class TestTypeElement extends JavacTestingAbstractProcessor {
+    public boolean process(Set<? extends TypeElement> annotations,
+                           RoundEnvironment roundEnv) {
+        if (!roundEnv.processingOver()) {
+            for (Element element : roundEnv.getRootElements()) {
+                if (element.getKind().isClass() || element.getKind().isInterface()) {
+                    if (element.getModifiers().contains(Modifier.DEFAULT))
+                        messager.printMessage(ERROR, "Modifier.DEFAULT not expected on classes/interfaces");
+                }
+            }
+        }
+        return true;
+    }
+
+}
+
+/**
+ * Test interface to provide a default method.
+ */
+interface InterfaceWithDefaultMethod {
+    default void quux() {}
+}
diff --git a/langtools/test/tools/javac/processing/model/type/InheritedAP.java b/langtools/test/tools/javac/processing/model/type/InheritedAP.java
new file mode 100644
index 0000000..d2ba37a
--- /dev/null
+++ b/langtools/test/tools/javac/processing/model/type/InheritedAP.java
@@ -0,0 +1,96 @@
+/*
+ * Copyright (c) 2012, 2013, Oracle and/or its affiliates. All rights reserved.
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * This code is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU General Public License version 2 only, as
+ * published by the Free Software Foundation.
+ *
+ * This code is distributed in the hope that it will be useful, but WITHOUT
+ * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
+ * version 2 for more details (a copy is included in the LICENSE file that
+ * accompanied this code).
+ *
+ * You should have received a copy of the GNU General Public License version
+ * 2 along with this work; if not, write to the Free Software Foundation,
+ * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
+ *
+ * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
+ * or visit www.oracle.com if you need additional information or have any
+ * questions.
+ */
+
+/*
+ * @test
+ * @bug 8024513
+ * @library /tools/javac/lib
+ * @build InheritedAP
+ * @compile -cp . -processor InheritedAP -proc:only InheritedAP.java
+ * @summary NPE in annotation processing
+ */
+import java.util.*;
+import javax.annotation.processing.*;
+import javax.lang.model.element.*;
+import javax.lang.model.type.*;
+import javax.lang.model.util.*;
+import java.lang.annotation.*;
+import static javax.lang.model.type.TypeKind.*;
+import static javax.lang.model.SourceVersion.*;
+import static javax.lang.model.util.ElementFilter.*;
+
+@SupportedAnnotationTypes("testclass")
+@SupportedSourceVersion(RELEASE_8)
+public class InheritedAP extends AbstractProcessor {
+    static Types types;
+    public void init(ProcessingEnvironment penv) {super.init(penv);}
+    public static Types getTypes() { return types; }
+
+    public boolean process(Set<? extends TypeElement> typeElementSet,RoundEnvironment renv) {
+        if ( renv.errorRaised()) { System.out.println("Error!"); return false; }
+        if ( typeElementSet.size() <=0 && typesIn(renv.getRootElements()).size() <= 0 ) {
+            return true;
+        }
+        types=processingEnv.getTypeUtils();
+        for (TypeElement typeElem: typesIn(renv.getRootElements())) {
+            if (typeElem.getAnnotation(testclass.class) != null) {
+                new ElementScanner( new SimpleTypeMirrorVisitor()).scan(typeElem, null);
+            }
+        }
+        return true ;
+    }
+}
+
+class SimpleTypeMirrorVisitor extends SimpleTypeVisitor6 <Void, Void> {
+    protected Void defaultAction(TypeMirror mirror, Void p ) {
+        try {
+            System.out.println( "InheritedAP.getTypes().directSupertypes( "+mirror.toString()+" );" );
+            InheritedAP.getTypes().directSupertypes(mirror);
+            System.out.println("PASS");
+        }catch(java.lang.IllegalArgumentException iae) {/*stuff*/ }
+        return p;
+    }
+}
+
+class ElementScanner <T extends SimpleTypeVisitor6<Void, Void> >
+                    extends ElementScanner6<Void, Void> {
+    SimpleTypeVisitor6<Void, Void> typeVisitor;
+
+    public ElementScanner(T typeVisitor) { this.typeVisitor=typeVisitor;}
+
+    @Override
+    public Void scan(Element e, Void p) {
+         if (e instanceof TypeElement ) {
+            TypeElement te = (TypeElement) e;
+            te.getSuperclass().accept(typeVisitor,p);
+        }
+        return p;
+    }
+
+}
+
+
+@interface testclass { }
+
+@testclass
+@interface iface { }
diff --git a/langtools/test/tools/javap/BoundsTypeVariableTest.java b/langtools/test/tools/javap/BoundsTypeVariableTest.java
new file mode 100644
index 0000000..c45355c
--- /dev/null
+++ b/langtools/test/tools/javap/BoundsTypeVariableTest.java
@@ -0,0 +1,95 @@
+/*
+ * 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 8003537
+ * @summary javap should not use / in Bounds Type Variables
+ */
+
+import java.io.File;
+import java.io.IOException;
+import java.io.PrintWriter;
+import java.io.StringWriter;
+import java.nio.charset.Charset;
+import java.nio.file.Files;
+import java.util.ArrayList;
+import java.util.List;
+import java.util.regex.Pattern;
+import static java.nio.file.StandardOpenOption.*;
+
+public class BoundsTypeVariableTest {
+    public static void main(String... args) throws Exception {
+        new BoundsTypeVariableTest().run();
+    }
+
+    void run() throws Exception {
+        File srcDir = new File("src");
+        srcDir.mkdirs();
+        File classesDir = new File("classes");
+        classesDir.mkdirs();
+        final String expect = "public abstract <U extends java.lang.Object> U doit();";
+        List<String> contents = new ArrayList<>();
+        contents.add("abstract class X {");
+        contents.add(expect);
+        contents.add("}");
+
+        File f = writeFile(new File(srcDir, "X.java"), contents);
+        javac("-d", classesDir.getPath(), f.getPath());
+        String out = javap("-p", "-v", new File(classesDir, "X.class").getPath());
+        if (!out.contains(expect)) {
+            throw new Exception("expected pattern not found: " + expect);
+        }
+    }
+
+    File writeFile(File f, List<String> body) throws IOException {
+        Files.write(f.toPath(), body, Charset.defaultCharset(),
+                CREATE, TRUNCATE_EXISTING);
+        return f;
+    }
+
+    void javac(String... args) throws Exception {
+        StringWriter sw = new StringWriter();
+        PrintWriter pw = new PrintWriter(sw);
+        int rc = com.sun.tools.javac.Main.compile(args, pw);
+        pw.flush();
+        String out = sw.toString();
+        if (!out.isEmpty())
+            System.err.println(out);
+        if (rc != 0)
+            throw new Exception("compilation failed");
+    }
+
+    String javap(String... args) throws Exception {
+        StringWriter sw = new StringWriter();
+        PrintWriter pw = new PrintWriter(sw);
+        int rc = com.sun.tools.javap.Main.run(args, pw);
+        pw.flush();
+        String out = sw.toString();
+        if (!out.isEmpty())
+            System.err.println(out);
+        if (rc != 0)
+            throw new Exception("javap failed");
+        return out;
+    }
+}
diff --git a/make/install-rules.gmk b/make/install-rules.gmk
index 2bde487..2ba4a66 100644
--- a/make/install-rules.gmk
+++ b/make/install-rules.gmk
@@ -96,7 +96,6 @@
 combo_build:
 	@$(ECHO) $@ installer combo build started: `$(DATE) '+%y-%m-%d %H:%M'`
 	$(CD) $(INSTALL_TOPDIR)/make/installer/bundles/windows/ishield/wrapper/wrapper.jreboth ; $(MAKE) all
-	$(CD) $(INSTALL_TOPDIR)/make/installer/bundles/windows/ishield/wrapper/wrapper.new64jre ; $(MAKE) all
 	$(CD) $(INSTALL_TOPDIR)/make/installer/bundles/windows/ishield/jre ; $(MAKE) au_combo
 	$(CD) $(INSTALL_TOPDIR)/make/installer/bundles/windows/xmlinffile ; $(MAKE) all
 
diff --git a/nashorn/.hgtags b/nashorn/.hgtags
index efd1502..b833819 100644
--- a/nashorn/.hgtags
+++ b/nashorn/.hgtags
@@ -220,3 +220,4 @@
 445ad3f6d3b4ba62ebc483323e1919110a304053 jdk8-b108
 6ec2f9e5ed5bd60c2900976e6a54fdcac2f37e9e jdk8-b109
 d49a8c2173f5f90c9a39cc4af8e03cfa8f35ee4c jdk8-b110
+75fd3486e584f20475c064a2cd4d01ac6406a511 jdk8-b111
diff --git a/nashorn/make/build.xml b/nashorn/make/build.xml
index 4bc1a39..0141094 100644
--- a/nashorn/make/build.xml
+++ b/nashorn/make/build.xml
@@ -236,6 +236,10 @@
        <fileset dir="${test.src.dir}/META-INF/services/"/>
     </copy>
 
+    <copy todir="${build.test.classes.dir}/jdk/nashorn/internal/runtime/resources">
+       <fileset dir="${test.src.dir}/jdk/nashorn/internal/runtime/resources"/>
+    </copy>
+
     <!-- tests that check nashorn internals and internal API -->
     <jar jarfile="${nashorn.internal.tests.jar}">
       <fileset dir="${build.test.classes.dir}" excludes="**/api/**"/>
@@ -245,6 +249,7 @@
     <jar jarfile="${nashorn.api.tests.jar}">
       <fileset dir="${build.test.classes.dir}" includes="**/api/**"/>
       <fileset dir="${build.test.classes.dir}" includes="**/META-INF/**"/>
+      <fileset dir="${build.test.classes.dir}" includes="**/resources/*.js"/>
     </jar>
 
   </target>
diff --git a/nashorn/make/java.security.override b/nashorn/make/java.security.override
deleted file mode 100644
index a7edf33..0000000
--- a/nashorn/make/java.security.override
+++ /dev/null
@@ -1,14 +0,0 @@
-# We would like to avoid references from anywhere outside nashorn
-# to codegen, IR and parser packages, in particular script generated classes.
-# We ensure that by overriding "package.access" security property.
-
-# The following "package.access" value was copied from  default java.security 
-# of jre/lib/security and appended with nashorn sensitive packages.
-
-#
-# List of comma-separated packages that start with or equal this string
-# will cause a security exception to be thrown when
-# passed to checkPackageAccess unless the
-# corresponding RuntimePermission ("accessClassInPackage."+package) has
-# been granted.
-package.access=sun.,com.sun.xml.internal.ws.,com.sun.xml.internal.bind.,com.sun.imageio.,com.sun.org.apache.xerces.internal.utils.,com.sun.org.apache.xalan.internal.utils.,com.sun.org.glassfish.external.,com.sun.org.glassfish.gmbal.,jdk.internal.,jdk.nashorn.internal.,jdk.nashorn.tools.
diff --git a/nashorn/make/project.properties b/nashorn/make/project.properties
index e6eea02..2ad619b 100644
--- a/nashorn/make/project.properties
+++ b/nashorn/make/project.properties
@@ -234,7 +234,7 @@
 #-XX:-UseCompressedKlassPointers -XX:+PrintHeapAtGC -XX:ClassMetaspaceSize=300M  
 run.test.jvmargs.octane.main=${run.test.jvmargs.common}
 
-run.test.jvmsecurityargs=-Xverify:all -Djava.security.properties=${basedir}/make/java.security.override -Djava.security.manager -Djava.security.policy=${basedir}/build/nashorn.policy
+run.test.jvmsecurityargs=-Xverify:all -Djava.security.manager -Djava.security.policy=${basedir}/build/nashorn.policy
 
 # VM options for script tests with @fork option
 test-sys-prop.test.fork.jvm.options=${run.test.jvmargs.main} -Xmx${run.test.xmx} ${run.test.jvmsecurityargs}
diff --git a/nashorn/makefiles/BuildNashorn.gmk b/nashorn/makefiles/BuildNashorn.gmk
index 96bedf4..fc87044 100644
--- a/nashorn/makefiles/BuildNashorn.gmk
+++ b/nashorn/makefiles/BuildNashorn.gmk
@@ -37,35 +37,35 @@
 NASHORN_FULL_VERSION := $(FULL_VERSION)
 
 ifdef MILESTONE
-  ifeq ($(MILESTONE),internal)
+  ifeq ($(MILESTONE), internal)
     NASHORN_VERSION = $(FULL_VERSION)
   endif
 endif
 
 # Need to use source and target 7 for nasgen to work.
-$(eval $(call SetupJavaCompiler,GENERATE_NEWBYTECODE_DEBUG,\
-    JVM:=$(JAVA),\
-    JAVAC:=$(NEW_JAVAC),\
-    FLAGS:=-g -source 7 -target 7 -bootclasspath $(JDK_CLASSES),\
-    SERVER_DIR:=$(SJAVAC_SERVER_DIR),\
-    SERVER_JVM:=$(SJAVAC_SERVER_JAVA)))
+$(eval $(call SetupJavaCompiler,GENERATE_NEWBYTECODE_DEBUG, \
+    JVM := $(JAVA), \
+    JAVAC := $(NEW_JAVAC), \
+    FLAGS := -g -source 7 -target 7 -bootclasspath $(JDK_CLASSES), \
+    SERVER_DIR := $(SJAVAC_SERVER_DIR), \
+    SERVER_JVM := $(SJAVAC_SERVER_JAVA)))
 
 # Build nashorn into intermediate directory
-$(eval $(call SetupJavaCompilation,BUILD_NASHORN,\
-    SETUP:=GENERATE_NEWBYTECODE_DEBUG,\
-    SRC:=$(NASHORN_TOPDIR)/src,\
-    COPY:=.properties .js,\
-    BIN:=$(NASHORN_OUTPUTDIR)/nashorn_classes))
+$(eval $(call SetupJavaCompilation,BUILD_NASHORN, \
+    SETUP := GENERATE_NEWBYTECODE_DEBUG, \
+    SRC := $(NASHORN_TOPDIR)/src, \
+    COPY := .properties .js, \
+    BIN := $(NASHORN_OUTPUTDIR)/nashorn_classes))
 
 NASGEN_SRC := $(NASHORN_TOPDIR)/buildtools/nasgen/src
 ASM_SRC := $(JDK_TOPDIR)/src/share/classes/jdk/internal/org/objectweb/asm
 
 # Build nasgen
-$(eval $(call SetupJavaCompilation,BUILD_NASGEN,\
-    SETUP:=GENERATE_NEWBYTECODE_DEBUG,\
-    SRC:=$(NASGEN_SRC) $(ASM_SRC), \
-    BIN:=$(NASHORN_OUTPUTDIR)/nasgen_classes,\
-    ADD_JAVAC_FLAGS:=-cp $(NASHORN_OUTPUTDIR)/nashorn_classes))
+$(eval $(call SetupJavaCompilation,BUILD_NASGEN, \
+    SETUP := GENERATE_NEWBYTECODE_DEBUG, \
+    SRC := $(NASGEN_SRC) $(ASM_SRC), \
+    BIN := $(NASHORN_OUTPUTDIR)/nasgen_classes, \
+    ADD_JAVAC_FLAGS := -cp $(NASHORN_OUTPUTDIR)/nashorn_classes))
 
 # Nasgen needs nashorn classes
 $(BUILD_NASGEN): $(BUILD_NASHORN)
@@ -77,35 +77,36 @@
 	$(RM) -rf $(@D)/jdk $(@D)/netscape
 	$(CP) -R -p $(NASHORN_OUTPUTDIR)/nashorn_classes/* $(@D)/
 	$(FIXPATH) $(JAVA) \
-		-cp "$(NASHORN_OUTPUTDIR)/nasgen_classes$(PATH_SEP)$(NASHORN_OUTPUTDIR)/nashorn_classes" \
-		jdk.nashorn.internal.tools.nasgen.Main $(@D) jdk.nashorn.internal.objects $(@D)
+	    -cp "$(NASHORN_OUTPUTDIR)/nasgen_classes$(PATH_SEP)$(NASHORN_OUTPUTDIR)/nashorn_classes" \
+	    jdk.nashorn.internal.tools.nasgen.Main $(@D) jdk.nashorn.internal.objects $(@D)
 	$(TOUCH) $@
 
 # Version file needs to be processed with version numbers
 VERSION_FILE := $(NASHORN_OUTPUTDIR)/classes/jdk/nashorn/internal/runtime/resources/version.properties
+
 # Needs to happen after nasgen run since nasgen run deletes it
 $(VERSION_FILE): $(NASHORN_OUTPUTDIR)/classes/_the.nasgen.run
 $(VERSION_FILE): $(NASHORN_TOPDIR)/src/jdk/nashorn/internal/runtime/resources/version.properties-template
 	$(ECHO) Creating version.properties
 	$(MKDIR) -p $(@D)
 	$(CAT) $< | $(SED) -e 's/$$(FULL_VERSION)/$(NASHORN_FULL_VERSION)/g' \
-		-e 's/$$(RELEASE)/$(NASHORN_VERSION)/g' \
-		-e '/^#.*$$/d' -e '/^$$/d'  > $@
+	    -e 's/$$(RELEASE)/$(NASHORN_VERSION)/g' \
+	    -e '/^#.*$$/d' -e '/^$$/d'  > $@
 
 
-MANIFEST_ATTRIBUTES:=Name: jdk/nashorn/\nImplementation-Title: Oracle Nashorn\nImplementation-Version: $(NASHORN_FULL_VERSION)
+MANIFEST_ATTRIBUTES := Name: jdk/nashorn/\nImplementation-Title: Oracle Nashorn\nImplementation-Version: $(NASHORN_FULL_VERSION)
 
 # Create nashorn.jar from the final classes dir
-$(eval $(call SetupArchive,BUILD_NASHORN_JAR,\
+$(eval $(call SetupArchive,BUILD_NASHORN_JAR, \
     $(NASHORN_OUTPUTDIR)/classes/_the.nasgen.run \
-    $(VERSION_FILE),\
-    SRCS:=$(NASHORN_OUTPUTDIR)/classes,\
-    SUFFIXES:=.class .js .properties Factory,\
-    MANIFEST:=$(NASHORN_TOPDIR)/src/META-INF/MANIFEST.MF,\
-    EXTRA_MANIFEST_ATTR:=$(MANIFEST_ATTRIBUTES),\
-    SKIP_METAINF:=true,\
-    JAR:=$(NASHORN_JAR)))
+    $(VERSION_FILE), \
+    SRCS := $(NASHORN_OUTPUTDIR)/classes, \
+    SUFFIXES := .class .js .properties Factory, \
+    MANIFEST := $(NASHORN_TOPDIR)/src/META-INF/MANIFEST.MF, \
+    EXTRA_MANIFEST_ATTR := $(MANIFEST_ATTRIBUTES), \
+    SKIP_METAINF := true, \
+    JAR := $(NASHORN_JAR)))
 
 all: $(NASHORN_JAR)
-    
+
 .PHONY: all
diff --git a/nashorn/makefiles/Makefile b/nashorn/makefiles/Makefile
index 9539fe0..c7d0dd0 100644
--- a/nashorn/makefiles/Makefile
+++ b/nashorn/makefiles/Makefile
@@ -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 ===================================================)
diff --git a/nashorn/src/jdk/nashorn/api/scripting/NashornScriptEngine.java b/nashorn/src/jdk/nashorn/api/scripting/NashornScriptEngine.java
index 4629665..36e79b5 100644
--- a/nashorn/src/jdk/nashorn/api/scripting/NashornScriptEngine.java
+++ b/nashorn/src/jdk/nashorn/api/scripting/NashornScriptEngine.java
@@ -313,7 +313,7 @@
             if (! Modifier.isPublic(clazz.getModifiers())) {
                 throw new SecurityException(getMessage("implementing.non.public.interface", clazz.getName()));
             }
-            Context.checkPackageAccess(clazz.getName());
+            Context.checkPackageAccess(clazz);
         }
 
         ScriptObject realSelf = null;
diff --git a/nashorn/src/jdk/nashorn/internal/codegen/Attr.java b/nashorn/src/jdk/nashorn/internal/codegen/Attr.java
index 55355c3..7aef460 100644
--- a/nashorn/src/jdk/nashorn/internal/codegen/Attr.java
+++ b/nashorn/src/jdk/nashorn/internal/codegen/Attr.java
@@ -1082,24 +1082,6 @@
     private boolean enterAssignmentNode(final BinaryNode binaryNode) {
         start(binaryNode);
 
-        final Node lhs = binaryNode.lhs();
-
-        if (lhs instanceof IdentNode) {
-            final Block     block = lc.getCurrentBlock();
-            final IdentNode ident = (IdentNode)lhs;
-            final String    name  = ident.getName();
-
-            Symbol symbol = findSymbol(block, name);
-
-            if (symbol == null) {
-                symbol = defineSymbol(block, name, IS_GLOBAL);
-            } else {
-                maybeForceScope(symbol);
-            }
-
-            addLocalDef(name);
-        }
-
         return true;
     }
 
@@ -1112,20 +1094,33 @@
      * @param binaryNode assignment node
      */
     private Node leaveAssignmentNode(final BinaryNode binaryNode) {
-        BinaryNode newBinaryNode = binaryNode;
-
         final Expression lhs = binaryNode.lhs();
         final Expression rhs = binaryNode.rhs();
         final Type type;
 
+        if (lhs instanceof IdentNode) {
+            final Block     block = lc.getCurrentBlock();
+            final IdentNode ident = (IdentNode)lhs;
+            final String    name  = ident.getName();
+            final Symbol symbol = findSymbol(block, name);
+
+            if (symbol == null) {
+                defineSymbol(block, name, IS_GLOBAL);
+            } else {
+                maybeForceScope(symbol);
+            }
+
+            addLocalDef(name);
+        }
+
         if (rhs.getType().isNumeric()) {
-            type = Type.widest(binaryNode.lhs().getType(), binaryNode.rhs().getType());
+            type = Type.widest(lhs.getType(), rhs.getType());
         } else {
             type = Type.OBJECT; //force lhs to be an object if not numeric assignment, e.g. strings too.
         }
 
         newType(lhs.getSymbol(), type);
-        return end(ensureSymbol(type, newBinaryNode));
+        return end(ensureSymbol(type, binaryNode));
     }
 
     private boolean isLocal(FunctionNode function, Symbol symbol) {
diff --git a/nashorn/src/jdk/nashorn/internal/codegen/CodeGenerator.java b/nashorn/src/jdk/nashorn/internal/codegen/CodeGenerator.java
index d16a1e5..5f7f596 100644
--- a/nashorn/src/jdk/nashorn/internal/codegen/CodeGenerator.java
+++ b/nashorn/src/jdk/nashorn/internal/codegen/CodeGenerator.java
@@ -1827,6 +1827,8 @@
         }
 
         if (cases.isEmpty()) {
+            // still evaluate expression for side-effects.
+            load(expression).pop();
             method.label(breakLabel);
             return false;
         }
@@ -1956,7 +1958,7 @@
 
         final Expression expression = throwNode.getExpression();
         final int        position   = throwNode.position();
-        final int        line       = source.getLine(position);
+        final int        line       = throwNode.getLineNumber();
         final int        column     = source.getColumn(position);
 
         load(expression);
diff --git a/nashorn/src/jdk/nashorn/internal/codegen/FoldConstants.java b/nashorn/src/jdk/nashorn/internal/codegen/FoldConstants.java
index 49dfbb3..9a2aafa 100644
--- a/nashorn/src/jdk/nashorn/internal/codegen/FoldConstants.java
+++ b/nashorn/src/jdk/nashorn/internal/codegen/FoldConstants.java
@@ -88,8 +88,8 @@
     @Override
     public Node leaveIfNode(final IfNode ifNode) {
         final Node test = ifNode.getTest();
-        if (test instanceof LiteralNode) {
-            final Block shortCut = ((LiteralNode<?>)test).isTrue() ? ifNode.getPass() : ifNode.getFail();
+        if (test instanceof LiteralNode.PrimitiveLiteralNode) {
+            final Block shortCut = ((LiteralNode.PrimitiveLiteralNode<?>)test).isTrue() ? ifNode.getPass() : ifNode.getFail();
             if (shortCut != null) {
                 return new BlockStatement(ifNode.getLineNumber(), shortCut);
             }
@@ -101,8 +101,8 @@
     @Override
     public Node leaveTernaryNode(final TernaryNode ternaryNode) {
         final Node test = ternaryNode.getTest();
-        if (test instanceof LiteralNode) {
-            return ((LiteralNode<?>)test).isTrue() ? ternaryNode.getTrueExpression() : ternaryNode.getFalseExpression();
+        if (test instanceof LiteralNode.PrimitiveLiteralNode) {
+            return ((LiteralNode.PrimitiveLiteralNode<?>)test).isTrue() ? ternaryNode.getTrueExpression() : ternaryNode.getFalseExpression();
         }
         return ternaryNode;
     }
diff --git a/nashorn/src/jdk/nashorn/internal/ir/IdentNode.java b/nashorn/src/jdk/nashorn/internal/ir/IdentNode.java
index 4b139b2..6060899 100644
--- a/nashorn/src/jdk/nashorn/internal/ir/IdentNode.java
+++ b/nashorn/src/jdk/nashorn/internal/ir/IdentNode.java
@@ -40,9 +40,10 @@
  */
 @Immutable
 public final class IdentNode extends Expression implements PropertyKey, TypeOverride<IdentNode>, FunctionCall {
-    private static final int PROPERTY_NAME    = 1 << 0;
-    private static final int INITIALIZED_HERE = 1 << 1;
-    private static final int FUNCTION         = 1 << 2;
+    private static final int PROPERTY_NAME     = 1 << 0;
+    private static final int INITIALIZED_HERE  = 1 << 1;
+    private static final int FUNCTION          = 1 << 2;
+    private static final int FUTURESTRICT_NAME = 1 << 3;
 
     /** Identifier. */
     private final String name;
@@ -197,6 +198,25 @@
     }
 
     /**
+     * Check if this IdentNode is a future strict name
+     * @return true if this is a future strict name
+     */
+    public boolean isFutureStrictName() {
+        return (flags & FUTURESTRICT_NAME) != 0;
+    }
+
+    /**
+     * Flag this IdentNode as a future strict name
+     * @return a node equivalent to this one except for the requested change.
+     */
+    public IdentNode setIsFutureStrictName() {
+        if (isFutureStrictName()) {
+            return this;
+        }
+        return new IdentNode(this, name, callSiteType, flags | FUTURESTRICT_NAME);
+    }
+
+    /**
      * Helper function for local def analysis.
      * @return true if IdentNode is initialized on creation
      */
diff --git a/nashorn/src/jdk/nashorn/internal/ir/LexicalContext.java b/nashorn/src/jdk/nashorn/internal/ir/LexicalContext.java
index 666be7e..1b380d3 100644
--- a/nashorn/src/jdk/nashorn/internal/ir/LexicalContext.java
+++ b/nashorn/src/jdk/nashorn/internal/ir/LexicalContext.java
@@ -587,11 +587,11 @@
                 final FunctionNode fn = (FunctionNode)node;
                 final Source source = fn.getSource();
                 String src = source.toString();
-                if (src.indexOf(File.pathSeparator) != -1) {
+                if (src.contains(File.pathSeparator)) {
                     src = src.substring(src.lastIndexOf(File.pathSeparator));
                 }
                 src += ' ';
-                src += source.getLine(fn.getStart());
+                src += fn.getLineNumber();
                 sb.append(src);
             }
             sb.append(' ');
diff --git a/nashorn/src/jdk/nashorn/internal/ir/LiteralNode.java b/nashorn/src/jdk/nashorn/internal/ir/LiteralNode.java
index b2d9e9f..618182c 100644
--- a/nashorn/src/jdk/nashorn/internal/ir/LiteralNode.java
+++ b/nashorn/src/jdk/nashorn/internal/ir/LiteralNode.java
@@ -96,14 +96,6 @@
         return value == null;
     }
 
-    /**
-     * Check if the literal value is boolean true
-     * @return true if literal value is boolean true
-     */
-    public boolean isTrue() {
-        return JSType.toBoolean(value);
-    }
-
     @Override
     public Type getType() {
         return Type.typeFor(value.getClass());
@@ -259,8 +251,31 @@
         return new NullLiteralNode(parent.getToken(), parent.getFinish());
     }
 
+    /**
+     * Super class for primitive (side-effect free) literals.
+     *
+     * @param <T> the literal type
+     */
+    public static class PrimitiveLiteralNode<T> extends LiteralNode<T> {
+        private PrimitiveLiteralNode(final long token, final int finish, final T value) {
+            super(token, finish, value);
+        }
+
+        private PrimitiveLiteralNode(final PrimitiveLiteralNode<T> literalNode) {
+            super(literalNode);
+        }
+
+        /**
+         * Check if the literal value is boolean true
+         * @return true if literal value is boolean true
+         */
+        public boolean isTrue() {
+            return JSType.toBoolean(value);
+        }
+    }
+
     @Immutable
-    private static final class BooleanLiteralNode extends LiteralNode<Boolean> {
+    private static final class BooleanLiteralNode extends PrimitiveLiteralNode<Boolean> {
 
         private BooleanLiteralNode(final long token, final int finish, final boolean value) {
             super(Token.recast(token, value ? TokenType.TRUE : TokenType.FALSE), finish, value);
@@ -312,7 +327,7 @@
     }
 
     @Immutable
-    private static final class NumberLiteralNode extends LiteralNode<Number> {
+    private static final class NumberLiteralNode extends PrimitiveLiteralNode<Number> {
 
         private final Type type = numberGetType(value);
 
@@ -374,7 +389,7 @@
         return new NumberLiteralNode(parent.getToken(), parent.getFinish(), value);
     }
 
-    private static class UndefinedLiteralNode extends LiteralNode<Undefined> {
+    private static class UndefinedLiteralNode extends PrimitiveLiteralNode<Undefined> {
         private UndefinedLiteralNode(final long token, final int finish) {
             super(Token.recast(token, TokenType.OBJECT), finish, ScriptRuntime.UNDEFINED);
         }
@@ -410,7 +425,7 @@
     }
 
     @Immutable
-    private static class StringLiteralNode extends LiteralNode<String> {
+    private static class StringLiteralNode extends PrimitiveLiteralNode<String> {
         private StringLiteralNode(final long token, final int finish, final String value) {
             super(Token.recast(token, TokenType.STRING), finish, value);
         }
@@ -522,7 +537,7 @@
         return POSTSET_MARKER;
     }
 
-    private static final class NullLiteralNode extends LiteralNode<Object> {
+    private static final class NullLiteralNode extends PrimitiveLiteralNode<Object> {
 
         private NullLiteralNode(final long token, final int finish) {
             super(Token.recast(token, TokenType.OBJECT), finish, null);
diff --git a/nashorn/src/jdk/nashorn/internal/objects/NativeArray.java b/nashorn/src/jdk/nashorn/internal/objects/NativeArray.java
index 8cb1ded..fa32575 100644
--- a/nashorn/src/jdk/nashorn/internal/objects/NativeArray.java
+++ b/nashorn/src/jdk/nashorn/internal/objects/NativeArray.java
@@ -819,8 +819,15 @@
             if (bulkable(sobj)) {
                 sobj.getArray().shiftLeft(1);
             } else {
+                boolean hasPrevious = true;
                 for (long k = 1; k < len; k++) {
-                    sobj.set(k - 1, sobj.get(k), true);
+                    boolean hasCurrent = sobj.has(k);
+                    if (hasCurrent) {
+                        sobj.set(k - 1, sobj.get(k), true);
+                    } else if (hasPrevious) {
+                        sobj.delete(k - 1, true);
+                    }
+                    hasPrevious = hasCurrent;
                 }
             }
             sobj.delete(--len, true);
@@ -860,9 +867,12 @@
             return new NativeArray(sobj.getArray().slice(k, finale));
         }
 
-        final NativeArray copy = new NativeArray(0);
+        // Construct array with proper length to have a deleted filter on undefined elements
+        final NativeArray copy = new NativeArray(finale - k);
         for (long n = 0; k < finale; n++, k++) {
-            copy.defineOwnProperty(ArrayIndex.getArrayIndex(n), sobj.get(k));
+            if (sobj.has(k)) {
+                copy.defineOwnProperty(ArrayIndex.getArrayIndex(n), sobj.get(k));
+            }
         }
 
         return copy;
diff --git a/nashorn/src/jdk/nashorn/internal/objects/NativeError.java b/nashorn/src/jdk/nashorn/internal/objects/NativeError.java
index dc6aef9..194c6d8 100644
--- a/nashorn/src/jdk/nashorn/internal/objects/NativeError.java
+++ b/nashorn/src/jdk/nashorn/internal/objects/NativeError.java
@@ -37,10 +37,12 @@
 import jdk.nashorn.internal.objects.annotations.Property;
 import jdk.nashorn.internal.objects.annotations.ScriptClass;
 import jdk.nashorn.internal.objects.annotations.Where;
+import jdk.nashorn.internal.objects.ScriptFunctionImpl;
 import jdk.nashorn.internal.runtime.ECMAException;
 import jdk.nashorn.internal.runtime.JSType;
 import jdk.nashorn.internal.runtime.PropertyMap;
 import jdk.nashorn.internal.runtime.ScriptObject;
+import jdk.nashorn.internal.runtime.ScriptFunction;
 import jdk.nashorn.internal.runtime.ScriptRuntime;
 
 /**
@@ -138,7 +140,10 @@
         Global.checkObject(errorObj);
         final ScriptObject sobj = (ScriptObject)errorObj;
         final ECMAException exp = new ECMAException(sobj, null);
-        sobj.set("stack", getScriptStackString(sobj, exp), false);
+        sobj.delete("stack", false);
+        final ScriptFunction getStack = ScriptFunctionImpl.makeFunction("getStack", GET_STACK);
+        final ScriptFunction setStack = ScriptFunctionImpl.makeFunction("setStack", SET_STACK);
+        sobj.addOwnProperty("stack", Attribute.NOT_ENUMERABLE, getStack, setStack);
         return UNDEFINED;
     }
 
diff --git a/nashorn/src/jdk/nashorn/internal/objects/NativeFunction.java b/nashorn/src/jdk/nashorn/internal/objects/NativeFunction.java
index c77002e..d092cfb 100644
--- a/nashorn/src/jdk/nashorn/internal/objects/NativeFunction.java
+++ b/nashorn/src/jdk/nashorn/internal/objects/NativeFunction.java
@@ -221,6 +221,7 @@
         final StringBuilder sb = new StringBuilder();
 
         sb.append("(function (");
+        final String funcBody;
         if (args.length > 0) {
             final StringBuilder paramListBuf = new StringBuilder();
             for (int i = 0; i < args.length - 1; i++) {
@@ -230,15 +231,20 @@
                 }
             }
 
+            // now convert function body to a string
+            funcBody = JSType.toString(args[args.length - 1]);
+
             final String paramList = paramListBuf.toString();
             if (! paramList.isEmpty()) {
                 checkFunctionParameters(paramList);
                 sb.append(paramList);
             }
+        } else {
+            funcBody = null;
         }
+
         sb.append(") {\n");
         if (args.length > 0) {
-            final String funcBody = JSType.toString(args[args.length - 1]);
             checkFunctionBody(funcBody);
             sb.append(funcBody);
             sb.append('\n');
diff --git a/nashorn/src/jdk/nashorn/internal/parser/AbstractParser.java b/nashorn/src/jdk/nashorn/internal/parser/AbstractParser.java
index 80f7ce0..587ae86 100644
--- a/nashorn/src/jdk/nashorn/internal/parser/AbstractParser.java
+++ b/nashorn/src/jdk/nashorn/internal/parser/AbstractParser.java
@@ -378,7 +378,7 @@
             next();
 
             // Create IDENT node.
-            return new IdentNode(identToken, finish, ident);
+            return new IdentNode(identToken, finish, ident).setIsFutureStrictName();
         }
 
         // Get IDENT.
diff --git a/nashorn/src/jdk/nashorn/internal/parser/Parser.java b/nashorn/src/jdk/nashorn/internal/parser/Parser.java
index 9663401..61c70d9 100644
--- a/nashorn/src/jdk/nashorn/internal/parser/Parser.java
+++ b/nashorn/src/jdk/nashorn/internal/parser/Parser.java
@@ -909,6 +909,10 @@
             default:
                 break;
             }
+
+            if (ident.isFutureStrictName()) {
+                throw error(AbstractParser.message("strict.name", ident.getName(), contextString), ident.getToken());
+            }
         }
     }
 
@@ -2436,7 +2440,7 @@
         // name is null, generate anonymous name
         boolean isAnonymous = false;
         if (name == null) {
-            final String tmpName = "_L" + source.getLine(Token.descPosition(token));
+            final String tmpName = "_L" + functionLine;
             name = new IdentNode(functionToken, Token.descPosition(functionToken), tmpName);
             isAnonymous = true;
         }
diff --git a/nashorn/src/jdk/nashorn/internal/runtime/CompiledFunction.java b/nashorn/src/jdk/nashorn/internal/runtime/CompiledFunction.java
index afa3657..18b20a3 100644
--- a/nashorn/src/jdk/nashorn/internal/runtime/CompiledFunction.java
+++ b/nashorn/src/jdk/nashorn/internal/runtime/CompiledFunction.java
@@ -48,6 +48,7 @@
     }
 
     CompiledFunction(final MethodType type, final MethodHandle invoker, final MethodHandle constructor) {
+        assert type != null;
         this.type        = type;
         this.invoker     = invoker;
         this.constructor = constructor;
@@ -80,7 +81,37 @@
 
     @Override
     public int compareTo(final CompiledFunction o) {
-        return weight() - o.weight();
+        return compareMethodTypes(type(), o.type());
+    }
+
+    private static int compareMethodTypes(final MethodType ownType, final MethodType otherType) {
+        // Comparable interface demands that compareTo() should only return 0 if objects are equal.
+        // Failing to meet this requirement causes same weight functions to replace each other in TreeSet,
+        // so we go some lengths to come up with an ordering between same weight functions,
+        // first falling back to parameter count and then to hash code.
+        if (ownType.equals(otherType)) {
+            return 0;
+        }
+
+        final int diff = weight(ownType) - weight(otherType);
+        if (diff != 0) {
+            return diff;
+        }
+        if (ownType.parameterCount() != otherType.parameterCount()) {
+            return ownType.parameterCount() - otherType.parameterCount();
+        }
+        // We're just interested in not returning 0 here, not correct ordering
+        return ownType.hashCode() - otherType.hashCode();
+    }
+
+    @Override
+    public boolean equals(Object obj) {
+        return obj instanceof CompiledFunction && type().equals(((CompiledFunction)obj).type());
+    }
+
+    @Override
+    public int hashCode() {
+        return type().hashCode();
     }
 
     private int weight() {
@@ -119,14 +150,14 @@
      * a semantically equivalent linkage can be performed.
      *
      * @param mt type to check against
-     * @return
+     * @return true if types are compatible
      */
     boolean typeCompatible(final MethodType mt) {
-        final Class<?>[] wantedParams   = mt.parameterArray();
-        final Class<?>[] existingParams = type().parameterArray();
+        final int wantedParamCount   = mt.parameterCount();
+        final int existingParamCount = type.parameterCount();
 
         //if we are not examining a varargs type, the number of parameters must be the same
-        if (wantedParams.length != existingParams.length && !isVarArgsType(mt)) {
+        if (wantedParamCount != existingParamCount && !isVarArgsType(mt)) {
             return false;
         }
 
@@ -134,10 +165,10 @@
         //parameters lengths do not match is if our type ends with a varargs argument.
         //then every trailing parameter in the given callsite can be folded into it, making
         //us compatible (albeit slower than a direct specialization)
-        final int lastParamIndex = Math.min(wantedParams.length, existingParams.length);
+        final int lastParamIndex = Math.min(wantedParamCount, existingParamCount);
         for (int i = 0; i < lastParamIndex; i++) {
-            final Type w = Type.typeFor(wantedParams[i]);
-            final Type e = Type.typeFor(existingParams[i]);
+            final Type w = Type.typeFor(mt.parameterType(i));
+            final Type e = Type.typeFor(type.parameterType(i));
 
             //don't specialize on booleans, we have the "true" vs int 1 ambiguity in resolution
             //we also currently don't support boolean as a javascript function callsite type.
diff --git a/nashorn/src/jdk/nashorn/internal/runtime/Context.java b/nashorn/src/jdk/nashorn/internal/runtime/Context.java
index 7c69eb5..91a905a 100644
--- a/nashorn/src/jdk/nashorn/internal/runtime/Context.java
+++ b/nashorn/src/jdk/nashorn/internal/runtime/Context.java
@@ -91,6 +91,11 @@
      */
     public static final String NASHORN_JAVA_REFLECTION = "nashorn.JavaReflection";
 
+    // nashorn load psuedo URL prefixes
+    private static final String LOAD_CLASSPATH = "classpath:";
+    private static final String LOAD_FX = "fx:";
+    private static final String LOAD_NASHORN = "nashorn:";
+
     /* Force DebuggerSupport to be loaded. */
     static {
         DebuggerSupport.FORCELOAD = true;
@@ -501,21 +506,26 @@
         // or a ScriptObject that has "name" and "source" (string valued) properties.
         if (src instanceof String) {
             final String srcStr = (String)src;
-            final File file = new File(srcStr);
-            if (srcStr.indexOf(':') != -1) {
-                if ((source = loadInternal(srcStr, "nashorn:", "resources/")) == null &&
-                    (source = loadInternal(srcStr, "fx:", "resources/fx/")) == null) {
-                    URL url;
-                    try {
-                        //check for malformed url. if malformed, it may still be a valid file
-                        url = new URL(srcStr);
-                    } catch (final MalformedURLException e) {
-                        url = file.toURI().toURL();
+            if (srcStr.startsWith(LOAD_CLASSPATH)) {
+                URL url = getResourceURL(srcStr.substring(LOAD_CLASSPATH.length()));
+                source = (url != null)? new Source(url.toString(), url) : null;
+            } else {
+                final File file = new File(srcStr);
+                if (srcStr.indexOf(':') != -1) {
+                    if ((source = loadInternal(srcStr, LOAD_NASHORN, "resources/")) == null &&
+                        (source = loadInternal(srcStr, LOAD_FX, "resources/fx/")) == null) {
+                        URL url;
+                        try {
+                            //check for malformed url. if malformed, it may still be a valid file
+                            url = new URL(srcStr);
+                        } catch (final MalformedURLException e) {
+                            url = file.toURI().toURL();
+                        }
+                        source = new Source(url.toString(), url);
                     }
-                    source = new Source(url.toString(), url);
+                } else if (file.isFile()) {
+                    source = new Source(srcStr, file);
                 }
-            } else if (file.isFile()) {
-                source = new Source(srcStr, file);
             }
         } else if (src instanceof File && ((File)src).isFile()) {
             final File file = (File)src;
@@ -610,36 +620,53 @@
     }
 
     /**
-     * Checks that the given package can be accessed from no permissions context.
+     * Checks that the given Class can be accessed from no permissions context.
      *
-     * @param fullName fully qualified package name
+     * @param clazz Class object
      * @throw SecurityException if not accessible
      */
-    public static void checkPackageAccess(final String fullName) {
-        final int index = fullName.lastIndexOf('.');
-        if (index != -1) {
-            final SecurityManager sm = System.getSecurityManager();
-            if (sm != null) {
-                AccessController.doPrivileged(new PrivilegedAction<Void>() {
-                    @Override
-                    public Void run() {
-                        sm.checkPackageAccess(fullName.substring(0, index));
-                        return null;
-                    }
-                }, NO_PERMISSIONS_ACC_CTXT);
+    public static void checkPackageAccess(final Class clazz) {
+        final SecurityManager sm = System.getSecurityManager();
+        if (sm != null) {
+            Class bottomClazz = clazz;
+            while(bottomClazz.isArray()) {
+                bottomClazz = bottomClazz.getComponentType();
             }
+            checkPackageAccess(sm, bottomClazz.getName());
         }
     }
 
     /**
      * Checks that the given package can be accessed from no permissions context.
      *
+     * @param sm current security manager instance
      * @param fullName fully qualified package name
+     * @throw SecurityException if not accessible
+     */
+    private static void checkPackageAccess(final SecurityManager sm, final String fullName) {
+        sm.getClass(); // null check
+        final int index = fullName.lastIndexOf('.');
+        if (index != -1) {
+            final String pkgName = fullName.substring(0, index);
+            AccessController.doPrivileged(new PrivilegedAction<Void>() {
+                @Override
+                public Void run() {
+                    sm.checkPackageAccess(pkgName);
+                    return null;
+                }
+            }, NO_PERMISSIONS_ACC_CTXT);
+        }
+    }
+
+    /**
+     * Checks that the given Class can be accessed from no permissions context.
+     *
+     * @param clazz Class object
      * @return true if package is accessible, false otherwise
      */
-    public static boolean isAccessiblePackage(final String fullName) {
+    private static boolean isAccessiblePackage(final Class clazz) {
         try {
-            checkPackageAccess(fullName);
+            checkPackageAccess(clazz);
             return true;
         } catch (final SecurityException se) {
             return false;
@@ -653,7 +680,7 @@
      * @return true if Class is accessible, false otherwise
      */
     public static boolean isAccessibleClass(final Class<?> clazz) {
-        return Modifier.isPublic(clazz.getModifiers()) && Context.isAccessiblePackage(clazz.getName());
+        return Modifier.isPublic(clazz.getModifiers()) && Context.isAccessiblePackage(clazz);
     }
 
     /**
@@ -667,8 +694,16 @@
      * @throws ClassNotFoundException if class cannot be resolved
      */
     public Class<?> findClass(final String fullName) throws ClassNotFoundException {
+        if (fullName.indexOf('[') != -1 || fullName.indexOf('/') != -1) {
+            // don't allow array class names or internal names.
+            throw new ClassNotFoundException(fullName);
+        }
+
         // check package access as soon as possible!
-        checkPackageAccess(fullName);
+        final SecurityManager sm = System.getSecurityManager();
+        if (sm != null) {
+            checkPackageAccess(sm, fullName);
+        }
 
         // try the script -classpath loader, if that is set
         if (classPathLoader != null) {
@@ -803,6 +838,18 @@
         return Context.getContextTrusted();
     }
 
+    private URL getResourceURL(final String resName) throws IOException {
+        // try the classPathLoader if we have and then
+        // try the appLoader if non-null.
+        if (classPathLoader != null) {
+            return classPathLoader.getResource(resName);
+        } else if (appLoader != null) {
+            return appLoader.getResource(resName);
+        }
+
+        return null;
+    }
+
     private Object evaluateSource(final Source source, final ScriptObject scope, final ScriptObject thiz) {
         ScriptFunction script = null;
 
diff --git a/nashorn/src/jdk/nashorn/internal/runtime/RecompilableScriptFunctionData.java b/nashorn/src/jdk/nashorn/internal/runtime/RecompilableScriptFunctionData.java
index a64479a..fee0497 100644
--- a/nashorn/src/jdk/nashorn/internal/runtime/RecompilableScriptFunctionData.java
+++ b/nashorn/src/jdk/nashorn/internal/runtime/RecompilableScriptFunctionData.java
@@ -132,7 +132,7 @@
         if (source != null) {
             sb.append(source.getName())
                 .append(':')
-                .append(source.getLine(Token.descPosition(token)))
+                .append(functionNode.getLineNumber())
                 .append(' ');
         }
 
diff --git a/nashorn/src/jdk/nashorn/internal/runtime/Source.java b/nashorn/src/jdk/nashorn/internal/runtime/Source.java
index 9273e7a..0455a86 100644
--- a/nashorn/src/jdk/nashorn/internal/runtime/Source.java
+++ b/nashorn/src/jdk/nashorn/internal/runtime/Source.java
@@ -272,6 +272,10 @@
 
     /**
      * Return line number of character position.
+     *
+     * <p>This method can be expensive for large sources as it iterates through
+     * all characters up to {@code position}.</p>
+     *
      * @param position Position of character in source content.
      * @return Line number.
      */
diff --git a/nashorn/src/jdk/nashorn/internal/runtime/linker/JavaAdapterFactory.java b/nashorn/src/jdk/nashorn/internal/runtime/linker/JavaAdapterFactory.java
index 5130f3d..b221d00 100644
--- a/nashorn/src/jdk/nashorn/internal/runtime/linker/JavaAdapterFactory.java
+++ b/nashorn/src/jdk/nashorn/internal/runtime/linker/JavaAdapterFactory.java
@@ -109,7 +109,7 @@
         if (sm != null) {
             for (Class<?> type : types) {
                 // check for restricted package access
-                Context.checkPackageAccess(type.getName());
+                Context.checkPackageAccess(type);
             }
         }
         return getAdapterInfo(types).getAdapterClassFor(classOverrides);
diff --git a/nashorn/src/jdk/nashorn/internal/runtime/linker/NashornStaticClassLinker.java b/nashorn/src/jdk/nashorn/internal/runtime/linker/NashornStaticClassLinker.java
index 9c9f528..ce60d79 100644
--- a/nashorn/src/jdk/nashorn/internal/runtime/linker/NashornStaticClassLinker.java
+++ b/nashorn/src/jdk/nashorn/internal/runtime/linker/NashornStaticClassLinker.java
@@ -70,7 +70,7 @@
         // We intercept "new" on StaticClass instances to provide additional capabilities
         if ("new".equals(desc.getNameToken(CallSiteDescriptor.OPERATOR))) {
             // make sure new is on accessible Class
-            Context.checkPackageAccess(receiverClass.getName());
+            Context.checkPackageAccess(receiverClass);
 
             // Is the class abstract? (This includes interfaces.)
             if (NashornLinker.isAbstractClass(receiverClass)) {
diff --git a/nashorn/src/jdk/nashorn/internal/runtime/resources/fx/base.js b/nashorn/src/jdk/nashorn/internal/runtime/resources/fx/base.js
index b0bfc3f..382eabb 100644
--- a/nashorn/src/jdk/nashorn/internal/runtime/resources/fx/base.js
+++ b/nashorn/src/jdk/nashorn/internal/runtime/resources/fx/base.js
@@ -33,7 +33,6 @@
 var JFX_SWT_CLASSES      = [];
 
 function LOAD_FX_CLASSES(clsList) {
-
     for each (var cls in clsList) {
         // Ex. Stage = Java.type("javafx.stage.Stage");
         this[cls[cls.length - 1]] = Java.type(cls.join("."));
@@ -146,3 +145,5 @@
         }
     }
 })();
+
+LOAD_FX_CLASSES(JFX_BASE_CLASSES);
diff --git a/nashorn/test/script/basic/JDK-8023026.js b/nashorn/test/script/basic/JDK-8023026.js
index 9080ec8..0a6f027 100644
--- a/nashorn/test/script/basic/JDK-8023026.js
+++ b/nashorn/test/script/basic/JDK-8023026.js
@@ -48,7 +48,7 @@
         function(x) x*x));
 }
 
-var array = new (Java.type("[I"))(4);
+var array = new (Java.type("int[]"))(4);
 for (var i in array) {
     array[i] = i;
 }
diff --git a/nashorn/test/script/basic/JDK-8025213.js b/nashorn/test/script/basic/JDK-8025213.js
new file mode 100644
index 0000000..062a389
--- /dev/null
+++ b/nashorn/test/script/basic/JDK-8025213.js
@@ -0,0 +1,39 @@
+/*
+ * 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.
+ */
+
+/**
+ * JDK-8025213: Assignment marks variable as defined too early
+ *
+ * @test
+ * @run
+ */
+
+function test() {
+    if (String("")) {
+        var foo = 42;
+    }
+    foo = foo + 1;
+    print(foo);
+}
+
+test();
diff --git a/nashorn/test/script/basic/JDK-8025213.js.EXPECTED b/nashorn/test/script/basic/JDK-8025213.js.EXPECTED
new file mode 100644
index 0000000..736991a
--- /dev/null
+++ b/nashorn/test/script/basic/JDK-8025213.js.EXPECTED
@@ -0,0 +1 @@
+NaN
diff --git a/nashorn/test/script/basic/JDK-8025488.js b/nashorn/test/script/basic/JDK-8025488.js
new file mode 100644
index 0000000..a3697f4
--- /dev/null
+++ b/nashorn/test/script/basic/JDK-8025488.js
@@ -0,0 +1,43 @@
+/*
+ * 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.
+ */
+
+/**
+ * JDK-8025488: Error.captureStackTrace should not format error stack
+ *
+ * @test
+ * @run
+ */
+
+
+function MyError () {
+    Error.call(this);
+    Error.captureStackTrace(this);
+    this.arr = {};
+};
+
+MyError.prototype.toString = function() {
+    return this.arr.toString();
+}
+
+var e = new MyError(); 
+print(e.stack);
diff --git a/nashorn/test/script/basic/JDK-8025488.js.EXPECTED b/nashorn/test/script/basic/JDK-8025488.js.EXPECTED
new file mode 100644
index 0000000..40b244a
--- /dev/null
+++ b/nashorn/test/script/basic/JDK-8025488.js.EXPECTED
@@ -0,0 +1,3 @@
+[object Object]
+	at MyError (test/script/basic/JDK-8025488.js:34)
+	at <program> (test/script/basic/JDK-8025488.js:42)
diff --git a/nashorn/test/script/basic/JDK-8025515.js b/nashorn/test/script/basic/JDK-8025515.js
new file mode 100644
index 0000000..f3d7cee
--- /dev/null
+++ b/nashorn/test/script/basic/JDK-8025515.js
@@ -0,0 +1,58 @@
+/*
+ * 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.
+ */
+
+/**
+ * JDK-8025515: Performance issues with Source.getLine()
+ *
+ * @test
+ * @run
+ */
+
+// Make sure synthetic names of anonymous functions have correct line numbers
+
+function testMethodName(f, expected) {
+    try {
+        f();
+        fail("expected error");
+    } catch (e) {
+        var stack = e.getStackTrace();
+        if (stack[0].methodName !== expected) {
+            fail("got " + stack[0].methodName + ", expected " + expected);
+        }
+    }
+}
+
+testMethodName(function() {
+    return a.b.c;
+}, "_L45");
+
+testMethodName(function() { throw new Error() }, "_L49");
+
+var f = (function() {
+    return function() { a.b.c; };
+})();
+testMethodName(f, "_L51$_L52");
+
+testMethodName((function() {
+    return function() { return a.b.c; };
+})(), "_L56$_L57");
diff --git a/nashorn/test/script/basic/JDK-8025520.js b/nashorn/test/script/basic/JDK-8025520.js
new file mode 100644
index 0000000..773a30a
--- /dev/null
+++ b/nashorn/test/script/basic/JDK-8025520.js
@@ -0,0 +1,50 @@
+/*
+ * 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.
+ */
+
+/**
+ * JDK-8025520: Array.prototype.slice should only copy defined elements
+ *
+ * @test
+ * @run
+ */
+
+var s = Array.prototype.slice.call({length: 6, 3: 1}, 2, 5);
+
+if (s.length != 3) {
+    fail("s.length != 3");
+}
+if (0 in s) {
+    fail("0 in s");
+}
+if (s.hasOwnProperty(0)) {
+    fail("s.hasOwnProperty(0)");
+}
+if (s[1] !== 1) {
+    fail("s[1] !== 1");
+}
+if (2 in s) {
+    fail("2 in s");
+}
+if (s.hasOwnProperty(2)) {
+    fail("s.hasOwnProperty(2)");
+}
diff --git a/nashorn/test/script/basic/JDK-8025589.js b/nashorn/test/script/basic/JDK-8025589.js
new file mode 100644
index 0000000..a74261c
--- /dev/null
+++ b/nashorn/test/script/basic/JDK-8025589.js
@@ -0,0 +1,51 @@
+/*
+ * 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.
+ */
+
+/**
+ * JDK-8025589:  Array.prototype.shift should only copy defined elements in generic mode
+ *
+ * @test
+ * @run
+ */
+
+var s = {length: 4, 2: 1};
+Array.prototype.shift.call(s);
+
+if (s.length != 3) {
+    fail("s.length != 3");
+}
+if (0 in s) {
+    fail("0 in s");
+}
+if (s.hasOwnProperty(0)) {
+    fail("s.hasOwnProperty(0)");
+}
+if (s[1] !== 1) {
+    fail("s[1] !== 1");
+}
+if (2 in s) {
+    fail("2 in s");
+}
+if (s.hasOwnProperty(2)) {
+    fail("s.hasOwnProperty(2)");
+}
diff --git a/nashorn/test/script/basic/JDK-8026033.js b/nashorn/test/script/basic/JDK-8026033.js
new file mode 100644
index 0000000..4a5d859
--- /dev/null
+++ b/nashorn/test/script/basic/JDK-8026033.js
@@ -0,0 +1,39 @@
+/*
+ * 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.
+ */
+
+/**
+ * JDK-8026033: Switch should load expression even when there are no cases in it
+ *
+ * @test
+ * @run
+ */
+
+try {
+    (function() { switch(x) {} })();
+    fail("Should have thrown ReferenceError");
+} catch (e) {
+    if (! (e instanceof ReferenceError)) {
+        fail("ReferenceError expected, got " + e);
+    }
+    print(e);
+}
diff --git a/nashorn/test/script/basic/JDK-8026033.js.EXPECTED b/nashorn/test/script/basic/JDK-8026033.js.EXPECTED
new file mode 100644
index 0000000..c007ed7
--- /dev/null
+++ b/nashorn/test/script/basic/JDK-8026033.js.EXPECTED
@@ -0,0 +1 @@
+ReferenceError: "x" is not defined
diff --git a/nashorn/test/script/basic/JDK-8026042.js b/nashorn/test/script/basic/JDK-8026042.js
new file mode 100644
index 0000000..a853626
--- /dev/null
+++ b/nashorn/test/script/basic/JDK-8026042.js
@@ -0,0 +1,43 @@
+/*
+ * 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.
+ */
+
+/**
+ * JDK-8026042: FoldConstants need to guard against ArrayLiteralNode
+ *
+ * @test
+ * @run
+ */
+
+try {
+    if ([a]) {
+        print("fail");
+    }
+} catch (e) {
+    print(e);
+}
+
+try {
+    [a] ? print(1) : print(2);
+} catch (e) {
+    print(e);
+}
diff --git a/nashorn/test/script/basic/JDK-8026042.js.EXPECTED b/nashorn/test/script/basic/JDK-8026042.js.EXPECTED
new file mode 100644
index 0000000..aae23d0
--- /dev/null
+++ b/nashorn/test/script/basic/JDK-8026042.js.EXPECTED
@@ -0,0 +1,2 @@
+ReferenceError: "a" is not defined
+ReferenceError: "a" is not defined
diff --git a/nashorn/test/script/basic/JDK-8026048.js b/nashorn/test/script/basic/JDK-8026048.js
new file mode 100644
index 0000000..33789fe
--- /dev/null
+++ b/nashorn/test/script/basic/JDK-8026048.js
@@ -0,0 +1,37 @@
+/*
+ * 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.
+ */
+
+/**
+ * JDK-8026048: Function constructor should convert arguments to String before performing any syntax checks
+ *
+ * @test
+ * @run
+ */
+
+try {
+    Function("-", {toString:function(){throw "err"}})
+} catch (e) {
+    if (e !== "err") {
+        fail("err xpected, got " + e);
+    }
+}
diff --git a/nashorn/test/script/error/JDK-8026039.js b/nashorn/test/script/error/JDK-8026039.js
new file mode 100644
index 0000000..f37d9bd
--- /dev/null
+++ b/nashorn/test/script/error/JDK-8026039.js
@@ -0,0 +1,32 @@
+/*
+ * 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.
+ */
+
+/**
+ * JDK-8026039: future strict names are allowed as function name and argument name of a strict function
+ *
+ * @test/compile-error
+ */
+
+function public() {"use strict"}
+
+function f(public) {"use strict"} 
diff --git a/nashorn/test/script/error/JDK-8026039.js.EXPECTED b/nashorn/test/script/error/JDK-8026039.js.EXPECTED
new file mode 100644
index 0000000..cde398f
--- /dev/null
+++ b/nashorn/test/script/error/JDK-8026039.js.EXPECTED
@@ -0,0 +1,9 @@
+test/script/error/JDK-8026039.js:30:9 "public" cannot be used as function name in strict mode
+function public() {"use strict"}
+         ^
+test/script/error/JDK-8026039.js:32:11 Expected ident but found public
+function f(public) {"use strict"} 
+           ^
+test/script/error/JDK-8026039.js:33:0 Expected } but found eof
+
+^
diff --git a/nashorn/test/script/sandbox/arrayclass.js b/nashorn/test/script/sandbox/arrayclass.js
new file mode 100644
index 0000000..c29c86b
--- /dev/null
+++ b/nashorn/test/script/sandbox/arrayclass.js
@@ -0,0 +1,37 @@
+/*
+ * 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.
+ */
+
+/**
+ * Try to access array class of a sensitive class like Unsafe.
+ *
+ * @test
+ * @security
+ * @run
+ */
+
+try {
+    var unsafeArr = Java.type("[Lsun.misc.Unsafe;");
+    fail("No Exception for [Lsun.misc.Unsafe;");
+} catch (e) {
+    print(e);
+}
diff --git a/nashorn/test/script/sandbox/arrayclass.js.EXPECTED b/nashorn/test/script/sandbox/arrayclass.js.EXPECTED
new file mode 100644
index 0000000..d66d77f
--- /dev/null
+++ b/nashorn/test/script/sandbox/arrayclass.js.EXPECTED
@@ -0,0 +1 @@
+java.lang.ClassNotFoundException: [Lsun.misc.Unsafe;
diff --git a/nashorn/test/script/trusted/JDK-8025629.js b/nashorn/test/script/trusted/JDK-8025629.js
new file mode 100644
index 0000000..7dda846
--- /dev/null
+++ b/nashorn/test/script/trusted/JDK-8025629.js
@@ -0,0 +1,33 @@
+/*
+ * 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.
+ */
+
+/**
+ * JDK-8025629: load function should support a way to load scripts from classpath
+ *
+ * @test
+ * @run
+ */
+
+load("classpath:jdk/nashorn/internal/runtime/resources/load_test.js")
+
+Assert.assertEquals(loadedFunc("hello"), "HELLO");
diff --git a/nashorn/test/src/jdk/nashorn/internal/runtime/resources/load_test.js b/nashorn/test/src/jdk/nashorn/internal/runtime/resources/load_test.js
new file mode 100644
index 0000000..21672d6
--- /dev/null
+++ b/nashorn/test/src/jdk/nashorn/internal/runtime/resources/load_test.js
@@ -0,0 +1,28 @@
+/*
+ * 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.  Oracle designates this
+ * particular file as subject to the "Classpath" exception as provided
+ * by Oracle in the LICENSE file that accompanied this code.
+ *
+ * This code is distributed in the hope that it will be useful, but WITHOUT
+ * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
+ * version 2 for more details (a copy is included in the LICENSE file that
+ * accompanied this code).
+ *
+ * You should have received a copy of the GNU General Public License version
+ * 2 along with this work; if not, write to the Free Software Foundation,
+ * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
+ *
+ * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
+ * or visit www.oracle.com if you need additional information or have any
+ * questions.
+ */
+
+function loadedFunc(arg) {
+    return arg.toUpperCase();
+}