changeset 43982:eb8d55535748

Merge
author duke
date Wed, 05 Jul 2017 22:55:57 +0200
parents e15b96207e47 77d10ac743ea
children 23069ad504ed
files jaxp/test/javax/xml/jaxp/unittest/common/prettyprint/xmltest5.out jaxp/test/javax/xml/jaxp/unittest/common/prettyprint/xmltest7.out jaxws/src/java.xml.bind/share/classes/com/sun/xml/internal/bind/v2/bytecode/package.html jaxws/src/java.xml.bind/share/classes/com/sun/xml/internal/bind/v2/model/annotation/package.html jaxws/src/java.xml.bind/share/classes/com/sun/xml/internal/bind/v2/model/impl/package.html jaxws/src/java.xml.bind/share/classes/com/sun/xml/internal/bind/v2/model/nav/package.html jaxws/src/java.xml.bind/share/classes/com/sun/xml/internal/bind/v2/runtime/package.html jaxws/src/java.xml.bind/share/classes/com/sun/xml/internal/bind/v2/runtime/reflect/opt/package.html jaxws/src/java.xml.bind/share/classes/com/sun/xml/internal/bind/v2/runtime/reflect/package.html jaxws/src/java.xml.bind/share/classes/com/sun/xml/internal/bind/v2/schemagen/xmlschema/package.html jaxws/src/java.xml.ws/share/classes/com/sun/xml/internal/messaging/saaj/soap/SOAPDocumentFragment.java jaxws/src/java.xml.ws/share/classes/com/sun/xml/internal/ws/api/streaming/ContextClassloaderLocal.properties jaxws/src/java.xml.ws/share/classes/com/sun/xml/internal/ws/commons/xmlutil/ContextClassloaderLocal.properties jaxws/src/java.xml.ws/share/classes/com/sun/xml/internal/ws/spi/ContextClassloaderLocal.properties jaxws/src/java.xml.ws/share/classes/com/sun/xml/internal/ws/util/xml/ContextClassloaderLocal.properties jaxws/src/jdk.xml.bind/share/classes/com/sun/tools/internal/jxc/ap/package.html jaxws/src/jdk.xml.bind/share/classes/com/sun/tools/internal/xjc/api/impl/s2j/package.html jaxws/src/jdk.xml.bind/share/classes/com/sun/tools/internal/xjc/api/package.html jaxws/src/jdk.xml.bind/share/classes/com/sun/tools/internal/xjc/generator/bean/field/package.html jaxws/src/jdk.xml.bind/share/classes/com/sun/tools/internal/xjc/model/nav/package.html jaxws/src/jdk.xml.bind/share/classes/com/sun/tools/internal/xjc/outline/package.html jaxws/src/jdk.xml.bind/share/classes/com/sun/tools/internal/xjc/reader/dtd/bindinfo/package.html jaxws/src/jdk.xml.bind/share/classes/com/sun/tools/internal/xjc/reader/gbind/package.html jaxws/src/jdk.xml.bind/share/classes/com/sun/tools/internal/xjc/reader/internalizer/package.html jaxws/src/jdk.xml.bind/share/classes/com/sun/tools/internal/xjc/reader/package.html jaxws/src/jdk.xml.bind/share/classes/com/sun/tools/internal/xjc/reader/xmlschema/bindinfo/package.html jaxws/src/jdk.xml.bind/share/classes/com/sun/tools/internal/xjc/runtime/package.html jaxws/src/jdk.xml.bind/share/classes/com/sun/xml/internal/xsom/impl/util/Uri.java jaxws/src/jdk.xml.ws/share/classes/com/sun/tools/internal/ws/wsdl/parser/ContextClassloaderLocal.properties jdk/make/src/classes/build/tools/jigsaw/Graph.java jdk/src/java.base/share/classes/sun/security/provider/certpath/PKIXTimestampParameters.java jdk/src/java.base/share/classes/sun/security/util/CertConstraintParameters.java jdk/src/java.base/share/native/libzip/zlib-1.2.8/ChangeLog jdk/src/java.base/share/native/libzip/zlib-1.2.8/README jdk/src/java.base/share/native/libzip/zlib-1.2.8/compress.c jdk/src/java.base/share/native/libzip/zlib-1.2.8/crc32.h jdk/src/java.base/share/native/libzip/zlib-1.2.8/deflate.c jdk/src/java.base/share/native/libzip/zlib-1.2.8/deflate.h jdk/src/java.base/share/native/libzip/zlib-1.2.8/gzclose.c jdk/src/java.base/share/native/libzip/zlib-1.2.8/gzguts.h jdk/src/java.base/share/native/libzip/zlib-1.2.8/gzlib.c jdk/src/java.base/share/native/libzip/zlib-1.2.8/gzread.c jdk/src/java.base/share/native/libzip/zlib-1.2.8/gzwrite.c jdk/src/java.base/share/native/libzip/zlib-1.2.8/infback.c jdk/src/java.base/share/native/libzip/zlib-1.2.8/inffast.c jdk/src/java.base/share/native/libzip/zlib-1.2.8/inffast.h jdk/src/java.base/share/native/libzip/zlib-1.2.8/inffixed.h jdk/src/java.base/share/native/libzip/zlib-1.2.8/inflate.c jdk/src/java.base/share/native/libzip/zlib-1.2.8/inflate.h jdk/src/java.base/share/native/libzip/zlib-1.2.8/inftrees.c jdk/src/java.base/share/native/libzip/zlib-1.2.8/inftrees.h jdk/src/java.base/share/native/libzip/zlib-1.2.8/patches/ChangeLog_java jdk/src/java.base/share/native/libzip/zlib-1.2.8/trees.c jdk/src/java.base/share/native/libzip/zlib-1.2.8/trees.h jdk/src/java.base/share/native/libzip/zlib-1.2.8/uncompr.c jdk/src/java.base/share/native/libzip/zlib-1.2.8/zadler32.c jdk/src/java.base/share/native/libzip/zlib-1.2.8/zconf.h jdk/src/java.base/share/native/libzip/zlib-1.2.8/zcrc32.c jdk/src/java.base/share/native/libzip/zlib-1.2.8/zlib.h jdk/src/java.base/share/native/libzip/zlib-1.2.8/zutil.c jdk/src/java.base/share/native/libzip/zlib-1.2.8/zutil.h jdk/src/jdk.desktop/share/classes/jdk/awt/AWTUtils.java jdk/src/jdk.desktop/share/classes/module-info.java jdk/test/java/awt/jdk/TestJDKAWTUtils.java jdk/test/java/lang/StackWalker/CountLocalSlots.java jdk/test/java/lang/StackWalker/LocalsCrash.java jdk/test/java/lang/invoke/lambda/MetafactorySamReturnTest.java jdk/test/java/lang/invoke/modules/ModuleAccessControlTest.java jdk/test/java/lang/invoke/modules/src/m1/module-info.java jdk/test/java/lang/invoke/modules/src/m1/p1/Main.java jdk/test/java/lang/invoke/modules/src/m1/p1/Type1.java jdk/test/java/lang/invoke/modules/src/m1/p2/Type2.java jdk/test/java/lang/invoke/modules/src/m2/module-info.java jdk/test/java/lang/invoke/modules/src/m2/q1/Type1.java jdk/test/java/lang/invoke/modules/src/m2/q2/Type2.java jdk/test/java/util/stream/bootlib/java.base/java/util/stream/SpliteratorTestHelper.java jdk/test/javax/xml/jaxp/common/8035437/Document.java jdk/test/javax/xml/jaxp/common/8035437/DocumentImpl.java jdk/test/javax/xml/jaxp/common/8035437/Node.java jdk/test/sun/security/krb5/auto/BadKdc.java jdk/test/sun/security/krb5/auto/BadKdc1.java jdk/test/sun/security/krb5/auto/BadKdc2.java jdk/test/sun/security/krb5/auto/BadKdc3.java jdk/test/sun/security/krb5/auto/BadKdc4.java jdk/test/sun/security/krb5/auto/CommMatcher.java jdk/test/sun/security/krb5/auto/MaxRetries.java jdk/test/sun/security/krb5/auto/TcpTimeout.java jdk/test/sun/security/krb5/auto/UdpTcp.java jdk/test/sun/text/IntHashtable/Bug4170614Test.java langtools/test/tools/javac/6627362/x/Object.java langtools/test/tools/javac/T4093617/java.base/Object.java langtools/test/tools/javac/diags/examples/ModuleInfoWithXModuleSourcePath/Extra.java langtools/test/tools/javac/diags/examples/ModuleInfoWithXModuleSourcePath/module-info.java langtools/test/tools/javac/diags/examples/ModuleInfoWithXmoduleClasspath/ModuleInfoWithXmoduleClasspath.java langtools/test/tools/javac/diags/examples/ModuleInfoWithXmoduleClasspath/additional/module-info.java langtools/test/tools/javac/diags/examples/NoSuperclass.java langtools/test/tools/javac/diags/examples/XModuleWithModulePath/XModuleWithModulePath.java langtools/test/tools/javac/meth/BadPolySig.java langtools/test/tools/javac/modules/XModuleTest.java langtools/test/tools/javac/redefineObject/java.base/Object1.java langtools/test/tools/javac/redefineObject/java.base/Object2.java
diffstat 1100 files changed, 43301 insertions(+), 28666 deletions(-) [+]
line wrap: on
line diff
--- a/.hgtags	Fri Feb 24 19:48:33 2017 +0100
+++ b/.hgtags	Wed Jul 05 22:55:57 2017 +0200
@@ -399,3 +399,6 @@
 8c70d170e62c0c58b5bc3ba666bd140399b98c9c jdk-10+0
 45b751afd11e6c05991cf4913c5a0ac3304fcc4e jdk-9+154
 f4aff695ffe05cfdb69d8af25a4ddc6a029754ea jdk-9+155
+06bce0388880b5ff8e040e4a9d72a3ea11dac321 jdk-9+156
+fa3e76b477829afc4476f0b725cfaa440a6fd917 jdk-9+157
+b5015f742ba648184bb7fc547197bd33ebfde30d jdk-9+158
--- a/.hgtags-top-repo	Fri Feb 24 19:48:33 2017 +0100
+++ b/.hgtags-top-repo	Wed Jul 05 22:55:57 2017 +0200
@@ -398,3 +398,6 @@
 816a6d03a7c44edfbd8780110529f1bdc3964fb9 jdk-9+153
 8d26916eaa21b689835ffc1c0dbf12470aa9be61 jdk-9+154
 688a3863c00ebc089ab17ee1fc46272cbbd96815 jdk-9+155
+783ec7542cf7154e5d2b87f55bb97d28f81e9ada jdk-9+156
+4eb77fb98952dc477a4229575c81d2263a9ce711 jdk-9+157
+a4087bc10a88a43ea3ad0919b5b4af1c86977221 jdk-9+158
--- a/common/autoconf/basics.m4	Fri Feb 24 19:48:33 2017 +0100
+++ b/common/autoconf/basics.m4	Wed Jul 05 22:55:57 2017 +0200
@@ -1202,6 +1202,18 @@
 # Check for support for specific options in bash
 AC_DEFUN_ONCE([BASIC_CHECK_BASH_OPTIONS],
 [
+  # Check bash version
+  # Extra [ ] to stop m4 mangling
+  [ BASH_VER=`$BASH --version | $SED -n  -e 's/^.*bash.*ersion *\([0-9.]*\).*$/\1/ p'` ]
+  AC_MSG_CHECKING([bash version])
+  AC_MSG_RESULT([$BASH_VER])
+
+  BASH_MAJOR=`$ECHO $BASH_VER | $CUT -d . -f 1`
+  BASH_MINOR=`$ECHO $BASH_VER | $CUT -d . -f 2`
+  if test $BASH_MAJOR -lt 3 || (test $BASH_MAJOR -eq 3 && test $BASH_MINOR -lt 2); then
+    AC_MSG_ERROR([bash version 3.2 or better is required])
+  fi
+
   # Test if bash supports pipefail.
   AC_MSG_CHECKING([if bash supports pipefail])
   if ${BASH} -c 'set -o pipefail'; then
--- a/common/autoconf/generated-configure.sh	Fri Feb 24 19:48:33 2017 +0100
+++ b/common/autoconf/generated-configure.sh	Wed Jul 05 22:55:57 2017 +0200
@@ -5043,7 +5043,7 @@
 #
 # $1 = compiler to test (CC or CXX)
 # $2 = human readable name of compiler (C or C++)
-# $3 = list of compiler names to search for
+# $3 = compiler name to search for
 
 
 # Detect the core components of the toolchain, i.e. the compilers (CC and CXX),
@@ -5170,7 +5170,7 @@
 #CUSTOM_AUTOCONF_INCLUDE
 
 # Do not change or remove the following line, it is needed for consistency checks:
-DATE_WHEN_GENERATED=1486175373
+DATE_WHEN_GENERATED=1487934085
 
 ###############################################################################
 #
@@ -24092,6 +24092,20 @@
   fi
 
 
+  # Check bash version
+  # Extra [ ] to stop m4 mangling
+   BASH_VER=`$BASH --version | $SED -n  -e 's/^.*bash.*ersion *\([0-9.]*\).*$/\1/ p'`
+  { $as_echo "$as_me:${as_lineno-$LINENO}: checking bash version" >&5
+$as_echo_n "checking bash version... " >&6; }
+  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BASH_VER" >&5
+$as_echo "$BASH_VER" >&6; }
+
+  BASH_MAJOR=`$ECHO $BASH_VER | $CUT -d . -f 1`
+  BASH_MINOR=`$ECHO $BASH_VER | $CUT -d . -f 2`
+  if test $BASH_MAJOR -lt 3 || (test $BASH_MAJOR -eq 3 && test $BASH_MINOR -lt 2); then
+    as_fn_error $? "bash version 3.2 or better is required" "$LINENO" 5
+  fi
+
   # Test if bash supports pipefail.
   { $as_echo "$as_me:${as_lineno-$LINENO}: checking if bash supports pipefail" >&5
 $as_echo_n "checking if bash supports pipefail... " >&6; }
@@ -33124,10 +33138,9 @@
     if test -n "$TOOLCHAIN_PATH"; then
       PATH_save="$PATH"
       PATH="$TOOLCHAIN_PATH"
-      for ac_prog in $SEARCH_LIST
-do
-  # Extract the first word of "$ac_prog", so it can be a program name with args.
-set dummy $ac_prog; ac_word=$2
+      if test -n "$ac_tool_prefix"; then
+  # Extract the first word of "${ac_tool_prefix}$SEARCH_LIST", so it can be a program name with args.
+set dummy ${ac_tool_prefix}$SEARCH_LIST; ac_word=$2
 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
 $as_echo_n "checking for $ac_word... " >&6; }
 if ${ac_cv_path_TOOLCHAIN_PATH_CC+:} false; then :
@@ -33166,20 +33179,73 @@
 fi
 
 
-  test -n "$TOOLCHAIN_PATH_CC" && break
-done
+fi
+if test -z "$ac_cv_path_TOOLCHAIN_PATH_CC"; then
+  ac_pt_TOOLCHAIN_PATH_CC=$TOOLCHAIN_PATH_CC
+  # Extract the first word of "$SEARCH_LIST", so it can be a program name with args.
+set dummy $SEARCH_LIST; ac_word=$2
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
+$as_echo_n "checking for $ac_word... " >&6; }
+if ${ac_cv_path_ac_pt_TOOLCHAIN_PATH_CC+:} false; then :
+  $as_echo_n "(cached) " >&6
+else
+  case $ac_pt_TOOLCHAIN_PATH_CC in
+  [\\/]* | ?:[\\/]*)
+  ac_cv_path_ac_pt_TOOLCHAIN_PATH_CC="$ac_pt_TOOLCHAIN_PATH_CC" # Let the user override the test with a path.
+  ;;
+  *)
+  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+  IFS=$as_save_IFS
+  test -z "$as_dir" && as_dir=.
+    for ac_exec_ext in '' $ac_executable_extensions; do
+  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
+    ac_cv_path_ac_pt_TOOLCHAIN_PATH_CC="$as_dir/$ac_word$ac_exec_ext"
+    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
+    break 2
+  fi
+done
+  done
+IFS=$as_save_IFS
+
+  ;;
+esac
+fi
+ac_pt_TOOLCHAIN_PATH_CC=$ac_cv_path_ac_pt_TOOLCHAIN_PATH_CC
+if test -n "$ac_pt_TOOLCHAIN_PATH_CC"; then
+  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_pt_TOOLCHAIN_PATH_CC" >&5
+$as_echo "$ac_pt_TOOLCHAIN_PATH_CC" >&6; }
+else
+  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
+fi
+
+  if test "x$ac_pt_TOOLCHAIN_PATH_CC" = x; then
+    TOOLCHAIN_PATH_CC=""
+  else
+    case $cross_compiling:$ac_tool_warned in
+yes:)
+{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
+$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
+ac_tool_warned=yes ;;
+esac
+    TOOLCHAIN_PATH_CC=$ac_pt_TOOLCHAIN_PATH_CC
+  fi
+else
+  TOOLCHAIN_PATH_CC="$ac_cv_path_TOOLCHAIN_PATH_CC"
+fi
 
       CC=$TOOLCHAIN_PATH_CC
       PATH="$PATH_save"
     fi
 
-    # AC_PATH_PROGS can't be run multiple times with the same variable,
+    # AC_PATH_TOOL can't be run multiple times with the same variable,
     # so create a new name for this run.
     if test "x$CC" = x; then
-      for ac_prog in $SEARCH_LIST
-do
-  # Extract the first word of "$ac_prog", so it can be a program name with args.
-set dummy $ac_prog; ac_word=$2
+      if test -n "$ac_tool_prefix"; then
+  # Extract the first word of "${ac_tool_prefix}$SEARCH_LIST", so it can be a program name with args.
+set dummy ${ac_tool_prefix}$SEARCH_LIST; ac_word=$2
 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
 $as_echo_n "checking for $ac_word... " >&6; }
 if ${ac_cv_path_POTENTIAL_CC+:} false; then :
@@ -33218,8 +33284,62 @@
 fi
 
 
-  test -n "$POTENTIAL_CC" && break
-done
+fi
+if test -z "$ac_cv_path_POTENTIAL_CC"; then
+  ac_pt_POTENTIAL_CC=$POTENTIAL_CC
+  # Extract the first word of "$SEARCH_LIST", so it can be a program name with args.
+set dummy $SEARCH_LIST; ac_word=$2
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
+$as_echo_n "checking for $ac_word... " >&6; }
+if ${ac_cv_path_ac_pt_POTENTIAL_CC+:} false; then :
+  $as_echo_n "(cached) " >&6
+else
+  case $ac_pt_POTENTIAL_CC in
+  [\\/]* | ?:[\\/]*)
+  ac_cv_path_ac_pt_POTENTIAL_CC="$ac_pt_POTENTIAL_CC" # Let the user override the test with a path.
+  ;;
+  *)
+  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+  IFS=$as_save_IFS
+  test -z "$as_dir" && as_dir=.
+    for ac_exec_ext in '' $ac_executable_extensions; do
+  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
+    ac_cv_path_ac_pt_POTENTIAL_CC="$as_dir/$ac_word$ac_exec_ext"
+    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
+    break 2
+  fi
+done
+  done
+IFS=$as_save_IFS
+
+  ;;
+esac
+fi
+ac_pt_POTENTIAL_CC=$ac_cv_path_ac_pt_POTENTIAL_CC
+if test -n "$ac_pt_POTENTIAL_CC"; then
+  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_pt_POTENTIAL_CC" >&5
+$as_echo "$ac_pt_POTENTIAL_CC" >&6; }
+else
+  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
+fi
+
+  if test "x$ac_pt_POTENTIAL_CC" = x; then
+    POTENTIAL_CC=""
+  else
+    case $cross_compiling:$ac_tool_warned in
+yes:)
+{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
+$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
+ac_tool_warned=yes ;;
+esac
+    POTENTIAL_CC=$ac_pt_POTENTIAL_CC
+  fi
+else
+  POTENTIAL_CC="$ac_cv_path_POTENTIAL_CC"
+fi
 
       CC=$POTENTIAL_CC
     fi
@@ -34425,10 +34545,9 @@
     if test -n "$TOOLCHAIN_PATH"; then
       PATH_save="$PATH"
       PATH="$TOOLCHAIN_PATH"
-      for ac_prog in $SEARCH_LIST
-do
-  # Extract the first word of "$ac_prog", so it can be a program name with args.
-set dummy $ac_prog; ac_word=$2
+      if test -n "$ac_tool_prefix"; then
+  # Extract the first word of "${ac_tool_prefix}$SEARCH_LIST", so it can be a program name with args.
+set dummy ${ac_tool_prefix}$SEARCH_LIST; ac_word=$2
 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
 $as_echo_n "checking for $ac_word... " >&6; }
 if ${ac_cv_path_TOOLCHAIN_PATH_CXX+:} false; then :
@@ -34467,20 +34586,73 @@
 fi
 
 
-  test -n "$TOOLCHAIN_PATH_CXX" && break
-done
+fi
+if test -z "$ac_cv_path_TOOLCHAIN_PATH_CXX"; then
+  ac_pt_TOOLCHAIN_PATH_CXX=$TOOLCHAIN_PATH_CXX
+  # Extract the first word of "$SEARCH_LIST", so it can be a program name with args.
+set dummy $SEARCH_LIST; ac_word=$2
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
+$as_echo_n "checking for $ac_word... " >&6; }
+if ${ac_cv_path_ac_pt_TOOLCHAIN_PATH_CXX+:} false; then :
+  $as_echo_n "(cached) " >&6
+else
+  case $ac_pt_TOOLCHAIN_PATH_CXX in
+  [\\/]* | ?:[\\/]*)
+  ac_cv_path_ac_pt_TOOLCHAIN_PATH_CXX="$ac_pt_TOOLCHAIN_PATH_CXX" # Let the user override the test with a path.
+  ;;
+  *)
+  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+  IFS=$as_save_IFS
+  test -z "$as_dir" && as_dir=.
+    for ac_exec_ext in '' $ac_executable_extensions; do
+  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
+    ac_cv_path_ac_pt_TOOLCHAIN_PATH_CXX="$as_dir/$ac_word$ac_exec_ext"
+    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
+    break 2
+  fi
+done
+  done
+IFS=$as_save_IFS
+
+  ;;
+esac
+fi
+ac_pt_TOOLCHAIN_PATH_CXX=$ac_cv_path_ac_pt_TOOLCHAIN_PATH_CXX
+if test -n "$ac_pt_TOOLCHAIN_PATH_CXX"; then
+  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_pt_TOOLCHAIN_PATH_CXX" >&5
+$as_echo "$ac_pt_TOOLCHAIN_PATH_CXX" >&6; }
+else
+  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
+fi
+
+  if test "x$ac_pt_TOOLCHAIN_PATH_CXX" = x; then
+    TOOLCHAIN_PATH_CXX=""
+  else
+    case $cross_compiling:$ac_tool_warned in
+yes:)
+{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
+$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
+ac_tool_warned=yes ;;
+esac
+    TOOLCHAIN_PATH_CXX=$ac_pt_TOOLCHAIN_PATH_CXX
+  fi
+else
+  TOOLCHAIN_PATH_CXX="$ac_cv_path_TOOLCHAIN_PATH_CXX"
+fi
 
       CXX=$TOOLCHAIN_PATH_CXX
       PATH="$PATH_save"
     fi
 
-    # AC_PATH_PROGS can't be run multiple times with the same variable,
+    # AC_PATH_TOOL can't be run multiple times with the same variable,
     # so create a new name for this run.
     if test "x$CXX" = x; then
-      for ac_prog in $SEARCH_LIST
-do
-  # Extract the first word of "$ac_prog", so it can be a program name with args.
-set dummy $ac_prog; ac_word=$2
+      if test -n "$ac_tool_prefix"; then
+  # Extract the first word of "${ac_tool_prefix}$SEARCH_LIST", so it can be a program name with args.
+set dummy ${ac_tool_prefix}$SEARCH_LIST; ac_word=$2
 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
 $as_echo_n "checking for $ac_word... " >&6; }
 if ${ac_cv_path_POTENTIAL_CXX+:} false; then :
@@ -34519,8 +34691,62 @@
 fi
 
 
-  test -n "$POTENTIAL_CXX" && break
-done
+fi
+if test -z "$ac_cv_path_POTENTIAL_CXX"; then
+  ac_pt_POTENTIAL_CXX=$POTENTIAL_CXX
+  # Extract the first word of "$SEARCH_LIST", so it can be a program name with args.
+set dummy $SEARCH_LIST; ac_word=$2
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
+$as_echo_n "checking for $ac_word... " >&6; }
+if ${ac_cv_path_ac_pt_POTENTIAL_CXX+:} false; then :
+  $as_echo_n "(cached) " >&6
+else
+  case $ac_pt_POTENTIAL_CXX in
+  [\\/]* | ?:[\\/]*)
+  ac_cv_path_ac_pt_POTENTIAL_CXX="$ac_pt_POTENTIAL_CXX" # Let the user override the test with a path.
+  ;;
+  *)
+  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+  IFS=$as_save_IFS
+  test -z "$as_dir" && as_dir=.
+    for ac_exec_ext in '' $ac_executable_extensions; do
+  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
+    ac_cv_path_ac_pt_POTENTIAL_CXX="$as_dir/$ac_word$ac_exec_ext"
+    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
+    break 2
+  fi
+done
+  done
+IFS=$as_save_IFS
+
+  ;;
+esac
+fi
+ac_pt_POTENTIAL_CXX=$ac_cv_path_ac_pt_POTENTIAL_CXX
+if test -n "$ac_pt_POTENTIAL_CXX"; then
+  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_pt_POTENTIAL_CXX" >&5
+$as_echo "$ac_pt_POTENTIAL_CXX" >&6; }
+else
+  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
+fi
+
+  if test "x$ac_pt_POTENTIAL_CXX" = x; then
+    POTENTIAL_CXX=""
+  else
+    case $cross_compiling:$ac_tool_warned in
+yes:)
+{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
+$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
+ac_tool_warned=yes ;;
+esac
+    POTENTIAL_CXX=$ac_pt_POTENTIAL_CXX
+  fi
+else
+  POTENTIAL_CXX="$ac_cv_path_POTENTIAL_CXX"
+fi
 
       CXX=$POTENTIAL_CXX
     fi
@@ -52629,12 +52855,12 @@
     # Only enable AOT on linux-X64.
     if test "x$OPENJDK_TARGET_OS-$OPENJDK_TARGET_CPU" = "xlinux-x86_64"; then
       if test -e "$HOTSPOT_TOPDIR/src/jdk.aot"; then
-        if test -e "$HOTSPOT_TOPDIR/src/jdk.vm.compiler"; then
+        if test -e "$HOTSPOT_TOPDIR/src/jdk.internal.vm.compiler"; then
           ENABLE_AOT="true"
         else
           ENABLE_AOT="false"
           if test "x$enable_aot" = "xyes"; then
-            as_fn_error $? "Cannot build AOT without hotspot/src/jdk.vm.compiler sources. Remove --enable-aot." "$LINENO" 5
+            as_fn_error $? "Cannot build AOT without hotspot/src/jdk.internal.vm.compiler sources. Remove --enable-aot." "$LINENO" 5
           fi
         fi
       else
@@ -64365,8 +64591,8 @@
     JVM_FEATURES_jvmci=""
   fi
 
-  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if jdk.vm.compiler should be built" >&5
-$as_echo_n "checking if jdk.vm.compiler should be built... " >&6; }
+  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if jdk.internal.vm.compiler should be built" >&5
+$as_echo_n "checking if jdk.internal.vm.compiler should be built... " >&6; }
   if   [[ " $JVM_FEATURES " =~ " graal " ]]  ; then
     { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes, forced" >&5
 $as_echo "yes, forced" >&6; }
--- a/common/autoconf/hotspot.m4	Fri Feb 24 19:48:33 2017 +0100
+++ b/common/autoconf/hotspot.m4	Wed Jul 05 22:55:57 2017 +0200
@@ -215,12 +215,12 @@
     # Only enable AOT on linux-X64.
     if test "x$OPENJDK_TARGET_OS-$OPENJDK_TARGET_CPU" = "xlinux-x86_64"; then
       if test -e "$HOTSPOT_TOPDIR/src/jdk.aot"; then
-        if test -e "$HOTSPOT_TOPDIR/src/jdk.vm.compiler"; then
+        if test -e "$HOTSPOT_TOPDIR/src/jdk.internal.vm.compiler"; then
           ENABLE_AOT="true"
         else
           ENABLE_AOT="false"
           if test "x$enable_aot" = "xyes"; then
-            AC_MSG_ERROR([Cannot build AOT without hotspot/src/jdk.vm.compiler sources. Remove --enable-aot.])
+            AC_MSG_ERROR([Cannot build AOT without hotspot/src/jdk.internal.vm.compiler sources. Remove --enable-aot.])
           fi
         fi
       else
@@ -327,7 +327,7 @@
     JVM_FEATURES_jvmci=""
   fi
 
-  AC_MSG_CHECKING([if jdk.vm.compiler should be built])
+  AC_MSG_CHECKING([if jdk.internal.vm.compiler should be built])
   if HOTSPOT_CHECK_JVM_FEATURE(graal); then
     AC_MSG_RESULT([yes, forced])
     if test "x$JVM_FEATURES_jvmci" != "xjvmci" ; then
--- a/common/autoconf/toolchain.m4	Fri Feb 24 19:48:33 2017 +0100
+++ b/common/autoconf/toolchain.m4	Wed Jul 05 22:55:57 2017 +0200
@@ -440,7 +440,7 @@
 #
 # $1 = compiler to test (CC or CXX)
 # $2 = human readable name of compiler (C or C++)
