This commit is contained in:
David Dehaven 2016-01-21 14:49:02 -08:00
commit 8969d1404a
547 changed files with 12561 additions and 8246 deletions

View File

@ -343,3 +343,4 @@ f242d4332f563648426a1b0fa02d8741beba19ef jdk9-b92
d00ad2d9049ac60815f70bff445e95df85648bd2 jdk-9+98
f9bcdce2df26678c3fe468130b535c0342c69b89 jdk-9+99
4379223f8806626852c46c52d4e7a27a584b406e jdk-9+100
80f67512daa15cf37b4825c1c62a675d524d7c49 jdk-9+101

View File

@ -343,3 +343,4 @@ cf1dc4c035fb84693d4ae5ad818785cb4d1465d1 jdk9-b90
48987460c7d49a29013963ee44d090194396bb61 jdk-9+98
7c0577bea4c65d69c5bef67023a89d2efa4fb2f7 jdk-9+99
c1f30ac14db0eaff398429c04cd9fab92e1b4b2a jdk-9+100
c4d72a1620835b5d657b7b6792c2879367d0154f jdk-9+101

View File

@ -23,6 +23,74 @@
# questions.
#
# Create a function/macro that takes a series of named arguments. The call is
# similar to AC_DEFUN, but the setup of the function looks like this:
# BASIC_DEFUN_NAMED([MYFUNC], [FOO *BAR], [$@], [
# ... do something
# AC_MSG_NOTICE([Value of BAR is ARG_BAR])
# ])
# A star (*) in front of a named argument means that it is required and it's
# presence will be verified. To pass e.g. the first value as a normal indexed
# argument, use [m4_shift($@)] as the third argument instead of [$@]. These
# arguments are referenced in the function by their name prefixed by ARG_, e.g.
# "ARG_FOO".
#
# The generated function can be called like this:
# MYFUNC(FOO: [foo-val], BAR:
# [
# $ECHO hello world
# ])
#
#
# Argument 1: Name of the function to define
# Argument 2: List of legal named arguments, with a * prefix for required arguments
# Argument 3: Argument array to treat as named, typically $@
# Argument 4: The main function body
AC_DEFUN([BASIC_DEFUN_NAMED],
[
AC_DEFUN($1, [
m4_foreach(arg, m4_split($2), [
m4_if(m4_bregexp(arg, [^\*]), -1,
[
m4_set_add(legal_named_args, arg)
],
[
m4_set_add(legal_named_args, m4_substr(arg, 1))
m4_set_add(required_named_args, m4_substr(arg, 1))
]
)
])
m4_foreach([arg], [$3], [
m4_define(arg_name, m4_substr(arg, 0, m4_bregexp(arg, [: ])))
m4_set_contains(legal_named_args, arg_name, [],[AC_MSG_ERROR([Internal error: arg_name is not a valid named argument to [$1]. Valid arguments are 'm4_set_contents(legal_named_args, [ ])'.])])
m4_set_remove(required_named_args, arg_name)
m4_set_remove(legal_named_args, arg_name)
m4_pushdef([ARG_][]arg_name, m4_substr(arg, m4_incr(m4_incr(m4_bregexp(arg, [: ])))))
m4_set_add(defined_args, arg_name)
m4_undefine([arg_name])
])
m4_set_empty(required_named_args, [], [
AC_MSG_ERROR([Internal error: Required named arguments are missing for [$1]. Missing arguments: 'm4_set_contents(required_named_args, [ ])'])
])
m4_foreach([arg], m4_indir([m4_dquote]m4_set_listc([legal_named_args])), [
m4_pushdef([ARG_][]arg, [])
m4_set_add(defined_args, arg)
])
m4_set_delete(legal_named_args)
m4_set_delete(required_named_args)
# Execute function body
$4
m4_foreach([arg], m4_indir([m4_dquote]m4_set_listc([defined_args])), [
m4_popdef([ARG_][]arg)
])
m4_set_delete(defined_args)
])
])
# Test if $1 is a valid argument to $3 (often is $JAVA passed as $3)
# If so, then append $1 to $2 \
# Also set JVM_ARG_OK to true/false depending on outcome.
@ -1122,7 +1190,6 @@ AC_DEFUN_ONCE([BASIC_POST_CONFIG_OUTPUT],
# Move configure.log from current directory to the build output root
if test -e ./configure.log; then
echo found it
$MV -f ./configure.log "$OUTPUT_ROOT/configure.log" 2> /dev/null
fi

View File

@ -425,7 +425,7 @@ AC_DEFUN_ONCE([FLAGS_SETUP_COMPILER_FLAGS_FOR_OPTIMIZATION],
# Add runtime stack smashing and undefined behavior checks.
# Not all versions of gcc support -fstack-protector
STACK_PROTECTOR_CFLAG="-fstack-protector-all"
FLAGS_COMPILER_CHECK_ARGUMENTS([$STACK_PROTECTOR_CFLAG], [], [STACK_PROTECTOR_CFLAG=""])
FLAGS_COMPILER_CHECK_ARGUMENTS(ARGUMENT: [$STACK_PROTECTOR_CFLAG], IF_FALSE: [STACK_PROTECTOR_CFLAG=""])
CFLAGS_DEBUG_OPTIONS="$STACK_PROTECTOR_CFLAG --param ssp-buffer-size=1"
CXXFLAGS_DEBUG_OPTIONS="$STACK_PROTECTOR_CFLAG --param ssp-buffer-size=1"
@ -742,7 +742,7 @@ AC_DEFUN_ONCE([FLAGS_SETUP_COMPILER_FLAGS_FOR_JDK],
-I${JDK_TOPDIR}/src/java.base/share/native/include \
-I${JDK_TOPDIR}/src/java.base/$OPENJDK_TARGET_OS/native/include \
-I${JDK_TOPDIR}/src/java.base/$OPENJDK_TARGET_OS_TYPE/native/include \
-I${JDK_TOPDIR}/src/java.base/share/native/libjava \
-I${JDK_TOPDIR}/src/java.base/share/native/libjava \
-I${JDK_TOPDIR}/src/java.base/$OPENJDK_TARGET_OS_TYPE/native/libjava"
# The shared libraries are compiled using the picflag.
@ -896,17 +896,18 @@ AC_DEFUN_ONCE([FLAGS_SETUP_COMPILER_FLAGS_FOR_JDK],
AC_SUBST(LDFLAGS_TESTEXE)
])
# FLAGS_COMPILER_CHECK_ARGUMENTS([ARGUMENT], [RUN-IF-TRUE],
# [RUN-IF-FALSE])
# FLAGS_COMPILER_CHECK_ARGUMENTS(ARGUMENT: [ARGUMENT], IF_TRUE: [RUN-IF-TRUE],
# IF_FALSE: [RUN-IF-FALSE])
# ------------------------------------------------------------
# Check that the c and c++ compilers support an argument
AC_DEFUN([FLAGS_COMPILER_CHECK_ARGUMENTS],
BASIC_DEFUN_NAMED([FLAGS_COMPILER_CHECK_ARGUMENTS],
[*ARGUMENT IF_TRUE IF_FALSE], [$@],
[
AC_MSG_CHECKING([if compiler supports "$1"])
AC_MSG_CHECKING([if compiler supports "ARG_ARGUMENT"])
supports=yes
saved_cflags="$CFLAGS"
CFLAGS="$CFLAGS $1"
CFLAGS="$CFLAGS ARG_ARGUMENT"
AC_LANG_PUSH([C])
AC_COMPILE_IFELSE([AC_LANG_SOURCE([[int i;]])], [],
[supports=no])
@ -914,7 +915,7 @@ AC_DEFUN([FLAGS_COMPILER_CHECK_ARGUMENTS],
CFLAGS="$saved_cflags"
saved_cxxflags="$CXXFLAGS"
CXXFLAGS="$CXXFLAG $1"
CXXFLAGS="$CXXFLAG ARG_ARGUMENT"
AC_LANG_PUSH([C++])
AC_COMPILE_IFELSE([AC_LANG_SOURCE([[int i;]])], [],
[supports=no])
@ -923,23 +924,26 @@ AC_DEFUN([FLAGS_COMPILER_CHECK_ARGUMENTS],
AC_MSG_RESULT([$supports])
if test "x$supports" = "xyes" ; then
m4_ifval([$2], [$2], [:])
:
ARG_IF_TRUE
else
m4_ifval([$3], [$3], [:])
:
ARG_IF_FALSE
fi
])
# FLAGS_LINKER_CHECK_ARGUMENTS([ARGUMENT], [RUN-IF-TRUE],
# [RUN-IF-FALSE])
# FLAGS_LINKER_CHECK_ARGUMENTS(ARGUMENT: [ARGUMENT], IF_TRUE: [RUN-IF-TRUE],
# IF_FALSE: [RUN-IF-FALSE])
# ------------------------------------------------------------
# Check that the linker support an argument
AC_DEFUN([FLAGS_LINKER_CHECK_ARGUMENTS],
BASIC_DEFUN_NAMED([FLAGS_LINKER_CHECK_ARGUMENTS],
[*ARGUMENT IF_TRUE IF_FALSE], [$@],
[
AC_MSG_CHECKING([if linker supports "$1"])
AC_MSG_CHECKING([if linker supports "ARG_ARGUMENT"])
supports=yes
saved_ldflags="$LDFLAGS"
LDFLAGS="$LDFLAGS $1"
LDFLAGS="$LDFLAGS ARG_ARGUMENT"
AC_LANG_PUSH([C])
AC_LINK_IFELSE([AC_LANG_PROGRAM([[]],[[]])],
[], [supports=no])
@ -948,9 +952,11 @@ AC_DEFUN([FLAGS_LINKER_CHECK_ARGUMENTS],
AC_MSG_RESULT([$supports])
if test "x$supports" = "xyes" ; then
m4_ifval([$2], [$2], [:])
:
ARG_IF_TRUE
else
m4_ifval([$3], [$3], [:])
:
ARG_IF_FALSE
fi
])
@ -965,14 +971,14 @@ AC_DEFUN_ONCE([FLAGS_SETUP_COMPILER_FLAGS_MISC],
*)
ZERO_ARCHFLAG="${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}"
esac
FLAGS_COMPILER_CHECK_ARGUMENTS([$ZERO_ARCHFLAG], [], [ZERO_ARCHFLAG=""])
FLAGS_COMPILER_CHECK_ARGUMENTS(ARGUMENT: [$ZERO_ARCHFLAG], IF_FALSE: [ZERO_ARCHFLAG=""])
AC_SUBST(ZERO_ARCHFLAG)
# Check that the compiler supports -mX (or -qX on AIX) flags
# Set COMPILER_SUPPORTS_TARGET_BITS_FLAG to 'true' if it does
FLAGS_COMPILER_CHECK_ARGUMENTS([${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}],
[COMPILER_SUPPORTS_TARGET_BITS_FLAG=true],
[COMPILER_SUPPORTS_TARGET_BITS_FLAG=false])
FLAGS_COMPILER_CHECK_ARGUMENTS(ARGUMENT: [${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}],
IF_TRUE: [COMPILER_SUPPORTS_TARGET_BITS_FLAG=true],
IF_FALSE: [COMPILER_SUPPORTS_TARGET_BITS_FLAG=false])
AC_SUBST(COMPILER_SUPPORTS_TARGET_BITS_FLAG)
AC_ARG_ENABLE([warnings-as-errors], [AS_HELP_STRING([--disable-warnings-as-errors],
@ -1013,9 +1019,9 @@ AC_DEFUN_ONCE([FLAGS_SETUP_COMPILER_FLAGS_MISC],
;;
gcc)
# Prior to gcc 4.4, a -Wno-X where X is unknown for that version of gcc will cause an error
FLAGS_COMPILER_CHECK_ARGUMENTS([-Wno-this-is-a-warning-that-do-not-exist],
[GCC_CAN_DISABLE_WARNINGS=true],
[GCC_CAN_DISABLE_WARNINGS=false]
FLAGS_COMPILER_CHECK_ARGUMENTS(ARGUMENT: [-Wno-this-is-a-warning-that-do-not-exist],
IF_TRUE: [GCC_CAN_DISABLE_WARNINGS=true],
IF_FALSE: [GCC_CAN_DISABLE_WARNINGS=false]
)
if test "x$GCC_CAN_DISABLE_WARNINGS" = "xtrue"; then
DISABLE_WARNING_PREFIX="-Wno-"
@ -1026,9 +1032,9 @@ AC_DEFUN_ONCE([FLAGS_SETUP_COMPILER_FLAGS_MISC],
# Repeate the check for the BUILD_CC
CC_OLD="$CC"
CC="$BUILD_CC"
FLAGS_COMPILER_CHECK_ARGUMENTS([-Wno-this-is-a-warning-that-do-not-exist],
[BUILD_CC_CAN_DISABLE_WARNINGS=true],
[BUILD_CC_CAN_DISABLE_WARNINGS=false]
FLAGS_COMPILER_CHECK_ARGUMENTS(ARGUMENT: [-Wno-this-is-a-warning-that-do-not-exist],
IF_TRUE: [BUILD_CC_CAN_DISABLE_WARNINGS=true],
IF_FALSE: [BUILD_CC_CAN_DISABLE_WARNINGS=false]
)
if test "x$BUILD_CC_CAN_DISABLE_WARNINGS" = "xtrue"; then
BUILD_CC_DISABLE_WARNING_PREFIX="-Wno-"

View File

@ -3451,6 +3451,31 @@ ac_configure="$SHELL $ac_aux_dir/configure" # Please don't use this var.
# questions.
#
# Create a function/macro that takes a series of named arguments. The call is
# similar to AC_DEFUN, but the setup of the function looks like this:
# BASIC_DEFUN_NAMED([MYFUNC], [FOO *BAR], [$@], [
# ... do something
# AC_MSG_NOTICE([Value of BAR is ARG_BAR])
# ])
# A star (*) in front of a named argument means that it is required and it's
# presence will be verified. To pass e.g. the first value as a normal indexed
# argument, use [m4_shift($@)] as the third argument instead of [$@]. These
# arguments are referenced in the function by their name prefixed by ARG_, e.g.
# "ARG_FOO".
#
# The generated function can be called like this:
# MYFUNC(FOO: [foo-val], BAR:
# [
# $ECHO hello world
# ])
#
#
# Argument 1: Name of the function to define
# Argument 2: List of legal named arguments, with a * prefix for required arguments
# Argument 3: Argument array to treat as named, typically $@
# Argument 4: The main function body
# Test if $1 is a valid argument to $3 (often is $JAVA passed as $3)
# If so, then append $1 to $2 \
# Also set JVM_ARG_OK to true/false depending on outcome.
@ -3886,20 +3911,24 @@ ac_configure="$SHELL $ac_aux_dir/configure" # Please don't use this var.
# FLAGS_COMPILER_CHECK_ARGUMENTS([ARGUMENT], [RUN-IF-TRUE],
# [RUN-IF-FALSE])
# FLAGS_COMPILER_CHECK_ARGUMENTS(ARGUMENT: [ARGUMENT], IF_TRUE: [RUN-IF-TRUE],
# IF_FALSE: [RUN-IF-FALSE])
# ------------------------------------------------------------
# Check that the c and c++ compilers support an argument
# FLAGS_LINKER_CHECK_ARGUMENTS([ARGUMENT], [RUN-IF-TRUE],
# [RUN-IF-FALSE])
# FLAGS_LINKER_CHECK_ARGUMENTS(ARGUMENT: [ARGUMENT], IF_TRUE: [RUN-IF-TRUE],
# IF_FALSE: [RUN-IF-FALSE])
# ------------------------------------------------------------
# Check that the linker support an argument
#
# Copyright (c) 2011, 2015, Oracle and/or its affiliates. All rights reserved.
# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@ -4810,7 +4839,7 @@ VS_SDK_PLATFORM_NAME_2013=
#CUSTOM_AUTOCONF_INCLUDE
# Do not change or remove the following line, it is needed for consistency checks:
DATE_WHEN_GENERATED=1452261921
DATE_WHEN_GENERATED=1452780299
###############################################################################
#
@ -45358,6 +45387,54 @@ $as_echo "$as_me: Rewriting BUILD_AR to \"$new_complete\"" >&6;}
# "-Og" suppported for GCC 4.8 and later
CFLAG_OPTIMIZE_DEBUG_FLAG="-Og"
# Execute function body
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking if compiler supports \"$CFLAG_OPTIMIZE_DEBUG_FLAG\"" >&5
$as_echo_n "checking if compiler supports \"$CFLAG_OPTIMIZE_DEBUG_FLAG\"... " >&6; }
supports=yes
@ -45417,15 +45494,76 @@ ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $supports" >&5
$as_echo "$supports" >&6; }
if test "x$supports" = "xyes" ; then
:
HAS_CFLAG_OPTIMIZE_DEBUG=true
else
:
HAS_CFLAG_OPTIMIZE_DEBUG=false
fi
# "-z relro" supported in GNU binutils 2.17 and later
LINKER_RELRO_FLAG="-Wl,-z,relro"
# Execute function body
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking if linker supports \"$LINKER_RELRO_FLAG\"" >&5
$as_echo_n "checking if linker supports \"$LINKER_RELRO_FLAG\"... " >&6; }
supports=yes
@ -45467,15 +45605,76 @@ ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $supports" >&5
$as_echo "$supports" >&6; }
if test "x$supports" = "xyes" ; then
:
HAS_LINKER_RELRO=true
else
:
HAS_LINKER_RELRO=false
fi
# "-z now" supported in GNU binutils 2.11 and later
LINKER_NOW_FLAG="-Wl,-z,now"
# Execute function body
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking if linker supports \"$LINKER_NOW_FLAG\"" >&5
$as_echo_n "checking if linker supports \"$LINKER_NOW_FLAG\"... " >&6; }
supports=yes
@ -45517,11 +45716,24 @@ ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $supports" >&5
$as_echo "$supports" >&6; }
if test "x$supports" = "xyes" ; then
:
HAS_LINKER_NOW=true
else
:
HAS_LINKER_NOW=false
fi
fi
# Check for broken SuSE 'ld' for which 'Only anonymous version tag is allowed
@ -46842,6 +47054,49 @@ $as_echo "$ac_cv_c_bigendian" >&6; }
# Not all versions of gcc support -fstack-protector
STACK_PROTECTOR_CFLAG="-fstack-protector-all"
# Execute function body
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking if compiler supports \"$STACK_PROTECTOR_CFLAG\"" >&5
$as_echo_n "checking if compiler supports \"$STACK_PROTECTOR_CFLAG\"... " >&6; }
supports=yes
@ -46902,11 +47157,24 @@ ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
$as_echo "$supports" >&6; }
if test "x$supports" = "xyes" ; then
:
else
:
STACK_PROTECTOR_CFLAG=""
fi
CFLAGS_DEBUG_OPTIONS="$STACK_PROTECTOR_CFLAG --param ssp-buffer-size=1"
CXXFLAGS_DEBUG_OPTIONS="$STACK_PROTECTOR_CFLAG --param ssp-buffer-size=1"
;;
@ -47384,6 +47652,49 @@ $as_echo "$supports" >&6; }
ZERO_ARCHFLAG="${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}"
esac
# Execute function body
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking if compiler supports \"$ZERO_ARCHFLAG\"" >&5
$as_echo_n "checking if compiler supports \"$ZERO_ARCHFLAG\"... " >&6; }
supports=yes
@ -47444,15 +47755,76 @@ ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
$as_echo "$supports" >&6; }
if test "x$supports" = "xyes" ; then
:
else
:
ZERO_ARCHFLAG=""
fi
# Check that the compiler supports -mX (or -qX on AIX) flags
# Set COMPILER_SUPPORTS_TARGET_BITS_FLAG to 'true' if it does
# Execute function body
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking if compiler supports \"${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}\"" >&5
$as_echo_n "checking if compiler supports \"${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}\"... " >&6; }
supports=yes
@ -47512,13 +47884,26 @@ ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $supports" >&5
$as_echo "$supports" >&6; }
if test "x$supports" = "xyes" ; then
:
COMPILER_SUPPORTS_TARGET_BITS_FLAG=true
else
:
COMPILER_SUPPORTS_TARGET_BITS_FLAG=false
fi
# Check whether --enable-warnings-as-errors was given.
if test "${enable_warnings_as_errors+set}" = set; then :
enableval=$enable_warnings_as_errors;
@ -47565,6 +47950,54 @@ $as_echo "yes (default)" >&6; }
gcc)
# Prior to gcc 4.4, a -Wno-X where X is unknown for that version of gcc will cause an error
# Execute function body
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking if compiler supports \"-Wno-this-is-a-warning-that-do-not-exist\"" >&5
$as_echo_n "checking if compiler supports \"-Wno-this-is-a-warning-that-do-not-exist\"... " >&6; }
supports=yes
@ -47624,12 +48057,25 @@ ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $supports" >&5
$as_echo "$supports" >&6; }
if test "x$supports" = "xyes" ; then
:
GCC_CAN_DISABLE_WARNINGS=true
else
:
GCC_CAN_DISABLE_WARNINGS=false
fi
if test "x$GCC_CAN_DISABLE_WARNINGS" = "xtrue"; then
DISABLE_WARNING_PREFIX="-Wno-"
else
@ -47640,6 +48086,54 @@ $as_echo "$supports" >&6; }
CC_OLD="$CC"
CC="$BUILD_CC"
# Execute function body
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking if compiler supports \"-Wno-this-is-a-warning-that-do-not-exist\"" >&5
$as_echo_n "checking if compiler supports \"-Wno-this-is-a-warning-that-do-not-exist\"... " >&6; }
supports=yes
@ -47699,12 +48193,25 @@ ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $supports" >&5
$as_echo "$supports" >&6; }
if test "x$supports" = "xyes" ; then
:
BUILD_CC_CAN_DISABLE_WARNINGS=true
else
:
BUILD_CC_CAN_DISABLE_WARNINGS=false
fi
if test "x$BUILD_CC_CAN_DISABLE_WARNINGS" = "xtrue"; then
BUILD_CC_DISABLE_WARNING_PREFIX="-Wno-"
else
@ -61523,7 +62030,6 @@ fi
# Move configure.log from current directory to the build output root
if test -e ./configure.log; then
echo found it
$MV -f ./configure.log "$OUTPUT_ROOT/configure.log" 2> /dev/null
fi

View File

