--- a/.hgtags-top-repo Thu Nov 06 10:11:35 2014 -0800
+++ b/.hgtags-top-repo Wed Jul 05 20:06:31 2017 +0200
@@ -280,3 +280,4 @@
c173ba994245380fb11ef077d1e59823386840eb jdk9-b35
201d4e235d597a25a2d3ee1404394789ba386119 jdk9-b36
723a67b0c442391447b1d8aad8b249d06d1032e8 jdk9-b37
+d42c0a90afc3c66ca87543076ec9aafd4b4680de jdk9-b38
--- a/common/autoconf/basics.m4 Thu Nov 06 10:11:35 2014 -0800
+++ b/common/autoconf/basics.m4 Wed Jul 05 20:06:31 2017 +0200
@@ -684,8 +684,6 @@
AC_SUBST(CONF_NAME, $CONF_NAME)
AC_SUBST(OUTPUT_ROOT, $OUTPUT_ROOT)
- # Most of the probed defines are put into config.h
- AC_CONFIG_HEADERS([$OUTPUT_ROOT/config.h:$AUTOCONF_DIR/config.h.in])
# The spec.gmk file contains all variables for the make system.
AC_CONFIG_FILES([$OUTPUT_ROOT/spec.gmk:$AUTOCONF_DIR/spec.gmk.in])
# The hotspot-spec.gmk file contains legacy variables for the hotspot make system.
@@ -694,8 +692,6 @@
AC_CONFIG_FILES([$OUTPUT_ROOT/bootcycle-spec.gmk:$AUTOCONF_DIR/bootcycle-spec.gmk.in])
# The compare.sh is used to compare the build output to other builds.
AC_CONFIG_FILES([$OUTPUT_ROOT/compare.sh:$AUTOCONF_DIR/compare.sh.in])
- # Spec.sh is currently used by compare-objects.sh
- AC_CONFIG_FILES([$OUTPUT_ROOT/spec.sh:$AUTOCONF_DIR/spec.sh.in])
# The generated Makefile knows where the spec.gmk is and where the source is.
# You can run make from the OUTPUT_ROOT, or from the top-level Makefile
# which will look for generated configurations
--- a/common/autoconf/config.h.in Thu Nov 06 10:11:35 2014 -0800
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,49 +0,0 @@
-/*
- * Copyright (c) 2011, 2012, Oracle and/or its affiliates. All rights reserved.
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * This code is free software; you can redistribute it and/or modify it
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
- * or visit www.oracle.com if you need additional information or have any
- * questions.
- */
-
-#define PACKAGE_NAME "openjdk"
-#define PACKAGE_TARNAME "openjdk"
-#define PACKAGE_VERSION "version-0.1"
-#define PACKAGE_STRING "openjdk version-0.1"
-#define PACKAGE_BUGREPORT "build-infra-dev@openjdk.java.net"
-#define PACKAGE_URL ""
-#define STDC_HEADERS
-#define HAVE_SYS_TYPES_H
-#define HAVE_SYS_STAT_H
-#define HAVE_STDLIB_H
-#define HAVE_STRING_H
-#define HAVE_MEMORY_H
-#define HAVE_STRINGS_H
-#define HAVE_INTTYPES_H
-#define HAVE_STDINT_H
-#define HAVE_UNISTD_H
-#define SIZEOF_INT_P 8
-#define HAVE_CUPS_CUPS_H
-#define HAVE_CUPS_PPD_H
-#define HAVE_LIBJPEG
-#define HAVE_LIBGIF
-#define HAVE_LIBZ
-#define HAVE_LIBM
-#define HAVE_ALTZONE
--- a/common/autoconf/generated-configure.sh Thu Nov 06 10:11:35 2014 -0800
+++ b/common/autoconf/generated-configure.sh Wed Jul 05 20:06:31 2017 +0200
@@ -3944,7 +3944,7 @@
pulse)
PKGHANDLER_COMMAND="sudo yum install pulseaudio-libs-devel" ;;
x11)
- PKGHANDLER_COMMAND="sudo yum install libXtst-devel libXt-devel libXrender-devel" ;;
+ PKGHANDLER_COMMAND="sudo yum install libXtst-devel libXt-devel libXrender-devel libXi-devel" ;;
ccache)
PKGHANDLER_COMMAND="sudo yum install ccache" ;;
esac
@@ -4328,7 +4328,7 @@
#CUSTOM_AUTOCONF_INCLUDE
# Do not change or remove the following line, it is needed for consistency checks:
-DATE_WHEN_GENERATED=1414663067
+DATE_WHEN_GENERATED=1415179461
###############################################################################
#
@@ -15338,9 +15338,6 @@
OUTPUT_ROOT=$OUTPUT_ROOT
- # Most of the probed defines are put into config.h
- ac_config_headers="$ac_config_headers $OUTPUT_ROOT/config.h:$AUTOCONF_DIR/config.h.in"
-
# The spec.gmk file contains all variables for the make system.
ac_config_files="$ac_config_files $OUTPUT_ROOT/spec.gmk:$AUTOCONF_DIR/spec.gmk.in"
@@ -15353,9 +15350,6 @@
# The compare.sh is used to compare the build output to other builds.
ac_config_files="$ac_config_files $OUTPUT_ROOT/compare.sh:$AUTOCONF_DIR/compare.sh.in"
- # Spec.sh is currently used by compare-objects.sh
- ac_config_files="$ac_config_files $OUTPUT_ROOT/spec.sh:$AUTOCONF_DIR/spec.sh.in"
-
# The generated Makefile knows where the spec.gmk is and where the source is.
# You can run make from the OUTPUT_ROOT, or from the top-level Makefile
# which will look for generated configurations
@@ -43279,32 +43273,40 @@
# Check for X Windows
#
- # Check if the user has specified sysroot, but not --x-includes or --x-libraries.
- # Make a simple check for the libraries at the sysroot, and setup --x-includes and
- # --x-libraries for the sysroot, if that seems to be correct.
- if test "x$OPENJDK_TARGET_OS" = "xlinux"; then
- if test "x$SYSROOT" != "x"; then
- if test "x$x_includes" = xNONE; then
- if test -f "$SYSROOT/usr/X11R6/include/X11/Xlib.h"; then
- x_includes="$SYSROOT/usr/X11R6/include"
- elif test -f "$SYSROOT/usr/include/X11/Xlib.h"; then
- x_includes="$SYSROOT/usr/include"
- fi
- fi
- if test "x$x_libraries" = xNONE; then
- if test -f "$SYSROOT/usr/X11R6/lib/libX11.so"; then
- x_libraries="$SYSROOT/usr/X11R6/lib"
- elif test "$SYSROOT/usr/lib64/libX11.so" && test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
- x_libraries="$SYSROOT/usr/lib64"
- elif test -f "$SYSROOT/usr/lib/libX11.so"; then
- x_libraries="$SYSROOT/usr/lib"
- fi
- fi
- fi
- fi
-
- # Now let autoconf do it's magic
- { $as_echo "$as_me:${as_lineno-$LINENO}: checking for X" >&5
+ if test "x$X11_NOT_NEEDED" = xyes; then
+ if test "x${with_x}" != x; then
+ { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: X11 is not used, so --with-x is ignored" >&5
+$as_echo "$as_me: WARNING: X11 is not used, so --with-x is ignored" >&2;}
+ fi
+ X_CFLAGS=
+ X_LIBS=
+ else
+ # Check if the user has specified sysroot, but not --x-includes or --x-libraries.
+ # Make a simple check for the libraries at the sysroot, and setup --x-includes and
+ # --x-libraries for the sysroot, if that seems to be correct.
+ if test "x$OPENJDK_TARGET_OS" = "xlinux"; then
+ if test "x$SYSROOT" != "x"; then
+ if test "x$x_includes" = xNONE; then
+ if test -f "$SYSROOT/usr/X11R6/include/X11/Xlib.h"; then
+ x_includes="$SYSROOT/usr/X11R6/include"
+ elif test -f "$SYSROOT/usr/include/X11/Xlib.h"; then
+ x_includes="$SYSROOT/usr/include"
+ fi
+ fi
+ if test "x$x_libraries" = xNONE; then
+ if test -f "$SYSROOT/usr/X11R6/lib/libX11.so"; then
+ x_libraries="$SYSROOT/usr/X11R6/lib"
+ elif test "$SYSROOT/usr/lib64/libX11.so" && test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
+ x_libraries="$SYSROOT/usr/lib64"
+ elif test -f "$SYSROOT/usr/lib/libX11.so"; then
+ x_libraries="$SYSROOT/usr/lib"
+ fi
+ fi
+ fi
+ fi
+
+ # Now let autoconf do it's magic
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking for X" >&5
$as_echo_n "checking for X... " >&6; }
@@ -43497,7 +43499,7 @@
$as_echo "libraries $x_libraries, headers $x_includes" >&6; }
fi
- if test "$no_x" = yes; then
+ if test "$no_x" = yes; then
# Not all programs may use this symbol, but it does not hurt to define it.
$as_echo "#define X_DISPLAY_MISSING 1" >>confdefs.h
@@ -43988,13 +43990,13 @@
fi
- # AC_PATH_XTRA creates X_LIBS and sometimes adds -R flags. When cross compiling
- # this doesn't make sense so we remove it.
- if test "x$COMPILE_TYPE" = xcross; then
- X_LIBS=`$ECHO $X_LIBS | $SED 's/-R \{0,1\}[^ ]*//g'`
- fi
-
- if test "x$no_x" = xyes && test "x$X11_NOT_NEEDED" != xyes; then
+ # AC_PATH_XTRA creates X_LIBS and sometimes adds -R flags. When cross compiling
+ # this doesn't make sense so we remove it.
+ if test "x$COMPILE_TYPE" = xcross; then
+ X_LIBS=`$ECHO $X_LIBS | $SED 's/-R \{0,1\}[^ ]*//g'`
+ fi
+
+ if test "x$no_x" = xyes; then
# Print a helpful message on how to acquire the necessary build dependency.
# x11 is the help tag: freetype, cups, pulse, alsa etc
@@ -44025,34 +44027,34 @@
fi
fi
- as_fn_error $? "Could not find X11 libraries. $HELP_MSG" "$LINENO" 5
- fi
-
- if test "x$OPENJDK_TARGET_OS" = xsolaris; then
- OPENWIN_HOME="/usr/openwin"
- X_CFLAGS="-I$SYSROOT$OPENWIN_HOME/include -I$SYSROOT$OPENWIN_HOME/include/X11/extensions"
- X_LIBS="-L$SYSROOT$OPENWIN_HOME/sfw/lib$OPENJDK_TARGET_CPU_ISADIR \
- -L$SYSROOT$OPENWIN_HOME/lib$OPENJDK_TARGET_CPU_ISADIR \
- -R$OPENWIN_HOME/sfw/lib$OPENJDK_TARGET_CPU_ISADIR \
- -R$OPENWIN_HOME/lib$OPENJDK_TARGET_CPU_ISADIR"
- fi
-
- ac_ext=c
+ as_fn_error $? "Could not find X11 libraries. $HELP_MSG" "$LINENO" 5
+ fi
+
+ if test "x$OPENJDK_TARGET_OS" = xsolaris; then
+ OPENWIN_HOME="/usr/openwin"
+ X_CFLAGS="-I$SYSROOT$OPENWIN_HOME/include -I$SYSROOT$OPENWIN_HOME/include/X11/extensions"
+ X_LIBS="-L$SYSROOT$OPENWIN_HOME/sfw/lib$OPENJDK_TARGET_CPU_ISADIR \
+ -L$SYSROOT$OPENWIN_HOME/lib$OPENJDK_TARGET_CPU_ISADIR \
+ -R$OPENWIN_HOME/sfw/lib$OPENJDK_TARGET_CPU_ISADIR \
+ -R$OPENWIN_HOME/lib$OPENJDK_TARGET_CPU_ISADIR"
+ fi
+
+ ac_ext=c
ac_cpp='$CPP $CPPFLAGS'
ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
ac_compiler_gnu=$ac_cv_c_compiler_gnu
- OLD_CFLAGS="$CFLAGS"
- CFLAGS="$CFLAGS $SYSROOT_CFLAGS $X_CFLAGS"
-
- # Need to include Xlib.h and Xutil.h to avoid "present but cannot be compiled" warnings on Solaris 10
- for ac_header in X11/extensions/shape.h X11/extensions/Xrender.h X11/extensions/XTest.h X11/Intrinsic.h
+ OLD_CFLAGS="$CFLAGS"
+ CFLAGS="$CFLAGS $SYSROOT_CFLAGS $X_CFLAGS"
+
+ # Need to include Xlib.h and Xutil.h to avoid "present but cannot be compiled" warnings on Solaris 10
+ for ac_header in X11/extensions/shape.h X11/extensions/Xrender.h X11/extensions/XTest.h X11/Intrinsic.h
do :
as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
ac_fn_c_check_header_compile "$LINENO" "$ac_header" "$as_ac_Header" "
- # include <X11/Xlib.h>
- # include <X11/Xutil.h>
+ # include <X11/Xlib.h>
+ # include <X11/Xutil.h>
"
@@ -44060,48 +44062,15 @@
cat >>confdefs.h <<_ACEOF
#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
_ACEOF
- X11_A_OK=yes
-else
- X11_A_OK=no; break
-fi
-
-done
-
-
- # If XLinearGradient isn't available in Xrender.h, signal that it needs to be
- # defined in libawt_xawt.
- { $as_echo "$as_me:${as_lineno-$LINENO}: checking if XlinearGradient is defined in Xrender.h" >&5
-$as_echo_n "checking if XlinearGradient is defined in Xrender.h... " >&6; }
- cat confdefs.h - <<_ACEOF >conftest.$ac_ext
-/* end confdefs.h. */
-#include <X11/extensions/Xrender.h>
-int
-main ()
-{
-XLinearGradient x;
- ;
- return 0;
-}
-_ACEOF
-if ac_fn_c_try_compile "$LINENO"; then :
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
-$as_echo "yes" >&6; }
-else
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
-$as_echo "no" >&6; }
- X_CFLAGS="$X_CFLAGS -DSOLARIS10_NO_XRENDER_STRUCTS"
-fi
-rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
-
- CFLAGS="$OLD_CFLAGS"
- ac_ext=cpp
-ac_cpp='$CXXCPP $CPPFLAGS'
-ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
-ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
-ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
-
-
- if test "x$X11_A_OK" = xno && test "x$X11_NOT_NEEDED" != xyes; then
+ X11_HEADERS_OK=yes
+else
+ X11_HEADERS_OK=no; break
+fi
+
+done
+
+
+ if test "x$X11_HEADERS_OK" = xno; then
# Print a helpful message on how to acquire the necessary build dependency.
# x11 is the help tag: freetype, cups, pulse, alsa etc
@@ -44132,8 +44101,42 @@
fi
fi
- as_fn_error $? "Could not find all X11 headers (shape.h Xrender.h XTest.h Intrinsic.h). $HELP_MSG" "$LINENO" 5
- fi
+ as_fn_error $? "Could not find all X11 headers (shape.h Xrender.h XTest.h Intrinsic.h). $HELP_MSG" "$LINENO" 5
+ fi
+
+ # If XLinearGradient isn't available in Xrender.h, signal that it needs to be
+ # defined in libawt_xawt.
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking if XlinearGradient is defined in Xrender.h" >&5
+$as_echo_n "checking if XlinearGradient is defined in Xrender.h... " >&6; }
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+#include <X11/extensions/Xrender.h>
+int
+main ()
+{
+XLinearGradient x;
+ ;
+ return 0;
+}
+_ACEOF
+if ac_fn_c_try_compile "$LINENO"; then :
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
+$as_echo "yes" >&6; }
+else
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
+ X_CFLAGS="$X_CFLAGS -DSOLARIS10_NO_XRENDER_STRUCTS"
+fi
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+
+ CFLAGS="$OLD_CFLAGS"
+ ac_ext=cpp
+ac_cpp='$CXXCPP $CPPFLAGS'
+ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
+ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
+ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
+
+ fi # X11_NOT_NEEDED
@@ -44435,6 +44438,8 @@
fi
+ # Need to specify explicitly since it needs to be overridden on some versions of macosx
+ FREETYPE_BASE_NAME=freetype
FREETYPE_CFLAGS=
FREETYPE_LIBS=
FREETYPE_BUNDLE_LIB_PATH=
@@ -44475,8 +44480,8 @@
fi
# Now check if configure found a version of 'msbuild.exe'
if test "x$BUILD_FREETYPE" = xyes && test "x$MSBUILD" == x ; then
- { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Can't find an msbuild.exe executable (you may try to install .NET 4.0) - ignoring --with-freetype-src" >&5
-$as_echo "$as_me: WARNING: Can't find an msbuild.exe executable (you may try to install .NET 4.0) - ignoring --with-freetype-src" >&2;}
+ { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Can not find an msbuild.exe executable (you may try to install .NET 4.0) - ignoring --with-freetype-src" >&5
+$as_echo "$as_me: WARNING: Can not find an msbuild.exe executable (you may try to install .NET 4.0) - ignoring --with-freetype-src" >&2;}
BUILD_FREETYPE=no
fi
@@ -44576,30 +44581,55 @@
POTENTIAL_FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH"
METHOD="--with-freetype-src"
- # First check if the files exists.
- if test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
- # We found an arbitrary include file. That's a good sign.
+ # Let's start with an optimistic view of the world :-)
+ FOUND_FREETYPE=yes
+
+ # First look for the canonical freetype main include file ft2build.h.
+ if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
+ # Oh no! Let's try in the freetype2 directory. This is needed at least at Mac OS X Yosemite.
+ POTENTIAL_FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH/freetype2"
+ if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
+ # Fail.
+ FOUND_FREETYPE=no
+ fi
+ fi
+
+ if test "x$FOUND_FREETYPE" = xyes; then
+ # Include file found, let's continue the sanity check.
{ $as_echo "$as_me:${as_lineno-$LINENO}: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&5
$as_echo "$as_me: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&6;}
- FOUND_FREETYPE=yes
-
- FREETYPE_LIB_NAME="${LIBRARY_PREFIX}freetype${SHARED_LIBRARY_SUFFIX}"
+
+ # Reset to default value
+ FREETYPE_BASE_NAME=freetype
+ FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME"; then
- { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&5
+ if test "x$OPENJDK_TARGET_OS" = xmacosx \
+ && test -s "$POTENTIAL_FREETYPE_LIB_PATH/${LIBRARY_PREFIX}freetype.6${SHARED_LIBRARY_SUFFIX}"; then
+ # On Mac OS X Yosemite, the symlink from libfreetype.dylib to libfreetype.6.dylib disappeared. Check
+ # for the .6 version explicitly.
+ FREETYPE_BASE_NAME=freetype.6
+ FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
+ { $as_echo "$as_me:${as_lineno-$LINENO}: Compensating for missing symlink by using version 6 explicitly" >&5
+$as_echo "$as_me: Compensating for missing symlink by using version 6 explicitly" >&6;}
+ else
+ { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&5
$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&6;}
- FOUND_FREETYPE=no
+ FOUND_FREETYPE=no
+ fi
else
if test "x$OPENJDK_TARGET_OS" = xwindows; then
# On Windows, we will need both .lib and .dll file.
- if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/freetype.lib"; then
- { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/freetype.lib. Ignoring location." >&5
-$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/freetype.lib. Ignoring location." >&6;}
+ if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib"; then
+ { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&5
+$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&6;}
FOUND_FREETYPE=no
fi
elif test "x$OPENJDK_TARGET_OS" = xsolaris \
&& test -s "$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR/$FREETYPE_LIB_NAME"; then
# Found lib in isa dir, use that instead.
POTENTIAL_FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR"
+ { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&5
+$as_echo "$as_me: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&6;}
fi
fi
fi
@@ -44904,30 +44934,55 @@
POTENTIAL_FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH"
METHOD="--with-freetype"
- # First check if the files exists.
- if test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
- # We found an arbitrary include file. That's a good sign.
+ # Let's start with an optimistic view of the world :-)
+ FOUND_FREETYPE=yes
+
+ # First look for the canonical freetype main include file ft2build.h.
+ if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
+ # Oh no! Let's try in the freetype2 directory. This is needed at least at Mac OS X Yosemite.
+ POTENTIAL_FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH/freetype2"
+ if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
+ # Fail.
+ FOUND_FREETYPE=no
+ fi
+ fi
+
+ if test "x$FOUND_FREETYPE" = xyes; then
+ # Include file found, let's continue the sanity check.
{ $as_echo "$as_me:${as_lineno-$LINENO}: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&5
$as_echo "$as_me: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&6;}
- FOUND_FREETYPE=yes
-
- FREETYPE_LIB_NAME="${LIBRARY_PREFIX}freetype${SHARED_LIBRARY_SUFFIX}"
+
+ # Reset to default value
+ FREETYPE_BASE_NAME=freetype
+ FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME"; then
- { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&5
+ if test "x$OPENJDK_TARGET_OS" = xmacosx \
+ && test -s "$POTENTIAL_FREETYPE_LIB_PATH/${LIBRARY_PREFIX}freetype.6${SHARED_LIBRARY_SUFFIX}"; then
+ # On Mac OS X Yosemite, the symlink from libfreetype.dylib to libfreetype.6.dylib disappeared. Check
+ # for the .6 version explicitly.
+ FREETYPE_BASE_NAME=freetype.6
+ FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
+ { $as_echo "$as_me:${as_lineno-$LINENO}: Compensating for missing symlink by using version 6 explicitly" >&5
+$as_echo "$as_me: Compensating for missing symlink by using version 6 explicitly" >&6;}
+ else
+ { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&5
$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&6;}
- FOUND_FREETYPE=no
+ FOUND_FREETYPE=no
+ fi
else
if test "x$OPENJDK_TARGET_OS" = xwindows; then
# On Windows, we will need both .lib and .dll file.
- if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/freetype.lib"; then
- { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/freetype.lib. Ignoring location." >&5
-$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/freetype.lib. Ignoring location." >&6;}
+ if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib"; then
+ { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&5
+$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&6;}
FOUND_FREETYPE=no
fi
elif test "x$OPENJDK_TARGET_OS" = xsolaris \
&& test -s "$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR/$FREETYPE_LIB_NAME"; then
# Found lib in isa dir, use that instead.
POTENTIAL_FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR"
+ { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&5
+$as_echo "$as_me: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&6;}
fi
fi
fi
@@ -45493,30 +45548,55 @@
POTENTIAL_FREETYPE_LIB_PATH="$FREETYPE_BASE_DIR/lib"
METHOD="well-known location"
- # First check if the files exists.
- if test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
- # We found an arbitrary include file. That's a good sign.
+ # Let's start with an optimistic view of the world :-)
+ FOUND_FREETYPE=yes
+
+ # First look for the canonical freetype main include file ft2build.h.
+ if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
+ # Oh no! Let's try in the freetype2 directory. This is needed at least at Mac OS X Yosemite.
+ POTENTIAL_FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH/freetype2"
+ if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
+ # Fail.
+ FOUND_FREETYPE=no
+ fi
+ fi
+
+ if test "x$FOUND_FREETYPE" = xyes; then
+ # Include file found, let's continue the sanity check.
{ $as_echo "$as_me:${as_lineno-$LINENO}: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&5
$as_echo "$as_me: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&6;}
- FOUND_FREETYPE=yes
-
- FREETYPE_LIB_NAME="${LIBRARY_PREFIX}freetype${SHARED_LIBRARY_SUFFIX}"
+
+ # Reset to default value
+ FREETYPE_BASE_NAME=freetype
+ FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME"; then
- { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&5
+ if test "x$OPENJDK_TARGET_OS" = xmacosx \
+ && test -s "$POTENTIAL_FREETYPE_LIB_PATH/${LIBRARY_PREFIX}freetype.6${SHARED_LIBRARY_SUFFIX}"; then
+ # On Mac OS X Yosemite, the symlink from libfreetype.dylib to libfreetype.6.dylib disappeared. Check
+ # for the .6 version explicitly.
+ FREETYPE_BASE_NAME=freetype.6
+ FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
+ { $as_echo "$as_me:${as_lineno-$LINENO}: Compensating for missing symlink by using version 6 explicitly" >&5
+$as_echo "$as_me: Compensating for missing symlink by using version 6 explicitly" >&6;}
+ else
+ { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&5
$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&6;}
- FOUND_FREETYPE=no
+ FOUND_FREETYPE=no
+ fi
else
if test "x$OPENJDK_TARGET_OS" = xwindows; then
# On Windows, we will need both .lib and .dll file.
- if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/freetype.lib"; then
- { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/freetype.lib. Ignoring location." >&5
-$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/freetype.lib. Ignoring location." >&6;}
+ if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib"; then
+ { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&5
+$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&6;}
FOUND_FREETYPE=no
fi
elif test "x$OPENJDK_TARGET_OS" = xsolaris \
&& test -s "$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR/$FREETYPE_LIB_NAME"; then
# Found lib in isa dir, use that instead.
POTENTIAL_FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR"
+ { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&5
+$as_echo "$as_me: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&6;}
fi
fi
fi
@@ -45796,30 +45876,55 @@
POTENTIAL_FREETYPE_LIB_PATH="$FREETYPE_BASE_DIR/lib"
METHOD="well-known location"
- # First check if the files exists.
- if test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
- # We found an arbitrary include file. That's a good sign.
+ # Let's start with an optimistic view of the world :-)
+ FOUND_FREETYPE=yes
+
+ # First look for the canonical freetype main include file ft2build.h.
+ if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
+ # Oh no! Let's try in the freetype2 directory. This is needed at least at Mac OS X Yosemite.
+ POTENTIAL_FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH/freetype2"
+ if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
+ # Fail.
+ FOUND_FREETYPE=no
+ fi
+ fi
+
+ if test "x$FOUND_FREETYPE" = xyes; then
+ # Include file found, let's continue the sanity check.
{ $as_echo "$as_me:${as_lineno-$LINENO}: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&5
$as_echo "$as_me: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&6;}
- FOUND_FREETYPE=yes
-
- FREETYPE_LIB_NAME="${LIBRARY_PREFIX}freetype${SHARED_LIBRARY_SUFFIX}"
+
+ # Reset to default value
+ FREETYPE_BASE_NAME=freetype
+ FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME"; then
- { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&5
+ if test "x$OPENJDK_TARGET_OS" = xmacosx \
+ && test -s "$POTENTIAL_FREETYPE_LIB_PATH/${LIBRARY_PREFIX}freetype.6${SHARED_LIBRARY_SUFFIX}"; then
+ # On Mac OS X Yosemite, the symlink from libfreetype.dylib to libfreetype.6.dylib disappeared. Check
+ # for the .6 version explicitly.
+ FREETYPE_BASE_NAME=freetype.6
+ FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
+ { $as_echo "$as_me:${as_lineno-$LINENO}: Compensating for missing symlink by using version 6 explicitly" >&5
+$as_echo "$as_me: Compensating for missing symlink by using version 6 explicitly" >&6;}
+ else
+ { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&5
$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&6;}
- FOUND_FREETYPE=no
+ FOUND_FREETYPE=no
+ fi
else
if test "x$OPENJDK_TARGET_OS" = xwindows; then
# On Windows, we will need both .lib and .dll file.
- if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/freetype.lib"; then
- { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/freetype.lib. Ignoring location." >&5
-$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/freetype.lib. Ignoring location." >&6;}
+ if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib"; then
+ { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&5
+$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&6;}
FOUND_FREETYPE=no
fi
elif test "x$OPENJDK_TARGET_OS" = xsolaris \
&& test -s "$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR/$FREETYPE_LIB_NAME"; then
# Found lib in isa dir, use that instead.
POTENTIAL_FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR"
+ { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&5
+$as_echo "$as_me: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&6;}
fi
fi
fi
@@ -46090,30 +46195,55 @@
POTENTIAL_FREETYPE_LIB_PATH="$FREETYPE_BASE_DIR/lib"
METHOD="well-known location"
- # First check if the files exists.
- if test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
- # We found an arbitrary include file. That's a good sign.
+ # Let's start with an optimistic view of the world :-)
+ FOUND_FREETYPE=yes
+
+ # First look for the canonical freetype main include file ft2build.h.
+ if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
+ # Oh no! Let's try in the freetype2 directory. This is needed at least at Mac OS X Yosemite.
+ POTENTIAL_FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH/freetype2"
+ if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
+ # Fail.
+ FOUND_FREETYPE=no
+ fi
+ fi
+
+ if test "x$FOUND_FREETYPE" = xyes; then
+ # Include file found, let's continue the sanity check.
{ $as_echo "$as_me:${as_lineno-$LINENO}: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&5
$as_echo "$as_me: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&6;}
- FOUND_FREETYPE=yes
-
- FREETYPE_LIB_NAME="${LIBRARY_PREFIX}freetype${SHARED_LIBRARY_SUFFIX}"
+
+ # Reset to default value
+ FREETYPE_BASE_NAME=freetype
+ FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME"; then
- { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&5
+ if test "x$OPENJDK_TARGET_OS" = xmacosx \
+ && test -s "$POTENTIAL_FREETYPE_LIB_PATH/${LIBRARY_PREFIX}freetype.6${SHARED_LIBRARY_SUFFIX}"; then
+ # On Mac OS X Yosemite, the symlink from libfreetype.dylib to libfreetype.6.dylib disappeared. Check
+ # for the .6 version explicitly.
+ FREETYPE_BASE_NAME=freetype.6
+ FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
+ { $as_echo "$as_me:${as_lineno-$LINENO}: Compensating for missing symlink by using version 6 explicitly" >&5
+$as_echo "$as_me: Compensating for missing symlink by using version 6 explicitly" >&6;}
+ else
+ { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&5
$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&6;}
- FOUND_FREETYPE=no
+ FOUND_FREETYPE=no
+ fi
else
if test "x$OPENJDK_TARGET_OS" = xwindows; then
# On Windows, we will need both .lib and .dll file.
- if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/freetype.lib"; then
- { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/freetype.lib. Ignoring location." >&5
-$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/freetype.lib. Ignoring location." >&6;}
+ if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib"; then
+ { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&5
+$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&6;}
FOUND_FREETYPE=no
fi
elif test "x$OPENJDK_TARGET_OS" = xsolaris \
&& test -s "$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR/$FREETYPE_LIB_NAME"; then
# Found lib in isa dir, use that instead.
POTENTIAL_FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR"
+ { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&5
+$as_echo "$as_me: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&6;}
fi
fi
fi
@@ -46384,30 +46514,55 @@
POTENTIAL_FREETYPE_LIB_PATH="$FREETYPE_BASE_DIR/lib"
METHOD="well-known location"
- # First check if the files exists.
- if test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
- # We found an arbitrary include file. That's a good sign.
+ # Let's start with an optimistic view of the world :-)
+ FOUND_FREETYPE=yes
+
+ # First look for the canonical freetype main include file ft2build.h.
+ if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
+ # Oh no! Let's try in the freetype2 directory. This is needed at least at Mac OS X Yosemite.
+ POTENTIAL_FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH/freetype2"
+ if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
+ # Fail.
+ FOUND_FREETYPE=no
+ fi
+ fi
+
+ if test "x$FOUND_FREETYPE" = xyes; then
+ # Include file found, let's continue the sanity check.
{ $as_echo "$as_me:${as_lineno-$LINENO}: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&5
$as_echo "$as_me: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&6;}
- FOUND_FREETYPE=yes
-
- FREETYPE_LIB_NAME="${LIBRARY_PREFIX}freetype${SHARED_LIBRARY_SUFFIX}"
+
+ # Reset to default value
+ FREETYPE_BASE_NAME=freetype
+ FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME"; then
- { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&5
+ if test "x$OPENJDK_TARGET_OS" = xmacosx \
+ && test -s "$POTENTIAL_FREETYPE_LIB_PATH/${LIBRARY_PREFIX}freetype.6${SHARED_LIBRARY_SUFFIX}"; then
+ # On Mac OS X Yosemite, the symlink from libfreetype.dylib to libfreetype.6.dylib disappeared. Check
+ # for the .6 version explicitly.
+ FREETYPE_BASE_NAME=freetype.6
+ FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
+ { $as_echo "$as_me:${as_lineno-$LINENO}: Compensating for missing symlink by using version 6 explicitly" >&5
+$as_echo "$as_me: Compensating for missing symlink by using version 6 explicitly" >&6;}
+ else
+ { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&5
$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&6;}
- FOUND_FREETYPE=no
+ FOUND_FREETYPE=no
+ fi
else
if test "x$OPENJDK_TARGET_OS" = xwindows; then
# On Windows, we will need both .lib and .dll file.
- if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/freetype.lib"; then
- { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/freetype.lib. Ignoring location." >&5
-$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/freetype.lib. Ignoring location." >&6;}
+ if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib"; then
+ { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&5
+$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&6;}
FOUND_FREETYPE=no
fi
elif test "x$OPENJDK_TARGET_OS" = xsolaris \
&& test -s "$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR/$FREETYPE_LIB_NAME"; then
# Found lib in isa dir, use that instead.
POTENTIAL_FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR"
+ { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&5
+$as_echo "$as_me: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&6;}
fi
fi
fi
@@ -46679,30 +46834,55 @@
POTENTIAL_FREETYPE_LIB_PATH="$FREETYPE_BASE_DIR/lib"
METHOD="well-known location"
- # First check if the files exists.
- if test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
- # We found an arbitrary include file. That's a good sign.
+ # Let's start with an optimistic view of the world :-)
+ FOUND_FREETYPE=yes
+
+ # First look for the canonical freetype main include file ft2build.h.
+ if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
+ # Oh no! Let's try in the freetype2 directory. This is needed at least at Mac OS X Yosemite.
+ POTENTIAL_FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH/freetype2"
+ if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
+ # Fail.
+ FOUND_FREETYPE=no
+ fi
+ fi
+
+ if test "x$FOUND_FREETYPE" = xyes; then
+ # Include file found, let's continue the sanity check.
{ $as_echo "$as_me:${as_lineno-$LINENO}: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&5
$as_echo "$as_me: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&6;}
- FOUND_FREETYPE=yes
-
- FREETYPE_LIB_NAME="${LIBRARY_PREFIX}freetype${SHARED_LIBRARY_SUFFIX}"
+
+ # Reset to default value
+ FREETYPE_BASE_NAME=freetype
+ FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME"; then
- { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&5
+ if test "x$OPENJDK_TARGET_OS" = xmacosx \
+ && test -s "$POTENTIAL_FREETYPE_LIB_PATH/${LIBRARY_PREFIX}freetype.6${SHARED_LIBRARY_SUFFIX}"; then
+ # On Mac OS X Yosemite, the symlink from libfreetype.dylib to libfreetype.6.dylib disappeared. Check
+ # for the .6 version explicitly.
+ FREETYPE_BASE_NAME=freetype.6
+ FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
+ { $as_echo "$as_me:${as_lineno-$LINENO}: Compensating for missing symlink by using version 6 explicitly" >&5
+$as_echo "$as_me: Compensating for missing symlink by using version 6 explicitly" >&6;}
+ else
+ { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&5
$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&6;}
- FOUND_FREETYPE=no
+ FOUND_FREETYPE=no
+ fi
else
if test "x$OPENJDK_TARGET_OS" = xwindows; then
# On Windows, we will need both .lib and .dll file.
- if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/freetype.lib"; then
- { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/freetype.lib. Ignoring location." >&5
-$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/freetype.lib. Ignoring location." >&6;}
+ if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib"; then
+ { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&5
+$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&6;}
FOUND_FREETYPE=no
fi
elif test "x$OPENJDK_TARGET_OS" = xsolaris \
&& test -s "$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR/$FREETYPE_LIB_NAME"; then
# Found lib in isa dir, use that instead.
POTENTIAL_FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR"
+ { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&5
+$as_echo "$as_me: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&6;}
fi
fi
fi
@@ -46975,30 +47155,55 @@
POTENTIAL_FREETYPE_LIB_PATH="$FREETYPE_BASE_DIR/lib/x86_64-linux-gnu"
METHOD="well-known location"
- # First check if the files exists.
- if test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
- # We found an arbitrary include file. That's a good sign.
+ # Let's start with an optimistic view of the world :-)
+ FOUND_FREETYPE=yes
+
+ # First look for the canonical freetype main include file ft2build.h.
+ if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
+ # Oh no! Let's try in the freetype2 directory. This is needed at least at Mac OS X Yosemite.
+ POTENTIAL_FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH/freetype2"
+ if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
+ # Fail.
+ FOUND_FREETYPE=no
+ fi
+ fi
+
+ if test "x$FOUND_FREETYPE" = xyes; then
+ # Include file found, let's continue the sanity check.
{ $as_echo "$as_me:${as_lineno-$LINENO}: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&5
$as_echo "$as_me: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&6;}
- FOUND_FREETYPE=yes
-
- FREETYPE_LIB_NAME="${LIBRARY_PREFIX}freetype${SHARED_LIBRARY_SUFFIX}"
+
+ # Reset to default value
+ FREETYPE_BASE_NAME=freetype
+ FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME"; then
- { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&5
+ if test "x$OPENJDK_TARGET_OS" = xmacosx \
+ && test -s "$POTENTIAL_FREETYPE_LIB_PATH/${LIBRARY_PREFIX}freetype.6${SHARED_LIBRARY_SUFFIX}"; then
+ # On Mac OS X Yosemite, the symlink from libfreetype.dylib to libfreetype.6.dylib disappeared. Check
+ # for the .6 version explicitly.
+ FREETYPE_BASE_NAME=freetype.6
+ FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
+ { $as_echo "$as_me:${as_lineno-$LINENO}: Compensating for missing symlink by using version 6 explicitly" >&5
+$as_echo "$as_me: Compensating for missing symlink by using version 6 explicitly" >&6;}
+ else
+ { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&5
$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&6;}
- FOUND_FREETYPE=no
+ FOUND_FREETYPE=no
+ fi
else
if test "x$OPENJDK_TARGET_OS" = xwindows; then
# On Windows, we will need both .lib and .dll file.
- if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/freetype.lib"; then
- { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/freetype.lib. Ignoring location." >&5
-$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/freetype.lib. Ignoring location." >&6;}
+ if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib"; then
+ { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&5
+$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&6;}
FOUND_FREETYPE=no
fi
elif test "x$OPENJDK_TARGET_OS" = xsolaris \
&& test -s "$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR/$FREETYPE_LIB_NAME"; then
# Found lib in isa dir, use that instead.
POTENTIAL_FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR"
+ { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&5
+$as_echo "$as_me: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&6;}
fi
fi
fi
@@ -47267,30 +47472,55 @@
POTENTIAL_FREETYPE_LIB_PATH="$FREETYPE_BASE_DIR/lib/i386-linux-gnu"
METHOD="well-known location"
- # First check if the files exists.
- if test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
- # We found an arbitrary include file. That's a good sign.
+ # Let's start with an optimistic view of the world :-)
+ FOUND_FREETYPE=yes
+
+ # First look for the canonical freetype main include file ft2build.h.
+ if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
+ # Oh no! Let's try in the freetype2 directory. This is needed at least at Mac OS X Yosemite.
+ POTENTIAL_FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH/freetype2"
+ if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
+ # Fail.
+ FOUND_FREETYPE=no
+ fi
+ fi
+
+ if test "x$FOUND_FREETYPE" = xyes; then
+ # Include file found, let's continue the sanity check.
{ $as_echo "$as_me:${as_lineno-$LINENO}: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&5
$as_echo "$as_me: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&6;}
- FOUND_FREETYPE=yes
-
- FREETYPE_LIB_NAME="${LIBRARY_PREFIX}freetype${SHARED_LIBRARY_SUFFIX}"
+
+ # Reset to default value
+ FREETYPE_BASE_NAME=freetype
+ FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME"; then
- { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&5
+ if test "x$OPENJDK_TARGET_OS" = xmacosx \
+ && test -s "$POTENTIAL_FREETYPE_LIB_PATH/${LIBRARY_PREFIX}freetype.6${SHARED_LIBRARY_SUFFIX}"; then
+ # On Mac OS X Yosemite, the symlink from libfreetype.dylib to libfreetype.6.dylib disappeared. Check
+ # for the .6 version explicitly.
+ FREETYPE_BASE_NAME=freetype.6
+ FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
+ { $as_echo "$as_me:${as_lineno-$LINENO}: Compensating for missing symlink by using version 6 explicitly" >&5
+$as_echo "$as_me: Compensating for missing symlink by using version 6 explicitly" >&6;}
+ else
+ { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&5
$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&6;}
- FOUND_FREETYPE=no
+ FOUND_FREETYPE=no
+ fi
else
if test "x$OPENJDK_TARGET_OS" = xwindows; then
# On Windows, we will need both .lib and .dll file.
- if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/freetype.lib"; then
- { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/freetype.lib. Ignoring location." >&5
-$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/freetype.lib. Ignoring location." >&6;}
+ if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib"; then
+ { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&5
+$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&6;}
FOUND_FREETYPE=no
fi
elif test "x$OPENJDK_TARGET_OS" = xsolaris \
&& test -s "$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR/$FREETYPE_LIB_NAME"; then
# Found lib in isa dir, use that instead.
POTENTIAL_FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR"
+ { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&5
+$as_echo "$as_me: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&6;}
fi
fi
fi
@@ -47559,30 +47789,55 @@
POTENTIAL_FREETYPE_LIB_PATH="$FREETYPE_BASE_DIR/lib32"
METHOD="well-known location"
- # First check if the files exists.
- if test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
- # We found an arbitrary include file. That's a good sign.
+ # Let's start with an optimistic view of the world :-)
+ FOUND_FREETYPE=yes
+
+ # First look for the canonical freetype main include file ft2build.h.
+ if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
+ # Oh no! Let's try in the freetype2 directory. This is needed at least at Mac OS X Yosemite.
+ POTENTIAL_FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH/freetype2"
+ if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
+ # Fail.
+ FOUND_FREETYPE=no
+ fi
+ fi
+
+ if test "x$FOUND_FREETYPE" = xyes; then
+ # Include file found, let's continue the sanity check.
{ $as_echo "$as_me:${as_lineno-$LINENO}: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&5
$as_echo "$as_me: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&6;}
- FOUND_FREETYPE=yes
-
- FREETYPE_LIB_NAME="${LIBRARY_PREFIX}freetype${SHARED_LIBRARY_SUFFIX}"
+
+ # Reset to default value
+ FREETYPE_BASE_NAME=freetype
+ FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME"; then
- { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&5
+ if test "x$OPENJDK_TARGET_OS" = xmacosx \
+ && test -s "$POTENTIAL_FREETYPE_LIB_PATH/${LIBRARY_PREFIX}freetype.6${SHARED_LIBRARY_SUFFIX}"; then
+ # On Mac OS X Yosemite, the symlink from libfreetype.dylib to libfreetype.6.dylib disappeared. Check
+ # for the .6 version explicitly.
+ FREETYPE_BASE_NAME=freetype.6
+ FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
+ { $as_echo "$as_me:${as_lineno-$LINENO}: Compensating for missing symlink by using version 6 explicitly" >&5
+$as_echo "$as_me: Compensating for missing symlink by using version 6 explicitly" >&6;}
+ else
+ { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&5
$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&6;}
- FOUND_FREETYPE=no
+ FOUND_FREETYPE=no
+ fi
else
if test "x$OPENJDK_TARGET_OS" = xwindows; then
# On Windows, we will need both .lib and .dll file.
- if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/freetype.lib"; then
- { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/freetype.lib. Ignoring location." >&5
-$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/freetype.lib. Ignoring location." >&6;}
+ if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib"; then
+ { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&5
+$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&6;}
FOUND_FREETYPE=no
fi
elif test "x$OPENJDK_TARGET_OS" = xsolaris \
&& test -s "$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR/$FREETYPE_LIB_NAME"; then
# Found lib in isa dir, use that instead.
POTENTIAL_FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR"
+ { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&5
+$as_echo "$as_me: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&6;}
fi
fi
fi
@@ -48141,9 +48396,9 @@
fi
if test "x$OPENJDK_TARGET_OS" = xwindows; then
- FREETYPE_LIBS="$FREETYPE_LIB_PATH/freetype.lib"
- else
- FREETYPE_LIBS="-L$FREETYPE_LIB_PATH -lfreetype"
+ FREETYPE_LIBS="$FREETYPE_LIB_PATH/$FREETYPE_BASE_NAME.lib"
+ else
+ FREETYPE_LIBS="-L$FREETYPE_LIB_PATH -l$FREETYPE_BASE_NAME"
fi
fi
@@ -51078,7 +51333,43 @@
# Let make expand exec_prefix.
test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
-DEFS=-DHAVE_CONFIG_H
+# Transform confdefs.h into DEFS.
+# Protect against shell expansion while executing Makefile rules.
+# Protect against Makefile macro expansion.
+#
+# If the first sed substitution is executed (which looks for macros that
+# take arguments), then branch to the quote section. Otherwise,
+# look for a macro that doesn't take arguments.
+ac_script='
+:mline
+/\\$/{
+ N
+ s,\\\n,,
+ b mline
+}
+t clear
+:clear
+s/^[ ]*#[ ]*define[ ][ ]*\([^ (][^ (]*([^)]*)\)[ ]*\(.*\)/-D\1=\2/g
+t quote
+s/^[ ]*#[ ]*define[ ][ ]*\([^ ][^ ]*\)[ ]*\(.*\)/-D\1=\2/g
+t quote
+b any
+:quote
+s/[ `~#$^&*(){}\\|;'\''"<>?]/\\&/g
+s/\[/\\&/g
+s/\]/\\&/g
+s/\$/$$/g
+H
+:any
+${
+ g
+ s/^\n//
+ s/\n/ /g
+ p
+}
+'
+DEFS=`sed -n "$ac_script" confdefs.h`
+
ac_libobjs=
ac_ltlibobjs=
@@ -51512,15 +51803,11 @@
"*) set x $ac_config_files; shift; ac_config_files=$*;;
esac
-case $ac_config_headers in *"
-"*) set x $ac_config_headers; shift; ac_config_headers=$*;;
-esac
cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
# Files that config.status was made for.
config_files="$ac_config_files"
-config_headers="$ac_config_headers"
_ACEOF
@@ -51541,15 +51828,10 @@
--recheck update $as_me by reconfiguring in the same conditions
--file=FILE[:TEMPLATE]
instantiate the configuration file FILE
- --header=FILE[:TEMPLATE]
- instantiate the configuration header FILE
Configuration files:
$config_files
-Configuration headers:
-$config_headers
-
Report bugs to <build-dev@openjdk.java.net>.
OpenJDK home page: <http://openjdk.java.net>."
@@ -51612,18 +51894,7 @@
esac
as_fn_append CONFIG_FILES " '$ac_optarg'"
ac_need_defaults=false;;
- --header | --heade | --head | --hea )
- $ac_shift
- case $ac_optarg in
- *\'*) ac_optarg=`$as_echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"` ;;
- esac
- as_fn_append CONFIG_HEADERS " '$ac_optarg'"
- ac_need_defaults=false;;
- --he | --h)
- # Conflict between --help and --header
- as_fn_error $? "ambiguous option: \`$1'
-Try \`$0 --help' for more information.";;
- --help | --hel | -h )
+ --he | --h | --help | --hel | -h )
$as_echo "$ac_cs_usage"; exit ;;
-q | -quiet | --quiet | --quie | --qui | --qu | --q \
| -silent | --silent | --silen | --sile | --sil | --si | --s)
@@ -51679,12 +51950,10 @@
for ac_config_target in $ac_config_targets
do
case $ac_config_target in
- "$OUTPUT_ROOT/config.h") CONFIG_HEADERS="$CONFIG_HEADERS $OUTPUT_ROOT/config.h:$AUTOCONF_DIR/config.h.in" ;;
"$OUTPUT_ROOT/spec.gmk") CONFIG_FILES="$CONFIG_FILES $OUTPUT_ROOT/spec.gmk:$AUTOCONF_DIR/spec.gmk.in" ;;
"$OUTPUT_ROOT/hotspot-spec.gmk") CONFIG_FILES="$CONFIG_FILES $OUTPUT_ROOT/hotspot-spec.gmk:$AUTOCONF_DIR/hotspot-spec.gmk.in" ;;
"$OUTPUT_ROOT/bootcycle-spec.gmk") CONFIG_FILES="$CONFIG_FILES $OUTPUT_ROOT/bootcycle-spec.gmk:$AUTOCONF_DIR/bootcycle-spec.gmk.in" ;;
"$OUTPUT_ROOT/compare.sh") CONFIG_FILES="$CONFIG_FILES $OUTPUT_ROOT/compare.sh:$AUTOCONF_DIR/compare.sh.in" ;;
- "$OUTPUT_ROOT/spec.sh") CONFIG_FILES="$CONFIG_FILES $OUTPUT_ROOT/spec.sh:$AUTOCONF_DIR/spec.sh.in" ;;
"$OUTPUT_ROOT/Makefile") CONFIG_FILES="$CONFIG_FILES $OUTPUT_ROOT/Makefile:$AUTOCONF_DIR/Makefile.in" ;;
*) as_fn_error $? "invalid argument: \`$ac_config_target'" "$LINENO" 5;;
@@ -51698,7 +51967,6 @@
# bizarre bug on SunOS 4.1.3.
if $ac_need_defaults; then
test "${CONFIG_FILES+set}" = set || CONFIG_FILES=$config_files
- test "${CONFIG_HEADERS+set}" = set || CONFIG_HEADERS=$config_headers
fi
# Have a temporary directory for convenience. Make it in the build tree
@@ -51886,116 +52154,8 @@
cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
fi # test -n "$CONFIG_FILES"
-# Set up the scripts for CONFIG_HEADERS section.
-# No need to generate them if there are no CONFIG_HEADERS.
-# This happens for instance with `./config.status Makefile'.
-if test -n "$CONFIG_HEADERS"; then
-cat >"$ac_tmp/defines.awk" <<\_ACAWK ||
-BEGIN {
-_ACEOF
-
-# Transform confdefs.h into an awk script `defines.awk', embedded as
-# here-document in config.status, that substitutes the proper values into
-# config.h.in to produce config.h.
-
-# Create a delimiter string that does not exist in confdefs.h, to ease
-# handling of long lines.
-ac_delim='%!_!# '
-for ac_last_try in false false :; do
- ac_tt=`sed -n "/$ac_delim/p" confdefs.h`
- if test -z "$ac_tt"; then
- break
- elif $ac_last_try; then
- as_fn_error $? "could not make $CONFIG_HEADERS" "$LINENO" 5
- else
- ac_delim="$ac_delim!$ac_delim _$ac_delim!! "
- fi
-done
-
-# For the awk script, D is an array of macro values keyed by name,
-# likewise P contains macro parameters if any. Preserve backslash
-# newline sequences.
-
-ac_word_re=[_$as_cr_Letters][_$as_cr_alnum]*
-sed -n '
-s/.\{148\}/&'"$ac_delim"'/g
-t rset
-:rset
-s/^[ ]*#[ ]*define[ ][ ]*/ /
-t def
-d
-:def
-s/\\$//
-t bsnl
-s/["\\]/\\&/g
-s/^ \('"$ac_word_re"'\)\(([^()]*)\)[ ]*\(.*\)/P["\1"]="\2"\
-D["\1"]=" \3"/p
-s/^ \('"$ac_word_re"'\)[ ]*\(.*\)/D["\1"]=" \2"/p
-d
-:bsnl
-s/["\\]/\\&/g
-s/^ \('"$ac_word_re"'\)\(([^()]*)\)[ ]*\(.*\)/P["\1"]="\2"\
-D["\1"]=" \3\\\\\\n"\\/p
-t cont
-s/^ \('"$ac_word_re"'\)[ ]*\(.*\)/D["\1"]=" \2\\\\\\n"\\/p
-t cont
-d
-:cont
-n
-s/.\{148\}/&'"$ac_delim"'/g
-t clear
-:clear
-s/\\$//
-t bsnlc
-s/["\\]/\\&/g; s/^/"/; s/$/"/p
-d
-:bsnlc
-s/["\\]/\\&/g; s/^/"/; s/$/\\\\\\n"\\/p
-b cont
-' <confdefs.h | sed '
-s/'"$ac_delim"'/"\\\
-"/g' >>$CONFIG_STATUS || ac_write_fail=1
-
-cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
- for (key in D) D_is_set[key] = 1
- FS = ""
-}
-/^[\t ]*#[\t ]*(define|undef)[\t ]+$ac_word_re([\t (]|\$)/ {
- line = \$ 0
- split(line, arg, " ")
- if (arg[1] == "#") {
- defundef = arg[2]
- mac1 = arg[3]
- } else {
- defundef = substr(arg[1], 2)
- mac1 = arg[2]
- }
- split(mac1, mac2, "(") #)
- macro = mac2[1]
- prefix = substr(line, 1, index(line, defundef) - 1)
- if (D_is_set[macro]) {
- # Preserve the white space surrounding the "#".
- print prefix "define", macro P[macro] D[macro]
- next
- } else {
- # Replace #undef with comments. This is necessary, for example,
- # in the case of _POSIX_SOURCE, which is predefined and required
- # on some systems where configure will not decide to define it.
- if (defundef == "undef") {
- print "/*", prefix defundef, macro, "*/"
- next
- }
- }
-}
-{ print }
-_ACAWK
-_ACEOF
-cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
- as_fn_error $? "could not setup config headers machinery" "$LINENO" 5
-fi # test -n "$CONFIG_HEADERS"
-
-
-eval set X " :F $CONFIG_FILES :H $CONFIG_HEADERS "
+
+eval set X " :F $CONFIG_FILES "
shift
for ac_tag
do
@@ -52203,30 +52363,7 @@
esac \
|| as_fn_error $? "could not create $ac_file" "$LINENO" 5
;;
- :H)
- #
- # CONFIG_HEADER
- #
- if test x"$ac_file" != x-; then
- {
- $as_echo "/* $configure_input */" \
- && eval '$AWK -f "$ac_tmp/defines.awk"' "$ac_file_inputs"
- } >"$ac_tmp/config.h" \
- || as_fn_error $? "could not create $ac_file" "$LINENO" 5
- if diff "$ac_file" "$ac_tmp/config.h" >/dev/null 2>&1; then
- { $as_echo "$as_me:${as_lineno-$LINENO}: $ac_file is unchanged" >&5
-$as_echo "$as_me: $ac_file is unchanged" >&6;}
- else
- rm -f "$ac_file"
- mv "$ac_tmp/config.h" "$ac_file" \
- || as_fn_error $? "could not create $ac_file" "$LINENO" 5
- fi
- else
- $as_echo "/* $configure_input */" \
- && eval '$AWK -f "$ac_tmp/defines.awk"' "$ac_file_inputs" \
- || as_fn_error $? "could not create -" "$LINENO" 5
- fi
- ;;
+
esac
--- a/common/autoconf/help.m4 Thu Nov 06 10:11:35 2014 -0800
+++ b/common/autoconf/help.m4 Wed Jul 05 20:06:31 2017 +0200
@@ -131,7 +131,7 @@
pulse)
PKGHANDLER_COMMAND="sudo yum install pulseaudio-libs-devel" ;;
x11)
- PKGHANDLER_COMMAND="sudo yum install libXtst-devel libXt-devel libXrender-devel" ;;
+ PKGHANDLER_COMMAND="sudo yum install libXtst-devel libXt-devel libXrender-devel libXi-devel" ;;
ccache)
PKGHANDLER_COMMAND="sudo yum install ccache" ;;
esac
--- a/common/autoconf/libraries.m4 Thu Nov 06 10:11:35 2014 -0800
+++ b/common/autoconf/libraries.m4 Wed Jul 05 20:06:31 2017 +0200
@@ -91,85 +91,93 @@
# Check for X Windows
#
- # Check if the user has specified sysroot, but not --x-includes or --x-libraries.
- # Make a simple check for the libraries at the sysroot, and setup --x-includes and
- # --x-libraries for the sysroot, if that seems to be correct.
- if test "x$OPENJDK_TARGET_OS" = "xlinux"; then
- if test "x$SYSROOT" != "x"; then
- if test "x$x_includes" = xNONE; then
- if test -f "$SYSROOT/usr/X11R6/include/X11/Xlib.h"; then
- x_includes="$SYSROOT/usr/X11R6/include"
- elif test -f "$SYSROOT/usr/include/X11/Xlib.h"; then
- x_includes="$SYSROOT/usr/include"
+ if test "x$X11_NOT_NEEDED" = xyes; then
+ if test "x${with_x}" != x; then
+ AC_MSG_WARN([X11 is not used, so --with-x is ignored])
+ fi
+ X_CFLAGS=
+ X_LIBS=
+ else
+ # Check if the user has specified sysroot, but not --x-includes or --x-libraries.
+ # Make a simple check for the libraries at the sysroot, and setup --x-includes and
+ # --x-libraries for the sysroot, if that seems to be correct.
+ if test "x$OPENJDK_TARGET_OS" = "xlinux"; then
+ if test "x$SYSROOT" != "x"; then
+ if test "x$x_includes" = xNONE; then
+ if test -f "$SYSROOT/usr/X11R6/include/X11/Xlib.h"; then
+ x_includes="$SYSROOT/usr/X11R6/include"
+ elif test -f "$SYSROOT/usr/include/X11/Xlib.h"; then
+ x_includes="$SYSROOT/usr/include"
+ fi
fi
- fi
- if test "x$x_libraries" = xNONE; then
- if test -f "$SYSROOT/usr/X11R6/lib/libX11.so"; then
- x_libraries="$SYSROOT/usr/X11R6/lib"
- elif test "$SYSROOT/usr/lib64/libX11.so" && test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
- x_libraries="$SYSROOT/usr/lib64"
- elif test -f "$SYSROOT/usr/lib/libX11.so"; then
- x_libraries="$SYSROOT/usr/lib"
+ if test "x$x_libraries" = xNONE; then
+ if test -f "$SYSROOT/usr/X11R6/lib/libX11.so"; then
+ x_libraries="$SYSROOT/usr/X11R6/lib"
+ elif test "$SYSROOT/usr/lib64/libX11.so" && test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
+ x_libraries="$SYSROOT/usr/lib64"
+ elif test -f "$SYSROOT/usr/lib/libX11.so"; then
+ x_libraries="$SYSROOT/usr/lib"
+ fi
fi
fi
fi
- fi
- # Now let autoconf do it's magic
- AC_PATH_X
- AC_PATH_XTRA
+ # Now let autoconf do it's magic
+ AC_PATH_X
+ AC_PATH_XTRA
- # AC_PATH_XTRA creates X_LIBS and sometimes adds -R flags. When cross compiling
- # this doesn't make sense so we remove it.
- if test "x$COMPILE_TYPE" = xcross; then
- X_LIBS=`$ECHO $X_LIBS | $SED 's/-R \{0,1\}[[^ ]]*//g'`
- fi
+ # AC_PATH_XTRA creates X_LIBS and sometimes adds -R flags. When cross compiling
+ # this doesn't make sense so we remove it.
+ if test "x$COMPILE_TYPE" = xcross; then
+ X_LIBS=`$ECHO $X_LIBS | $SED 's/-R \{0,1\}[[^ ]]*//g'`
+ fi
- if test "x$no_x" = xyes && test "x$X11_NOT_NEEDED" != xyes; then
- HELP_MSG_MISSING_DEPENDENCY([x11])
- AC_MSG_ERROR([Could not find X11 libraries. $HELP_MSG])
- fi
+ if test "x$no_x" = xyes; then
+ HELP_MSG_MISSING_DEPENDENCY([x11])
+ AC_MSG_ERROR([Could not find X11 libraries. $HELP_MSG])
+ fi
- if test "x$OPENJDK_TARGET_OS" = xsolaris; then
- OPENWIN_HOME="/usr/openwin"
- X_CFLAGS="-I$SYSROOT$OPENWIN_HOME/include -I$SYSROOT$OPENWIN_HOME/include/X11/extensions"
- X_LIBS="-L$SYSROOT$OPENWIN_HOME/sfw/lib$OPENJDK_TARGET_CPU_ISADIR \
- -L$SYSROOT$OPENWIN_HOME/lib$OPENJDK_TARGET_CPU_ISADIR \
- -R$OPENWIN_HOME/sfw/lib$OPENJDK_TARGET_CPU_ISADIR \
- -R$OPENWIN_HOME/lib$OPENJDK_TARGET_CPU_ISADIR"
- fi
+ if test "x$OPENJDK_TARGET_OS" = xsolaris; then
+ OPENWIN_HOME="/usr/openwin"
+ X_CFLAGS="-I$SYSROOT$OPENWIN_HOME/include -I$SYSROOT$OPENWIN_HOME/include/X11/extensions"
+ X_LIBS="-L$SYSROOT$OPENWIN_HOME/sfw/lib$OPENJDK_TARGET_CPU_ISADIR \
+ -L$SYSROOT$OPENWIN_HOME/lib$OPENJDK_TARGET_CPU_ISADIR \
+ -R$OPENWIN_HOME/sfw/lib$OPENJDK_TARGET_CPU_ISADIR \
+ -R$OPENWIN_HOME/lib$OPENJDK_TARGET_CPU_ISADIR"
+ fi
+
+ AC_LANG_PUSH(C)
+ OLD_CFLAGS="$CFLAGS"
+ CFLAGS="$CFLAGS $SYSROOT_CFLAGS $X_CFLAGS"
- AC_LANG_PUSH(C)
- OLD_CFLAGS="$CFLAGS"
- CFLAGS="$CFLAGS $SYSROOT_CFLAGS $X_CFLAGS"
-
- # Need to include Xlib.h and Xutil.h to avoid "present but cannot be compiled" warnings on Solaris 10
- AC_CHECK_HEADERS([X11/extensions/shape.h X11/extensions/Xrender.h X11/extensions/XTest.h X11/Intrinsic.h],
- [X11_A_OK=yes],
- [X11_A_OK=no; break],
- [
- # include <X11/Xlib.h>
- # include <X11/Xutil.h>
- ]
- )
+ # Need to include Xlib.h and Xutil.h to avoid "present but cannot be compiled" warnings on Solaris 10
+ AC_CHECK_HEADERS([X11/extensions/shape.h X11/extensions/Xrender.h X11/extensions/XTest.h X11/Intrinsic.h],
+ [X11_HEADERS_OK=yes],
+ [X11_HEADERS_OK=no; break],
+ [
+ # include <X11/Xlib.h>
+ # include <X11/Xutil.h>
+ ]
+ )
- # If XLinearGradient isn't available in Xrender.h, signal that it needs to be
- # defined in libawt_xawt.
- AC_MSG_CHECKING([if XlinearGradient is defined in Xrender.h])
- AC_COMPILE_IFELSE(
- [AC_LANG_PROGRAM([[#include <X11/extensions/Xrender.h>]],
- [[XLinearGradient x;]])],
- [AC_MSG_RESULT([yes])],
- [AC_MSG_RESULT([no])
- X_CFLAGS="$X_CFLAGS -DSOLARIS10_NO_XRENDER_STRUCTS"])
+ if test "x$X11_HEADERS_OK" = xno; then
+ HELP_MSG_MISSING_DEPENDENCY([x11])
+ AC_MSG_ERROR([Could not find all X11 headers (shape.h Xrender.h XTest.h Intrinsic.h). $HELP_MSG])
+ fi
- CFLAGS="$OLD_CFLAGS"
- AC_LANG_POP(C)
+ # If XLinearGradient isn't available in Xrender.h, signal that it needs to be
+ # defined in libawt_xawt.
+ AC_MSG_CHECKING([if XlinearGradient is defined in Xrender.h])
+ AC_COMPILE_IFELSE(
+ [AC_LANG_PROGRAM([[#include <X11/extensions/Xrender.h>]],
+ [[XLinearGradient x;]])],
+ [AC_MSG_RESULT([yes])],
+ [AC_MSG_RESULT([no])
+ X_CFLAGS="$X_CFLAGS -DSOLARIS10_NO_XRENDER_STRUCTS"])
- if test "x$X11_A_OK" = xno && test "x$X11_NOT_NEEDED" != xyes; then
- HELP_MSG_MISSING_DEPENDENCY([x11])
- AC_MSG_ERROR([Could not find all X11 headers (shape.h Xrender.h XTest.h Intrinsic.h). $HELP_MSG])
- fi
+ CFLAGS="$OLD_CFLAGS"
+ AC_LANG_POP(C)
+ fi # X11_NOT_NEEDED
AC_SUBST(X_CFLAGS)
AC_SUBST(X_LIBS)
@@ -264,7 +272,7 @@
fi
# Now check if configure found a version of 'msbuild.exe'
if test "x$BUILD_FREETYPE" = xyes && test "x$MSBUILD" == x ; then
- AC_MSG_WARN([Can't find an msbuild.exe executable (you may try to install .NET 4.0) - ignoring --with-freetype-src])
+ AC_MSG_WARN([Can not find an msbuild.exe executable (you may try to install .NET 4.0) - ignoring --with-freetype-src])
BUILD_FREETYPE=no
fi
@@ -335,27 +343,50 @@
POTENTIAL_FREETYPE_LIB_PATH="$2"
METHOD="$3"
- # First check if the files exists.
- if test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
- # We found an arbitrary include file. That's a good sign.
+ # Let's start with an optimistic view of the world :-)
+ FOUND_FREETYPE=yes
+
+ # First look for the canonical freetype main include file ft2build.h.
+ if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
+ # Oh no! Let's try in the freetype2 directory. This is needed at least at Mac OS X Yosemite.
+ POTENTIAL_FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH/freetype2"
+ if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
+ # Fail.
+ FOUND_FREETYPE=no
+ fi
+ fi
+
+ if test "x$FOUND_FREETYPE" = xyes; then
+ # Include file found, let's continue the sanity check.
AC_MSG_NOTICE([Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD])
- FOUND_FREETYPE=yes
- FREETYPE_LIB_NAME="${LIBRARY_PREFIX}freetype${SHARED_LIBRARY_SUFFIX}"
+ # Reset to default value
+ FREETYPE_BASE_NAME=freetype
+ FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME"; then
- AC_MSG_NOTICE([Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location.])
- FOUND_FREETYPE=no
+ if test "x$OPENJDK_TARGET_OS" = xmacosx \
+ && test -s "$POTENTIAL_FREETYPE_LIB_PATH/${LIBRARY_PREFIX}freetype.6${SHARED_LIBRARY_SUFFIX}"; then
+ # On Mac OS X Yosemite, the symlink from libfreetype.dylib to libfreetype.6.dylib disappeared. Check
+ # for the .6 version explicitly.
+ FREETYPE_BASE_NAME=freetype.6
+ FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
+ AC_MSG_NOTICE([Compensating for missing symlink by using version 6 explicitly])
+ else
+ AC_MSG_NOTICE([Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location.])
+ FOUND_FREETYPE=no
+ fi
else
if test "x$OPENJDK_TARGET_OS" = xwindows; then
# On Windows, we will need both .lib and .dll file.
- if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/freetype.lib"; then
- AC_MSG_NOTICE([Could not find $POTENTIAL_FREETYPE_LIB_PATH/freetype.lib. Ignoring location.])
+ if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib"; then
+ AC_MSG_NOTICE([Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location.])
FOUND_FREETYPE=no
fi
elif test "x$OPENJDK_TARGET_OS" = xsolaris \
&& test -s "$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR/$FREETYPE_LIB_NAME"; then
# Found lib in isa dir, use that instead.
POTENTIAL_FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR"
+ AC_MSG_NOTICE([Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead])
fi
fi
fi
@@ -392,6 +423,8 @@
AC_ARG_ENABLE(freetype-bundling, [AS_HELP_STRING([--disable-freetype-bundling],
[disable bundling of the freetype library with the build result @<:@enabled on Windows or when using --with-freetype, disabled otherwise@:>@])])
+ # Need to specify explicitly since it needs to be overridden on some versions of macosx
+ FREETYPE_BASE_NAME=freetype
FREETYPE_CFLAGS=
FREETYPE_LIBS=
FREETYPE_BUNDLE_LIB_PATH=
@@ -575,9 +608,9 @@
if test "x$FREETYPE_LIBS" = x; then
BASIC_FIXUP_PATH(FREETYPE_LIB_PATH)
if test "x$OPENJDK_TARGET_OS" = xwindows; then
- FREETYPE_LIBS="$FREETYPE_LIB_PATH/freetype.lib"
+ FREETYPE_LIBS="$FREETYPE_LIB_PATH/$FREETYPE_BASE_NAME.lib"
else
- FREETYPE_LIBS="-L$FREETYPE_LIB_PATH -lfreetype"
+ FREETYPE_LIBS="-L$FREETYPE_LIB_PATH -l$FREETYPE_BASE_NAME"
fi
fi
--- a/common/autoconf/spec.sh.in Thu Nov 06 10:11:35 2014 -0800
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,36 +0,0 @@
-#
-# Copyright (c) 2011, 2012, Oracle and/or its affiliates. All rights reserved.
-# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
-#
-# This code is free software; you can redistribute it and/or modify it
-# under the terms of the GNU General Public License version 2 only, as
-# published by the Free Software Foundation. Oracle designates this
-# particular file as subject to the "Classpath" exception as provided
-# by Oracle in the LICENSE file that accompanied this code.
-#
-# This code is distributed in the hope that it will be useful, but WITHOUT
-# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
-# FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
-# version 2 for more details (a copy is included in the LICENSE file that
-# accompanied this code).
-#
-# You should have received a copy of the GNU General Public License version
-# 2 along with this work; if not, write to the Free Software Foundation,
-# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
-#
-# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
-# or visit www.oracle.com if you need additional information or have any
-# questions.
-#
-
-CAT="@CAT@"
-CD=cd
-CP="@CP@"
-DIFF="@DIFF@"
-ECHO="@ECHO@"
-FIND="@FIND@"
-GREP="@GREP@"
-RM="@RM@"
-SED="@SED@"
-
-POST_STRIP_CMD="@POST_STRIP_CMD@"
--- a/common/bin/boot_cycle.sh Thu Nov 06 10:11:35 2014 -0800
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,77 +0,0 @@
-#!/bin/bash
-#
-# Copyright (c) 2012, Oracle and/or its affiliates. All rights reserved.
-# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
-#
-# This code is free software; you can redistribute it and/or modify it
-# under the terms of the GNU General Public License version 2 only, as
-# published by the Free Software Foundation.
-#
-# This code is distributed in the hope that it will be useful, but WITHOUT
-# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
-# FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
-# version 2 for more details (a copy is included in the LICENSE file that
-# accompanied this code).
-#
-# You should have received a copy of the GNU General Public License version
-# 2 along with this work; if not, write to the Free Software Foundation,
-# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
-#
-# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
-# or visit www.oracle.com if you need additional information or have any
-# questions.
-#
-
-# The boot_cycle.sh script performs two complete image builds (no javadoc though....)
-# where the second build uses the first build as the boot jdk.
-#
-# This is useful to verify that the build is self hoisting and assists
-# in flushing out bugs. You can follow up with compare_objects.sh to check
-# that the two boot_cycle_?/images/j2sdk are identical. They should be.
-#
-# Usage:
-# Specify the configure arguments to boot_cycle.sh, for example:
-#
-# sh common/bin/boot_cycle.sh --enable-debug --with-jvm-variants=server
-#
-# The same arguments will be used for both builds, except of course --with-boot-jdk
-# that will be adjusted to boot_cycle_1 for the second build.
-
-SCRIPT_DIR=`pwd`/`dirname $0`
-ROOT_DIR=`(cd $SCRIPT_DIR/../.. ; pwd)`
-BUILD_DIR=$ROOT_DIR/build
-mkdir -p $BUILD_DIR
-AUTOCONF_DIR=`(cd $SCRIPT_DIR/../autoconf ; pwd)`
-BOOT_CYCLE_1_DIR=$BUILD_DIR/boot_cycle_1
-BOOT_CYCLE_2_DIR=$BUILD_DIR/boot_cycle_2
-
-# Create the boot cycle dirs in the build directory.
-mkdir -p $BOOT_CYCLE_1_DIR
-mkdir -p $BOOT_CYCLE_2_DIR
-
-cd $BOOT_CYCLE_1_DIR
-# Configure!
-sh $AUTOCONF_DIR/configure "$@"
-# Now build!
-make images
-
-if ! test -x $BOOT_CYCLE_1_DIR/images/j2sdk-image/bin/java ; then
- echo Failed to build the executable $BOOT_CYCLE_1_DIR/images/j2sdk-image/bin/java
- exit 1
-fi
-
-cd $BOOT_CYCLE_2_DIR
-# Pickup the configure arguments, but drop any --with-boot-jdk=....
-# and add the correct --with-boot-jdk=...boot_cycle_1... at the end.
-ARGUMENTS="`cat $BOOT_CYCLE_1_DIR/configure-arguments|sed 's/--with-boot-jdk=[^ ]*//'` --with-boot-jdk=$BOOT_CYCLE_1_DIR/images/j2sdk-image"
-# Configure using these adjusted arguments.
-sh $AUTOCONF_DIR/configure $ARGUMENTS
-# Now build!
-make images
-
-if ! test -x $BOOT_CYCLE_2_DIR/images/j2sdk-image/bin/java ; then
- echo Failed to build the final executable $BOOT_CYCLE_2_DIR/images/j2sdk-image/bin/java
- exit 1
-fi
-
-
--- a/common/bin/compare-objects.sh Thu Nov 06 10:11:35 2014 -0800
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,235 +0,0 @@
-#!/bin/bash
-#
-# Copyright (c) 2012, Oracle and/or its affiliates. All rights reserved.
-# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
-#
-# This code is free software; you can redistribute it and/or modify it
-# under the terms of the GNU General Public License version 2 only, as
-# published by the Free Software Foundation.
-#
-# This code is distributed in the hope that it will be useful, but WITHOUT
-# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
-# FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
-# version 2 for more details (a copy is included in the LICENSE file that
-# accompanied this code).
-#
-# You should have received a copy of the GNU General Public License version
-# 2 along with this work; if not, write to the Free Software Foundation,
-# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
-#
-# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
-# or visit www.oracle.com if you need additional information or have any
-# questions.
-#
-
-# MANUAL
-#
-# ./common/bin/compare-objects.sh old_jdk_build_dir new_jdk_build_dir
-#
-# Compares object files
-#
-
-if [ "x$1" = "x-h" ] || [ "x$1" = "x--help" ] || [ "x$1" == "x" ]; then
- echo "bash ./common/bin/compare-objects.sh old_jdk_build_dir new_jdk_build_dir <pattern>"
- echo ""
- echo "Compare object files"
- echo ""
- exit 10
-fi
-
-#######
-#
-# List of files (grep patterns) that are ignored
-#
-# 1) hotspot object files
-IGNORE="-e hotspot"
-
-# 2) various build artifacts: sizer.32.o sizer.64.o dummyodbc.o
-# these are produced during build and then e.g run to produce other data
-# i.e not directly put into build => safe to ignore
-IGNORE="${IGNORE} -e sizer.32.o -e sizer.64.o"
-IGNORE="${IGNORE} -e dummyodbc.o"
-IGNORE="${IGNORE} -e genSolarisConstants.o"
-IGNORE="${IGNORE} -e genUnixConstants.o"
-
-OLD="$1"
-NEW="$2"
-shift; shift
-PATTERN="$*"
-
-if [ -f $NEW/spec.sh ]; then
- . $NEW/spec.sh
-elif [ -f $NEW/../../spec.sh ]; then
- . $NEW/../../spec.sh
-elif [ -f $OLD/spec.sh ]; then
- . $OLD/spec.sh
-elif [ -f $OLD/../../spec.sh ]; then
- . $OLD/../../spec.sh
-else
- echo "Unable to find spec.sh"
- echo "Giving up"
- exit 1
-fi
-
-export COMPARE_ROOT=/tmp/cimages.$USER/objects
-mkdir -p $COMPARE_ROOT
-
-(${CD} $OLD && ${FIND} . -name '*.o') > $COMPARE_ROOT/list.old
-(${CD} $NEW && ${FIND} . -name '*.o') > $COMPARE_ROOT/list.new
-
-# On macosx JobjC is build in both i386 and x86_64 variant (universial binary)
-# but new build only builds the x86_64
-# Remove the 386 variants from comparison...to avoid "false" positives
-${GREP} -v 'JObjC.dst/Objects-normal/i386' $COMPARE_ROOT/list.old > $COMPARE_ROOT/list.old.new
-${CP} $COMPARE_ROOT/list.old $COMPARE_ROOT/list.old.full
-${CP} $COMPARE_ROOT/list.old.new $COMPARE_ROOT/list.old
-
-findnew() {
- arg_1=$1
- arg_2=$2
-
- # special case 1 unpack-cmd => unpackexe
- arg_1=`${ECHO} $arg_1 | ${SED} 's!unpack-cmd!unpackexe!g'`
- arg_2=`${ECHO} $arg_2 | ${SED} 's!unpack-cmd!unpackexe!g'`
-
- # special case 2 /JObjC.dst/ => /libjobjc/
- arg_1=`${ECHO} $arg_1 | ${SED} 's!/JObjC.dst/!/libjobjc/!g'`
- arg_2=`${ECHO} $arg_2 | ${SED} 's!/JObjC.dst/!/libjobjc/!g'`
-
- full=`${ECHO} $arg_1 | ${SED} 's!\.!\\\.!g'`
- medium=`${ECHO} $arg_1 | ${SED} 's!.*/\([^/]*/[^/]*\)!\1!'`
- short=`${ECHO} $arg_2 | ${SED} 's!\.!\\\.!g'`
- if [ "`${GREP} -c "/$full" $COMPARE_ROOT/list.new`" -eq 1 ]
- then
- ${ECHO} $NEW/$arg_1
- return
- fi
-
- if [ "`${GREP} -c "$medium" $COMPARE_ROOT/list.new`" -eq 1 ]
- then
- ${GREP} "$medium" $COMPARE_ROOT/list.new
- return
- fi
-
- if [ "`${GREP} -c "/$short" $COMPARE_ROOT/list.new`" -eq 1 ]
- then
- ${GREP} "/$short" $COMPARE_ROOT/list.new
- return
- fi
-
- # old style has "dir" before obj{64}
- dir=`${ECHO} $arg_1 | ${SED} 's!.*/\([^/]*\)/obj[64]*.*!\1!g'`
- if [ -n "$dir" -a "$dir" != "$arg_1" ]
- then
- if [ "`${GREP} $dir $COMPARE_ROOT/list.new | ${GREP} -c "/$short"`" -eq 1 ]
- then
- ${GREP} $dir $COMPARE_ROOT/list.new | ${GREP} "/$short"
- return
- fi
-
- # Try with lib$dir/
- if [ "`${GREP} "lib$dir/" $COMPARE_ROOT/list.new | ${GREP} -c "/$short"`" -eq 1 ]
- then
- ${GREP} "lib$dir/" $COMPARE_ROOT/list.new | ${GREP} "/$short"
- return
- fi
-
- # Try with $dir_objs
- if [ "`${GREP} "${dir}_objs" $COMPARE_ROOT/list.new | ${GREP} -c "/$short"`" -eq 1 ]
- then
- ${GREP} "${dir}_objs" $COMPARE_ROOT/list.new | ${GREP} "/$short"
- return
- fi
- fi
-
- # check for some specifics...
- for i in demo hotspot jobjc
- do
- if [ "`${ECHO} $full | ${GREP} -c $i`" -gt 0 ]
- then
- if [ "`${GREP} $i $COMPARE_ROOT/list.new | ${GREP} -c "/$short"`" -eq 1 ]
- then
- ${GREP} $i $COMPARE_ROOT/list.new | ${GREP} "/$short"
- return
- fi
- fi
- done
-
- # check for specific demo
- demo=`${ECHO} $arg_1 | ${SED} 's!.*/demo/jvmti/\([^/]*\)/.*!\1!g'`
- if [ -n "$demo" -a "$dir" != "$demo" ]
- then
- if [ "`${GREP} $demo $COMPARE_ROOT/list.new | ${GREP} -c "/$short"`" -eq 1 ]
- then
- ${GREP} $demo $COMPARE_ROOT/list.new | ${GREP} "/$short"
- return
- fi
- fi
-
- return
-}
-
-compare() {
- old=$1
- new=$2
- ${DIFF} $old $new > /dev/null
- res=$?
- if [ $res -eq 0 ]
- then
- ${ECHO} 0
- return
- fi
-
- # check if stripped objects gives equality
- ${CP} $old $COMPARE_ROOT/`basename $old`.old
- ${CP} $new $COMPARE_ROOT/`basename $old`.new
- ${POST_STRIP_CMD} $COMPARE_ROOT/`basename $old`.old $COMPARE_ROOT/`basename $old`.new > /dev/null 2>&1
- ${DIFF} $COMPARE_ROOT/`basename $old`.old $COMPARE_ROOT/`basename $old`.new > /dev/null
- res=$?
- ${RM} $COMPARE_ROOT/`basename $old`.old $COMPARE_ROOT/`basename $old`.new
- if [ $res -eq 0 ]
- then
- ${ECHO} S
- return
- fi
-
- name=`basename $1 | ${SED} 's!\.o!!'`
- cntold=`strings $old | ${GREP} -c $name`
- cntnew=`strings $new | ${GREP} -c $name`
-
- if [ $cntold -gt 0 -a $cntnew -gt 0 ]
- then
- ${ECHO} F
- return
- fi
-
- ${ECHO} 1
-}
-
-for F in `${CAT} $COMPARE_ROOT/list.old`
-do
- if [ "${IGNORE}" ] && [ "`${ECHO} $F | ${GREP} ${IGNORE}`" ]
- then
- #
- # skip ignored files
- #
- continue;
- fi
-
- if [ "$PATTERN" ] && [ `${ECHO} $F | ${GREP} -c $PATTERN` -eq 0 ]
- then
- continue;
- fi
-
- f=`basename $F`
- o=$OLD/$F
- n=`findnew $F $f`
-
- if [ "$n" ]
- then
- n="$NEW/$n"
- ${ECHO} `compare $o $n` : $f : $o : $n
- else
- ${ECHO} "- : $f : $o "
- fi
-done
--- a/hotspot/.hgtags Thu Nov 06 10:11:35 2014 -0800
+++ b/hotspot/.hgtags Wed Jul 05 20:06:31 2017 +0200
@@ -440,3 +440,4 @@
438cb613151c4bd290bb732697517cba1cafcb04 jdk9-b35
464ab653fbb17eb518d8ef60f8df301de7ef00d0 jdk9-b36
b1c2dd843f247a1db19e1e85eb62ca405f72dc26 jdk9-b37
+c363a8b87e477ee45d6d3cb2a36cb365141bc596 jdk9-b38
--- a/jdk/.hgtags Thu Nov 06 10:11:35 2014 -0800
+++ b/jdk/.hgtags Wed Jul 05 20:06:31 2017 +0200
@@ -280,3 +280,4 @@
e549291a0227031310fa91c574891f892d27f959 jdk9-b35
cdcf2e599e42935c2d1d19a24bb19e808aeb43b5 jdk9-b36
27c3345d6dce39a22c262f30bb1f0e0b00c3709e jdk9-b37
+d2d745313c81d1fc01f426983b9f784ab1f750e8 jdk9-b38
--- a/jdk/src/java.base/share/classes/java/lang/ClassLoader.java Thu Nov 06 10:11:35 2014 -0800
+++ b/jdk/src/java.base/share/classes/java/lang/ClassLoader.java Wed Jul 05 20:06:31 2017 +0200
@@ -29,12 +29,10 @@
import java.io.File;
import java.lang.reflect.Constructor;
import java.lang.reflect.InvocationTargetException;
-import java.net.MalformedURLException;
import java.net.URL;
import java.security.AccessController;
import java.security.AccessControlContext;
import java.security.CodeSource;
-import java.security.Policy;
import java.security.PrivilegedAction;
import java.security.PrivilegedActionException;
import java.security.PrivilegedExceptionAction;
@@ -54,7 +52,6 @@
import sun.misc.CompoundEnumeration;
import sun.misc.Resource;
import sun.misc.URLClassPath;
-import sun.misc.VM;
import sun.reflect.CallerSensitive;
import sun.reflect.Reflection;
import sun.reflect.misc.ReflectUtil;
@@ -268,8 +265,8 @@
// The packages defined in this class loader. Each package name is mapped
// to its corresponding Package object.
- // @GuardedBy("itself")
- private final HashMap<String, Package> packages = new HashMap<>();
+ private final ConcurrentHashMap<String, Package> packages
+ = new ConcurrentHashMap<>();
private static Void checkCreateClassLoader() {
SecurityManager security = System.getSecurityManager();
@@ -1575,17 +1572,17 @@
String implVendor, URL sealBase)
throws IllegalArgumentException
{
- synchronized (packages) {
- Package pkg = getPackage(name);
- if (pkg != null) {
- throw new IllegalArgumentException(name);
- }
- pkg = new Package(name, specTitle, specVersion, specVendor,
- implTitle, implVersion, implVendor,
- sealBase, this);
- packages.put(name, pkg);
- return pkg;
+ Package pkg = getPackage(name);
+ if (pkg != null) {
+ throw new IllegalArgumentException(name);
}
+ pkg = new Package(name, specTitle, specVersion, specVendor,
+ implTitle, implVersion, implVendor,
+ sealBase, this);
+ if (packages.putIfAbsent(name, pkg) != null) {
+ throw new IllegalArgumentException(name);
+ }
+ return pkg;
}
/**
@@ -1601,26 +1598,13 @@
* @since 1.2
*/
protected Package getPackage(String name) {
- Package pkg;
- synchronized (packages) {
- pkg = packages.get(name);
- }
+ Package pkg = packages.get(name);
if (pkg == null) {
if (parent != null) {
pkg = parent.getPackage(name);
} else {
pkg = Package.getSystemPackage(name);
}
- if (pkg != null) {
- synchronized (packages) {
- Package pkg2 = packages.get(name);
- if (pkg2 == null) {
- packages.put(name, pkg);
- } else {
- pkg = pkg2;
- }
- }
- }
}
return pkg;
}
@@ -1635,22 +1619,18 @@
* @since 1.2
*/
protected Package[] getPackages() {
- Map<String, Package> map;
- synchronized (packages) {
- map = new HashMap<>(packages);
- }
Package[] pkgs;
if (parent != null) {
pkgs = parent.getPackages();
} else {
pkgs = Package.getSystemPackages();
}
+
+ Map<String, Package> map = packages;
if (pkgs != null) {
+ map = new HashMap<>(packages);
for (Package pkg : pkgs) {
- String pkgName = pkg.getName();
- if (map.get(pkgName) == null) {
- map.put(pkgName, pkg);
- }
+ map.putIfAbsent(pkg.getName(), pkg);
}
}
return map.values().toArray(new Package[map.size()]);
--- a/jdk/src/java.base/share/classes/java/lang/Package.java Thu Nov 06 10:11:35 2014 -0800
+++ b/jdk/src/java.base/share/classes/java/lang/Package.java Wed Jul 05 20:06:31 2017 +0200
@@ -26,27 +26,21 @@
package java.lang;
import java.lang.reflect.AnnotatedElement;
-import java.io.InputStream;
-import java.util.Enumeration;
-import java.util.StringTokenizer;
import java.io.File;
import java.io.FileInputStream;
-import java.io.FileNotFoundException;
import java.io.IOException;
import java.net.URL;
import java.net.MalformedURLException;
import java.security.AccessController;
import java.security.PrivilegedAction;
+import java.util.concurrent.ConcurrentHashMap;
import java.util.jar.JarInputStream;
import java.util.jar.Manifest;
import java.util.jar.Attributes;
import java.util.jar.Attributes.Name;
-import java.util.jar.JarException;
import java.util.Map;
-import java.util.HashMap;
-import java.util.Iterator;
import sun.net.www.ParseUtil;
import sun.reflect.CallerSensitive;
@@ -538,17 +532,15 @@
* Returns the loaded system package for the specified name.
*/
static Package getSystemPackage(String name) {
- synchronized (pkgs) {
- Package pkg = pkgs.get(name);
- if (pkg == null) {
- name = name.replace('.', '/').concat("/");
- String fn = getSystemPackage0(name);
- if (fn != null) {
- pkg = defineSystemPackage(name, fn);
- }
+ Package pkg = pkgs.get(name);
+ if (pkg == null) {
+ name = name.replace('.', '/').concat("/");
+ String fn = getSystemPackage0(name);
+ if (fn != null) {
+ pkg = defineSystemPackage(name, fn);
}
- return pkg;
}
+ return pkg;
}
/*
@@ -557,74 +549,98 @@
static Package[] getSystemPackages() {
// First, update the system package map with new package names
String[] names = getSystemPackages0();
- synchronized (pkgs) {
- for (String name : names) {
+ for (String name : names) {
+ if (!pkgs.containsKey(name)) {
defineSystemPackage(name, getSystemPackage0(name));
}
- return pkgs.values().toArray(new Package[pkgs.size()]);
}
+ return pkgs.values().toArray(new Package[pkgs.size()]);
}
private static Package defineSystemPackage(final String iname,
final String fn)
{
- return AccessController.doPrivileged(new PrivilegedAction<Package>() {
- public Package run() {
- String name = iname;
- // Get the cached code source url for the file name
- URL url = urls.get(fn);
- if (url == null) {
- // URL not found, so create one
- File file = new File(fn);
- try {
- url = ParseUtil.fileToEncodedURL(file);
- } catch (MalformedURLException e) {
- }
- if (url != null) {
- urls.put(fn, url);
- // If loading a JAR file, then also cache the manifest
- if (file.isFile()) {
- mans.put(fn, loadManifest(fn));
- }
- }
- }
- // Convert to "."-separated package name
- name = name.substring(0, name.length() - 1).replace('/', '.');
- Package pkg;
- Manifest man = mans.get(fn);
- if (man != null) {
- pkg = new Package(name, man, url, null);
- } else {
- pkg = new Package(name, null, null, null,
- null, null, null, null, null);
- }
- pkgs.put(name, pkg);
- return pkg;
- }
- });
+ // Convert to "."-separated package name
+ String name = iname.substring(0, iname.length() - 1).replace('/', '.');
+ // Creates a cached manifest for the file name, allowing
+ // only-once, lazy reads of manifest from jar files
+ CachedManifest cachedManifest = createCachedManifest(fn);
+ pkgs.putIfAbsent(name, new Package(name, cachedManifest.getManifest(),
+ cachedManifest.getURL(), null));
+ // Ensure we only expose one Package object
+ return pkgs.get(name);
}
- /*
- * Returns the Manifest for the specified JAR file name.
- */
- private static Manifest loadManifest(String fn) {
- try (FileInputStream fis = new FileInputStream(fn);
- JarInputStream jis = new JarInputStream(fis, false))
- {
- return jis.getManifest();
- } catch (IOException e) {
- return null;
+ private static CachedManifest createCachedManifest(String fn) {
+ if (!manifests.containsKey(fn)) {
+ manifests.putIfAbsent(fn, new CachedManifest(fn));
}
+ return manifests.get(fn);
}
// The map of loaded system packages
- private static Map<String, Package> pkgs = new HashMap<>(31);
+ private static final ConcurrentHashMap<String, Package> pkgs
+ = new ConcurrentHashMap<>();
+
+ // Maps each directory or zip file name to its corresponding manifest, if
+ // it exists
+ private static final ConcurrentHashMap<String, CachedManifest> manifests
+ = new ConcurrentHashMap<>();
+
+ private static class CachedManifest {
+ private static final Manifest EMPTY_MANIFEST = new Manifest();
+ private final String fileName;
+ private final URL url;
+ private volatile Manifest manifest;
+
+ CachedManifest(final String fileName) {
+ this.fileName = fileName;
+ this.url = AccessController.doPrivileged(new PrivilegedAction<URL>() {
+ public URL run() {
+ final File file = new File(fileName);
+ if (file.isFile()) {
+ try {
+ return ParseUtil.fileToEncodedURL(file);
+ } catch (MalformedURLException e) {
+ }
+ }
+ return null;
+ }
+ });
+ }
- // Maps each directory or zip file name to its corresponding url
- private static Map<String, URL> urls = new HashMap<>(10);
+ public URL getURL() {
+ return url;
+ }
- // Maps each code source url for a jar file to its manifest
- private static Map<String, Manifest> mans = new HashMap<>(10);
+ public Manifest getManifest() {
+ if (url == null) {
+ return EMPTY_MANIFEST;
+ }
+ Manifest m = manifest;
+ if (m != null) {
+ return m;
+ }
+ synchronized (this) {
+ m = manifest;
+ if (m != null) {
+ return m;
+ }
+ m = AccessController.doPrivileged(new PrivilegedAction<Manifest>() {
+ public Manifest run() {
+ try (FileInputStream fis = new FileInputStream(fileName);
+ JarInputStream jis = new JarInputStream(fis, false)) {
+ return jis.getManifest();
+ } catch (IOException e) {
+ return null;
+ }
+ }
+ });
+ manifest = m = (m == null ? EMPTY_MANIFEST : m);
+ }
+ return m;
+ }
+ }
private static native String getSystemPackage0(String name);
private static native String[] getSystemPackages0();
--- a/jdk/src/java.base/share/classes/java/lang/invoke/MethodHandleImpl.java Thu Nov 06 10:11:35 2014 -0800
+++ b/jdk/src/java.base/share/classes/java/lang/invoke/MethodHandleImpl.java Wed Jul 05 20:06:31 2017 +0200
@@ -1388,16 +1388,26 @@
Object a4, Object a5, Object a6, Object a7,
Object a8, Object a9)
{ return makeArray(a0, a1, a2, a3, a4, a5, a6, a7, a8, a9); }
+
+ private static final int ARRAYS_COUNT = 11;
+
private static MethodHandle[] makeArrays() {
- ArrayList<MethodHandle> mhs = new ArrayList<>();
- for (;;) {
- MethodHandle mh = findCollector("array", mhs.size(), Object[].class);
- if (mh == null) break;
+ MethodHandle[] mhs = new MethodHandle[MAX_ARITY + 1];
+ for (int i = 0; i < ARRAYS_COUNT; i++) {
+ MethodHandle mh = findCollector("array", i, Object[].class);
mh = makeIntrinsic(mh, Intrinsic.NEW_ARRAY);
- mhs.add(mh);
+ mhs[i] = mh;
}
- assert(mhs.size() == 11); // current number of methods
- return mhs.toArray(new MethodHandle[MAX_ARITY+1]);
+ assert(assertArrayMethodCount(mhs));
+ return mhs;
+ }
+
+ private static boolean assertArrayMethodCount(MethodHandle[] mhs) {
+ assert(findCollector("array", ARRAYS_COUNT, Object[].class) == null);
+ for (int i = 0; i < ARRAYS_COUNT; i++) {
+ assert(mhs[i] != null);
+ }
+ return true;
}
// filling versions of the above:
@@ -1449,15 +1459,22 @@
private static final int FILL_ARRAYS_COUNT = 11; // current number of fillArray methods
private static MethodHandle[] makeFillArrays() {
- ArrayList<MethodHandle> mhs = new ArrayList<>();
- mhs.add(null); // there is no empty fill; at least a0 is required
- for (;;) {
- MethodHandle mh = findCollector("fillArray", mhs.size(), Object[].class, Integer.class, Object[].class);
- if (mh == null) break;
- mhs.add(mh);
+ MethodHandle[] mhs = new MethodHandle[FILL_ARRAYS_COUNT];
+ mhs[0] = null; // there is no empty fill; at least a0 is required
+ for (int i = 1; i < FILL_ARRAYS_COUNT; i++) {
+ MethodHandle mh = findCollector("fillArray", i, Object[].class, Integer.class, Object[].class);
+ mhs[i] = mh;
}
- assert(mhs.size() == FILL_ARRAYS_COUNT);
- return mhs.toArray(new MethodHandle[0]);
+ assert(assertFillArrayMethodCount(mhs));
+ return mhs;
+ }
+
+ private static boolean assertFillArrayMethodCount(MethodHandle[] mhs) {
+ assert(findCollector("fillArray", FILL_ARRAYS_COUNT, Object[].class, Integer.class, Object[].class) == null);
+ for (int i = 1; i < FILL_ARRAYS_COUNT; i++) {
+ assert(mhs[i] != null);
+ }
+ return true;
}
private static Object copyAsPrimitiveArray(Wrapper w, Object... boxes) {
@@ -1472,9 +1489,6 @@
static MethodHandle varargsArray(int nargs) {
MethodHandle mh = Lazy.ARRAYS[nargs];
if (mh != null) return mh;
- mh = findCollector("array", nargs, Object[].class);
- if (mh != null) mh = makeIntrinsic(mh, Intrinsic.NEW_ARRAY);
- if (mh != null) return Lazy.ARRAYS[nargs] = mh;
mh = buildVarargsArray(Lazy.MH_fillNewArray, Lazy.MH_arrayIdentity, nargs);
assert(assertCorrectArity(mh, nargs));
mh = makeIntrinsic(mh, Intrinsic.NEW_ARRAY);
--- a/jdk/src/java.base/share/classes/java/lang/ref/Finalizer.java Thu Nov 06 10:11:35 2014 -0800
+++ b/jdk/src/java.base/share/classes/java/lang/ref/Finalizer.java Wed Jul 05 20:06:31 2017 +0200
@@ -122,18 +122,18 @@
AccessController.doPrivileged(
new PrivilegedAction<Void>() {
public Void run() {
- ThreadGroup tg = Thread.currentThread().getThreadGroup();
- for (ThreadGroup tgn = tg;
- tgn != null;
- tg = tgn, tgn = tg.getParent());
- Thread sft = new Thread(tg, proc, "Secondary finalizer");
- sft.start();
- try {
- sft.join();
- } catch (InterruptedException x) {
- /* Ignore */
- }
- return null;
+ ThreadGroup tg = Thread.currentThread().getThreadGroup();
+ for (ThreadGroup tgn = tg;
+ tgn != null;
+ tg = tgn, tgn = tg.getParent());
+ Thread sft = new Thread(tg, proc, "Secondary finalizer");
+ sft.start();
+ try {
+ sft.join();
+ } catch (InterruptedException x) {
+ Thread.currentThread().interrupt();
+ }
+ return null;
}});
}
@@ -146,6 +146,7 @@
forkSecondaryFinalizer(new Runnable() {
private volatile boolean running;
public void run() {
+ // in case of recursive call to run()
if (running)
return;
final JavaLangAccess jla = SharedSecrets.getJavaLangAccess();
@@ -168,6 +169,7 @@
forkSecondaryFinalizer(new Runnable() {
private volatile boolean running;
public void run() {
+ // in case of recursive call to run()
if (running)
return;
final JavaLangAccess jla = SharedSecrets.getJavaLangAccess();
@@ -189,6 +191,7 @@
super(g, "Finalizer");
}
public void run() {
+ // in case of recursive call to run()
if (running)
return;
--- a/jdk/src/java.base/share/classes/java/net/SocketImpl.java Thu Nov 06 10:11:35 2014 -0800
+++ b/jdk/src/java.base/share/classes/java/net/SocketImpl.java Wed Jul 05 20:06:31 2017 +0200
@@ -446,6 +446,7 @@
serverSocketOptions.add(StandardSocketOptions.SO_RCVBUF);
serverSocketOptions.add(StandardSocketOptions.SO_REUSEADDR);
+ serverSocketOptions.add(StandardSocketOptions.IP_TOS);
};
/**
--- a/jdk/src/java.base/share/classes/java/nio/file/Files.java Thu Nov 06 10:11:35 2014 -0800
+++ b/jdk/src/java.base/share/classes/java/nio/file/Files.java Wed Jul 05 20:06:31 2017 +0200
@@ -303,7 +303,7 @@
* is a {@link java.nio.channels.FileChannel}.
*
* <p> <b>Usage Examples:</b>
- * <pre>
+ * <pre>{@code
* Path path = ...
*
* // open file for reading
@@ -314,9 +314,10 @@
* WritableByteChannel wbc = Files.newByteChannel(path, EnumSet.of(CREATE,APPEND));
*
* // create file with initial permissions, opening it for both reading and writing
- * {@code FileAttribute<Set<PosixFilePermission>> perms = ...}
- * SeekableByteChannel sbc = Files.newByteChannel(path, EnumSet.of(CREATE_NEW,READ,WRITE), perms);
- * </pre>
+ * FileAttribute<Set<PosixFilePermission>> perms = ...
+ * SeekableByteChannel sbc =
+ * Files.newByteChannel(path, EnumSet.of(CREATE_NEW,READ,WRITE), perms);
+ * }</pre>
*
* @param path
* the path to the file to open or create
@@ -1702,7 +1703,8 @@
* Alternatively, suppose we want to read file's POSIX attributes without
* following symbolic links:
* <pre>
- * PosixFileAttributes attrs = Files.readAttributes(path, PosixFileAttributes.class, NOFOLLOW_LINKS);
+ * PosixFileAttributes attrs =
+ * Files.readAttributes(path, PosixFileAttributes.class, NOFOLLOW_LINKS);
* </pre>
*
* @param <A>
@@ -2840,6 +2842,8 @@
* @return a new buffered writer, with default buffer size, to write text
* to the file
*
+ * @throws IllegalArgumentException
+ * if {@code options} contains an invalid combination of options
* @throws IOException
* if an I/O error occurs opening or creating the file
* @throws UnsupportedOperationException
@@ -2880,6 +2884,8 @@
* @return a new buffered writer, with default buffer size, to write text
* to the file
*
+ * @throws IllegalArgumentException
+ * if {@code options} contains an invalid combination of options
* @throws IOException
* if an I/O error occurs opening or creating the file
* @throws UnsupportedOperationException
@@ -2891,7 +2897,9 @@
*
* @since 1.8
*/
- public static BufferedWriter newBufferedWriter(Path path, OpenOption... options) throws IOException {
+ public static BufferedWriter newBufferedWriter(Path path, OpenOption... options)
+ throws IOException
+ {
return newBufferedWriter(path, StandardCharsets.UTF_8, options);
}
@@ -3273,6 +3281,8 @@
*
* @return the path
*
+ * @throws IllegalArgumentException
+ * if {@code options} contains an invalid combination of options
* @throws IOException
* if an I/O error occurs writing to or creating the file
* @throws UnsupportedOperationException
@@ -3330,6 +3340,8 @@
*
* @return the path
*
+ * @throws IllegalArgumentException
+ * if {@code options} contains an invalid combination of options
* @throws IOException
* if an I/O error occurs writing to or creating the file, or the
* text cannot be encoded using the specified charset
@@ -3376,6 +3388,8 @@
*
* @return the path
*
+ * @throws IllegalArgumentException
+ * if {@code options} contains an invalid combination of options
* @throws IOException
* if an I/O error occurs writing to or creating the file, or the
* text cannot be encoded as {@code UTF-8}
@@ -3452,7 +3466,7 @@
final Iterator<Path> delegate = ds.iterator();
// Re-wrap DirectoryIteratorException to UncheckedIOException
- Iterator<Path> it = new Iterator<Path>() {
+ Iterator<Path> iterator = new Iterator<Path>() {
@Override
public boolean hasNext() {
try {
@@ -3471,7 +3485,9 @@
}
};
- return StreamSupport.stream(Spliterators.spliteratorUnknownSize(it, Spliterator.DISTINCT), false)
+ Spliterator<Path> spliterator =
+ Spliterators.spliteratorUnknownSize(iterator, Spliterator.DISTINCT);
+ return StreamSupport.stream(spliterator, false)
.onClose(asUncheckedRunnable(ds));
} catch (Error|RuntimeException e) {
try {
@@ -3572,7 +3588,9 @@
{
FileTreeIterator iterator = new FileTreeIterator(start, maxDepth, options);
try {
- return StreamSupport.stream(Spliterators.spliteratorUnknownSize(iterator, Spliterator.DISTINCT), false)
+ Spliterator<FileTreeWalker.Event> spliterator =
+ Spliterators.spliteratorUnknownSize(iterator, Spliterator.DISTINCT);
+ return StreamSupport.stream(spliterator, false)
.onClose(iterator::close)
.map(entry -> entry.file());
} catch (Error|RuntimeException e) {
@@ -3685,7 +3703,9 @@
{
FileTreeIterator iterator = new FileTreeIterator(start, maxDepth, options);
try {
- return StreamSupport.stream(Spliterators.spliteratorUnknownSize(iterator, Spliterator.DISTINCT), false)
+ Spliterator<FileTreeWalker.Event> spliterator =
+ Spliterators.spliteratorUnknownSize(iterator, Spliterator.DISTINCT);
+ return StreamSupport.stream(spliterator, false)
.onClose(iterator::close)
.filter(entry -> matcher.test(entry.file(), entry.attributes()))
.map(entry -> entry.file());
--- a/jdk/src/java.base/share/classes/java/nio/file/package-info.java Thu Nov 06 10:11:35 2014 -0800
+++ b/jdk/src/java.base/share/classes/java/nio/file/package-info.java Wed Jul 05 20:06:31 2017 +0200
@@ -86,8 +86,8 @@
* <p> Unless otherwise noted, passing a {@code null} argument to a constructor
* or method of any class or interface in this package will cause a {@link
* java.lang.NullPointerException NullPointerException} to be thrown. Additionally,
- * invoking a method with a collection containing a {@code null} element will
- * cause a {@code NullPointerException}, unless otherwise specified. </p>
+ * invoking a method with an array or collection containing a {@code null} element
+ * will cause a {@code NullPointerException}, unless otherwise specified. </p>
*
* <p> Unless otherwise noted, methods that attempt to access the file system
* will throw {@link java.nio.file.ClosedFileSystemException} when invoked on
--- a/jdk/src/java.base/share/classes/jdk/net/Sockets.java Thu Nov 06 10:11:35 2014 -0800
+++ b/jdk/src/java.base/share/classes/jdk/net/Sockets.java Wed Jul 05 20:06:31 2017 +0200
@@ -276,6 +276,7 @@
set = new HashSet<>();
set.add(StandardSocketOptions.SO_RCVBUF);
set.add(StandardSocketOptions.SO_REUSEADDR);
+ set.add(StandardSocketOptions.IP_TOS);
set = Collections.unmodifiableSet(set);
options.put(ServerSocket.class, set);
--- a/jdk/src/java.base/share/classes/sun/security/tools/keytool/Main.java Thu Nov 06 10:11:35 2014 -0800
+++ b/jdk/src/java.base/share/classes/sun/security/tools/keytool/Main.java Wed Jul 05 20:06:31 2017 +0200
@@ -1608,7 +1608,7 @@
private static String getCompatibleSigAlgName(String keyAlgName)
throws Exception {
if ("DSA".equalsIgnoreCase(keyAlgName)) {
- return "SHA1WithDSA";
+ return "SHA256WithDSA";
} else if ("RSA".equalsIgnoreCase(keyAlgName)) {
return "SHA256WithRSA";
} else if ("EC".equalsIgnoreCase(keyAlgName)) {
@@ -1628,10 +1628,8 @@
if (keysize == -1) {
if ("EC".equalsIgnoreCase(keyAlgName)) {
keysize = 256;
- } else if ("RSA".equalsIgnoreCase(keyAlgName)) {
- keysize = 2048;
} else {
- keysize = 1024;
+ keysize = 2048; // RSA and DSA
}
}
--- a/jdk/src/java.management/share/classes/com/sun/jmx/defaults/JmxProperties.java Thu Nov 06 10:11:35 2014 -0800
+++ b/jdk/src/java.management/share/classes/com/sun/jmx/defaults/JmxProperties.java Wed Jul 05 20:06:31 2017 +0200
@@ -205,28 +205,4 @@
*/
public static final Logger MISC_LOGGER =
Logger.getLogger(MISC_LOGGER_NAME);
-
- /**
- * Logger name for SNMP.
- */
- public static final String SNMP_LOGGER_NAME =
- "javax.management.snmp";
-
- /**
- * Logger for SNMP.
- */
- public static final Logger SNMP_LOGGER =
- Logger.getLogger(SNMP_LOGGER_NAME);
-
- /**
- * Logger name for SNMP Adaptor.
- */
- public static final String SNMP_ADAPTOR_LOGGER_NAME =
- "javax.management.snmp.daemon";
-
- /**
- * Logger for SNMP Adaptor.
- */
- public static final Logger SNMP_ADAPTOR_LOGGER =
- Logger.getLogger(SNMP_ADAPTOR_LOGGER_NAME);
}
--- a/jdk/src/jdk.dev/share/classes/sun/security/tools/jarsigner/Main.java Thu Nov 06 10:11:35 2014 -0800
+++ b/jdk/src/jdk.dev/share/classes/sun/security/tools/jarsigner/Main.java Wed Jul 05 20:06:31 2017 +0200
@@ -2358,7 +2358,7 @@
if (sigalg == null) {
if (keyAlgorithm.equalsIgnoreCase("DSA"))
- signatureAlgorithm = "SHA1withDSA";
+ signatureAlgorithm = "SHA256withDSA";
else if (keyAlgorithm.equalsIgnoreCase("RSA"))
signatureAlgorithm = "SHA256withRSA";
else if (keyAlgorithm.equalsIgnoreCase("EC"))
--- a/jdk/test/ProblemList.txt Thu Nov 06 10:11:35 2014 -0800
+++ b/jdk/test/ProblemList.txt Wed Jul 05 20:06:31 2017 +0200
@@ -138,9 +138,6 @@
# 8058492
java/lang/management/ThreadMXBean/FindDeadlocks.java generic-all
-# 8058506
-java/lang/management/ThreadMXBean/ThreadMXBeanStateTest.java generic-all
-
############################################################################
# jdk_jmx
@@ -285,6 +282,9 @@
# 8058616
com/sun/jdi/RedefinePop.sh generic-all
+# 8061114
+com/sun/jdi/Redefine-g.sh generic-all
+
############################################################################
# jdk_util
@@ -318,4 +318,7 @@
# 8057732
sun/jvmstat/monitor/MonitoredVm/MonitorVmStartTerminate.java generic-all
+# 8060736
+sun/jvmstat/monitor/MonitoredVm/CR6672135.java generic-all
+
############################################################################
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/jdk/test/java/lang/ClassLoader/GetSystemPackage.java Wed Jul 05 20:06:31 2017 +0200
@@ -0,0 +1,249 @@
+/*
+ * Copyright (c) 2014 Oracle and/or its affiliates. All rights reserved.
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * This code is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU General Public License version 2 only, as
+ * published by the Free Software Foundation.
+ *
+ * This code is distributed in the hope that it will be useful, but WITHOUT
+ * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
+ * version 2 for more details (a copy is included in the LICENSE file that
+ * accompanied this code).
+ *
+ * You should have received a copy of the GNU General Public License version
+ * 2 along with this work; if not, write to the Free Software Foundation,
+ * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
+ *
+ * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
+ * or visit www.oracle.com if you need additional information or have any
+ * questions.
+ */
+
+/*
+ * @test
+ * @bug 8060130
+ * @library /lib/testlibrary
+ * @build package2.Class2 GetSystemPackage jdk.testlibrary.*
+ * @summary Test if getSystemPackage() return consistent values for cases
+ * where a manifest is provided or not and ensure only jars on
+ * bootclasspath gets resolved via Package.getSystemPackage
+ * @run main GetSystemPackage
+ */
+
+import java.io.File;
+import java.io.FileInputStream;
+import java.io.FileNotFoundException;
+import java.io.FileOutputStream;
+import java.io.IOException;
+import java.util.jar.Attributes;
+import java.util.jar.JarEntry;
+import java.util.jar.JarOutputStream;
+import java.util.jar.Manifest;
+import jdk.testlibrary.ProcessTools;
+
+public class GetSystemPackage {
+
+ static final String testClassesDir = System.getProperty("test.classes", ".");
+ static final File tmpFolder = new File(testClassesDir);
+ static final String manifestTitle = "Special JAR";
+
+ public static void main(String ... args) throws Exception {
+ if (args.length == 0) {
+ buildJarsAndInitiateSystemPackageTest();
+ return;
+ }
+ switch (args[0]) {
+ case "system-manifest":
+ verifyPackage(true, true);
+ break;
+ case "system-no-manifest":
+ verifyPackage(false, true);
+ break;
+ case "non-system-manifest":
+ verifyPackage(true, false);
+ break;
+ case "non-system-no-manifest":
+ default:
+ verifyPackage(false, false);
+ break;
+ }
+ }
+
+ private static void buildJarsAndInitiateSystemPackageTest()
+ throws Exception
+ {
+ Manifest m = new Manifest();
+ // not setting MANIFEST_VERSION prevents META-INF/MANIFEST.MF from
+ // getting written
+ m.getMainAttributes().put(Attributes.Name.MANIFEST_VERSION, "1.0");
+ m.getMainAttributes().put(Attributes.Name.SPECIFICATION_TITLE,
+ manifestTitle);
+
+ buildJar("manifest.jar", m);
+ buildJar("no-manifest.jar", null);
+
+ runSubProcess("System package with manifest improperly resolved.",
+ "-Xbootclasspath/p:" + testClassesDir + "/manifest.jar",
+ "GetSystemPackage", "system-manifest");
+
+ runSubProcess("System package from directory improperly resolved.",
+ "-Xbootclasspath/p:" + testClassesDir, "GetSystemPackage",
+ "system-no-manifest");
+
+ runSubProcess("System package with no manifest improperly resolved",
+ "-Xbootclasspath/p:" + testClassesDir + "/no-manifest.jar",
+ "GetSystemPackage", "system-no-manifest");
+
+ runSubProcess("Classpath package with manifest improperly resolved",
+ "-cp", testClassesDir + "/manifest.jar", "GetSystemPackage",
+ "non-system-manifest");
+
+ runSubProcess("Classpath package with no manifest improperly resolved",
+ "-cp", testClassesDir + "/no-manifest.jar", "GetSystemPackage",
+ "non-system-no-manifest");
+
+ }
+
+ private static void buildJar(String name, Manifest man) throws Exception {
+ JarBuilder jar = new JarBuilder(tmpFolder, name, man);
+ jar.addClassFile("package2/Class2.class",
+ testClassesDir + "/package2/Class2.class");
+ jar.addClassFile("GetSystemPackage.class",
+ testClassesDir + "/GetSystemPackage.class");
+ jar.addClassFile("GetSystemPackageClassLoader.class",
+ testClassesDir + "/GetSystemPackageClassLoader.class");
+ jar.build();
+ }
+
+ private static void runSubProcess(String messageOnError, String ... args)
+ throws Exception
+ {
+ ProcessBuilder pb = ProcessTools.createJavaProcessBuilder(args);
+ int res = pb.directory(tmpFolder).inheritIO().start().waitFor();
+ if (res != 0) {
+ throw new RuntimeException(messageOnError);
+ }
+ }
+
+ private static void verifyPackage(boolean hasManifest,
+ boolean isSystemPackage) throws Exception
+ {
+ Class c = Class.forName("package2.Class2");
+ Package pkg = c.getPackage();
+ if (pkg == null || pkg != Package.getPackage("package2") ||
+ !"package2".equals(pkg.getName())) {
+ fail("package2 not found via Package.getPackage()");
+ }
+
+ String specificationTitle = pkg.getSpecificationTitle();
+ if (!"package2".equals(pkg.getName())) {
+ fail("Invalid package for Class2");
+ }
+
+ if (hasManifest && (specificationTitle == null
+ || !manifestTitle.equals(specificationTitle))) {
+ fail("Invalid manifest for package " + pkg.getName());
+ }
+ if (!hasManifest && specificationTitle != null) {
+ fail("Invalid manifest for package " + pkg.getName() + ": was " +
+ specificationTitle + " expected: null");
+ }
+
+ // force the use of a classloader with no parent, then retrieve the
+ // package in a way that bypasses the classloader pkg maps
+ GetSystemPackageClassLoader classLoader =
+ new GetSystemPackageClassLoader();
+ Package systemPkg = classLoader.getSystemPackage("package2");
+
+ if (findPackage("java.lang") == null) {
+ fail("java.lang not found via Package.getPackages()");
+ }
+ Package foundPackage = findPackage("package2");
+ if (isSystemPackage) {
+ if (systemPkg == null) {
+ fail("System package could not be found via getSystemPackage");
+ }
+ if (foundPackage != systemPkg || systemPkg != pkg) {
+ fail("Inconsistent package found via Package.getPackages()");
+ }
+ } else {
+ if (systemPkg != null) {
+ fail("Non-system package could be found via getSystemPackage");
+ }
+ if (foundPackage == null) {
+ fail("Non-system package not found via Package.getPackages()");
+ }
+ }
+ }
+
+ private static Package findPackage(String name) {
+ Package[] packages = Package.getPackages();
+ for (Package p : packages) {
+ System.out.println(p);
+ if (p.getName().equals(name)) {
+ return p;
+ }
+ }
+ return null;
+ }
+
+ private static void fail(String message) {
+ throw new RuntimeException(message);
+ }
+}
+
+/*
+ * This classloader bypasses the system classloader to give as direct access
+ * to Package.getSystemPackage() as possible
+ */
+class GetSystemPackageClassLoader extends ClassLoader {
+
+ public GetSystemPackageClassLoader() {
+ super(null);
+ }
+
+ public Package getSystemPackage(String name) {
+ return super.getPackage(name);
+ }
+}
+
+/*
+ * Helper class for building jar files
+ */
+class JarBuilder {
+
+ private JarOutputStream os;
+
+ public JarBuilder(File tmpFolder, String jarName, Manifest manifest)
+ throws FileNotFoundException, IOException
+ {
+ File jarFile = new File(tmpFolder, jarName);
+ if (manifest != null) {
+ this.os = new JarOutputStream(new FileOutputStream(jarFile),
+ manifest);
+ } else {
+ this.os = new JarOutputStream(new FileOutputStream(jarFile));
+ }
+ }
+
+ public void addClassFile(String pathFromRoot, String file)
+ throws IOException
+ {
+ byte[] buf = new byte[1024];
+ try (FileInputStream in = new FileInputStream(file)) {
+ JarEntry entry = new JarEntry(pathFromRoot);
+ os.putNextEntry(entry);
+ int len;
+ while ((len = in.read(buf)) > 0) {
+ os.write(buf, 0, len);
+ }
+ os.closeEntry();
+ }
+ }
+
+ public void build() throws IOException {
+ os.close();
+ }
+}
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/jdk/test/java/lang/System/finalization/FinInterrupt.java Wed Jul 05 20:06:31 2017 +0200
@@ -0,0 +1,41 @@
+/*
+ * Copyright (c) 2014, Oracle and/or its affiliates. All rights reserved.
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * This code is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU General Public License version 2 only, as
+ * published by the Free Software Foundation.
+ *
+ * This code is distributed in the hope that it will be useful, but WITHOUT
+ * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
+ * version 2 for more details (a copy is included in the LICENSE file that
+ * accompanied this code).
+ *
+ * You should have received a copy of the GNU General Public License version
+ * 2 along with this work; if not, write to the Free Software Foundation,
+ * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
+ *
+ * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
+ * or visit www.oracle.com if you need additional information or have any
+ * questions.
+ */
+
+/*
+ * @test
+ * @bug 4354680
+ * @summary runFinalization() should not clear or ignore interrupt bit
+ * @run main FinInterrupt
+ */
+
+public class FinInterrupt {
+ public static void main(String[] args) throws Exception {
+ Thread.currentThread().interrupt();
+ System.runFinalization();
+ if (Thread.interrupted()) {
+ System.out.println("Passed: interrupt bit was still set.");
+ } else {
+ throw new AssertionError("interrupt bit was cleared");
+ }
+ }
+}
--- a/jdk/test/java/lang/Thread/ThreadStateController.java Thu Nov 06 10:11:35 2014 -0800
+++ b/jdk/test/java/lang/Thread/ThreadStateController.java Wed Jul 05 20:06:31 2017 +0200
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2013, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2013, 2014 Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
@@ -27,6 +27,8 @@
import java.util.concurrent.atomic.AtomicInteger;
import java.util.concurrent.locks.LockSupport;
+import jdk.testlibrary.LockFreeLogManager;
+
/**
* ThreadStateController allows a thread to request this thread to transition
* to a specific thread state. The {@linkplain #transitionTo request} is
@@ -94,8 +96,12 @@
private static final int S_TERMINATE = 8;
// for debugging
- private AtomicInteger iterations = new AtomicInteger();
- private AtomicInteger interrupted = new AtomicInteger();
+ private final AtomicInteger iterations = new AtomicInteger();
+ private final AtomicInteger interrupted = new AtomicInteger();
+
+ private final LockFreeLogManager logManager = new LockFreeLogManager();
+
+ @Override
public void run() {
// this thread has started
while (!done) {
@@ -119,13 +125,13 @@
break;
}
case S_BLOCKED: {
- System.out.format("%d: %s is going to block (interations %d)%n",
- getId(), getName(), iterations.get());
+ log("%d: %s is going to block (iterations %d)%n",
+ getId(), getName(), iterations.get());
stateChange(nextState);
// going to block on lock
synchronized (lock) {
- System.out.format("%d: %s acquired the lock (interations %d)%n",
- getId(), getName(), iterations.get());
+ log("%d: %s acquired the lock (iterations %d)%n",
+ getId(), getName(), iterations.get());
try {
// this thread has escaped the BLOCKED state
// release the lock and a short wait before continue
@@ -139,13 +145,13 @@
}
case S_WAITING: {
synchronized (lock) {
- System.out.format("%d: %s is going to waiting (interations %d interrupted %d)%n",
- getId(), getName(), iterations.get(), interrupted.get());
+ log("%d: %s is going to waiting (iterations %d interrupted %d)%n",
+ getId(), getName(), iterations.get(), interrupted.get());
try {
stateChange(nextState);
lock.wait();
- System.out.format("%d: %s wakes up from waiting (interations %d interrupted %d)%n",
- getId(), getName(), iterations.get(), interrupted.get());
+ log("%d: %s wakes up from waiting (iterations %d interrupted %d)%n",
+ getId(), getName(), iterations.get(), interrupted.get());
} catch (InterruptedException e) {
// ignore
interrupted.incrementAndGet();
@@ -155,13 +161,13 @@
}
case S_TIMED_WAITING: {
synchronized (lock) {
- System.out.format("%d: %s is going to timed waiting (interations %d interrupted %d)%n",
- getId(), getName(), iterations.get(), interrupted.get());
+ log("%d: %s is going to timed waiting (iterations %d interrupted %d)%n",
+ getId(), getName(), iterations.get(), interrupted.get());
try {
stateChange(nextState);
lock.wait(10000);
- System.out.format("%d: %s wakes up from timed waiting (interations %d interrupted %d)%n",
- getId(), getName(), iterations.get(), interrupted.get());
+ log("%d: %s wakes up from timed waiting (iterations %d interrupted %d)%n",
+ getId(), getName(), iterations.get(), interrupted.get());
} catch (InterruptedException e) {
// ignore
interrupted.incrementAndGet();
@@ -170,23 +176,23 @@
break;
}
case S_PARKED: {
- System.out.format("%d: %s is going to park (interations %d)%n",
- getId(), getName(), iterations.get());
+ log("%d: %s is going to park (iterations %d)%n",
+ getId(), getName(), iterations.get());
stateChange(nextState);
LockSupport.park();
break;
}
case S_TIMED_PARKED: {
- System.out.format("%d: %s is going to timed park (interations %d)%n",
- getId(), getName(), iterations.get());
+ log("%d: %s is going to timed park (iterations %d)%n",
+ getId(), getName(), iterations.get());
long deadline = System.currentTimeMillis() + 10000*1000;
stateChange(nextState);
LockSupport.parkUntil(deadline);
break;
}
case S_SLEEPING: {
- System.out.format("%d: %s is going to sleep (interations %d interrupted %d)%n",
- getId(), getName(), iterations.get(), interrupted.get());
+ log("%d: %s is going to sleep (iterations %d interrupted %d)%n",
+ getId(), getName(), iterations.get(), interrupted.get());
try {
stateChange(nextState);
Thread.sleep(1000000);
@@ -219,8 +225,8 @@
if (newState == nextState) {
state = nextState;
phaser.arrive();
- System.out.format("%d: state change: %s %s%n",
- getId(), toStateName(nextState), phaserToString(phaser));
+ log("%d: state change: %s %s%n",
+ getId(), toStateName(nextState), phaserToString(phaser));
return;
}
@@ -270,12 +276,12 @@
private void nextState(int s) throws InterruptedException {
final long id = Thread.currentThread().getId();
- System.out.format("%d: wait until the thread transitions to %s %s%n",
- id, toStateName(s), phaserToString(phaser));
+ log("%d: wait until the thread transitions to %s %s%n",
+ id, toStateName(s), phaserToString(phaser));
this.newState = s;
int phase = phaser.arrive();
- System.out.format("%d: awaiting party arrive %s %s%n",
- id, toStateName(s), phaserToString(phaser));
+ log("%d: awaiting party arrive %s %s%n",
+ id, toStateName(s), phaserToString(phaser));
for (;;) {
// when this thread has changed its state before it waits or parks
// on a lock, a potential race might happen if it misses the notify
@@ -301,20 +307,22 @@
}
try {
phaser.awaitAdvanceInterruptibly(phase, 100, TimeUnit.MILLISECONDS);
- System.out.format("%d: arrived at %s %s%n",
- id, toStateName(s), phaserToString(phaser));
+ log("%d: arrived at %s %s%n",
+ id, toStateName(s), phaserToString(phaser));
return;
} catch (TimeoutException ex) {
// this thread hasn't arrived at this phase
- System.out.format("%d: Timeout: %s%n", id, phaser);
+ log("%d: Timeout: %s%n", id, phaser);
}
}
}
+
private String phaserToString(Phaser p) {
return "[phase = " + p.getPhase() +
" parties = " + p.getRegisteredParties() +
" arrived = " + p.getArrivedParties() + "]";
}
+
private String toStateName(int state) {
switch (state) {
case S_RUNNABLE:
@@ -337,4 +345,20 @@
return "unknown " + state;
}
}
+
+ private void log(String msg, Object ... params) {
+ logManager.log(msg, params);
+ }
+
+ /**
+ * Waits for the controller to complete the test run and returns the
+ * generated log
+ * @return The controller log
+ * @throws InterruptedException
+ */
+ public String getLog() throws InterruptedException {
+ this.join();
+
+ return logManager.toString();
+ }
}
--- a/jdk/test/java/lang/Thread/ThreadStateTest.java Thu Nov 06 10:11:35 2014 -0800
+++ b/jdk/test/java/lang/Thread/ThreadStateTest.java Wed Jul 05 20:06:31 2017 +0200
@@ -30,6 +30,8 @@
* Thread.getState().
*
* @author Mandy Chung
+ * @library /lib/testlibrary
+ * @build jdk.testlibrary.*
* @build ThreadStateTest ThreadStateController
* @run main/othervm -Xmixed ThreadStateTest
*/
--- a/jdk/test/java/lang/management/ThreadMXBean/ThreadMXBeanStateTest.java Thu Nov 06 10:11:35 2014 -0800
+++ b/jdk/test/java/lang/management/ThreadMXBean/ThreadMXBeanStateTest.java Wed Jul 05 20:06:31 2017 +0200
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2003, 2013, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2003, 2014, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
@@ -31,6 +31,8 @@
* @author Mandy Chung
*
* @library ../../Thread
+ * @library /lib/testlibrary
+ * @build jdk.testlibrary.*
* @build ThreadMXBeanStateTest ThreadStateController
* @run main ThreadMXBeanStateTest
*/
@@ -44,15 +46,17 @@
private static final ThreadMXBean tm = ManagementFactory.getThreadMXBean();
static class Lock {
- private String name;
+ private final String name;
Lock(String name) {
this.name = name;
}
+ @Override
public String toString() {
return name;
}
}
- private static Lock globalLock = new Lock("my lock");
+
+ private static final Lock globalLock = new Lock("my lock");
public static void main(String[] argv) throws Exception {
// Force thread state initialization now before the test
@@ -109,7 +113,7 @@
thread.checkThreadState(TERMINATED);
try {
- thread.join();
+ System.out.println(thread.getLog());
} catch (InterruptedException e) {
e.printStackTrace();
System.out.println("TEST FAILED: Unexpected exception.");
--- a/jdk/test/java/sql/testng/util/TestPolicy.java Thu Nov 06 10:11:35 2014 -0800
+++ b/jdk/test/java/sql/testng/util/TestPolicy.java Wed Jul 05 20:06:31 2017 +0200
@@ -35,6 +35,7 @@
import java.util.Enumeration;
import java.util.PropertyPermission;
import java.util.StringJoiner;
+import java.util.logging.LoggingPermission;
/*
* Simple Policy class that supports the required Permissions to validate the
@@ -57,7 +58,8 @@
* Policy used by the JDBC tests Possible values are: all (ALLPermissions),
* setLog (SQLPemission("setLog"), deregisterDriver
* (SQLPermission("deregisterDriver") (SQLPermission("deregisterDriver"),
- * and setSyncFactory(SQLPermission(setSyncFactory),
+ * setSyncFactory(SQLPermission(setSyncFactory), and also
+ * LoggerPermission("control", null) when setting a Level
*
* @param policy Permissions to set
*/
@@ -79,6 +81,11 @@
setMinimalPermissions();
permissions.add(new SQLPermission("setSyncFactory"));
break;
+ case "setSyncFactoryLogger":
+ setMinimalPermissions();
+ permissions.add(new SQLPermission("setSyncFactory"));
+ permissions.add(new LoggingPermission("control", null));
+ break;
default:
setMinimalPermissions();
}
--- a/jdk/test/javax/naming/spi/providers/InitialContextTest.java Thu Nov 06 10:11:35 2014 -0800
+++ b/jdk/test/javax/naming/spi/providers/InitialContextTest.java Wed Jul 05 20:06:31 2017 +0200
@@ -68,10 +68,9 @@
Path dst = tmp.resolve("Test.java");
Files.copy(src, dst);
- javac(tmp, dst);
+ Path build = Files.createDirectory(tmp.resolve("build"));
- Path build = Files.createDirectory(tmp.resolve("build"));
- Files.copy(tmp.resolve("Test.class"), build.resolve("Test.class"));
+ javac(build, dst);
Map<String, String> props
= singletonMap(Context.INITIAL_CONTEXT_FACTORY, factoryClassFqn);
@@ -107,13 +106,13 @@
Path dst1 = createFactoryFrom(templatesHome().resolve("factory.template"),
factoryClassFqn, tmp);
- javac(tmp, dst);
+ Path build = Files.createDirectory(tmp.resolve("build"));
+
+ javac(build, dst);
Path explodedJar = Files.createDirectory(tmp.resolve("exploded-jar"));
javac(explodedJar, dst1);
jar(tmp.resolve("test.jar"), explodedJar);
- Path build = Files.createDirectory(tmp.resolve("build"));
- Files.copy(tmp.resolve("Test.class"), build.resolve("Test.class"));
Files.copy(tmp.resolve("test.jar"), build.resolve("test.jar"));
Map<String, String> props
@@ -191,7 +190,9 @@
Path dst1 = createFactoryFrom(templatesHome().resolve("broken_factory.template"),
factoryClassFqn, tmp);
- javac(tmp, dst);
+ Path build = Files.createDirectory(tmp.resolve("build"));
+
+ javac(build, dst);
Path explodedJar = Files.createDirectory(tmp.resolve("exploded-jar"));
Path services = Files.createDirectories(explodedJar.resolve("META-INF")
@@ -208,15 +209,12 @@
javac(explodedJar, dst1);
jar(tmp.resolve("test.jar"), explodedJar);
- Path build = Files.createDirectory(tmp.resolve("build"));
- Files.copy(tmp.resolve("Test.class"), build.resolve("Test.class"));
Files.copy(tmp.resolve("test.jar"), build.resolve("test.jar"));
- Map<String, String> props = new HashMap<>();
- props.put("java.ext.dirs", build.toString());
- props.put(Context.INITIAL_CONTEXT_FACTORY, factoryClassFqn);
+ Map<String, String> props
+ = singletonMap(Context.INITIAL_CONTEXT_FACTORY, factoryClassFqn);
- Result r = java(props, singleton(build), "Test");
+ Result r = java(props, asList(build.resolve("test.jar"), build), "Test");
if (r.exitValue == 0 || !verifyOutput(r.output, factoryClassFqn))
throw new RuntimeException(r.output);
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/jdk/test/javax/sql/testng/test/rowset/spi/SyncFactoryExceptionTests.java Wed Jul 05 20:06:31 2017 +0200
@@ -0,0 +1,113 @@
+/*
+ * Copyright (c) 2014, Oracle and/or its affiliates. All rights reserved.
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * This code is free software; you can redistribute 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.rowset.spi;
+
+import java.sql.SQLException;
+import javax.sql.rowset.spi.SyncFactoryException;
+import static org.testng.Assert.*;
+import org.testng.annotations.Test;
+import util.BaseTest;
+
+public class SyncFactoryExceptionTests extends BaseTest {
+
+ /*
+ * Create SyncFactoryException with no-arg constructor
+ */
+ @Test
+ public void test01() {
+ SyncFactoryException ex = new SyncFactoryException();
+ assertTrue(ex.getMessage() == null
+ && ex.getSQLState() == null
+ && ex.getCause() == null
+ && ex.getErrorCode() == 0);
+ }
+
+ /*
+ * Create SyncFactoryException with message
+ */
+ @Test
+ public void test02() {
+ SyncFactoryException ex = new SyncFactoryException(reason);
+ assertTrue(ex.getMessage().equals(reason)
+ && ex.getSQLState() == null
+ && ex.getCause() == null
+ && ex.getErrorCode() == 0);
+ }
+
+ /*
+ * Validate that the ordering of the returned Exceptions is correct using
+ * for-each loop
+ */
+ @Test
+ public void test03() {
+ SyncFactoryException ex = new SyncFactoryException("Exception 1");
+ ex.initCause(t1);
+ SyncFactoryException ex1 = new SyncFactoryException("Exception 2");
+ SyncFactoryException ex2 = new SyncFactoryException("Exception 3");
+ ex2.initCause(t2);
+ ex.setNextException(ex1);
+ ex.setNextException(ex2);
+ int num = 0;
+ for (Throwable e : ex) {
+ assertTrue(msgs[num++].equals(e.getMessage()));
+ }
+ }
+
+ /*
+ * Validate that the ordering of the returned Exceptions is correct using
+ * traditional while loop
+ */
+ @Test
+ public void test04() {
+ SQLException ex = new SyncFactoryException("Exception 1");
+ ex.initCause(t1);
+ SyncFactoryException ex1 = new SyncFactoryException("Exception 2");
+ SyncFactoryException ex2 = new SyncFactoryException("Exception 3");
+ ex2.initCause(t2);
+ ex.setNextException(ex1);
+ ex.setNextException(ex2);
+ int num = 0;
+ while (ex != null) {
+ assertTrue(msgs[num++].equals(ex.getMessage()));
+ Throwable c = ex.getCause();
+ while (c != null) {
+ assertTrue(msgs[num++].equals(c.getMessage()));
+ c = c.getCause();
+ }
+ ex = ex.getNextException();
+ }
+ }
+
+ /*
+ * Serialize a SyncFactoryException and make sure you can read it back properly
+ */
+ @Test
+ public void test05() throws Exception {
+ SyncFactoryException e = new SyncFactoryException(reason);
+ SyncFactoryException ex1 = createSerializedException(e);
+ assertTrue(ex1.getMessage().equals(reason)
+ && ex1.getSQLState() == null
+ && ex1.getCause() == null
+ && ex1.getErrorCode() == 0);
+ }
+}
--- a/jdk/test/javax/sql/testng/test/rowset/spi/SyncFactoryPermissionsTests.java Thu Nov 06 10:11:35 2014 -0800
+++ b/jdk/test/javax/sql/testng/test/rowset/spi/SyncFactoryPermissionsTests.java Wed Jul 05 20:06:31 2017 +0200
@@ -27,13 +27,13 @@
import java.util.logging.Level;
import java.util.logging.Logger;
import javax.naming.Context;
-import javax.naming.InitialContext;
-import javax.naming.NamingException;
import javax.sql.rowset.spi.SyncFactory;
+import javax.sql.rowset.spi.SyncFactoryException;
import org.testng.annotations.AfterClass;
import org.testng.annotations.BeforeClass;
import org.testng.annotations.Test;
import util.BaseTest;
+import util.StubContext;
import util.TestPolicy;
public class SyncFactoryPermissionsTests extends BaseTest {
@@ -41,6 +41,7 @@
Context ctx;
private static Policy policy;
private static SecurityManager sm;
+ private final Logger alogger = Logger.getLogger(this.getClass().getName());
/*
* Install a SeeurityManager along with a base Policy to allow testNG to run
@@ -67,13 +68,7 @@
public SyncFactoryPermissionsTests() {
policy = Policy.getPolicy();
sm = System.getSecurityManager();
-
- try {
- ctx = new InitialContext();
- } catch (NamingException ex) {
- Logger.getLogger(SyncFactoryPermissionsTests.class.getName()).
- log(Level.SEVERE, null, ex);
- }
+ ctx = new StubContext();
}
/*
@@ -87,12 +82,20 @@
}
/*
+ * Validate that a SyncFactoryException is thrown if the Logger is null
+ */
+ @Test(expectedExceptions = SyncFactoryException.class)
+ public void test00() throws SyncFactoryException {
+ Logger l = SyncFactory.getLogger();
+ }
+
+ /*
* Validate that setJNDIContext succeeds if SQLPermission("setSyncFactory")
* has been granted
*/
@Test
- public void test1() throws Exception {
- Policy.setPolicy(new TestPolicy("setSyncFactory"));
+ public void test01() throws Exception {
+ setPolicy(new TestPolicy("setSyncFactory"));
SyncFactory.setJNDIContext(ctx);
}
@@ -100,8 +103,77 @@
* Validate that setJNDIContext succeeds if AllPermissions has been granted
*/
@Test
- public void test2() throws Exception {
+ public void test02() throws Exception {
setPolicy(new TestPolicy("all"));
SyncFactory.setJNDIContext(ctx);
}
+
+ /*
+ * Validate that AccessControlException is thrown if
+ * SQLPermission("setSyncFactory") has not been granted
+ */
+ @Test(expectedExceptions = AccessControlException.class)
+ public void test03() throws Exception {
+ setPolicy(new TestPolicy());
+ SyncFactory.setLogger(alogger);
+ }
+
+ /*
+ * Validate that setLogger succeeds if SQLPermission("setSyncFactory")
+ * has been granted
+ */
+ @Test
+ public void test04() throws Exception {
+ setPolicy(new TestPolicy("setSyncFactory"));
+ SyncFactory.setLogger(alogger);
+ }
+
+ /*
+ * Validate that setLogger succeeds if AllPermissions has been granted
+ */
+ @Test
+ public void test05() throws Exception {
+ setPolicy(new TestPolicy("all"));
+ SyncFactory.setLogger(alogger);
+ }
+
+ /*
+ * Validate that AccessControlException is thrown if
+ * SQLPermission("setSyncFactory") has not been granted
+ */
+ @Test(expectedExceptions = AccessControlException.class)
+ public void test06() throws Exception {
+ setPolicy(new TestPolicy());
+ SyncFactory.setLogger(alogger, Level.INFO);
+ }
+
+ /*
+ * Validate that AccessControlException is thrown if
+ * SQLPermission("setSyncFactory") and LoggingPermission("control", null)
+ * have not been granted
+ */
+ @Test(expectedExceptions = AccessControlException.class)
+ public void test07() throws Exception {
+ setPolicy(new TestPolicy("setSyncFactory"));
+ SyncFactory.setLogger(alogger, Level.INFO);
+ }
+
+ /*
+ * Validate that setLogger succeeds if SQLPermission("setSyncFactory")
+ * has been granted
+ */
+ @Test
+ public void test08() throws Exception {
+ setPolicy(new TestPolicy("setSyncFactoryLogger"));
+ SyncFactory.setLogger(alogger, Level.INFO);
+ }
+
+ /*
+ * Validate that setLogger succeeds if AllPermissions has been granted
+ */
+ @Test
+ public void test09() throws Exception {
+ setPolicy(new TestPolicy("all"));
+ SyncFactory.setLogger(alogger, Level.INFO);
+ }
}
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/jdk/test/javax/sql/testng/test/rowset/spi/SyncFactoryTests.java Wed Jul 05 20:06:31 2017 +0200
@@ -0,0 +1,220 @@
+/*
+ * Copyright (c) 2014, Oracle and/or its affiliates. All rights reserved.
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * This code is free software; you can redistribute 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.rowset.spi;
+
+import com.sun.rowset.providers.RIOptimisticProvider;
+import java.util.ArrayList;
+import java.util.Arrays;
+import java.util.Enumeration;
+import java.util.List;
+import java.util.logging.Level;
+import java.util.logging.Logger;
+import javax.naming.Context;
+import javax.sql.rowset.spi.SyncFactory;
+import javax.sql.rowset.spi.SyncFactoryException;
+import javax.sql.rowset.spi.SyncProvider;
+import static org.testng.Assert.*;
+import org.testng.annotations.BeforeMethod;
+import org.testng.annotations.Test;
+import util.PropertyStubProvider;
+import util.StubSyncProvider;
+import util.StubContext;
+
+//com.sun.jndi.ldap.LdapCtxFactory
+public class SyncFactoryTests {
+ private static String origFactory;
+
+ private final String stubProvider = "util.StubSyncProvider";
+ private final String propertyStubProvider = "util.PropertyStubProvider";
+ private final Logger alogger = Logger.getLogger(this.getClass().getName());
+ // Initial providers including those set via a property
+ List<String> initialProviders;
+ // All providers including those specifically registered
+ List<String> allProviders;
+ private Context ctx= null;
+
+ public SyncFactoryTests() {
+
+ // Add a provider via a property
+ System.setProperty("rowset.provider.classname", propertyStubProvider);
+ initialProviders = Arrays.asList(
+ "com.sun.rowset.providers.RIOptimisticProvider",
+ "com.sun.rowset.providers.RIXMLProvider",
+ propertyStubProvider);
+ allProviders = new ArrayList<>();
+ allProviders.addAll(initialProviders);
+ allProviders.add(stubProvider);
+ ctx = new StubContext();
+ }
+
+ @BeforeMethod
+ public void setUpMethod() throws Exception {
+ // Make sure the provider provider that is registered is removed
+ // before each run
+ SyncFactory.unregisterProvider(stubProvider);
+ }
+
+ /*
+ * Validate a non-null factory is returned
+ */
+ @Test
+ public void test() throws SyncFactoryException {
+ SyncFactory syncFactory = SyncFactory.getSyncFactory();
+ assertTrue(syncFactory != null);
+ }
+
+ /*
+ * Check that the correct SyncProvider is returned for the specified
+ * providerID for the provider registered via a property
+ */
+ @Test
+ public void test00() throws SyncFactoryException {
+ SyncProvider p = SyncFactory.getInstance(propertyStubProvider);
+ assertTrue(p instanceof PropertyStubProvider);
+ }
+
+ /*
+ * Check that the correct SyncProvider is returned for the specified
+ * providerID
+ */
+ @Test
+ public void test01() throws SyncFactoryException {
+ SyncFactory.registerProvider(stubProvider);
+ SyncProvider p = SyncFactory.getInstance(stubProvider);
+ assertTrue(p instanceof StubSyncProvider);
+ }
+
+ /*
+ * Check that the Default SyncProvider is returned if an empty String is
+ * passed or if an invalid providerID is specified
+ */
+ @Test
+ public void test02() throws SyncFactoryException {
+ SyncProvider p = SyncFactory.getInstance("");
+ assertTrue(p instanceof RIOptimisticProvider);
+ // Attempt to get an invalid provider and get the default provider
+ p = SyncFactory.getInstance("util.InvalidSyncProvider");
+ assertTrue(p instanceof RIOptimisticProvider);
+ }
+
+ /*
+ * Validate that a SyncFactoryException is thrown if the ProviderID is null
+ */
+ @Test(expectedExceptions = SyncFactoryException.class)
+ public void test03() throws SyncFactoryException {
+ SyncProvider p = SyncFactory.getInstance(null);
+ }
+
+ /*
+ * Validate that a SyncFactoryException is thrown if the Logger is null
+ */
+ @Test(expectedExceptions = SyncFactoryException.class,enabled=true)
+ public void test04() throws SyncFactoryException {
+ Logger l = SyncFactory.getLogger();
+ }
+
+ /*
+ * Validate that the correct logger is returned by getLogger
+ */
+ @Test
+ public void test05() throws SyncFactoryException {
+ SyncFactory.setLogger(alogger);
+ Logger l = SyncFactory.getLogger();
+ assertTrue(l.equals(alogger));
+ }
+
+ /*
+ * Validate that the correct logger is returned by getLogger
+ */
+ @Test
+ public void test06() throws SyncFactoryException {
+ SyncFactory.setLogger(alogger, Level.INFO);
+ Logger l = SyncFactory.getLogger();
+ assertTrue(l.equals(alogger));
+ }
+
+ /*
+ * Validate that a driver that is registered is returned by
+ * getRegisteredProviders and if it is unregistered, that it is
+ * not returned by getRegisteredProviders
+ */
+ @Test
+ public void test07() throws SyncFactoryException {
+
+ // Validate that only the default providers and any specified via
+ // a System property are available
+ validateProviders(initialProviders);
+
+ // Register a provider and make sure it is avaiable
+ SyncFactory.registerProvider(stubProvider);
+ validateProviders(allProviders);
+
+ // Check that if a provider is unregistered, it does not show as
+ // registered
+ SyncFactory.unregisterProvider(stubProvider);
+ validateProviders(initialProviders);
+ }
+
+ /*
+ * Validate that setJNDIContext throws a SyncFactoryException if the
+ * context is null
+ */
+ @Test(expectedExceptions = SyncFactoryException.class, enabled=true)
+ public void test08() throws Exception {
+ SyncFactory.setJNDIContext(null);
+ }
+
+ /*
+ * Validate that setJNDIContext succeeds
+ */
+ @Test(enabled=true)
+ public void test09() throws Exception {
+ SyncFactory.setJNDIContext(ctx);
+ }
+
+ /*
+ * Utility method to validate the expected providers are regsitered
+ */
+ private void validateProviders(List<String> expectedProviders)
+ throws SyncFactoryException {
+ List<String> results = new ArrayList<>();
+ Enumeration<SyncProvider> providers = SyncFactory.getRegisteredProviders();
+
+ while (providers.hasMoreElements()) {
+ SyncProvider p = providers.nextElement();
+ results.add(p.getProviderID());
+ }
+ assertTrue(expectedProviders.containsAll(results)
+ && results.size() == expectedProviders.size());
+ }
+
+ /*
+ * Utility method to dump out SyncProvider info for a registered provider
+ */
+ private void showImpl(SyncProvider impl) {
+ System.out.println("Provider implementation:"
+ + "\nVendor: " + impl.getVendor()
+ + "\nVersion: " + impl.getVersion()
+ + "\nProviderID: " + impl.getProviderID());
+ }
+}
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/jdk/test/javax/sql/testng/test/rowset/spi/SyncProviderExceptionTests.java Wed Jul 05 20:06:31 2017 +0200
@@ -0,0 +1,187 @@
+/*
+ * Copyright (c) 2014, Oracle and/or its affiliates. All rights reserved.
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * This code is free software; you can redistribute 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.rowset.spi;
+
+import com.sun.rowset.internal.SyncResolverImpl;
+import java.sql.SQLException;
+import javax.sql.rowset.spi.SyncProviderException;
+import static org.testng.Assert.*;
+import org.testng.annotations.AfterClass;
+import org.testng.annotations.BeforeClass;
+import org.testng.annotations.Test;
+import util.BaseTest;
+import util.StubSyncResolver;
+
+public class SyncProviderExceptionTests extends BaseTest {
+ @BeforeClass
+ public static void setUpClass() throws Exception {
+ System.out.println(System.getProperty("java.naming.factory.initial"));
+ }
+
+ @AfterClass
+ public static void tearDownClass() throws Exception {
+ }
+ /*
+ * Create SyncProviderException with no-arg constructor
+ */
+ @Test
+ public void test() {
+ SyncProviderException ex = new SyncProviderException();
+ assertTrue(ex.getMessage() == null
+ && ex.getSQLState() == null
+ && ex.getCause() == null
+ && ex.getErrorCode() == 0
+ && ex.getSyncResolver() instanceof SyncResolverImpl);
+ }
+
+ /*
+ * Create SyncProviderException with no-arg constructor and
+ * call setSyncResolver to indicate the SyncResolver to use
+ */
+ @Test
+ public void test01() {
+ SyncProviderException ex = new SyncProviderException();
+ ex.setSyncResolver(new StubSyncResolver());
+ assertTrue(ex.getMessage() == null
+ && ex.getSQLState() == null
+ && ex.getCause() == null
+ && ex.getErrorCode() == 0
+ && ex.getSyncResolver() instanceof StubSyncResolver);
+ }
+
+ /*
+ * Create SyncProviderException with message
+ */
+ @Test
+ public void test02() {
+ SyncProviderException ex = new SyncProviderException(reason);
+ assertTrue(ex.getMessage().equals(reason)
+ && ex.getSQLState() == null
+ && ex.getCause() == null
+ && ex.getErrorCode() == 0
+ && ex.getSyncResolver() instanceof SyncResolverImpl);
+ }
+
+ /*
+ * Create SyncProviderException with message and
+ * call setSyncResolver to indicate the SyncResolver to use
+ */
+ @Test
+ public void test03() {
+ SyncProviderException ex = new SyncProviderException(reason);
+ ex.setSyncResolver(new StubSyncResolver());
+
+ assertTrue(ex.getMessage().equals(reason)
+ && ex.getSQLState() == null
+ && ex.getCause() == null
+ && ex.getErrorCode() == 0
+ && ex.getSyncResolver() instanceof StubSyncResolver);
+ }
+
+ /*
+ * Create SyncProviderException with and specify the SyncResolver to use
+ */
+ @Test
+ public void test04() {
+ SyncProviderException ex = new SyncProviderException(new StubSyncResolver());
+ assertTrue(ex.getMessage() == null
+ && ex.getSQLState() == null
+ && ex.getCause() == null
+ && ex.getErrorCode() == 0
+ && ex.getSyncResolver() instanceof StubSyncResolver);
+ }
+
+ /*
+ * Validate that the ordering of the returned Exceptions is correct using
+ * for-each loop
+ */
+ @Test
+ public void test05() {
+ SyncProviderException ex = new SyncProviderException("Exception 1");
+ ex.initCause(t1);
+ SyncProviderException ex1 = new SyncProviderException("Exception 2");
+ SyncProviderException ex2 = new SyncProviderException("Exception 3");
+ ex2.initCause(t2);
+ ex.setNextException(ex1);
+ ex.setNextException(ex2);
+ int num = 0;
+ for (Throwable e : ex) {
+ assertTrue(msgs[num++].equals(e.getMessage()));
+ }
+ }
+
+ /*
+ * Validate that the ordering of the returned Exceptions is correct using
+ * traditional while loop
+ */
+ @Test
+ public void test06() {
+ SQLException ex = new SyncProviderException("Exception 1");
+ ex.initCause(t1);
+ SyncProviderException ex1 = new SyncProviderException("Exception 2");
+ SyncProviderException ex2 = new SyncProviderException("Exception 3");
+ ex2.initCause(t2);
+ ex.setNextException(ex1);
+ ex.setNextException(ex2);
+ int num = 0;
+ while (ex != null) {
+ assertTrue(msgs[num++].equals(ex.getMessage()));
+ Throwable c = ex.getCause();
+ while (c != null) {
+ assertTrue(msgs[num++].equals(c.getMessage()));
+ c = c.getCause();
+ }
+ ex = ex.getNextException();
+ }
+ }
+
+ /*
+ * Serialize a SyncProviderException and make sure you can read it back properly
+ */
+ @Test
+ public void test07() throws Exception {
+ SyncProviderException e = new SyncProviderException(reason);
+ SyncProviderException ex1 = createSerializedException(e);
+ assertTrue(ex1.getMessage().equals(reason)
+ && ex1.getSQLState() == null
+ && ex1.getCause() == null
+ && ex1.getErrorCode() == 0
+ && ex1.getSyncResolver() instanceof SyncResolverImpl, ex1.getSyncResolver().getClass().getName());
+ }
+
+ /*
+ * Serialize a SyncProviderException and make sure you can read it back properly
+ */
+ @Test
+ public void test08() throws Exception {
+ SyncProviderException e = new SyncProviderException(reason);
+ e.setSyncResolver(new StubSyncResolver());
+
+ SyncProviderException ex1 = createSerializedException(e);
+ assertTrue(ex1.getMessage().equals(reason)
+ && ex1.getSQLState() == null
+ && ex1.getCause() == null
+ && ex1.getErrorCode() == 0
+ && ex1.getSyncResolver() instanceof StubSyncResolver);
+ }
+}
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/jdk/test/javax/sql/testng/util/PropertyStubProvider.java Wed Jul 05 20:06:31 2017 +0200
@@ -0,0 +1,27 @@
+/*
+ * Copyright (c) 2014, Oracle and/or its affiliates. All rights reserved.
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * This code is free software; you can redistribute 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 PropertyStubProvider extends StubSyncProvider {
+
+}
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/jdk/test/javax/sql/testng/util/StubContext.java Wed Jul 05 20:06:31 2017 +0200
@@ -0,0 +1,220 @@
+/*
+ * Copyright (c) 2014, Oracle and/or its affiliates. All rights reserved.
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * This code is free software; you can redistribute 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;
+
+import java.util.Hashtable;
+import javax.naming.Binding;
+import javax.naming.Context;
+import javax.naming.Name;
+import javax.naming.NameClassPair;
+import javax.naming.NameParser;
+import javax.naming.NamingEnumeration;
+import javax.naming.NamingException;
+
+@SuppressWarnings("unchecked")
+public class StubContext implements Context {
+
+ @Override
+ public Object lookup(Name name) throws NamingException {
+ return null;
+ }
+
+ @Override
+ public Object lookup(String name) throws NamingException {
+ return null;
+ }
+
+ @Override
+ public void bind(Name name, Object obj) throws NamingException {
+
+ }
+
+ @Override
+ public void bind(String name, Object obj) throws NamingException {
+
+ }
+
+ @Override
+ public void rebind(Name name, Object obj) throws NamingException {
+
+ }
+
+ @Override
+ public void rebind(String name, Object obj) throws NamingException {
+
+ }
+
+ @Override
+ public void unbind(Name name) throws NamingException {
+
+ }
+
+ @Override
+ public void unbind(String name) throws NamingException {
+
+ }
+
+ @Override
+ public void rename(Name oldName, Name newName) throws NamingException {
+
+ }
+
+ @Override
+ public void rename(String oldName, String newName) throws NamingException {
+
+ }
+
+ @Override
+ public NamingEnumeration<NameClassPair> list(Name name) throws NamingException {
+ return new NamingEnumerationStub();
+ }
+
+ @Override
+ public NamingEnumeration<NameClassPair> list(String name) throws NamingException {
+ return new NamingEnumerationStub();
+ }
+
+ @Override
+ public NamingEnumeration<Binding> listBindings(Name name) throws NamingException {
+ return new NamingEnumerationStub();
+ }
+
+ @Override
+ public NamingEnumeration<Binding> listBindings(String name) throws NamingException {
+ return new NamingEnumerationStub();
+ }
+
+ @Override
+ public void destroySubcontext(Name name) throws NamingException {
+
+ }
+
+ @Override
+ public void destroySubcontext(String name) throws NamingException {
+
+ }
+
+ @Override
+ public Context createSubcontext(Name name) throws NamingException {
+ return null;
+ }
+
+ @Override
+ public Context createSubcontext(String name) throws NamingException {
+ return null;
+ }
+
+ @Override
+ public Object lookupLink(Name name) throws NamingException {
+ return null;
+ }
+
+ @Override
+ public Object lookupLink(String name) throws NamingException {
+ return null;
+ }
+
+ @Override
+ public NameParser getNameParser(Name name) throws NamingException {
+ return new NameParserStub();
+ }
+
+ @Override
+ public NameParser getNameParser(String name) throws NamingException {
+ return new NameParserStub();
+ }
+
+ @Override
+ public Name composeName(Name name, Name prefix) throws NamingException {
+ return null;
+ }
+
+ @Override
+ public String composeName(String name, String prefix) throws NamingException {
+ return null;
+ }
+
+ @Override
+ public Object addToEnvironment(String propName, Object propVal) throws NamingException {
+ return null;
+ }
+
+ @Override
+ public Object removeFromEnvironment(String propName) throws NamingException {
+ return null;
+ }
+
+ @Override
+ public Hashtable<?, ?> getEnvironment() throws NamingException {
+ return new Hashtable();
+ }
+
+ @Override
+ public void close() throws NamingException {
+
+ }
+
+ @Override
+ public String getNameInNamespace() throws NamingException {
+ return null;
+ }
+
+ class NamingEnumerationStub implements NamingEnumeration {
+
+ @Override
+ public Object next() throws NamingException {
+ return null;
+ }
+
+ @Override
+ public boolean hasMore() throws NamingException {
+ return false;
+ }
+
+ @Override
+ public void close() throws NamingException {
+
+ }
+
+ @Override
+ public boolean hasMoreElements() {
+ return false;
+ }
+
+ @Override
+ public Object nextElement() {
+ return null;
+ }
+
+ }
+
+ class NameParserStub implements NameParser {
+
+ @Override
+ public Name parse(String name) throws NamingException {
+ return null;
+ }
+
+ }
+
+}
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/jdk/test/javax/sql/testng/util/StubSyncProvider.java Wed Jul 05 20:06:31 2017 +0200
@@ -0,0 +1,92 @@
+/*
+ * Copyright (c) 2014, Oracle and/or its affiliates. All rights reserved.
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * This code is free software; you can redistribute 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;
+
+import javax.sql.RowSetReader;
+import javax.sql.RowSetWriter;
+import javax.sql.rowset.spi.SyncProvider;
+import javax.sql.rowset.spi.SyncProviderException;
+
+public class StubSyncProvider extends SyncProvider {
+
+ /**
+ * The unique provider identifier.
+ */
+ private String providerID = "util.StubSyncProvider";
+
+ /**
+ * The vendor name of this SyncProvider implementation
+ */
+ private String vendorName = "Oracle Corporation";
+
+ /**
+ * The version number of this SyncProvider implementation
+ */
+ private String versionNumber = "1.0";
+
+ @Override
+ public String getProviderID() {
+ return providerID;
+ }
+
+ @Override
+ public RowSetReader getRowSetReader() {
+ throw new UnsupportedOperationException("Not supported yet.");
+ }
+
+ @Override
+ public RowSetWriter getRowSetWriter() {
+ throw new UnsupportedOperationException("Not supported yet.");
+ }
+
+ @Override
+ public int getProviderGrade() {
+ throw new UnsupportedOperationException("Not supported yet.");
+ }
+
+ @Override
+ public void setDataSourceLock(int datasource_lock) throws SyncProviderException {
+ throw new UnsupportedOperationException("Not supported yet.");
+ }
+
+ @Override
+ public int getDataSourceLock() throws SyncProviderException {
+ throw new UnsupportedOperationException("Not supported yet.");
+ }
+
+ @Override
+ public int supportsUpdatableView() {
+ throw new UnsupportedOperationException("Not supported yet.");
+ }
+
+ @Override
+ public String getVersion() {
+ return versionNumber;
+ }
+
+ @Override
+ public String getVendor() {
+ return vendorName;
+ }
+
+}
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/jdk/test/javax/sql/testng/util/StubSyncResolver.java Wed Jul 05 20:06:31 2017 +0200
@@ -0,0 +1,1616 @@
+/*
+ * Copyright (c) 2014, Oracle and/or its affiliates. All rights reserved.
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * This code is free software; you can redistribute 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;
+
+import java.io.InputStream;
+import java.io.Reader;
+import java.io.Serializable;
+import java.math.BigDecimal;
+import java.net.URL;
+import java.sql.Array;
+import java.sql.Blob;
+import java.sql.Clob;
+import java.sql.Date;
+import java.sql.NClob;
+import java.sql.Ref;
+import java.sql.ResultSetMetaData;
+import java.sql.RowId;
+import java.sql.SQLException;
+import java.sql.SQLWarning;
+import java.sql.SQLXML;
+import java.sql.Statement;
+import java.sql.Time;
+import java.sql.Timestamp;
+import java.util.Calendar;
+import java.util.Map;
+import javax.sql.RowSetListener;
+import javax.sql.rowset.spi.SyncResolver;
+
+public class StubSyncResolver implements SyncResolver, Serializable {
+
+ @Override
+ public int getStatus() {
+ throw new UnsupportedOperationException("Not supported yet.");
+ }
+
+ @Override
+ public Object getConflictValue(int index) throws SQLException {
+ throw new UnsupportedOperationException("Not supported yet.");
+ }
+
+ @Override
+ public Object getConflictValue(String columnName) throws SQLException {
+ throw new UnsupportedOperationException("Not supported yet.");
+ }
+
+ @Override
+ public void setResolvedValue(int index, Object obj) throws SQLException {
+ throw new UnsupportedOperationException("Not supported yet.");
+ }
+
+ @Override
+ public void setResolvedValue(String columnName, Object obj) throws SQLException {
+ throw new UnsupportedOperationException("Not supported yet.");
+ }
+
+ @Override
+ public boolean nextConflict() throws SQLException {
+ throw new UnsupportedOperationException("Not supported yet.");
+ }
+
+ @Override
+ public boolean previousConflict() throws SQLException {
+ throw new UnsupportedOperationException("Not supported yet.");
+ }
+
+ @Override
+ public String getUrl() throws SQLException {
+ throw new UnsupportedOperationException("Not supported yet.");
+ }
+
+ @Override
+ public void setUrl(String url) throws SQLException {
+ throw new UnsupportedOperationException("Not supported yet.");
+ }
+
+ @Override
+ public String getDataSourceName() {
+ throw new UnsupportedOperationException("Not supported yet.");
+ }
+
+ @Override
+ public void setDataSourceName(String name) throws SQLException {
+ throw new UnsupportedOperationException("Not supported yet.");
+ }
+
+ @Override
+ public String getUsername() {
+ throw new UnsupportedOperationException("Not supported yet.");
+ }
+
+ @Override
+ public void setUsername(String name) throws SQLException {
+ throw new UnsupportedOperationException("Not supported yet.");
+ }
+
+ @Override
+ public String getPassword() {
+ throw new UnsupportedOperationException("Not supported yet.");
+ }
+
+ @Override
+ public void setPassword(String password) throws SQLException {
+ throw new UnsupportedOperationException("Not supported yet.");
+ }
+
+ @Override
+ public int getTransactionIsolation() {
+ throw new UnsupportedOperationException("Not supported yet.");
+ }
+
+ @Override
+ public void setTransactionIsolation(int level) throws SQLException {
+ throw new UnsupportedOperationException("Not supported yet.");
+ }
+
+ @Override
+ public Map<String, Class<?>> getTypeMap() throws SQLException {
+ throw new UnsupportedOperationException("Not supported yet.");
+ }
+
+ @Override
+ public void setTypeMap(Map<String, Class<?>> map) throws SQLException {
+ throw new UnsupportedOperationException("Not supported yet.");
+ }
+
+ @Override
+ public String getCommand() {
+ throw new UnsupportedOperationException("Not supported yet.");
+ }
+
+ @Override
+ public void setCommand(String cmd) throws SQLException {
+ throw new UnsupportedOperationException("Not supported yet.");
+ }
+
+ @Override
+ public boolean isReadOnly() {
+ throw new UnsupportedOperationException("Not supported yet.");
+ }
+
+ @Override
+ public void setReadOnly(boolean value) throws SQLException {
+ throw new UnsupportedOperationException("Not supported yet.");
+ }
+
+ @Override
+ public int getMaxFieldSize() throws SQLException {
+ throw new UnsupportedOperationException("Not supported yet.");
+ }
+
+ @Override
+ public void setMaxFieldSize(int max) throws SQLException {
+ throw new UnsupportedOperationException("Not supported yet.");
+ }
+
+ @Override
+ public int getMaxRows() throws SQLException {
+ throw new UnsupportedOperationException("Not supported yet.");
+ }
+
+ @Override
+ public void setMaxRows(int max) throws SQLException {
+ throw new UnsupportedOperationException("Not supported yet.");
+ }
+
+ @Override
+ public boolean getEscapeProcessing() throws SQLException {
+ throw new UnsupportedOperationException("Not supported yet.");
+ }
+
+ @Override
+ public void setEscapeProcessing(boolean enable) throws SQLException {
+ throw new UnsupportedOperationException("Not supported yet.");
+ }
+
+ @Override
+ public int getQueryTimeout() throws SQLException {
+ throw new UnsupportedOperationException("Not supported yet.");
+ }
+
+ @Override
+ public void setQueryTimeout(int seconds) throws SQLException {
+ throw new UnsupportedOperationException("Not supported yet.");
+ }
+
+ @Override
+ public void setType(int type) throws SQLException {
+ throw new UnsupportedOperationException("Not supported yet.");
+ }
+
+ @Override
+ public void setConcurrency(int concurrency) throws SQLException {
+ throw new UnsupportedOperationException("Not supported yet.");
+ }
+
+ @Override
+ public void setNull(int parameterIndex, int sqlType) throws SQLException {
+ throw new UnsupportedOperationException("Not supported yet.");
+ }
+
+ @Override
+ public void setNull(String parameterName, int sqlType) throws SQLException {
+ throw new UnsupportedOperationException("Not supported yet.");
+ }
+
+ @Override
+ public void setNull(int paramIndex, int sqlType, String typeName) throws SQLException {
+ throw new UnsupportedOperationException("Not supported yet.");
+ }
+
+ @Override
+ public void setNull(String parameterName, int sqlType, String typeName) throws SQLException {
+ throw new UnsupportedOperationException("Not supported yet.");
+ }
+
+ @Override
+ public void setBoolean(int parameterIndex, boolean x) throws SQLException {
+ throw new UnsupportedOperationException("Not supported yet.");
+ }
+
+ @Override
+ public void setBoolean(String parameterName, boolean x) throws SQLException {
+ throw new UnsupportedOperationException("Not supported yet.");
+ }
+
+ @Override
+ public void setByte(int parameterIndex, byte x) throws SQLException {
+ throw new UnsupportedOperationException("Not supported yet.");
+ }
+
+ @Override
+ public void setByte(String parameterName, byte x) throws SQLException {
+ throw new UnsupportedOperationException("Not supported yet.");
+ }
+
+ @Override
+ public void setShort(int parameterIndex, short x) throws SQLException {
+ throw new UnsupportedOperationException("Not supported yet.");
+ }
+
+ @Override
+ public void setShort(String parameterName, short x) throws SQLException {
+ throw new UnsupportedOperationException("Not supported yet.");
+ }
+
+ @Override
+ public void setInt(int parameterIndex, int x) throws SQLException {
+ throw new UnsupportedOperationException("Not supported yet.");
+ }
+
+ @Override
+ public void setInt(String parameterName, int x) throws SQLException {
+ throw new UnsupportedOperationException("Not supported yet.");
+ }
+
+ @Override
+ public void setLong(int parameterIndex, long x) throws SQLException {
+ throw new UnsupportedOperationException("Not supported yet.");
+ }
+
+ @Override
+ public void setLong(String parameterName, long x) throws SQLException {
+ throw new UnsupportedOperationException("Not supported yet.");
+ }
+
+ @Override
+ public void setFloat(int parameterIndex, float x) throws SQLException {
+ throw new UnsupportedOperationException("Not supported yet.");
+ }
+
+ @Override
+ public void setFloat(String parameterName, float x) throws SQLException {
+ throw new UnsupportedOperationException("Not supported yet.");
+ }
+
+ @Override
+ public void setDouble(int parameterIndex, double x) throws SQLException {
+ throw new UnsupportedOperationException("Not supported yet.");
+ }
+
+ @Override
+ public void setDouble(String parameterName, double x) throws SQLException {
+ throw new UnsupportedOperationException("Not supported yet.");
+ }
+
+ @Override
+ public void setBigDecimal(int parameterIndex, BigDecimal x) throws SQLException {
+ throw new UnsupportedOperationException("Not supported yet.");
+ }
+
+ @Override
+ public void setBigDecimal(String parameterName, BigDecimal x) throws SQLException {
+ throw new UnsupportedOperationException("Not supported yet.");
+ }
+
+ @Override
+ public void setString(int parameterIndex, String x) throws SQLException {
+ throw new UnsupportedOperationException("Not supported yet.");
+ }
+
+ @Override
+ public void setString(String parameterName, String x) throws SQLException {
+ throw new UnsupportedOperationException("Not supported yet.");
+ }
+
+ @Override
+ public void setBytes(int parameterIndex, byte[] x) throws SQLException {
+ throw new UnsupportedOperationException("Not supported yet.");
+ }
+
+ @Override
+ public void setBytes(String parameterName, byte[] x) throws SQLException {
+ throw new UnsupportedOperationException("Not supported yet.");
+ }
+
+ @Override
+ public void setDate(int parameterIndex, Date x) throws SQLException {
+ throw new UnsupportedOperationException("Not supported yet.");
+ }
+
+ @Override
+ public void setTime(int parameterIndex, Time x) throws SQLException {
+ throw new UnsupportedOperationException("Not supported yet.");
+ }
+
+ @Override
+ public void setTimestamp(int parameterIndex, Timestamp x) throws SQLException {
+ throw new UnsupportedOperationException("Not supported yet.");
+ }
+
+ @Override
+ public void setTimestamp(String parameterName, Timestamp x) throws SQLException {
+ throw new UnsupportedOperationException("Not supported yet.");
+ }
+
+ @Override
+ public void setAsciiStream(int parameterIndex, InputStream x, int length) throws SQLException {
+ throw new UnsupportedOperationException("Not supported yet.");
+ }
+
+ @Override
+ public void setAsciiStream(String parameterName, InputStream x, int length) throws SQLException {
+ throw new UnsupportedOperationException("Not supported yet.");
+ }
+
+ @Override
+ public void setBinaryStream(int parameterIndex, InputStream x, int length) throws SQLException {
+ throw new UnsupportedOperationException("Not supported yet.");
+ }
+
+ @Override
+ public void setBinaryStream(String parameterName, InputStream x, int length) throws SQLException {
+ throw new UnsupportedOperationException("Not supported yet.");
+ }
+
+ @Override
+ public void setCharacterStream(int parameterIndex, Reader reader, int length) throws SQLException {
+ throw new UnsupportedOperationException("Not supported yet.");
+ }
+
+ @Override
+ public void setCharacterStream(String parameterName, Reader reader, int length) throws SQLException {
+ throw new UnsupportedOperationException("Not supported yet.");
+ }
+
+ @Override
+ public void setAsciiStream(int parameterIndex, InputStream x) throws SQLException {
+ throw new UnsupportedOperationException("Not supported yet.");
+ }
+
+ @Override
+ public void setAsciiStream(String parameterName, InputStream x) throws SQLException {
+ throw new UnsupportedOperationException("Not supported yet.");
+ }
+
+ @Override
+ public void setBinaryStream(int parameterIndex, InputStream x) throws SQLException {
+ throw new UnsupportedOperationException("Not supported yet.");
+ }
+
+ @Override
+ public void setBinaryStream(String parameterName, InputStream x) throws SQLException {
+ throw new UnsupportedOperationException("Not supported yet.");
+ }
+
+ @Override
+ public void setCharacterStream(int parameterIndex, Reader reader) throws SQLException {
+ throw new UnsupportedOperationException("Not supported yet.");
+ }
+
+ @Override
+ public void setCharacterStream(String parameterName, Reader reader) throws SQLException {
+ throw new UnsupportedOperationException("Not supported yet.");
+ }
+
+ @Override
+ public void setNCharacterStream(int parameterIndex, Reader value) throws SQLException {
+ throw new UnsupportedOperationException("Not supported yet.");
+ }
+
+ @Override
+ public void setObject(int parameterIndex, Object x, int targetSqlType, int scaleOrLength) throws SQLException {
+ throw new UnsupportedOperationException("Not supported yet.");
+ }
+
+ @Override
+ public void setObject(String parameterName, Object x, int targetSqlType, int scale) throws SQLException {
+ throw new UnsupportedOperationException("Not supported yet.");
+ }
+
+ @Override
+ public void setObject(int parameterIndex, Object x, int targetSqlType) throws SQLException {
+ throw new UnsupportedOperationException("Not supported yet.");
+ }
+
+ @Override
+ public void setObject(String parameterName, Object x, int targetSqlType) throws SQLException {
+ throw new UnsupportedOperationException("Not supported yet.");
+ }
+
+ @Override
+ public void setObject(String parameterName, Object x) throws SQLException {
+ throw new UnsupportedOperationException("Not supported yet.");
+ }
+
+ @Override
+ public void setObject(int parameterIndex, Object x) throws SQLException {
+ throw new UnsupportedOperationException("Not supported yet.");
+ }
+
+ @Override
+ public void setRef(int i, Ref x) throws SQLException {
+ throw new UnsupportedOperationException("Not supported yet.");
+ }
+
+ @Override
+ public void setBlob(int i, Blob x) throws SQLException {
+ throw new UnsupportedOperationException("Not supported yet.");
+ }
+
+ @Override
+ public void setBlob(int parameterIndex, InputStream inputStream, long length) throws SQLException {
+ throw new UnsupportedOperationException("Not supported yet.");
+ }
+
+ @Override
+ public void setBlob(int parameterIndex, InputStream inputStream) throws SQLException {
+ throw new UnsupportedOperationException("Not supported yet.");
+ }
+
+ @Override
+ public void setBlob(String parameterName, InputStream inputStream, long length) throws SQLException {
+ throw new UnsupportedOperationException("Not supported yet.");
+ }
+
+ @Override
+ public void setBlob(String parameterName, Blob x) throws SQLException {
+ throw new UnsupportedOperationException("Not supported yet.");
+ }
+
+ @Override
+ public void setBlob(String parameterName, InputStream inputStream) throws SQLException {
+ throw new UnsupportedOperationException("Not supported yet.");
+ }
+
+ @Override
+ public void setClob(int i, Clob x) throws SQLException {
+ throw new UnsupportedOperationException("Not supported yet.");
+ }
+
+ @Override
+ public void setClob(int parameterIndex, Reader reader, long length) throws SQLException {
+ throw new UnsupportedOperationException("Not supported yet.");
+ }
+
+ @Override
+ public void setClob(int parameterIndex, Reader reader) throws SQLException {
+ throw new UnsupportedOperationException("Not supported yet.");
+ }
+
+ @Override
+ public void setClob(String parameterName, Reader reader, long length) throws SQLException {
+ throw new UnsupportedOperationException("Not supported yet.");
+ }
+
+ @Override
+ public void setClob(String parameterName, Clob x) throws SQLException {
+ throw new UnsupportedOperationException("Not supported yet.");
+ }
+
+ @Override
+ public void setClob(String parameterName, Reader reader) throws SQLException {
+ throw new UnsupportedOperationException("Not supported yet.");
+ }
+
+ @Override
+ public void setArray(int i, Array x) throws SQLException {
+ throw new UnsupportedOperationException("Not supported yet.");
+ }
+
+ @Override
+ public void setDate(int parameterIndex, Date x, Calendar cal) throws SQLException {
+ throw new UnsupportedOperationException("Not supported yet.");
+ }
+
+ @Override
+ public void setDate(String parameterName, Date x) throws SQLException {
+ throw new UnsupportedOperationException("Not supported yet.");
+ }
+
+ @Override
+ public void setDate(String parameterName, Date x, Calendar cal) throws SQLException {
+ throw new UnsupportedOperationException("Not supported yet.");
+ }
+
+ @Override
+ public void setTime(int parameterIndex, Time x, Calendar cal) throws SQLException {
+ throw new UnsupportedOperationException("Not supported yet.");
+ }
+
+ @Override
+ public void setTime(String parameterName, Time x) throws SQLException {
+ throw new UnsupportedOperationException("Not supported yet.");
+ }
+
+ @Override
+ public void setTime(String parameterName, Time x, Calendar cal) throws SQLException {
+ throw new UnsupportedOperationException("Not supported yet.");
+ }
+
+ @Override
+ public void setTimestamp(int parameterIndex, Timestamp x, Calendar cal) throws SQLException {
+ throw new UnsupportedOperationException("Not supported yet.");
+ }
+
+ @Override
+ public void setTimestamp(String parameterName, Timestamp x, Calendar cal) throws SQLException {
+ throw new UnsupportedOperationException("Not supported yet.");
+ }
+
+ @Override
+ public void clearParameters() throws SQLException {
+ throw new UnsupportedOperationException("Not supported yet.");
+ }
+
+ @Override
+ public void execute() throws SQLException {
+ throw new UnsupportedOperationException("Not supported yet.");
+ }
+
+ @Override
+ public void addRowSetListener(RowSetListener listener) {
+ throw new UnsupportedOperationException("Not supported yet.");
+ }
+
+ @Override
+ public void removeRowSetListener(RowSetListener listener) {
+ throw new UnsupportedOperationException("Not supported yet.");
+ }
+
+ @Override
+ public void setSQLXML(int parameterIndex, SQLXML xmlObject) throws SQLException {
+ throw new UnsupportedOperationException("Not supported yet.");
+ }
+
+ @Override
+ public void setSQLXML(String parameterName, SQLXML xmlObject) throws SQLException {
+ throw new UnsupportedOperationException("Not supported yet.");
+ }
+
+ @Override
+ public void setRowId(int parameterIndex, RowId x) throws SQLException {
+ throw new UnsupportedOperationException("Not supported yet.");
+ }
+
+ @Override
+ public void setRowId(String parameterName, RowId x) throws SQLException {
+ throw new UnsupportedOperationException("Not supported yet.");
+ }
+
+ @Override
+ public void setNString(int parameterIndex, String value) throws SQLException {
+ throw new UnsupportedOperationException("Not supported yet.");
+ }
+
+ @Override
+ public void setNString(String parameterName, String value) throws SQLException {
+ throw new UnsupportedOperationException("Not supported yet.");
+ }
+
+ @Override
+ public void setNCharacterStream(int parameterIndex, Reader value, long length) throws SQLException {
+ throw new UnsupportedOperationException("Not supported yet.");
+ }
+
+ @Override
+ public void setNCharacterStream(String parameterName, Reader value, long length) throws SQLException {
+ throw new UnsupportedOperationException("Not supported yet.");
+ }
+
+ @Override
+ public void setNCharacterStream(String parameterName, Reader value) throws SQLException {
+ throw new UnsupportedOperationException("Not supported yet.");
+ }
+
+ @Override
+ public void setNClob(String parameterName, NClob value) throws SQLException {
+ throw new UnsupportedOperationException("Not supported yet.");
+ }
+
+ @Override
+ public void setNClob(String parameterName, Reader reader, long length) throws SQLException {
+ throw new UnsupportedOperationException("Not supported yet.");
+ }
+
+ @Override
+ public void setNClob(String parameterName, Reader reader) throws SQLException {
+ throw new UnsupportedOperationException("Not supported yet.");
+ }
+
+ @Override
+ public void setNClob(int parameterIndex, Reader reader, long length) throws SQLException {
+ throw new UnsupportedOperationException("Not supported yet.");
+ }
+
+ @Override
+ public void setNClob(int parameterIndex, NClob value) throws SQLException {
+ throw new UnsupportedOperationException("Not supported yet.");
+ }
+
+ @Override
+ public void setNClob(int parameterIndex, Reader reader) throws SQLException {
+ throw new UnsupportedOperationException("Not supported yet.");
+ }
+
+ @Override
+ public void setURL(int parameterIndex, URL x) throws SQLException {
+ throw new UnsupportedOperationException("Not supported yet.");
+ }
+
+ @Override
+ public boolean next() throws SQLException {
+ throw new UnsupportedOperationException("Not supported yet.");
+ }
+
+ @Override
+ public void close() throws SQLException {
+ throw new UnsupportedOperationException("Not supported yet.");
+ }
+
+ @Override
+ public boolean wasNull() throws SQLException {
+ throw new UnsupportedOperationException("Not supported yet.");
+ }
+
+ @Override
+ public String getString(int columnIndex) throws SQLException {
+ throw new UnsupportedOperationException("Not supported yet.");
+ }
+
+ @Override
+ public boolean getBoolean(int columnIndex) throws SQLException {
+ throw new UnsupportedOperationException("Not supported yet.");
+ }
+
+ @Override
+ public byte getByte(int columnIndex) throws SQLException {
+ throw new UnsupportedOperationException("Not supported yet.");
+ }
+
+ @Override
+ public short getShort(int columnIndex) throws SQLException {
+ throw new UnsupportedOperationException("Not supported yet.");
+ }
+
+ @Override
+ public int getInt(int columnIndex) throws SQLException {
+ throw new UnsupportedOperationException("Not supported yet.");
+ }
+
+ @Override
+ public long getLong(int columnIndex) throws SQLException {
+ throw new UnsupportedOperationException("Not supported yet.");
+ }
+
+ @Override
+ public float getFloat(int columnIndex) throws SQLException {
+ throw new UnsupportedOperationException("Not supported yet.");
+ }
+
+ @Override
+ public double getDouble(int columnIndex) throws SQLException {
+ throw new UnsupportedOperationException("Not supported yet.");
+ }
+
+ @Override
+ public BigDecimal getBigDecimal(int columnIndex, int scale) throws SQLException {
+ throw new UnsupportedOperationException("Not supported yet.");
+ }
+
+ @Override
+ public byte[] getBytes(int columnIndex) throws SQLException {
+ throw new UnsupportedOperationException("Not supported yet.");
+ }
+
+ @Override
+ public Date getDate(int columnIndex) throws SQLException {
+ throw new UnsupportedOperationException("Not supported yet.");
+ }
+
+ @Override
+ public Time getTime(int columnIndex) throws SQLException {
+ throw new UnsupportedOperationException("Not supported yet.");
+ }
+
+ @Override
+ public Timestamp getTimestamp(int columnIndex) throws SQLException {
+ throw new UnsupportedOperationException("Not supported yet.");
+ }
+
+ @Override
+ public InputStream getAsciiStream(int columnIndex) throws SQLException {
+ throw new UnsupportedOperationException("Not supported yet.");
+ }
+
+ @Override
+ public InputStream getUnicodeStream(int columnIndex) throws SQLException {
+ throw new UnsupportedOperationException("Not supported yet.");
+ }
+
+ @Override
+ public InputStream getBinaryStream(int columnIndex) throws SQLException {
+ throw new UnsupportedOperationException("Not supported yet.");
+ }
+
+ @Override
+ public String getString(String columnLabel) throws SQLException {
+ throw new UnsupportedOperationException("Not supported yet.");
+ }
+
+ @Override
+ public boolean getBoolean(String columnLabel) throws SQLException {
+ throw new UnsupportedOperationException("Not supported yet.");
+ }
+
+ @Override
+ public byte getByte(String columnLabel) throws SQLException {
+ throw new UnsupportedOperationException("Not supported yet.");
+ }
+
+ @Override
+ public short getShort(String columnLabel) throws SQLException {
+ throw new UnsupportedOperationException("Not supported yet.");
+ }
+
+ @Override
+ public int getInt(String columnLabel) throws SQLException {
+ throw new UnsupportedOperationException("Not supported yet.");
+ }
+
+ @Override
+ public long getLong(String columnLabel) throws SQLException {
+ throw new UnsupportedOperationException("Not supported yet.");
+ }
+
+ @Override
+ public float getFloat(String columnLabel) throws SQLException {
+ throw new UnsupportedOperationException("Not supported yet.");
+ }
+
+ @Override
+ public double getDouble(String columnLabel) throws SQLException {
+ throw new UnsupportedOperationException("Not supported yet.");
+ }
+
+ @Override
+ public BigDecimal getBigDecimal(String columnLabel, int scale) throws SQLException {
+ throw new UnsupportedOperationException("Not supported yet.");
+ }
+
+ @Override
+ public byte[] getBytes(String columnLabel) throws SQLException {
+ throw new UnsupportedOperationException("Not supported yet.");
+ }
+
+ @Override
+ public Date getDate(String columnLabel) throws SQLException {
+ throw new UnsupportedOperationException("Not supported yet.");
+ }
+
+ @Override
+ public Time getTime(String columnLabel) throws SQLException {
+ throw new UnsupportedOperationException("Not supported yet.");
+ }
+
+ @Override
+ public Timestamp getTimestamp(String columnLabel) throws SQLException {
+ throw new UnsupportedOperationException("Not supported yet.");
+ }
+
+ @Override
+ public InputStream getAsciiStream(String columnLabel) throws SQLException {
+ throw new UnsupportedOperationException("Not supported yet.");
+ }
+
+ @Override
+ public InputStream getUnicodeStream(String columnLabel) throws SQLException {
+ throw new UnsupportedOperationException("Not supported yet.");
+ }
+
+ @Override
+ public InputStream getBinaryStream(String columnLabel) throws SQLException {
+ throw new UnsupportedOperationException("Not supported yet.");
+ }
+
+ @Override
+ public SQLWarning getWarnings() throws SQLException {
+ throw new UnsupportedOperationException("Not supported yet.");
+ }
+
+ @Override
+ public void clearWarnings() throws SQLException {
+ throw new UnsupportedOperationException("Not supported yet.");
+ }
+
+ @Override
+ public String getCursorName() throws SQLException {
+ throw new UnsupportedOperationException("Not supported yet.");
+ }
+
+ @Override
+ public ResultSetMetaData getMetaData() throws SQLException {
+ throw new UnsupportedOperationException("Not supported yet.");
+ }
+
+ @Override
+ public Object getObject(int columnIndex) throws SQLException {
+ throw new UnsupportedOperationException("Not supported yet.");
+ }
+
+ @Override
+ public Object getObject(String columnLabel) throws SQLException {
+ throw new UnsupportedOperationException("Not supported yet.");
+ }
+
+ @Override
+ public int findColumn(String columnLabel) throws SQLException {
+ throw new UnsupportedOperationException("Not supported yet.");
+ }
+
+ @Override
+ public Reader getCharacterStream(int columnIndex) throws SQLException {
+ throw new UnsupportedOperationException("Not supported yet.");
+ }
+
+ @Override
+ public Reader getCharacterStream(String columnLabel) throws SQLException {
+ throw new UnsupportedOperationException("Not supported yet.");
+ }
+
+ @Override
+ public BigDecimal getBigDecimal(int columnIndex) throws SQLException {
+ throw new UnsupportedOperationException("Not supported yet.");
+ }
+
+ @Override
+ public BigDecimal getBigDecimal(String columnLabel) throws SQLException {
+ throw new UnsupportedOperationException("Not supported yet.");
+ }
+
+ @Override
+ public boolean isBeforeFirst() throws SQLException {
+ throw new UnsupportedOperationException("Not supported yet.");
+ }
+
+ @Override
+ public boolean isAfterLast() throws SQLException {
+ throw new UnsupportedOperationException("Not supported yet.");
+ }
+
+ @Override
+ public boolean isFirst() throws SQLException {
+ throw new UnsupportedOperationException("Not supported yet.");
+ }
+
+ @Override
+ public boolean isLast() throws SQLException {
+ throw new UnsupportedOperationException("Not supported yet.");
+ }
+
+ @Override
+ public void beforeFirst() throws SQLException {
+ throw new UnsupportedOperationException("Not supported yet.");
+ }
+
+ @Override
+ public void afterLast() throws SQLException {
+ throw new UnsupportedOperationException("Not supported yet.");
+ }
+
+ @Override
+ public boolean first() throws SQLException {
+ throw new UnsupportedOperationException("Not supported yet.");
+ }
+
+ @Override
+ public boolean last() throws SQLException {
+ throw new UnsupportedOperationException("Not supported yet.");
+ }
+
+ @Override
+ public int getRow() throws SQLException {
+ throw new UnsupportedOperationException("Not supported yet.");
+ }
+
+ @Override
+ public boolean absolute(int row) throws SQLException {
+ throw new UnsupportedOperationException("Not supported yet.");
+ }
+
+ @Override
+ public boolean relative(int rows) throws SQLException {
+ throw new UnsupportedOperationException("Not supported yet.");
+ }
+
+ @Override
+ public boolean previous() throws SQLException {
+ throw new UnsupportedOperationException("Not supported yet.");
+ }
+
+ @Override
+ public void setFetchDirection(int direction) throws SQLException {
+ throw new UnsupportedOperationException("Not supported yet.");
+ }
+
+ @Override
+ public int getFetchDirection() throws SQLException {
+ throw new UnsupportedOperationException("Not supported yet.");
+ }
+
+ @Override
+ public void setFetchSize(int rows) throws SQLException {
+ throw new UnsupportedOperationException("Not supported yet.");
+ }
+
+ @Override
+ public int getFetchSize() throws SQLException {
+ throw new UnsupportedOperationException("Not supported yet.");
+ }
+
+ @Override
+ public int getType() throws SQLException {
+ throw new UnsupportedOperationException("Not supported yet.");
+ }
+
+ @Override
+ public int getConcurrency() throws SQLException {
+ throw new UnsupportedOperationException("Not supported yet.");
+ }
+
+ @Override
+ public boolean rowUpdated() throws SQLException {
+ throw new UnsupportedOperationException("Not supported yet.");
+ }
+
+ @Override
+ public boolean rowInserted() throws SQLException {
+ throw new UnsupportedOperationException("Not supported yet.");
+ }
+
+ @Override
+ public boolean rowDeleted() throws SQLException {
+ throw new UnsupportedOperationException("Not supported yet.");
+ }
+
+ @Override
+ public void updateNull(int columnIndex) throws SQLException {
+ throw new UnsupportedOperationException("Not supported yet.");
+ }
+
+ @Override
+ public void updateBoolean(int columnIndex, boolean x) throws SQLException {
+ throw new UnsupportedOperationException("Not supported yet.");
+ }
+
+ @Override
+ public void updateByte(int columnIndex, byte x) throws SQLException {
+ throw new UnsupportedOperationException("Not supported yet.");
+ }
+
+ @Override
+ public void updateShort(int columnIndex, short x) throws SQLException {
+ throw new UnsupportedOperationException("Not supported yet.");
+ }
+
+ @Override
+ public void updateInt(int columnIndex, int x) throws SQLException {
+ throw new UnsupportedOperationException("Not supported yet.");
+ }
+
+ @Override
+ public void updateLong(int columnIndex, long x) throws SQLException {
+ throw new UnsupportedOperationException("Not supported yet.");
+ }
+
+ @Override
+ public void updateFloat(int columnIndex, float x) throws SQLException {
+ throw new UnsupportedOperationException("Not supported yet.");
+ }
+
+ @Override
+ public void updateDouble(int columnIndex, double x) throws SQLException {
+ throw new UnsupportedOperationException("Not supported yet.");
+ }
+
+ @Override
+ public void updateBigDecimal(int columnIndex, BigDecimal x) throws SQLException {
+ throw new UnsupportedOperationException("Not supported yet.");
+ }
+
+ @Override
+ public void updateString(int columnIndex, String x) throws SQLException {
+ throw new UnsupportedOperationException("Not supported yet.");
+ }
+
+ @Override
+ public void updateBytes(int columnIndex, byte[] x) throws SQLException {
+ throw new UnsupportedOperationException("Not supported yet.");
+ }
+
+ @Override
+ public void updateDate(int columnIndex, Date x) throws SQLException {
+ throw new UnsupportedOperationException("Not supported yet.");
+ }
+
+ @Override
+ public void updateTime(int columnIndex, Time x) throws SQLException {
+ throw new UnsupportedOperationException("Not supported yet.");
+ }
+
+ @Override
+ public void updateTimestamp(int columnIndex, Timestamp x) throws SQLException {
+ throw new UnsupportedOperationException("Not supported yet.");
+ }
+
+ @Override
+ public void updateAsciiStream(int columnIndex, InputStream x, int length) throws SQLException {
+ throw new UnsupportedOperationException("Not supported yet.");
+ }
+
+ @Override
+ public void updateBinaryStream(int columnIndex, InputStream x, int length) throws SQLException {
+ throw new UnsupportedOperationException("Not supported yet.");
+ }
+
+ @Override
+ public void updateCharacterStream(int columnIndex, Reader x, int length) throws SQLException {
+ throw new UnsupportedOperationException("Not supported yet.");
+ }
+
+ @Override
+ public void updateObject(int columnIndex, Object x, int scaleOrLength) throws SQLException {
+ throw new UnsupportedOperationException("Not supported yet.");
+ }
+
+ @Override
+ public void updateObject(int columnIndex, Object x) throws SQLException {
+ throw new UnsupportedOperationException("Not supported yet.");
+ }
+
+ @Override
+ public void updateNull(String columnLabel) throws SQLException {
+ throw new UnsupportedOperationException("Not supported yet.");
+ }
+
+ @Override
+ public void updateBoolean(String columnLabel, boolean x) throws SQLException {
+ throw new UnsupportedOperationException("Not supported yet.");
+ }
+
+ @Override
+ public void updateByte(String columnLabel, byte x) throws SQLException {
+ throw new UnsupportedOperationException("Not supported yet.");
+ }
+
+ @Override
+ public void updateShort(String columnLabel, short x) throws SQLException {
+ throw new UnsupportedOperationException("Not supported yet.");
+ }
+
+ @Override
+ public void updateInt(String columnLabel, int x) throws SQLException {
+ throw new UnsupportedOperationException("Not supported yet.");
+ }
+
+ @Override
+ public void updateLong(String columnLabel, long x) throws SQLException {
+ throw new UnsupportedOperationException("Not supported yet.");
+ }
+
+ @Override
+ public void updateFloat(String columnLabel, float x) throws SQLException {
+ throw new UnsupportedOperationException("Not supported yet.");
+ }
+
+ @Override
+ public void updateDouble(String columnLabel, double x) throws SQLException {
+ throw new UnsupportedOperationException("Not supported yet.");
+ }
+
+ @Override
+ public void updateBigDecimal(String columnLabel, BigDecimal x) throws SQLException {
+ throw new UnsupportedOperationException("Not supported yet.");
+ }
+
+ @Override
+ public void updateString(String columnLabel, String x) throws SQLException {
+ throw new UnsupportedOperationException("Not supported yet.");
+ }
+
+ @Override
+ public void updateBytes(String columnLabel, byte[] x) throws SQLException {
+ throw new UnsupportedOperationException("Not supported yet.");
+ }
+
+ @Override
+ public void updateDate(String columnLabel, Date x) throws SQLException {
+ throw new UnsupportedOperationException("Not supported yet.");
+ }
+
+ @Override
+ public void updateTime(String columnLabel, Time x) throws SQLException {
+ throw new UnsupportedOperationException("Not supported yet.");
+ }
+
+ @Override
+ public void updateTimestamp(String columnLabel, Timestamp x) throws SQLException {
+ throw new UnsupportedOperationException("Not supported yet.");
+ }
+
+ @Override
+ public void updateAsciiStream(String columnLabel, InputStream x, int length) throws SQLException {
+ throw new UnsupportedOperationException("Not supported yet.");
+ }
+
+ @Override
+ public void updateBinaryStream(String columnLabel, InputStream x, int length) throws SQLException {
+ throw new UnsupportedOperationException("Not supported yet.");
+ }
+
+ @Override
+ public void updateCharacterStream(String columnLabel, Reader reader, int length) throws SQLException {
+ throw new UnsupportedOperationException("Not supported yet.");
+ }
+
+ @Override
+ public void updateObject(String columnLabel, Object x, int scaleOrLength) throws SQLException {
+ throw new UnsupportedOperationException("Not supported yet.");
+ }
+
+ @Override
+ public void updateObject(String columnLabel, Object x) throws SQLException {
+ throw new UnsupportedOperationException("Not supported yet.");
+ }
+
+ @Override
+ public void insertRow() throws SQLException {
+ throw new UnsupportedOperationException("Not supported yet.");
+ }
+
+ @Override
+ public void updateRow() throws SQLException {
+ throw new UnsupportedOperationException("Not supported yet.");
+ }
+
+ @Override
+ public void deleteRow() throws SQLException {
+ throw new UnsupportedOperationException("Not supported yet.");
+ }
+
+ @Override
+ public void refreshRow() throws SQLException {
+ throw new UnsupportedOperationException("Not supported yet.");
+ }
+
+ @Override
+ public void cancelRowUpdates() throws SQLException {
+ throw new UnsupportedOperationException("Not supported yet.");
+ }
+
+ @Override
+ public void moveToInsertRow() throws SQLException {
+ throw new UnsupportedOperationException("Not supported yet.");
+ }
+
+ @Override
+ public void moveToCurrentRow() throws SQLException {
+ throw new UnsupportedOperationException("Not supported yet.");
+ }
+
+ @Override
+ public Statement getStatement() throws SQLException {
+ throw new UnsupportedOperationException("Not supported yet.");
+ }
+
+ @Override
+ public Object getObject(int columnIndex, Map<String, Class<?>> map) throws SQLException {
+ throw new UnsupportedOperationException("Not supported yet.");
+ }
+
+ @Override
+ public Ref getRef(int columnIndex) throws SQLException {
+ throw new UnsupportedOperationException("Not supported yet.");
+ }
+
+ @Override
+ public Blob getBlob(int columnIndex) throws SQLException {
+ throw new UnsupportedOperationException("Not supported yet.");
+ }
+
+ @Override
+ public Clob getClob(int columnIndex) throws SQLException {
+ throw new UnsupportedOperationException("Not supported yet.");
+ }
+
+ @Override
+ public Array getArray(int columnIndex) throws SQLException {
+ throw new UnsupportedOperationException("Not supported yet.");
+ }
+
+ @Override
+ public Object getObject(String columnLabel, Map<String, Class<?>> map) throws SQLException {
+ throw new UnsupportedOperationException("Not supported yet.");
+ }
+
+ @Override
+ public Ref getRef(String columnLabel) throws SQLException {
+ throw new UnsupportedOperationException("Not supported yet.");
+ }
+
+ @Override
+ public Blob getBlob(String columnLabel) throws SQLException {
+ throw new UnsupportedOperationException("Not supported yet.");
+ }
+
+ @Override
+ public Clob getClob(String columnLabel) throws SQLException {
+ throw new UnsupportedOperationException("Not supported yet.");
+ }
+
+ @Override
+ public Array getArray(String columnLabel) throws SQLException {
+ throw new UnsupportedOperationException("Not supported yet.");
+ }
+
+ @Override
+ public Date getDate(int columnIndex, Calendar cal) throws SQLException {
+ throw new UnsupportedOperationException("Not supported yet.");
+ }
+
+ @Override
+ public Date getDate(String columnLabel, Calendar cal) throws SQLException {
+ throw new UnsupportedOperationException("Not supported yet.");
+ }
+
+ @Override
+ public Time getTime(int columnIndex, Calendar cal) throws SQLException {
+ throw new UnsupportedOperationException("Not supported yet.");
+ }
+
+ @Override
+ public Time getTime(String columnLabel, Calendar cal) throws SQLException {
+ throw new UnsupportedOperationException("Not supported yet.");
+ }
+
+ @Override
+ public Timestamp getTimestamp(int columnIndex, Calendar cal) throws SQLException {
+ throw new UnsupportedOperationException("Not supported yet.");
+ }
+
+ @Override
+ public Timestamp getTimestamp(String columnLabel, Calendar cal) throws SQLException {
+ throw new UnsupportedOperationException("Not supported yet.");
+ }
+
+ @Override
+ public URL getURL(int columnIndex) throws SQLException {
+ throw new UnsupportedOperationException("Not supported yet.");
+ }
+
+ @Override
+ public URL getURL(String columnLabel) throws SQLException {
+ throw new UnsupportedOperationException("Not supported yet.");
+ }
+
+ @Override
+ public void updateRef(int columnIndex, Ref x) throws SQLException {
+ throw new UnsupportedOperationException("Not supported yet.");
+ }
+
+ @Override
+ public void updateRef(String columnLabel, Ref x) throws SQLException {
+ throw new UnsupportedOperationException("Not supported yet.");
+ }
+
+ @Override
+ public void updateBlob(int columnIndex, Blob x) throws SQLException {
+ throw new UnsupportedOperationException("Not supported yet.");
+ }
+
+ @Override
+ public void updateBlob(String columnLabel, Blob x) throws SQLException {
+ throw new UnsupportedOperationException("Not supported yet.");
+ }
+
+ @Override
+ public void updateClob(int columnIndex, Clob x) throws SQLException {
+ throw new UnsupportedOperationException("Not supported yet.");
+ }
+
+ @Override
+ public void updateClob(String columnLabel, Clob x) throws SQLException {
+ throw new UnsupportedOperationException("Not supported yet.");
+ }
+
+ @Override
+ public void updateArray(int columnIndex, Array x) throws SQLException {
+ throw new UnsupportedOperationException("Not supported yet.");
+ }
+
+ @Override
+ public void updateArray(String columnLabel, Array x) throws SQLException {
+ throw new UnsupportedOperationException("Not supported yet.");
+ }
+
+ @Override
+ public RowId getRowId(int columnIndex) throws SQLException {
+ throw new UnsupportedOperationException("Not supported yet.");
+ }
+
+ @Override
+ public RowId getRowId(String columnLabel) throws SQLException {
+ throw new UnsupportedOperationException("Not supported yet.");
+ }
+
+ @Override
+ public void updateRowId(int columnIndex, RowId x) throws SQLException {
+ throw new UnsupportedOperationException("Not supported yet.");
+ }
+
+ @Override
+ public void updateRowId(String columnLabel, RowId x) throws SQLException {
+ throw new UnsupportedOperationException("Not supported yet.");
+ }
+
+ @Override
+ public int getHoldability() throws SQLException {
+ throw new UnsupportedOperationException("Not supported yet.");
+ }
+
+ @Override
+ public boolean isClosed() throws SQLException {
+ throw new UnsupportedOperationException("Not supported yet.");
+ }
+
+ @Override
+ public void updateNString(int columnIndex, String nString) throws SQLException {
+ throw new UnsupportedOperationException("Not supported yet.");
+ }
+
+ @Override
+ public void updateNString(String columnLabel, String nString) throws SQLException {
+ throw new UnsupportedOperationException("Not supported yet.");
+ }
+
+ @Override
+ public void updateNClob(int columnIndex, NClob nClob) throws SQLException {
+ throw new UnsupportedOperationException("Not supported yet.");
+ }
+
+ @Override
+ public void updateNClob(String columnLabel, NClob nClob) throws SQLException {
+ throw new UnsupportedOperationException("Not supported yet.");
+ }
+
+ @Override
+ public NClob getNClob(int columnIndex) throws SQLException {
+ throw new UnsupportedOperationException("Not supported yet.");
+ }
+
+ @Override
+ public NClob getNClob(String columnLabel) throws SQLException {
+ throw new UnsupportedOperationException("Not supported yet.");
+ }
+
+ @Override
+ public SQLXML getSQLXML(int columnIndex) throws SQLException {
+ throw new UnsupportedOperationException("Not supported yet.");
+ }
+
+ @Override
+ public SQLXML getSQLXML(String columnLabel) throws SQLException {
+ throw new UnsupportedOperationException("Not supported yet.");
+ }
+
+ @Override
+ public void updateSQLXML(int columnIndex, SQLXML xmlObject) throws SQLException {
+ throw new UnsupportedOperationException("Not supported yet.");
+ }
+
+ @Override
+ public void updateSQLXML(String columnLabel, SQLXML xmlObject) throws SQLException {
+ throw new UnsupportedOperationException("Not supported yet.");
+ }
+
+ @Override
+ public String getNString(int columnIndex) throws SQLException {
+ throw new UnsupportedOperationException("Not supported yet.");
+ }
+
+ @Override
+ public String getNString(String columnLabel) throws SQLException {
+ throw new UnsupportedOperationException("Not supported yet.");
+ }
+
+ @Override
+ public Reader getNCharacterStream(int columnIndex) throws SQLException {
+ throw new UnsupportedOperationException("Not supported yet.");
+ }
+
+ @Override
+ public Reader getNCharacterStream(String columnLabel) throws SQLException {
+ throw new UnsupportedOperationException("Not supported yet.");
+ }
+
+ @Override
+ public void updateNCharacterStream(int columnIndex, Reader x, long length) throws SQLException {
+ throw new UnsupportedOperationException("Not supported yet.");
+ }
+
+ @Override
+ public void updateNCharacterStream(String columnLabel, Reader reader, long length) throws SQLException {
+ throw new UnsupportedOperationException("Not supported yet.");
+ }
+
+ @Override
+ public void updateAsciiStream(int columnIndex, InputStream x, long length) throws SQLException {
+ throw new UnsupportedOperationException("Not supported yet.");
+ }
+
+ @Override
+ public void updateBinaryStream(int columnIndex, InputStream x, long length) throws SQLException {
+ throw new UnsupportedOperationException("Not supported yet.");
+ }
+
+ @Override
+ public void updateCharacterStream(int columnIndex, Reader x, long length) throws SQLException {
+ throw new UnsupportedOperationException("Not supported yet.");
+ }
+
+ @Override
+ public void updateAsciiStream(String columnLabel, InputStream x, long length) throws SQLException {
+ throw new UnsupportedOperationException("Not supported yet.");
+ }
+
+ @Override
+ public void updateBinaryStream(String columnLabel, InputStream x, long length) throws SQLException {
+ throw new UnsupportedOperationException("Not supported yet.");
+ }
+
+ @Override
+ public void updateCharacterStream(String columnLabel, Reader reader, long length) throws SQLException {
+ throw new UnsupportedOperationException("Not supported yet.");
+ }
+
+ @Override
+ public void updateBlob(int columnIndex, InputStream inputStream, long length) throws SQLException {
+ throw new UnsupportedOperationException("Not supported yet.");
+ }
+
+ @Override
+ public void updateBlob(String columnLabel, InputStream inputStream, long length) throws SQLException {
+ throw new UnsupportedOperationException("Not supported yet.");
+ }
+
+ @Override
+ public void updateClob(int columnIndex, Reader reader, long length) throws SQLException {
+ throw new UnsupportedOperationException("Not supported yet.");
+ }
+
+ @Override
+ public void updateClob(String columnLabel, Reader reader, long length) throws SQLException {
+ throw new UnsupportedOperationException("Not supported yet.");
+ }
+
+ @Override
+ public void updateNClob(int columnIndex, Reader reader, long length) throws SQLException {
+ throw new UnsupportedOperationException("Not supported yet.");
+ }
+
+ @Override
+ public void updateNClob(String columnLabel, Reader reader, long length) throws SQLException {
+ throw new UnsupportedOperationException("Not supported yet.");
+ }
+
+ @Override
+ public void updateNCharacterStream(int columnIndex, Reader x) throws SQLException {
+ throw new UnsupportedOperationException("Not supported yet.");
+ }
+
+ @Override
+ public void updateNCharacterStream(String columnLabel, Reader reader) throws SQLException {
+ throw new UnsupportedOperationException("Not supported yet.");
+ }
+
+ @Override
+ public void updateAsciiStream(int columnIndex, InputStream x) throws SQLException {
+ throw new UnsupportedOperationException("Not supported yet.");
+ }
+
+ @Override
+ public void updateBinaryStream(int columnIndex, InputStream x) throws SQLException {
+ throw new UnsupportedOperationException("Not supported yet.");
+ }
+
+ @Override
+ public void updateCharacterStream(int columnIndex, Reader x) throws SQLException {
+ throw new UnsupportedOperationException("Not supported yet.");
+ }
+
+ @Override
+ public void updateAsciiStream(String columnLabel, InputStream x) throws SQLException {
+ throw new UnsupportedOperationException("Not supported yet.");
+ }
+
+ @Override
+ public void updateBinaryStream(String columnLabel, InputStream x) throws SQLException {
+ throw new UnsupportedOperationException("Not supported yet.");
+ }
+
+ @Override
+ public void updateCharacterStream(String columnLabel, Reader reader) throws SQLException {
+ throw new UnsupportedOperationException("Not supported yet.");
+ }
+
+ @Override
+ public void updateBlob(int columnIndex, InputStream inputStream) throws SQLException {
+ throw new UnsupportedOperationException("Not supported yet.");
+ }
+
+ @Override
+ public void updateBlob(String columnLabel, InputStream inputStream) throws SQLException {
+ throw new UnsupportedOperationException("Not supported yet.");
+ }
+
+ @Override
+ public void updateClob(int columnIndex, Reader reader) throws SQLException {
+ throw new UnsupportedOperationException("Not supported yet.");
+ }
+
+ @Override
+ public void updateClob(String columnLabel, Reader reader) throws SQLException {
+ throw new UnsupportedOperationException("Not supported yet.");
+ }
+
+ @Override
+ public void updateNClob(int columnIndex, Reader reader) throws SQLException {
+ throw new UnsupportedOperationException("Not supported yet.");
+ }
+
+ @Override
+ public void updateNClob(String columnLabel, Reader reader) throws SQLException {
+ throw new UnsupportedOperationException("Not supported yet.");
+ }
+
+ @Override
+ public <T> T getObject(int columnIndex, Class<T> type) throws SQLException {
+ throw new UnsupportedOperationException("Not supported yet.");
+ }
+
+ @Override
+ public <T> T getObject(String columnLabel, Class<T> type) throws SQLException {
+ throw new UnsupportedOperationException("Not supported yet.");
+ }
+
+ @Override
+ public <T> T unwrap(Class<T> iface) throws SQLException {
+ throw new UnsupportedOperationException("Not supported yet.");
+ }
+
+ @Override
+ public boolean isWrapperFor(Class<?> iface) throws SQLException {
+ throw new UnsupportedOperationException("Not supported yet.");
+ }
+
+}
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/jdk/test/javax/xml/jaxp/testng/parse/EntityCharacterEventOrder.java Wed Jul 05 20:06:31 2017 +0200
@@ -0,0 +1,116 @@
+package parse;
+
+import java.io.IOException;
+import java.io.StringReader;
+import java.nio.charset.Charset;
+import java.util.ArrayList;
+import java.util.List;
+import static org.testng.Assert.assertEquals;
+import org.testng.annotations.Test;
+import org.xml.sax.Attributes;
+import org.xml.sax.InputSource;
+import org.xml.sax.SAXException;
+import org.xml.sax.XMLReader;
+import org.xml.sax.ext.DefaultHandler2;
+import org.xml.sax.helpers.XMLReaderFactory;
+
+/**
+ * JDK-6770436: Entity callback order differs between Java1.5 and Java1.6
+ * https://bugs.openjdk.java.net/browse/JDK-6770436
+ *
+ */
+
+public class EntityCharacterEventOrder {
+
+ protected final static String xmlEncoding = "ISO-8859-15";
+ protected static Charset xmlEncodingCharset = null;
+
+ String _xml;
+ static {
+ xmlEncodingCharset = Charset.forName(xmlEncoding);
+ }
+ /**
+ public static void main(String[] args) {
+ TestRunner.run(JDK6770436Test.class);
+ }
+*/
+ @Test
+ public void entityCallbackOrderJava() throws SAXException, IOException {
+ final String input = "<element> & some more text</element>";
+
+ final MockContentHandler handler = new MockContentHandler();
+ final XMLReader xmlReader = XMLReaderFactory.createXMLReader();
+
+ xmlReader.setContentHandler(handler);
+ xmlReader.setProperty("http://xml.org/sax/properties/lexical-handler", handler);
+
+ xmlReader.parse(new InputSource(new StringReader(input)));
+
+ final List<String> events = handler.getEvents();
+ printEvents(events);
+ assertCallbackOrder(events); //regression from JDK5
+ }
+
+ private void assertCallbackOrder(final List<String> events) {
+ assertEquals("startDocument", events.get(0));
+ assertEquals("startElement 'element'", events.get(1));
+ assertEquals("characters ' '", events.get(2));
+ assertEquals("startEntity 'amp'", events.get(3));
+ assertEquals("characters '&'", events.get(4));
+ assertEquals("endEntity 'amp'", events.get(5));
+ assertEquals("characters ' some more text'", events.get(6));
+ assertEquals("endElement 'element'", events.get(7));
+ assertEquals("endDocument", events.get(8));
+ }
+
+ private void printEvents(final List<String> events) {
+ events.stream().forEach((e) -> {
+ System.out.println(e);
+ });
+ }
+
+ private class MockContentHandler extends DefaultHandler2 {
+
+ private List<String> events;
+
+ public List<String> getEvents() {
+ return events;
+ }
+
+ @Override
+ public void startDocument() throws SAXException {
+ events = new ArrayList<String>();
+ events.add("startDocument");
+ }
+
+ @Override
+ public void characters(char[] ch, int start, int length) throws SAXException {
+ events.add("characters '" + new String(ch, start, length) + "'");
+ }
+
+ @Override
+ public void startElement(String uri, String localName, String name, Attributes atts) throws SAXException {
+ events.add("startElement '" + name + "'");
+ }
+
+ @Override
+ public void endElement(String uri, String localName, String name) throws SAXException {
+ events.add("endElement '" + name + "'");
+ }
+
+ @Override
+ public void endDocument() throws SAXException {
+ events.add("endDocument");
+ }
+
+ @Override
+ public void startEntity(String name) throws SAXException {
+ events.add("startEntity '" + name + "'");
+ }
+
+ @Override
+ public void endEntity(String name) throws SAXException {
+ events.add("endEntity '" + name + "'");
+ }
+ }
+}
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/jdk/test/jdk/net/Sockets/SupportedOptions.java Wed Jul 05 20:06:31 2017 +0200
@@ -0,0 +1,48 @@
+/*
+ * Copyright (c) 2014, Oracle and/or its affiliates. All rights reserved.
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * This code is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU General Public License version 2 only, as
+ * published by the Free Software Foundation.
+ *
+ * This code is distributed in the hope that it will be useful, but WITHOUT
+ * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
+ * version 2 for more details (a copy is included in the LICENSE file that
+ * accompanied this code).
+ *
+ * You should have received a copy of the GNU General Public License version
+ * 2 along with this work; if not, write to the Free Software Foundation,
+ * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
+ *
+ * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
+ * or visit www.oracle.com if you need additional information or have any
+ * questions.
+ */
+
+/*
+ * @test
+ * @bug 8062744
+ * @run main SupportedOptions
+ */
+
+import java.net.*;
+import java.io.IOException;
+import jdk.net.*;
+
+public class SupportedOptions {
+
+ public static void main(String[] args) throws Exception {
+ if (!Sockets.supportedOptions(ServerSocket.class)
+ .contains(StandardSocketOptions.IP_TOS)) {
+ throw new RuntimeException("Test failed");
+ }
+ // Now set the option
+ ServerSocket ss = new ServerSocket();
+ if (!ss.supportedOptions().contains(StandardSocketOptions.IP_TOS)) {
+ throw new RuntimeException("Test failed");
+ }
+ Sockets.setOption(ss, java.net.StandardSocketOptions.IP_TOS, 128);
+ }
+}
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/jdk/test/lib/testlibrary/jdk/testlibrary/LockFreeLogManager.java Wed Jul 05 20:06:31 2017 +0200
@@ -0,0 +1,90 @@
+/*
+ * Copyright (c) 2014, Oracle and/or its affiliates. All rights reserved.
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * This code is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU General Public License version 2 only, as
+ * published by the Free Software Foundation.
+ *
+ * This code is distributed in the hope that it will be useful, but WITHOUT
+ * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
+ * version 2 for more details (a copy is included in the LICENSE file that
+ * accompanied this code).
+ *
+ * You should have received a copy of the GNU General Public License version
+ * 2 along with this work; if not, write to the Free Software Foundation,
+ * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
+ *
+ * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
+ * or visit www.oracle.com if you need additional information or have any
+ * questions.
+ */
+
+package jdk.testlibrary;
+
+import java.util.Collection;
+import java.util.Formatter;
+import java.util.Map;
+import java.util.concurrent.ConcurrentHashMap;
+import java.util.concurrent.ConcurrentLinkedQueue;
+import java.util.concurrent.atomic.AtomicInteger;
+import java.util.stream.Collectors;
+
+/**
+ * A log manager designed specifically to allow collecting ordered log messages
+ * in a multi-threaded environment without involving any kind of locking.
+ * <p>
+ * It is particularly useful in situations when one needs to assert various
+ * details about the tested thread state or the locks it hold while also wanting
+ * to produce diagnostic log messages.
+ * <p>
+ * The log manager does not provide any guarantees about the completness of the
+ * logs written from different threads - it is up to the caller to make sure
+ * {@code toString()} method is called only when all the activity has ceased
+ * and the per-thread logs contain all the necessary data.
+ *
+ * @author Jaroslav Bachorik
+ **/
+public class LockFreeLogManager {
+ private final AtomicInteger logCntr = new AtomicInteger(0);
+ private final Collection<Map<Integer, String>> allRecords = new ConcurrentLinkedQueue<>();
+ private final ThreadLocal<Map<Integer, String>> records = new ThreadLocal<Map<Integer, String>>() {
+ @Override
+ protected Map<Integer, String> initialValue() {
+ Map<Integer, String> m = new ConcurrentHashMap<>();
+ allRecords.add(m);
+ return m;
+ }
+
+ };
+
+ /**
+ * Log a message
+ * @param format Message format
+ * @param params Message parameters
+ */
+ public void log(String format, Object ... params) {
+ int id = logCntr.getAndIncrement();
+ try (Formatter formatter = new Formatter()) {
+ records.get().put(id, formatter.format(format, params).toString());
+ }
+ }
+
+ /**
+ * Will generate an aggregated log of chronologically ordered messages.
+ * <p>
+ * Make sure that you call this method only when all the related threads
+ * have finished; otherwise you might get incomplete data.
+ *
+ * @return An aggregated log of chronologically ordered messages
+ */
+ @Override
+ public String toString() {
+ return allRecords.stream()
+ .flatMap(m->m.entrySet().stream())
+ .sorted((l, r)->l.getKey().compareTo(r.getKey()))
+ .map(e->e.getValue())
+ .collect(Collectors.joining());
+ }
+}
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/jdk/test/sun/security/tools/jarsigner/DefaultSigalg.java Wed Jul 05 20:06:31 2017 +0200
@@ -0,0 +1,106 @@
+/*
+ * Copyright (c) 2014, Oracle and/or its affiliates. All rights reserved.
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * This code is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU General Public License version 2 only, as
+ * published by the Free Software Foundation.
+ *
+ * This code is distributed in the hope that it will be useful, but WITHOUT
+ * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
+ * version 2 for more details (a copy is included in the LICENSE file that
+ * accompanied this code).
+ *
+ * You should have received a copy of the GNU General Public License version
+ * 2 along with this work; if not, write to the Free Software Foundation,
+ * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
+ *
+ * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
+ * or visit www.oracle.com if you need additional information or have any
+ * questions.
+ */
+
+/**
+ * @test
+ * @bug 8057810
+ * @summary New defaults for DSA keys in jarsigner and keytool
+ */
+
+import sun.security.pkcs.PKCS7;
+import sun.security.util.KeyUtil;
+
+import java.io.FileInputStream;
+import java.io.InputStream;
+import java.nio.file.Files;
+import java.nio.file.Paths;
+import java.security.KeyStore;
+import java.security.cert.X509Certificate;
+import java.util.jar.JarFile;
+
+public class DefaultSigalg {
+
+ public static void main(String[] args) throws Exception {
+
+ // Three test cases
+ String[] keyalgs = {"DSA", "RSA", "EC"};
+ // Expected default keytool sigalg
+ String[] sigalgs = {"SHA256withDSA", "SHA256withRSA", "SHA256withECDSA"};
+ // Expected keysizes
+ int[] keysizes = {2048, 2048, 256};
+ // Expected jarsigner digest alg used in signature
+ String[] digestalgs = {"SHA-256", "SHA-256", "SHA-256"};
+
+ // Create a jar file
+ sun.tools.jar.Main m =
+ new sun.tools.jar.Main(System.out, System.err, "jar");
+ Files.write(Paths.get("x"), new byte[10]);
+ if (!m.run("cvf a.jar x".split(" "))) {
+ throw new Exception("jar creation failed");
+ }
+
+ // Generate keypairs and sign the jar
+ Files.deleteIfExists(Paths.get("jks"));
+ for (String keyalg: keyalgs) {
+ sun.security.tools.keytool.Main.main(
+ ("-keystore jks -storepass changeit -keypass changeit " +
+ "-dname CN=A -alias " + keyalg + " -genkeypair " +
+ "-keyalg " + keyalg).split(" "));
+ sun.security.tools.jarsigner.Main.main(
+ ("-keystore jks -storepass changeit a.jar " + keyalg).split(" "));
+ }
+
+ // Check result
+ KeyStore ks = KeyStore.getInstance("JKS");
+ try (FileInputStream jks = new FileInputStream("jks");
+ JarFile jf = new JarFile("a.jar")) {
+ ks.load(jks, null);
+ for (int i = 0; i<keyalgs.length; i++) {
+ String keyalg = keyalgs[i];
+ // keytool
+ X509Certificate c = (X509Certificate) ks.getCertificate(keyalg);
+ String sigalg = c.getSigAlgName();
+ if (!sigalg.equals(sigalgs[i])) {
+ throw new Exception(
+ "keytool sigalg for " + keyalg + " is " + sigalg);
+ }
+ int keysize = KeyUtil.getKeySize(c.getPublicKey());
+ if (keysize != keysizes[i]) {
+ throw new Exception(
+ "keytool keysize for " + keyalg + " is " + keysize);
+ }
+ // jarsigner
+ String bk = "META-INF/" + keyalg + "." + keyalg;
+ try (InputStream is = jf.getInputStream(jf.getEntry(bk))) {
+ String digestalg = new PKCS7(is).getSignerInfos()[0]
+ .getDigestAlgorithmId().toString();
+ if (!digestalg.equals(digestalgs[i])) {
+ throw new Exception(
+ "jarsigner digest of sig for " + keyalg
+ + " is " + digestalg);
+ }
+ }
+ }
+ }
+ }
+}
--- a/jdk/test/sun/security/tools/keytool/KeyToolTest.java Thu Nov 06 10:11:35 2014 -0800
+++ b/jdk/test/sun/security/tools/keytool/KeyToolTest.java Wed Jul 05 20:06:31 2017 +0200
@@ -170,6 +170,13 @@
*/
void testOK(String input, String cmd) throws Exception {
try {
+ // Workaround for "8057810: Make SHA256withDSA the default
+ // jarsigner and keytool algorithm for DSA keys". Unfortunately
+ // SunPKCS11-NSS does not support SHA256withDSA yet.
+ if (cmd.contains("p11-nss.txt") && cmd.contains("-genkey")
+ && !cmd.contains("-keyalg")) {
+ cmd += " -sigalg SHA1withDSA -keysize 1024";
+ }
test(input, cmd);
} catch(Exception e) {
afterFail(input, cmd, "OK");
@@ -245,6 +252,9 @@
* Helper method, print some output after a test does not do as expected
*/
void afterFail(String input, String cmd, String should) {
+ if (cmd.contains("p11-nss.txt")) {
+ cmd = "-J-Dnss.lib=" + System.getProperty("nss.lib") + " " + cmd;
+ }
System.err.println("\nTest fails for the command ---\n" +
"keytool " + cmd + "\nOr its debug version ---\n" +
"keytool -debug " + cmd);
@@ -799,7 +809,7 @@
remove("x.jks.p1.cert");
remove("csr1");
// PrivateKeyEntry can do certreq
- testOK("", "-keystore x.jks -storepass changeit -keypass changeit -genkeypair -dname CN=olala");
+ testOK("", "-keystore x.jks -storepass changeit -keypass changeit -genkeypair -dname CN=olala -keysize 1024");
testOK("", "-keystore x.jks -storepass changeit -certreq -file csr1 -alias mykey");
testOK("", "-keystore x.jks -storepass changeit -certreq -file csr1");
testOK("", "-keystore x.jks -storepass changeit -certreq -file csr1 -sigalg SHA1withDSA");
--- a/jdk/test/sun/security/tools/keytool/autotest.sh Thu Nov 06 10:11:35 2014 -0800
+++ b/jdk/test/sun/security/tools/keytool/autotest.sh Wed Jul 05 20:06:31 2017 +0200
@@ -118,13 +118,4 @@
KeyToolTest
status=$?
-rm -f p11-nss.txt
-rm -f cert8.db
-rm -f key3.db
-rm -f secmod.db
-
-rm HumanInputStream*.class
-rm KeyToolTest*.class
-rm TestException.class
-
exit $status
--- a/jdk/test/sun/security/tools/keytool/standard.sh Thu Nov 06 10:11:35 2014 -0800
+++ b/jdk/test/sun/security/tools/keytool/standard.sh Wed Jul 05 20:06:31 2017 +0200
@@ -62,9 +62,5 @@
echo | ${TESTJAVA}${FS}bin${FS}java ${TESTVMOPTS} -Dfile KeyToolTest
status=$?
-rm HumanInputStream*.class
-rm KeyToolTest*.class
-rm TestException.class
-
exit $status
--- a/make/Javadoc.gmk Thu Nov 06 10:11:35 2014 -0800
+++ b/make/Javadoc.gmk Wed Jul 05 20:06:31 2017 +0200
@@ -1,4 +1,4 @@
-# Copyright (c) 1997, 2013, Oracle and/or its affiliates. All rights reserved.
+# Copyright (c) 1997, 2014, Oracle and/or its affiliates. All rights reserved.
# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
#
# This code is free software; you can redistribute it and/or modify it
@@ -336,6 +336,14 @@
#################################################################
#
+# Load custom Javadoc rules
+#
+
+$(eval $(call IncludeCustomExtension, , Javadoc.gmk))
+
+#################################################################
+
+#
# Default target is same as docs target, create core api and all others it can
#
--- a/make/Main.gmk Thu Nov 06 10:11:35 2014 -0800
+++ b/make/Main.gmk Wed Jul 05 20:06:31 2017 +0200
@@ -514,7 +514,7 @@
# If the output directory was created by configure and now becomes empty, remove it as well.
dist-clean: clean
($(CD) $(OUTPUT_ROOT) && $(RM) -r *spec.gmk config.* configure-arguments \
- Makefile compare.sh spec.sh tmp javacservers)
+ Makefile compare.sh tmp javacservers)
$(if $(filter $(CONF_NAME),$(notdir $(OUTPUT_ROOT))), \
if test "x`$(LS) $(OUTPUT_ROOT)`" != x; then \
$(ECHO) "Warning: Not removing non-empty configuration directory for '$(CONF_NAME)'" ; \
--- a/modules.xml Thu Nov 06 10:11:35 2014 -0800
+++ b/modules.xml Wed Jul 05 20:06:31 2017 +0200
@@ -792,17 +792,8 @@
<name>javax.management.timer</name>
</export>
<export>
- <name>com.sun.jmx.defaults</name>
- <to>jdk.snmp</to>
- </export>
- <export>
- <name>com.sun.jmx.mbeanserver</name>
- <to>jdk.snmp</to>
- </export>
- <export>
<name>sun.management</name>
<to>jdk.jconsole</to>
- <to>jdk.snmp</to>
</export>
</module>
<module>