-# $3 = list of compiler names to search for
+# $3 = compiler name to search for
 AC_DEFUN([TOOLCHAIN_FIND_COMPILER],
 [
   COMPILER_NAME=$2
@@ -482,15 +482,15 @@
     if test -n "$TOOLCHAIN_PATH"; then
       PATH_save="$PATH"
       PATH="$TOOLCHAIN_PATH"
-      AC_PATH_PROGS(TOOLCHAIN_PATH_$1, $SEARCH_LIST)
+      AC_PATH_TOOL(TOOLCHAIN_PATH_$1, $SEARCH_LIST)
       $1=$TOOLCHAIN_PATH_$1
       PATH="$PATH_save"
     fi
 
-    # AC_PATH_PROGS can't be run multiple times with the same variable,
+    # AC_PATH_TOOL can't be run multiple times with the same variable,
     # so create a new name for this run.
     if test "x[$]$1" = x; then
-      AC_PATH_PROGS(POTENTIAL_$1, $SEARCH_LIST)
+      AC_PATH_TOOL(POTENTIAL_$1, $SEARCH_LIST)
       $1=$POTENTIAL_$1
     fi
 
--- a/common/bin/unshuffle_list.txt	Fri Feb 24 19:48:33 2017 +0100
+++ b/common/bin/unshuffle_list.txt	Wed Jul 05 22:55:57 2017 +0200
@@ -361,8 +361,8 @@
 jdk/src/java.base/share/native/libverify/check_format.c : jdk/src/share/native/common/check_format.c
 jdk/src/java.base/share/native/libverify/opcodes.in_out : jdk/src/share/native/common/opcodes.in_out
 jdk/src/java.base/share/native/libzip : jdk/src/share/native/java/util/zip
-jdk/src/java.base/share/native/libzip/zlib-1.2.8 : jdk/src/share/native/java/util/zip/zlib-1.2.8
-jdk/src/java.base/share/native/libzip/zlib-1.2.8/patches/ChangeLog_java : jdk/src/share/native/java/util/zip/zlib-1.2.8/patches/ChangeLog_java
+jdk/src/java.base/share/native/libzip/zlib : jdk/src/share/native/java/util/zip/zlib
+jdk/src/java.base/share/native/libzip/zlib/patches/ChangeLog_java : jdk/src/share/native/java/util/zip/zlib/patches/ChangeLog_java
 jdk/src/java.base/unix/classes/java/io : jdk/src/solaris/classes/java/io
 jdk/src/java.base/unix/classes/java/lang : jdk/src/solaris/classes/java/lang
 jdk/src/java.base/unix/classes/java/net : jdk/src/solaris/classes/java/net
--- a/common/conf/jib-profiles.js	Fri Feb 24 19:48:33 2017 +0100
+++ b/common/conf/jib-profiles.js	Wed Jul 05 22:55:57 2017 +0200
@@ -401,6 +401,8 @@
     common.boot_jdk_home = input.get("boot_jdk", "home_path") + "/jdk"
         + common.boot_jdk_subdirpart
         + (input.build_os == "macosx" ? ".jdk/Contents/Home" : "");
+    common.boot_jdk_platform = input.build_os + "-"
+        + (input.build_cpu == "x86" ? "i586" : input.build_cpu);
 
     return common;
 };
@@ -832,9 +834,6 @@
  */
 var getJibProfilesDependencies = function (input, common) {
 
-    var boot_jdk_platform = input.build_os + "-"
-        + (input.build_cpu == "x86" ? "i586" : input.build_cpu);
-
     var devkit_platform_revisions = {
         linux_x64: "gcc4.9.2-OEL6.4+1.1",
         macosx_x64: "Xcode6.3-MacOSX10.9+1.0",
@@ -853,9 +852,9 @@
             server: "javare",
             module: "jdk",
             revision: common.boot_jdk_revision,
-            checksum_file: boot_jdk_platform + "/MD5_VALUES",
-            file: boot_jdk_platform + "/jdk-" + common.boot_jdk_revision
-                + "-" + boot_jdk_platform + ".tar.gz",
+            checksum_file: common.boot_jdk_platform + "/MD5_VALUES",
+            file: common.boot_jdk_platform + "/jdk-" + common.boot_jdk_revision
+                + "-" + common.boot_jdk_platform + ".tar.gz",
             configure_args: "--with-boot-jdk=" + common.boot_jdk_home,
             environment_path: common.boot_jdk_home + "/bin"
         },
--- a/common/nb_native/nbproject/configurations.xml	Fri Feb 24 19:48:33 2017 +0100
+++ b/common/nb_native/nbproject/configurations.xml	Wed Jul 05 22:55:57 2017 +0200
@@ -1223,7 +1223,7 @@
                   <in>check_format.c</in>
                 </df>
                 <df name="libzip">
-                  <df name="zlib-1.2.8">
+                  <df name="zlib">
                     <in>compress.c</in>
                     <in>deflate.c</in>
                     <in>gzclose.c</in>
@@ -38283,7 +38283,7 @@
             <pElem>../../jdk/src/java.base/unix/native/include</pElem>
             <pElem>../../jdk/src/java.base/share/native/libjava</pElem>
             <pElem>../../jdk/src/java.base/unix/native/libjava</pElem>
-            <pElem>../../jdk/src/java.base/share/native/libzip/zlib-1.2.8</pElem>
+            <pElem>../../jdk/src/java.base/share/native/libzip/zlib</pElem>
             <pElem>../../build/support/headers/java.base</pElem>
             <pElem>../../make</pElem>
           </incDir>
@@ -38304,7 +38304,7 @@
             <pElem>../../jdk/src/java.base/unix/native/include</pElem>
             <pElem>../../jdk/src/java.base/share/native/libjava</pElem>
             <pElem>../../jdk/src/java.base/unix/native/libjava</pElem>
-            <pElem>../../jdk/src/java.base/share/native/libzip/zlib-1.2.8</pElem>
+            <pElem>../../jdk/src/java.base/share/native/libzip/zlib</pElem>
             <pElem>../../build/support/headers/java.base</pElem>
             <pElem>../../make</pElem>
           </incDir>
@@ -38325,7 +38325,7 @@
             <pElem>../../jdk/src/java.base/unix/native/include</pElem>
             <pElem>../../jdk/src/java.base/share/native/libjava</pElem>
             <pElem>../../jdk/src/java.base/unix/native/libjava</pElem>
-            <pElem>../../jdk/src/java.base/share/native/libzip/zlib-1.2.8</pElem>
+            <pElem>../../jdk/src/java.base/share/native/libzip/zlib</pElem>
             <pElem>../../build/support/headers/java.base</pElem>
             <pElem>../../make</pElem>
           </incDir>
@@ -38346,7 +38346,7 @@
             <pElem>../../jdk/src/java.base/unix/native/include</pElem>
             <pElem>../../jdk/src/java.base/share/native/libjava</pElem>
             <pElem>../../jdk/src/java.base/unix/native/libjava</pElem>
-            <pElem>../../jdk/src/java.base/share/native/libzip/zlib-1.2.8</pElem>
+            <pElem>../../jdk/src/java.base/share/native/libzip/zlib</pElem>
             <pElem>../../build/support/headers/java.base</pElem>
             <pElem>../../make</pElem>
           </incDir>
@@ -38367,7 +38367,7 @@
             <pElem>../../jdk/src/java.base/unix/native/include</pElem>
             <pElem>../../jdk/src/java.base/share/native/libjava</pElem>
             <pElem>../../jdk/src/java.base/unix/native/libjava</pElem>
-            <pElem>../../jdk/src/java.base/share/native/libzip/zlib-1.2.8</pElem>
+            <pElem>../../jdk/src/java.base/share/native/libzip/zlib</pElem>
             <pElem>../../build/support/headers/java.base</pElem>
             <pElem>../../make</pElem>
           </incDir>
@@ -38377,14 +38377,14 @@
           </preprocessorList>
         </cTool>
       </item>
-      <item path="../../jdk/src/java.base/share/native/libzip/zlib-1.2.8/compress.c"
-            ex="false"
-            tool="0"
-            flavor2="0">
-        <cTool flags="4">
-        </cTool>
-      </item>
-      <item path="../../jdk/src/java.base/share/native/libzip/zlib-1.2.8/deflate.c"
+      <item path="../../jdk/src/java.base/share/native/libzip/zlib/compress.c"
+            ex="false"
+            tool="0"
+            flavor2="0">
+        <cTool flags="4">
+        </cTool>
+      </item>
+      <item path="../../jdk/src/java.base/share/native/libzip/zlib/deflate.c"
             ex="false"
             tool="0"
             flavor2="0">
@@ -38394,7 +38394,7 @@
           </preprocessorList>
         </cTool>
       </item>
-      <item path="../../jdk/src/java.base/share/native/libzip/zlib-1.2.8/gzclose.c"
+      <item path="../../jdk/src/java.base/share/native/libzip/zlib/gzclose.c"
             ex="false"
             tool="0"
             flavor2="0">
@@ -38404,7 +38404,7 @@
           </preprocessorList>
         </cTool>
       </item>
-      <item path="../../jdk/src/java.base/share/native/libzip/zlib-1.2.8/gzlib.c"
+      <item path="../../jdk/src/java.base/share/native/libzip/zlib/gzlib.c"
             ex="false"
             tool="0"
             flavor2="0">
@@ -38414,7 +38414,7 @@
           </preprocessorList>
         </cTool>
       </item>
-      <item path="../../jdk/src/java.base/share/native/libzip/zlib-1.2.8/gzread.c"
+      <item path="../../jdk/src/java.base/share/native/libzip/zlib/gzread.c"
             ex="false"
             tool="0"
             flavor2="0">
@@ -38424,7 +38424,7 @@
           </preprocessorList>
         </cTool>
       </item>
-      <item path="../../jdk/src/java.base/share/native/libzip/zlib-1.2.8/gzwrite.c"
+      <item path="../../jdk/src/java.base/share/native/libzip/zlib/gzwrite.c"
             ex="false"
             tool="0"
             flavor2="0">
@@ -38434,7 +38434,7 @@
           </preprocessorList>
         </cTool>
       </item>
-      <item path="../../jdk/src/java.base/share/native/libzip/zlib-1.2.8/infback.c"
+      <item path="../../jdk/src/java.base/share/native/libzip/zlib/infback.c"
             ex="false"
             tool="0"
             flavor2="0">
@@ -38444,7 +38444,7 @@
           </preprocessorList>
         </cTool>
       </item>
-      <item path="../../jdk/src/java.base/share/native/libzip/zlib-1.2.8/inffast.c"
+      <item path="../../jdk/src/java.base/share/native/libzip/zlib/inffast.c"
             ex="false"
             tool="0"
             flavor2="0">
@@ -38454,7 +38454,7 @@
           </preprocessorList>
         </cTool>
       </item>
-      <item path="../../jdk/src/java.base/share/native/libzip/zlib-1.2.8/inflate.c"
+      <item path="../../jdk/src/java.base/share/native/libzip/zlib/inflate.c"
             ex="false"
             tool="0"
             flavor2="0">
@@ -38464,7 +38464,7 @@
           </preprocessorList>
         </cTool>
       </item>
-      <item path="../../jdk/src/java.base/share/native/libzip/zlib-1.2.8/inftrees.c"
+      <item path="../../jdk/src/java.base/share/native/libzip/zlib/inftrees.c"
             ex="false"
             tool="0"
             flavor2="0">
@@ -38474,7 +38474,7 @@
           </preprocessorList>
         </cTool>
       </item>
-      <item path="../../jdk/src/java.base/share/native/libzip/zlib-1.2.8/trees.c"
+      <item path="../../jdk/src/java.base/share/native/libzip/zlib/trees.c"
             ex="false"
             tool="0"
             flavor2="0">
@@ -38484,7 +38484,7 @@
           </preprocessorList>
         </cTool>
       </item>
-      <item path="../../jdk/src/java.base/share/native/libzip/zlib-1.2.8/uncompr.c"
+      <item path="../../jdk/src/java.base/share/native/libzip/zlib/uncompr.c"
             ex="false"
             tool="0"
             flavor2="0">
@@ -38494,7 +38494,7 @@
           </preprocessorList>
         </cTool>
       </item>
-      <item path="../../jdk/src/java.base/share/native/libzip/zlib-1.2.8/zadler32.c"
+      <item path="../../jdk/src/java.base/share/native/libzip/zlib/zadler32.c"
             ex="false"
             tool="0"
             flavor2="0">
@@ -38504,7 +38504,7 @@
           </preprocessorList>
         </cTool>
       </item>
-      <item path="../../jdk/src/java.base/share/native/libzip/zlib-1.2.8/zcrc32.c"
+      <item path="../../jdk/src/java.base/share/native/libzip/zlib/zcrc32.c"
             ex="false"
             tool="0"
             flavor2="0">
@@ -38514,7 +38514,7 @@
           </preprocessorList>
         </cTool>
       </item>
-      <item path="../../jdk/src/java.base/share/native/libzip/zlib-1.2.8/zutil.c"
+      <item path="../../jdk/src/java.base/share/native/libzip/zlib/zutil.c"
             ex="false"
             tool="0"
             flavor2="0">
@@ -41203,7 +41203,7 @@
             <pElem>../../jdk/src/java.desktop/share/native/libsplashscreen</pElem>
             <pElem>../../jdk/src/java.desktop/share/native/libsplashscreen/libpng</pElem>
             <pElem>../../jdk/src/java.desktop/unix/native/libsplashscreen</pElem>
-            <pElem>../../jdk/src/java.base/share/native/libzip/zlib-1.2.8</pElem>
+            <pElem>../../jdk/src/java.base/share/native/libzip/zlib</pElem>
             <pElem>../../jdk/src/java.base/linux/native/libjava</pElem>
             <pElem>../../jdk/src/java.base/unix/native/libjava</pElem>
             <pElem>../../jdk/src/java.base/share/native/libjava</pElem>
@@ -41232,7 +41232,7 @@
             <pElem>../../jdk/src/java.desktop/share/native/libsplashscreen</pElem>
             <pElem>../../jdk/src/java.desktop/share/native/libsplashscreen/libpng</pElem>
             <pElem>../../jdk/src/java.desktop/unix/native/libsplashscreen</pElem>
-            <pElem>../../jdk/src/java.base/share/native/libzip/zlib-1.2.8</pElem>
+            <pElem>../../jdk/src/java.base/share/native/libzip/zlib</pElem>
             <pElem>../../jdk/src/java.base/linux/native/libjava</pElem>
             <pElem>../../jdk/src/java.base/unix/native/libjava</pElem>
             <pElem>../../jdk/src/java.base/share/native/libjava</pElem>
@@ -41261,7 +41261,7 @@
             <pElem>../../jdk/src/java.desktop/share/native/libsplashscreen</pElem>
             <pElem>../../jdk/src/java.desktop/share/native/libsplashscreen/libpng</pElem>
             <pElem>../../jdk/src/java.desktop/unix/native/libsplashscreen</pElem>
-            <pElem>../../jdk/src/java.base/share/native/libzip/zlib-1.2.8</pElem>
+            <pElem>../../jdk/src/java.base/share/native/libzip/zlib</pElem>
             <pElem>../../jdk/src/java.base/linux/native/libjava</pElem>
             <pElem>../../jdk/src/java.base/unix/native/libjava</pElem>
             <pElem>../../jdk/src/java.base/share/native/libjava</pElem>
@@ -41290,7 +41290,7 @@
             <pElem>../../jdk/src/java.desktop/share/native/libsplashscreen</pElem>
             <pElem>../../jdk/src/java.desktop/share/native/libsplashscreen/libpng</pElem>
             <pElem>../../jdk/src/java.desktop/unix/native/libsplashscreen</pElem>
-            <pElem>../../jdk/src/java.base/share/native/libzip/zlib-1.2.8</pElem>
+            <pElem>../../jdk/src/java.base/share/native/libzip/zlib</pElem>
             <pElem>../../jdk/src/java.base/linux/native/libjava</pElem>
             <pElem>../../jdk/src/java.base/unix/native/libjava</pElem>
             <pElem>../../jdk/src/java.base/share/native/libjava</pElem>
@@ -41319,7 +41319,7 @@
             <pElem>../../jdk/src/java.desktop/share/native/libsplashscreen</pElem>
             <pElem>../../jdk/src/java.desktop/share/native/libsplashscreen/libpng</pElem>
             <pElem>../../jdk/src/java.desktop/unix/native/libsplashscreen</pElem>
-            <pElem>../../jdk/src/java.base/share/native/libzip/zlib-1.2.8</pElem>
+            <pElem>../../jdk/src/java.base/share/native/libzip/zlib</pElem>
             <pElem>../../jdk/src/java.base/linux/native/libjava</pElem>
             <pElem>../../jdk/src/java.base/unix/native/libjava</pElem>
             <pElem>../../jdk/src/java.base/share/native/libjava</pElem>
@@ -41348,7 +41348,7 @@
             <pElem>../../jdk/src/java.desktop/share/native/libsplashscreen</pElem>
             <pElem>../../jdk/src/java.desktop/share/native/libsplashscreen/libpng</pElem>
             <pElem>../../jdk/src/java.desktop/unix/native/libsplashscreen</pElem>
-            <pElem>../../jdk/src/java.base/share/native/libzip/zlib-1.2.8</pElem>
+            <pElem>../../jdk/src/java.base/share/native/libzip/zlib</pElem>
             <pElem>../../jdk/src/java.base/linux/native/libjava</pElem>
             <pElem>../../jdk/src/java.base/unix/native/libjava</pElem>
             <pElem>../../jdk/src/java.base/share/native/libjava</pElem>
@@ -41377,7 +41377,7 @@
             <pElem>../../jdk/src/java.desktop/share/native/libsplashscreen</pElem>
             <pElem>../../jdk/src/java.desktop/share/native/libsplashscreen/libpng</pElem>
             <pElem>../../jdk/src/java.desktop/unix/native/libsplashscreen</pElem>
-            <pElem>../../jdk/src/java.base/share/native/libzip/zlib-1.2.8</pElem>
+            <pElem>../../jdk/src/java.base/share/native/libzip/zlib</pElem>
             <pElem>../../jdk/src/java.base/linux/native/libjava</pElem>
             <pElem>../../jdk/src/java.base/unix/native/libjava</pElem>
             <pElem>../../jdk/src/java.base/share/native/libjava</pElem>
@@ -41406,7 +41406,7 @@
             <pElem>../../jdk/src/java.desktop/share/native/libsplashscreen</pElem>
             <pElem>../../jdk/src/java.desktop/share/native/libsplashscreen/libpng</pElem>
             <pElem>../../jdk/src/java.desktop/unix/native/libsplashscreen</pElem>
-            <pElem>../../jdk/src/java.base/share/native/libzip/zlib-1.2.8</pElem>
+            <pElem>../../jdk/src/java.base/share/native/libzip/zlib</pElem>
             <pElem>../../jdk/src/java.base/linux/native/libjava</pElem>
             <pElem>../../jdk/src/java.base/unix/native/libjava</pElem>
             <pElem>../../jdk/src/java.base/share/native/libjava</pElem>
@@ -41435,7 +41435,7 @@
             <pElem>../../jdk/src/java.desktop/share/native/libsplashscreen</pElem>
             <pElem>../../jdk/src/java.desktop/share/native/libsplashscreen/libpng</pElem>
             <pElem>../../jdk/src/java.desktop/unix/native/libsplashscreen</pElem>
-            <pElem>../../jdk/src/java.base/share/native/libzip/zlib-1.2.8</pElem>
+            <pElem>../../jdk/src/java.base/share/native/libzip/zlib</pElem>
             <pElem>../../jdk/src/java.base/linux/native/libjava</pElem>
             <pElem>../../jdk/src/java.base/unix/native/libjava</pElem>
             <pElem>../../jdk/src/java.base/share/native/libjava</pElem>
@@ -41464,7 +41464,7 @@
             <pElem>../../jdk/src/java.desktop/share/native/libsplashscreen</pElem>
             <pElem>../../jdk/src/java.desktop/share/native/libsplashscreen/libpng</pElem>
             <pElem>../../jdk/src/java.desktop/unix/native/libsplashscreen</pElem>
-            <pElem>../../jdk/src/java.base/share/native/libzip/zlib-1.2.8</pElem>
+            <pElem>../../jdk/src/java.base/share/native/libzip/zlib</pElem>
             <pElem>../../jdk/src/java.base/linux/native/libjava</pElem>
             <pElem>../../jdk/src/java.base/unix/native/libjava</pElem>
             <pElem>../../jdk/src/java.base/share/native/libjava</pElem>
@@ -41493,7 +41493,7 @@
             <pElem>../../jdk/src/java.desktop/share/native/libsplashscreen</pElem>
             <pElem>../../jdk/src/java.desktop/share/native/libsplashscreen/libpng</pElem>
             <pElem>../../jdk/src/java.desktop/unix/native/libsplashscreen</pElem>
-            <pElem>../../jdk/src/java.base/share/native/libzip/zlib-1.2.8</pElem>
+            <pElem>../../jdk/src/java.base/share/native/libzip/zlib</pElem>
             <pElem>../../jdk/src/java.base/linux/native/libjava</pElem>
             <pElem>../../jdk/src/java.base/unix/native/libjava</pElem>
             <pElem>../../jdk/src/java.base/share/native/libjava</pElem>
@@ -41522,7 +41522,7 @@
             <pElem>../../jdk/src/java.desktop/share/native/libsplashscreen</pElem>
             <pElem>../../jdk/src/java.desktop/share/native/libsplashscreen/libpng</pElem>
             <pElem>../../jdk/src/java.desktop/unix/native/libsplashscreen</pElem>
-            <pElem>../../jdk/src/java.base/share/native/libzip/zlib-1.2.8</pElem>
+            <pElem>../../jdk/src/java.base/share/native/libzip/zlib</pElem>
             <pElem>../../jdk/src/java.base/linux/native/libjava</pElem>
             <pElem>../../jdk/src/java.base/unix/native/libjava</pElem>
             <pElem>../../jdk/src/java.base/share/native/libjava</pElem>
@@ -41551,7 +41551,7 @@
             <pElem>../../jdk/src/java.desktop/share/native/libsplashscreen</pElem>
             <pElem>../../jdk/src/java.desktop/share/native/libsplashscreen/libpng</pElem>
             <pElem>../../jdk/src/java.desktop/unix/native/libsplashscreen</pElem>
-            <pElem>../../jdk/src/java.base/share/native/libzip/zlib-1.2.8</pElem>
+            <pElem>../../jdk/src/java.base/share/native/libzip/zlib</pElem>
             <pElem>../../jdk/src/java.base/linux/native/libjava</pElem>
             <pElem>../../jdk/src/java.base/unix/native/libjava</pElem>
             <pElem>../../jdk/src/java.base/share/native/libjava</pElem>
@@ -41580,7 +41580,7 @@
             <pElem>../../jdk/src/java.desktop/share/native/libsplashscreen</pElem>
             <pElem>../../jdk/src/java.desktop/share/native/libsplashscreen/libpng</pElem>
             <pElem>../../jdk/src/java.desktop/unix/native/libsplashscreen</pElem>
-            <pElem>../../jdk/src/java.base/share/native/libzip/zlib-1.2.8</pElem>
+            <pElem>../../jdk/src/java.base/share/native/libzip/zlib</pElem>
             <pElem>../../jdk/src/java.base/linux/native/libjava</pElem>
             <pElem>../../jdk/src/java.base/unix/native/libjava</pElem>
             <pElem>../../jdk/src/java.base/share/native/libjava</pElem>
@@ -41609,7 +41609,7 @@
             <pElem>../../jdk/src/java.desktop/share/native/libsplashscreen</pElem>
             <pElem>../../jdk/src/java.desktop/share/native/libsplashscreen/libpng</pElem>
             <pElem>../../jdk/src/java.desktop/unix/native/libsplashscreen</pElem>
-            <pElem>../../jdk/src/java.base/share/native/libzip/zlib-1.2.8</pElem>
+            <pElem>../../jdk/src/java.base/share/native/libzip/zlib</pElem>
             <pElem>../../jdk/src/java.base/linux/native/libjava</pElem>
             <pElem>../../jdk/src/java.base/unix/native/libjava</pElem>
             <pElem>../../jdk/src/java.base/share/native/libjava</pElem>
@@ -41638,7 +41638,7 @@
             <pElem>../../jdk/src/java.desktop/share/native/libsplashscreen</pElem>
             <pElem>../../jdk/src/java.desktop/share/native/libsplashscreen/libpng</pElem>
             <pElem>../../jdk/src/java.desktop/unix/native/libsplashscreen</pElem>
-            <pElem>../../jdk/src/java.base/share/native/libzip/zlib-1.2.8</pElem>
+            <pElem>../../jdk/src/java.base/share/native/libzip/zlib</pElem>
             <pElem>../../jdk/src/java.base/linux/native/libjava</pElem>
             <pElem>../../jdk/src/java.base/unix/native/libjava</pElem>
             <pElem>../../jdk/src/java.base/share/native/libjava</pElem>
@@ -41667,7 +41667,7 @@
             <pElem>../../jdk/src/java.desktop/share/native/libsplashscreen</pElem>
             <pElem>../../jdk/src/java.desktop/share/native/libsplashscreen/libpng</pElem>
             <pElem>../../jdk/src/java.desktop/unix/native/libsplashscreen</pElem>
-            <pElem>../../jdk/src/java.base/share/native/libzip/zlib-1.2.8</pElem>
+            <pElem>../../jdk/src/java.base/share/native/libzip/zlib</pElem>
             <pElem>../../jdk/src/java.base/linux/native/libjava</pElem>
             <pElem>../../jdk/src/java.base/unix/native/libjava</pElem>
             <pElem>../../jdk/src/java.base/share/native/libjava</pElem>
@@ -41696,7 +41696,7 @@
             <pElem>../../jdk/src/java.desktop/share/native/libsplashscreen</pElem>
             <pElem>../../jdk/src/java.desktop/share/native/libsplashscreen/libpng</pElem>
             <pElem>../../jdk/src/java.desktop/unix/native/libsplashscreen</pElem>
-            <pElem>../../jdk/src/java.base/share/native/libzip/zlib-1.2.8</pElem>
+            <pElem>../../jdk/src/java.base/share/native/libzip/zlib</pElem>
             <pElem>../../jdk/src/java.base/linux/native/libjava</pElem>
             <pElem>../../jdk/src/java.base/unix/native/libjava</pElem>
             <pElem>../../jdk/src/java.base/share/native/libjava</pElem>
@@ -41725,7 +41725,7 @@
             <pElem>../../jdk/src/java.desktop/share/native/libsplashscreen</pElem>
             <pElem>../../jdk/src/java.desktop/share/native/libsplashscreen/libpng</pElem>
             <pElem>../../jdk/src/java.desktop/unix/native/libsplashscreen</pElem>
-            <pElem>../../jdk/src/java.base/share/native/libzip/zlib-1.2.8</pElem>
+            <pElem>../../jdk/src/java.base/share/native/libzip/zlib</pElem>
             <pElem>../../jdk/src/java.base/linux/native/libjava</pElem>
             <pElem>../../jdk/src/java.base/unix/native/libjava</pElem>
             <pElem>../../jdk/src/java.base/share/native/libjava</pElem>
@@ -41754,7 +41754,7 @@
             <pElem>../../jdk/src/java.desktop/share/native/libsplashscreen</pElem>
             <pElem>../../jdk/src/java.desktop/share/native/libsplashscreen/libpng</pElem>
             <pElem>../../jdk/src/java.desktop/unix/native/libsplashscreen</pElem>
-            <pElem>../../jdk/src/java.base/share/native/libzip/zlib-1.2.8</pElem>
+            <pElem>../../jdk/src/java.base/share/native/libzip/zlib</pElem>
             <pElem>../../jdk/src/java.base/linux/native/libjava</pElem>
             <pElem>../../jdk/src/java.base/unix/native/libjava</pElem>
             <pElem>../../jdk/src/java.base/share/native/libjava</pElem>
@@ -41783,7 +41783,7 @@
             <pElem>../../jdk/src/java.desktop/share/native/libsplashscreen</pElem>
             <pElem>../../jdk/src/java.desktop/share/native/libsplashscreen/libpng</pElem>
             <pElem>../../jdk/src/java.desktop/unix/native/libsplashscreen</pElem>
-            <pElem>../../jdk/src/java.base/share/native/libzip/zlib-1.2.8</pElem>
+            <pElem>../../jdk/src/java.base/share/native/libzip/zlib</pElem>
             <pElem>../../jdk/src/java.base/linux/native/libjava</pElem>
             <pElem>../../jdk/src/java.base/unix/native/libjava</pElem>
             <pElem>../../jdk/src/java.base/share/native/libjava</pElem>
@@ -41812,7 +41812,7 @@
             <pElem>../../jdk/src/java.desktop/share/native/libsplashscreen</pElem>
             <pElem>../../jdk/src/java.desktop/share/native/libsplashscreen/libpng</pElem>
             <pElem>../../jdk/src/java.desktop/unix/native/libsplashscreen</pElem>
-            <pElem>../../jdk/src/java.base/share/native/libzip/zlib-1.2.8</pElem>
+            <pElem>../../jdk/src/java.base/share/native/libzip/zlib</pElem>
             <pElem>../../jdk/src/java.base/linux/native/libjava</pElem>
             <pElem>../../jdk/src/java.base/unix/native/libjava</pElem>
             <pElem>../../jdk/src/java.base/share/native/libjava</pElem>
@@ -41841,7 +41841,7 @@
             <pElem>../../jdk/src/java.desktop/share/native/libsplashscreen</pElem>
             <pElem>../../jdk/src/java.desktop/share/native/libsplashscreen/libpng</pElem>
             <pElem>../../jdk/src/java.desktop/unix/native/libsplashscreen</pElem>
-            <pElem>../../jdk/src/java.base/share/native/libzip/zlib-1.2.8</pElem>
+            <pElem>../../jdk/src/java.base/share/native/libzip/zlib</pElem>
             <pElem>../../jdk/src/java.base/linux/native/libjava</pElem>
             <pElem>../../jdk/src/java.base/unix/native/libjava</pElem>
             <pElem>../../jdk/src/java.base/share/native/libjava</pElem>
@@ -41870,7 +41870,7 @@
             <pElem>../../jdk/src/java.desktop/share/native/libsplashscreen</pElem>
             <pElem>../../jdk/src/java.desktop/share/native/libsplashscreen/libpng</pElem>
             <pElem>../../jdk/src/java.desktop/unix/native/libsplashscreen</pElem>
-            <pElem>../../jdk/src/java.base/share/native/libzip/zlib-1.2.8</pElem>
+            <pElem>../../jdk/src/java.base/share/native/libzip/zlib</pElem>
             <pElem>../../jdk/src/java.base/linux/native/libjava</pElem>
             <pElem>../../jdk/src/java.base/unix/native/libjava</pElem>
             <pElem>../../jdk/src/java.base/share/native/libjava</pElem>
@@ -41899,7 +41899,7 @@
             <pElem>../../jdk/src/java.desktop/share/native/libsplashscreen</pElem>
             <pElem>../../jdk/src/java.desktop/share/native/libsplashscreen/libpng</pElem>
             <pElem>../../jdk/src/java.desktop/unix/native/libsplashscreen</pElem>
-            <pElem>../../jdk/src/java.base/share/native/libzip/zlib-1.2.8</pElem>
+            <pElem>../../jdk/src/java.base/share/native/libzip/zlib</pElem>
             <pElem>../../jdk/src/java.base/linux/native/libjava</pElem>
             <pElem>../../jdk/src/java.base/unix/native/libjava</pElem>
             <pElem>../../jdk/src/java.base/share/native/libjava</pElem>
@@ -41928,7 +41928,7 @@
             <pElem>../../jdk/src/java.desktop/share/native/libsplashscreen</pElem>
             <pElem>../../jdk/src/java.desktop/share/native/libsplashscreen/libpng</pElem>
             <pElem>../../jdk/src/java.desktop/unix/native/libsplashscreen</pElem>
-            <pElem>../../jdk/src/java.base/share/native/libzip/zlib-1.2.8</pElem>
+            <pElem>../../jdk/src/java.base/share/native/libzip/zlib</pElem>
             <pElem>../../jdk/src/java.base/linux/native/libjava</pElem>
             <pElem>../../jdk/src/java.base/unix/native/libjava</pElem>
             <pElem>../../jdk/src/java.base/share/native/libjava</pElem>
@@ -41957,7 +41957,7 @@
             <pElem>../../jdk/src/java.desktop/share/native/libsplashscreen</pElem>
             <pElem>../../jdk/src/java.desktop/share/native/libsplashscreen/libpng</pElem>
             <pElem>../../jdk/src/java.desktop/unix/native/libsplashscreen</pElem>
-            <pElem>../../jdk/src/java.base/share/native/libzip/zlib-1.2.8</pElem>
+            <pElem>../../jdk/src/java.base/share/native/libzip/zlib</pElem>
             <pElem>../../jdk/src/java.base/linux/native/libjava</pElem>
             <pElem>../../jdk/src/java.base/unix/native/libjava</pElem>
             <pElem>../../jdk/src/java.base/share/native/libjava</pElem>
@@ -41986,7 +41986,7 @@
             <pElem>../../jdk/src/java.desktop/share/native/libsplashscreen</pElem>
             <pElem>../../jdk/src/java.desktop/share/native/libsplashscreen/libpng</pElem>
             <pElem>../../jdk/src/java.desktop/unix/native/libsplashscreen</pElem>
-            <pElem>../../jdk/src/java.base/share/native/libzip/zlib-1.2.8</pElem>
+            <pElem>../../jdk/src/java.base/share/native/libzip/zlib</pElem>
             <pElem>../../jdk/src/java.base/linux/native/libjava</pElem>
             <pElem>../../jdk/src/java.base/unix/native/libjava</pElem>
             <pElem>../../jdk/src/java.base/share/native/libjava</pElem>
@@ -42015,7 +42015,7 @@
             <pElem>../../jdk/src/java.desktop/share/native/libsplashscreen</pElem>
             <pElem>../../jdk/src/java.desktop/share/native/libsplashscreen/libpng</pElem>
             <pElem>../../jdk/src/java.desktop/unix/native/libsplashscreen</pElem>
-            <pElem>../../jdk/src/java.base/share/native/libzip/zlib-1.2.8</pElem>
+            <pElem>../../jdk/src/java.base/share/native/libzip/zlib</pElem>
             <pElem>../../jdk/src/java.base/linux/native/libjava</pElem>
             <pElem>../../jdk/src/java.base/unix/native/libjava</pElem>
             <pElem>../../jdk/src/java.base/share/native/libjava</pElem>
@@ -42044,7 +42044,7 @@
             <pElem>../../jdk/src/java.desktop/share/native/libsplashscreen</pElem>
             <pElem>../../jdk/src/java.desktop/share/native/libsplashscreen/libpng</pElem>
             <pElem>../../jdk/src/java.desktop/unix/native/libsplashscreen</pElem>
-            <pElem>../../jdk/src/java.base/share/native/libzip/zlib-1.2.8</pElem>
+            <pElem>../../jdk/src/java.base/share/native/libzip/zlib</pElem>
             <pElem>../../jdk/src/java.base/linux/native/libjava</pElem>
             <pElem>../../jdk/src/java.base/unix/native/libjava</pElem>
             <pElem>../../jdk/src/java.base/share/native/libjava</pElem>
@@ -42073,7 +42073,7 @@
             <pElem>../../jdk/src/java.desktop/share/native/libsplashscreen</pElem>
             <pElem>../../jdk/src/java.desktop/share/native/libsplashscreen/libpng</pElem>
             <pElem>../../jdk/src/java.desktop/unix/native/libsplashscreen</pElem>
-            <pElem>../../jdk/src/java.base/share/native/libzip/zlib-1.2.8</pElem>
+            <pElem>../../jdk/src/java.base/share/native/libzip/zlib</pElem>
             <pElem>../../jdk/src/java.base/linux/native/libjava</pElem>
             <pElem>../../jdk/src/java.base/unix/native/libjava</pElem>
             <pElem>../../jdk/src/java.base/share/native/libjava</pElem>
@@ -42102,7 +42102,7 @@
             <pElem>../../jdk/src/java.desktop/share/native/libsplashscreen</pElem>
             <pElem>../../jdk/src/java.desktop/share/native/libsplashscreen/libpng</pElem>
             <pElem>../../jdk/src/java.desktop/unix/native/libsplashscreen</pElem>
-            <pElem>../../jdk/src/java.base/share/native/libzip/zlib-1.2.8</pElem>
+            <pElem>../../jdk/src/java.base/share/native/libzip/zlib</pElem>
             <pElem>../../jdk/src/java.base/linux/native/libjava</pElem>
             <pElem>../../jdk/src/java.base/unix/native/libjava</pElem>
             <pElem>../../jdk/src/java.base/share/native/libjava</pElem>
@@ -42131,7 +42131,7 @@
             <pElem>../../jdk/src/java.desktop/share/native/libsplashscreen</pElem>
             <pElem>../../jdk/src/java.desktop/share/native/libsplashscreen/libpng</pElem>
             <pElem>../../jdk/src/java.desktop/unix/native/libsplashscreen</pElem>
-            <pElem>../../jdk/src/java.base/share/native/libzip/zlib-1.2.8</pElem>
+            <pElem>../../jdk/src/java.base/share/native/libzip/zlib</pElem>
             <pElem>../../jdk/src/java.base/linux/native/libjava</pElem>
             <pElem>../../jdk/src/java.base/unix/native/libjava</pElem>
             <pElem>../../jdk/src/java.base/share/native/libjava</pElem>
@@ -42160,7 +42160,7 @@
             <pElem>../../jdk/src/java.desktop/share/native/libsplashscreen</pElem>
             <pElem>../../jdk/src/java.desktop/share/native/libsplashscreen/libpng</pElem>
             <pElem>../../jdk/src/java.desktop/unix/native/libsplashscreen</pElem>
-            <pElem>../../jdk/src/java.base/share/native/libzip/zlib-1.2.8</pElem>
+            <pElem>../../jdk/src/java.base/share/native/libzip/zlib</pElem>
             <pElem>../../jdk/src/java.base/linux/native/libjava</pElem>
             <pElem>../../jdk/src/java.base/unix/native/libjava</pElem>
             <pElem>../../jdk/src/java.base/share/native/libjava</pElem>
@@ -42189,7 +42189,7 @@
             <pElem>../../jdk/src/java.desktop/share/native/libsplashscreen</pElem>
             <pElem>../../jdk/src/java.desktop/share/native/libsplashscreen/libpng</pElem>
             <pElem>../../jdk/src/java.desktop/unix/native/libsplashscreen</pElem>
-            <pElem>../../jdk/src/java.base/share/native/libzip/zlib-1.2.8</pElem>
+            <pElem>../../jdk/src/java.base/share/native/libzip/zlib</pElem>
             <pElem>../../jdk/src/java.base/linux/native/libjava</pElem>
             <pElem>../../jdk/src/java.base/unix/native/libjava</pElem>
             <pElem>../../jdk/src/java.base/share/native/libjava</pElem>
@@ -42218,7 +42218,7 @@
             <pElem>../../jdk/src/java.desktop/share/native/libsplashscreen</pElem>
             <pElem>../../jdk/src/java.desktop/share/native/libsplashscreen/libpng</pElem>
             <pElem>../../jdk/src/java.desktop/unix/native/libsplashscreen</pElem>
-            <pElem>../../jdk/src/java.base/share/native/libzip/zlib-1.2.8</pElem>
+            <pElem>../../jdk/src/java.base/share/native/libzip/zlib</pElem>
             <pElem>../../jdk/src/java.base/linux/native/libjava</pElem>
             <pElem>../../jdk/src/java.base/unix/native/libjava</pElem>
             <pElem>../../jdk/src/java.base/share/native/libjava</pElem>
@@ -42247,7 +42247,7 @@
             <pElem>../../jdk/src/java.desktop/share/native/libsplashscreen</pElem>
             <pElem>../../jdk/src/java.desktop/share/native/libsplashscreen/libpng</pElem>
             <pElem>../../jdk/src/java.desktop/unix/native/libsplashscreen</pElem>
-            <pElem>../../jdk/src/java.base/share/native/libzip/zlib-1.2.8</pElem>
+            <pElem>../../jdk/src/java.base/share/native/libzip/zlib</pElem>
             <pElem>../../jdk/src/java.base/linux/native/libjava</pElem>
             <pElem>../../jdk/src/java.base/unix/native/libjava</pElem>
             <pElem>../../jdk/src/java.base/share/native/libjava</pElem>
@@ -42276,7 +42276,7 @@
             <pElem>../../jdk/src/java.desktop/share/native/libsplashscreen</pElem>
             <pElem>../../jdk/src/java.desktop/share/native/libsplashscreen/libpng</pElem>
             <pElem>../../jdk/src/java.desktop/unix/native/libsplashscreen</pElem>
-            <pElem>../../jdk/src/java.base/share/native/libzip/zlib-1.2.8</pElem>
+            <pElem>../../jdk/src/java.base/share/native/libzip/zlib</pElem>
             <pElem>../../jdk/src/java.base/linux/native/libjava</pElem>
             <pElem>../../jdk/src/java.base/unix/native/libjava</pElem>
             <pElem>../../jdk/src/java.base/share/native/libjava</pElem>
@@ -42305,7 +42305,7 @@
             <pElem>../../jdk/src/java.desktop/share/native/libsplashscreen</pElem>
             <pElem>../../jdk/src/java.desktop/share/native/libsplashscreen/libpng</pElem>
             <pElem>../../jdk/src/java.desktop/unix/native/libsplashscreen</pElem>
-            <pElem>../../jdk/src/java.base/share/native/libzip/zlib-1.2.8</pElem>
+            <pElem>../../jdk/src/java.base/share/native/libzip/zlib</pElem>
             <pElem>../../jdk/src/java.base/linux/native/libjava</pElem>
             <pElem>../../jdk/src/java.base/unix/native/libjava</pElem>
             <pElem>../../jdk/src/java.base/share/native/libjava</pElem>
@@ -42334,7 +42334,7 @@
             <pElem>../../jdk/src/java.desktop/share/native/libsplashscreen</pElem>
             <pElem>../../jdk/src/java.desktop/share/native/libsplashscreen/libpng</pElem>
             <pElem>../../jdk/src/java.desktop/unix/native/libsplashscreen</pElem>
-            <pElem>../../jdk/src/java.base/share/native/libzip/zlib-1.2.8</pElem>
+            <pElem>../../jdk/src/java.base/share/native/libzip/zlib</pElem>
             <pElem>../../jdk/src/java.base/linux/native/libjava</pElem>
             <pElem>../../jdk/src/java.base/unix/native/libjava</pElem>
             <pElem>../../jdk/src/java.base/share/native/libjava</pElem>
@@ -42363,7 +42363,7 @@
             <pElem>../../jdk/src/java.desktop/share/native/libsplashscreen</pElem>
             <pElem>../../jdk/src/java.desktop/share/native/libsplashscreen/libpng</pElem>
             <pElem>../../jdk/src/java.desktop/unix/native/libsplashscreen</pElem>
-            <pElem>../../jdk/src/java.base/share/native/libzip/zlib-1.2.8</pElem>
+            <pElem>../../jdk/src/java.base/share/native/libzip/zlib</pElem>
             <pElem>../../jdk/src/java.base/linux/native/libjava</pElem>
             <pElem>../../jdk/src/java.base/unix/native/libjava</pElem>
             <pElem>../../jdk/src/java.base/share/native/libjava</pElem>
@@ -42413,7 +42413,7 @@
             <pElem>../../jdk/src/java.desktop/share/native/libsplashscreen</pElem>
             <pElem>../../jdk/src/java.desktop/share/native/libsplashscreen/libpng</pElem>
             <pElem>../../jdk/src/java.desktop/unix/native/libsplashscreen</pElem>
-            <pElem>../../jdk/src/java.base/share/native/libzip/zlib-1.2.8</pElem>
+            <pElem>../../jdk/src/java.base/share/native/libzip/zlib</pElem>
             <pElem>../../jdk/src/java.base/linux/native/libjava</pElem>
             <pElem>../../jdk/src/java.base/unix/native/libjava</pElem>
             <pElem>../../jdk/src/java.base/share/native/libjava</pElem>
@@ -42442,7 +42442,7 @@
             <pElem>../../jdk/src/java.desktop/share/native/libsplashscreen</pElem>
             <pElem>../../jdk/src/java.desktop/share/native/libsplashscreen/libpng</pElem>
             <pElem>../../jdk/src/java.desktop/unix/native/libsplashscreen</pElem>
-            <pElem>../../jdk/src/java.base/share/native/libzip/zlib-1.2.8</pElem>
+            <pElem>../../jdk/src/java.base/share/native/libzip/zlib</pElem>
             <pElem>../../jdk/src/java.base/linux/native/libjava</pElem>
             <pElem>../../jdk/src/java.base/unix/native/libjava</pElem>
             <pElem>../../jdk/src/java.base/share/native/libjava</pElem>
@@ -42471,7 +42471,7 @@
             <pElem>../../jdk/src/java.desktop/share/native/libsplashscreen</pElem>
             <pElem>../../jdk/src/java.desktop/share/native/libsplashscreen/libpng</pElem>
             <pElem>../../jdk/src/java.desktop/unix/native/libsplashscreen</pElem>
-            <pElem>../../jdk/src/java.base/share/native/libzip/zlib-1.2.8</pElem>
+            <pElem>../../jdk/src/java.base/share/native/libzip/zlib</pElem>
             <pElem>../../jdk/src/java.base/linux/native/libjava</pElem>
             <pElem>../../jdk/src/java.base/unix/native/libjava</pElem>
             <pElem>../../jdk/src/java.base/share/native/libjava</pElem>
@@ -46557,7 +46557,7 @@
             <pElem>../../jdk/src/java.base/unix/native/libjava</pElem>
             <pElem>../../jdk/src/java.base/unix/native/libjli</pElem>
             <pElem>../../jdk/src/java.base/share/native/libjli</pElem>
-            <pElem>../../jdk/src/java.base/share/native/libzip/zlib-1.2.8</pElem>
+            <pElem>../../jdk/src/java.base/share/native/libzip/zlib</pElem>
             <pElem>../../make</pElem>
           </incDir>
           <preprocessorList>
@@ -46639,15 +46639,15 @@
           </preprocessorList>
         </cTool>
       </folder>
-      <folder path="0/jdk/src/java.base/share/native/libzip/zlib-1.2.8">
-        <cTool>
-          <incDir>
-            <pElem>../../jdk/src/java.desktop/share/native/libsplashscreen/giflib</pElem>
-            <pElem>../../jdk/src/java.desktop/share/native/libjavajpeg</pElem>
-            <pElem>../../jdk/src/java.desktop/share/native/libsplashscreen</pElem>
-            <pElem>../../jdk/src/java.desktop/share/native/libsplashscreen/libpng</pElem>
-            <pElem>../../jdk/src/java.desktop/unix/native/libsplashscreen</pElem>
-            <pElem>../../jdk/src/java.base/share/native/libzip/zlib-1.2.8</pElem>
+      <folder path="0/jdk/src/java.base/share/native/libzip/zlib">
+        <cTool>
+          <incDir>
+            <pElem>../../jdk/src/java.desktop/share/native/libsplashscreen/giflib</pElem>
+            <pElem>../../jdk/src/java.desktop/share/native/libjavajpeg</pElem>
+            <pElem>../../jdk/src/java.desktop/share/native/libsplashscreen</pElem>
+            <pElem>../../jdk/src/java.desktop/share/native/libsplashscreen/libpng</pElem>
+            <pElem>../../jdk/src/java.desktop/unix/native/libsplashscreen</pElem>
+            <pElem>../../jdk/src/java.base/share/native/libzip/zlib</pElem>
             <pElem>../../jdk/src/java.base/linux/native/libjava</pElem>
             <pElem>../../jdk/src/java.base/unix/native/libjava</pElem>
             <pElem>../../jdk/src/java.base/share/native/libjava</pElem>
@@ -46712,7 +46712,7 @@
           <incDir>
             <pElem>../../jdk/src/java.base/unix/native/libjli</pElem>
             <pElem>../../jdk/src/java.base/share/native/libjli</pElem>
-            <pElem>../../jdk/src/java.base/share/native/libzip/zlib-1.2.8</pElem>
+            <pElem>../../jdk/src/java.base/share/native/libzip/zlib</pElem>
             <pElem>../../make</pElem>
           </incDir>
           <preprocessorList>
@@ -47250,7 +47250,7 @@
             <pElem>../../jdk/src/java.desktop/share/native/libsplashscreen</pElem>
             <pElem>../../jdk/src/java.desktop/share/native/libsplashscreen/libpng</pElem>
             <pElem>../../jdk/src/java.desktop/unix/native/libsplashscreen</pElem>
-            <pElem>../../jdk/src/java.base/share/native/libzip/zlib-1.2.8</pElem>
+            <pElem>../../jdk/src/java.base/share/native/libzip/zlib</pElem>
             <pElem>../../jdk/src/java.base/linux/native/libjava</pElem>
             <pElem>../../jdk/src/java.base/unix/native/libjava</pElem>
             <pElem>../../jdk/src/java.base/share/native/libjava</pElem>
@@ -47598,7 +47598,7 @@
             <pElem>../../jdk/src/java.desktop/share/native/libsplashscreen</pElem>
             <pElem>../../jdk/src/java.desktop/share/native/libsplashscreen/libpng</pElem>
             <pElem>../../jdk/src/java.desktop/unix/native/libsplashscreen</pElem>
-            <pElem>../../jdk/src/java.base/share/native/libzip/zlib-1.2.8</pElem>
+            <pElem>../../jdk/src/java.base/share/native/libzip/zlib</pElem>
             <pElem>../../jdk/src/java.base/linux/native/libjava</pElem>
             <pElem>../../jdk/src/java.base/unix/native/libjava</pElem>
             <pElem>../../jdk/src/java.base/share/native/libjava</pElem>
@@ -47996,7 +47996,7 @@
             <pElem>../../jdk/src/jdk.pack/share/native/common-unpack</pElem>
             <pElem>../../jdk/src/java.base/share/native/libjava</pElem>
             <pElem>../../jdk/src/java.base/unix/native/libjava</pElem>
-            <pElem>../../jdk/src/java.base/share/native/libzip/zlib-1.2.8</pElem>
+            <pElem>../../jdk/src/java.base/share/native/libzip/zlib</pElem>
             <pElem>../../jdk/src/java.base/share/native/include</pElem>
             <pElem>../../jdk/src/java.base/linux/native/include</pElem>
             <pElem>../../jdk/src/java.base/unix/native/include</pElem>
--- a/corba/.hgtags	Fri Feb 24 19:48:33 2017 +0100
+++ b/corba/.hgtags	Wed Jul 05 22:55:57 2017 +0200
@@ -398,3 +398,5 @@
 68a8e8658511093b322a46ed04b2a321e1da2a43 jdk-9+153
 078ebe23b584466dc8346e620d7821d91751e5a9 jdk-9+154
 a545f54babfa31aa7eb611f36031609acd617cbc jdk-9+155
+907c26240cd481579e919bfd23740797ff8ce1c8 jdk-9+156
+9383da04b385cca46b7ca67f3a39ac1b673e09fe jdk-9+157
--- a/corba/src/java.corba/share/classes/module-info.java	Fri Feb 24 19:48:33 2017 +0100
+++ b/corba/src/java.corba/share/classes/module-info.java	Wed Jul 05 22:55:57 2017 +0200
@@ -25,6 +25,8 @@
 
 /**
  * Defines the Java binding of the OMG CORBA APIs, and the RMI-IIOP API.
+ *
+ * @since 9
  */
 @Deprecated(since="9", forRemoval=true)
 module java.corba {
--- a/corba/src/java.corba/share/classes/org/omg/CORBA/ORB.java	Fri Feb 24 19:48:33 2017 +0100
+++ b/corba/src/java.corba/share/classes/org/omg/CORBA/ORB.java	Wed Jul 05 22:55:57 2017 +0200
@@ -106,13 +106,13 @@
  *
  *     <LI>check in properties parameter, if any
  *
- *     <LI>check in the System properties
+ *     <LI>check in the System properties, if any
  *
  *     <LI>check in the orb.properties file located in the user.home
- *         directory (if any)
+ *         directory, if any
  *
- *     <LI>check in the orb.properties file located in the java.home/lib
- *         directory (if any)
+ *     <LI>check in the orb.properties file located in the run-time image,
+ *         if any
  *
  *     <LI>fall back on a hardcoded default behavior (use the Java&nbsp;IDL
  *         implementation)
@@ -170,9 +170,15 @@
  * Thus, where appropriate, it is necessary that
  * the classes for this alternative ORBSingleton are available on the application's class path.
  * It should be noted that the singleton ORB is system wide.
- *
+ * <P>
  * When a per-application ORB is created via the 2-arg init methods,
  * then it will be located using the thread context class loader.
+ * <P>
+ * The IDL to Java Language OMG specification documents the ${java.home}/lib directory as the location,
+ * in the Java run-time image, to search for orb.properties.
+ * This location is not intended for user editable configuration files.
+ * Therefore, the implementation first checks the ${java.home}/conf directory for orb.properties,
+ * and thereafter the ${java.home}/lib directory.
  *
  * @since   JDK1.2
  */
@@ -271,14 +277,25 @@
                     }
 
                     String javaHome = System.getProperty("java.home");
-                    fileName = javaHome + File.separator
-                        + "lib" + File.separator + "orb.properties";
-                    props = getFileProperties( fileName ) ;
+
+                    fileName = javaHome + File.separator + "conf"
+                            + File.separator + "orb.properties";
+                    props = getFileProperties(fileName);
+
+                    if (props != null) {
+                        String value = props.getProperty(name);
+                        if (value != null)
+                            return value;
+                    }
+
+                    fileName = javaHome + File.separator + "lib"
+                            + File.separator + "orb.properties";
+                    props = getFileProperties(fileName);
 
                     if (props == null)
-                        return null ;
+                        return null;
                     else
-                        return props.getProperty( name ) ;
+                        return props.getProperty(name);
                 }
             }
         );