@ -75,8 +75,8 @@ AC_DEFUN([TOOLCHAIN_SETUP_FILENAME_PATTERNS],
# For full static builds, we're overloading the SHARED_LIBRARY
# variables in order to limit the amount of changes required.
# It would be better to remove SHARED and just use LIBRARY and
# LIBRARY_SUFFIX for libraries that can be built either
# shared or static and use STATIC_* for libraries that are
# LIBRARY_SUFFIX for libraries that can be built either
# shared or static and use STATIC_* for libraries that are
# always built statically.
if test "x$STATIC_BUILD" = xtrue; then
SHARED_LIBRARY='lib[$]1.a'
@ -824,21 +824,21 @@ AC_DEFUN_ONCE([TOOLCHAIN_MISC_CHECKS],
# "-Og" suppported for GCC 4.8 and later
CFLAG_OPTIMIZE_DEBUG_FLAG="-Og"
FLAGS_COMPILER_CHECK_ARGUMENTS([$CFLAG_OPTIMIZE_DEBUG_FLAG],
[HAS_CFLAG_OPTIMIZE_DEBUG=true],
[HAS_CFLAG_OPTIMIZE_DEBUG=false])
FLAGS_COMPILER_CHECK_ARGUMENTS(ARGUMENT: [$CFLAG_OPTIMIZE_DEBUG_FLAG],
IF_TRUE: [HAS_CFLAG_OPTIMIZE_DEBUG=true],
IF_FALSE: [HAS_CFLAG_OPTIMIZE_DEBUG=false])
# "-z relro" supported in GNU binutils 2.17 and later
LINKER_RELRO_FLAG="-Wl,-z,relro"
FLAGS_LINKER_CHECK_ARGUMENTS([$LINKER_RELRO_FLAG],
[HAS_LINKER_RELRO=true],
[HAS_LINKER_RELRO=false])
FLAGS_LINKER_CHECK_ARGUMENTS(ARGUMENT: [$LINKER_RELRO_FLAG],
IF_TRUE: [HAS_LINKER_RELRO=true],
IF_FALSE: [HAS_LINKER_RELRO=false])
# "-z now" supported in GNU binutils 2.11 and later
LINKER_NOW_FLAG="-Wl,-z,now"
FLAGS_LINKER_CHECK_ARGUMENTS([$LINKER_NOW_FLAG],
[HAS_LINKER_NOW=true],
[HAS_LINKER_NOW=false])
FLAGS_LINKER_CHECK_ARGUMENTS(ARGUMENT: [$LINKER_NOW_FLAG],
IF_TRUE: [HAS_LINKER_NOW=true],
IF_FALSE: [HAS_LINKER_NOW=false])
fi
# Check for broken SuSE 'ld' for which 'Only anonymous version tag is allowed

View File

@ -343,3 +343,4 @@ feb1bd85d7990dcf5584ca9e53104269c01db006 jdk-9+96
ea285530245cf4e0edf0479121a41347d3030eba jdk-9+98
180212ee1d8710691ba9944593dfc1ff3e4f1532 jdk-9+99
791d0d3ac0138faeb6110bd840a4545bc1950df2 jdk-9+100
30dfb3bd3d06b4bb80a087babc0d1841edba187b jdk-9+101

View File

@ -503,3 +503,4 @@ de592ea5f7ba0f8a8c5afc03bd169f7690c72b6f jdk-9+97
e5b1a23be1e105417ba1c4c576ab373eb3fa2c2b jdk-9+98
f008e8cc10d5b3212fb22d58c96fa01d38654f19 jdk-9+99
bdb0acafc63c42e84d9d8195bf2e2b25ee9c3306 jdk-9+100
9f45d3d57d6948cf526fbc2e2891a9a74ac6941a jdk-9+101

View File

@ -1,5 +1,5 @@
/*
* Copyright (c) 1997, 2015, Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 1997, 2016, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
@ -124,7 +124,7 @@ static JNINativeMethod lookup_special_native_methods[] = {
{ CC"Java_jdk_internal_misc_Unsafe_registerNatives", NULL, FN_PTR(JVM_RegisterUnsafeMethods) },
{ CC"Java_sun_misc_Unsafe_registerNatives", NULL, FN_PTR(JVM_RegisterUnsafeMethods) },
{ CC"Java_java_lang_invoke_MethodHandleNatives_registerNatives", NULL, FN_PTR(JVM_RegisterMethodHandleMethods) },
{ CC"Java_sun_misc_Perf_registerNatives", NULL, FN_PTR(JVM_RegisterPerfMethods) },
{ CC"Java_jdk_internal_perf_Perf_registerNatives", NULL, FN_PTR(JVM_RegisterPerfMethods) },
{ CC"Java_sun_hotspot_WhiteBox_registerNatives", NULL, FN_PTR(JVM_RegisterWhiteBoxMethods) },
#if INCLUDE_JVMCI
{ CC"Java_jdk_vm_ci_runtime_JVMCI_initializeRuntime", NULL, FN_PTR(JVM_GetJVMCIRuntime) },

View File

@ -1,5 +1,5 @@
/*
* Copyright (c) 2001, 2013, Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 2001, 2016, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
@ -34,7 +34,7 @@
#include "runtime/perfMemory.hpp"
/*
* Implementation of class sun.misc.Perf
* Implementation of class jdk.internal.perf.Perf
*/

View File

@ -343,3 +343,4 @@ c8d0845877a811ab4350935892f826929359a3ff jdk-9+95
52b01339235f24c93b679bd6b8fb36a1072ad0ac jdk-9+98
52774b544850c791f1d1c67db2601b33739b18c9 jdk-9+99
d45bcd374f6057851e3c2dcd45607cd362afadfa jdk-9+100
d3e834ff74e724a2b92a558e18e8cbf81c6dbc59 jdk-9+101

View File

@ -32,7 +32,6 @@ import java.net.URI;
import java.net.URISyntaxException;
import java.net.URL;
import java.util.ArrayList;
import java.util.Collections;
import java.util.Iterator;
import java.util.List;
import java.util.NoSuchElementException;
@ -43,6 +42,7 @@ import java.util.stream.StreamSupport;
import static javax.xml.catalog.BaseEntry.CatalogEntryType;
import static javax.xml.catalog.CatalogFeatures.DEFER_TRUE;
import javax.xml.catalog.CatalogFeatures.Feature;
import static javax.xml.catalog.CatalogMessages.formatMessage;
import javax.xml.parsers.ParserConfigurationException;
import javax.xml.parsers.SAXParser;
import javax.xml.parsers.SAXParserFactory;
@ -109,25 +109,20 @@ class CatalogImpl extends GroupEntry implements Catalog {
*/
public CatalogImpl(CatalogImpl parent, CatalogFeatures f, String... file) throws CatalogException {
super(CatalogEntryType.CATALOG);
this.parent = parent;
if (parent == null) {
level = 0;
} else {
level = parent.level + 1;
}
if (f == null) {
this.features = CatalogFeatures.defaults();
} else {
this.features = f;
throw new NullPointerException(
formatMessage(CatalogMessages.ERR_NULL_ARGUMENT, new Object[]{"CatalogFeatures"}));
}
setPrefer(features.get(Feature.PREFER));
setDeferred(features.get(Feature.DEFER));
setResolve(features.get(Feature.RESOLVE));
if (file.length > 0) {
CatalogMessages.reportNPEOnNull("The path to the catalog file", file[0]);
}
init(parent, f);
//Path of catalog files
String[] catalogFile = file;
if (level == 0
&& (file == null || (file.length == 0 || file[0] == null))) {
if (level == 0 && file.length == 0) {
String files = features.get(Feature.FILES);
if (files != null) {
catalogFile = files.split(";[ ]*");
@ -166,6 +161,23 @@ class CatalogImpl extends GroupEntry implements Catalog {
}
}
private void init(CatalogImpl parent, CatalogFeatures f) {
this.parent = parent;
if (parent == null) {
level = 0;
} else {
level = parent.level + 1;
}
if (f == null) {
this.features = CatalogFeatures.defaults();
} else {
this.features = f;
}
setPrefer(features.get(Feature.PREFER));
setDeferred(features.get(Feature.DEFER));
setResolve(features.get(Feature.RESOLVE));
}
/**
* Resets the Catalog instance to its initial state.
*/

View File

@ -38,33 +38,38 @@ public final class CatalogManager {
}
/**
* Creates a Catalog object using the specified feature settings and path to
* a catalog file. If the features is null, the default features will be used.
* If the path is empty, System property {@code javax.xml.catalog.files} will
* be read to locate the initial list of catalog files.
* Creates a {@code Catalog} object using the specified feature settings and
* path to one or more catalog files.
* <p>
* If more than one catalog files are specified through the path argument or
* If {@code paths} is empty, system property {@code javax.xml.catalog.files}
* will be read to locate the initial list of catalog files.
* <p>
* If more than one catalog files are specified through the paths argument or
* {@code javax.xml.catalog.files} property, the first entry is considered
* the main catalog, while others are treated as alternative catalogs after
* those referenced by the {@code nextCatalog} elements in the main catalog.
* <p>
* As specified in
* <a href="https://www.oasis-open.org/committees/download.php/14809/xml-catalogs.html#s.res.fail">
* XML Catalogs, OASIS Standard V1.1</a>, invalid path entries will be ignored.
* No error will be reported. In case all entries are invalid, the resolver
* will return as no mapping is found.
*
* @param features the catalog features
* @param path path(s) to one or more catalogs.
* @param paths path(s) to one or more catalogs.
*
* @return a catalog instance
* @throws CatalogException If no catalog can be found whether through the
* specified path or the System property {@code javax.xml.catalog.files}, or
* an error occurs while parsing the catalog
* @return an instance of a {@code Catalog}
* @throws CatalogException If an error occurs while parsing the catalog
*/
public static Catalog catalog(CatalogFeatures features, String... path) {
return new CatalogImpl(features, path);
public static Catalog catalog(CatalogFeatures features, String... paths) {
return new CatalogImpl(features, paths);
}
/**
* Creates an instance of a CatalogResolver using the specified catalog.
* Creates an instance of a {@code CatalogResolver} using the specified catalog.
*
* @param catalog the catalog instance
* @return an instance of a CatalogResolver
* @return an instance of a {@code CatalogResolver}
*/
public static CatalogResolver catalogResolver(Catalog catalog) {
if (catalog == null) CatalogMessages.reportNPEOnNull("catalog", null);
@ -72,10 +77,10 @@ public final class CatalogManager {
}
/**
* Creates an instance of a CatalogUriResolver using the specified catalog.
* Creates an instance of a {@code CatalogUriResolver} using the specified catalog.
*
* @param catalog the catalog instance
* @return an instance of a CatalogResolver
* @return an instance of a {@code CatalogResolver}
*/
public static CatalogUriResolver catalogUriResolver(Catalog catalog) {
if (catalog == null) CatalogMessages.reportNPEOnNull("catalog", null);
@ -83,50 +88,60 @@ public final class CatalogManager {
}
/**
* Creates an instance of a CatalogResolver using the specified feature settings
* and path to a catalog file. If the features is null, the default features will
* be used. If the path is empty, System property {@code javax.xml.catalog.files}
* Creates an instance of a {@code CatalogResolver} using the specified feature
* settings and path to one or more catalog files.
* <p>
* If {@code paths} is empty, system property {@code javax.xml.catalog.files}
* will be read to locate the initial list of catalog files.
* <p>
* If more than one catalog files are specified through the path argument or
* If more than one catalog files are specified through the paths argument or
* {@code javax.xml.catalog.files} property, the first entry is considered
* the main catalog, while others are treated as alternative catalogs after
* those referenced by the {@code nextCatalog} elements in the main catalog.
* <p>
* As specified in
* <a href="https://www.oasis-open.org/committees/download.php/14809/xml-catalogs.html#s.res.fail">
* XML Catalogs, OASIS Standard V1.1</a>, invalid path entries will be ignored.
* No error will be reported. In case all entries are invalid, the resolver
* will return as no mapping is found.
*
* @param features the catalog features
* @param path the path(s) to one or more catalogs
* @param paths the path(s) to one or more catalogs
*
* @return an instance of a CatalogResolver
* @throws CatalogException If no catalog can be found whether through the
* specified path or the System property {@code javax.xml.catalog.files}, or
* an error occurs while parsing the catalog
* @return an instance of a {@code CatalogResolver}
* @throws CatalogException If an error occurs while parsing the catalog
*/
public static CatalogResolver catalogResolver(CatalogFeatures features, String... path) {
Catalog catalog = catalog(features, path);
public static CatalogResolver catalogResolver(CatalogFeatures features, String... paths) {
Catalog catalog = catalog(features, paths);
return new CatalogResolverImpl(catalog);
}
/**
* Creates an instance of a CatalogUriResolver using the specified feature settings
* and path to a catalog file. If the features is null, the default features will
* be used. If the path is empty, System property {@code javax.xml.catalog.files}
* Creates an instance of a {@code CatalogUriResolver} using the specified
* feature settings and path to one or more catalog files.
* <p>
* If {@code paths} is empty, system property {@code javax.xml.catalog.files}
* will be read to locate the initial list of catalog files.
* <p>
* If more than one catalog files are specified through the path argument or
* If more than one catalog files are specified through the paths argument or
* {@code javax.xml.catalog.files} property, the first entry is considered
* the main catalog, while others are treated as alternative catalogs after
* those referenced by the {@code nextCatalog} elements in the main catalog.
* <p>
* As specified in
* <a href="https://www.oasis-open.org/committees/download.php/14809/xml-catalogs.html#s.res.fail">
* XML Catalogs, OASIS Standard V1.1</a>, invalid path entries will be ignored.
* No error will be reported. In case all entries are invalid, the resolver
* will return as no mapping is found.
*
* @param features the catalog features
* @param path the path(s) to one or more catalogs
* @param paths the path(s) to one or more catalogs
*
* @return an instance of a CatalogResolver
* @throws CatalogException If no catalog can be found whether through the
* specified path or the System property {@code javax.xml.catalog.files}, or
* an error occurs while parsing the catalog
* @return an instance of a {@code CatalogUriResolver}
* @throws CatalogException If an error occurs while parsing the catalog
*/
public static CatalogUriResolver catalogUriResolver(CatalogFeatures features, String... path) {
Catalog catalog = catalog(features, path);
public static CatalogUriResolver catalogUriResolver(CatalogFeatures features, String... paths) {
Catalog catalog = catalog(features, paths);
return new CatalogUriResolverImpl(catalog);
}
}

View File

@ -43,9 +43,9 @@ public interface CatalogUriResolver extends URIResolver {
* absolute if the absolute URI is required
*
* @return a {@link javax.xml.transform.Source} object if a mapping is found.
* If no mapping is found, returns a {@link javax.xml.transform.Source} object
* containing an empty {@link java.io.Reader} if the
* {@code javax.xml.catalog.resolve} property is set to {@code ignore};
* If no mapping is found, returns an empty {@link javax.xml.transform.Source}
* object if the {@code javax.xml.catalog.resolve} property is set to
* {@code ignore};
* returns a {@link javax.xml.transform.Source} object with the original URI
* (href, or href resolved with base if base is not null) if the
* {@code javax.xml.catalog.resolve} property is set to {@code continue}.

View File

@ -1,5 +1,5 @@
/*
* Copyright (c) 2015, Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 2016, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
@ -72,6 +72,7 @@ final class RewriteSystem extends BaseEntry {
public String getSystemIdStartString () {
return systemIdStartString;
}
/**
* Get the rewritePrefix attribute.
* @return The rewritePrefix attribute value.
@ -80,7 +81,6 @@ final class RewriteSystem extends BaseEntry {
return rewritePrefix;
}
/**
* Try to match the specified systemId with the entry. Return the match if it
* is successful and the length of the systemIdStartString is longer than the
@ -91,14 +91,20 @@ final class RewriteSystem extends BaseEntry {
* @return The replacement URI if the match is successful, null if not.
*/
public String match(String systemId, int currentMatch) {
if (systemIdStartString.length() <= systemId.length() &&
if (systemIdStartString.length() < systemId.length() &&
systemIdStartString.equals(systemId.substring(0, systemIdStartString.length()))) {
if (currentMatch < systemIdStartString.length()) {
String prefix = rewritePrefix.toExternalForm();
if (!prefix.endsWith(SLASH) && !systemId.startsWith(SLASH)) {
return prefix + SLASH + systemId.substring(systemIdStartString.length());
String sysId;
if (systemIdStartString.endsWith(SLASH)) {
sysId = systemId.substring(systemIdStartString.length());
} else {
return prefix + systemId.substring(systemIdStartString.length());
sysId = systemId.substring(systemIdStartString.length() + 1);
}
if (prefix.endsWith(SLASH)) {
return prefix + sysId;
} else {
return prefix + SLASH + sysId;
}
}
}

View File

@ -1,5 +1,5 @@
/*
* Copyright (c) 2015, Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 2016, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
@ -72,6 +72,7 @@ final class RewriteUri extends BaseEntry {
public String getURIStartString () {
return uriStartString;
}
/**
* Get the rewritePrefix attribute.
* @return The rewritePrefix attribute value.
@ -91,14 +92,20 @@ final class RewriteUri extends BaseEntry {
*/
@Override
public String match(String systemId, int currentMatch) {
if (uriStartString.length() <= systemId.length() &&
if (uriStartString.length() < systemId.length() &&
uriStartString.equals(systemId.substring(0, uriStartString.length()))) {
if (currentMatch < uriStartString.length()) {
String prefix = rewritePrefix.toExternalForm();
if (!prefix.endsWith(SLASH) && !systemId.startsWith(SLASH)) {
return prefix + SLASH + systemId.substring(uriStartString.length());
String sysId;
if (uriStartString.endsWith(SLASH)) {
sysId = systemId.substring(uriStartString.length());
} else {
return prefix + systemId.substring(uriStartString.length());
sysId = systemId.substring(uriStartString.length() + 1);
}
if (prefix.endsWith(SLASH)) {
return prefix + sysId;
} else {
return prefix + SLASH + sysId;
}
}
}

View File

@ -1,5 +1,5 @@
/*
* Copyright (c) 2000, 2005, Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 2000, 2016, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
@ -52,4 +52,17 @@ public interface Source {
* if setSystemId was not called.
*/
public String getSystemId();
/**
* Indicates whether the {@code Source} object is empty. Empty means
* that there is no input available from this Source.
*
* @implSpec The default implementation of this method throws
* {@link UnsupportedOperationException}.
*
* @return true if the {@code Source} object is empty, false otherwise
*/
default boolean isEmpty() {
throw new UnsupportedOperationException("The isEmpty method is not supported.");
}
}

View File

@ -1,5 +1,5 @@
/*
* Copyright (c) 2000, 2005, Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 2000, 2016, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
@ -122,6 +122,7 @@ public class DOMSource implements Source {
*
* @param systemID Base URL for this DOM tree.
*/
@Override
public void setSystemId(String systemID) {
this.systemID = systemID;
}
@ -132,7 +133,25 @@ public class DOMSource implements Source {
*
* @return Base URL for this DOM tree.
*/
@Override
public String getSystemId() {
return this.systemID;
}
/**
* Indicates whether the {@code DOMSource} object is empty. Empty is
* defined as follows:
* <ul>
* <li>if the system identifier and node are {@code null};
* </li>
* <li>if the system identifier is null, and the {@code node} has no child nodes.
* </li>
* </ul>
*
* @return true if the {@code DOMSource} object is empty, false otherwise
*/
@Override
public boolean isEmpty() {
return systemID == null && (node == null || !node.hasChildNodes());
}
}

View File

@ -1,5 +1,5 @@
/*
* Copyright (c) 2000, 2006, Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 2000, 2016, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
@ -147,6 +147,7 @@ public class SAXSource implements Source {
*
* @param systemId The system identifier as a URI string.
*/
@Override
public void setSystemId(String systemId) {
if (null == inputSource) {
@ -162,6 +163,7 @@ public class SAXSource implements Source {
*
* @return Base URL for the <code>Source</code>, or <code>null</code>.
*/
@Override
public String getSystemId() {
if (inputSource == null) {
@ -207,4 +209,22 @@ public class SAXSource implements Source {
return null;
}
}
/**
* Indicates whether the {@code SAXSource} object is empty. Empty is
* defined as follows:
* <ul>
* <li>if the system identifier and {@code InputSource} are {@code null};
* </li>
* <li>if the system identifier is {@code null}, and the {@code InputSource}
* is empty.
* </li>
* </ul>
*
* @return true if the {@code SAXSource} object is empty, false otherwise
*/
@Override
public boolean isEmpty() {
return getSystemId() == null && (inputSource == null || inputSource.isEmpty());
}
}

View File

@ -1,5 +1,5 @@
/*
* Copyright (c) 2005, 2006, Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 2005, 2016, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
@ -209,6 +209,7 @@ public class StAXSource implements Source {
* @throws UnsupportedOperationException Is <strong>always</strong>
* thrown by this method.
*/
@Override
public void setSystemId(final String systemId) {
throw new UnsupportedOperationException(
@ -229,8 +230,21 @@ public class StAXSource implements Source {
*
* @return System identifier used by this <code>StAXSource</code>.
*/
@Override
public String getSystemId() {
return systemId;
}
/**
* Indicates whether the {@code StAXSource} object is empty. Since a
* {@code StAXSource} object can never be empty, this method always returns
* false.
*
* @return unconditionally false
*/
@Override
public boolean isEmpty() {
return false;
}
}

View File

@ -1,5 +1,5 @@
/*
* Copyright (c) 2000, 2005, Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 2000, 2016, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
@ -26,8 +26,10 @@
package javax.xml.transform.stream;
import java.io.File;
import java.io.IOException;
import java.io.InputStream;
import java.io.Reader;
import javax.xml.transform.Result;
import javax.xml.transform.Source;
@ -233,6 +235,7 @@ public class StreamSource implements Source {
*
* @param systemId The system identifier as a URL string.
*/
@Override
public void setSystemId(String systemId) {
this.systemId = systemId;
}
@ -243,6 +246,7 @@ public class StreamSource implements Source {
* @return The system identifier that was set with setSystemId, or null
* if setSystemId was not called.
*/
@Override
public String getSystemId() {
return systemId;
}
@ -259,6 +263,59 @@ public class StreamSource implements Source {
this.systemId = f.toURI().toASCIIString();
}
/**
* Indicates whether the {@code StreamSource} object is empty. Empty is
* defined as follows:
* <ul>
* <li>All of the input sources, including the public identifier, system
* identifier, byte stream, and character stream, are {@code null}.
* </li>
* <li>The public identifier and system identifier are {@code null}, and
* byte and character stream are either {@code null} or contain no byte or
* character.
* <p>
* Note that this method will reset the byte stream if it is provided, or
* the character stream if the byte stream is not provided.
* </li>
* </ul>
* <p>
* In case of error while checking the byte or character stream, the method
* will return false to allow the XML processor to handle the error.
*
* @return true if the {@code StreamSource} object is empty, false otherwise
*/
@Override
public boolean isEmpty() {
return (publicId == null && systemId == null && isStreamEmpty());
}
private boolean isStreamEmpty() {
boolean empty = true;
try {
if (inputStream != null) {
inputStream.reset();
int bytesRead = inputStream.available();
if (bytesRead > 0) {
return false;
}
}
if (reader != null) {
reader.reset();
int c = reader.read();
reader.reset();
if (c != -1) {
return false;
}
}
} catch (IOException ex) {
//in case of error, return false
return false;
}
return empty;
}
//////////////////////////////////////////////////////////////////////
// Internal state.
//////////////////////////////////////////////////////////////////////

View File

@ -1,5 +1,5 @@
/*
* Copyright (c) 2000, 2005, Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 2000, 2016, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
@ -30,6 +30,7 @@
package org.xml.sax;
import java.io.IOException;
import java.io.Reader;
import java.io.InputStream;
@ -343,8 +344,57 @@ public class InputSource {
return characterStream;
}
/**
* Indicates whether the {@code InputSource} object is empty. Empty is
* defined as follows:
* <ul>
* <li>All of the input sources, including the public identifier, system
* identifier, byte stream, and character stream, are {@code null}.
* </li>
* <li>The public identifier and system identifier are {@code null}, and
* byte and character stream are either {@code null} or contain no byte
* or character.
* <p>
* Note that this method will reset the byte stream if it is provided, or
* the character stream if the byte stream is not provided.
* </li>
* </ul>
* <p>
* In case of error while checking the byte or character stream, the method
* will return false to allow the XML processor to handle the error.
*
* @return true if the {@code InputSource} object is empty, false otherwise
*/
public boolean isEmpty() {
return (publicId == null && systemId == null && isStreamEmpty());
}
private boolean isStreamEmpty() {
boolean empty = true;
try {
if (byteStream != null) {
byteStream.reset();
int bytesRead = byteStream.available();
if (bytesRead > 0) {
return false;
}
}
if (characterStream != null) {
characterStream.reset();
int c = characterStream.read();
characterStream.reset();
if (c != -1) {
return false;
}
}
} catch (IOException ex) {
//in case of error, return false
return false;
}
return empty;
}
////////////////////////////////////////////////////////////////////
// Internal state.
////////////////////////////////////////////////////////////////////

View File

@ -56,23 +56,14 @@ public class DeferFeatureTest {
@DataProvider(name = "catalog-countOfLoadedCatalogFile")
private Object[][] data() {
return new Object[][] {
// This catalog specifies null catalog explicitly,
// and the count of loaded catalogs should be 0.
{ createCatalog(null), 0 },
// This catalog specifies null catalog implicitly,
// and the count of loaded catalogs should be 0.
{ createCatalog(CatalogFeatures.defaults()), 0 },
// This catalog loads null catalog with true DEFER,
// and the count of loaded catalogs should be 0.
{ createCatalog(createDeferFeature(DEFER_TRUE)), 0 },
// This catalog loads null catalog with false DEFER.
// It should load all of none-current catalogs and the
// count of loaded catalogs should be 3.
{ createCatalog(createDeferFeature(DEFER_FALSE)), 3 } };
return new Object[][]{
// By default, alternative catalogs are not loaded.
{createCatalog(CatalogFeatures.defaults()), 0},
// Alternative catalogs are not loaded when DEFER is set to true.
{createCatalog(createDeferFeature(DEFER_TRUE)), 0},
// The 3 alternative catalogs are not pre-loaded
//when DEFER is set to false.
{createCatalog(createDeferFeature(DEFER_FALSE)), 3}};
}
private CatalogFeatures createDeferFeature(String defer) {

View File

@ -83,7 +83,7 @@ final class CatalogTestUtils {
* Creates CatalogResolver with a set of catalogs.
*/
static CatalogResolver catalogResolver(String... catalogName) {
return catalogResolver(null, catalogName);
return catalogResolver(CatalogFeatures.defaults(), catalogName);
}
/*
@ -91,15 +91,16 @@ final class CatalogTestUtils {
*/
static CatalogResolver catalogResolver(CatalogFeatures features,
String... catalogName) {
return CatalogManager.catalogResolver(features,
getCatalogPaths(catalogName));
return (catalogName == null) ?
CatalogManager.catalogResolver(features) :
CatalogManager.catalogResolver(features, getCatalogPaths(catalogName));
}
/*
* Creates catalogUriResolver with a set of catalogs.
*/
static CatalogUriResolver catalogUriResolver(String... catalogName) {
return catalogUriResolver(null, catalogName);
return catalogUriResolver(CatalogFeatures.defaults(), catalogName);
}
/*
@ -107,8 +108,9 @@ final class CatalogTestUtils {
*/
static CatalogUriResolver catalogUriResolver(
CatalogFeatures features, String... catalogName) {
return CatalogManager.catalogUriResolver(features,
getCatalogPaths(catalogName));
return (catalogName == null) ?
CatalogManager.catalogUriResolver(features) :
CatalogManager.catalogUriResolver(features, getCatalogPaths(catalogName));
}
// Gets the paths of the specified catalogs.

View File

@ -89,7 +89,7 @@ public class JAXPTestUtilities {
/**
* BOM table for storing BOM header.
*/
private final static Map<String, byte[]> bom = new HashMap();
private final static Map<String, byte[]> bom = new HashMap<>();
/**
* Initialize all BOM headers.

View File

@ -1,5 +1,5 @@
/*
* Copyright (c) 2015, Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 2015, 2016, Oracle and/or its affiliates. All rights reserved.
* 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,14 +27,13 @@ import javax.xml.catalog.CatalogFeatures;
import javax.xml.catalog.CatalogFeatures.Feature;
import javax.xml.catalog.CatalogManager;
import javax.xml.catalog.CatalogResolver;
import javax.xml.catalog.CatalogUriResolver;
import javax.xml.parsers.ParserConfigurationException;
import javax.xml.parsers.SAXParser;
import javax.xml.parsers.SAXParserFactory;
import static jaxp.library.JAXPTestUtilities.getPathByClassName;
import org.testng.Assert;
import org.testng.annotations.DataProvider;
import org.testng.annotations.Test;
import org.w3c.dom.Element;
import org.xml.sax.Attributes;
import org.xml.sax.ErrorHandler;
import org.xml.sax.SAXException;
@ -42,11 +41,65 @@ import org.xml.sax.XMLReader;
import org.xml.sax.ext.DefaultHandler2;
/*
* @bug 8081248
* @bug 8081248, 8144966, 8146606
* @summary Tests basic Catalog functions.
*/
public class CatalogTest {
/*
@bug 8146606
Verifies that the resulting systemId does not contain duplicate slashes
*/
public void testRewriteSystem() {
String catalog = getClass().getResource("rewriteCatalog.xml").getFile();
try {
CatalogResolver resolver = CatalogManager.catalogResolver(CatalogFeatures.defaults(), catalog);
String actualSystemId = resolver.resolveEntity(null, "http://remote.com/dtd/book.dtd").getSystemId();
Assert.assertTrue(!actualSystemId.contains("//"), "result contains duplicate slashes");
} catch (Exception e) {
Assert.fail(e.getMessage());
}
}
/*
@bug 8146606
Verifies that the resulting systemId does not contain duplicate slashes
*/
public void testRewriteUri() {
String catalog = getClass().getResource("rewriteCatalog.xml").getFile();
try {
CatalogUriResolver resolver = CatalogManager.catalogUriResolver(CatalogFeatures.defaults(), catalog);
String actualSystemId = resolver.resolve("http://remote.com/import/import.xsl", null).getSystemId();
Assert.assertTrue(!actualSystemId.contains("//"), "result contains duplicate slashes");
} catch (Exception e) {
Assert.fail(e.getMessage());
}
}
/*
@bug 8144966
Verifies that passing null as CatalogFeatures will result in a NPE.
*/
@Test(expectedExceptions = NullPointerException.class)
public void testFeatureNull() {
CatalogResolver resolver = CatalogManager.catalogResolver(null, "");
}
/*
@bug 8144966
Verifies that passing null as the path will result in a NPE.
*/
@Test(expectedExceptions = NullPointerException.class)
public void testPathNull() {
String path = null;
CatalogResolver resolver = CatalogManager.catalogResolver(CatalogFeatures.defaults(), path);
}
/*
Tests basic catalog feature by using a CatalogResolver instance to
resolve a DTD reference to a locally specified DTD file. If the resolution
@ -61,7 +114,7 @@ public class CatalogTest {
}
String url = getClass().getResource(xml).getFile();
try {
CatalogResolver cr = CatalogManager.catalogResolver(null, catalog);
CatalogResolver cr = CatalogManager.catalogResolver(CatalogFeatures.defaults(), catalog);
XMLReader reader = saxParser.getXMLReader();
reader.setEntityResolver(cr);
MyHandler handler = new MyHandler(saxParser);
@ -84,7 +137,7 @@ public class CatalogTest {
String test = "testInvalidCatalog";
try {
CatalogResolver resolver = CatalogManager.catalogResolver(null, catalog);
CatalogResolver resolver = CatalogManager.catalogResolver(CatalogFeatures.defaults(), catalog);
String actualSystemId = resolver.resolveEntity(null, "http://remote/xml/dtd/sys/alice/docAlice.dtd").getSystemId();
} catch (Exception e) {
String msg = e.getMessage();

View File

@ -0,0 +1,11 @@
<?xml version="1.0" encoding="UTF-8"?>
<catalog
xmlns="urn:oasis:names:tc:entity:xmlns:xml:catalog">
<rewriteSystem systemIdStartString="http://remote.com/dtd"
rewritePrefix="file:///share/docbook/docbook/pass"/>
<rewriteURI uriStartString="http://remote.com/import" rewritePrefix="file:///local/import" />
</catalog>

View File

@ -0,0 +1,202 @@
/*
* Copyright (c) 2016, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute 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 common;
import java.io.ByteArrayInputStream;
import java.io.File;
import java.io.StringReader;
import java.io.UnsupportedEncodingException;
import java.net.URISyntaxException;
import javax.xml.parsers.DocumentBuilderFactory;
import javax.xml.parsers.ParserConfigurationException;
import javax.xml.parsers.SAXParserFactory;
import javax.xml.stream.XMLEventReader;
import javax.xml.stream.XMLInputFactory;
import javax.xml.stream.XMLStreamException;
import javax.xml.stream.XMLStreamReader;
import javax.xml.transform.Source;
import javax.xml.transform.dom.DOMSource;
import javax.xml.transform.sax.SAXSource;
import javax.xml.transform.stax.StAXSource;
import javax.xml.transform.stream.StreamSource;
import org.testng.Assert;
import org.testng.annotations.DataProvider;
import org.testng.annotations.Test;
import org.w3c.dom.Document;
import org.xml.sax.InputSource;
import org.xml.sax.SAXException;
import org.xml.sax.XMLReader;
/*
* @bug 8144967
* @summary Tests related to the javax.xml.transform.Source
* and org.xml.sax.InputSource
*/
public class Sources {
/**
* @bug 8144967
* Tests whether a Source object is empty
* @param source the Source object
*/
@Test(dataProvider = "emptySources")
public void testIsEmpty(Source source) {
Assert.assertTrue(source.isEmpty(), "The source is not empty");
}
/**
* @bug 8144967
* Tests that the source is not empty
* @param source the Source object
*/
@Test(dataProvider = "nonEmptySources")
public void testIsNotEmpty(Source source) {
Assert.assertTrue(!source.isEmpty(), "The source is empty");
}
/**
* @bug 8144967
* Tests whether an InputSource object is empty
* @param source the InputSource object
*/
@Test(dataProvider = "emptyInputSource")
public void testISIsEmpty(InputSource source) {
Assert.assertTrue(source.isEmpty(), "The source is not empty");
}
/*
* DataProvider: sources that are empty
*/
@DataProvider(name = "emptySources")
Object[][] getSources() throws URISyntaxException {
return new Object[][]{
{new DOMSource()},
{new DOMSource(getDocument())},
{new SAXSource()},
{new SAXSource(new InputSource(new StringReader("")))},
{new SAXSource(getXMLReader(), new InputSource(new StringReader("")))},
{new StreamSource()},
{new StreamSource(new ByteArrayInputStream("".getBytes()))},
{new StreamSource(new StringReader(""))},
{new StreamSource(new StringReader(""), null)},
{new StreamSource((String) null)}
};
}
/*
* DataProvider: sources that are not empty
*/
@DataProvider(name = "nonEmptySources")
Object[][] getSourcesEx() throws URISyntaxException {
StAXSource ss = null;
try {
ss = new StAXSource(getXMLEventReader());
} catch (XMLStreamException ex) {}
return new Object[][]{
//This will set a non-null systemId on the resulting StreamSource
{new StreamSource(new File(""))},
//Can't tell because XMLStreamReader is a pull parser, cursor advancement
//would have been required in order to examine the reader.
{new StAXSource(getXMLStreamReader())},
{ss}
};
}
/*
* DataProvider: sources that are empty
*/
@DataProvider(name = "emptyInputSource")
Object[][] getInputSources() throws URISyntaxException {
byte[] utf8Bytes = null;
try {
utf8Bytes = "".getBytes("UTF8");
} catch (UnsupportedEncodingException ex) {
throw new RuntimeException(ex.getMessage());
}
return new Object[][]{
{new InputSource()},
{new InputSource(new ByteArrayInputStream(utf8Bytes))},
{new InputSource(new StringReader(""))},
{new InputSource((String) null)}
};
}
/**
* Returns an instance of Document.
*
* @return an instance of Document.
*/
private Document getDocument() {
Document doc = null;
try {
DocumentBuilderFactory dbf = DocumentBuilderFactory.newInstance();
doc = dbf.newDocumentBuilder().newDocument();
} catch (ParserConfigurationException ex) {}
return doc;
}
/**
* Returns an instance of XMLReader.
*
* @return an instance of XMLReader.
*/
private XMLReader getXMLReader() {
XMLReader reader = null;
try {
reader = SAXParserFactory.newInstance().newSAXParser().getXMLReader();
} catch (ParserConfigurationException | SAXException ex) {}
return reader;
}
/**
* Returns an instance of XMLStreamReader.
*
* @return an instance of XMLStreamReader.
*/
private XMLStreamReader getXMLStreamReader() {
XMLStreamReader r = null;
try {
XMLInputFactory xif = XMLInputFactory.newInstance();
r = xif.createXMLStreamReader(new ByteArrayInputStream("".getBytes()));
} catch (XMLStreamException ex) {}
return r;
}
/**
* Returns an instance of XMLEventReader.
*
* @return an instance of XMLEventReader.
*/
private XMLEventReader getXMLEventReader() {
XMLEventReader r = null;
try {
r = XMLInputFactory.newInstance().createXMLEventReader(
new ByteArrayInputStream("".getBytes()));
} catch (XMLStreamException ex) {}
return r;
}
}

View File

@ -346,3 +346,4 @@ b55cebc47555293cf9c2aefb3bf63c56e847ab19 jdk-9+96
67c84077edc3db6b24998b35970b37c01aae985e jdk-9+98
97b31ca0dd77483cf20ff99a033a455673639578 jdk-9+99
d0a97e57d2336238edf6a4cd60aafe67deb7258d jdk-9+100
3e99318616da903e0dc8f07f9f9203dc1bd49921 jdk-9+101

View File

@ -343,3 +343,5 @@ fdd84b2265ddce7f50e084b7c8635189bba6f012 jdk-9+97
f86ee68d1107dad41a27efc34306e0e56244a12e jdk-9+98
e1a789be1535741274c9779f4d4ca3495196b5c3 jdk-9+99
3d452840f48299a36842760d17c0c8402f0e1266 jdk-9+100
5e8370fb3ed925335164afe340d1e54beab2d4d5 jdk-9+101
6eb3c8132e489dab81adde4ce29844904ce15482 jdk-9+102

View File

@ -38,7 +38,8 @@ include TextFileProcessing.gmk
include ZipArchive.gmk
# Prepare the find cache.
$(eval $(call FillCacheFind, $(JDK_TOPDIR)/src))
$(eval $(call FillCacheFind, $(wildcard $(JDK_TOPDIR)/src/demo \
$(JDK_TOPDIR)/src/*/demo)))
# Append demo goals to this variable.
TARGETS =

83
jdk/make/CompileTools.gmk Normal file
View File

@ -0,0 +1,83 @@
#
# Copyright (c) 2011, 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. Oracle designates this
# particular file as subject to the "Classpath" exception as provided
# by Oracle in the LICENSE file that accompanied this code.
#
# This code is distributed in the hope that it will be useful, but WITHOUT
# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
# FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
# version 2 for more details (a copy is included in the LICENSE file that
# accompanied this code).
#
# You should have received a copy of the GNU General Public License version
# 2 along with this work; if not, write to the Free Software Foundation,
# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
#
# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
# or visit www.oracle.com if you need additional information or have any
# questions.
#
default: all
include $(SPEC)
include MakeBase.gmk
include JavaCompilation.gmk
include SetupJavaCompilers.gmk
################################################################################
JIMAGE_PKGS := \
jdk/internal/jimage \
jdk/internal/jrtfs \
#
$(eval $(call SetupJavaCompilation,BUILD_INTERIM_JIMAGE, \
SETUP := GENERATE_OLDBYTECODE, \
SRC := $(JDK_TOPDIR)/src/java.base/share/classes, \
INCLUDES := $(JIMAGE_PKGS), \
BIN := $(BUILDTOOLS_OUTPUTDIR)/interim_jimage_classes))
TARGETS += $(BUILD_INTERIM_JIMAGE)
# Because of the explicit INCLUDES in the compilation setup above, the service provider
# file will not be copied unless META-INF/services would also be added to the INCLUDES.
# Adding META-INF/services would include all files in that directory when only the one
# is needed, which is why this explicit copy is defined instead.
$(eval $(call SetupCopyFiles,COPY_JIMAGE_SERVICE_PROVIDER, \
SRC := $(JDK_TOPDIR)/src/java.base/share/classes, \
DEST := $(BUILDTOOLS_OUTPUTDIR)/interim_jimage_classes, \
FILES := META-INF/services/java.nio.file.spi.FileSystemProvider))
TARGETS += $(COPY_JIMAGE_SERVICE_PROVIDER)
################################################################################
$(eval $(call SetupJavaCompilation,BUILD_TOOLS_JDK, \
SETUP := GENERATE_OLDBYTECODE, \
ADD_JAVAC_FLAGS := -Xbootclasspath/p:$(call PathList, \
$(BUILDTOOLS_OUTPUTDIR)/interim_jimage_classes \
$(BUILDTOOLS_OUTPUTDIR)/interim_cldrconverter_classes), \
SRC := $(JDK_TOPDIR)/make/src/classes $(BUILDTOOLS_OUTPUTDIR)/interim_cldrconverter_classes, \
BIN := $(BUILDTOOLS_OUTPUTDIR)/jdk_tools_classes, \
COPY := boot.modules ext.modules))
$(BUILD_TOOLS_JDK): $(BUILD_INTERIM_JIMAGE) $(COPY_JIMAGE_SERVICE_PROVIDER)
TARGETS += $(BUILD_TOOLS_JDK)
$(eval $(call SetupCopyFiles,COPY_NIMBUS_TEMPLATES, \
SRC := $(JDK_TOPDIR)/src/java.desktop/share/classes/javax/swing/plaf/nimbus, \
DEST := $(BUILDTOOLS_OUTPUTDIR)/jdk_tools_classes/build/tools/generatenimbus/resources, \
FILES := $(wildcard $(JDK_TOPDIR)/src/java.desktop/share/classes/javax/swing/plaf/nimbus/*.template)))
TARGETS += $(COPY_NIMBUS_TEMPLATES)
################################################################################
all: $(TARGETS)

View File

@ -28,41 +28,38 @@ default: all
include $(SPEC)
include MakeBase.gmk
################################################################################
SAMPLE_TARGET_DIR := $(SUPPORT_OUTPUTDIR)/sample/image
SAMPLE_SOURCE_DIR := $(JDK_TOPDIR)/src/sample/share
SAMPLE_CLOSED_SOURCE_DIR := $(JDK_TOPDIR)/src/closed/sample/share
SAMPLE_SOLARIS_SOURCE_DIR := $(JDK_TOPDIR)/src/sample/solaris
# Exclude the vm directory
SAMPLE_FIND_FILTER := -name vm -prune -o
$(eval $(call SetupCopyFiles, COPY_SHARE_SAMPLES, \
SRC := $(SAMPLE_SOURCE_DIR), \
DEST := $(SAMPLE_TARGET_DIR), \
FILES := $(filter-out $(SAMPLE_SOURCE_DIR)/vm/%, \
$(call CacheFind, $(SAMPLE_SOURCE_DIR))), \
))
SAMPLE_SOURCE := $(shell $(FIND) $(SAMPLE_SOURCE_DIR) $(SAMPLE_FIND_FILTER) -type f -print)
SAMPLE_TARGET := $(subst $(SAMPLE_SOURCE_DIR),$(SAMPLE_TARGET_DIR),$(SAMPLE_SOURCE))
ifndef OPENJDK
# Exclude Main.java in EbayClient dir
SAMPLE_CLOSED_SOURCE := $(shell $(FIND) $(SAMPLE_CLOSED_SOURCE_DIR) -type f -print | $(GREP) -v EbayClient/Main.java)
SAMPLE_CLOSED_TARGET := $(subst $(SAMPLE_CLOSED_SOURCE_DIR),$(SAMPLE_TARGET_DIR),$(SAMPLE_CLOSED_SOURCE))
SAMPLE_TARGET += $(SAMPLE_CLOSED_TARGET)
endif
TARGETS += $(COPY_SHARE_SAMPLES)
ifneq (, $(filter $(OPENJDK_TARGET_OS), solaris macosx))
SAMPLE_SOLARIS_SOURCE := $(shell $(FIND) $(SAMPLE_SOLARIS_SOURCE_DIR) -type f -print)
SAMPLE_SOLARIS_TARGET := $(subst $(SAMPLE_SOLARIS_SOURCE_DIR),$(SAMPLE_TARGET_DIR),$(SAMPLE_SOLARIS_SOURCE))
SAMPLE_TARGET += $(SAMPLE_SOLARIS_TARGET)
$(eval $(call SetupCopyFiles, COPY_SOLARIS_SAMPLES, \
SRC := $(SAMPLE_SOLARIS_SOURCE_DIR), \
DEST := $(SAMPLE_TARGET_DIR), \
FILES := $(call CacheFind, $(SAMPLE_SOLARIS_SOURCE_DIR)), \
))
TARGETS += $(COPY_SOLARIS_SAMPLES)
endif
$(SAMPLE_TARGET_DIR)/dtrace/%: $(SAMPLE_SOLARIS_SOURCE_DIR)/dtrace/%
$(call install-file)
################################################################################
$(SAMPLE_TARGET_DIR)/webservices/%: $(SAMPLE_CLOSED_SOURCE_DIR)/webservices/%
$(call install-file)
$(eval $(call IncludeCustomExtension, jdk, CopySamples.gmk))
$(SAMPLE_TARGET_DIR)/%: $(SAMPLE_SOURCE_DIR)/%
$(call install-file)
################################################################################
COPY_FILES += $(SAMPLE_TARGET)
all: $(TARGETS)
all: $(COPY_FILES)
.PHONY: all
.PHONY: all default

View File

@ -48,7 +48,7 @@ endif
ifneq ($(STATIC_BUILD), true)
JSIG_IMPORT = jsig.*
else
JSIG_IMPORT =
JSIG_IMPORT =
endif
HOTSPOT_BASE_IMPORT_FILES := \

View File

@ -26,31 +26,14 @@
ifndef _TOOLS_GMK
_TOOLS_GMK := 1
default: all
include $(SPEC)
include MakeBase.gmk
include JavaCompilation.gmk
include NativeCompilation.gmk
include SetupJavaCompilers.gmk
################################################################################
$(eval $(call SetupJavaCompilation,BUILD_TOOLS_JDK, \
SETUP := GENERATE_OLDBYTECODE, \
ADD_JAVAC_FLAGS := -Xbootclasspath/p:$(call PathList, \
$(BUILDTOOLS_OUTPUTDIR)/interim_jimage_classes \
$(BUILDTOOLS_OUTPUTDIR)/interim_cldrconverter_classes), \
SRC := $(JDK_TOPDIR)/make/src/classes $(BUILDTOOLS_OUTPUTDIR)/interim_cldrconverter_classes, \
BIN := $(BUILDTOOLS_OUTPUTDIR)/jdk_tools_classes, \
COPY := boot.modules ext.modules))
$(eval $(call SetupCopyFiles,COPY_NIMBUS_TEMPLATES, \
SRC := $(JDK_TOPDIR)/src/java.desktop/share/classes/javax/swing/plaf/nimbus, \
DEST := $(BUILDTOOLS_OUTPUTDIR)/jdk_tools_classes/build/tools/generatenimbus/resources, \
FILES := $(wildcard $(JDK_TOPDIR)/src/java.desktop/share/classes/javax/swing/plaf/nimbus/*.template)))
BUILD_TOOLS_JDK += $(COPY_NIMBUS_TEMPLATES)
# To avoid reevaluating the compilation setup for the tools each time this file
# is included, the actual compilation is handled by CompileTools.gmk. The
# following trick is used to be able to declare a dependency on the built tools.
BUILD_TOOLS_JDK := $(call SetupJavaCompilationCompileTarget, \
BUILD_TOOLS_JDK, $(BUILDTOOLS_OUTPUTDIR)/jdk_tools_classes)
################################################################################
@ -135,34 +118,4 @@ TOOL_IMAGEBUILDER = $(JAVA_SMALL) -Xbootclasspath/p:$(BUILDTOOLS_OUTPUTDIR)/inte
-cp $(call PathList, $(BUILDTOOLS_OUTPUTDIR)/jdk_tools_classes $(JDK_OUTPUTDIR)) \
build.tools.module.ImageBuilder
##########################################################################################
JIMAGE_PKGS := \
jdk/internal/jimage \
jdk/internal/jrtfs \
#
$(eval $(call SetupJavaCompilation,BUILD_INTERIM_JIMAGE, \
SETUP := GENERATE_OLDBYTECODE, \
SRC := $(JDK_TOPDIR)/src/java.base/share/classes, \
INCLUDES := $(JIMAGE_PKGS), \
BIN := $(BUILDTOOLS_OUTPUTDIR)/interim_jimage_classes))
# Because of the explicit INCLUDES in the compilation setup above, the service provider
# file will not be copied unless META-INF/services would also be added to the INCLUDES.
# Adding META-INF/services would include all files in that directory when only the one
# is needed, which is why this explicit copy is defined instead.
$(eval $(call SetupCopyFiles,COPY_JIMAGE_SERVICE_PROVIDER, \
SRC := $(JDK_TOPDIR)/src/java.base/share/classes, \
DEST := $(BUILDTOOLS_OUTPUTDIR)/interim_jimage_classes, \
FILES := META-INF/services/java.nio.file.spi.FileSystemProvider))
##########################################################################################
$(BUILD_TOOLS_JDK): $(BUILD_INTERIM_JIMAGE) $(COPY_JIMAGE_SERVICE_PROVIDER)
java-tools: $(BUILD_TOOLS_JDK)
all: java-tools
endif # _TOOLS_GMK

View File

@ -187,27 +187,31 @@ TARGETS += $(POLICY_DST)
ifeq ($(CACERTS_FILE), )
CACERTS_FILE := $(JDK_TOPDIR)/src/java.base/share/conf/security/cacerts
endif
CACERTS_DST := $(LIB_DST_DIR)/security/cacerts
$(CACERTS_DST): $(CACERTS_FILE)
$(call LogInfo, Copying $(patsubst $(OUTPUT_ROOT)/%, %, $@))
$(call install-file)
TARGETS += $(CACERTS_DST)
################################################################################
$(CONF_DST_DIR)/net.properties: $(JDK_TOPDIR)/src/java.base/share/conf/net.properties
$(ECHO) $(LOG_INFO) Copying $(@F)
$(call install-file)
$(eval $(call SetupCopyFiles, COPY_NET_PROPERTIES, \
FILES := $(JDK_TOPDIR)/src/java.base/share/conf/net.properties, \
DEST := $(CONF_DST_DIR), \
))
TARGETS += $(CONF_DST_DIR)/net.properties
TARGETS += $(COPY_NET_PROPERTIES)
ifeq ($(OPENJDK_TARGET_OS), solaris)
$(CONF_DST_DIR)/sdp/sdp.conf.template: $(JDK_TOPDIR)/src/java.base/$(OPENJDK_TARGET_OS_TYPE)/conf/sdp/sdp.conf.template
$(ECHO) $(LOG_INFO) Copying $(@F)
$(call install-file)
$(eval $(call SetupCopyFiles, COPY_SDP_CONF, \
FILES := $(JDK_TOPDIR)/src/java.base/$(OPENJDK_TARGET_OS_TYPE)/conf/sdp/sdp.conf.template, \
DEST := $(CONF_DST_DIR)/sdp, \
))
TARGETS += $(CONF_DST_DIR)/sdp/sdp.conf.template
TARGETS += $(COPY_SDP_CONF)
endif
################################################################################

View File

@ -725,3 +725,26 @@ v9qpeC45ZA/jelxV11HKbQnVF194gDb7D2H9OsAsRUy8HVKbXEcc/8dKvwOqb+BC
DBabJH1vJ9Gd+KwxMCmBZ6pQPl28JDimhJhI2LNqU349uADQVV0HJosddN/ARyyI
LSIQO7BnNVKVG9Iujf33bvPNeg0qNz5qw+rKKq97Pqeum+L5oKU=
-----END CERTIFICATE-----
// Subject: CN=eDellRoot
// Issuer: CN=eDellRoot
// Serial Number:
// 6b:c5:7b:95:18:93:aa:97:4b:62:4a:c0:88:fc:3b:b6
-----BEGIN CERTIFICATE-----
MIIC8zCCAd+gAwIBAgIQa8V7lRiTqpdLYkrAiPw7tjAJBgUrDgMCHQUAMBQxEjAQ
BgNVBAMTCWVEZWxsUm9vdDAeFw0xNTA0MDcxMDIzMjdaFw0zOTEyMzEyMzU5NTla
MBQxEjAQBgNVBAMTCWVEZWxsUm9vdDCCASIwDQYJKoZIhvcNAQEBBQADggEPADCC
AQoCggEBAL3RJg1uzVuEX0Hw4XWGzs6oI9W+o7HZdVdBMMVb4Gzb4uZjCTNjbPx4
b8LNFL1uArUt+5VVMQDsOTY3Lg/Xe/UNukY2b+0llUOzzBYYpbsFcco4n6SsTvDh
Ni5t+kPo7c23ZrYBPmOu82eEJ6cavs/t39u+wFOkXXwvRCiHA/lWyNWNEPh17+bC
EP3q5N+JrV+6Ho3zQPEv5QUJYdmXsMmD2CMQojeQUj68J91P5w5BKjurG0xjivzh
Soie9ym7VRwLFjWScRuw/9XV6CLqTyL5xrqiiDp1uTOuqNj3uxyts9ocbsoJXuxj
5iEYkSM1nvLupEv+lgy9WqzIEFMm1l8CAwEAAaNJMEcwRQYDVR0BBD4wPIAQYA/f
EzPwmaRcZuSaa/VZ1KEWMBQxEjAQBgNVBAMTCWVEZWxsUm9vdIIQa8V7lRiTqpdL
YkrAiPw7tjAJBgUrDgMCHQUAA4IBAQArfdcScsezj8ooJ92UwwnPgg36noOgiUs5
XzPLP4h0JpUYQVKB9hY1WTDwRUfTKGh7oNOowd027a/rVSb/TNeoiJIvMKn4gbvV
CWAiHhO8u2u0RkHCDVsa7e0i4ncpueWsihjn6jBrY8T+7eDYwiFT/F03A8NJ7mK5
lZA8SFd5CTDy3EBUU5UwzXUc5HoIRUxXSPycu3aIBWawg3sCdKiAoikScPAWj0bM
0vmsP/8QSlTOBqO+QFQ6R82BtTvBNU3qbVICV4QObsxib++FAFL56NApPqskg7Vz
LfNIAjKabHUcjbuZkmg6jr4BfYW7+oQDHCsYgADjjKGdKz/8U/fP
-----END CERTIFICATE-----

View File

@ -68,8 +68,8 @@ BIFILES_TH := $(LD_DATA_PKG_DIR)/th/WordBreakIteratorData_th \
$(BIFILES): $(BASE_DATA_PKG_DIR)/_the.bifiles
$(BASE_DATA_PKG_DIR)/_the.bifiles: JAVA_FLAGS += -Xbootclasspath/p:$(BREAK_ITERATOR_CLASSES)
$(BASE_DATA_PKG_DIR)/_the.bifiles: $(BUILD_TOOLS) $(UNICODEDATA) $(BUILD_BREAKITERATOR)
$(ECHO) $(LOG_INFO) "Generating BreakIteratorData"
$(MKDIR) -p $(@D)
$(call LogInfo, Generating BreakIteratorData)
$(call MakeDir, $(@D))
$(RM) $(BIFILES)
$(TOOL_GENERATEBREAKITERATORDATA) \
-o $(@D) \
@ -79,8 +79,8 @@ $(BASE_DATA_PKG_DIR)/_the.bifiles: $(BUILD_TOOLS) $(UNICODEDATA) $(BUILD_BREAKIT
$(BIFILES_TH): $(LD_DATA_PKG_DIR)/_the.bifiles_th
$(LD_DATA_PKG_DIR)/_the.bifiles_th: JAVA_FLAGS += -Xbootclasspath/p:$(BREAK_ITERATOR_CLASSES)
$(LD_DATA_PKG_DIR)/_the.bifiles_th: $(BUILD_TOOLS) $(UNICODEDATA) $(BUILD_BREAKITERATOR)
$(ECHO) $(LOG_INFO) "Generating BreakIteratorData_th"
$(MKDIR) -p $(@D)/th
$(call LogInfo, Generating BreakIteratorData_th)
$(call MakeDir, $(@D)/th)
$(RM) $(BIFILES_TH)
$(TOOL_GENERATEBREAKITERATORDATA) \
-o $(@D) \

View File

@ -27,7 +27,7 @@ GENDATA_HTML32DTD :=
HTML32DTD = $(JDK_OUTPUTDIR)/modules/java.desktop/javax/swing/text/html/parser/html32.bdtd
$(HTML32DTD): $(BUILD_TOOLS_JDK)
$(ECHO) "Generating HTML DTD file"
$(call LogInfo, Generating HTML DTD file)
$(MKDIR) -p $(@D)
$(RM) $@
($(TOOL_DTDBUILDER) $(LOG_INFO) html32 > $@) || exit 1

View File

@ -87,8 +87,7 @@ $(eval $(call SetupJarArchive, BUILD_US_EXPORT_POLICY_JAR, \
$(US_EXPORT_POLICY_JAR_LIMITED): \
$(US_EXPORT_POLICY_JAR_UNLIMITED)
$(ECHO) $(LOG_INFO) \
Copying unlimited $(patsubst $(OUTPUT_ROOT)/%,%,$@)
$(call LogInfo, Copying unlimited $(patsubst $(OUTPUT_ROOT)/%,%,$@))
$(install-file)
TARGETS += $(US_EXPORT_POLICY_JAR_LIMITED) $(US_EXPORT_POLICY_JAR_UNLIMITED)
@ -99,7 +98,7 @@ ifeq ($(UNLIMITED_CRYPTO), true)
else
$(US_EXPORT_POLICY_JAR_DST): $(US_EXPORT_POLICY_JAR_LIMITED)
$(install-file)
endif
endif
ifndef OPENJDK
ifneq ($(UNLIMITED_CRYPTO), true)

View File

@ -46,30 +46,34 @@ $(CHARSET_DONE_CS)-extcs: $(CHARSET_DATA_DIR)/charsets \
$(wildcard $(CHARSET_DATA_DIR)/$(CHARSET_STANDARD_OS)) \
$(CHARSET_TEMPLATES) $(CHARSET_EXTENDED_JAVA_TEMPLATES) \
$(BUILD_TOOLS_JDK)
$(MKDIR) -p $(@D)
$(call LogInfo, Generating jdk.charsets extcs)
$(call MakeDir, $(@D))
$(TOOL_CHARSETMAPPING) $(CHARSET_DATA_DIR) $(CHARSET_GENSRC_JAVA_DIR_CS) \
extcs charsets $(CHARSET_STANDARD_OS) \
$(CHARSET_EXTENDED_JAVA_TEMPLATES) \
$(CHARSET_EXTENDED_JAVA_DIR) \
$(CHARSET_COPYRIGHT_HEADER) \
$(LOG_INFO)
$(LOG_DEBUG)
$(TOUCH) '$@'
$(CHARSET_DONE_CS)-hkscs: $(CHARSET_COPYRIGHT_HEADER)/HKSCS.java \
$(BUILD_TOOLS_JDK)
$(MKDIR) -p $(@D)
$(call LogInfo, Generating jdk.charsets hkscs)
$(call MakeDir, $(@D))
$(TOOL_CHARSETMAPPING) $(CHARSET_DATA_DIR) $(CHARSET_GENSRC_JAVA_DIR_CS) hkscs '$<'
$(TOUCH) '$@'
$(CHARSET_DONE_CS)-euctw: $(CHARSET_COPYRIGHT_HEADER)/EUC_TW.java \
$(BUILD_TOOLS_JDK)
$(MKDIR) -p $(@D)
$(call LogInfo, Generating jdk.charsets euctw)
$(call MakeDir, $(@D))
$(TOOL_CHARSETMAPPING) $(CHARSET_DATA_DIR) $(CHARSET_GENSRC_JAVA_DIR_CS) euctw '$<'
$(TOUCH) '$@'
$(CHARSET_GENSRC_JAVA_DIR_CS)/sjis0213.dat: $(CHARSET_DATA_DIR)/sjis0213.map \
$(BUILD_TOOLS_JDK)
$(MKDIR) -p $(@D)
$(call LogInfo, Generating $(patsubst $(OUTPUT_ROOT)/%, %, $@))
$(call MakeDir, $(@D))
$(TOOL_CHARSETMAPPING) '$<' '$@' sjis0213
GENSRC_JDK_CHARSETS += \
@ -86,4 +90,3 @@ jdk.charsets: $(GENSRC_JDK_CHARSETS)
all: jdk.charsets
.PHONY: all jdk.charsets

View File

@ -40,19 +40,18 @@ $(HEADER_FILE): $(JDWP_SPEC_FILE) $(BUILD_TOOLS_JDK)
# Touch the target of this rule at the end to avoid triggering false rebuilds
$(JAVA_FILE): $(JDWP_SPEC_FILE) $(BUILD_TOOLS_JDK) $(HEADER_FILE)
$(MKDIR) -p $(@D)
$(MKDIR) -p $(SUPPORT_OUTPUTDIR)/headers/jdk.jdwp.agent
$(call LogInfo, Creating JDWP.java and JDWPCommands.h from jdwp.spec)
$(call MakeDir, $(@D) $(SUPPORT_OUTPUTDIR)/headers/jdk.jdwp.agent)
$(RM) $@ $(SUPPORT_OUTPUTDIR)/headers/jdk.jdwp.agent/JDWPCommands.h
$(ECHO) $(LOG_INFO) Creating JDWP.java and JDWPCommands.h from jdwp.spec
$(TOOL_JDWPGEN) $< -jdi $@ -include \
$(SUPPORT_OUTPUTDIR)/headers/jdk.jdwp.agent/JDWPCommands.h
$(TOUCH) $@
$(SUPPORT_OUTPUTDIR)/gensrc/jdk.jdi/jdwp-protocol.html: $(JDWP_SPEC_FILE) \
$(BUILD_TOOLS_JDK)
$(MKDIR) -p $(@D)
$(call LogInfo, Creating $(@F) from jdwp.spec)
$(call MakeDir, $(@D))
$(RM) $@
$(ECHO) $(LOG_INFO) Creating $(@F) from jdwp.spec
$(TOOL_JDWPGEN) $< -doc $@
GENSRC_JDWP := $(SUPPORT_OUTPUTDIR)/gensrc/jdk.jdi/com/sun/tools/jdi/JDWP.java \
@ -63,14 +62,14 @@ GENSRC_JDK_JDI += $(GENSRC_JDWP)
################################################################################
define process-provider
$(MKDIR) -p $(@D)
$(call MakeDir, $(@D))
$(CAT) $^ | $(SED) -e "s/^#\[$(OPENJDK_TARGET_OS)\]//" > $@
endef
# Filter com.sun.jdi.connect.Connector
$(SUPPORT_OUTPUTDIR)/gensrc/jdk.jdi/META-INF/services/com.sun.jdi.connect.Connector: \
$(JDK_TOPDIR)/src/jdk.jdi/share/classes/META-INF/services/com.sun.jdi.connect.Connector \
$(HOTSPOT_TOPDIR)/agent/src/share/classes/META-INF/services/com.sun.jdi.connect.Connector
$(HOTSPOT_TOPDIR)/src/jdk.hotspot.agent/share/classes/META-INF/services/com.sun.jdi.connect.Connector
$(process-provider)
# Copy the same service file into jdk.hotspot.agent so that they are kept the same.

View File

@ -23,7 +23,7 @@
# questions.
#
GENSRC_BUFFER :=
GENSRC_BUFFER :=
GENSRC_BUFFER_DST := $(SUPPORT_OUTPUTDIR)/gensrc/java.base/java/nio
@ -31,9 +31,9 @@ GENSRC_BUFFER_SRC := $(JDK_TOPDIR)/src/java.base/share/classes/java/nio
###
$(GENSRC_BUFFER_DST)/_the.buffer.dir:
$(ECHO) "Generating buffer classes"
$(MKDIR) -p $(@D)
$(GENSRC_BUFFER_DST)/_the.buffer.dir:
$(call LogInfo, Generating buffer classes)
$(call MakeDir, $(@D))
$(TOUCH) $@
define fixRw

View File

@ -35,8 +35,8 @@ UNICODEDATA = $(JDK_TOPDIR)/make/data/unicodedata
define SetupCharacterData
$(SUPPORT_OUTPUTDIR)/gensrc/java.base/java/lang/$1.java: \
$(CHARACTERDATA)/$1.java.template
$(MKDIR) -p $$(@D)
$(ECHO) $(LOG_INFO) Generating $1.java
$$(call LogInfo, Generating $1.java)
$$(call MakeDir, $$(@D))
$(TOOL_GENERATECHARACTER) $2 \
-template $(CHARACTERDATA)/$1.java.template \
-spec $(UNICODEDATA)/UnicodeData.txt \
@ -56,7 +56,7 @@ $(eval $(call SetupCharacterData,CharacterData0E, -plane 14, 11 4 1))
# Copy two Java files that need no preprocessing.
$(SUPPORT_OUTPUTDIR)/gensrc/java.base/java/lang/%.java: $(CHARACTERDATA)/%.java.template
$(ECHO) $(LOG_INFO) Generating $(@F)
$(call LogInfo, Generating $(@F))
$(call install-file)
GENSRC_CHARACTERDATA += $(SUPPORT_OUTPUTDIR)/gensrc/java.base/java/lang/CharacterDataUndefined.java \

View File

@ -44,13 +44,13 @@ $(CHARSET_DONE_BASE)-stdcs: $(CHARSET_DATA_DIR)/charsets \
$(wildcard $(CHARSET_DATA_DIR)/$(CHARSET_STANDARD_OS)) \
$(CHARSET_TEMPLATES) $(CHARSET_STANDARD_JAVA_TEMPLATES) \
$(BUILD_TOOLS_JDK)
$(MKDIR) -p $(@D)
$(call LogInfo, Generating java.base charset mapping)
$(call MakeDir, $(@D))
$(TOOL_CHARSETMAPPING) $(CHARSET_DATA_DIR) $(CHARSET_GENSRC_JAVA_DIR_BASE) \
stdcs charsets $(CHARSET_STANDARD_OS) \
$(CHARSET_STANDARD_JAVA_TEMPLATES) $(CHARSET_EXTSRC_DIR) \
$(CHARSET_COPYRIGHT_HEADER) \
$(LOG_INFO)
$(LOG_DEBUG)
$(TOUCH) '$@'
GENSRC_JAVA_BASE += $(CHARSET_DONE_BASE)-stdcs

View File

@ -32,21 +32,12 @@ GENSRC_EXCEPTIONS_CMD := $(JDK_TOPDIR)/make/scripts/genExceptions.sh
GENSRC_EXCEPTIONS_SRC_DIRS := . charset channels
###
$(GENSRC_EXCEPTIONS_DST)/_the.exceptions.dir:
$(ECHO) "Generating exceptions classes"
$(MKDIR) -p $(@D)
$(TOUCH) $@
###
$(GENSRC_EXCEPTIONS_DST)/_the.%.marker: $(GENSRC_EXCEPTIONS_SRC)/%/exceptions \
$(GENSRC_EXCEPTIONS_CMD) \
$(GENSRC_EXCEPTIONS_DST)/_the.exceptions.dir
$(MKDIR) -p $(@D)/$*
SCRIPTS="$(JDK_TOPDIR)/make/scripts" NAWK="$(NAWK)" SH="$(SH)" $(SH) $(GENSRC_EXCEPTIONS_CMD) $< $(@D)/$* $(LOG_INFO)
$(GENSRC_EXCEPTIONS_CMD)
$(call LogInfo, Generating exceptions java.nio $*)
$(call MakeDir, $(@D)/$*)
SCRIPTS="$(JDK_TOPDIR)/make/scripts" NAWK="$(NAWK)" SH="$(SH)" $(SH) \
$(GENSRC_EXCEPTIONS_CMD) $< $(@D)/$* $(LOG_DEBUG)
$(TOUCH) $@
GENSRC_EXCEPTIONS += $(foreach D,$(GENSRC_EXCEPTIONS_SRC_DIRS),$(GENSRC_EXCEPTIONS_DST)/_the.$(D).marker)

View File

@ -65,8 +65,8 @@ GENSRC_AWT_ICONS_DST_NAME = AWTIcon$(2)_$(subst .,_,$(subst -,_,$(1)))
################################################################################
$(GENSRC_AWT_ICONS_TMP)/_the.icons.dir:
$(ECHO) Generating icon classes
$(MKDIR) -p $(GENSRC_AWT_ICONS_DST)
$(call LogInfo, Generating icon classes)
$(call MakeDir, $(GENSRC_AWT_ICONS_DST))
$(TOUCH) $@
################################################################################
@ -121,8 +121,9 @@ ifeq ($(OPENJDK_TARGET_OS), macosx)
endif
$(GENSRC_OSX_ICONS): $(GENSRC_OSX_ICONS_SRC) $(BUILD_TOOLS_JDK)
$(call LogInfo, Generating $(patsubst $(OUTPUT_ROOT)/%, %, $@))
$(call MakeDir, $(@D))
$(RM) $@ $@.tmp
$(MKDIR) -p $(dir $@)
$(ECHO) "static unsigned char sAWTIconData[] = { " >> $@.tmp
$(CAT) $< | $(TOOL_OSX_TOBIN) >> $@.tmp
$(ECHO) "};" >> $@.tmp

View File

@ -28,8 +28,9 @@
# into LocaleDataMetaInfo.java
# First go look for all locale files
LOCALE_FILES := $(shell $(FIND) $(JDK_TOPDIR)/src/java.base/share/classes \
$(JDK_TOPDIR)/src/jdk.localedata/share/classes \
LOCALE_FILES := $(shell $(FIND) \
$(JDK_TOPDIR)/src/$(MODULE)/share/classes/sun/text/resources \
$(JDK_TOPDIR)/src/$(MODULE)/share/classes/sun/util/resources \
-name "FormatData_*.java" -o -name "FormatData_*.properties" -o \
-name "CollationData_*.java" -o -name "CollationData_*.properties" -o \
-name "TimeZoneNames_*.java" -o -name "TimeZoneNames_*.properties" -o \
@ -42,17 +43,21 @@ LOCALE_FILES := $(shell $(FIND) $(JDK_TOPDIR)/src/java.base/share/classes \
LOCALE_RESOURCES := $(sort $(subst .properties,,$(subst .java,,$(notdir $(LOCALE_FILES)))))
# Include the list of resources found during the previous compile.
-include $(SUPPORT_OUTPUTDIR)/gensrc/_the.locale_resources
-include $(SUPPORT_OUTPUTDIR)/gensrc/$(MODULE)/_the.locale_resources
MISSING_RESOURCES := $(filter-out $(LOCALE_RESOURCES), $(PREV_LOCALE_RESOURCES))
NEW_RESOURCES := $(filter-out $(PREV_LOCALE_RESOURCES), $(LOCALE_RESOURCES))
ifneq (, $(MISSING_RESOURCES)$(NEW_RESOURCES))
# There is a difference in the number of supported resources. Trigger a regeneration.
$(shell $(RM) $(SUPPORT_OUTPUTDIR)/gensrc/java.base/sun/util/locale/provider/BaseLocaleDataMetaInfo.java \
$(SUPPORT_OUTPUTDIR)/gensrc/jdk.localedata/sun/util/resources/provider/NonBaseLocaleDataMetaInfo.java \
$(SUPPORT_OUTPUTDIR)/gensrc/java.base/sun/util/cldr/CLDRBaseLocaleDataMetaInfo.java \
$(SUPPORT_OUTPUTDIR)/gensrc/jdk.localedata/sun/util/resources/cldr/provider/CLDRLocaleDataMetaInfo_jdk_localedata.java)
ifeq ($(MODULE), java.base)
$(shell $(RM) $(SUPPORT_OUTPUTDIR)/gensrc/java.base/sun/util/locale/provider/BaseLocaleDataMetaInfo.java \
$(SUPPORT_OUTPUTDIR)/gensrc/java.base/sun/util/cldr/CLDRBaseLocaleDataMetaInfo.java)
endif
ifeq ($(MODULE), jdk.localedata)
$(shell $(RM) $(SUPPORT_OUTPUTDIR)/gensrc/jdk.localedata/sun/util/resources/provider/NonBaseLocaleDataMetaInfo.java \
$(SUPPORT_OUTPUTDIR)/gensrc/jdk.localedata/sun/util/resources/cldr/provider/CLDRLocaleDataMetaInfo_jdk_localedata.java)
endif
endif
# The base locales
@ -121,18 +126,18 @@ SED_NONBASEARGS += -e 's/$(HASH)AvailableLocales_Locales$(HASH)/$(sort $(ALL_NON
$(SUPPORT_OUTPUTDIR)/gensrc/java.base/sun/util/locale/provider/BaseLocaleDataMetaInfo.java: \
$(JDK_TOPDIR)/src/java.base/share/classes/sun/util/locale/provider/LocaleDataMetaInfo-XLocales.java.template
$(call LogInfo, Creating sun/util/locale/provider/BaseLocaleDataMetaInfo.java from $(words $(LOCALE_RESOURCES)) found resources)
$(MKDIR) -p $(@D)
$(ECHO) Creating sun/util/locale/provider/BaseLocaleDataMetaInfo.java from $(words $(LOCALE_RESOURCES)) found resources.
$(PRINTF) "PREV_LOCALE_RESOURCES:=$(LOCALE_RESOURCES)" \
> $(SUPPORT_OUTPUTDIR)/gensrc/_the.locale_resources
> $(SUPPORT_OUTPUTDIR)/gensrc/java.base/_the.locale_resources
$(SED) $(SED_BASEARGS) $< > $@
$(SUPPORT_OUTPUTDIR)/gensrc/jdk.localedata/sun/util/resources/provider/NonBaseLocaleDataMetaInfo.java: \
$(JDK_TOPDIR)/src/java.base/share/classes/sun/util/locale/provider/LocaleDataMetaInfo-XLocales.java.template
$(call LogInfo, Creating sun/util/resources/provider/NonBaseLocaleDataMetaInfo.java from $(words $(LOCALE_RESOURCES)) found resources)
$(MKDIR) -p $(@D)
$(ECHO) Creating sun/util/resources/provider/NonBaseLocaleDataMetaInfo.java from $(words $(LOCALE_RESOURCES)) found resources.
$(PRINTF) "PREV_LOCALE_RESOURCES:=$(LOCALE_RESOURCES)" \
> $(SUPPORT_OUTPUTDIR)/gensrc/_the.locale_resources
> $(SUPPORT_OUTPUTDIR)/gensrc/jdk.localedata/_the.locale_resources
$(SED) $(SED_NONBASEARGS) $< > $@
GENSRC_BASELOCALEDATA := $(SUPPORT_OUTPUTDIR)/gensrc/java.base/sun/util/locale/provider/BaseLocaleDataMetaInfo.java

View File

@ -50,7 +50,7 @@ GENSRC_SOR_BIN := $(BUILDTOOLS_OUTPUTDIR)/native/genSocketOptionRegistry
SOR_COPYRIGHT_YEARS = $(shell $(CAT) $(GENSRC_SOR_SRC)/$(GENSRC_SOR_SRC_FILE) | \
$(NAWK) '/^.*Copyright.*Oracle/ { printf "%s %s",$$4,$$5 }')
$(eval $(call SetupNativeCompilation,BUILD_GENSRC_SOR_EXE, \
$(eval $(call SetupNativeCompilation, BUILD_GENSRC_SOR_EXE, \
SRC := $(GENSRC_SOR_SRC), \
INCLUDE_FILES := $(GENSRC_SOR_SRC_FILE), \
TOOLCHAIN := TOOLCHAIN_BUILD, \
@ -86,7 +86,7 @@ ifneq ($(OPENJDK_TARGET_OS), windows)
UC_COPYRIGHT_YEARS = $(shell $(CAT) $(GENSRC_UC_SRC)/$(GENSRC_UC_SRC_FILE) | \
$(NAWK) '/^.*Copyright.*Oracle/ { printf "%s %s",$$4,$$5 }')
$(eval $(call SetupNativeCompilation,BUILD_GENSRC_UC_EXE, \
$(eval $(call SetupNativeCompilation, BUILD_GENSRC_UC_EXE, \
SRC := $(GENSRC_UC_SRC), \
INCLUDE_FILES := $(GENSRC_UC_SRC_FILE), \
TOOLCHAIN := TOOLCHAIN_BUILD, \
@ -124,7 +124,7 @@ ifeq ($(OPENJDK_TARGET_OS), solaris)
SOL_COPYRIGHT_YEARS = $(shell $(CAT) $(GENSRC_SOL_SRC)/$(GENSRC_SOL_SRC_FILE) | \
$(NAWK) '/^.*Copyright.*Oracle/ { printf "%s %s",$$4,$$5 }')
$(eval $(call SetupNativeCompilation,BUILD_GENSRC_SOL_EXE, \
$(eval $(call SetupNativeCompilation, BUILD_GENSRC_SOL_EXE, \
SRC := $(GENSRC_SOL_SRC), \
INCLUDE_FILES := $(GENSRC_SOL_SRC_FILE), \
TOOLCHAIN := TOOLCHAIN_BUILD, \

View File

@ -75,7 +75,7 @@ define SetupCompilePropertiesBody
# Convert .../src/<module>/share/classes/com/sun/tools/javac/resources/javac_zh_CN.properties
# to .../support/gensrc/<module>/com/sun/tools/javac/resources/javac_zh_CN.java
# Strip away prefix and suffix, leaving for example only:
# Strip away prefix and suffix, leaving for example only:
# "<module>/share/classes/com/sun/tools/javac/resources/javac_zh_CN"
$1_JAVAS := $$(patsubst $$($1_MODULE_PATH_ROOT)/%, \
$(SUPPORT_OUTPUTDIR)/gensrc/%, \

View File

@ -31,12 +31,11 @@ NIMBUS_GENSRC_DIR = $(SUPPORT_OUTPUTDIR)/gensrc/java.desktop/javax/swing/plaf/ni
NIMBUS_SKIN_FILE = $(JDK_TOPDIR)/src/java.desktop/share/classes/javax/swing/plaf/nimbus/skin.laf
$(SUPPORT_OUTPUTDIR)/gensrc/java.desktop/_the.generated_nimbus: $(NIMBUS_SKIN_FILE) $(BUILD_TOOLS_JDK)
$(call LogInfo, Generating Nimbus source files)
$(MKDIR) -p $(@D)
$(ECHO) "Generating Nimbus source files"
$(TOOL_GENERATENIMBUS) $(LOG_INFO) \
$(TOOL_GENERATENIMBUS) $(LOG_DEBUG) \
-skinFile $(NIMBUS_SKIN_FILE) -buildDir $(SUPPORT_OUTPUTDIR)/gensrc/java.desktop \
-packagePrefix $(NIMBUS_PACKAGE).nimbus -lafName Nimbus
$(ECHO) $(LOG_INFO) "Finished generating Nimbus source files"
$(TOUCH) $@
GENSRC_SWING_NIMBUS := $(SUPPORT_OUTPUTDIR)/gensrc/java.desktop/_the.generated_nimbus

View File

@ -63,14 +63,14 @@ GENSRC_X11_SIZES_USED := $(addprefix $(GENSRC_X11WRAPPERS_TMP)/sizes., $(GENSRC_
# Copy only the sizes.* files that are actually needed. WrapperGenerator picks up any it finds from the
# file prefix it is given so those not needed need to be hidden.
$(GENSRC_X11WRAPPERS_TMP)/sizes.%: $(GENSRC_SIZER_DIR)/sizes.%
$(MKDIR) -p $(@D)
$(call MakeDir, $(@D))
$(RM) '$@'
$(SORT) $< > $@
# Run the tool on the offset files copied from the source repository to generate several Java classes
# used in awt.
$(SUPPORT_OUTPUTDIR)/gensrc/java.desktop/_the.generated.x11: $(GENSRC_X11_SIZES_USED) $(BUILD_TOOLS_JDK)
$(MKDIR) -p $(GENSRC_X11WRAPPERS_DST)
$(call MakeDir, $(GENSRC_X11WRAPPERS_DST))
$(TOOL_WRAPPERGENERATOR) $(GENSRC_X11WRAPPERS_DST) $(GENSRC_SIZER_DIR)/xlibtypes.txt "gen" $(GENSRC_X11WRAPPERS_TMP)/sizes
$(TOUCH) $@
@ -82,8 +82,8 @@ ifneq ($(COMPILE_TYPE), cross)
# Generate the C code for the program that will output the offset file.
$(GENSRC_X11WRAPPERS_TMP)/sizer.%.c: $(GENSRC_SIZER_DIR)/xlibtypes.txt $(BUILD_TOOLS_JDK)
$(ECHO) "Generating X11 wrapper ($*-bit version)"
$(MKDIR) -p $(@D)
$(call LogInfo, Generating X11 wrapper ($*-bit version))
$(call MakeDir, $(@D))
$(TOOL_WRAPPERGENERATOR) $(@D) $(GENSRC_SIZER_DIR)/xlibtypes.txt "sizer" $*
# use -m32/-m64 only if the compiler supports it
@ -103,7 +103,7 @@ ifneq ($(COMPILE_TYPE), cross)
# Compile the C code into an executable.
$(GENSRC_X11WRAPPERS_TMP)/sizer.%.exe: $(GENSRC_X11WRAPPERS_TMP)/sizer.%.c
$(MKDIR) -p $(@D)
$(call MakeDir, $(@D))
(cd $(@D) && $(CC) $(MEMORY_MODEL_FLAG) -o $@ $< \
$(X_CFLAGS) \
$(X_LIBS) \
@ -114,9 +114,9 @@ ifneq ($(COMPILE_TYPE), cross)
# Run the executable create the offset file and check that it is identical
# to the offset file in the source code repository.
$(GENSRC_X11WRAPPERS_TMP)/sizes.%.verification: $(GENSRC_X11WRAPPERS_TMP)/sizer.%.exe
$(MKDIR) -p $(@D)
$(call LogInfo, Verifying X11 wrapper sizes)
$(call MakeDir, $(@D))
$(GENSRC_X11WRAPPERS_TMP)/sizer.$*.exe | $(SORT) > $@.tmp
$(ECHO) Verifying $(GENSRC_X11WRAPPERS_TMP)/sizes.$*.verification.tmp to $(GENSRC_X11WRAPPERS_TMP)/sizes.$*
$(DIFF) $(GENSRC_X11WRAPPERS_TMP)/sizes.$*.verification.tmp $(GENSRC_X11WRAPPERS_TMP)/sizes.$*
mv $@.tmp $@

View File

@ -130,7 +130,6 @@ ifneq ($(BUILD_JEXEC_SRC), )
LDFLAGS := $(LDFLAGS_JDKEXE), \
OBJECT_DIR := $(SUPPORT_OUTPUTDIR)/native/$(MODULE)/jexec_obj, \
OUTPUT_DIR := $(BUILD_JEXEC_DST_DIR), \
DEBUG_SYMBOLS := true, \
PROGRAM := jexec))
TARGETS += $(BUILD_JEXEC)

View File

@ -45,7 +45,6 @@ ifeq ($(OPENJDK_TARGET_OS), windows)
OBJECT_DIR := $(SUPPORT_OUTPUTDIR)/native/jdk.accessibility/jabswitch, \
OUTPUT_DIR := $(SUPPORT_OUTPUTDIR)/modules_cmds/jdk.accessibility, \
PROGRAM := jabswitch, \
DEBUG_SYMBOLS := true, \
VERSIONINFO_RESOURCE := $(ACCESSBRIDGE_SRC)/AccessBridgeStatusWindow.RC, \
RC_FLAGS := $(RC_FLAGS) \
-D "JDK_FNAME=jabswitch.exe" \
@ -79,7 +78,6 @@ ifeq ($(OPENJDK_TARGET_OS), windows)
OBJECT_DIR := $(SUPPORT_OUTPUTDIR)/native/jdk.accessibility/jaccessinspector$1, \
OUTPUT_DIR := $(SUPPORT_OUTPUTDIR)/modules_cmds/jdk.accessibility, \
PROGRAM := jaccessinspector$1, \
DEBUG_SYMBOLS := true, \
VERSIONINFO_RESOURCE := $(TOPDIR)/jaccessinspector/jaccessinspectorWindow.rc, \
RC_FLAGS := $$(RC_FLAGS) \
-D "JDK_FNAME=jaccessinspector$1.exe" \
@ -107,7 +105,6 @@ ifeq ($(OPENJDK_TARGET_OS), windows)
OBJECT_DIR := $(SUPPORT_OUTPUTDIR)/native/jdk.accessibility/jaccesswalker$1, \
OUTPUT_DIR := $(SUPPORT_OUTPUTDIR)/modules_cmds/jdk.accessibility, \
PROGRAM := jaccesswalker$1, \
DEBUG_SYMBOLS := true, \
VERSIONINFO_RESOURCE := $(TOPDIR)/jaccesswalker/jaccesswalkerWindow.rc, \
RC_FLAGS := $$(RC_FLAGS) \
-D "JDK_FNAME=jaccesswalker$1.exe" \

View File

@ -100,7 +100,6 @@ $(eval $(call SetupNativeCompilation,BUILD_UNPACKEXE, \
-D "JDK_FNAME=unpack200.exe" \
-D "JDK_INTERNAL_NAME=unpack200" \
-D "JDK_FTYPE=0x1L", \
DEBUG_SYMBOLS := true, \
MANIFEST := $(JDK_TOPDIR)/src/jdk.pack200/windows/native/unpack200/unpack200_proto.exe.manifest, \
MANIFEST_VERSION := $(VERSION_NUMBER_FOUR_POSITIONS), \
))

View File

@ -25,15 +25,6 @@
include NativeCompilation.gmk
# SetupNativeCompilation now supports debug symbols on macosx for hotspot.
# Disable it here for the jdk binaries until we decide to enable them.
ifeq ($(OPENJDK_TARGET_OS), macosx)
ENABLE_DEBUG_SYMBOLS := false
endif
# Prepare the find cache.
$(eval $(call FillCacheFind, $(JDK_TOPDIR)/src/java.base/share/native/launcher))
ifeq ($(OPENJDK_TARGET_OS), macosx)
ORIGIN_ARG := $(call SET_EXECUTABLE_ORIGIN)
else
@ -124,7 +115,7 @@ define SetupBuildLauncherBody
$1_LDFLAGS += -exported_symbols_list \
$(SUPPORT_OUTPUTDIR)/build-static/exported.symbols
$1_LIBS += \
$(shell $(FIND) $(SUPPORT_OUTPUTDIR)/modules_libs/java.base -name "*.a") \
$$(shell $(FIND) $(SUPPORT_OUTPUTDIR)/modules_libs/java.base -name "*.a") \
$(SUPPORT_OUTPUTDIR)/modules_libs/jdk.jdwp.agent/libdt_socket.a \
$(SUPPORT_OUTPUTDIR)/modules_libs/jdk.jdwp.agent/libjdwp.a \
$(SUPPORT_OUTPUTDIR)/native/java.base/$(LIBRARY_PREFIX)fdlibm$(STATIC_LIBRARY_SUFFIX) \
@ -174,8 +165,7 @@ define SetupBuildLauncherBody
endif
$$(eval $$(call SetupNativeCompilation, BUILD_LAUNCHER_$1, \
SRC := $(LAUNCHER_SRC), \
INCLUDE_FILES := main.c, \
EXTRA_FILES := $(LAUNCHER_SRC)/main.c, \
OPTIMIZATION := $$($1_OPTIMIZATION), \
CFLAGS := $$($1_CFLAGS) \
$(LAUNCHER_CFLAGS) \
@ -204,7 +194,6 @@ define SetupBuildLauncherBody
OBJECT_DIR := $(SUPPORT_OUTPUTDIR)/native/$(MODULE)/$1_objs, \
OUTPUT_DIR := $$($1_OUTPUT_DIR), \
PROGRAM := $1, \
DEBUG_SYMBOLS := true, \
VERSIONINFO_RESOURCE := $$($1_VERSION_INFO_RESOURCE), \
RC_FLAGS := $$(RC_FLAGS) \
-D "JDK_FNAME=$1$(EXE_SUFFIX)" \

View File

@ -69,7 +69,7 @@ $(eval $(call SetupNativeCompilation,BUILD_LIBMLIB_IMAGE, \
-D "JDK_INTERNAL_NAME=mlib_image" \
-D "JDK_FTYPE=0x2L", \
OBJECT_DIR := $(SUPPORT_OUTPUTDIR)/native/$(MODULE)/libmlib_image, \
DEBUG_SYMBOLS := $(DEBUG_ALL_BINARIES)))
))
$(BUILD_LIBMLIB_IMAGE): $(call FindLib, java.base, java)
@ -134,7 +134,7 @@ ifeq ($(OPENJDK_TARGET_OS)-$(OPENJDK_TARGET_CPU_ARCH), solaris-sparc)
$(call SET_SHARED_LIBRARY_ORIGIN), \
LIBS := -ljava -ljvm -lc $(BUILD_LIBMLIB_LDLIBS), \
OBJECT_DIR := $(SUPPORT_OUTPUTDIR)/native/$(MODULE)/libmlib_image_v, \
DEBUG_SYMBOLS := $(DEBUG_ALL_BINARIES)))
))
$(BUILD_LIBMLIB_IMAGE_V): $(call FindLib, java.base, java)
@ -279,7 +279,7 @@ $(eval $(call SetupNativeCompilation,BUILD_LIBAWT, \
-D "JDK_INTERNAL_NAME=awt" \
-D "JDK_FTYPE=0x2L", \
OBJECT_DIR := $(SUPPORT_OUTPUTDIR)/native/$(MODULE)/libawt, \
DEBUG_SYMBOLS := $(DEBUG_ALL_BINARIES)))
))
$(BUILD_LIBAWT): $(call FindLib, java.base, java)
@ -369,7 +369,7 @@ ifeq ($(findstring $(OPENJDK_TARGET_OS),windows macosx),)
-D "JDK_INTERNAL_NAME=xawt" \
-D "JDK_FTYPE=0x2L", \
OBJECT_DIR := $(SUPPORT_OUTPUTDIR)/native/$(MODULE)/libawt_xawt, \
DEBUG_SYMBOLS := $(DEBUG_ALL_BINARIES)))
))
$(BUILD_LIBAWT_XAWT): $(call FindLib, java.base, java)
@ -433,7 +433,7 @@ $(eval $(call SetupNativeCompilation,BUILD_LIBLCMS, \
-D "JDK_INTERNAL_NAME=lcms" \
-D "JDK_FTYPE=0x2L", \
OBJECT_DIR := $(SUPPORT_OUTPUTDIR)/native/$(MODULE)/liblcms, \
DEBUG_SYMBOLS := $(DEBUG_ALL_BINARIES)))
))
TARGETS += $(BUILD_LIBLCMS)
@ -509,7 +509,7 @@ $(eval $(call SetupNativeCompilation,BUILD_LIBJAVAJPEG, \
-D "JDK_FTYPE=0x2L", \
REORDER := $(BUILD_LIBJAVAJPEG_REORDER), \
OBJECT_DIR := $(SUPPORT_OUTPUTDIR)/native/$(MODULE)/libjavajpeg, \
DEBUG_SYMBOLS := $(DEBUG_ALL_BINARIES)))
))
$(BUILD_LIBJAVAJPEG): $(call FindLib, java.base, java)
@ -578,7 +578,7 @@ ifeq ($(BUILD_HEADLESS), true)
LIBS_linux := -lm $(LIBDL), \
LIBS_solaris := -lm $(LIBDL) $(LIBCXX) -lc, \
OBJECT_DIR := $(SUPPORT_OUTPUTDIR)/native/$(MODULE)/libawt_headless, \
DEBUG_SYMBOLS := $(DEBUG_ALL_BINARIES)))
))
$(BUILD_LIBAWT_HEADLESS): $(BUILD_LIBAWT)
@ -700,7 +700,7 @@ $(eval $(call SetupNativeCompilation,BUILD_LIBFONTMANAGER, \
-D "JDK_INTERNAL_NAME=fontmanager" \
-D "JDK_FTYPE=0x2L", \
OBJECT_DIR := $(SUPPORT_OUTPUTDIR)/native/$(MODULE)/libfontmanager, \
DEBUG_SYMBOLS := $(DEBUG_ALL_BINARIES)))
))
$(BUILD_LIBFONTMANAGER): $(BUILD_LIBAWT)
@ -745,12 +745,13 @@ ifeq ($(OPENJDK_TARGET_OS), windows)
-D "JDK_INTERNAL_NAME=jawt" \
-D "JDK_FTYPE=0x2L", \
OBJECT_DIR := $(SUPPORT_OUTPUTDIR)/native/$(MODULE)/libjawt, \
DEBUG_SYMBOLS := $(DEBUG_ALL_BINARIES)))
))
$(BUILD_LIBJAWT): $(BUILD_LIBAWT)
$(JDK_OUTPUTDIR)/lib/$(LIBRARY_PREFIX)jawt$(STATIC_LIBRARY_SUFFIX): $(BUILD_LIBJAWT)
$(ECHO) Copying $(@F)
$(call LogInfo, Copying $(patsubst $(OUTPUT_ROOT)/%, %, $@))
$(call MakeDir, $(@D))
$(CP) $(SUPPORT_OUTPUTDIR)/native/$(MODULE)/libjawt/$(LIBRARY_PREFIX)jawt$(STATIC_LIBRARY_SUFFIX) $@
TARGETS += $(JDK_OUTPUTDIR)/lib/$(LIBRARY_PREFIX)jawt$(STATIC_LIBRARY_SUFFIX)
@ -804,7 +805,7 @@ else # OPENJDK_TARGET_OS not windows
LIBS_solaris := $(X_LIBS) -lXrender, \
LIBS_macosx := -framework Cocoa, \
OBJECT_DIR := $(SUPPORT_OUTPUTDIR)/native/$(MODULE)/libjawt, \
DEBUG_SYMBOLS := $(DEBUG_ALL_BINARIES)))
))
ifndef BUILD_HEADLESS_ONLY
$(BUILD_LIBJAWT): $(BUILD_LIBAWT_XAWT)
@ -926,7 +927,7 @@ ifndef BUILD_HEADLESS_ONLY
-D "JDK_INTERNAL_NAME=splashscreen" \
-D "JDK_FTYPE=0x2L", \
OBJECT_DIR := $(SUPPORT_OUTPUTDIR)/native/$(MODULE)/libsplashscreen, \
DEBUG_SYMBOLS := $(DEBUG_ALL_BINARIES)))
))
TARGETS += $(BUILD_LIBSPLASHSCREEN)
@ -1002,7 +1003,7 @@ ifeq ($(OPENJDK_TARGET_OS), macosx)
-framework OpenGL \
-framework QuartzCore -ljava, \
OBJECT_DIR := $(SUPPORT_OUTPUTDIR)/native/$(MODULE)/libawt_lwawt, \
DEBUG_SYMBOLS := $(DEBUG_ALL_BINARIES)))
))
TARGETS += $(BUILD_LIBAWT_LWAWT)
@ -1044,7 +1045,7 @@ ifeq ($(OPENJDK_TARGET_OS), macosx)
-framework JavaRuntimeSupport \
-ljava -ljvm, \
OBJECT_DIR := $(SUPPORT_OUTPUTDIR)/native/$(MODULE)/libosxui, \
DEBUG_SYMBOLS := $(DEBUG_ALL_BINARIES)))
))
TARGETS += $(BUILD_LIBOSXUI)

View File

@ -25,6 +25,10 @@
WIN_VERIFY_LIB := $(SUPPORT_OUTPUTDIR)/native/$(MODULE)/libverify/verify.lib
# Hook to include the corresponding custom file, if present.
$(eval $(call IncludeCustomExtension, jdk, lib/CoreLibraries.gmk))
##########################################################################################
# libfdlibm is statically linked with libjava below and not delivered into the
# product on its own.
@ -51,7 +55,7 @@ ifneq ($(OPENJDK_TARGET_OS), macosx)
DISABLED_WARNINGS_microsoft := 4146 4244 4018, \
ARFLAGS := $(ARFLAGS), \
OBJECT_DIR := $(SUPPORT_OUTPUTDIR)/native/$(MODULE)/libfdlibm, \
DEBUG_SYMBOLS := $(DEBUG_ALL_BINARIES)))
))
else
@ -64,7 +68,7 @@ else
CFLAGS := $(CFLAGS_JDKLIB) $(LIBFDLIBM_CFLAGS), \
LDFLAGS := -nostdlib -r -arch x86_64, \
OBJECT_DIR := $(SUPPORT_OUTPUTDIR)/native/$(MODULE)/libfdlibm, \
DEBUG_SYMBOLS := $(DEBUG_ALL_BINARIES)))
))
BUILD_LIBFDLIBM := $(SUPPORT_OUTPUTDIR)/native/$(MODULE)/$(LIBRARY_PREFIX)fdlibm$(STATIC_LIBRARY_SUFFIX)
$(BUILD_LIBFDLIBM): $(BUILD_LIBFDLIBM_MAC)
@ -82,7 +86,7 @@ endif
LIBVERIFY_OPTIMIZATION := HIGH
ifneq ($(findstring $(OPENJDK_TARGET_OS), solaris linux), )
ifeq ($(ENABLE_DEBUG_SYMBOLS), true)
ifeq ($(COMPILE_WITH_DEBUG_SYMBOLS), true)
LIBVERIFY_OPTIMIZATION := LOW
endif
endif
@ -106,7 +110,7 @@ $(eval $(call SetupNativeCompilation,BUILD_LIBVERIFY, \
-D "JDK_FTYPE=0x2L", \
REORDER := $(BUILD_LIBVERIFY_REORDER), \
OBJECT_DIR := $(SUPPORT_OUTPUTDIR)/native/$(MODULE)/libverify, \
DEBUG_SYMBOLS := true))
))
TARGETS += $(BUILD_LIBVERIFY)
@ -119,6 +123,9 @@ LIBJAVA_CFLAGS := $(addprefix -I, $(LIBJAVA_SRC_DIRS)) \
-I$(SUPPORT_OUTPUTDIR)/headers/java.base \
-DARCHPROPNAME='"$(OPENJDK_TARGET_CPU_OSARCH)"'
# Make it possible to override this variable
LIBJAVA_MAPFILE ?= $(JDK_TOPDIR)/make/mapfiles/libjava/mapfile-vers
ifeq ($(OPENJDK_TARGET_OS), macosx)
BUILD_LIBJAVA_java_props_md.c_CFLAGS := -x objective-c
BUILD_LIBJAVA_java_props_macosx.c_CFLAGS := -x objective-c
@ -146,7 +153,7 @@ $(eval $(call SetupNativeCompilation,BUILD_LIBJAVA, \
System.c_CFLAGS := $(VERSION_CFLAGS), \
jdk_util.c_CFLAGS := $(VERSION_CFLAGS), \
DISABLED_WARNINGS_solstudio := E_STATEMENT_NOT_REACHED, \
MAPFILE := $(JDK_TOPDIR)/make/mapfiles/libjava/mapfile-vers, \
MAPFILE := $(LIBJAVA_MAPFILE), \
LDFLAGS := $(LDFLAGS_JDKLIB) \
$(call SET_SHARED_LIBRARY_ORIGIN), \
LDFLAGS_macosx := -L$(SUPPORT_OUTPUTDIR)/native/$(MODULE)/, \
@ -171,7 +178,7 @@ $(eval $(call SetupNativeCompilation,BUILD_LIBJAVA, \
-D "JDK_FTYPE=0x2L", \
REORDER := $(LIBJAVA_REORDER), \
OBJECT_DIR := $(SUPPORT_OUTPUTDIR)/native/$(MODULE)/libjava, \
DEBUG_SYMBOLS := $(DEBUG_ALL_BINARIES)))
))
TARGETS += $(BUILD_LIBJAVA)
@ -228,8 +235,7 @@ $(eval $(call SetupNativeCompilation,BUILD_LIBZIP, \
-D "JDK_INTERNAL_NAME=zip" \
-D "JDK_FTYPE=0x2L", \
OBJECT_DIR := $(SUPPORT_OUTPUTDIR)/native/$(MODULE)/libzip, \
DEBUG_SYMBOLS := $(DEBUG_ALL_BINARIES)))
))
$(BUILD_LIBZIP): $(BUILD_LIBJAVA)
@ -273,7 +279,7 @@ $(eval $(call SetupNativeCompilation,BUILD_LIBJIMAGE, \
-D "JDK_INTERNAL_NAME=jimage" \
-D "JDK_FTYPE=0x2L", \
OBJECT_DIR := $(SUPPORT_OUTPUTDIR)/native/$(MODULE)/libjimage, \
DEBUG_SYMBOLS := $(DEBUG_ALL_BINARIES)))
))
$(BUILD_LIBJIMAGE): $(BUILD_LIBJAVA)
@ -389,7 +395,7 @@ $(eval $(call SetupNativeCompilation,BUILD_LIBJLI, \
-D "JDK_INTERNAL_NAME=jli" \
-D "JDK_FTYPE=0x2L", \
OBJECT_DIR := $(SUPPORT_OUTPUTDIR)/native/$(MODULE)/libjli, \
DEBUG_SYMBOLS := $(DEBUG_ALL_BINARIES)))
))
TARGETS += $(BUILD_LIBJLI)
@ -407,7 +413,7 @@ ifeq ($(OPENJDK_TARGET_OS), windows)
CFLAGS := $(STATIC_LIBRARY_FLAGS) $(LIBJLI_CFLAGS), \
ARFLAGS := $(ARFLAGS), \
OBJECT_DIR := $(SUPPORT_OUTPUTDIR)/native/$(MODULE)/libjli_static, \
DEBUG_SYMBOLS := $(DEBUG_ALL_BINARIES)))
))
TARGETS += $(BUILD_LIBJLI_STATIC)
@ -426,7 +432,7 @@ else ifeq ($(OPENJDK_TARGET_OS), macosx)
CFLAGS := $(CFLAGS_JDKLIB) $(LIBJLI_CFLAGS), \
LDFLAGS := -nostdlib -r, \
OBJECT_DIR := $(SUPPORT_OUTPUTDIR)/native/$(MODULE)/libjli_static, \
DEBUG_SYMBOLS := $(DEBUG_ALL_BINARIES)))
))
ifeq ($(STATIC_BUILD), true)
TARGETS += $(BUILD_LIBJLI_STATIC)

View File

@ -49,7 +49,7 @@ ifeq ($(STATIC_BUILD), true)
JAVA_BASE_EXPORT_SYMBOL_FILE := $(SUPPORT_OUTPUTDIR)/modules_libs/java.base/java.base.symbols
$(JAVA_BASE_EXPORT_SYMBOL_FILE): $(JAVA_BASE_EXPORT_SYMBOLS_SRC)
$(ECHO) $(LOG_INFO) "Generating java.base.symbols file"
$(call LogInfo, Generating java.base.symbols file)
$(CAT) $^ > $@
# The individual symbol files is generated when the respective lib is built

View File

@ -84,7 +84,7 @@ $(eval $(call SetupNativeCompilation,BUILD_LIBINSTRUMENT, \
-D "JDK_INTERNAL_NAME=instrument" \
-D "JDK_FTYPE=0x2L", \
OBJECT_DIR := $(SUPPORT_OUTPUTDIR)/native/$(MODULE)/libinstrument, \
DEBUG_SYMBOLS := true))
))
ifneq (, $(findstring $(OPENJDK_TARGET_OS), macosx windows aix))
$(BUILD_LIBINSTRUMENT): $(SUPPORT_OUTPUTDIR)/native/java.base/$(LIBRARY_PREFIX)jli_static$(STATIC_LIBRARY_SUFFIX)

View File

@ -40,7 +40,7 @@ LIBMANAGEMENT_CFLAGS := -I$(JDK_TOPDIR)/src/java.management/share/native/include
LIBMANAGEMENT_OPTIMIZATION := HIGH
ifneq ($(findstring $(OPENJDK_TARGET_OS), solaris linux), )
ifeq ($(ENABLE_DEBUG_SYMBOLS), true)
ifeq ($(COMPILE_WITH_DEBUG_SYMBOLS), true)
LIBMANAGEMENT_OPTIMIZATION := LOW
endif
endif
@ -64,7 +64,7 @@ $(eval $(call SetupNativeCompilation,BUILD_LIBMANAGEMENT, \
-D "JDK_INTERNAL_NAME=management" \
-D "JDK_FTYPE=0x2L", \
OBJECT_DIR := $(SUPPORT_OUTPUTDIR)/native/$(MODULE)/libmanagement, \
DEBUG_SYMBOLS := true))
))
$(BUILD_LIBMANAGEMENT): $(call FindLib, java.base, java)

View File

@ -55,7 +55,7 @@ $(eval $(call SetupNativeCompilation,BUILD_LIBPREFS, \
-D "JDK_INTERNAL_NAME=prefs" \
-D "JDK_FTYPE=0x2L", \
OBJECT_DIR := $(SUPPORT_OUTPUTDIR)/native/$(MODULE)/libprefs, \
DEBUG_SYMBOLS := $(DEBUG_ALL_BINARIES)))
))
$(BUILD_LIBPREFS): $(call FindLib, java.base, java)

View File

@ -46,7 +46,7 @@ ifneq ($(OPENJDK_TARGET_OS), windows)
LIBS := $(LIBDL), \
LIBS_solaris := -lc, \
OBJECT_DIR := $(SUPPORT_OUTPUTDIR)/native/$(MODULE)/libj2gss, \
DEBUG_SYMBOLS := $(DEBUG_ALL_BINARIES)))
))
TARGETS += $(BUILD_LIBJ2GSS)
endif
@ -92,7 +92,7 @@ ifneq ($(BUILD_CRYPTO), no)
-D "JDK_INTERNAL_NAME=$(BUILD_LIBKRB5_NAME)" \
-D "JDK_FTYPE=0x2L", \
OBJECT_DIR := $(SUPPORT_OUTPUTDIR)/native/$(MODULE)/libkrb5, \
DEBUG_SYMBOLS := $(DEBUG_ALL_BINARIES)))
))
TARGETS += $(BUILD_LIBKRB5)
endif

View File

@ -52,7 +52,7 @@ $(eval $(call SetupNativeCompilation,BUILD_LIBJ2PCSC, \
-D "JDK_INTERNAL_NAME=j2pcsc" \
-D "JDK_FTYPE=0x2L", \
OBJECT_DIR := $(SUPPORT_OUTPUTDIR)/native/$(MODULE)/libj2pcsc, \
DEBUG_SYMBOLS := $(DEBUG_ALL_BINARIES)))
))
TARGETS += $(BUILD_LIBJ2PCSC)

View File

@ -61,7 +61,7 @@ ifeq ($(OPENJDK_TARGET_OS), windows)
-D "JDK_INTERNAL_NAME=javaaccessbridge$1" \
-D "JDK_FTYPE=0x02L", \
OBJECT_DIR := $(SUPPORT_OUTPUTDIR)/native/$(MODULE)/libjavaaccessbridge$1, \
DEBUG_SYMBOLS := true)
)
$$(BUILD_JAVAACCESSBRIDGE$1): $(SUPPORT_OUTPUTDIR)/native/java.desktop/libjawt/jawt.lib
@ -91,7 +91,7 @@ ifeq ($(OPENJDK_TARGET_OS), windows)
-D "JDK_INTERNAL_NAME=windowsaccessbridge$1" \
-D "JDK_FTYPE=0x02L", \
OBJECT_DIR := $(SUPPORT_OUTPUTDIR)/native/$(MODULE)/libwindowsaccessbridge$1, \
DEBUG_SYMBOLS := true)
)
TARGETS += $$(BUILD_WINDOWSACCESSBRIDGE$1)
@ -113,7 +113,7 @@ ifeq ($(OPENJDK_TARGET_OS), windows)
-D "JDK_INTERNAL_NAME=jabsysinfo" \
-D "JDK_FTYPE=0x02L", \
OBJECT_DIR := $(SUPPORT_OUTPUTDIR)/native/$(MODULE)/lib/libjabsysinfo, \
DEBUG_SYMBOLS := true)
)
TARGETS += $$(BUILD_ACCESSBRIDGESYSINFO)

View File

@ -56,7 +56,7 @@ $(eval $(call SetupNativeCompilation,BUILD_LIBATTACH, \
LIBS_solaris := -ldoor, \
LIBS_windows := $(WIN_JAVA_LIB) advapi32.lib psapi.lib, \
OBJECT_DIR := $(SUPPORT_OUTPUTDIR)/native/$(MODULE)/libattach, \
DEBUG_SYMBOLS := true))
))
$(BUILD_LIBATTACH): $(call FindLib, java.base, java)

View File

@ -68,7 +68,7 @@ ifeq ($(ENABLE_INTREE_EC), yes)
-D "JDK_INTERNAL_NAME=sunec" \
-D "JDK_FTYPE=0x2L", \
OBJECT_DIR := $(SUPPORT_OUTPUTDIR)/native/$(MODULE)/libsunec, \
DEBUG_SYMBOLS := $(DEBUG_ALL_BINARIES)))
))
TARGETS += $(BUILD_LIBSUNEC)
endif

View File

@ -47,7 +47,7 @@ ifeq ($(OPENJDK_TARGET_OS), windows)
-D "JDK_INTERNAL_NAME=sunmscapi" \
-D "JDK_FTYPE=0x2L", \
OBJECT_DIR := $(SUPPORT_OUTPUTDIR)/native/$(MODULE)/libsunmscapi, \
DEBUG_SYMBOLS := $(DEBUG_ALL_BINARIES)))
))
TARGETS += $(BUILD_LIBSUNMSCAPI)
endif

View File

@ -51,7 +51,7 @@ $(eval $(call SetupNativeCompilation,BUILD_LIBJ2PKCS11, \
-D "JDK_INTERNAL_NAME=j2pkcs11" \
-D "JDK_FTYPE=0x2L", \
OBJECT_DIR := $(SUPPORT_OUTPUTDIR)/native/$(MODULE)/libj2pkcs11, \
DEBUG_SYMBOLS := $(DEBUG_ALL_BINARIES)))
))
TARGETS += $(BUILD_LIBJ2PKCS11)

View File

@ -44,7 +44,7 @@ ifeq ($(OPENJDK_TARGET_OS), solaris)
LIBS := $(LIBDL), \
LIBS_solaris := -lc, \
OBJECT_DIR := $(SUPPORT_OUTPUTDIR)/native/$(MODULE)/libj2ucrypto, \
DEBUG_SYMBOLS := $(DEBUG_ALL_BINARIES)))
))
$(BUILD_LIBJ2UCRYPTO): $(BUILD_LIBJAVA)

View File

@ -57,7 +57,7 @@ ifeq ($(OPENJDK_TARGET_OS), macosx)
-framework SystemConfiguration \
$(JDKLIB_LIBS), \
OBJECT_DIR := $(SUPPORT_OUTPUTDIR)/native/$(MODULE)/libosx, \
DEBUG_SYMBOLS := $(DEBUG_ALL_BINARIES)))
))
TARGETS += $(BUILD_LIBOSX)

View File

@ -51,7 +51,7 @@ ifeq ($(OPENJDK_TARGET_OS), windows)
-D "JDK_INTERNAL_NAME=le" \
-D "JDK_FTYPE=0x2L", \
OBJECT_DIR := $(SUPPORT_OUTPUTDIR)/native/$(MODULE)/lible, \
DEBUG_SYMBOLS := $(DEBUG_ALL_BINARIES)))
))
TARGETS += $(BUILD_LIBLE)

View File

@ -55,7 +55,7 @@ ifeq ($(OPENJDK_TARGET_OS), windows)
-D "JDK_INTERNAL_NAME=dt_shmem" \
-D "JDK_FTYPE=0x2L", \
OBJECT_DIR := $(SUPPORT_OUTPUTDIR)/native/$(MODULE)/libdt_shmem, \
DEBUG_SYMBOLS := $(DEBUG_ALL_BINARIES)))
))
TARGETS += $(BUILD_LIBDT_SHMEM)

View File

@ -56,7 +56,7 @@ $(eval $(call SetupNativeCompilation,BUILD_LIBDT_SOCKET, \
-D "JDK_INTERNAL_NAME=dt_socket" \
-D "JDK_FTYPE=0x2L", \
OBJECT_DIR := $(SUPPORT_OUTPUTDIR)/native/$(MODULE)/libdt_socket, \
DEBUG_SYMBOLS := true))
))
$(BUILD_LIBDT_SOCKET): $(call FindLib, java.base, java)
@ -95,7 +95,7 @@ $(eval $(call SetupNativeCompilation,BUILD_LIBJDWP, \
-D "JDK_INTERNAL_NAME=jdwp" \
-D "JDK_FTYPE=0x2L", \
OBJECT_DIR := $(SUPPORT_OUTPUTDIR)/native/$(MODULE)/libjdwp, \
DEBUG_SYMBOLS := true))
))
$(BUILD_LIBJDWP): $(call FindLib, java.base, java)
@ -111,7 +111,7 @@ ifeq ($(STATIC_BUILD), true)
JDK_JDWP_AGENT_EXPORT_SYMBOL_FILE := $(SUPPORT_OUTPUTDIR)/modules_libs/jdk.jdwp.agent/jdk.jdwp.agent.symbols
$(JDK_JDWP_AGENT_EXPORT_SYMBOL_FILE): $(JDK_JDWP_AGENT_EXPORT_SYMBOLS_SRC)
$(ECHO) $(LOG_INFO) "Generating jdk.jdwp.agent symbols file"
$(call LogInfo, Generating jdk.jdwp.agent symbols file)
$(CAT) $^ > $@
# The individual symbol files is generated when the respective lib is built

View File

@ -48,7 +48,7 @@ endif
LIBMANAGEMENT_EXT_OPTIMIZATION := HIGH
ifneq ($(findstring $(OPENJDK_TARGET_OS), solaris linux), )
ifeq ($(ENABLE_DEBUG_SYMBOLS), true)
ifeq ($(COMPILE_WITH_DEBUG_SYMBOLS), true)
LIBMANAGEMENT_EXT_OPTIMIZATION := LOW
endif
endif
@ -73,7 +73,7 @@ $(eval $(call SetupNativeCompilation,BUILD_LIBMANAGEMENT_EXT, \
-D "JDK_INTERNAL_NAME=management_ext" \
-D "JDK_FTYPE=0x2L", \
OBJECT_DIR := $(SUPPORT_OUTPUTDIR)/native/$(MODULE)/libmanagement_ext, \
DEBUG_SYMBOLS := true))
))
$(BUILD_LIBMANAGEMENT_EXT): $(call FindLib, java.base, java)

View File

@ -52,7 +52,7 @@ $(eval $(call SetupNativeCompilation,BUILD_LIBUNPACK, \
-D "JDK_FNAME=unpack.dll" \
-D "JDK_INTERNAL_NAME=unpack" \
-D "JDK_FTYPE=0x2L", \
DEBUG_SYMBOLS := $(DEBUG_ALL_BINARIES)))
))
$(BUILD_LIBUNPACK): $(call FindLib, java.base, java)

View File

@ -53,7 +53,7 @@ ifeq ($(OPENJDK_TARGET_OS_TYPE), unix)
LIBS_linux := -lpthread $(LIBDL), \
LIBS_solaris := -lsocket -lc, \
OBJECT_DIR := $(SUPPORT_OUTPUTDIR)/native/$(MODULE)/libsctp, \
DEBUG_SYMBOLS := $(DEBUG_ALL_BINARIES)))
))
TARGETS += $(BUILD_LIBSCTP)

View File

@ -55,7 +55,7 @@ $(eval $(call SetupNativeCompilation,BUILD_LIBJAAS, \
-D "JDK_INTERNAL_NAME=$(LIBJAAS_NAME)" \
-D "JDK_FTYPE=0x2L", \
OBJECT_DIR := $(SUPPORT_OUTPUTDIR)/native/$(MODULE)/libjaas, \
DEBUG_SYMBOLS := $(DEBUG_ALL_BINARIES)))
))
$(BUILD_LIBJAAS): $(call FindLib, java.base, java)

View File

@ -23,40 +23,24 @@
# questions.
#
include $(SPEC)
include MakeBase.gmk
include NativeCompilation.gmk
# Hook to include the corresponding custom file, if present.
$(eval $(call IncludeCustomExtension, jdk, lib/LibCommon.gmk))
################################################################################
GLOBAL_VERSION_INFO_RESOURCE := $(JDK_TOPDIR)/src/java.base/windows/native/common/version.rc
# Absolute paths to lib files on windows for use in LDFLAGS. Should figure out a more
# elegant solution to this.
WIN_JAVA_LIB := $(SUPPORT_OUTPUTDIR)/native/java.base/libjava/java.lib
ifdef OPENJDK
# Build everything with debugging on OpenJDK
DEBUG_ALL_BINARIES := true
else
# Use this variable to set DEBUG_SYMBOLS true on windows for all libraries, but
# not on other platforms.
ifeq ($(OPENJDK_TARGET_OS), windows)
DEBUG_ALL_BINARIES := true
else
DEBUG_ALL_BINARIES := false
endif
endif
# SetupNativeCompilation now supports debug symbols on macosx for hotspot.
# Disable it here for the jdk libraries until we decide to enable them.
ifeq ($(OPENJDK_TARGET_OS), macosx)
ENABLE_DEBUG_SYMBOLS := false
endif
################################################################################
# Find the default set of src dirs for a native library.
# Param 1 - module name
# Param 2 - library name
FindSrcDirsForLib = \
FindSrcDirsForLib += \
$(call uniq, $(wildcard \
$(JDK_TOPDIR)/src/$(strip $1)/$(OPENJDK_TARGET_OS)/native/lib$(strip $2) \
$(JDK_TOPDIR)/src/$(strip $1)/$(OPENJDK_TARGET_OS_TYPE)/native/lib$(strip $2) \
@ -87,3 +71,5 @@ ifeq ($(USE_EXTERNAL_LIBZ), true)
else
ZLIB_CPPFLAGS := -I$(JDK_TOPDIR)/src/java.base/share/native/libzip/zlib-1.2.8
endif
###############################################################################

View File

@ -52,7 +52,7 @@ $(eval $(call SetupNativeCompilation,BUILD_LIBNET, \
-D "JDK_INTERNAL_NAME=net" \
-D "JDK_FTYPE=0x2L", \
OBJECT_DIR := $(SUPPORT_OUTPUTDIR)/native/$(MODULE)/libnet, \
DEBUG_SYMBOLS := $(DEBUG_ALL_BINARIES)))
))
$(BUILD_LIBNET): $(BUILD_LIBJAVA)

View File

@ -91,7 +91,7 @@ $(eval $(call SetupNativeCompilation,BUILD_LIBNIO, \
-D "JDK_INTERNAL_NAME=nio" \
-D "JDK_FTYPE=0x2L", \
OBJECT_DIR := $(SUPPORT_OUTPUTDIR)/native/$(MODULE)/libnio, \
DEBUG_SYMBOLS := $(DEBUG_ALL_BINARIES)))
))
TARGETS += $(BUILD_LIBNIO)

View File

@ -54,7 +54,7 @@ ifeq ($(OPENJDK_TARGET_OS), macosx)
-framework IOSurface \
-framework QuartzCore, \
OBJECT_DIR := $(SUPPORT_OUTPUTDIR)/native/$(MODULE)/libosxapp, \
DEBUG_SYMBOLS := $(DEBUG_ALL_BINARIES)))
))
TARGETS += $(BUILD_LIBOSXAPP)

View File

@ -54,7 +54,7 @@ ifeq ($(OPENJDK_TARGET_OS), macosx)
-framework Security \
$(JDKLIB_LIBS), \
OBJECT_DIR := $(SUPPORT_OUTPUTDIR)/native/$(MODULE)/libosxsecurity, \
DEBUG_SYMBOLS := $(DEBUG_ALL_BINARIES)))
))
$(BUILD_LIBOSXSECURITY): $(BUILD_LIBJAVA)

View File

@ -138,7 +138,7 @@ $(eval $(call SetupNativeCompilation,BUILD_LIBJSOUND, \
-D "JDK_INTERNAL_NAME=jsound" \
-D "JDK_FTYPE=0x2L", \
OBJECT_DIR := $(SUPPORT_OUTPUTDIR)/native/$(MODULE)/libjsound, \
DEBUG_SYMBOLS := $(DEBUG_ALL_BINARIES)))
))
$(BUILD_LIBJSOUND): $(BUILD_LIBJAVA)
@ -173,7 +173,7 @@ ifneq ($(filter jsoundalsa, $(EXTRA_SOUND_JNI_LIBS)), )
$(call SET_SHARED_LIBRARY_ORIGIN), \
LIBS := $(ALSA_LIBS) -ljava -ljvm, \
OBJECT_DIR := $(SUPPORT_OUTPUTDIR)/native/$(MODULE)/libjsoundalsa, \
DEBUG_SYMBOLS := $(DEBUG_ALL_BINARIES)))
))
$(BUILD_LIBJSOUNDALSA): $(BUILD_LIBJAVA)
@ -204,7 +204,7 @@ ifneq ($(filter jsoundds, $(EXTRA_SOUND_JNI_LIBS)), )
-D "JDK_INTERNAL_NAME=jsoundds" \
-D "JDK_FTYPE=0x2L", \
OBJECT_DIR := $(SUPPORT_OUTPUTDIR)/native/$(MODULE)/libjsoundds, \
DEBUG_SYMBOLS := $(DEBUG_ALL_BINARIES)))
))
$(BUILD_LIBJSOUNDDS): $(BUILD_LIBJAVA)

View File

@ -1,5 +1,5 @@
/*
* Copyright (c) 2008, 2013, Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 2008, 2015, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
@ -32,9 +32,10 @@ import java.util.regex.*;
* Spp: A simple regex-based stream preprocessor based on Mark Reinhold's
* sed-based spp.sh
*
* Usage: java build.tools.spp.Spp [-be] [-Kkey] -Dvar=value ... <in >out
* Usage: java build.tools.spp.Spp [-be] [-nel] [-Kkey] -Dvar=value ... <in >out
*
* Source-file constructs
* If -nel is declared then empty lines will not be substituted for lines of
* text in the template that do not appear in the output.
*
* Meaningful only at beginning of line, works with any number of keys:
*
@ -64,9 +65,10 @@ import java.util.regex.*;
public class Spp {
public static void main(String args[]) throws Exception {
Map<String, String> vars = new HashMap<String, String>();
Set<String> keys = new HashSet<String>();
Map<String, String> vars = new HashMap<>();
Set<String> keys = new HashSet<>();
boolean be = false;
boolean el = true;
for (String arg:args) {
if (arg.startsWith("-D")) {
@ -76,8 +78,10 @@ public class Spp {
keys.add(arg.substring(2));
} else if ("-be".equals(arg)) {
be = true;
} else if ("-nel".equals(arg)) {
el = false;
} else {
System.err.println("Usage: java build.tools.spp.Spp [-be] [-Kkey] -Dvar=value ... <in >out");
System.err.println("Usage: java build.tools.spp.Spp [-be] [-nel] [-Kkey] -Dvar=value ... <in >out");
System.exit(-1);
}
}
@ -85,7 +89,7 @@ public class Spp {
StringBuffer out = new StringBuffer();
new Spp().spp(new Scanner(System.in),
out, "",
keys, vars, be,
keys, vars, be, el,
false);
System.out.print(out.toString());
}
@ -93,7 +97,7 @@ public class Spp {
static final String LNSEP = System.getProperty("line.separator");
static final String KEY = "([a-zA-Z0-9]+)";
static final String VAR = "([a-zA-Z0-9_\\-]+)";
static final String TEXT = "([a-zA-Z0-9&;,.<>/#() \\$]+)"; // $ -- hack embedded $var$
static final String TEXT = "([a-zA-Z0-9&;,.<>/#() \\?\\[\\]\\$]+)"; // $ -- hack embedded $var$
static final int GN_NOT = 1;
static final int GN_KEY = 2;
@ -101,11 +105,11 @@ public class Spp {
static final int GN_NO = 5;
static final int GN_VAR = 6;
Matcher ifkey = Pattern.compile("^#if\\[(!)?" + KEY + "\\]").matcher("");
Matcher elsekey = Pattern.compile("^#else\\[(!)?" + KEY + "\\]").matcher("");
Matcher endkey = Pattern.compile("^#end\\[(!)?" + KEY + "\\]").matcher("");
Matcher vardef = Pattern.compile("\\{#if\\[(!)?" + KEY + "\\]\\?" + TEXT + "(:"+ TEXT + ")?\\}|\\$" + VAR + "\\$").matcher("");
Matcher vardef2 = Pattern.compile("\\$" + VAR + "\\$").matcher("");
final Matcher ifkey = Pattern.compile("^#if\\[(!)?" + KEY + "\\]").matcher("");
final Matcher elsekey = Pattern.compile("^#else\\[(!)?" + KEY + "\\]").matcher("");
final Matcher endkey = Pattern.compile("^#end\\[(!)?" + KEY + "\\]").matcher("");
final Matcher vardef = Pattern.compile("\\{#if\\[(!)?" + KEY + "\\]\\?" + TEXT + "(:"+ TEXT + ")?\\}|\\$" + VAR + "\\$").matcher("");
final Matcher vardef2 = Pattern.compile("\\$" + VAR + "\\$").matcher("");
void append(StringBuffer buf, String ln,
Set<String> keys, Map<String, String> vars) {
@ -135,7 +139,7 @@ public class Spp {
// return true if #end[key], #end or EOF reached
boolean spp(Scanner in, StringBuffer buf, String key,
Set<String> keys, Map<String, String> vars,
boolean be, boolean skip) {
boolean be, boolean el, boolean skip) {
while (in.hasNextLine()) {
String ln = in.nextLine();
if (be) {
@ -154,9 +158,9 @@ public class Spp {
boolean test = keys.contains(k);
if (ifkey.group(GN_NOT) != null)
test = !test;
buf.append(LNSEP);
if (!spp(in, buf, k, keys, vars, be, skip || !test)) {
spp(in, buf, k, keys, vars, be, skip || test);
if (el) buf.append(LNSEP);
if (!spp(in, buf, k, keys, vars, be, el, skip || !test)) {
spp(in, buf, k, keys, vars, be, el, skip || test);
}
continue;
}
@ -164,14 +168,14 @@ public class Spp {
if (!key.equals(elsekey.group(GN_KEY))) {
throw new Error("Mis-matched #if-else-end at line <" + ln + ">");
}
buf.append(LNSEP);
if (el) buf.append(LNSEP);
return false;
}
if (endkey.reset(ln).find()) {
if (!key.equals(endkey.group(GN_KEY))) {
throw new Error("Mis-matched #if-else-end at line <" + ln + ">");
}
buf.append(LNSEP);
if (el) buf.append(LNSEP);
return true;
}
if (ln.startsWith("#warn")) {
@ -181,8 +185,9 @@ public class Spp {
}
if (!skip) {
append(buf, ln, keys, vars);
if (!el) buf.append(LNSEP);
}
buf.append(LNSEP);
if (el) buf.append(LNSEP);
}
return true;
}

View File

@ -60,7 +60,7 @@ import java.time.zone.ZoneRulesException;
* @author Stephen Colebourne
* @author Michael Nascimento Santos
*
* @since 1.9
* @since 9
*/
class TzdbZoneRulesProvider {

View File

@ -26,7 +26,9 @@
package com.sun.crypto.provider;
import java.security.InvalidKeyException;
import java.util.Objects;
import jdk.internal.HotSpotIntrinsicCandidate;
/**
* This class represents ciphers in counter (CTR) mode.
@ -138,7 +140,7 @@ final class CounterMode extends FeedbackCipher {
* <code>cipherOffset</code>.
*
* @param in the buffer with the input data to be encrypted
* @param inOffset the offset in <code>plain</code>
* @param inOff the offset in <code>plain</code>
* @param len the length of the input data
* @param out the buffer for the result
* @param outOff the offset in <code>cipher</code>
@ -170,6 +172,15 @@ final class CounterMode extends FeedbackCipher {
* are encrypted on demand.
*/
private int crypt(byte[] in, int inOff, int len, byte[] out, int outOff) {
cryptBlockCheck(in, inOff, len);
cryptBlockCheck(out, outOff, len);
return implCrypt(in, inOff, len, out, outOff);
}
// Implementation of crpyt() method. Possibly replaced with a compiler intrinsic.
@HotSpotIntrinsicCandidate
private int implCrypt(byte[] in, int inOff, int len, byte[] out, int outOff) {
int result = len;
while (len-- > 0) {
if (used >= blockSize) {
@ -181,4 +192,23 @@ final class CounterMode extends FeedbackCipher {
}
return result;
}
// Used to perform all checks required by the Java semantics
// (i.e., null checks and bounds checks) on the input parameters to crypt().
// Normally, the Java Runtime performs these checks, however, as crypt() is
// possibly replaced with compiler intrinsic, the JDK performs the
// required checks instead.
// Does not check accesses to class-internal (private) arrays.
private static void cryptBlockCheck(byte[] array, int offset, int len) {
Objects.requireNonNull(array);
if (offset < 0 || len < 0 || offset >= array.length) {
throw new ArrayIndexOutOfBoundsException(offset);
}
int largestIndex = offset + len - 1;
if (largestIndex < 0 || largestIndex >= array.length) {
throw new ArrayIndexOutOfBoundsException(largestIndex);
}
}
}

View File

@ -1,5 +1,5 @@
/*
* Copyright (c) 2012, 2013, Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 2012, 2015, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
@ -263,7 +263,7 @@ abstract class PBES2Core extends CipherSpi {
passwdChars[i] = (char) (passwdBytes[i] & 0x7f);
PBEKeySpec pbeSpec =
new PBEKeySpec(passwdChars, salt, iCount, blkSize * 8);
new PBEKeySpec(passwdChars, salt, iCount, keyLength);
// password char[] was cloned in PBEKeySpec constructor,
// so we can zero it out here
java.util.Arrays.fill(passwdChars, ' ');

View File

@ -76,11 +76,14 @@ public final class TlsRsaPremasterSecretGenerator extends KeyGeneratorSpi {
"TlsRsaPremasterSecretGenerator must be initialized");
}
if (random == null) {
random = new SecureRandom();
byte[] b = spec.getEncodedSecret();
if (b == null) {
if (random == null) {
random = new SecureRandom();
}
b = new byte[48];
random.nextBytes(b);
}
byte[] b = new byte[48];
random.nextBytes(b);
b[0] = (byte)spec.getMajorVersion();
b[1] = (byte)spec.getMinorVersion();

View File

@ -228,7 +228,7 @@ public abstract class InputStream implements Closeable {
* allocated. For example, if an array larger than {@code 2GB} would
* be required to store the bytes.
*
* @since 1.9
* @since 9
*/
public byte[] readAllBytes() throws IOException {
byte[] buf = new byte[DEFAULT_BUFFER_SIZE];
@ -298,7 +298,7 @@ public abstract class InputStream implements Closeable {
* @throws IndexOutOfBoundsException If {@code off} is negative, {@code len}
* is negative, or {@code len} is greater than {@code b.length - off}
*
* @since 1.9
* @since 9
*/
public int readNBytes(byte[] b, int off, int len) throws IOException {
Objects.requireNonNull(b);
@ -514,7 +514,7 @@ public abstract class InputStream implements Closeable {
* @throws IOException if an I/O error occurs when reading or writing
* @throws NullPointerException if {@code out} is {@code null}
*
* @since 1.9
* @since 9
*/
public long transferTo(OutputStream out) throws IOException {
Objects.requireNonNull(out, "out");

View File

@ -1526,7 +1526,7 @@ abstract class AbstractStringBuilder implements Appendable, CharSequence {
/**
* {@inheritDoc}
* @since 1.9
* @since 9
*/
@Override
public IntStream chars() {
@ -1543,7 +1543,7 @@ abstract class AbstractStringBuilder implements Appendable, CharSequence {
/**
* {@inheritDoc}
* @since 1.9
* @since 9
*/
@Override
public IntStream codePoints() {

View File

@ -493,25 +493,25 @@ class Character implements java.io.Serializable, Comparable<Character> {
/**
* Weak bidirectional character type "LRI" in the Unicode specification.
* @since 1.9
* @since 9
*/
public static final byte DIRECTIONALITY_LEFT_TO_RIGHT_ISOLATE = 19;
/**
* Weak bidirectional character type "RLI" in the Unicode specification.
* @since 1.9
* @since 9
*/
public static final byte DIRECTIONALITY_RIGHT_TO_LEFT_ISOLATE = 20;
/**
* Weak bidirectional character type "FSI" in the Unicode specification.
* @since 1.9
* @since 9
*/
public static final byte DIRECTIONALITY_FIRST_STRONG_ISOLATE = 21;
/**
* Weak bidirectional character type "PDI" in the Unicode specification.
* @since 1.9
* @since 9
*/
public static final byte DIRECTIONALITY_POP_DIRECTIONAL_ISOLATE = 22;
@ -2590,7 +2590,7 @@ class Character implements java.io.Serializable, Comparable<Character> {
/**
* Constant for the "Combining Diacritical Marks Extended" Unicode
* character block.
* @since 1.9
* @since 9
*/
public static final UnicodeBlock COMBINING_DIACRITICAL_MARKS_EXTENDED =
new UnicodeBlock("COMBINING_DIACRITICAL_MARKS_EXTENDED",
@ -2599,7 +2599,7 @@ class Character implements java.io.Serializable, Comparable<Character> {
/**
* Constant for the "Myanmar Extended-B" Unicode character block.
* @since 1.9
* @since 9
*/
public static final UnicodeBlock MYANMAR_EXTENDED_B =
new UnicodeBlock("MYANMAR_EXTENDED_B",
@ -2608,7 +2608,7 @@ class Character implements java.io.Serializable, Comparable<Character> {
/**
* Constant for the "Latin Extended-E" Unicode character block.
* @since 1.9
* @since 9
*/
public static final UnicodeBlock LATIN_EXTENDED_E =
new UnicodeBlock("LATIN_EXTENDED_E",
@ -2617,7 +2617,7 @@ class Character implements java.io.Serializable, Comparable<Character> {
/**
* Constant for the "Coptic Epact Numbers" Unicode character block.
* @since 1.9
* @since 9
*/
public static final UnicodeBlock COPTIC_EPACT_NUMBERS =
new UnicodeBlock("COPTIC_EPACT_NUMBERS",
@ -2626,7 +2626,7 @@ class Character implements java.io.Serializable, Comparable<Character> {
/**
* Constant for the "Old Permic" Unicode character block.
* @since 1.9
* @since 9
*/
public static final UnicodeBlock OLD_PERMIC =
new UnicodeBlock("OLD_PERMIC",
@ -2635,14 +2635,14 @@ class Character implements java.io.Serializable, Comparable<Character> {
/**
* Constant for the "Elbasan" Unicode character block.
* @since 1.9
* @since 9
*/
public static final UnicodeBlock ELBASAN =
new UnicodeBlock("ELBASAN");
/**
* Constant for the "Caucasian Albanian" Unicode character block.
* @since 1.9
* @since 9
*/
public static final UnicodeBlock CAUCASIAN_ALBANIAN =
new UnicodeBlock("CAUCASIAN_ALBANIAN",
@ -2651,7 +2651,7 @@ class Character implements java.io.Serializable, Comparable<Character> {
/**
* Constant for the "Linear A" Unicode character block.
* @since 1.9
* @since 9
*/
public static final UnicodeBlock LINEAR_A =
new UnicodeBlock("LINEAR_A",
@ -2660,21 +2660,21 @@ class Character implements java.io.Serializable, Comparable<Character> {
/**
* Constant for the "Palmyrene" Unicode character block.
* @since 1.9
* @since 9
*/
public static final UnicodeBlock PALMYRENE =
new UnicodeBlock("PALMYRENE");
/**
* Constant for the "Nabataean" Unicode character block.
* @since 1.9
* @since 9
*/
public static final UnicodeBlock NABATAEAN =
new UnicodeBlock("NABATAEAN");
/**
* Constant for the "Old North Arabian" Unicode character block.
* @since 1.9
* @since 9
*/
public static final UnicodeBlock OLD_NORTH_ARABIAN =
new UnicodeBlock("OLD_NORTH_ARABIAN",
@ -2683,14 +2683,14 @@ class Character implements java.io.Serializable, Comparable<Character> {
/**
* Constant for the "Manichaean" Unicode character block.
* @since 1.9
* @since 9
*/
public static final UnicodeBlock MANICHAEAN =
new UnicodeBlock("MANICHAEAN");
/**
* Constant for the "Psalter Pahlavi" Unicode character block.
* @since 1.9
* @since 9
*/
public static final UnicodeBlock PSALTER_PAHLAVI =
new UnicodeBlock("PSALTER_PAHLAVI",
@ -2699,14 +2699,14 @@ class Character implements java.io.Serializable, Comparable<Character> {
/**
* Constant for the "Mahajani" Unicode character block.
* @since 1.9
* @since 9
*/
public static final UnicodeBlock MAHAJANI =
new UnicodeBlock("MAHAJANI");
/**
* Constant for the "Sinhala Archaic Numbers" Unicode character block.
* @since 1.9
* @since 9
*/
public static final UnicodeBlock SINHALA_ARCHAIC_NUMBERS =
new UnicodeBlock("SINHALA_ARCHAIC_NUMBERS",
@ -2715,49 +2715,49 @@ class Character implements java.io.Serializable, Comparable<Character> {
/**
* Constant for the "Khojki" Unicode character block.
* @since 1.9
* @since 9
*/
public static final UnicodeBlock KHOJKI =
new UnicodeBlock("KHOJKI");
/**
* Constant for the "Khudawadi" Unicode character block.
* @since 1.9
* @since 9
*/
public static final UnicodeBlock KHUDAWADI =
new UnicodeBlock("KHUDAWADI");
/**
* Constant for the "Grantha" Unicode character block.
* @since 1.9
* @since 9
*/
public static final UnicodeBlock GRANTHA =
new UnicodeBlock("GRANTHA");
/**
* Constant for the "Tirhuta" Unicode character block.
* @since 1.9
* @since 9
*/
public static final UnicodeBlock TIRHUTA =
new UnicodeBlock("TIRHUTA");
/**
* Constant for the "Siddham" Unicode character block.
* @since 1.9
* @since 9
*/
public static final UnicodeBlock SIDDHAM =
new UnicodeBlock("SIDDHAM");
/**
* Constant for the "Modi" Unicode character block.
* @since 1.9
* @since 9
*/
public static final UnicodeBlock MODI =
new UnicodeBlock("MODI");
/**
* Constant for the "Warang Citi" Unicode character block.
* @since 1.9
* @since 9
*/
public static final UnicodeBlock WARANG_CITI =
new UnicodeBlock("WARANG_CITI",
@ -2766,7 +2766,7 @@ class Character implements java.io.Serializable, Comparable<Character> {
/**
* Constant for the "Pau Cin Hau" Unicode character block.
* @since 1.9
* @since 9
*/
public static final UnicodeBlock PAU_CIN_HAU =
new UnicodeBlock("PAU_CIN_HAU",
@ -2775,14 +2775,14 @@ class Character implements java.io.Serializable, Comparable<Character> {
/**
* Constant for the "Mro" Unicode character block.
* @since 1.9
* @since 9
*/
public static final UnicodeBlock MRO =
new UnicodeBlock("MRO");
/**
* Constant for the "Bassa Vah" Unicode character block.
* @since 1.9
* @since 9
*/
public static final UnicodeBlock BASSA_VAH =
new UnicodeBlock("BASSA_VAH",
@ -2791,7 +2791,7 @@ class Character implements java.io.Serializable, Comparable<Character> {
/**
* Constant for the "Pahawh Hmong" Unicode character block.
* @since 1.9
* @since 9
*/
public static final UnicodeBlock PAHAWH_HMONG =
new UnicodeBlock("PAHAWH_HMONG",
@ -2800,14 +2800,14 @@ class Character implements java.io.Serializable, Comparable<Character> {
/**
* Constant for the "Duployan" Unicode character block.
* @since 1.9
* @since 9
*/
public static final UnicodeBlock DUPLOYAN =
new UnicodeBlock("DUPLOYAN");
/**
* Constant for the "Shorthand Format Controls" Unicode character block.
* @since 1.9
* @since 9
*/
public static final UnicodeBlock SHORTHAND_FORMAT_CONTROLS =
new UnicodeBlock("SHORTHAND_FORMAT_CONTROLS",
@ -2816,7 +2816,7 @@ class Character implements java.io.Serializable, Comparable<Character> {
/**
* Constant for the "Mende Kikakui" Unicode character block.
* @since 1.9
* @since 9
*/
public static final UnicodeBlock MENDE_KIKAKUI =
new UnicodeBlock("MENDE_KIKAKUI",
@ -2825,7 +2825,7 @@ class Character implements java.io.Serializable, Comparable<Character> {
/**
* Constant for the "Ornamental Dingbats" Unicode character block.
* @since 1.9
* @since 9
*/
public static final UnicodeBlock ORNAMENTAL_DINGBATS =
new UnicodeBlock("ORNAMENTAL_DINGBATS",
@ -2834,7 +2834,7 @@ class Character implements java.io.Serializable, Comparable<Character> {
/**
* Constant for the "Geometric Shapes Extended" Unicode character block.
* @since 1.9
* @since 9
*/
public static final UnicodeBlock GEOMETRIC_SHAPES_EXTENDED =
new UnicodeBlock("GEOMETRIC_SHAPES_EXTENDED",
@ -2843,7 +2843,7 @@ class Character implements java.io.Serializable, Comparable<Character> {
/**
* Constant for the "Supplemental Arrows-C" Unicode character block.
* @since 1.9
* @since 9
*/
public static final UnicodeBlock SUPPLEMENTAL_ARROWS_C =
new UnicodeBlock("SUPPLEMENTAL_ARROWS_C",
@ -2852,7 +2852,7 @@ class Character implements java.io.Serializable, Comparable<Character> {
/**
* Constant for the "Cherokee Supplement" Unicode character block.
* @since 1.9
* @since 9
*/
public static final UnicodeBlock CHEROKEE_SUPPLEMENT =
new UnicodeBlock("CHEROKEE_SUPPLEMENT",
@ -2861,14 +2861,14 @@ class Character implements java.io.Serializable, Comparable<Character> {
/**
* Constant for the "Hatran" Unicode character block.
* @since 1.9
* @since 9
*/
public static final UnicodeBlock HATRAN =
new UnicodeBlock("HATRAN");
/**
* Constant for the "Old Hungarian" Unicode character block.
* @since 1.9
* @since 9
*/
public static final UnicodeBlock OLD_HUNGARIAN =
new UnicodeBlock("OLD_HUNGARIAN",
@ -2877,21 +2877,21 @@ class Character implements java.io.Serializable, Comparable<Character> {
/**
* Constant for the "Multani" Unicode character block.
* @since 1.9
* @since 9
*/
public static final UnicodeBlock MULTANI =
new UnicodeBlock("MULTANI");
/**
* Constant for the "Ahom" Unicode character block.
* @since 1.9
* @since 9
*/
public static final UnicodeBlock AHOM =
new UnicodeBlock("AHOM");
/**
* Constant for the "Early Dynastic Cuneiform" Unicode character block.
* @since 1.9
* @since 9
*/
public static final UnicodeBlock EARLY_DYNASTIC_CUNEIFORM =
new UnicodeBlock("EARLY_DYNASTIC_CUNEIFORM",
@ -2900,7 +2900,7 @@ class Character implements java.io.Serializable, Comparable<Character> {
/**
* Constant for the "Anatolian Hieroglyphs" Unicode character block.
* @since 1.9
* @since 9
*/
public static final UnicodeBlock ANATOLIAN_HIEROGLYPHS =
new UnicodeBlock("ANATOLIAN_HIEROGLYPHS",
@ -2909,7 +2909,7 @@ class Character implements java.io.Serializable, Comparable<Character> {
/**
* Constant for the "Sutton SignWriting" Unicode character block.
* @since 1.9
* @since 9
*/
public static final UnicodeBlock SUTTON_SIGNWRITING =
new UnicodeBlock("SUTTON_SIGNWRITING",
@ -2919,7 +2919,7 @@ class Character implements java.io.Serializable, Comparable<Character> {
/**
* Constant for the "Supplemental Symbols and Pictographs" Unicode
* character block.
* @since 1.9
* @since 9
*/
public static final UnicodeBlock SUPPLEMENTAL_SYMBOLS_AND_PICTOGRAPHS =
new UnicodeBlock("SUPPLEMENTAL_SYMBOLS_AND_PICTOGRAPHS",
@ -2929,7 +2929,7 @@ class Character implements java.io.Serializable, Comparable<Character> {
/**
* Constant for the "CJK Unified Ideographs Extension E" Unicode
* character block.
* @since 1.9
* @since 9
*/
public static final UnicodeBlock CJK_UNIFIED_IDEOGRAPHS_EXTENSION_E =
new UnicodeBlock("CJK_UNIFIED_IDEOGRAPHS_EXTENSION_E",
@ -4189,175 +4189,175 @@ class Character implements java.io.Serializable, Comparable<Character> {
/**
* Unicode script "Caucasian Albanian".
* @since 1.9
* @since 9
*/
CAUCASIAN_ALBANIAN,
/**
* Unicode script "Bassa Vah".
* @since 1.9
* @since 9
*/
BASSA_VAH,
/**
* Unicode script "Duployan".
* @since 1.9
* @since 9
*/
DUPLOYAN,
/**
* Unicode script "Elbasan".
* @since 1.9
* @since 9
*/
ELBASAN,
/**
* Unicode script "Grantha".
* @since 1.9
* @since 9
*/
GRANTHA,
/**
* Unicode script "Pahawh Hmong".
* @since 1.9
* @since 9
*/
PAHAWH_HMONG,
/**
* Unicode script "Khojki".
* @since 1.9
* @since 9
*/
KHOJKI,
/**
* Unicode script "Linear A".
* @since 1.9
* @since 9
*/
LINEAR_A,
/**
* Unicode script "Mahajani".
* @since 1.9
* @since 9
*/
MAHAJANI,
/**
* Unicode script "Manichaean".
* @since 1.9
* @since 9
*/
MANICHAEAN,
/**
* Unicode script "Mende Kikakui".
* @since 1.9
* @since 9
*/
MENDE_KIKAKUI,
/**
* Unicode script "Modi".
* @since 1.9
* @since 9
*/
MODI,
/**
* Unicode script "Mro".
* @since 1.9
* @since 9
*/
MRO,
/**
* Unicode script "Old North Arabian".
* @since 1.9
* @since 9
*/
OLD_NORTH_ARABIAN,
/**
* Unicode script "Nabataean".
* @since 1.9
* @since 9
*/
NABATAEAN,
/**
* Unicode script "Palmyrene".
* @since 1.9
* @since 9
*/
PALMYRENE,
/**
* Unicode script "Pau Cin Hau".
* @since 1.9
* @since 9
*/
PAU_CIN_HAU,
/**
* Unicode script "Old Permic".
* @since 1.9
* @since 9
*/
OLD_PERMIC,
/**
* Unicode script "Psalter Pahlavi".
* @since 1.9
* @since 9
*/
PSALTER_PAHLAVI,
/**
* Unicode script "Siddham".
* @since 1.9
* @since 9
*/
SIDDHAM,
/**
* Unicode script "Khudawadi".
* @since 1.9
* @since 9
*/
KHUDAWADI,
/**
* Unicode script "Tirhuta".
* @since 1.9
* @since 9
*/
TIRHUTA,
/**
* Unicode script "Warang Citi".
* @since 1.9
* @since 9
*/
WARANG_CITI,
/**
* Unicode script "Ahom".
* @since 1.9
* @since 9
*/
AHOM,
/**
* Unicode script "Anatolian Hieroglyphs".
* @since 1.9
* @since 9
*/
ANATOLIAN_HIEROGLYPHS,
/**
* Unicode script "Hatran".
* @since 1.9
* @since 9
*/
HATRAN,
/**
* Unicode script "Multani".
* @since 1.9
* @since 9
*/
MULTANI,
/**
* Unicode script "Old Hungarian".
* @since 1.9
* @since 9
*/
OLD_HUNGARIAN,
/**
* Unicode script "SignWriting".
* @since 1.9
* @since 9
*/
SIGNWRITING,

View File

@ -50,6 +50,8 @@ import java.util.Vector;
import java.util.Hashtable;
import java.util.WeakHashMap;
import java.util.concurrent.ConcurrentHashMap;
import jdk.internal.perf.PerfCounter;
import sun.misc.Resource;
import sun.misc.URLClassPath;
import sun.reflect.CallerSensitive;
@ -423,9 +425,9 @@ public abstract class ClassLoader {
c = findClass(name);
// this is the defining class loader; record the stats
sun.misc.PerfCounter.getParentDelegationTime().addTime(t1 - t0);
sun.misc.PerfCounter.getFindClassTime().addElapsedTimeFrom(t1);
sun.misc.PerfCounter.getFindClasses().increment();
PerfCounter.getParentDelegationTime().addTime(t1 - t0);
PerfCounter.getFindClassTime().addElapsedTimeFrom(t1);
PerfCounter.getFindClasses().increment();
}
}
if (resolve) {

View File

@ -716,7 +716,7 @@ public final class Integer extends Number implements Comparable<Integer> {
* {@code radix}, or if {@code radix} is either smaller than
* {@link java.lang.Character#MIN_RADIX} or larger than
* {@link java.lang.Character#MAX_RADIX}.
* @since 1.9
* @since 9
*/
public static int parseInt(CharSequence s, int beginIndex, int endIndex, int radix)
throws NumberFormatException {
@ -899,7 +899,7 @@ public final class Integer extends Number implements Comparable<Integer> {
* {@code radix}, or if {@code radix} is either smaller than
* {@link java.lang.Character#MIN_RADIX} or larger than
* {@link java.lang.Character#MAX_RADIX}.
* @since 1.9
* @since 9
*/
public static int parseUnsignedInt(CharSequence s, int beginIndex, int endIndex, int radix)
throws NumberFormatException {

View File

@ -747,7 +747,7 @@ public final class Long extends Number implements Comparable<Long> {
* {@code radix}, or if {@code radix} is either smaller than
* {@link java.lang.Character#MIN_RADIX} or larger than
* {@link java.lang.Character#MAX_RADIX}.
* @since 1.9
* @since 9
*/
public static long parseLong(CharSequence s, int beginIndex, int endIndex, int radix)
throws NumberFormatException {
@ -993,7 +993,7 @@ public final class Long extends Number implements Comparable<Long> {
* {@code radix}, or if {@code radix} is either smaller than
* {@link java.lang.Character#MIN_RADIX} or larger than
* {@link java.lang.Character#MAX_RADIX}.
* @since 1.9
* @since 9
*/
public static long parseUnsignedLong(CharSequence s, int beginIndex, int endIndex, int radix)
throws NumberFormatException {

View File

@ -304,7 +304,7 @@ public abstract class Process {
* otherwise, {@link #destroy} forcibly terminates the process
* @throws UnsupportedOperationException if the Process implementation
* does not support this operation
* @since 1.9
* @since 9
*/
public boolean supportsNormalTermination() {
throw new UnsupportedOperationException(this.getClass()
@ -340,7 +340,7 @@ public abstract class Process {
* @return the native process id of the process
* @throws UnsupportedOperationException if the Process implementation
* does not support this operation
* @since 1.9
* @since 9
*/
public long getPid() {
return toHandle().getPid();
@ -409,7 +409,7 @@ public abstract class Process {
*
* @return a new {@code CompletableFuture<Process>} for the Process
*
* @since 1.9
* @since 9
*/
public CompletableFuture<Process> onExit() {
return CompletableFuture.supplyAsync(this::waitForInternal);
@ -471,7 +471,7 @@ public abstract class Process {
* does not support this operation
* @throws SecurityException if a security manager has been installed and
* it denies RuntimePermission("manageProcess")
* @since 1.9
* @since 9
*/
public ProcessHandle toHandle() {
throw new UnsupportedOperationException(this.getClass()
@ -491,7 +491,7 @@ public abstract class Process {
* @return a snapshot of information about the process, always non-null
* @throws UnsupportedOperationException if the Process implementation
* does not support this operation
* @since 1.9
* @since 9
*/
public ProcessHandle.Info info() {
return toHandle().info();
@ -516,7 +516,7 @@ public abstract class Process {
* does not support this operation
* @throws SecurityException if a security manager has been installed and
* it denies RuntimePermission("manageProcess")
* @since 1.9
* @since 9
*/
public Stream<ProcessHandle> children() {
return toHandle().children();
@ -542,7 +542,7 @@ public abstract class Process {
* does not support this operation
* @throws SecurityException if a security manager has been installed and
* it denies RuntimePermission("manageProcess")
* @since 1.9
* @since 9
*/
public Stream<ProcessHandle> descendants() {
return toHandle().descendants();

View File

@ -89,7 +89,7 @@ import java.util.stream.Stream;
* {@link #compareTo(ProcessHandle) compareTo} methods to compare ProcessHandles.
*
* @see Process
* @since 1.9
* @since 9
*/
public interface ProcessHandle extends Comparable<ProcessHandle> {
@ -215,7 +215,7 @@ public interface ProcessHandle extends Comparable<ProcessHandle> {
* by the operating system privileges of the process making the request.
* The return types are {@code Optional<T>} allowing explicit tests
* and actions if the value is available.
* @since 1.9
* @since 9
*/
public interface Info {
/**

View File

@ -50,7 +50,7 @@ import static java.security.AccessController.doPrivileged;
* ProcessHandleImpl is the implementation of ProcessHandle.
*
* @see Process
* @since 1.9
* @since 9
*/
final class ProcessHandleImpl implements ProcessHandle {
/**
@ -338,7 +338,7 @@ final class ProcessHandleImpl implements ProcessHandle {
*
* @return {@code true} if the process represented by this
* {@code ProcessHandle} object has not yet terminated.
* @since 1.9
* @since 9
*/
@Override
public boolean isAlive() {

View File

@ -81,7 +81,7 @@ import java.util.stream.Stream;
* will cause a {@link NullPointerException NullPointerException}
* to be thrown.
*
* @since 1.9
* @since 9
*/
public final class StackWalker {
/**
@ -92,7 +92,7 @@ public final class StackWalker {
* by the {@linkplain Option stack walking options} of a {@linkplain
* StackWalker stack walker}.
*
* @since 1.9
* @since 9
* @jvms 2.6
*/
public static interface StackFrame {
@ -185,7 +185,7 @@ public final class StackWalker {
* Stack walker option to configure the {@linkplain StackFrame stack frame}
* information obtained by a {@code StackWalker}.
*
* @since 1.9
* @since 9
*/
public enum Option {
/**

View File

@ -2674,7 +2674,7 @@ public final class String
* point</a> is passed through uninterpreted.
*
* @return an IntStream of char values from this sequence
* @since 1.9
* @since 9
*/
@Override
public IntStream chars() {
@ -2694,7 +2694,7 @@ public final class String
* {@code int} values which are then passed to the stream.
*
* @return an IntStream of Unicode code points from this sequence
* @since 1.9
* @since 9
*/
@Override
public IntStream codePoints() {

Some files were not shown because too many files have changed in this diff Show More