--- a/.hgtags Mon Mar 05 01:22:36 2018 +0000
+++ b/.hgtags Mon Mar 05 13:11:21 2018 -0800
@@ -473,3 +473,4 @@
03ae177c26b016353e5ea1cab6ffd051dfa086ca jdk-11+2
663f20fc51091bd7f95d18448850ba091207b7bd jdk-10+44
4f96cf952e71cb8a127334494faf28880c26181b jdk-10+45
+1fd4d6068f54561cfc67d54fc9ca84af7212c4f8 jdk-11+3
--- a/make/CompileJavaModules.gmk Mon Mar 05 01:22:36 2018 +0000
+++ b/make/CompileJavaModules.gmk Mon Mar 05 13:11:21 2018 -0800
@@ -252,6 +252,10 @@
################################################################################
+java.transaction.xa_ADD_JAVAC_FLAGS += -Xdoclint:all/protected '-Xdoclint/package:javax.*'
+
+################################################################################
+
java.sql_ADD_JAVAC_FLAGS += -Xdoclint:all/protected '-Xdoclint/package:java.*,javax.*'
java.sql_SETUP := GENERATE_JDKBYTECODE_NOWARNINGS
--- a/make/autoconf/configure.ac Mon Mar 05 01:22:36 2018 +0000
+++ b/make/autoconf/configure.ac Mon Mar 05 13:11:21 2018 -0800
@@ -163,10 +163,9 @@
# First determine the toolchain type (compiler family)
TOOLCHAIN_DETERMINE_TOOLCHAIN_TYPE
-# User supplied flags should be used when configure detects compilers
-FLAGS_SETUP_USER_SUPPLIED_FLAGS
-# The sysroot cflags are needed for configure to be able to run the compilers
-FLAGS_SETUP_SYSROOT_FLAGS
+# The global flags are needed for configure to be able to run the compilers
+# correctly.
+FLAGS_PRE_TOOLCHAIN
# Then detect the actual binaries needed
TOOLCHAIN_PRE_DETECTION
@@ -184,17 +183,15 @@
# Setup Jib dependency tool
TOOLCHAIN_SETUP_JIB
-FLAGS_SETUP_INIT_FLAGS
+# After toolchain setup, we need to process some flags to be able to continue.
+FLAGS_POST_TOOLCHAIN
# Now we can test some aspects on the target using configure macros.
PLATFORM_SETUP_OPENJDK_TARGET_BITS
PLATFORM_SETUP_OPENJDK_TARGET_ENDIANNESS
# Configure flags for the tools
-FLAGS_SETUP_COMPILER_FLAGS_FOR_LIBS
-FLAGS_SETUP_COMPILER_FLAGS_FOR_OPTIMIZATION
-FLAGS_SETUP_COMPILER_FLAGS_FOR_JDK
-FLAGS_SETUP_COMPILER_FLAGS_MISC
+FLAGS_SETUP_FLAGS
# Setup debug symbols (need objcopy from the toolchain for that)
JDKOPT_SETUP_DEBUG_SYMBOLS
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/make/autoconf/flags-cflags.m4 Mon Mar 05 13:11:21 2018 -0800
@@ -0,0 +1,899 @@
+#
+# Copyright (c) 2011, 2018, Oracle and/or its affiliates. All rights reserved.
+# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+#
+# This code is free software; you can redistribute it and/or modify it
+# under the terms of the GNU General Public License version 2 only, as
+# published by the Free Software Foundation. Oracle designates this
+# particular file as subject to the "Classpath" exception as provided
+# by Oracle in the LICENSE file that accompanied this code.
+#
+# This code is distributed in the hope that it will be useful, but WITHOUT
+# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+# FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
+# version 2 for more details (a copy is included in the LICENSE file that
+# accompanied this code).
+#
+# You should have received a copy of the GNU General Public License version
+# 2 along with this work; if not, write to the Free Software Foundation,
+# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
+#
+# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
+# or visit www.oracle.com if you need additional information or have any
+# questions.
+#
+
+################################################################################
+#
+# Setup flags for C/C++ compiler
+#
+
+###############################################################################
+#
+# How to compile shared libraries.
+#
+AC_DEFUN([FLAGS_SETUP_SHARED_LIBS],
+[
+ if test "x$TOOLCHAIN_TYPE" = xgcc; then
+ C_FLAG_REORDER=''
+
+ # Default works for linux, might work on other platforms as well.
+ SHARED_LIBRARY_FLAGS='-shared'
+ SET_EXECUTABLE_ORIGIN='-Wl,-rpath,\$$ORIGIN[$]1'
+ SET_SHARED_LIBRARY_ORIGIN="-Wl,-z,origin $SET_EXECUTABLE_ORIGIN"
+ SET_SHARED_LIBRARY_NAME='-Wl,-soname=[$]1'
+ SET_SHARED_LIBRARY_MAPFILE='-Wl,-version-script=[$]1'
+
+ elif test "x$TOOLCHAIN_TYPE" = xclang; then
+ C_FLAG_REORDER=''
+
+ if test "x$OPENJDK_TARGET_OS" = xmacosx; then
+ # Linking is different on MacOSX
+ SHARED_LIBRARY_FLAGS="-dynamiclib -compatibility_version 1.0.0 -current_version 1.0.0"
+ SET_EXECUTABLE_ORIGIN='-Wl,-rpath,@loader_path$(or [$]1,/.)'
+ SET_SHARED_LIBRARY_ORIGIN="$SET_EXECUTABLE_ORIGIN"
+ SET_SHARED_LIBRARY_NAME='-Wl,-install_name,@rpath/[$]1'
+ SET_SHARED_LIBRARY_MAPFILE='-Wl,-exported_symbols_list,[$]1'
+
+ else
+ # Default works for linux, might work on other platforms as well.
+ SHARED_LIBRARY_FLAGS='-shared'
+ SET_EXECUTABLE_ORIGIN='-Wl,-rpath,\$$ORIGIN[$]1'
+ SET_SHARED_LIBRARY_NAME='-Wl,-soname=[$]1'
+ SET_SHARED_LIBRARY_MAPFILE='-Wl,-version-script=[$]1'
+
+ # arm specific settings
+ if test "x$OPENJDK_TARGET_CPU" = "xarm"; then
+ # '-Wl,-z,origin' isn't used on arm.
+ SET_SHARED_LIBRARY_ORIGIN='-Wl,-rpath,\$$$$ORIGIN[$]1'
+ else
+ SET_SHARED_LIBRARY_ORIGIN="-Wl,-z,origin $SET_EXECUTABLE_ORIGIN"
+ fi
+ fi
+
+ elif test "x$TOOLCHAIN_TYPE" = xsolstudio; then
+ C_FLAG_REORDER='-xF'
+ SHARED_LIBRARY_FLAGS="-G"
+ SET_EXECUTABLE_ORIGIN='-R\$$ORIGIN[$]1'
+ SET_SHARED_LIBRARY_ORIGIN="$SET_EXECUTABLE_ORIGIN"
+ SET_SHARED_LIBRARY_NAME='-h [$]1'
+ SET_SHARED_LIBRARY_MAPFILE='-M[$]1'
+
+ elif test "x$TOOLCHAIN_TYPE" = xxlc; then
+ C_FLAG_REORDER=''
+ SHARED_LIBRARY_FLAGS="-qmkshrobj -bM:SRE -bnoentry"
+ SET_EXECUTABLE_ORIGIN=""
+ SET_SHARED_LIBRARY_ORIGIN=''
+ SET_SHARED_LIBRARY_NAME=''
+ SET_SHARED_LIBRARY_MAPFILE=''
+
+ elif test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
+ C_FLAG_REORDER=''
+ SHARED_LIBRARY_FLAGS="-dll"
+ SET_EXECUTABLE_ORIGIN=''
+ SET_SHARED_LIBRARY_ORIGIN=''
+ SET_SHARED_LIBRARY_NAME=''
+ SET_SHARED_LIBRARY_MAPFILE='-def:[$]1'
+ fi
+
+ AC_SUBST(C_FLAG_REORDER)
+ AC_SUBST(SET_EXECUTABLE_ORIGIN)
+ AC_SUBST(SET_SHARED_LIBRARY_ORIGIN)
+ AC_SUBST(SET_SHARED_LIBRARY_NAME)
+ AC_SUBST(SET_SHARED_LIBRARY_MAPFILE)
+ AC_SUBST(SHARED_LIBRARY_FLAGS)
+])
+
+AC_DEFUN([FLAGS_SETUP_DEBUG_SYMBOLS],
+[
+ # Debug symbols
+ if test "x$TOOLCHAIN_TYPE" = xgcc; then
+ if test "x$OPENJDK_TARGET_CPU_BITS" = "x64" && test "x$DEBUG_LEVEL" = "xfastdebug"; then
+ CFLAGS_DEBUG_SYMBOLS="-g1"
+ else
+ CFLAGS_DEBUG_SYMBOLS="-g"
+ fi
+ elif test "x$TOOLCHAIN_TYPE" = xclang; then
+ CFLAGS_DEBUG_SYMBOLS="-g"
+ elif test "x$TOOLCHAIN_TYPE" = xsolstudio; then
+ CFLAGS_DEBUG_SYMBOLS="-g -xs"
+ # -g0 enables debug symbols without disabling inlining.
+ CXXFLAGS_DEBUG_SYMBOLS="-g0 -xs"
+ elif test "x$TOOLCHAIN_TYPE" = xxlc; then
+ CFLAGS_DEBUG_SYMBOLS="-g"
+ elif test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
+ CFLAGS_DEBUG_SYMBOLS="-Zi"
+ fi
+
+ if test "x$CXXFLAGS_DEBUG_SYMBOLS" = x; then
+ # If we did not specify special flags for C++, use C version
+ CXXFLAGS_DEBUG_SYMBOLS="$CFLAGS_DEBUG_SYMBOLS"
+ fi
+ AC_SUBST(CFLAGS_DEBUG_SYMBOLS)
+ AC_SUBST(CXXFLAGS_DEBUG_SYMBOLS)
+
+ # FIXME: This was never used in the old build. What to do with it?
+ if test "x$TOOLCHAIN_TYPE" = xgcc; then
+ # "-Og" suppported for GCC 4.8 and later
+ CFLAG_OPTIMIZE_DEBUG_FLAG="-Og"
+ FLAGS_COMPILER_CHECK_ARGUMENTS(ARGUMENT: [$CFLAG_OPTIMIZE_DEBUG_FLAG],
+ IF_TRUE: [HAS_CFLAG_OPTIMIZE_DEBUG=true],
+ IF_FALSE: [HAS_CFLAG_OPTIMIZE_DEBUG=false])
+ fi
+
+ # Debug symbols for JVM_CFLAGS
+ if test "x$TOOLCHAIN_TYPE" = xsolstudio; then
+ JVM_CFLAGS_SYMBOLS="$JVM_CFLAGS_SYMBOLS -xs"
+ if test "x$DEBUG_LEVEL" = xslowdebug; then
+ JVM_CFLAGS_SYMBOLS="$JVM_CFLAGS_SYMBOLS -g"
+ else
+ # -g0 does not disable inlining, which -g does.
+ JVM_CFLAGS_SYMBOLS="$JVM_CFLAGS_SYMBOLS -g0"
+ fi
+ elif test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
+ JVM_CFLAGS_SYMBOLS="$JVM_CFLAGS_SYMBOLS -Z7 -d2Zi+"
+ else
+ JVM_CFLAGS_SYMBOLS="$JVM_CFLAGS_SYMBOLS -g"
+ fi
+ AC_SUBST(JVM_CFLAGS_SYMBOLS)
+])
+
+AC_DEFUN([FLAGS_SETUP_WARNINGS],
+[
+ AC_ARG_ENABLE([warnings-as-errors], [AS_HELP_STRING([--disable-warnings-as-errors],
+ [do not consider native warnings to be an error @<:@enabled@:>@])])
+
+ AC_MSG_CHECKING([if native warnings are errors])
+ if test "x$enable_warnings_as_errors" = "xyes"; then
+ AC_MSG_RESULT([yes (explicitly set)])
+ WARNINGS_AS_ERRORS=true
+ elif test "x$enable_warnings_as_errors" = "xno"; then
+ AC_MSG_RESULT([no])
+ WARNINGS_AS_ERRORS=false
+ elif test "x$enable_warnings_as_errors" = "x"; then
+ AC_MSG_RESULT([yes (default)])
+ WARNINGS_AS_ERRORS=true
+ else
+ AC_MSG_ERROR([--enable-warnings-as-errors accepts no argument])
+ fi
+
+ AC_SUBST(WARNINGS_AS_ERRORS)
+
+ case "${TOOLCHAIN_TYPE}" in
+ microsoft)
+ DISABLE_WARNING_PREFIX="-wd"
+ CFLAGS_WARNINGS_ARE_ERRORS="-WX"
+ ;;
+ solstudio)
+ DISABLE_WARNING_PREFIX="-erroff="
+ CFLAGS_WARNINGS_ARE_ERRORS="-errtags -errwarn=%all"
+ ;;
+ gcc)
+ # Prior to gcc 4.4, a -Wno-X where X is unknown for that version of gcc will cause an error
+ FLAGS_COMPILER_CHECK_ARGUMENTS(ARGUMENT: [-Wno-this-is-a-warning-that-do-not-exist],
+ IF_TRUE: [GCC_CAN_DISABLE_WARNINGS=true],
+ IF_FALSE: [GCC_CAN_DISABLE_WARNINGS=false]
+ )
+ if test "x$GCC_CAN_DISABLE_WARNINGS" = "xtrue"; then
+ DISABLE_WARNING_PREFIX="-Wno-"
+ else
+ DISABLE_WARNING_PREFIX=
+ fi
+ CFLAGS_WARNINGS_ARE_ERRORS="-Werror"
+ # Repeate the check for the BUILD_CC and BUILD_CXX. Need to also reset
+ # CFLAGS since any target specific flags will likely not work with the
+ # build compiler
+ CC_OLD="$CC"
+ CXX_OLD="$CXX"
+ CC="$BUILD_CC"
+ CXX="$BUILD_CXX"
+ CFLAGS_OLD="$CFLAGS"
+ CFLAGS=""
+ FLAGS_COMPILER_CHECK_ARGUMENTS(ARGUMENT: [-Wno-this-is-a-warning-that-do-not-exist],
+ IF_TRUE: [BUILD_CC_CAN_DISABLE_WARNINGS=true],
+ IF_FALSE: [BUILD_CC_CAN_DISABLE_WARNINGS=false]
+ )
+ if test "x$BUILD_CC_CAN_DISABLE_WARNINGS" = "xtrue"; then
+ BUILD_CC_DISABLE_WARNING_PREFIX="-Wno-"
+ else
+ BUILD_CC_DISABLE_WARNING_PREFIX=
+ fi
+ CC="$CC_OLD"
+ CXX="$CXX_OLD"
+ CFLAGS="$CFLAGS_OLD"
+ ;;
+ clang)
+ DISABLE_WARNING_PREFIX="-Wno-"
+ CFLAGS_WARNINGS_ARE_ERRORS="-Werror"
+ ;;
+ xlc)
+ DISABLE_WARNING_PREFIX="-qsuppress="
+ CFLAGS_WARNINGS_ARE_ERRORS="-qhalt=w"
+ ;;
+ esac
+ AC_SUBST(DISABLE_WARNING_PREFIX)
+ AC_SUBST(BUILD_CC_DISABLE_WARNING_PREFIX)
+ AC_SUBST(CFLAGS_WARNINGS_ARE_ERRORS)
+])
+
+AC_DEFUN([FLAGS_SETUP_QUALITY_CHECKS],
+[
+ # bounds, memory and behavior checking options
+ if test "x$TOOLCHAIN_TYPE" = xgcc; then
+ case $DEBUG_LEVEL in
+ release )
+ # no adjustment
+ ;;
+ fastdebug )
+ # no adjustment
+ ;;
+ slowdebug )
+ # FIXME: By adding this to C(XX)FLAGS_DEBUG_OPTIONS/JVM_CFLAGS_SYMBOLS it
+ # get's added conditionally on whether we produce debug symbols or not.
+ # This is most likely not really correct.
+
+ # Add runtime stack smashing and undefined behavior checks.
+ # Not all versions of gcc support -fstack-protector
+ STACK_PROTECTOR_CFLAG="-fstack-protector-all"
+ FLAGS_COMPILER_CHECK_ARGUMENTS(ARGUMENT: [$STACK_PROTECTOR_CFLAG -Werror],
+ IF_FALSE: [STACK_PROTECTOR_CFLAG=""])
+
+ CFLAGS_DEBUG_OPTIONS="$STACK_PROTECTOR_CFLAG --param ssp-buffer-size=1"
+ CXXFLAGS_DEBUG_OPTIONS="$STACK_PROTECTOR_CFLAG --param ssp-buffer-size=1"
+
+ if test "x$STACK_PROTECTOR_CFLAG" != x; then
+ JVM_CFLAGS_SYMBOLS="$JVM_CFLAGS_SYMBOLS $STACK_PROTECTOR_CFLAG --param ssp-buffer-size=1"
+ fi
+ ;;
+ esac
+ fi
+])
+
+AC_DEFUN([FLAGS_SETUP_OPTIMIZATION],
+[
+ if test "x$TOOLCHAIN_TYPE" = xsolstudio; then
+ CC_HIGHEST="-fns -fsimple -fsingle -xbuiltin=%all -xdepend -xrestrict -xlibmil"
+
+ C_O_FLAG_HIGHEST_JVM="-xO4"
+ C_O_FLAG_DEBUG_JVM=""
+ C_O_FLAG_SIZE=""
+ C_O_FLAG_DEBUG=""
+ C_O_FLAG_NONE=""
+ if test "x$OPENJDK_TARGET_CPU_ARCH" = "xx86"; then
+ C_O_FLAG_HIGHEST="-xO4 -Wu,-O4~yz $CC_HIGHEST"
+ C_O_FLAG_HI="-xO4 -Wu,-O4~yz"
+ C_O_FLAG_NORM="-xO2 -Wu,-O2~yz"
+ elif test "x$OPENJDK_TARGET_CPU_ARCH" = "xsparc"; then
+ C_O_FLAG_HIGHEST="-xO4 -Wc,-Qrm-s -Wc,-Qiselect-T0 \
+ -xprefetch=auto,explicit -xchip=ultra $CC_HIGHEST"
+ C_O_FLAG_HI="-xO4 -Wc,-Qrm-s -Wc,-Qiselect-T0"
+ C_O_FLAG_NORM="-xO2 -Wc,-Qrm-s -Wc,-Qiselect-T0"
+ fi
+ elif test "x$TOOLCHAIN_TYPE" = xgcc; then
+ C_O_FLAG_HIGHEST_JVM="-O3"
+ C_O_FLAG_HIGHEST="-O3"
+ C_O_FLAG_HI="-O3"
+ C_O_FLAG_NORM="-O2"
+ C_O_FLAG_SIZE="-Os"
+ C_O_FLAG_DEBUG="-O0"
+ C_O_FLAG_DEBUG_JVM="-O0"
+ C_O_FLAG_NONE="-O0"
+ elif test "x$TOOLCHAIN_TYPE" = xclang; then
+ if test "x$OPENJDK_TARGET_OS" = xmacosx; then
+ # On MacOSX we optimize for size, something
+ # we should do for all platforms?
+ C_O_FLAG_HIGHEST_JVM="-Os"
+ C_O_FLAG_HIGHEST="-Os"
+ C_O_FLAG_HI="-Os"
+ C_O_FLAG_NORM="-Os"
+ C_O_FLAG_DEBUG_JVM=""
+ else
+ C_O_FLAG_HIGHEST_JVM="-O3"
+ C_O_FLAG_HIGHEST="-O3"
+ C_O_FLAG_HI="-O3"
+ C_O_FLAG_NORM="-O2"
+ C_O_FLAG_DEBUG_JVM="-O0"
+ fi
+ C_O_FLAG_SIZE="-Os"
+ C_O_FLAG_DEBUG="-O0"
+ C_O_FLAG_NONE="-O0"
+ elif test "x$TOOLCHAIN_TYPE" = xxlc; then
+ C_O_FLAG_HIGHEST_JVM="-O3 -qhot=level=1 -qinline -qinlglue"
+ C_O_FLAG_HIGHEST="-O3 -qhot=level=1 -qinline -qinlglue"
+ C_O_FLAG_HI="-O3 -qinline -qinlglue"
+ C_O_FLAG_NORM="-O2"
+ C_O_FLAG_DEBUG="-qnoopt"
+ # FIXME: Value below not verified.
+ C_O_FLAG_DEBUG_JVM=""
+ C_O_FLAG_NONE="-qnoopt"
+ elif test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
+ C_O_FLAG_HIGHEST_JVM="-O2 -Oy-"
+ C_O_FLAG_HIGHEST="-O2"
+ C_O_FLAG_HI="-O1"
+ C_O_FLAG_NORM="-O1"
+ C_O_FLAG_DEBUG="-Od"
+ C_O_FLAG_DEBUG_JVM=""
+ C_O_FLAG_NONE="-Od"
+ C_O_FLAG_SIZE="-Os"
+ fi
+
+ # Now copy to C++ flags
+ CXX_O_FLAG_HIGHEST_JVM="$C_O_FLAG_HIGHEST_JVM"
+ CXX_O_FLAG_HIGHEST="$C_O_FLAG_HIGHEST"
+ CXX_O_FLAG_HI="$C_O_FLAG_HI"
+ CXX_O_FLAG_NORM="$C_O_FLAG_NORM"
+ CXX_O_FLAG_DEBUG="$C_O_FLAG_DEBUG"
+ CXX_O_FLAG_DEBUG_JVM="$C_O_FLAG_DEBUG_JVM"
+ CXX_O_FLAG_NONE="$C_O_FLAG_NONE"
+ CXX_O_FLAG_SIZE="$C_O_FLAG_SIZE"
+
+ if test "x$TOOLCHAIN_TYPE" = xsolstudio; then
+ # In solstudio, also add this to C (but not C++) flags...
+ C_O_FLAG_HIGHEST="$C_O_FLAG_HIGHEST -xalias_level=basic"
+ fi
+
+ # Adjust optimization flags according to debug level.
+ case $DEBUG_LEVEL in
+ release )
+ # no adjustment
+ ;;
+ fastdebug )
+ # Not quite so much optimization
+ C_O_FLAG_HI="$C_O_FLAG_NORM"
+ CXX_O_FLAG_HI="$CXX_O_FLAG_NORM"
+ ;;
+ slowdebug )
+ # Disable optimization
+ C_O_FLAG_HIGHEST_JVM="$C_O_FLAG_DEBUG_JVM"
+ C_O_FLAG_HIGHEST="$C_O_FLAG_DEBUG"
+ C_O_FLAG_HI="$C_O_FLAG_DEBUG"
+ C_O_FLAG_NORM="$C_O_FLAG_DEBUG"
+ C_O_FLAG_SIZE="$C_O_FLAG_DEBUG"
+ CXX_O_FLAG_HIGHEST_JVM="$CXX_O_FLAG_DEBUG_JVM"
+ CXX_O_FLAG_HIGHEST="$CXX_O_FLAG_DEBUG"
+ CXX_O_FLAG_HI="$CXX_O_FLAG_DEBUG"
+ CXX_O_FLAG_NORM="$CXX_O_FLAG_DEBUG"
+ CXX_O_FLAG_SIZE="$CXX_O_FLAG_DEBUG"
+ ;;
+ esac
+
+ AC_SUBST(C_O_FLAG_HIGHEST_JVM)
+ AC_SUBST(C_O_FLAG_HIGHEST)
+ AC_SUBST(C_O_FLAG_HI)
+ AC_SUBST(C_O_FLAG_NORM)
+ AC_SUBST(C_O_FLAG_NONE)
+ AC_SUBST(C_O_FLAG_SIZE)
+ AC_SUBST(CXX_O_FLAG_HIGHEST_JVM)
+ AC_SUBST(CXX_O_FLAG_HIGHEST)
+ AC_SUBST(CXX_O_FLAG_HI)
+ AC_SUBST(CXX_O_FLAG_NORM)
+ AC_SUBST(CXX_O_FLAG_NONE)
+ AC_SUBST(CXX_O_FLAG_SIZE)
+])
+
+AC_DEFUN([FLAGS_SETUP_CFLAGS],
+[
+ ### CFLAGS
+
+ FLAGS_SETUP_CFLAGS_HELPER
+
+ FLAGS_OS=$OPENJDK_TARGET_OS
+ FLAGS_OS_TYPE=$OPENJDK_TARGET_OS_TYPE
+ FLAGS_CPU=$OPENJDK_TARGET_CPU
+ FLAGS_CPU_ARCH=$OPENJDK_TARGET_CPU_ARCH
+ FLAGS_CPU_BITS=$OPENJDK_TARGET_CPU_BITS
+ FLAGS_CPU_ENDIAN=$OPENJDK_TARGET_CPU_ENDIAN
+ FLAGS_CPU_LEGACY=$OPENJDK_TARGET_CPU_LEGACY
+ FLAGS_CPU_LEGACY_LIB=$OPENJDK_TARGET_CPU_LEGACY_LIB
+
+ FLAGS_SETUP_CFLAGS_CPU_DEP([TARGET])
+
+ FLAGS_OS=$OPENJDK_BUILD_OS
+ FLAGS_OS_TYPE=$OPENJDK_BUILD_OS_TYPE
+ FLAGS_CPU=$OPENJDK_BUILD_CPU
+ FLAGS_CPU_ARCH=$OPENJDK_BUILD_CPU_ARCH
+ FLAGS_CPU_BITS=$OPENJDK_BUILD_CPU_BITS
+ FLAGS_CPU_ENDIAN=$OPENJDK_BUILD_CPU_ENDIAN
+ FLAGS_CPU_LEGACY=$OPENJDK_BUILD_CPU_LEGACY
+ FLAGS_CPU_LEGACY_LIB=$OPENJDK_BUILD_CPU_LEGACY_LIB
+
+ FLAGS_SETUP_CFLAGS_CPU_DEP([BUILD], [OPENJDK_BUILD_])
+
+ # Tests are only ever compiled for TARGET
+ CFLAGS_TESTLIB="$CFLAGS_JDKLIB"
+ CXXFLAGS_TESTLIB="$CXXFLAGS_JDKLIB"
+ CFLAGS_TESTEXE="$CFLAGS_JDKEXE"
+ CXXFLAGS_TESTEXE="$CXXFLAGS_JDKEXE"
+
+ AC_SUBST(CFLAGS_TESTLIB)
+ AC_SUBST(CFLAGS_TESTEXE)
+ AC_SUBST(CXXFLAGS_TESTLIB)
+ AC_SUBST(CXXFLAGS_TESTEXE)
+])
+
+################################################################################
+# platform independent
+AC_DEFUN([FLAGS_SETUP_CFLAGS_HELPER],
+[
+ #### OS DEFINES, these should be independent on toolchain
+ if test "x$OPENJDK_TARGET_OS" = xlinux; then
+ CFLAGS_OS_DEF_JVM="-DLINUX"
+ CFLAGS_OS_DEF_JDK="-D_GNU_SOURCE -D_REENTRANT -D_LARGEFILE64_SOURCE"
+ elif test "x$OPENJDK_TARGET_OS" = xsolaris; then
+ CFLAGS_OS_DEF_JVM="-DSOLARIS"
+ CFLAGS_OS_DEF_JDK="-D__solaris__"
+ elif test "x$OPENJDK_TARGET_OS" = xmacosx; then
+ CFLAGS_OS_DEF_JVM="-D_ALLBSD_SOURCE -D_DARWIN_C_SOURCE -D_XOPEN_SOURCE"
+ CFLAGS_OS_DEF_JDK="-D_ALLBSD_SOURCE -D_DARWIN_UNLIMITED_SELECT"
+ elif test "x$OPENJDK_TARGET_OS" = xaix; then
+ CFLAGS_OS_DEF_JVM="-DAIX"
+ elif test "x$OPENJDK_TARGET_OS" = xbsd; then
+ CFLAGS_OS_DEF_JDK="-D_ALLBSD_SOURCE"
+ elif test "x$OPENJDK_TARGET_OS" = xwindows; then
+ CFLAGS_OS_DEF_JVM="-D_WINDOWS -DWIN32 -D_JNI_IMPLEMENTATION_"
+ fi
+
+ # Setup target OS define. Use OS target name but in upper case.
+ OPENJDK_TARGET_OS_UPPERCASE=`$ECHO $OPENJDK_TARGET_OS | $TR 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
+ CFLAGS_OS_DEF_JDK="$CFLAGS_OS_DEF_JDK -D$OPENJDK_TARGET_OS_UPPERCASE"
+
+ #### GLOBAL DEFINES
+ # Set some common defines. These works for all compilers, but assume
+ # -D is universally accepted.
+
+ # Always enable optional macros for VM.
+ ALWAYS_CFLAGS_JVM="-D__STDC_FORMAT_MACROS -D__STDC_LIMIT_MACROS -D__STDC_CONSTANT_MACROS"
+
+ # Setup some hard coded includes
+ ALWAYS_CFLAGS_JDK=" \
+ -I\$(SUPPORT_OUTPUTDIR)/modules_include/java.base \
+ -I\$(SUPPORT_OUTPUTDIR)/modules_include/java.base/\$(OPENJDK_TARGET_OS_INCLUDE_SUBDIR) \
+ -I${TOPDIR}/src/java.base/share/native/libjava \
+ -I${TOPDIR}/src/java.base/$OPENJDK_TARGET_OS_TYPE/native/libjava \
+ -I${TOPDIR}/src/hotspot/share/include \
+ -I${TOPDIR}/src/hotspot/os/${HOTSPOT_TARGET_OS_TYPE}/include"
+
+ ###############################################################################
+
+ # Adjust flags according to debug level.
+ # Setup debug/release defines
+ if test "x$DEBUG_LEVEL" = xrelease; then
+ DEBUG_CFLAGS_JDK="-DNDEBUG"
+ if test "x$OPENJDK_TARGET_OS" = xsolaris; then
+ DEBUG_CFLAGS_JDK="$DEBUG_CFLAGS_JDK -DTRIMMED"
+ fi
+ else
+ DEBUG_CFLAGS_JDK="-DDEBUG"
+
+ if test "x$TOOLCHAIN_TYPE" = xxlc; then
+ # We need '-qminimaltoc' or '-qpic=large -bbigtoc' if the TOC overflows.
+ # Hotspot now overflows its 64K TOC (currently only for debug),
+ # so for debug we build with '-qpic=large -bbigtoc'.
+ DEBUG_CFLAGS_JVM="-qpic=large"
+ fi
+ fi
+
+ if test "x$DEBUG_LEVEL" != xrelease; then
+ DEBUG_OPTIONS_FLAGS_JDK="$CFLAGS_DEBUG_OPTIONS"
+ DEBUG_SYMBOLS_CFLAGS_JDK="$CFLAGS_DEBUG_SYMBOLS"
+ DEBUG_SYMBOLS_CXXFLAGS_JDK="$CXXFLAGS_DEBUG_SYMBOLS"
+ fi
+
+ #### TOOLCHAIN DEFINES
+
+ if test "x$TOOLCHAIN_TYPE" = xgcc; then
+ ALWAYS_DEFINES_JVM="-D_GNU_SOURCE -D_REENTRANT"
+ elif test "x$TOOLCHAIN_TYPE" = xclang; then
+ ALWAYS_DEFINES_JVM="-D_GNU_SOURCE"
+ elif test "x$TOOLCHAIN_TYPE" = xsolstudio; then
+ ALWAYS_DEFINES_JVM="-DSPARC_WORKS -D_Crun_inline_placement"
+ ALWAYS_DEFINES_JDK="-DTRACING -DMACRO_MEMSYS_OPS -DBREAKPTS"
+ ALWAYS_DEFINES_JDK_CXXONLY="-DCC_NOEX"
+ elif test "x$TOOLCHAIN_TYPE" = xxlc; then
+ ALWAYS_DEFINES_JVM="-D_REENTRANT"
+ ALWAYS_DEFINES_JDK="-D_GNU_SOURCE -D_REENTRANT -D_LARGEFILE64_SOURCE -DSTDC"
+ elif test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
+ ALWAYS_DEFINES_JDK="-DWIN32_LEAN_AND_MEAN -D_CRT_SECURE_NO_DEPRECATE \
+ -D_CRT_NONSTDC_NO_DEPRECATE -DWIN32 -DIAL"
+ fi
+
+ ###############################################################################
+ #
+ #
+ # CFLAGS BASIC
+ if test "x$TOOLCHAIN_TYPE" = xgcc || test "x$TOOLCHAIN_TYPE" = xclang; then
+ # COMMON to gcc and clang
+ TOOLCHAIN_CFLAGS_JVM="-pipe -fno-rtti -fno-exceptions \
+ -fvisibility=hidden -fno-strict-aliasing -fno-omit-frame-pointer"
+ fi
+
+ if test "x$TOOLCHAIN_TYPE" = xgcc; then
+ TOOLCHAIN_CFLAGS_JVM="$TOOLCHAIN_CFLAGS_JVM -fcheck-new"
+ TOOLCHAIN_CFLAGS_JDK="-pipe"
+ TOOLCHAIN_CFLAGS_JDK_CONLY="-fno-strict-aliasing" # technically NOT for CXX (but since this gives *worse* performance, use no-strict-aliasing everywhere!)
+
+ CXXSTD_CXXFLAG="-std=gnu++98"
+ FLAGS_CXX_COMPILER_CHECK_ARGUMENTS(ARGUMENT: [$CXXSTD_CXXFLAG -Werror],
+ IF_FALSE: [CXXSTD_CXXFLAG=""])
+ TOOLCHAIN_CFLAGS_JDK_CXXONLY="$CXXSTD_CXXFLAG"
+ TOOLCHAIN_CFLAGS_JVM="$TOOLCHAIN_CFLAGS_JVM $CXXSTD_CXXFLAG"
+ ADLC_CXXFLAG="$CXXSTD_CXXFLAG"
+
+
+ elif test "x$TOOLCHAIN_TYPE" = xclang; then
+ # Restrict the debug information created by Clang to avoid
+ # too big object files and speed the build up a little bit
+ # (see http://llvm.org/bugs/show_bug.cgi?id=7554)
+ TOOLCHAIN_CFLAGS_JVM="$TOOLCHAIN_CFLAGS_JVM -flimit-debug-info"
+
+ if test "x$OPENJDK_TARGET_OS" = xlinux; then
+ TOOLCHAIN_CFLAGS_JDK="-pipe"
+ TOOLCHAIN_CFLAGS_JDK_CONLY="-fno-strict-aliasing" # technically NOT for CXX
+ fi
+ elif test "x$TOOLCHAIN_TYPE" = xsolstudio; then
+ TOOLCHAIN_CFLAGS_JDK="-mt"
+ TOOLCHAIN_CFLAGS_JDK_CONLY="-xc99=%none -xCC -Xa -v -W0,-noglobal" # C only
+ TOOLCHAIN_CFLAGS_JDK_CXXONLY="-features=no%except -norunpath -xnolib" # CXX only
+ TOOLCHAIN_CFLAGS_JVM="-template=no%extdef -features=no%split_init \
+ -library=stlport4 -mt -features=no%except"
+ elif test "x$TOOLCHAIN_TYPE" = xxlc; then
+ TOOLCHAIN_CFLAGS_JDK="-qchars=signed -qfullpath -qsaveopt" # add on both CFLAGS
+ TOOLCHAIN_CFLAGS_JVM="-qtune=balanced \
+ -qalias=noansi -qstrict -qtls=default -qlanglvl=c99vla \
+ -qlanglvl=noredefmac -qnortti -qnoeh -qignerrno"
+ elif test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
+ TOOLCHAIN_CFLAGS_JVM="-nologo -MD -MP"
+ TOOLCHAIN_CFLAGS_JDK="-nologo -MD -Zc:wchar_t-"
+ fi
+
+ # CFLAGS WARNINGS STUFF
+ # Set JVM_CFLAGS warning handling
+ if test "x$TOOLCHAIN_TYPE" = xgcc || test "x$TOOLCHAIN_TYPE" = xclang; then
+ # COMMON to gcc and clang
+ WARNING_CFLAGS_JVM="-Wpointer-arith -Wsign-compare -Wunused-function"
+ if ! HOTSPOT_CHECK_JVM_VARIANT(zero); then
+ # Non-zero builds have stricter warnings
+ WARNING_CFLAGS_JVM="$WARNING_CFLAGS_JVM -Wundef -Wformat=2"
+ fi
+
+ fi
+ if test "x$TOOLCHAIN_TYPE" = xgcc; then
+ WARNING_CFLAGS_JDK="-Wall -Wextra -Wno-unused -Wno-unused-parameter -Wformat=2"
+ WARNING_CFLAGS_JVM="$WARNING_CFLAGS_JVM -Wunused-value -Woverloaded-virtual"
+
+ if ! HOTSPOT_CHECK_JVM_VARIANT(zero); then
+ # Non-zero builds have stricter warnings
+ WARNING_CFLAGS_JVM="$WARNING_CFLAGS_JVM -Wreturn-type"
+ fi
+ elif test "x$TOOLCHAIN_TYPE" = xclang; then
+ WARNING_CFLAGS_JVM="$WARNING_CFLAGS_JVM -Wno-deprecated"
+ if test "x$OPENJDK_TARGET_OS" = xlinux; then
+ WARNING_CFLAGS_JVM="$WARNING_CFLAGS_JVM -Wno-sometimes-uninitialized"
+ WARNING_CFLAGS_JDK="-Wall -Wextra -Wno-unused -Wno-unused-parameter -Wformat=2"
+ fi
+ elif test "x$TOOLCHAIN_TYPE" = xsolstudio; then
+ WARNING_CFLAGS_JDK_CONLY="-errshort=tags"
+ WARNING_CFLAGS_JDK_CXXONLY="+w"
+ WARNING_CFLAGS_JDK="-errtags=yes -errfmt"
+ elif test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
+ WARNING_CFLAGS="-W3"
+ WARNING_CFLAGS_JDK="-wd4800"
+ fi
+
+ # Set some additional per-OS defines.
+
+ # Additional macosx handling
+ if test "x$OPENJDK_TARGET_OS" = xmacosx; then
+ OS_CFLAGS="-DMAC_OS_X_VERSION_MIN_REQUIRED=$MACOSX_VERSION_MIN_NODOTS \
+ -mmacosx-version-min=$MACOSX_VERSION_MIN"
+
+ if test -n "$MACOSX_VERSION_MAX"; then
+ OS_CFLAGS="$OS_CFLAGS \
+ -DMAC_OS_X_VERSION_MAX_ALLOWED=$MACOSX_VERSION_MAX_NODOTS"
+ fi
+ fi
+
+ # Where does this really belong??
+ if test "x$TOOLCHAIN_TYPE" = xgcc || test "x$TOOLCHAIN_TYPE" = xclang; then
+ PICFLAG="-fPIC"
+ elif test "x$TOOLCHAIN_TYPE" = xsolstudio; then
+ PICFLAG="-KPIC"
+ elif test "x$TOOLCHAIN_TYPE" = xxlc; then
+ # '-qpic' defaults to 'qpic=small'. This means that the compiler generates only
+ # one instruction for accessing the TOC. If the TOC grows larger than 64K, the linker
+ # will have to patch this single instruction with a call to some out-of-order code which
+ # does the load from the TOC. This is of course slow. But in that case we also would have
+ # to use '-bbigtoc' for linking anyway so we could also change the PICFLAG to 'qpic=large'.
+ # With 'qpic=large' the compiler will by default generate a two-instruction sequence which
+ # can be patched directly by the linker and does not require a jump to out-of-order code.
+ # Another alternative instead of using 'qpic=large -bbigtoc' may be to use '-qminimaltoc'
+ # instead. This creates a distinct TOC for every compilation unit (and thus requires two
+ # loads for accessing a global variable). But there are rumors that this may be seen as a
+ # 'performance feature' because of improved code locality of the symbols used in a
+ # compilation unit.
+ PICFLAG="-qpic"
+ elif test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
+ PICFLAG=""
+ fi
+
+ JVM_PICFLAG="$PICFLAG"
+ JDK_PICFLAG="$PICFLAG"
+
+ if test "x$OPENJDK_TARGET_OS" = xmacosx; then
+ # Linking is different on MacOSX
+ JDK_PICFLAG=''
+ if test "x$STATIC_BUILD" = xtrue; then
+ JVM_PICFLAG=""
+ fi
+ fi
+
+ if test "x$OPENJDK_TARGET_OS" = xmacosx; then
+ OS_CFLAGS_JVM="$OS_CFLAGS_JVM -mno-omit-leaf-frame-pointer -mstack-alignment=16"
+ fi
+
+ # Optional POSIX functionality needed by the JVM
+ #
+ # Check if clock_gettime is available and in which library. This indicates
+ # availability of CLOCK_MONOTONIC for hotspot. But we don't need to link, so
+ # don't let it update LIBS.
+ save_LIBS="$LIBS"
+ AC_SEARCH_LIBS(clock_gettime, rt, [HAS_CLOCK_GETTIME=true], [])
+ if test "x$LIBS" = "x-lrt "; then
+ CLOCK_GETTIME_IN_LIBRT=true
+ fi
+ LIBS="$save_LIBS"
+
+ if test "x$HAS_CLOCK_GETTIME" = "xtrue"; then
+ OS_CFLAGS_JVM="$OS_CFLAGS_JVM -DSUPPORTS_CLOCK_MONOTONIC"
+ if test "x$CLOCK_GETTIME_IN_LIBRT" = "xtrue"; then
+ OS_CFLAGS_JVM="$OS_CFLAGS_JVM -DNEEDS_LIBRT"
+ fi
+ fi
+
+ # EXPORT
+ AC_SUBST(ADLC_CXXFLAG)
+])
+
+################################################################################
+# $1 - Either BUILD or TARGET to pick the correct OS/CPU variables to check
+# conditionals against.
+# $2 - Optional prefix for each variable defined.
+AC_DEFUN([FLAGS_SETUP_CFLAGS_CPU_DEP],
+[
+ #### CPU DEFINES, these should (in theory) be independent on toolchain
+
+ # Setup target CPU
+ # Setup endianness
+ if test "x$FLAGS_CPU_ENDIAN" = xlittle; then
+ $1_DEFINES_CPU_JVM="-DVM_LITTLE_ENDIAN"
+ fi
+ if test "x$TOOLCHAIN_TYPE" = xsolstudio; then
+ # The macro _LITTLE_ENDIAN needs to be defined the same to avoid the
+ # Sun C compiler warning message: warning: macro redefined: _LITTLE_ENDIAN
+ if test "x$FLAGS_CPU_ENDIAN" = xlittle; then
+ $1_DEFINES_CPU_JDK="-D_LITTLE_ENDIAN="
+ else
+ $1_DEFINES_CPU_JDK="-D_BIG_ENDIAN="
+ fi
+ else
+ if test "x$FLAGS_CPU_ENDIAN" = xlittle; then
+ $1_DEFINES_CPU_JDK="-D_LITTLE_ENDIAN"
+ else
+ $1_DEFINES_CPU_JDK="-D_BIG_ENDIAN"
+ fi
+ fi
+
+ # setup CPU bit size
+ $1_DEFINES_CPU_JDK="${$1_DEFINES_CPU_JDK} -DARCH='\"$FLAGS_CPU_LEGACY\"' \
+ -D$FLAGS_CPU_LEGACY"
+
+ if test "x$FLAGS_CPU_BITS" = x64; then
+ # -D_LP64=1 is only set on linux and mac. Setting on windows causes diff in
+ # unpack200.exe.
+ if test "x$FLAGS_OS" = xlinux || test "x$FLAGS_OS" = xmacosx; then
+ $1_DEFINES_CPU_JDK="${$1_DEFINES_CPU_JDK} -D_LP64=1"
+ fi
+ if test "x$FLAGS_OS" != xsolaris && test "x$FLAGS_OS" != xaix; then
+ # Solaris does not have _LP64=1 in the old build.
+ # xlc on AIX defines _LP64=1 by default and issues a warning if we redefine it.
+ $1_DEFINES_CPU_JVM="${$1_DEFINES_CPU_JVM} -D_LP64=1"
+ fi
+ fi
+
+ # toolchain dependend, per-cpu
+ if test "x$TOOLCHAIN_TYPE" = xsolstudio; then
+ if test "x$FLAGS_CPU_ARCH" = xx86; then
+ $1_DEFINES_CPU_JDK="${$1_DEFINES_CPU_JDK} -DcpuIntel -Di586 -D$FLAGS_CPU_LEGACY_LIB"
+ fi
+ elif test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
+ if test "x$FLAGS_CPU" = xx86_64; then
+ $1_DEFINES_CPU_JDK="${$1_DEFINES_CPU_JDK} -D_AMD64_ -Damd64"
+ else
+ $1_DEFINES_CPU_JDK="${$1_DEFINES_CPU_JDK} -D_X86_ -Dx86"
+ fi
+ fi
+
+ # CFLAGS PER CPU
+ if test "x$TOOLCHAIN_TYPE" = xgcc || test "x$TOOLCHAIN_TYPE" = xclang; then
+ # COMMON to gcc and clang
+ if test "x$FLAGS_CPU" = xx86; then
+ # Force compatibility with i586 on 32 bit intel platforms.
+ $1_CFLAGS_CPU="-march=i586"
+ fi
+ fi
+
+ if test "x$TOOLCHAIN_TYPE" = xgcc; then
+ if test "x$FLAGS_CPU" = xarm; then
+ # -Wno-psabi to get rid of annoying "note: the mangling of 'va_list' has changed in GCC 4.4"
+ $1_CFLAGS_CPU="-fsigned-char -Wno-psabi $ARM_ARCH_TYPE_FLAGS $ARM_FLOAT_TYPE_FLAGS -DJDK_ARCH_ABI_PROP_NAME='\"\$(JDK_ARCH_ABI_PROP_NAME)\"'"
+ $1_CFLAGS_CPU_JVM="-DARM"
+ elif test "x$FLAGS_CPU" = xaarch64; then
+ if test "x$HOTSPOT_TARGET_CPU_PORT" = xarm64; then
+ $1_CFLAGS_CPU_JVM="-fsigned-char -DARM"
+ fi
+ elif test "x$FLAGS_CPU_ARCH" = xppc; then
+ $1_CFLAGS_CPU_JVM="-minsert-sched-nops=regroup_exact -mno-multiple -mno-string"
+ if test "x$FLAGS_CPU" = xppc64; then
+ # -mminimal-toc fixes `relocation truncated to fit' error for gcc 4.1.
+ # Use ppc64 instructions, but schedule for power5
+ $1_CFLAGS_CPU_JVM="${$1_CFLAGS_CPU_JVM} -mminimal-toc -mcpu=powerpc64 -mtune=power5"
+ elif test "x$FLAGS_CPU" = xppc64le; then
+ # Little endian machine uses ELFv2 ABI.
+ # Use Power8, this is the first CPU to support PPC64 LE with ELFv2 ABI.
+ $1_CFLAGS_CPU_JVM="${$1_CFLAGS_CPU_JVM} -DABI_ELFv2 -mcpu=power8 -mtune=power8"
+ fi
+ elif test "x$FLAGS_CPU" = xs390x; then
+ $1_CFLAGS_CPU="-mbackchain -march=z10"
+ fi
+
+ if test "x$FLAGS_CPU_ARCH" != xarm && test "x$FLAGS_CPU_ARCH" != xppc; then
+ # for all archs except arm and ppc, prevent gcc to omit frame pointer
+ $1_CFLAGS_CPU_JDK="${$1_CFLAGS_CPU_JDK} -fno-omit-frame-pointer"
+ fi
+
+ elif test "x$TOOLCHAIN_TYPE" = xclang; then
+ if test "x$FLAGS_OS" = xlinux; then
+ # ppc test not really needed for clang
+ if test "x$FLAGS_CPU_ARCH" != xarm && test "x$FLAGS_CPU_ARCH" != xppc; then
+ # for all archs except arm and ppc, prevent gcc to omit frame pointer
+ $1_CFLAGS_CPU_JDK="${$1_CFLAGS_CPU_JDK} -fno-omit-frame-pointer"
+ fi
+ fi
+
+ elif test "x$TOOLCHAIN_TYPE" = xsolstudio; then
+ if test "x$FLAGS_CPU" = xx86_64; then
+ # NOTE: -xregs=no%frameptr is supposed to be default on x64
+ $1_CFLAGS_CPU_JDK="-xregs=no%frameptr"
+ elif test "x$FLAGS_CPU" = xsparcv9; then
+ $1_CFLAGS_CPU_JVM="-xarch=sparc"
+ $1_CFLAGS_CPU_JDK_LIBONLY="-xregs=no%appl"
+ fi
+
+ elif test "x$TOOLCHAIN_TYPE" = xxlc; then
+ if test "x$FLAGS_CPU" = xppc64; then
+ $1_CFLAGS_CPU_JVM="-qarch=ppc64"
+ fi
+
+ elif test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
+ if test "x$FLAGS_CPU" = xx86; then
+ $1_CFLAGS_CPU_JVM="-arch:IA32"
+ elif test "x$OPENJDK_TARGET_CPU" = xx86_64; then
+ if test "x$DEBUG_LEVEL" != xrelease; then
+ # NOTE: This is probably redundant; -homeparams is default on
+ # non-release builds.
+ $1_CFLAGS_CPU_JVM="-homeparams"
+ fi
+ fi
+ fi
+
+ if test "x$TOOLCHAIN_TYPE" = xgcc; then
+ TOOLCHAIN_CHECK_COMPILER_VERSION(VERSION: 6, PREFIX: $2, IF_AT_LEAST: FLAGS_SETUP_GCC6_COMPILER_FLAGS($1))
+ $1_TOOLCHAIN_CFLAGS="${$1_GCC6_CFLAGS}"
+
+ TOOLCHAIN_CHECK_COMPILER_VERSION(VERSION: [4.8], PREFIX: $2,
+ IF_AT_LEAST: [
+ # These flags either do not work or give spurious warnings prior to gcc 4.8.
+ $1_WARNING_CFLAGS_JVM="-Wno-format-zero-length -Wtype-limits -Wuninitialized"
+ ]
+ )
+ fi
+
+ # EXPORT to API
+ CFLAGS_JVM_COMMON="$ALWAYS_CFLAGS_JVM $ALWAYS_DEFINES_JVM $TOOLCHAIN_CFLAGS_JVM \
+ $OS_CFLAGS $OS_CFLAGS_JVM $CFLAGS_OS_DEF_JVM $DEBUG_CFLAGS_JVM \
+ $WARNING_CFLAGS $WARNING_CFLAGS_JVM $JVM_PICFLAG"
+
+ CFLAGS_JDK_COMMON="$ALWAYS_CFLAGS_JDK $ALWAYS_DEFINES_JDK $TOOLCHAIN_CFLAGS_JDK \
+ $OS_CFLAGS $CFLAGS_OS_DEF_JDK $DEBUG_CFLAGS_JDK $DEBUG_OPTIONS_FLAGS_JDK \
+ $WARNING_CFLAGS $WARNING_CFLAGS_JDK"
+
+ # Use ${$2EXTRA_CFLAGS} to block EXTRA_CFLAGS to be added to build flags.
+ # (Currently we don't have any OPENJDK_BUILD_EXTRA_CFLAGS, but that might
+ # change in the future.)
+
+ CFLAGS_JDK_COMMON_CONLY="$TOOLCHAIN_CFLAGS_JDK_CONLY $DEBUG_SYMBOLS_CFLAGS_JDK \
+ $WARNING_CFLAGS_JDK_CONLY ${$2EXTRA_CFLAGS}"
+ CFLAGS_JDK_COMMON_CXXONLY="$ALWAYS_DEFINES_JDK_CXXONLY $TOOLCHAIN_CFLAGS_JDK_CXXONLY \
+ $DEBUG_SYMBOLS_CXXFLAGS_JDK $WARNING_CFLAGS_JDK_CXXONLY ${$2EXTRA_CXXFLAGS}"
+
+ $1_CFLAGS_JVM="${$1_DEFINES_CPU_JVM} ${$1_CFLAGS_CPU} ${$1_CFLAGS_CPU_JVM} ${$1_TOOLCHAIN_CFLAGS} ${$1_WARNING_CFLAGS_JVM}"
+ $1_CFLAGS_JDK="${$1_DEFINES_CPU_JDK} ${$1_CFLAGS_CPU} ${$1_CFLAGS_CPU_JDK} ${$1_TOOLCHAIN_CFLAGS}"
+
+ $2JVM_CFLAGS="$CFLAGS_JVM_COMMON ${$1_CFLAGS_JVM} ${$2EXTRA_CXXFLAGS}"
+
+ $2CFLAGS_JDKEXE="$CFLAGS_JDK_COMMON $CFLAGS_JDK_COMMON_CONLY ${$1_CFLAGS_JDK}"
+ $2CXXFLAGS_JDKEXE="$CFLAGS_JDK_COMMON $CFLAGS_JDK_COMMON_CXXONLY ${$1_CFLAGS_JDK}"
+ $2CFLAGS_JDKLIB="${$2CFLAGS_JDKEXE} $JDK_PICFLAG ${$1_CFLAGS_CPU_JDK_LIBONLY}"
+ $2CXXFLAGS_JDKLIB="${$2CXXFLAGS_JDKEXE} $JDK_PICFLAG ${$1_CFLAGS_CPU_JDK_LIBONLY}"
+
+ AC_SUBST($2JVM_CFLAGS)
+ AC_SUBST($2CFLAGS_JDKLIB)
+ AC_SUBST($2CFLAGS_JDKEXE)
+ AC_SUBST($2CXXFLAGS_JDKLIB)
+ AC_SUBST($2CXXFLAGS_JDKEXE)
+])
+
+# FLAGS_SETUP_GCC6_COMPILER_FLAGS([PREFIX])
+# Arguments:
+# $1 - Prefix for each variable defined.
+AC_DEFUN([FLAGS_SETUP_GCC6_COMPILER_FLAGS],
+[
+ # These flags are required for GCC 6 builds as undefined behaviour in OpenJDK code
+ # runs afoul of the more aggressive versions of these optimisations.
+ # Notably, value range propagation now assumes that the this pointer of C++
+ # member functions is non-null.
+ NO_DELETE_NULL_POINTER_CHECKS_CFLAG="-fno-delete-null-pointer-checks"
+ dnl Argument check is disabled until FLAGS_COMPILER_CHECK_ARGUMENTS handles cross-compilation
+ dnl FLAGS_COMPILER_CHECK_ARGUMENTS(ARGUMENT: [$NO_DELETE_NULL_POINTER_CHECKS_CFLAG -Werror],
+ dnl IF_FALSE: [NO_DELETE_NULL_POINTER_CHECKS_CFLAG=""])
+ NO_LIFETIME_DSE_CFLAG="-fno-lifetime-dse"
+ dnl Argument check is disabled until FLAGS_COMPILER_CHECK_ARGUMENTS handles cross-compilation
+ dnl FLAGS_COMPILER_CHECK_ARGUMENTS(ARGUMENT: [$NO_LIFETIME_DSE_CFLAG -Werror],
+ dnl IF_FALSE: [NO_LIFETIME_DSE_CFLAG=""])
+ AC_MSG_NOTICE([GCC >= 6 detected; adding ${NO_DELETE_NULL_POINTER_CHECKS_CFLAG} and ${NO_LIFETIME_DSE_CFLAG}])
+ $1_GCC6_CFLAGS="${NO_DELETE_NULL_POINTER_CHECKS_CFLAG} ${NO_LIFETIME_DSE_CFLAG}"
+])
+
+# Documentation on common flags used for solstudio in HIGHEST.
+#
+# WARNING: Use of OPTIMIZATION_LEVEL=HIGHEST in your Makefile needs to be
+# done with care, there are some assumptions below that need to
+# be understood about the use of pointers, and IEEE behavior.
+#
+# -fns: Use non-standard floating point mode (not IEEE 754)
+# -fsimple: Do some simplification of floating point arithmetic (not IEEE 754)
+# -fsingle: Use single precision floating point with 'float'
+# -xalias_level=basic: Assume memory references via basic pointer types do not alias
+# (Source with excessing pointer casting and data access with mixed
+# pointer types are not recommended)
+# -xbuiltin=%all: Use intrinsic or inline versions for math/std functions
+# (If you expect perfect errno behavior, do not use this)
+# -xdepend: Loop data dependency optimizations (need -xO3 or higher)
+# -xrestrict: Pointer parameters to functions do not overlap
+# (Similar to -xalias_level=basic usage, but less obvious sometimes.
+# If you pass in multiple pointers to the same data, do not use this)
+# -xlibmil: Inline some library routines
+# (If you expect perfect errno behavior, do not use this)
+# -xlibmopt: Use optimized math routines (CURRENTLY DISABLED)
+# (If you expect perfect errno behavior, do not use this)
+# Can cause undefined external on Solaris 8 X86 on __sincos, removing for now
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/make/autoconf/flags-ldflags.m4 Mon Mar 05 13:11:21 2018 -0800
@@ -0,0 +1,234 @@
+#
+# Copyright (c) 2011, 2018, Oracle and/or its affiliates. All rights reserved.
+# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+#
+# This code is free software; you can redistribute it and/or modify it
+# under the terms of the GNU General Public License version 2 only, as
+# published by the Free Software Foundation. Oracle designates this
+# particular file as subject to the "Classpath" exception as provided
+# by Oracle in the LICENSE file that accompanied this code.
+#
+# This code is distributed in the hope that it will be useful, but WITHOUT
+# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+# FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
+# version 2 for more details (a copy is included in the LICENSE file that
+# accompanied this code).
+#
+# You should have received a copy of the GNU General Public License version
+# 2 along with this work; if not, write to the Free Software Foundation,
+# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
+#
+# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
+# or visit www.oracle.com if you need additional information or have any
+# questions.
+#
+
+################################################################################
+#
+
+AC_DEFUN([FLAGS_SETUP_LDFLAGS],
+[
+ FLAGS_SETUP_LDFLAGS_HELPER
+
+ # Setup the target toolchain
+
+ # On some platforms (mac) the linker warns about non existing -L dirs.
+ # For any of the variants server, client or minimal, the dir matches the
+ # variant name. The "main" variant should be used for linking. For the
+ # rest, the dir is just server.
+ if HOTSPOT_CHECK_JVM_VARIANT(server) || HOTSPOT_CHECK_JVM_VARIANT(client) \
+ || HOTSPOT_CHECK_JVM_VARIANT(minimal); then
+ TARGET_JVM_VARIANT_PATH=$JVM_VARIANT_MAIN
+ else
+ TARGET_JVM_VARIANT_PATH=server
+ fi
+ FLAGS_SETUP_LDFLAGS_CPU_DEP([TARGET])
+
+ # Setup the build toolchain
+
+ # When building a buildjdk, it's always only the server variant
+ BUILD_JVM_VARIANT_PATH=server
+
+ FLAGS_SETUP_LDFLAGS_CPU_DEP([BUILD], [OPENJDK_BUILD_])
+
+ LDFLAGS_TESTLIB="$LDFLAGS_JDKLIB"
+ LDFLAGS_TESTEXE="$LDFLAGS_JDKEXE ${TARGET_LDFLAGS_JDK_LIBPATH}"
+ AC_SUBST(LDFLAGS_TESTLIB)
+ AC_SUBST(LDFLAGS_TESTEXE)
+])
+
+################################################################################
+
+# CPU independent LDFLAGS setup, used for both target and build toolchain.
+AC_DEFUN([FLAGS_SETUP_LDFLAGS_HELPER],
+[
+ # Setup basic LDFLAGS
+ if test "x$TOOLCHAIN_TYPE" = xgcc; then
+ # "-z relro" supported in GNU binutils 2.17 and later
+ LINKER_RELRO_FLAG="-Wl,-z,relro"
+ FLAGS_LINKER_CHECK_ARGUMENTS(ARGUMENT: [$LINKER_RELRO_FLAG],
+ IF_TRUE: [HAS_LINKER_RELRO=true],
+ IF_FALSE: [HAS_LINKER_RELRO=false])
+
+ # "-z now" supported in GNU binutils 2.11 and later
+ LINKER_NOW_FLAG="-Wl,-z,now"
+ FLAGS_LINKER_CHECK_ARGUMENTS(ARGUMENT: [$LINKER_NOW_FLAG],
+ IF_TRUE: [HAS_LINKER_NOW=true],
+ IF_FALSE: [HAS_LINKER_NOW=false])
+
+ # If this is a --hash-style=gnu system, use --hash-style=both, why?
+ # We have previously set HAS_GNU_HASH if this is the case
+ if test -n "$HAS_GNU_HASH"; then
+ BASIC_LDFLAGS="-Wl,--hash-style=both"
+ LIBJSIG_HASHSTYLE_LDFLAGS="-Wl,--hash-style=both"
+ fi
+
+ # And since we now know that the linker is gnu, then add -z defs, to forbid
+ # undefined symbols in object files.
+ BASIC_LDFLAGS="$BASIC_LDFLAGS -Wl,-z,defs"
+
+ BASIC_LDFLAGS_JVM_ONLY="-Wl,-z,noexecstack -Wl,-O1"
+
+ BASIC_LDFLAGS_JDK_LIB_ONLY="-Wl,-z,noexecstack"
+ LIBJSIG_NOEXECSTACK_LDFLAGS="-Wl,-z,noexecstack"
+
+
+ if test "x$HAS_LINKER_RELRO" = "xtrue"; then
+ BASIC_LDFLAGS_JVM_ONLY="$BASIC_LDFLAGS_JVM_ONLY $LINKER_RELRO_FLAG"
+ fi
+
+ elif test "x$TOOLCHAIN_TYPE" = xclang; then
+ BASIC_LDFLAGS_JVM_ONLY="-mno-omit-leaf-frame-pointer -mstack-alignment=16 \
+ -stdlib=libstdc++ -fPIC"
+
+ elif test "x$TOOLCHAIN_TYPE" = xsolstudio; then
+ BASIC_LDFLAGS="-Wl,-z,defs"
+ BASIC_LDFLAGS_ONLYCXX="-norunpath"
+ BASIC_LDFLAGS_ONLYCXX_JDK_ONLY="-xnolib"
+
+ BASIC_LDFLAGS_JDK_ONLY="-ztext"
+ BASIC_LDFLAGS_JVM_ONLY="-library=%none -mt -z noversion"
+
+ elif test "x$TOOLCHAIN_TYPE" = xxlc; then
+ BASIC_LDFLAGS="-b64 -brtl -bnolibpath -bexpall -bernotok -btextpsize:64K \
+ -bdatapsize:64K -bstackpsize:64K"
+ BASIC_LDFLAGS_JVM_ONLY="-Wl,-lC_r"
+
+ elif test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
+ BASIC_LDFLAGS="-nologo -opt:ref"
+ BASIC_LDFLAGS_JDK_ONLY="-incremental:no"
+ BASIC_LDFLAGS_JVM_ONLY="-opt:icf,8 -subsystem:windows -base:0x8000000"
+ fi
+
+ # Setup OS-dependent LDFLAGS
+ if test "x$TOOLCHAIN_TYPE" = xclang || test "x$TOOLCHAIN_TYPE" = xgcc; then
+ if test "x$OPENJDK_TARGET_OS" = xmacosx; then
+ # Assume clang or gcc.
+ # FIXME: We should really generalize SET_SHARED_LIBRARY_ORIGIN instead.
+ OS_LDFLAGS_JVM_ONLY="-Wl,-rpath,@loader_path/. -Wl,-rpath,@loader_path/.."
+ OS_LDFLAGS_JDK_ONLY="-mmacosx-version-min=$MACOSX_VERSION_MIN"
+ fi
+ fi
+
+ # Setup debug level-dependent LDFLAGS
+ if test "x$TOOLCHAIN_TYPE" = xgcc; then
+ if test "x$OPENJDK_TARGET_OS" = xlinux; then
+ if test x$DEBUG_LEVEL = xrelease; then
+ DEBUGLEVEL_LDFLAGS_JDK_ONLY="$DEBUGLEVEL_LDFLAGS_JDK_ONLY -Wl,-O1"
+ else
+ # mark relocations read only on (fast/slow) debug builds
+ if test "x$HAS_LINKER_RELRO" = "xtrue"; then
+ DEBUGLEVEL_LDFLAGS_JDK_ONLY="$LINKER_RELRO_FLAG"
+ fi
+ fi
+ if test x$DEBUG_LEVEL = xslowdebug; then
+ if test "x$HAS_LINKER_NOW" = "xtrue"; then
+ # do relocations at load
+ DEBUGLEVEL_LDFLAGS="$LINKER_NOW_FLAG"
+ fi
+ fi
+ fi
+
+ elif test "x$TOOLCHAIN_TYPE" = xxlc; then
+ # We need '-qminimaltoc' or '-qpic=large -bbigtoc' if the TOC overflows.
+ # Hotspot now overflows its 64K TOC (currently only for debug),
+ # so we build with '-qpic=large -bbigtoc'.
+ if test "x$DEBUG_LEVEL" != xrelease; then
+ DEBUGLEVEL_LDFLAGS_JVM_ONLY="$DEBUGLEVEL_LDFLAGS_JVM_ONLY -bbigtoc"
+ fi
+ fi
+
+ # Setup LDFLAGS for linking executables
+ if test "x$TOOLCHAIN_TYPE" = xgcc; then
+ EXECUTABLE_LDFLAGS="$EXECUTABLE_LDFLAGS -Wl,--allow-shlib-undefined"
+ fi
+
+ # Export some intermediate variables for compatibility
+ LDFLAGS_CXX_JDK="$BASIC_LDFLAGS_ONLYCXX $BASIC_LDFLAGS_ONLYCXX_JDK_ONLY $DEBUGLEVEL_LDFLAGS_JDK_ONLY"
+ AC_SUBST(LDFLAGS_CXX_JDK)
+ AC_SUBST(LIBJSIG_HASHSTYLE_LDFLAGS)
+ AC_SUBST(LIBJSIG_NOEXECSTACK_LDFLAGS)
+])
+
+################################################################################
+# $1 - Either BUILD or TARGET to pick the correct OS/CPU variables to check
+# conditionals against.
+# $2 - Optional prefix for each variable defined.
+AC_DEFUN([FLAGS_SETUP_LDFLAGS_CPU_DEP],
+[
+ # Setup CPU-dependent basic LDFLAGS. These can differ between the target and
+ # build toolchain.
+ if test "x$TOOLCHAIN_TYPE" = xgcc; then
+ if test "x${OPENJDK_$1_CPU}" = xx86; then
+ $1_CPU_LDFLAGS_JVM_ONLY="-march=i586"
+ elif test "x$OPENJDK_$1_CPU" = xarm; then
+ $1_CPU_LDFLAGS_JVM_ONLY="${$1_CPU_LDFLAGS_JVM_ONLY} -fsigned-char"
+ $1_CPU_LDFLAGS="$ARM_ARCH_TYPE_FLAGS $ARM_FLOAT_TYPE_FLAGS"
+ elif test "x$FLAGS_CPU" = xaarch64; then
+ if test "x$HOTSPOT_TARGET_CPU_PORT" = xarm64; then
+ $1_CPU_LDFLAGS_JVM_ONLY="${$1_CPU_LDFLAGS_JVM_ONLY} -fsigned-char"
+ fi
+ fi
+
+ elif test "x$TOOLCHAIN_TYPE" = xsolstudio; then
+ if test "x${OPENJDK_$1_CPU}" = "xsparcv9"; then
+ $1_CPU_LDFLAGS_JVM_ONLY="-xarch=sparc"
+ fi
+
+ elif test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
+ if test "x${OPENJDK_$1_CPU}" = "xx86"; then
+ $1_CPU_LDFLAGS="-safeseh"
+ # NOTE: Old build added -machine. Probably not needed.
+ $1_CPU_LDFLAGS_JVM_ONLY="-machine:I386"
+ $1_CPU_EXECUTABLE_LDFLAGS="-stack:327680"
+ else
+ $1_CPU_LDFLAGS_JVM_ONLY="-machine:AMD64"
+ $1_CPU_EXECUTABLE_LDFLAGS="-stack:1048576"
+ fi
+ fi
+
+ # JVM_VARIANT_PATH depends on if this is build or target...
+ if test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
+ $1_LDFLAGS_JDK_LIBPATH="-libpath:${OUTPUTDIR}/support/modules_libs/java.base"
+ else
+ $1_LDFLAGS_JDK_LIBPATH="-L\$(SUPPORT_OUTPUTDIR)/modules_libs/java.base \
+ -L\$(SUPPORT_OUTPUTDIR)/modules_libs/java.base/${$1_JVM_VARIANT_PATH}"
+ fi
+
+ # Export variables according to old definitions, prefix with $2 if present.
+ LDFLAGS_JDK_COMMON="$BASIC_LDFLAGS $BASIC_LDFLAGS_JDK_ONLY \
+ $OS_LDFLAGS_JDK_ONLY $DEBUGLEVEL_LDFLAGS_JDK_ONLY ${$2EXTRA_LDFLAGS}"
+ $2LDFLAGS_JDKLIB="$LDFLAGS_JDK_COMMON $BASIC_LDFLAGS_JDK_LIB_ONLY \
+ ${$1_LDFLAGS_JDK_LIBPATH} $SHARED_LIBRARY_FLAGS"
+ $2LDFLAGS_JDKEXE="$LDFLAGS_JDK_COMMON $EXECUTABLE_LDFLAGS \
+ ${$1_CPU_EXECUTABLE_LDFLAGS}"
+
+ $2JVM_LDFLAGS="$BASIC_LDFLAGS $BASIC_LDFLAGS_JVM_ONLY $OS_LDFLAGS_JVM_ONLY \
+ $DEBUGLEVEL_LDFLAGS $DEBUGLEVEL_LDFLAGS_JVM_ONLY $BASIC_LDFLAGS_ONLYCXX \
+ ${$1_CPU_LDFLAGS} ${$1_CPU_LDFLAGS_JVM_ONLY} ${$2EXTRA_LDFLAGS}"
+
+ AC_SUBST($2LDFLAGS_JDKLIB)
+ AC_SUBST($2LDFLAGS_JDKEXE)
+
+ AC_SUBST($2JVM_LDFLAGS)
+])
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/make/autoconf/flags-other.m4 Mon Mar 05 13:11:21 2018 -0800
@@ -0,0 +1,126 @@
+#
+# Copyright (c) 2011, 2018, Oracle and/or its affiliates. All rights reserved.
+# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+#
+# This code is free software; you can redistribute it and/or modify it
+# under the terms of the GNU General Public License version 2 only, as
+# published by the Free Software Foundation. Oracle designates this
+# particular file as subject to the "Classpath" exception as provided
+# by Oracle in the LICENSE file that accompanied this code.
+#
+# This code is distributed in the hope that it will be useful, but WITHOUT
+# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+# FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
+# version 2 for more details (a copy is included in the LICENSE file that
+# accompanied this code).
+#
+# You should have received a copy of the GNU General Public License version
+# 2 along with this work; if not, write to the Free Software Foundation,
+# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
+#
+# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
+# or visit www.oracle.com if you need additional information or have any
+# questions.
+#
+
+################################################################################
+#
+# Setup flags for other tools than C/C++ compiler
+#
+
+AC_DEFUN([FLAGS_SETUP_ARFLAGS],
+[
+ # FIXME: figure out if we should select AR flags depending on OS or toolchain.
+ if test "x$OPENJDK_TARGET_OS" = xmacosx; then
+ ARFLAGS="-r -mmacosx-version-min=$MACOSX_VERSION_MIN"
+ elif test "x$OPENJDK_TARGET_OS" = xaix; then
+ ARFLAGS="-X64"
+ elif test "x$OPENJDK_TARGET_OS" = xwindows; then
+ # lib.exe is used as AR to create static libraries.
+ ARFLAGS="-nologo -NODEFAULTLIB:MSVCRT"
+ else
+ ARFLAGS=""
+ fi
+
+ AC_SUBST(ARFLAGS)
+])
+
+AC_DEFUN([FLAGS_SETUP_STRIPFLAGS],
+[
+ ## Setup strip.
+ # FIXME: should this really be per platform, or should it be per toolchain type?
+ # strip is not provided by clang or solstudio; so guessing platform makes most sense.
+ # FIXME: we should really only export STRIPFLAGS from here, not POST_STRIP_CMD.
+ if test "x$OPENJDK_TARGET_OS" = xlinux; then
+ STRIPFLAGS="-g"
+ elif test "x$OPENJDK_TARGET_OS" = xsolaris; then
+ STRIPFLAGS="-x"
+ elif test "x$OPENJDK_TARGET_OS" = xmacosx; then
+ STRIPFLAGS="-S"
+ elif test "x$OPENJDK_TARGET_OS" = xaix; then
+ STRIPFLAGS="-X32_64"
+ fi
+
+ AC_SUBST(STRIPFLAGS)
+])
+
+AC_DEFUN([FLAGS_SETUP_RCFLAGS],
+[
+ # On Windows, we need to set RC flags.
+ if test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
+ RC_FLAGS="-nologo -l0x409"
+ JVM_RCFLAGS="-nologo"
+ if test "x$DEBUG_LEVEL" = xrelease; then
+ RC_FLAGS="$RC_FLAGS -DNDEBUG"
+ JVM_RCFLAGS="$JVM_RCFLAGS -DNDEBUG"
+ fi
+
+ # The version variables used to create RC_FLAGS may be overridden
+ # in a custom configure script, or possibly the command line.
+ # Let those variables be expanded at make time in spec.gmk.
+ # The \$ are escaped to the shell, and the $(...) variables
+ # are evaluated by make.
+ RC_FLAGS="$RC_FLAGS \
+ -D\"JDK_VERSION_STRING=\$(VERSION_STRING)\" \
+ -D\"JDK_COMPANY=\$(COMPANY_NAME)\" \
+ -D\"JDK_COMPONENT=\$(PRODUCT_NAME) \$(JDK_RC_PLATFORM_NAME) binary\" \
+ -D\"JDK_VER=\$(VERSION_NUMBER)\" \
+ -D\"JDK_COPYRIGHT=Copyright \xA9 $COPYRIGHT_YEAR\" \
+ -D\"JDK_NAME=\$(PRODUCT_NAME) \$(JDK_RC_PLATFORM_NAME) \$(VERSION_FEATURE)\" \
+ -D\"JDK_FVER=\$(subst .,\$(COMMA),\$(VERSION_NUMBER_FOUR_POSITIONS))\""
+
+ JVM_RCFLAGS="$JVM_RCFLAGS \
+ -D\"HS_BUILD_ID=\$(VERSION_STRING)\" \
+ -D\"HS_COMPANY=\$(COMPANY_NAME)\" \
+ -D\"JDK_DOTVER=\$(VERSION_NUMBER_FOUR_POSITIONS)\" \
+ -D\"HS_COPYRIGHT=Copyright $COPYRIGHT_YEAR\" \
+ -D\"HS_NAME=\$(PRODUCT_NAME) \$(VERSION_SHORT)\" \
+ -D\"JDK_VER=\$(subst .,\$(COMMA),\$(VERSION_NUMBER_FOUR_POSITIONS))\" \
+ -D\"HS_FNAME=jvm.dll\" \
+ -D\"HS_INTERNAL_NAME=jvm\""
+ fi
+ AC_SUBST(RC_FLAGS)
+ AC_SUBST(JVM_RCFLAGS)
+])
+
+################################################################################
+# platform independent
+AC_DEFUN([FLAGS_SETUP_ASFLAGS],
+[
+ if test "x$OPENJDK_TARGET_OS" = xmacosx; then
+ JVM_BASIC_ASFLAGS="-x assembler-with-cpp -mno-omit-leaf-frame-pointer -mstack-alignment=16"
+ fi
+])
+
+################################################################################
+# $1 - Either BUILD or TARGET to pick the correct OS/CPU variables to check
+# conditionals against.
+# $2 - Optional prefix for each variable defined.
+AC_DEFUN([FLAGS_SETUP_ASFLAGS_CPU_DEP],
+[
+ # Misuse EXTRA_CFLAGS to mimic old behavior
+ $2JVM_ASFLAGS="$JVM_BASIC_ASFLAGS ${$2EXTRA_CFLAGS}"
+
+ AC_SUBST($2JVM_ASFLAGS)
+])
+
--- a/make/autoconf/flags.m4 Mon Mar 05 01:22:36 2018 +0000
+++ b/make/autoconf/flags.m4 Mon Mar 05 13:11:21 2018 -0800
@@ -23,6 +23,10 @@
# questions.
#
+m4_include([flags-cflags.m4])
+m4_include([flags-ldflags.m4])
+m4_include([flags-other.m4])
+
################################################################################
#
# Setup ABI profile (for arm)
@@ -94,21 +98,6 @@
AC_MSG_CHECKING([for ABI property name])
AC_MSG_RESULT([$JDK_ARCH_ABI_PROP_NAME])
AC_SUBST(JDK_ARCH_ABI_PROP_NAME)
-
- # Pass these on to the open part of configure as if they were set using
- # --with-extra-c[xx]flags.
- EXTRA_CFLAGS="$EXTRA_CFLAGS $ARM_ARCH_TYPE_FLAGS $ARM_FLOAT_TYPE_FLAGS"
- EXTRA_CXXFLAGS="$EXTRA_CXXFLAGS $ARM_ARCH_TYPE_FLAGS $ARM_FLOAT_TYPE_FLAGS"
- # Get rid of annoying "note: the mangling of 'va_list' has changed in GCC 4.4"
- # FIXME: This should not really be set using extra_cflags.
- if test "x$OPENJDK_TARGET_CPU" = xarm; then
- EXTRA_CFLAGS="$EXTRA_CFLAGS -Wno-psabi"
- EXTRA_CXXFLAGS="$EXTRA_CXXFLAGS -Wno-psabi"
- fi
- # Also add JDK_ARCH_ABI_PROP_NAME define, but only to CFLAGS.
- EXTRA_CFLAGS="$EXTRA_CFLAGS -DJDK_ARCH_ABI_PROP_NAME='\"\$(JDK_ARCH_ABI_PROP_NAME)\"'"
- # And pass the architecture flags to the linker as well
- EXTRA_LDFLAGS="$EXTRA_LDFLAGS $ARM_ARCH_TYPE_FLAGS $ARM_FLOAT_TYPE_FLAGS"
fi
# When building with an abi profile, the name of that profile is appended on the
@@ -118,19 +107,58 @@
fi
])
+AC_DEFUN([FLAGS_SETUP_MACOSX_VERSION],
+[
+ # Additional macosx handling
+ if test "x$OPENJDK_TARGET_OS" = xmacosx; then
+ # MACOSX_VERSION_MIN specifies the lowest version of Macosx that the built
+ # binaries should be compatible with, even if compiled on a newer version
+ # of the OS. It currently has a hard coded value. Setting this also limits
+ # exposure to API changes in header files. Bumping this is likely to
+ # require code changes to build.
+ MACOSX_VERSION_MIN=10.7.0
+ MACOSX_VERSION_MIN_NODOTS=${MACOSX_VERSION_MIN//\./}
+
+ AC_SUBST(MACOSX_VERSION_MIN)
+
+ # Setting --with-macosx-version-max=<version> makes it an error to build or
+ # link to macosx APIs that are newer than the given OS version. The expected
+ # format for <version> is either nn.n.n or nn.nn.nn. See /usr/include/AvailabilityMacros.h.
+ AC_ARG_WITH([macosx-version-max], [AS_HELP_STRING([--with-macosx-version-max],
+ [error on use of newer functionality. @<:@macosx@:>@])],
+ [
+ if echo "$with_macosx_version_max" | $GREP -q "^[[0-9]][[0-9]]\.[[0-9]]\.[[0-9]]\$"; then
+ MACOSX_VERSION_MAX=$with_macosx_version_max
+ elif echo "$with_macosx_version_max" | $GREP -q "^[[0-9]][[0-9]]\.[[0-9]][[0-9]]\.[[0-9]][[0-9]]\$"; then
+ MACOSX_VERSION_MAX=$with_macosx_version_max
+ elif test "x$with_macosx_version_max" = "xno"; then
+ # Use build system default
+ MACOSX_VERSION_MAX=
+ else
+ AC_MSG_ERROR([osx version format must be nn.n.n or nn.nn.nn])
+ fi
+ ],
+ [MACOSX_VERSION_MAX=]
+ )
+ MACOSX_VERSION_MAX_NODOTS=${MACOSX_VERSION_MAX//\./}
+
+ AC_SUBST(MACOSX_VERSION_MAX)
+ fi
+])
+
# Reset the global CFLAGS/LDFLAGS variables and initialize them with the
# corresponding configure arguments instead
AC_DEFUN_ONCE([FLAGS_SETUP_USER_SUPPLIED_FLAGS],
[
- if test "x$CFLAGS" != "x${ADDED_CFLAGS}"; then
+ if test "x$CFLAGS" != "x"; then
AC_MSG_WARN([Ignoring CFLAGS($CFLAGS) found in environment. Use --with-extra-cflags])
fi
- if test "x$CXXFLAGS" != "x${ADDED_CXXFLAGS}"; then
+ if test "x$CXXFLAGS" != "x"; then
AC_MSG_WARN([Ignoring CXXFLAGS($CXXFLAGS) found in environment. Use --with-extra-cxxflags])
fi
- if test "x$LDFLAGS" != "x${ADDED_LDFLAGS}"; then
+ if test "x$LDFLAGS" != "x"; then
AC_MSG_WARN([Ignoring LDFLAGS($LDFLAGS) found in environment. Use --with-extra-ldflags])
fi
@@ -143,20 +171,9 @@
AC_ARG_WITH(extra-ldflags, [AS_HELP_STRING([--with-extra-ldflags],
[extra flags to be used when linking jdk])])
- EXTRA_CFLAGS="$with_extra_cflags"
- EXTRA_CXXFLAGS="$with_extra_cxxflags"
- EXTRA_LDFLAGS="$with_extra_ldflags"
-
- AC_SUBST(EXTRA_CFLAGS)
- AC_SUBST(EXTRA_CXXFLAGS)
- AC_SUBST(EXTRA_LDFLAGS)
-
- # The global CFLAGS and LDLAGS variables are used by configure tests and
- # should include the extra parameters
- CFLAGS="$EXTRA_CFLAGS"
- CXXFLAGS="$EXTRA_CXXFLAGS"
- LDFLAGS="$EXTRA_LDFLAGS"
- CPPFLAGS=""
+ USER_CFLAGS="$with_extra_cflags"
+ USER_CXXFLAGS="$with_extra_cxxflags"
+ USER_LDFLAGS="$with_extra_ldflags"
])
# Setup the sysroot flags and add them to global CFLAGS and LDFLAGS so
@@ -193,11 +210,6 @@
$1SYSROOT_CFLAGS="-isysroot [$]$1SYSROOT"
$1SYSROOT_LDFLAGS="-isysroot [$]$1SYSROOT"
fi
- # The global CFLAGS and LDFLAGS variables need these for configure to function
- $1CFLAGS="[$]$1CFLAGS [$]$1SYSROOT_CFLAGS"
- $1CPPFLAGS="[$]$1CPPFLAGS [$]$1SYSROOT_CFLAGS"
- $1CXXFLAGS="[$]$1CXXFLAGS [$]$1SYSROOT_CFLAGS"
- $1LDFLAGS="[$]$1LDFLAGS [$]$1SYSROOT_LDFLAGS"
fi
if test "x$OPENJDK_TARGET_OS" = xmacosx; then
@@ -214,7 +226,50 @@
AC_SUBST($1SYSROOT_LDFLAGS)
])
-AC_DEFUN_ONCE([FLAGS_SETUP_INIT_FLAGS],
+AC_DEFUN_ONCE([FLAGS_PRE_TOOLCHAIN],
+[
+ # We should always include user supplied flags
+ FLAGS_SETUP_USER_SUPPLIED_FLAGS
+ # The sysroot flags are needed for configure to be able to run the compilers
+ FLAGS_SETUP_SYSROOT_FLAGS
+
+ if test "x$TOOLCHAIN_TYPE" = xxlc; then
+ MACHINE_FLAG="-q${OPENJDK_TARGET_CPU_BITS}"
+ elif test "x$TOOLCHAIN_TYPE" != xmicrosoft; then
+ MACHINE_FLAG="-m${OPENJDK_TARGET_CPU_BITS}"
+ fi
+
+ # FIXME: global flags are not used yet...
+ # The "global" flags will *always* be set. Without them, it is not possible to
+ # get a working compilation.
+ GLOBAL_CFLAGS="$MACHINE_FLAG $SYSROOT_CFLAGS $USER_CFLAGS"
+ GLOBAL_CXXFLAGS="$MACHINE_FLAG $SYSROOT_CFLAGS $USER_CXXFLAGS"
+ GLOBAL_LDFLAGS="$MACHINE_FLAG $SYSROOT_LDFLAGS $USER_LDFLAGS"
+ # FIXME: Don't really know how to do with this, but this was the old behavior
+ GLOBAL_CPPFLAGS="$SYSROOT_CFLAGS"
+ AC_SUBST(GLOBAL_CFLAGS)
+ AC_SUBST(GLOBAL_CXXFLAGS)
+ AC_SUBST(GLOBAL_LDFLAGS)
+ AC_SUBST(GLOBAL_CPPFLAGS)
+
+ # FIXME: For compatilibity, export this as EXTRA_CFLAGS for now.
+ EXTRA_CFLAGS="$MACHINE_FLAG $USER_CFLAGS"
+ EXTRA_CXXFLAGS="$MACHINE_FLAG $USER_CXXFLAGS"
+ EXTRA_LDFLAGS="$MACHINE_FLAG $USER_LDFLAGS"
+
+ AC_SUBST(EXTRA_CFLAGS)
+ AC_SUBST(EXTRA_CXXFLAGS)
+ AC_SUBST(EXTRA_LDFLAGS)
+
+ # For autoconf testing to work, the global flags must also be stored in the
+ # "unnamed" CFLAGS etc.
+ CFLAGS="$GLOBAL_CFLAGS"
+ CXXFLAGS="$GLOBAL_CXXFLAGS"
+ LDFLAGS="$GLOBAL_LDFLAGS"
+ CPPFLAGS="$GLOBAL_CPPFLAGS"
+])
+
+AC_DEFUN([FLAGS_SETUP_TOOLCHAIN_CONTROL],
[
# COMPILER_TARGET_BITS_FLAG : option for selecting 32- or 64-bit output
# COMPILER_COMMAND_FILE_FLAG : option for passing a command file to the compiler
@@ -249,38 +304,17 @@
$RM command.file
fi
fi
+
AC_SUBST(COMPILER_TARGET_BITS_FLAG)
AC_SUBST(COMPILER_COMMAND_FILE_FLAG)
AC_SUBST(COMPILER_BINDCMD_FILE_FLAG)
- # FIXME: figure out if we should select AR flags depending on OS or toolchain.
- if test "x$OPENJDK_TARGET_OS" = xmacosx; then
- ARFLAGS="-r"
- elif test "x$OPENJDK_TARGET_OS" = xaix; then
- ARFLAGS="-X64"
- elif test "x$OPENJDK_TARGET_OS" = xwindows; then
- # lib.exe is used as AR to create static libraries.
- ARFLAGS="-nologo -NODEFAULTLIB:MSVCRT"
- else
- ARFLAGS=""
- fi
- AC_SUBST(ARFLAGS)
-
- ## Setup strip.
- # FIXME: should this really be per platform, or should it be per toolchain type?
- # strip is not provided by clang or solstudio; so guessing platform makes most sense.
- # FIXME: we should really only export STRIPFLAGS from here, not POST_STRIP_CMD.
- if test "x$OPENJDK_TARGET_OS" = xlinux; then
- STRIPFLAGS="-g"
- elif test "x$OPENJDK_TARGET_OS" = xsolaris; then
- STRIPFLAGS="-x"
- elif test "x$OPENJDK_TARGET_OS" = xmacosx; then
- STRIPFLAGS="-S"
- elif test "x$OPENJDK_TARGET_OS" = xaix; then
- STRIPFLAGS="-X32_64"
- fi
-
- AC_SUBST(STRIPFLAGS)
+ # Check that the compiler supports -mX (or -qX on AIX) flags
+ # Set COMPILER_SUPPORTS_TARGET_BITS_FLAG to 'true' if it does
+ FLAGS_COMPILER_CHECK_ARGUMENTS(ARGUMENT: [${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}],
+ IF_TRUE: [COMPILER_SUPPORTS_TARGET_BITS_FLAG=true],
+ IF_FALSE: [COMPILER_SUPPORTS_TARGET_BITS_FLAG=false])
+ AC_SUBST(COMPILER_SUPPORTS_TARGET_BITS_FLAG)
if test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
CC_OUT_OPTION=-Fo
@@ -303,216 +337,6 @@
AC_SUBST(LD_OUT_OPTION)
AC_SUBST(AR_OUT_OPTION)
- # On Windows, we need to set RC flags.
- if test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
- RC_FLAGS="-nologo -l0x409"
- JVM_RCFLAGS="-nologo"
- if test "x$DEBUG_LEVEL" = xrelease; then
- RC_FLAGS="$RC_FLAGS -DNDEBUG"
- JVM_RCFLAGS="$JVM_RCFLAGS -DNDEBUG"
- fi
-
- # The version variables used to create RC_FLAGS may be overridden
- # in a custom configure script, or possibly the command line.
- # Let those variables be expanded at make time in spec.gmk.
- # The \$ are escaped to the shell, and the $(...) variables
- # are evaluated by make.
- RC_FLAGS="$RC_FLAGS \
- -D\"JDK_VERSION_STRING=\$(VERSION_STRING)\" \
- -D\"JDK_COMPANY=\$(COMPANY_NAME)\" \
- -D\"JDK_COMPONENT=\$(PRODUCT_NAME) \$(JDK_RC_PLATFORM_NAME) binary\" \
- -D\"JDK_VER=\$(VERSION_NUMBER)\" \
- -D\"JDK_COPYRIGHT=Copyright \xA9 $COPYRIGHT_YEAR\" \
- -D\"JDK_NAME=\$(PRODUCT_NAME) \$(JDK_RC_PLATFORM_NAME) \$(VERSION_FEATURE)\" \
- -D\"JDK_FVER=\$(subst .,\$(COMMA),\$(VERSION_NUMBER_FOUR_POSITIONS))\""
-
- JVM_RCFLAGS="$JVM_RCFLAGS \
- -D\"HS_BUILD_ID=\$(VERSION_STRING)\" \
- -D\"HS_COMPANY=\$(COMPANY_NAME)\" \
- -D\"JDK_DOTVER=\$(VERSION_NUMBER_FOUR_POSITIONS)\" \
- -D\"HS_COPYRIGHT=Copyright $COPYRIGHT_YEAR\" \
- -D\"HS_NAME=\$(PRODUCT_NAME) \$(VERSION_SHORT)\" \
- -D\"JDK_VER=\$(subst .,\$(COMMA),\$(VERSION_NUMBER_FOUR_POSITIONS))\" \
- -D\"HS_FNAME=jvm.dll\" \
- -D\"HS_INTERNAL_NAME=jvm\""
- fi
- AC_SUBST(RC_FLAGS)
- AC_SUBST(JVM_RCFLAGS)
-
- if test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
- # silence copyright notice and other headers.
- COMMON_CCXXFLAGS="$COMMON_CCXXFLAGS -nologo"
- fi
-])
-
-AC_DEFUN([FLAGS_SETUP_COMPILER_FLAGS_FOR_LIBS],
-[
- ###############################################################################
- #
- # How to compile shared libraries.
- #
-
- if test "x$TOOLCHAIN_TYPE" = xgcc; then
- PICFLAG="-fPIC"
- C_FLAG_REORDER=''
- CXX_FLAG_REORDER=''
-
- if test "x$OPENJDK_TARGET_OS" = xmacosx; then
- # Linking is different on MacOSX
- if test "x$STATIC_BUILD" = xtrue; then
- SHARED_LIBRARY_FLAGS ='-undefined dynamic_lookup'
- else
- SHARED_LIBRARY_FLAGS="-dynamiclib -compatibility_version 1.0.0 -current_version 1.0.0 $PICFLAG"
- JVM_CFLAGS="$JVM_CFLAGS $PICFLAG"
- fi
- SET_EXECUTABLE_ORIGIN='-Wl,-rpath,@loader_path$(or [$]1,/.)'
- SET_SHARED_LIBRARY_ORIGIN="$SET_EXECUTABLE_ORIGIN"
- SET_SHARED_LIBRARY_NAME='-Wl,-install_name,@rpath/[$]1'
- SET_SHARED_LIBRARY_MAPFILE='-Wl,-exported_symbols_list,[$]1'
- else
- # Default works for linux, might work on other platforms as well.
- SHARED_LIBRARY_FLAGS='-shared'
- SET_EXECUTABLE_ORIGIN='-Wl,-rpath,\$$ORIGIN[$]1'
- SET_SHARED_LIBRARY_ORIGIN="-Wl,-z,origin $SET_EXECUTABLE_ORIGIN"
- SET_SHARED_LIBRARY_NAME='-Wl,-soname=[$]1'
- SET_SHARED_LIBRARY_MAPFILE='-Wl,-version-script=[$]1'
- fi
- elif test "x$TOOLCHAIN_TYPE" = xclang; then
- C_FLAG_REORDER=''
- CXX_FLAG_REORDER=''
-
- if test "x$OPENJDK_TARGET_OS" = xmacosx; then
- # Linking is different on MacOSX
- PICFLAG=''
- SHARED_LIBRARY_FLAGS="-dynamiclib -compatibility_version 1.0.0 -current_version 1.0.0 $PICFLAG"
- SET_EXECUTABLE_ORIGIN='-Wl,-rpath,@loader_path$(or [$]1,/.)'
- SET_SHARED_LIBRARY_ORIGIN="$SET_EXECUTABLE_ORIGIN"
- SET_SHARED_LIBRARY_NAME='-Wl,-install_name,@rpath/[$]1'
- SET_SHARED_LIBRARY_MAPFILE='-Wl,-exported_symbols_list,[$]1'
-
- if test "x$STATIC_BUILD" = xfalse; then
- JVM_CFLAGS="$JVM_CFLAGS -fPIC"
- fi
- else
- # Default works for linux, might work on other platforms as well.
- PICFLAG='-fPIC'
- SHARED_LIBRARY_FLAGS='-shared'
- SET_EXECUTABLE_ORIGIN='-Wl,-rpath,\$$ORIGIN[$]1'
- SET_SHARED_LIBRARY_NAME='-Wl,-soname=[$]1'
- SET_SHARED_LIBRARY_MAPFILE='-Wl,-version-script=[$]1'
-
- # arm specific settings
- if test "x$OPENJDK_TARGET_CPU" = "xarm"; then
- # '-Wl,-z,origin' isn't used on arm.
- SET_SHARED_LIBRARY_ORIGIN='-Wl,-rpath,\$$$$ORIGIN[$]1'
- else
- SET_SHARED_LIBRARY_ORIGIN="-Wl,-z,origin $SET_EXECUTABLE_ORIGIN"
- fi
-
- fi
- elif test "x$TOOLCHAIN_TYPE" = xsolstudio; then
- if test "x$OPENJDK_TARGET_CPU" = xsparcv9; then
- PICFLAG="-xcode=pic32"
- else
- PICFLAG="-KPIC"
- fi
- C_FLAG_REORDER='-xF'
- CXX_FLAG_REORDER='-xF'
- SHARED_LIBRARY_FLAGS="-G"
- SET_EXECUTABLE_ORIGIN='-R\$$ORIGIN[$]1'
- SET_SHARED_LIBRARY_ORIGIN="$SET_EXECUTABLE_ORIGIN"
- SET_SHARED_LIBRARY_NAME='-h [$]1'
- SET_SHARED_LIBRARY_MAPFILE='-M[$]1'
- elif test "x$TOOLCHAIN_TYPE" = xxlc; then
- # '-qpic' defaults to 'qpic=small'. This means that the compiler generates only
- # one instruction for accessing the TOC. If the TOC grows larger than 64K, the linker
- # will have to patch this single instruction with a call to some out-of-order code which
- # does the load from the TOC. This is of course slow. But in that case we also would have
- # to use '-bbigtoc' for linking anyway so we could also change the PICFLAG to 'qpic=large'.
- # With 'qpic=large' the compiler will by default generate a two-instruction sequence which
- # can be patched directly by the linker and does not require a jump to out-of-order code.
- # Another alternative instead of using 'qpic=large -bbigtoc' may be to use '-qminimaltoc'
- # instead. This creates a distinct TOC for every compilation unit (and thus requires two
- # loads for accessing a global variable). But there are rumors that this may be seen as a
- # 'performance feature' because of improved code locality of the symbols used in a
- # compilation unit.
- PICFLAG="-qpic"
- JVM_CFLAGS="$JVM_CFLAGS $PICFLAG"
- C_FLAG_REORDER=''
- CXX_FLAG_REORDER=''
- SHARED_LIBRARY_FLAGS="-qmkshrobj -bM:SRE -bnoentry"
- SET_EXECUTABLE_ORIGIN=""
- SET_SHARED_LIBRARY_ORIGIN=''
- SET_SHARED_LIBRARY_NAME=''
- SET_SHARED_LIBRARY_MAPFILE=''
- elif test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
- PICFLAG=""
- C_FLAG_REORDER=''
- CXX_FLAG_REORDER=''
- SHARED_LIBRARY_FLAGS="-dll"
- SET_EXECUTABLE_ORIGIN=''
- SET_SHARED_LIBRARY_ORIGIN=''
- SET_SHARED_LIBRARY_NAME=''
- SET_SHARED_LIBRARY_MAPFILE='-def:[$]1'
- fi
-
- AC_SUBST(C_FLAG_REORDER)
- AC_SUBST(CXX_FLAG_REORDER)
- AC_SUBST(SET_EXECUTABLE_ORIGIN)
- AC_SUBST(SET_SHARED_LIBRARY_ORIGIN)
- AC_SUBST(SET_SHARED_LIBRARY_NAME)
- AC_SUBST(SET_SHARED_LIBRARY_MAPFILE)
- AC_SUBST(SHARED_LIBRARY_FLAGS)
-
- # The (cross) compiler is now configured, we can now test capabilities
- # of the target platform.
-])
-
-# Documentation on common flags used for solstudio in HIGHEST.
-#
-# WARNING: Use of OPTIMIZATION_LEVEL=HIGHEST in your Makefile needs to be
-# done with care, there are some assumptions below that need to
-# be understood about the use of pointers, and IEEE behavior.
-#
-# -fns: Use non-standard floating point mode (not IEEE 754)
-# -fsimple: Do some simplification of floating point arithmetic (not IEEE 754)
-# -fsingle: Use single precision floating point with 'float'
-# -xalias_level=basic: Assume memory references via basic pointer types do not alias
-# (Source with excessing pointer casting and data access with mixed
-# pointer types are not recommended)
-# -xbuiltin=%all: Use intrinsic or inline versions for math/std functions
-# (If you expect perfect errno behavior, do not use this)
-# -xdepend: Loop data dependency optimizations (need -xO3 or higher)
-# -xrestrict: Pointer parameters to functions do not overlap
-# (Similar to -xalias_level=basic usage, but less obvious sometimes.
-# If you pass in multiple pointers to the same data, do not use this)
-# -xlibmil: Inline some library routines
-# (If you expect perfect errno behavior, do not use this)
-# -xlibmopt: Use optimized math routines (CURRENTLY DISABLED)
-# (If you expect perfect errno behavior, do not use this)
-# Can cause undefined external on Solaris 8 X86 on __sincos, removing for now
-
- # FIXME: this will never happen since sparc != sparcv9, ie 32 bit, which we don't build anymore.
- # Bug?
- #if test "x$OPENJDK_TARGET_CPU" = xsparc; then
- # CFLAGS_JDK="${CFLAGS_JDK} -xmemalign=4s"
- # CXXFLAGS_JDK="${CXXFLAGS_JDK} -xmemalign=4s"
- #fi
-
-AC_DEFUN_ONCE([FLAGS_SETUP_COMPILER_FLAGS_FOR_OPTIMIZATION],
-[
-
- ###############################################################################
- #
- # Setup the opt flags for different compilers
- # and different operating systems.
- #
-
- # FIXME: this was indirectly the old default, but just inherited.
- # if test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
- # C_FLAG_DEPS="-MMD -MF"
- # fi
-
# Generate make dependency files
if test "x$TOOLCHAIN_TYPE" = xgcc; then
C_FLAG_DEPS="-MMD -MF"
@@ -526,887 +350,44 @@
CXX_FLAG_DEPS="$C_FLAG_DEPS"
AC_SUBST(C_FLAG_DEPS)
AC_SUBST(CXX_FLAG_DEPS)
-
- # Debug symbols
- if test "x$TOOLCHAIN_TYPE" = xgcc; then
- if test "x$OPENJDK_TARGET_CPU_BITS" = "x64" && test "x$DEBUG_LEVEL" = "xfastdebug"; then
- # reduce from default "-g2" option to save space
- CFLAGS_DEBUG_SYMBOLS="-g1"
- CXXFLAGS_DEBUG_SYMBOLS="-g1"
- else
- CFLAGS_DEBUG_SYMBOLS="-g"
- CXXFLAGS_DEBUG_SYMBOLS="-g"
- fi
- elif test "x$TOOLCHAIN_TYPE" = xclang; then
- CFLAGS_DEBUG_SYMBOLS="-g"
- CXXFLAGS_DEBUG_SYMBOLS="-g"
- elif test "x$TOOLCHAIN_TYPE" = xsolstudio; then
- CFLAGS_DEBUG_SYMBOLS="-g -xs"
- # -g0 enables debug symbols without disabling inlining.
- CXXFLAGS_DEBUG_SYMBOLS="-g0 -xs"
- elif test "x$TOOLCHAIN_TYPE" = xxlc; then
- CFLAGS_DEBUG_SYMBOLS="-g"
- CXXFLAGS_DEBUG_SYMBOLS="-g"
- elif test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
- CFLAGS_DEBUG_SYMBOLS="-Zi"
- CXXFLAGS_DEBUG_SYMBOLS="-Zi"
- fi
- AC_SUBST(CFLAGS_DEBUG_SYMBOLS)
- AC_SUBST(CXXFLAGS_DEBUG_SYMBOLS)
-
- # Debug symbols for JVM_CFLAGS
- if test "x$TOOLCHAIN_TYPE" = xsolstudio; then
- JVM_CFLAGS_SYMBOLS="$JVM_CFLAGS_SYMBOLS -xs"
- if test "x$DEBUG_LEVEL" = xslowdebug; then
- JVM_CFLAGS_SYMBOLS="$JVM_CFLAGS_SYMBOLS -g"
- else
- # -g0 does not disable inlining, which -g does.
- JVM_CFLAGS_SYMBOLS="$JVM_CFLAGS_SYMBOLS -g0"
- fi
- elif test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
- JVM_CFLAGS_SYMBOLS="$JVM_CFLAGS_SYMBOLS -Z7 -d2Zi+"
- else
- JVM_CFLAGS_SYMBOLS="$JVM_CFLAGS_SYMBOLS -g"
- fi
- AC_SUBST(JVM_CFLAGS_SYMBOLS)
-
- # bounds, memory and behavior checking options
- if test "x$TOOLCHAIN_TYPE" = xgcc; then
- case $DEBUG_LEVEL in
- release )
- # no adjustment
- ;;
- fastdebug )
- # no adjustment
- ;;
- slowdebug )
- # FIXME: By adding this to C(XX)FLAGS_DEBUG_OPTIONS/JVM_CFLAGS_SYMBOLS it
- # get's added conditionally on whether we produce debug symbols or not.
- # This is most likely not really correct.
-
- # Add runtime stack smashing and undefined behavior checks.
- # Not all versions of gcc support -fstack-protector
- STACK_PROTECTOR_CFLAG="-fstack-protector-all"
- FLAGS_COMPILER_CHECK_ARGUMENTS(ARGUMENT: [$STACK_PROTECTOR_CFLAG -Werror], IF_FALSE: [STACK_PROTECTOR_CFLAG=""])
-
- CFLAGS_DEBUG_OPTIONS="$STACK_PROTECTOR_CFLAG --param ssp-buffer-size=1"
- CXXFLAGS_DEBUG_OPTIONS="$STACK_PROTECTOR_CFLAG --param ssp-buffer-size=1"
- if test "x$STACK_PROTECTOR_CFLAG" != x; then
- JVM_CFLAGS_SYMBOLS="$JVM_CFLAGS_SYMBOLS $STACK_PROTECTOR_CFLAG --param ssp-buffer-size=1"
- fi
- ;;
- esac
- fi
-
- if test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
- if test "x$DEBUG_LEVEL" != xrelease; then
- if test "x$OPENJDK_TARGET_CPU" = xx86_64; then
- JVM_CFLAGS="$JVM_CFLAGS -homeparams"
- fi
- fi
- fi
-
- # Optimization levels
- if test "x$TOOLCHAIN_TYPE" = xsolstudio; then
- CC_HIGHEST="$CC_HIGHEST -fns -fsimple -fsingle -xbuiltin=%all -xdepend -xrestrict -xlibmil"
-
- if test "x$OPENJDK_TARGET_CPU_ARCH" = "xx86"; then
- # FIXME: seems we always set -xregs=no%frameptr; put it elsewhere more global?
- C_O_FLAG_HIGHEST_JVM="-xO4"
- C_O_FLAG_HIGHEST="-xO4 -Wu,-O4~yz $CC_HIGHEST -xalias_level=basic -xregs=no%frameptr"
- C_O_FLAG_HI="-xO4 -Wu,-O4~yz -xregs=no%frameptr"
- C_O_FLAG_NORM="-xO2 -Wu,-O2~yz -xregs=no%frameptr"
- C_O_FLAG_DEBUG="-xregs=no%frameptr"
- C_O_FLAG_DEBUG_JVM=""
- C_O_FLAG_NONE="-xregs=no%frameptr"
- CXX_O_FLAG_HIGHEST_JVM="-xO4"
- CXX_O_FLAG_HIGHEST="-xO4 -Qoption ube -O4~yz $CC_HIGHEST -xregs=no%frameptr"
- CXX_O_FLAG_HI="-xO4 -Qoption ube -O4~yz -xregs=no%frameptr"
- CXX_O_FLAG_NORM="-xO2 -Qoption ube -O2~yz -xregs=no%frameptr"
- CXX_O_FLAG_DEBUG="-xregs=no%frameptr"
- CXX_O_FLAG_DEBUG_JVM=""
- CXX_O_FLAG_NONE="-xregs=no%frameptr"
- if test "x$OPENJDK_TARGET_CPU_BITS" = "x32"; then
- C_O_FLAG_HIGHEST="$C_O_FLAG_HIGHEST -xchip=pentium"
- CXX_O_FLAG_HIGHEST="$CXX_O_FLAG_HIGHEST -xchip=pentium"
- fi
- elif test "x$OPENJDK_TARGET_CPU_ARCH" = "xsparc"; then
- C_O_FLAG_HIGHEST_JVM="-xO4"
- C_O_FLAG_HIGHEST="-xO4 -Wc,-Qrm-s -Wc,-Qiselect-T0 $CC_HIGHEST -xalias_level=basic -xprefetch=auto,explicit -xchip=ultra"
- C_O_FLAG_HI="-xO4 -Wc,-Qrm-s -Wc,-Qiselect-T0"
- C_O_FLAG_NORM="-xO2 -Wc,-Qrm-s -Wc,-Qiselect-T0"
- C_O_FLAG_DEBUG=""
- C_O_FLAG_DEBUG_JVM=""
- C_O_FLAG_NONE=""
- CXX_O_FLAG_HIGHEST_JVM="-xO4"
- CXX_O_FLAG_HIGHEST="-xO4 -Qoption cg -Qrm-s -Qoption cg -Qiselect-T0 $CC_HIGHEST -xprefetch=auto,explicit -xchip=ultra"
- CXX_O_FLAG_HI="-xO4 -Qoption cg -Qrm-s -Qoption cg -Qiselect-T0"
- CXX_O_FLAG_NORM="-xO2 -Qoption cg -Qrm-s -Qoption cg -Qiselect-T0"
- CXX_O_FLAG_DEBUG=""
- CXX_O_FLAG_DEBUG_JVM=""
- CXX_O_FLAG_NONE=""
- fi
- else
- # The remaining toolchains share opt flags between CC and CXX;
- # setup for C and duplicate afterwards.
- if test "x$TOOLCHAIN_TYPE" = xgcc; then
- if test "x$OPENJDK_TARGET_OS" = xmacosx; then
- # On MacOSX we optimize for size, something
- # we should do for all platforms?
- C_O_FLAG_HIGHEST_JVM="-Os"
- C_O_FLAG_HIGHEST="-Os"
- C_O_FLAG_HI="-Os"
- C_O_FLAG_NORM="-Os"
- C_O_FLAG_SIZE="-Os"
- else
- C_O_FLAG_HIGHEST_JVM="-O3"
- C_O_FLAG_HIGHEST="-O3"
- C_O_FLAG_HI="-O3"
- C_O_FLAG_NORM="-O2"
- C_O_FLAG_SIZE="-Os"
- fi
- C_O_FLAG_DEBUG="-O0"
- if test "x$OPENJDK_TARGET_OS" = xmacosx; then
- C_O_FLAG_DEBUG_JVM=""
- elif test "x$OPENJDK_TARGET_OS" = xlinux; then
- C_O_FLAG_DEBUG_JVM="-O0"
- fi
- C_O_FLAG_NONE="-O0"
- elif test "x$TOOLCHAIN_TYPE" = xclang; then
- if test "x$OPENJDK_TARGET_OS" = xmacosx; then
- # On MacOSX we optimize for size, something
- # we should do for all platforms?
- C_O_FLAG_HIGHEST_JVM="-Os"
- C_O_FLAG_HIGHEST="-Os"
- C_O_FLAG_HI="-Os"
- C_O_FLAG_NORM="-Os"
- C_O_FLAG_SIZE="-Os"
- else
- C_O_FLAG_HIGHEST_JVM="-O3"
- C_O_FLAG_HIGHEST="-O3"
- C_O_FLAG_HI="-O3"
- C_O_FLAG_NORM="-O2"
- C_O_FLAG_SIZE="-Os"
- fi
- C_O_FLAG_DEBUG="-O0"
- if test "x$OPENJDK_TARGET_OS" = xmacosx; then
- C_O_FLAG_DEBUG_JVM=""
- elif test "x$OPENJDK_TARGET_OS" = xlinux; then
- C_O_FLAG_DEBUG_JVM="-O0"
- fi
- C_O_FLAG_NONE="-O0"
- elif test "x$TOOLCHAIN_TYPE" = xxlc; then
- C_O_FLAG_HIGHEST_JVM="-O3 -qhot=level=1 -qinline -qinlglue"
- C_O_FLAG_HIGHEST="-O3 -qhot=level=1 -qinline -qinlglue"
- C_O_FLAG_HI="-O3 -qinline -qinlglue"
- C_O_FLAG_NORM="-O2"
- C_O_FLAG_DEBUG="-qnoopt"
- # FIXME: Value below not verified.
- C_O_FLAG_DEBUG_JVM=""
- C_O_FLAG_NONE="-qnoopt"
- elif test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
- C_O_FLAG_HIGHEST_JVM="-O2 -Oy-"
- C_O_FLAG_HIGHEST="-O2"
- C_O_FLAG_HI="-O1"
- C_O_FLAG_NORM="-O1"
- C_O_FLAG_DEBUG="-Od"
- C_O_FLAG_DEBUG_JVM=""
- C_O_FLAG_NONE="-Od"
- C_O_FLAG_SIZE="-Os"
- fi
- CXX_O_FLAG_HIGHEST_JVM="$C_O_FLAG_HIGHEST_JVM"
- CXX_O_FLAG_HIGHEST="$C_O_FLAG_HIGHEST"
- CXX_O_FLAG_HI="$C_O_FLAG_HI"
- CXX_O_FLAG_NORM="$C_O_FLAG_NORM"
- CXX_O_FLAG_DEBUG="$C_O_FLAG_DEBUG"
- CXX_O_FLAG_DEBUG_JVM="$C_O_FLAG_DEBUG_JVM"
- CXX_O_FLAG_NONE="$C_O_FLAG_NONE"
- CXX_O_FLAG_SIZE="$C_O_FLAG_SIZE"
- fi
-
- # Adjust optimization flags according to debug level.
- case $DEBUG_LEVEL in
- release )
- # no adjustment
- ;;
- fastdebug )
- # Not quite so much optimization
- C_O_FLAG_HI="$C_O_FLAG_NORM"
- CXX_O_FLAG_HI="$CXX_O_FLAG_NORM"
- ;;
- slowdebug )
- # Disable optimization
- C_O_FLAG_HIGHEST_JVM="$C_O_FLAG_DEBUG_JVM"
- C_O_FLAG_HIGHEST="$C_O_FLAG_DEBUG"
- C_O_FLAG_HI="$C_O_FLAG_DEBUG"
- C_O_FLAG_NORM="$C_O_FLAG_DEBUG"
- C_O_FLAG_SIZE="$C_O_FLAG_DEBUG"
- CXX_O_FLAG_HIGHEST_JVM="$CXX_O_FLAG_DEBUG_JVM"
- CXX_O_FLAG_HIGHEST="$CXX_O_FLAG_DEBUG"
- CXX_O_FLAG_HI="$CXX_O_FLAG_DEBUG"
- CXX_O_FLAG_NORM="$CXX_O_FLAG_DEBUG"
- CXX_O_FLAG_SIZE="$CXX_O_FLAG_DEBUG"
- ;;
- esac
-
- AC_SUBST(C_O_FLAG_HIGHEST_JVM)
- AC_SUBST(C_O_FLAG_HIGHEST)
- AC_SUBST(C_O_FLAG_HI)
- AC_SUBST(C_O_FLAG_NORM)
- AC_SUBST(C_O_FLAG_DEBUG)
- AC_SUBST(C_O_FLAG_NONE)
- AC_SUBST(C_O_FLAG_SIZE)
- AC_SUBST(CXX_O_FLAG_HIGHEST_JVM)
- AC_SUBST(CXX_O_FLAG_HIGHEST)
- AC_SUBST(CXX_O_FLAG_HI)
- AC_SUBST(CXX_O_FLAG_NORM)
- AC_SUBST(CXX_O_FLAG_DEBUG)
- AC_SUBST(CXX_O_FLAG_NONE)
- AC_SUBST(CXX_O_FLAG_SIZE)
])
-
-AC_DEFUN([FLAGS_SETUP_COMPILER_FLAGS_FOR_JDK],
+AC_DEFUN_ONCE([FLAGS_POST_TOOLCHAIN],
[
-
- FLAGS_SETUP_ABI_PROFILE
-
- # Optional POSIX functionality needed by the JVM
- #
- # Check if clock_gettime is available and in which library. This indicates
- # availability of CLOCK_MONOTONIC for hotspot. But we don't need to link, so
- # don't let it update LIBS.
- save_LIBS="$LIBS"
- AC_SEARCH_LIBS(clock_gettime, rt, [HAS_CLOCK_GETTIME=true], [])
- if test "x$LIBS" = "x-lrt "; then
- CLOCK_GETTIME_IN_LIBRT=true
- fi
- LIBS="$save_LIBS"
+ FLAGS_SETUP_TOOLCHAIN_CONTROL
- FLAGS_SETUP_COMPILER_FLAGS_FOR_JDK_HELPER([TARGET])
- FLAGS_SETUP_COMPILER_FLAGS_FOR_JDK_HELPER([BUILD], [OPENJDK_BUILD_])
-
- # Tests are only ever compiled for TARGET
- # Flags for compiling test libraries
- CFLAGS_TESTLIB="$COMMON_CCXXFLAGS_JDK $CFLAGS_JDK $PICFLAG $CFLAGS_JDKLIB_EXTRA"
- CXXFLAGS_TESTLIB="$COMMON_CCXXFLAGS_JDK $CXXFLAGS_JDK $PICFLAG $CXXFLAGS_JDKLIB_EXTRA"
-
- # Flags for compiling test executables
- CFLAGS_TESTEXE="$COMMON_CCXXFLAGS_JDK $CFLAGS_JDK"
- CXXFLAGS_TESTEXE="$COMMON_CCXXFLAGS_JDK $CXXFLAGS_JDK"
-
- AC_SUBST(CFLAGS_TESTLIB)
- AC_SUBST(CFLAGS_TESTEXE)
- AC_SUBST(CXXFLAGS_TESTLIB)
- AC_SUBST(CXXFLAGS_TESTEXE)
-
- LDFLAGS_TESTLIB="$LDFLAGS_JDKLIB"
- LDFLAGS_TESTEXE="$LDFLAGS_JDKEXE $JAVA_BASE_LDFLAGS"
-
- AC_SUBST(LDFLAGS_TESTLIB)
- AC_SUBST(LDFLAGS_TESTEXE)
+ if test "x$BUILD_SYSROOT" != x; then
+ FLAGS_SETUP_SYSROOT_FLAGS([BUILD_])
+ else
+ BUILD_SYSROOT_CFLAGS="$SYSROOT_CFLAGS"
+ BUILD_SYSROOT_LDFLAGS="$SYSROOT_LDFLAGS"
+ fi
+ AC_SUBST(BUILD_SYSROOT_CFLAGS)
+ AC_SUBST(BUILD_SYSROOT_LDFLAGS)
])
-################################################################################
-# $1 - Either BUILD or TARGET to pick the correct OS/CPU variables to check
-# conditionals against.
-# $2 - Optional prefix for each variable defined.
-AC_DEFUN([FLAGS_SETUP_COMPILER_FLAGS_FOR_JDK_HELPER],
+AC_DEFUN([FLAGS_SETUP_FLAGS],
[
- # Special extras...
- if test "x$TOOLCHAIN_TYPE" = xsolstudio; then
- if test "x$OPENJDK_$1_CPU_ARCH" = "xsparc"; then
- $2CFLAGS_JDKLIB_EXTRA="${$2CFLAGS_JDKLIB_EXTRA} -xregs=no%appl"
- $2CXXFLAGS_JDKLIB_EXTRA="${$2CXXFLAGS_JDKLIB_EXTRA} -xregs=no%appl"
- fi
- $2CFLAGS_JDKLIB_EXTRA="${$2CFLAGS_JDKLIB_EXTRA} -errtags=yes -errfmt"
- $2CXXFLAGS_JDKLIB_EXTRA="${$2CXXFLAGS_JDKLIB_EXTRA} -errtags=yes -errfmt"
- elif test "x$TOOLCHAIN_TYPE" = xxlc; then
- $2CFLAGS_JDK="${$2CFLAGS_JDK} -qchars=signed -qfullpath -qsaveopt"
- $2CXXFLAGS_JDK="${$2CXXFLAGS_JDK} -qchars=signed -qfullpath -qsaveopt"
- elif test "x$TOOLCHAIN_TYPE" = xgcc; then
- $2CXXSTD_CXXFLAG="-std=gnu++98"
- FLAGS_CXX_COMPILER_CHECK_ARGUMENTS(ARGUMENT: [[$]$2CXXSTD_CXXFLAG -Werror],
- IF_FALSE: [$2CXXSTD_CXXFLAG=""])
- $2CXXFLAGS_JDK="${$2CXXFLAGS_JDK} ${$2CXXSTD_CXXFLAG}"
- $2JVM_CFLAGS="${$2JVM_CFLAGS} ${$2CXXSTD_CXXFLAG}"
- AC_SUBST($2CXXSTD_CXXFLAG)
- fi
- if test "x$OPENJDK_TARGET_OS" = xsolaris; then
- $2CFLAGS_JDK="${$2CFLAGS_JDK} -D__solaris__"
- $2CXXFLAGS_JDK="${$2CXXFLAGS_JDK} -D__solaris__"
- fi
-
- $2CFLAGS_JDK="${$2CFLAGS_JDK} ${$2EXTRA_CFLAGS}"
- $2CXXFLAGS_JDK="${$2CXXFLAGS_JDK} ${$2EXTRA_CXXFLAGS}"
- $2LDFLAGS_JDK="${$2LDFLAGS_JDK} ${$2EXTRA_LDFLAGS}"
-
- ###############################################################################
- #
- # Now setup the CFLAGS and LDFLAGS for the JDK build.
- # Later we will also have CFLAGS and LDFLAGS for the hotspot subrepo build.
- #
-
- # Setup compiler/platform specific flags into
- # $2CFLAGS_JDK - C Compiler flags
- # $2CXXFLAGS_JDK - C++ Compiler flags
- # $2COMMON_CCXXFLAGS_JDK - common to C and C++
- if test "x$TOOLCHAIN_TYPE" = xgcc; then
- $2JVM_CFLAGS="[$]$2JVM_CFLAGS -D_GNU_SOURCE"
- $2JVM_CFLAGS="[$]$2JVM_CFLAGS -D_REENTRANT"
- $2JVM_CFLAGS="[$]$2JVM_CFLAGS -fcheck-new"
- if test "x$OPENJDK_$1_CPU" = xx86; then
- # Force compatibility with i586 on 32 bit intel platforms.
- $2COMMON_CCXXFLAGS="${$2COMMON_CCXXFLAGS} -march=i586"
- $2JVM_CFLAGS="[$]$2JVM_CFLAGS -march=i586"
- fi
- $2COMMON_CCXXFLAGS_JDK="[$]$2COMMON_CCXXFLAGS [$]$2COMMON_CCXXFLAGS_JDK -Wall -Wextra -Wno-unused -Wno-unused-parameter -Wformat=2 \
- -pipe -D_GNU_SOURCE -D_REENTRANT -D_LARGEFILE64_SOURCE"
- case $OPENJDK_$1_CPU_ARCH in
- arm )
- # on arm we don't prevent gcc to omit frame pointer but do prevent strict aliasing
- $2CFLAGS_JDK="${$2CFLAGS_JDK} -fno-strict-aliasing"
- $2COMMON_CCXXFLAGS_JDK="${$2COMMON_CCXXFLAGS_JDK} -fsigned-char"
- ;;
- ppc )
- # on ppc we don't prevent gcc to omit frame pointer but do prevent strict aliasing
- $2CFLAGS_JDK="${$2CFLAGS_JDK} -fno-strict-aliasing"
- ;;
- s390 )
- $2COMMON_CCXXFLAGS_JDK="[$]$2COMMON_CCXXFLAGS_JDK -fno-omit-frame-pointer -mbackchain -march=z10"
- $2CFLAGS_JDK="${$2CFLAGS_JDK} -fno-strict-aliasing"
- ;;
- * )
- $2COMMON_CCXXFLAGS_JDK="[$]$2COMMON_CCXXFLAGS_JDK -fno-omit-frame-pointer"
- $2CFLAGS_JDK="${$2CFLAGS_JDK} -fno-strict-aliasing"
- ;;
- esac
- TOOLCHAIN_CHECK_COMPILER_VERSION(VERSION: 6, PREFIX: $2, IF_AT_LEAST: FLAGS_SETUP_GCC6_COMPILER_FLAGS($2))
- elif test "x$TOOLCHAIN_TYPE" = xclang; then
- $2JVM_CFLAGS="[$]$2JVM_CFLAGS -D_GNU_SOURCE"
-
- # Restrict the debug information created by Clang to avoid
- # too big object files and speed the build up a little bit
- # (see http://llvm.org/bugs/show_bug.cgi?id=7554)
- $2JVM_CFLAGS="[$]$2JVM_CFLAGS -flimit-debug-info"
- if test "x$OPENJDK_$1_OS" = xlinux; then
- if test "x$OPENJDK_$1_CPU" = xx86; then
- # Force compatibility with i586 on 32 bit intel platforms.
- $2COMMON_CCXXFLAGS="${$2COMMON_CCXXFLAGS} -march=i586"
- $2JVM_CFLAGS="[$]$2JVM_CFLAGS -march=i586"
- fi
- $2JVM_CFLAGS="[$]$2JVM_CFLAGS -Wno-sometimes-uninitialized"
- $2COMMON_CCXXFLAGS_JDK="[$]$2COMMON_CCXXFLAGS [$]$2COMMON_CCXXFLAGS_JDK -Wall -Wextra -Wno-unused -Wno-unused-parameter -Wformat=2 \
- -pipe -D_GNU_SOURCE -D_REENTRANT -D_LARGEFILE64_SOURCE"
- case $OPENJDK_$1_CPU_ARCH in
- ppc )
- # on ppc we don't prevent gcc to omit frame pointer but do prevent strict aliasing
- $2CFLAGS_JDK="${$2CFLAGS_JDK} -fno-strict-aliasing"
- ;;
- * )
- $2COMMON_CCXXFLAGS_JDK="[$]$2COMMON_CCXXFLAGS_JDK -fno-omit-frame-pointer"
- $2CFLAGS_JDK="${$2CFLAGS_JDK} -fno-strict-aliasing"
- ;;
- esac
- fi
- elif test "x$TOOLCHAIN_TYPE" = xsolstudio; then
- $2JVM_CFLAGS="[$]$2JVM_CFLAGS -DSPARC_WORKS"
- $2COMMON_CCXXFLAGS_JDK="[$]$2COMMON_CCXXFLAGS [$]$2COMMON_CCXXFLAGS_JDK -DTRACING -DMACRO_MEMSYS_OPS -DBREAKPTS"
- if test "x$OPENJDK_$1_CPU_ARCH" = xx86; then
- $2COMMON_CCXXFLAGS_JDK="[$]$2COMMON_CCXXFLAGS_JDK -DcpuIntel -Di586 -D$OPENJDK_$1_CPU_LEGACY_LIB"
- fi
-
- $2CFLAGS_JDK="[$]$2CFLAGS_JDK -xc99=%none -xCC -errshort=tags -Xa -v -mt -W0,-noglobal"
- $2CXXFLAGS_JDK="[$]$2CXXFLAGS_JDK -errtags=yes +w -mt -features=no%except -DCC_NOEX -norunpath -xnolib"
- elif test "x$TOOLCHAIN_TYPE" = xxlc; then
- $2JVM_CFLAGS="[$]$2JVM_CFLAGS -D_REENTRANT"
- $2CFLAGS_JDK="[$]$2CFLAGS_JDK -D_GNU_SOURCE -D_REENTRANT -D_LARGEFILE64_SOURCE -DSTDC"
- $2CXXFLAGS_JDK="[$]$2CXXFLAGS_JDK -D_GNU_SOURCE -D_REENTRANT -D_LARGEFILE64_SOURCE -DSTDC"
- elif test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
- $2COMMON_CCXXFLAGS_JDK="[$]$2COMMON_CCXXFLAGS [$]$2COMMON_CCXXFLAGS_JDK \
- -MD -Zc:wchar_t- -W3 -wd4800 \
- -DWIN32_LEAN_AND_MEAN \
- -D_CRT_SECURE_NO_DEPRECATE -D_CRT_NONSTDC_NO_DEPRECATE \
- -DWIN32 -DIAL"
- if test "x$OPENJDK_$1_CPU" = xx86_64; then
- $2COMMON_CCXXFLAGS_JDK="[$]$2COMMON_CCXXFLAGS_JDK -D_AMD64_ -Damd64"
- else
- $2COMMON_CCXXFLAGS_JDK="[$]$2COMMON_CCXXFLAGS_JDK -D_X86_ -Dx86"
- fi
- # If building with Visual Studio 2010, we can still use _STATIC_CPPLIB to
- # avoid bundling msvcpNNN.dll. Doesn't work with newer versions of visual
- # studio.
- if test "x$TOOLCHAIN_VERSION" = "x2010"; then
- STATIC_CPPLIB_FLAGS="-D_STATIC_CPPLIB -D_DISABLE_DEPRECATE_STATIC_CPPLIB"
- $2COMMON_CCXXFLAGS_JDK="[$]$2COMMON_CCXXFLAGS_JDK $STATIC_CPPLIB_FLAGS"
- $2JVM_CFLAGS="[$]$2JVM_CFLAGS $STATIC_CPPLIB_FLAGS"
- fi
- fi
-
- ###############################################################################
+ FLAGS_SETUP_MACOSX_VERSION
+ FLAGS_SETUP_ABI_PROFILE
- # Adjust flags according to debug level.
- case $DEBUG_LEVEL in
- fastdebug | slowdebug )
- $2CFLAGS_JDK="[$]$2CFLAGS_JDK $CFLAGS_DEBUG_SYMBOLS $CFLAGS_DEBUG_OPTIONS"
- $2CXXFLAGS_JDK="[$]$2CXXFLAGS_JDK $CXXFLAGS_DEBUG_SYMBOLS $CXXFLAGS_DEBUG_OPTIONS"
- ;;
- release )
- ;;
- * )
- AC_MSG_ERROR([Unrecognized \$DEBUG_LEVEL: $DEBUG_LEVEL])
- ;;
- esac
-
- # Set some common defines. These works for all compilers, but assume
- # -D is universally accepted.
-
- # Setup endianness
- if test "x$OPENJDK_$1_CPU_ENDIAN" = xlittle; then
- # The macro _LITTLE_ENDIAN needs to be defined the same to avoid the
- # Sun C compiler warning message: warning: macro redefined: _LITTLE_ENDIAN
- # (The Solaris X86 system defines this in file /usr/include/sys/isa_defs.h).
- # Note: -Dmacro is the same as #define macro 1
- # -Dmacro= is the same as #define macro
- if test "x$OPENJDK_$1_OS" = xsolaris; then
- $2COMMON_CCXXFLAGS_JDK="[$]$2COMMON_CCXXFLAGS_JDK -D_LITTLE_ENDIAN="
- else
- $2COMMON_CCXXFLAGS_JDK="[$]$2COMMON_CCXXFLAGS_JDK -D_LITTLE_ENDIAN"
- fi
- else
- # Same goes for _BIG_ENDIAN. Do we really need to set *ENDIAN on Solaris if they
- # are defined in the system?
- if test "x$OPENJDK_$1_OS" = xsolaris; then
- $2COMMON_CCXXFLAGS_JDK="[$]$2COMMON_CCXXFLAGS_JDK -D_BIG_ENDIAN="
- else
- $2COMMON_CCXXFLAGS_JDK="[$]$2COMMON_CCXXFLAGS_JDK -D_BIG_ENDIAN"
- fi
- fi
-
- # Always enable optional macros for VM.
- $2JVM_CFLAGS="[$]$2JVM_CFLAGS -D__STDC_FORMAT_MACROS"
- $2JVM_CFLAGS="[$]$2JVM_CFLAGS -D__STDC_LIMIT_MACROS"
- $2JVM_CFLAGS="[$]$2JVM_CFLAGS -D__STDC_CONSTANT_MACROS"
-
- # Setup target OS define. Use OS target name but in upper case.
- OPENJDK_$1_OS_UPPERCASE=`$ECHO $OPENJDK_$1_OS | $TR 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
- $2COMMON_CCXXFLAGS_JDK="[$]$2COMMON_CCXXFLAGS_JDK -D$OPENJDK_$1_OS_UPPERCASE"
-
- # Setup target CPU
- $2COMMON_CCXXFLAGS_JDK="[$]$2COMMON_CCXXFLAGS_JDK \
- $OPENJDK_$1_ADD_LP64 \
- -DARCH='\"$OPENJDK_$1_CPU_LEGACY\"' -D$OPENJDK_$1_CPU_LEGACY"
-
- # Setup debug/release defines
- if test "x$DEBUG_LEVEL" = xrelease; then
- $2COMMON_CCXXFLAGS_JDK="[$]$2COMMON_CCXXFLAGS_JDK -DNDEBUG"
- if test "x$OPENJDK_$1_OS" = xsolaris; then
- $2COMMON_CCXXFLAGS_JDK="[$]$2COMMON_CCXXFLAGS_JDK -DTRIMMED"
- fi
- else
- $2COMMON_CCXXFLAGS_JDK="[$]$2COMMON_CCXXFLAGS_JDK -DDEBUG"
- fi
-
- # Optional POSIX functionality needed by the VM
-
- if test "x$HAS_CLOCK_GETTIME" = "xtrue"; then
- $2JVM_CFLAGS="[$]$2JVM_CFLAGS -DSUPPORTS_CLOCK_MONOTONIC"
- if test "x$CLOCK_GETTIME_IN_LIBRT" = "xtrue"; then
- $2JVM_CFLAGS="[$]$2JVM_CFLAGS -DNEEDS_LIBRT"
- fi
- fi
-
-
- # Set some additional per-OS defines.
- if test "x$OPENJDK_$1_OS" = xlinux; then
- $2JVM_CFLAGS="[$]$2JVM_CFLAGS -DLINUX"
- $2JVM_CFLAGS="[$]$2JVM_CFLAGS -pipe $PICFLAG -fno-rtti -fno-exceptions \
- -fvisibility=hidden -fno-strict-aliasing -fno-omit-frame-pointer"
- elif test "x$OPENJDK_$1_OS" = xsolaris; then
- $2JVM_CFLAGS="[$]$2JVM_CFLAGS -DSOLARIS"
- $2JVM_CFLAGS="[$]$2JVM_CFLAGS -template=no%extdef -features=no%split_init \
- -D_Crun_inline_placement -library=stlport4 $PICFLAG -mt -features=no%except"
- elif test "x$OPENJDK_$1_OS" = xmacosx; then
- $2COMMON_CCXXFLAGS_JDK="[$]$2COMMON_CCXXFLAGS_JDK -D_ALLBSD_SOURCE -D_DARWIN_UNLIMITED_SELECT"
- $2JVM_CFLAGS="[$]$2JVM_CFLAGS -D_ALLBSD_SOURCE"
- $2JVM_CFLAGS="[$]$2JVM_CFLAGS -D_DARWIN_C_SOURCE -D_XOPEN_SOURCE"
- $2JVM_CFLAGS="[$]$2JVM_CFLAGS -fno-rtti -fno-exceptions -fvisibility=hidden \
- -mno-omit-leaf-frame-pointer -mstack-alignment=16 -pipe -fno-strict-aliasing \
- -fno-omit-frame-pointer"
- elif test "x$OPENJDK_$1_OS" = xaix; then
- $2JVM_CFLAGS="[$]$2JVM_CFLAGS -DAIX"
- $2JVM_CFLAGS="[$]$2JVM_CFLAGS -qtune=balanced \
- -qalias=noansi -qstrict -qtls=default -qlanglvl=c99vla \
- -qlanglvl=noredefmac -qnortti -qnoeh -qignerrno"
- # We need '-qminimaltoc' or '-qpic=large -bbigtoc' if the TOC overflows.
- # Hotspot now overflows its 64K TOC (currently only for debug),
- # so for debug we build with '-qpic=large -bbigtoc'.
- if test "x$DEBUG_LEVEL" = xslowdebug || test "x$DEBUG_LEVEL" = xfastdebug; then
- $2JVM_CFLAGS="[$]$2JVM_CFLAGS -qpic=large"
- fi
- elif test "x$OPENJDK_$1_OS" = xbsd; then
- $2COMMON_CCXXFLAGS_JDK="[$]$2COMMON_CCXXFLAGS_JDK -D_ALLBSD_SOURCE"
- elif test "x$OPENJDK_$1_OS" = xwindows; then
- $2JVM_CFLAGS="[$]$2JVM_CFLAGS -D_WINDOWS -DWIN32 -D_JNI_IMPLEMENTATION_"
- $2JVM_CFLAGS="[$]$2JVM_CFLAGS -nologo -W3 -MD -MP"
- fi
-
- # Set some additional per-CPU defines.
- if test "x$OPENJDK_$1_OS-$OPENJDK_$1_CPU" = xwindows-x86; then
- $2JVM_CFLAGS="[$]$2JVM_CFLAGS -arch:IA32"
- elif test "x$OPENJDK_$1_OS-$OPENJDK_$1_CPU" = xsolaris-sparcv9; then
- $2JVM_CFLAGS="[$]$2JVM_CFLAGS -xarch=sparc"
- elif test "x$OPENJDK_$1_CPU" = xppc64; then
- if test "x$OPENJDK_$1_OS" = xlinux; then
- $2JVM_CFLAGS="[$]$2JVM_CFLAGS -minsert-sched-nops=regroup_exact -mno-multiple -mno-string"
- # fixes `relocation truncated to fit' error for gcc 4.1.
- $2JVM_CFLAGS="[$]$2JVM_CFLAGS -mminimal-toc"
- # Use ppc64 instructions, but schedule for power5
- $2JVM_CFLAGS="[$]$2JVM_CFLAGS -mcpu=powerpc64 -mtune=power5"
- elif test "x$OPENJDK_$1_OS" = xaix; then
- $2JVM_CFLAGS="[$]$2JVM_CFLAGS -qarch=ppc64"
- fi
- elif test "x$OPENJDK_$1_CPU" = xppc64le; then
- if test "x$OPENJDK_$1_OS" = xlinux; then
- $2JVM_CFLAGS="[$]$2JVM_CFLAGS -minsert-sched-nops=regroup_exact -mno-multiple -mno-string"
- # Little endian machine uses ELFv2 ABI.
- $2JVM_CFLAGS="[$]$2JVM_CFLAGS -DABI_ELFv2"
- # Use Power8, this is the first CPU to support PPC64 LE with ELFv2 ABI.
- $2JVM_CFLAGS="[$]$2JVM_CFLAGS -mcpu=power8 -mtune=power8"
- fi
- elif test "x$OPENJDK_$1_CPU" = xs390x; then
- if test "x$OPENJDK_$1_OS" = xlinux; then
- $2JVM_CFLAGS="[$]$2JVM_CFLAGS -mbackchain -march=z10"
- fi
- fi
-
- if test "x$OPENJDK_$1_CPU_ENDIAN" = xlittle; then
- $2JVM_CFLAGS="[$]$2JVM_CFLAGS -DVM_LITTLE_ENDIAN"
- fi
-
- if test "x$OPENJDK_$1_CPU_BITS" = x64; then
- if test "x$OPENJDK_$1_OS" != xsolaris && test "x$OPENJDK_$1_OS" != xaix; then
- # Solaris does not have _LP64=1 in the old build.
- # xlc on AIX defines _LP64=1 by default and issues a warning if we redefine it.
- $2JVM_CFLAGS="[$]$2JVM_CFLAGS -D_LP64=1"
- fi
- fi
-
- # Set $2JVM_CFLAGS warning handling
- if test "x$OPENJDK_$1_OS" = xlinux; then
- $2JVM_CFLAGS="[$]$2JVM_CFLAGS -Wpointer-arith -Wsign-compare -Wunused-function \
- -Wunused-value -Woverloaded-virtual"
+ FLAGS_SETUP_SHARED_LIBS
+ FLAGS_SETUP_DEBUG_SYMBOLS
+ FLAGS_SETUP_WARNINGS
+ FLAGS_SETUP_QUALITY_CHECKS
+ FLAGS_SETUP_OPTIMIZATION
- if test "x$TOOLCHAIN_TYPE" = xgcc; then
- TOOLCHAIN_CHECK_COMPILER_VERSION(VERSION: [4.8], PREFIX: $2,
- IF_AT_LEAST: [
- # These flags either do not work or give spurious warnings prior to gcc 4.8.
- $2JVM_CFLAGS="[$]$2JVM_CFLAGS -Wno-format-zero-length -Wtype-limits -Wuninitialized"
- ]
- )
- fi
- if ! HOTSPOT_CHECK_JVM_VARIANT(zero); then
- # Non-zero builds have stricter warnings
- $2JVM_CFLAGS="[$]$2JVM_CFLAGS -Wreturn-type -Wundef -Wformat=2"
- else
- if test "x$TOOLCHAIN_TYPE" = xclang; then
- # Some versions of llvm do not like -Wundef
- $2JVM_CFLAGS="[$]$2JVM_CFLAGS -Wno-undef"
- fi
- fi
- elif test "x$OPENJDK_$1_OS" = xmacosx; then
- $2JVM_CFLAGS="[$]$2JVM_CFLAGS -Wno-deprecated -Wpointer-arith \
- -Wsign-compare -Wundef -Wunused-function -Wformat=2"
- fi
-
- # Additional macosx handling
- if test "x$OPENJDK_$1_OS" = xmacosx; then
- # MACOSX_VERSION_MIN specifies the lowest version of Macosx that the built
- # binaries should be compatible with, even if compiled on a newer version
- # of the OS. It currently has a hard coded value. Setting this also limits
- # exposure to API changes in header files. Bumping this is likely to
- # require code changes to build.
- MACOSX_VERSION_MIN=10.7.0
- AC_SUBST(MACOSX_VERSION_MIN)
-
- # Setting --with-macosx-version-max=<version> makes it an error to build or
- # link to macosx APIs that are newer than the given OS version. The expected
- # format for <version> is either nn.n.n or nn.nn.nn. See /usr/include/AvailabilityMacros.h.
- AC_ARG_WITH([macosx-version-max], [AS_HELP_STRING([--with-macosx-version-max],
- [error on use of newer functionality. @<:@macosx@:>@])],
- [
- if echo "$with_macosx_version_max" | $GREP -q "^[[0-9]][[0-9]]\.[[0-9]]\.[[0-9]]\$"; then
- MACOSX_VERSION_MAX=$with_macosx_version_max
- elif echo "$with_macosx_version_max" | $GREP -q "^[[0-9]][[0-9]]\.[[0-9]][[0-9]]\.[[0-9]][[0-9]]\$"; then
- MACOSX_VERSION_MAX=$with_macosx_version_max
- elif test "x$with_macosx_version_max" = "xno"; then
- # Use build system default
- MACOSX_VERSION_MAX=
- else
- AC_MSG_ERROR([osx version format must be nn.n.n or nn.nn.nn])
- fi
- ],
- [MACOSX_VERSION_MAX=]
- )
- AC_SUBST(MACOSX_VERSION_MAX)
-
- # Let the flags variables get resolved in make for easier override on make
- # command line. AvailabilityMacros.h versions have no dots, ex: 1070.
- $2COMMON_CCXXFLAGS_JDK="[$]$2COMMON_CCXXFLAGS_JDK \
- -DMAC_OS_X_VERSION_MIN_REQUIRED=\$(subst .,,\$(MACOSX_VERSION_MIN)) \
- -mmacosx-version-min=\$(MACOSX_VERSION_MIN)"
- $2LDFLAGS_JDK="[$]$2LDFLAGS_JDK -mmacosx-version-min=\$(MACOSX_VERSION_MIN)"
- $2JVM_CFLAGS="[$]$2JVM_CFLAGS \
- -DMAC_OS_X_VERSION_MIN_REQUIRED=\$(subst .,,\$(MACOSX_VERSION_MIN)) \
- -mmacosx-version-min=\$(MACOSX_VERSION_MIN)"
- $2ARFLAGS="$2$ARFLAGS -mmacosx-version-min=\$(MACOSX_VERSION_MIN)"
-
- if test -n "$MACOSX_VERSION_MAX"; then
- $2COMMON_CCXXFLAGS_JDK="[$]$2COMMON_CCXXFLAGS_JDK \
- -DMAC_OS_X_VERSION_MAX_ALLOWED=\$(subst .,,\$(MACOSX_VERSION_MAX))"
- $2JVM_CFLAGS="[$]$2JVM_CFLAGS \
- -DMAC_OS_X_VERSION_MAX_ALLOWED=\$(subst .,,\$(MACOSX_VERSION_MAX))"
- fi
- fi
-
- # Setup some hard coded includes
- $2COMMON_CCXXFLAGS_JDK="[$]$2COMMON_CCXXFLAGS_JDK \
- -I\$(SUPPORT_OUTPUTDIR)/modules_include/java.base \
- -I\$(SUPPORT_OUTPUTDIR)/modules_include/java.base/\$(OPENJDK_TARGET_OS_INCLUDE_SUBDIR) \
- -I${TOPDIR}/src/java.base/share/native/libjava \
- -I${TOPDIR}/src/java.base/$OPENJDK_$1_OS_TYPE/native/libjava \
- -I${TOPDIR}/src/hotspot/share/include \
- -I${TOPDIR}/src/hotspot/os/${HOTSPOT_$1_OS_TYPE}/include"
-
- # The shared libraries are compiled using the picflag.
- $2CFLAGS_JDKLIB="[$]$2COMMON_CCXXFLAGS_JDK \
- [$]$2CFLAGS_JDK [$]$2EXTRA_CFLAGS_JDK $PICFLAG [$]$2CFLAGS_JDKLIB_EXTRA"
- $2CXXFLAGS_JDKLIB="[$]$2COMMON_CCXXFLAGS_JDK \
- [$]$2CXXFLAGS_JDK [$]$2EXTRA_CXXFLAGS_JDK $PICFLAG [$]$2CXXFLAGS_JDKLIB_EXTRA"
-
- # Executable flags
- $2CFLAGS_JDKEXE="[$]$2COMMON_CCXXFLAGS_JDK [$]$2CFLAGS_JDK [$]$2EXTRA_CFLAGS_JDK"
- $2CXXFLAGS_JDKEXE="[$]$2COMMON_CCXXFLAGS_JDK [$]$2CXXFLAGS_JDK [$]$2EXTRA_CXXFLAGS_JDK"
-
- AC_SUBST($2CFLAGS_JDKLIB)
- AC_SUBST($2CFLAGS_JDKEXE)
- AC_SUBST($2CXXFLAGS_JDKLIB)
- AC_SUBST($2CXXFLAGS_JDKEXE)
-
- # Setup LDFLAGS et al.
- #
+ FLAGS_SETUP_CFLAGS
+ FLAGS_SETUP_LDFLAGS
- if test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
- LDFLAGS_MICROSOFT="-nologo -opt:ref"
- $2LDFLAGS_JDK="[$]$2LDFLAGS_JDK $LDFLAGS_MICROSOFT -incremental:no"
- $2JVM_LDFLAGS="[$]$2JVM_LDFLAGS $LDFLAGS_MICROSOFT -opt:icf,8 -subsystem:windows -base:0x8000000"
- if test "x$OPENJDK_$1_CPU_BITS" = "x32"; then
- LDFLAGS_SAFESH="-safeseh"
- $2LDFLAGS_JDK="[$]$2LDFLAGS_JDK $LDFLAGS_SAFESH"
- $2JVM_LDFLAGS="[$]$2JVM_LDFLAGS $LDFLAGS_SAFESH"
- # NOTE: Old build added -machine. Probably not needed.
- $2JVM_LDFLAGS="[$]$2JVM_LDFLAGS -machine:I386"
- else
- $2JVM_LDFLAGS="[$]$2JVM_LDFLAGS -machine:AMD64"
- fi
- elif test "x$TOOLCHAIN_TYPE" = xclang; then
- $2JVM_LDFLAGS="[$]$2JVM_LDFLAGS -mno-omit-leaf-frame-pointer -mstack-alignment=16 -stdlib=libstdc++ -fPIC"
- if test "x$OPENJDK_$1_OS" = xmacosx; then
- # FIXME: We should really generalize SET_SHARED_LIBRARY_ORIGIN instead.
- $2JVM_LDFLAGS="[$]$2JVM_LDFLAGS -Wl,-rpath,@loader_path/. -Wl,-rpath,@loader_path/.."
- fi
- elif test "x$TOOLCHAIN_TYPE" = xgcc; then
- # If this is a --hash-style=gnu system, use --hash-style=both, why?
- # We have previously set HAS_GNU_HASH if this is the case
- if test -n "$HAS_GNU_HASH"; then
- $2LDFLAGS_HASH_STYLE="-Wl,--hash-style=both"
- $2LDFLAGS_JDK="${$2LDFLAGS_JDK} [$]$2LDFLAGS_HASH_STYLE"
- $2JVM_LDFLAGS="[$]$2JVM_LDFLAGS [$]$2LDFLAGS_HASH_STYLE"
- fi
- if test "x$OPENJDK_$1_OS" = xmacosx; then
- $2JVM_LDFLAGS="[$]$2JVM_LDFLAGS -Wl,-rpath,@loader_path/. -Wl,-rpath,@loader_path/.."
- fi
- if test "x$OPENJDK_$1_OS" = xlinux; then
- # And since we now know that the linker is gnu, then add -z defs, to forbid
- # undefined symbols in object files.
- LDFLAGS_NO_UNDEF_SYM="-Wl,-z,defs"
- $2LDFLAGS_JDK="${$2LDFLAGS_JDK} $LDFLAGS_NO_UNDEF_SYM"
- $2JVM_LDFLAGS="[$]$2JVM_LDFLAGS $LDFLAGS_NO_UNDEF_SYM"
- LDFLAGS_NO_EXEC_STACK="-Wl,-z,noexecstack"
- $2JVM_LDFLAGS="[$]$2JVM_LDFLAGS $LDFLAGS_NO_EXEC_STACK"
- if test "x$OPENJDK_$1_CPU" = xx86; then
- $2JVM_LDFLAGS="[$]$2JVM_LDFLAGS -march=i586"
- fi
- case $DEBUG_LEVEL in
- release )
- # tell linker to optimize libraries.
- # Should this be supplied to the OSS linker as well?
- LDFLAGS_DEBUGLEVEL_release="-Wl,-O1"
- $2LDFLAGS_JDK="${$2LDFLAGS_JDK} $LDFLAGS_DEBUGLEVEL_release"
- $2JVM_LDFLAGS="[$]$2JVM_LDFLAGS $LDFLAGS_DEBUGLEVEL_release"
- if test "x$HAS_LINKER_RELRO" = "xtrue"; then
- $2JVM_LDFLAGS="[$]$2JVM_LDFLAGS $LINKER_RELRO_FLAG"
- fi
- ;;
- slowdebug )
- # Hotspot always let the linker optimize
- $2JVM_LDFLAGS="[$]$2JVM_LDFLAGS -Wl,-O1"
- if test "x$HAS_LINKER_NOW" = "xtrue"; then
- # do relocations at load
- $2LDFLAGS_JDK="[$]$2LDFLAGS_JDK $LINKER_NOW_FLAG"
- $2LDFLAGS_CXX_JDK="[$]$2LDFLAGS_CXX_JDK $LINKER_NOW_FLAG"
- $2JVM_LDFLAGS="[$]$2JVM_LDFLAGS $LINKER_NOW_FLAG"
- fi
- if test "x$HAS_LINKER_RELRO" = "xtrue"; then
- # mark relocations read only
- $2LDFLAGS_JDK="[$]$2LDFLAGS_JDK $LINKER_RELRO_FLAG"
- $2LDFLAGS_CXX_JDK="[$]$2LDFLAGS_CXX_JDK $LINKER_RELRO_FLAG"
- $2JVM_LDFLAGS="[$]$2JVM_LDFLAGS $LINKER_RELRO_FLAG"
- fi
- ;;
- fastdebug )
- # Hotspot always let the linker optimize
- $2JVM_LDFLAGS="[$]$2JVM_LDFLAGS -Wl,-O1"
- if test "x$HAS_LINKER_RELRO" = "xtrue"; then
- # mark relocations read only
- $2LDFLAGS_JDK="[$]$2LDFLAGS_JDK $LINKER_RELRO_FLAG"
- $2LDFLAGS_CXX_JDK="[$]$2LDFLAGS_CXX_JDK $LINKER_RELRO_FLAG"
- $2JVM_LDFLAGS="[$]$2JVM_LDFLAGS $LINKER_RELRO_FLAG"
- fi
- ;;
- * )
- AC_MSG_ERROR([Unrecognized \$DEBUG_LEVEL: $DEBUG_LEVEL])
- ;;
- esac
- fi
- elif test "x$TOOLCHAIN_TYPE" = xsolstudio; then
- LDFLAGS_SOLSTUDIO="-Wl,-z,defs"
- $2LDFLAGS_JDK="[$]$2LDFLAGS_JDK $LDFLAGS_SOLSTUDIO -ztext"
- LDFLAGS_CXX_SOLSTUDIO="-norunpath"
- $2LDFLAGS_CXX_JDK="[$]$2LDFLAGS_CXX_JDK $LDFLAGS_CXX_SOLSTUDIO -xnolib"
- $2JVM_LDFLAGS="[$]$2JVM_LDFLAGS $LDFLAGS_SOLSTUDIO -library=%none -mt $LDFLAGS_CXX_SOLSTUDIO -z noversion"
- if test "x$OPENJDK_$1_CPU_ARCH" = "xsparc"; then
- $2JVM_LDFLAGS="[$]$2JVM_LDFLAGS -xarch=sparc"
- fi
- elif test "x$TOOLCHAIN_TYPE" = xxlc; then
- LDFLAGS_XLC="-b64 -brtl -bnolibpath -bexpall -bernotok -btextpsize:64K -bdatapsize:64K -bstackpsize:64K"
- $2LDFLAGS_JDK="${$2LDFLAGS_JDK} $LDFLAGS_XLC"
- $2JVM_LDFLAGS="[$]$2JVM_LDFLAGS $LDFLAGS_XLC"
- # We need '-qminimaltoc' or '-qpic=large -bbigtoc' if the TOC overflows.
- # Hotspot now overflows its 64K TOC (currently only for debug),
- # so we build with '-qpic=large -bbigtoc'.
- if test "x$DEBUG_LEVEL" = xslowdebug || test "x$DEBUG_LEVEL" = xfastdebug; then
- $2JVM_LDFLAGS="[$]$2JVM_LDFLAGS -bbigtoc"
- fi
- fi
+ FLAGS_SETUP_ARFLAGS
+ FLAGS_SETUP_STRIPFLAGS
+ FLAGS_SETUP_RCFLAGS
- # Customize LDFLAGS for executables
-
- $2LDFLAGS_JDKEXE="${$2LDFLAGS_JDK}"
-
- if test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
- if test "x$OPENJDK_$1_CPU_BITS" = "x64"; then
- LDFLAGS_STACK_SIZE=1048576
- else
- LDFLAGS_STACK_SIZE=327680
- fi
- $2LDFLAGS_JDKEXE="${$2LDFLAGS_JDKEXE} /STACK:$LDFLAGS_STACK_SIZE"
- elif test "x$OPENJDK_$1_OS" = xlinux; then
- $2LDFLAGS_JDKEXE="[$]$2LDFLAGS_JDKEXE -Wl,--allow-shlib-undefined"
- fi
-
- $2LDFLAGS_JDKEXE="${$2LDFLAGS_JDKEXE} ${$2EXTRA_LDFLAGS_JDK}"
-
- # Customize LDFLAGS for libs
- $2LDFLAGS_JDKLIB="${$2LDFLAGS_JDK}"
-
- $2LDFLAGS_JDKLIB="${$2LDFLAGS_JDKLIB} ${SHARED_LIBRARY_FLAGS}"
- $2LDFLAGS_JDKLIB="${$2LDFLAGS_JDKLIB} ${LDFLAGS_NO_EXEC_STACK}"
- if test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
- $2JAVA_BASE_LDFLAGS="${$2JAVA_BASE_LDFLAGS} \
- -libpath:${OUTPUTDIR}/support/modules_libs/java.base"
- $2JDKLIB_LIBS=""
- else
- $2JAVA_BASE_LDFLAGS="${$2JAVA_BASE_LDFLAGS} \
- -L\$(SUPPORT_OUTPUTDIR)/modules_libs/java.base"
-
- if test "x$1" = "xTARGET"; then
- # On some platforms (mac) the linker warns about non existing -L dirs.
- # For any of the variants server, client or minimal, the dir matches the
- # variant name. The "main" variant should be used for linking. For the
- # rest, the dir is just server.
- if HOTSPOT_CHECK_JVM_VARIANT(server) || HOTSPOT_CHECK_JVM_VARIANT(client) \
- || HOTSPOT_CHECK_JVM_VARIANT(minimal); then
- $2JAVA_BASE_LDFLAGS="${$2JAVA_BASE_LDFLAGS} \
- -L\$(SUPPORT_OUTPUTDIR)/modules_libs/java.base/$JVM_VARIANT_MAIN"
- else
- $2JAVA_BASE_LDFLAGS="${$2JAVA_BASE_LDFLAGS} \
- -L\$(SUPPORT_OUTPUTDIR)/modules_libs/java.base/server"
- fi
- elif test "x$1" = "xBUILD"; then
- # When building a buildjdk, it's always only the server variant
- $2JAVA_BASE_LDFLAGS="${$2JAVA_BASE_LDFLAGS} \
- -L\$(SUPPORT_OUTPUTDIR)/modules_libs/java.base/server"
- fi
-
- $2JDKLIB_LIBS="-ljava -ljvm"
- if test "x$TOOLCHAIN_TYPE" = xsolstudio; then
- $2JDKLIB_LIBS="[$]$2JDKLIB_LIBS -lc"
- fi
-
- fi
-
-$2LDFLAGS_JDKLIB="${$2LDFLAGS_JDKLIB} ${$2JAVA_BASE_LDFLAGS}"
-
- # Set $2JVM_LIBS (per os)
- if test "x$OPENJDK_$1_OS" = xlinux; then
- $2JVM_LIBS="[$]$2JVM_LIBS -lm -ldl -lpthread"
- elif test "x$OPENJDK_$1_OS" = xsolaris; then
- # FIXME: This hard-coded path is not really proper.
- if test "x$OPENJDK_$1_CPU" = xx86_64; then
- $2SOLARIS_LIBM_LIBS="/usr/lib/amd64/libm.so.1"
- elif test "x$OPENJDK_$1_CPU" = xsparcv9; then
- $2SOLARIS_LIBM_LIBS="/usr/lib/sparcv9/libm.so.1"
- fi
- $2JVM_LIBS="[$]$2JVM_LIBS -lsocket -lsched -ldl $SOLARIS_LIBM_LIBS -lCrun \
- -lthread -ldoor -lc -ldemangle -lnsl -lrt"
- elif test "x$OPENJDK_$1_OS" = xmacosx; then
- $2JVM_LIBS="[$]$2JVM_LIBS -lm"
- elif test "x$OPENJDK_$1_OS" = xaix; then
- $2JVM_LIBS="[$]$2JVM_LIBS -Wl,-lC_r -lm -ldl -lpthread"
- elif test "x$OPENJDK_$1_OS" = xbsd; then
- $2JVM_LIBS="[$]$2JVM_LIBS -lm"
- elif test "x$OPENJDK_$1_OS" = xwindows; then
- $2JVM_LIBS="[$]$2JVM_LIBS kernel32.lib user32.lib gdi32.lib winspool.lib \
- comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib \
- wsock32.lib winmm.lib version.lib psapi.lib"
- fi
-
- # Set $2JVM_ASFLAGS
- if test "x$OPENJDK_$1_OS" = xlinux; then
- if test "x$OPENJDK_$1_CPU" = xx86; then
- $2JVM_ASFLAGS="[$]$2JVM_ASFLAGS -march=i586"
- fi
- elif test "x$OPENJDK_$1_OS" = xmacosx; then
- $2JVM_ASFLAGS="[$]$2JVM_ASFLAGS -x assembler-with-cpp -mno-omit-leaf-frame-pointer -mstack-alignment=16"
- fi
-
- $2LDFLAGS_JDKLIB="${$2LDFLAGS_JDKLIB} ${$2EXTRA_LDFLAGS_JDK}"
-
- AC_SUBST($2LDFLAGS_JDKLIB)
- AC_SUBST($2LDFLAGS_JDKEXE)
- AC_SUBST($2JDKLIB_LIBS)
- AC_SUBST($2JDKEXE_LIBS)
- AC_SUBST($2LDFLAGS_CXX_JDK)
- AC_SUBST($2LDFLAGS_HASH_STYLE)
- AC_SUBST($2LDFLAGS_NO_EXEC_STACK)
-
- AC_SUBST($2JVM_CFLAGS)
- AC_SUBST($2JVM_LDFLAGS)
- AC_SUBST($2JVM_ASFLAGS)
- AC_SUBST($2JVM_LIBS)
-
+ FLAGS_SETUP_ASFLAGS
+ FLAGS_SETUP_ASFLAGS_CPU_DEP([TARGET])
+ FLAGS_SETUP_ASFLAGS_CPU_DEP([BUILD], [OPENJDK_BUILD_])
])
# FLAGS_C_COMPILER_CHECK_ARGUMENTS(ARGUMENT: [ARGUMENT], IF_TRUE: [RUN-IF-TRUE],
@@ -1520,110 +501,3 @@
ARG_IF_FALSE
fi
])
-
-AC_DEFUN_ONCE([FLAGS_SETUP_COMPILER_FLAGS_MISC],
-[
- # Check that the compiler supports -mX (or -qX on AIX) flags
- # Set COMPILER_SUPPORTS_TARGET_BITS_FLAG to 'true' if it does
- FLAGS_COMPILER_CHECK_ARGUMENTS(ARGUMENT: [${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}],
- IF_TRUE: [COMPILER_SUPPORTS_TARGET_BITS_FLAG=true],
- IF_FALSE: [COMPILER_SUPPORTS_TARGET_BITS_FLAG=false])
- AC_SUBST(COMPILER_SUPPORTS_TARGET_BITS_FLAG)
-
- AC_ARG_ENABLE([warnings-as-errors], [AS_HELP_STRING([--disable-warnings-as-errors],
- [do not consider native warnings to be an error @<:@enabled@:>@])])
-
- AC_MSG_CHECKING([if native warnings are errors])
- if test "x$enable_warnings_as_errors" = "xyes"; then
- AC_MSG_RESULT([yes (explicitly set)])
- WARNINGS_AS_ERRORS=true
- elif test "x$enable_warnings_as_errors" = "xno"; then
- AC_MSG_RESULT([no])
- WARNINGS_AS_ERRORS=false
- elif test "x$enable_warnings_as_errors" = "x"; then
- AC_MSG_RESULT([yes (default)])
- WARNINGS_AS_ERRORS=true
- else
- AC_MSG_ERROR([--enable-warnings-as-errors accepts no argument])
- fi
-
- AC_SUBST(WARNINGS_AS_ERRORS)
-
- case "${TOOLCHAIN_TYPE}" in
- microsoft)
- DISABLE_WARNING_PREFIX="-wd"
- CFLAGS_WARNINGS_ARE_ERRORS="-WX"
- ;;
- solstudio)
- DISABLE_WARNING_PREFIX="-erroff="
- CFLAGS_WARNINGS_ARE_ERRORS="-errtags -errwarn=%all"
- ;;
- gcc)
- # Prior to gcc 4.4, a -Wno-X where X is unknown for that version of gcc will cause an error
- FLAGS_COMPILER_CHECK_ARGUMENTS(ARGUMENT: [-Wno-this-is-a-warning-that-do-not-exist],
- IF_TRUE: [GCC_CAN_DISABLE_WARNINGS=true],
- IF_FALSE: [GCC_CAN_DISABLE_WARNINGS=false]
- )
- if test "x$GCC_CAN_DISABLE_WARNINGS" = "xtrue"; then
- DISABLE_WARNING_PREFIX="-Wno-"
- else
- DISABLE_WARNING_PREFIX=
- fi
- CFLAGS_WARNINGS_ARE_ERRORS="-Werror"
- # Repeate the check for the BUILD_CC and BUILD_CXX. Need to also reset
- # CFLAGS since any target specific flags will likely not work with the
- # build compiler
- CC_OLD="$CC"
- CXX_OLD="$CXX"
- CC="$BUILD_CC"
- CXX="$BUILD_CXX"
- CFLAGS_OLD="$CFLAGS"
- CFLAGS=""
- FLAGS_COMPILER_CHECK_ARGUMENTS(ARGUMENT: [-Wno-this-is-a-warning-that-do-not-exist],
- IF_TRUE: [BUILD_CC_CAN_DISABLE_WARNINGS=true],
- IF_FALSE: [BUILD_CC_CAN_DISABLE_WARNINGS=false]
- )
- if test "x$BUILD_CC_CAN_DISABLE_WARNINGS" = "xtrue"; then
- BUILD_CC_DISABLE_WARNING_PREFIX="-Wno-"
- else
- BUILD_CC_DISABLE_WARNING_PREFIX=
- fi
- CC="$CC_OLD"
- CXX="$CXX_OLD"
- CFLAGS="$CFLAGS_OLD"
- ;;
- clang)
- DISABLE_WARNING_PREFIX="-Wno-"
- CFLAGS_WARNINGS_ARE_ERRORS="-Werror"
- ;;
- xlc)
- DISABLE_WARNING_PREFIX="-qsuppress="
- CFLAGS_WARNINGS_ARE_ERRORS="-qhalt=w"
- ;;
- esac
- AC_SUBST(DISABLE_WARNING_PREFIX)
- AC_SUBST(BUILD_CC_DISABLE_WARNING_PREFIX)
- AC_SUBST(CFLAGS_WARNINGS_ARE_ERRORS)
-])
-
-# FLAGS_SETUP_GCC6_COMPILER_FLAGS([PREFIX])
-# Arguments:
-# $1 - Optional prefix for each variable defined.
-AC_DEFUN([FLAGS_SETUP_GCC6_COMPILER_FLAGS],
-[
- # These flags are required for GCC 6 builds as undefined behaviour in OpenJDK code
- # runs afoul of the more aggressive versions of these optimisations.
- # Notably, value range propagation now assumes that the this pointer of C++
- # member functions is non-null.
- NO_DELETE_NULL_POINTER_CHECKS_CFLAG="-fno-delete-null-pointer-checks"
- dnl Argument check is disabled until FLAGS_COMPILER_CHECK_ARGUMENTS handles cross-compilation
- dnl FLAGS_COMPILER_CHECK_ARGUMENTS(ARGUMENT: [$NO_DELETE_NULL_POINTER_CHECKS_CFLAG -Werror],
- dnl IF_FALSE: [NO_DELETE_NULL_POINTER_CHECKS_CFLAG=""])
- NO_LIFETIME_DSE_CFLAG="-fno-lifetime-dse"
- dnl Argument check is disabled until FLAGS_COMPILER_CHECK_ARGUMENTS handles cross-compilation
- dnl FLAGS_COMPILER_CHECK_ARGUMENTS(ARGUMENT: [$NO_LIFETIME_DSE_CFLAG -Werror],
- dnl IF_FALSE: [NO_LIFETIME_DSE_CFLAG=""])
- AC_MSG_NOTICE([GCC >= 6 detected; adding ${NO_DELETE_NULL_POINTER_CHECKS_CFLAG} and ${NO_LIFETIME_DSE_CFLAG}])
- $1CFLAGS_JDK="[$]$1CFLAGS_JDK ${NO_DELETE_NULL_POINTER_CHECKS_CFLAG} ${NO_LIFETIME_DSE_CFLAG}"
- $1JVM_CFLAGS="[$]$1JVM_CFLAGS ${NO_DELETE_NULL_POINTER_CHECKS_CFLAG} ${NO_LIFETIME_DSE_CFLAG}"
-])
--- a/make/autoconf/hotspot.m4 Mon Mar 05 01:22:36 2018 +0000
+++ b/make/autoconf/hotspot.m4 Mon Mar 05 13:11:21 2018 -0800
@@ -1,5 +1,5 @@
#
-# Copyright (c) 2011, 2017, Oracle and/or its affiliates. All rights reserved.
+# Copyright (c) 2011, 2018, Oracle and/or its affiliates. All rights reserved.
# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
#
# This code is free software; you can redistribute it and/or modify it
@@ -277,13 +277,9 @@
if test "x$OPENJDK_TARGET_CPU" = xarm; then
HOTSPOT_TARGET_CPU=arm_32
HOTSPOT_TARGET_CPU_DEFINE="ARM32"
- JVM_LDFLAGS="$JVM_LDFLAGS -fsigned-char"
- JVM_CFLAGS="$JVM_CFLAGS -DARM -fsigned-char"
elif test "x$OPENJDK_TARGET_CPU" = xaarch64 && test "x$HOTSPOT_TARGET_CPU_PORT" = xarm64; then
HOTSPOT_TARGET_CPU=arm_64
HOTSPOT_TARGET_CPU_ARCH=arm
- JVM_LDFLAGS="$JVM_LDFLAGS -fsigned-char"
- JVM_CFLAGS="$JVM_CFLAGS -DARM -fsigned-char"
fi
# Verify that dependencies are met for explicitly set features.
--- a/make/autoconf/lib-std.m4 Mon Mar 05 01:22:36 2018 +0000
+++ b/make/autoconf/lib-std.m4 Mon Mar 05 13:11:21 2018 -0800
@@ -1,5 +1,5 @@
#
-# Copyright (c) 2011, 2016, Oracle and/or its affiliates. All rights reserved.
+# Copyright (c) 2011, 2018, Oracle and/or its affiliates. All rights reserved.
# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
#
# This code is free software; you can redistribute it and/or modify it
@@ -81,6 +81,9 @@
if test "x$TOOLCHAIN_TYPE" = xsolstudio && test "x$LIBCXX" = x; then
LIBCXX="${SYSROOT}/usr/lib${OPENJDK_TARGET_CPU_ISADIR}/libCrun.so.1"
fi
+ if test "x$TOOLCHAIN_TYPE" = xsolstudio; then
+ LIBCXX_JVM="-lCrun"
+ fi
AC_SUBST(LIBCXX)
--- a/make/autoconf/libraries.m4 Mon Mar 05 01:22:36 2018 +0000
+++ b/make/autoconf/libraries.m4 Mon Mar 05 13:11:21 2018 -0800
@@ -1,5 +1,5 @@
#
-# Copyright (c) 2011, 2017, Oracle and/or its affiliates. All rights reserved.
+# Copyright (c) 2011, 2018, Oracle and/or its affiliates. All rights reserved.
# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
#
# This code is free software; you can redistribute it and/or modify it
@@ -101,6 +101,68 @@
LIB_SETUP_BUNDLED_LIBS
LIB_SETUP_MISC_LIBS
LIB_SETUP_SOLARIS_STLPORT
+
+ if test "x$TOOLCHAIN_TYPE" = xsolstudio; then
+ ALWAYS_LIBS="-lc"
+ else
+ ALWAYS_LIBS=""
+ fi
+
+ BASIC_JDKLIB_LIBS=""
+ if test "x$TOOLCHAIN_TYPE" != xmicrosoft; then
+ BASIC_JDKLIB_LIBS="-ljava -ljvm"
+ fi
+ BASIC_JDKLIB_LIBS="$BASIC_JDKLIB_LIBS $ALWAYS_LIBS"
+
+ # Math library
+ if test "x$OPENJDK_TARGET_OS" != xsolaris; then
+ BASIC_JVM_LIBS="$LIBM"
+ else
+ # FIXME: This hard-coded path is not really proper.
+ if test "x$OPENJDK_TARGET_CPU" = xx86_64; then
+ BASIC_SOLARIS_LIBM_LIBS="/usr/lib/amd64/libm.so.1"
+ elif test "x$OPENJDK_TARGET_CPU" = xsparcv9; then
+ BASIC_SOLARIS_LIBM_LIBS="/usr/lib/sparcv9/libm.so.1"
+ fi
+ BASIC_JVM_LIBS="$BASIC_SOLARIS_LIBM_LIBS"
+ fi
+
+ # Dynamic loading library
+ if test "x$OPENJDK_TARGET_OS" = xlinux || test "x$OPENJDK_TARGET_OS" = xsolaris || test "x$OPENJDK_TARGET_OS" = xaix; then
+ BASIC_JVM_LIBS="$BASIC_JVM_LIBS $LIBDL"
+ fi
+
+ # Threading library
+ if test "x$OPENJDK_TARGET_OS" = xlinux || test "x$OPENJDK_TARGET_OS" = xaix; then
+ BASIC_JVM_LIBS="$BASIC_JVM_LIBS -lpthread"
+ elif test "x$OPENJDK_TARGET_OS" = xsolaris; then
+ BASIC_JVM_LIBS="$BASIC_JVM_LIBS -lthread"
+ fi
+
+ if test "x$OPENJDK_TARGET_OS" = xsolaris; then
+ BASIC_JVM_LIBS="$BASIC_JVM_LIBS -lsocket -lsched -ldoor -ldemangle -lnsl \
+ -lrt"
+ BASIC_JVM_LIBS="$BASIC_JVM_LIBS $LIBCXX_JVM"
+ fi
+
+ if test "x$OPENJDK_TARGET_OS" = xwindows; then
+ BASIC_JVM_LIBS="$BASIC_JVM_LIBS kernel32.lib user32.lib gdi32.lib winspool.lib \
+ comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib \
+ wsock32.lib winmm.lib version.lib psapi.lib"
+ fi
+ BASIC_JVM_LIBS="$BASIC_JVM_LIBS $ALWAYS_LIBS"
+
+ JDKLIB_LIBS="$BASIC_JDKLIB_LIBS"
+ JDKEXE_LIBS=""
+ JVM_LIBS="$BASIC_JVM_LIBS"
+ OPENJDK_BUILD_JDKLIB_LIBS="$BASIC_JDKLIB_LIBS"
+ OPENJDK_BUILD_JVM_LIBS="$BASIC_JVM_LIBS"
+
+ AC_SUBST(JDKLIB_LIBS)
+ AC_SUBST(JDKEXE_LIBS)
+ AC_SUBST(JVM_LIBS)
+ AC_SUBST(OPENJDK_BUILD_JDKLIB_LIBS)
+ AC_SUBST(OPENJDK_BUILD_JVM_LIBS)
])
################################################################################
--- a/make/autoconf/platform.m4 Mon Mar 05 01:22:36 2018 +0000
+++ b/make/autoconf/platform.m4 Mon Mar 05 13:11:21 2018 -0800
@@ -1,5 +1,5 @@
#
-# Copyright (c) 2011, 2017, Oracle and/or its affiliates. All rights reserved.
+# Copyright (c) 2011, 2018, Oracle and/or its affiliates. All rights reserved.
# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
#
# This code is free software; you can redistribute it and/or modify it
@@ -403,15 +403,6 @@
OPENJDK_$1_BUNDLE_PLATFORM="${OPENJDK_$1_OS_BUNDLE}-${OPENJDK_$1_CPU_BUNDLE}"
AC_SUBST(OPENJDK_$1_BUNDLE_PLATFORM)
- if test "x$OPENJDK_$1_CPU_BITS" = x64; then
- # -D_LP64=1 is only set on linux and mac. Setting on windows causes diff in
- # unpack200.exe. This variable is used in
- # FLAGS_SETUP_COMPILER_FLAGS_FOR_JDK_HELPER.
- if test "x$OPENJDK_$1_OS" = xlinux || test "x$OPENJDK_$1_OS" = xmacosx; then
- OPENJDK_$1_ADD_LP64="-D_LP64=1"
- fi
- fi
-
if test "x$COMPILE_TYPE" = "xcross"; then
# FIXME: ... or should this include reduced builds..?
DEFINE_CROSS_COMPILE_ARCH="CROSS_COMPILE_ARCH:=$OPENJDK_$1_CPU_LEGACY"
@@ -563,31 +554,6 @@
AC_SUBST(OS_VERSION_MICRO)
])
-# Support macro for PLATFORM_SETUP_OPENJDK_TARGET_BITS.
-# Add -mX to various FLAGS variables.
-AC_DEFUN([PLATFORM_SET_COMPILER_TARGET_BITS_FLAGS],
-[
- # When we add flags to the "official" CFLAGS etc, we need to
- # keep track of these additions in ADDED_CFLAGS etc. These
- # will later be checked to make sure only controlled additions
- # have been made to CFLAGS etc.
- ADDED_CFLAGS=" ${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}"
- ADDED_CXXFLAGS=" ${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}"
- ADDED_LDFLAGS=" ${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}"
-
- CFLAGS="${CFLAGS}${ADDED_CFLAGS}"
- CXXFLAGS="${CXXFLAGS}${ADDED_CXXFLAGS}"
- LDFLAGS="${LDFLAGS}${ADDED_LDFLAGS}"
-
- CFLAGS_JDK="${CFLAGS_JDK}${ADDED_CFLAGS}"
- CXXFLAGS_JDK="${CXXFLAGS_JDK}${ADDED_CXXFLAGS}"
- LDFLAGS_JDK="${LDFLAGS_JDK}${ADDED_LDFLAGS}"
-
- JVM_CFLAGS="$JVM_CFLAGS $ADDED_CFLAGS"
- JVM_LDFLAGS="$JVM_LDFLAGS $ADDED_LDFLAGS"
- JVM_ASFLAGS="$JVM_ASFLAGS $ADDED_CFLAGS"
-])
-
AC_DEFUN_ONCE([PLATFORM_SETUP_OPENJDK_TARGET_BITS],
[
###############################################################################
@@ -597,22 +563,6 @@
# is made at runtime.)
#
- if test "x$OPENJDK_TARGET_OS" = xsolaris || test "x$OPENJDK_TARGET_OS" = xaix; then
- # Always specify -m flag on Solaris
- # And -q on AIX because otherwise the compiler produces 32-bit objects by default
- PLATFORM_SET_COMPILER_TARGET_BITS_FLAGS
- elif test "x$COMPILE_TYPE" = xreduced; then
- if test "x$OPENJDK_TARGET_OS_TYPE" = xunix; then
- # Specify -m if running reduced on unix platforms
- PLATFORM_SET_COMPILER_TARGET_BITS_FLAGS
- fi
- fi
- if test "x$OPENJDK_TARGET_OS" = xmacosx; then
- JVM_CFLAGS="$JVM_CFLAGS ${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}"
- JVM_LDFLAGS="$JVM_LDFLAGS ${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}"
- JVM_ASFLAGS="$JVM_ASFLAGS ${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}"
- fi
-
# Make compilation sanity check
AC_CHECK_HEADERS([stdio.h], , [
AC_MSG_NOTICE([Failed to compile stdio.h. This likely implies missing compile dependencies.])
@@ -635,33 +585,14 @@
TESTED_TARGET_CPU_BITS=`expr 8 \* $ac_cv_sizeof_int_p`
if test "x$TESTED_TARGET_CPU_BITS" != "x$OPENJDK_TARGET_CPU_BITS"; then
- # This situation may happen on 64-bit platforms where the compiler by default only generates 32-bit objects
- # Let's try to implicitely set the compilers target architecture and retry the test
- AC_MSG_NOTICE([The tested number of bits in the target ($TESTED_TARGET_CPU_BITS) differs from the number of bits expected to be found in the target ($OPENJDK_TARGET_CPU_BITS).])
- AC_MSG_NOTICE([Retrying with platforms compiler target bits flag to ${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}])
- PLATFORM_SET_COMPILER_TARGET_BITS_FLAGS
-
- # We have to unset 'ac_cv_sizeof_int_p' first, otherwise AC_CHECK_SIZEOF will use the previously cached value!
- unset ac_cv_sizeof_int_p
- # And we have to undef the definition of SIZEOF_INT_P in confdefs.h by the previous invocation of AC_CHECK_SIZEOF
- cat >>confdefs.h <<_ACEOF
-#undef SIZEOF_INT_P
-_ACEOF
-
- AC_CHECK_SIZEOF([int *], [1111])
-
- TESTED_TARGET_CPU_BITS=`expr 8 \* $ac_cv_sizeof_int_p`
-
- if test "x$TESTED_TARGET_CPU_BITS" != "x$OPENJDK_TARGET_CPU_BITS"; then
- AC_MSG_NOTICE([The tested number of bits in the target ($TESTED_TARGET_CPU_BITS) differs from the number of bits expected to be found in the target ($OPENJDK_TARGET_CPU_BITS)])
- if test "x$COMPILE_TYPE" = xreduced; then
- HELP_MSG_MISSING_DEPENDENCY([reduced])
- AC_MSG_NOTICE([You are doing a reduced build. Check that you have 32-bit libraries installed. $HELP_MSG])
- elif test "x$COMPILE_TYPE" = xcross; then
- AC_MSG_NOTICE([You are doing a cross-compilation. Check that you have all target platform libraries installed.])
- fi
- AC_MSG_ERROR([Cannot continue.])
+ AC_MSG_NOTICE([The tested number of bits in the target ($TESTED_TARGET_CPU_BITS) differs from the number of bits expected to be found in the target ($OPENJDK_TARGET_CPU_BITS)])
+ if test "x$COMPILE_TYPE" = xreduced; then
+ HELP_MSG_MISSING_DEPENDENCY([reduced])
+ AC_MSG_NOTICE([You are doing a reduced build. Check that you have 32-bit libraries installed. $HELP_MSG])
+ elif test "x$COMPILE_TYPE" = xcross; then
+ AC_MSG_NOTICE([You are doing a cross-compilation. Check that you have all target platform libraries installed.])
fi
+ AC_MSG_ERROR([Cannot continue.])
fi
fi
--- a/make/autoconf/spec.gmk.in Mon Mar 05 01:22:36 2018 +0000
+++ b/make/autoconf/spec.gmk.in Mon Mar 05 13:11:21 2018 -0800
@@ -423,7 +423,7 @@
WARNINGS_AS_ERRORS := @WARNINGS_AS_ERRORS@
CFLAGS_CCACHE:=@CFLAGS_CCACHE@
-CXXSTD_CXXFLAG=@CXXSTD_CXXFLAG@
+ADLC_CXXFLAG=@ADLC_CXXFLAG@
# Tools that potentially need to be cross compilation aware.
CC:=@FIXPATH@ @CCACHE@ @ICECC@ @CC@
@@ -436,8 +436,8 @@
CFLAGS_JDKEXE:=@CFLAGS_JDKEXE@
CXXFLAGS_JDKEXE:=@CXXFLAGS_JDKEXE@
-LDFLAGS_HASH_STYLE := @LDFLAGS_HASH_STYLE@
-LDFLAGS_NO_EXEC_STACK := @LDFLAGS_NO_EXEC_STACK@
+LIBJSIG_HASHSTYLE_LDFLAGS := @LIBJSIG_HASHSTYLE_LDFLAGS@
+LIBJSIG_NOEXECSTACK_LDFLAGS := @LIBJSIG_NOEXECSTACK_LDFLAGS@
JVM_CFLAGS := @JVM_CFLAGS@
JVM_CFLAGS_SYMBOLS := @JVM_CFLAGS_SYMBOLS@
@@ -524,7 +524,6 @@
# Options for C/CXX compiler to be used if linking is performed
# using reorder file
C_FLAG_REORDER:=@C_FLAG_REORDER@
-CXX_FLAG_REORDER:=@CXX_FLAG_REORDER@
#
# Options for generating debug symbols
--- a/make/autoconf/toolchain.m4 Mon Mar 05 01:22:36 2018 +0000
+++ b/make/autoconf/toolchain.m4 Mon Mar 05 13:11:21 2018 -0800
@@ -1,5 +1,5 @@
#
-# Copyright (c) 2011, 2017, Oracle and/or its affiliates. All rights reserved.
+# Copyright (c) 2011, 2018, Oracle and/or its affiliates. All rights reserved.
# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
#
# This code is free software; you can redistribute it and/or modify it
@@ -783,7 +783,6 @@
fi
BUILD_SYSROOT="$BUILD_DEVKIT_SYSROOT"
- FLAGS_SETUP_SYSROOT_FLAGS([BUILD_])
# Fallback default of just /bin if DEVKIT_PATH is not defined
if test "x$BUILD_DEVKIT_TOOLCHAIN_PATH" = x; then
@@ -830,8 +829,6 @@
BUILD_AS="$AS"
BUILD_OBJCOPY="$OBJCOPY"
BUILD_STRIP="$STRIP"
- BUILD_SYSROOT_CFLAGS="$SYSROOT_CFLAGS"
- BUILD_SYSROOT_LDFLAGS="$SYSROOT_LDFLAGS"
BUILD_AR="$AR"
TOOLCHAIN_PREPARE_FOR_VERSION_COMPARISONS([], [OPENJDK_BUILD_])
@@ -843,8 +840,6 @@
AC_SUBST(BUILD_LDCXX)
AC_SUBST(BUILD_NM)
AC_SUBST(BUILD_AS)
- AC_SUBST(BUILD_SYSROOT_CFLAGS)
- AC_SUBST(BUILD_SYSROOT_LDFLAGS)
AC_SUBST(BUILD_AR)
])
@@ -876,24 +871,6 @@
# If this is a --hash-style=gnu system, use --hash-style=both, why?
HAS_GNU_HASH=`$CC -dumpspecs 2>/dev/null | $GREP 'hash-style=gnu'`
# This is later checked when setting flags.
-
- # "-Og" suppported for GCC 4.8 and later
- CFLAG_OPTIMIZE_DEBUG_FLAG="-Og"
- FLAGS_COMPILER_CHECK_ARGUMENTS(ARGUMENT: [$CFLAG_OPTIMIZE_DEBUG_FLAG],
- IF_TRUE: [HAS_CFLAG_OPTIMIZE_DEBUG=true],
- IF_FALSE: [HAS_CFLAG_OPTIMIZE_DEBUG=false])
-
- # "-z relro" supported in GNU binutils 2.17 and later
- LINKER_RELRO_FLAG="-Wl,-z,relro"
- FLAGS_LINKER_CHECK_ARGUMENTS(ARGUMENT: [$LINKER_RELRO_FLAG],
- IF_TRUE: [HAS_LINKER_RELRO=true],
- IF_FALSE: [HAS_LINKER_RELRO=false])
-
- # "-z now" supported in GNU binutils 2.11 and later
- LINKER_NOW_FLAG="-Wl,-z,now"
- FLAGS_LINKER_CHECK_ARGUMENTS(ARGUMENT: [$LINKER_NOW_FLAG],
- IF_TRUE: [HAS_LINKER_NOW=true],
- IF_FALSE: [HAS_LINKER_NOW=false])
fi
# Check for broken SuSE 'ld' for which 'Only anonymous version tag is allowed
--- a/make/common/Modules.gmk Mon Mar 05 01:22:36 2018 +0000
+++ b/make/common/Modules.gmk Mon Mar 05 13:11:21 2018 -0800
@@ -94,6 +94,7 @@
java.smartcardio \
java.sql \
java.sql.rowset \
+ java.transaction.xa \
java.xml.crypto \
jdk.accessibility \
jdk.charsets \
--- a/make/common/NativeCompilation.gmk Mon Mar 05 01:22:36 2018 +0000
+++ b/make/common/NativeCompilation.gmk Mon Mar 05 13:11:21 2018 -0800
@@ -567,7 +567,7 @@
ifneq ($$($1_REORDER), )
$1_EXTRA_CFLAGS += $$(C_FLAG_REORDER)
- $1_EXTRA_CXXFLAGS += $$(CXX_FLAG_REORDER)
+ $1_EXTRA_CXXFLAGS += $$(C_FLAG_REORDER)
endif
# Pass the library name for static JNI library naming
--- a/make/hotspot/gensrc/GensrcAdlc.gmk Mon Mar 05 01:22:36 2018 +0000
+++ b/make/hotspot/gensrc/GensrcAdlc.gmk Mon Mar 05 13:11:21 2018 -0800
@@ -52,7 +52,7 @@
endif
# Set the C++ standard if supported
- ADLC_CFLAGS += $(CXXSTD_CXXFLAG)
+ ADLC_CFLAGS += $(ADLC_CXXFLAG)
# NOTE: The old build didn't set -DASSERT for windows but it doesn't seem to
# hurt.
--- a/make/hotspot/gensrc/GensrcDtrace.gmk Mon Mar 05 01:22:36 2018 +0000
+++ b/make/hotspot/gensrc/GensrcDtrace.gmk Mon Mar 05 13:11:21 2018 -0800
@@ -1,5 +1,5 @@
#
-# Copyright (c) 2013, 2016, Oracle and/or its affiliates. All rights reserved.
+# Copyright (c) 2013, 2018, Oracle and/or its affiliates. All rights reserved.
# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
#
# This code is free software; you can redistribute it and/or modify it
@@ -46,7 +46,7 @@
$(call LogInfo, Generating dtrace header file $(@F))
$(call MakeDir, $(@D) $(DTRACE_SUPPORT_DIR))
$(call ExecuteWithLog, $(DTRACE_SUPPORT_DIR)/$(@F).d, \
- ( $(CC) -E $(DTRACE_CPP_FLAGS) $< > $(DTRACE_SUPPORT_DIR)/$(@F).d ) )
+ ($(CPP) $(DTRACE_CPP_FLAGS) $< > $(DTRACE_SUPPORT_DIR)/$(@F).d))
$(call ExecuteWithLog, $@, $(DTRACE) $(DTRACE_FLAGS) -h -o $@ -s $(DTRACE_SUPPORT_DIR)/$(@F).d)
# Process all .d files in DTRACE_SOURCE_DIR. They are:
--- a/make/hotspot/lib/CompileDtracePostJvm.gmk Mon Mar 05 01:22:36 2018 +0000
+++ b/make/hotspot/lib/CompileDtracePostJvm.gmk Mon Mar 05 13:11:21 2018 -0800
@@ -49,13 +49,9 @@
NAME := dtraceGenOffsets, \
TYPE := EXECUTABLE, \
SRC := $(TOPDIR)/make/hotspot/src/native/dtrace, \
- CC := $(BUILD_CXX), \
- CXX := $(BUILD_CXX), \
- LDEXE := $(BUILD_CXX), \
- generateJvmOffsets.cpp_CXXFLAGS := $(JVM_CFLAGS) -mt -xnolib -norunpath, \
- generateJvmOffsetsMain.c_CFLAGS := -mt -m64 -norunpath -z nodefs, \
+ TOOLCHAIN := $(TOOLCHAIN_BUILD), \
LDFLAGS := -m64, \
- LIBS := -lc, \
+ CFLAGS := -m64 $(JVM_CFLAGS), \
OBJECT_DIR := $(JVM_VARIANT_OUTPUTDIR)/tools/dtrace-gen-offsets/objs, \
OUTPUT_DIR := $(JVM_VARIANT_OUTPUTDIR)/tools/dtrace-gen-offsets, \
))
@@ -78,25 +74,12 @@
JVM_OFFSETS_INDEX_H := $(DTRACE_SUPPORT_DIR)/JvmOffsetsIndex.h
# Run the dtrace-gen-offset tool to generate these three files.
+ # The generated JvmOffsets.cpp is compiled with the rest of libjvm.
$(eval $(call SetupDtraceOffsetsGeneration, $(JVM_OFFSETS_H), header))
$(eval $(call SetupDtraceOffsetsGeneration, $(JVM_OFFSETS_INDEX_H), index))
$(eval $(call SetupDtraceOffsetsGeneration, $(JVM_OFFSETS_CPP), table))
############################################################################
- # Compile JVM_OFFSETS_OBJ which is linked with libjvm.so.
-
- # JvmOffsets.cpp is compiled without the common JVM_CFLAGS. Otherwise, the
- # natural way would have been to included this source code in BUILD_LIBJVM.
- JVM_OFFSETS_CFLAGS := -m64
- ifeq ($(OPENJDK_TARGET_CPU), sparcv9)
- JVM_OFFSETS_CFLAGS += -xarch=sparc
- endif
-
- $(JVM_OFFSETS_OBJ): $(JVM_OFFSETS_CPP) $(JVM_OFFSETS_H)
- $(call LogInfo, Compiling dtrace file JvmOffsets.cpp (for libjvm.so))
- $(call ExecuteWithLog, $@, $(CXX) -c -I$(<D) -o $@ $(JVM_OFFSETS_CFLAGS) $<)
-
- ############################################################################
# Generate DTRACE_OBJ which is linked with libjvm.so.
# Concatenate all *.d files into a single file
@@ -147,8 +130,8 @@
$(DTRACE_OBJ): $(JVM_OUTPUTDIR)/objs/dtrace.d $(DTRACE_INSTRUMENTED_OBJS)
$(call LogInfo, Generating $(@F) from $(<F) and object files)
$(call MakeDir, $(DTRACE_SUPPORT_DIR))
- $(call ExecuteWithLog, $(DTRACE_SUPPORT_DIR)/$(@F).d, $(CC) -E \
- $(DTRACE_CPP_FLAGS) $< > $(DTRACE_SUPPORT_DIR)/$(@F).d)
+ $(call ExecuteWithLog, $(DTRACE_SUPPORT_DIR)/$(@F).d, \
+ ($(CPP) $(DTRACE_CPP_FLAGS) $< > $(DTRACE_SUPPORT_DIR)/$(@F).d))
$(call ExecuteWithLog, $@, $(DTRACE) $(DTRACE_FLAGS) -xlazyload -o $@ \
-s $(DTRACE_SUPPORT_DIR)/$(@F).d $(sort $(DTRACE_INSTRUMENTED_OBJS)))
@@ -161,15 +144,23 @@
# We work around this by fixing the types for these symbols using elfedit,
# after dtrace has generated the .o file.
JHELPER_DTRACE_SRC := $(TOPDIR)/src/hotspot/os/solaris/dtrace/jhelper.d
- DTRACE_EXTERNAL_SYMBOLS := $(shell $(GREP) ^extern $(JHELPER_DTRACE_SRC) | $(AWK) '{ gsub(";","") ; print $$3 }')
- DTRACE_ELFEDIT_COMMANDS := $(foreach symbol, $(DTRACE_EXTERNAL_SYMBOLS), \
- -e 'sym:st_type $(symbol) 1')
+ GetElfeditCommands = \
+ $(foreach symbol, \
+ $(shell $(GREP) ^extern $(JHELPER_DTRACE_SRC) | $(AWK) '{ gsub(";","") ; print $$3 }'), \
+ -e 'sym:st_type $(symbol) 1')
+
+ # Make sure we run our selected compiler for preprocessing instead of letting
+ # the dtrace tool pick it on it's own.
$(DTRACE_JHELPER_OBJ): $(JHELPER_DTRACE_SRC) $(JVM_OFFSETS_INDEX_H)
$(call LogInfo, Running dtrace for $(<F))
- $(call ExecuteWithLog, $@, $(DTRACE) $(DTRACE_FLAGS) $(DTRACE_CPP_FLAGS) -C \
- -I$(DTRACE_SUPPORT_DIR) -o $@ -s $<)
- $(call ExecuteWithLog, $@.elfedit, $(ELFEDIT) $(DTRACE_ELFEDIT_COMMANDS) $@)
+ $(call MakeDir, $(DTRACE_SUPPORT_DIR))
+ $(call ExecuteWithLog, $(DTRACE_SUPPORT_DIR)/$(@F).d, \
+ ($(CPP) $(DTRACE_CPP_FLAGS) -I$(DTRACE_SUPPORT_DIR) $^ \
+ > $(DTRACE_SUPPORT_DIR)/$(@F).d))
+ $(call ExecuteWithLog, $@, $(DTRACE) $(DTRACE_FLAGS) -o $@ \
+ -s $(DTRACE_SUPPORT_DIR)/$(@F).d)
+ $(call ExecuteWithLog, $@.elfedit, $(ELFEDIT) $(call GetElfeditCommands) $@)
############################################################################
# Build the stand-alone dtrace libraries
--- a/make/hotspot/lib/CompileDtracePreJvm.gmk Mon Mar 05 01:22:36 2018 +0000
+++ b/make/hotspot/lib/CompileDtracePreJvm.gmk Mon Mar 05 13:11:21 2018 -0800
@@ -1,5 +1,5 @@
#
-# Copyright (c) 2016, Oracle and/or its affiliates. All rights reserved.
+# Copyright (c) 2016, 2018, Oracle and/or its affiliates. All rights reserved.
# 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,8 +29,11 @@
# CompileJvm.gmk
DTRACE_OBJ := $(JVM_OUTPUTDIR)/objs/dtrace.o
DTRACE_JHELPER_OBJ := $(JVM_OUTPUTDIR)/objs/dtrace_jhelper.o
- JVM_OFFSETS_OBJ := $(JVM_OUTPUTDIR)/objs/JvmOffsets.o
+ DTRACE_EXTRA_OBJECT_FILES := $(DTRACE_OBJ) $(DTRACE_JHELPER_OBJ)
- DTRACE_EXTRA_OBJECT_FILES := $(DTRACE_OBJ) $(DTRACE_JHELPER_OBJ) $(JVM_OFFSETS_OBJ)
+ # Since we cannot generate JvmOffsets.cpp as part of the gensrc step,
+ # we need this special hook to get it to compile with the rest of libjvm.
+ JVM_OFFSETS_CPP := $(DTRACE_SUPPORT_DIR)/JvmOffsets.cpp
+ DTRACE_EXTRA_SOURCE_FILES := $(JVM_OFFSETS_CPP)
endif
endif
--- a/make/hotspot/lib/CompileJvm.gmk Mon Mar 05 01:22:36 2018 +0000
+++ b/make/hotspot/lib/CompileJvm.gmk Mon Mar 05 13:11:21 2018 -0800
@@ -214,6 +214,7 @@
TOOLCHAIN := TOOLCHAIN_LINK_CXX, \
OUTPUT_DIR := $(JVM_LIB_OUTPUTDIR), \
SRC := $(JVM_SRC_DIRS), \
+ EXTRA_FILES := $(DTRACE_EXTRA_SOURCE_FILES), \
EXCLUDES := $(JVM_EXCLUDES), \
EXCLUDE_FILES := $(JVM_EXCLUDE_FILES), \
EXCLUDE_PATTERNS := $(JVM_EXCLUDE_PATTERNS), \
--- a/make/hotspot/lib/CompileLibjsig.gmk Mon Mar 05 01:22:36 2018 +0000
+++ b/make/hotspot/lib/CompileLibjsig.gmk Mon Mar 05 13:11:21 2018 -0800
@@ -36,7 +36,7 @@
ifeq ($(STATIC_BUILD), false)
ifeq ($(OPENJDK_TARGET_OS), linux)
LIBJSIG_CFLAGS := -fPIC -D_GNU_SOURCE -D_REENTRANT $(EXTRA_CFLAGS)
- LIBJSIG_LDFLAGS := $(LDFLAGS_HASH_STYLE) ${LDFLAGS_NO_EXEC_STACK} $(EXTRA_CFLAGS)
+ LIBJSIG_LDFLAGS := $(LIBJSIG_HASHSTYLE_LDFLAGS) ${LIBJSIG_NOEXECSTACK_LDFLAGS} $(EXTRA_CFLAGS)
LIBJSIG_LIBS := $(LIBDL)
# NOTE: The old build compiled this library without -soname.
@@ -76,7 +76,7 @@
else ifeq ($(OPENJDK_TARGET_OS), macosx)
LIBJSIG_CFLAGS := -m64 -D_GNU_SOURCE -pthread -mno-omit-leaf-frame-pointer -mstack-alignment=16 -fPIC
- LIBJSIG_LDFLAGS := $(LDFLAGS_HASH_STYLE)
+ LIBJSIG_LDFLAGS := $(LIBJSIG_HASHSTYLE_LDFLAGS)
else
$(error Unknown target OS $(OPENJDK_TARGET_OS) in CompileLibjsig.gmk)
endif
--- a/make/hotspot/src/native/dtrace/generateJvmOffsets.cpp Mon Mar 05 01:22:36 2018 +0000
+++ b/make/hotspot/src/native/dtrace/generateJvmOffsets.cpp Mon Mar 05 13:11:21 2018 -0800
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2003, 2016, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2003, 2018, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
@@ -297,3 +297,30 @@
fflush(stdout);
return 0;
}
+
+const char *HELP =
+ "HELP: generateJvmOffsets {-header | -index | -table} \n";
+
+int main(int argc, const char *argv[]) {
+ GEN_variant gen_var;
+
+ if (argc != 2) {
+ printf("%s", HELP);
+ return 1;
+ }
+
+ if (0 == strcmp(argv[1], "-header")) {
+ gen_var = GEN_OFFSET;
+ }
+ else if (0 == strcmp(argv[1], "-index")) {
+ gen_var = GEN_INDEX;
+ }
+ else if (0 == strcmp(argv[1], "-table")) {
+ gen_var = GEN_TABLE;
+ }
+ else {
+ printf("%s", HELP);
+ return 1;
+ }
+ return generateJvmOffsets(gen_var);
+}
--- a/make/hotspot/src/native/dtrace/generateJvmOffsetsMain.c Mon Mar 05 01:22:36 2018 +0000
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,53 +0,0 @@
-/*
- * Copyright (c) 2003, 2010, Oracle and/or its affiliates. All rights reserved.
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * This code is free software; you can redistribute it and/or modify it
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
- * or visit www.oracle.com if you need additional information or have any
- * questions.
- *
- */
-
-
-#include "generateJvmOffsets.h"
-
-const char *HELP =
- "HELP: generateJvmOffsets {-header | -index | -table} \n";
-
-int main(int argc, const char *argv[]) {
- GEN_variant gen_var;
-
- if (argc != 2) {
- printf("%s", HELP);
- return 1;
- }
-
- if (0 == strcmp(argv[1], "-header")) {
- gen_var = GEN_OFFSET;
- }
- else if (0 == strcmp(argv[1], "-index")) {
- gen_var = GEN_INDEX;
- }
- else if (0 == strcmp(argv[1], "-table")) {
- gen_var = GEN_TABLE;
- }
- else {
- printf("%s", HELP);
- return 1;
- }
- return generateJvmOffsets(gen_var);
-}
--- a/make/jdk/src/classes/build/tools/jigsaw/GenGraphs.java Mon Mar 05 01:22:36 2018 +0000
+++ b/make/jdk/src/classes/build/tools/jigsaw/GenGraphs.java Mon Mar 05 13:11:21 2018 -0800
@@ -142,6 +142,7 @@
ranks.add(Set.of("java.logging", "java.scripting", "java.xml"));
ranks.add(Set.of("java.sql"));
+ ranks.add(Set.of("java.transaction.xa"));
ranks.add(Set.of("java.compiler", "java.instrument"));
ranks.add(Set.of("java.desktop", "java.management"));
--- a/make/jdk/src/classes/build/tools/jigsaw/technology-summary.html Mon Mar 05 01:22:36 2018 +0000
+++ b/make/jdk/src/classes/build/tools/jigsaw/technology-summary.html Mon Mar 05 13:11:21 2018 -0800
@@ -20,8 +20,8 @@
<table>
<tr><th>Legend</th></tr>
-<tr class="se-base"><td><a href="https://jcp.org/en/jsr/platform?listBy=2&listByType=platform">JCP technology in the Java SE Platform only -- in java.base</a></td></tr>
-<tr class="se-misc"><td><a href="https://jcp.org/en/jsr/platform?listBy=2&listByType=platform">JCP technology in the Java SE Platform only -- not in java.base</a></td></tr>
+<tr class="se-base"><td><a href="https://jcp.org/en/jsr/platform?listBy=2&listByType=platform">JCP technology in the Java SE Platform -- in java.base</a></td></tr>
+<tr class="se-misc"><td><a href="https://jcp.org/en/jsr/platform?listBy=2&listByType=platform">JCP technology in the Java SE Platform -- not in java.base</a></td></tr>
<tr class="se-ext"><td><a href="http://docs.oracle.com/javase/8/docs/technotes/guides/standards/#endorsed-standards-apis">JCP technology in the Java SE Platform derived from non-JCP standards</a></a></td></tr>
<tr class="non-se"><td>JCP technology not included in the Java SE Platform</td></tr>
</table>
@@ -402,10 +402,10 @@
<td></td>
</tr>
<tr class="se-misc">
-<td><a href="https://jcp.org/en/jsr/detail?id=907">907</a></td>
+<td>---</td>
<td>JTA (XA)</td>
-<td>Original JSR</td>
-<td><a href="module-summary.html#java.sql">java.sql</a></td>
+<td>UJSR for Java SE</td>
+<td><a href="module-summary.html#java.transaction.xa">java.transaction.xa</a></td>
<td>plat</td>
<td>No</td>
<td>Formerly a <a href="http://docs.oracle.com/javase/8/docs/technotes/guides/standards/#standalone-technologies">Standalone Technology</a> (unlisted)</td>
--- a/make/test/JtregNativeJdk.gmk Mon Mar 05 01:22:36 2018 +0000
+++ b/make/test/JtregNativeJdk.gmk Mon Mar 05 13:11:21 2018 -0800
@@ -1,5 +1,5 @@
#
-# Copyright (c) 2015, 2017, Oracle and/or its affiliates. All rights reserved.
+# Copyright (c) 2015, 2018, Oracle and/or its affiliates. All rights reserved.
# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
#
# This code is free software; you can redistribute it and/or modify it
@@ -50,6 +50,7 @@
ifneq ($(OPENJDK_TARGET_OS), windows)
BUILD_JDK_JTREG_NATIVE_SRC += $(TOPDIR)/test/jdk/java/nio/channels/FileChannel/directio
+ BUILD_JDK_JTREG_NATIVE_SRC += $(TOPDIR)/test/jdk/java/nio/channels/spi/SelectorProvider/inheritedChannel
endif
BUILD_JDK_JTREG_OUTPUT_DIR := $(OUTPUTDIR)/support/test/jdk/jtreg/native
@@ -59,9 +60,14 @@
ifeq ($(OPENJDK_TARGET_OS), windows)
WIN_LIB_JAVA := $(SUPPORT_OUTPUTDIR)/native/java.base/libjava/java.lib
BUILD_JDK_JTREG_LIBRARIES_LIBS_libstringPlatformChars := $(WIN_LIB_JAVA)
+else ifeq ($(OPENJDK_TARGET_OS), linux)
+ BUILD_JDK_JTREG_LIBRARIES_LIBS_libstringPlatformChars := -ljava
+ BUILD_JDK_JTREG_LIBRARIES_LIBS_libDirectIO := -ljava
+ BUILD_JDK_JTREG_LIBRARIES_LIBS_libInheritedChannel := -ljava
else ifeq ($(OPENJDK_TARGET_OS), solaris)
BUILD_JDK_JTREG_LIBRARIES_LIBS_libstringPlatformChars := -ljava -lc
BUILD_JDK_JTREG_LIBRARIES_LIBS_libDirectIO := -ljava -lc
+ BUILD_JDK_JTREG_LIBRARIES_LIBS_libInheritedChannel := -ljava -lc
else
BUILD_JDK_JTREG_LIBRARIES_LIBS_libstringPlatformChars := -ljava
BUILD_JDK_JTREG_LIBRARIES_LIBS_libDirectIO := -ljava
--- a/src/hotspot/os/solaris/dtrace/jhelper.d Mon Mar 05 01:22:36 2018 +0000
+++ b/src/hotspot/os/solaris/dtrace/jhelper.d Mon Mar 05 13:11:21 2018 -0800
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2003, 2013, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2003, 2018, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
@@ -19,7 +19,7 @@
* Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
* or visit www.oracle.com if you need additional information or have any
* questions.
- *
+ *
*/
/* This file is auto-generated */
@@ -30,7 +30,7 @@
#ifdef DEBUG
#define MARK_LINE this->line = __LINE__
#else
-#define MARK_LINE
+#define MARK_LINE
#endif
#ifdef _LP64
@@ -59,9 +59,8 @@
#define copyin_int32(ADDR) *(int32_t*) copyin((pointer) (ADDR), sizeof(int32_t))
#define copyin_uint8(ADDR) *(uint8_t*) copyin((pointer) (ADDR), sizeof(uint8_t))
-#define SAME(x) x
#define copyin_offset(JVM_CONST) JVM_CONST = \
- copyin_int32(JvmOffsetsPtr + SAME(IDX_)JVM_CONST * sizeof(int32_t))
+ copyin_int32(JvmOffsetsPtr + IDX_##JVM_CONST * sizeof(int32_t))
int init_done;
@@ -97,7 +96,7 @@
/!init_done && !this->done/
{
MARK_LINE;
-
+
copyin_offset(POINTER_SIZE);
copyin_offset(COMPILER);
copyin_offset(OFFSET_CollectedHeap_reserved);
@@ -158,7 +157,9 @@
#endif
/* Read address of GrowableArray<CodeHeaps*> */
- this->code_heaps_address = copyin_ptr(&``__1cJCodeCacheG_heaps_);
+ // this->code_heaps_address = copyin_ptr(&``__1cJCodeCacheG_heaps_);
+ this->code_heaps_address = * ( uint64_t * ) copyin ( ( uint64_t ) ( &``__1cJCodeCacheG_heaps_ ) , sizeof ( uint64_t ) );
+
/* Read address of _data array field in GrowableArray */
this->code_heaps_array_address = copyin_ptr(this->code_heaps_address + OFFSET_GrowableArray_CodeHeap_data);
this->number_of_heaps = copyin_uint32(this->code_heaps_address + OFFSET_GrowableArray_CodeHeap_len);
@@ -168,7 +169,9 @@
/*
* Get Java heap bounds
*/
- this->Universe_collectedHeap = copyin_ptr(&``__1cIUniverseO_collectedHeap_);
+ // this->Universe_collectedHeap = copyin_ptr(&``__1cIUniverseO_collectedHeap_);
+ this->Universe_collectedHeap = * ( uint64_t * ) copyin ( ( uint64_t ) ( &``__1cIUniverseO_collectedHeap_ ) , sizeof ( uint64_t ) );
+
this->heap_start = copyin_ptr(this->Universe_collectedHeap +
OFFSET_CollectedHeap_reserved +
OFFSET_MemRegion_start);
@@ -181,8 +184,8 @@
}
/*
- * IMPORTANT: At the moment the ustack helper supports up to 5 code heaps in
- * the code cache. If more code heaps are added the following probes have to
+ * IMPORTANT: At the moment the ustack helper supports up to 5 code heaps in
+ * the code cache. If more code heaps are added the following probes have to
* be extended. This is done by simply adding a probe to get the heap bounds
* and another probe to set the code heap address of the newly created heap.
*/
@@ -197,7 +200,7 @@
/* CodeHeap 1 */
init_done = 1;
this->code_heap1_address = copyin_ptr(this->code_heaps_array_address);
- this->code_heap1_low = copyin_ptr(this->code_heap1_address +
+ this->code_heap1_low = copyin_ptr(this->code_heap1_address +
OFFSET_CodeHeap_memory + OFFSET_VirtualSpace_low);
this->code_heap1_high = copyin_ptr(this->code_heap1_address +
OFFSET_CodeHeap_memory + OFFSET_VirtualSpace_high);
@@ -211,7 +214,7 @@
init_done = 2;
this->code_heaps_array_address = this->code_heaps_array_address + POINTER_SIZE;
this->code_heap2_address = copyin_ptr(this->code_heaps_array_address);
- this->code_heap2_low = copyin_ptr(this->code_heap2_address +
+ this->code_heap2_low = copyin_ptr(this->code_heap2_address +
OFFSET_CodeHeap_memory + OFFSET_VirtualSpace_low);
this->code_heap2_high = copyin_ptr(this->code_heap2_address +
OFFSET_CodeHeap_memory + OFFSET_VirtualSpace_high);
@@ -224,7 +227,7 @@
init_done = 3;
this->code_heaps_array_address = this->code_heaps_array_address + POINTER_SIZE;
this->code_heap3_address = copyin_ptr(this->code_heaps_array_address);
- this->code_heap3_low = copyin_ptr(this->code_heap3_address +
+ this->code_heap3_low = copyin_ptr(this->code_heap3_address +
OFFSET_CodeHeap_memory + OFFSET_VirtualSpace_low);
this->code_heap3_high = copyin_ptr(this->code_heap3_address +
OFFSET_CodeHeap_memory + OFFSET_VirtualSpace_high);
@@ -237,7 +240,7 @@
init_done = 4;
this->code_heaps_array_address = this->code_heaps_array_address + POINTER_SIZE;
this->code_heap4_address = copyin_ptr(this->code_heaps_array_address);
- this->code_heap4_low = copyin_ptr(this->code_heap4_address +
+ this->code_heap4_low = copyin_ptr(this->code_heap4_address +
OFFSET_CodeHeap_memory + OFFSET_VirtualSpace_low);
this->code_heap4_high = copyin_ptr(this->code_heap4_address +
OFFSET_CodeHeap_memory + OFFSET_VirtualSpace_high);
@@ -250,7 +253,7 @@
init_done = 5;
this->code_heaps_array_address = this->code_heaps_array_address + POINTER_SIZE;
this->code_heap5_address = copyin_ptr(this->code_heaps_array_address);
- this->code_heap5_low = copyin_ptr(this->code_heap5_address +
+ this->code_heap5_low = copyin_ptr(this->code_heap5_address +
OFFSET_CodeHeap_memory + OFFSET_VirtualSpace_low);
this->code_heap5_high = copyin_ptr(this->code_heap5_address +
OFFSET_CodeHeap_memory + OFFSET_VirtualSpace_high);
@@ -309,10 +312,10 @@
/!this->done && this->codecache/
{
MARK_LINE;
- /*
+ /*
* Get code heap configuration
*/
- this->code_heap_low = copyin_ptr(this->code_heap_address +
+ this->code_heap_low = copyin_ptr(this->code_heap_address +
OFFSET_CodeHeap_memory + OFFSET_VirtualSpace_low);
this->code_heap_segmap_low = copyin_ptr(this->code_heap_address +
OFFSET_CodeHeap_segmap + OFFSET_VirtualSpace_low);
@@ -506,10 +509,10 @@
/*
* Now we need to add a trailing '\0' and possibly a tag character.
*/
- this->result[this->klassSymbolLength + 1 +
+ this->result[this->klassSymbolLength + 1 +
this->nameSymbolLength +
this->signatureSymbolLength] = this->suffix;
- this->result[this->klassSymbolLength + 2 +
+ this->result[this->klassSymbolLength + 2 +
this->nameSymbolLength +
this->signatureSymbolLength] = '\0';
@@ -519,7 +522,7 @@
dtrace:helper:ustack:
/this->done && this->error == (char *) NULL/
{
- this->result;
+ this->result;
}
dtrace:helper:ustack:
--- a/src/java.base/share/classes/java/lang/AbstractStringBuilder.java Mon Mar 05 01:22:36 2018 +0000
+++ b/src/java.base/share/classes/java/lang/AbstractStringBuilder.java Mon Mar 05 13:11:21 2018 -0800
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2003, 2017, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2003, 2018, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
@@ -89,6 +89,29 @@
}
/**
+ * Compares the objects of two AbstractStringBuilder implementations lexicographically.
+ *
+ * @since 11
+ */
+ int compareTo(AbstractStringBuilder another) {
+ if (this == another) {
+ return 0;
+ }
+
+ byte val1[] = value;
+ byte val2[] = another.value;
+ int count1 = this.count;
+ int count2 = another.count;
+
+ if (coder == another.coder) {
+ return isLatin1() ? StringLatin1.compareTo(val1, val2, count1, count2)
+ : StringUTF16.compareTo(val1, val2, count1, count2);
+ }
+ return isLatin1() ? StringLatin1.compareToUTF16(val1, val2, count1, count2)
+ : StringUTF16.compareToLatin1(val1, val2, count1, count2);
+ }
+
+ /**
* Returns the length (character count).
*
* @return the length of the sequence of characters currently
--- a/src/java.base/share/classes/java/lang/CharSequence.java Mon Mar 05 01:22:36 2018 +0000
+++ b/src/java.base/share/classes/java/lang/CharSequence.java Mon Mar 05 13:11:21 2018 -0800
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2000, 2017, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2000, 2018, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
@@ -26,6 +26,7 @@
package java.lang;
import java.util.NoSuchElementException;
+import java.util.Objects;
import java.util.PrimitiveIterator;
import java.util.Spliterator;
import java.util.Spliterators;
@@ -43,9 +44,9 @@
*
* <p> This interface does not refine the general contracts of the {@link
* java.lang.Object#equals(java.lang.Object) equals} and {@link
- * java.lang.Object#hashCode() hashCode} methods. The result of comparing two
- * objects that implement {@code CharSequence} is therefore, in general,
- * undefined. Each object may be implemented by a different class, and there
+ * java.lang.Object#hashCode() hashCode} methods. The result of testing two objects
+ * that implement {@code CharSequence} for equality is therefore, in general, undefined.
+ * Each object may be implemented by a different class, and there
* is no guarantee that each class will be capable of testing its instances
* for equality with those of the other. It is therefore inappropriate to use
* arbitrary {@code CharSequence} instances as elements in a set or as keys in
@@ -237,4 +238,54 @@
Spliterator.ORDERED,
false);
}
+
+ /**
+ * Compares two {@code CharSequence} instances lexicographically. Returns a
+ * negative value, zero, or a positive value if the first sequence is lexicographically
+ * less than, equal to, or greater than the second, respectively.
+ *
+ * <p>
+ * The lexicographical ordering of {@code CharSequence} is defined as follows.
+ * Consider a {@code CharSequence} <i>cs</i> of length <i>len</i> to be a
+ * sequence of char values, <i>cs[0]</i> to <i>cs[len-1]</i>. Suppose <i>k</i>
+ * is the lowest index at which the corresponding char values from each sequence
+ * differ. The lexicographic ordering of the sequences is determined by a numeric
+ * comparison of the char values <i>cs1[k]</i> with <i>cs2[k]</i>. If there is
+ * no such index <i>k</i>, the shorter sequence is considered lexicographically
+ * less than the other. If the sequences have the same length, the sequences are
+ * considered lexicographically equal.
+ *
+ *
+ * @param cs1 the first {@code CharSequence}
+ * @param cs2 the second {@code CharSequence}
+ *
+ * @return the value {@code 0} if the two {@code CharSequence} are equal;
+ * a negative integer if the first {@code CharSequence}
+ * is lexicographically less than the second; or a
+ * positive integer if the first {@code CharSequence} is
+ * lexicographically greater than the second.
+ *
+ * @since 11
+ */
+ @SuppressWarnings("unchecked")
+ public static int compare(CharSequence cs1, CharSequence cs2) {
+ if (Objects.requireNonNull(cs1) == Objects.requireNonNull(cs2)) {
+ return 0;
+ }
+
+ if (cs1.getClass() == cs2.getClass() && cs1 instanceof Comparable) {
+ return ((Comparable<Object>) cs1).compareTo(cs2);
+ }
+
+ for (int i = 0, len = Math.min(cs1.length(), cs2.length()); i < len; i++) {
+ char a = cs1.charAt(i);
+ char b = cs2.charAt(i);
+ if (a != b) {
+ return a - b;
+ }
+ }
+
+ return cs1.length() - cs2.length();
+ }
+
}
--- a/src/java.base/share/classes/java/lang/Character.java Mon Mar 05 01:22:36 2018 +0000
+++ b/src/java.base/share/classes/java/lang/Character.java Mon Mar 05 13:11:21 2018 -0800
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2002, 2017, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2002, 2018, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
@@ -7568,6 +7568,11 @@
* specified {@code char}. The result is a string of length
* 1 consisting solely of the specified {@code char}.
*
+ * @apiNote This method cannot handle <a
+ * href="#supplementary"> supplementary characters</a>. To support
+ * all Unicode characters, including supplementary characters, use
+ * the {@link #toString(int)} method.
+ *
* @param c the {@code char} to be converted
* @return the string representation of the specified {@code char}
* @since 1.4
@@ -7577,6 +7582,22 @@
}
/**
+ * Returns a {@code String} object representing the
+ * specified character (Unicode code point). The result is a string of
+ * length 1 or 2, consisting solely of the specified {@code codePoint}.
+ *
+ * @param codePoint the {@code codePoint} to be converted
+ * @return the string representation of the specified {@code codePoint}
+ * @exception IllegalArgumentException if the specified
+ * {@code codePoint} is not a {@linkplain #isValidCodePoint
+ * valid Unicode code point}.
+ * @since 11
+ */
+ public static String toString(int codePoint) {
+ return String.valueOfCodePoint(codePoint);
+ }
+
+ /**
* Determines whether the specified code point is a valid
* <a href="http://www.unicode.org/glossary/#code_point">
* Unicode code point value</a>.
--- a/src/java.base/share/classes/java/lang/String.java Mon Mar 05 01:22:36 2018 +0000
+++ b/src/java.base/share/classes/java/lang/String.java Mon Mar 05 13:11:21 2018 -0800
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 1994, 2017, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 1994, 2018, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
@@ -2963,6 +2963,55 @@
*/
public native String intern();
+ /**
+ * Returns a string whose value is the concatenation of this
+ * string repeated {@code count} times.
+ * <p>
+ * If this string is empty or count is zero then the empty
+ * string is returned.
+ *
+ * @param count number of times to repeat
+ *
+ * @return A string composed of this string repeated
+ * {@code count} times or the empty string if this
+ * string is empty or count is zero
+ *
+ * @throws IllegalArgumentException if the {@code count} is
+ * negative.
+ *
+ * @since 11
+ */
+ public String repeat(int count) {
+ if (count < 0) {
+ throw new IllegalArgumentException("count is negative: " + count);
+ }
+ if (count == 1) {
+ return this;
+ }
+ final int len = value.length;
+ if (len == 0 || count == 0) {
+ return "";
+ }
+ if (len == 1) {
+ final byte[] single = new byte[count];
+ Arrays.fill(single, value[0]);
+ return new String(single, coder);
+ }
+ if (Integer.MAX_VALUE / count < len) {
+ throw new OutOfMemoryError("Repeating " + len + " bytes String " + count +
+ " times will produce a String exceeding maximum size.");
+ }
+ final int limit = len * count;
+ final byte[] multiple = new byte[limit];
+ System.arraycopy(value, 0, multiple, 0, len);
+ int copied = len;
+ for (; copied < limit - copied; copied <<= 1) {
+ System.arraycopy(multiple, 0, multiple, copied, copied);
+ }
+ System.arraycopy(multiple, 0, multiple, copied, limit - copied);
+ return new String(multiple, coder);
+ }
+
////////////////////////////////////////////////////////////////
/**
@@ -3108,4 +3157,27 @@
"begin " + begin + ", end " + end + ", length " + length);
}
}
+
+ /**
+ * Returns the string representation of the {@code codePoint}
+ * argument.
+ *
+ * @param codePoint a {@code codePoint}.
+ * @return a string of length {@code 1} or {@code 2} containing
+ * as its single character the argument {@code codePoint}.
+ * @throws IllegalArgumentException if the specified
+ * {@code codePoint} is not a {@linkplain Character#isValidCodePoint
+ * valid Unicode code point}.
+ */
+ static String valueOfCodePoint(int codePoint) {
+ if (COMPACT_STRINGS && StringLatin1.canEncode(codePoint)) {
+ return new String(StringLatin1.toBytes((char)codePoint), LATIN1);
+ } else if (Character.isBmpCodePoint(codePoint)) {
+ return new String(StringUTF16.toBytes((char)codePoint), UTF16);
+ } else if (Character.isSupplementaryCodePoint(codePoint)) {
+ return new String(StringUTF16.toBytesSupplementary(codePoint), UTF16);
+ }
+
+ throw new IllegalArgumentException("Not a valid Unicode code point");
+ }
}
--- a/src/java.base/share/classes/java/lang/StringBuffer.java Mon Mar 05 01:22:36 2018 +0000
+++ b/src/java.base/share/classes/java/lang/StringBuffer.java Mon Mar 05 13:11:21 2018 -0800
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 1994, 2013, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 1994, 2018, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
@@ -90,6 +90,14 @@
* this one, as it supports all of the same operations but it is faster, as
* it performs no synchronization.
*
+ * @apiNote
+ * {@code StringBuffer} implements {@code Comparable} but does not override
+ * {@link Object#equals equals}. Thus, the natural ordering of {@code StringBuffer}
+ * is inconsistent with equals. Care should be exercised if {@code StringBuffer}
+ * objects are used as keys in a {@code SortedMap} or elements in a {@code SortedSet}.
+ * See {@link Comparable}, {@link java.util.SortedMap SortedMap}, or
+ * {@link java.util.SortedSet SortedSet} for more information.
+ *
* @author Arthur van Hoff
* @see java.lang.StringBuilder
* @see java.lang.String
@@ -97,7 +105,7 @@
*/
public final class StringBuffer
extends AbstractStringBuilder
- implements java.io.Serializable, CharSequence
+ implements java.io.Serializable, Comparable<StringBuffer>, CharSequence
{
/**
@@ -162,6 +170,35 @@
append(seq);
}
+ /**
+ * Compares two {@code StringBuffer} instances lexicographically. This method
+ * follows the same rules for lexicographical comparison as defined in the
+ * {@linkplain java.lang.CharSequence#compare(java.lang.CharSequence,
+ * java.lang.CharSequence) CharSequence.compare(this, another)} method.
+ *
+ * <p>
+ * For finer-grained, locale-sensitive String comparison, refer to
+ * {@link java.text.Collator}.
+ *
+ * @implNote
+ * This method synchronizes on {@code this}, the current object, but not
+ * {@code StringBuffer another} with which {@code this StringBuffer} is compared.
+ *
+ * @param another the {@code StringBuffer} to be compared with
+ *
+ * @return the value {@code 0} if this {@code StringBuffer} contains the same
+ * character sequence as that of the argument {@code StringBuffer}; a negative integer
+ * if this {@code StringBuffer} is lexicographically less than the
+ * {@code StringBuffer} argument; or a positive integer if this {@code StringBuffer}
+ * is lexicographically greater than the {@code StringBuffer} argument.
+ *
+ * @since 11
+ */
+ @Override
+ public synchronized int compareTo(StringBuffer another) {
+ return super.compareTo(another);
+ }
+
@Override
public synchronized int length() {
return count;
--- a/src/java.base/share/classes/java/lang/StringBuilder.java Mon Mar 05 01:22:36 2018 +0000
+++ b/src/java.base/share/classes/java/lang/StringBuilder.java Mon Mar 05 13:11:21 2018 -0800
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2003, 2013, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2003, 2018, Oracle and/or its affiliates. All rights reserved.
* 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,6 +69,14 @@
* or method in this class will cause a {@link NullPointerException} to be
* thrown.
*
+ * @apiNote
+ * {@code StringBuilder} implements {@code Comparable} but does not override
+ * {@link Object#equals equals}. Thus, the natural ordering of {@code StringBuilder}
+ * is inconsistent with equals. Care should be exercised if {@code StringBuilder}
+ * objects are used as keys in a {@code SortedMap} or elements in a {@code SortedSet}.
+ * See {@link Comparable}, {@link java.util.SortedMap SortedMap}, or
+ * {@link java.util.SortedSet SortedSet} for more information.
+ *
* @author Michael McCloskey
* @see java.lang.StringBuffer
* @see java.lang.String
@@ -76,7 +84,7 @@
*/
public final class StringBuilder
extends AbstractStringBuilder
- implements java.io.Serializable, CharSequence
+ implements java.io.Serializable, Comparable<StringBuilder>, CharSequence
{
/** use serialVersionUID for interoperability */
@@ -130,6 +138,31 @@
append(seq);
}
+ /**
+ * Compares two {@code StringBuilder} instances lexicographically. This method
+ * follows the same rules for lexicographical comparison as defined in the
+ * {@linkplain java.lang.CharSequence#compare(java.lang.CharSequence,
+ * java.lang.CharSequence) CharSequence.compare(this, another)} method.
+ *
+ * <p>
+ * For finer-grained, locale-sensitive String comparison, refer to
+ * {@link java.text.Collator}.
+ *
+ * @param another the {@code StringBuilder} to be compared with
+ *
+ * @return the value {@code 0} if this {@code StringBuilder} contains the same
+ * character sequence as that of the argument {@code StringBuilder}; a negative integer
+ * if this {@code StringBuilder} is lexicographically less than the
+ * {@code StringBuilder} argument; or a positive integer if this {@code StringBuilder}
+ * is lexicographically greater than the {@code StringBuilder} argument.
+ *
+ * @since 11
+ */
+ @Override
+ public int compareTo(StringBuilder another) {
+ return super.compareTo(another);
+ }
+
@Override
public StringBuilder append(Object obj) {
return append(String.valueOf(obj));
--- a/src/java.base/share/classes/java/lang/StringLatin1.java Mon Mar 05 01:22:36 2018 +0000
+++ b/src/java.base/share/classes/java/lang/StringLatin1.java Mon Mar 05 13:11:21 2018 -0800
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2015, 2017, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2015, 2018, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
@@ -103,6 +103,10 @@
public static int compareTo(byte[] value, byte[] other) {
int len1 = value.length;
int len2 = other.length;
+ return compareTo(value, other, len1, len2);
+ }
+
+ public static int compareTo(byte[] value, byte[] other, int len1, int len2) {
int lim = Math.min(len1, len2);
for (int k = 0; k < lim; k++) {
if (value[k] != other[k]) {
@@ -116,6 +120,20 @@
public static int compareToUTF16(byte[] value, byte[] other) {
int len1 = length(value);
int len2 = StringUTF16.length(other);
+ return compareToUTF16Values(value, other, len1, len2);
+ }
+
+ /*
+ * Checks the boundary and then compares the byte arrays.
+ */
+ public static int compareToUTF16(byte[] value, byte[] other, int len1, int len2) {
+ checkOffset(len1, length(value));
+ checkOffset(len2, StringUTF16.length(other));
+
+ return compareToUTF16Values(value, other, len1, len2);
+ }
+
+ private static int compareToUTF16Values(byte[] value, byte[] other, int len1, int len2) {
int lim = Math.min(len1, len2);
for (int k = 0; k < lim; k++) {
char c1 = getChar(value, k);
--- a/src/java.base/share/classes/java/lang/StringUTF16.java Mon Mar 05 01:22:36 2018 +0000
+++ b/src/java.base/share/classes/java/lang/StringUTF16.java Mon Mar 05 13:11:21 2018 -0800
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2015, 2017, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2015, 2018, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
@@ -235,6 +235,13 @@
return result;
}
+ static byte[] toBytesSupplementary(int cp) {
+ byte[] result = new byte[4];
+ putChar(result, 0, Character.highSurrogate(cp));
+ putChar(result, 1, Character.lowSurrogate(cp));
+ return result;
+ }
+
@HotSpotIntrinsicCandidate
public static void getChars(byte[] value, int srcBegin, int srcEnd, char dst[], int dstBegin) {
// We need a range check here because 'getChar' has no checks
@@ -273,6 +280,20 @@
public static int compareTo(byte[] value, byte[] other) {
int len1 = length(value);
int len2 = length(other);
+ return compareValues(value, other, len1, len2);
+ }
+
+ /*
+ * Checks the boundary and then compares the byte arrays.
+ */
+ public static int compareTo(byte[] value, byte[] other, int len1, int len2) {
+ checkOffset(len1, value);
+ checkOffset(len2, other);
+
+ return compareValues(value, other, len1, len2);
+ }
+
+ private static int compareValues(byte[] value, byte[] other, int len1, int len2) {
int lim = Math.min(len1, len2);
for (int k = 0; k < lim; k++) {
char c1 = getChar(value, k);
@@ -289,6 +310,10 @@
return -StringLatin1.compareToUTF16(other, value);
}
+ public static int compareToLatin1(byte[] value, byte[] other, int len1, int len2) {
+ return -StringLatin1.compareToUTF16(other, value, len2, len1);
+ }
+
public static int compareToCI(byte[] value, byte[] other) {
int len1 = length(value);
int len2 = length(other);
--- a/src/java.base/share/classes/java/lang/Thread.java Mon Mar 05 01:22:36 2018 +0000
+++ b/src/java.base/share/classes/java/lang/Thread.java Mon Mar 05 13:11:21 2018 -0800
@@ -1007,22 +1007,22 @@
* @spec JSR-51
*/
public void interrupt() {
- Thread me = Thread.currentThread();
- if (this != me)
+ if (this != Thread.currentThread()) {
checkAccess();
+ // thread may be blocked in an I/O operation
+ synchronized (blockerLock) {
+ Interruptible b = blocker;
+ if (b != null) {
+ interrupt0(); // set interrupt status
+ b.interrupt(this);
+ return;
+ }
+ }
+ }
+
// set interrupt status
interrupt0();
-
- // thread may be blocked in an I/O operation
- if (this != me && blocker != null) {
- synchronized (blockerLock) {
- Interruptible b = blocker;
- if (b != null) {
- b.interrupt(this);
- }
- }
- }
}
/**
--- a/src/java.base/share/classes/java/lang/invoke/InvokerBytecodeGenerator.java Mon Mar 05 01:22:36 2018 +0000
+++ b/src/java.base/share/classes/java/lang/invoke/InvokerBytecodeGenerator.java Mon Mar 05 13:11:21 2018 -0800
@@ -93,6 +93,10 @@
private ClassWriter cw;
private MethodVisitor mv;
+ /** Single element internal class name lookup cache. */
+ private Class<?> lastClass;
+ private String lastInternalName;
+
private static final MemberName.Factory MEMBERNAME_FACTORY = MemberName.getFactory();
private static final Class<?> HOST_CLASS = LambdaForm.class;
@@ -602,13 +606,18 @@
mv.visitInsn(opcode);
}
- private static String getInternalName(Class<?> c) {
+ private String getInternalName(Class<?> c) {
if (c == Object.class) return OBJ;
else if (c == Object[].class) return OBJARY;
else if (c == Class.class) return CLS;
else if (c == MethodHandle.class) return MH;
assert(VerifyAccess.isTypeVisible(c, Object.class)) : c.getName();
- return c.getName().replace('.', '/');
+
+ if (c == lastClass) {
+ return lastInternalName;
+ }
+ lastClass = c;
+ return lastInternalName = c.getName().replace('.', '/');
}
private static MemberName resolveFrom(String name, MethodType type, Class<?> holder) {
--- a/src/java.base/share/classes/java/net/URLClassLoader.java Mon Mar 05 01:22:36 2018 +0000
+++ b/src/java.base/share/classes/java/net/URLClassLoader.java Mon Mar 05 13:11:21 2018 -0800
@@ -105,7 +105,8 @@
* @exception SecurityException if a security manager exists and its
* {@code checkCreateClassLoader} method doesn't allow
* creation of a class loader.
- * @exception NullPointerException if {@code urls} is {@code null}.
+ * @exception NullPointerException if {@code urls} or any of its
+ * elements is {@code null}.
* @see SecurityManager#checkCreateClassLoader
*/
public URLClassLoader(URL[] urls, ClassLoader parent) {
@@ -149,7 +150,8 @@
* @exception SecurityException if a security manager exists and its
* {@code checkCreateClassLoader} method doesn't allow
* creation of a class loader.
- * @exception NullPointerException if {@code urls} is {@code null}.
+ * @exception NullPointerException if {@code urls} or any of its
+ * elements is {@code null}.
* @see SecurityManager#checkCreateClassLoader
*/
public URLClassLoader(URL[] urls) {
@@ -192,7 +194,8 @@
* @exception SecurityException if a security manager exists and its
* {@code checkCreateClassLoader} method doesn't allow
* creation of a class loader.
- * @exception NullPointerException if {@code urls} is {@code null}.
+ * @exception NullPointerException if {@code urls} or any of its
+ * elements is {@code null}.
* @see SecurityManager#checkCreateClassLoader
*/
public URLClassLoader(URL[] urls, ClassLoader parent,
@@ -221,7 +224,8 @@
* @param parent the parent class loader for delegation
*
* @throws IllegalArgumentException if the given name is empty.
- * @throws NullPointerException if {@code urls} is {@code null}.
+ * @throws NullPointerException if {@code urls} or any of its
+ * elements is {@code null}.
*
* @throws SecurityException if a security manager exists and its
* {@link SecurityManager#checkCreateClassLoader()} method doesn't
@@ -256,7 +260,8 @@
* @param factory the URLStreamHandlerFactory to use when creating URLs
*
* @throws IllegalArgumentException if the given name is empty.
- * @throws NullPointerException if {@code urls} is {@code null}.
+ * @throws NullPointerException if {@code urls} or any of its
+ * elements is {@code null}.
*
* @throws SecurityException if a security manager exists and its
* {@code checkCreateClassLoader} method doesn't allow
@@ -805,7 +810,8 @@
*
* @param urls the URLs to search for classes and resources
* @param parent the parent class loader for delegation
- * @exception NullPointerException if {@code urls} is {@code null}.
+ * @exception NullPointerException if {@code urls} or any of its
+ * elements is {@code null}.
* @return the resulting class loader
*/
public static URLClassLoader newInstance(final URL[] urls,
@@ -831,7 +837,8 @@
* loading the class.
*
* @param urls the URLs to search for classes and resources
- * @exception NullPointerException if {@code urls} is {@code null}.
+ * @exception NullPointerException if {@code urls} or any of its
+ * elements is {@code null}.
* @return the resulting class loader
*/
public static URLClassLoader newInstance(final URL[] urls) {
--- a/src/java.base/share/classes/java/nio/charset/CoderResult.java Mon Mar 05 01:22:36 2018 +0000
+++ b/src/java.base/share/classes/java/nio/charset/CoderResult.java Mon Mar 05 13:11:21 2018 -0800
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2001, 2013, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2001, 2018, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
@@ -25,11 +25,10 @@
package java.nio.charset;
-import java.lang.ref.WeakReference;
-import java.nio.*;
+import java.nio.BufferOverflowException;
+import java.nio.BufferUnderflowException;
+import java.util.concurrent.ConcurrentHashMap;
import java.util.Map;
-import java.util.HashMap;
-
/**
* A description of the result state of a coder.
@@ -191,37 +190,20 @@
public static final CoderResult OVERFLOW
= new CoderResult(CR_OVERFLOW, 0);
- private abstract static class Cache {
-
- private Map<Integer,WeakReference<CoderResult>> cache = null;
-
- protected abstract CoderResult create(int len);
+ private static final class Cache {
+ static final Cache INSTANCE = new Cache();
+ private Cache() {}
- private synchronized CoderResult get(int len) {
- if (len <= 0)
- throw new IllegalArgumentException("Non-positive length");
- Integer k = len;
- WeakReference<CoderResult> w;
- CoderResult e = null;
- if (cache == null) {
- cache = new HashMap<>();
- } else if ((w = cache.get(k)) != null) {
- e = w.get();
- }
- if (e == null) {
- e = create(len);
- cache.put(k, new WeakReference<>(e));
- }
- return e;
- }
-
+ final Map<Integer, CoderResult> unmappable = new ConcurrentHashMap<>();
+ final Map<Integer, CoderResult> malformed = new ConcurrentHashMap<>();
}
- private static Cache malformedCache
- = new Cache() {
- public CoderResult create(int len) {
- return new CoderResult(CR_MALFORMED, len);
- }};
+ private static final CoderResult[] malformed4 = new CoderResult[] {
+ new CoderResult(CR_MALFORMED, 1),
+ new CoderResult(CR_MALFORMED, 2),
+ new CoderResult(CR_MALFORMED, 3),
+ new CoderResult(CR_MALFORMED, 4),
+ };
/**
* Static factory method that returns the unique object describing a
@@ -233,14 +215,20 @@
* @return The requested coder-result object
*/
public static CoderResult malformedForLength(int length) {
- return malformedCache.get(length);
+ if (length <= 0)
+ throw new IllegalArgumentException("Non-positive length");
+ if (length <= 4)
+ return malformed4[length - 1];
+ return Cache.INSTANCE.malformed.computeIfAbsent(length,
+ n -> new CoderResult(CR_MALFORMED, n));
}
- private static Cache unmappableCache
- = new Cache() {
- public CoderResult create(int len) {
- return new CoderResult(CR_UNMAPPABLE, len);
- }};
+ private static final CoderResult[] unmappable4 = new CoderResult[] {
+ new CoderResult(CR_UNMAPPABLE, 1),
+ new CoderResult(CR_UNMAPPABLE, 2),
+ new CoderResult(CR_UNMAPPABLE, 3),
+ new CoderResult(CR_UNMAPPABLE, 4),
+ };
/**
* Static factory method that returns the unique result object describing
@@ -252,7 +240,12 @@
* @return The requested coder-result object
*/
public static CoderResult unmappableForLength(int length) {
- return unmappableCache.get(length);
+ if (length <= 0)
+ throw new IllegalArgumentException("Non-positive length");
+ if (length <= 4)
+ return unmappable4[length - 1];
+ return Cache.INSTANCE.unmappable.computeIfAbsent(length,
+ n -> new CoderResult(CR_UNMAPPABLE, n));
}
/**
--- a/src/java.base/share/classes/java/util/jar/Attributes.java Mon Mar 05 01:22:36 2018 +0000
+++ b/src/java.base/share/classes/java/util/jar/Attributes.java Mon Mar 05 13:11:21 2018 -0800
@@ -40,7 +40,9 @@
* The Attributes class maps Manifest attribute names to associated string
* values. Valid attribute names are case-insensitive, are restricted to
* the ASCII characters in the set [0-9a-zA-Z_-], and cannot exceed 70
- * characters in length. Attribute values can contain any characters and
+ * characters in length. There must be a colon and a SPACE after the name;
+ * the combined length will not exceed 72 characters.
+ * Attribute values can contain any characters and
* will be UTF8-encoded when written to the output stream. See the
* <a href="{@docRoot}/../specs/jar/jar.html">JAR File Specification</a>
* for more information about valid attribute names and values.
@@ -310,8 +312,8 @@
}
buffer.append(value);
+ Manifest.make72Safe(buffer);
buffer.append("\r\n");
- Manifest.make72Safe(buffer);
os.writeBytes(buffer.toString());
}
os.writeBytes("\r\n");
@@ -355,8 +357,8 @@
}
buffer.append(value);
+ Manifest.make72Safe(buffer);
buffer.append("\r\n");
- Manifest.make72Safe(buffer);
out.writeBytes(buffer.toString());
}
}
--- a/src/java.base/share/classes/java/util/jar/Manifest.java Mon Mar 05 01:22:36 2018 +0000
+++ b/src/java.base/share/classes/java/util/jar/Manifest.java Mon Mar 05 13:11:21 2018 -0800
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 1997, 2013, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 1997, 2018, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
@@ -157,8 +157,8 @@
value = new String(vb, 0, 0, vb.length);
}
buffer.append(value);
+ make72Safe(buffer);
buffer.append("\r\n");
- make72Safe(buffer);
dos.writeBytes(buffer.toString());
e.getValue().write(dos);
}
@@ -170,13 +170,11 @@
*/
static void make72Safe(StringBuffer line) {
int length = line.length();
- if (length > 72) {
- int index = 70;
- while (index < length - 2) {
- line.insert(index, "\r\n ");
- index += 72;
- length += 3;
- }
+ int index = 72;
+ while (index < length) {
+ line.insert(index, "\r\n ");
+ index += 74; // + line width + line break ("\r\n")
+ length += 3; // + line break ("\r\n") and space
}
return;
}
--- a/src/java.base/share/classes/sun/invoke/util/BytecodeDescriptor.java Mon Mar 05 01:22:36 2018 +0000
+++ b/src/java.base/share/classes/sun/invoke/util/BytecodeDescriptor.java Mon Mar 05 13:11:21 2018 -0800
@@ -107,6 +107,11 @@
}
public static String unparse(Class<?> type) {
+ if (type == Object.class) {
+ return "Ljava/lang/Object;";
+ } else if (type == int.class) {
+ return "I";
+ }
StringBuilder sb = new StringBuilder();
unparseSig(type, sb);
return sb.toString();
@@ -148,6 +153,8 @@
char c = Wrapper.forBasicType(t).basicTypeChar();
if (c != 'L') {
sb.append(c);
+ } else if (t == Object.class) {
+ sb.append("Ljava/lang/Object;");
} else {
boolean lsemi = (!t.isArray());
if (lsemi) sb.append('L');
--- a/src/java.base/share/native/libjava/System.c Mon Mar 05 01:22:36 2018 +0000
+++ b/src/java.base/share/native/libjava/System.c Mon Mar 05 13:11:21 2018 -0800
@@ -260,7 +260,6 @@
PUTPROP(props, "user.variant", sprops->variant);
}
PUTPROP(props, "file.encoding", sprops->encoding);
- PUTPROP(props, "sun.jnu.encoding", sprops->sun_jnu_encoding);
if (sprops->sun_stdout_encoding != NULL) {
PUTPROP(props, "sun.stdout.encoding", sprops->sun_stdout_encoding);
}
@@ -319,6 +318,7 @@
/* !!! DO NOT call PUTPROP_ForPlatformNString before this line !!!
* !!! I18n properties have not been set up yet !!!
*/
+ InitializeEncoding(env, sprops->sun_jnu_encoding);
/* Printing properties */
/* Note: java.awt.printerjob is an implementation private property which
@@ -418,6 +418,9 @@
(*env)->DeleteLocalRef(env, jVMVal);
}
+ // Platform defined encoding properties override any on the command line
+ PUTPROP(props, "sun.jnu.encoding", sprops->sun_jnu_encoding);
+
return ret;
}
--- a/src/java.base/share/native/libjava/jni_util.c Mon Mar 05 01:22:36 2018 +0000
+++ b/src/java.base/share/native/libjava/jni_util.c Mon Mar 05 13:11:21 2018 -0800
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 1997, 2016, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 1997, 2018, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
@@ -774,14 +774,10 @@
return newSizedStringJava(env, str, len);
}
-/* Initialize the fast encoding. If the "sun.jnu.encoding" property
- * has not yet been set, we leave fastEncoding == NO_ENCODING_YET.
- */
+/* Initialize the fast encoding from the encoding name. */
void
-initializeEncoding(JNIEnv *env)
+InitializeEncoding(JNIEnv *env, const char *encname)
{
- jstring propname = 0;
- jstring enc = 0;
jclass strClazz = NULL;
if ((*env)->EnsureLocalCapacity(env, 3) < 0)
@@ -790,61 +786,49 @@
strClazz = JNU_ClassString(env);
CHECK_NULL(strClazz);
- propname = (*env)->NewStringUTF(env, "sun.jnu.encoding");
- if (propname) {
- jboolean exc;
- enc = JNU_CallStaticMethodByName
- (env,
- &exc,
- "java/lang/System",
- "getProperty",
- "(Ljava/lang/String;)Ljava/lang/String;",
- propname).l;
- if (!exc) {
- if (enc) {
- const char* encname = (*env)->GetStringUTFChars(env, enc, 0);
- if (encname) {
- /*
- * On Solaris with nl_langinfo() called in GetJavaProperties():
- *
- * locale undefined -> NULL -> hardcoded default
- * "C" locale -> "" -> hardcoded default (on 2.6)
- * "C" locale -> "ISO646-US" (on Sol 7/8)
- * "en_US" locale -> "ISO8859-1"
- * "en_GB" locale -> "ISO8859-1" (on Sol 7/8)
- * "en_UK" locale -> "ISO8859-1" (on 2.6)
- */
- if ((strcmp(encname, "8859_1") == 0) ||
- (strcmp(encname, "ISO8859-1") == 0) ||
- (strcmp(encname, "ISO8859_1") == 0) ||
- (strcmp(encname, "ISO-8859-1") == 0)) {
- fastEncoding = FAST_8859_1;
- } else if (strcmp(encname, "UTF-8") == 0) {
- fastEncoding = FAST_UTF_8;
- jnuEncoding = (jstring)(*env)->NewGlobalRef(env, enc);
- } else if (strcmp(encname, "ISO646-US") == 0) {
- fastEncoding = FAST_646_US;
- } else if (strcmp(encname, "Cp1252") == 0 ||
- /* This is a temporary fix until we move */
- /* to wide character versions of all Windows */
- /* calls. */
- strcmp(encname, "utf-16le") == 0) {
- fastEncoding = FAST_CP1252;
- } else {
- fastEncoding = NO_FAST_ENCODING;
- jnuEncoding = (jstring)(*env)->NewGlobalRef(env, enc);
- }
- (*env)->ReleaseStringUTFChars(env, enc, encname);
- }
- }
+ if (encname) {
+ /*
+ * On Solaris with nl_langinfo() called in GetJavaProperties():
+ *
+ * locale undefined -> NULL -> hardcoded default
+ * "C" locale -> "" -> hardcoded default (on 2.6)
+ * "C" locale -> "ISO646-US" (on Sol 7/8)
+ * "en_US" locale -> "ISO8859-1"
+ * "en_GB" locale -> "ISO8859-1" (on Sol 7/8)
+ * "en_UK" locale -> "ISO8859-1" (on 2.6)
+ */
+ if ((strcmp(encname, "8859_1") == 0) ||
+ (strcmp(encname, "ISO8859-1") == 0) ||
+ (strcmp(encname, "ISO8859_1") == 0) ||
+ (strcmp(encname, "ISO-8859-1") == 0)) {
+ fastEncoding = FAST_8859_1;
+ } else if (strcmp(encname, "UTF-8") == 0) {
+ jstring enc = (*env)->NewStringUTF(env, encname);
+ if (enc == NULL)
+ return;
+ fastEncoding = FAST_UTF_8;
+ jnuEncoding = (jstring)(*env)->NewGlobalRef(env, enc);
+ (*env)->DeleteLocalRef(env, enc);
+ } else if (strcmp(encname, "ISO646-US") == 0) {
+ fastEncoding = FAST_646_US;
+ } else if (strcmp(encname, "Cp1252") == 0 ||
+ /* This is a temporary fix until we move */
+ /* to wide character versions of all Windows */
+ /* calls. */
+ strcmp(encname, "utf-16le") == 0) {
+ fastEncoding = FAST_CP1252;
} else {
- (*env)->ExceptionClear(env);
+ jstring enc = (*env)->NewStringUTF(env, encname);
+ if (enc == NULL)
+ return;
+ fastEncoding = NO_FAST_ENCODING;
+ jnuEncoding = (jstring)(*env)->NewGlobalRef(env, enc);
+ (*env)->DeleteLocalRef(env, enc);
}
} else {
- (*env)->ExceptionClear(env);
+ JNU_ThrowInternalError(env, "platform encoding undefined");
+ return;
}
- (*env)->DeleteLocalRef(env, propname);
- (*env)->DeleteLocalRef(env, enc);
/* Initialize method-id cache */
String_getBytes_ID = (*env)->GetMethodID(env, strClazz,
@@ -865,19 +849,18 @@
JNIEXPORT jstring JNICALL
JNU_NewStringPlatform(JNIEnv *env, const char *str)
{
- if (fastEncoding == NO_ENCODING_YET) {
- initializeEncoding(env);
- JNU_CHECK_EXCEPTION_RETURN(env, NULL);
- }
-
- if ((fastEncoding == FAST_8859_1) || (fastEncoding == NO_ENCODING_YET))
+ if (fastEncoding == FAST_UTF_8)
+ return newStringUTF8(env, str);
+ if (fastEncoding == FAST_8859_1)
return newString8859_1(env, str);
if (fastEncoding == FAST_646_US)
return newString646_US(env, str);
if (fastEncoding == FAST_CP1252)
return newStringCp1252(env, str);
- if (fastEncoding == FAST_UTF_8)
- return newStringUTF8(env, str);
+ if (fastEncoding == NO_ENCODING_YET) {
+ JNU_ThrowInternalError(env, "platform encoding not initialized");
+ return NULL;
+ }
return newStringJava(env, str);
}
@@ -985,20 +968,18 @@
if (isCopy)
*isCopy = JNI_TRUE;
- if (fastEncoding == NO_ENCODING_YET) {
- initializeEncoding(env);
- JNU_CHECK_EXCEPTION_RETURN(env, 0);
- }
-
- if ((fastEncoding == FAST_8859_1) || (fastEncoding == NO_ENCODING_YET))
+ if (fastEncoding == FAST_UTF_8)
+ return getStringUTF8(env, jstr);
+ if (fastEncoding == FAST_8859_1)
return getString8859_1Chars(env, jstr);
if (fastEncoding == FAST_646_US)
return getString646_USChars(env, jstr);
if (fastEncoding == FAST_CP1252)
return getStringCp1252Chars(env, jstr);
- if (fastEncoding == FAST_UTF_8)
- return getStringUTF8(env, jstr);
- else
+ if (fastEncoding == NO_ENCODING_YET) {
+ JNU_ThrowInternalError(env, "platform encoding not initialized");
+ return 0;
+ } else
return getStringBytes(env, jstr);
}
--- a/src/java.base/share/native/libjava/jni_util.h Mon Mar 05 01:22:36 2018 +0000
+++ b/src/java.base/share/native/libjava/jni_util.h Mon Mar 05 13:11:21 2018 -0800
@@ -388,7 +388,7 @@
int getFastEncoding();
-void initializeEncoding();
+void InitializeEncoding(JNIEnv *env, const char *name);
void* getProcessHandle();
--- a/src/java.se/share/classes/module-info.java Mon Mar 05 01:22:36 2018 +0000
+++ b/src/java.se/share/classes/module-info.java Mon Mar 05 13:11:21 2018 -0800
@@ -55,6 +55,7 @@
requires transitive java.security.sasl;
requires transitive java.sql;
requires transitive java.sql.rowset;
+ requires transitive java.transaction.xa;
requires transitive java.xml;
requires transitive java.xml.crypto;
}
--- a/src/java.sql/share/classes/javax/transaction/xa/XAException.java Mon Mar 05 01:22:36 2018 +0000
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,201 +0,0 @@
-/*
- * Copyright (c) 2000, 2001, Oracle and/or its affiliates. All rights reserved.
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * This code is free software; you can redistribute it and/or modify it
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please 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 javax.transaction.xa;
-
-/**
- * The XAException is thrown by the Resource Manager (RM) to inform the
- * Transaction Manager of an error encountered by the involved transaction.
- *
- * @since 1.4
- */
-public class XAException extends Exception {
-
- /**
- * Specify serialVersionUID for backward compatibility
- */
- private static final long serialVersionUID = -8249683284832867751L;
-
- /**
- * The error code with which to create the SystemException.
- *
- * @serial The error code for the exception
- */
- public int errorCode;
-
- /**
- * Create an XAException.
- */
- public XAException() {
- super();
- }
-
- /**
- * Create an XAException with a given string.
- *
- * @param s The <code>String</code> object containing the exception
- * message.
- */
- public XAException(String s) {
- super(s);
- }
-
- /**
- * Create an XAException with a given error code.
- *
- * @param errcode The error code identifying the exception.
- */
- public XAException(int errcode) {
- super();
- errorCode = errcode;
- }
-
- /**
- * The inclusive lower bound of the rollback codes.
- */
- public final static int XA_RBBASE = 100;
-
- /**
- * Indicates that the rollback was caused by an unspecified reason.
- */
- public final static int XA_RBROLLBACK = XA_RBBASE;
-
- /**
- * Indicates that the rollback was caused by a communication failure.
- */
- public final static int XA_RBCOMMFAIL = XA_RBBASE + 1;
-
- /**
- * A deadlock was detected.
- */
- public final static int XA_RBDEADLOCK = XA_RBBASE + 2;
-
- /**
- * A condition that violates the integrity of the resource was detected.
- */
- public final static int XA_RBINTEGRITY = XA_RBBASE + 3;
-
- /**
- * The resource manager rolled back the transaction branch for a reason
- * not on this list.
- */
- public final static int XA_RBOTHER = XA_RBBASE + 4;
-
- /**
- * A protocol error occurred in the resource manager.
- */
- public final static int XA_RBPROTO = XA_RBBASE + 5;
-
- /**
- * A transaction branch took too long.
- */
- public final static int XA_RBTIMEOUT = XA_RBBASE + 6;
-
- /**
- * May retry the transaction branch.
- */
- public final static int XA_RBTRANSIENT = XA_RBBASE + 7;
-
- /**
- * The inclusive upper bound of the rollback error code.
- */
- public final static int XA_RBEND = XA_RBTRANSIENT;
-
- /**
- * Resumption must occur where the suspension occurred.
- */
- public final static int XA_NOMIGRATE = 9;
-
- /**
- * The transaction branch may have been heuristically completed.
- */
- public final static int XA_HEURHAZ = 8;
-
- /**
- * The transaction branch has been heuristically committed.
- */
- public final static int XA_HEURCOM = 7;
-
- /**
- * The transaction branch has been heuristically rolled back.
- */
- public final static int XA_HEURRB = 6;
-
- /**
- * The transaction branch has been heuristically committed and
- * rolled back.
- */
- public final static int XA_HEURMIX = 5;
-
- /**
- * Routine returned with no effect and may be reissued.
- */
- public final static int XA_RETRY = 4;
-
- /**
- * The transaction branch was read-only and has been committed.
- */
- public final static int XA_RDONLY = 3;
-
- /**
- * There is an asynchronous operation already outstanding.
- */
- public final static int XAER_ASYNC = -2;
-
- /**
- * A resource manager error has occurred in the transaction branch.
- */
- public final static int XAER_RMERR = -3;
-
- /**
- * The XID is not valid.
- */
- public final static int XAER_NOTA = -4;
-
- /**
- * Invalid arguments were given.
- */
- public final static int XAER_INVAL = -5;
-
- /**
- * Routine was invoked in an inproper context.
- */
- public final static int XAER_PROTO = -6;
-
- /**
- * Resource manager is unavailable.
- */
- public final static int XAER_RMFAIL = -7;
-
- /**
- * The XID already exists.
- */
- public final static int XAER_DUPID = -8;
-
- /**
- * The resource manager is doing work outside a global transaction.
- */
- public final static int XAER_OUTSIDE = -9;
-}
--- a/src/java.sql/share/classes/javax/transaction/xa/XAResource.java Mon Mar 05 01:22:36 2018 +0000
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,306 +0,0 @@
-/*
- * Copyright (c) 2000, 2001, Oracle and/or its affiliates. All rights reserved.
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * This code is free software; you can redistribute it and/or modify it
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please 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 javax.transaction.xa;
-
-/**
- * The XAResource interface is a Java mapping of the industry standard
- * XA interface based on the X/Open CAE Specification (Distributed
- * Transaction Processing: The XA Specification).
- *
- * <p>The XA interface defines the contract between a Resource Manager
- * and a Transaction Manager in a distributed transaction processing
- * (DTP) environment. A JDBC driver or a JMS provider implements
- * this interface to support the association between a global transaction
- * and a database or message service connection.
- *
- * <p>The XAResource interface can be supported by any transactional
- * resource that is intended to be used by application programs in an
- * environment where transactions are controlled by an external
- * transaction manager. An example of such a resource is a database
- * management system. An application may access data through multiple
- * database connections. Each database connection is enlisted with
- * the transaction manager as a transactional resource. The transaction
- * manager obtains an XAResource for each connection participating
- * in a global transaction. The transaction manager uses the
- * <code>start</code> method
- * to associate the global transaction with the resource, and it uses the
- * <code>end</code> method to disassociate the transaction from
- * the resource. The resource
- * manager is responsible for associating the global transaction to all
- * work performed on its data between the start and end method invocations.
- *
- * <p>At transaction commit time, the resource managers are informed by
- * the transaction manager to prepare, commit, or rollback a transaction
- * according to the two-phase commit protocol.</p>
- *
- * @since 1.4
- */
-public interface XAResource {
-
- /**
- * Commits the global transaction specified by xid.
- *
- * @param xid A global transaction identifier
- *
- * @param onePhase If true, the resource manager should use a one-phase
- * commit protocol to commit the work done on behalf of xid.
- *
- * @exception XAException An error has occurred. Possible XAExceptions
- * are XA_HEURHAZ, XA_HEURCOM, XA_HEURRB, XA_HEURMIX, XAER_RMERR,
- * XAER_RMFAIL, XAER_NOTA, XAER_INVAL, or XAER_PROTO.
- *
- * <P>If the resource manager did not commit the transaction and the
- * paramether onePhase is set to true, the resource manager may throw
- * one of the XA_RB* exceptions. Upon return, the resource manager has
- * rolled back the branch's work and has released all held resources.
- */
- void commit(Xid xid, boolean onePhase) throws XAException;
-
- /**
- * Ends the work performed on behalf of a transaction branch.
- * The resource manager disassociates the XA resource from the
- * transaction branch specified and lets the transaction
- * complete.
- *
- * <p>If TMSUSPEND is specified in the flags, the transaction branch
- * is temporarily suspended in an incomplete state. The transaction
- * context is in a suspended state and must be resumed via the
- * <code>start</code> method with TMRESUME specified.</p>
- *
- * <p>If TMFAIL is specified, the portion of work has failed.
- * The resource manager may mark the transaction as rollback-only</p>
- *
- * <p>If TMSUCCESS is specified, the portion of work has completed
- * successfully.</p>
- *
- * @param xid A global transaction identifier that is the same as
- * the identifier used previously in the <code>start</code> method.
- *
- * @param flags One of TMSUCCESS, TMFAIL, or TMSUSPEND.
- *
- * @exception XAException An error has occurred. Possible XAException
- * values are XAER_RMERR, XAER_RMFAILED, XAER_NOTA, XAER_INVAL,
- * XAER_PROTO, or XA_RB*.
- */
- void end(Xid xid, int flags) throws XAException;
-
- /**
- * Tells the resource manager to forget about a heuristically
- * completed transaction branch.
- *
- * @param xid A global transaction identifier.
- *
- * @exception XAException An error has occurred. Possible exception
- * values are XAER_RMERR, XAER_RMFAIL, XAER_NOTA, XAER_INVAL, or
- * XAER_PROTO.
- */
- void forget(Xid xid) throws XAException;
-
- /**
- * Obtains the current transaction timeout value set for this
- * XAResource instance. If <CODE>XAResource.setTransactionTimeout</CODE>
- * was not used prior to invoking this method, the return value
- * is the default timeout set for the resource manager; otherwise,
- * the value used in the previous <CODE>setTransactionTimeout</CODE>
- * call is returned.
- *
- * @return the transaction timeout value in seconds.
- *
- * @exception XAException An error has occurred. Possible exception
- * values are XAER_RMERR and XAER_RMFAIL.
- */
- int getTransactionTimeout() throws XAException;
-
- /**
- * This method is called to determine if the resource manager
- * instance represented by the target object is the same as the
- * resouce manager instance represented by the parameter <i>xares</i>.
- *
- * @param xares An XAResource object whose resource manager instance
- * is to be compared with the resource manager instance of the
- * target object.
- *
- * @return <i>true</i> if it's the same RM instance; otherwise
- * <i>false</i>.
- *
- * @exception XAException An error has occurred. Possible exception
- * values are XAER_RMERR and XAER_RMFAIL.
- */
- boolean isSameRM(XAResource xares) throws XAException;
-
- /**
- * Ask the resource manager to prepare for a transaction commit
- * of the transaction specified in xid.
- *
- * @param xid A global transaction identifier.
- *
- * @exception XAException An error has occurred. Possible exception
- * values are: XA_RB*, XAER_RMERR, XAER_RMFAIL, XAER_NOTA, XAER_INVAL,
- * or XAER_PROTO.
- *
- * @return A value indicating the resource manager's vote on the
- * outcome of the transaction. The possible values are: XA_RDONLY
- * or XA_OK. If the resource manager wants to roll back the
- * transaction, it should do so by raising an appropriate XAException
- * in the prepare method.
- */
- int prepare(Xid xid) throws XAException;
-
- /**
- * Obtains a list of prepared transaction branches from a resource
- * manager. The transaction manager calls this method during recovery
- * to obtain the list of transaction branches that are currently in
- * prepared or heuristically completed states.
- *
- * @param flag One of TMSTARTRSCAN, TMENDRSCAN, TMNOFLAGS. TMNOFLAGS
- * must be used when no other flags are set in the parameter.
- *
- * @exception XAException An error has occurred. Possible values are
- * XAER_RMERR, XAER_RMFAIL, XAER_INVAL, and XAER_PROTO.
- *
- * @return The resource manager returns zero or more XIDs of the
- * transaction branches that are currently in a prepared or
- * heuristically completed state. If an error occurs during the
- * operation, the resource manager should throw the appropriate
- * XAException.
- */
- Xid[] recover(int flag) throws XAException;
-
- /**
- * Informs the resource manager to roll back work done on behalf
- * of a transaction branch.
- *
- * @param xid A global transaction identifier.
- *
- * @exception XAException An error has occurred.
- */
- void rollback(Xid xid) throws XAException;
-
- /**
- * Sets the current transaction timeout value for this <CODE>XAResource</CODE>
- * instance. Once set, this timeout value is effective until
- * <code>setTransactionTimeout</code> is invoked again with a different
- * value. To reset the timeout value to the default value used by the resource
- * manager, set the value to zero.
- *
- * If the timeout operation is performed successfully, the method returns
- * <i>true</i>; otherwise <i>false</i>. If a resource manager does not
- * support explicitly setting the transaction timeout value, this method
- * returns <i>false</i>.
- *
- * @param seconds The transaction timeout value in seconds.
- *
- * @return <i>true</i> if the transaction timeout value is set successfully;
- * otherwise <i>false</i>.
- *
- * @exception XAException An error has occurred. Possible exception values
- * are XAER_RMERR, XAER_RMFAIL, or XAER_INVAL.
- */
- boolean setTransactionTimeout(int seconds) throws XAException;
-
- /**
- * Starts work on behalf of a transaction branch specified in
- * <code>xid</code>.
- *
- * If TMJOIN is specified, the start applies to joining a transaction
- * previously seen by the resource manager. If TMRESUME is specified,
- * the start applies to resuming a suspended transaction specified in the
- * parameter <code>xid</code>.
- *
- * If neither TMJOIN nor TMRESUME is specified and the transaction
- * specified by <code>xid</code> has previously been seen by the resource
- * manager, the resource manager throws the XAException exception with
- * XAER_DUPID error code.
- *
- * @param xid A global transaction identifier to be associated
- * with the resource.
- *
- * @param flags One of TMNOFLAGS, TMJOIN, or TMRESUME.
- *
- * @exception XAException An error has occurred. Possible exceptions
- * are XA_RB*, XAER_RMERR, XAER_RMFAIL, XAER_DUPID, XAER_OUTSIDE,
- * XAER_NOTA, XAER_INVAL, or XAER_PROTO.
- */
- void start(Xid xid, int flags) throws XAException;
-
- /**
- * Ends a recovery scan.
- */
- public final static int TMENDRSCAN = 0x00800000;
-
- /**
- * Disassociates the caller and marks the transaction branch
- * rollback-only.
- */
- public final static int TMFAIL = 0x20000000;
-
- /**
- * Caller is joining existing transaction branch.
- */
- public final static int TMJOIN = 0x00200000;
-
- /**
- * Use TMNOFLAGS to indicate no flags value is selected.
- */
- public final static int TMNOFLAGS = 0x00000000;
-
- /**
- * Caller is using one-phase optimization.
- */
- public final static int TMONEPHASE = 0x40000000;
-
- /**
- * Caller is resuming association with a suspended
- * transaction branch.
- */
- public final static int TMRESUME = 0x08000000;
-
- /**
- * Starts a recovery scan.
- */
- public final static int TMSTARTRSCAN = 0x01000000;
-
- /**
- * Disassociates caller from a transaction branch.
- */
- public final static int TMSUCCESS = 0x04000000;
-
- /**
- * Caller is suspending (not ending) its association with
- * a transaction branch.
- */
- public final static int TMSUSPEND = 0x02000000;
-
- /**
- * The transaction branch has been read-only and has been committed.
- */
- public final static int XA_RDONLY = 0x00000003;
-
- /**
- * The transaction work has been prepared normally.
- */
- public final static int XA_OK = 0;
-}
--- a/src/java.sql/share/classes/javax/transaction/xa/Xid.java Mon Mar 05 01:22:36 2018 +0000
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,72 +0,0 @@
-/*
- * Copyright (c) 2000, 2002, Oracle and/or its affiliates. All rights reserved.
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * This code is free software; you can redistribute it and/or modify it
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please 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 javax.transaction.xa;
-
-/**
- * The Xid interface is a Java mapping of the X/Open transaction identifier
- * XID structure. This interface specifies three accessor methods to
- * retrieve a global transaction format ID, global transaction ID,
- * and branch qualifier. The Xid interface is used by the transaction
- * manager and the resource managers. This interface is not visible to
- * the application programs.
- *
- * @since 1.4
- */
-public interface Xid {
-
- /**
- * Maximum number of bytes returned by {@link #getGlobalTransactionId }.
- */
- final static int MAXGTRIDSIZE = 64;
-
- /**
- * Maximum number of bytes returned by {@link #getBranchQualifier }.
- */
- final static int MAXBQUALSIZE = 64;
-
- /**
- * Obtain the format identifier part of the XID.
- *
- * @return Format identifier. O means the OSI CCR format.
- */
- int getFormatId();
-
- /**
- * Obtain the global transaction identifier part of XID as an array
- * of bytes.
- *
- * @return Global transaction identifier.
- */
- byte[] getGlobalTransactionId();
-
- /**
- * Obtain the transaction branch identifier part of XID as an array
- * of bytes.
- *
- * @return Global transaction identifier.
- */
- byte[] getBranchQualifier();
-}
--- a/src/java.sql/share/classes/javax/transaction/xa/package.html Mon Mar 05 01:22:36 2018 +0000
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,41 +0,0 @@
-<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2 Final//EN">
-<html>
-<head>
-<!--
-Copyright (c) 2001, Oracle and/or its affiliates. All rights reserved.
-DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
-
-This code is free software; you can redistribute it and/or modify it
-under the terms of the GNU General Public License version 2 only, as
-published by the Free Software Foundation. Oracle designates this
-particular file as subject to the "Classpath" exception as provided
-by Oracle in the LICENSE file that accompanied this code.
-
-This code is distributed in the hope that it will be useful, but WITHOUT
-ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
-FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
-version 2 for more details (a copy is included in the LICENSE file that
-accompanied this code).
-
-You should have received a copy of the GNU General Public License version
-2 along with this work; if not, write to the Free Software Foundation,
-Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
-
-Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
-or visit www.oracle.com if you need additional information or have any
-questions.
--->
-
-</head>
-<body bgcolor="white">
-
-Provides the API that defines the contract between the transaction
-manager and the resource manager, which allows the transaction
-manager to enlist and delist resource objects (supplied by the
-resource manager driver) in JTA transactions. The driver vendor
-for a specific resource manager provides the implementation of
-this API.
-
-@since 1.4
-</body>
-</html>
--- a/src/java.sql/share/classes/module-info.java Mon Mar 05 01:22:36 2018 +0000
+++ b/src/java.sql/share/classes/module-info.java Mon Mar 05 13:11:21 2018 -0800
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2014, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2014, 2018, Oracle and/or its affiliates. All rights reserved.
* 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,11 +33,11 @@
*/
module java.sql {
requires transitive java.logging;
+ requires transitive java.transaction.xa;
requires transitive java.xml;
exports java.sql;
exports javax.sql;
- exports javax.transaction.xa;
uses java.sql.Driver;
}
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/src/java.transaction.xa/share/classes/javax/transaction/xa/XAException.java Mon Mar 05 13:11:21 2018 -0800
@@ -0,0 +1,201 @@
+/*
+ * Copyright (c) 2000, 2001, Oracle and/or its affiliates. All rights reserved.
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * This code is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU General Public License version 2 only, as
+ * published by the Free Software Foundation. Oracle designates this
+ * particular file as subject to the "Classpath" exception as provided
+ * by Oracle in the LICENSE file that accompanied this code.
+ *
+ * This code is distributed in the hope that it will be useful, but WITHOUT
+ * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
+ * version 2 for more details (a copy is included in the LICENSE file that
+ * accompanied this code).
+ *
+ * You should have received a copy of the GNU General Public License version
+ * 2 along with this work; if not, write to the Free Software Foundation,
+ * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
+ *
+ * Please 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 javax.transaction.xa;
+
+/**
+ * The XAException is thrown by the Resource Manager (RM) to inform the
+ * Transaction Manager of an error encountered by the involved transaction.
+ *
+ * @since 1.4
+ */
+public class XAException extends Exception {
+
+ /**
+ * Specify serialVersionUID for backward compatibility
+ */
+ private static final long serialVersionUID = -8249683284832867751L;
+
+ /**
+ * The error code with which to create the SystemException.
+ *
+ * @serial The error code for the exception
+ */
+ public int errorCode;
+
+ /**
+ * Create an XAException.
+ */
+ public XAException() {
+ super();
+ }
+
+ /**
+ * Create an XAException with a given string.
+ *
+ * @param s The <code>String</code> object containing the exception
+ * message.
+ */
+ public XAException(String s) {
+ super(s);
+ }
+
+ /**
+ * Create an XAException with a given error code.
+ *
+ * @param errcode The error code identifying the exception.
+ */
+ public XAException(int errcode) {
+ super();
+ errorCode = errcode;
+ }
+
+ /**
+ * The inclusive lower bound of the rollback codes.
+ */
+ public final static int XA_RBBASE = 100;
+
+ /**
+ * Indicates that the rollback was caused by an unspecified reason.
+ */
+ public final static int XA_RBROLLBACK = XA_RBBASE;
+
+ /**
+ * Indicates that the rollback was caused by a communication failure.
+ */
+ public final static int XA_RBCOMMFAIL = XA_RBBASE + 1;
+
+ /**
+ * A deadlock was detected.
+ */
+ public final static int XA_RBDEADLOCK = XA_RBBASE + 2;
+
+ /**
+ * A condition that violates the integrity of the resource was detected.
+ */
+ public final static int XA_RBINTEGRITY = XA_RBBASE + 3;
+
+ /**
+ * The resource manager rolled back the transaction branch for a reason
+ * not on this list.
+ */
+ public final static int XA_RBOTHER = XA_RBBASE + 4;
+
+ /**
+ * A protocol error occurred in the resource manager.
+ */
+ public final static int XA_RBPROTO = XA_RBBASE + 5;
+
+ /**
+ * A transaction branch took too long.
+ */
+ public final static int XA_RBTIMEOUT = XA_RBBASE + 6;
+
+ /**
+ * May retry the transaction branch.
+ */
+ public final static int XA_RBTRANSIENT = XA_RBBASE + 7;
+
+ /**
+ * The inclusive upper bound of the rollback error code.
+ */
+ public final static int XA_RBEND = XA_RBTRANSIENT;
+
+ /**
+ * Resumption must occur where the suspension occurred.
+ */
+ public final static int XA_NOMIGRATE = 9;
+
+ /**
+ * The transaction branch may have been heuristically completed.
+ */
+ public final static int XA_HEURHAZ = 8;
+
+ /**
+ * The transaction branch has been heuristically committed.
+ */
+ public final static int XA_HEURCOM = 7;
+
+ /**
+ * The transaction branch has been heuristically rolled back.
+ */
+ public final static int XA_HEURRB = 6;
+
+ /**
+ * The transaction branch has been heuristically committed and
+ * rolled back.
+ */
+ public final static int XA_HEURMIX = 5;
+
+ /**
+ * Routine returned with no effect and may be reissued.
+ */
+ public final static int XA_RETRY = 4;
+
+ /**
+ * The transaction branch was read-only and has been committed.
+ */
+ public final static int XA_RDONLY = 3;
+
+ /**
+ * There is an asynchronous operation already outstanding.
+ */
+ public final static int XAER_ASYNC = -2;
+
+ /**
+ * A resource manager error has occurred in the transaction branch.
+ */
+ public final static int XAER_RMERR = -3;
+
+ /**
+ * The XID is not valid.
+ */
+ public final static int XAER_NOTA = -4;
+
+ /**
+ * Invalid arguments were given.
+ */
+ public final static int XAER_INVAL = -5;
+
+ /**
+ * Routine was invoked in an inproper context.
+ */
+ public final static int XAER_PROTO = -6;
+
+ /**
+ * Resource manager is unavailable.
+ */
+ public final static int XAER_RMFAIL = -7;
+
+ /**
+ * The XID already exists.
+ */
+ public final static int XAER_DUPID = -8;
+
+ /**
+ * The resource manager is doing work outside a global transaction.
+ */
+ public final static int XAER_OUTSIDE = -9;
+}
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/src/java.transaction.xa/share/classes/javax/transaction/xa/XAResource.java Mon Mar 05 13:11:21 2018 -0800
@@ -0,0 +1,306 @@
+/*
+ * Copyright (c) 2000, 2001, Oracle and/or its affiliates. All rights reserved.
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * This code is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU General Public License version 2 only, as
+ * published by the Free Software Foundation. Oracle designates this
+ * particular file as subject to the "Classpath" exception as provided
+ * by Oracle in the LICENSE file that accompanied this code.
+ *
+ * This code is distributed in the hope that it will be useful, but WITHOUT
+ * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
+ * version 2 for more details (a copy is included in the LICENSE file that
+ * accompanied this code).
+ *
+ * You should have received a copy of the GNU General Public License version
+ * 2 along with this work; if not, write to the Free Software Foundation,
+ * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
+ *
+ * Please 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 javax.transaction.xa;
+
+/**
+ * The XAResource interface is a Java mapping of the industry standard
+ * XA interface based on the X/Open CAE Specification (Distributed
+ * Transaction Processing: The XA Specification).
+ *
+ * <p>The XA interface defines the contract between a Resource Manager
+ * and a Transaction Manager in a distributed transaction processing
+ * (DTP) environment. A JDBC driver or a JMS provider implements
+ * this interface to support the association between a global transaction
+ * and a database or message service connection.
+ *
+ * <p>The XAResource interface can be supported by any transactional
+ * resource that is intended to be used by application programs in an
+ * environment where transactions are controlled by an external
+ * transaction manager. An example of such a resource is a database
+ * management system. An application may access data through multiple
+ * database connections. Each database connection is enlisted with
+ * the transaction manager as a transactional resource. The transaction
+ * manager obtains an XAResource for each connection participating
+ * in a global transaction. The transaction manager uses the
+ * <code>start</code> method
+ * to associate the global transaction with the resource, and it uses the
+ * <code>end</code> method to disassociate the transaction from
+ * the resource. The resource
+ * manager is responsible for associating the global transaction to all
+ * work performed on its data between the start and end method invocations.
+ *
+ * <p>At transaction commit time, the resource managers are informed by
+ * the transaction manager to prepare, commit, or rollback a transaction
+ * according to the two-phase commit protocol.</p>
+ *
+ * @since 1.4
+ */
+public interface XAResource {
+
+ /**
+ * Commits the global transaction specified by xid.
+ *
+ * @param xid A global transaction identifier
+ *
+ * @param onePhase If true, the resource manager should use a one-phase
+ * commit protocol to commit the work done on behalf of xid.
+ *
+ * @exception XAException An error has occurred. Possible XAExceptions
+ * are XA_HEURHAZ, XA_HEURCOM, XA_HEURRB, XA_HEURMIX, XAER_RMERR,
+ * XAER_RMFAIL, XAER_NOTA, XAER_INVAL, or XAER_PROTO.
+ *
+ * <P>If the resource manager did not commit the transaction and the
+ * paramether onePhase is set to true, the resource manager may throw
+ * one of the XA_RB* exceptions. Upon return, the resource manager has
+ * rolled back the branch's work and has released all held resources.
+ */
+ void commit(Xid xid, boolean onePhase) throws XAException;
+
+ /**
+ * Ends the work performed on behalf of a transaction branch.
+ * The resource manager disassociates the XA resource from the
+ * transaction branch specified and lets the transaction
+ * complete.
+ *
+ * <p>If TMSUSPEND is specified in the flags, the transaction branch
+ * is temporarily suspended in an incomplete state. The transaction
+ * context is in a suspended state and must be resumed via the
+ * <code>start</code> method with TMRESUME specified.</p>
+ *
+ * <p>If TMFAIL is specified, the portion of work has failed.
+ * The resource manager may mark the transaction as rollback-only</p>
+ *
+ * <p>If TMSUCCESS is specified, the portion of work has completed
+ * successfully.</p>
+ *
+ * @param xid A global transaction identifier that is the same as
+ * the identifier used previously in the <code>start</code> method.
+ *
+ * @param flags One of TMSUCCESS, TMFAIL, or TMSUSPEND.
+ *
+ * @exception XAException An error has occurred. Possible XAException
+ * values are XAER_RMERR, XAER_RMFAILED, XAER_NOTA, XAER_INVAL,
+ * XAER_PROTO, or XA_RB*.
+ */
+ void end(Xid xid, int flags) throws XAException;
+
+ /**
+ * Tells the resource manager to forget about a heuristically
+ * completed transaction branch.
+ *
+ * @param xid A global transaction identifier.
+ *
+ * @exception XAException An error has occurred. Possible exception
+ * values are XAER_RMERR, XAER_RMFAIL, XAER_NOTA, XAER_INVAL, or
+ * XAER_PROTO.
+ */
+ void forget(Xid xid) throws XAException;
+
+ /**
+ * Obtains the current transaction timeout value set for this
+ * XAResource instance. If <CODE>XAResource.setTransactionTimeout</CODE>
+ * was not used prior to invoking this method, the return value
+ * is the default timeout set for the resource manager; otherwise,
+ * the value used in the previous <CODE>setTransactionTimeout</CODE>
+ * call is returned.
+ *
+ * @return the transaction timeout value in seconds.
+ *
+ * @exception XAException An error has occurred. Possible exception
+ * values are XAER_RMERR and XAER_RMFAIL.
+ */
+ int getTransactionTimeout() throws XAException;
+
+ /**
+ * This method is called to determine if the resource manager
+ * instance represented by the target object is the same as the
+ * resouce manager instance represented by the parameter <i>xares</i>.
+ *
+ * @param xares An XAResource object whose resource manager instance
+ * is to be compared with the resource manager instance of the
+ * target object.
+ *
+ * @return <i>true</i> if it's the same RM instance; otherwise
+ * <i>false</i>.
+ *
+ * @exception XAException An error has occurred. Possible exception
+ * values are XAER_RMERR and XAER_RMFAIL.
+ */
+ boolean isSameRM(XAResource xares) throws XAException;
+
+ /**
+ * Ask the resource manager to prepare for a transaction commit
+ * of the transaction specified in xid.
+ *
+ * @param xid A global transaction identifier.
+ *
+ * @exception XAException An error has occurred. Possible exception
+ * values are: XA_RB*, XAER_RMERR, XAER_RMFAIL, XAER_NOTA, XAER_INVAL,
+ * or XAER_PROTO.
+ *
+ * @return A value indicating the resource manager's vote on the
+ * outcome of the transaction. The possible values are: XA_RDONLY
+ * or XA_OK. If the resource manager wants to roll back the
+ * transaction, it should do so by raising an appropriate XAException
+ * in the prepare method.
+ */
+ int prepare(Xid xid) throws XAException;
+
+ /**
+ * Obtains a list of prepared transaction branches from a resource
+ * manager. The transaction manager calls this method during recovery
+ * to obtain the list of transaction branches that are currently in
+ * prepared or heuristically completed states.
+ *
+ * @param flag One of TMSTARTRSCAN, TMENDRSCAN, TMNOFLAGS. TMNOFLAGS
+ * must be used when no other flags are set in the parameter.
+ *
+ * @exception XAException An error has occurred. Possible values are
+ * XAER_RMERR, XAER_RMFAIL, XAER_INVAL, and XAER_PROTO.
+ *
+ * @return The resource manager returns zero or more XIDs of the
+ * transaction branches that are currently in a prepared or
+ * heuristically completed state. If an error occurs during the
+ * operation, the resource manager should throw the appropriate
+ * XAException.
+ */
+ Xid[] recover(int flag) throws XAException;
+
+ /**
+ * Informs the resource manager to roll back work done on behalf
+ * of a transaction branch.
+ *
+ * @param xid A global transaction identifier.
+ *
+ * @exception XAException An error has occurred.
+ */
+ void rollback(Xid xid) throws XAException;
+
+ /**
+ * Sets the current transaction timeout value for this <CODE>XAResource</CODE>
+ * instance. Once set, this timeout value is effective until
+ * <code>setTransactionTimeout</code> is invoked again with a different
+ * value. To reset the timeout value to the default value used by the resource
+ * manager, set the value to zero.
+ *
+ * If the timeout operation is performed successfully, the method returns
+ * <i>true</i>; otherwise <i>false</i>. If a resource manager does not
+ * support explicitly setting the transaction timeout value, this method
+ * returns <i>false</i>.
+ *
+ * @param seconds The transaction timeout value in seconds.
+ *
+ * @return <i>true</i> if the transaction timeout value is set successfully;
+ * otherwise <i>false</i>.
+ *
+ * @exception XAException An error has occurred. Possible exception values
+ * are XAER_RMERR, XAER_RMFAIL, or XAER_INVAL.
+ */
+ boolean setTransactionTimeout(int seconds) throws XAException;
+
+ /**
+ * Starts work on behalf of a transaction branch specified in
+ * <code>xid</code>.
+ *
+ * If TMJOIN is specified, the start applies to joining a transaction
+ * previously seen by the resource manager. If TMRESUME is specified,
+ * the start applies to resuming a suspended transaction specified in the
+ * parameter <code>xid</code>.
+ *
+ * If neither TMJOIN nor TMRESUME is specified and the transaction
+ * specified by <code>xid</code> has previously been seen by the resource
+ * manager, the resource manager throws the XAException exception with
+ * XAER_DUPID error code.
+ *
+ * @param xid A global transaction identifier to be associated
+ * with the resource.
+ *
+ * @param flags One of TMNOFLAGS, TMJOIN, or TMRESUME.
+ *
+ * @exception XAException An error has occurred. Possible exceptions
+ * are XA_RB*, XAER_RMERR, XAER_RMFAIL, XAER_DUPID, XAER_OUTSIDE,
+ * XAER_NOTA, XAER_INVAL, or XAER_PROTO.
+ */
+ void start(Xid xid, int flags) throws XAException;
+
+ /**
+ * Ends a recovery scan.
+ */
+ public final static int TMENDRSCAN = 0x00800000;
+
+ /**
+ * Disassociates the caller and marks the transaction branch
+ * rollback-only.
+ */
+ public final static int TMFAIL = 0x20000000;
+
+ /**
+ * Caller is joining existing transaction branch.
+ */
+ public final static int TMJOIN = 0x00200000;
+
+ /**
+ * Use TMNOFLAGS to indicate no flags value is selected.
+ */
+ public final static int TMNOFLAGS = 0x00000000;
+
+ /**
+ * Caller is using one-phase optimization.
+ */
+ public final static int TMONEPHASE = 0x40000000;
+
+ /**
+ * Caller is resuming association with a suspended
+ * transaction branch.
+ */
+ public final static int TMRESUME = 0x08000000;
+
+ /**
+ * Starts a recovery scan.
+ */
+ public final static int TMSTARTRSCAN = 0x01000000;
+
+ /**
+ * Disassociates caller from a transaction branch.
+ */
+ public final static int TMSUCCESS = 0x04000000;
+
+ /**
+ * Caller is suspending (not ending) its association with
+ * a transaction branch.
+ */
+ public final static int TMSUSPEND = 0x02000000;
+
+ /**
+ * The transaction branch has been read-only and has been committed.
+ */
+ public final static int XA_RDONLY = 0x00000003;
+
+ /**
+ * The transaction work has been prepared normally.
+ */
+ public final static int XA_OK = 0;
+}
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/src/java.transaction.xa/share/classes/javax/transaction/xa/Xid.java Mon Mar 05 13:11:21 2018 -0800
@@ -0,0 +1,72 @@
+/*
+ * Copyright (c) 2000, 2002, Oracle and/or its affiliates. All rights reserved.
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * This code is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU General Public License version 2 only, as
+ * published by the Free Software Foundation. Oracle designates this
+ * particular file as subject to the "Classpath" exception as provided
+ * by Oracle in the LICENSE file that accompanied this code.
+ *
+ * This code is distributed in the hope that it will be useful, but WITHOUT
+ * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
+ * version 2 for more details (a copy is included in the LICENSE file that
+ * accompanied this code).
+ *
+ * You should have received a copy of the GNU General Public License version
+ * 2 along with this work; if not, write to the Free Software Foundation,
+ * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
+ *
+ * Please 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 javax.transaction.xa;
+
+/**
+ * The Xid interface is a Java mapping of the X/Open transaction identifier
+ * XID structure. This interface specifies three accessor methods to
+ * retrieve a global transaction format ID, global transaction ID,
+ * and branch qualifier. The Xid interface is used by the transaction
+ * manager and the resource managers. This interface is not visible to
+ * the application programs.
+ *
+ * @since 1.4
+ */
+public interface Xid {
+
+ /**
+ * Maximum number of bytes returned by {@link #getGlobalTransactionId }.
+ */
+ final static int MAXGTRIDSIZE = 64;
+
+ /**
+ * Maximum number of bytes returned by {@link #getBranchQualifier }.
+ */
+ final static int MAXBQUALSIZE = 64;
+
+ /**
+ * Obtain the format identifier part of the XID.
+ *
+ * @return Format identifier. O means the OSI CCR format.
+ */
+ int getFormatId();
+
+ /**
+ * Obtain the global transaction identifier part of XID as an array
+ * of bytes.
+ *
+ * @return Global transaction identifier.
+ */
+ byte[] getGlobalTransactionId();
+
+ /**
+ * Obtain the transaction branch identifier part of XID as an array
+ * of bytes.
+ *
+ * @return Global transaction identifier.
+ */
+ byte[] getBranchQualifier();
+}
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/src/java.transaction.xa/share/classes/javax/transaction/xa/package-info.java Mon Mar 05 13:11:21 2018 -0800
@@ -0,0 +1,36 @@
+/*
+ * Copyright (c) 2001, 2018, Oracle and/or its affiliates. All rights reserved.
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * This code is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU General Public License version 2 only, as
+ * published by the Free Software Foundation. Oracle designates this
+ * particular file as subject to the "Classpath" exception as provided
+ * by Oracle in the LICENSE file that accompanied this code.
+ *
+ * This code is distributed in the hope that it will be useful, but WITHOUT
+ * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
+ * version 2 for more details (a copy is included in the LICENSE file that
+ * accompanied this code).
+ *
+ * You should have received a copy of the GNU General Public License version
+ * 2 along with this work; if not, write to the Free Software Foundation,
+ * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
+ *
+ * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
+ * or visit www.oracle.com if you need additional information or have any
+ * questions.
+ */
+
+/**
+ * Provides the API that defines the contract between the transaction manager
+ * and the resource manager, which allows the transaction manager to enlist
+ * and delist resource objects (supplied by the resource manager driver) in
+ * JTA transactions. The driver vendor for a specific resource manager provides
+ * the implementation of this API.
+ *
+ * @since 1.4
+ */
+
+package javax.transaction.xa;
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/src/java.transaction.xa/share/classes/module-info.java Mon Mar 05 13:11:21 2018 -0800
@@ -0,0 +1,36 @@
+/*
+ * Copyright (c) 2018, Oracle and/or its affiliates. All rights reserved.
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * This code is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU General Public License version 2 only, as
+ * published by the Free Software Foundation. Oracle designates this
+ * particular file as subject to the "Classpath" exception as provided
+ * by Oracle in the LICENSE file that accompanied this code.
+ *
+ * This code is distributed in the hope that it will be useful, but WITHOUT
+ * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
+ * version 2 for more details (a copy is included in the LICENSE file that
+ * accompanied this code).
+ *
+ * You should have received a copy of the GNU General Public License version
+ * 2 along with this work; if not, write to the Free Software Foundation,
+ * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
+ *
+ * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
+ * or visit www.oracle.com if you need additional information or have any
+ * questions.
+ */
+
+/**
+ * Defines an API for supporting distributed transactions in JDBC.
+ *
+ * @moduleGraph
+ * @since 11
+ */
+module java.transaction.xa {
+
+ exports javax.transaction.xa;
+
+}
--- a/test/jdk/ProblemList.txt Mon Mar 05 01:22:36 2018 +0000
+++ b/test/jdk/ProblemList.txt Mon Mar 05 13:11:21 2018 -0800
@@ -729,10 +729,6 @@
com/sun/jdi/NashornPopFrameTest.java 8187143 generic-all
-com/sun/jdi/EarlyReturnTest.java 8198803 generic-all
-com/sun/jdi/EarlyReturnNegativeTest.java 8198803 generic-all
-com/sun/jdi/MethodExitReturnValuesTest.java 8198803 generic-all
-
############################################################################
# jdk_time
--- a/test/jdk/TEST.groups Mon Mar 05 01:22:36 2018 +0000
+++ b/test/jdk/TEST.groups Mon Mar 05 13:11:21 2018 -0800
@@ -264,6 +264,7 @@
jdk_other = \
java/sql \
javax/sql \
+ javax/transaction \
javax/rmi \
javax/naming \
javax/script \
--- a/test/jdk/com/sun/jdi/EarlyReturnNegativeTest.java Mon Mar 05 01:22:36 2018 +0000
+++ b/test/jdk/com/sun/jdi/EarlyReturnNegativeTest.java Mon Mar 05 13:11:21 2018 -0800
@@ -77,8 +77,9 @@
public static ClassLoader classLoaderValue;
{
try {
- urls[0] = new URL("hi there");
- } catch (java.net.MalformedURLException ee) {
+ urls[0] = new URL("file:/foo");
+ } catch (java.net.MalformedURLException ex) {
+ throw new AssertionError(ex);
}
classLoaderValue = new URLClassLoader(urls);
}
--- a/test/jdk/com/sun/jdi/EarlyReturnTest.java Mon Mar 05 01:22:36 2018 +0000
+++ b/test/jdk/com/sun/jdi/EarlyReturnTest.java Mon Mar 05 13:11:21 2018 -0800
@@ -82,8 +82,9 @@
public static ClassLoader classLoaderValue;
{
try {
- urls[0] = new URL("hi there");
- } catch (java.net.MalformedURLException ee) {
+ urls[0] = new URL("file:/foo");
+ } catch (java.net.MalformedURLException ex) {
+ throw new AssertionError(ex);
}
classLoaderValue = new URLClassLoader(urls);
}
@@ -116,8 +117,9 @@
public static ClassLoader eclassLoaderValue;
{
try {
- urls[0] = new URL("been there, done that");
- } catch (java.net.MalformedURLException ee) {
+ urls[0] = new URL("file:/bar");
+ } catch (java.net.MalformedURLException ex) {
+ throw new AssertionError(ex);
}
classLoaderValue = new URLClassLoader(urls);
}
--- a/test/jdk/com/sun/jdi/MethodExitReturnValuesTest.java Mon Mar 05 01:22:36 2018 +0000
+++ b/test/jdk/com/sun/jdi/MethodExitReturnValuesTest.java Mon Mar 05 13:11:21 2018 -0800
@@ -66,8 +66,9 @@
public static ClassLoader classLoaderValue;
{
try {
- urls[0] = new URL("hi there");
- } catch (java.net.MalformedURLException ee) {
+ urls[0] = new URL("file:/foo");
+ } catch (java.net.MalformedURLException ex) {
+ throw new AssertionError(ex);
}
classLoaderValue = new URLClassLoader(urls);
}
--- a/test/jdk/com/sun/jndi/dns/AttributeTests/GetAny.java Mon Mar 05 01:22:36 2018 +0000
+++ b/test/jdk/com/sun/jndi/dns/AttributeTests/GetAny.java Mon Mar 05 13:11:21 2018 -0800
@@ -26,8 +26,7 @@
* @bug 8195976
* @summary Tests that we can get the attributes of a DNS entry using special
* qualifiers.
- * @modules java.xml.bind
- * java.base/sun.security.util
+ * @modules java.base/sun.security.util
* @library ../lib/
* @build DNSTestUtils DNSServer DNSTracer
* @run main GetAny
--- a/test/jdk/com/sun/jndi/dns/lib/DNSServer.java Mon Mar 05 01:22:36 2018 +0000
+++ b/test/jdk/com/sun/jndi/dns/lib/DNSServer.java Mon Mar 05 13:11:21 2018 -0800
@@ -23,7 +23,6 @@
import sun.security.util.HexDumpEncoder;
-import javax.xml.bind.DatatypeConverter;
import java.io.IOException;
import java.net.DatagramPacket;
import java.net.DatagramSocket;
@@ -196,7 +195,7 @@
* Add an DNS encoding to the cache (by request message key).
*/
private void addToCache(String hexString) {
- byte[] encoding = DatatypeConverter.parseHexBinary(hexString);
+ byte[] encoding = parseHexBinary(hexString);
if (encoding.length < DNS_HEADER_SIZE) {
throw new RuntimeException("Invalid DNS message : " + hexString);
}
@@ -261,4 +260,43 @@
return payload;
}
+
+ public static byte[] parseHexBinary(String s) {
+
+ final int len = s.length();
+
+ // "111" is not a valid hex encoding.
+ if (len % 2 != 0) {
+ throw new IllegalArgumentException(
+ "hexBinary needs to be even-length: " + s);
+ }
+
+ byte[] out = new byte[len / 2];
+
+ for (int i = 0; i < len; i += 2) {
+ int h = hexToBin(s.charAt(i));
+ int l = hexToBin(s.charAt(i + 1));
+ if (h == -1 || l == -1) {
+ throw new IllegalArgumentException(
+ "contains illegal character for hexBinary: " + s);
+ }
+
+ out[i / 2] = (byte) (h * 16 + l);
+ }
+
+ return out;
+ }
+
+ private static int hexToBin(char ch) {
+ if ('0' <= ch && ch <= '9') {
+ return ch - '0';
+ }
+ if ('A' <= ch && ch <= 'F') {
+ return ch - 'A' + 10;
+ }
+ if ('a' <= ch && ch <= 'f') {
+ return ch - 'a' + 10;
+ }
+ return -1;
+ }
}
--- a/test/jdk/com/sun/jndi/ldap/blits/AddTests/AddNewEntry.java Mon Mar 05 01:22:36 2018 +0000
+++ b/test/jdk/com/sun/jndi/ldap/blits/AddTests/AddNewEntry.java Mon Mar 05 13:11:21 2018 -0800
@@ -26,11 +26,10 @@
* @bug 8196770
* @summary Verify capability to add a new entry to the directory using the
* ADD operation.
- * @modules java.xml.bind
- * java.naming/com.sun.jndi.ldap
+ * @modules java.naming/com.sun.jndi.ldap
* @library ../../lib/ /javax/naming/module/src/test/test/
* @build LDAPServer LDAPTestUtils
- * @run main AddNewEntry
+ * @run main/othervm AddNewEntry
*/
import javax.naming.NamingEnumeration;
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/test/jdk/java/lang/CharSequence/Comparison.java Mon Mar 05 13:11:21 2018 -0800
@@ -0,0 +1,143 @@
+/*
+ * Copyright (c) 2018, Oracle and/or its affiliates. All rights reserved.
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * This code is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU General Public License version 2 only, as
+ * published by the Free Software Foundation.
+ *
+ * This code is distributed in the hope that it will be useful, but WITHOUT
+ * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
+ * version 2 for more details (a copy is included in the LICENSE file that
+ * accompanied this code).
+ *
+ * You should have received a copy of the GNU General Public License version
+ * 2 along with this work; if not, write to the Free Software Foundation,
+ * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
+ *
+ * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
+ * or visit www.oracle.com if you need additional information or have any
+ * questions.
+ */
+
+import java.nio.CharBuffer;
+import java.util.Iterator;
+import java.util.Set;
+import java.util.TreeSet;
+import org.testng.Assert;
+import org.testng.annotations.Test;
+
+/**
+ * @test
+ * @bug 8137326
+ * @summary Test to verify the compare method for the CharSequence class.
+ * @run testng Comparison
+ */
+public class Comparison {
+ static char SEP = ':';
+
+ static String[][] books = {
+ {"Biography", "Steve Jobs"},
+ {"Biography", "Elon Musk: Tesla, SpaceX, and the Quest for a Fantastic Future"},
+ {"Law", "Law 101: Everything You Need to Know About American Law, Fourth Edition"},
+ {"Law", "The Tools of Argument: How the Best Lawyers Think, Argue, and Win"},
+ {"History", "The History Book (Big Ideas Simply Explained)"},
+ {"History", "A People's History of the United States"},
+ };
+
+ /**
+ * Verifies the compare method by comparing StringBuilder objects with String
+ * objects.
+ */
+ @Test
+ public void compareWithString() {
+ Set<StringBuilder> sbSet = constructSBSet();
+ Set<String> sSet = constructStringSet();
+ Iterator<StringBuilder> iSB = sbSet.iterator();
+ Iterator<String> iS = sSet.iterator();
+ while (iSB.hasNext()) {
+ int result = CharSequence.compare(iSB.next(), iS.next());
+
+ Assert.assertTrue(result == 0, "Comparing item by item");
+ }
+ }
+
+ /**
+ * Verify comparison between two CharSequence implementations, including String,
+ * StringBuffer and StringBuilder.
+ *
+ * Note: CharBuffer states that "A char buffer is not comparable to any other type of object."
+ */
+ @Test
+ public void testCompare() {
+ StringBuilder sb1 = generateTestBuilder(65, 70, 97, 102);
+ StringBuilder sb2 = generateTestBuilder(65, 70, 97, 102);
+ StringBuilder sb3 = generateTestBuilder(65, 71, 97, 103);
+
+ Assert.assertTrue(CharSequence.compare(sb1, sb2) == 0, "Compare between StringBuilders");
+ Assert.assertFalse(CharSequence.compare(sb1, sb3) == 0, "Compare between StringBuilders");
+
+ Assert.assertTrue(CharSequence.compare(sb1, sb2.toString()) == 0, "Compare between a StringBuilder and String");
+ Assert.assertFalse(CharSequence.compare(sb1, sb3.toString()) == 0, "Compare between a StringBuilder and String");
+
+ StringBuffer buf1 = generateTestBuffer(65, 70, 97, 102);
+ StringBuffer buf2 = generateTestBuffer(65, 70, 97, 102);
+ StringBuffer buf3 = generateTestBuffer(65, 71, 97, 103);
+
+ Assert.assertTrue(CharSequence.compare(buf1, buf2) == 0, "Compare between StringBuffers");
+ Assert.assertFalse(CharSequence.compare(buf1, buf3) == 0, "Compare between StringBuffers");
+
+ Assert.assertTrue(CharSequence.compare(sb1, buf2) == 0, "Compare between a StringBuilder and StringBuffer");
+ Assert.assertFalse(CharSequence.compare(sb1, buf3) == 0, "Compare between a StringBuilder and StringBuffer");
+
+ CharSequence cs1 = (CharSequence)buf1;
+ CharSequence cs2 = (CharSequence)sb1;
+ @SuppressWarnings("unchecked")
+ int result = ((Comparable<Object>)cs1).compareTo(buf2);
+ Assert.assertTrue(result == 0, "Compare between a StringBuilder and StringBuffer");
+ }
+
+
+ private Set<String> constructStringSet() {
+ Set<String> sSet = new TreeSet<>();
+ for (String[] book : books) {
+ sSet.add(book[0] + SEP + book[1]);
+ }
+ return sSet;
+ }
+
+ private Set<StringBuilder> constructSBSet() {
+ Set<StringBuilder> sbSet = new TreeSet<>();
+ for (String[] book : books) {
+ sbSet.add(new StringBuilder(book[0]).append(SEP).append(book[1]));
+ }
+ return sbSet;
+ }
+
+ private static StringBuilder generateTestBuilder(int from1, int to1,
+ int from2, int to2) {
+ StringBuilder aBuffer = new StringBuilder(50);
+
+ for (int i = from1; i < to1; i++) {
+ aBuffer.append((char)i);
+ }
+ for (int i = from2; i < to2; i++) {
+ aBuffer.append((char)i);
+ }
+ return aBuffer;
+ }
+
+ private static StringBuffer generateTestBuffer(int from1, int to1,
+ int from2, int to2) {
+ StringBuffer aBuffer = new StringBuffer(50);
+
+ for (int i = from1; i < to1; i++) {
+ aBuffer.append((char)i);
+ }
+ for (int i = from2; i < to2; i++) {
+ aBuffer.append((char)i);
+ }
+ return aBuffer;
+ }
+}
--- a/test/jdk/java/lang/Character/Supplementary.java Mon Mar 05 01:22:36 2018 +0000
+++ b/test/jdk/java/lang/Character/Supplementary.java Mon Mar 05 13:11:21 2018 -0800
@@ -23,7 +23,7 @@
/*
* @test
- * @bug 4533872 4985214 4985217 5017268 5017280
+ * @bug 4533872 4985214 4985217 4993841 5017268 5017280
* @summary Unit tests for supplementary character support (JSR-204)
* @compile Supplementary.java
* @run main/timeout=600 Supplementary
@@ -59,6 +59,9 @@
test04(str);
test05(str);
+ // Test for toString(int)
+ test06();
+
// Test unpaired surrogates
testUnpaired();
@@ -454,6 +457,23 @@
checkNewIndex(a, 0, index, length);
}
+ /**
+ * Test toString(int)
+ *
+ * This test case assumes that Character.toChars()/String(char[]) work
+ * correctly.
+ */
+ static void test06() {
+ for (int cp = Character.MIN_CODE_POINT; cp <= Character.MAX_CODE_POINT; cp++) {
+ String result = Character.toString(cp);
+ String expected = new String(Character.toChars(cp));
+ if (!result.equals(expected)) {
+ throw new RuntimeException("Wrong string is created. code point: " +
+ cp + ", result: " + result + ", expected: " + expected);
+ }
+ }
+ }
+
private static void checkNewIndex(Object data, int offset, int result, int expected) {
String type = getType(data);
String offsetType = (offset > 0) ? "positive" : (offset < 0) ? "negative" : "0";
@@ -580,6 +600,7 @@
// Test toChar(int)
// toChar(int, char[], int)
+ // toString(int)
// for exceptions
static void testExceptions00() {
callToChars1(-1, IllegalArgumentException.class);
@@ -595,6 +616,9 @@
callToChars3(MIN_SUPPLEMENTARY, new char[1], 0, IndexOutOfBoundsException.class);
callToChars3(MIN_SUPPLEMENTARY, new char[2], -1, IndexOutOfBoundsException.class);
callToChars3(MIN_SUPPLEMENTARY, new char[2], 1, IndexOutOfBoundsException.class);
+
+ callToString(Character.MIN_CODE_POINT - 1, IllegalArgumentException.class);
+ callToString(Character.MAX_CODE_POINT + 1, IllegalArgumentException.class);
}
static final boolean At = true, Before = false;
@@ -834,6 +858,19 @@
+ expectedException.getName());
}
+ private static void callToString(int codePoint, Class expectedException) {
+ try {
+ String s = Character.toString(codePoint);
+ } catch (Exception e) {
+ if (expectedException.isInstance(e)) {
+ return;
+ }
+ throw new RuntimeException("Unspecified exception", e);
+ }
+ throw new RuntimeException("toString(int) didn't throw "
+ + expectedException.getName());
+ }
+
private static String getType(Object data) {
return (data instanceof CharSequence) ? "CharSequence" : "char[]";
}
--- a/test/jdk/java/lang/String/CompactString/CompareTo.java Mon Mar 05 01:22:36 2018 +0000
+++ b/test/jdk/java/lang/String/CompactString/CompareTo.java Mon Mar 05 13:11:21 2018 -0800
@@ -28,8 +28,9 @@
/*
* @test
- * @bug 8077559
- * @summary Tests Compact String. This one is for String.compareTo.
+ * @bug 8077559 8137326
+ * @summary Tests Compact String. Verifies the compareTo method for String,
+ * StringBuilder and StringBuffer.
* @run testng/othervm -XX:+CompactStrings CompareTo
* @run testng/othervm -XX:-CompactStrings CompareTo
*/
@@ -91,4 +92,46 @@
source));
});
}
+
+ /*
+ * Runs the same test with StringBuilder
+ */
+ @Test(dataProvider = "provider")
+ public void testStringBuilder(String str, String anotherString, int expected) {
+ StringBuilder another = new StringBuilder(anotherString);
+ map.get(str)
+ .forEach(
+ (source, data) -> {
+ StringBuilder sb = new StringBuilder(data);
+ assertEquals(
+ sb.compareTo(another),
+ expected,
+ String.format(
+ "testing StringBuilder(%s).compareTo(%s), source : %s, ",
+ escapeNonASCIIs(data),
+ escapeNonASCIIs(anotherString),
+ source));
+ });
+ }
+
+ /*
+ * Runs the same test with StringBuffer
+ */
+ @Test(dataProvider = "provider")
+ public void testStringBuffer(String str, String anotherString, int expected) {
+ StringBuffer another = new StringBuffer(anotherString);
+ map.get(str)
+ .forEach(
+ (source, data) -> {
+ StringBuffer sb = new StringBuffer(data);
+ assertEquals(
+ sb.compareTo(another),
+ expected,
+ String.format(
+ "testing StringBuffer(%s).compareTo(%s), source : %s, ",
+ escapeNonASCIIs(data),
+ escapeNonASCIIs(anotherString),
+ source));
+ });
+ }
}
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/test/jdk/java/lang/String/StringRepeat.java Mon Mar 05 13:11:21 2018 -0800
@@ -0,0 +1,133 @@
+/*
+ * Copyright (c) 2018, Oracle and/or its affiliates. All rights reserved.
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * This code is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU General Public License version 2 only, as
+ * published by the Free Software Foundation.
+ *
+ * This code is distributed in the hope that it will be useful, but WITHOUT
+ * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
+ * version 2 for more details (a copy is included in the LICENSE file that
+ * accompanied this code).
+ *
+ * You should have received a copy of the GNU General Public License version
+ * 2 along with this work; if not, write to the Free Software Foundation,
+ * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
+ *
+ * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
+ * or visit www.oracle.com if you need additional information or have any
+ * questions.
+ */
+
+/*
+ * @test
+ * @summary This exercises String#repeat patterns and limits.
+ * @run main/othervm -Xmx4G StringRepeat
+ */
+
+import java.nio.CharBuffer;
+
+public class StringRepeat {
+ public static void main(String... arg) {
+ test1();
+ test2();
+ }
+
+ /*
+ * Varitions of repeat count.
+ */
+ static int[] REPEATS = {
+ 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16,
+ 32, 64, 128, 256, 512, 1024, 64 * 1024, 1024 * 1024,
+ 16 * 1024 * 1024
+ };
+
+ /*
+ * Varitions of Strings.
+ */
+ static String[] STRINGS = new String[] {
+ "", "\0", " ", "a", "$", "\u2022",
+ "ab", "abc", "abcd", "abcde",
+ "The quick brown fox jumps over the lazy dog."
+ };
+
+ /*
+ * Repeat String function tests.
+ */
+ static void test1() {
+ for (int repeat : REPEATS) {
+ for (String string : STRINGS) {
+ long limit = (long)string.length() * (long)repeat;
+
+ if ((long)(Integer.MAX_VALUE >> 1) <= limit) {
+ break;
+ }
+
+ verify(string.repeat(repeat), string, repeat);
+ }
+ }
+ }
+
+ /*
+ * Repeat String exception tests.
+ */
+ static void test2() {
+ try {
+ "abc".repeat(-1);
+ throw new RuntimeException("No exception for negative repeat count");
+ } catch (IllegalArgumentException ex) {
+ // Correct
+ }
+
+ try {
+ "abc".repeat(Integer.MAX_VALUE - 1);
+ throw new RuntimeException("No exception for large repeat count");
+ } catch (OutOfMemoryError ex) {
+ // Correct
+ }
+ }
+
+ static String truncate(String string) {
+ if (string.length() < 80) {
+ return string;
+ }
+ return string.substring(0, 80) + "...";
+ }
+
+ /*
+ * Verify string repeat patterns.
+ */
+ static void verify(String result, String string, int repeat) {
+ if (string.isEmpty() || repeat == 0) {
+ if (!result.isEmpty()) {
+ System.err.format("\"%s\".repeat(%d)%n", truncate(string), repeat);
+ System.err.format("Result \"%s\"%n", truncate(result));
+ System.err.format("Result expected to be empty, found string of length %d%n", result.length());
+ throw new RuntimeException();
+ }
+ } else {
+ int expected = 0;
+ int count = 0;
+ for (int offset = result.indexOf(string, expected);
+ 0 <= offset;
+ offset = result.indexOf(string, expected)) {
+ count++;
+ if (offset != expected) {
+ System.err.format("\"%s\".repeat(%d)%n", truncate(string), repeat);
+ System.err.format("Result \"%s\"%n", truncate(result));
+ System.err.format("Repeat expected at %d, found at = %d%n", expected, offset);
+ throw new RuntimeException();
+ }
+ expected += string.length();
+ }
+ if (count != repeat) {
+ System.err.format("\"%s\".repeat(%d)%n", truncate(string), repeat);
+ System.err.format("Result \"%s\"%n", truncate(result));
+ System.err.format("Repeat count expected to be %d, found %d%n", repeat, count);
+ throw new RuntimeException();
+ }
+ }
+ }
+}
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/test/jdk/java/lang/StringBuffer/Comparison.java Mon Mar 05 13:11:21 2018 -0800
@@ -0,0 +1,136 @@
+/*
+ * Copyright (c) 2018, Oracle and/or its affiliates. All rights reserved.
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * This code is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU General Public License version 2 only, as
+ * published by the Free Software Foundation.
+ *
+ * This code is distributed in the hope that it will be useful, but WITHOUT
+ * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
+ * version 2 for more details (a copy is included in the LICENSE file that
+ * accompanied this code).
+ *
+ * You should have received a copy of the GNU General Public License version
+ * 2 along with this work; if not, write to the Free Software Foundation,
+ * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
+ *
+ * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
+ * or visit www.oracle.com if you need additional information or have any
+ * questions.
+ */
+
+import java.util.Iterator;
+import java.util.Set;
+import java.util.TreeSet;
+import org.testng.Assert;
+import org.testng.annotations.Test;
+
+/**
+ * @test
+ * @bug 8137326
+ * @summary Test to verify the Comparable implementation for the StringBuffer class.
+ * @run testng Comparison
+ */
+public class Comparison {
+ static char SEP = ':';
+
+ static String[][] books = {
+ {"Biography", "Steve Jobs"},
+ {"Biography", "Elon Musk: Tesla, SpaceX, and the Quest for a Fantastic Future"},
+ {"Law", "Law 101: Everything You Need to Know About American Law, Fourth Edition"},
+ {"Law", "The Tools of Argument: How the Best Lawyers Think, Argue, and Win"},
+ {"History", "The History Book (Big Ideas Simply Explained)"},
+ {"History", "A People's History of the United States"},
+ };
+
+ /**
+ * Verifies the Comparable implementation by comparing with two TreeSet that
+ * contain either StringBuffer or String.
+ */
+ @Test
+ public void compareWithString() {
+ Set<StringBuffer> sbSet = constructSBSet();
+ Set<String> sSet = constructStringSet();
+ Iterator<StringBuffer> iSB = sbSet.iterator();
+ Iterator<String> iS = sSet.iterator();
+ while (iSB.hasNext()) {
+ String temp1 = iSB.next().toString();
+ System.out.println(temp1);
+ String temp2 = iS.next();
+ System.out.println(temp2);
+
+ Assert.assertTrue(temp1.equals(temp2), "Comparing item by item");
+ }
+
+ }
+
+ /**
+ * Compares between StringBuffers
+ */
+ @Test
+ public void testCompare() {
+ StringBuffer sb1 = generateTestBuffer(65, 70, 97, 102);
+ StringBuffer sb2 = generateTestBuffer(65, 70, 97, 102);
+ StringBuffer sb3 = generateTestBuffer(65, 71, 97, 103);
+
+ System.out.println(sb1.toString());
+ System.out.println(sb2.toString());
+ System.out.println(sb3.toString());
+ Assert.assertTrue(sb1.compareTo(sb2) == 0, "Compare sb1 and sb2");
+ Assert.assertFalse(sb1.compareTo(sb3) == 0, "Compare sb1 and sb3");
+ }
+
+ /**
+ * Verifies that the comparison is from index 0 to length() - 1 of the two
+ * character sequences.
+ */
+ @Test
+ public void testModifiedSequence() {
+ StringBuffer sb1 = generateTestBuffer(65, 70, 97, 102);
+ StringBuffer sb2 = generateTestBuffer(65, 70, 98, 103);
+
+ // contain different character sequences
+ Assert.assertFalse(sb1.compareTo(sb2) == 0, "Compare the sequences before truncation");
+
+ // the first 5 characters however are the same
+ sb1.setLength(5);
+ sb2.setLength(5);
+
+ System.out.println(sb1.toString());
+ System.out.println(sb2.toString());
+
+ Assert.assertTrue(sb1.compareTo(sb2) == 0, "Compare sb1 and sb2");
+ Assert.assertTrue(sb1.toString().compareTo(sb2.toString()) == 0, "Compare strings of sb1 and sb2");
+ }
+
+ private Set<String> constructStringSet() {
+ Set<String> sSet = new TreeSet<>();
+ for (String[] book : books) {
+ sSet.add(book[0] + SEP + book[1]);
+ }
+ return sSet;
+ }
+
+ private Set<StringBuffer> constructSBSet() {
+ Set<StringBuffer> sbSet = new TreeSet<>();
+ for (String[] book : books) {
+ sbSet.add(new StringBuffer(book[0]).append(SEP).append(book[1]));
+ }
+ return sbSet;
+ }
+
+ private static StringBuffer generateTestBuffer(int from1, int to1,
+ int from2, int to2) {
+ StringBuffer aBuffer = new StringBuffer(50);
+
+ for (int i = from1; i < to1; i++) {
+ aBuffer.append((char)i);
+ }
+ for (int i = from2; i < to2; i++) {
+ aBuffer.append((char)i);
+ }
+ return aBuffer;
+ }
+}
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/test/jdk/java/lang/StringBuilder/Comparison.java Mon Mar 05 13:11:21 2018 -0800
@@ -0,0 +1,136 @@
+/*
+ * Copyright (c) 2018, Oracle and/or its affiliates. All rights reserved.
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * This code is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU General Public License version 2 only, as
+ * published by the Free Software Foundation.
+ *
+ * This code is distributed in the hope that it will be useful, but WITHOUT
+ * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
+ * version 2 for more details (a copy is included in the LICENSE file that
+ * accompanied this code).
+ *
+ * You should have received a copy of the GNU General Public License version
+ * 2 along with this work; if not, write to the Free Software Foundation,
+ * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
+ *
+ * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
+ * or visit www.oracle.com if you need additional information or have any
+ * questions.
+ */
+
+import java.util.Iterator;
+import java.util.Set;
+import java.util.TreeSet;
+import org.testng.Assert;
+import org.testng.annotations.Test;
+
+/**
+ * @test
+ * @bug 8137326
+ * @summary Test to verify the Comparable implementation for the StringBuilder class.
+ * @run testng Comparison
+ */
+public class Comparison {
+ static char SEP = ':';
+
+ static String[][] books = {
+ {"Biography", "Steve Jobs"},
+ {"Biography", "Elon Musk: Tesla, SpaceX, and the Quest for a Fantastic Future"},
+ {"Law", "Law 101: Everything You Need to Know About American Law, Fourth Edition"},
+ {"Law", "The Tools of Argument: How the Best Lawyers Think, Argue, and Win"},
+ {"History", "The History Book (Big Ideas Simply Explained)"},
+ {"History", "A People's History of the United States"},
+ };
+
+ /**
+ * Verifies the Comparable implementation by comparing with two TreeSet that
+ * contain either StringBuilder or String.
+ */
+ @Test
+ public void compareWithString() {
+ Set<StringBuilder> sbSet = constructSBSet();
+ Set<String> sSet = constructStringSet();
+ Iterator<StringBuilder> iSB = sbSet.iterator();
+ Iterator<String> iS = sSet.iterator();
+ while (iSB.hasNext()) {
+ String temp1 = iSB.next().toString();
+ System.out.println(temp1);
+ String temp2 = iS.next();
+ System.out.println(temp2);
+
+ Assert.assertTrue(temp1.equals(temp2), "Comparing item by item");
+ }
+
+ }
+
+ /**
+ * Compares between StringBuilders
+ */
+ @Test
+ public void testCompare() {
+ StringBuilder sb1 = generateTestBuffer(65, 70, 97, 102);
+ StringBuilder sb2 = generateTestBuffer(65, 70, 97, 102);
+ StringBuilder sb3 = generateTestBuffer(65, 71, 97, 103);
+
+ System.out.println(sb1.toString());
+ System.out.println(sb2.toString());
+ System.out.println(sb3.toString());
+ Assert.assertTrue(sb1.compareTo(sb2) == 0, "Compare sb1 and sb2");
+ Assert.assertFalse(sb1.compareTo(sb3) == 0, "Compare sb1 and sb3");
+ }
+
+ /**
+ * Verifies that the comparison is from index 0 to length() - 1 of the two
+ * character sequences.
+ */
+ @Test
+ public void testModifiedSequence() {
+ StringBuilder sb1 = generateTestBuffer(65, 70, 97, 102);
+ StringBuilder sb2 = generateTestBuffer(65, 70, 98, 103);
+
+ // contain different character sequences
+ Assert.assertFalse(sb1.compareTo(sb2) == 0, "Compare the sequences before truncation");
+
+ // the first 5 characters however are the same
+ sb1.setLength(5);
+ sb2.setLength(5);
+
+ System.out.println(sb1.toString());
+ System.out.println(sb2.toString());
+
+ Assert.assertTrue(sb1.compareTo(sb2) == 0, "Compare sb1 and sb2");
+ Assert.assertTrue(sb1.toString().compareTo(sb2.toString()) == 0, "Compare strings of sb1 and sb2");
+ }
+
+ private Set<String> constructStringSet() {
+ Set<String> sSet = new TreeSet<>();
+ for (String[] book : books) {
+ sSet.add(book[0] + SEP + book[1]);
+ }
+ return sSet;
+ }
+
+ private Set<StringBuilder> constructSBSet() {
+ Set<StringBuilder> sbSet = new TreeSet<>();
+ for (String[] book : books) {
+ sbSet.add(new StringBuilder(book[0]).append(SEP).append(book[1]));
+ }
+ return sbSet;
+ }
+
+ private static StringBuilder generateTestBuffer(int from1, int to1,
+ int from2, int to2) {
+ StringBuilder aBuffer = new StringBuilder(50);
+
+ for (int i = from1; i < to1; i++) {
+ aBuffer.append((char)i);
+ }
+ for (int i = from2; i < to2; i++) {
+ aBuffer.append((char)i);
+ }
+ return aBuffer;
+ }
+}
--- a/test/jdk/java/net/URLClassLoader/NullURLTest.java Mon Mar 05 01:22:36 2018 +0000
+++ b/test/jdk/java/net/URLClassLoader/NullURLTest.java Mon Mar 05 13:11:21 2018 -0800
@@ -71,14 +71,14 @@
} catch (NullPointerException e) {
// expected
}
- // This section should be uncommented if 8026517 is fixed.
-// try {
-// loader = new URLClassLoader(invalidURLArray);
-// System.err.println("URLClassLoader(invalidURLArray) did not throw NPE");
-// failures++;
-// } catch (NullPointerException e) {
-// // expected
-// }
+
+ try {
+ loader = new URLClassLoader(invalidURLArray);
+ System.err.println("URLClassLoader(invalidURLArray) did not throw NPE");
+ failures++;
+ } catch (NullPointerException e) {
+ // expected
+ }
try {
loader = new URLClassLoader(validURLArray, null);
@@ -93,14 +93,14 @@
} catch (NullPointerException e) {
// expected
}
- // This section should be uncommented if 8026517 is fixed.
-// try {
-// loader = new URLClassLoader(invalidURLArray, null);
-// System.err.println("URLClassLoader(invalidURLArray, null) did not throw NPE");
-// failures++;
-// } catch (NullPointerException e) {
-// // expected
-// }
+
+ try {
+ loader = new URLClassLoader(invalidURLArray, null);
+ System.err.println("URLClassLoader(invalidURLArray, null) did not throw NPE");
+ failures++;
+ } catch (NullPointerException e) {
+ // expected
+ }
try {
loader = new URLClassLoader(validURLArray, null, null);
@@ -115,14 +115,14 @@
} catch (NullPointerException e) {
// expected
}
- // This section should be uncommented if 8026517 is fixed.
-// try {
-// loader = new URLClassLoader(invalidURLArray, null, null);
-// System.err.println("URLClassLoader(invalidURLArray, null, null) did not throw NPE");
-// failures++;
-// } catch (NullPointerException e) {
-// // expected
-// }
+
+ try {
+ loader = new URLClassLoader(invalidURLArray, null, null);
+ System.err.println("URLClassLoader(invalidURLArray, null, null) did not throw NPE");
+ failures++;
+ } catch (NullPointerException e) {
+ // expected
+ }
try {
loader = URLClassLoader.newInstance(validURLArray);
@@ -137,14 +137,14 @@
} catch (NullPointerException e) {
// expected
}
- // This section should be uncommented if 8026517 is fixed.
-// try {
-// loader = URLClassLoader.newInstance(invalidURLArray);
-// System.err.println("URLClassLoader.newInstance(invalidURLArray) did not throw NPE");
-// failures++;
-// } catch (NullPointerException e) {
-// // expected
-// }
+
+ try {
+ loader = URLClassLoader.newInstance(invalidURLArray);
+ System.err.println("URLClassLoader.newInstance(invalidURLArray) did not throw NPE");
+ failures++;
+ } catch (NullPointerException e) {
+ // expected
+ }
try {
loader = URLClassLoader.newInstance(validURLArray, null);
@@ -159,14 +159,14 @@
} catch (NullPointerException e) {
// expected
}
- // This section should be uncommented if 8026517 is fixed.
-// try {
-// loader = URLClassLoader.newInstance(invalidURLArray, null);
-// System.err.println("URLClassLoader.newInstance(invalidURLArray, null) did not throw NPE");
-// failures++;
-// } catch (NullPointerException e) {
-// // expected
-// }
+
+ try {
+ loader = URLClassLoader.newInstance(invalidURLArray, null);
+ System.err.println("URLClassLoader.newInstance(invalidURLArray, null) did not throw NPE");
+ failures++;
+ } catch (NullPointerException e) {
+ // expected
+ }
if (failures != 0) {
throw new Exception("URLClassLoader NullURLTest had "+failures+" failures!");
--- a/test/jdk/java/nio/channels/spi/SelectorProvider/inheritedChannel/InheritedChannelTest.java Mon Mar 05 01:22:36 2018 +0000
+++ b/test/jdk/java/nio/channels/spi/SelectorProvider/inheritedChannel/InheritedChannelTest.java Mon Mar 05 13:11:21 2018 -0800
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2017, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2017, 2018 Oracle and/or its affiliates. All rights reserved.
* 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,7 +34,7 @@
* jdk.test.lib.Platform
* jdk.test.lib.process.*
* StateTest StateTestService EchoTest EchoService CloseTest Launcher Util
- * @run testng/othervm InheritedChannelTest
+ * @run testng/othervm/native InheritedChannelTest
* @key intermittent
*/
@@ -68,9 +68,7 @@
private static final String OS_ARCH = ARCH.equals("i386") ? "i586" : ARCH;
private static final Path LD_LIBRARY_PATH
- = Paths.get(TEST_SRC, "lib", OS_NAME + "-" + OS_ARCH);
-
- private static final Path LAUNCHERLIB = LD_LIBRARY_PATH.resolve("libLauncher.so");
+ = Paths.get(System.getProperty("java.library.path"));
@DataProvider
public Object[][] testCases() {
@@ -99,11 +97,6 @@
@Test(dataProvider = "testCases")
public void test(String desc, List<String> opts) throws Throwable {
- if (!Files.exists(LAUNCHERLIB)) {
- System.out.println("Cannot find " + LAUNCHERLIB
- + " - library not available for this system");
- return;
- }
System.out.println("LD_LIBRARY_PATH=" + LD_LIBRARY_PATH);
List<String> args = new ArrayList<>();
--- a/test/jdk/java/nio/channels/spi/SelectorProvider/inheritedChannel/Launcher.c Mon Mar 05 01:22:36 2018 +0000
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,165 +0,0 @@
-/*
- *
- *
- * A simple launcher to launch a program as if it was launched by inetd.
- */
-#include <stdio.h>
-#include <stdlib.h>
-#include <sys/types.h>
-#include <sys/socket.h>
-#include <unistd.h>
-#include <dirent.h>
-#include <sys/stat.h>
-#include <fcntl.h>
-#include <ctype.h>
-
-#include "jni.h"
-
-#include "Launcher.h"
-
-/*
- * Throws the exception of the given class name and detail message
- */
-static void ThrowException(JNIEnv *env, const char *name, const char *msg) {
- jclass cls = (*env)->FindClass(env, name);
- if (cls != NULL) {
- (*env)->ThrowNew(env, cls, msg);
- }
-}
-
-/*
- * Convert a jstring to an ISO 8859_1 encoded C string
- */
-static char* getString8859_1Chars(JNIEnv *env, jstring jstr) {
- int i;
- char *result;
- jint len = (*env)->GetStringLength(env, jstr);
- const jchar *str = (*env)->GetStringCritical(env, jstr, 0);
- if (str == 0) {
- return NULL;
- }
-
- result = (char*)malloc(len+1);
- if (result == 0) {
- (*env)->ReleaseStringCritical(env, jstr, str);
- ThrowException(env, "java/lang/OutOfMemoryError", NULL);
- return NULL;
- }
-
- for (i=0; i<len; i++) {
- jchar unicode = str[i];
- if (unicode <= 0x00ff)
- result[i] = unicode;
- else
- result[i] = '?';
- }
-
- result[len] = 0;
- (*env)->ReleaseStringCritical(env, jstr, str);
- return result;
-}
-
-
-/*
- * Class: Launcher
- * Method: launch0
- * Signature: ([Ljava/lang/String;I)V
- */
-JNIEXPORT void JNICALL Java_Launcher_launch0
- (JNIEnv *env, jclass cls, jobjectArray cmdarray, jint serviceFd)
-{
- pid_t pid;
- DIR* dp;
- struct dirent* dirp;
- int thisFd;
- char** cmdv;
- int i, cmdlen;
-
- /*
- * Argument 0 of the command array is the program name.
- * Here we just extract the program name and any arguments into
- * a command array suitable for use with execvp.
- */
- cmdlen = (*env)->GetArrayLength(env, cmdarray);
- if (cmdlen == 0) {
- ThrowException(env, "java/lang/IllegalArgumentException",
- "command array must at least include the program name");
- return;
- }
- cmdv = (char **)malloc((cmdlen + 1) * sizeof(char *));
- if (cmdv == NULL) {
- ThrowException(env, "java/lang/OutOfMemoryError", NULL);
- return;
- }
-
- for (i=0; i<cmdlen; i++) {
- jstring str = (*env)->GetObjectArrayElement(env, cmdarray, i);
- cmdv[i] = (char *) getString8859_1Chars(env, str);
- if (cmdv[i] == NULL) {
- return;
- }
- }
-
- /*
- * Command array must have NULL as the last entry
- */
- cmdv[cmdlen] = NULL;
-
- /*
- * Launch the program. As this isn't a complete inetd or Runtime.exec
- * implementation we don't have a reaper to pick up child exit status.
- */
-#ifdef __solaris__
- pid = fork1();
-#else
- pid = fork();
-#endif
- if (pid != 0) {
- if (pid < 0) {
- ThrowException(env, "java/io/IOException", "fork failed");
- }
- return;
- }
-
- /*
- * We need to close all file descriptors except for serviceFd. To
- * get the list of open file descriptos we read through /proc/self/fd
- * but to open this requires a file descriptor. We could use a specific
- * file descriptor and fdopendir but Linux doesn't seem to support
- * fdopendir. Instead we use opendir and make an assumption on the
- * file descriptor that is used (by opening & closing a file).
- */
- thisFd = open("/dev/null", O_RDONLY);
- if (thisFd < 0) {
- _exit(-1);
- }
- close(thisFd);
-
- if ((dp = opendir("/proc/self/fd")) == NULL) {
- _exit(-1);
- }
-
- while ((dirp = readdir(dp)) != NULL) {
- if (isdigit(dirp->d_name[0])) {
- int fd = strtol(dirp->d_name, NULL, 10);
- if (fd != serviceFd && fd != thisFd) {
- close(fd);
- }
- }
- }
- closedir(dp);
-
- /*
- * At this point all file descriptors are closed except for
- * serviceFd. We not dup 0,1,2 to this file descriptor and
- * close serviceFd. This should leave us with only 0,1,2
- * open and all connected to the same socket.
- */
- dup2(serviceFd, STDIN_FILENO);
- dup2(serviceFd, STDOUT_FILENO);
- dup2(serviceFd, STDERR_FILENO);
- close(serviceFd);
-
- execvp(cmdv[0], cmdv);
- _exit(-1);
-}
--- a/test/jdk/java/nio/channels/spi/SelectorProvider/inheritedChannel/Launcher.java Mon Mar 05 01:22:36 2018 +0000
+++ b/test/jdk/java/nio/channels/spi/SelectorProvider/inheritedChannel/Launcher.java Mon Mar 05 13:11:21 2018 -0800
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2003, 2017, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2003, 2018, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
@@ -35,7 +35,7 @@
public class Launcher {
static {
- System.loadLibrary("Launcher");
+ System.loadLibrary("InheritedChannel");
}
private static native void launch0(String cmdarray[], int fd) throws IOException;
--- a/test/jdk/java/nio/channels/spi/SelectorProvider/inheritedChannel/Makefile Mon Mar 05 01:22:36 2018 +0000
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,79 +0,0 @@
-#
-#
-# Makefile for building libLauncher.so
-#
-# To build libLauncher.so requires :-
-# JAVA_HOME environment variable
-# cc (Solaris) or gcc (Linux) on PATH
-#
-# The library is created in a architecture specific directory :-
-#
-# lib/solaris-sparc/libLauncher.so (Solaris/SPARC)
-# lib/solaris-i586/libLauncher.so (Solaris/x86)
-# lib/linux-i586/libLauncher.so (Linux/x86)
-
-ECHO = echo
-MKDIR = mkdir
-UNAME = uname
-
-uname := $(shell uname)
-
-ifeq ($(uname), SunOS)
- PLATFORM = solaris
- ISAINFO = isainfo
- ARCH_DATA_MODEL=64
- ARCH := $(shell $(ISAINFO) -n)
- CC = cc
- LD = ld
- CFLAGS = -D_REENTRANT -D__solaris__
- LDFLAGS_COMMON = -G
- EXTRA_LIBS = -lc
- CC += -m64 -Kpic
-endif
-
-ifeq ($(uname), Linux)
- PLATFORM = linux
- archExpr = case "`$(UNAME) -m`" in \
- i[3-6]86) \
- $(ECHO) i586 \
- ;; \
- sparc*) \
- $(ECHO) sparc \
- ;; \
- *) \
- $(UNAME) -m \
- ;; \
- esac
- ARCH := $(shell $(archExpr) )
- CC = gcc
- CFLAGS = -fno-strict-aliasing -fPIC -W -Wall
- LD = ld
- LDFLAGS_COMMON = -shared
- EXTRA_LIBS = -lc
-endif
-
-LIBDIR=lib/$(PLATFORM)-$(ARCH)
-LAUNCHERLIB=$(LIBDIR)/libLauncher.so
-
-all: java_home $(LAUNCHERLIB)
-
-$(LAUNCHERLIB) : $(LIBDIR) $(LIBDIR)/Launcher.o
- $(LD) $(LDFLAGS_COMMON) -o $(LAUNCHERLIB) $(LIBDIR)/Launcher.o $(EXTRA_LIBS)
-
-$(LIBDIR):
- @$(MKDIR) -p $(LIBDIR)
-
-$(LIBDIR)/Launcher.o : Launcher.c \
- Launcher.h
- $(CC) -c $(CFLAGS) -o $(LIBDIR)/Launcher.o \
- -I$(JAVA_HOME)/include -I$(JAVA_HOME)/include/$(PLATFORM) Launcher.c
-
-Launcher.class Launcher.h : Launcher.java
- $(JAVA_HOME)/bin/javac -h . Launcher.java
-
-java_home:
-ifndef JAVA_HOME
- @$(ECHO) "ERROR: Your JAVA_HOME environment variable is not set."
- exit 1
-endif
-
--- a/test/jdk/java/nio/channels/spi/SelectorProvider/inheritedChannel/README Mon Mar 05 01:22:36 2018 +0000
+++ b/test/jdk/java/nio/channels/spi/SelectorProvider/inheritedChannel/README Mon Mar 05 13:11:21 2018 -0800
@@ -1,33 +1,16 @@
-
The unit tests in this directory depend on a native launcher library
-(libLauncher.so). This native library is built off-line and the
-resulting libLauncher.so for each processor/OS combination is checked
-into the workspace. The reason for this is because the test environment
-may not have the required compilers/build environment.
+(libInheritedChannel.so). This library is built by executing
-In order to rebuild libLauncher.so the following is required :-
-
-1. Check-out each of the shared libraries (sccs edit)
+$ make test-image-jdk-jtreg-native
-2. Edit Launcher.c with the appropriate changes
-
-3. Execute the make script (gnumake all) on each processor/OS so
-that the appropriate lib/<platform>/libLauncher.so is built.
+in the root directory of the OpenJDK clone. It will generate
+libInheritedChannel.so in two locations:
-4. Test the changes
-
-5. Check-in each of the shared library (sccs delget)
-
-
-For step 4 (re-building libLauncher.so) the following environment is required:
+$ $JDK_ROOT/build/$PLATFORM/support/test/jdk/jtreg/native/lib/libInheritedChannel.so
+$ $JDK_ROOT/build/$PLATFORM/images/test/jdk/jtreg/native/libInheritedChannel.so
-(a) JAVA_HOME needs to be set to J2SE directory, eg:-
- export JAVA_HOME=/usr/local/java/jdk1.5/solaris-sparc
+The test may then be run using jtreg for example as follows:
-(b) For Solaris the SOS8 'cc' needs to be on the PATH, check using:
- # cc -V
- cc: Sun C 5.5 2003/03/12
-
-(c) Execute the make script :-
- Solaris: gnumake all
- Linux: gmake all
+$ jtreg -s -w:/tmp -r:/tmp -va -dir:$JDK_ROOT/test/jdk \
+-nativepath:$JDK_ROOT/build/$PLATFORM/support/test/jdk/jtreg/native/lib \
+java/nio/channels/spi/SelectorProvider/inheritedChannel/InheritedChannelTest.java
Binary file test/jdk/java/nio/channels/spi/SelectorProvider/inheritedChannel/lib/linux-i586/libLauncher.so has changed
Binary file test/jdk/java/nio/channels/spi/SelectorProvider/inheritedChannel/lib/solaris-amd64/libLauncher.so has changed
Binary file test/jdk/java/nio/channels/spi/SelectorProvider/inheritedChannel/lib/solaris-sparcv9/libLauncher.so has changed
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/test/jdk/java/nio/channels/spi/SelectorProvider/inheritedChannel/libInheritedChannel.c Mon Mar 05 13:11:21 2018 -0800
@@ -0,0 +1,184 @@
+/*
+ * Copyright (c) 2003, 2018, Oracle and/or its affiliates. All rights reserved.
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * This code is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU General Public License version 2 only, as
+ * published by the Free Software Foundation.
+ *
+ * This code is distributed in the hope that it will be useful, but WITHOUT
+ * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
+ * version 2 for more details (a copy is included in the LICENSE file that
+ * accompanied this code).
+ *
+ * You should have received a copy of the GNU General Public License version
+ * 2 along with this work; if not, write to the Free Software Foundation,
+ * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
+ *
+ * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
+ * or visit www.oracle.com if you need additional information or have any
+ * questions.
+ */
+
+/*
+ * A simple launcher to launch a program as if it was launched by inetd.
+ */
+#include <stdio.h>
+#include <stdlib.h>
+#include <sys/types.h>
+#include <sys/socket.h>
+#include <unistd.h>
+#include <dirent.h>
+#include <sys/stat.h>
+#include <fcntl.h>
+#include <ctype.h>
+
+#include "jni.h"
+
+/*
+ * Throws the exception of the given class name and detail message
+ */
+static void ThrowException(JNIEnv *env, const char *name, const char *msg) {
+ jclass cls = (*env)->FindClass(env, name);
+ if (cls != NULL) {
+ (*env)->ThrowNew(env, cls, msg);
+ }
+}
+
+/*
+ * Convert a jstring to an ISO 8859_1 encoded C string
+ */
+static char* getString8859_1Chars(JNIEnv *env, jstring jstr) {
+ int i;
+ char *result;
+ jint len = (*env)->GetStringLength(env, jstr);
+ const jchar *str = (*env)->GetStringCritical(env, jstr, 0);
+ if (str == 0) {
+ return NULL;
+ }
+
+ result = (char*)malloc(len+1);
+ if (result == 0) {
+ (*env)->ReleaseStringCritical(env, jstr, str);
+ ThrowException(env, "java/lang/OutOfMemoryError", NULL);
+ return NULL;
+ }
+
+ for (i=0; i<len; i++) {
+ jchar unicode = str[i];
+ if (unicode <= 0x00ff)
+ result[i] = unicode;
+ else
+ result[i] = '?';
+ }
+
+ result[len] = 0;
+ (*env)->ReleaseStringCritical(env, jstr, str);
+ return result;
+}
+
+
+/*
+ * Class: Launcher
+ * Method: launch0
+ * Signature: ([Ljava/lang/String;I)V
+ */
+JNIEXPORT void JNICALL Java_Launcher_launch0
+ (JNIEnv *env, jclass cls, jobjectArray cmdarray, jint serviceFd)
+{
+ pid_t pid;
+ DIR* dp;
+ struct dirent* dirp;
+ int thisFd;
+ char** cmdv;
+ int i, cmdlen;
+
+ /*
+ * Argument 0 of the command array is the program name.
+ * Here we just extract the program name and any arguments into
+ * a command array suitable for use with execvp.
+ */
+ cmdlen = (*env)->GetArrayLength(env, cmdarray);
+ if (cmdlen == 0) {
+ ThrowException(env, "java/lang/IllegalArgumentException",
+ "command array must at least include the program name");
+ return;
+ }
+ cmdv = (char **)malloc((cmdlen + 1) * sizeof(char *));
+ if (cmdv == NULL) {
+ ThrowException(env, "java/lang/OutOfMemoryError", NULL);
+ return;
+ }
+
+ for (i=0; i<cmdlen; i++) {
+ jstring str = (*env)->GetObjectArrayElement(env, cmdarray, i);
+ cmdv[i] = (char *) getString8859_1Chars(env, str);
+ if (cmdv[i] == NULL) {
+ return;
+ }
+ }
+
+ /*
+ * Command array must have NULL as the last entry
+ */
+ cmdv[cmdlen] = NULL;
+
+ /*
+ * Launch the program. As this isn't a complete inetd or Runtime.exec
+ * implementation we don't have a reaper to pick up child exit status.
+ */
+#ifdef __solaris__
+ pid = fork1();
+#else
+ pid = fork();
+#endif
+ if (pid != 0) {
+ if (pid < 0) {
+ ThrowException(env, "java/io/IOException", "fork failed");
+ }
+ return;
+ }
+
+ /*
+ * We need to close all file descriptors except for serviceFd. To
+ * get the list of open file descriptos we read through /proc/self/fd
+ * but to open this requires a file descriptor. We could use a specific
+ * file descriptor and fdopendir but Linux doesn't seem to support
+ * fdopendir. Instead we use opendir and make an assumption on the
+ * file descriptor that is used (by opening & closing a file).
+ */
+ thisFd = open("/dev/null", O_RDONLY);
+ if (thisFd < 0) {
+ _exit(-1);
+ }
+ close(thisFd);
+
+ if ((dp = opendir("/proc/self/fd")) == NULL) {
+ _exit(-1);
+ }
+
+ while ((dirp = readdir(dp)) != NULL) {
+ if (isdigit(dirp->d_name[0])) {
+ int fd = strtol(dirp->d_name, NULL, 10);
+ if (fd != serviceFd && fd != thisFd) {
+ close(fd);
+ }
+ }
+ }
+ closedir(dp);
+
+ /*
+ * At this point all file descriptors are closed except for
+ * serviceFd. We not dup 0,1,2 to this file descriptor and
+ * close serviceFd. This should leave us with only 0,1,2
+ * open and all connected to the same socket.
+ */
+ dup2(serviceFd, STDIN_FILENO);
+ dup2(serviceFd, STDOUT_FILENO);
+ dup2(serviceFd, STDERR_FILENO);
+ close(serviceFd);
+
+ execvp(cmdv[0], cmdv);
+ _exit(-1);
+}
--- a/test/jdk/java/text/Normalizer/NormalizerAPITest.java Mon Mar 05 01:22:36 2018 +0000
+++ b/test/jdk/java/text/Normalizer/NormalizerAPITest.java Mon Mar 05 13:11:21 2018 -0800
@@ -78,7 +78,7 @@
/*
* Check if normalize(null) throws NullPointerException as expected.
*/
- void Test_NullPointerException_java_normalize() {
+ public void Test_NullPointerException_java_normalize() {
boolean error = false;
/* Check null as String to be normalized */
@@ -107,7 +107,7 @@
/*
* Check if normalize(null) throws NullPointerException as expected.
*/
- void Test_NullPointerException_sun_normalize() {
+ public void Test_NullPointerException_sun_normalize() {
boolean error = false;
for (int j = 0; j < options.length; j++) {
@@ -138,7 +138,7 @@
/*
* Check if isNormalized(null) throws NullPointerException as expected.
*/
- void Test_NullPointerException_java_isNormalized() {
+ public void Test_NullPointerException_java_isNormalized() {
boolean error = false;
for (int i = 0; i < forms.length; i++) {
@@ -167,7 +167,7 @@
/*
* Check if isNormalized(null) throws NullPointerException as expected.
*/
- void Test_NullPointerException_sun_isNormalized() {
+ public void Test_NullPointerException_sun_isNormalized() {
boolean error = false;
for (int j = 0; j < options.length; j++) {
@@ -199,7 +199,7 @@
* Check if isNormalized("") doesn't throw NullPointerException and returns
* "" as expected.
*/
- void Test_No_NullPointerException_java_normalize() {
+ public void Test_No_NullPointerException_java_normalize() {
boolean error = false;
for (int i = 0; i < forms.length; i++) {
@@ -223,7 +223,7 @@
* Check if isNormalized("") doesn't throw NullPointerException and returns
* "" as expected.
*/
- void Test_No_NullPointerException_sun_normalize() {
+ public void Test_No_NullPointerException_sun_normalize() {
boolean error = false;
for (int j = 0; j < options.length; j++) {
@@ -248,7 +248,7 @@
* Check if isNormalized("") doesn't throw NullPointerException and returns
* "" as expected.
*/
- void Test_No_NullPointerException_java_isNormalized() {
+ public void Test_No_NullPointerException_java_isNormalized() {
boolean error = false;
for (int i = 0; i < forms.length; i++) {
@@ -271,7 +271,7 @@
* Check if isNormalized("") doesn't throw NullPointerException and returns
* "" as expected.
*/
- void Test_No_NullPointerException_sun_isNormalized() {
+ public void Test_No_NullPointerException_sun_isNormalized() {
boolean error = false;
for (int j = 0; j < options.length; j++) {
@@ -296,7 +296,7 @@
* Check if normalize() and isNormalized() work as expected for every
* known class which implement CharSequence Interface.
*/
- void Test_CharSequence() {
+ public void Test_CharSequence() {
check_CharSequence(String.valueOf(inputData),
String.valueOf(outputData));
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/test/jdk/java/util/jar/Manifest/LineBreakLineWidth.java Mon Mar 05 13:11:21 2018 -0800
@@ -0,0 +1,284 @@
+/*
+ * Copyright (c) 2018, Oracle and/or its affiliates. All rights reserved.
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * This code is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU General Public License version 2 only, as
+ * published by the Free Software Foundation.
+ *
+ * This code is distributed in the hope that it will be useful, but WITHOUT
+ * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
+ * version 2 for more details (a copy is included in the LICENSE file that
+ * accompanied this code).
+ *
+ * You should have received a copy of the GNU General Public License version
+ * 2 along with this work; if not, write to the Free Software Foundation,
+ * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
+ *
+ * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
+ * or visit www.oracle.com if you need additional information or have any
+ * questions.
+ */
+
+import static java.nio.charset.StandardCharsets.UTF_8;
+
+import java.io.ByteArrayInputStream;
+import java.io.ByteArrayOutputStream;
+import java.io.IOException;
+import java.util.jar.Manifest;
+import java.util.jar.Attributes;
+import java.util.jar.Attributes.Name;
+
+import org.testng.annotations.Test;
+import static org.testng.Assert.*;
+
+/**
+ * @test
+ * @bug 6372077
+ * @run testng LineBreakLineWidth
+ * @summary write valid manifests with respect to line breaks
+ * and read any line width
+ */
+public class LineBreakLineWidth {
+
+ /**
+ * maximum header name length from {@link Name#isValid(String)}
+ * not including the name-value delimiter <code>": "</code>
+ */
+ final static int MAX_HEADER_NAME_LENGTH = 70;
+
+ /**
+ * range of one..{@link #TEST_WIDTH_RANGE} covered in this test that
+ * exceeds the range of allowed header name lengths or line widths
+ * in order to also cover invalid cases beyond the valid boundaries
+ * and to keep it somewhat independent from the actual manifest width.
+ * <p>
+ * bigger than 72 (maximum manifest header line with in bytes (not utf-8
+ * encoded characters) but otherwise arbitrarily chosen
+ */
+ final static int TEST_WIDTH_RANGE = 123;
+
+ /**
+ * tests if only valid manifest files can written depending on the header
+ * name length or that an exception occurs already on the attempt to write
+ * an invalid one otherwise and that no invalid manifest can be written.
+ * <p>
+ * due to bug JDK-6372077 it was possible to write a manifest that could
+ * not be read again. independent of the actual manifest line width, such
+ * a situation should never happen, which is the subject of this test.
+ */
+ @Test
+ public void testWriteValidManifestOrException() throws IOException {
+ /*
+ * multi-byte utf-8 characters cannot occur in header names,
+ * only in values which are not subject of this test here.
+ * hence, each character in a header name uses exactly one byte and
+ * variable length utf-8 character encoding doesn't affect this test.
+ */
+
+ String name = "";
+ for (int l = 1; l <= TEST_WIDTH_RANGE; l++) {
+ name += "x";
+ System.out.println("name = " + name + ", "
+ + "name.length = " + name.length());
+
+ if (l <= MAX_HEADER_NAME_LENGTH) {
+ writeValidManifest(name, "somevalue");
+ } else {
+ writeInvalidManifestThrowsException(name, "somevalue");
+ }
+ }
+ }
+
+ static void writeValidManifest(String name, String value)
+ throws IOException {
+ byte[] mfBytes = writeManifest(name, value);
+ Manifest mf = new Manifest(new ByteArrayInputStream(mfBytes));
+ assertMainAndSectionValues(mf, name, value);
+ }
+
+ static void writeInvalidManifestThrowsException(String name, String value)
+ throws IOException {
+ try {
+ writeManifest(name, value);
+ } catch (IllegalArgumentException e) {
+ // no invalid manifest was produced which is considered acceptable
+ return;
+ }
+
+ fail("no error writing manifest considered invalid");
+ }
+
+ /**
+ * tests that manifest files can be read even if the line breaks are
+ * placed in different positions than where the current JDK's
+ * {@link Manifest#write(java.io.OutputStream)} would have put it provided
+ * the manifest is valid otherwise.
+ * <p>
+ * the <a href="{@docRoot}/../specs/jar/jar.html#Notes_on_Manifest_and_Signature_Files">
+ * "Notes on Manifest and Signature Files" in the "JAR File
+ * Specification"</a> state that "no line may be longer than 72 bytes
+ * (not characters), in its utf8-encoded form." but allows for earlier or
+ * additional line breaks.
+ * <p>
+ * the most important purpose of this test case is probably to make sure
+ * that manifest files broken at 70 bytes line width written with the
+ * previous version of {@link Manifest} before this fix still work well.
+ */
+ @Test
+ public void testReadDifferentLineWidths() throws IOException {
+ /*
+ * uses only one-byte utf-8 encoded characters as values.
+ * correctly breaking multi-byte utf-8 encoded characters
+ * would be subject of another test if there was one such.
+ */
+
+ // w: line width
+ // 6 minimum required for section names starting with "Name: "
+ for (int w = 6; w <= TEST_WIDTH_RANGE; w++) {
+
+ // ln: header name length
+ String name = "";
+ // - 2 due to the delimiter ": " that has to fit on the same
+ // line as the name
+ for (int ln = 1; ln <= w - 2; ln++) {
+ name += "x";
+
+ // lv: value length
+ String value = "";
+ for (int lv = 1; lv <= TEST_WIDTH_RANGE; lv++) {
+ value += "y";
+ }
+
+ System.out.println("lineWidth = " + w);
+ System.out.println("name = " + name + ""
+ + ", name.length = " + name.length());
+ System.out.println("value = " + value + ""
+ + ", value.length = " + value.length());
+
+ readSpecificLineWidthManifest(name, value, w);
+ }
+ }
+ }
+
+ static void readSpecificLineWidthManifest(String name, String value,
+ int lineWidth) throws IOException {
+ /*
+ * breaking header names is not allowed and hence cannot be reasonably
+ * tested. it cannot easily be helped, that invalid manifest files
+ * written by the previous Manifest version implementation are illegal
+ * if the header name is 69 or 70 bytes and in that case the name/value
+ * delimiter ": " was broken on a new line.
+ *
+ * changing the line width in Manifest#make72Safe(StringBuffer),
+ * however, also affects at which positions values are broken across
+ * lines (should always have affected values only and never header
+ * names or the delimiter) which is tested here.
+ *
+ * ideally, any previous Manifest implementation would have been used
+ * here to provide manifest files to test reading but these are no
+ * longer available in this version's sources and there might as well
+ * be other libraries writing manifests. Therefore, in order to be able
+ * to test any manifest file considered valid with respect to line
+ * breaks that could not possibly be produced with the current Manifest
+ * implementation, this test provides its own manifests in serialized
+ * form.
+ */
+ String lineBrokenSectionName = breakLines(lineWidth, "Name: " + name);
+ String lineBrokenNameAndValue = breakLines(lineWidth, name + ": " + value);
+
+ ByteArrayOutputStream mfBuf = new ByteArrayOutputStream();
+ mfBuf.write("Manifest-Version: 1.0".getBytes(UTF_8));
+ mfBuf.write("\r\n".getBytes(UTF_8));
+ mfBuf.write(lineBrokenNameAndValue.getBytes(UTF_8));
+ mfBuf.write("\r\n".getBytes(UTF_8));
+ mfBuf.write("\r\n".getBytes(UTF_8));
+ mfBuf.write(lineBrokenSectionName.getBytes(UTF_8));
+ mfBuf.write("\r\n".getBytes(UTF_8));
+ mfBuf.write(lineBrokenNameAndValue.getBytes(UTF_8));
+ mfBuf.write("\r\n".getBytes(UTF_8));
+ mfBuf.write("\r\n".getBytes(UTF_8));
+ byte[] mfBytes = mfBuf.toByteArray();
+ printManifest(mfBytes);
+
+ boolean nameValid = name.length() <= MAX_HEADER_NAME_LENGTH;
+
+ Manifest mf;
+ try {
+ mf = new Manifest(new ByteArrayInputStream(mfBytes));
+ } catch (IOException e) {
+ if (!nameValid &&
+ e.getMessage().startsWith("invalid header field")) {
+ // expected because the name is not valid
+ return;
+ }
+
+ throw new AssertionError(e.getMessage(), e);
+ }
+
+ assertTrue(nameValid, "failed to detect invalid manifest");
+
+ assertMainAndSectionValues(mf, name, value);
+ }
+
+ static String breakLines(int lineWidth, String nameAndValue) {
+ String lineBrokenNameAndValue = "";
+ int charsOnLastLine = 0;
+ for (int i = 0; i < nameAndValue.length(); i++) {
+ lineBrokenNameAndValue += nameAndValue.substring(i, i + 1);
+ charsOnLastLine++;
+ if (0 < i && i < nameAndValue.length() - 1
+ && charsOnLastLine == lineWidth) {
+ lineBrokenNameAndValue += "\r\n ";
+ charsOnLastLine = 1;
+ }
+ }
+ return lineBrokenNameAndValue;
+ }
+
+ static byte[] writeManifest(String name, String value) throws IOException {
+ /*
+ * writing manifest main headers is implemented separately from
+ * writing named sections manifest headers:
+ * - java.util.jar.Attributes.writeMain(DataOutputStream)
+ * - java.util.jar.Attributes.write(DataOutputStream)
+ * which is why this is also covered separately in this test by
+ * always adding the same value twice, in the main attributes as
+ * well as in a named section (using the header name also as the
+ * section name).
+ */
+
+ Manifest mf = new Manifest();
+ mf.getMainAttributes().put(Name.MANIFEST_VERSION, "1.0");
+ mf.getMainAttributes().putValue(name, value);
+
+ Attributes section = new Attributes();
+ section.putValue(name, value);
+ mf.getEntries().put(name, section);
+
+ ByteArrayOutputStream out = new ByteArrayOutputStream();
+ mf.write(out);
+ byte[] mfBytes = out.toByteArray();
+ printManifest(mfBytes);
+ return mfBytes;
+ }
+
+ private static void printManifest(byte[] mfBytes) {
+ final String sepLine = "----------------------------------------------"
+ + "---------------------|-|-|"; // |-positions: ---68-70-72
+ System.out.println(sepLine);
+ System.out.print(new String(mfBytes, UTF_8));
+ System.out.println(sepLine);
+ }
+
+ private static void assertMainAndSectionValues(Manifest mf, String name,
+ String value) {
+ String mainValue = mf.getMainAttributes().getValue(name);
+ String sectionValue = mf.getAttributes(name).getValue(name);
+
+ assertEquals(value, mainValue, "value different in main section");
+ assertEquals(value, sectionValue, "value different in named section");
+ }
+
+}
--- a/test/jdk/javax/transaction/testng/Driver.java Mon Mar 05 01:22:36 2018 +0000
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,31 +0,0 @@
-/*
- * Copyright (c) 2016, 2918, Oracle and/or its affiliates. All rights reserved.
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * This code is free software; you can redistribute it and/or modify it
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
- * or visit www.oracle.com if you need additional information or have any
- * questions.
- */
-
-/**
- * @test
- * @modules java.sql
- * @compile
- * test/transaction/XAExceptionTests.java
- * util/SerializedTransactionExceptions.java
- * @run testng/othervm test.transaction.XAExceptionTests
- */
--- a/test/jdk/javax/transaction/testng/test/transaction/XAExceptionTests.java Mon Mar 05 01:22:36 2018 +0000
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,98 +0,0 @@
-/*
- * Copyright (c) 2015, Oracle and/or its affiliates. All rights reserved.
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * This code is free software; you can redistribute it and/or modify it
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
- * or visit www.oracle.com if you need additional information or have any
- * questions.
- */
-package test.transaction;
-
-import java.io.ByteArrayInputStream;
-import java.io.ObjectInputStream;
-import javax.transaction.xa.XAException;
-import static org.testng.Assert.*;
-import org.testng.annotations.Test;
-import util.SerializedTransactionExceptions;
-
-public class XAExceptionTests {
-
- protected final String reason = "reason";
-
- /**
- * Create XAException with no-arg constructor
- */
- @Test
- public void test1() {
- XAException ex = new XAException();
- assertTrue(ex.getMessage() == null
- && ex.getCause() == null
- && ex.errorCode == 0);
- }
-
- /**
- * Create XAException with message
- */
- @Test
- public void test2() {
- XAException ex = new XAException(reason);
- assertTrue(ex.getMessage().equals(reason)
- && ex.getCause() == null
- && ex.errorCode == 0);
- }
-
- /**
- * De-Serialize a XAException from JDBC 4.0 and make sure you can read it
- * back properly
- */
- @Test
- public void test3() throws Exception {
-
- ObjectInputStream ois = new ObjectInputStream(
- new ByteArrayInputStream(SerializedTransactionExceptions.XAE_DATA));
- XAException ex = (XAException) ois.readObject();
- assertTrue(reason.equals(ex.getMessage())
- && ex.getCause() == null
- && ex.errorCode == 0);
- }
-
- /**
- * Create TransactionRolledbackException specifying an error code
- */
- @Test
- public void test4() {
- int error = 21;
- XAException ex = new XAException(error);
- assertTrue(ex.getMessage() == null
- && ex.getCause() == null
- && ex.errorCode == error);
- }
-
- /**
- * Create TransactionRolledbackException specifying an error code
- */
- @Test
- public void test5() {
- int error = 21;
- XAException ex = new XAException(error);
- ex.errorCode = error;
- assertTrue(ex.getMessage() == null
- && ex.getCause() == null
- && ex.errorCode == error);
- }
-
-}
--- a/test/jdk/javax/transaction/testng/util/SerializedTransactionExceptions.java Mon Mar 05 01:22:36 2018 +0000
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,167 +0,0 @@
-/*
- * Copyright (c) 2015, Oracle and/or its affiliates. All rights reserved.
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * This code is free software; you can redistribute it and/or modify it
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please 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 util;
-
-public class SerializedTransactionExceptions {
-
- /**
- * Serialized XAException from JDK 8 with the following values:
- * reason = "This was the error msg"
- * cause = null
- */
- public static byte[] XAE_DATA = {
- (byte) 0xac, (byte) 0xed, (byte) 0x0, (byte) 0x5, (byte) 0x73, (byte) 0x72, (byte) 0x0, (byte) 0x20, (byte) 0x6a, (byte) 0x61, (byte) 0x76, (byte) 0x61, (byte) 0x78, (byte) 0x2e, (byte) 0x74, (byte) 0x72, (byte) 0x61, (byte) 0x6e, (byte) 0x73, (byte) 0x61, (byte) 0x63, (byte) 0x74, (byte) 0x69, (byte) 0x6f, (byte) 0x6e, (byte) 0x2e, (byte) 0x78, (byte) 0x61, (byte) 0x2e, (byte) 0x58, (byte) 0x41, (byte) 0x45,
- (byte) 0x78, (byte) 0x63, (byte) 0x65, (byte) 0x70, (byte) 0x74, (byte) 0x69, (byte) 0x6f, (byte) 0x6e, (byte) 0x8d, (byte) 0x83, (byte) 0x3c, (byte) 0xc2, (byte) 0xda, (byte) 0xf, (byte) 0x2a, (byte) 0x59, (byte) 0x2, (byte) 0x0, (byte) 0x1, (byte) 0x49, (byte) 0x0, (byte) 0x9, (byte) 0x65, (byte) 0x72, (byte) 0x72, (byte) 0x6f, (byte) 0x72, (byte) 0x43, (byte) 0x6f, (byte) 0x64, (byte) 0x65, (byte) 0x78,
- (byte) 0x72, (byte) 0x0, (byte) 0x13, (byte) 0x6a, (byte) 0x61, (byte) 0x76, (byte) 0x61, (byte) 0x2e, (byte) 0x6c, (byte) 0x61, (byte) 0x6e, (byte) 0x67, (byte) 0x2e, (byte) 0x45, (byte) 0x78, (byte) 0x63, (byte) 0x65, (byte) 0x70, (byte) 0x74, (byte) 0x69, (byte) 0x6f, (byte) 0x6e, (byte) 0xd0, (byte) 0xfd, (byte) 0x1f, (byte) 0x3e, (byte) 0x1a, (byte) 0x3b, (byte) 0x1c, (byte) 0xc4, (byte) 0x2, (byte) 0x0,
- (byte) 0x0, (byte) 0x78, (byte) 0x72, (byte) 0x0, (byte) 0x13, (byte) 0x6a, (byte) 0x61, (byte) 0x76, (byte) 0x61, (byte) 0x2e, (byte) 0x6c, (byte) 0x61, (byte) 0x6e, (byte) 0x67, (byte) 0x2e, (byte) 0x54, (byte) 0x68, (byte) 0x72, (byte) 0x6f, (byte) 0x77, (byte) 0x61, (byte) 0x62, (byte) 0x6c, (byte) 0x65, (byte) 0xd5, (byte) 0xc6, (byte) 0x35, (byte) 0x27, (byte) 0x39, (byte) 0x77, (byte) 0xb8, (byte) 0xcb,
- (byte) 0x3, (byte) 0x0, (byte) 0x4, (byte) 0x4c, (byte) 0x0, (byte) 0x5, (byte) 0x63, (byte) 0x61, (byte) 0x75, (byte) 0x73, (byte) 0x65, (byte) 0x74, (byte) 0x0, (byte) 0x15, (byte) 0x4c, (byte) 0x6a, (byte) 0x61, (byte) 0x76, (byte) 0x61, (byte) 0x2f, (byte) 0x6c, (byte) 0x61, (byte) 0x6e, (byte) 0x67, (byte) 0x2f, (byte) 0x54, (byte) 0x68, (byte) 0x72, (byte) 0x6f, (byte) 0x77, (byte) 0x61, (byte) 0x62,
- (byte) 0x6c, (byte) 0x65, (byte) 0x3b, (byte) 0x4c, (byte) 0x0, (byte) 0xd, (byte) 0x64, (byte) 0x65, (byte) 0x74, (byte) 0x61, (byte) 0x69, (byte) 0x6c, (byte) 0x4d, (byte) 0x65, (byte) 0x73, (byte) 0x73, (byte) 0x61, (byte) 0x67, (byte) 0x65, (byte) 0x74, (byte) 0x0, (byte) 0x12, (byte) 0x4c, (byte) 0x6a, (byte) 0x61, (byte) 0x76, (byte) 0x61, (byte) 0x2f, (byte) 0x6c, (byte) 0x61, (byte) 0x6e, (byte) 0x67,
- (byte) 0x2f, (byte) 0x53, (byte) 0x74, (byte) 0x72, (byte) 0x69, (byte) 0x6e, (byte) 0x67, (byte) 0x3b, (byte) 0x5b, (byte) 0x0, (byte) 0xa, (byte) 0x73, (byte) 0x74, (byte) 0x61, (byte) 0x63, (byte) 0x6b, (byte) 0x54, (byte) 0x72, (byte) 0x61, (byte) 0x63, (byte) 0x65, (byte) 0x74, (byte) 0x0, (byte) 0x1e, (byte) 0x5b, (byte) 0x4c, (byte) 0x6a, (byte) 0x61, (byte) 0x76, (byte) 0x61, (byte) 0x2f, (byte) 0x6c,
- (byte) 0x61, (byte) 0x6e, (byte) 0x67, (byte) 0x2f, (byte) 0x53, (byte) 0x74, (byte) 0x61, (byte) 0x63, (byte) 0x6b, (byte) 0x54, (byte) 0x72, (byte) 0x61, (byte) 0x63, (byte) 0x65, (byte) 0x45, (byte) 0x6c, (byte) 0x65, (byte) 0x6d, (byte) 0x65, (byte) 0x6e, (byte) 0x74, (byte) 0x3b, (byte) 0x4c, (byte) 0x0, (byte) 0x14, (byte) 0x73, (byte) 0x75, (byte) 0x70, (byte) 0x70, (byte) 0x72, (byte) 0x65, (byte) 0x73,
- (byte) 0x73, (byte) 0x65, (byte) 0x64, (byte) 0x45, (byte) 0x78, (byte) 0x63, (byte) 0x65, (byte) 0x70, (byte) 0x74, (byte) 0x69, (byte) 0x6f, (byte) 0x6e, (byte) 0x73, (byte) 0x74, (byte) 0x0, (byte) 0x10, (byte) 0x4c, (byte) 0x6a, (byte) 0x61, (byte) 0x76, (byte) 0x61, (byte) 0x2f, (byte) 0x75, (byte) 0x74, (byte) 0x69, (byte) 0x6c, (byte) 0x2f, (byte) 0x4c, (byte) 0x69, (byte) 0x73, (byte) 0x74, (byte) 0x3b,
- (byte) 0x78, (byte) 0x70, (byte) 0x71, (byte) 0x0, (byte) 0x7e, (byte) 0x0, (byte) 0x7, (byte) 0x74, (byte) 0x0, (byte) 0x6, (byte) 0x72, (byte) 0x65, (byte) 0x61, (byte) 0x73, (byte) 0x6f, (byte) 0x6e, (byte) 0x75, (byte) 0x72, (byte) 0x0, (byte) 0x1e, (byte) 0x5b, (byte) 0x4c, (byte) 0x6a, (byte) 0x61, (byte) 0x76, (byte) 0x61, (byte) 0x2e, (byte) 0x6c, (byte) 0x61, (byte) 0x6e, (byte) 0x67, (byte) 0x2e,
- (byte) 0x53, (byte) 0x74, (byte) 0x61, (byte) 0x63, (byte) 0x6b, (byte) 0x54, (byte) 0x72, (byte) 0x61, (byte) 0x63, (byte) 0x65, (byte) 0x45, (byte) 0x6c, (byte) 0x65, (byte) 0x6d, (byte) 0x65, (byte) 0x6e, (byte) 0x74, (byte) 0x3b, (byte) 0x2, (byte) 0x46, (byte) 0x2a, (byte) 0x3c, (byte) 0x3c, (byte) 0xfd, (byte) 0x22, (byte) 0x39, (byte) 0x2, (byte) 0x0, (byte) 0x0, (byte) 0x78, (byte) 0x70, (byte) 0x0,
- (byte) 0x0, (byte) 0x0, (byte) 0x2, (byte) 0x73, (byte) 0x72, (byte) 0x0, (byte) 0x1b, (byte) 0x6a, (byte) 0x61, (byte) 0x76, (byte) 0x61, (byte) 0x2e, (byte) 0x6c, (byte) 0x61, (byte) 0x6e, (byte) 0x67, (byte) 0x2e, (byte) 0x53, (byte) 0x74, (byte) 0x61, (byte) 0x63, (byte) 0x6b, (byte) 0x54, (byte) 0x72, (byte) 0x61, (byte) 0x63, (byte) 0x65, (byte) 0x45, (byte) 0x6c, (byte) 0x65, (byte) 0x6d, (byte) 0x65,
- (byte) 0x6e, (byte) 0x74, (byte) 0x61, (byte) 0x9, (byte) 0xc5, (byte) 0x9a, (byte) 0x26, (byte) 0x36, (byte) 0xdd, (byte) 0x85, (byte) 0x2, (byte) 0x0, (byte) 0x4, (byte) 0x49, (byte) 0x0, (byte) 0xa, (byte) 0x6c, (byte) 0x69, (byte) 0x6e, (byte) 0x65, (byte) 0x4e, (byte) 0x75, (byte) 0x6d, (byte) 0x62, (byte) 0x65, (byte) 0x72, (byte) 0x4c, (byte) 0x0, (byte) 0xe, (byte) 0x64, (byte) 0x65, (byte) 0x63,
- (byte) 0x6c, (byte) 0x61, (byte) 0x72, (byte) 0x69, (byte) 0x6e, (byte) 0x67, (byte) 0x43, (byte) 0x6c, (byte) 0x61, (byte) 0x73, (byte) 0x73, (byte) 0x71, (byte) 0x0, (byte) 0x7e, (byte) 0x0, (byte) 0x4, (byte) 0x4c, (byte) 0x0, (byte) 0x8, (byte) 0x66, (byte) 0x69, (byte) 0x6c, (byte) 0x65, (byte) 0x4e, (byte) 0x61, (byte) 0x6d, (byte) 0x65, (byte) 0x71, (byte) 0x0, (byte) 0x7e, (byte) 0x0, (byte) 0x4,
- (byte) 0x4c, (byte) 0x0, (byte) 0xa, (byte) 0x6d, (byte) 0x65, (byte) 0x74, (byte) 0x68, (byte) 0x6f, (byte) 0x64, (byte) 0x4e, (byte) 0x61, (byte) 0x6d, (byte) 0x65, (byte) 0x71, (byte) 0x0, (byte) 0x7e, (byte) 0x0, (byte) 0x4, (byte) 0x78, (byte) 0x70, (byte) 0x0, (byte) 0x0, (byte) 0x0, (byte) 0x39, (byte) 0x74, (byte) 0x0, (byte) 0x10, (byte) 0x57, (byte) 0x72, (byte) 0x69, (byte) 0x74, (byte) 0x65,
- (byte) 0x53, (byte) 0x65, (byte) 0x72, (byte) 0x69, (byte) 0x61, (byte) 0x6c, (byte) 0x44, (byte) 0x61, (byte) 0x74, (byte) 0x61, (byte) 0x31, (byte) 0x74, (byte) 0x0, (byte) 0x15, (byte) 0x57, (byte) 0x72, (byte) 0x69, (byte) 0x74, (byte) 0x65, (byte) 0x53, (byte) 0x65, (byte) 0x72, (byte) 0x69, (byte) 0x61, (byte) 0x6c, (byte) 0x44, (byte) 0x61, (byte) 0x74, (byte) 0x61, (byte) 0x31, (byte) 0x2e, (byte) 0x6a,
- (byte) 0x61, (byte) 0x76, (byte) 0x61, (byte) 0x74, (byte) 0x0, (byte) 0x3, (byte) 0x72, (byte) 0x75, (byte) 0x6e, (byte) 0x73, (byte) 0x71, (byte) 0x0, (byte) 0x7e, (byte) 0x0, (byte) 0xb, (byte) 0x0, (byte) 0x0, (byte) 0x0, (byte) 0x24, (byte) 0x71, (byte) 0x0, (byte) 0x7e, (byte) 0x0, (byte) 0xd, (byte) 0x71, (byte) 0x0, (byte) 0x7e, (byte) 0x0, (byte) 0xe, (byte) 0x74, (byte) 0x0, (byte) 0x4,
- (byte) 0x6d, (byte) 0x61, (byte) 0x69, (byte) 0x6e, (byte) 0x73, (byte) 0x72, (byte) 0x0, (byte) 0x26, (byte) 0x6a, (byte) 0x61, (byte) 0x76, (byte) 0x61, (byte) 0x2e, (byte) 0x75, (byte) 0x74, (byte) 0x69, (byte) 0x6c, (byte) 0x2e, (byte) 0x43, (byte) 0x6f, (byte) 0x6c, (byte) 0x6c, (byte) 0x65, (byte) 0x63, (byte) 0x74, (byte) 0x69, (byte) 0x6f, (byte) 0x6e, (byte) 0x73, (byte) 0x24, (byte) 0x55, (byte) 0x6e,
- (byte) 0x6d, (byte) 0x6f, (byte) 0x64, (byte) 0x69, (byte) 0x66, (byte) 0x69, (byte) 0x61, (byte) 0x62, (byte) 0x6c, (byte) 0x65, (byte) 0x4c, (byte) 0x69, (byte) 0x73, (byte) 0x74, (byte) 0xfc, (byte) 0xf, (byte) 0x25, (byte) 0x31, (byte) 0xb5, (byte) 0xec, (byte) 0x8e, (byte) 0x10, (byte) 0x2, (byte) 0x0, (byte) 0x1, (byte) 0x4c, (byte) 0x0, (byte) 0x4, (byte) 0x6c, (byte) 0x69, (byte) 0x73, (byte) 0x74,
- (byte) 0x71, (byte) 0x0, (byte) 0x7e, (byte) 0x0, (byte) 0x6, (byte) 0x78, (byte) 0x72, (byte) 0x0, (byte) 0x2c, (byte) 0x6a, (byte) 0x61, (byte) 0x76, (byte) 0x61, (byte) 0x2e, (byte) 0x75, (byte) 0x74, (byte) 0x69, (byte) 0x6c, (byte) 0x2e, (byte) 0x43, (byte) 0x6f, (byte) 0x6c, (byte) 0x6c, (byte) 0x65, (byte) 0x63, (byte) 0x74, (byte) 0x69, (byte) 0x6f, (byte) 0x6e, (byte) 0x73, (byte) 0x24, (byte) 0x55,
- (byte) 0x6e, (byte) 0x6d, (byte) 0x6f, (byte) 0x64, (byte) 0x69, (byte) 0x66, (byte) 0x69, (byte) 0x61, (byte) 0x62, (byte) 0x6c, (byte) 0x65, (byte) 0x43, (byte) 0x6f, (byte) 0x6c, (byte) 0x6c, (byte) 0x65, (byte) 0x63, (byte) 0x74, (byte) 0x69, (byte) 0x6f, (byte) 0x6e, (byte) 0x19, (byte) 0x42, (byte) 0x0, (byte) 0x80, (byte) 0xcb, (byte) 0x5e, (byte) 0xf7, (byte) 0x1e, (byte) 0x2, (byte) 0x0, (byte) 0x1,
- (byte) 0x4c, (byte) 0x0, (byte) 0x1, (byte) 0x63, (byte) 0x74, (byte) 0x0, (byte) 0x16, (byte) 0x4c, (byte) 0x6a, (byte) 0x61, (byte) 0x76, (byte) 0x61, (byte) 0x2f, (byte) 0x75, (byte) 0x74, (byte) 0x69, (byte) 0x6c, (byte) 0x2f, (byte) 0x43, (byte) 0x6f, (byte) 0x6c, (byte) 0x6c, (byte) 0x65, (byte) 0x63, (byte) 0x74, (byte) 0x69, (byte) 0x6f, (byte) 0x6e, (byte) 0x3b, (byte) 0x78, (byte) 0x70, (byte) 0x73,
- (byte) 0x72, (byte) 0x0, (byte) 0x13, (byte) 0x6a, (byte) 0x61, (byte) 0x76, (byte) 0x61, (byte) 0x2e, (byte) 0x75, (byte) 0x74, (byte) 0x69, (byte) 0x6c, (byte) 0x2e, (byte) 0x41, (byte) 0x72, (byte) 0x72, (byte) 0x61, (byte) 0x79, (byte) 0x4c, (byte) 0x69, (byte) 0x73, (byte) 0x74, (byte) 0x78, (byte) 0x81, (byte) 0xd2, (byte) 0x1d, (byte) 0x99, (byte) 0xc7, (byte) 0x61, (byte) 0x9d, (byte) 0x3, (byte) 0x0,
- (byte) 0x1, (byte) 0x49, (byte) 0x0, (byte) 0x4, (byte) 0x73, (byte) 0x69, (byte) 0x7a, (byte) 0x65, (byte) 0x78, (byte) 0x70, (byte) 0x0, (byte) 0x0, (byte) 0x0, (byte) 0x0, (byte) 0x77, (byte) 0x4, (byte) 0x0, (byte) 0x0, (byte) 0x0, (byte) 0x0, (byte) 0x78, (byte) 0x71, (byte) 0x0, (byte) 0x7e, (byte) 0x0, (byte) 0x17, (byte) 0x78, (byte) 0x0, (byte) 0x0, (byte) 0x0, (byte) 0x0
- };
-
- /**
- * Serialized InvalidTransactionException from JDK 8 with the following
- * values:
- * reason = "This was the error msg"
- * cause = null
- */
- public static byte[] ITE_DATA = {
- (byte) 0xac, (byte) 0xed, (byte) 0x0, (byte) 0x5, (byte) 0x73, (byte) 0x72, (byte) 0x0, (byte) 0x2d, (byte) 0x6a, (byte) 0x61, (byte) 0x76, (byte) 0x61, (byte) 0x78, (byte) 0x2e, (byte) 0x74, (byte) 0x72, (byte) 0x61, (byte) 0x6e, (byte) 0x73, (byte) 0x61, (byte) 0x63, (byte) 0x74, (byte) 0x69, (byte) 0x6f, (byte) 0x6e, (byte) 0x2e, (byte) 0x49, (byte) 0x6e, (byte) 0x76, (byte) 0x61, (byte) 0x6c, (byte) 0x69,
- (byte) 0x64, (byte) 0x54, (byte) 0x72, (byte) 0x61, (byte) 0x6e, (byte) 0x73, (byte) 0x61, (byte) 0x63, (byte) 0x74, (byte) 0x69, (byte) 0x6f, (byte) 0x6e, (byte) 0x45, (byte) 0x78, (byte) 0x63, (byte) 0x65, (byte) 0x70, (byte) 0x74, (byte) 0x69, (byte) 0x6f, (byte) 0x6e, (byte) 0x31, (byte) 0xec, (byte) 0x3f, (byte) 0xae, (byte) 0x54, (byte) 0x8e, (byte) 0xdb, (byte) 0x68, (byte) 0x2, (byte) 0x0, (byte) 0x0,
- (byte) 0x78, (byte) 0x72, (byte) 0x0, (byte) 0x18, (byte) 0x6a, (byte) 0x61, (byte) 0x76, (byte) 0x61, (byte) 0x2e, (byte) 0x72, (byte) 0x6d, (byte) 0x69, (byte) 0x2e, (byte) 0x52, (byte) 0x65, (byte) 0x6d, (byte) 0x6f, (byte) 0x74, (byte) 0x65, (byte) 0x45, (byte) 0x78, (byte) 0x63, (byte) 0x65, (byte) 0x70, (byte) 0x74, (byte) 0x69, (byte) 0x6f, (byte) 0x6e, (byte) 0xb8, (byte) 0x8c, (byte) 0x9d, (byte) 0x4e,
- (byte) 0xde, (byte) 0xe4, (byte) 0x7a, (byte) 0x22, (byte) 0x2, (byte) 0x0, (byte) 0x1, (byte) 0x4c, (byte) 0x0, (byte) 0x6, (byte) 0x64, (byte) 0x65, (byte) 0x74, (byte) 0x61, (byte) 0x69, (byte) 0x6c, (byte) 0x74, (byte) 0x0, (byte) 0x15, (byte) 0x4c, (byte) 0x6a, (byte) 0x61, (byte) 0x76, (byte) 0x61, (byte) 0x2f, (byte) 0x6c, (byte) 0x61, (byte) 0x6e, (byte) 0x67, (byte) 0x2f, (byte) 0x54, (byte) 0x68,
- (byte) 0x72, (byte) 0x6f, (byte) 0x77, (byte) 0x61, (byte) 0x62, (byte) 0x6c, (byte) 0x65, (byte) 0x3b, (byte) 0x78, (byte) 0x72, (byte) 0x0, (byte) 0x13, (byte) 0x6a, (byte) 0x61, (byte) 0x76, (byte) 0x61, (byte) 0x2e, (byte) 0x69, (byte) 0x6f, (byte) 0x2e, (byte) 0x49, (byte) 0x4f, (byte) 0x45, (byte) 0x78, (byte) 0x63, (byte) 0x65, (byte) 0x70, (byte) 0x74, (byte) 0x69, (byte) 0x6f, (byte) 0x6e, (byte) 0x6c,
- (byte) 0x80, (byte) 0x73, (byte) 0x64, (byte) 0x65, (byte) 0x25, (byte) 0xf0, (byte) 0xab, (byte) 0x2, (byte) 0x0, (byte) 0x0, (byte) 0x78, (byte) 0x72, (byte) 0x0, (byte) 0x13, (byte) 0x6a, (byte) 0x61, (byte) 0x76, (byte) 0x61, (byte) 0x2e, (byte) 0x6c, (byte) 0x61, (byte) 0x6e, (byte) 0x67, (byte) 0x2e, (byte) 0x45, (byte) 0x78, (byte) 0x63, (byte) 0x65, (byte) 0x70, (byte) 0x74, (byte) 0x69, (byte) 0x6f,
- (byte) 0x6e, (byte) 0xd0, (byte) 0xfd, (byte) 0x1f, (byte) 0x3e, (byte) 0x1a, (byte) 0x3b, (byte) 0x1c, (byte) 0xc4, (byte) 0x2, (byte) 0x0, (byte) 0x0, (byte) 0x78, (byte) 0x72, (byte) 0x0, (byte) 0x13, (byte) 0x6a, (byte) 0x61, (byte) 0x76, (byte) 0x61, (byte) 0x2e, (byte) 0x6c, (byte) 0x61, (byte) 0x6e, (byte) 0x67, (byte) 0x2e, (byte) 0x54, (byte) 0x68, (byte) 0x72, (byte) 0x6f, (byte) 0x77, (byte) 0x61,
- (byte) 0x62, (byte) 0x6c, (byte) 0x65, (byte) 0xd5, (byte) 0xc6, (byte) 0x35, (byte) 0x27, (byte) 0x39, (byte) 0x77, (byte) 0xb8, (byte) 0xcb, (byte) 0x3, (byte) 0x0, (byte) 0x4, (byte) 0x4c, (byte) 0x0, (byte) 0x5, (byte) 0x63, (byte) 0x61, (byte) 0x75, (byte) 0x73, (byte) 0x65, (byte) 0x71, (byte) 0x0, (byte) 0x7e, (byte) 0x0, (byte) 0x2, (byte) 0x4c, (byte) 0x0, (byte) 0xd, (byte) 0x64, (byte) 0x65,
- (byte) 0x74, (byte) 0x61, (byte) 0x69, (byte) 0x6c, (byte) 0x4d, (byte) 0x65, (byte) 0x73, (byte) 0x73, (byte) 0x61, (byte) 0x67, (byte) 0x65, (byte) 0x74, (byte) 0x0, (byte) 0x12, (byte) 0x4c, (byte) 0x6a, (byte) 0x61, (byte) 0x76, (byte) 0x61, (byte) 0x2f, (byte) 0x6c, (byte) 0x61, (byte) 0x6e, (byte) 0x67, (byte) 0x2f, (byte) 0x53, (byte) 0x74, (byte) 0x72, (byte) 0x69, (byte) 0x6e, (byte) 0x67, (byte) 0x3b,
- (byte) 0x5b, (byte) 0x0, (byte) 0xa, (byte) 0x73, (byte) 0x74, (byte) 0x61, (byte) 0x63, (byte) 0x6b, (byte) 0x54, (byte) 0x72, (byte) 0x61, (byte) 0x63, (byte) 0x65, (byte) 0x74, (byte) 0x0, (byte) 0x1e, (byte) 0x5b, (byte) 0x4c, (byte) 0x6a, (byte) 0x61, (byte) 0x76, (byte) 0x61, (byte) 0x2f, (byte) 0x6c, (byte) 0x61, (byte) 0x6e, (byte) 0x67, (byte) 0x2f, (byte) 0x53, (byte) 0x74, (byte) 0x61, (byte) 0x63,
- (byte) 0x6b, (byte) 0x54, (byte) 0x72, (byte) 0x61, (byte) 0x63, (byte) 0x65, (byte) 0x45, (byte) 0x6c, (byte) 0x65, (byte) 0x6d, (byte) 0x65, (byte) 0x6e, (byte) 0x74, (byte) 0x3b, (byte) 0x4c, (byte) 0x0, (byte) 0x14, (byte) 0x73, (byte) 0x75, (byte) 0x70, (byte) 0x70, (byte) 0x72, (byte) 0x65, (byte) 0x73, (byte) 0x73, (byte) 0x65, (byte) 0x64, (byte) 0x45, (byte) 0x78, (byte) 0x63, (byte) 0x65, (byte) 0x70,
- (byte) 0x74, (byte) 0x69, (byte) 0x6f, (byte) 0x6e, (byte) 0x73, (byte) 0x74, (byte) 0x0, (byte) 0x10, (byte) 0x4c, (byte) 0x6a, (byte) 0x61, (byte) 0x76, (byte) 0x61, (byte) 0x2f, (byte) 0x75, (byte) 0x74, (byte) 0x69, (byte) 0x6c, (byte) 0x2f, (byte) 0x4c, (byte) 0x69, (byte) 0x73, (byte) 0x74, (byte) 0x3b, (byte) 0x78, (byte) 0x70, (byte) 0x70, (byte) 0x74, (byte) 0x0, (byte) 0x6, (byte) 0x72, (byte) 0x65,
- (byte) 0x61, (byte) 0x73, (byte) 0x6f, (byte) 0x6e, (byte) 0x75, (byte) 0x72, (byte) 0x0, (byte) 0x1e, (byte) 0x5b, (byte) 0x4c, (byte) 0x6a, (byte) 0x61, (byte) 0x76, (byte) 0x61, (byte) 0x2e, (byte) 0x6c, (byte) 0x61, (byte) 0x6e, (byte) 0x67, (byte) 0x2e, (byte) 0x53, (byte) 0x74, (byte) 0x61, (byte) 0x63, (byte) 0x6b, (byte) 0x54, (byte) 0x72, (byte) 0x61, (byte) 0x63, (byte) 0x65, (byte) 0x45, (byte) 0x6c,
- (byte) 0x65, (byte) 0x6d, (byte) 0x65, (byte) 0x6e, (byte) 0x74, (byte) 0x3b, (byte) 0x2, (byte) 0x46, (byte) 0x2a, (byte) 0x3c, (byte) 0x3c, (byte) 0xfd, (byte) 0x22, (byte) 0x39, (byte) 0x2, (byte) 0x0, (byte) 0x0, (byte) 0x78, (byte) 0x70, (byte) 0x0, (byte) 0x0, (byte) 0x0, (byte) 0x2, (byte) 0x73, (byte) 0x72, (byte) 0x0, (byte) 0x1b, (byte) 0x6a, (byte) 0x61, (byte) 0x76, (byte) 0x61, (byte) 0x2e,
- (byte) 0x6c, (byte) 0x61, (byte) 0x6e, (byte) 0x67, (byte) 0x2e, (byte) 0x53, (byte) 0x74, (byte) 0x61, (byte) 0x63, (byte) 0x6b, (byte) 0x54, (byte) 0x72, (byte) 0x61, (byte) 0x63, (byte) 0x65, (byte) 0x45, (byte) 0x6c, (byte) 0x65, (byte) 0x6d, (byte) 0x65, (byte) 0x6e, (byte) 0x74, (byte) 0x61, (byte) 0x9, (byte) 0xc5, (byte) 0x9a, (byte) 0x26, (byte) 0x36, (byte) 0xdd, (byte) 0x85, (byte) 0x2, (byte) 0x0,
- (byte) 0x4, (byte) 0x49, (byte) 0x0, (byte) 0xa, (byte) 0x6c, (byte) 0x69, (byte) 0x6e, (byte) 0x65, (byte) 0x4e, (byte) 0x75, (byte) 0x6d, (byte) 0x62, (byte) 0x65, (byte) 0x72, (byte) 0x4c, (byte) 0x0, (byte) 0xe, (byte) 0x64, (byte) 0x65, (byte) 0x63, (byte) 0x6c, (byte) 0x61, (byte) 0x72, (byte) 0x69, (byte) 0x6e, (byte) 0x67, (byte) 0x43, (byte) 0x6c, (byte) 0x61, (byte) 0x73, (byte) 0x73, (byte) 0x71,
- (byte) 0x0, (byte) 0x7e, (byte) 0x0, (byte) 0x6, (byte) 0x4c, (byte) 0x0, (byte) 0x8, (byte) 0x66, (byte) 0x69, (byte) 0x6c, (byte) 0x65, (byte) 0x4e, (byte) 0x61, (byte) 0x6d, (byte) 0x65, (byte) 0x71, (byte) 0x0, (byte) 0x7e, (byte) 0x0, (byte) 0x6, (byte) 0x4c, (byte) 0x0, (byte) 0xa, (byte) 0x6d, (byte) 0x65, (byte) 0x74, (byte) 0x68, (byte) 0x6f, (byte) 0x64, (byte) 0x4e, (byte) 0x61, (byte) 0x6d,
- (byte) 0x65, (byte) 0x71, (byte) 0x0, (byte) 0x7e, (byte) 0x0, (byte) 0x6, (byte) 0x78, (byte) 0x70, (byte) 0x0, (byte) 0x0, (byte) 0x0, (byte) 0x3a, (byte) 0x74, (byte) 0x0, (byte) 0x10, (byte) 0x57, (byte) 0x72, (byte) 0x69, (byte) 0x74, (byte) 0x65, (byte) 0x53, (byte) 0x65, (byte) 0x72, (byte) 0x69, (byte) 0x61, (byte) 0x6c, (byte) 0x44, (byte) 0x61, (byte) 0x74, (byte) 0x61, (byte) 0x31, (byte) 0x74,
- (byte) 0x0, (byte) 0x15, (byte) 0x57, (byte) 0x72, (byte) 0x69, (byte) 0x74, (byte) 0x65, (byte) 0x53, (byte) 0x65, (byte) 0x72, (byte) 0x69, (byte) 0x61, (byte) 0x6c, (byte) 0x44, (byte) 0x61, (byte) 0x74, (byte) 0x61, (byte) 0x31, (byte) 0x2e, (byte) 0x6a, (byte) 0x61, (byte) 0x76, (byte) 0x61, (byte) 0x74, (byte) 0x0, (byte) 0x3, (byte) 0x72, (byte) 0x75, (byte) 0x6e, (byte) 0x73, (byte) 0x71, (byte) 0x0,
- (byte) 0x7e, (byte) 0x0, (byte) 0xd, (byte) 0x0, (byte) 0x0, (byte) 0x0, (byte) 0x24, (byte) 0x71, (byte) 0x0, (byte) 0x7e, (byte) 0x0, (byte) 0xf, (byte) 0x71, (byte) 0x0, (byte) 0x7e, (byte) 0x0, (byte) 0x10, (byte) 0x74, (byte) 0x0, (byte) 0x4, (byte) 0x6d, (byte) 0x61, (byte) 0x69, (byte) 0x6e, (byte) 0x73, (byte) 0x72, (byte) 0x0, (byte) 0x26, (byte) 0x6a, (byte) 0x61, (byte) 0x76, (byte) 0x61,
- (byte) 0x2e, (byte) 0x75, (byte) 0x74, (byte) 0x69, (byte) 0x6c, (byte) 0x2e, (byte) 0x43, (byte) 0x6f, (byte) 0x6c, (byte) 0x6c, (byte) 0x65, (byte) 0x63, (byte) 0x74, (byte) 0x69, (byte) 0x6f, (byte) 0x6e, (byte) 0x73, (byte) 0x24, (byte) 0x55, (byte) 0x6e, (byte) 0x6d, (byte) 0x6f, (byte) 0x64, (byte) 0x69, (byte) 0x66, (byte) 0x69, (byte) 0x61, (byte) 0x62, (byte) 0x6c, (byte) 0x65, (byte) 0x4c, (byte) 0x69,
- (byte) 0x73, (byte) 0x74, (byte) 0xfc, (byte) 0xf, (byte) 0x25, (byte) 0x31, (byte) 0xb5, (byte) 0xec, (byte) 0x8e, (byte) 0x10, (byte) 0x2, (byte) 0x0, (byte) 0x1, (byte) 0x4c, (byte) 0x0, (byte) 0x4, (byte) 0x6c, (byte) 0x69, (byte) 0x73, (byte) 0x74, (byte) 0x71, (byte) 0x0, (byte) 0x7e, (byte) 0x0, (byte) 0x8, (byte) 0x78, (byte) 0x72, (byte) 0x0, (byte) 0x2c, (byte) 0x6a, (byte) 0x61, (byte) 0x76,
- (byte) 0x61, (byte) 0x2e, (byte) 0x75, (byte) 0x74, (byte) 0x69, (byte) 0x6c, (byte) 0x2e, (byte) 0x43, (byte) 0x6f, (byte) 0x6c, (byte) 0x6c, (byte) 0x65, (byte) 0x63, (byte) 0x74, (byte) 0x69, (byte) 0x6f, (byte) 0x6e, (byte) 0x73, (byte) 0x24, (byte) 0x55, (byte) 0x6e, (byte) 0x6d, (byte) 0x6f, (byte) 0x64, (byte) 0x69, (byte) 0x66, (byte) 0x69, (byte) 0x61, (byte) 0x62, (byte) 0x6c, (byte) 0x65, (byte) 0x43,
- (byte) 0x6f, (byte) 0x6c, (byte) 0x6c, (byte) 0x65, (byte) 0x63, (byte) 0x74, (byte) 0x69, (byte) 0x6f, (byte) 0x6e, (byte) 0x19, (byte) 0x42, (byte) 0x0, (byte) 0x80, (byte) 0xcb, (byte) 0x5e, (byte) 0xf7, (byte) 0x1e, (byte) 0x2, (byte) 0x0, (byte) 0x1, (byte) 0x4c, (byte) 0x0, (byte) 0x1, (byte) 0x63, (byte) 0x74, (byte) 0x0, (byte) 0x16, (byte) 0x4c, (byte) 0x6a, (byte) 0x61, (byte) 0x76, (byte) 0x61,
- (byte) 0x2f, (byte) 0x75, (byte) 0x74, (byte) 0x69, (byte) 0x6c, (byte) 0x2f, (byte) 0x43, (byte) 0x6f, (byte) 0x6c, (byte) 0x6c, (byte) 0x65, (byte) 0x63, (byte) 0x74, (byte) 0x69, (byte) 0x6f, (byte) 0x6e, (byte) 0x3b, (byte) 0x78, (byte) 0x70, (byte) 0x73, (byte) 0x72, (byte) 0x0, (byte) 0x13, (byte) 0x6a, (byte) 0x61, (byte) 0x76, (byte) 0x61, (byte) 0x2e, (byte) 0x75, (byte) 0x74, (byte) 0x69, (byte) 0x6c,
- (byte) 0x2e, (byte) 0x41, (byte) 0x72, (byte) 0x72, (byte) 0x61, (byte) 0x79, (byte) 0x4c, (byte) 0x69, (byte) 0x73, (byte) 0x74, (byte) 0x78, (byte) 0x81, (byte) 0xd2, (byte) 0x1d, (byte) 0x99, (byte) 0xc7, (byte) 0x61, (byte) 0x9d, (byte) 0x3, (byte) 0x0, (byte) 0x1, (byte) 0x49, (byte) 0x0, (byte) 0x4, (byte) 0x73, (byte) 0x69, (byte) 0x7a, (byte) 0x65, (byte) 0x78, (byte) 0x70, (byte) 0x0, (byte) 0x0,
- (byte) 0x0, (byte) 0x0, (byte) 0x77, (byte) 0x4, (byte) 0x0, (byte) 0x0, (byte) 0x0, (byte) 0x0, (byte) 0x78, (byte) 0x71, (byte) 0x0, (byte) 0x7e, (byte) 0x0, (byte) 0x19, (byte) 0x78, (byte) 0x70
- };
-
- /**
- * Serialized TransactionRequiredException from JDK 8 with the following
- * values:
- * reason = "This was the error msg"
- * cause = null
- */
- public static byte[] TRE_DATA = {
- (byte) 0xac, (byte) 0xed, (byte) 0x0, (byte) 0x5, (byte) 0x73, (byte) 0x72, (byte) 0x0, (byte) 0x2e, (byte) 0x6a, (byte) 0x61, (byte) 0x76, (byte) 0x61, (byte) 0x78, (byte) 0x2e, (byte) 0x74, (byte) 0x72, (byte) 0x61, (byte) 0x6e, (byte) 0x73, (byte) 0x61, (byte) 0x63, (byte) 0x74, (byte) 0x69, (byte) 0x6f, (byte) 0x6e, (byte) 0x2e, (byte) 0x54, (byte) 0x72, (byte) 0x61, (byte) 0x6e, (byte) 0x73, (byte) 0x61,
- (byte) 0x63, (byte) 0x74, (byte) 0x69, (byte) 0x6f, (byte) 0x6e, (byte) 0x52, (byte) 0x65, (byte) 0x71, (byte) 0x75, (byte) 0x69, (byte) 0x72, (byte) 0x65, (byte) 0x64, (byte) 0x45, (byte) 0x78, (byte) 0x63, (byte) 0x65, (byte) 0x70, (byte) 0x74, (byte) 0x69, (byte) 0x6f, (byte) 0x6e, (byte) 0xe5, (byte) 0xa6, (byte) 0x15, (byte) 0x9f, (byte) 0x12, (byte) 0x65, (byte) 0xb5, (byte) 0xd9, (byte) 0x2, (byte) 0x0,
- (byte) 0x0, (byte) 0x78, (byte) 0x72, (byte) 0x0, (byte) 0x18, (byte) 0x6a, (byte) 0x61, (byte) 0x76, (byte) 0x61, (byte) 0x2e, (byte) 0x72, (byte) 0x6d, (byte) 0x69, (byte) 0x2e, (byte) 0x52, (byte) 0x65, (byte) 0x6d, (byte) 0x6f, (byte) 0x74, (byte) 0x65, (byte) 0x45, (byte) 0x78, (byte) 0x63, (byte) 0x65, (byte) 0x70, (byte) 0x74, (byte) 0x69, (byte) 0x6f, (byte) 0x6e, (byte) 0xb8, (byte) 0x8c, (byte) 0x9d,
- (byte) 0x4e, (byte) 0xde, (byte) 0xe4, (byte) 0x7a, (byte) 0x22, (byte) 0x2, (byte) 0x0, (byte) 0x1, (byte) 0x4c, (byte) 0x0, (byte) 0x6, (byte) 0x64, (byte) 0x65, (byte) 0x74, (byte) 0x61, (byte) 0x69, (byte) 0x6c, (byte) 0x74, (byte) 0x0, (byte) 0x15, (byte) 0x4c, (byte) 0x6a, (byte) 0x61, (byte) 0x76, (byte) 0x61, (byte) 0x2f, (byte) 0x6c, (byte) 0x61, (byte) 0x6e, (byte) 0x67, (byte) 0x2f, (byte) 0x54,
- (byte) 0x68, (byte) 0x72, (byte) 0x6f, (byte) 0x77, (byte) 0x61, (byte) 0x62, (byte) 0x6c, (byte) 0x65, (byte) 0x3b, (byte) 0x78, (byte) 0x72, (byte) 0x0, (byte) 0x13, (byte) 0x6a, (byte) 0x61, (byte) 0x76, (byte) 0x61, (byte) 0x2e, (byte) 0x69, (byte) 0x6f, (byte) 0x2e, (byte) 0x49, (byte) 0x4f, (byte) 0x45, (byte) 0x78, (byte) 0x63, (byte) 0x65, (byte) 0x70, (byte) 0x74, (byte) 0x69, (byte) 0x6f, (byte) 0x6e,
- (byte) 0x6c, (byte) 0x80, (byte) 0x73, (byte) 0x64, (byte) 0x65, (byte) 0x25, (byte) 0xf0, (byte) 0xab, (byte) 0x2, (byte) 0x0, (byte) 0x0, (byte) 0x78, (byte) 0x72, (byte) 0x0, (byte) 0x13, (byte) 0x6a, (byte) 0x61, (byte) 0x76, (byte) 0x61, (byte) 0x2e, (byte) 0x6c, (byte) 0x61, (byte) 0x6e, (byte) 0x67, (byte) 0x2e, (byte) 0x45, (byte) 0x78, (byte) 0x63, (byte) 0x65, (byte) 0x70, (byte) 0x74, (byte) 0x69,
- (byte) 0x6f, (byte) 0x6e, (byte) 0xd0, (byte) 0xfd, (byte) 0x1f, (byte) 0x3e, (byte) 0x1a, (byte) 0x3b, (byte) 0x1c, (byte) 0xc4, (byte) 0x2, (byte) 0x0, (byte) 0x0, (byte) 0x78, (byte) 0x72, (byte) 0x0, (byte) 0x13, (byte) 0x6a, (byte) 0x61, (byte) 0x76, (byte) 0x61, (byte) 0x2e, (byte) 0x6c, (byte) 0x61, (byte) 0x6e, (byte) 0x67, (byte) 0x2e, (byte) 0x54, (byte) 0x68, (byte) 0x72, (byte) 0x6f, (byte) 0x77,
- (byte) 0x61, (byte) 0x62, (byte) 0x6c, (byte) 0x65, (byte) 0xd5, (byte) 0xc6, (byte) 0x35, (byte) 0x27, (byte) 0x39, (byte) 0x77, (byte) 0xb8, (byte) 0xcb, (byte) 0x3, (byte) 0x0, (byte) 0x4, (byte) 0x4c, (byte) 0x0, (byte) 0x5, (byte) 0x63, (byte) 0x61, (byte) 0x75, (byte) 0x73, (byte) 0x65, (byte) 0x71, (byte) 0x0, (byte) 0x7e, (byte) 0x0, (byte) 0x2, (byte) 0x4c, (byte) 0x0, (byte) 0xd, (byte) 0x64,
- (byte) 0x65, (byte) 0x74, (byte) 0x61, (byte) 0x69, (byte) 0x6c, (byte) 0x4d, (byte) 0x65, (byte) 0x73, (byte) 0x73, (byte) 0x61, (byte) 0x67, (byte) 0x65, (byte) 0x74, (byte) 0x0, (byte) 0x12, (byte) 0x4c, (byte) 0x6a, (byte) 0x61, (byte) 0x76, (byte) 0x61, (byte) 0x2f, (byte) 0x6c, (byte) 0x61, (byte) 0x6e, (byte) 0x67, (byte) 0x2f, (byte) 0x53, (byte) 0x74, (byte) 0x72, (byte) 0x69, (byte) 0x6e, (byte) 0x67,
- (byte) 0x3b, (byte) 0x5b, (byte) 0x0, (byte) 0xa, (byte) 0x73, (byte) 0x74, (byte) 0x61, (byte) 0x63, (byte) 0x6b, (byte) 0x54, (byte) 0x72, (byte) 0x61, (byte) 0x63, (byte) 0x65, (byte) 0x74, (byte) 0x0, (byte) 0x1e, (byte) 0x5b, (byte) 0x4c, (byte) 0x6a, (byte) 0x61, (byte) 0x76, (byte) 0x61, (byte) 0x2f, (byte) 0x6c, (byte) 0x61, (byte) 0x6e, (byte) 0x67, (byte) 0x2f, (byte) 0x53, (byte) 0x74, (byte) 0x61,
- (byte) 0x63, (byte) 0x6b, (byte) 0x54, (byte) 0x72, (byte) 0x61, (byte) 0x63, (byte) 0x65, (byte) 0x45, (byte) 0x6c, (byte) 0x65, (byte) 0x6d, (byte) 0x65, (byte) 0x6e, (byte) 0x74, (byte) 0x3b, (byte) 0x4c, (byte) 0x0, (byte) 0x14, (byte) 0x73, (byte) 0x75, (byte) 0x70, (byte) 0x70, (byte) 0x72, (byte) 0x65, (byte) 0x73, (byte) 0x73, (byte) 0x65, (byte) 0x64, (byte) 0x45, (byte) 0x78, (byte) 0x63, (byte) 0x65,
- (byte) 0x70, (byte) 0x74, (byte) 0x69, (byte) 0x6f, (byte) 0x6e, (byte) 0x73, (byte) 0x74, (byte) 0x0, (byte) 0x10, (byte) 0x4c, (byte) 0x6a, (byte) 0x61, (byte) 0x76, (byte) 0x61, (byte) 0x2f, (byte) 0x75, (byte) 0x74, (byte) 0x69, (byte) 0x6c, (byte) 0x2f, (byte) 0x4c, (byte) 0x69, (byte) 0x73, (byte) 0x74, (byte) 0x3b, (byte) 0x78, (byte) 0x70, (byte) 0x70, (byte) 0x74, (byte) 0x0, (byte) 0x6, (byte) 0x72,
- (byte) 0x65, (byte) 0x61, (byte) 0x73, (byte) 0x6f, (byte) 0x6e, (byte) 0x75, (byte) 0x72, (byte) 0x0, (byte) 0x1e, (byte) 0x5b, (byte) 0x4c, (byte) 0x6a, (byte) 0x61, (byte) 0x76, (byte) 0x61, (byte) 0x2e, (byte) 0x6c, (byte) 0x61, (byte) 0x6e, (byte) 0x67, (byte) 0x2e, (byte) 0x53, (byte) 0x74, (byte) 0x61, (byte) 0x63, (byte) 0x6b, (byte) 0x54, (byte) 0x72, (byte) 0x61, (byte) 0x63, (byte) 0x65, (byte) 0x45,
- (byte) 0x6c, (byte) 0x65, (byte) 0x6d, (byte) 0x65, (byte) 0x6e, (byte) 0x74, (byte) 0x3b, (byte) 0x2, (byte) 0x46, (byte) 0x2a, (byte) 0x3c, (byte) 0x3c, (byte) 0xfd, (byte) 0x22, (byte) 0x39, (byte) 0x2, (byte) 0x0, (byte) 0x0, (byte) 0x78, (byte) 0x70, (byte) 0x0, (byte) 0x0, (byte) 0x0, (byte) 0x2, (byte) 0x73, (byte) 0x72, (byte) 0x0, (byte) 0x1b, (byte) 0x6a, (byte) 0x61, (byte) 0x76, (byte) 0x61,
- (byte) 0x2e, (byte) 0x6c, (byte) 0x61, (byte) 0x6e, (byte) 0x67, (byte) 0x2e, (byte) 0x53, (byte) 0x74, (byte) 0x61, (byte) 0x63, (byte) 0x6b, (byte) 0x54, (byte) 0x72, (byte) 0x61, (byte) 0x63, (byte) 0x65, (byte) 0x45, (byte) 0x6c, (byte) 0x65, (byte) 0x6d, (byte) 0x65, (byte) 0x6e, (byte) 0x74, (byte) 0x61, (byte) 0x9, (byte) 0xc5, (byte) 0x9a, (byte) 0x26, (byte) 0x36, (byte) 0xdd, (byte) 0x85, (byte) 0x2,
- (byte) 0x0, (byte) 0x4, (byte) 0x49, (byte) 0x0, (byte) 0xa, (byte) 0x6c, (byte) 0x69, (byte) 0x6e, (byte) 0x65, (byte) 0x4e, (byte) 0x75, (byte) 0x6d, (byte) 0x62, (byte) 0x65, (byte) 0x72, (byte) 0x4c, (byte) 0x0, (byte) 0xe, (byte) 0x64, (byte) 0x65, (byte) 0x63, (byte) 0x6c, (byte) 0x61, (byte) 0x72, (byte) 0x69, (byte) 0x6e, (byte) 0x67, (byte) 0x43, (byte) 0x6c, (byte) 0x61, (byte) 0x73, (byte) 0x73,
- (byte) 0x71, (byte) 0x0, (byte) 0x7e, (byte) 0x0, (byte) 0x6, (byte) 0x4c, (byte) 0x0, (byte) 0x8, (byte) 0x66, (byte) 0x69, (byte) 0x6c, (byte) 0x65, (byte) 0x4e, (byte) 0x61, (byte) 0x6d, (byte) 0x65, (byte) 0x71, (byte) 0x0, (byte) 0x7e, (byte) 0x0, (byte) 0x6, (byte) 0x4c, (byte) 0x0, (byte) 0xa, (byte) 0x6d, (byte) 0x65, (byte) 0x74, (byte) 0x68, (byte) 0x6f, (byte) 0x64, (byte) 0x4e, (byte) 0x61,
- (byte) 0x6d, (byte) 0x65, (byte) 0x71, (byte) 0x0, (byte) 0x7e, (byte) 0x0, (byte) 0x6, (byte) 0x78, (byte) 0x70, (byte) 0x0, (byte) 0x0, (byte) 0x0, (byte) 0x3c, (byte) 0x74, (byte) 0x0, (byte) 0x10, (byte) 0x57, (byte) 0x72, (byte) 0x69, (byte) 0x74, (byte) 0x65, (byte) 0x53, (byte) 0x65, (byte) 0x72, (byte) 0x69, (byte) 0x61, (byte) 0x6c, (byte) 0x44, (byte) 0x61, (byte) 0x74, (byte) 0x61, (byte) 0x31,
- (byte) 0x74, (byte) 0x0, (byte) 0x15, (byte) 0x57, (byte) 0x72, (byte) 0x69, (byte) 0x74, (byte) 0x65, (byte) 0x53, (byte) 0x65, (byte) 0x72, (byte) 0x69, (byte) 0x61, (byte) 0x6c, (byte) 0x44, (byte) 0x61, (byte) 0x74, (byte) 0x61, (byte) 0x31, (byte) 0x2e, (byte) 0x6a, (byte) 0x61, (byte) 0x76, (byte) 0x61, (byte) 0x74, (byte) 0x0, (byte) 0x3, (byte) 0x72, (byte) 0x75, (byte) 0x6e, (byte) 0x73, (byte) 0x71,
- (byte) 0x0, (byte) 0x7e, (byte) 0x0, (byte) 0xd, (byte) 0x0, (byte) 0x0, (byte) 0x0, (byte) 0x24, (byte) 0x71, (byte) 0x0, (byte) 0x7e, (byte) 0x0, (byte) 0xf, (byte) 0x71, (byte) 0x0, (byte) 0x7e, (byte) 0x0, (byte) 0x10, (byte) 0x74, (byte) 0x0, (byte) 0x4, (byte) 0x6d, (byte) 0x61, (byte) 0x69, (byte) 0x6e, (byte) 0x73, (byte) 0x72, (byte) 0x0, (byte) 0x26, (byte) 0x6a, (byte) 0x61, (byte) 0x76,
- (byte) 0x61, (byte) 0x2e, (byte) 0x75, (byte) 0x74, (byte) 0x69, (byte) 0x6c, (byte) 0x2e, (byte) 0x43, (byte) 0x6f, (byte) 0x6c, (byte) 0x6c, (byte) 0x65, (byte) 0x63, (byte) 0x74, (byte) 0x69, (byte) 0x6f, (byte) 0x6e, (byte) 0x73, (byte) 0x24, (byte) 0x55, (byte) 0x6e, (byte) 0x6d, (byte) 0x6f, (byte) 0x64, (byte) 0x69, (byte) 0x66, (byte) 0x69, (byte) 0x61, (byte) 0x62, (byte) 0x6c, (byte) 0x65, (byte) 0x4c,
- (byte) 0x69, (byte) 0x73, (byte) 0x74, (byte) 0xfc, (byte) 0xf, (byte) 0x25, (byte) 0x31, (byte) 0xb5, (byte) 0xec, (byte) 0x8e, (byte) 0x10, (byte) 0x2, (byte) 0x0, (byte) 0x1, (byte) 0x4c, (byte) 0x0, (byte) 0x4, (byte) 0x6c, (byte) 0x69, (byte) 0x73, (byte) 0x74, (byte) 0x71, (byte) 0x0, (byte) 0x7e, (byte) 0x0, (byte) 0x8, (byte) 0x78, (byte) 0x72, (byte) 0x0, (byte) 0x2c, (byte) 0x6a, (byte) 0x61,
- (byte) 0x76, (byte) 0x61, (byte) 0x2e, (byte) 0x75, (byte) 0x74, (byte) 0x69, (byte) 0x6c, (byte) 0x2e, (byte) 0x43, (byte) 0x6f, (byte) 0x6c, (byte) 0x6c, (byte) 0x65, (byte) 0x63, (byte) 0x74, (byte) 0x69, (byte) 0x6f, (byte) 0x6e, (byte) 0x73, (byte) 0x24, (byte) 0x55, (byte) 0x6e, (byte) 0x6d, (byte) 0x6f, (byte) 0x64, (byte) 0x69, (byte) 0x66, (byte) 0x69, (byte) 0x61, (byte) 0x62, (byte) 0x6c, (byte) 0x65,
- (byte) 0x43, (byte) 0x6f, (byte) 0x6c, (byte) 0x6c, (byte) 0x65, (byte) 0x63, (byte) 0x74, (byte) 0x69, (byte) 0x6f, (byte) 0x6e, (byte) 0x19, (byte) 0x42, (byte) 0x0, (byte) 0x80, (byte) 0xcb, (byte) 0x5e, (byte) 0xf7, (byte) 0x1e, (byte) 0x2, (byte) 0x0, (byte) 0x1, (byte) 0x4c, (byte) 0x0, (byte) 0x1, (byte) 0x63, (byte) 0x74, (byte) 0x0, (byte) 0x16, (byte) 0x4c, (byte) 0x6a, (byte) 0x61, (byte) 0x76,
- (byte) 0x61, (byte) 0x2f, (byte) 0x75, (byte) 0x74, (byte) 0x69, (byte) 0x6c, (byte) 0x2f, (byte) 0x43, (byte) 0x6f, (byte) 0x6c, (byte) 0x6c, (byte) 0x65, (byte) 0x63, (byte) 0x74, (byte) 0x69, (byte) 0x6f, (byte) 0x6e, (byte) 0x3b, (byte) 0x78, (byte) 0x70, (byte) 0x73, (byte) 0x72, (byte) 0x0, (byte) 0x13, (byte) 0x6a, (byte) 0x61, (byte) 0x76, (byte) 0x61, (byte) 0x2e, (byte) 0x75, (byte) 0x74, (byte) 0x69,
- (byte) 0x6c, (byte) 0x2e, (byte) 0x41, (byte) 0x72, (byte) 0x72, (byte) 0x61, (byte) 0x79, (byte) 0x4c, (byte) 0x69, (byte) 0x73, (byte) 0x74, (byte) 0x78, (byte) 0x81, (byte) 0xd2, (byte) 0x1d, (byte) 0x99, (byte) 0xc7, (byte) 0x61, (byte) 0x9d, (byte) 0x3, (byte) 0x0, (byte) 0x1, (byte) 0x49, (byte) 0x0, (byte) 0x4, (byte) 0x73, (byte) 0x69, (byte) 0x7a, (byte) 0x65, (byte) 0x78, (byte) 0x70, (byte) 0x0,
- (byte) 0x0, (byte) 0x0, (byte) 0x0, (byte) 0x77, (byte) 0x4, (byte) 0x0, (byte) 0x0, (byte) 0x0, (byte) 0x0, (byte) 0x78, (byte) 0x71, (byte) 0x0, (byte) 0x7e, (byte) 0x0, (byte) 0x19, (byte) 0x78, (byte) 0x70
- };
-
- /**
- * Serialized TransactionRolledbackException from JDK 8 with the
- * following values:
- * reason = "This was the error msg"
- * cause = null
- */
- public static byte[] TRBE_DATA = {
- (byte) 0xac, (byte) 0xed, (byte) 0x0, (byte) 0x5, (byte) 0x73, (byte) 0x72, (byte) 0x0, (byte) 0x30, (byte) 0x6a, (byte) 0x61, (byte) 0x76, (byte) 0x61, (byte) 0x78, (byte) 0x2e, (byte) 0x74, (byte) 0x72, (byte) 0x61, (byte) 0x6e, (byte) 0x73, (byte) 0x61, (byte) 0x63, (byte) 0x74, (byte) 0x69, (byte) 0x6f, (byte) 0x6e, (byte) 0x2e, (byte) 0x54, (byte) 0x72, (byte) 0x61, (byte) 0x6e, (byte) 0x73, (byte) 0x61,
- (byte) 0x63, (byte) 0x74, (byte) 0x69, (byte) 0x6f, (byte) 0x6e, (byte) 0x52, (byte) 0x6f, (byte) 0x6c, (byte) 0x6c, (byte) 0x65, (byte) 0x64, (byte) 0x62, (byte) 0x61, (byte) 0x63, (byte) 0x6b, (byte) 0x45, (byte) 0x78, (byte) 0x63, (byte) 0x65, (byte) 0x70, (byte) 0x74, (byte) 0x69, (byte) 0x6f, (byte) 0x6e, (byte) 0xd4, (byte) 0x62, (byte) 0x89, (byte) 0xbe, (byte) 0x47, (byte) 0x2, (byte) 0xe7, (byte) 0xdf,
- (byte) 0x2, (byte) 0x0, (byte) 0x0, (byte) 0x78, (byte) 0x72, (byte) 0x0, (byte) 0x18, (byte) 0x6a, (byte) 0x61, (byte) 0x76, (byte) 0x61, (byte) 0x2e, (byte) 0x72, (byte) 0x6d, (byte) 0x69, (byte) 0x2e, (byte) 0x52, (byte) 0x65, (byte) 0x6d, (byte) 0x6f, (byte) 0x74, (byte) 0x65, (byte) 0x45, (byte) 0x78, (byte) 0x63, (byte) 0x65, (byte) 0x70, (byte) 0x74, (byte) 0x69, (byte) 0x6f, (byte) 0x6e, (byte) 0xb8,
- (byte) 0x8c, (byte) 0x9d, (byte) 0x4e, (byte) 0xde, (byte) 0xe4, (byte) 0x7a, (byte) 0x22, (byte) 0x2, (byte) 0x0, (byte) 0x1, (byte) 0x4c, (byte) 0x0, (byte) 0x6, (byte) 0x64, (byte) 0x65, (byte) 0x74, (byte) 0x61, (byte) 0x69, (byte) 0x6c, (byte) 0x74, (byte) 0x0, (byte) 0x15, (byte) 0x4c, (byte) 0x6a, (byte) 0x61, (byte) 0x76, (byte) 0x61, (byte) 0x2f, (byte) 0x6c, (byte) 0x61, (byte) 0x6e, (byte) 0x67,
- (byte) 0x2f, (byte) 0x54, (byte) 0x68, (byte) 0x72, (byte) 0x6f, (byte) 0x77, (byte) 0x61, (byte) 0x62, (byte) 0x6c, (byte) 0x65, (byte) 0x3b, (byte) 0x78, (byte) 0x72, (byte) 0x0, (byte) 0x13, (byte) 0x6a, (byte) 0x61, (byte) 0x76, (byte) 0x61, (byte) 0x2e, (byte) 0x69, (byte) 0x6f, (byte) 0x2e, (byte) 0x49, (byte) 0x4f, (byte) 0x45, (byte) 0x78, (byte) 0x63, (byte) 0x65, (byte) 0x70, (byte) 0x74, (byte) 0x69,
- (byte) 0x6f, (byte) 0x6e, (byte) 0x6c, (byte) 0x80, (byte) 0x73, (byte) 0x64, (byte) 0x65, (byte) 0x25, (byte) 0xf0, (byte) 0xab, (byte) 0x2, (byte) 0x0, (byte) 0x0, (byte) 0x78, (byte) 0x72, (byte) 0x0, (byte) 0x13, (byte) 0x6a, (byte) 0x61, (byte) 0x76, (byte) 0x61, (byte) 0x2e, (byte) 0x6c, (byte) 0x61, (byte) 0x6e, (byte) 0x67, (byte) 0x2e, (byte) 0x45, (byte) 0x78, (byte) 0x63, (byte) 0x65, (byte) 0x70,
- (byte) 0x74, (byte) 0x69, (byte) 0x6f, (byte) 0x6e, (byte) 0xd0, (byte) 0xfd, (byte) 0x1f, (byte) 0x3e, (byte) 0x1a, (byte) 0x3b, (byte) 0x1c, (byte) 0xc4, (byte) 0x2, (byte) 0x0, (byte) 0x0, (byte) 0x78, (byte) 0x72, (byte) 0x0, (byte) 0x13, (byte) 0x6a, (byte) 0x61, (byte) 0x76, (byte) 0x61, (byte) 0x2e, (byte) 0x6c, (byte) 0x61, (byte) 0x6e, (byte) 0x67, (byte) 0x2e, (byte) 0x54, (byte) 0x68, (byte) 0x72,
- (byte) 0x6f, (byte) 0x77, (byte) 0x61, (byte) 0x62, (byte) 0x6c, (byte) 0x65, (byte) 0xd5, (byte) 0xc6, (byte) 0x35, (byte) 0x27, (byte) 0x39, (byte) 0x77, (byte) 0xb8, (byte) 0xcb, (byte) 0x3, (byte) 0x0, (byte) 0x4, (byte) 0x4c, (byte) 0x0, (byte) 0x5, (byte) 0x63, (byte) 0x61, (byte) 0x75, (byte) 0x73, (byte) 0x65, (byte) 0x71, (byte) 0x0, (byte) 0x7e, (byte) 0x0, (byte) 0x2, (byte) 0x4c, (byte) 0x0,
- (byte) 0xd, (byte) 0x64, (byte) 0x65, (byte) 0x74, (byte) 0x61, (byte) 0x69, (byte) 0x6c, (byte) 0x4d, (byte) 0x65, (byte) 0x73, (byte) 0x73, (byte) 0x61, (byte) 0x67, (byte) 0x65, (byte) 0x74, (byte) 0x0, (byte) 0x12, (byte) 0x4c, (byte) 0x6a, (byte) 0x61, (byte) 0x76, (byte) 0x61, (byte) 0x2f, (byte) 0x6c, (byte) 0x61, (byte) 0x6e, (byte) 0x67, (byte) 0x2f, (byte) 0x53, (byte) 0x74, (byte) 0x72, (byte) 0x69,
- (byte) 0x6e, (byte) 0x67, (byte) 0x3b, (byte) 0x5b, (byte) 0x0, (byte) 0xa, (byte) 0x73, (byte) 0x74, (byte) 0x61, (byte) 0x63, (byte) 0x6b, (byte) 0x54, (byte) 0x72, (byte) 0x61, (byte) 0x63, (byte) 0x65, (byte) 0x74, (byte) 0x0, (byte) 0x1e, (byte) 0x5b, (byte) 0x4c, (byte) 0x6a, (byte) 0x61, (byte) 0x76, (byte) 0x61, (byte) 0x2f, (byte) 0x6c, (byte) 0x61, (byte) 0x6e, (byte) 0x67, (byte) 0x2f, (byte) 0x53,
- (byte) 0x74, (byte) 0x61, (byte) 0x63, (byte) 0x6b, (byte) 0x54, (byte) 0x72, (byte) 0x61, (byte) 0x63, (byte) 0x65, (byte) 0x45, (byte) 0x6c, (byte) 0x65, (byte) 0x6d, (byte) 0x65, (byte) 0x6e, (byte) 0x74, (byte) 0x3b, (byte) 0x4c, (byte) 0x0, (byte) 0x14, (byte) 0x73, (byte) 0x75, (byte) 0x70, (byte) 0x70, (byte) 0x72, (byte) 0x65, (byte) 0x73, (byte) 0x73, (byte) 0x65, (byte) 0x64, (byte) 0x45, (byte) 0x78,
- (byte) 0x63, (byte) 0x65, (byte) 0x70, (byte) 0x74, (byte) 0x69, (byte) 0x6f, (byte) 0x6e, (byte) 0x73, (byte) 0x74, (byte) 0x0, (byte) 0x10, (byte) 0x4c, (byte) 0x6a, (byte) 0x61, (byte) 0x76, (byte) 0x61, (byte) 0x2f, (byte) 0x75, (byte) 0x74, (byte) 0x69, (byte) 0x6c, (byte) 0x2f, (byte) 0x4c, (byte) 0x69, (byte) 0x73, (byte) 0x74, (byte) 0x3b, (byte) 0x78, (byte) 0x70, (byte) 0x70, (byte) 0x74, (byte) 0x0,
- (byte) 0x6, (byte) 0x72, (byte) 0x65, (byte) 0x61, (byte) 0x73, (byte) 0x6f, (byte) 0x6e, (byte) 0x75, (byte) 0x72, (byte) 0x0, (byte) 0x1e, (byte) 0x5b, (byte) 0x4c, (byte) 0x6a, (byte) 0x61, (byte) 0x76, (byte) 0x61, (byte) 0x2e, (byte) 0x6c, (byte) 0x61, (byte) 0x6e, (byte) 0x67, (byte) 0x2e, (byte) 0x53, (byte) 0x74, (byte) 0x61, (byte) 0x63, (byte) 0x6b, (byte) 0x54, (byte) 0x72, (byte) 0x61, (byte) 0x63,
- (byte) 0x65, (byte) 0x45, (byte) 0x6c, (byte) 0x65, (byte) 0x6d, (byte) 0x65, (byte) 0x6e, (byte) 0x74, (byte) 0x3b, (byte) 0x2, (byte) 0x46, (byte) 0x2a, (byte) 0x3c, (byte) 0x3c, (byte) 0xfd, (byte) 0x22, (byte) 0x39, (byte) 0x2, (byte) 0x0, (byte) 0x0, (byte) 0x78, (byte) 0x70, (byte) 0x0, (byte) 0x0, (byte) 0x0, (byte) 0x2, (byte) 0x73, (byte) 0x72, (byte) 0x0, (byte) 0x1b, (byte) 0x6a, (byte) 0x61,
- (byte) 0x76, (byte) 0x61, (byte) 0x2e, (byte) 0x6c, (byte) 0x61, (byte) 0x6e, (byte) 0x67, (byte) 0x2e, (byte) 0x53, (byte) 0x74, (byte) 0x61, (byte) 0x63, (byte) 0x6b, (byte) 0x54, (byte) 0x72, (byte) 0x61, (byte) 0x63, (byte) 0x65, (byte) 0x45, (byte) 0x6c, (byte) 0x65, (byte) 0x6d, (byte) 0x65, (byte) 0x6e, (byte) 0x74, (byte) 0x61, (byte) 0x9, (byte) 0xc5, (byte) 0x9a, (byte) 0x26, (byte) 0x36, (byte) 0xdd,
- (byte) 0x85, (byte) 0x2, (byte) 0x0, (byte) 0x4, (byte) 0x49, (byte) 0x0, (byte) 0xa, (byte) 0x6c, (byte) 0x69, (byte) 0x6e, (byte) 0x65, (byte) 0x4e, (byte) 0x75, (byte) 0x6d, (byte) 0x62, (byte) 0x65, (byte) 0x72, (byte) 0x4c, (byte) 0x0, (byte) 0xe, (byte) 0x64, (byte) 0x65, (byte) 0x63, (byte) 0x6c, (byte) 0x61, (byte) 0x72, (byte) 0x69, (byte) 0x6e, (byte) 0x67, (byte) 0x43, (byte) 0x6c, (byte) 0x61,
- (byte) 0x73, (byte) 0x73, (byte) 0x71, (byte) 0x0, (byte) 0x7e, (byte) 0x0, (byte) 0x6, (byte) 0x4c, (byte) 0x0, (byte) 0x8, (byte) 0x66, (byte) 0x69, (byte) 0x6c, (byte) 0x65, (byte) 0x4e, (byte) 0x61, (byte) 0x6d, (byte) 0x65, (byte) 0x71, (byte) 0x0, (byte) 0x7e, (byte) 0x0, (byte) 0x6, (byte) 0x4c, (byte) 0x0, (byte) 0xa, (byte) 0x6d, (byte) 0x65, (byte) 0x74, (byte) 0x68, (byte) 0x6f, (byte) 0x64,
- (byte) 0x4e, (byte) 0x61, (byte) 0x6d, (byte) 0x65, (byte) 0x71, (byte) 0x0, (byte) 0x7e, (byte) 0x0, (byte) 0x6, (byte) 0x78, (byte) 0x70, (byte) 0x0, (byte) 0x0, (byte) 0x0, (byte) 0x3e, (byte) 0x74, (byte) 0x0, (byte) 0x10, (byte) 0x57, (byte) 0x72, (byte) 0x69, (byte) 0x74, (byte) 0x65, (byte) 0x53, (byte) 0x65, (byte) 0x72, (byte) 0x69, (byte) 0x61, (byte) 0x6c, (byte) 0x44, (byte) 0x61, (byte) 0x74,
- (byte) 0x61, (byte) 0x31, (byte) 0x74, (byte) 0x0, (byte) 0x15, (byte) 0x57, (byte) 0x72, (byte) 0x69, (byte) 0x74, (byte) 0x65, (byte) 0x53, (byte) 0x65, (byte) 0x72, (byte) 0x69, (byte) 0x61, (byte) 0x6c, (byte) 0x44, (byte) 0x61, (byte) 0x74, (byte) 0x61, (byte) 0x31, (byte) 0x2e, (byte) 0x6a, (byte) 0x61, (byte) 0x76, (byte) 0x61, (byte) 0x74, (byte) 0x0, (byte) 0x3, (byte) 0x72, (byte) 0x75, (byte) 0x6e,
- (byte) 0x73, (byte) 0x71, (byte) 0x0, (byte) 0x7e, (byte) 0x0, (byte) 0xd, (byte) 0x0, (byte) 0x0, (byte) 0x0, (byte) 0x24, (byte) 0x71, (byte) 0x0, (byte) 0x7e, (byte) 0x0, (byte) 0xf, (byte) 0x71, (byte) 0x0, (byte) 0x7e, (byte) 0x0, (byte) 0x10, (byte) 0x74, (byte) 0x0, (byte) 0x4, (byte) 0x6d, (byte) 0x61, (byte) 0x69, (byte) 0x6e, (byte) 0x73, (byte) 0x72, (byte) 0x0, (byte) 0x26, (byte) 0x6a,
- (byte) 0x61, (byte) 0x76, (byte) 0x61, (byte) 0x2e, (byte) 0x75, (byte) 0x74, (byte) 0x69, (byte) 0x6c, (byte) 0x2e, (byte) 0x43, (byte) 0x6f, (byte) 0x6c, (byte) 0x6c, (byte) 0x65, (byte) 0x63, (byte) 0x74, (byte) 0x69, (byte) 0x6f, (byte) 0x6e, (byte) 0x73, (byte) 0x24, (byte) 0x55, (byte) 0x6e, (byte) 0x6d, (byte) 0x6f, (byte) 0x64, (byte) 0x69, (byte) 0x66, (byte) 0x69, (byte) 0x61, (byte) 0x62, (byte) 0x6c,
- (byte) 0x65, (byte) 0x4c, (byte) 0x69, (byte) 0x73, (byte) 0x74, (byte) 0xfc, (byte) 0xf, (byte) 0x25, (byte) 0x31, (byte) 0xb5, (byte) 0xec, (byte) 0x8e, (byte) 0x10, (byte) 0x2, (byte) 0x0, (byte) 0x1, (byte) 0x4c, (byte) 0x0, (byte) 0x4, (byte) 0x6c, (byte) 0x69, (byte) 0x73, (byte) 0x74, (byte) 0x71, (byte) 0x0, (byte) 0x7e, (byte) 0x0, (byte) 0x8, (byte) 0x78, (byte) 0x72, (byte) 0x0, (byte) 0x2c,
- (byte) 0x6a, (byte) 0x61, (byte) 0x76, (byte) 0x61, (byte) 0x2e, (byte) 0x75, (byte) 0x74, (byte) 0x69, (byte) 0x6c, (byte) 0x2e, (byte) 0x43, (byte) 0x6f, (byte) 0x6c, (byte) 0x6c, (byte) 0x65, (byte) 0x63, (byte) 0x74, (byte) 0x69, (byte) 0x6f, (byte) 0x6e, (byte) 0x73, (byte) 0x24, (byte) 0x55, (byte) 0x6e, (byte) 0x6d, (byte) 0x6f, (byte) 0x64, (byte) 0x69, (byte) 0x66, (byte) 0x69, (byte) 0x61, (byte) 0x62,
- (byte) 0x6c, (byte) 0x65, (byte) 0x43, (byte) 0x6f, (byte) 0x6c, (byte) 0x6c, (byte) 0x65, (byte) 0x63, (byte) 0x74, (byte) 0x69, (byte) 0x6f, (byte) 0x6e, (byte) 0x19, (byte) 0x42, (byte) 0x0, (byte) 0x80, (byte) 0xcb, (byte) 0x5e, (byte) 0xf7, (byte) 0x1e, (byte) 0x2, (byte) 0x0, (byte) 0x1, (byte) 0x4c, (byte) 0x0, (byte) 0x1, (byte) 0x63, (byte) 0x74, (byte) 0x0, (byte) 0x16, (byte) 0x4c, (byte) 0x6a,
- (byte) 0x61, (byte) 0x76, (byte) 0x61, (byte) 0x2f, (byte) 0x75, (byte) 0x74, (byte) 0x69, (byte) 0x6c, (byte) 0x2f, (byte) 0x43, (byte) 0x6f, (byte) 0x6c, (byte) 0x6c, (byte) 0x65, (byte) 0x63, (byte) 0x74, (byte) 0x69, (byte) 0x6f, (byte) 0x6e, (byte) 0x3b, (byte) 0x78, (byte) 0x70, (byte) 0x73, (byte) 0x72, (byte) 0x0, (byte) 0x13, (byte) 0x6a, (byte) 0x61, (byte) 0x76, (byte) 0x61, (byte) 0x2e, (byte) 0x75,
- (byte) 0x74, (byte) 0x69, (byte) 0x6c, (byte) 0x2e, (byte) 0x41, (byte) 0x72, (byte) 0x72, (byte) 0x61, (byte) 0x79, (byte) 0x4c, (byte) 0x69, (byte) 0x73, (byte) 0x74, (byte) 0x78, (byte) 0x81, (byte) 0xd2, (byte) 0x1d, (byte) 0x99, (byte) 0xc7, (byte) 0x61, (byte) 0x9d, (byte) 0x3, (byte) 0x0, (byte) 0x1, (byte) 0x49, (byte) 0x0, (byte) 0x4, (byte) 0x73, (byte) 0x69, (byte) 0x7a, (byte) 0x65, (byte) 0x78,
- (byte) 0x70, (byte) 0x0, (byte) 0x0, (byte) 0x0, (byte) 0x0, (byte) 0x77, (byte) 0x4, (byte) 0x0, (byte) 0x0, (byte) 0x0, (byte) 0x0, (byte) 0x78, (byte) 0x71, (byte) 0x0, (byte) 0x7e, (byte) 0x0, (byte) 0x19, (byte) 0x78, (byte) 0x70
- };
-
-}
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/test/jdk/javax/transaction/xa/testng/Driver.java Mon Mar 05 13:11:21 2018 -0800
@@ -0,0 +1,33 @@
+/*
+ * Copyright (c) 2016, 2018, Oracle and/or its affiliates. All rights reserved.
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * This code is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU General Public License version 2 only, as
+ * published by the Free Software Foundation.
+ *
+ * This code is distributed in the hope that it will be useful, but WITHOUT
+ * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
+ * version 2 for more details (a copy is included in the LICENSE file that
+ * accompanied this code).
+ *
+ * You should have received a copy of the GNU General Public License version
+ * 2 along with this work; if not, write to the Free Software Foundation,
+ * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
+ *
+ * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
+ * or visit www.oracle.com if you need additional information or have any
+ * questions.
+ */
+
+/**
+ * @test
+ * @modules java.transaction.xa
+ * @compile
+ * test/transaction/XAExceptionTests.java
+ * util/SerializedTransactionExceptions.java
+ * @run testng/othervm Driver
+ */
+public class Driver extends test.transaction.XAExceptionTests {
+}
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/test/jdk/javax/transaction/xa/testng/JavaSqlModuleDriver.java Mon Mar 05 13:11:21 2018 -0800
@@ -0,0 +1,33 @@
+/*
+ * Copyright (c) 2018, Oracle and/or its affiliates. All rights reserved.
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * This code is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU General Public License version 2 only, as
+ * published by the Free Software Foundation.
+ *
+ * This code is distributed in the hope that it will be useful, but WITHOUT
+ * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
+ * version 2 for more details (a copy is included in the LICENSE file that
+ * accompanied this code).
+ *
+ * You should have received a copy of the GNU General Public License version
+ * 2 along with this work; if not, write to the Free Software Foundation,
+ * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
+ *
+ * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
+ * or visit www.oracle.com if you need additional information or have any
+ * questions.
+ */
+
+/**
+ * @test
+ * @modules java.sql
+ * @compile
+ * test/transaction/XAExceptionTests.java
+ * util/SerializedTransactionExceptions.java
+ * @run testng/othervm JavaSqlModuleDriver
+ */
+public class JavaSqlModuleDriver extends test.transaction.XAExceptionTests {
+}
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/test/jdk/javax/transaction/xa/testng/test/transaction/XAExceptionTests.java Mon Mar 05 13:11:21 2018 -0800
@@ -0,0 +1,98 @@
+/*
+ * Copyright (c) 2015, Oracle and/or its affiliates. All rights reserved.
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * This code is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU General Public License version 2 only, as
+ * published by the Free Software Foundation.
+ *
+ * This code is distributed in the hope that it will be useful, but WITHOUT
+ * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
+ * version 2 for more details (a copy is included in the LICENSE file that
+ * accompanied this code).
+ *
+ * You should have received a copy of the GNU General Public License version
+ * 2 along with this work; if not, write to the Free Software Foundation,
+ * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
+ *
+ * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
+ * or visit www.oracle.com if you need additional information or have any
+ * questions.
+ */
+package test.transaction;
+
+import java.io.ByteArrayInputStream;
+import java.io.ObjectInputStream;
+import javax.transaction.xa.XAException;
+import static org.testng.Assert.*;
+import org.testng.annotations.Test;
+import util.SerializedTransactionExceptions;
+
+public class XAExceptionTests {
+
+ protected final String reason = "reason";
+
+ /**
+ * Create XAException with no-arg constructor
+ */
+ @Test
+ public void test1() {
+ XAException ex = new XAException();
+ assertTrue(ex.getMessage() == null
+ && ex.getCause() == null
+ && ex.errorCode == 0);
+ }
+
+ /**
+ * Create XAException with message
+ */
+ @Test
+ public void test2() {
+ XAException ex = new XAException(reason);
+ assertTrue(ex.getMessage().equals(reason)
+ && ex.getCause() == null
+ && ex.errorCode == 0);
+ }
+
+ /**
+ * De-Serialize a XAException from JDBC 4.0 and make sure you can read it
+ * back properly
+ */
+ @Test
+ public void test3() throws Exception {
+
+ ObjectInputStream ois = new ObjectInputStream(
+ new ByteArrayInputStream(SerializedTransactionExceptions.XAE_DATA));
+ XAException ex = (XAException) ois.readObject();
+ assertTrue(reason.equals(ex.getMessage())
+ && ex.getCause() == null
+ && ex.errorCode == 0);
+ }
+
+ /**
+ * Create TransactionRolledbackException specifying an error code
+ */
+ @Test
+ public void test4() {
+ int error = 21;
+ XAException ex = new XAException(error);
+ assertTrue(ex.getMessage() == null
+ && ex.getCause() == null
+ && ex.errorCode == error);
+ }
+
+ /**
+ * Create TransactionRolledbackException specifying an error code
+ */
+ @Test
+ public void test5() {
+ int error = 21;
+ XAException ex = new XAException(error);
+ ex.errorCode = error;
+ assertTrue(ex.getMessage() == null
+ && ex.getCause() == null
+ && ex.errorCode == error);
+ }
+
+}
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/test/jdk/javax/transaction/xa/testng/util/SerializedTransactionExceptions.java Mon Mar 05 13:11:21 2018 -0800
@@ -0,0 +1,167 @@
+/*
+ * Copyright (c) 2015, Oracle and/or its affiliates. All rights reserved.
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * This code is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU General Public License version 2 only, as
+ * published by the Free Software Foundation.
+ *
+ * This code is distributed in the hope that it will be useful, but WITHOUT
+ * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
+ * version 2 for more details (a copy is included in the LICENSE file that
+ * accompanied this code).
+ *
+ * You should have received a copy of the GNU General Public License version
+ * 2 along with this work; if not, write to the Free Software Foundation,
+ * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
+ *
+ * Please 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 util;
+
+public class SerializedTransactionExceptions {
+
+ /**
+ * Serialized XAException from JDK 8 with the following values:
+ * reason = "This was the error msg"
+ * cause = null
+ */
+ public static byte[] XAE_DATA = {
+ (byte) 0xac, (byte) 0xed, (byte) 0x0, (byte) 0x5, (byte) 0x73, (byte) 0x72, (byte) 0x0, (byte) 0x20, (byte) 0x6a, (byte) 0x61, (byte) 0x76, (byte) 0x61, (byte) 0x78, (byte) 0x2e, (byte) 0x74, (byte) 0x72, (byte) 0x61, (byte) 0x6e, (byte) 0x73, (byte) 0x61, (byte) 0x63, (byte) 0x74, (byte) 0x69, (byte) 0x6f, (byte) 0x6e, (byte) 0x2e, (byte) 0x78, (byte) 0x61, (byte) 0x2e, (byte) 0x58, (byte) 0x41, (byte) 0x45,
+ (byte) 0x78, (byte) 0x63, (byte) 0x65, (byte) 0x70, (byte) 0x74, (byte) 0x69, (byte) 0x6f, (byte) 0x6e, (byte) 0x8d, (byte) 0x83, (byte) 0x3c, (byte) 0xc2, (byte) 0xda, (byte) 0xf, (byte) 0x2a, (byte) 0x59, (byte) 0x2, (byte) 0x0, (byte) 0x1, (byte) 0x49, (byte) 0x0, (byte) 0x9, (byte) 0x65, (byte) 0x72, (byte) 0x72, (byte) 0x6f, (byte) 0x72, (byte) 0x43, (byte) 0x6f, (byte) 0x64, (byte) 0x65, (byte) 0x78,
+ (byte) 0x72, (byte) 0x0, (byte) 0x13, (byte) 0x6a, (byte) 0x61, (byte) 0x76, (byte) 0x61, (byte) 0x2e, (byte) 0x6c, (byte) 0x61, (byte) 0x6e, (byte) 0x67, (byte) 0x2e, (byte) 0x45, (byte) 0x78, (byte) 0x63, (byte) 0x65, (byte) 0x70, (byte) 0x74, (byte) 0x69, (byte) 0x6f, (byte) 0x6e, (byte) 0xd0, (byte) 0xfd, (byte) 0x1f, (byte) 0x3e, (byte) 0x1a, (byte) 0x3b, (byte) 0x1c, (byte) 0xc4, (byte) 0x2, (byte) 0x0,
+ (byte) 0x0, (byte) 0x78, (byte) 0x72, (byte) 0x0, (byte) 0x13, (byte) 0x6a, (byte) 0x61, (byte) 0x76, (byte) 0x61, (byte) 0x2e, (byte) 0x6c, (byte) 0x61, (byte) 0x6e, (byte) 0x67, (byte) 0x2e, (byte) 0x54, (byte) 0x68, (byte) 0x72, (byte) 0x6f, (byte) 0x77, (byte) 0x61, (byte) 0x62, (byte) 0x6c, (byte) 0x65, (byte) 0xd5, (byte) 0xc6, (byte) 0x35, (byte) 0x27, (byte) 0x39, (byte) 0x77, (byte) 0xb8, (byte) 0xcb,
+ (byte) 0x3, (byte) 0x0, (byte) 0x4, (byte) 0x4c, (byte) 0x0, (byte) 0x5, (byte) 0x63, (byte) 0x61, (byte) 0x75, (byte) 0x73, (byte) 0x65, (byte) 0x74, (byte) 0x0, (byte) 0x15, (byte) 0x4c, (byte) 0x6a, (byte) 0x61, (byte) 0x76, (byte) 0x61, (byte) 0x2f, (byte) 0x6c, (byte) 0x61, (byte) 0x6e, (byte) 0x67, (byte) 0x2f, (byte) 0x54, (byte) 0x68, (byte) 0x72, (byte) 0x6f, (byte) 0x77, (byte) 0x61, (byte) 0x62,
+ (byte) 0x6c, (byte) 0x65, (byte) 0x3b, (byte) 0x4c, (byte) 0x0, (byte) 0xd, (byte) 0x64, (byte) 0x65, (byte) 0x74, (byte) 0x61, (byte) 0x69, (byte) 0x6c, (byte) 0x4d, (byte) 0x65, (byte) 0x73, (byte) 0x73, (byte) 0x61, (byte) 0x67, (byte) 0x65, (byte) 0x74, (byte) 0x0, (byte) 0x12, (byte) 0x4c, (byte) 0x6a, (byte) 0x61, (byte) 0x76, (byte) 0x61, (byte) 0x2f, (byte) 0x6c, (byte) 0x61, (byte) 0x6e, (byte) 0x67,
+ (byte) 0x2f, (byte) 0x53, (byte) 0x74, (byte) 0x72, (byte) 0x69, (byte) 0x6e, (byte) 0x67, (byte) 0x3b, (byte) 0x5b, (byte) 0x0, (byte) 0xa, (byte) 0x73, (byte) 0x74, (byte) 0x61, (byte) 0x63, (byte) 0x6b, (byte) 0x54, (byte) 0x72, (byte) 0x61, (byte) 0x63, (byte) 0x65, (byte) 0x74, (byte) 0x0, (byte) 0x1e, (byte) 0x5b, (byte) 0x4c, (byte) 0x6a, (byte) 0x61, (byte) 0x76, (byte) 0x61, (byte) 0x2f, (byte) 0x6c,
+ (byte) 0x61, (byte) 0x6e, (byte) 0x67, (byte) 0x2f, (byte) 0x53, (byte) 0x74, (byte) 0x61, (byte) 0x63, (byte) 0x6b, (byte) 0x54, (byte) 0x72, (byte) 0x61, (byte) 0x63, (byte) 0x65, (byte) 0x45, (byte) 0x6c, (byte) 0x65, (byte) 0x6d, (byte) 0x65, (byte) 0x6e, (byte) 0x74, (byte) 0x3b, (byte) 0x4c, (byte) 0x0, (byte) 0x14, (byte) 0x73, (byte) 0x75, (byte) 0x70, (byte) 0x70, (byte) 0x72, (byte) 0x65, (byte) 0x73,
+ (byte) 0x73, (byte) 0x65, (byte) 0x64, (byte) 0x45, (byte) 0x78, (byte) 0x63, (byte) 0x65, (byte) 0x70, (byte) 0x74, (byte) 0x69, (byte) 0x6f, (byte) 0x6e, (byte) 0x73, (byte) 0x74, (byte) 0x0, (byte) 0x10, (byte) 0x4c, (byte) 0x6a, (byte) 0x61, (byte) 0x76, (byte) 0x61, (byte) 0x2f, (byte) 0x75, (byte) 0x74, (byte) 0x69, (byte) 0x6c, (byte) 0x2f, (byte) 0x4c, (byte) 0x69, (byte) 0x73, (byte) 0x74, (byte) 0x3b,
+ (byte) 0x78, (byte) 0x70, (byte) 0x71, (byte) 0x0, (byte) 0x7e, (byte) 0x0, (byte) 0x7, (byte) 0x74, (byte) 0x0, (byte) 0x6, (byte) 0x72, (byte) 0x65, (byte) 0x61, (byte) 0x73, (byte) 0x6f, (byte) 0x6e, (byte) 0x75, (byte) 0x72, (byte) 0x0, (byte) 0x1e, (byte) 0x5b, (byte) 0x4c, (byte) 0x6a, (byte) 0x61, (byte) 0x76, (byte) 0x61, (byte) 0x2e, (byte) 0x6c, (byte) 0x61, (byte) 0x6e, (byte) 0x67, (byte) 0x2e,
+ (byte) 0x53, (byte) 0x74, (byte) 0x61, (byte) 0x63, (byte) 0x6b, (byte) 0x54, (byte) 0x72, (byte) 0x61, (byte) 0x63, (byte) 0x65, (byte) 0x45, (byte) 0x6c, (byte) 0x65, (byte) 0x6d, (byte) 0x65, (byte) 0x6e, (byte) 0x74, (byte) 0x3b, (byte) 0x2, (byte) 0x46, (byte) 0x2a, (byte) 0x3c, (byte) 0x3c, (byte) 0xfd, (byte) 0x22, (byte) 0x39, (byte) 0x2, (byte) 0x0, (byte) 0x0, (byte) 0x78, (byte) 0x70, (byte) 0x0,
+ (byte) 0x0, (byte) 0x0, (byte) 0x2, (byte) 0x73, (byte) 0x72, (byte) 0x0, (byte) 0x1b, (byte) 0x6a, (byte) 0x61, (byte) 0x76, (byte) 0x61, (byte) 0x2e, (byte) 0x6c, (byte) 0x61, (byte) 0x6e, (byte) 0x67, (byte) 0x2e, (byte) 0x53, (byte) 0x74, (byte) 0x61, (byte) 0x63, (byte) 0x6b, (byte) 0x54, (byte) 0x72, (byte) 0x61, (byte) 0x63, (byte) 0x65, (byte) 0x45, (byte) 0x6c, (byte) 0x65, (byte) 0x6d, (byte) 0x65,
+ (byte) 0x6e, (byte) 0x74, (byte) 0x61, (byte) 0x9, (byte) 0xc5, (byte) 0x9a, (byte) 0x26, (byte) 0x36, (byte) 0xdd, (byte) 0x85, (byte) 0x2, (byte) 0x0, (byte) 0x4, (byte) 0x49, (byte) 0x0, (byte) 0xa, (byte) 0x6c, (byte) 0x69, (byte) 0x6e, (byte) 0x65, (byte) 0x4e, (byte) 0x75, (byte) 0x6d, (byte) 0x62, (byte) 0x65, (byte) 0x72, (byte) 0x4c, (byte) 0x0, (byte) 0xe, (byte) 0x64, (byte) 0x65, (byte) 0x63,
+ (byte) 0x6c, (byte) 0x61, (byte) 0x72, (byte) 0x69, (byte) 0x6e, (byte) 0x67, (byte) 0x43, (byte) 0x6c, (byte) 0x61, (byte) 0x73, (byte) 0x73, (byte) 0x71, (byte) 0x0, (byte) 0x7e, (byte) 0x0, (byte) 0x4, (byte) 0x4c, (byte) 0x0, (byte) 0x8, (byte) 0x66, (byte) 0x69, (byte) 0x6c, (byte) 0x65, (byte) 0x4e, (byte) 0x61, (byte) 0x6d, (byte) 0x65, (byte) 0x71, (byte) 0x0, (byte) 0x7e, (byte) 0x0, (byte) 0x4,
+ (byte) 0x4c, (byte) 0x0, (byte) 0xa, (byte) 0x6d, (byte) 0x65, (byte) 0x74, (byte) 0x68, (byte) 0x6f, (byte) 0x64, (byte) 0x4e, (byte) 0x61, (byte) 0x6d, (byte) 0x65, (byte) 0x71, (byte) 0x0, (byte) 0x7e, (byte) 0x0, (byte) 0x4, (byte) 0x78, (byte) 0x70, (byte) 0x0, (byte) 0x0, (byte) 0x0, (byte) 0x39, (byte) 0x74, (byte) 0x0, (byte) 0x10, (byte) 0x57, (byte) 0x72, (byte) 0x69, (byte) 0x74, (byte) 0x65,
+ (byte) 0x53, (byte) 0x65, (byte) 0x72, (byte) 0x69, (byte) 0x61, (byte) 0x6c, (byte) 0x44, (byte) 0x61, (byte) 0x74, (byte) 0x61, (byte) 0x31, (byte) 0x74, (byte) 0x0, (byte) 0x15, (byte) 0x57, (byte) 0x72, (byte) 0x69, (byte) 0x74, (byte) 0x65, (byte) 0x53, (byte) 0x65, (byte) 0x72, (byte) 0x69, (byte) 0x61, (byte) 0x6c, (byte) 0x44, (byte) 0x61, (byte) 0x74, (byte) 0x61, (byte) 0x31, (byte) 0x2e, (byte) 0x6a,
+ (byte) 0x61, (byte) 0x76, (byte) 0x61, (byte) 0x74, (byte) 0x0, (byte) 0x3, (byte) 0x72, (byte) 0x75, (byte) 0x6e, (byte) 0x73, (byte) 0x71, (byte) 0x0, (byte) 0x7e, (byte) 0x0, (byte) 0xb, (byte) 0x0, (byte) 0x0, (byte) 0x0, (byte) 0x24, (byte) 0x71, (byte) 0x0, (byte) 0x7e, (byte) 0x0, (byte) 0xd, (byte) 0x71, (byte) 0x0, (byte) 0x7e, (byte) 0x0, (byte) 0xe, (byte) 0x74, (byte) 0x0, (byte) 0x4,
+ (byte) 0x6d, (byte) 0x61, (byte) 0x69, (byte) 0x6e, (byte) 0x73, (byte) 0x72, (byte) 0x0, (byte) 0x26, (byte) 0x6a, (byte) 0x61, (byte) 0x76, (byte) 0x61, (byte) 0x2e, (byte) 0x75, (byte) 0x74, (byte) 0x69, (byte) 0x6c, (byte) 0x2e, (byte) 0x43, (byte) 0x6f, (byte) 0x6c, (byte) 0x6c, (byte) 0x65, (byte) 0x63, (byte) 0x74, (byte) 0x69, (byte) 0x6f, (byte) 0x6e, (byte) 0x73, (byte) 0x24, (byte) 0x55, (byte) 0x6e,
+ (byte) 0x6d, (byte) 0x6f, (byte) 0x64, (byte) 0x69, (byte) 0x66, (byte) 0x69, (byte) 0x61, (byte) 0x62, (byte) 0x6c, (byte) 0x65, (byte) 0x4c, (byte) 0x69, (byte) 0x73, (byte) 0x74, (byte) 0xfc, (byte) 0xf, (byte) 0x25, (byte) 0x31, (byte) 0xb5, (byte) 0xec, (byte) 0x8e, (byte) 0x10, (byte) 0x2, (byte) 0x0, (byte) 0x1, (byte) 0x4c, (byte) 0x0, (byte) 0x4, (byte) 0x6c, (byte) 0x69, (byte) 0x73, (byte) 0x74,
+ (byte) 0x71, (byte) 0x0, (byte) 0x7e, (byte) 0x0, (byte) 0x6, (byte) 0x78, (byte) 0x72, (byte) 0x0, (byte) 0x2c, (byte) 0x6a, (byte) 0x61, (byte) 0x76, (byte) 0x61, (byte) 0x2e, (byte) 0x75, (byte) 0x74, (byte) 0x69, (byte) 0x6c, (byte) 0x2e, (byte) 0x43, (byte) 0x6f, (byte) 0x6c, (byte) 0x6c, (byte) 0x65, (byte) 0x63, (byte) 0x74, (byte) 0x69, (byte) 0x6f, (byte) 0x6e, (byte) 0x73, (byte) 0x24, (byte) 0x55,
+ (byte) 0x6e, (byte) 0x6d, (byte) 0x6f, (byte) 0x64, (byte) 0x69, (byte) 0x66, (byte) 0x69, (byte) 0x61, (byte) 0x62, (byte) 0x6c, (byte) 0x65, (byte) 0x43, (byte) 0x6f, (byte) 0x6c, (byte) 0x6c, (byte) 0x65, (byte) 0x63, (byte) 0x74, (byte) 0x69, (byte) 0x6f, (byte) 0x6e, (byte) 0x19, (byte) 0x42, (byte) 0x0, (byte) 0x80, (byte) 0xcb, (byte) 0x5e, (byte) 0xf7, (byte) 0x1e, (byte) 0x2, (byte) 0x0, (byte) 0x1,
+ (byte) 0x4c, (byte) 0x0, (byte) 0x1, (byte) 0x63, (byte) 0x74, (byte) 0x0, (byte) 0x16, (byte) 0x4c, (byte) 0x6a, (byte) 0x61, (byte) 0x76, (byte) 0x61, (byte) 0x2f, (byte) 0x75, (byte) 0x74, (byte) 0x69, (byte) 0x6c, (byte) 0x2f, (byte) 0x43, (byte) 0x6f, (byte) 0x6c, (byte) 0x6c, (byte) 0x65, (byte) 0x63, (byte) 0x74, (byte) 0x69, (byte) 0x6f, (byte) 0x6e, (byte) 0x3b, (byte) 0x78, (byte) 0x70, (byte) 0x73,
+ (byte) 0x72, (byte) 0x0, (byte) 0x13, (byte) 0x6a, (byte) 0x61, (byte) 0x76, (byte) 0x61, (byte) 0x2e, (byte) 0x75, (byte) 0x74, (byte) 0x69, (byte) 0x6c, (byte) 0x2e, (byte) 0x41, (byte) 0x72, (byte) 0x72, (byte) 0x61, (byte) 0x79, (byte) 0x4c, (byte) 0x69, (byte) 0x73, (byte) 0x74, (byte) 0x78, (byte) 0x81, (byte) 0xd2, (byte) 0x1d, (byte) 0x99, (byte) 0xc7, (byte) 0x61, (byte) 0x9d, (byte) 0x3, (byte) 0x0,
+ (byte) 0x1, (byte) 0x49, (byte) 0x0, (byte) 0x4, (byte) 0x73, (byte) 0x69, (byte) 0x7a, (byte) 0x65, (byte) 0x78, (byte) 0x70, (byte) 0x0, (byte) 0x0, (byte) 0x0, (byte) 0x0, (byte) 0x77, (byte) 0x4, (byte) 0x0, (byte) 0x0, (byte) 0x0, (byte) 0x0, (byte) 0x78, (byte) 0x71, (byte) 0x0, (byte) 0x7e, (byte) 0x0, (byte) 0x17, (byte) 0x78, (byte) 0x0, (byte) 0x0, (byte) 0x0, (byte) 0x0
+ };
+
+ /**
+ * Serialized InvalidTransactionException from JDK 8 with the following
+ * values:
+ * reason = "This was the error msg"
+ * cause = null
+ */
+ public static byte[] ITE_DATA = {
+ (byte) 0xac, (byte) 0xed, (byte) 0x0, (byte) 0x5, (byte) 0x73, (byte) 0x72, (byte) 0x0, (byte) 0x2d, (byte) 0x6a, (byte) 0x61, (byte) 0x76, (byte) 0x61, (byte) 0x78, (byte) 0x2e, (byte) 0x74, (byte) 0x72, (byte) 0x61, (byte) 0x6e, (byte) 0x73, (byte) 0x61, (byte) 0x63, (byte) 0x74, (byte) 0x69, (byte) 0x6f, (byte) 0x6e, (byte) 0x2e, (byte) 0x49, (byte) 0x6e, (byte) 0x76, (byte) 0x61, (byte) 0x6c, (byte) 0x69,
+ (byte) 0x64, (byte) 0x54, (byte) 0x72, (byte) 0x61, (byte) 0x6e, (byte) 0x73, (byte) 0x61, (byte) 0x63, (byte) 0x74, (byte) 0x69, (byte) 0x6f, (byte) 0x6e, (byte) 0x45, (byte) 0x78, (byte) 0x63, (byte) 0x65, (byte) 0x70, (byte) 0x74, (byte) 0x69, (byte) 0x6f, (byte) 0x6e, (byte) 0x31, (byte) 0xec, (byte) 0x3f, (byte) 0xae, (byte) 0x54, (byte) 0x8e, (byte) 0xdb, (byte) 0x68, (byte) 0x2, (byte) 0x0, (byte) 0x0,
+ (byte) 0x78, (byte) 0x72, (byte) 0x0, (byte) 0x18, (byte) 0x6a, (byte) 0x61, (byte) 0x76, (byte) 0x61, (byte) 0x2e, (byte) 0x72, (byte) 0x6d, (byte) 0x69, (byte) 0x2e, (byte) 0x52, (byte) 0x65, (byte) 0x6d, (byte) 0x6f, (byte) 0x74, (byte) 0x65, (byte) 0x45, (byte) 0x78, (byte) 0x63, (byte) 0x65, (byte) 0x70, (byte) 0x74, (byte) 0x69, (byte) 0x6f, (byte) 0x6e, (byte) 0xb8, (byte) 0x8c, (byte) 0x9d, (byte) 0x4e,
+ (byte) 0xde, (byte) 0xe4, (byte) 0x7a, (byte) 0x22, (byte) 0x2, (byte) 0x0, (byte) 0x1, (byte) 0x4c, (byte) 0x0, (byte) 0x6, (byte) 0x64, (byte) 0x65, (byte) 0x74, (byte) 0x61, (byte) 0x69, (byte) 0x6c, (byte) 0x74, (byte) 0x0, (byte) 0x15, (byte) 0x4c, (byte) 0x6a, (byte) 0x61, (byte) 0x76, (byte) 0x61, (byte) 0x2f, (byte) 0x6c, (byte) 0x61, (byte) 0x6e, (byte) 0x67, (byte) 0x2f, (byte) 0x54, (byte) 0x68,
+ (byte) 0x72, (byte) 0x6f, (byte) 0x77, (byte) 0x61, (byte) 0x62, (byte) 0x6c, (byte) 0x65, (byte) 0x3b, (byte) 0x78, (byte) 0x72, (byte) 0x0, (byte) 0x13, (byte) 0x6a, (byte) 0x61, (byte) 0x76, (byte) 0x61, (byte) 0x2e, (byte) 0x69, (byte) 0x6f, (byte) 0x2e, (byte) 0x49, (byte) 0x4f, (byte) 0x45, (byte) 0x78, (byte) 0x63, (byte) 0x65, (byte) 0x70, (byte) 0x74, (byte) 0x69, (byte) 0x6f, (byte) 0x6e, (byte) 0x6c,
+ (byte) 0x80, (byte) 0x73, (byte) 0x64, (byte) 0x65, (byte) 0x25, (byte) 0xf0, (byte) 0xab, (byte) 0x2, (byte) 0x0, (byte) 0x0, (byte) 0x78, (byte) 0x72, (byte) 0x0, (byte) 0x13, (byte) 0x6a, (byte) 0x61, (byte) 0x76, (byte) 0x61, (byte) 0x2e, (byte) 0x6c, (byte) 0x61, (byte) 0x6e, (byte) 0x67, (byte) 0x2e, (byte) 0x45, (byte) 0x78, (byte) 0x63, (byte) 0x65, (byte) 0x70, (byte) 0x74, (byte) 0x69, (byte) 0x6f,
+ (byte) 0x6e, (byte) 0xd0, (byte) 0xfd, (byte) 0x1f, (byte) 0x3e, (byte) 0x1a, (byte) 0x3b, (byte) 0x1c, (byte) 0xc4, (byte) 0x2, (byte) 0x0, (byte) 0x0, (byte) 0x78, (byte) 0x72, (byte) 0x0, (byte) 0x13, (byte) 0x6a, (byte) 0x61, (byte) 0x76, (byte) 0x61, (byte) 0x2e, (byte) 0x6c, (byte) 0x61, (byte) 0x6e, (byte) 0x67, (byte) 0x2e, (byte) 0x54, (byte) 0x68, (byte) 0x72, (byte) 0x6f, (byte) 0x77, (byte) 0x61,
+ (byte) 0x62, (byte) 0x6c, (byte) 0x65, (byte) 0xd5, (byte) 0xc6, (byte) 0x35, (byte) 0x27, (byte) 0x39, (byte) 0x77, (byte) 0xb8, (byte) 0xcb, (byte) 0x3, (byte) 0x0, (byte) 0x4, (byte) 0x4c, (byte) 0x0, (byte) 0x5, (byte) 0x63, (byte) 0x61, (byte) 0x75, (byte) 0x73, (byte) 0x65, (byte) 0x71, (byte) 0x0, (byte) 0x7e, (byte) 0x0, (byte) 0x2, (byte) 0x4c, (byte) 0x0, (byte) 0xd, (byte) 0x64, (byte) 0x65,
+ (byte) 0x74, (byte) 0x61, (byte) 0x69, (byte) 0x6c, (byte) 0x4d, (byte) 0x65, (byte) 0x73, (byte) 0x73, (byte) 0x61, (byte) 0x67, (byte) 0x65, (byte) 0x74, (byte) 0x0, (byte) 0x12, (byte) 0x4c, (byte) 0x6a, (byte) 0x61, (byte) 0x76, (byte) 0x61, (byte) 0x2f, (byte) 0x6c, (byte) 0x61, (byte) 0x6e, (byte) 0x67, (byte) 0x2f, (byte) 0x53, (byte) 0x74, (byte) 0x72, (byte) 0x69, (byte) 0x6e, (byte) 0x67, (byte) 0x3b,
+ (byte) 0x5b, (byte) 0x0, (byte) 0xa, (byte) 0x73, (byte) 0x74, (byte) 0x61, (byte) 0x63, (byte) 0x6b, (byte) 0x54, (byte) 0x72, (byte) 0x61, (byte) 0x63, (byte) 0x65, (byte) 0x74, (byte) 0x0, (byte) 0x1e, (byte) 0x5b, (byte) 0x4c, (byte) 0x6a, (byte) 0x61, (byte) 0x76, (byte) 0x61, (byte) 0x2f, (byte) 0x6c, (byte) 0x61, (byte) 0x6e, (byte) 0x67, (byte) 0x2f, (byte) 0x53, (byte) 0x74, (byte) 0x61, (byte) 0x63,
+ (byte) 0x6b, (byte) 0x54, (byte) 0x72, (byte) 0x61, (byte) 0x63, (byte) 0x65, (byte) 0x45, (byte) 0x6c, (byte) 0x65, (byte) 0x6d, (byte) 0x65, (byte) 0x6e, (byte) 0x74, (byte) 0x3b, (byte) 0x4c, (byte) 0x0, (byte) 0x14, (byte) 0x73, (byte) 0x75, (byte) 0x70, (byte) 0x70, (byte) 0x72, (byte) 0x65, (byte) 0x73, (byte) 0x73, (byte) 0x65, (byte) 0x64, (byte) 0x45, (byte) 0x78, (byte) 0x63, (byte) 0x65, (byte) 0x70,
+ (byte) 0x74, (byte) 0x69, (byte) 0x6f, (byte) 0x6e, (byte) 0x73, (byte) 0x74, (byte) 0x0, (byte) 0x10, (byte) 0x4c, (byte) 0x6a, (byte) 0x61, (byte) 0x76, (byte) 0x61, (byte) 0x2f, (byte) 0x75, (byte) 0x74, (byte) 0x69, (byte) 0x6c, (byte) 0x2f, (byte) 0x4c, (byte) 0x69, (byte) 0x73, (byte) 0x74, (byte) 0x3b, (byte) 0x78, (byte) 0x70, (byte) 0x70, (byte) 0x74, (byte) 0x0, (byte) 0x6, (byte) 0x72, (byte) 0x65,
+ (byte) 0x61, (byte) 0x73, (byte) 0x6f, (byte) 0x6e, (byte) 0x75, (byte) 0x72, (byte) 0x0, (byte) 0x1e, (byte) 0x5b, (byte) 0x4c, (byte) 0x6a, (byte) 0x61, (byte) 0x76, (byte) 0x61, (byte) 0x2e, (byte) 0x6c, (byte) 0x61, (byte) 0x6e, (byte) 0x67, (byte) 0x2e, (byte) 0x53, (byte) 0x74, (byte) 0x61, (byte) 0x63, (byte) 0x6b, (byte) 0x54, (byte) 0x72, (byte) 0x61, (byte) 0x63, (byte) 0x65, (byte) 0x45, (byte) 0x6c,
+ (byte) 0x65, (byte) 0x6d, (byte) 0x65, (byte) 0x6e, (byte) 0x74, (byte) 0x3b, (byte) 0x2, (byte) 0x46, (byte) 0x2a, (byte) 0x3c, (byte) 0x3c, (byte) 0xfd, (byte) 0x22, (byte) 0x39, (byte) 0x2, (byte) 0x0, (byte) 0x0, (byte) 0x78, (byte) 0x70, (byte) 0x0, (byte) 0x0, (byte) 0x0, (byte) 0x2, (byte) 0x73, (byte) 0x72, (byte) 0x0, (byte) 0x1b, (byte) 0x6a, (byte) 0x61, (byte) 0x76, (byte) 0x61, (byte) 0x2e,
+ (byte) 0x6c, (byte) 0x61, (byte) 0x6e, (byte) 0x67, (byte) 0x2e, (byte) 0x53, (byte) 0x74, (byte) 0x61, (byte) 0x63, (byte) 0x6b, (byte) 0x54, (byte) 0x72, (byte) 0x61, (byte) 0x63, (byte) 0x65, (byte) 0x45, (byte) 0x6c, (byte) 0x65, (byte) 0x6d, (byte) 0x65, (byte) 0x6e, (byte) 0x74, (byte) 0x61, (byte) 0x9, (byte) 0xc5, (byte) 0x9a, (byte) 0x26, (byte) 0x36, (byte) 0xdd, (byte) 0x85, (byte) 0x2, (byte) 0x0,
+ (byte) 0x4, (byte) 0x49, (byte) 0x0, (byte) 0xa, (byte) 0x6c, (byte) 0x69, (byte) 0x6e, (byte) 0x65, (byte) 0x4e, (byte) 0x75, (byte) 0x6d, (byte) 0x62, (byte) 0x65, (byte) 0x72, (byte) 0x4c, (byte) 0x0, (byte) 0xe, (byte) 0x64, (byte) 0x65, (byte) 0x63, (byte) 0x6c, (byte) 0x61, (byte) 0x72, (byte) 0x69, (byte) 0x6e, (byte) 0x67, (byte) 0x43, (byte) 0x6c, (byte) 0x61, (byte) 0x73, (byte) 0x73, (byte) 0x71,
+ (byte) 0x0, (byte) 0x7e, (byte) 0x0, (byte) 0x6, (byte) 0x4c, (byte) 0x0, (byte) 0x8, (byte) 0x66, (byte) 0x69, (byte) 0x6c, (byte) 0x65, (byte) 0x4e, (byte) 0x61, (byte) 0x6d, (byte) 0x65, (byte) 0x71, (byte) 0x0, (byte) 0x7e, (byte) 0x0, (byte) 0x6, (byte) 0x4c, (byte) 0x0, (byte) 0xa, (byte) 0x6d, (byte) 0x65, (byte) 0x74, (byte) 0x68, (byte) 0x6f, (byte) 0x64, (byte) 0x4e, (byte) 0x61, (byte) 0x6d,
+ (byte) 0x65, (byte) 0x71, (byte) 0x0, (byte) 0x7e, (byte) 0x0, (byte) 0x6, (byte) 0x78, (byte) 0x70, (byte) 0x0, (byte) 0x0, (byte) 0x0, (byte) 0x3a, (byte) 0x74, (byte) 0x0, (byte) 0x10, (byte) 0x57, (byte) 0x72, (byte) 0x69, (byte) 0x74, (byte) 0x65, (byte) 0x53, (byte) 0x65, (byte) 0x72, (byte) 0x69, (byte) 0x61, (byte) 0x6c, (byte) 0x44, (byte) 0x61, (byte) 0x74, (byte) 0x61, (byte) 0x31, (byte) 0x74,
+ (byte) 0x0, (byte) 0x15, (byte) 0x57, (byte) 0x72, (byte) 0x69, (byte) 0x74, (byte) 0x65, (byte) 0x53, (byte) 0x65, (byte) 0x72, (byte) 0x69, (byte) 0x61, (byte) 0x6c, (byte) 0x44, (byte) 0x61, (byte) 0x74, (byte) 0x61, (byte) 0x31, (byte) 0x2e, (byte) 0x6a, (byte) 0x61, (byte) 0x76, (byte) 0x61, (byte) 0x74, (byte) 0x0, (byte) 0x3, (byte) 0x72, (byte) 0x75, (byte) 0x6e, (byte) 0x73, (byte) 0x71, (byte) 0x0,
+ (byte) 0x7e, (byte) 0x0, (byte) 0xd, (byte) 0x0, (byte) 0x0, (byte) 0x0, (byte) 0x24, (byte) 0x71, (byte) 0x0, (byte) 0x7e, (byte) 0x0, (byte) 0xf, (byte) 0x71, (byte) 0x0, (byte) 0x7e, (byte) 0x0, (byte) 0x10, (byte) 0x74, (byte) 0x0, (byte) 0x4, (byte) 0x6d, (byte) 0x61, (byte) 0x69, (byte) 0x6e, (byte) 0x73, (byte) 0x72, (byte) 0x0, (byte) 0x26, (byte) 0x6a, (byte) 0x61, (byte) 0x76, (byte) 0x61,
+ (byte) 0x2e, (byte) 0x75, (byte) 0x74, (byte) 0x69, (byte) 0x6c, (byte) 0x2e, (byte) 0x43, (byte) 0x6f, (byte) 0x6c, (byte) 0x6c, (byte) 0x65, (byte) 0x63, (byte) 0x74, (byte) 0x69, (byte) 0x6f, (byte) 0x6e, (byte) 0x73, (byte) 0x24, (byte) 0x55, (byte) 0x6e, (byte) 0x6d, (byte) 0x6f, (byte) 0x64, (byte) 0x69, (byte) 0x66, (byte) 0x69, (byte) 0x61, (byte) 0x62, (byte) 0x6c, (byte) 0x65, (byte) 0x4c, (byte) 0x69,
+ (byte) 0x73, (byte) 0x74, (byte) 0xfc, (byte) 0xf, (byte) 0x25, (byte) 0x31, (byte) 0xb5, (byte) 0xec, (byte) 0x8e, (byte) 0x10, (byte) 0x2, (byte) 0x0, (byte) 0x1, (byte) 0x4c, (byte) 0x0, (byte) 0x4, (byte) 0x6c, (byte) 0x69, (byte) 0x73, (byte) 0x74, (byte) 0x71, (byte) 0x0, (byte) 0x7e, (byte) 0x0, (byte) 0x8, (byte) 0x78, (byte) 0x72, (byte) 0x0, (byte) 0x2c, (byte) 0x6a, (byte) 0x61, (byte) 0x76,
+ (byte) 0x61, (byte) 0x2e, (byte) 0x75, (byte) 0x74, (byte) 0x69, (byte) 0x6c, (byte) 0x2e, (byte) 0x43, (byte) 0x6f, (byte) 0x6c, (byte) 0x6c, (byte) 0x65, (byte) 0x63, (byte) 0x74, (byte) 0x69, (byte) 0x6f, (byte) 0x6e, (byte) 0x73, (byte) 0x24, (byte) 0x55, (byte) 0x6e, (byte) 0x6d, (byte) 0x6f, (byte) 0x64, (byte) 0x69, (byte) 0x66, (byte) 0x69, (byte) 0x61, (byte) 0x62, (byte) 0x6c, (byte) 0x65, (byte) 0x43,
+ (byte) 0x6f, (byte) 0x6c, (byte) 0x6c, (byte) 0x65, (byte) 0x63, (byte) 0x74, (byte) 0x69, (byte) 0x6f, (byte) 0x6e, (byte) 0x19, (byte) 0x42, (byte) 0x0, (byte) 0x80, (byte) 0xcb, (byte) 0x5e, (byte) 0xf7, (byte) 0x1e, (byte) 0x2, (byte) 0x0, (byte) 0x1, (byte) 0x4c, (byte) 0x0, (byte) 0x1, (byte) 0x63, (byte) 0x74, (byte) 0x0, (byte) 0x16, (byte) 0x4c, (byte) 0x6a, (byte) 0x61, (byte) 0x76, (byte) 0x61,
+ (byte) 0x2f, (byte) 0x75, (byte) 0x74, (byte) 0x69, (byte) 0x6c, (byte) 0x2f, (byte) 0x43, (byte) 0x6f, (byte) 0x6c, (byte) 0x6c, (byte) 0x65, (byte) 0x63, (byte) 0x74, (byte) 0x69, (byte) 0x6f, (byte) 0x6e, (byte) 0x3b, (byte) 0x78, (byte) 0x70, (byte) 0x73, (byte) 0x72, (byte) 0x0, (byte) 0x13, (byte) 0x6a, (byte) 0x61, (byte) 0x76, (byte) 0x61, (byte) 0x2e, (byte) 0x75, (byte) 0x74, (byte) 0x69, (byte) 0x6c,
+ (byte) 0x2e, (byte) 0x41, (byte) 0x72, (byte) 0x72, (byte) 0x61, (byte) 0x79, (byte) 0x4c, (byte) 0x69, (byte) 0x73, (byte) 0x74, (byte) 0x78, (byte) 0x81, (byte) 0xd2, (byte) 0x1d, (byte) 0x99, (byte) 0xc7, (byte) 0x61, (byte) 0x9d, (byte) 0x3, (byte) 0x0, (byte) 0x1, (byte) 0x49, (byte) 0x0, (byte) 0x4, (byte) 0x73, (byte) 0x69, (byte) 0x7a, (byte) 0x65, (byte) 0x78, (byte) 0x70, (byte) 0x0, (byte) 0x0,
+ (byte) 0x0, (byte) 0x0, (byte) 0x77, (byte) 0x4, (byte) 0x0, (byte) 0x0, (byte) 0x0, (byte) 0x0, (byte) 0x78, (byte) 0x71, (byte) 0x0, (byte) 0x7e, (byte) 0x0, (byte) 0x19, (byte) 0x78, (byte) 0x70
+ };
+
+ /**
+ * Serialized TransactionRequiredException from JDK 8 with the following
+ * values:
+ * reason = "This was the error msg"
+ * cause = null
+ */
+ public static byte[] TRE_DATA = {
+ (byte) 0xac, (byte) 0xed, (byte) 0x0, (byte) 0x5, (byte) 0x73, (byte) 0x72, (byte) 0x0, (byte) 0x2e, (byte) 0x6a, (byte) 0x61, (byte) 0x76, (byte) 0x61, (byte) 0x78, (byte) 0x2e, (byte) 0x74, (byte) 0x72, (byte) 0x61, (byte) 0x6e, (byte) 0x73, (byte) 0x61, (byte) 0x63, (byte) 0x74, (byte) 0x69, (byte) 0x6f, (byte) 0x6e, (byte) 0x2e, (byte) 0x54, (byte) 0x72, (byte) 0x61, (byte) 0x6e, (byte) 0x73, (byte) 0x61,
+ (byte) 0x63, (byte) 0x74, (byte) 0x69, (byte) 0x6f, (byte) 0x6e, (byte) 0x52, (byte) 0x65, (byte) 0x71, (byte) 0x75, (byte) 0x69, (byte) 0x72, (byte) 0x65, (byte) 0x64, (byte) 0x45, (byte) 0x78, (byte) 0x63, (byte) 0x65, (byte) 0x70, (byte) 0x74, (byte) 0x69, (byte) 0x6f, (byte) 0x6e, (byte) 0xe5, (byte) 0xa6, (byte) 0x15, (byte) 0x9f, (byte) 0x12, (byte) 0x65, (byte) 0xb5, (byte) 0xd9, (byte) 0x2, (byte) 0x0,
+ (byte) 0x0, (byte) 0x78, (byte) 0x72, (byte) 0x0, (byte) 0x18, (byte) 0x6a, (byte) 0x61, (byte) 0x76, (byte) 0x61, (byte) 0x2e, (byte) 0x72, (byte) 0x6d, (byte) 0x69, (byte) 0x2e, (byte) 0x52, (byte) 0x65, (byte) 0x6d, (byte) 0x6f, (byte) 0x74, (byte) 0x65, (byte) 0x45, (byte) 0x78, (byte) 0x63, (byte) 0x65, (byte) 0x70, (byte) 0x74, (byte) 0x69, (byte) 0x6f, (byte) 0x6e, (byte) 0xb8, (byte) 0x8c, (byte) 0x9d,
+ (byte) 0x4e, (byte) 0xde, (byte) 0xe4, (byte) 0x7a, (byte) 0x22, (byte) 0x2, (byte) 0x0, (byte) 0x1, (byte) 0x4c, (byte) 0x0, (byte) 0x6, (byte) 0x64, (byte) 0x65, (byte) 0x74, (byte) 0x61, (byte) 0x69, (byte) 0x6c, (byte) 0x74, (byte) 0x0, (byte) 0x15, (byte) 0x4c, (byte) 0x6a, (byte) 0x61, (byte) 0x76, (byte) 0x61, (byte) 0x2f, (byte) 0x6c, (byte) 0x61, (byte) 0x6e, (byte) 0x67, (byte) 0x2f, (byte) 0x54,
+ (byte) 0x68, (byte) 0x72, (byte) 0x6f, (byte) 0x77, (byte) 0x61, (byte) 0x62, (byte) 0x6c, (byte) 0x65, (byte) 0x3b, (byte) 0x78, (byte) 0x72, (byte) 0x0, (byte) 0x13, (byte) 0x6a, (byte) 0x61, (byte) 0x76, (byte) 0x61, (byte) 0x2e, (byte) 0x69, (byte) 0x6f, (byte) 0x2e, (byte) 0x49, (byte) 0x4f, (byte) 0x45, (byte) 0x78, (byte) 0x63, (byte) 0x65, (byte) 0x70, (byte) 0x74, (byte) 0x69, (byte) 0x6f, (byte) 0x6e,
+ (byte) 0x6c, (byte) 0x80, (byte) 0x73, (byte) 0x64, (byte) 0x65, (byte) 0x25, (byte) 0xf0, (byte) 0xab, (byte) 0x2, (byte) 0x0, (byte) 0x0, (byte) 0x78, (byte) 0x72, (byte) 0x0, (byte) 0x13, (byte) 0x6a, (byte) 0x61, (byte) 0x76, (byte) 0x61, (byte) 0x2e, (byte) 0x6c, (byte) 0x61, (byte) 0x6e, (byte) 0x67, (byte) 0x2e, (byte) 0x45, (byte) 0x78, (byte) 0x63, (byte) 0x65, (byte) 0x70, (byte) 0x74, (byte) 0x69,
+ (byte) 0x6f, (byte) 0x6e, (byte) 0xd0, (byte) 0xfd, (byte) 0x1f, (byte) 0x3e, (byte) 0x1a, (byte) 0x3b, (byte) 0x1c, (byte) 0xc4, (byte) 0x2, (byte) 0x0, (byte) 0x0, (byte) 0x78, (byte) 0x72, (byte) 0x0, (byte) 0x13, (byte) 0x6a, (byte) 0x61, (byte) 0x76, (byte) 0x61, (byte) 0x2e, (byte) 0x6c, (byte) 0x61, (byte) 0x6e, (byte) 0x67, (byte) 0x2e, (byte) 0x54, (byte) 0x68, (byte) 0x72, (byte) 0x6f, (byte) 0x77,
+ (byte) 0x61, (byte) 0x62, (byte) 0x6c, (byte) 0x65, (byte) 0xd5, (byte) 0xc6, (byte) 0x35, (byte) 0x27, (byte) 0x39, (byte) 0x77, (byte) 0xb8, (byte) 0xcb, (byte) 0x3, (byte) 0x0, (byte) 0x4, (byte) 0x4c, (byte) 0x0, (byte) 0x5, (byte) 0x63, (byte) 0x61, (byte) 0x75, (byte) 0x73, (byte) 0x65, (byte) 0x71, (byte) 0x0, (byte) 0x7e, (byte) 0x0, (byte) 0x2, (byte) 0x4c, (byte) 0x0, (byte) 0xd, (byte) 0x64,
+ (byte) 0x65, (byte) 0x74, (byte) 0x61, (byte) 0x69, (byte) 0x6c, (byte) 0x4d, (byte) 0x65, (byte) 0x73, (byte) 0x73, (byte) 0x61, (byte) 0x67, (byte) 0x65, (byte) 0x74, (byte) 0x0, (byte) 0x12, (byte) 0x4c, (byte) 0x6a, (byte) 0x61, (byte) 0x76, (byte) 0x61, (byte) 0x2f, (byte) 0x6c, (byte) 0x61, (byte) 0x6e, (byte) 0x67, (byte) 0x2f, (byte) 0x53, (byte) 0x74, (byte) 0x72, (byte) 0x69, (byte) 0x6e, (byte) 0x67,
+ (byte) 0x3b, (byte) 0x5b, (byte) 0x0, (byte) 0xa, (byte) 0x73, (byte) 0x74, (byte) 0x61, (byte) 0x63, (byte) 0x6b, (byte) 0x54, (byte) 0x72, (byte) 0x61, (byte) 0x63, (byte) 0x65, (byte) 0x74, (byte) 0x0, (byte) 0x1e, (byte) 0x5b, (byte) 0x4c, (byte) 0x6a, (byte) 0x61, (byte) 0x76, (byte) 0x61, (byte) 0x2f, (byte) 0x6c, (byte) 0x61, (byte) 0x6e, (byte) 0x67, (byte) 0x2f, (byte) 0x53, (byte) 0x74, (byte) 0x61,
+ (byte) 0x63, (byte) 0x6b, (byte) 0x54, (byte) 0x72, (byte) 0x61, (byte) 0x63, (byte) 0x65, (byte) 0x45, (byte) 0x6c, (byte) 0x65, (byte) 0x6d, (byte) 0x65, (byte) 0x6e, (byte) 0x74, (byte) 0x3b, (byte) 0x4c, (byte) 0x0, (byte) 0x14, (byte) 0x73, (byte) 0x75, (byte) 0x70, (byte) 0x70, (byte) 0x72, (byte) 0x65, (byte) 0x73, (byte) 0x73, (byte) 0x65, (byte) 0x64, (byte) 0x45, (byte) 0x78, (byte) 0x63, (byte) 0x65,
+ (byte) 0x70, (byte) 0x74, (byte) 0x69, (byte) 0x6f, (byte) 0x6e, (byte) 0x73, (byte) 0x74, (byte) 0x0, (byte) 0x10, (byte) 0x4c, (byte) 0x6a, (byte) 0x61, (byte) 0x76, (byte) 0x61, (byte) 0x2f, (byte) 0x75, (byte) 0x74, (byte) 0x69, (byte) 0x6c, (byte) 0x2f, (byte) 0x4c, (byte) 0x69, (byte) 0x73, (byte) 0x74, (byte) 0x3b, (byte) 0x78, (byte) 0x70, (byte) 0x70, (byte) 0x74, (byte) 0x0, (byte) 0x6, (byte) 0x72,
+ (byte) 0x65, (byte) 0x61, (byte) 0x73, (byte) 0x6f, (byte) 0x6e, (byte) 0x75, (byte) 0x72, (byte) 0x0, (byte) 0x1e, (byte) 0x5b, (byte) 0x4c, (byte) 0x6a, (byte) 0x61, (byte) 0x76, (byte) 0x61, (byte) 0x2e, (byte) 0x6c, (byte) 0x61, (byte) 0x6e, (byte) 0x67, (byte) 0x2e, (byte) 0x53, (byte) 0x74, (byte) 0x61, (byte) 0x63, (byte) 0x6b, (byte) 0x54, (byte) 0x72, (byte) 0x61, (byte) 0x63, (byte) 0x65, (byte) 0x45,
+ (byte) 0x6c, (byte) 0x65, (byte) 0x6d, (byte) 0x65, (byte) 0x6e, (byte) 0x74, (byte) 0x3b, (byte) 0x2, (byte) 0x46, (byte) 0x2a, (byte) 0x3c, (byte) 0x3c, (byte) 0xfd, (byte) 0x22, (byte) 0x39, (byte) 0x2, (byte) 0x0, (byte) 0x0, (byte) 0x78, (byte) 0x70, (byte) 0x0, (byte) 0x0, (byte) 0x0, (byte) 0x2, (byte) 0x73, (byte) 0x72, (byte) 0x0, (byte) 0x1b, (byte) 0x6a, (byte) 0x61, (byte) 0x76, (byte) 0x61,
+ (byte) 0x2e, (byte) 0x6c, (byte) 0x61, (byte) 0x6e, (byte) 0x67, (byte) 0x2e, (byte) 0x53, (byte) 0x74, (byte) 0x61, (byte) 0x63, (byte) 0x6b, (byte) 0x54, (byte) 0x72, (byte) 0x61, (byte) 0x63, (byte) 0x65, (byte) 0x45, (byte) 0x6c, (byte) 0x65, (byte) 0x6d, (byte) 0x65, (byte) 0x6e, (byte) 0x74, (byte) 0x61, (byte) 0x9, (byte) 0xc5, (byte) 0x9a, (byte) 0x26, (byte) 0x36, (byte) 0xdd, (byte) 0x85, (byte) 0x2,
+ (byte) 0x0, (byte) 0x4, (byte) 0x49, (byte) 0x0, (byte) 0xa, (byte) 0x6c, (byte) 0x69, (byte) 0x6e, (byte) 0x65, (byte) 0x4e, (byte) 0x75, (byte) 0x6d, (byte) 0x62, (byte) 0x65, (byte) 0x72, (byte) 0x4c, (byte) 0x0, (byte) 0xe, (byte) 0x64, (byte) 0x65, (byte) 0x63, (byte) 0x6c, (byte) 0x61, (byte) 0x72, (byte) 0x69, (byte) 0x6e, (byte) 0x67, (byte) 0x43, (byte) 0x6c, (byte) 0x61, (byte) 0x73, (byte) 0x73,
+ (byte) 0x71, (byte) 0x0, (byte) 0x7e, (byte) 0x0, (byte) 0x6, (byte) 0x4c, (byte) 0x0, (byte) 0x8, (byte) 0x66, (byte) 0x69, (byte) 0x6c, (byte) 0x65, (byte) 0x4e, (byte) 0x61, (byte) 0x6d, (byte) 0x65, (byte) 0x71, (byte) 0x0, (byte) 0x7e, (byte) 0x0, (byte) 0x6, (byte) 0x4c, (byte) 0x0, (byte) 0xa, (byte) 0x6d, (byte) 0x65, (byte) 0x74, (byte) 0x68, (byte) 0x6f, (byte) 0x64, (byte) 0x4e, (byte) 0x61,
+ (byte) 0x6d, (byte) 0x65, (byte) 0x71, (byte) 0x0, (byte) 0x7e, (byte) 0x0, (byte) 0x6, (byte) 0x78, (byte) 0x70, (byte) 0x0, (byte) 0x0, (byte) 0x0, (byte) 0x3c, (byte) 0x74, (byte) 0x0, (byte) 0x10, (byte) 0x57, (byte) 0x72, (byte) 0x69, (byte) 0x74, (byte) 0x65, (byte) 0x53, (byte) 0x65, (byte) 0x72, (byte) 0x69, (byte) 0x61, (byte) 0x6c, (byte) 0x44, (byte) 0x61, (byte) 0x74, (byte) 0x61, (byte) 0x31,
+ (byte) 0x74, (byte) 0x0, (byte) 0x15, (byte) 0x57, (byte) 0x72, (byte) 0x69, (byte) 0x74, (byte) 0x65, (byte) 0x53, (byte) 0x65, (byte) 0x72, (byte) 0x69, (byte) 0x61, (byte) 0x6c, (byte) 0x44, (byte) 0x61, (byte) 0x74, (byte) 0x61, (byte) 0x31, (byte) 0x2e, (byte) 0x6a, (byte) 0x61, (byte) 0x76, (byte) 0x61, (byte) 0x74, (byte) 0x0, (byte) 0x3, (byte) 0x72, (byte) 0x75, (byte) 0x6e, (byte) 0x73, (byte) 0x71,
+ (byte) 0x0, (byte) 0x7e, (byte) 0x0, (byte) 0xd, (byte) 0x0, (byte) 0x0, (byte) 0x0, (byte) 0x24, (byte) 0x71, (byte) 0x0, (byte) 0x7e, (byte) 0x0, (byte) 0xf, (byte) 0x71, (byte) 0x0, (byte) 0x7e, (byte) 0x0, (byte) 0x10, (byte) 0x74, (byte) 0x0, (byte) 0x4, (byte) 0x6d, (byte) 0x61, (byte) 0x69, (byte) 0x6e, (byte) 0x73, (byte) 0x72, (byte) 0x0, (byte) 0x26, (byte) 0x6a, (byte) 0x61, (byte) 0x76,
+ (byte) 0x61, (byte) 0x2e, (byte) 0x75, (byte) 0x74, (byte) 0x69, (byte) 0x6c, (byte) 0x2e, (byte) 0x43, (byte) 0x6f, (byte) 0x6c, (byte) 0x6c, (byte) 0x65, (byte) 0x63, (byte) 0x74, (byte) 0x69, (byte) 0x6f, (byte) 0x6e, (byte) 0x73, (byte) 0x24, (byte) 0x55, (byte) 0x6e, (byte) 0x6d, (byte) 0x6f, (byte) 0x64, (byte) 0x69, (byte) 0x66, (byte) 0x69, (byte) 0x61, (byte) 0x62, (byte) 0x6c, (byte) 0x65, (byte) 0x4c,
+ (byte) 0x69, (byte) 0x73, (byte) 0x74, (byte) 0xfc, (byte) 0xf, (byte) 0x25, (byte) 0x31, (byte) 0xb5, (byte) 0xec, (byte) 0x8e, (byte) 0x10, (byte) 0x2, (byte) 0x0, (byte) 0x1, (byte) 0x4c, (byte) 0x0, (byte) 0x4, (byte) 0x6c, (byte) 0x69, (byte) 0x73, (byte) 0x74, (byte) 0x71, (byte) 0x0, (byte) 0x7e, (byte) 0x0, (byte) 0x8, (byte) 0x78, (byte) 0x72, (byte) 0x0, (byte) 0x2c, (byte) 0x6a, (byte) 0x61,
+ (byte) 0x76, (byte) 0x61, (byte) 0x2e, (byte) 0x75, (byte) 0x74, (byte) 0x69, (byte) 0x6c, (byte) 0x2e, (byte) 0x43, (byte) 0x6f, (byte) 0x6c, (byte) 0x6c, (byte) 0x65, (byte) 0x63, (byte) 0x74, (byte) 0x69, (byte) 0x6f, (byte) 0x6e, (byte) 0x73, (byte) 0x24, (byte) 0x55, (byte) 0x6e, (byte) 0x6d, (byte) 0x6f, (byte) 0x64, (byte) 0x69, (byte) 0x66, (byte) 0x69, (byte) 0x61, (byte) 0x62, (byte) 0x6c, (byte) 0x65,
+ (byte) 0x43, (byte) 0x6f, (byte) 0x6c, (byte) 0x6c, (byte) 0x65, (byte) 0x63, (byte) 0x74, (byte) 0x69, (byte) 0x6f, (byte) 0x6e, (byte) 0x19, (byte) 0x42, (byte) 0x0, (byte) 0x80, (byte) 0xcb, (byte) 0x5e, (byte) 0xf7, (byte) 0x1e, (byte) 0x2, (byte) 0x0, (byte) 0x1, (byte) 0x4c, (byte) 0x0, (byte) 0x1, (byte) 0x63, (byte) 0x74, (byte) 0x0, (byte) 0x16, (byte) 0x4c, (byte) 0x6a, (byte) 0x61, (byte) 0x76,
+ (byte) 0x61, (byte) 0x2f, (byte) 0x75, (byte) 0x74, (byte) 0x69, (byte) 0x6c, (byte) 0x2f, (byte) 0x43, (byte) 0x6f, (byte) 0x6c, (byte) 0x6c, (byte) 0x65, (byte) 0x63, (byte) 0x74, (byte) 0x69, (byte) 0x6f, (byte) 0x6e, (byte) 0x3b, (byte) 0x78, (byte) 0x70, (byte) 0x73, (byte) 0x72, (byte) 0x0, (byte) 0x13, (byte) 0x6a, (byte) 0x61, (byte) 0x76, (byte) 0x61, (byte) 0x2e, (byte) 0x75, (byte) 0x74, (byte) 0x69,
+ (byte) 0x6c, (byte) 0x2e, (byte) 0x41, (byte) 0x72, (byte) 0x72, (byte) 0x61, (byte) 0x79, (byte) 0x4c, (byte) 0x69, (byte) 0x73, (byte) 0x74, (byte) 0x78, (byte) 0x81, (byte) 0xd2, (byte) 0x1d, (byte) 0x99, (byte) 0xc7, (byte) 0x61, (byte) 0x9d, (byte) 0x3, (byte) 0x0, (byte) 0x1, (byte) 0x49, (byte) 0x0, (byte) 0x4, (byte) 0x73, (byte) 0x69, (byte) 0x7a, (byte) 0x65, (byte) 0x78, (byte) 0x70, (byte) 0x0,
+ (byte) 0x0, (byte) 0x0, (byte) 0x0, (byte) 0x77, (byte) 0x4, (byte) 0x0, (byte) 0x0, (byte) 0x0, (byte) 0x0, (byte) 0x78, (byte) 0x71, (byte) 0x0, (byte) 0x7e, (byte) 0x0, (byte) 0x19, (byte) 0x78, (byte) 0x70
+ };
+
+ /**
+ * Serialized TransactionRolledbackException from JDK 8 with the
+ * following values:
+ * reason = "This was the error msg"
+ * cause = null
+ */
+ public static byte[] TRBE_DATA = {
+ (byte) 0xac, (byte) 0xed, (byte) 0x0, (byte) 0x5, (byte) 0x73, (byte) 0x72, (byte) 0x0, (byte) 0x30, (byte) 0x6a, (byte) 0x61, (byte) 0x76, (byte) 0x61, (byte) 0x78, (byte) 0x2e, (byte) 0x74, (byte) 0x72, (byte) 0x61, (byte) 0x6e, (byte) 0x73, (byte) 0x61, (byte) 0x63, (byte) 0x74, (byte) 0x69, (byte) 0x6f, (byte) 0x6e, (byte) 0x2e, (byte) 0x54, (byte) 0x72, (byte) 0x61, (byte) 0x6e, (byte) 0x73, (byte) 0x61,
+ (byte) 0x63, (byte) 0x74, (byte) 0x69, (byte) 0x6f, (byte) 0x6e, (byte) 0x52, (byte) 0x6f, (byte) 0x6c, (byte) 0x6c, (byte) 0x65, (byte) 0x64, (byte) 0x62, (byte) 0x61, (byte) 0x63, (byte) 0x6b, (byte) 0x45, (byte) 0x78, (byte) 0x63, (byte) 0x65, (byte) 0x70, (byte) 0x74, (byte) 0x69, (byte) 0x6f, (byte) 0x6e, (byte) 0xd4, (byte) 0x62, (byte) 0x89, (byte) 0xbe, (byte) 0x47, (byte) 0x2, (byte) 0xe7, (byte) 0xdf,
+ (byte) 0x2, (byte) 0x0, (byte) 0x0, (byte) 0x78, (byte) 0x72, (byte) 0x0, (byte) 0x18, (byte) 0x6a, (byte) 0x61, (byte) 0x76, (byte) 0x61, (byte) 0x2e, (byte) 0x72, (byte) 0x6d, (byte) 0x69, (byte) 0x2e, (byte) 0x52, (byte) 0x65, (byte) 0x6d, (byte) 0x6f, (byte) 0x74, (byte) 0x65, (byte) 0x45, (byte) 0x78, (byte) 0x63, (byte) 0x65, (byte) 0x70, (byte) 0x74, (byte) 0x69, (byte) 0x6f, (byte) 0x6e, (byte) 0xb8,
+ (byte) 0x8c, (byte) 0x9d, (byte) 0x4e, (byte) 0xde, (byte) 0xe4, (byte) 0x7a, (byte) 0x22, (byte) 0x2, (byte) 0x0, (byte) 0x1, (byte) 0x4c, (byte) 0x0, (byte) 0x6, (byte) 0x64, (byte) 0x65, (byte) 0x74, (byte) 0x61, (byte) 0x69, (byte) 0x6c, (byte) 0x74, (byte) 0x0, (byte) 0x15, (byte) 0x4c, (byte) 0x6a, (byte) 0x61, (byte) 0x76, (byte) 0x61, (byte) 0x2f, (byte) 0x6c, (byte) 0x61, (byte) 0x6e, (byte) 0x67,
+ (byte) 0x2f, (byte) 0x54, (byte) 0x68, (byte) 0x72, (byte) 0x6f, (byte) 0x77, (byte) 0x61, (byte) 0x62, (byte) 0x6c, (byte) 0x65, (byte) 0x3b, (byte) 0x78, (byte) 0x72, (byte) 0x0, (byte) 0x13, (byte) 0x6a, (byte) 0x61, (byte) 0x76, (byte) 0x61, (byte) 0x2e, (byte) 0x69, (byte) 0x6f, (byte) 0x2e, (byte) 0x49, (byte) 0x4f, (byte) 0x45, (byte) 0x78, (byte) 0x63, (byte) 0x65, (byte) 0x70, (byte) 0x74, (byte) 0x69,
+ (byte) 0x6f, (byte) 0x6e, (byte) 0x6c, (byte) 0x80, (byte) 0x73, (byte) 0x64, (byte) 0x65, (byte) 0x25, (byte) 0xf0, (byte) 0xab, (byte) 0x2, (byte) 0x0, (byte) 0x0, (byte) 0x78, (byte) 0x72, (byte) 0x0, (byte) 0x13, (byte) 0x6a, (byte) 0x61, (byte) 0x76, (byte) 0x61, (byte) 0x2e, (byte) 0x6c, (byte) 0x61, (byte) 0x6e, (byte) 0x67, (byte) 0x2e, (byte) 0x45, (byte) 0x78, (byte) 0x63, (byte) 0x65, (byte) 0x70,
+ (byte) 0x74, (byte) 0x69, (byte) 0x6f, (byte) 0x6e, (byte) 0xd0, (byte) 0xfd, (byte) 0x1f, (byte) 0x3e, (byte) 0x1a, (byte) 0x3b, (byte) 0x1c, (byte) 0xc4, (byte) 0x2, (byte) 0x0, (byte) 0x0, (byte) 0x78, (byte) 0x72, (byte) 0x0, (byte) 0x13, (byte) 0x6a, (byte) 0x61, (byte) 0x76, (byte) 0x61, (byte) 0x2e, (byte) 0x6c, (byte) 0x61, (byte) 0x6e, (byte) 0x67, (byte) 0x2e, (byte) 0x54, (byte) 0x68, (byte) 0x72,
+ (byte) 0x6f, (byte) 0x77, (byte) 0x61, (byte) 0x62, (byte) 0x6c, (byte) 0x65, (byte) 0xd5, (byte) 0xc6, (byte) 0x35, (byte) 0x27, (byte) 0x39, (byte) 0x77, (byte) 0xb8, (byte) 0xcb, (byte) 0x3, (byte) 0x0, (byte) 0x4, (byte) 0x4c, (byte) 0x0, (byte) 0x5, (byte) 0x63, (byte) 0x61, (byte) 0x75, (byte) 0x73, (byte) 0x65, (byte) 0x71, (byte) 0x0, (byte) 0x7e, (byte) 0x0, (byte) 0x2, (byte) 0x4c, (byte) 0x0,
+ (byte) 0xd, (byte) 0x64, (byte) 0x65, (byte) 0x74, (byte) 0x61, (byte) 0x69, (byte) 0x6c, (byte) 0x4d, (byte) 0x65, (byte) 0x73, (byte) 0x73, (byte) 0x61, (byte) 0x67, (byte) 0x65, (byte) 0x74, (byte) 0x0, (byte) 0x12, (byte) 0x4c, (byte) 0x6a, (byte) 0x61, (byte) 0x76, (byte) 0x61, (byte) 0x2f, (byte) 0x6c, (byte) 0x61, (byte) 0x6e, (byte) 0x67, (byte) 0x2f, (byte) 0x53, (byte) 0x74, (byte) 0x72, (byte) 0x69,
+ (byte) 0x6e, (byte) 0x67, (byte) 0x3b, (byte) 0x5b, (byte) 0x0, (byte) 0xa, (byte) 0x73, (byte) 0x74, (byte) 0x61, (byte) 0x63, (byte) 0x6b, (byte) 0x54, (byte) 0x72, (byte) 0x61, (byte) 0x63, (byte) 0x65, (byte) 0x74, (byte) 0x0, (byte) 0x1e, (byte) 0x5b, (byte) 0x4c, (byte) 0x6a, (byte) 0x61, (byte) 0x76, (byte) 0x61, (byte) 0x2f, (byte) 0x6c, (byte) 0x61, (byte) 0x6e, (byte) 0x67, (byte) 0x2f, (byte) 0x53,
+ (byte) 0x74, (byte) 0x61, (byte) 0x63, (byte) 0x6b, (byte) 0x54, (byte) 0x72, (byte) 0x61, (byte) 0x63, (byte) 0x65, (byte) 0x45, (byte) 0x6c, (byte) 0x65, (byte) 0x6d, (byte) 0x65, (byte) 0x6e, (byte) 0x74, (byte) 0x3b, (byte) 0x4c, (byte) 0x0, (byte) 0x14, (byte) 0x73, (byte) 0x75, (byte) 0x70, (byte) 0x70, (byte) 0x72, (byte) 0x65, (byte) 0x73, (byte) 0x73, (byte) 0x65, (byte) 0x64, (byte) 0x45, (byte) 0x78,
+ (byte) 0x63, (byte) 0x65, (byte) 0x70, (byte) 0x74, (byte) 0x69, (byte) 0x6f, (byte) 0x6e, (byte) 0x73, (byte) 0x74, (byte) 0x0, (byte) 0x10, (byte) 0x4c, (byte) 0x6a, (byte) 0x61, (byte) 0x76, (byte) 0x61, (byte) 0x2f, (byte) 0x75, (byte) 0x74, (byte) 0x69, (byte) 0x6c, (byte) 0x2f, (byte) 0x4c, (byte) 0x69, (byte) 0x73, (byte) 0x74, (byte) 0x3b, (byte) 0x78, (byte) 0x70, (byte) 0x70, (byte) 0x74, (byte) 0x0,
+ (byte) 0x6, (byte) 0x72, (byte) 0x65, (byte) 0x61, (byte) 0x73, (byte) 0x6f, (byte) 0x6e, (byte) 0x75, (byte) 0x72, (byte) 0x0, (byte) 0x1e, (byte) 0x5b, (byte) 0x4c, (byte) 0x6a, (byte) 0x61, (byte) 0x76, (byte) 0x61, (byte) 0x2e, (byte) 0x6c, (byte) 0x61, (byte) 0x6e, (byte) 0x67, (byte) 0x2e, (byte) 0x53, (byte) 0x74, (byte) 0x61, (byte) 0x63, (byte) 0x6b, (byte) 0x54, (byte) 0x72, (byte) 0x61, (byte) 0x63,
+ (byte) 0x65, (byte) 0x45, (byte) 0x6c, (byte) 0x65, (byte) 0x6d, (byte) 0x65, (byte) 0x6e, (byte) 0x74, (byte) 0x3b, (byte) 0x2, (byte) 0x46, (byte) 0x2a, (byte) 0x3c, (byte) 0x3c, (byte) 0xfd, (byte) 0x22, (byte) 0x39, (byte) 0x2, (byte) 0x0, (byte) 0x0, (byte) 0x78, (byte) 0x70, (byte) 0x0, (byte) 0x0, (byte) 0x0, (byte) 0x2, (byte) 0x73, (byte) 0x72, (byte) 0x0, (byte) 0x1b, (byte) 0x6a, (byte) 0x61,
+ (byte) 0x76, (byte) 0x61, (byte) 0x2e, (byte) 0x6c, (byte) 0x61, (byte) 0x6e, (byte) 0x67, (byte) 0x2e, (byte) 0x53, (byte) 0x74, (byte) 0x61, (byte) 0x63, (byte) 0x6b, (byte) 0x54, (byte) 0x72, (byte) 0x61, (byte) 0x63, (byte) 0x65, (byte) 0x45, (byte) 0x6c, (byte) 0x65, (byte) 0x6d, (byte) 0x65, (byte) 0x6e, (byte) 0x74, (byte) 0x61, (byte) 0x9, (byte) 0xc5, (byte) 0x9a, (byte) 0x26, (byte) 0x36, (byte) 0xdd,
+ (byte) 0x85, (byte) 0x2, (byte) 0x0, (byte) 0x4, (byte) 0x49, (byte) 0x0, (byte) 0xa, (byte) 0x6c, (byte) 0x69, (byte) 0x6e, (byte) 0x65, (byte) 0x4e, (byte) 0x75, (byte) 0x6d, (byte) 0x62, (byte) 0x65, (byte) 0x72, (byte) 0x4c, (byte) 0x0, (byte) 0xe, (byte) 0x64, (byte) 0x65, (byte) 0x63, (byte) 0x6c, (byte) 0x61, (byte) 0x72, (byte) 0x69, (byte) 0x6e, (byte) 0x67, (byte) 0x43, (byte) 0x6c, (byte) 0x61,
+ (byte) 0x73, (byte) 0x73, (byte) 0x71, (byte) 0x0, (byte) 0x7e, (byte) 0x0, (byte) 0x6, (byte) 0x4c, (byte) 0x0, (byte) 0x8, (byte) 0x66, (byte) 0x69, (byte) 0x6c, (byte) 0x65, (byte) 0x4e, (byte) 0x61, (byte) 0x6d, (byte) 0x65, (byte) 0x71, (byte) 0x0, (byte) 0x7e, (byte) 0x0, (byte) 0x6, (byte) 0x4c, (byte) 0x0, (byte) 0xa, (byte) 0x6d, (byte) 0x65, (byte) 0x74, (byte) 0x68, (byte) 0x6f, (byte) 0x64,
+ (byte) 0x4e, (byte) 0x61, (byte) 0x6d, (byte) 0x65, (byte) 0x71, (byte) 0x0, (byte) 0x7e, (byte) 0x0, (byte) 0x6, (byte) 0x78, (byte) 0x70, (byte) 0x0, (byte) 0x0, (byte) 0x0, (byte) 0x3e, (byte) 0x74, (byte) 0x0, (byte) 0x10, (byte) 0x57, (byte) 0x72, (byte) 0x69, (byte) 0x74, (byte) 0x65, (byte) 0x53, (byte) 0x65, (byte) 0x72, (byte) 0x69, (byte) 0x61, (byte) 0x6c, (byte) 0x44, (byte) 0x61, (byte) 0x74,
+ (byte) 0x61, (byte) 0x31, (byte) 0x74, (byte) 0x0, (byte) 0x15, (byte) 0x57, (byte) 0x72, (byte) 0x69, (byte) 0x74, (byte) 0x65, (byte) 0x53, (byte) 0x65, (byte) 0x72, (byte) 0x69, (byte) 0x61, (byte) 0x6c, (byte) 0x44, (byte) 0x61, (byte) 0x74, (byte) 0x61, (byte) 0x31, (byte) 0x2e, (byte) 0x6a, (byte) 0x61, (byte) 0x76, (byte) 0x61, (byte) 0x74, (byte) 0x0, (byte) 0x3, (byte) 0x72, (byte) 0x75, (byte) 0x6e,
+ (byte) 0x73, (byte) 0x71, (byte) 0x0, (byte) 0x7e, (byte) 0x0, (byte) 0xd, (byte) 0x0, (byte) 0x0, (byte) 0x0, (byte) 0x24, (byte) 0x71, (byte) 0x0, (byte) 0x7e, (byte) 0x0, (byte) 0xf, (byte) 0x71, (byte) 0x0, (byte) 0x7e, (byte) 0x0, (byte) 0x10, (byte) 0x74, (byte) 0x0, (byte) 0x4, (byte) 0x6d, (byte) 0x61, (byte) 0x69, (byte) 0x6e, (byte) 0x73, (byte) 0x72, (byte) 0x0, (byte) 0x26, (byte) 0x6a,
+ (byte) 0x61, (byte) 0x76, (byte) 0x61, (byte) 0x2e, (byte) 0x75, (byte) 0x74, (byte) 0x69, (byte) 0x6c, (byte) 0x2e, (byte) 0x43, (byte) 0x6f, (byte) 0x6c, (byte) 0x6c, (byte) 0x65, (byte) 0x63, (byte) 0x74, (byte) 0x69, (byte) 0x6f, (byte) 0x6e, (byte) 0x73, (byte) 0x24, (byte) 0x55, (byte) 0x6e, (byte) 0x6d, (byte) 0x6f, (byte) 0x64, (byte) 0x69, (byte) 0x66, (byte) 0x69, (byte) 0x61, (byte) 0x62, (byte) 0x6c,
+ (byte) 0x65, (byte) 0x4c, (byte) 0x69, (byte) 0x73, (byte) 0x74, (byte) 0xfc, (byte) 0xf, (byte) 0x25, (byte) 0x31, (byte) 0xb5, (byte) 0xec, (byte) 0x8e, (byte) 0x10, (byte) 0x2, (byte) 0x0, (byte) 0x1, (byte) 0x4c, (byte) 0x0, (byte) 0x4, (byte) 0x6c, (byte) 0x69, (byte) 0x73, (byte) 0x74, (byte) 0x71, (byte) 0x0, (byte) 0x7e, (byte) 0x0, (byte) 0x8, (byte) 0x78, (byte) 0x72, (byte) 0x0, (byte) 0x2c,
+ (byte) 0x6a, (byte) 0x61, (byte) 0x76, (byte) 0x61, (byte) 0x2e, (byte) 0x75, (byte) 0x74, (byte) 0x69, (byte) 0x6c, (byte) 0x2e, (byte) 0x43, (byte) 0x6f, (byte) 0x6c, (byte) 0x6c, (byte) 0x65, (byte) 0x63, (byte) 0x74, (byte) 0x69, (byte) 0x6f, (byte) 0x6e, (byte) 0x73, (byte) 0x24, (byte) 0x55, (byte) 0x6e, (byte) 0x6d, (byte) 0x6f, (byte) 0x64, (byte) 0x69, (byte) 0x66, (byte) 0x69, (byte) 0x61, (byte) 0x62,
+ (byte) 0x6c, (byte) 0x65, (byte) 0x43, (byte) 0x6f, (byte) 0x6c, (byte) 0x6c, (byte) 0x65, (byte) 0x63, (byte) 0x74, (byte) 0x69, (byte) 0x6f, (byte) 0x6e, (byte) 0x19, (byte) 0x42, (byte) 0x0, (byte) 0x80, (byte) 0xcb, (byte) 0x5e, (byte) 0xf7, (byte) 0x1e, (byte) 0x2, (byte) 0x0, (byte) 0x1, (byte) 0x4c, (byte) 0x0, (byte) 0x1, (byte) 0x63, (byte) 0x74, (byte) 0x0, (byte) 0x16, (byte) 0x4c, (byte) 0x6a,
+ (byte) 0x61, (byte) 0x76, (byte) 0x61, (byte) 0x2f, (byte) 0x75, (byte) 0x74, (byte) 0x69, (byte) 0x6c, (byte) 0x2f, (byte) 0x43, (byte) 0x6f, (byte) 0x6c, (byte) 0x6c, (byte) 0x65, (byte) 0x63, (byte) 0x74, (byte) 0x69, (byte) 0x6f, (byte) 0x6e, (byte) 0x3b, (byte) 0x78, (byte) 0x70, (byte) 0x73, (byte) 0x72, (byte) 0x0, (byte) 0x13, (byte) 0x6a, (byte) 0x61, (byte) 0x76, (byte) 0x61, (byte) 0x2e, (byte) 0x75,
+ (byte) 0x74, (byte) 0x69, (byte) 0x6c, (byte) 0x2e, (byte) 0x41, (byte) 0x72, (byte) 0x72, (byte) 0x61, (byte) 0x79, (byte) 0x4c, (byte) 0x69, (byte) 0x73, (byte) 0x74, (byte) 0x78, (byte) 0x81, (byte) 0xd2, (byte) 0x1d, (byte) 0x99, (byte) 0xc7, (byte) 0x61, (byte) 0x9d, (byte) 0x3, (byte) 0x0, (byte) 0x1, (byte) 0x49, (byte) 0x0, (byte) 0x4, (byte) 0x73, (byte) 0x69, (byte) 0x7a, (byte) 0x65, (byte) 0x78,
+ (byte) 0x70, (byte) 0x0, (byte) 0x0, (byte) 0x0, (byte) 0x0, (byte) 0x77, (byte) 0x4, (byte) 0x0, (byte) 0x0, (byte) 0x0, (byte) 0x0, (byte) 0x78, (byte) 0x71, (byte) 0x0, (byte) 0x7e, (byte) 0x0, (byte) 0x19, (byte) 0x78, (byte) 0x70
+ };
+
+}
--- a/test/jdk/sun/security/tools/jarsigner/LineBrokenMultiByteCharacter.java Mon Mar 05 01:22:36 2018 +0000
+++ b/test/jdk/sun/security/tools/jarsigner/LineBrokenMultiByteCharacter.java Mon Mar 05 13:11:21 2018 -0800
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2017, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2017, 2018, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
@@ -58,7 +58,7 @@
* @see #verifyClassNameLineBroken(JarFile, String)
*/
static final String testClassName =
- "LineBrokenMultiByteCharacterA1234567890B1234567890C123456789D12\u00E9xyz.class";
+ "LineBrokenMultiByteCharacterA1234567890B1234567890C123456789D1234\u00E9xyz.class";
static final String anotherName =
"LineBrokenMultiByteCharacterA1234567890B1234567890C123456789D1234567890.class";
--- a/test/langtools/tools/jdeps/modules/DotFileTest.java Mon Mar 05 01:22:36 2018 +0000
+++ b/test/langtools/tools/jdeps/modules/DotFileTest.java Mon Mar 05 13:11:21 2018 -0800
@@ -64,7 +64,9 @@
"java.xml -> java.base" )
},
{ "java.sql", Set.of("java.logging -> java.base",
+ "java.transaction.xa -> java.base",
"java.sql -> java.logging",
+ "java.sql -> java.transaction.xa",
"java.sql -> java.xml",
"java.xml -> java.base" )
}
@@ -79,7 +81,9 @@
"java.xml -> java.base")
},
{ "java.sql", Set.of("java.logging -> java.base",
+ "java.transaction.xa -> java.base",
"java.sql -> java.logging",
+ "java.sql -> java.transaction.xa",
"java.sql -> java.xml",
"java.xml -> java.base" )
}