--- a/jaxp/.hgtags	Fri Feb 24 19:48:33 2017 +0100
+++ b/jaxp/.hgtags	Wed Jul 05 22:55:57 2017 +0200
@@ -398,3 +398,5 @@
 1384504d2cd0e55c5e0becaeaf40ab05cae959d6 jdk-9+153
 7fa738305436d14c0926df0f04892890cacc766b jdk-9+154
 48fa77af153288b08ba794e1616a7b0685f3b67e jdk-9+155
+e930c373aaa4e0e712c9a25ba4b03d473b48c294 jdk-9+156
+412df235a8a229469a2cb9e7bb274d43277077d2 jdk-9+157
--- a/jaxp/src/java.xml/share/classes/com/sun/org/apache/xalan/internal/xsltc/trax/TemplatesImpl.java	Fri Feb 24 19:48:33 2017 +0100
+++ b/jaxp/src/java.xml/share/classes/com/sun/org/apache/xalan/internal/xsltc/trax/TemplatesImpl.java	Wed Jul 05 22:55:57 2017 +0200
@@ -438,7 +438,7 @@
         Layer bootLayer = Layer.boot();
 
         Configuration cf = bootLayer.configuration()
-                .resolveRequires(finder, ModuleFinder.of(), Set.of(mn));
+                .resolve(finder, ModuleFinder.of(), Set.of(mn));
 
         PrivilegedAction<Layer> pa = () -> bootLayer.defineModules(cf, name -> loader);
         Layer layer = AccessController.doPrivileged(pa);
@@ -483,10 +483,11 @@
             String pn = _tfactory.getPackageName();
             assert pn != null && pn.length() > 0;
 
-            ModuleDescriptor descriptor = ModuleDescriptor.module(mn)
-                    .requires("java.xml")
-                    .exports(pn)
-                    .build();
+            ModuleDescriptor descriptor =
+                ModuleDescriptor.newModule(mn, Set.of(ModuleDescriptor.Modifier.SYNTHETIC))
+                                .requires("java.xml")
+                                .exports(pn)
+                                .build();
 
             Module m = createModule(descriptor, loader);
 
--- a/jaxp/src/java.xml/share/classes/com/sun/org/apache/xerces/internal/impl/XMLDocumentScannerImpl.java	Fri Feb 24 19:48:33 2017 +0100
+++ b/jaxp/src/java.xml/share/classes/com/sun/org/apache/xerces/internal/impl/XMLDocumentScannerImpl.java	Wed Jul 05 22:55:57 2017 +0200
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2003, 2016, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2003, 2017, Oracle and/or its affiliates. All rights reserved.
  */
 
 /*
@@ -743,7 +743,7 @@
             // scan XMLDecl
             try {
                 if (fEntityScanner.skipString(XMLDECL)) {
-                    if (fEntityScanner.peekChar() == ' ') {
+                    if (XMLChar.isSpace(fEntityScanner.peekChar())) {
                         fMarkupDepth++;
                         scanXMLDeclOrTextDecl(false);
                     } else {
--- a/jaxp/src/java.xml/share/classes/com/sun/org/apache/xerces/internal/parsers/XML11Configuration.java	Fri Feb 24 19:48:33 2017 +0100
+++ b/jaxp/src/java.xml/share/classes/com/sun/org/apache/xerces/internal/parsers/XML11Configuration.java	Wed Jul 05 22:55:57 2017 +0200
@@ -415,9 +415,15 @@
     /** Current DTD scanner. */
     protected XMLDTDScanner fCurrentDTDScanner;
 
-    /** Flag indiciating whether XML11 components have been initialized. */
+    /** Flag indicating whether XML11 components have been initialized. */
     private boolean f11Initialized = false;
 
+    /** Flag indicating whether the symbol table instance was specified during construction **/
+    private boolean fSymbolTableProvided = false;
+
+    /** Flag indicating if the symbol table was initialized and never used before that **/
+    private boolean fSymbolTableJustInitialized = true;
+
     //
     // Constructors
     //
@@ -566,15 +572,18 @@
         };
         addRecognizedProperties(recognizedProperties);
 
-        if (symbolTable == null) {
-                symbolTable = new SymbolTable();
+        // Remember if symbolTable was provided from outside
+        fSymbolTableProvided = symbolTable != null;
+        if (!fSymbolTableProvided) {
+            fSymbolTable = new SymbolTable();
+        } else {
+            fSymbolTable = symbolTable;
         }
-        fSymbolTable = symbolTable;
         fProperties.put(SYMBOL_TABLE, fSymbolTable);
 
         fGrammarPool = grammarPool;
         if (fGrammarPool != null) {
-                        fProperties.put(XMLGRAMMAR_POOL, fGrammarPool);
+            fProperties.put(XMLGRAMMAR_POOL, fGrammarPool);
         }
 
         fEntityManager = new XMLEntityManager();
@@ -840,6 +849,7 @@
                 fValidationManager.reset();
                 fVersionDetector.reset(this);
                 fConfigUpdated = true;
+                resetSymbolTable();
                 resetCommon();
 
                 short version = fVersionDetector.determineDocVersion(fInputSource);
@@ -858,15 +868,7 @@
                 // resets and sets the pipeline.
                 fVersionDetector.startDocumentParsing((XMLEntityHandler) fCurrentScanner, version);
                 fInputSource = null;
-            } catch (XNIException ex) {
-                if (PRINT_EXCEPTION_STACK_TRACE)
-                    ex.printStackTrace();
-                throw ex;
-            } catch (IOException ex) {
-                if (PRINT_EXCEPTION_STACK_TRACE)
-                    ex.printStackTrace();
-                throw ex;
-            } catch (RuntimeException ex) {
+            } catch (IOException | RuntimeException ex) {
                 if (PRINT_EXCEPTION_STACK_TRACE)
                     ex.printStackTrace();
                 throw ex;
@@ -879,15 +881,7 @@
 
         try {
             return fCurrentScanner.scanDocument(complete);
-        } catch (XNIException ex) {
-            if (PRINT_EXCEPTION_STACK_TRACE)
-                ex.printStackTrace();
-            throw ex;
-        } catch (IOException ex) {
-            if (PRINT_EXCEPTION_STACK_TRACE)
-                ex.printStackTrace();
-            throw ex;
-        } catch (RuntimeException ex) {
+        } catch (IOException | RuntimeException ex) {
             if (PRINT_EXCEPTION_STACK_TRACE)
                 ex.printStackTrace();
             throw ex;
@@ -1589,6 +1583,23 @@
         }
     }
 
+
+    /**
+     * Reset the symbol table if it wasn't provided during construction
+     * and its not the first time when parse is called after initialization
+     */
+    private void resetSymbolTable() {
+        if (!fSymbolTableProvided) {
+            if (fSymbolTableJustInitialized) {
+                // Skip symbol table reallocation for the first parsing process
+                fSymbolTableJustInitialized = false;
+            } else {
+                fSymbolTable = new SymbolTable();
+                fProperties.put(SYMBOL_TABLE, fSymbolTable);
+            }
+        }
+    }
+
     /**
      * Returns the state of a feature. This method calls getFeature()
      * on ParserConfigurationSettings, bypassing getFeature() on this
--- a/jaxp/src/java.xml/share/classes/com/sun/org/apache/xml/internal/serializer/ToHTMLStream.java	Fri Feb 24 19:48:33 2017 +0100
+++ b/jaxp/src/java.xml/share/classes/com/sun/org/apache/xml/internal/serializer/ToHTMLStream.java	Wed Jul 05 22:55:57 2017 +0200
@@ -717,7 +717,9 @@
      */
     public final void endDocument() throws org.xml.sax.SAXException
     {
-        flushCharactersBuffer();
+        if (m_doIndent) {
+            flushCharactersBuffer();
+        }
         flushPending();
         if (m_doIndent && !m_isprevtext)
         {
@@ -776,9 +778,11 @@
         Attributes atts)
         throws SAXException
     {
-        // will add extra one if having namespace but no matter
-        m_childNodeNum++;
-        flushCharactersBuffer();
+        if (m_doIndent) {
+            // will add extra one if having namespace but no matter
+            m_childNodeNum++;
+            flushCharactersBuffer();
+        }
         ElemContext elemContext = m_elemContext;
 
         // clean up any pending things first
@@ -839,8 +843,10 @@
             writer.write('<');
             writer.write(name);
 
-            m_childNodeNumStack.push(m_childNodeNum);
-            m_childNodeNum = 0;
+            if (m_doIndent) {
+                m_childNodeNumStack.add(m_childNodeNum);
+                m_childNodeNum = 0;
+            }
 
             if (m_tracer != null)
                 firePseudoAttributes();
@@ -915,7 +921,9 @@
         final String name)
         throws org.xml.sax.SAXException
     {
-        flushCharactersBuffer();
+        if (m_doIndent) {
+            flushCharactersBuffer();
+        }
         // deal with any pending issues
         if (m_cdataTagOpen)
             closeCDATA();
@@ -997,12 +1005,11 @@
                 }
             }
 
-            m_childNodeNum = m_childNodeNumStack.pop();
-            // clean up because the element has ended
-            if ((elemFlags & ElemDesc.WHITESPACESENSITIVE) != 0)
-                m_ispreserve = true;
-            m_isprevtext = false;
-
+            if (m_doIndent) {
+                m_childNodeNum = m_childNodeNumStack.remove(m_childNodeNumStack.size() - 1);
+                // clean up because the element has ended
+                m_isprevtext = false;
+            }
             // fire off the end element event
             if (m_tracer != null)
                 super.fireEndElem(name);
@@ -1018,11 +1025,6 @@
             }
 
             // some more clean because the element has ended.
-            if (!elemContext.m_startTagOpen)
-            {
-                if (m_doIndent && !m_preserves.isEmpty())
-                    m_preserves.pop();
-            }
             m_elemContext = elemContext.m_prev;
 //            m_isRawStack.pop();
         }
@@ -1525,7 +1527,6 @@
                     closeStartTag();
                     m_elemContext.m_startTagOpen = false;
                 }
-                m_ispreserve = true;
 
 //              With m_ispreserve just set true it looks like shouldIndent()
 //              will always return false, so drop any possible indentation.
@@ -1602,8 +1603,6 @@
                     m_elemContext.m_startTagOpen = false;
                 }
 
-                m_ispreserve = true;
-
                 if (shouldIndent())
                     indent();
 
@@ -1640,8 +1639,10 @@
     public void processingInstruction(String target, String data)
         throws org.xml.sax.SAXException
     {
-        m_childNodeNum++;
-        flushCharactersBuffer();
+        if (m_doIndent) {
+            m_childNodeNum++;
+            flushCharactersBuffer();
+        }
         // Process any pending starDocument and startElement first.
         flushPending();
 
@@ -1790,11 +1791,6 @@
              */
             if (m_StringOfCDATASections != null)
                 m_elemContext.m_isCdataSection = isCdataSection();
-            if (m_doIndent)
-            {
-                m_isprevtext = false;
-                m_preserves.push(m_ispreserve);
-            }
 
             }
             catch(IOException e)
--- a/jaxp/src/java.xml/share/classes/com/sun/org/apache/xml/internal/serializer/ToStream.java	Fri Feb 24 19:48:33 2017 +0100
+++ b/jaxp/src/java.xml/share/classes/com/sun/org/apache/xml/internal/serializer/ToStream.java	Wed Jul 05 22:55:57 2017 +0200
@@ -20,34 +20,36 @@
 
 package com.sun.org.apache.xml.internal.serializer;
 
-import com.sun.org.apache.xalan.internal.utils.SecuritySupport;
-import com.sun.org.apache.xml.internal.serializer.utils.MsgKey;
-import com.sun.org.apache.xml.internal.serializer.utils.Utils;
-import com.sun.org.apache.xml.internal.serializer.utils.WrappedRuntimeException;
 import java.io.IOException;
 import java.io.OutputStream;
 import java.io.OutputStreamWriter;
 import java.io.UnsupportedEncodingException;
 import java.io.Writer;
-import java.util.ArrayDeque;
 import java.util.ArrayList;
 import java.util.Arrays;
-import java.util.Deque;
 import java.util.EmptyStackException;
 import java.util.Enumeration;
+import java.util.Iterator;
+import java.util.List;
 import java.util.Properties;
-import java.util.Queue;
 import java.util.Set;
 import java.util.StringTokenizer;
+
 import javax.xml.transform.ErrorListener;
 import javax.xml.transform.OutputKeys;
 import javax.xml.transform.Transformer;
 import javax.xml.transform.TransformerException;
+
 import org.w3c.dom.Node;
 import org.xml.sax.Attributes;
 import org.xml.sax.ContentHandler;
 import org.xml.sax.SAXException;
 
+import com.sun.org.apache.xalan.internal.utils.SecuritySupport;
+import com.sun.org.apache.xml.internal.serializer.utils.MsgKey;
+import com.sun.org.apache.xml.internal.serializer.utils.Utils;
+import com.sun.org.apache.xml.internal.serializer.utils.WrappedRuntimeException;
+
 /**
  * This abstract class is a base class for other stream
  * serializers (xml, html, text ...) that write output to a stream.
@@ -103,7 +105,7 @@
      * If m_childNodeNum > 1, the text node will be indented.
      *
      */
-    protected Deque<Integer> m_childNodeNumStack = new ArrayDeque<>();
+    protected List<Integer> m_childNodeNumStack = new ArrayList<>();
 
     protected int m_childNodeNum = 0;
 
@@ -115,26 +117,6 @@
 
     protected boolean m_ispreserveSpace = false;
 
-    /**
-     * Stack to keep track of whether or not we need to
-     * preserve whitespace.
-     *
-     * Used to push/pop values used for the field m_ispreserve, but
-     * m_ispreserve is only relevant if m_doIndent is true.
-     * If m_doIndent is false this field has no impact.
-     *
-     */
-    protected BoolStack m_preserves = new BoolStack();
-
-    /**
-     * State flag to tell if preservation of whitespace
-     * is important.
-     *
-     * Used only in shouldIndent() but only if m_doIndent is true.
-     * If m_doIndent is false this flag has no impact.
-     *
-     */
-    protected boolean m_ispreserve = false;
 
     /**
      * State flag that tells if the previous node processed
@@ -1267,7 +1249,6 @@
                 closeStartTag();
                 m_elemContext.m_startTagOpen = false;
             }
-            m_ispreserve = true;
 
             if (shouldIndent())
                 indent();
@@ -1357,8 +1338,6 @@
                 m_elemContext.m_startTagOpen = false;
             }
 
-            m_ispreserve = true;
-
             m_writer.write(ch, start, length);
         }
         catch (IOException e)
@@ -1405,8 +1384,8 @@
         if (length == 0 || (isInEntityRef()))
             return;
 
-        final boolean shouldFormat = shouldFormatOutput();
-        if (m_elemContext.m_startTagOpen && !shouldFormat)
+        final boolean shouldNotFormat = !shouldFormatOutput();
+        if (m_elemContext.m_startTagOpen)
         {
             closeStartTag();
             m_elemContext.m_startTagOpen = false;
@@ -1432,8 +1411,12 @@
 
         if (m_disableOutputEscapingStates.peekOrFalse() || (!m_escaping))
         {
-            charactersRaw(chars, start, length);
-            m_isprevtext = true;
+            if (shouldNotFormat) {
+                charactersRaw(chars, start, length);
+                m_isprevtext = true;
+            } else {
+                m_charactersBuffer.addRawText(chars, start, length);
+            }
             // time to fire off characters generation event
             if (m_tracer != null)
                 super.fireCharEvent(chars, start, length);
@@ -1441,16 +1424,16 @@
             return;
         }
 
-        if (m_elemContext.m_startTagOpen && !shouldFormat)
+        if (m_elemContext.m_startTagOpen)
         {
             closeStartTag();
             m_elemContext.m_startTagOpen = false;
         }
 
-        if (shouldFormat) {
+        if (shouldNotFormat) {
+            outputCharacters(chars, start, length);
+        } else {
             m_charactersBuffer.addText(chars, start, length);
-        } else {
-            outputCharacters(chars, start, length);
         }
 
         // time to fire off characters generation event
@@ -1465,7 +1448,14 @@
      * @return True if the content should be formatted.
      */
     protected boolean shouldFormatOutput() {
-        return !m_ispreserveSpace && m_doIndent;
+        return m_doIndent && !m_ispreserveSpace;
+    }
+
+    /**
+     * @return True if the content in current element should be formatted.
+     */
+    public boolean getIndent() {
+        return shouldFormatOutput();
     }
 
     /**
@@ -1506,12 +1496,6 @@
                     i = lastDirty;
                 }
             }
-            /* If there is some non-whitespace, mark that we may need
-             * to preserve this. This is only important if we have indentation on.
-             */
-            if (i < end)
-                m_ispreserve = true;
-
 
 //          int lengthClean;    // number of clean characters in a row
 //          final boolean[] isAsciiClean = m_charInfo.getASCIIClean();
@@ -1577,12 +1561,7 @@
      */
     final protected void flushCharactersBuffer() throws SAXException {
         try {
-            if (shouldFormatOutput() && m_charactersBuffer.hasContent()) {
-                if (m_elemContext.m_startTagOpen) {
-                    closeStartTag();
-                    m_elemContext.m_startTagOpen = false;
-                }
-
+            if (shouldFormatOutput() && m_charactersBuffer.isAnyCharactersBuffered()) {
                 if (m_elemContext.m_isCdataSection) {
                     /*
                      * due to cdata-section-elements atribute, we need this as
@@ -1594,11 +1573,16 @@
                 }
 
                 m_childNodeNum++;
+                boolean skipBeginningNewlines = false;
                 if (shouldIndentForText()) {
                     indent();
                     m_startNewLine = true;
+                    // newline has always been added here because if this is the
+                    // text before the first element, shouldIndent() won't
+                    // return true.
+                    skipBeginningNewlines = true;
                 }
-                m_charactersBuffer.flush();
+                m_charactersBuffer.flush(skipBeginningNewlines);
             }
         } catch (IOException e) {
             throw new SAXException(e);
@@ -1858,8 +1842,10 @@
         if (isInEntityRef())
             return;
 
-        m_childNodeNum++;
-        flushCharactersBuffer();
+        if (m_doIndent) {
+            m_childNodeNum++;
+            flushCharactersBuffer();
+        }
 
         if (m_needToCallStartDocument)
         {
@@ -1890,8 +1876,6 @@
             if (namespaceURI != null)
                 ensurePrefixIsDeclared(namespaceURI, name);
 
-            m_ispreserve = false;
-
             if (shouldIndent() && m_startNewLine)
             {
                 indent();
@@ -1912,11 +1896,13 @@
         if (atts != null)
             addAttributes(atts);
 
-        m_ispreserveSpace = m_preserveSpaces.peekOrFalse();
-        m_preserveSpaces.push(m_ispreserveSpace);
-
-        m_childNodeNumStack.push(m_childNodeNum);
-        m_childNodeNum = 0;
+        if (m_doIndent) {
+            m_ispreserveSpace = m_preserveSpaces.peekOrFalse();
+            m_preserveSpaces.push(m_ispreserveSpace);
+
+            m_childNodeNumStack.add(m_childNodeNum);
+            m_childNodeNum = 0;
+        }
 
         m_elemContext = m_elemContext.push(namespaceURI,localName,name);
         m_isprevtext = false;
@@ -2128,7 +2114,9 @@
         if (isInEntityRef())
             return;
 
-        flushCharactersBuffer();
+        if (m_doIndent) {
+            flushCharactersBuffer();
+        }
         // namespaces declared at the current depth are no longer valid
         // so get rid of them
         m_prefixMap.popNamespaces(m_elemContext.m_currentElemDepth, null);
@@ -2175,16 +2163,13 @@
             throw new SAXException(e);
         }
 
-        if (!m_elemContext.m_startTagOpen && m_doIndent)
-        {
-            m_ispreserve = m_preserves.isEmpty() ? false : m_preserves.pop();
+        if (m_doIndent) {
+            m_ispreserveSpace = m_preserveSpaces.popAndTop();
+            m_childNodeNum = m_childNodeNumStack.remove(m_childNodeNumStack.size() - 1);
+
+            m_isprevtext = false;
         }
 
-        m_ispreserveSpace = m_preserveSpaces.popAndTop();
-        m_childNodeNum = m_childNodeNumStack.pop();
-
-        m_isprevtext = false;
-
         // fire off the end element event
         if (m_tracer != null)
             super.fireEndElem(name);
@@ -2320,8 +2305,10 @@
         int start_old = start;
         if (isInEntityRef())
             return;
-        m_childNodeNum++;
-        flushCharactersBuffer();
+        if (m_doIndent) {
+            m_childNodeNum++;
+            flushCharactersBuffer();
+        }
         if (m_elemContext.m_startTagOpen)
         {
             closeStartTag();
@@ -2501,8 +2488,10 @@
      */
     public void startCDATA() throws org.xml.sax.SAXException
     {
-        m_childNodeNum++;
-        flushCharactersBuffer();
+        if (m_doIndent) {
+            m_childNodeNum++;
+            flushCharactersBuffer();
+        }
 
         m_cdataStartCalled = true;
     }
@@ -2588,12 +2577,6 @@
              */
             if (m_StringOfCDATASections != null)
                 m_elemContext.m_isCdataSection = isCdataSection();
-
-            if (m_doIndent)
-            {
-                m_isprevtext = false;
-                m_preserves.push(m_ispreserve);
-            }
         }
 
     }
@@ -2943,7 +2926,9 @@
         String value,
         boolean xslAttribute)
     {
-        if (m_charactersBuffer.isAnyCharactersBuffered()) {
+        if (!m_charactersBuffer.isAnyCharactersBuffered()) {
+            return doAddAttributeAlways(uri, localName, rawName, type, value, xslAttribute);
+        } else {
             /*
              * If stylesheet includes xsl:copy-of an attribute node, XSLTC will
              * fire an addAttribute event. When a text node is handling in
@@ -2954,8 +2939,6 @@
              *
              */
             return m_attributes.getIndex(rawName) < 0;
-        } else {
-            return doAddAttributeAlways(uri, localName, rawName, type, value, xslAttribute);
         }
     }
 
@@ -3086,7 +3069,7 @@
             }
         }
 
-        if (rawName.equals("xml:space")) {
+        if (m_doIndent && rawName.equals("xml:space")) {
             if (value.equals("preserve")) {
                 m_ispreserveSpace = true;
                 if (m_preserveSpaces.size() > 0)
@@ -3227,8 +3210,6 @@
          // Leave m_format alone for now - Brian M.
          // this.m_format = null;
          this.m_inDoctype = false;
-         this.m_ispreserve = false;
-         this.m_preserves.clear();
          this.m_ispreserveSpace = false;
          this.m_preserveSpaces.clear();
          this.m_childNodeNum = 0;
@@ -3411,6 +3392,7 @@
         }
     }
 
+
     /**
      * This inner class is used to buffer the text nodes and the entity
      * reference nodes if indentation is on. There is only one CharacterBuffer
@@ -3425,20 +3407,21 @@
          */
         private abstract class GenericCharacters {
             /**
-             * @return True if having any character other than whitespace or
-             *         line feed.
+             * @return True if all characters in this Text are newlines.
              */
-            abstract boolean hasContent();
-
-            abstract void flush() throws SAXException;
+            abstract boolean flush(boolean skipBeginningNewlines) throws SAXException;
 
             /**
-             * Converts this GenericCharacters to a new character array.
+             * Converts this GenericCharacters to a new character array. This
+             * method is used to handle cdata-section-elements attribute in
+             * xsl:output. Therefore it doesn't need to consider
+             * skipBeginningNewlines because the text will be involved with CDATA
+             * tag.
              */
             abstract char[] toChars();
         }
 
-        private Queue<GenericCharacters> bufferedCharacters = new ArrayDeque<>();
+        private List<GenericCharacters> bufferedCharacters = new ArrayList<>();
 
         /**
          * Append a text node to the buffer.
@@ -3451,27 +3434,21 @@
                     text = Arrays.copyOfRange(chars, start, start + length);
                 }
 
-                boolean hasContent() {
-                    for (int i = 0; i < text.length; i++) {
-                        if (!isWhiteSpace(text[i])) {
+                boolean flush(boolean skipBeginningNewlines) throws SAXException {
+                    int start = 0;
+                    while (skipBeginningNewlines && text[start] == '\n') {
+                        start++;
+                        if (start == text.length) {
                             return true;
                         }
                     }
+                    outputCharacters(text, start, text.length - start);
                     return false;
                 }
 
-                void flush() throws SAXException {
-                    outputCharacters(text, 0, text.length);
-                }
-
                 char[] toChars() {
                     return text;
                 }
-
-                boolean isWhiteSpace(char ch) {
-                    return ch == ' ' || ch == '\t' || ch == '\n' || ch == '\r';
-                }
-
             });
         }
 
@@ -3480,12 +3457,22 @@
          */
         public void addEntityReference(String entityName) {
             bufferedCharacters.add(new GenericCharacters() {
-                boolean hasContent() {
-                    return true;
-                }
-
-                void flush() throws SAXException {
-                    outputEntityReference(entityName);
+                boolean flush(boolean skipBeginningNewlines) throws SAXException {
+                    if (m_elemContext.m_startTagOpen)
+                    {
+                        closeStartTag();
+                        m_elemContext.m_startTagOpen = false;
+                    }
+                    if (m_cdataTagOpen)
+                        closeCDATA();
+                    char[] cs = toChars();
+                    try {
+                        m_writer.write(cs, 0, cs.length);
+                        m_isprevtext = true;
+                    } catch (IOException e) {
+                        throw new SAXException(e);
+                    }
+                    return false;
                 }
 
                 char[] toChars() {
@@ -3495,35 +3482,69 @@
         }
 
         /**
-         * @return True if any GenericCharacters is already buffered.
+         * Append a raw text to the buffer. Used to handle raw characters event.
+         */
+        public void addRawText(final char chars[], final int start, final int length) {
+            bufferedCharacters.add(new GenericCharacters() {
+                char[] text;
+
+                {
+                    text = Arrays.copyOfRange(chars, start, start + length);
+                }
+
+                boolean flush(boolean skipBeginningNewlines) throws SAXException {
+                    try {
+                        int start = 0;
+                        while (skipBeginningNewlines && text[start] == '\n') {
+                            start++;
+                            if (start == text.length) {
+                                return true;
+                            }
+                        }
+                        m_writer.write(text, start, text.length - start);
+                        m_isprevtext = true;
+                    } catch (IOException e) {
+                        throw new SAXException(e);
+                    }
+                    return false;
+                }
+
+                char[] toChars() {
+                    return text;
+                }
+            });
+        }
+
+        /**
+         * @return True if any GenericCharacters are buffered.
          */
         public boolean isAnyCharactersBuffered() {
-            return !bufferedCharacters.isEmpty();
-        }
-
-        /**
-         * @return True if any buffered GenericCharacters has content.
-         */
-        public boolean hasContent() {
-            return bufferedCharacters.stream().anyMatch(GenericCharacters::hasContent);
+            return bufferedCharacters.size() > 0;
         }
 
         /**
          * Flush all buffered GenericCharacters.
          */
-        public void flush() throws SAXException {
-            GenericCharacters element;
-            while ((element = bufferedCharacters.poll()) != null)
-                element.flush();
+        public void flush(boolean skipBeginningNewlines) throws SAXException {
+            Iterator<GenericCharacters> itr = bufferedCharacters.iterator();
+
+            boolean continueSkipBeginningNewlines = skipBeginningNewlines;
+            while (itr.hasNext()) {
+                GenericCharacters element = itr.next();
+                continueSkipBeginningNewlines = element.flush(continueSkipBeginningNewlines);
+                itr.remove();
+            }
         }
 
         /**
          * Converts all buffered GenericCharacters to a new character array.
          */
         public char[] toChars() {
-            return bufferedCharacters.stream().map(GenericCharacters::toChars)
-                    .collect(StringBuilder::new, StringBuilder::append, StringBuilder::append).toString()
-                    .toCharArray();
+            StringBuilder sb = new StringBuilder();
+            for (GenericCharacters element : bufferedCharacters) {
+                sb.append(element.toChars());
+            }
+            return sb.toString().toCharArray();
         }
 
         /**
@@ -3534,6 +3555,7 @@
         }
     }
 
+
     // Implement DTDHandler
     /**
      * If this method is called, the serializer is used as a
--- a/jaxp/src/java.xml/share/classes/com/sun/org/apache/xml/internal/serializer/ToXMLStream.java	Fri Feb 24 19:48:33 2017 +0100
+++ b/jaxp/src/java.xml/share/classes/com/sun/org/apache/xml/internal/serializer/ToXMLStream.java	Wed Jul 05 22:55:57 2017 +0200
@@ -88,8 +88,6 @@
 
         setOmitXMLDeclaration(xmlListener.getOmitXMLDeclaration());
 
-        m_ispreserve = xmlListener.m_ispreserve;
-        m_preserves = xmlListener.m_preserves;
         m_ispreserveSpace = xmlListener.m_ispreserveSpace;
         m_preserveSpaces = xmlListener.m_preserveSpaces;
         m_childNodeNum = xmlListener.m_childNodeNum;
@@ -201,7 +199,9 @@
      */
     public void endDocument() throws org.xml.sax.SAXException
     {
-        flushCharactersBuffer();
+        if (m_doIndent) {
+            flushCharactersBuffer();
+        }
         flushPending();
         if (m_doIndent && !m_isprevtext)
         {
@@ -235,11 +235,6 @@
      */
     public void startPreserving() throws org.xml.sax.SAXException
     {
-
-        // Not sure this is really what we want.  -sb
-        m_preserves.push(true);
-
-        m_ispreserve = true;
     }
 
     /**
@@ -251,9 +246,6 @@
      */
     public void endPreserving() throws org.xml.sax.SAXException
     {
-
-        // Not sure this is really what we want.  -sb
-        m_ispreserve = m_preserves.isEmpty() ? false : m_preserves.pop();
     }
 
     /**
@@ -273,8 +265,10 @@
         if (isInEntityRef())
             return;
 
-        m_childNodeNum++;
-        flushCharactersBuffer();
+        if (m_doIndent) {
+            m_childNodeNum++;
+            flushCharactersBuffer();
+        }
         flushPending();
 
         if (target.equals(Result.PI_DISABLE_OUTPUT_ESCAPING))
--- a/jaxp/src/java.xml/share/classes/com/sun/org/apache/xml/internal/serializer/dom3/DOM3TreeWalker.java	Fri Feb 24 19:48:33 2017 +0100
+++ b/jaxp/src/java.xml/share/classes/com/sun/org/apache/xml/internal/serializer/dom3/DOM3TreeWalker.java	Wed Jul 05 22:55:57 2017 +0200
@@ -1024,7 +1024,8 @@
                 return;
             }
 
-            if (bDispatch) {
+            if (bDispatch
+                    && (!fSerializer.getIndent() || !node.getData().replace('\n', ' ').trim().isEmpty())) {
                 dispatachChars(node);
             }
         }
--- a/jaxp/src/java.xml/share/classes/module-info.java	Fri Feb 24 19:48:33 2017 +0100
+++ b/jaxp/src/java.xml/share/classes/module-info.java	Wed Jul 05 22:55:57 2017 +0200
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2014, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2014, 2017, Oracle and/or its affiliates. All rights reserved.
  * 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,8 @@
 /**
  * Defines the Java API for XML Processing (JAXP), the Streaming API for XML (StAX),
  * the Simple API for XML (SAX), and the W3C Document Object Model (DOM) API.
+ *
+ * @since 9
  */
 module java.xml {
     exports javax.xml;
@@ -53,12 +55,6 @@
     exports org.xml.sax;
     exports org.xml.sax.ext;
     exports org.xml.sax.helpers;
-    exports com.sun.org.apache.xerces.internal.dom to
-        java.xml.ws;
-    exports com.sun.org.apache.xerces.internal.jaxp to
-        java.xml.ws;
-    exports com.sun.org.apache.xerces.internal.util to
-        java.xml.ws;
     exports com.sun.org.apache.xml.internal.dtm to
         java.xml.crypto;
     exports com.sun.org.apache.xml.internal.utils to
--- a/jaxp/test/javax/xml/jaxp/functional/org/w3c/dom/ptests/NodeTest.java	Fri Feb 24 19:48:33 2017 +0100
+++ b/jaxp/test/javax/xml/jaxp/functional/org/w3c/dom/ptests/NodeTest.java	Wed Jul 05 22:55:57 2017 +0200
@@ -22,6 +22,7 @@
  */
 package org.w3c.dom.ptests;
 
+import static jaxp.library.JAXPTestUtilities.USER_DIR;
 import static jaxp.library.JAXPTestUtilities.compareWithGold;
 import static jaxp.library.JAXPTestUtilities.tryRunWithTmpPermission;
 import static org.testng.Assert.assertEquals;
@@ -157,7 +158,7 @@
         Element element = (Element) document.getElementsByTagName("sender").item(0);
         parentElement.insertBefore(createTestDocumentFragment(document), element);
 
-        String outputfile = "InsertBefore.out";
+        String outputfile = USER_DIR + "InsertBefore.out";
         String goldfile = GOLDEN_DIR + "InsertBeforeGF.out";
         tryRunWithTmpPermission(() -> outputXml(document, outputfile), new PropertyPermission("user.dir", "read"));
         assertTrue(compareWithGold(goldfile, outputfile));
@@ -175,7 +176,7 @@
         Element element = (Element) document.getElementsByTagName("sender").item(0);
         parentElement.replaceChild(createTestDocumentFragment(document), element);
 
-        String outputfile = "ReplaceChild3.out";
+        String outputfile = USER_DIR + "ReplaceChild3.out";
         String goldfile = GOLDEN_DIR + "ReplaceChild3GF.out";
         tryRunWithTmpPermission(() -> outputXml(document, outputfile), new PropertyPermission("user.dir", "read"));
         assertTrue(compareWithGold(goldfile, outputfile));
--- a/jaxp/test/javax/xml/jaxp/functional/test/astro/DocumentLSTest.java	Fri Feb 24 19:48:33 2017 +0100
+++ b/jaxp/test/javax/xml/jaxp/functional/test/astro/DocumentLSTest.java	Wed Jul 05 22:55:57 2017 +0200
@@ -22,6 +22,7 @@
  */
 package test.astro;
 
+import static jaxp.library.JAXPTestUtilities.USER_DIR;
 import static jaxp.library.JAXPTestUtilities.filenameToURL;
 import static org.testng.Assert.assertEquals;
 import static org.testng.Assert.assertNotNull;
@@ -130,7 +131,7 @@
         impl = (DOMImplementationLS) db.getDOMImplementation();
         LSSerializer domSerializer = impl.createLSSerializer();
         MyDOMOutput mydomoutput = new MyDOMOutput();
-        try (OutputStream os = new FileOutputStream("test.out")) {
+        try (OutputStream os = new FileOutputStream(USER_DIR + "test.out")) {
             mydomoutput.setByteStream(os);
             mydomoutput.setEncoding("UTF-8");
             assertTrue(domSerializer.write(doc, mydomoutput));
--- a/jaxp/test/javax/xml/jaxp/module/ServiceProviderTest/LayerModularXMLParserTest.java	Fri Feb 24 19:48:33 2017 +0100
+++ b/jaxp/test/javax/xml/jaxp/module/ServiceProviderTest/LayerModularXMLParserTest.java	Wed Jul 05 22:55:57 2017 +0200
@@ -96,7 +96,7 @@
     public void testOneLayer() throws Exception {
         ModuleFinder finder1 = ModuleFinder.of(MOD_DIR1);
         Configuration cf1 = Layer.boot().configuration()
-                .resolveRequiresAndUses(finder1, ModuleFinder.of(), Set.of("test"));
+                .resolveAndBind(finder1, ModuleFinder.of(), Set.of("test"));
         ClassLoader scl = ClassLoader.getSystemClassLoader();
         Layer layer1 = Layer.boot().defineModulesWithManyLoaders(cf1, scl);
         ClassLoader cl1 = layer1.findLoader("test");
@@ -126,12 +126,12 @@
     public void testTwoLayer() throws Exception {
         ModuleFinder finder1 = ModuleFinder.of(MOD_DIR1);
         Configuration cf1 = Layer.boot().configuration()
-                .resolveRequiresAndUses(finder1, ModuleFinder.of(), Set.of("test"));
+                .resolveAndBind(finder1, ModuleFinder.of(), Set.of("test"));
         ClassLoader scl = ClassLoader.getSystemClassLoader();
         Layer layer1 = Layer.boot().defineModulesWithManyLoaders(cf1, scl);
 
         ModuleFinder finder2 = ModuleFinder.of(MOD_DIR2);
-        Configuration cf2 = cf1.resolveRequiresAndUses(finder2, ModuleFinder.of(), Set.of("test"));
+        Configuration cf2 = cf1.resolveAndBind(finder2, ModuleFinder.of(), Set.of("test"));
         Layer layer2 = layer1.defineModulesWithOneLoader(cf2, layer1.findLoader("test"));
         ClassLoader cl2 = layer2.findLoader("test");
 
@@ -160,12 +160,12 @@
     public void testTwoLayerWithDuplicate() throws Exception {
         ModuleFinder finder1 = ModuleFinder.of(MOD_DIR1, MOD_DIR2);
         Configuration cf1 = Layer.boot().configuration()
-                .resolveRequiresAndUses(finder1, ModuleFinder.of(), Set.of("test"));
+                .resolveAndBind(finder1, ModuleFinder.of(), Set.of("test"));
         ClassLoader scl = ClassLoader.getSystemClassLoader();
         Layer layer1 = Layer.boot().defineModulesWithManyLoaders(cf1, scl);
 
         ModuleFinder finder2 = ModuleFinder.of(MOD_DIR2);
-        Configuration cf2 = cf1.resolveRequiresAndUses(finder2, ModuleFinder.of(), Set.of("test"));
+        Configuration cf2 = cf1.resolveAndBind(finder2, ModuleFinder.of(), Set.of("test"));
         Layer layer2 = layer1.defineModulesWithOneLoader(cf2, layer1.findLoader("test"));
         ClassLoader cl2 = layer2.findLoader("test");
 
--- a/jaxp/test/javax/xml/jaxp/unittest/common/prettyprint/PrettyPrintTest.java	Fri Feb 24 19:48:33 2017 +0100
+++ b/jaxp/test/javax/xml/jaxp/unittest/common/prettyprint/PrettyPrintTest.java	Wed Jul 05 22:55:57 2017 +0200
@@ -60,7 +60,7 @@
 
 /*
  * @test
- * @bug 6439439 8087303
+ * @bug 6439439 8087303 8174025
  * @library /javax/xml/jaxp/libs /javax/xml/jaxp/unittest
  * @run testng/othervm -DrunSecMngr=true common.prettyprint.PrettyPrintTest
  * @run testng/othervm common.prettyprint.PrettyPrintTest
@@ -69,29 +69,30 @@
 @Listeners({jaxp.library.FilePolicy.class})
 public class PrettyPrintTest {
     /*
-     * test CDATA, elements only, text and element, whitespace and element,
-     * xml:space property and nested xml:space property, mixed node types.
+     * test CDATA, elements only, text and element, xml:space property, mixed
+     * node types.
      */
     @DataProvider(name = "xml-data")
     public Object[][] xmlData() throws Exception {
         return new Object[][] {
-                { read("xmltest1.xml"), read("xmltest1.out") },
-                { read("xmltest2.xml"), read("xmltest2.out") },
-                { read("xmltest3.xml"), read("xmltest3.out") },
-                { read("xmltest4.xml"), read("xmltest4.out") },
-                { read("xmltest5.xml"), read("xmltest5.out") },
-                { read("xmltest6.xml"), read("xmltest6.out") },
-                { read("xmltest7.xml"), read("xmltest7.out") },
-                { read("xmltest8.xml"), read("xmltest8.out") } };
+                { "xmltest1.xml", "xmltest1.out" },
+                { "xmltest2.xml", "xmltest2.out" },
+                { "xmltest3.xml", "xmltest3.out" },
+                { "xmltest4.xml", "xmltest4.out" },
+                { "xmltest6.xml", "xmltest6.out" },
+                { "xmltest8.xml", "xmltest8.out" } };
     }
 
     /*
      * @bug 8087303
-     * Test the whitespace text nodes are serialized with pretty-print by LSSerializer and transformer correctly
+     * Test the xml document are serialized with pretty-print by
+     * LSSerializer and transformer correctly
      *
      */
     @Test(dataProvider = "xml-data")
-    public void testXMLPrettyPrint(String source, String expected) throws Exception {
+    public void testXMLPrettyPrint(String sourceFile, String expectedFile) throws Exception {
+        String source = read(sourceFile);
+        String expected = read(expectedFile);
         // test it's no change if no pretty-print
         String result = serializerWrite(toXmlDocument(source), false);
         assertTrue(toXmlDocument(source).isEqualNode(toXmlDocument(result)), "The actual is: " + result);
@@ -104,26 +105,100 @@
         assertEquals(transform(toXmlDocument(source), true).replaceAll("\r\n", "\n"), expected);
     }
 
+
     /*
-     * test pure text content, and sequent Text nodes.
+     * @bug 8087303
+     * Test a single text node is serialized with pretty-print by
+     * LSSerializer and transformer correctly
+     *
      */
-    @DataProvider(name = "xml-node-data")
-    public Object[][] xmlNodeData() throws Exception {
-        return new Object[][] {
-                { newTextNode(read("nodetest1.txt")), read("nodetest1.out") },
-                { createDocWithSequentTextNodes(), read("nodetest2.out") } };
+    @Test
+    public void testSingleTextNode() throws Exception {
+        Node xml = newTextNode(read("nodetest1.txt"));
+        String expected = read("nodetest1.out");
+        assertEquals(serializerWrite(xml, true), expected);
+        assertEquals(transform(xml, true).replaceAll("\r\n", "\n"), expected);
     }
 
     /*
      * @bug 8087303
-     * Test the whitespace text nodes are serialized with pretty-print by LSSerializer and transformer correctly,
-     * doesn't compare with the source because the test data is Node object
+     * Test the transformer shall keep all whitespace text node in
+     * sequent text nodes
      *
      */
-    @Test(dataProvider = "xml-node-data")
-    public void testXMLNodePrettyPrint(Node xml, String expected) throws Exception {
+    @Test
+    public void testSequentTextNodesWithTransformer() throws Exception {
+        Node xml = createDocWithSequentTextNodes();
+        String expected = read("nodetest2.out");
+        assertEquals(transform(xml, true).replaceAll("\r\n", "\n"), expected);
+    }
+
+    /*
+     * @bug 8087303
+     * Test LSSerializer shall eliminate the whitespace text node
+     * in sequent text nodes
+     *
+     */
+    @Test
+    public void testSequentTextNodesWithLSSerializer() throws Exception {
+        Node xml = createDocWithSequentTextNodes();
+        String expected = read("nodetest2ls.out");
         assertEquals(serializerWrite(xml, true), expected);
-        assertEquals(transform(xml, true).replaceAll("\r\n", "\n"), expected);
+    }
+
+
+    /*
+     * test whitespace and element, nested xml:space property.
+     */
+    @DataProvider(name = "xml-data-whitespace-ls")
+    public Object[][] whitespaceLS() throws Exception {
+        return new Object[][] {
+                { "xmltest5.xml", "xmltest5ls.out" },
+                { "xmltest7.xml", "xmltest7ls.out" } };
+    }
+
+    /*
+     * @bug 8087303
+     * Test LSSerializer shall eliminate the whitespace text node
+     * unless xml:space="preserve"
+     *
+     */
+    @Test(dataProvider = "xml-data-whitespace-ls")
+    public void testWhitespaceWithLSSerializer(String sourceFile, String expectedFile) throws Exception {
+        String source = read(sourceFile);
+        String expected = read(expectedFile);
+        // test it's no change if no pretty-print
+        String result = serializerWrite(toXmlDocument(source), false);
+        assertTrue(toXmlDocument(source).isEqualNode(toXmlDocument(result)), "The actual is: " + result);
+        // test pretty-print
+        assertEquals(serializerWrite(toXmlDocument(source), true), expected);
+    }
+
+    /*
+     * test whitespace and element, nested xml:space property.
+     */
+    @DataProvider(name = "xml-data-whitespace-xslt")
+    public Object[][] whitespaceXSLT() throws Exception {
+        return new Object[][] {
+                { "xmltest5.xml", "xmltest5xslt.out" },
+                { "xmltest7.xml", "xmltest7xslt.out" } };
+    }
+
+    /*
+     * @bug 8087303
+     * Test the transformer shall format the output but keep all
+     * whitespace text node even if xml:space="preserve"
+     *
+     */
+    @Test(dataProvider = "xml-data-whitespace-xslt")
+    public void testWhitespaceWithTransformer(String sourceFile, String expectedFile) throws Exception {
+        String source = read(sourceFile);
+        String expected = read(expectedFile);
+        // test it's no change if no pretty-print
+        String result = transform(toXmlDocument(source), false);
+        assertTrue(toXmlDocument(source).isEqualNode(toXmlDocument(result)), "The actual is: " + result);
+        // test pretty-print
+        assertEquals(transform(toXmlDocument(source), true).replaceAll("\r\n", "\n"), expected);
     }
 
     /*
@@ -132,12 +207,14 @@
     @DataProvider(name = "html-data")
     public Object[][] htmlData() throws Exception {
         return new Object[][] {
-            { read("htmltest1.xml"), read("htmltest1.out") },
-            { read("htmltest2.xml"), read("htmltest2.out") },
-            { read("htmltest3.xml"), read("htmltest3.out") },
-            { read("htmltest4.xml"), read("htmltest4.out") },
-            { read("htmltest5.xml"), read("htmltest5.out") },
-            { read("htmltest6.xml"), read("htmltest6.out") } };
+            { "htmltest1.xml", "htmltest1.out" },
+            { "htmltest2.xml", "htmltest2.out" },
+            { "htmltest3.xml", "htmltest3.out" },
+            { "htmltest4.xml", "htmltest4.out" },
+            { "htmltest5.xml", "htmltest5.out" },
+            { "htmltest6.xml", "htmltest6.out" },
+            /* @bug 8174025, test whitespace between inline elements */
+            { "htmltest7.xml", "htmltest7.out" } };
     }
 
     /*
@@ -146,7 +223,9 @@
      *
      */
     @Test(dataProvider = "html-data")
-    public void testTransformToHTML(String source, String expected) throws Exception {
+    public void testTransformToHTML(String sourceFile, String expectedFile) throws Exception {
+        String source = read(sourceFile);
+        String expected = read(expectedFile);
         // test it's no change if no pretty-print
         StringWriter writer = new StringWriter();
         getTransformer(true, false).transform(new StreamSource(new StringReader(source)), new StreamResult(writer));
@@ -158,6 +237,27 @@
         assertEquals(writer.toString().replaceAll("\r\n", "\n"), expected);
     }
 
+    /*
+     * @bug 8174025
+     * Test the serializer can handle <xsl:text disable-output-escaping="yes"> correctly.
+     *
+     */
+    @Test
+    public void testDisableOutputEscaping() throws Exception {
+        final String xsl ="generate-catalog.xsl";
+        final String xml ="simple-entity-resolver-config.xml";
+        final String expectedOutput ="simple-entity-resolver-config-transformed.xml";
+        TransformerFactory factory = TransformerFactory.newInstance();
+        Transformer transformer = factory.newTemplates(new StreamSource(new StringReader(read(xsl)))).newTransformer();
+
+        String key = "schemaBase";
+        String value = "schemas";
+        transformer.setParameter(key, value);
+        StringWriter writer = new StringWriter();
+        transformer.transform(new StreamSource(new StringReader(read(xml))), new StreamResult(writer));
+        assertEquals(writer.toString().replaceAll("\r\n", "\n"), read(expectedOutput));
+    }
+
     @Test
     public void testLSSerializerFormatPrettyPrint() {
 
@@ -298,6 +398,9 @@
         Document doc = db.newDocument();
         Node root = doc.createElement("root");
         doc.appendChild(root);
+        root.appendChild(doc.createTextNode("\n"));
+        root.appendChild(doc.createTextNode("\n"));
+        root.appendChild(doc.createTextNode("\n"));
         root.appendChild(doc.createTextNode(" "));
         root.appendChild(doc.createTextNode("t"));
         root.appendChild(doc.createTextNode("\n"));
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/jaxp/test/javax/xml/jaxp/unittest/common/prettyprint/generate-catalog.xsl	Wed Jul 05 22:55:57 2017 +0200
@@ -0,0 +1,23 @@
+<?xml version="1.0" encoding="utf-8" ?> 
+ <!-- Stylesheet for generating the entity-resolver document in XCatalog format --> 
+ <xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform"> 
+
+       <xsl:output method="xml" indent="yes"/> 
+       <xsl:param name="schemaBase"/> 
+       <xsl:template match="entity-resolver-config"> 
+          <catalog xmlns="xmlns:xml:catalog" 
+                   prefer="system" 
+                   xml:base="{$schemaBase}" > 
+                    
+                   <xsl:for-each select="entity"> 
+                    
+                          <!-- Generate System Id --> 
+                          <xsl:text disable-output-escaping="yes">&lt;system systemId="</xsl:text> 
+                          <xsl:value-of select="system-id/text()"/> 
+                          <xsl:text>" uri="</xsl:text> 
+                          <xsl:value-of select="location/text()"/> 
+                          <xsl:text disable-output-escaping="yes">" /&gt;&#10;</xsl:text> 
+                   </xsl:for-each> 
+             </catalog> 
+    </xsl:template> 
+ </xsl:stylesheet>
\ No newline at end of file
--- a/jaxp/test/javax/xml/jaxp/unittest/common/prettyprint/htmltest1.xml	Fri Feb 24 19:48:33 2017 +0100
+++ b/jaxp/test/javax/xml/jaxp/unittest/common/prettyprint/htmltest1.xml	Wed Jul 05 22:55:57 2017 +0200
@@ -1,1 +1,1 @@
-<rss version="2.0"><channel xml:space="preserve"><title>Java Tutorials and Examples 1</title> <language>en-us</language></channel></rss>
\ No newline at end of file
+<rss version="2.0"><channel xml:space="preserve"><title>Java Tutorials and Examples 1</title><language>en-us</language></channel></rss>
\ No newline at end of file
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/jaxp/test/javax/xml/jaxp/unittest/common/prettyprint/htmltest7.out	Wed Jul 05 22:55:57 2017 +0200
@@ -0,0 +1,7 @@
+<html>
+    <body>
+        <p>
+             <span>this</span> <span>is</span> <span>a</span>  <span>whitespace</span>  <span>inline element</span>  <span>test</span>  
+        </p>
+    </body>
+</html>
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/jaxp/test/javax/xml/jaxp/unittest/common/prettyprint/htmltest7.xml	Wed Jul 05 22:55:57 2017 +0200
@@ -0,0 +1,1 @@
+<html><body><p> <span>this</span> <span>is</span> <span>a</span>  <span>whitespace</span>  <span>inline element</span>  <span>test</span>  </p></body></html>
\ No newline at end of file
--- a/jaxp/test/javax/xml/jaxp/unittest/common/prettyprint/nodetest2.out	Fri Feb 24 19:48:33 2017 +0100
+++ b/jaxp/test/javax/xml/jaxp/unittest/common/prettyprint/nodetest2.out	Wed Jul 05 22:55:57 2017 +0200
@@ -1,19 +1,30 @@
 <root>
      t
 t   
-    <child1/>
+    <child1> 
+</child1>
     t
-    <child2/>
-    <child3/>
-    <child4/>
+    <child2> </child2>
+     
+    <child3> </child3>
+     
+    <child4> </child4>
+     
     <child5>
         t
         <child51>
+             
             <child511>t</child511>
+             
         </child51>
         t
     </child5>
+     
     <!-- test comment -->
+     
+
     <!-- -->
+    
     <?target1 test?>
+      
 </root>
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/jaxp/test/javax/xml/jaxp/unittest/common/prettyprint/nodetest2ls.out	Wed Jul 05 22:55:57 2017 +0200
@@ -0,0 +1,18 @@
+<root>
+    tt
+    <child1/>
+    t
+    <child2/>
+    <child3/>
+    <child4/>
+    <child5>
+        t
+        <child51>
+            <child511>t</child511>
+        </child51>
+        t
+    </child5>
+    <!-- test comment -->
+    <!-- -->
+    <?target1 test?>
+</root>
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/jaxp/test/javax/xml/jaxp/unittest/common/prettyprint/simple-entity-resolver-config-transformed.xml	Wed Jul 05 22:55:57 2017 +0200
@@ -0,0 +1,3 @@
+<?xml version="1.0" encoding="UTF-8"?><catalog prefer="system" xml:base="schemas" xmlns="xmlns:xml:catalog"><system systemId="http://www.example.test/oracle/schema/example1.xsd" uri="META-INF/example1.xsd" />
+<system systemId="http://www.example.test/oracle/schema/example2.xsd" uri="META-INF/example2.xsd" />
+</catalog>
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/jaxp/test/javax/xml/jaxp/unittest/common/prettyprint/simple-entity-resolver-config.xml	Wed Jul 05 22:55:57 2017 +0200
@@ -0,0 +1,20 @@
+<?xml version="1.0"?> 
+ <entity-resolver-config 
+     xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" 
+     xsi:noNamespaceSchemaLocation="http://www.example.test/schema.xsd" 
+     schema-major-version="1" 
+     schema-minor-version="1"> 
+
+     <entity> 
+         <description>Example 1 Schema Type library 10.0 </description> 
+         <public-id>>-//Oracle//Example 1 Schema Type library 10.0//EN</public-id> 
+         <system-id>http://www.example.test/oracle/schema/example1.xsd</system-id> 
+         <location>META-INF/example1.xsd</location> 
+     </entity> 
+     <entity> 
+         <description>Example 2 Schema Type library 10.0 </description> 
+         <public-id>>-//Oracle//Example 2 Schema Type library 10.0//EN</public-id> 
+         <system-id>http://www.example.test/oracle/schema/example2.xsd</system-id> 
+         <location>META-INF/example2.xsd</location> 
+     </entity> 
+ </entity-resolver-config>
\ No newline at end of file
--- a/jaxp/test/javax/xml/jaxp/unittest/common/prettyprint/xmltest5.out	Fri Feb 24 19:48:33 2017 +0100
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,10 +0,0 @@
-<rss version="2.0">
-    <channel>
-        <title>Java Tutorials and Examples 1</title>
-        <language>en-us</language>
-    </channel>
-    <a>
-        <b/>
-    </a>
-    <c/>
-</rss>
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/jaxp/test/javax/xml/jaxp/unittest/common/prettyprint/xmltest5ls.out	Wed Jul 05 22:55:57 2017 +0200
@@ -0,0 +1,10 @@
+<rss version="2.0">
+    <channel>
+        <title>Java Tutorials and Examples 1</title>
+        <language>en-us</language>
+    </channel>
+    <a>
+        <b/>
+    </a>
+    <c/>
+</rss>
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/jaxp/test/javax/xml/jaxp/unittest/common/prettyprint/xmltest5xslt.out	Wed Jul 05 22:55:57 2017 +0200
@@ -0,0 +1,15 @@
+<rss version="2.0">
+    <channel>
+         
+        <title>Java Tutorials and Examples 1</title>
+         
+        <language>en-us</language>
+    </channel>
+    <a>
+        <b> </b>
+    </a>
+     
+    <c>
+ 
+</c>
+</rss>
--- a/jaxp/test/javax/xml/jaxp/unittest/common/prettyprint/xmltest7.out	Fri Feb 24 19:48:33 2017 +0100
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,10 +0,0 @@
-<rss>
-    <layer1 xml:space="preserve"> <title>Java </title> <layer2 xml:space="asfsa"> <layer3> <layer4 xml:space="default">
-                    <l5>5</l5>
-                </layer4> </layer3> </layer2> <layer2 xml:space="default">
-            <layer3>
-                <l4/>
-            </layer3>
-            <layer3 xml:space="preserve"> <l4> </l4> </layer3>
-        </layer2> </layer1>
-</rss>
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/jaxp/test/javax/xml/jaxp/unittest/common/prettyprint/xmltest7ls.out	Wed Jul 05 22:55:57 2017 +0200
@@ -0,0 +1,10 @@
+<rss>
+    <layer1 xml:space="preserve"> <title>Java </title> <layer2 xml:space="asfsa"> <layer3> <layer4 xml:space="default">
+                    <l5>5</l5>
+                </layer4> </layer3> </layer2> <layer2 xml:space="default">
+            <layer3>
+                <l4/>
+            </layer3>
+            <layer3 xml:space="preserve"> <l4> </l4> </layer3>
+        </layer2> </layer1>
+</rss>
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/jaxp/test/javax/xml/jaxp/unittest/common/prettyprint/xmltest7xslt.out	Wed Jul 05 22:55:57 2017 +0200
@@ -0,0 +1,17 @@
+<rss>
+    <layer1 xml:space="preserve"> <title>Java </title> <layer2 xml:space="asfsa"> <layer3> <layer4 xml:space="default">
+                     
+                    <l5>5</l5>
+                     
+ 
+                </layer4> </layer3> </layer2> <layer2 xml:space="default">
+             
+            <layer3>
+                 
+                <l4> </l4>
+                 
+            </layer3>
+             
+            <layer3 xml:space="preserve"> <l4> </l4> </layer3>
+        </layer2> </layer1>
+</rss>
--- a/jaxp/test/javax/xml/jaxp/unittest/common/prettyprint/xmltest8.out	Fri Feb 24 19:48:33 2017 +0100
+++ b/jaxp/test/javax/xml/jaxp/unittest/common/prettyprint/xmltest8.out	Wed Jul 05 22:55:57 2017 +0200
@@ -1,25 +1,20 @@
 <root>
-    
-     t
+         t
     <![CDATA[ ]]>
-    
-t   
+    t   
     
     <child1/>
-    
-    t
+        t
     <!-- test comment -->
     <child2/>
     <child5>
-        
-        t
+                t
         <?target1 test?>
         <child51>
             <child511>t</child511>
         </child51>
         <?target1 test?>
-        
-        t
+                t
     
     </child5>
 </root>
--- a/jaxp/test/javax/xml/jaxp/unittest/common/prettyprint/xmltest8.xml	Fri Feb 24 19:48:33 2017 +0100
+++ b/jaxp/test/javax/xml/jaxp/unittest/common/prettyprint/xmltest8.xml	Wed Jul 05 22:55:57 2017 +0200
@@ -2,14 +2,7 @@
      t<![CDATA[ ]]>
 t   
     <child1/>
-    t<!-- test comment -->
-    <child2/>
-    <child5>
-        t<?target1 test?>
-        <child51>
-            <child511>t</child511>
-        </child51><?target1 test?>
+    t<!-- test comment --><child2/><child5>
+        t<?target1 test?><child51><child511>t</child511></child51><?target1 test?>
         t
-    </child5>
-    
-</root> 
+    </child5></root> 
--- a/jaxp/test/javax/xml/jaxp/unittest/dom/ls/LSSerializerTest.java	Fri Feb 24 19:48:33 2017 +0100
+++ b/jaxp/test/javax/xml/jaxp/unittest/dom/ls/LSSerializerTest.java	Wed Jul 05 22:55:57 2017 +0200
@@ -279,11 +279,11 @@
                 "<author>\n" +
                 "    <a>&name1;Jo Smith</a>\n" +
                 "    <b>b &name2;Jo Smith &name1;Jo Smith b</b>\n" +
-                "    <c> &name;Jo Smith </c>\n" +
+                "    <c>&name;Jo Smith </c>\n" +
                 "    <d>&ele1;d</d>\n" +
-                "    <e> &ele2;eee </e>\n" +
+                "    <e>&ele2;eee </e>\n" +
                 "    <f>&lt;att&gt;</f>\n" +
-                "    <g> &ele; g</g>\n" +
+                "    <g>&ele; g</g>\n" +
                 "    <h>&ele2;</h>\n" +
                 "</author>\n");
 
@@ -301,7 +301,7 @@
                 "<author>\n" +
                 "    <a>&name;Jo Smith</a>\n" +
                 "    <b>b &name;Jo Smith &name;Jo Smith b</b>\n" +
-                "    <c> &name;Jo Smith </c>\n" +
+                "    <c>&name;Jo Smith </c>\n" +
                 "    <d>\n" +
                 "        <aa>\n" +
                 "            <bb>text</bb>\n" +
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/jaxp/test/javax/xml/jaxp/unittest/parsers/BaseParsingTest.java	Wed Jul 05 22:55:57 2017 +0200
@@ -0,0 +1,158 @@
+/*
+ * Copyright (c) 2017, Oracle and/or its affiliates. All rights reserved.
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * This code is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU General Public License version 2 only, as
+ * published by the Free Software Foundation.
+ *
+ * This code is distributed in the hope that it will be useful, but WITHOUT
+ * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
+ * version 2 for more details (a copy is included in the LICENSE file that
+ * accompanied this code).
+ *
+ * You should have received a copy of the GNU General Public License version
+ * 2 along with this work; if not, write to the Free Software Foundation,
+ * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
+ *
+ * Please 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 parsers;
+
+import java.io.StringReader;
+import javax.xml.parsers.DocumentBuilder;
+import javax.xml.parsers.DocumentBuilderFactory;
+import javax.xml.stream.XMLInputFactory;
+import javax.xml.stream.XMLStreamReader;
+import org.testng.annotations.DataProvider;
+import org.testng.annotations.Listeners;
+import org.testng.annotations.Test;
+import org.xml.sax.InputSource;
+
+/**
+ * @test
+ * @bug 8169450
+ * @library /javax/xml/jaxp/libs /javax/xml/jaxp/unittest
+ * @run testng/othervm -DrunSecMngr=true parsers.BaseParsingTest
+ * @run testng/othervm parsers.BaseParsingTest
+ * @summary Tests that verify base parsing
+ */
+@Listeners({jaxp.library.BasePolicy.class})
+public class BaseParsingTest {
+
+    @DataProvider(name = "xmlDeclarations")
+    public static Object[][] xmlDeclarations() {
+        return new Object[][]{
+            {"<?xml version=\"1.0\"?><root><test>t</test></root>"},
+            {"<?xml version=\"1.0\" encoding=\"UTF-8\"?><root><test>t</test></root>"},
+            {"<?xml version=\"1.0\" encoding=\"UTF-8\" standalone='yes'?><root><test>t</test></root>"},
+            {"<?xml\n"
+                + " version=\"1.0\"?>\n"
+                + "<root>\n"
+                + " <test>t</test>\n"
+                + "</root>"},
+            {"<?xml\n"
+                + " version=\"1.0\"\n"
+                + " encoding=\"UTF-8\"?>\n"
+                + "<root>\n"
+                + " <test>t</test>\n"
+                + "</root>"},
+            {"<?xml\n"
+                + " version=\"1.0\"\n"
+                + " encoding=\"UTF-8\"\n"
+                + " standalone=\"yes\"?>\n"
+                + "<root>\n"
+                + " <test>t</test>\n"
+                + "</root>"},
+            {"<?xml\n"
+                + " version\n"
+                + "=\n"
+                + "\"1.0\"\n"
+                + " encoding\n"
+                + "=\n"
+                + "\"UTF-8\"\n"
+                + " standalone\n"
+                + "=\n"
+                + "\"yes\"?>\n"
+                + "<root>\n"
+                + " <test>t</test>\n"
+                + "</root>"},
+            {"<?xml version=\"1.1\"?><root><test>t</test></root>"},
+            {"<?xml version=\"1.1\" encoding=\"UTF-8\"?><root><test>t</test></root>"},
+            {"<?xml version=\"1.1\" encoding=\"UTF-8\" standalone='yes'?><root><test>t</test></root>"},
+            {"<?xml\n"
+                + " version=\"1.1\"?>\n"
+                + "<root>\n"
+                + " <test>t</test>\n"
+                + "</root>"},
+            {"<?xml\n"
+                + " version=\"1.1\"\n"
+                + " encoding=\"UTF-8\"?>\n"
+                + "<root>\n"
+                + " <test>t</test>\n"
+                + "</root>"},
+            {"<?xml\n"
+                + " version=\"1.1\"\n"
+                + " encoding=\"UTF-8\"\n"
+                + " standalone=\"yes\"?>\n"
+                + "<root>\n"
+                + " <test>t</test>\n"
+                + "</root>"},
+            {"<?xml\n"
+                + " version\n"
+                + "=\n"
+                + "\"1.1\"\n"
+                + " encoding\n"
+                + "=\n"
+                + "\"UTF-8\"\n"
+                + " standalone\n"
+                + "=\n"
+                + "\"yes\"?>\n"
+                + "<root>\n"
+                + " <test>t</test>\n"
+                + "</root>"}
+        };
+    }
+
+    /**
+     * @bug 8169450
+     * Verifies that the parser successfully parses the declarations provided in
+     * xmlDeclarations. Exception would otherwise be thrown as reported in 8169450.
+     *
+     * XML Declaration according to https://www.w3.org/TR/REC-xml/#NT-XMLDecl
+     * [23] XMLDecl     ::= '<?xml' VersionInfo EncodingDecl? SDDecl? S? '?>'
+     * [24] VersionInfo ::= S 'version' Eq ("'" VersionNum "'" | '"' VersionNum '"')
+     * [25] Eq          ::= S? '=' S? [26] VersionNum ::= '1.' [0-9]+
+     *
+     * @param xml the test xml
+     * @throws Exception if the parser fails to parse the xml
+     */
+    @Test(dataProvider = "xmlDeclarations")
+    public void test(String xml) throws Exception {
+        XMLInputFactory xif = XMLInputFactory.newDefaultFactory();
+        XMLStreamReader xsr = xif.createXMLStreamReader(new StringReader(xml));
+        while (xsr.hasNext()) {
+            xsr.next();
+        }
+    }
+
+    /**
+     * @bug 8169450
+     * This particular issue does not appear in DOM parsing since the spaces are
+     * normalized during version detection. This test case then serves as a guard
+     * against such an issue from occuring in the version detection.
+     *
+     * @param xml the test xml
+     * @throws Exception if the parser fails to parse the xml
+     */
+    @Test(dataProvider = "xmlDeclarations")
+    public void testWithDOM(String xml) throws Exception {
+        DocumentBuilderFactory dbf = DocumentBuilderFactory.newInstance();
+        dbf.setValidating(true);
+        DocumentBuilder db = dbf.newDocumentBuilder();
+        db.parse(new InputSource(new StringReader(xml)));
+    }
+}
--- a/jaxp/test/javax/xml/jaxp/unittest/parsers/Bug6341770.java	Fri Feb 24 19:48:33 2017 +0100
+++ b/jaxp/test/javax/xml/jaxp/unittest/parsers/Bug6341770.java	Wed Jul 05 22:55:57 2017 +0200
@@ -23,6 +23,7 @@
 
 package parsers;
 
+import static jaxp.library.JAXPTestUtilities.USER_DIR;
 import static jaxp.library.JAXPTestUtilities.tryRunWithTmpPermission;
 
 import java.io.File;
@@ -61,7 +62,7 @@
             return;
         }
         try {
-            File dir = new File(ALPHA);
+            File dir = new File(USER_DIR + ALPHA);
             dir.delete();
             dir.mkdir();
             File main = new File(dir, "main.xml");
--- a/jaxp/test/javax/xml/jaxp/unittest/sax/Bug7057778Test.java	Fri Feb 24 19:48:33 2017 +0100
+++ b/jaxp/test/javax/xml/jaxp/unittest/sax/Bug7057778Test.java	Wed Jul 05 22:55:57 2017 +0200
@@ -23,6 +23,7 @@
 
 package sax;
 
+import static jaxp.library.JAXPTestUtilities.USER_DIR;
 import static jaxp.library.JAXPTestUtilities.getSystemProperty;
 import static jaxp.library.JAXPTestUtilities.tryRunWithTmpPermission;
 
@@ -69,7 +70,7 @@
     @Test
     public void testParse() {
         File src = new File(getClass().getResource(xml).getFile());
-        File dst = new File(xml1);
+        File dst = new File(USER_DIR + xml1);
         try {
             copyFile(src, dst);
             SAXParserFactory spf = SAXParserFactory.newInstance();
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/jaxp/test/javax/xml/jaxp/unittest/sax/SymbolTableResetTest.java	Wed Jul 05 22:55:57 2017 +0200
@@ -0,0 +1,78 @@
+/*
+ * Copyright (c) 2017, Oracle and/or its affiliates. All rights reserved.
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * This code is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU General Public License version 2 only, as
+ * published by the Free Software Foundation.
+ *
+ * This code is distributed in the hope that it will be useful, but WITHOUT
+ * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
+ * version 2 for more details (a copy is included in the LICENSE file that
+ * accompanied this code).
+ *
+ * You should have received a copy of the GNU General Public License version
+ * 2 along with this work; if not, write to the Free Software Foundation,
+ * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
+ *
+ * Please 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 sax;
+
+import java.io.StringReader;
+
+import javax.xml.parsers.SAXParser;
+import javax.xml.parsers.SAXParserFactory;
+
+import org.testng.Assert;
+import org.testng.annotations.Listeners;
+import org.testng.annotations.Test;
+import org.xml.sax.InputSource;
+import org.xml.sax.helpers.DefaultHandler;
+
+/*
+ * @test
+ * @bug 8173390
+ * @library /javax/xml/jaxp/libs /javax/xml/jaxp/unittest
+ * @run testng/othervm -DrunSecMngr=true sax.SymbolTableResetTest
+ * @run testng/othervm sax.SymbolTableResetTest
+ * @summary Test that SAXParser reallocates symbol table during
+ *          subsequent parse operations
+ */
+@Listeners({jaxp.library.BasePolicy.class})
+public class SymbolTableResetTest {
+
+    /*
+     * Test mimics the SAXParser usage in SAAJ-RI that reuses the
+     * parsers from the internal pool. To avoid memory leaks, symbol
+     * table associated with the parser should be reallocated during each
+     * parse() operation.
+     */
+    @Test
+    public void testReset() throws Exception {
+        // Dummy xml input for parser
+        String input = "<dummy>Test</dummy>";
+        // Create SAXParser
+        SAXParserFactory  spf = SAXParserFactory.newInstance();
+        SAXParser p = spf.newSAXParser();
+        // First parse iteration
+        p.parse(new InputSource(new StringReader(input)), new DefaultHandler());
+        // Get first symbol table reference
+        Object symTable1 = p.getProperty(SYMBOL_TABLE_PROPERTY);
+        p.reset();
+        // Second parse iteration
+        p.parse(new InputSource(new StringReader(input)), new DefaultHandler());
+        // Get second symbol table reference
+        Object symTable2 = p.getProperty(SYMBOL_TABLE_PROPERTY);
+        // Symbol table references should be different
+        Assert.assertNotSame(symTable1, symTable2, "Symbol table references");
+    }
+
+    // Symbol table property
+    private static final String SYMBOL_TABLE_PROPERTY = "http://apache.org/xml/properties/internal/symbol-table";
+
+}
--- a/jaxp/test/javax/xml/jaxp/unittest/stream/Bug6688002Test.java	Fri Feb 24 19:48:33 2017 +0100
+++ b/jaxp/test/javax/xml/jaxp/unittest/stream/Bug6688002Test.java	Wed Jul 05 22:55:57 2017 +0200
@@ -23,6 +23,8 @@
 
 package stream;
 
+import static jaxp.library.JAXPTestUtilities.USER_DIR;
+
 import java.io.FileInputStream;
 import java.io.FileOutputStream;
 import java.io.InputStream;
@@ -67,15 +69,15 @@
     }
 
     public class MyRunnable implements Runnable {
-        final int no;
+        final String no;
 
         MyRunnable(int no) {
-            this.no = no;
+            this.no = String.valueOf(no);
         }
 
         public void run() {
             try {
-                FileOutputStream fos = new FileOutputStream("" + no);
+                FileOutputStream fos = new FileOutputStream(USER_DIR + no);
                 XMLStreamWriter w = getWriter(fos);
                 // System.out.println("Writer="+w+" Thread="+Thread.currentThread());
                 w.writeStartDocument();
@@ -89,7 +91,7 @@
                 w.close();
                 fos.close();
 
-                FileInputStream fis = new FileInputStream("" + no);
+                FileInputStream fis = new FileInputStream(USER_DIR + no);
                 XMLStreamReader r = getReader(fis);
                 while (r.hasNext()) {
                     r.next();
--- a/jaxp/test/javax/xml/jaxp/unittest/stream/XMLEventWriterTest/ReaderToWriterTest.java	Fri Feb 24 19:48:33 2017 +0100
+++ b/jaxp/test/javax/xml/jaxp/unittest/stream/XMLEventWriterTest/ReaderToWriterTest.java	Wed Jul 05 22:55:57 2017 +0200
@@ -23,6 +23,8 @@
 
 package stream.XMLEventWriterTest;
 
+import static jaxp.library.JAXPTestUtilities.USER_DIR;
+
 import java.io.ByteArrayOutputStream;
 import java.io.File;
 import java.io.FileInputStream;
@@ -58,7 +60,7 @@
     private static final XMLOutputFactory XML_OUTPUT_FACTORY = XMLOutputFactory.newInstance();
 
     private static final String INPUT_FILE = "W2JDLR4002TestService.wsdl.data";
-    private static final String OUTPUT_FILE = "Encoded.wsdl";
+    private static final String OUTPUT_FILE = USER_DIR + "Encoded.wsdl";
 
     /**
      * Unit test for writing namespaces when namespaceURI == null.
@@ -126,7 +128,7 @@
 
         try {
             InputStream in = getClass().getResourceAsStream("ReaderToWriterTest.wsdl");
-            OutputStream out = new FileOutputStream("ReaderToWriterTest-out.xml");
+            OutputStream out = new FileOutputStream(USER_DIR + "ReaderToWriterTest-out.xml");
 
             XMLEventReader reader = XML_INPUT_FACTORY.createXMLEventReader(in);
             XMLEventWriter writer = XML_OUTPUT_FACTORY.createXMLEventWriter(out, "UTF-8");
--- a/jaxp/test/javax/xml/jaxp/unittest/stream/XMLStreamWriterTest/WriterTest.java	Fri Feb 24 19:48:33 2017 +0100
+++ b/jaxp/test/javax/xml/jaxp/unittest/stream/XMLStreamWriterTest/WriterTest.java	Wed Jul 05 22:55:57 2017 +0200
@@ -23,6 +23,8 @@
 
 package stream.XMLStreamWriterTest;
 
+import static jaxp.library.JAXPTestUtilities.USER_DIR;
+
 import java.io.FileInputStream;
 import java.io.FileOutputStream;
 import java.io.IOException;
@@ -84,7 +86,7 @@
         System.out.println("Test StreamWriter with out any namespace functionality");
 
         try {
-            String outputFile = files[0] + ".out";
+            String outputFile = USER_DIR + files[0] + ".out";
             System.out.println("Writing output to " + outputFile);
 
             xtw = outputFactory.createXMLStreamWriter(new FileOutputStream(outputFile), ENCODING);
@@ -98,7 +100,7 @@
             xtw.flush();
             xtw.close();
 
-            Assert.assertTrue(checkResults(files[0] + ".out", files[0] + ".org"));
+            Assert.assertTrue(checkResults(outputFile, files[0] + ".org"));
 
         } catch (Exception ex) {
             Assert.fail("testOne Failed " + ex);
@@ -113,7 +115,7 @@
         System.out.println("Test StreamWriter's Namespace Context");
 
         try {
-            String outputFile = files[1] + ".out";
+            String outputFile = USER_DIR + files[1] + ".out";
             System.out.println("Writing output to " + outputFile);
 
             xtw = outputFactory.createXMLStreamWriter(System.out);
@@ -157,7 +159,7 @@
         System.out.println("Test StreamWriter for proper element sequence.");
 
         try {
-            String outputFile = files[2] + ".out";
+            String outputFile = USER_DIR + files[2] + ".out";
             System.out.println("Writing output to " + outputFile);
 
             xtw = outputFactory.createXMLStreamWriter(new FileOutputStream(outputFile), ENCODING);
@@ -172,7 +174,7 @@
             xtw.flush();
             xtw.close();
 
-            Assert.assertTrue(checkResults(files[2] + ".out", files[2] + ".org"));
+            Assert.assertTrue(checkResults(outputFile, files[2] + ".org"));
 
         } catch (Exception ex) {
             Assert.fail("testThree Failed " + ex);
@@ -188,7 +190,7 @@
 
         try {
 
-            String outputFile = files[3] + ".out";
+            String outputFile = USER_DIR + files[3] + ".out";
             System.out.println("Writing output to " + outputFile);
 
             xtw = outputFactory.createXMLStreamWriter(new FileOutputStream(outputFile), ENCODING);
@@ -205,7 +207,7 @@
             xtw.flush();
             xtw.close();
 
-            Assert.assertTrue(checkResults(files[3] + ".out", files[3] + ".org"));
+            Assert.assertTrue(checkResults(outputFile, files[3] + ".org"));
 
         } catch (Exception ex) {
             Assert.fail("testFour Failed " + ex);
@@ -221,7 +223,7 @@
 
         try {
 
-            String outputFile = files[4] + ".out";
+            String outputFile = USER_DIR + files[4] + ".out";
             System.out.println("Writing output to " + outputFile);
 
             xtw = outputFactory.createXMLStreamWriter(System.out);
@@ -265,7 +267,7 @@
             xtw.writeEndDocument();
             xtw.flush();
             xtw.close();
-            Assert.assertTrue(checkResults(files[4] + ".out", files[4] + ".org"));
+            Assert.assertTrue(checkResults(outputFile, files[4] + ".org"));
             System.out.println("Done");
         } catch (Exception ex) {
             Assert.fail("testFive Failed " + ex);
@@ -281,7 +283,7 @@
 
         try {
 
-            String outputFile = files[5] + ".out";
+            String outputFile = USER_DIR + files[5] + ".out";
             System.out.println("Writing output to " + outputFile);
 
             xtw = outputFactory.createXMLStreamWriter(System.out);
@@ -325,7 +327,7 @@
             xtw.writeEndDocument();
             xtw.flush();
             xtw.close();
-            Assert.assertTrue(checkResults(files[5] + ".out", files[5] + ".org"));
+            Assert.assertTrue(checkResults(outputFile, files[5] + ".org"));
             System.out.println("Done");
         } catch (Exception ex) {
             Assert.fail("testSix Failed " + ex);
@@ -341,7 +343,7 @@
 
         try {
 
-            String outputFile = files[6] + ".out";
+            String outputFile = USER_DIR + files[6] + ".out";
             System.out.println("Writing output to " + outputFile);
 
             xtw = outputFactory.createXMLStreamWriter(new FileOutputStream(outputFile), ENCODING);
@@ -374,7 +376,7 @@
             xtw.writeEndDocument();
             xtw.flush();
             xtw.close();
-            Assert.assertTrue(checkResults(files[6] + ".out", files[6] + ".org"));
+            Assert.assertTrue(checkResults(outputFile, files[6] + ".org"));
             System.out.println("Done");
         } catch (Exception ex) {
             Assert.fail("testSeven Failed " + ex);
@@ -390,7 +392,7 @@
 
         try {
 
-            String outputFile = files[7] + ".out";
+            String outputFile = USER_DIR + files[7] + ".out";
             System.out.println("Writing output to " + outputFile);
             outputFactory.setProperty(XMLOutputFactory.IS_REPAIRING_NAMESPACES, new Boolean(true));
             xtw = outputFactory.createXMLStreamWriter(new FileOutputStream(outputFile), ENCODING);
@@ -424,7 +426,7 @@
             xtw.flush();
             xtw.close();
             // check against testSeven.xml.org
-            Assert.assertTrue(checkResults(files[7] + ".out", files[7] + ".org"));
+            Assert.assertTrue(checkResults(outputFile, files[7] + ".org"));
             System.out.println("Done");
         } catch (Exception ex) {
             ex.printStackTrace();
@@ -442,7 +444,7 @@
 
         try {
 
-            String outputFile = files[8] + ".out";
+            String outputFile = USER_DIR + files[8] + ".out";
             System.out.println("Writing output to " + outputFile);
             outputFactory.setProperty(XMLOutputFactory.IS_REPAIRING_NAMESPACES, new Boolean(true));
             xtw = outputFactory.createXMLStreamWriter(new FileOutputStream(outputFile), ENCODING);
@@ -476,7 +478,7 @@
             xtw.flush();
             xtw.close();
             // check against testSeven.xml.org
-            Assert.assertTrue(checkResults(files[8] + ".out", files[7] + ".org"));
+            Assert.assertTrue(checkResults(outputFile, files[7] + ".org"));
             System.out.println("Done");
         } catch (Exception ex) {
             Assert.fail("testNine Failed " + ex);
@@ -491,7 +493,7 @@
         System.out.println("Test StreamWriter supplied with no namespace information and" + "isRepairingNamespace is set to true.");
         try {
 
-            String outputFile = files[9] + ".out";
+            String outputFile = USER_DIR + files[9] + ".out";
             System.out.println("Writing output to " + outputFile);
             outputFactory.setProperty(XMLOutputFactory.IS_REPAIRING_NAMESPACES, new Boolean(true));
             xtw = outputFactory.createXMLStreamWriter(new FileOutputStream(outputFile), ENCODING);
@@ -542,7 +544,7 @@
         System.out.println("Test StreamWriter supplied with  namespace information passed through startElement and" + "isRepairingNamespace is set to true.");
         try {
 
-            String outputFile = files[10] + ".out";
+            String outputFile = USER_DIR + files[10] + ".out";
             System.out.println("Writing output to " + outputFile);
             outputFactory.setProperty(XMLOutputFactory.IS_REPAIRING_NAMESPACES, new Boolean(true));
             xtw = outputFactory.createXMLStreamWriter(new FileOutputStream(outputFile), ENCODING);
@@ -576,7 +578,7 @@
             xtw.flush();
             xtw.close();
             // check against testSeven.xml.org
-            Assert.assertTrue(checkResults(files[10] + ".out", files[7] + ".org"));
+            Assert.assertTrue(checkResults(outputFile, files[7] + ".org"));
             System.out.println("Done");
         } catch (Exception ex) {
             Assert.fail("testEleven Failed " + ex);
@@ -592,7 +594,7 @@
 
         try {
 
-            String outputFile = files[11] + ".out";
+            String outputFile = USER_DIR + files[11] + ".out";
             System.out.println("Writing output to " + outputFile);
             outputFactory.setProperty(XMLOutputFactory.IS_REPAIRING_NAMESPACES, new Boolean(true));
             xtw = outputFactory.createXMLStreamWriter(new FileOutputStream(outputFile), ENCODING);
@@ -643,7 +645,7 @@
 
         try {
 
-            String outputFile = files[12] + ".out";
+            String outputFile = USER_DIR + files[12] + ".out";
             System.out.println("Writing output to " + outputFile);
             outputFactory.setProperty(XMLOutputFactory.IS_REPAIRING_NAMESPACES, new Boolean(true));
             xtw = outputFactory.createXMLStreamWriter(new FileOutputStream(outputFile), ENCODING);
@@ -695,7 +697,7 @@
 
         try {
 
-            String outputFile = files[14] + ".out";
+            String outputFile = USER_DIR + files[14] + ".out";
             System.out.println("Writing output to " + outputFile);
             outputFactory.setProperty(XMLOutputFactory.IS_REPAIRING_NAMESPACES, new Boolean(true));
             xtw = outputFactory.createXMLStreamWriter(new FileOutputStream(outputFile), ENCODING);
--- a/jaxp/test/javax/xml/jaxp/unittest/transform/Bug4693341Test.java	Fri Feb 24 19:48:33 2017 +0100
+++ b/jaxp/test/javax/xml/jaxp/unittest/transform/Bug4693341Test.java	Wed Jul 05 22:55:57 2017 +0200
@@ -23,6 +23,8 @@
 
 package transform;
 
+import static jaxp.library.JAXPTestUtilities.USER_DIR;
+
 import java.io.File;
 import java.io.FileInputStream;
 import java.io.FileOutputStream;
@@ -55,7 +57,7 @@
     // save dtd file to current working directory to avoid writing into source repository
     public void copyDTDtoWorkDir() throws IOException {
         try (FileInputStream dtdres = new FileInputStream(getClass().getResource("Bug4693341.dtd").getPath());
-             FileOutputStream dtdwork = new FileOutputStream("Bug4693341.dtd");) {
+             FileOutputStream dtdwork = new FileOutputStream(USER_DIR + "Bug4693341.dtd");) {
             int n;
             byte[] buffer = new byte[1024];
             while((n = dtdres.read(buffer)) > -1) {
@@ -71,7 +73,7 @@
 
             copyDTDtoWorkDir();
 
-            File outf = new File("Bug4693341.out");
+            File outf = new File(USER_DIR + "Bug4693341.out");
             StreamResult result = new StreamResult(new FileOutputStream(outf));
 
             String in = getClass().getResource("Bug4693341.xml").getPath();
--- a/jaxp/test/javax/xml/jaxp/unittest/transform/Bug4892774.java	Fri Feb 24 19:48:33 2017 +0100
+++ b/jaxp/test/javax/xml/jaxp/unittest/transform/Bug4892774.java	Wed Jul 05 22:55:57 2017 +0200
@@ -23,6 +23,8 @@
 
 package transform;
 
+import static jaxp.library.JAXPTestUtilities.USER_DIR;
+
 import java.io.File;
 
 import javax.xml.transform.Source;
@@ -58,7 +60,7 @@
 
     private final String XML_FILE = "catalog.xml";
     private final String XML10_FILE = "catalog_10.xml"; // 1.0 version document
-    private final String TEMP_FILE = "tmp.xml";
+    private final String TEMP_FILE = USER_DIR + "tmp.xml";
     private final String EXPECTED_VERSION = "1.1";
     static private Transformer idTransform = null;
 
--- a/jaxp/test/javax/xml/jaxp/unittest/transform/Bug6216226Test.java	Fri Feb 24 19:48:33 2017 +0100
+++ b/jaxp/test/javax/xml/jaxp/unittest/transform/Bug6216226Test.java	Wed Jul 05 22:55:57 2017 +0200
@@ -23,6 +23,7 @@
 
 package transform;
 
+import static jaxp.library.JAXPTestUtilities.USER_DIR;
 import static jaxp.library.JAXPTestUtilities.runWithTmpPermission;
 
 import java.io.File;
@@ -52,7 +53,7 @@
     @Test
     public final void test() {
         try {
-            File test = new File("bug6216226.txt");
+            File test = new File(USER_DIR + "bug6216226.txt");
             TransformerFactory tf = TransformerFactory.newInstance();
             Transformer xformer = tf.newTransformer();
             StringReader st = new StringReader("<?xml version=\"1.0\" encoding=\"UTF-8\"?><doc></doc>");
--- a/jaxp/test/javax/xml/jaxp/unittest/transform/CR6935697Test.java	Fri Feb 24 19:48:33 2017 +0100
+++ b/jaxp/test/javax/xml/jaxp/unittest/transform/CR6935697Test.java	Wed Jul 05 22:55:57 2017 +0200
@@ -23,6 +23,8 @@
 
 package transform;
 
+import static jaxp.library.JAXPTestUtilities.USER_DIR;
+
 import java.io.FileOutputStream;
 
 import javax.xml.transform.Result;
@@ -65,7 +67,7 @@
             Transformer xformer = template.newTransformer();
             // Prepare the input and output files
             Source source = new StreamSource(getClass().getResourceAsStream(inFilename));
-            Result result = new StreamResult(new FileOutputStream(outFilename));
+            Result result = new StreamResult(new FileOutputStream(USER_DIR + outFilename));
             // Apply the xsl file to the source file and write the result to the
             // output file
             xformer.transform(source, result);
--- a/jaxp/test/javax/xml/jaxp/unittest/transform/XSLTFunctionsTest.java	Fri Feb 24 19:48:33 2017 +0100
+++ b/jaxp/test/javax/xml/jaxp/unittest/transform/XSLTFunctionsTest.java	Wed Jul 05 22:55:57 2017 +0200
@@ -23,6 +23,7 @@
 
 package transform;
 
+import java.io.FilePermission;
 import java.io.IOException;
 import java.io.StringReader;
 import java.io.StringWriter;
@@ -46,6 +47,7 @@
 import static jaxp.library.JAXPTestUtilities.runWithAllPerm;
 import static jaxp.library.JAXPTestUtilities.clearSystemProperty;
 import static jaxp.library.JAXPTestUtilities.setSystemProperty;
+import static jaxp.library.JAXPTestUtilities.tryRunWithTmpPermission;
 import static jaxp.library.JAXPTestUtilities.getSystemProperty;
 
 /*
@@ -77,7 +79,9 @@
         Transformer t = tf.newTransformer(new StreamSource(new StringReader(xsl)));
 
         //Transform the xml
-        t.transform(new StreamSource(new StringReader(xml)), new StreamResult(new StringWriter()));
+        tryRunWithTmpPermission(
+                () -> t.transform(new StreamSource(new StringReader(xml)), new StreamResult(new StringWriter())),
+                new FilePermission(output, "write"), new FilePermission(redirect, "write"));
 
         // Verifies that the output is redirected successfully
         String userDir = getSystemProperty("user.dir");
--- a/jaxp/test/javax/xml/jaxp/unittest/transform/util/TransformerUtil.java	Fri Feb 24 19:48:33 2017 +0100
+++ b/jaxp/test/javax/xml/jaxp/unittest/transform/util/TransformerUtil.java	Wed Jul 05 22:55:57 2017 +0200
@@ -23,6 +23,8 @@
 
 package transform.util;
 
+import static jaxp.library.JAXPTestUtilities.USER_DIR;
+
 import java.io.InputStream;
 
 import javax.xml.parsers.DocumentBuilder;
@@ -34,7 +36,7 @@
 
     protected String type;
 
-    protected final String TEMP_FILE = "tmp.xml";
+    protected final String TEMP_FILE = USER_DIR + "tmp.xml";
 
     public abstract Source prepareSource(InputStream is) throws Exception;
 
--- a/jaxp/test/javax/xml/jaxp/unittest/validation/CR6708840Test.java	Fri Feb 24 19:48:33 2017 +0100
+++ b/jaxp/test/javax/xml/jaxp/unittest/validation/CR6708840Test.java	Wed Jul 05 22:55:57 2017 +0200
@@ -23,6 +23,8 @@
 
 package validation;
 
+import static jaxp.library.JAXPTestUtilities.USER_DIR;
+
 import java.io.File;
 import java.io.FileWriter;
 
@@ -122,7 +124,7 @@
             Validator schemaValidator = schemaGrammar.newValidator();
 
             Source staxSrc = new StAXSource(staxReader);
-            File resultFile = new File("gMonths.result.xml");
+            File resultFile = new File(USER_DIR + "gMonths.result.xml");
             if (resultFile.exists()) {
                 resultFile.delete();
             }
--- a/jaxp/test/javax/xml/jaxp/unittest/validation/ValidatorTest.java	Fri Feb 24 19:48:33 2017 +0100
+++ b/jaxp/test/javax/xml/jaxp/unittest/validation/ValidatorTest.java	Wed Jul 05 22:55:57 2017 +0200
@@ -23,6 +23,7 @@
 
 package validation;
 
+import static jaxp.library.JAXPTestUtilities.USER_DIR;
 import static jaxp.library.JAXPTestUtilities.runWithTmpPermission;
 
 import java.io.File;
@@ -61,7 +62,7 @@
 
         File resultFile = null;
         try {
-            resultFile = new File("stax.result");
+            resultFile = new File(USER_DIR + "stax.result");
             if (resultFile.exists()) {
                 resultFile.delete();
             }
@@ -88,7 +89,7 @@
 
         File resultFile = null;
         try {
-            resultFile = new File("stax.result");
+            resultFile = new File(USER_DIR + "stax.result");
             if (resultFile.exists()) {
                 resultFile.delete();
             }
@@ -117,7 +118,7 @@
         // test valid gMonths
         File resultFile = null;
         try {
-            resultFile = new File("gMonths.result.xml");
+            resultFile = new File(USER_DIR + "gMonths.result.xml");
             if (resultFile.exists()) {
                 resultFile.delete();
             }
@@ -144,7 +145,7 @@
         // test invalid gMonths
         File invalidResultFile = null;
         try {
-            invalidResultFile = new File("gMonths-invalid.result.xml");
+            invalidResultFile = new File(USER_DIR + "gMonths-invalid.result.xml");
             if (invalidResultFile.exists()) {
                 invalidResultFile.delete();
             }
--- a/jaxws/.hgtags	Fri Feb 24 19:48:33 2017 +0100
+++ b/jaxws/.hgtags	Wed Jul 05 22:55:57 2017 +0200
@@ -401,3 +401,5 @@
 7a532a9a227137155b905341d4b99939db51220e jdk-9+153
 34af95c7dbff74f3448fcdb7d745524e8a1cc88a jdk-9+154
 9b9918656c97724fd89c04a8547043bbd37f5935 jdk-9+155
+7c829eba781409b4fe15392639289af1553dcf63 jdk-9+156
+b7e70e1e0154e1d2c69f814e03a8800ef8634fe0 jdk-9+157
--- a/jaxws/src/java.activation/share/classes/META-INF/mimetypes.default	Fri Feb 24 19:48:33 2017 +0100
+++ b/jaxws/src/java.activation/share/classes/META-INF/mimetypes.default	Wed Jul 05 22:55:57 2017 +0200
@@ -7,6 +7,7 @@
 image/ief		ief
 image/jpeg		jpeg jpg jpe JPG
 image/tiff		tiff tif
+image/png		png PNG
 image/x-xwindowdump	xwd
 application/postscript	ai eps ps
 application/rtf		rtf
--- a/jaxws/src/java.activation/share/classes/module-info.java	Fri Feb 24 19:48:33 2017 +0100
+++ b/jaxws/src/java.activation/share/classes/module-info.java	Wed Jul 05 22:55:57 2017 +0200
@@ -25,6 +25,8 @@
 
 /**
  * Defines the JavaBeans Activation Framework (JAF) API.
+ *
+ * @since 9
  */
 module java.activation {
     requires transitive java.datatransfer;
--- a/jaxws/src/java.xml.bind/share/classes/com/sun/istack/internal/localization/Localizable.java	Fri Feb 24 19:48:33 2017 +0100
+++ b/jaxws/src/java.xml.bind/share/classes/com/sun/istack/internal/localization/Localizable.java	Wed Jul 05 22:55:57 2017 +0200
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 1997, 2016, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 1997, 2017, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -54,9 +54,7 @@
     public Object[] getArguments();
     public String getResourceBundleName();
 
-    public default ResourceBundle getResourceBundle(Locale locale) {
-        return null;
-    }
+    public ResourceBundle getResourceBundle(Locale locale);
 
     /**
      * Special constant that represents a message that
--- a/jaxws/src/java.xml.bind/share/classes/com/sun/istack/internal/localization/LocalizableMessage.java	Fri Feb 24 19:48:33 2017 +0100
+++ b/jaxws/src/java.xml.bind/share/classes/com/sun/istack/internal/localization/LocalizableMessage.java	Wed Jul 05 22:55:57 2017 +0200
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 1997, 2016, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 1997, 2017, Oracle and/or its affiliates. All rights reserved.
  * 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 java.util.Locale;
 import java.util.ResourceBundle;
 
+
 /**
  * @author WS Development Team
  */
@@ -42,13 +43,9 @@
     private final String _key;
     private final Object[] _args;
 
+    @Deprecated
     public LocalizableMessage(String bundlename, String key, Object... args) {
-        _bundlename = bundlename;
-        _rbSupplier = null;
-        _key = key;
-        if(args==null)
-            args = new Object[0];
-        _args = args;
+        this(bundlename, null, key, args);
     }
 
     public LocalizableMessage(String bundlename, ResourceBundleSupplier rbSupplier,
@@ -61,15 +58,17 @@
         _args = args;
     }
 
-
+    @Override
     public String getKey() {
         return _key;
     }
 
+    @Override
     public Object[] getArguments() {
         return Arrays.copyOf(_args, _args.length);
     }
 
+    @Override
     public String getResourceBundleName() {
         return _bundlename;
     }
--- a/jaxws/src/java.xml.bind/share/classes/com/sun/istack/internal/localization/LocalizableMessageFactory.java	Fri Feb 24 19:48:33 2017 +0100
+++ b/jaxws/src/java.xml.bind/share/classes/com/sun/istack/internal/localization/LocalizableMessageFactory.java	Wed Jul 05 22:55:57 2017 +0200
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 1997, 2016, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 1997, 2017, Oracle and/or its affiliates. All rights reserved.
  * 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,6 +36,7 @@
     private final String _bundlename;
     private final ResourceBundleSupplier _rbSupplier;
 
+    @Deprecated
     public LocalizableMessageFactory(String bundlename) {
         _bundlename = bundlename;
         _rbSupplier = null;
@@ -58,4 +59,5 @@
          */
         ResourceBundle getResourceBundle(Locale locale);
     }
+
 }
--- a/jaxws/src/java.xml.bind/share/classes/com/sun/istack/internal/localization/Localizer.java	Fri Feb 24 19:48:33 2017 +0100
+++ b/jaxws/src/java.xml.bind/share/classes/com/sun/istack/internal/localization/Localizer.java	Wed Jul 05 22:55:57 2017 +0200
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 1997, 2016, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 1997, 2017, Oracle and/or its affiliates. All rights reserved.
  * 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,6 @@
 
 package com.sun.istack.internal.localization;
 
-import com.sun.istack.internal.localization.LocalizableMessageFactory.ResourceBundleSupplier;
 import java.text.MessageFormat;
 import java.util.HashMap;
 import java.util.Locale;
@@ -41,7 +40,7 @@
 public class Localizer {
 
     private final Locale _locale;
-    private final HashMap _resourceBundles;
+    private final HashMap<String, ResourceBundle> _resourceBundles;
 
     public Localizer() {
         this(Locale.getDefault());
@@ -49,7 +48,7 @@
 
     public Localizer(Locale l) {
         _locale = l;
-        _resourceBundles = new HashMap();
+        _resourceBundles = new HashMap<>();
     }
 
     public Locale getLocale() {
--- a/jaxws/src/java.xml.bind/share/classes/com/sun/istack/internal/localization/NullLocalizable.java	Fri Feb 24 19:48:33 2017 +0100
+++ b/jaxws/src/java.xml.bind/share/classes/com/sun/istack/internal/localization/NullLocalizable.java	Wed Jul 05 22:55:57 2017 +0200
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 1997, 2013, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 1997, 2017, Oracle and/or its affiliates. All rights reserved.
  * 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,9 @@
 
 package com.sun.istack.internal.localization;
 
+import java.util.Locale;
+import java.util.ResourceBundle;
+
 /**
  * {@link Localizable} that wraps a non-localizable string.
  *
@@ -39,13 +42,20 @@
         this.msg = msg;
     }
 
+    @Override
     public String getKey() {
         return Localizable.NOT_LOCALIZABLE;
     }
+    @Override
     public Object[] getArguments() {
         return new Object[]{msg};
     }
+    @Override
     public String getResourceBundleName() {
         return "";
     }
+    @Override
+    public ResourceBundle getResourceBundle(Locale locale) {
+        return null;
+    }
 }
--- a/jaxws/src/java.xml.bind/share/classes/com/sun/xml/internal/bind/api/JAXBRIContext.java	Fri Feb 24 19:48:33 2017 +0100
+++ b/jaxws/src/java.xml.bind/share/classes/com/sun/xml/internal/bind/api/JAXBRIContext.java	Wed Jul 05 22:55:57 2017 +0200
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 1997, 2015, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 1997, 2017, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -533,4 +533,14 @@
      * @since 2.2.6
      */
     public static final String DISABLE_XML_SECURITY  = "com.sun.xml.internal.bind.disableXmlSecurity";
+
+    /**
+     * If true and element namespace is not specified, namespace of parent element will be used.
+     * The default value is false.
+     *
+     * Boolean
+     * @since 2.3.0
+     */
+    public static final String BACKUP_WITH_PARENT_NAMESPACE = "com.sun.xml.internal.bind.backupWithParentNamespace";
+
 }
--- a/jaxws/src/java.xml.bind/share/classes/com/sun/xml/internal/bind/v2/ContextFactory.java	Fri Feb 24 19:48:33 2017 +0100
+++ b/jaxws/src/java.xml.bind/share/classes/com/sun/xml/internal/bind/v2/ContextFactory.java	Wed Jul 05 22:55:57 2017 +0200
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 1997, 2015, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 1997, 2017, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -112,6 +112,8 @@
                 "is not active.  Using JAXB's implementation");
         }
 
+        Boolean backupWithParentNamespace = getPropertyValue(properties, JAXBRIContext.BACKUP_WITH_PARENT_NAMESPACE, Boolean.class);
+
         RuntimeAnnotationReader ar = getPropertyValue(properties,JAXBRIContext.ANNOTATION_READER,RuntimeAnnotationReader.class);
 
         Collection<TypeReference> tr = getPropertyValue(properties, JAXBRIContext.TYPE_REFERENCES, Collection.class);
@@ -144,6 +146,7 @@
         builder.setSupressAccessorWarnings(supressAccessorWarnings);
         builder.setImprovedXsiTypeHandling(improvedXsiTypeHandling);
         builder.setDisableSecurityProcessing(disablesecurityProcessing);
+        builder.setBackupWithParentNamespace(backupWithParentNamespace);
         return builder.build();
     }
 
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/jaxws/src/java.xml.bind/share/classes/com/sun/xml/internal/bind/v2/bytecode/package-info.java	Wed Jul 05 22:55:57 2017 +0200
@@ -0,0 +1,29 @@
+/*
+ * Copyright (c) 2017, Oracle and/or its affiliates. All rights reserved.
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * This code is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU General Public License version 2 only, as
+ * published by the Free Software Foundation.  Oracle designates this
+ * particular file as subject to the "Classpath" exception as provided
+ * by Oracle in the LICENSE file that accompanied this code.
+ *
+ * This code is distributed in the hope that it will be useful, but WITHOUT
+ * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
+ * version 2 for more details (a copy is included in the LICENSE file that
+ * accompanied this code).
+ *
+ * You should have received a copy of the GNU General Public License version
+ * 2 along with this work; if not, write to the Free Software Foundation,
+ * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
+ *
+ * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
+ * or visit www.oracle.com if you need additional information or have any
+ * questions.
+ */
+
+/**
+ * Code that deals with low level byte code manipulation.
+ */
+package com.sun.xml.internal.bind.v2.bytecode;
--- a/jaxws/src/java.xml.bind/share/classes/com/sun/xml/internal/bind/v2/bytecode/package.html	Fri Feb 24 19:48:33 2017 +0100
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,32 +0,0 @@
-<!--
- 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
- under the terms of the GNU General Public License version 2 only, as
- published by the Free Software Foundation.  Oracle designates this
- particular file as subject to the "Classpath" exception as provided
- by Oracle in the LICENSE file that accompanied this code.
-
- This code is distributed in the hope that it will be useful, but WITHOUT
- ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
- version 2 for more details (a copy is included in the LICENSE file that
- accompanied this code).
-
- You should have received a copy of the GNU General Public License version
- 2 along with this work; if not, write to the Free Software Foundation,
- Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
-
- Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
- or visit www.oracle.com if you need additional information or have any
- questions.
--->
-
-<html>
-
-
-<body>
-  Code that deals with low level byte code manipulation.
-</body>
-</html>
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/jaxws/src/java.xml.bind/share/classes/com/sun/xml/internal/bind/v2/model/annotation/package-info.java	Wed Jul 05 22:55:57 2017 +0200
@@ -0,0 +1,29 @@
+/*
+ * Copyright (c) 2017, Oracle and/or its affiliates. All rights reserved.
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * This code is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU General Public License version 2 only, as
+ * published by the Free Software Foundation.  Oracle designates this
+ * particular file as subject to the "Classpath" exception as provided
+ * by Oracle in the LICENSE file that accompanied this code.
+ *
+ * This code is distributed in the hope that it will be useful, but WITHOUT
+ * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
+ * version 2 for more details (a copy is included in the LICENSE file that
+ * accompanied this code).
+ *
+ * You should have received a copy of the GNU General Public License version
+ * 2 along with this work; if not, write to the Free Software Foundation,
+ * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
+ *
+ * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
+ * or visit www.oracle.com if you need additional information or have any
+ * questions.
+ */
+
+/**
+ * Abstraction around reading annotations, to support internal/external annotations.
+ */
+package com.sun.xml.internal.bind.v2.model.annotation;
--- a/jaxws/src/java.xml.bind/share/classes/com/sun/xml/internal/bind/v2/model/annotation/package.html	Fri Feb 24 19:48:33 2017 +0100
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,30 +0,0 @@
-<!--
- 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
- under the terms of the GNU General Public License version 2 only, as
- published by the Free Software Foundation.  Oracle designates this
- particular file as subject to the "Classpath" exception as provided
- by Oracle in the LICENSE file that accompanied this code.
-
- This code is distributed in the hope that it will be useful, but WITHOUT
- ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
- version 2 for more details (a copy is included in the LICENSE file that
- accompanied this code).
-
- You should have received a copy of the GNU General Public License version
- 2 along with this work; if not, write to the Free Software Foundation,
- Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
-
- Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
- or visit www.oracle.com if you need additional information or have any
- questions.
--->
-
-<html><body>
-
-
-  Abstraction around reading annotations, to support internal/external annotations.
-</body></html>
--- a/jaxws/src/java.xml.bind/share/classes/com/sun/xml/internal/bind/v2/model/core/ErrorHandler.java	Fri Feb 24 19:48:33 2017 +0100
+++ b/jaxws/src/java.xml.bind/share/classes/com/sun/xml/internal/bind/v2/model/core/ErrorHandler.java	Wed Jul 05 22:55:57 2017 +0200
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 1997, 2013, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 1997, 2017, Oracle and/or its affiliates. All rights reserved.
  * 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,24 +29,25 @@
 
 /**
  * listen to static errors found during building a JAXB model from a set of classes.
- * Implemented by the client of {@link com.sun.xml.internal.bind.v2.model.impl.ModelBuilder}.
+ * Implemented by the client of {@link com.sun.xml.internal.bind.v2.model.impl.ModelBuilderI}.
  *
  * <p>
  * All the static errors have to be reported while constructing a
- * model, not when a model is used (IOW, until the {@link com.sun.xml.internal.bind.v2.model.impl.ModelBuilder#link} completes.
- * Internally, {@link com.sun.xml.internal.bind.v2.model.impl.ModelBuilder} wraps an {@link ErrorHandler} and all the model
+ * model, not when a model is used (IOW, until the {@link com.sun.xml.internal.bind.v2.model.impl.ModelBuilderI} completes.
+ * Internally, {@link com.sun.xml.internal.bind.v2.model.impl.ModelBuilderI} wraps an {@link ErrorHandler} and all the model
  * components should report errors through it.
  *
  * <p>
  * {@link IllegalAnnotationException} is a checked exception to remind
  * the model classes to report it rather than to throw it.
  *
- * @see com.sun.xml.internal.bind.v2.model.impl.ModelBuilder
+ * @see com.sun.xml.internal.bind.v2.model.impl.ModelBuilderI
  * @author Kohsuke Kawaguchi
  */
 public interface ErrorHandler {
     /**
      * Receives a notification for an error in the annotated code.
+     * @param e
      */
     void error( IllegalAnnotationException e );
 }
--- a/jaxws/src/java.xml.bind/share/classes/com/sun/xml/internal/bind/v2/model/core/PropertyKind.java	Fri Feb 24 19:48:33 2017 +0100
+++ b/jaxws/src/java.xml.bind/share/classes/com/sun/xml/internal/bind/v2/model/core/PropertyKind.java	Wed Jul 05 22:55:57 2017 +0200
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 1997, 2013, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 1997, 2017, Oracle and/or its affiliates. All rights reserved.
  * 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,7 +57,7 @@
     public final boolean isOrdered;
 
     /**
-     * {@link com.sun.xml.internal.bind.v2.runtime.property.PropertyFactory} benefits from having index numbers assigned to
+     * {@code com.sun.xml.internal.bind.v2.runtime.property.PropertyFactory} benefits from having index numbers assigned to
      * {@link #ELEMENT}, {@link #REFERENCE}, and {@link #MAP} in this order.
      */
     public final int propertyIndex;
--- a/jaxws/src/java.xml.bind/share/classes/com/sun/xml/internal/bind/v2/model/core/RegistryInfo.java	Fri Feb 24 19:48:33 2017 +0100
+++ b/jaxws/src/java.xml.bind/share/classes/com/sun/xml/internal/bind/v2/model/core/RegistryInfo.java	Wed Jul 05 22:55:57 2017 +0200
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 1997, 2015, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 1997, 2017, Oracle and/or its affiliates. All rights reserved.
  * 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,18 +34,22 @@
  *
  * <p>
  * This interface is only meant to be used as a return type from
- * {@link com.sun.xml.internal.bind.v2.model.impl.ModelBuilder}.
+ * {@link com.sun.xml.internal.bind.v2.model.impl.ModelBuilderI}.
  *
  * @author Kohsuke Kawaguchi
+ * @param <T>
+ * @param <C>
  */
 public interface RegistryInfo<T,C> {
     /**
      * Returns all the references to other types in this registry.
+     * @return
      */
     Set<TypeInfo<T,C>> getReferences();
 
     /**
      * Returns the class with {@link XmlRegistry}.
+     * @return
      */
     C getClazz();
 }
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/jaxws/src/java.xml.bind/share/classes/com/sun/xml/internal/bind/v2/model/impl/package-info.java	Wed Jul 05 22:55:57 2017 +0200
@@ -0,0 +1,29 @@
+/*
+ * Copyright (c) 2017, Oracle and/or its affiliates. All rights reserved.
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * This code is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU General Public License version 2 only, as
+ * published by the Free Software Foundation.  Oracle designates this
+ * particular file as subject to the "Classpath" exception as provided
+ * by Oracle in the LICENSE file that accompanied this code.
+ *
+ * This code is distributed in the hope that it will be useful, but WITHOUT
+ * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
+ * version 2 for more details (a copy is included in the LICENSE file that
+ * accompanied this code).
+ *
+ * You should have received a copy of the GNU General Public License version
+ * 2 along with this work; if not, write to the Free Software Foundation,
+ * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
+ *
+ * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
+ * or visit www.oracle.com if you need additional information or have any
+ * questions.
+ */
+
+/**
+ * Implementation of the com.sun.xml.internal.bind.j2s.model package.
+ */
+package com.sun.xml.internal.bind.v2.model.impl;
--- a/jaxws/src/java.xml.bind/share/classes/com/sun/xml/internal/bind/v2/model/impl/package.html	Fri Feb 24 19:48:33 2017 +0100
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,32 +0,0 @@
-<!--
- 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
- under the terms of the GNU General Public License version 2 only, as
- published by the Free Software Foundation.  Oracle designates this
- particular file as subject to the "Classpath" exception as provided
- by Oracle in the LICENSE file that accompanied this code.
-
- This code is distributed in the hope that it will be useful, but WITHOUT
- ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
- version 2 for more details (a copy is included in the LICENSE file that
- accompanied this code).
-
- You should have received a copy of the GNU General Public License version
- 2 along with this work; if not, write to the Free Software Foundation,
- Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
-
- Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
- or visit www.oracle.com if you need additional information or have any
- questions.
--->
-
-<html>
-
-
-<body>
-Implementation of the com.sun.xml.internal.bind.j2s.model package.
-</body>
-</html>
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/jaxws/src/java.xml.bind/share/classes/com/sun/xml/internal/bind/v2/model/nav/package-info.java	Wed Jul 05 22:55:57 2017 +0200
@@ -0,0 +1,29 @@
+/*
+ * Copyright (c) 2017, Oracle and/or its affiliates. All rights reserved.
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * This code is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU General Public License version 2 only, as
+ * published by the Free Software Foundation.  Oracle designates this
+ * particular file as subject to the "Classpath" exception as provided
+ * by Oracle in the LICENSE file that accompanied this code.
+ *
+ * This code is distributed in the hope that it will be useful, but WITHOUT
+ * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
+ * version 2 for more details (a copy is included in the LICENSE file that
+ * accompanied this code).
+ *
+ * You should have received a copy of the GNU General Public License version
+ * 2 along with this work; if not, write to the Free Software Foundation,
+ * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
+ *
+ * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
+ * or visit www.oracle.com if you need additional information or have any
+ * questions.
+ */
+
+/**
+ * Abstraction around the reflection library, to support various reflection models (such as java.lang.reflect and Annotation Processing).
+ */
+package com.sun.xml.internal.bind.v2.model.nav;
--- a/jaxws/src/java.xml.bind/share/classes/com/sun/xml/internal/bind/v2/model/nav/package.html	Fri Feb 24 19:48:33 2017 +0100
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,30 +0,0 @@
-<!--
- 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
- under the terms of the GNU General Public License version 2 only, as
- published by the Free Software Foundation.  Oracle designates this
- particular file as subject to the "Classpath" exception as provided
- by Oracle in the LICENSE file that accompanied this code.
-
- This code is distributed in the hope that it will be useful, but WITHOUT
- ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
- version 2 for more details (a copy is included in the LICENSE file that
- accompanied this code).
-
- You should have received a copy of the GNU General Public License version
- 2 along with this work; if not, write to the Free Software Foundation,
- Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
-
- Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
- or visit www.oracle.com if you need additional information or have any
- questions.
--->
-
-<html><body>
-
-
-  Abstraction around the reflection library, to support various reflection models (such as java.lang.reflect and Annotation Processing).
-</body></html>
--- a/jaxws/src/java.xml.bind/share/classes/com/sun/xml/internal/bind/v2/runtime/JAXBContextImpl.java	Fri Feb 24 19:48:33 2017 +0100
+++ b/jaxws/src/java.xml.bind/share/classes/com/sun/xml/internal/bind/v2/runtime/JAXBContextImpl.java	Wed Jul 05 22:55:57 2017 +0200
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 1997, 2013, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 1997, 2017, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -242,6 +242,16 @@
     private Set<XmlNs> xmlNsSet = null;
 
     /**
+     * If true, despite the specification, unmarshall child element with parent namespace, if child namespace is not specified.
+     * The default value is null for System {code}com.sun.xml.internal.bind.backupWithParentNamespace{code} property to be used,
+     * and false is assumed if it's not set either.
+     *
+     * Boolean
+     * @since 2.3.0
+     */
+    public Boolean backupWithParentNamespace = null;
+
+    /**
      * Returns declared XmlNs annotations (from package-level annotation XmlSchema
      *
      * @return set of all present XmlNs annotations
@@ -263,6 +273,7 @@
         this.supressAccessorWarnings = builder.supressAccessorWarnings;
         this.improvedXsiTypeHandling = builder.improvedXsiTypeHandling;
         this.disableSecurityProcessing = builder.disableSecurityProcessing;
+        this.backupWithParentNamespace = builder.backupWithParentNamespace;
 
         Collection<TypeReference> typeRefs = builder.typeRefs;
 
@@ -1024,6 +1035,7 @@
         private boolean allNillable;
         private boolean improvedXsiTypeHandling = true;
         private boolean disableSecurityProcessing = true;
+        private Boolean backupWithParentNamespace = null; // null for System property to be used
 
         public JAXBContextBuilder() {};
 
@@ -1039,6 +1051,7 @@
             this.xmlAccessorFactorySupport = baseImpl.xmlAccessorFactorySupport;
             this.allNillable = baseImpl.allNillable;
             this.disableSecurityProcessing = baseImpl.disableSecurityProcessing;
+            this.backupWithParentNamespace = baseImpl.backupWithParentNamespace;
         }
 
         public JAXBContextBuilder setRetainPropertyInfo(boolean val) {
@@ -1101,6 +1114,11 @@
             return this;
         }
 
+        public JAXBContextBuilder setBackupWithParentNamespace(Boolean backupWithParentNamespace) {
+            this.backupWithParentNamespace = backupWithParentNamespace;
+            return this;
+        }
+
         public JAXBContextImpl build() throws JAXBException {
 
             // fool-proof
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/jaxws/src/java.xml.bind/share/classes/com/sun/xml/internal/bind/v2/runtime/package-info.java	Wed Jul 05 22:55:57 2017 +0200
@@ -0,0 +1,29 @@
+/*
+ * Copyright (c) 2017, Oracle and/or its affiliates. All rights reserved.
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * This code is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU General Public License version 2 only, as
+ * published by the Free Software Foundation.  Oracle designates this
+ * particular file as subject to the "Classpath" exception as provided
+ * by Oracle in the LICENSE file that accompanied this code.
+ *
+ * This code is distributed in the hope that it will be useful, but WITHOUT
+ * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
+ * version 2 for more details (a copy is included in the LICENSE file that
+ * accompanied this code).
+ *
+ * You should have received a copy of the GNU General Public License version
+ * 2 along with this work; if not, write to the Free Software Foundation,
+ * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
+ *
+ * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
+ * or visit www.oracle.com if you need additional information or have any
+ * questions.
+ */
+
+/**
+ * Code that implements JAXBContext, Unmarshaller, and Marshaller.
+ */
+package com.sun.xml.internal.bind.v2.runtime;
--- a/jaxws/src/java.xml.bind/share/classes/com/sun/xml/internal/bind/v2/runtime/package.html	Fri Feb 24 19:48:33 2017 +0100
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,32 +0,0 @@
-<!--
- 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
- under the terms of the GNU General Public License version 2 only, as
- published by the Free Software Foundation.  Oracle designates this
- particular file as subject to the "Classpath" exception as provided
- by Oracle in the LICENSE file that accompanied this code.
-
- This code is distributed in the hope that it will be useful, but WITHOUT
- ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
- version 2 for more details (a copy is included in the LICENSE file that
- accompanied this code).
-
- You should have received a copy of the GNU General Public License version
- 2 along with this work; if not, write to the Free Software Foundation,
- Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
-
- Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
- or visit www.oracle.com if you need additional information or have any
- questions.
--->
-
-<html>
-
-
-<body>
-Code that implements JAXBContext, Unmarshaller, and Marshaller.
-</body>
-</html>
--- a/jaxws/src/java.xml.bind/share/classes/com/sun/xml/internal/bind/v2/runtime/reflect/opt/AccessorInjector.java	Fri Feb 24 19:48:33 2017 +0100
+++ b/jaxws/src/java.xml.bind/share/classes/com/sun/xml/internal/bind/v2/runtime/reflect/opt/AccessorInjector.java	Wed Jul 05 22:55:57 2017 +0200
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 1997, 2013, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 1997, 2017, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -39,7 +39,7 @@
 
     private static final Logger logger = Util.getClassLogger();
 
-    protected static final boolean noOptimize = Runtime.version().major() >= 9 ||
+    protected static final boolean noOptimize =
         Util.getSystemProperty(ClassTailor.class.getName()+".noOptimize")!=null;
 
     static {
--- a/jaxws/src/java.xml.bind/share/classes/com/sun/xml/internal/bind/v2/runtime/reflect/opt/Injector.java	Fri Feb 24 19:48:33 2017 +0100
+++ b/jaxws/src/java.xml.bind/share/classes/com/sun/xml/internal/bind/v2/runtime/reflect/opt/Injector.java	Wed Jul 05 22:55:57 2017 +0200
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 1997, 2014, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 1997, 2017, Oracle and/or its affiliates. All rights reserved.
  * 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,6 +40,11 @@
 
 import com.sun.xml.internal.bind.Util;
 import com.sun.xml.internal.bind.v2.runtime.reflect.Accessor;
+import java.lang.reflect.Field;
+import java.security.CodeSource;
+import java.security.PrivilegedActionException;
+import java.security.PrivilegedExceptionAction;
+import java.security.ProtectionDomain;
 
 /**
  * A {@link ClassLoader} used to "inject" optimized accessor classes
@@ -131,7 +136,7 @@
     /**
      * Injected classes keyed by their names.
      */
-    private final Map<String, Class> classes = new HashMap<String, Class>();
+    private final Map<String, Class> classes = new HashMap<>();
     private final ReentrantReadWriteLock rwl = new ReentrantReadWriteLock();
     private final Lock r = rwl.readLock();
     private final Lock w = rwl.writeLock();
@@ -141,26 +146,59 @@
      * False otherwise, which happens if this classloader can't see {@link Accessor}.
      */
     private final boolean loadable;
-    private static final Method defineClass;
-    private static final Method resolveClass;
-    private static final Method findLoadedClass;
+    private static Method defineClass;
+    private static Method resolveClass;
+    private static Method findLoadedClass;
+    private static Object U;
 
     static {
-        Method[] m = AccessController.doPrivileged(
-                new PrivilegedAction<Method[]>() {
+        try {
+            Method[] m = AccessController.doPrivileged(
+                    new PrivilegedAction<Method[]>() {
+                @Override
+                public Method[] run() {
+                    return new Method[]{
+                        getMethod(ClassLoader.class, "defineClass", String.class, byte[].class, Integer.TYPE, Integer.TYPE),
+                        getMethod(ClassLoader.class, "resolveClass", Class.class),
+                        getMethod(ClassLoader.class, "findLoadedClass", String.class)
+                    };
+                }
+            }
+            );
+            defineClass = m[0];
+            resolveClass = m[1];
+            findLoadedClass = m[2];
+        } catch (Throwable t) {
+            try {
+                U = AccessController.doPrivileged(new PrivilegedExceptionAction() {
                     @Override
-                    public Method[] run() {
-                        return new Method[]{
-                                getMethod(ClassLoader.class, "defineClass", String.class, byte[].class, Integer.TYPE, Integer.TYPE),
-                                getMethod(ClassLoader.class, "resolveClass", Class.class),
-                                getMethod(ClassLoader.class, "findLoadedClass", String.class)
-                        };
+                    public Object run() throws Exception {
+                        Class u = Class.forName("sun.misc.Unsafe");
+                        Field theUnsafe = u.getDeclaredField("theUnsafe");
+                        theUnsafe.setAccessible(true);
+                        return theUnsafe.get(null);
                     }
-                }
-        );
-        defineClass = m[0];
-        resolveClass = m[1];
-        findLoadedClass = m[2];
+                });
+                defineClass = AccessController.doPrivileged(new PrivilegedExceptionAction<Method>() {
+                    @Override
+                    public Method run() throws Exception {
+                        try {
+                            return U.getClass().getMethod("defineClass",
+                                    new Class[]{String.class,
+                                        byte[].class,
+                                        Integer.TYPE,
+                                        Integer.TYPE,
+                                        ClassLoader.class,
+                                        ProtectionDomain.class});
+                        } catch (NoSuchMethodException | SecurityException ex) {
+                            throw ex;
+                        }
+                    }
+                });
+            } catch (SecurityException | PrivilegedActionException ex) {
+                Logger.getLogger(Injector.class.getName()).log(Level.SEVERE, null, ex);
+            }
+        }
     }
 
     private static Method getMethod(final Class<?> c, final String methodname, final Class<?>... params) {
@@ -210,13 +248,11 @@
             rlocked = false;
 
             //find loaded class from classloader
-            if (c == null) {
+            if (c == null && findLoadedClass != null) {
 
                 try {
                     c = (Class) findLoadedClass.invoke(parent, className.replace('/', '.'));
-                } catch (IllegalArgumentException e) {
-                    logger.log(Level.FINE, "Unable to find " + className, e);
-                } catch (IllegalAccessException e) {
+                } catch (IllegalArgumentException | IllegalAccessException e) {
                     logger.log(Level.FINE, "Unable to find " + className, e);
                 } catch (InvocationTargetException e) {
                     Throwable t = e.getTargetException();
@@ -253,9 +289,13 @@
 
                     // we need to inject a class into the
                     try {
-                        c = (Class) defineClass.invoke(parent, className.replace('/', '.'), image, 0, image.length);
-                        resolveClass.invoke(parent, c);
-                    } catch (IllegalAccessException e) {
+                        if (resolveClass != null) {
+                            c = (Class) defineClass.invoke(parent, className.replace('/', '.'), image, 0, image.length);
+                            resolveClass.invoke(parent, c);
+                        } else {
+                            c = (Class) defineClass.invoke(U, className.replace('/', '.'), image, 0, image.length, parent, Injector.class.getProtectionDomain());
+                        }
+                    } catch (IllegalAccessException  e) {
                         logger.log(Level.FINE, "Unable to inject " + className, e);
                         return null;
                     } catch (InvocationTargetException e) {
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/jaxws/src/java.xml.bind/share/classes/com/sun/xml/internal/bind/v2/runtime/reflect/opt/package-info.java	Wed Jul 05 22:55:57 2017 +0200
@@ -0,0 +1,36 @@
+/*
+ * Copyright (c) 2017, Oracle and/or its affiliates. All rights reserved.
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * This code is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU General Public License version 2 only, as
+ * published by the Free Software Foundation.  Oracle designates this
+ * particular file as subject to the "Classpath" exception as provided
+ * by Oracle in the LICENSE file that accompanied this code.
+ *
+ * This code is distributed in the hope that it will be useful, but WITHOUT
+ * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
+ * version 2 for more details (a copy is included in the LICENSE file that
+ * accompanied this code).
+ *
+ * You should have received a copy of the GNU General Public License version
+ * 2 along with this work; if not, write to the Free Software Foundation,
+ * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
+ *
+ * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
+ * or visit www.oracle.com if you need additional information or have any
+ * questions.
+ */
+
+/**
+ * Hosts optimized
+ * {@link com.sun.xml.internal.bind.v2.runtime.reflect.Accessor},
+ * {@link com.sun.xml.internal.bind.v2.runtime.reflect.TransducedAccessor}, and {@link com.sun.xml.internal.bind.v2.runtime.Transducer}.
+ *
+ * <h2>How it works</h2>
+ * <p>
+ * Most of the classes in this package are "templates." At run-time, A template class file is slightly modified to match
+ * the target Java Bean, then it will be loaded into the VM.
+ */
+package com.sun.xml.internal.bind.v2.runtime.reflect.opt;
--- a/jaxws/src/java.xml.bind/share/classes/com/sun/xml/internal/bind/v2/runtime/reflect/opt/package.html	Fri Feb 24 19:48:33 2017 +0100
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,39 +0,0 @@
-<!--
- 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
- under the terms of the GNU General Public License version 2 only, as
- published by the Free Software Foundation.  Oracle designates this
- particular file as subject to the "Classpath" exception as provided
- by Oracle in the LICENSE file that accompanied this code.
-
- This code is distributed in the hope that it will be useful, but WITHOUT
- ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
- version 2 for more details (a copy is included in the LICENSE file that
- accompanied this code).
-
- You should have received a copy of the GNU General Public License version
- 2 along with this work; if not, write to the Free Software Foundation,
- Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
-
- Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
- or visit www.oracle.com if you need additional information or have any
- questions.
--->
-
-<html><body>
-
-
-Hosts optimized
-{@link com.sun.xml.internal.bind.v2.runtime.reflect.Accessor},
-{@link com.sun.xml.internal.bind.v2.runtime.reflect.TransducedAccessor}, and
-{@link com.sun.xml.internal.bind.v2.runtime.Transducer}.
-
-<h2>How it works</h2>
-<p>
-  Most of the classes in this package are "templates." At run-time,
-  A template class file is slightly modified to match the target Java Bean,
-  then it will be loaded into the VM.
-</body></html>
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/jaxws/src/java.xml.bind/share/classes/com/sun/xml/internal/bind/v2/runtime/reflect/package-info.java	Wed Jul 05 22:55:57 2017 +0200
@@ -0,0 +1,29 @@
+/*
+ * Copyright (c) 2017, Oracle and/or its affiliates. All rights reserved.
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * This code is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU General Public License version 2 only, as
+ * published by the Free Software Foundation.  Oracle designates this
+ * particular file as subject to the "Classpath" exception as provided
+ * by Oracle in the LICENSE file that accompanied this code.
+ *
+ * This code is distributed in the hope that it will be useful, but WITHOUT
+ * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
+ * version 2 for more details (a copy is included in the LICENSE file that
+ * accompanied this code).
+ *
+ * You should have received a copy of the GNU General Public License version
+ * 2 along with this work; if not, write to the Free Software Foundation,
+ * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
+ *
+ * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
+ * or visit www.oracle.com if you need additional information or have any
+ * questions.
+ */
+
+/**
+ * Abstraction around accessing data of actual objects.
+ */
+package com.sun.xml.internal.bind.v2.runtime.reflect;
--- a/jaxws/src/java.xml.bind/share/classes/com/sun/xml/internal/bind/v2/runtime/reflect/package.html	Fri Feb 24 19:48:33 2017 +0100
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,30 +0,0 @@
-<!--
- 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
- under the terms of the GNU General Public License version 2 only, as
- published by the Free Software Foundation.  Oracle designates this
- particular file as subject to the "Classpath" exception as provided
- by Oracle in the LICENSE file that accompanied this code.
-
- This code is distributed in the hope that it will be useful, but WITHOUT
- ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
- version 2 for more details (a copy is included in the LICENSE file that
- accompanied this code).
-
- You should have received a copy of the GNU General Public License version
- 2 along with this work; if not, write to the Free Software Foundation,
- Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
-
- Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
- or visit www.oracle.com if you need additional information or have any
- questions.
--->
-
-<html><body>
-
-
-  Abstraction around accessing data of actual objects.
-</body></html>
--- a/jaxws/src/java.xml.bind/share/classes/com/sun/xml/internal/bind/v2/runtime/unmarshaller/LocatorEx.java	Fri Feb 24 19:48:33 2017 +0100
+++ b/jaxws/src/java.xml.bind/share/classes/com/sun/xml/internal/bind/v2/runtime/unmarshaller/LocatorEx.java	Wed Jul 05 22:55:57 2017 +0200
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 1997, 2015, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 1997, 2017, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -33,7 +33,7 @@
 import org.w3c.dom.Node;
 
 /**
- * Object that returns the current location that the {@link com.sun.xml.internal.bind.v2.runtime.unmarshaller.XmlVisitor}
+ * Object that returns the current location that the {@code com.sun.xml.internal.bind.v2.runtime.unmarshaller.XmlVisitor}
  * is parsing.
  *
  * @author Kohsuke Kawaguchi
@@ -41,6 +41,7 @@
 public interface LocatorEx extends Locator {
     /**
      * Gets the current location in a {@link ValidationEventLocator} object.
+     * @return
      */
     ValidationEventLocator getLocation();
 
--- a/jaxws/src/java.xml.bind/share/classes/com/sun/xml/internal/bind/v2/runtime/unmarshaller/StructureLoader.java	Fri Feb 24 19:48:33 2017 +0100
+++ b/jaxws/src/java.xml.bind/share/classes/com/sun/xml/internal/bind/v2/runtime/unmarshaller/StructureLoader.java	Wed Jul 05 22:55:57 2017 +0200
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 1997, 2016, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 1997, 2017, Oracle and/or its affiliates. All rights reserved.
  * 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,7 +31,9 @@
 
 import javax.xml.namespace.QName;
 
+import com.sun.xml.internal.bind.Util;
 import com.sun.xml.internal.bind.api.AccessorException;
+import com.sun.xml.internal.bind.api.JAXBRIContext;
 import com.sun.xml.internal.bind.v2.WellKnownNamespace;
 import com.sun.xml.internal.bind.v2.runtime.ClassBeanInfoImpl;
 import com.sun.xml.internal.bind.v2.runtime.JAXBContextImpl;
@@ -231,11 +233,26 @@
     @Override
     public void childElement(UnmarshallingContext.State state, TagName arg) throws SAXException {
         ChildLoader child = childUnmarshallers.get(arg.uri,arg.local);
-        if (child == null) {
-            child = catchAll;
-            if (child==null) {
-                super.childElement(state,arg);
-                return;
+        if(child == null) {
+            Boolean backupWithParentNamespace = ((JAXBContextImpl) state.getContext().getJAXBContext()).backupWithParentNamespace;
+                        backupWithParentNamespace = backupWithParentNamespace != null
+                                        ? backupWithParentNamespace
+                                        : Boolean.parseBoolean(Util.getSystemProperty(JAXBRIContext.BACKUP_WITH_PARENT_NAMESPACE));
+            if ((beanInfo != null) && (beanInfo.getTypeNames() != null) && backupWithParentNamespace) {
+                Iterator<?> typeNamesIt = beanInfo.getTypeNames().iterator();
+                QName parentQName = null;
+                if ((typeNamesIt != null) && (typeNamesIt.hasNext()) && (catchAll == null)) {
+                    parentQName = (QName) typeNamesIt.next();
+                    String parentUri = parentQName.getNamespaceURI();
+                    child = childUnmarshallers.get(parentUri, arg.local);
+                }
+            }
+            if (child == null) {
+                child = catchAll;
+                if(child==null) {
+                    super.childElement(state,arg);
+                    return;
+                }
             }
         }
 
--- a/jaxws/src/java.xml.bind/share/classes/com/sun/xml/internal/bind/v2/schemagen/xmlschema/package-info.java	Fri Feb 24 19:48:33 2017 +0100
+++ b/jaxws/src/java.xml.bind/share/classes/com/sun/xml/internal/bind/v2/schemagen/xmlschema/package-info.java	Wed Jul 05 22:55:57 2017 +0200
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 1997, 2013, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 1997, 2017, Oracle and/or its affiliates. All rights reserved.
  * 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,5 +23,8 @@
  * questions.
  */
 
+/**
+ * XML Schema writer generated by TXW.
+ */
 @com.sun.xml.internal.txw2.annotation.XmlNamespace("http://www.w3.org/2001/XMLSchema")
 package com.sun.xml.internal.bind.v2.schemagen.xmlschema;
--- a/jaxws/src/java.xml.bind/share/classes/com/sun/xml/internal/bind/v2/schemagen/xmlschema/package.html	Fri Feb 24 19:48:33 2017 +0100
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,32 +0,0 @@
-<!--
- 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
- under the terms of the GNU General Public License version 2 only, as
- published by the Free Software Foundation.  Oracle designates this
- particular file as subject to the "Classpath" exception as provided
- by Oracle in the LICENSE file that accompanied this code.
-
- This code is distributed in the hope that it will be useful, but WITHOUT
- ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
- version 2 for more details (a copy is included in the LICENSE file that
- accompanied this code).
-
- You should have received a copy of the GNU General Public License version
- 2 along with this work; if not, write to the Free Software Foundation,
- Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
-
- Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
- or visit www.oracle.com if you need additional information or have any
- questions.
--->
-
-<html>
-
-
-<body>
-XML Schema writer generated by TXW.
-</body>
-</html>
--- a/jaxws/src/java.xml.bind/share/classes/javax/xml/bind/ContextFinder.java	Fri Feb 24 19:48:33 2017 +0100
+++ b/jaxws/src/java.xml.bind/share/classes/javax/xml/bind/ContextFinder.java	Wed Jul 05 22:55:57 2017 +0200
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2003, 2016, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2003, 2017, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -158,7 +158,7 @@
             Class spFactory = ServiceLoaderUtil.safeLoadClass(className, PLATFORM_DEFAULT_FACTORY_CLASS, classLoader);
             return newInstance(contextPath, spFactory, classLoader, properties);
         } catch (ClassNotFoundException x) {
-            throw new JAXBException(Messages.format(Messages.PROVIDER_NOT_FOUND, className), x);
+            throw new JAXBException(Messages.format(Messages.DEFAULT_PROVIDER_NOT_FOUND), x);
 
         } catch (RuntimeException | JAXBException x) {
             // avoid wrapping RuntimeException to JAXBException,
@@ -228,7 +228,7 @@
         }
     }
 
-    private static Object instantiateProviderIfNecessary(Class<?> implClass) throws JAXBException {
+    private static Object instantiateProviderIfNecessary(final Class<?> implClass) throws JAXBException {
         try {
             if (JAXBContextFactory.class.isAssignableFrom(implClass)) {
                 return AccessController.doPrivileged(new PrivilegedExceptionAction<Object>() {
@@ -254,7 +254,7 @@
         try {
             spi = ServiceLoaderUtil.safeLoadClass(className, PLATFORM_DEFAULT_FACTORY_CLASS, getContextClassLoader());
         } catch (ClassNotFoundException e) {
-            throw new JAXBException(e);
+            throw new JAXBException(Messages.format(Messages.DEFAULT_PROVIDER_NOT_FOUND), e);
         }
 
         if (logger.isLoggable(Level.FINE)) {
@@ -525,6 +525,7 @@
         } else {
             return (ClassLoader) java.security.AccessController.doPrivileged(
                     new java.security.PrivilegedAction() {
+                        @Override
                         public java.lang.Object run() {
                             return Thread.currentThread().getContextClassLoader();
                         }
@@ -539,6 +540,7 @@
         } else {
             return (ClassLoader) java.security.AccessController.doPrivileged(
                     new java.security.PrivilegedAction() {
+                        @Override
                         public java.lang.Object run() {
                             return c.getClassLoader();
                         }
@@ -552,6 +554,7 @@
         } else {
             return (ClassLoader) java.security.AccessController.doPrivileged(
                     new java.security.PrivilegedAction() {
+                        @Override
                         public java.lang.Object run() {
                             return ClassLoader.getSystemClassLoader();
                         }
--- a/jaxws/src/java.xml.bind/share/classes/javax/xml/bind/Messages.java	Fri Feb 24 19:48:33 2017 +0100
+++ b/jaxws/src/java.xml.bind/share/classes/javax/xml/bind/Messages.java	Wed Jul 05 22:55:57 2017 +0200
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2003, 2013, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2003, 2017, Oracle and/or its affiliates. All rights reserved.
  * 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,6 +65,9 @@
     static final String PROVIDER_NOT_FOUND = // 1 arg
         "ContextFinder.ProviderNotFound";
 
+    static final String DEFAULT_PROVIDER_NOT_FOUND = // 0 args
+        "ContextFinder.DefaultProviderNotFound";
+
     static final String COULD_NOT_INSTANTIATE = // 2 args
         "ContextFinder.CouldNotInstantiate";
 
--- a/jaxws/src/java.xml.bind/share/classes/javax/xml/bind/Messages.properties	Fri Feb 24 19:48:33 2017 +0100
+++ b/jaxws/src/java.xml.bind/share/classes/javax/xml/bind/Messages.properties	Wed Jul 05 22:55:57 2017 +0200
@@ -1,5 +1,5 @@
 #
-# Copyright (c) 2003, 2013, Oracle and/or its affiliates. All rights reserved.
+# Copyright (c) 2003, 2017, Oracle and/or its affiliates. All rights reserved.
 # 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,9 @@
 ContextFinder.ProviderNotFound = \
         Provider {0} not found
 
+ContextFinder.DefaultProviderNotFound = \
+        Implementation of JAXB-API has not been found on module path or classpath.
+
 ContextFinder.CouldNotInstantiate = \
         Provider {0} could not be instantiated: {1}
 
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/jaxws/src/java.xml.bind/share/classes/javax/xml/bind/annotation/adapters/package-info.java	Wed Jul 05 22:55:57 2017 +0200
@@ -0,0 +1,46 @@
+/*
+ * Copyright (c) 2017, Oracle and/or its affiliates. All rights reserved.
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * This code is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU General Public License version 2 only, as
+ * published by the Free Software Foundation.  Oracle designates this
+ * particular file as subject to the "Classpath" exception as provided
+ * by Oracle in the LICENSE file that accompanied this code.
+ *
+ * This code is distributed in the hope that it will be useful, but WITHOUT
+ * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
+ * version 2 for more details (a copy is included in the LICENSE file that
+ * accompanied this code).
+ *
+ * You should have received a copy of the GNU General Public License version
+ * 2 along with this work; if not, write to the Free Software Foundation,
+ * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
+ *
+ * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
+ * or visit www.oracle.com if you need additional information or have any
+ * questions.
+ */
+
+/**
+ * {@link javax.xml.bind.annotation.adapters.XmlAdapter} and its spec-defined
+ * sub-classes to allow arbitrary Java classes to be used with JAXB.
+ * <p>
+ * <h2>Package Specification</h2>
+ * <p>
+ * <ul>
+ * <li><a href="http://jcp.org/en/jsr/detail?id=222">JAXB Specification</a>
+ * </ul>
+ * <p>
+ * <h2>Related Documentation</h2>
+ * <p>
+ * For overviews, tutorials, examples, guides, and tool documentation,
+ * please see:
+ * <ul>
+ * <li>The <a href="http://jaxb.java.net">JAXB Website</a>
+ * </ul>
+ *
+ * @see <a href="http://jaxb.java.net">JAXB Website</a>
+ */
+package javax.xml.bind.annotation.adapters;
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/jaxws/src/java.xml.bind/share/classes/javax/xml/bind/helpers/package-info.java	Wed Jul 05 22:55:57 2017 +0200
@@ -0,0 +1,50 @@
+/*
+ * Copyright (c) 2017, Oracle and/or its affiliates. All rights reserved.
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * This code is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU General Public License version 2 only, as
+ * published by the Free Software Foundation.  Oracle designates this
+ * particular file as subject to the "Classpath" exception as provided
+ * by Oracle in the LICENSE file that accompanied this code.
+ *
+ * This code is distributed in the hope that it will be useful, but WITHOUT
+ * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
+ * version 2 for more details (a copy is included in the LICENSE file that
+ * accompanied this code).
+ *
+ * You should have received a copy of the GNU General Public License version
+ * 2 along with this work; if not, write to the Free Software Foundation,
+ * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
+ *
+ * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
+ * or visit www.oracle.com if you need additional information or have any
+ * questions.
+ */
+
+/**
+ * <B>JAXB Provider Use Only:</b> Provides partial default implementations for
+ * some of the <code>javax.xml.bind</code> interfaces.
+ * <p>
+ * <p>
+ * JAXB Providers can extend these classes and implement the abstract
+ * methods.
+ * <p>
+ * <h2>Package Specification</h2>
+ * <p>
+ * <ul>
+ * <li><a href="https://jaxb.java.net/">JAXB Specification</a>
+ * </ul>
+ * <p>
+ * <h2>Related Documentation</h2>
+ * <p>
+ * For overviews, tutorials, examples, guides, and tool documentation,
+ * please see:
+ * <ul>
+ * <li>The <a href="https://jaxb.java.net/">JAXB Website</a>
+ * </ul>
+ *
+ * @see <a href="https://jaxb.java.net/">JAXB Website</a>
+ */
+package javax.xml.bind.helpers;
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/jaxws/src/java.xml.bind/share/classes/javax/xml/bind/package-info.java	Wed Jul 05 22:55:57 2017 +0200
@@ -0,0 +1,51 @@
+/*
+ * Copyright (c) 2017, Oracle and/or its affiliates. All rights reserved.
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * This code is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU General Public License version 2 only, as
+ * published by the Free Software Foundation.  Oracle designates this
+ * particular file as subject to the "Classpath" exception as provided
+ * by Oracle in the LICENSE file that accompanied this code.
+ *
+ * This code is distributed in the hope that it will be useful, but WITHOUT
+ * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
+ * version 2 for more details (a copy is included in the LICENSE file that
+ * accompanied this code).
+ *
+ * You should have received a copy of the GNU General Public License version
+ * 2 along with this work; if not, write to the Free Software Foundation,
+ * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
+ *
+ * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
+ * or visit www.oracle.com if you need additional information or have any
+ * questions.
+ */
+
+/**
+ * Provides a runtime binding framework for client applications including
+ * unmarshalling, marshalling, and validation capabilities.
+ * <p>
+ * <p>
+ * <code>JAXBContext</code> is the client-entry point to the runtime binding
+ * framework.
+ * <p>
+ * <p>
+ * <h2>Package Specification</h2>
+ * <p>
+ * <ul>
+ * <li><a href="https://jaxb.java.net/">JAXB Specification</a>
+ * </ul>
+ * <p>
+ * <h2>Related Documentation</h2>
+ * <p>
+ * For overviews, tutorials, examples, guides, and tool documentation,
+ * please see:
+ * <ul>
+ * <li>The <a href="https://jaxb.java.net/">JAXB Website</a>
+ * </ul>
+ *
+ * @see <a href="https://jaxb.java.net/">JAXB Website</a>
+ */
+package javax.xml.bind;
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/jaxws/src/java.xml.bind/share/classes/javax/xml/bind/util/package-info.java	Wed Jul 05 22:55:57 2017 +0200
@@ -0,0 +1,45 @@
+/*
+ * Copyright (c) 2017, Oracle and/or its affiliates. All rights reserved.
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * This code is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU General Public License version 2 only, as
+ * published by the Free Software Foundation.  Oracle designates this
+ * particular file as subject to the "Classpath" exception as provided
+ * by Oracle in the LICENSE file that accompanied this code.
+ *
+ * This code is distributed in the hope that it will be useful, but WITHOUT
+ * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
+ * version 2 for more details (a copy is included in the LICENSE file that
+ * accompanied this code).
+ *
+ * You should have received a copy of the GNU General Public License version
+ * 2 along with this work; if not, write to the Free Software Foundation,
+ * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
+ *
+ * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
+ * or visit www.oracle.com if you need additional information or have any
+ * questions.
+ */
+
+/**
+ * Useful client utility classes.
+ * <p>
+ * <h2>Package Specification</h2>
+ * <p>
+ * <ul>
+ * <li><a href="https://jaxb.java.net/">JAXB Specification</a>
+ * </ul>
+ * <p>
+ * <h2>Related Documentation</h2>
+ * <p>
+ * For overviews, tutorials, examples, guides, and tool documentation,
+ * please see:
+ * <ul>
+ * <li>The <a href="https://jaxb.java.net/">JAXB Website</a>
+ * </ul>
+ *
+ * @see <a href="https://jaxb.java.net/">JAXB Website</a>
+ */
+package javax.xml.bind.util;
--- a/jaxws/src/java.xml.bind/share/classes/module-info.java	Fri Feb 24 19:48:33 2017 +0100
+++ b/jaxws/src/java.xml.bind/share/classes/module-info.java	Wed Jul 05 22:55:57 2017 +0200
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2014, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2014, 2017, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -25,6 +25,8 @@
 
 /**
  * Defines the Java Architecture for XML Binding (JAXB) API.
+ *
+ * @since 9
  */
 module java.xml.bind {
     requires transitive java.activation;
@@ -32,6 +34,7 @@
     requires java.compiler;
     requires java.desktop;
     requires java.logging;
+    requires jdk.unsupported;
 
     uses javax.xml.bind.JAXBContextFactory;
 
--- a/jaxws/src/java.xml.ws.annotation/share/classes/module-info.java	Fri Feb 24 19:48:33 2017 +0100
+++ b/jaxws/src/java.xml.ws.annotation/share/classes/module-info.java	Wed Jul 05 22:55:57 2017 +0200
@@ -26,6 +26,8 @@
 /**
  * Defines a subset of the Common Annotations API to support programs running
  * on the Java SE Platform.
+ *
+ * @since 9
  */
 module java.xml.ws.annotation {
     exports javax.annotation;
--- a/jaxws/src/java.xml.ws/share/classes/com/sun/xml/internal/messaging/saaj/LazyEnvelopeSource.java	Fri Feb 24 19:48:33 2017 +0100
+++ b/jaxws/src/java.xml.ws/share/classes/com/sun/xml/internal/messaging/saaj/LazyEnvelopeSource.java	Wed Jul 05 22:55:57 2017 +0200
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2014, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2014, 2017, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -39,8 +39,7 @@
 public interface LazyEnvelopeSource extends javax.xml.transform.Source {
     /**
      * Retrieve payload qname without materializing its contents
-     * @return
-     * @throws SOAPException
+     * @return payload QName
      */
     public QName getPayloadQName();
     public XMLStreamReader readToBodyStarTag() throws XMLStreamException;
--- a/jaxws/src/java.xml.ws/share/classes/com/sun/xml/internal/messaging/saaj/SOAPExceptionImpl.java	Fri Feb 24 19:48:33 2017 +0100
+++ b/jaxws/src/java.xml.ws/share/classes/com/sun/xml/internal/messaging/saaj/SOAPExceptionImpl.java	Wed Jul 05 22:55:57 2017 +0200
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 1997, 2013, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 1997, 2017, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -86,6 +86,7 @@
     /**
      * Constructs a <code>SOAPExceptionImpl</code> object initialized
      * with the given <code>Throwable</code> object.
+     * @param cause cause
      */
     public SOAPExceptionImpl(Throwable cause) {
         super (cause.toString());
@@ -106,6 +107,7 @@
      *         message of the embedded <code>Throwable</code> object,
      *         if there is one
      */
+    @Override
     public String getMessage() {
         String message = super.getMessage ();
         if (message == null && cause != null) {
@@ -124,6 +126,7 @@
      *         if there is none
      */
 
+    @Override
     public Throwable getCause() {
         return cause;
     }
@@ -157,6 +160,7 @@
      *         method has already been called on this <code>SOAPExceptionImpl</code>
      *         object
      */
+    @Override
     public synchronized Throwable initCause(Throwable cause)
     {
         if(this.cause != null) {
@@ -170,6 +174,7 @@
         return this;
     }
 
+    @Override
     public void printStackTrace() {
         super.printStackTrace();
         if (cause != null) {
@@ -178,6 +183,7 @@
         }
     }
 
+    @Override
     public void printStackTrace(PrintStream s) {
         super.printStackTrace(s);
         if (cause != null) {
@@ -186,6 +192,7 @@
         }
     }
 
+    @Override
     public void printStackTrace(PrintWriter s) {
         super.printStackTrace(s);
         if (cause != null) {
--- a/jaxws/src/java.xml.ws/share/classes/com/sun/xml/internal/messaging/saaj/client/p2p/HttpSOAPConnection.java	Fri Feb 24 19:48:33 2017 +0100
+++ b/jaxws/src/java.xml.ws/share/classes/com/sun/xml/internal/messaging/saaj/client/p2p/HttpSOAPConnection.java	Wed Jul 05 22:55:57 2017 +0200
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 1997, 2016, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 1997, 2017, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -512,9 +512,13 @@
                         : httpConnection.getInputStream());
                 // If no reply message is returned,
                 // content-Length header field value is expected to be zero.
-                // InputStream#available() can't be used here - it just says no data *YET*!
+                // java SE 6 documentation says :
+                // available() : an estimate of the number of bytes that can be read
+                //(or skipped over) from this input stream without blocking
+                //or 0 when it reaches the end of the input stream.
                 if ((httpIn == null )
-                        || (httpConnection.getContentLength() == 0)) {
+                        || (httpConnection.getContentLength() == 0)
+                        || (httpIn.available() == 0)) {
                     response = null;
                     log.warning("SAAJ0014.p2p.content.zero");
                 } else {
--- a/jaxws/src/java.xml.ws/share/classes/com/sun/xml/internal/messaging/saaj/packaging/mime/MultipartDataSource.java	Fri Feb 24 19:48:33 2017 +0100
+++ b/jaxws/src/java.xml.ws/share/classes/com/sun/xml/internal/messaging/saaj/packaging/mime/MultipartDataSource.java	Wed Jul 05 22:55:57 2017 +0200
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 1997, 2013, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 1997, 2017, Oracle and/or its affiliates. All rights reserved.
  * 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 @@
      * @return          the MimeBodyPart
      * @exception       IndexOutOfBoundsException if the given index
      *                  is out of range.
-     * @exception       MessagingException
+     * @exception       MessagingException thrown in case of error
      */
     public MimeBodyPart getBodyPart(int index) throws MessagingException;
 
--- a/jaxws/src/java.xml.ws/share/classes/com/sun/xml/internal/messaging/saaj/packaging/mime/internet/BMMimeMultipart.java	Fri Feb 24 19:48:33 2017 +0100
+++ b/jaxws/src/java.xml.ws/share/classes/com/sun/xml/internal/messaging/saaj/packaging/mime/internet/BMMimeMultipart.java	Wed Jul 05 22:55:57 2017 +0200
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 1997, 2013, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 1997, 2017, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -115,6 +115,8 @@
      * <code>contentType</code> field. <p>
      *
      * MimeBodyParts may be added later.
+     *
+     * @param subtype subtype.
      */
     public BMMimeMultipart(String subtype) {
         super(subtype);
@@ -142,7 +144,9 @@
      * skips the 'preamble' and reads bytes till the terminating
      * boundary and creates MimeBodyParts for each part of the stream.
      *
-     * @param   ds      DataSource, can be a MultipartDataSource
+     * @param   ds      DataSource, can be a MultipartDataSource.
+     * @param   ct      content type.
+     * @exception MessagingException in case of error.
      */
     public BMMimeMultipart(DataSource ds, ContentType ct)
         throws MessagingException {
@@ -197,6 +201,7 @@
      *
      * @since   JavaMail 1.2
      */
+    @Override
     protected  void parse() throws  MessagingException {
         if (parsed)
             return;
@@ -694,6 +699,7 @@
      * separated by a boundary.
      */
 
+    @Override
     public void writeTo(OutputStream os)
             throws IOException, MessagingException {
 
--- a/jaxws/src/java.xml.ws/share/classes/com/sun/xml/internal/messaging/saaj/packaging/mime/internet/ContentDisposition.java	Fri Feb 24 19:48:33 2017 +0100
+++ b/jaxws/src/java.xml.ws/share/classes/com/sun/xml/internal/messaging/saaj/packaging/mime/internet/ContentDisposition.java	Wed Jul 05 22:55:57 2017 +0200
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 1997, 2012, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 1997, 2017, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -100,6 +100,7 @@
     /**
      * Return the specified parameter value. Returns <code>null</code>
      * if this parameter is absent.
+     * @param name parameter name.
      * @return  parameter value
      * @since           JavaMail 1.2
      */
@@ -123,7 +124,7 @@
 
     /**
      * Set the primary type. Overrides existing primary type.
-     * @param   primaryType     primary type
+     * @param   disposition disposition value
      * @since           JavaMail 1.2
      */
     public void setDisposition(String disposition) {
@@ -162,6 +163,7 @@
      * @return  RFC2045 style string
      * @since           JavaMail 1.2
      */
+    @Override
     public String toString() {
         if (disposition == null)
             return null;
--- a/jaxws/src/java.xml.ws/share/classes/com/sun/xml/internal/messaging/saaj/packaging/mime/internet/ContentType.java	Fri Feb 24 19:48:33 2017 +0100
+++ b/jaxws/src/java.xml.ws/share/classes/com/sun/xml/internal/messaging/saaj/packaging/mime/internet/ContentType.java	Wed Jul 05 22:55:57 2017 +0200
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 1997, 2012, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 1997, 2017, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -136,6 +136,7 @@
     /**
      * Return the specified parameter value. Returns <code>null</code>
      * if this parameter is absent.
+     * @param name parameter name
      * @return  parameter value
      */
     public String getParameter(String name) {
@@ -200,6 +201,7 @@
      *
      * @return  RFC2045 style string
      */
+    @Override
     public String toString() {
         if (primaryType == null || subType == null) // need both
             return null;
@@ -218,7 +220,7 @@
     /**
      * Match with the specified ContentType object. This method
      * compares <strong>only the <code>primaryType</code> and
-     * <code>subType</code> </strong>. The parameters of both operands
+     * <code>primaryType</code> </strong>. The parameters of both operands
      * are ignored. <p>
      *
      * For example, this method will return <code>true</code> when
@@ -232,6 +234,8 @@
      * and <strong>"text/*" </strong>
      *
      * @param   cType to compare this against
+     * @return true if <code>primaryType</code> and <code>subType</code>
+     * match specified content type.
      */
     public boolean match(ContentType cType) {
         // Match primaryType
@@ -266,6 +270,10 @@
      * For example, this method will return <code>true</code> when
      * comparing the ContentType for <strong>"text/plain"</strong>
      * with <strong>"text/*" </strong>
+     *
+     * @param s content type
+     * @return true if <code>primaryType</code> and <code>subType</code>
+     * match specified content type.
      */
     public boolean match(String s) {
         try {
--- a/jaxws/src/java.xml.ws/share/classes/com/sun/xml/internal/messaging/saaj/packaging/mime/internet/HeaderTokenizer.java	Fri Feb 24 19:48:33 2017 +0100
+++ b/jaxws/src/java.xml.ws/share/classes/com/sun/xml/internal/messaging/saaj/packaging/mime/internet/HeaderTokenizer.java	Wed Jul 05 22:55:57 2017 +0200
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 1997, 2012, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 1997, 2017, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -95,14 +95,15 @@
          * one of the following:
          * <ul>
          * <li><code>ATOM</code> A sequence of ASCII characters
-         *      delimited by either SPACE, CTL, "(", <"> or the
-         *      specified SPECIALS
+         *      delimited by either SPACE, CTL, "(", &lt;"&gt; or the
+         *      specified SPECIALS</li>
          * <li><code>QUOTEDSTRING</code> A sequence of ASCII characters
-         *      within quotes
+         *      within quotes</li>
          * <li><code>COMMENT</code> A sequence of ASCII characters
-         *      within "(" and ")".
-         * <li><code>EOF</code> End of header
+         *      within "(" and ")".</li>
+         * <li><code>EOF</code> End of header</li>
          * </ul>
+         * @return type
          */
         public int getType() {
             return type;
@@ -176,6 +177,7 @@
      * Constructor. The RFC822 defined delimiters - RFC822 - are
      * used to delimit ATOMS. Also comments are skipped and not
      * returned as tokens
+     * @param header The header that is tokenized.
      */
     public HeaderTokenizer(String header)  {
         this(header, RFC822);
@@ -317,7 +319,7 @@
             currentPos++; // re-position currentPos
             char ch[] = new char[1];
             ch[0] = c;
-            return new Token((int)c, new String(ch));
+            return new Token(c, new String(ch));
         }
 
         // Check for ATOM
--- a/jaxws/src/java.xml.ws/share/classes/com/sun/xml/internal/messaging/saaj/packaging/mime/internet/InternetHeaders.java	Fri Feb 24 19:48:33 2017 +0100
+++ b/jaxws/src/java.xml.ws/share/classes/com/sun/xml/internal/messaging/saaj/packaging/mime/internet/InternetHeaders.java	Wed Jul 05 22:55:57 2017 +0200
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 1997, 2016, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 1997, 2017, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -48,13 +48,12 @@
  * until the blank line that indicates end of header. The input stream
  * is positioned at the start of the body. The lines are stored
  * within the object and can be extracted as either Strings or
- * {@link Header} objects. <p>
- * <p/>
+ * {@link Header} objects.
+ * <p>
  * This class is mostly intended for service providers. MimeMessage
- * and MimeBody use this class for holding their headers. <p>
- * <p/>
- * <hr> <strong>A note on RFC822 and MIME headers</strong><p>
- * <p/>
+ * and MimeBody use this class for holding their headers.
+ * <hr> <strong>A note on RFC822 and MIME headers</strong>
+ * <p>
  * RFC822 and MIME header fields <strong>must</strong> contain only
  * US-ASCII characters. If a header contains non US-ASCII characters,
  * it must be encoded as per the rules in RFC 2047. The MimeUtility
@@ -65,7 +64,7 @@
  * header fields must be folded (wrapped) before being sent if they
  * exceed the line length limitation for the transport (1000 bytes for
  * SMTP).  Received headers may have been folded.  The application is
- * responsible for folding and unfolding headers as appropriate. <p>
+ * responsible for folding and unfolding headers as appropriate.
  *
  * @author John Mani
  * @author Bill Shannon
@@ -90,12 +89,13 @@
      * Read and parse the given RFC822 message stream till the
      * blank line separating the header from the body. The input
      * stream is left positioned at the start of the body. The
-     * header lines are stored internally. <p>
-     * <p/>
+     * header lines are stored internally.
+     * <p>
      * For efficiency, wrap a BufferedInputStream around the actual
      * input stream and pass it as the parameter.
      *
      * @param   is RFC822 input stream
+     * @exception MessagingException in case of error
      */
     public InternetHeaders(InputStream is) throws MessagingException {
         load(is);
@@ -104,13 +104,14 @@
     /**
      * Read and parse the given RFC822 message stream till the
      * blank line separating the header from the body. Store the
-     * header lines inside this InternetHeaders object. <p>
-     * <p/>
+     * header lines inside this InternetHeaders object.
+     * <p>
      * Note that the header lines are added into this InternetHeaders
      * object, so any existing headers in this object will not be
      * affected.
      *
      * @param   is RFC822 input stream
+     * @exception MessagingException in case of error
      */
     public void load(InputStream is) throws MessagingException {
         // Read header lines until a blank line. It is valid
@@ -208,9 +209,9 @@
     /**
      * Change the first header line that matches name
      * to have value, adding a new header if no existing header
-     * matches. Remove all matching headers but the first. <p>
-     * <p/>
-     * Note that RFC822 headers can only contain US-ASCII characters
+     * matches. Remove all matching headers but the first.
+     * <p>
+     * Note that RFC822 headers can only contain US-ASCII characters.
      *
      * @param   name    header name
      * @param   value   header value
@@ -242,8 +243,7 @@
     }
 
     /**
-     * Add a header with the specified name and value to the header list. <p>
-     * <p/>
+     * Add a header with the specified name and value to the header list.
      * Note that RFC822 headers can only contain US-ASCII characters.
      *
      * @param   name    header name
@@ -285,15 +285,15 @@
      *
      * @return  Header objects
      */
-    public List<? extends Header> getAllHeaders() {
+    public FinalArrayList<hdr> getAllHeaders() {
         return headers; // conceptually it should be read-only, but for performance reason I'm not wrapping it here
     }
 
     /**
      * Add an RFC822 header line to the header store.
      * If the line starts with a space or tab (a continuation line),
-     * add it to the last header line in the list. <p>
-     * <p/>
+     * add it to the last header line in the list.
+     * <p>
      * Note that RFC822 headers can only contain US-ASCII characters
      *
      * @param   line    raw RFC822 header line
@@ -316,15 +316,19 @@
 
     /**
      * Return all the header lines as a collection
+     *
+     * @return list of header lines.
      */
     public List<String> getAllHeaderLines() {
         if(headerValueView==null)
             headerValueView = new AbstractList<String>() {
-                public String get(int index) {
+                @Override
+                                public String get(int index) {
                     return headers.get(index).line;
                 }
 
-                public int size() {
+                @Override
+                                public int size() {
                     return headers.size();
                 }
             };
@@ -368,6 +372,7 @@
     /*
      * Return the "name" part of the header line.
      */
+    @Override
     public String getName() {
         return name;
     }
@@ -375,6 +380,7 @@
     /*
      * Return the "value" part of the header line.
      */
+    @Override
     public String getValue() {
         int i = line.indexOf(':');
         if (i < 0)
--- a/jaxws/src/java.xml.ws/share/classes/com/sun/xml/internal/messaging/saaj/packaging/mime/internet/MimeBodyPart.java	Fri Feb 24 19:48:33 2017 +0100
+++ b/jaxws/src/java.xml.ws/share/classes/com/sun/xml/internal/messaging/saaj/packaging/mime/internet/MimeBodyPart.java	Wed Jul 05 22:55:57 2017 +0200
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 1997, 2016, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 1997, 2017, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -32,7 +32,6 @@
 package com.sun.xml.internal.messaging.saaj.packaging.mime.internet;
 
 
-import com.sun.xml.internal.messaging.saaj.packaging.mime.Header;
 import com.sun.xml.internal.messaging.saaj.packaging.mime.MessagingException;
 import com.sun.xml.internal.messaging.saaj.packaging.mime.util.OutputUtil;
 import com.sun.xml.internal.messaging.saaj.util.ByteOutputStream;
@@ -52,12 +51,12 @@
 /**
  * This class represents a MIME body part.
  * MimeBodyParts are contained in <code>MimeMultipart</code>
- * objects. <p>
+ * objects.
+ * <p>
+ * MimeBodyPart uses the <code>InternetHeaders</code> class to parse
+ * and store the headers of that body part.
  *
- * MimeBodyPart uses the <code>InternetHeaders</code> class to parse
- * and store the headers of that body part. <p>
- *
- * <hr><strong>A note on RFC 822 and MIME headers</strong><p>
+ * <hr><strong>A note on RFC 822 and MIME headers</strong>
  *
  * RFC 822 header fields <strong>must</strong> contain only
  * US-ASCII characters. MIME allows non ASCII characters to be present
@@ -70,7 +69,7 @@
  * header fields must be folded (wrapped) before being sent if they
  * exceed the line length limitation for the transport (1000 bytes for
  * SMTP).  Received headers may have been folded.  The application is
- * responsible for folding and unfolding headers as appropriate. <p>
+ * responsible for folding and unfolding headers as appropriate.
  *
  * @author John Mani
  * @author Bill Shannon
@@ -179,6 +178,8 @@
      * the delimiter strings.
      *
      * @param   is      the body part Input Stream
+     *
+     * @exception MessagingException in case of error
      */
     public MimeBodyPart(InputStream is) throws MessagingException {
         if (!(is instanceof ByteArrayInputStream) &&
@@ -216,6 +217,7 @@
      *
      * @param   headers The header of this part
      * @param   content bytes representing the body of this part.
+     * @param   len content length.
      */
     public MimeBodyPart(InternetHeaders headers, byte[] content, int len) {
         this.headers = headers;
@@ -242,6 +244,7 @@
     /**
      * Return the containing <code>MimeMultipart</code> object,
      * or <code>null</code> if not known.
+     * @return parent part.
      */
     public MimeMultipart getParent() {
         return parent;
@@ -253,6 +256,7 @@
      * <code>addBodyPart</code> method.  <code>parent</code> may be
      * <code>null</code> if the <code>MimeBodyPart</code> is being removed
      * from its containing <code>MimeMultipart</code>.
+     * @param parent parent part
      * @since   JavaMail 1.1
      */
     public void setParent(MimeMultipart parent) {
@@ -351,6 +355,9 @@
      * If the <code>subType</code> of <code>mimeType</code> is the
      * special character '*', then the subtype is ignored during the
      * comparison.
+     *
+     * @param mimeType string
+     * @return true if it is valid mime type
      */
     public boolean isMimeType(String mimeType) {
         boolean result;
@@ -375,6 +382,9 @@
      * This implementation uses <code>getHeader(name)</code>
      * to obtain the requisite header field.
      *
+     * @return content disposition
+     * @exception MessagingException in case of error
+     *
      * @see #headers
      */
     public String getDisposition() throws MessagingException {
@@ -392,6 +402,9 @@
      * If the disposition is null, any existing "Content-Disposition"
      * header field is removed.
      *
+     * @param disposition value
+     *
+     * @exception MessagingException in case of error
      * @exception       IllegalStateException if this body part is
      *                  obtained from a READ_ONLY folder.
      */
@@ -423,6 +436,9 @@
      * This implementation uses <code>getHeader(name)</code>
      * to obtain the requisite header field.
      *
+     * @return encoding
+     * @exception MessagingException in case of error
+     *
      * @see #headers
      */
     public String getEncoding() throws MessagingException {
@@ -465,6 +481,8 @@
      *
      * This implementation uses <code>getHeader(name)</code>
      * to obtain the requisite header field.
+     *
+     * @return conent id
      */
     public String getContentID() {
         return getHeader("Content-ID", null);
@@ -475,6 +493,7 @@
      * If the <code>cid</code> parameter is null, any existing
      * "Content-ID" is removed.
      *
+     * @param cid content id
      * @exception       IllegalStateException if this body part is
      *                  obtained from a READ_ONLY folder.
      * @since           JavaMail 1.3
@@ -493,6 +512,8 @@
      *
      * This implementation uses <code>getHeader(name)</code>
      * to obtain the requisite header field.
+     *
+     * @return content MD5 sum
      */
     public String getContentMD5() {
         return getHeader("Content-MD5", null);
@@ -501,6 +522,8 @@
     /**
      * Set the "Content-MD5" header field of this body part.
      *
+     * @param md5 content md5 sum
+     *
      * @exception       IllegalStateException if this body part is
      *                  obtained from a READ_ONLY folder.
      */
@@ -516,6 +539,9 @@
      *
      * This implementation uses <code>getHeader(name)</code>
      * to obtain the requisite header field.
+     *
+     * @return array of language tags
+     * @exception MessagingException in case of error
      */
     public String[] getContentLanguage() throws MessagingException {
         String s = getHeader("Content-Language", null);
@@ -663,6 +689,7 @@
      * Returns <code>null</code> if both are absent.
      *
      * @return  filename
+     * @exception MessagingException in case of error
      */
     public String getFileName() throws MessagingException {
         String filename = null;
@@ -692,6 +719,9 @@
      * Sets the "filename" parameter of the "Content-Disposition"
      * header field of this body part.
      *
+     * @param filename filename
+     *
+     * @exception MessagingException in case of error
      * @exception       IllegalStateException if this body part is
      *                  obtained from a READ_ONLY folder.
      */
@@ -769,9 +799,14 @@
      * This implementation simply calls the <code>getContentStream</code>
      * method.
      *
+     * @return input stream
+     *
+     * @exception MessagingException in case of error
+     *
      * @see     #getInputStream
      * @see     #getContentStream
      * @since   JavaMail 1.2
+     *
      */
     public InputStream getRawInputStream() throws MessagingException {
         return getContentStream();
@@ -782,24 +817,30 @@