Merge
This commit is contained in:
commit
100e3aba7b
2
.hgtags
2
.hgtags
@ -269,3 +269,5 @@ c5495e25c7258ab5f96a1ae14610887d76d2be63 jdk9-b18
|
||||
d9ce05f36ffec3e5e8af62a92455c1c66a63c320 jdk9-b24
|
||||
13a5c76976fe48e55c9727c25fae2d2ce7c05da0 jdk9-b25
|
||||
cd6f4557e7fea5799ff3762ed7a80a743e75d5fd jdk9-b26
|
||||
d06a6d3c66c08293b2a9650f3cc01fd55c620e65 jdk9-b27
|
||||
f4269e8f454eb77763ecee228a88ae102a9aef6e jdk9-b28
|
||||
|
@ -269,3 +269,5 @@ ee4fd72b2ec3d92497f37163352f294aa695c6fb jdk9-b20
|
||||
1d4a293fbec19dc2d5790bbb2c7dd0ed8f265484 jdk9-b24
|
||||
aefd8899a8d6615fb34ba99b2e38996a7145baa8 jdk9-b25
|
||||
d3ec8d048e6c3c46b6e0ee011cc551ad386dfba5 jdk9-b26
|
||||
ba5645f2735b41ed085d07ba20fa7b322afff318 jdk9-b27
|
||||
ea2f7981236f3812436958748ab3d26e80a35130 jdk9-b28
|
||||
|
6
Makefile
6
Makefile
@ -136,10 +136,12 @@ help:
|
||||
$(info . make docs # Create all docs)
|
||||
$(info . make docs-javadoc # Create just javadocs, depends on less than full docs)
|
||||
$(info . make profiles # Create complete j2re compact profile images)
|
||||
$(info . make bootcycle-images # Build images twice, second time with newly build JDK)
|
||||
$(info . make bootcycle-images # Build images twice, second time with newly built JDK)
|
||||
$(info . make install # Install the generated images locally)
|
||||
$(info . make clean # Remove all files generated by make, but not those)
|
||||
$(info . # generated by configure)
|
||||
$(info . # generated by configure. Do not run clean and other)
|
||||
$(info . # targets together as that might behave in an)
|
||||
$(info . # unexpected way.)
|
||||
$(info . make dist-clean # Remove all files, including configuration)
|
||||
$(info . make help # Give some help on using make)
|
||||
$(info . make test # Run tests, default is all tests (see TEST below))
|
||||
|
@ -377,7 +377,6 @@ AC_DEFUN_ONCE([BASIC_SETUP_FUNDAMENTAL_TOOLS],
|
||||
BASIC_REQUIRE_PROGS(CMP, cmp)
|
||||
BASIC_REQUIRE_PROGS(COMM, comm)
|
||||
BASIC_REQUIRE_PROGS(CP, cp)
|
||||
BASIC_REQUIRE_PROGS(CPIO, cpio)
|
||||
BASIC_REQUIRE_PROGS(CUT, cut)
|
||||
BASIC_REQUIRE_PROGS(DATE, date)
|
||||
BASIC_REQUIRE_PROGS(DIFF, [gdiff diff])
|
||||
@ -427,6 +426,7 @@ AC_DEFUN_ONCE([BASIC_SETUP_FUNDAMENTAL_TOOLS],
|
||||
BASIC_PATH_PROGS(READLINK, [greadlink readlink])
|
||||
BASIC_PATH_PROGS(DF, df)
|
||||
BASIC_PATH_PROGS(SETFILE, SetFile)
|
||||
BASIC_PATH_PROGS(CPIO, [cpio bsdcpio])
|
||||
])
|
||||
|
||||
# Setup basic configuration paths, and platform-specific stuff related to PATHs.
|
||||
@ -849,7 +849,12 @@ AC_DEFUN([BASIC_CHECK_FIND_DELETE],
|
||||
if test -f $DELETEDIR/TestIfFindSupportsDelete; then
|
||||
# No, it does not.
|
||||
rm $DELETEDIR/TestIfFindSupportsDelete
|
||||
FIND_DELETE="-exec rm \{\} \+"
|
||||
if test "x$OPENJDK_TARGET_OS" = "xaix"; then
|
||||
# AIX 'find' is buggy if called with '-exec {} \+' and an empty file list
|
||||
FIND_DELETE="-print | xargs rm"
|
||||
else
|
||||
FIND_DELETE="-exec rm \{\} \+"
|
||||
fi
|
||||
AC_MSG_RESULT([no])
|
||||
else
|
||||
AC_MSG_RESULT([yes])
|
||||
@ -954,7 +959,7 @@ AC_DEFUN([BASIC_CHECK_DIR_ON_LOCAL_DISK],
|
||||
# not be the case in cygwin in certain conditions.
|
||||
AC_DEFUN_ONCE([BASIC_CHECK_SRC_PERMS],
|
||||
[
|
||||
if test x"$OPENJDK_BUILD_OS" = xwindows; then
|
||||
if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
|
||||
file_to_test="$SRC_ROOT/LICENSE"
|
||||
if test `$STAT -c '%a' "$file_to_test"` -lt 400; then
|
||||
AC_MSG_ERROR([Bad file permissions on src files. This is usually caused by cloning the repositories with a non cygwin hg in a directory not created in cygwin.])
|
||||
|
@ -266,6 +266,14 @@ AC_DEFUN([BASIC_FIXUP_EXECUTABLE_MSYS],
|
||||
BASIC_WINDOWS_REWRITE_AS_UNIX_PATH(new_path)
|
||||
|
||||
new_path=`$WHICH "$new_path" 2> /dev/null`
|
||||
# bat and cmd files are not always considered executable in MSYS causing which
|
||||
# to not find them
|
||||
if test "x$new_path" = x \
|
||||
&& test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
|
||||
&& test "x`$LS \"$path\" 2>/dev/null`" != x; then
|
||||
new_path="$path"
|
||||
BASIC_WINDOWS_REWRITE_AS_UNIX_PATH(new_path)
|
||||
fi
|
||||
|
||||
if test "x$new_path" = x; then
|
||||
# It's still not found. Now this is an unrecoverable error.
|
||||
|
@ -370,18 +370,27 @@ AC_DEFUN_ONCE([BOOTJDK_SETUP_BOOT_JDK_ARGUMENTS],
|
||||
|
||||
# Maximum amount of heap memory.
|
||||
# Maximum stack size.
|
||||
JVM_MAX_HEAP=`expr $MEMORY_SIZE / 2`
|
||||
if test "x$BUILD_NUM_BITS" = x32; then
|
||||
JVM_MAX_HEAP=1100M
|
||||
if test "$JVM_MAX_HEAP" -gt "1100"; then
|
||||
JVM_MAX_HEAP=1100
|
||||
elif test "$JVM_MAX_HEAP" -lt "512"; then
|
||||
JVM_MAX_HEAP=512
|
||||
fi
|
||||
STACK_SIZE=768
|
||||
else
|
||||
# Running Javac on a JVM on a 64-bit machine, takes more space since 64-bit
|
||||
# pointers are used. Apparently, we need to increase the heap and stack
|
||||
# space for the jvm. More specifically, when running javac to build huge
|
||||
# jdk batch
|
||||
JVM_MAX_HEAP=1600M
|
||||
if test "$JVM_MAX_HEAP" -gt "1600"; then
|
||||
JVM_MAX_HEAP=1600
|
||||
elif test "$JVM_MAX_HEAP" -lt "512"; then
|
||||
JVM_MAX_HEAP=512
|
||||
fi
|
||||
STACK_SIZE=1536
|
||||
fi
|
||||
ADD_JVM_ARG_IF_OK([-Xmx$JVM_MAX_HEAP],boot_jdk_jvmargs_big,[$JAVA])
|
||||
ADD_JVM_ARG_IF_OK([-Xmx${JVM_MAX_HEAP}M],boot_jdk_jvmargs_big,[$JAVA])
|
||||
ADD_JVM_ARG_IF_OK([-XX:ThreadStackSize=$STACK_SIZE],boot_jdk_jvmargs_big,[$JAVA])
|
||||
|
||||
AC_MSG_RESULT([$boot_jdk_jvmargs_big])
|
||||
|
@ -131,8 +131,8 @@ AC_DEFUN_ONCE([BPERF_SETUP_BUILD_JOBS],
|
||||
if test "x$with_jobs" = x; then
|
||||
# Number of jobs was not specified, calculate.
|
||||
AC_MSG_CHECKING([for appropriate number of jobs to run in parallel])
|
||||
# Approximate memory in GB, rounding up a bit.
|
||||
memory_gb=`expr $MEMORY_SIZE / 1100`
|
||||
# Approximate memory in GB.
|
||||
memory_gb=`expr $MEMORY_SIZE / 1024`
|
||||
# Pick the lowest of memory in gb and number of cores.
|
||||
if test "$memory_gb" -lt "$NUM_CORES"; then
|
||||
JOBS="$memory_gb"
|
||||
@ -291,16 +291,11 @@ AC_DEFUN_ONCE([BPERF_SETUP_SMART_JAVAC],
|
||||
AC_MSG_ERROR([Could not execute server java: $SJAVAC_SERVER_JAVA])
|
||||
fi
|
||||
else
|
||||
SJAVAC_SERVER_JAVA=""
|
||||
# Hotspot specific options.
|
||||
ADD_JVM_ARG_IF_OK([-verbosegc],SJAVAC_SERVER_JAVA,[$JAVA])
|
||||
# JRockit specific options.
|
||||
ADD_JVM_ARG_IF_OK([-Xverbose:gc],SJAVAC_SERVER_JAVA,[$JAVA])
|
||||
SJAVAC_SERVER_JAVA="$JAVA $SJAVAC_SERVER_JAVA"
|
||||
SJAVAC_SERVER_JAVA="$JAVA"
|
||||
fi
|
||||
AC_SUBST(SJAVAC_SERVER_JAVA)
|
||||
|
||||
if test "$MEMORY_SIZE" -gt "2500"; then
|
||||
if test "$MEMORY_SIZE" -gt "3000"; then
|
||||
ADD_JVM_ARG_IF_OK([-d64],SJAVAC_SERVER_JAVA,[$SJAVAC_SERVER_JAVA])
|
||||
if test "$JVM_ARG_OK" = true; then
|
||||
JVM_64BIT=true
|
||||
@ -308,34 +303,33 @@ AC_DEFUN_ONCE([BPERF_SETUP_SMART_JAVAC],
|
||||
fi
|
||||
fi
|
||||
|
||||
MX_VALUE=`expr $MEMORY_SIZE / 2`
|
||||
if test "$JVM_64BIT" = true; then
|
||||
if test "$MEMORY_SIZE" -gt "17000"; then
|
||||
ADD_JVM_ARG_IF_OK([-Xms10G -Xmx10G],SJAVAC_SERVER_JAVA,[$SJAVAC_SERVER_JAVA])
|
||||
# Set ms lower than mx since more than one instance of the server might
|
||||
# get launched at the same time before they figure out which instance won.
|
||||
MS_VALUE=512
|
||||
if test "$MX_VALUE" -gt "2048"; then
|
||||
MX_VALUE=2048
|
||||
fi
|
||||
if test "$MEMORY_SIZE" -gt "10000" && test "$JVM_ARG_OK" = false; then
|
||||
ADD_JVM_ARG_IF_OK([-Xms6G -Xmx6G],SJAVAC_SERVER_JAVA,[$SJAVAC_SERVER_JAVA])
|
||||
fi
|
||||
if test "$MEMORY_SIZE" -gt "5000" && test "$JVM_ARG_OK" = false; then
|
||||
ADD_JVM_ARG_IF_OK([-Xms1G -Xmx3G],SJAVAC_SERVER_JAVA,[$SJAVAC_SERVER_JAVA])
|
||||
fi
|
||||
if test "$MEMORY_SIZE" -gt "3800" && test "$JVM_ARG_OK" = false; then
|
||||
ADD_JVM_ARG_IF_OK([-Xms1G -Xmx2500M],SJAVAC_SERVER_JAVA,[$SJAVAC_SERVER_JAVA])
|
||||
else
|
||||
MS_VALUE=256
|
||||
if test "$MX_VALUE" -gt "1500"; then
|
||||
MX_VALUE=1500
|
||||
fi
|
||||
fi
|
||||
if test "$MEMORY_SIZE" -gt "2500" && test "$JVM_ARG_OK" = false; then
|
||||
ADD_JVM_ARG_IF_OK([-Xms1000M -Xmx1500M],SJAVAC_SERVER_JAVA,[$SJAVAC_SERVER_JAVA])
|
||||
fi
|
||||
if test "$MEMORY_SIZE" -gt "1000" && test "$JVM_ARG_OK" = false; then
|
||||
ADD_JVM_ARG_IF_OK([-Xms400M -Xmx1100M],SJAVAC_SERVER_JAVA,[$SJAVAC_SERVER_JAVA])
|
||||
fi
|
||||
if test "$JVM_ARG_OK" = false; then
|
||||
ADD_JVM_ARG_IF_OK([-Xms256M -Xmx512M],SJAVAC_SERVER_JAVA,[$SJAVAC_SERVER_JAVA])
|
||||
if test "$MX_VALUE" -lt "512"; then
|
||||
MX_VALUE=512
|
||||
fi
|
||||
ADD_JVM_ARG_IF_OK([-Xms${MS_VALUE}M -Xmx${MX_VALUE}M],SJAVAC_SERVER_JAVA,[$SJAVAC_SERVER_JAVA])
|
||||
|
||||
AC_MSG_CHECKING([whether to use sjavac])
|
||||
AC_ARG_ENABLE([sjavac], [AS_HELP_STRING([--enable-sjavac],
|
||||
[use sjavac to do fast incremental compiles @<:@disabled@:>@])],
|
||||
[ENABLE_SJAVAC="${enableval}"], [ENABLE_SJAVAC='no'])
|
||||
if test "x$JVM_ARG_OK" = "xfalse"; then
|
||||
AC_MSG_WARN([Could not set -Xms${MS_VALUE}M -Xmx${MX_VALUE}M, disabling sjavac])
|
||||
ENABLE_SJAVAC=no;
|
||||
fi
|
||||
AC_MSG_CHECKING([whether to use sjavac])
|
||||
AC_MSG_RESULT([$ENABLE_SJAVAC])
|
||||
AC_SUBST(ENABLE_SJAVAC)
|
||||
|
||||
|
@ -142,7 +142,6 @@ JDKOPT_SETUP_JDK_VERSION_NUMBERS
|
||||
###############################################################################
|
||||
|
||||
BOOTJDK_SETUP_BOOT_JDK
|
||||
BOOTJDK_SETUP_BOOT_JDK_ARGUMENTS
|
||||
|
||||
###############################################################################
|
||||
#
|
||||
@ -233,6 +232,9 @@ BPERF_SETUP_BUILD_CORES
|
||||
BPERF_SETUP_BUILD_MEMORY
|
||||
BPERF_SETUP_BUILD_JOBS
|
||||
|
||||
# Setup arguments for the boot jdk (after cores and memory have been setup)
|
||||
BOOTJDK_SETUP_BOOT_JDK_ARGUMENTS
|
||||
|
||||
# Setup smart javac (after cores and memory have been setup)
|
||||
BPERF_SETUP_SMART_JAVAC
|
||||
|
||||
|
@ -342,17 +342,15 @@ AC_DEFUN_ONCE([FLAGS_SETUP_COMPILER_FLAGS_FOR_OPTIMIZATION],
|
||||
# no adjustment
|
||||
;;
|
||||
fastdebug )
|
||||
# Add compile time bounds checks.
|
||||
CFLAGS_DEBUG_OPTIONS="-U_FORTIFY_SOURCE -D_FORTIFY_SOURCE=1"
|
||||
CXXFLAGS_DEBUG_OPTIONS="-U_FORTIFY_SOURCE -D_FORTIFY_SOURCE=1"
|
||||
# no adjustment
|
||||
;;
|
||||
slowdebug )
|
||||
# Add runtime bounds checks and symbol info.
|
||||
CFLAGS_DEBUG_OPTIONS="-U_FORTIFY_SOURCE -D_FORTIFY_SOURCE=2 -fstack-protector-all --param ssp-buffer-size=1"
|
||||
CXXFLAGS_DEBUG_OPTIONS="-U_FORTIFY_SOURCE -D_FORTIFY_SOURCE=2 -fstack-protector-all --param ssp-buffer-size=1"
|
||||
# Add runtime stack smashing and undefined behavior checks
|
||||
CFLAGS_DEBUG_OPTIONS="-fstack-protector-all --param ssp-buffer-size=1"
|
||||
CXXFLAGS_DEBUG_OPTIONS="-fstack-protector-all --param ssp-buffer-size=1"
|
||||
if test "x$HAS_CFLAG_DETECT_UNDEFINED_BEHAVIOR" = "xtrue"; then
|
||||
CFLAGS_DEBUG_OPTIONS="$CFLAGS_DEBUG_OPTIONS $CFLAG_DETECT_UNDEFINED_BEHAVIOR_FLAG"
|
||||
CXXFLAGS_DEBUG_OPTIONS="$CXXFLAGS_DEBUG_OPTIONS $CFLAG_DETECT_UNDEFINED_BEHAVIOR_FLAG"
|
||||
CXXFLAGS_DEBUG_OPTIONS="$CXXFLAGS_DEBUG_OPTIONS $CFLAG_DETECT_UNDEFINED_BEHAVIsOR_FLAG"
|
||||
fi
|
||||
;;
|
||||
esac
|
||||
@ -900,7 +898,7 @@ AC_DEFUN_ONCE([FLAGS_SETUP_COMPILER_FLAGS_MISC],
|
||||
|
||||
case "${TOOLCHAIN_TYPE}" in
|
||||
microsoft)
|
||||
CFLAGS_WARNINGS_ARE_ERRORS="/WX"
|
||||
CFLAGS_WARNINGS_ARE_ERRORS="-WX"
|
||||
;;
|
||||
solstudio)
|
||||
CFLAGS_WARNINGS_ARE_ERRORS="-errtags -errwarn=%all"
|
||||
|
File diff suppressed because it is too large
Load Diff
@ -173,6 +173,7 @@ AC_DEFUN([PLATFORM_EXTRACT_TARGET_AND_BUILD],
|
||||
OPENJDK_BUILD_CPU_ENDIAN="$VAR_CPU_ENDIAN"
|
||||
AC_SUBST(OPENJDK_BUILD_OS)
|
||||
AC_SUBST(OPENJDK_BUILD_OS_API)
|
||||
AC_SUBST(OPENJDK_BUILD_OS_ENV)
|
||||
AC_SUBST(OPENJDK_BUILD_CPU)
|
||||
AC_SUBST(OPENJDK_BUILD_CPU_ARCH)
|
||||
AC_SUBST(OPENJDK_BUILD_CPU_BITS)
|
||||
@ -194,6 +195,7 @@ AC_DEFUN([PLATFORM_EXTRACT_TARGET_AND_BUILD],
|
||||
OPENJDK_TARGET_CPU_ENDIAN="$VAR_CPU_ENDIAN"
|
||||
AC_SUBST(OPENJDK_TARGET_OS)
|
||||
AC_SUBST(OPENJDK_TARGET_OS_API)
|
||||
AC_SUBST(OPENJDK_TARGET_OS_ENV)
|
||||
AC_SUBST(OPENJDK_TARGET_CPU)
|
||||
AC_SUBST(OPENJDK_TARGET_CPU_ARCH)
|
||||
AC_SUBST(OPENJDK_TARGET_CPU_BITS)
|
||||
|
@ -106,6 +106,7 @@ OPENJDK_TARGET_OS_EXPORT_DIR:=@OPENJDK_TARGET_OS_EXPORT_DIR@
|
||||
# When not cross-compiling, it is the same as the target.
|
||||
OPENJDK_BUILD_OS:=@OPENJDK_BUILD_OS@
|
||||
OPENJDK_BUILD_OS_API:=@OPENJDK_BUILD_OS_API@
|
||||
OPENJDK_BUILD_OS_ENV:=@OPENJDK_BUILD_OS_ENV@
|
||||
|
||||
OPENJDK_BUILD_CPU:=@OPENJDK_BUILD_CPU@
|
||||
OPENJDK_BUILD_CPU_ARCH:=@OPENJDK_BUILD_CPU_ARCH@
|
||||
|
@ -244,12 +244,22 @@ AC_DEFUN([TOOLCHAIN_CHECK_POSSIBLE_MSVCR_DLL],
|
||||
# Need to check if the found msvcr is correct architecture
|
||||
AC_MSG_CHECKING([found msvcr100.dll architecture])
|
||||
MSVCR_DLL_FILETYPE=`$FILE -b "$POSSIBLE_MSVCR_DLL"`
|
||||
if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
|
||||
CORRECT_MSVCR_ARCH=386
|
||||
if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
|
||||
# The MSYS 'file' command returns "PE32 executable for MS Windows (DLL) (GUI) Intel 80386 32-bit"
|
||||
# on x32 and "PE32+ executable for MS Windows (DLL) (GUI) Mono/.Net assembly" on x64 systems.
|
||||
if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
|
||||
CORRECT_MSVCR_ARCH="PE32 executable"
|
||||
else
|
||||
CORRECT_MSVCR_ARCH="PE32+ executable"
|
||||
fi
|
||||
else
|
||||
CORRECT_MSVCR_ARCH=x86-64
|
||||
if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
|
||||
CORRECT_MSVCR_ARCH=386
|
||||
else
|
||||
CORRECT_MSVCR_ARCH=x86-64
|
||||
fi
|
||||
fi
|
||||
if $ECHO "$MSVCR_DLL_FILETYPE" | $GREP $CORRECT_MSVCR_ARCH 2>&1 > /dev/null; then
|
||||
if $ECHO "$MSVCR_DLL_FILETYPE" | $GREP "$CORRECT_MSVCR_ARCH" 2>&1 > /dev/null; then
|
||||
AC_MSG_RESULT([ok])
|
||||
MSVCR_DLL="$POSSIBLE_MSVCR_DLL"
|
||||
AC_MSG_CHECKING([for msvcr100.dll])
|
||||
|
@ -77,6 +77,11 @@ do
|
||||
shift
|
||||
done
|
||||
|
||||
# debug mode
|
||||
if [ "${HGFOREST_DEBUG:-false}" = "true" ] ; then
|
||||
global_opts="${global_opts} --debug"
|
||||
fi
|
||||
|
||||
# silence standard output?
|
||||
if [ ${qflag} = "true" ] ; then
|
||||
global_opts="${global_opts} -q"
|
||||
@ -89,14 +94,26 @@ if [ ${vflag} = "true" ] ; then
|
||||
fi
|
||||
|
||||
# Make sure we have a command.
|
||||
if [ $# -lt 1 -o -z "${1:-}" ] ; then
|
||||
echo "ERROR: No command to hg supplied!"
|
||||
usage
|
||||
if [ ${#} -lt 1 -o -z "${1:-}" ] ; then
|
||||
echo "ERROR: No command to hg supplied!" > ${status_output}
|
||||
usage > ${status_output}
|
||||
fi
|
||||
|
||||
command="$1"; shift
|
||||
# grab command
|
||||
command="${1}"; shift
|
||||
|
||||
if [ ${vflag} = "true" ] ; then
|
||||
echo "# Mercurial command: ${command}" > ${status_output}
|
||||
fi
|
||||
|
||||
|
||||
# capture command options and arguments (if any)
|
||||
command_args="${@:-}"
|
||||
|
||||
if [ ${vflag} = "true" ] ; then
|
||||
echo "# Mercurial command arguments: ${command_args}" > ${status_output}
|
||||
fi
|
||||
|
||||
# Clean out the temporary directory that stores the pid files.
|
||||
tmp=/tmp/forest.$$
|
||||
rm -f -r ${tmp}
|
||||
@ -104,7 +121,8 @@ mkdir -p ${tmp}
|
||||
|
||||
|
||||
if [ "${HGFOREST_DEBUG:-false}" = "true" ] ; then
|
||||
echo "DEBUG: temp files are in: ${tmp}"
|
||||
# ignores redirection.
|
||||
echo "DEBUG: temp files are in: ${tmp}" >&2
|
||||
fi
|
||||
|
||||
# Check if we can use fifos for monitoring sub-process completion.
|
||||
@ -377,21 +395,33 @@ else
|
||||
fi
|
||||
fi
|
||||
done
|
||||
|
||||
if [ ${have_fifos} = "true" ]; then
|
||||
# done with the fifo
|
||||
exec 3>&-
|
||||
fi
|
||||
fi
|
||||
|
||||
# Wait for all subprocesses to complete
|
||||
wait
|
||||
|
||||
# Terminate with exit 0 only if all subprocesses were successful
|
||||
# Terminate with highest exit code of subprocesses
|
||||
ec=0
|
||||
if [ -d ${tmp} ]; then
|
||||
rcfiles="`(ls -a ${tmp}/*.pid.rc 2> /dev/null) || echo ''`"
|
||||
for rc in ${rcfiles} ; do
|
||||
exit_code=`cat ${rc} | tr -d ' \n\r'`
|
||||
if [ "${exit_code}" != "0" ] ; then
|
||||
if [ ${exit_code} -gt 1 ]; then
|
||||
# mercurial exit codes greater than "1" signal errors.
|
||||
repo="`echo ${rc} | sed -e 's@^'${tmp}'@@' -e 's@/*\([^/]*\)\.pid\.rc$@\1@' -e 's@_@/@g'`"
|
||||
echo "WARNING: ${repo} exited abnormally (${exit_code})" > ${status_output}
|
||||
ec=1
|
||||
fi
|
||||
if [ ${exit_code} -gt ${ec} ]; then
|
||||
# assume that larger exit codes are more significant
|
||||
ec=${exit_code}
|
||||
fi
|
||||
fi
|
||||
done
|
||||
fi
|
||||
|
@ -269,3 +269,5 @@ ddc07abf4307855c0dc904cc5c96cc764023a930 jdk9-b22
|
||||
8a44142bb7fc8118f70f91a1b97c12dfc50563ee jdk9-b24
|
||||
da08cca6b97f41b7081a3e176dcb400af6e4bb26 jdk9-b25
|
||||
6c777df597bbf5abba3488d44c401edfe73c74af jdk9-b26
|
||||
7e06bf1dcb0907b80ddf59315426ce9ce775e56d jdk9-b27
|
||||
a00b04ef067e39f50b9a0fea6f1904e35d632a73 jdk9-b28
|
||||
|
@ -50,8 +50,9 @@ $(eval $(call SetupJavaCompilation,BUILD_IDLJ, \
|
||||
INCLUDES := com/sun/tools/corba/se/idl, \
|
||||
EXCLUDE_FILES := ResourceBundleUtil.java))
|
||||
|
||||
# Force the language to english for predictable source code generation.
|
||||
TOOL_IDLJ_CMD := $(JAVA) -cp $(CORBA_OUTPUTDIR)/idlj_classes \
|
||||
com.sun.tools.corba.se.idl.toJavaPortable.Compile
|
||||
-Duser.language=en com.sun.tools.corba.se.idl.toJavaPortable.Compile
|
||||
|
||||
################################################################################
|
||||
|
||||
|
@ -38,11 +38,11 @@ package org.omg.CORBA;
|
||||
* OMG specifications :
|
||||
* <ul>
|
||||
* <li> ORB core as defined by CORBA 2.3.1
|
||||
* (<a href="http://cgi.omg.org/cgi-bin/doc?formal/99-10-07">formal/99-10-07</a>)
|
||||
* (<a href="http://www.omg.org/cgi-bin/doc?formal/99-10-07">formal/99-10-07</a>)
|
||||
* </li>
|
||||
*
|
||||
* <li> IDL/Java Language Mapping as defined in
|
||||
* <a href="http://cgi.omg.org/cgi-bin/doc?ptc/00-01-08">ptc/00-01-08</a>
|
||||
* <a href="http://www.omg.org/cgi-bin/doc?ptc/00-01-08">ptc/00-01-08</a>
|
||||
* </li>
|
||||
* </ul>
|
||||
*/
|
||||
|
@ -67,7 +67,7 @@ if [ "x$hgwhere" = "x" ]; then
|
||||
error "Could not locate Mercurial command"
|
||||
fi
|
||||
|
||||
hgversion="`hg --version 2> /dev/null | sed -n -e 's@^Mercurial Distributed SCM (version \([^+]*\).*)\$@\1@p'`"
|
||||
hgversion="`LANGUAGE=en hg --version 2> /dev/null | sed -n -e 's@^Mercurial Distributed SCM (version \([^+]*\).*)\$@\1@p'`"
|
||||
if [ "x${hgversion}" = "x" ] ; then
|
||||
error "Could not determine Mercurial version of $hgwhere"
|
||||
fi
|
||||
|
@ -429,3 +429,6 @@ dd472cdacc32e3afc7c5bfa7ef16ea0e0befb7fa jdk9-b23
|
||||
dde2d03b0ea46a27650839e3a1d212c7c1f7b4c8 jdk9-b24
|
||||
6de94e8693240cec8aae11f6b42f43433456a733 jdk9-b25
|
||||
48b95a073d752d6891cc0d1d2836b321ecf3ce0c jdk9-b26
|
||||
f95347244306affc32ce3056f27ceff7b2100810 jdk9-b27
|
||||
657294869d7ff063e055f5492cab7ce5612ca851 jdk9-b28
|
||||
deb29e92f68ace2808a36ecfa18c7d61dcb645bb jdk9-b29
|
||||
|
@ -269,3 +269,5 @@ f9c82769a6bc2b219a8f01c24afe5c91039267d7 jdk9-b19
|
||||
345af113f57206711f75089c3ebf84a36a789122 jdk9-b24
|
||||
73757f4b8aa353ca8937abc07e79e7ece4c011a1 jdk9-b25
|
||||
a5aea8318ae4a9c2105228568688875142d70344 jdk9-b26
|
||||
2bfaf29cc90b19948938e3ef1a0983eee68806c7 jdk9-b27
|
||||
dc1e26434b3fd7e9b8eeab149103c1e30965f95c jdk9-b28
|
||||
|
@ -1,13 +1,10 @@
|
||||
/*
|
||||
* Copyright (c) 2003, 2013, Oracle and/or its affiliates. All rights reserved.
|
||||
*/
|
||||
|
||||
/*
|
||||
* Copyright 2005 The Apache Software Foundation.
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
* Licensed to the Apache Software Foundation (ASF) under one or more
|
||||
* contributor license agreements. See the NOTICE file distributed with
|
||||
* this work for additional information regarding copyright ownership.
|
||||
* The ASF licenses this file to You under the Apache License, Version 2.0
|
||||
* (the "License"); you may not use this file except in compliance with
|
||||
* the License. You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
@ -41,6 +38,9 @@ public final class Constants {
|
||||
public static final String NS_XMLSCHEMA = "http://www.w3.org/2001/XMLSchema".intern();
|
||||
public static final String NS_DTD = "http://www.w3.org/TR/REC-xml".intern();
|
||||
|
||||
// Schema Versions:
|
||||
public static final String W3C_XML_SCHEMA10_NS_URI = "http://www.w3.org/XML/XMLSchema/v1.0".intern();
|
||||
|
||||
// Schema features
|
||||
public static final String SUN_SCHEMA_FEATURE_PREFIX = "http://java.sun.com/xml/schema/features/";
|
||||
public static final String SUN_REPORT_IGNORED_ELEMENT_CONTENT_WHITESPACE = "report-ignored-element-content-whitespace";
|
||||
@ -487,6 +487,40 @@ public final class Constants {
|
||||
/** XInclude fixup language feature ("xinclude/fixup-language"). */
|
||||
public static final String XINCLUDE_FIXUP_LANGUAGE_FEATURE = "xinclude/fixup-language";
|
||||
|
||||
/**
|
||||
* Feature to ignore xsi:type attributes on elements during validation,
|
||||
* until a global element declaration is found. ("validation/schema/ignore-xsi-type-until-elemdecl")
|
||||
* If this feature is on when validating a document, then beginning at the validation root
|
||||
* element, xsi:type attributes are ignored until a global element declaration is
|
||||
* found for an element. Once a global element declaration has been found, xsi:type
|
||||
* attributes will start being processed for the sub-tree beginning at the element for
|
||||
* which the declaration was found.
|
||||
*
|
||||
* Suppose an element A has two element children, B and C.
|
||||
*
|
||||
* If a global element declaration is found for A, xsi:type attributes on A, B and C,
|
||||
* and all of B and C's descendents, will be processed.
|
||||
*
|
||||
* If no global element declaration is found for A or B, but one is found for C,
|
||||
* then xsi:type attributes will be ignored on A and B (and any descendents of B,
|
||||
* until a global element declaration is found), but xsi:type attributes will be
|
||||
* processed for C and all of C's descendents.
|
||||
*
|
||||
* Once xsi:type attributes stop being ignored for a subtree, they do not start
|
||||
* being ignored again, even if more elements are encountered for which no global
|
||||
* element declaration can be found.
|
||||
*/
|
||||
public static final String IGNORE_XSI_TYPE_FEATURE = "validation/schema/ignore-xsi-type-until-elemdecl";
|
||||
|
||||
/** Perform checking of ID/IDREFs ("validation/id-idref-checking") */
|
||||
public static final String ID_IDREF_CHECKING_FEATURE = "validation/id-idref-checking";
|
||||
|
||||
/** Feature to ignore errors caused by identity constraints ("validation/identity-constraint-checking") */
|
||||
public static final String IDC_CHECKING_FEATURE = "validation/identity-constraint-checking";
|
||||
|
||||
/** Feature to ignore errors caused by unparsed entities ("validation/unparsed-entity-checking") */
|
||||
public static final String UNPARSED_ENTITY_CHECKING_FEATURE = "validation/unparsed-entity-checking";
|
||||
|
||||
/**
|
||||
* Internal feature. When set to true the schema validator will only use
|
||||
* schema components from the grammar pool provided.
|
||||
@ -598,6 +632,8 @@ public final class Constants {
|
||||
/** Validation manager property ("internal/validation-manager"). */
|
||||
public static final String VALIDATION_MANAGER_PROPERTY = "internal/validation-manager";
|
||||
|
||||
/** Schema type of the root element in a document ("validation/schema/root-type-definition"). */
|
||||
public static final String ROOT_TYPE_DEFINITION_PROPERTY = "validation/schema/root-type-definition";
|
||||
|
||||
/** XPointer Schema property ("xpointer-schema"). */
|
||||
public static final String XPOINTER_SCHEMA_PROPERTY = "xpointer-schema";
|
||||
@ -739,6 +775,10 @@ public final class Constants {
|
||||
XINCLUDE_FEATURE,
|
||||
XINCLUDE_FIXUP_BASE_URIS_FEATURE,
|
||||
XINCLUDE_FIXUP_LANGUAGE_FEATURE,
|
||||
IGNORE_XSI_TYPE_FEATURE,
|
||||
ID_IDREF_CHECKING_FEATURE,
|
||||
IDC_CHECKING_FEATURE,
|
||||
UNPARSED_ENTITY_CHECKING_FEATURE,
|
||||
NAMESPACE_GROWTH_FEATURE,
|
||||
TOLERATE_DUPLICATES_FEATURE,
|
||||
};
|
||||
@ -762,6 +802,7 @@ public final class Constants {
|
||||
VALIDATION_MANAGER_PROPERTY,
|
||||
BUFFER_SIZE_PROPERTY,
|
||||
SECURITY_MANAGER_PROPERTY,
|
||||
ROOT_TYPE_DEFINITION_PROPERTY,
|
||||
LOCALE_PROPERTY,
|
||||
SCHEMA_DV_FACTORY_PROPERTY,
|
||||
};
|
||||
|
@ -1,13 +1,10 @@
|
||||
/*
|
||||
* reserved comment block
|
||||
* DO NOT REMOVE OR ALTER!
|
||||
*/
|
||||
/*
|
||||
* Copyright 2001, 2002,2004 The Apache Software Foundation.
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
* Licensed to the Apache Software Foundation (ASF) under one or more
|
||||
* contributor license agreements. See the NOTICE file distributed with
|
||||
* this work for additional information regarding copyright ownership.
|
||||
* The ASF licenses this file to You under the Apache License, Version 2.0
|
||||
* (the "License"); you may not use this file except in compliance with
|
||||
* the License. You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
@ -21,6 +18,7 @@
|
||||
package com.sun.org.apache.xerces.internal.impl.dv;
|
||||
|
||||
import com.sun.org.apache.xerces.internal.xs.ShortList;
|
||||
import com.sun.org.apache.xerces.internal.xs.XSConstants;
|
||||
|
||||
/**
|
||||
* Class to get the information back after content is validated. This info
|
||||
@ -95,4 +93,60 @@ public class ValidatedInfo {
|
||||
else
|
||||
return actualValue.toString();
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns true if the two ValidatedInfo objects can be compared in the same
|
||||
* value space.
|
||||
*/
|
||||
public static boolean isComparable(ValidatedInfo info1, ValidatedInfo info2) {
|
||||
final short primitiveType1 = convertToPrimitiveKind(info1.actualValueType);
|
||||
final short primitiveType2 = convertToPrimitiveKind(info2.actualValueType);
|
||||
if (primitiveType1 != primitiveType2) {
|
||||
return (primitiveType1 == XSConstants.ANYSIMPLETYPE_DT && primitiveType2 == XSConstants.STRING_DT ||
|
||||
primitiveType1 == XSConstants.STRING_DT && primitiveType2 == XSConstants.ANYSIMPLETYPE_DT);
|
||||
}
|
||||
else if (primitiveType1 == XSConstants.LIST_DT || primitiveType1 == XSConstants.LISTOFUNION_DT) {
|
||||
final ShortList typeList1 = info1.itemValueTypes;
|
||||
final ShortList typeList2 = info2.itemValueTypes;
|
||||
final int typeList1Length = typeList1 != null ? typeList1.getLength() : 0;
|
||||
final int typeList2Length = typeList2 != null ? typeList2.getLength() : 0;
|
||||
if (typeList1Length != typeList2Length) {
|
||||
return false;
|
||||
}
|
||||
for (int i = 0; i < typeList1Length; ++i) {
|
||||
final short primitiveItem1 = convertToPrimitiveKind(typeList1.item(i));
|
||||
final short primitiveItem2 = convertToPrimitiveKind(typeList2.item(i));
|
||||
if (primitiveItem1 != primitiveItem2) {
|
||||
if (primitiveItem1 == XSConstants.ANYSIMPLETYPE_DT && primitiveItem2 == XSConstants.STRING_DT ||
|
||||
primitiveItem1 == XSConstants.STRING_DT && primitiveItem2 == XSConstants.ANYSIMPLETYPE_DT) {
|
||||
continue;
|
||||
}
|
||||
return false;
|
||||
}
|
||||
}
|
||||
}
|
||||
return true;
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns the primitive type of the given type.
|
||||
* @param valueType A value type as defined in XSConstants.
|
||||
* @return The primitive type from which valueType was derived.
|
||||
*/
|
||||
private static short convertToPrimitiveKind(short valueType) {
|
||||
/** Primitive datatypes. */
|
||||
if (valueType <= XSConstants.NOTATION_DT) {
|
||||
return valueType;
|
||||
}
|
||||
/** Types derived from string. */
|
||||
if (valueType <= XSConstants.ENTITY_DT) {
|
||||
return XSConstants.STRING_DT;
|
||||
}
|
||||
/** Types derived from decimal. */
|
||||
if (valueType <= XSConstants.POSITIVEINTEGER_DT) {
|
||||
return XSConstants.DECIMAL_DT;
|
||||
}
|
||||
/** Other types. */
|
||||
return valueType;
|
||||
}
|
||||
}
|
||||
|
@ -14,20 +14,18 @@
|
||||
|
||||
# Identity constraints
|
||||
|
||||
AbsentKeyValue = Identity Constraint error (cvc-identity-constraint.4.2.1): element \"{0}\" has a key with no value.
|
||||
AbsentKeyValue = cvc-identity-constraint.4.2.1.a: Element \"{0}\" has no value for the key \"{1}\".
|
||||
DuplicateField = Duplicate match in scope for field \"{0}\".
|
||||
DuplicateKey = Duplicate key value [{0}] declared for identity constraint of element \"{1}\".
|
||||
DuplicateUnique = Duplicate unique value [{0}] declared for identity constraint of element \"{1}\".
|
||||
FieldMultipleMatch = Identity constraint error: field \"{0}\" matches more than one value within the scope of its selector; fields must match unique values.
|
||||
DuplicateKey = cvc-identity-constraint.4.2.2: Duplicate key value [{0}] declared for identity constraint \"{2}\" of element \"{1}\".
|
||||
DuplicateUnique = cvc-identity-constraint.4.1: Duplicate unique value [{0}] declared for identity constraint \"{2}\" of element \"{1}\".
|
||||
FieldMultipleMatch = cvc-identity-constraint.3: Field \"{0}\" of identity constraint \"{1}\" matches more than one value within the scope of its selector; fields must match unique values.
|
||||
FixedDiffersFromActual = The content of this element is not equivalent to the value of the \"fixed\" attribute in the element's declaration in the schema.
|
||||
KeyMatchesNillable = Identity Constraint error (cvc-identity-constraint.4.2.3): element \"{0}\" has a key which matches an element which has nillable set to true.
|
||||
KeyNotEnoughValues = Not enough values specified for <key name=\"{1}\"> identity constraint specified for element \"{0}\".
|
||||
KeyNotFound = Key ''{0}'' with value ''{1}'' not found for identity constraint of element ''{2}''.
|
||||
KeyRefNotEnoughValues = Not enough values specified for <keyref name=\"{1}\"> identity constraint specified for element \"{0}\".
|
||||
KeyMatchesNillable = cvc-identity-constraint.4.2.3: Element \"{0}\" has the key \"{1}\" which matches an element which has nillable set to true.
|
||||
KeyNotEnoughValues = cvc-identity-constraint.4.2.1.b: Not enough values specified for <key name=\"{1}\"> identity constraint specified for element \"{0}\".
|
||||
KeyNotFound = cvc-identity-constraint.4.3: Key ''{0}'' with value ''{1}'' not found for identity constraint of element ''{2}''.
|
||||
KeyRefOutOfScope = Identity Constraint error: identity constraint \"{0}\" has a keyref which refers to a key or unique that is out of scope.
|
||||
KeyRefReferNotFound = Key reference declaration \"{0}\" refers to unknown key with name \"{1}\".
|
||||
UniqueNotEnoughValues = Not enough values specified for <unique> identity constraint specified for element \"{0}\".
|
||||
UnknownField = Internal identity constraint error; unknown field \"{0}\".
|
||||
UnknownField = Internal identity constraint error; unknown field \"{0}\" for identity constraint \"{2}\" specified for element \"{1}\".
|
||||
|
||||
# Ideally, we should only use the following error keys, not the ones under
|
||||
# "Identity constraints". And we should cover all of the following errors.
|
||||
@ -79,6 +77,7 @@
|
||||
cvc-minLength-valid = cvc-minLength-valid: Value ''{0}'' with length = ''{1}'' is not facet-valid with respect to minLength ''{2}'' for type ''{3}''.
|
||||
cvc-pattern-valid = cvc-pattern-valid: Value ''{0}'' is not facet-valid with respect to pattern ''{1}'' for type ''{2}''.
|
||||
cvc-totalDigits-valid = cvc-totalDigits-valid: Value ''{0}'' has {1} total digits, but the number of total digits has been limited to {2}.
|
||||
cvc-type.1 = cvc-type.1: The type definition ''{0}'' was not found.
|
||||
cvc-type.2 = cvc-type.2: The type definition cannot be abstract for element {0}.
|
||||
cvc-type.3.1.1 = cvc-type.3.1.1: Element ''{0}'' is a simple type, so it cannot have attributes, excepting those whose namespace name is identical to ''http://www.w3.org/2001/XMLSchema-instance'' and whose [local name] is one of ''type'', ''nil'', ''schemaLocation'' or ''noNamespaceSchemaLocation''. However, the attribute, ''{1}'' was found.
|
||||
cvc-type.3.1.2 = cvc-type.3.1.2: Element ''{0}'' is a simple type, so it must have no element information item [children].
|
||||
|
@ -0,0 +1,123 @@
|
||||
/*
|
||||
* Copyright 2006 The Apache Software Foundation.
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
package com.sun.org.apache.xerces.internal.impl.validation;
|
||||
|
||||
/**
|
||||
* <p>An extension of ValidationState which can be configured to turn
|
||||
* off checking for ID/IDREF errors and unparsed entity errors.</p>
|
||||
*
|
||||
* @xerces.internal
|
||||
*
|
||||
* @author Peter McCracken, IBM
|
||||
*/
|
||||
public final class ConfigurableValidationState extends ValidationState {
|
||||
|
||||
/**
|
||||
* Whether to check for ID/IDREF errors
|
||||
*/
|
||||
private boolean fIdIdrefChecking;
|
||||
|
||||
/**
|
||||
* Whether to check for unparsed entity errors
|
||||
*/
|
||||
private boolean fUnparsedEntityChecking;
|
||||
|
||||
/**
|
||||
* Creates a new ConfigurableValidationState.
|
||||
* By default, error checking for both ID/IDREFs
|
||||
* and unparsed entities are turned on.
|
||||
*/
|
||||
public ConfigurableValidationState() {
|
||||
super();
|
||||
fIdIdrefChecking = true;
|
||||
fUnparsedEntityChecking = true;
|
||||
}
|
||||
|
||||
/**
|
||||
* Turns checking for ID/IDREF errors on and off.
|
||||
* @param setting: true to turn on error checking
|
||||
* false to turn off error checking
|
||||
*/
|
||||
public void setIdIdrefChecking(boolean setting) {
|
||||
fIdIdrefChecking = setting;
|
||||
}
|
||||
|
||||
/**
|
||||
* Turns checking for unparsed entity errors on and off.
|
||||
* @param setting: true to turn on error checking
|
||||
* false to turn off error checking
|
||||
*/
|
||||
public void setUnparsedEntityChecking(boolean setting) {
|
||||
fUnparsedEntityChecking = setting;
|
||||
}
|
||||
|
||||
/**
|
||||
* Checks if all IDREFs have a corresponding ID.
|
||||
* @return null, if ID/IDREF checking is turned off
|
||||
* otherwise, returns the value of the super implementation
|
||||
*/
|
||||
public String checkIDRefID() {
|
||||
return (fIdIdrefChecking) ? super.checkIDRefID() : null;
|
||||
}
|
||||
|
||||
/**
|
||||
* Checks if an ID has already been declared.
|
||||
* @return false, if ID/IDREF checking is turned off
|
||||
* otherwise, returns the value of the super implementation
|
||||
*/
|
||||
public boolean isIdDeclared(String name) {
|
||||
return (fIdIdrefChecking) ? super.isIdDeclared(name) : false;
|
||||
}
|
||||
|
||||
/**
|
||||
* Checks if an entity is declared.
|
||||
* @return true, if unparsed entity checking is turned off
|
||||
* otherwise, returns the value of the super implementation
|
||||
*/
|
||||
public boolean isEntityDeclared(String name) {
|
||||
return (fUnparsedEntityChecking) ? super.isEntityDeclared(name) : true;
|
||||
}
|
||||
|
||||
/**
|
||||
* Checks if an entity is unparsed.
|
||||
* @return true, if unparsed entity checking is turned off
|
||||
* otherwise, returns the value of the super implementation
|
||||
*/
|
||||
public boolean isEntityUnparsed(String name) {
|
||||
return (fUnparsedEntityChecking) ? super.isEntityUnparsed(name) : true;
|
||||
}
|
||||
|
||||
/**
|
||||
* Adds the ID, if ID/IDREF checking is enabled.
|
||||
* @param the ID to add
|
||||
*/
|
||||
public void addId(String name) {
|
||||
if (fIdIdrefChecking) {
|
||||
super.addId(name);
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Adds the IDREF, if ID/IDREF checking is enabled.
|
||||
* @param the IDREF to add
|
||||
*/
|
||||
public void addIdRef(String name) {
|
||||
if (fIdIdrefChecking) {
|
||||
super.addIdRef(name);
|
||||
}
|
||||
}
|
||||
}
|
@ -1,13 +1,10 @@
|
||||
/*
|
||||
* reserved comment block
|
||||
* DO NOT REMOVE OR ALTER!
|
||||
*/
|
||||
/*
|
||||
* Copyright 1999-2005 The Apache Software Foundation.
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
* Licensed to the Apache Software Foundation (ASF) under one or more
|
||||
* contributor license agreements. See the NOTICE file distributed with
|
||||
* this work for additional information regarding copyright ownership.
|
||||
* The ASF licenses this file to You under the Apache License, Version 2.0
|
||||
* (the "License"); you may not use this file except in compliance with
|
||||
* the License. You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
@ -38,6 +35,7 @@ import com.sun.org.apache.xerces.internal.impl.dv.DatatypeException;
|
||||
import com.sun.org.apache.xerces.internal.impl.dv.InvalidDatatypeValueException;
|
||||
import com.sun.org.apache.xerces.internal.impl.dv.ValidatedInfo;
|
||||
import com.sun.org.apache.xerces.internal.impl.dv.XSSimpleType;
|
||||
import com.sun.org.apache.xerces.internal.impl.validation.ConfigurableValidationState;
|
||||
import com.sun.org.apache.xerces.internal.impl.validation.ValidationManager;
|
||||
import com.sun.org.apache.xerces.internal.impl.validation.ValidationState;
|
||||
import com.sun.org.apache.xerces.internal.impl.xs.identity.Field;
|
||||
@ -185,6 +183,22 @@ public class XMLSchemaValidator
|
||||
protected static final String TOLERATE_DUPLICATES =
|
||||
Constants.XERCES_FEATURE_PREFIX + Constants.TOLERATE_DUPLICATES_FEATURE;
|
||||
|
||||
/** Feature identifier: whether to ignore xsi:type attributes until a global element declaration is encountered */
|
||||
protected static final String IGNORE_XSI_TYPE =
|
||||
Constants.XERCES_FEATURE_PREFIX + Constants.IGNORE_XSI_TYPE_FEATURE;
|
||||
|
||||
/** Feature identifier: whether to ignore ID/IDREF errors */
|
||||
protected static final String ID_IDREF_CHECKING =
|
||||
Constants.XERCES_FEATURE_PREFIX + Constants.ID_IDREF_CHECKING_FEATURE;
|
||||
|
||||
/** Feature identifier: whether to ignore unparsed entity errors */
|
||||
protected static final String UNPARSED_ENTITY_CHECKING =
|
||||
Constants.XERCES_FEATURE_PREFIX + Constants.UNPARSED_ENTITY_CHECKING_FEATURE;
|
||||
|
||||
/** Feature identifier: whether to ignore identity constraint errors */
|
||||
protected static final String IDENTITY_CONSTRAINT_CHECKING =
|
||||
Constants.XERCES_FEATURE_PREFIX + Constants.IDC_CHECKING_FEATURE;
|
||||
|
||||
protected static final String REPORT_WHITESPACE =
|
||||
Constants.SUN_SCHEMA_FEATURE_PREFIX + Constants.SUN_REPORT_IGNORED_ELEMENT_CONTENT_WHITESPACE;
|
||||
|
||||
@ -228,6 +242,10 @@ public class XMLSchemaValidator
|
||||
protected static final String JAXP_SCHEMA_LANGUAGE =
|
||||
Constants.JAXP_PROPERTY_PREFIX + Constants.SCHEMA_LANGUAGE;
|
||||
|
||||
/** Property identifier: root type definition. */
|
||||
protected static final String ROOT_TYPE_DEF =
|
||||
Constants.XERCES_PROPERTY_PREFIX + Constants.ROOT_TYPE_DEFINITION_PROPERTY;
|
||||
|
||||
/** Property identifier: Schema DV Factory */
|
||||
protected static final String SCHEMA_DV_FACTORY =
|
||||
Constants.XERCES_PROPERTY_PREFIX + Constants.SCHEMA_DV_FACTORY_PROPERTY;
|
||||
@ -254,6 +272,10 @@ public class XMLSchemaValidator
|
||||
VALIDATE_ANNOTATIONS,
|
||||
HONOUR_ALL_SCHEMALOCATIONS,
|
||||
USE_GRAMMAR_POOL_ONLY,
|
||||
IGNORE_XSI_TYPE,
|
||||
ID_IDREF_CHECKING,
|
||||
IDENTITY_CONSTRAINT_CHECKING,
|
||||
UNPARSED_ENTITY_CHECKING,
|
||||
NAMESPACE_GROWTH,
|
||||
TOLERATE_DUPLICATES,
|
||||
USE_SERVICE_MECHANISM
|
||||
@ -267,6 +289,10 @@ public class XMLSchemaValidator
|
||||
// those set by the application. This goes against the
|
||||
// whole purpose of XMLComponent#getFeatureDefault but
|
||||
// it can't be helped in this case. -Ac
|
||||
// NOTE: Instead of adding default values here, add them (and
|
||||
// the corresponding recognized features) to the objects
|
||||
// that have an XMLSchemaValidator instance as a member,
|
||||
// such as the parser configurations. -PM
|
||||
null, //Boolean.FALSE,
|
||||
null, //Boolean.FALSE,
|
||||
null, //Boolean.FALSE,
|
||||
@ -279,6 +305,10 @@ public class XMLSchemaValidator
|
||||
null,
|
||||
null,
|
||||
null,
|
||||
null,
|
||||
null,
|
||||
null,
|
||||
null,
|
||||
Boolean.TRUE
|
||||
};
|
||||
|
||||
@ -293,13 +323,14 @@ public class XMLSchemaValidator
|
||||
SCHEMA_NONS_LOCATION,
|
||||
JAXP_SCHEMA_SOURCE,
|
||||
JAXP_SCHEMA_LANGUAGE,
|
||||
ROOT_TYPE_DEF,
|
||||
SCHEMA_DV_FACTORY,
|
||||
XML_SECURITY_PROPERTY_MANAGER
|
||||
};
|
||||
|
||||
/** Property defaults. */
|
||||
private static final Object[] PROPERTY_DEFAULTS =
|
||||
{ null, null, null, null, null, null, null, null, null, null, null, null, null};
|
||||
{ null, null, null, null, null, null, null, null, null, null, null};
|
||||
|
||||
// this is the number of valuestores of each kind
|
||||
// we expect an element to have. It's almost
|
||||
@ -482,7 +513,7 @@ public class XMLSchemaValidator
|
||||
|
||||
// updated during reset
|
||||
protected ValidationManager fValidationManager = null;
|
||||
protected ValidationState fValidationState = new ValidationState();
|
||||
protected ConfigurableValidationState fValidationState = new ConfigurableValidationState();
|
||||
protected XMLGrammarPool fGrammarPool;
|
||||
|
||||
// schema location property values
|
||||
@ -562,6 +593,9 @@ public class XMLSchemaValidator
|
||||
* this exception.
|
||||
*/
|
||||
public void setProperty(String propertyId, Object value) throws XMLConfigurationException {
|
||||
if (propertyId.equals(ROOT_TYPE_DEF)) {
|
||||
fRootTypeQName = (javax.xml.namespace.QName)value;
|
||||
}
|
||||
} // setProperty(String,Object)
|
||||
|
||||
/**
|
||||
@ -1234,6 +1268,12 @@ public class XMLSchemaValidator
|
||||
/** temporary qname */
|
||||
private final QName fTempQName = new QName();
|
||||
|
||||
private javax.xml.namespace.QName fRootTypeQName = null;
|
||||
|
||||
private int fIgnoreXSITypeDepth;
|
||||
|
||||
private boolean fIDCChecking;
|
||||
|
||||
/** temporary validated info */
|
||||
private ValidatedInfo fValidatedInfo = new ValidatedInfo();
|
||||
|
||||
@ -1384,6 +1424,38 @@ public class XMLSchemaValidator
|
||||
fValidationManager.addValidationState(fValidationState);
|
||||
fValidationState.setSymbolTable(fSymbolTable);
|
||||
|
||||
boolean ignoreXSIType;
|
||||
try {
|
||||
ignoreXSIType = componentManager.getFeature(IGNORE_XSI_TYPE);
|
||||
}
|
||||
catch (XMLConfigurationException e) {
|
||||
ignoreXSIType = false;
|
||||
}
|
||||
// An initial value of -1 means that the root element considers itself
|
||||
// below the depth where xsi:type stopped being ignored (which means that
|
||||
// xsi:type attributes will not be ignored for the entire document)
|
||||
fIgnoreXSITypeDepth = ignoreXSIType ? 0 : -1;
|
||||
|
||||
try {
|
||||
fIDCChecking = componentManager.getFeature(IDENTITY_CONSTRAINT_CHECKING);
|
||||
}
|
||||
catch (XMLConfigurationException e) {
|
||||
fIDCChecking = true;
|
||||
}
|
||||
|
||||
try {
|
||||
fValidationState.setIdIdrefChecking(componentManager.getFeature(ID_IDREF_CHECKING));
|
||||
}
|
||||
catch (XMLConfigurationException e) {
|
||||
fValidationState.setIdIdrefChecking(true);
|
||||
}
|
||||
|
||||
try {
|
||||
fValidationState.setUnparsedEntityChecking(componentManager.getFeature(UNPARSED_ENTITY_CHECKING));
|
||||
}
|
||||
catch (XMLConfigurationException e) {
|
||||
fValidationState.setUnparsedEntityChecking(true);
|
||||
}
|
||||
|
||||
// get schema location properties
|
||||
try {
|
||||
@ -1550,7 +1622,9 @@ public class XMLSchemaValidator
|
||||
|
||||
// handle start document
|
||||
void handleStartDocument(XMLLocator locator, String encoding) {
|
||||
fValueStoreCache.startDocument();
|
||||
if (fIDCChecking) {
|
||||
fValueStoreCache.startDocument();
|
||||
}
|
||||
if (fAugPSVI) {
|
||||
fCurrentPSVI.fGrammars = null;
|
||||
fCurrentPSVI.fSchemaInformation = null;
|
||||
@ -1558,7 +1632,9 @@ public class XMLSchemaValidator
|
||||
} // handleStartDocument(XMLLocator,String)
|
||||
|
||||
void handleEndDocument() {
|
||||
fValueStoreCache.endDocument();
|
||||
if (fIDCChecking) {
|
||||
fValueStoreCache.endDocument();
|
||||
}
|
||||
} // handleEndDocument()
|
||||
|
||||
// handle character contents
|
||||
@ -1850,22 +1926,54 @@ public class XMLSchemaValidator
|
||||
return augs;
|
||||
}
|
||||
|
||||
// try again to get the element decl:
|
||||
// case 1: find declaration for root element
|
||||
// case 2: find declaration for element from another namespace
|
||||
if (fCurrentElemDecl == null) {
|
||||
if (sGrammar != null) {
|
||||
fCurrentElemDecl = sGrammar.getGlobalElementDecl(element.localpart);
|
||||
// 1.2.1.1 A type definition was stipulated by the processor
|
||||
if (fElementDepth == 0 && fRootTypeQName != null) {
|
||||
String rootTypeNamespace = fRootTypeQName.getNamespaceURI();
|
||||
if (rootTypeNamespace != null && rootTypeNamespace.equals(XMLConstants.NULL_NS_URI)) {
|
||||
rootTypeNamespace = null;
|
||||
}
|
||||
SchemaGrammar grammarForRootType =
|
||||
findSchemaGrammar(
|
||||
XSDDescription.CONTEXT_ELEMENT, rootTypeNamespace, null, null, null);
|
||||
if (grammarForRootType != null) {
|
||||
fCurrentType = grammarForRootType.getGlobalTypeDecl(fRootTypeQName.getLocalPart());
|
||||
}
|
||||
if (fCurrentType == null) {
|
||||
String typeName = (fRootTypeQName.getPrefix().equals(XMLConstants.DEFAULT_NS_PREFIX)) ?
|
||||
fRootTypeQName.getLocalPart() :
|
||||
fRootTypeQName.getPrefix()+":"+fRootTypeQName.getLocalPart();
|
||||
reportSchemaError("cvc-type.1", new Object[] {typeName});
|
||||
}
|
||||
}
|
||||
|
||||
if (fCurrentElemDecl != null) {
|
||||
// then get the type
|
||||
fCurrentType = fCurrentElemDecl.fType;
|
||||
// if there was no processor stipulated type
|
||||
if (fCurrentType == null) {
|
||||
// try again to get the element decl:
|
||||
// case 1: find declaration for root element
|
||||
// case 2: find declaration for element from another namespace
|
||||
if (fCurrentElemDecl == null) {
|
||||
if (sGrammar != null) {
|
||||
fCurrentElemDecl = sGrammar.getGlobalElementDecl(element.localpart);
|
||||
}
|
||||
}
|
||||
|
||||
if (fCurrentElemDecl != null) {
|
||||
// then get the type
|
||||
fCurrentType = fCurrentElemDecl.fType;
|
||||
}
|
||||
}
|
||||
|
||||
// get type from xsi:type
|
||||
String xsiType = attributes.getValue(SchemaSymbols.URI_XSI, SchemaSymbols.XSI_TYPE);
|
||||
|
||||
// check if we should be ignoring xsi:type on this element
|
||||
if (fElementDepth == fIgnoreXSITypeDepth && fCurrentElemDecl == null) {
|
||||
fIgnoreXSITypeDepth++;
|
||||
}
|
||||
|
||||
// process xsi:type attribute information
|
||||
String xsiType = null;
|
||||
if (fElementDepth >= fIgnoreXSITypeDepth) {
|
||||
xsiType = attributes.getValue(SchemaSymbols.URI_XSI, SchemaSymbols.XSI_TYPE);
|
||||
}
|
||||
|
||||
// if no decl/type found for the current element
|
||||
if (fCurrentType == null && xsiType == null) {
|
||||
@ -2044,13 +2152,17 @@ public class XMLSchemaValidator
|
||||
XSComplexTypeDecl ctype = (XSComplexTypeDecl) fCurrentType;
|
||||
attrGrp = ctype.getAttrGrp();
|
||||
}
|
||||
// activate identity constraints
|
||||
fValueStoreCache.startElement();
|
||||
fMatcherStack.pushContext();
|
||||
if (fCurrentElemDecl != null && fCurrentElemDecl.fIDCPos > 0) {
|
||||
fIdConstraint = true;
|
||||
// initialize when identity constrains are defined for the elem
|
||||
fValueStoreCache.initValueStoresFor(fCurrentElemDecl, this);
|
||||
|
||||
if (fIDCChecking) {
|
||||
// activate identity constraints
|
||||
fValueStoreCache.startElement();
|
||||
fMatcherStack.pushContext();
|
||||
//if (fCurrentElemDecl != null && fCurrentElemDecl.fIDCPos > 0 && !fIgnoreIDC) {
|
||||
if (fCurrentElemDecl != null && fCurrentElemDecl.fIDCPos > 0) {
|
||||
fIdConstraint = true;
|
||||
// initialize when identity constrains are defined for the elem
|
||||
fValueStoreCache.initValueStoresFor(fCurrentElemDecl, this);
|
||||
}
|
||||
}
|
||||
processAttributes(element, attributes, attrGrp);
|
||||
|
||||
@ -2138,66 +2250,75 @@ public class XMLSchemaValidator
|
||||
// now validate the content of the element
|
||||
processElementContent(element);
|
||||
|
||||
// Element Locally Valid (Element)
|
||||
// 6 The element information item must be valid with respect to each of the {identity-constraint definitions} as per Identity-constraint Satisfied (3.11.4).
|
||||
if (fIDCChecking) {
|
||||
// Element Locally Valid (Element)
|
||||
// 6 The element information item must be valid with respect to each of the {identity-constraint definitions} as per Identity-constraint Satisfied (3.11.4).
|
||||
|
||||
// call matchers and de-activate context
|
||||
int oldCount = fMatcherStack.getMatcherCount();
|
||||
for (int i = oldCount - 1; i >= 0; i--) {
|
||||
XPathMatcher matcher = fMatcherStack.getMatcherAt(i);
|
||||
if (fCurrentElemDecl == null)
|
||||
matcher.endElement(element, null, false, fValidatedInfo.actualValue, fValidatedInfo.actualValueType, fValidatedInfo.itemValueTypes);
|
||||
// call matchers and de-activate context
|
||||
int oldCount = fMatcherStack.getMatcherCount();
|
||||
for (int i = oldCount - 1; i >= 0; i--) {
|
||||
XPathMatcher matcher = fMatcherStack.getMatcherAt(i);
|
||||
if (fCurrentElemDecl == null)
|
||||
matcher.endElement(element, null, false, fValidatedInfo.actualValue, fValidatedInfo.actualValueType, fValidatedInfo.itemValueTypes);
|
||||
|
||||
else
|
||||
matcher.endElement(
|
||||
element,
|
||||
fCurrentType,
|
||||
fCurrentElemDecl.getNillable(),
|
||||
fDefaultValue == null
|
||||
? fValidatedInfo.actualValue
|
||||
: fCurrentElemDecl.fDefault.actualValue,
|
||||
fDefaultValue == null
|
||||
? fValidatedInfo.actualValueType
|
||||
: fCurrentElemDecl.fDefault.actualValueType,
|
||||
fDefaultValue == null
|
||||
? fValidatedInfo.itemValueTypes
|
||||
: fCurrentElemDecl.fDefault.itemValueTypes);
|
||||
}
|
||||
else
|
||||
matcher.endElement(
|
||||
element,
|
||||
fCurrentType,
|
||||
fCurrentElemDecl.getNillable(),
|
||||
fDefaultValue == null
|
||||
? fValidatedInfo.actualValue
|
||||
: fCurrentElemDecl.fDefault.actualValue,
|
||||
fDefaultValue == null
|
||||
? fValidatedInfo.actualValueType
|
||||
: fCurrentElemDecl.fDefault.actualValueType,
|
||||
fDefaultValue == null
|
||||
? fValidatedInfo.itemValueTypes
|
||||
: fCurrentElemDecl.fDefault.itemValueTypes);
|
||||
}
|
||||
|
||||
if (fMatcherStack.size() > 0) {
|
||||
fMatcherStack.popContext();
|
||||
}
|
||||
if (fMatcherStack.size() > 0) {
|
||||
fMatcherStack.popContext();
|
||||
}
|
||||
|
||||
int newCount = fMatcherStack.getMatcherCount();
|
||||
// handle everything *but* keyref's.
|
||||
for (int i = oldCount - 1; i >= newCount; i--) {
|
||||
XPathMatcher matcher = fMatcherStack.getMatcherAt(i);
|
||||
if (matcher instanceof Selector.Matcher) {
|
||||
Selector.Matcher selMatcher = (Selector.Matcher) matcher;
|
||||
IdentityConstraint id;
|
||||
if ((id = selMatcher.getIdentityConstraint()) != null
|
||||
&& id.getCategory() != IdentityConstraint.IC_KEYREF) {
|
||||
fValueStoreCache.transplant(id, selMatcher.getInitialDepth());
|
||||
int newCount = fMatcherStack.getMatcherCount();
|
||||
// handle everything *but* keyref's.
|
||||
for (int i = oldCount - 1; i >= newCount; i--) {
|
||||
XPathMatcher matcher = fMatcherStack.getMatcherAt(i);
|
||||
if (matcher instanceof Selector.Matcher) {
|
||||
Selector.Matcher selMatcher = (Selector.Matcher) matcher;
|
||||
IdentityConstraint id;
|
||||
if ((id = selMatcher.getIdentityConstraint()) != null
|
||||
&& id.getCategory() != IdentityConstraint.IC_KEYREF) {
|
||||
fValueStoreCache.transplant(id, selMatcher.getInitialDepth());
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// now handle keyref's/...
|
||||
for (int i = oldCount - 1; i >= newCount; i--) {
|
||||
XPathMatcher matcher = fMatcherStack.getMatcherAt(i);
|
||||
if (matcher instanceof Selector.Matcher) {
|
||||
Selector.Matcher selMatcher = (Selector.Matcher) matcher;
|
||||
IdentityConstraint id;
|
||||
if ((id = selMatcher.getIdentityConstraint()) != null
|
||||
&& id.getCategory() == IdentityConstraint.IC_KEYREF) {
|
||||
ValueStoreBase values =
|
||||
fValueStoreCache.getValueStoreFor(id, selMatcher.getInitialDepth());
|
||||
if (values != null) // nothing to do if nothing matched!
|
||||
values.endDocumentFragment();
|
||||
// now handle keyref's/...
|
||||
for (int i = oldCount - 1; i >= newCount; i--) {
|
||||
XPathMatcher matcher = fMatcherStack.getMatcherAt(i);
|
||||
if (matcher instanceof Selector.Matcher) {
|
||||
Selector.Matcher selMatcher = (Selector.Matcher) matcher;
|
||||
IdentityConstraint id;
|
||||
if ((id = selMatcher.getIdentityConstraint()) != null
|
||||
&& id.getCategory() == IdentityConstraint.IC_KEYREF) {
|
||||
ValueStoreBase values =
|
||||
fValueStoreCache.getValueStoreFor(id, selMatcher.getInitialDepth());
|
||||
if (values != null) // nothing to do if nothing matched!
|
||||
values.endDocumentFragment();
|
||||
}
|
||||
}
|
||||
}
|
||||
fValueStoreCache.endElement();
|
||||
}
|
||||
|
||||
// Check if we should modify the xsi:type ignore depth
|
||||
// This check is independent of whether this is the validation root,
|
||||
// and should be done before the element depth is decremented.
|
||||
if (fElementDepth < fIgnoreXSITypeDepth) {
|
||||
fIgnoreXSITypeDepth--;
|
||||
}
|
||||
fValueStoreCache.endElement();
|
||||
|
||||
SchemaGrammar[] grammars = null;
|
||||
// have we reached the end tag of the validation root?
|
||||
@ -2290,7 +2411,14 @@ public class XMLSchemaValidator
|
||||
// otherwise partial, and anything above this level will be partial
|
||||
else {
|
||||
fCurrentPSVI.fValidationAttempted = ElementPSVI.VALIDATION_PARTIAL;
|
||||
fNFullValidationDepth = fNNoneValidationDepth = fElementDepth - 1;
|
||||
}
|
||||
|
||||
// this guarantees that depth settings do not cross-over between sibling nodes
|
||||
if (fNFullValidationDepth == fElementDepth) {
|
||||
fNFullValidationDepth = fElementDepth - 1;
|
||||
}
|
||||
if (fNNoneValidationDepth == fElementDepth) {
|
||||
fNNoneValidationDepth = fElementDepth - 1;
|
||||
}
|
||||
|
||||
if (fDefaultValue != null)
|
||||
@ -2554,14 +2682,22 @@ public class XMLSchemaValidator
|
||||
// if there is no current type, set this one as current.
|
||||
// and we don't need to do extra checking
|
||||
if (fCurrentType != null) {
|
||||
short block = XSConstants.DERIVATION_NONE;
|
||||
// 4.3 The local type definition must be validly derived from the {type definition} given the union of the {disallowed substitutions} and the {type definition}'s {prohibited substitutions}, as defined in Type Derivation OK (Complex) (3.4.6) (if it is a complex type definition), or given {disallowed substitutions} as defined in Type Derivation OK (Simple) (3.14.6) (if it is a simple type definition).
|
||||
short block = fCurrentElemDecl.fBlock;
|
||||
if (fCurrentType.getTypeCategory() == XSTypeDefinition.COMPLEX_TYPE)
|
||||
// Note: It's possible to have fCurrentType be non-null and fCurrentElemDecl
|
||||
// be null, if the current type is set using the property "root-type-definition".
|
||||
// In that case, we don't disallow any substitutions. -PM
|
||||
if (fCurrentElemDecl != null) {
|
||||
block = fCurrentElemDecl.fBlock;
|
||||
}
|
||||
if (fCurrentType.getTypeCategory() == XSTypeDefinition.COMPLEX_TYPE) {
|
||||
block |= ((XSComplexTypeDecl) fCurrentType).fBlock;
|
||||
if (!XSConstraints.checkTypeDerivationOk(type, fCurrentType, block))
|
||||
}
|
||||
if (!XSConstraints.checkTypeDerivationOk(type, fCurrentType, block)) {
|
||||
reportSchemaError(
|
||||
"cvc-elt.4.3",
|
||||
new Object[] { element.rawname, xsiType, fCurrentType.getName()});
|
||||
"cvc-elt.4.3",
|
||||
new Object[] { element.rawname, xsiType, fCurrentType.getName()});
|
||||
}
|
||||
}
|
||||
|
||||
return type;
|
||||
@ -2835,9 +2971,10 @@ public class XMLSchemaValidator
|
||||
}
|
||||
|
||||
// get the value constraint from use or decl
|
||||
// 4 The item's actual value must match the value of the {value constraint}, if it is present and fixed. // now check the value against the simpleType
|
||||
// 4 The item's actual value must match the value of the {value constraint}, if it is present and fixed.
|
||||
// now check the value against the simpleType
|
||||
if (actualValue != null && currDecl.getConstraintType() == XSConstants.VC_FIXED) {
|
||||
if (!isComparable(fValidatedInfo, currDecl.fDefault) || !actualValue.equals(currDecl.fDefault.actualValue)) {
|
||||
if (!ValidatedInfo.isComparable(fValidatedInfo, currDecl.fDefault) || !actualValue.equals(currDecl.fDefault.actualValue)) {
|
||||
reportSchemaError(
|
||||
"cvc-attribute.4",
|
||||
new Object[] {
|
||||
@ -2852,7 +2989,7 @@ public class XMLSchemaValidator
|
||||
if (actualValue != null
|
||||
&& currUse != null
|
||||
&& currUse.fConstraintType == XSConstants.VC_FIXED) {
|
||||
if (!isComparable(fValidatedInfo, currUse.fDefault) || !actualValue.equals(currUse.fDefault.actualValue)) {
|
||||
if (!ValidatedInfo.isComparable(fValidatedInfo, currUse.fDefault) || !actualValue.equals(currUse.fDefault.actualValue)) {
|
||||
reportSchemaError(
|
||||
"cvc-complex-type.3.1",
|
||||
new Object[] {
|
||||
@ -3083,7 +3220,7 @@ public class XMLSchemaValidator
|
||||
}
|
||||
// 5.2.2.2.2 If the {content type} of the actual type definition is a simple type definition, then the actual value of the item must match the canonical lexical representation of the {value constraint} value.
|
||||
else if (ctype.fContentType == XSComplexTypeDecl.CONTENTTYPE_SIMPLE) {
|
||||
if (actualValue != null && (!isComparable(fValidatedInfo, fCurrentElemDecl.fDefault)
|
||||
if (actualValue != null && (!ValidatedInfo.isComparable(fValidatedInfo, fCurrentElemDecl.fDefault)
|
||||
|| !actualValue.equals(fCurrentElemDecl.fDefault.actualValue))) {
|
||||
reportSchemaError(
|
||||
"cvc-elt.5.2.2.2.2",
|
||||
@ -3094,7 +3231,7 @@ public class XMLSchemaValidator
|
||||
}
|
||||
}
|
||||
} else if (fCurrentType.getTypeCategory() == XSTypeDefinition.SIMPLE_TYPE) {
|
||||
if (actualValue != null && (!isComparable(fValidatedInfo, fCurrentElemDecl.fDefault)
|
||||
if (actualValue != null && (!ValidatedInfo.isComparable(fValidatedInfo, fCurrentElemDecl.fDefault)
|
||||
|| !actualValue.equals(fCurrentElemDecl.fDefault.actualValue))) {
|
||||
// REVISIT: the spec didn't mention this case: fixed
|
||||
// value with simple type
|
||||
@ -3240,53 +3377,6 @@ public class XMLSchemaValidator
|
||||
XMLErrorReporter.SEVERITY_ERROR);
|
||||
}
|
||||
|
||||
/** Returns true if the two ValidatedInfo objects can be compared in the same value space. **/
|
||||
private boolean isComparable(ValidatedInfo info1, ValidatedInfo info2) {
|
||||
final short primitiveType1 = convertToPrimitiveKind(info1.actualValueType);
|
||||
final short primitiveType2 = convertToPrimitiveKind(info2.actualValueType);
|
||||
if (primitiveType1 != primitiveType2) {
|
||||
return (primitiveType1 == XSConstants.ANYSIMPLETYPE_DT && primitiveType2 == XSConstants.STRING_DT ||
|
||||
primitiveType1 == XSConstants.STRING_DT && primitiveType2 == XSConstants.ANYSIMPLETYPE_DT);
|
||||
}
|
||||
else if (primitiveType1 == XSConstants.LIST_DT || primitiveType1 == XSConstants.LISTOFUNION_DT) {
|
||||
final ShortList typeList1 = info1.itemValueTypes;
|
||||
final ShortList typeList2 = info2.itemValueTypes;
|
||||
final int typeList1Length = typeList1 != null ? typeList1.getLength() : 0;
|
||||
final int typeList2Length = typeList2 != null ? typeList2.getLength() : 0;
|
||||
if (typeList1Length != typeList2Length) {
|
||||
return false;
|
||||
}
|
||||
for (int i = 0; i < typeList1Length; ++i) {
|
||||
final short primitiveItem1 = convertToPrimitiveKind(typeList1.item(i));
|
||||
final short primitiveItem2 = convertToPrimitiveKind(typeList2.item(i));
|
||||
if (primitiveItem1 != primitiveItem2) {
|
||||
if (primitiveItem1 == XSConstants.ANYSIMPLETYPE_DT && primitiveItem2 == XSConstants.STRING_DT ||
|
||||
primitiveItem1 == XSConstants.STRING_DT && primitiveItem2 == XSConstants.ANYSIMPLETYPE_DT) {
|
||||
continue;
|
||||
}
|
||||
return false;
|
||||
}
|
||||
}
|
||||
}
|
||||
return true;
|
||||
}
|
||||
|
||||
private short convertToPrimitiveKind(short valueType) {
|
||||
/** Primitive datatypes. */
|
||||
if (valueType <= XSConstants.NOTATION_DT) {
|
||||
return valueType;
|
||||
}
|
||||
/** Types derived from string. */
|
||||
if (valueType <= XSConstants.ENTITY_DT) {
|
||||
return XSConstants.STRING_DT;
|
||||
}
|
||||
/** Types derived from decimal. */
|
||||
if (valueType <= XSConstants.POSITIVEINTEGER_DT) {
|
||||
return XSConstants.DECIMAL_DT;
|
||||
}
|
||||
/** Other types. */
|
||||
return valueType;
|
||||
}
|
||||
|
||||
private String expectedStr(Vector expected) {
|
||||
StringBuffer ret = new StringBuffer("{");
|
||||
|
@ -1,13 +1,10 @@
|
||||
/*
|
||||
* reserved comment block
|
||||
* DO NOT REMOVE OR ALTER!
|
||||
*/
|
||||
/*
|
||||
* Copyright 2005 The Apache Software Foundation.
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
* Licensed to the Apache Software Foundation (ASF) under one or more
|
||||
* contributor license agreements. See the NOTICE file distributed with
|
||||
* this work for additional information regarding copyright ownership.
|
||||
* The ASF licenses this file to You under the Apache License, Version 2.0
|
||||
* (the "License"); you may not use this file except in compliance with
|
||||
* the License. You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
@ -32,11 +29,19 @@ final class XMLSchema extends AbstractXMLSchema {
|
||||
/** The grammar pool is immutable */
|
||||
private final XMLGrammarPool fGrammarPool;
|
||||
|
||||
/** Whether to consider this schema to be fully composed */
|
||||
private final boolean fFullyComposed;
|
||||
|
||||
/** Constructor */
|
||||
public XMLSchema(XMLGrammarPool grammarPool) {
|
||||
fGrammarPool = grammarPool;
|
||||
this(grammarPool, true);
|
||||
}
|
||||
|
||||
public XMLSchema(XMLGrammarPool grammarPool, boolean fullyComposed) {
|
||||
fGrammarPool = grammarPool;
|
||||
fFullyComposed = fullyComposed;
|
||||
}
|
||||
|
||||
/*
|
||||
* XSGrammarPoolContainer methods
|
||||
*/
|
||||
@ -60,7 +65,7 @@ final class XMLSchema extends AbstractXMLSchema {
|
||||
* can be considered to be a fully composed schema
|
||||
*/
|
||||
public boolean isFullyComposed() {
|
||||
return true;
|
||||
return fFullyComposed;
|
||||
}
|
||||
|
||||
} // XMLSchema
|
||||
|
@ -1,13 +1,10 @@
|
||||
/*
|
||||
* reserved comment block
|
||||
* DO NOT REMOVE OR ALTER!
|
||||
*/
|
||||
/*
|
||||
* Copyright 2005 The Apache Software Foundation.
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
* Licensed to the Apache Software Foundation (ASF) under one or more
|
||||
* contributor license agreements. See the NOTICE file distributed with
|
||||
* this work for additional information regarding copyright ownership.
|
||||
* The ASF licenses this file to You under the Apache License, Version 2.0
|
||||
* (the "License"); you may not use this file except in compliance with
|
||||
* the License. You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
@ -68,12 +65,21 @@ import org.xml.sax.SAXParseException;
|
||||
*/
|
||||
public final class XMLSchemaFactory extends SchemaFactory {
|
||||
|
||||
// property identifiers
|
||||
// feature identifiers
|
||||
|
||||
/** JAXP Source feature prefix. */
|
||||
private static final String JAXP_SOURCE_FEATURE_PREFIX = "http://javax.xml.transform";
|
||||
|
||||
/** Feature identifier: schema full checking. */
|
||||
private static final String SCHEMA_FULL_CHECKING =
|
||||
Constants.XERCES_FEATURE_PREFIX + Constants.SCHEMA_FULL_CHECKING;
|
||||
|
||||
/** Feature identifier: use grammar pool only. */
|
||||
private static final String USE_GRAMMAR_POOL_ONLY =
|
||||
Constants.XERCES_FEATURE_PREFIX + Constants.USE_GRAMMAR_POOL_ONLY_FEATURE;
|
||||
|
||||
// property identifiers
|
||||
|
||||
/** Property identifier: grammar pool. */
|
||||
private static final String XMLGRAMMAR_POOL =
|
||||
Constants.XERCES_PROPERTY_PREFIX + Constants.XMLGRAMMAR_POOL_PROPERTY;
|
||||
@ -104,7 +110,7 @@ public final class XMLSchemaFactory extends SchemaFactory {
|
||||
private final DOMEntityResolverWrapper fDOMEntityResolverWrapper;
|
||||
|
||||
/** The ErrorHandlerWrapper */
|
||||
private ErrorHandlerWrapper fErrorHandlerWrapper;
|
||||
private final ErrorHandlerWrapper fErrorHandlerWrapper;
|
||||
|
||||
/** The SecurityManager. */
|
||||
private XMLSecurityManager fSecurityManager;
|
||||
@ -113,7 +119,10 @@ public final class XMLSchemaFactory extends SchemaFactory {
|
||||
private XMLSecurityPropertyManager fSecurityPropertyMgr;
|
||||
|
||||
/** The container for the real grammar pool. */
|
||||
private XMLGrammarPoolWrapper fXMLGrammarPoolWrapper;
|
||||
private final XMLGrammarPoolWrapper fXMLGrammarPoolWrapper;
|
||||
|
||||
/** Whether or not to allow new schemas to be added to the grammar pool */
|
||||
private boolean fUseGrammarPoolOnly;
|
||||
|
||||
/**
|
||||
* Indicates whether implementation parts should use
|
||||
@ -138,6 +147,7 @@ public final class XMLSchemaFactory extends SchemaFactory {
|
||||
fXMLSchemaLoader.setProperty(XMLGRAMMAR_POOL, fXMLGrammarPoolWrapper);
|
||||
fXMLSchemaLoader.setEntityResolver(fDOMEntityResolverWrapper);
|
||||
fXMLSchemaLoader.setErrorHandler(fErrorHandlerWrapper);
|
||||
fUseGrammarPoolOnly = true;
|
||||
|
||||
// Enable secure processing feature by default
|
||||
fSecurityManager = new XMLSecurityManager(true);
|
||||
@ -170,7 +180,8 @@ public final class XMLSchemaFactory extends SchemaFactory {
|
||||
"SchemaLanguageLengthZero", null));
|
||||
}
|
||||
// only W3C XML Schema 1.0 is supported
|
||||
return schemaLanguage.equals(XMLConstants.W3C_XML_SCHEMA_NS_URI);
|
||||
return schemaLanguage.equals(XMLConstants.W3C_XML_SCHEMA_NS_URI) ||
|
||||
schemaLanguage.equals(Constants.W3C_XML_SCHEMA10_NS_URI);
|
||||
}
|
||||
|
||||
public LSResourceResolver getResourceResolver() {
|
||||
@ -202,7 +213,7 @@ public final class XMLSchemaFactory extends SchemaFactory {
|
||||
XMLInputSource[] xmlInputSources = new XMLInputSource[schemas.length];
|
||||
InputStream inputStream;
|
||||
Reader reader;
|
||||
for( int i=0; i<schemas.length; i++ ) {
|
||||
for (int i = 0; i < schemas.length; ++i) {
|
||||
Source source = schemas[i];
|
||||
if (source instanceof StreamSource) {
|
||||
StreamSource streamSource = (StreamSource) source;
|
||||
@ -210,9 +221,10 @@ public final class XMLSchemaFactory extends SchemaFactory {
|
||||
String systemId = streamSource.getSystemId();
|
||||
inputStream = streamSource.getInputStream();
|
||||
reader = streamSource.getReader();
|
||||
xmlInputSources[i] = new XMLInputSource(publicId, systemId, null);
|
||||
xmlInputSources[i].setByteStream(inputStream);
|
||||
xmlInputSources[i].setCharacterStream(reader);
|
||||
XMLInputSource xmlInputSource = new XMLInputSource(publicId, systemId, null);
|
||||
xmlInputSource.setByteStream(inputStream);
|
||||
xmlInputSource.setCharacterStream(reader);
|
||||
xmlInputSources[i] = xmlInputSource;
|
||||
}
|
||||
else if (source instanceof SAXSource) {
|
||||
SAXSource saxSource = (SAXSource) source;
|
||||
@ -260,7 +272,9 @@ public final class XMLSchemaFactory extends SchemaFactory {
|
||||
catch (IOException e) {
|
||||
// this hasn't been reported, so do so now.
|
||||
SAXParseException se = new SAXParseException(e.getMessage(),null,e);
|
||||
fErrorHandler.error(se);
|
||||
if (fErrorHandler != null) {
|
||||
fErrorHandler.error(se);
|
||||
}
|
||||
throw se; // and we must throw it.
|
||||
}
|
||||
|
||||
@ -270,15 +284,20 @@ public final class XMLSchemaFactory extends SchemaFactory {
|
||||
// Select Schema implementation based on grammar count.
|
||||
final int grammarCount = pool.getGrammarCount();
|
||||
AbstractXMLSchema schema = null;
|
||||
if (grammarCount > 1) {
|
||||
schema = new XMLSchema(new ReadOnlyGrammarPool(pool));
|
||||
}
|
||||
else if (grammarCount == 1) {
|
||||
Grammar[] grammars = pool.retrieveInitialGrammarSet(XMLGrammarDescription.XML_SCHEMA);
|
||||
schema = new SimpleXMLSchema(grammars[0]);
|
||||
if (fUseGrammarPoolOnly) {
|
||||
if (grammarCount > 1) {
|
||||
schema = new XMLSchema(new ReadOnlyGrammarPool(pool));
|
||||
}
|
||||
else if (grammarCount == 1) {
|
||||
Grammar[] grammars = pool.retrieveInitialGrammarSet(XMLGrammarDescription.XML_SCHEMA);
|
||||
schema = new SimpleXMLSchema(grammars[0]);
|
||||
}
|
||||
else {
|
||||
schema = new EmptyXMLSchema();
|
||||
}
|
||||
}
|
||||
else {
|
||||
schema = new EmptyXMLSchema();
|
||||
schema = new XMLSchema(new ReadOnlyGrammarPool(pool), false);
|
||||
}
|
||||
propagateFeatures(schema);
|
||||
propagateProperties(schema);
|
||||
@ -286,6 +305,14 @@ public final class XMLSchemaFactory extends SchemaFactory {
|
||||
}
|
||||
|
||||
public Schema newSchema() throws SAXException {
|
||||
/*
|
||||
* It would make sense to return an EmptyXMLSchema object here, if
|
||||
* fUseGrammarPoolOnly is set to true. However, because the default
|
||||
* value of this feature is true, doing so would change the default
|
||||
* behaviour of this method. Thus, we return a WeakReferenceXMLSchema
|
||||
* regardless of the value of fUseGrammarPoolOnly. -PM
|
||||
*/
|
||||
|
||||
// Use a Schema that uses the system id as the equality source.
|
||||
AbstractXMLSchema schema = new WeakReferenceXMLSchema();
|
||||
propagateFeatures(schema);
|
||||
@ -293,15 +320,38 @@ public final class XMLSchemaFactory extends SchemaFactory {
|
||||
return schema;
|
||||
}
|
||||
|
||||
public Schema newSchema(XMLGrammarPool pool) throws SAXException {
|
||||
// If the "use-grammar-pool-only" feature is set to true
|
||||
// prevent the application's grammar pool from being mutated
|
||||
// by wrapping it in a ReadOnlyGrammarPool.
|
||||
final AbstractXMLSchema schema = (fUseGrammarPoolOnly) ?
|
||||
new XMLSchema(new ReadOnlyGrammarPool(pool)) :
|
||||
new XMLSchema(pool, false);
|
||||
propagateFeatures(schema);
|
||||
return schema;
|
||||
}
|
||||
|
||||
public boolean getFeature(String name)
|
||||
throws SAXNotRecognizedException, SAXNotSupportedException {
|
||||
if (name == null) {
|
||||
throw new NullPointerException(JAXPValidationMessageFormatter.formatMessage(fXMLSchemaLoader.getLocale(),
|
||||
"FeatureNameNull", null));
|
||||
}
|
||||
if (name.startsWith(JAXP_SOURCE_FEATURE_PREFIX)) {
|
||||
// Indicates to the caller that this SchemaFactory supports a specific JAXP Source.
|
||||
if (name.equals(StreamSource.FEATURE) ||
|
||||
name.equals(SAXSource.FEATURE) ||
|
||||
name.equals(DOMSource.FEATURE) ||
|
||||
name.equals(StAXSource.FEATURE)) {
|
||||
return true;
|
||||
}
|
||||
}
|
||||
if (name.equals(XMLConstants.FEATURE_SECURE_PROCESSING)) {
|
||||
return (fSecurityManager != null && fSecurityManager.isSecureProcessing());
|
||||
}
|
||||
else if (name.equals(USE_GRAMMAR_POOL_ONLY)) {
|
||||
return fUseGrammarPoolOnly;
|
||||
}
|
||||
try {
|
||||
return fXMLSchemaLoader.getFeature(name);
|
||||
}
|
||||
@ -358,6 +408,16 @@ public final class XMLSchemaFactory extends SchemaFactory {
|
||||
throw new NullPointerException(JAXPValidationMessageFormatter.formatMessage(fXMLSchemaLoader.getLocale(),
|
||||
"FeatureNameNull", null));
|
||||
}
|
||||
if (name.startsWith(JAXP_SOURCE_FEATURE_PREFIX)) {
|
||||
if (name.equals(StreamSource.FEATURE) ||
|
||||
name.equals(SAXSource.FEATURE) ||
|
||||
name.equals(DOMSource.FEATURE) ||
|
||||
name.equals(StAXSource.FEATURE)) {
|
||||
throw new SAXNotSupportedException(
|
||||
SAXMessageFormatter.formatMessage(fXMLSchemaLoader.getLocale(),
|
||||
"feature-read-only", new Object [] {name}));
|
||||
}
|
||||
}
|
||||
if (name.equals(XMLConstants.FEATURE_SECURE_PROCESSING)) {
|
||||
if (System.getSecurityManager() != null && (!value)) {
|
||||
throw new SAXNotSupportedException(
|
||||
@ -377,7 +437,12 @@ public final class XMLSchemaFactory extends SchemaFactory {
|
||||
|
||||
fXMLSchemaLoader.setProperty(SECURITY_MANAGER, fSecurityManager);
|
||||
return;
|
||||
} else if (name.equals(Constants.ORACLE_FEATURE_SERVICE_MECHANISM)) {
|
||||
}
|
||||
else if (name.equals(USE_GRAMMAR_POOL_ONLY)) {
|
||||
fUseGrammarPoolOnly = value;
|
||||
return;
|
||||
}
|
||||
else if (name.equals(Constants.ORACLE_FEATURE_SERVICE_MECHANISM)) {
|
||||
//in secure mode, let _useServicesMechanism be determined by the constructor
|
||||
if (System.getSecurityManager() != null)
|
||||
return;
|
||||
|
@ -1,13 +1,10 @@
|
||||
/*
|
||||
* reserved comment block
|
||||
* DO NOT REMOVE OR ALTER!
|
||||
*/
|
||||
/*
|
||||
* Copyright 2005 The Apache Software Foundation.
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
* Licensed to the Apache Software Foundation (ASF) under one or more
|
||||
* contributor license agreements. See the NOTICE file distributed with
|
||||
* this work for additional information regarding copyright ownership.
|
||||
* The ASF licenses this file to You under the Apache License, Version 2.0
|
||||
* (the "License"); you may not use this file except in compliance with
|
||||
* the License. You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
@ -69,13 +66,41 @@ final class XMLSchemaValidatorComponentManager extends ParserConfigurationSettin
|
||||
private static final String VALIDATION =
|
||||
Constants.SAX_FEATURE_PREFIX + Constants.VALIDATION_FEATURE;
|
||||
|
||||
/** Feature identifier: use grammar pool only. */
|
||||
private static final String USE_GRAMMAR_POOL_ONLY =
|
||||
Constants.XERCES_FEATURE_PREFIX + Constants.USE_GRAMMAR_POOL_ONLY_FEATURE;
|
||||
|
||||
/** Feature identifier: whether to ignore xsi:type attributes until a global element declaration is encountered */
|
||||
protected static final String IGNORE_XSI_TYPE =
|
||||
Constants.XERCES_FEATURE_PREFIX + Constants.IGNORE_XSI_TYPE_FEATURE;
|
||||
|
||||
/** Feature identifier: whether to ignore ID/IDREF errors */
|
||||
protected static final String ID_IDREF_CHECKING =
|
||||
Constants.XERCES_FEATURE_PREFIX + Constants.ID_IDREF_CHECKING_FEATURE;
|
||||
|
||||
/** Feature identifier: whether to ignore unparsed entity errors */
|
||||
protected static final String UNPARSED_ENTITY_CHECKING =
|
||||
Constants.XERCES_FEATURE_PREFIX + Constants.UNPARSED_ENTITY_CHECKING_FEATURE;
|
||||
|
||||
/** Feature identifier: whether to ignore identity constraint errors */
|
||||
protected static final String IDENTITY_CONSTRAINT_CHECKING =
|
||||
Constants.XERCES_FEATURE_PREFIX + Constants.IDC_CHECKING_FEATURE;
|
||||
|
||||
/** Feature identifier: disallow DOCTYPE declaration */
|
||||
private static final String DISALLOW_DOCTYPE_DECL_FEATURE =
|
||||
Constants.XERCES_FEATURE_PREFIX + Constants.DISALLOW_DOCTYPE_DECL_FEATURE;
|
||||
|
||||
/** Feature identifier: expose schema normalized value */
|
||||
private static final String NORMALIZE_DATA =
|
||||
Constants.XERCES_FEATURE_PREFIX + Constants.SCHEMA_NORMALIZED_VALUE;
|
||||
|
||||
/** Feature identifier: send element default value via characters() */
|
||||
private static final String SCHEMA_ELEMENT_DEFAULT =
|
||||
Constants.XERCES_FEATURE_PREFIX + Constants.SCHEMA_ELEMENT_DEFAULT;
|
||||
|
||||
/** Feature identifier: use grammar pool only. */
|
||||
private static final String USE_GRAMMAR_POOL_ONLY =
|
||||
Constants.XERCES_FEATURE_PREFIX + Constants.USE_GRAMMAR_POOL_ONLY_FEATURE;
|
||||
/** Feature identifier: augment PSVI */
|
||||
private static final String SCHEMA_AUGMENT_PSVI =
|
||||
Constants.XERCES_FEATURE_PREFIX + Constants.SCHEMA_AUGMENT_PSVI;
|
||||
|
||||
// property identifiers
|
||||
|
||||
@ -230,10 +255,32 @@ final class XMLSchemaValidatorComponentManager extends ParserConfigurationSettin
|
||||
fErrorReporter.putMessageFormatter(XSMessageFormatter.SCHEMA_DOMAIN, new XSMessageFormatter());
|
||||
|
||||
// add all recognized features and properties and apply their defaults
|
||||
final String [] recognizedFeatures = {
|
||||
DISALLOW_DOCTYPE_DECL_FEATURE,
|
||||
NORMALIZE_DATA,
|
||||
SCHEMA_ELEMENT_DEFAULT,
|
||||
SCHEMA_AUGMENT_PSVI
|
||||
};
|
||||
addRecognizedFeatures(recognizedFeatures);
|
||||
fFeatures.put(DISALLOW_DOCTYPE_DECL_FEATURE, Boolean.FALSE);
|
||||
fFeatures.put(NORMALIZE_DATA, Boolean.FALSE);
|
||||
fFeatures.put(SCHEMA_ELEMENT_DEFAULT, Boolean.FALSE);
|
||||
fFeatures.put(SCHEMA_AUGMENT_PSVI, Boolean.TRUE);
|
||||
|
||||
addRecognizedParamsAndSetDefaults(fEntityManager, grammarContainer);
|
||||
addRecognizedParamsAndSetDefaults(fErrorReporter, grammarContainer);
|
||||
addRecognizedParamsAndSetDefaults(fSchemaValidator, grammarContainer);
|
||||
|
||||
/* TODO: are other XMLSchemaValidator default values never set?
|
||||
* Initial investigation indicates that they aren't set, but
|
||||
* that they all have default values of false, so it works out
|
||||
* anyway -PM
|
||||
*/
|
||||
fFeatures.put(IGNORE_XSI_TYPE, Boolean.FALSE);
|
||||
fFeatures.put(ID_IDREF_CHECKING, Boolean.TRUE);
|
||||
fFeatures.put(IDENTITY_CONSTRAINT_CHECKING, Boolean.TRUE);
|
||||
fFeatures.put(UNPARSED_ENTITY_CHECKING, Boolean.TRUE);
|
||||
|
||||
boolean secureProcessing = grammarContainer.getFeature(XMLConstants.FEATURE_SECURE_PROCESSING);
|
||||
if (System.getSecurityManager() != null) {
|
||||
_isSecureMode = true;
|
||||
|
@ -1,13 +1,10 @@
|
||||
/*
|
||||
* reserved comment block
|
||||
* DO NOT REMOVE OR ALTER!
|
||||
*/
|
||||
/*
|
||||
* Copyright 2001-2004 The Apache Software Foundation.
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
* Licensed to the Apache Software Foundation (ASF) under one or more
|
||||
* contributor license agreements. See the NOTICE file distributed with
|
||||
* this work for additional information regarding copyright ownership.
|
||||
* The ASF licenses this file to You under the Apache License, Version 2.0
|
||||
* (the "License"); you may not use this file except in compliance with
|
||||
* the License. You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
@ -109,6 +106,22 @@ public class StandardParserConfiguration
|
||||
protected static final String HONOUR_ALL_SCHEMALOCATIONS =
|
||||
Constants.XERCES_FEATURE_PREFIX + Constants.HONOUR_ALL_SCHEMALOCATIONS_FEATURE;
|
||||
|
||||
/** Feature identifier: whether to ignore xsi:type attributes until a global element declaration is encountered */
|
||||
protected static final String IGNORE_XSI_TYPE =
|
||||
Constants.XERCES_FEATURE_PREFIX + Constants.IGNORE_XSI_TYPE_FEATURE;
|
||||
|
||||
/** Feature identifier: whether to ignore ID/IDREF errors */
|
||||
protected static final String ID_IDREF_CHECKING =
|
||||
Constants.XERCES_FEATURE_PREFIX + Constants.ID_IDREF_CHECKING_FEATURE;
|
||||
|
||||
/** Feature identifier: whether to ignore unparsed entity errors */
|
||||
protected static final String UNPARSED_ENTITY_CHECKING =
|
||||
Constants.XERCES_FEATURE_PREFIX + Constants.UNPARSED_ENTITY_CHECKING_FEATURE;
|
||||
|
||||
/** Feature identifier: whether to ignore identity constraint errors */
|
||||
protected static final String IDENTITY_CONSTRAINT_CHECKING =
|
||||
Constants.XERCES_FEATURE_PREFIX + Constants.IDC_CHECKING_FEATURE;
|
||||
|
||||
/** Feature identifier: namespace growth */
|
||||
protected static final String NAMESPACE_GROWTH =
|
||||
Constants.XERCES_FEATURE_PREFIX + Constants.NAMESPACE_GROWTH_FEATURE;
|
||||
@ -135,6 +148,10 @@ public class StandardParserConfiguration
|
||||
protected static final String SCHEMA_DV_FACTORY =
|
||||
Constants.XERCES_PROPERTY_PREFIX + Constants.SCHEMA_DV_FACTORY_PROPERTY;
|
||||
|
||||
/** Property identifier: root type definition. */
|
||||
protected static final String ROOT_TYPE_DEF =
|
||||
Constants.XERCES_PROPERTY_PREFIX + Constants.ROOT_TYPE_DEFINITION_PROPERTY;
|
||||
|
||||
//
|
||||
// Data
|
||||
//
|
||||
@ -211,6 +228,10 @@ public class StandardParserConfiguration
|
||||
// not-recognized exception to be thrown. -Ac
|
||||
XMLSCHEMA_VALIDATION,
|
||||
XMLSCHEMA_FULL_CHECKING,
|
||||
IGNORE_XSI_TYPE,
|
||||
ID_IDREF_CHECKING,
|
||||
IDENTITY_CONSTRAINT_CHECKING,
|
||||
UNPARSED_ENTITY_CHECKING,
|
||||
};
|
||||
addRecognizedFeatures(recognizedFeatures);
|
||||
|
||||
@ -221,6 +242,10 @@ public class StandardParserConfiguration
|
||||
setFeature(GENERATE_SYNTHETIC_ANNOTATIONS, false);
|
||||
setFeature(VALIDATE_ANNOTATIONS, false);
|
||||
setFeature(HONOUR_ALL_SCHEMALOCATIONS, false);
|
||||
setFeature(IGNORE_XSI_TYPE, false);
|
||||
setFeature(ID_IDREF_CHECKING, true);
|
||||
setFeature(IDENTITY_CONSTRAINT_CHECKING, true);
|
||||
setFeature(UNPARSED_ENTITY_CHECKING, true);
|
||||
setFeature(NAMESPACE_GROWTH, false);
|
||||
setFeature(TOLERATE_DUPLICATES, false);
|
||||
|
||||
@ -233,11 +258,11 @@ public class StandardParserConfiguration
|
||||
// not-recognized exception to be thrown. -Ac
|
||||
SCHEMA_LOCATION,
|
||||
SCHEMA_NONS_LOCATION,
|
||||
ROOT_TYPE_DEF,
|
||||
SCHEMA_DV_FACTORY,
|
||||
};
|
||||
|
||||
addRecognizedProperties(recognizedProperties);
|
||||
};
|
||||
|
||||
addRecognizedProperties(recognizedProperties);
|
||||
} // <init>(SymbolTable,XMLGrammarPool)
|
||||
|
||||
//
|
||||
|
@ -1,13 +1,10 @@
|
||||
/*
|
||||
* reserved comment block
|
||||
* DO NOT REMOVE OR ALTER!
|
||||
*/
|
||||
/*
|
||||
* Copyright 2001-2005 The Apache Software Foundation.
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
* Licensed to the Apache Software Foundation (ASF) under one or more
|
||||
* contributor license agreements. See the NOTICE file distributed with
|
||||
* this work for additional information regarding copyright ownership.
|
||||
* The ASF licenses this file to You under the Apache License, Version 2.0
|
||||
* (the "License"); you may not use this file except in compliance with
|
||||
* the License. You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
@ -184,7 +181,21 @@ public class XML11Configuration extends ParserConfigurationSettings
|
||||
protected static final String EXTERNAL_PARAMETER_ENTITIES =
|
||||
Constants.SAX_FEATURE_PREFIX + Constants.EXTERNAL_PARAMETER_ENTITIES_FEATURE;
|
||||
|
||||
/** Feature identifier: whether to ignore xsi:type attributes until a global element declaration is encountered */
|
||||
protected static final String IGNORE_XSI_TYPE =
|
||||
Constants.XERCES_FEATURE_PREFIX + Constants.IGNORE_XSI_TYPE_FEATURE;
|
||||
|
||||
/** Feature identifier: whether to ignore ID/IDREF errors */
|
||||
protected static final String ID_IDREF_CHECKING =
|
||||
Constants.XERCES_FEATURE_PREFIX + Constants.ID_IDREF_CHECKING_FEATURE;
|
||||
|
||||
/** Feature identifier: whether to ignore unparsed entity errors */
|
||||
protected static final String UNPARSED_ENTITY_CHECKING =
|
||||
Constants.XERCES_FEATURE_PREFIX + Constants.UNPARSED_ENTITY_CHECKING_FEATURE;
|
||||
|
||||
/** Feature identifier: whether to ignore identity constraint errors */
|
||||
protected static final String IDENTITY_CONSTRAINT_CHECKING =
|
||||
Constants.XERCES_FEATURE_PREFIX + Constants.IDC_CHECKING_FEATURE;
|
||||
|
||||
// property identifiers
|
||||
|
||||
@ -267,6 +278,10 @@ public class XML11Configuration extends ParserConfigurationSettings
|
||||
protected static final String JAXP_SCHEMA_SOURCE =
|
||||
Constants.JAXP_PROPERTY_PREFIX + Constants.SCHEMA_SOURCE;
|
||||
|
||||
/** Property identifier: root type definition. */
|
||||
protected static final String ROOT_TYPE_DEF =
|
||||
Constants.XERCES_PROPERTY_PREFIX + Constants.ROOT_TYPE_DEFINITION_PROPERTY;
|
||||
|
||||
/** Property identifier: locale. */
|
||||
protected static final String LOCALE =
|
||||
Constants.XERCES_PROPERTY_PREFIX + Constants.LOCALE_PROPERTY;
|
||||
@ -467,25 +482,27 @@ public class XML11Configuration extends ParserConfigurationSettings
|
||||
|
||||
// add default recognized features
|
||||
final String[] recognizedFeatures =
|
||||
{
|
||||
CONTINUE_AFTER_FATAL_ERROR, LOAD_EXTERNAL_DTD, // from XMLDTDScannerImpl
|
||||
VALIDATION,
|
||||
NAMESPACES,
|
||||
NORMALIZE_DATA, SCHEMA_ELEMENT_DEFAULT, SCHEMA_AUGMENT_PSVI,
|
||||
GENERATE_SYNTHETIC_ANNOTATIONS, VALIDATE_ANNOTATIONS,
|
||||
HONOUR_ALL_SCHEMALOCATIONS, NAMESPACE_GROWTH,
|
||||
TOLERATE_DUPLICATES,
|
||||
USE_GRAMMAR_POOL_ONLY,
|
||||
// NOTE: These shouldn't really be here but since the XML Schema
|
||||
// validator is constructed dynamically, its recognized
|
||||
// features might not have been set and it would cause a
|
||||
// not-recognized exception to be thrown. -Ac
|
||||
XMLSCHEMA_VALIDATION, XMLSCHEMA_FULL_CHECKING,
|
||||
EXTERNAL_GENERAL_ENTITIES,
|
||||
EXTERNAL_PARAMETER_ENTITIES,
|
||||
PARSER_SETTINGS,
|
||||
XMLConstants.FEATURE_SECURE_PROCESSING
|
||||
};
|
||||
{
|
||||
CONTINUE_AFTER_FATAL_ERROR, LOAD_EXTERNAL_DTD, // from XMLDTDScannerImpl
|
||||
VALIDATION,
|
||||
NAMESPACES,
|
||||
NORMALIZE_DATA, SCHEMA_ELEMENT_DEFAULT, SCHEMA_AUGMENT_PSVI,
|
||||
GENERATE_SYNTHETIC_ANNOTATIONS, VALIDATE_ANNOTATIONS,
|
||||
HONOUR_ALL_SCHEMALOCATIONS, IGNORE_XSI_TYPE,
|
||||
ID_IDREF_CHECKING, IDENTITY_CONSTRAINT_CHECKING,
|
||||
UNPARSED_ENTITY_CHECKING,
|
||||
NAMESPACE_GROWTH, TOLERATE_DUPLICATES,
|
||||
USE_GRAMMAR_POOL_ONLY,
|
||||
// NOTE: These shouldn't really be here but since the XML Schema
|
||||
// validator is constructed dynamically, its recognized
|
||||
// features might not have been set and it would cause a
|
||||
// not-recognized exception to be thrown. -Ac
|
||||
XMLSCHEMA_VALIDATION, XMLSCHEMA_FULL_CHECKING,
|
||||
EXTERNAL_GENERAL_ENTITIES,
|
||||
EXTERNAL_PARAMETER_ENTITIES,
|
||||
PARSER_SETTINGS,
|
||||
XMLConstants.FEATURE_SECURE_PROCESSING
|
||||
};
|
||||
addRecognizedFeatures(recognizedFeatures);
|
||||
// set state for default features
|
||||
fFeatures.put(VALIDATION, Boolean.FALSE);
|
||||
@ -500,6 +517,10 @@ public class XML11Configuration extends ParserConfigurationSettings
|
||||
fFeatures.put(GENERATE_SYNTHETIC_ANNOTATIONS, Boolean.FALSE);
|
||||
fFeatures.put(VALIDATE_ANNOTATIONS, Boolean.FALSE);
|
||||
fFeatures.put(HONOUR_ALL_SCHEMALOCATIONS, Boolean.FALSE);
|
||||
fFeatures.put(IGNORE_XSI_TYPE, Boolean.FALSE);
|
||||
fFeatures.put(ID_IDREF_CHECKING, Boolean.TRUE);
|
||||
fFeatures.put(IDENTITY_CONSTRAINT_CHECKING, Boolean.TRUE);
|
||||
fFeatures.put(UNPARSED_ENTITY_CHECKING, Boolean.TRUE);
|
||||
fFeatures.put(NAMESPACE_GROWTH, Boolean.FALSE);
|
||||
fFeatures.put(TOLERATE_DUPLICATES, Boolean.FALSE);
|
||||
fFeatures.put(USE_GRAMMAR_POOL_ONLY, Boolean.FALSE);
|
||||
@ -508,41 +529,42 @@ public class XML11Configuration extends ParserConfigurationSettings
|
||||
|
||||
// add default recognized properties
|
||||
final String[] recognizedProperties =
|
||||
{
|
||||
SYMBOL_TABLE,
|
||||
ERROR_HANDLER,
|
||||
ENTITY_RESOLVER,
|
||||
ERROR_REPORTER,
|
||||
ENTITY_MANAGER,
|
||||
DOCUMENT_SCANNER,
|
||||
DTD_SCANNER,
|
||||
DTD_PROCESSOR,
|
||||
DTD_VALIDATOR,
|
||||
DATATYPE_VALIDATOR_FACTORY,
|
||||
VALIDATION_MANAGER,
|
||||
SCHEMA_VALIDATOR,
|
||||
XML_STRING,
|
||||
XMLGRAMMAR_POOL,
|
||||
JAXP_SCHEMA_SOURCE,
|
||||
JAXP_SCHEMA_LANGUAGE,
|
||||
// NOTE: These shouldn't really be here but since the XML Schema
|
||||
// validator is constructed dynamically, its recognized
|
||||
// properties might not have been set and it would cause a
|
||||
// not-recognized exception to be thrown. -Ac
|
||||
SCHEMA_LOCATION,
|
||||
SCHEMA_NONS_LOCATION,
|
||||
LOCALE,
|
||||
SCHEMA_DV_FACTORY,
|
||||
SECURITY_MANAGER,
|
||||
XML_SECURITY_PROPERTY_MANAGER
|
||||
{
|
||||
SYMBOL_TABLE,
|
||||
ERROR_HANDLER,
|
||||
ENTITY_RESOLVER,
|
||||
ERROR_REPORTER,
|
||||
ENTITY_MANAGER,
|
||||
DOCUMENT_SCANNER,
|
||||
DTD_SCANNER,
|
||||
DTD_PROCESSOR,
|
||||
DTD_VALIDATOR,
|
||||
DATATYPE_VALIDATOR_FACTORY,
|
||||
VALIDATION_MANAGER,
|
||||
SCHEMA_VALIDATOR,
|
||||
XML_STRING,
|
||||
XMLGRAMMAR_POOL,
|
||||
JAXP_SCHEMA_SOURCE,
|
||||
JAXP_SCHEMA_LANGUAGE,
|
||||
// NOTE: These shouldn't really be here but since the XML Schema
|
||||
// validator is constructed dynamically, its recognized
|
||||
// properties might not have been set and it would cause a
|
||||
// not-recognized exception to be thrown. -Ac
|
||||
SCHEMA_LOCATION,
|
||||
SCHEMA_NONS_LOCATION,
|
||||
ROOT_TYPE_DEF,
|
||||
LOCALE,
|
||||
SCHEMA_DV_FACTORY,
|
||||
SECURITY_MANAGER,
|
||||
XML_SECURITY_PROPERTY_MANAGER
|
||||
};
|
||||
addRecognizedProperties(recognizedProperties);
|
||||
|
||||
if (symbolTable == null) {
|
||||
symbolTable = new SymbolTable();
|
||||
}
|
||||
fSymbolTable = symbolTable;
|
||||
fProperties.put(SYMBOL_TABLE, fSymbolTable);
|
||||
if (symbolTable == null) {
|
||||
symbolTable = new SymbolTable();
|
||||
}
|
||||
fSymbolTable = symbolTable;
|
||||
fProperties.put(SYMBOL_TABLE, fSymbolTable);
|
||||
|
||||
fGrammarPool = grammarPool;
|
||||
if (fGrammarPool != null) {
|
||||
@ -597,8 +619,7 @@ public class XML11Configuration extends ParserConfigurationSettings
|
||||
// REVISIT: What is the right thing to do? -Ac
|
||||
}
|
||||
|
||||
fConfigUpdated = false;
|
||||
|
||||
fConfigUpdated = false;
|
||||
} // <init>(SymbolTable,XMLGrammarPool)
|
||||
|
||||
//
|
||||
|
@ -272,3 +272,5 @@ ce19e0403ec8a80223cc47320c905b2a4d45881d jdk9-b23
|
||||
0b35542d6bf32af23a9fc59a37c52aa091fee388 jdk9-b24
|
||||
ab8726a0fcde897e4cfd1ea581ed90b0d8a7cbb7 jdk9-b25
|
||||
9b43f3993b96c2213428e95127a2d3fd0e709d3a jdk9-b26
|
||||
dcaa586ab756420e9a62643793bacef2c84bf637 jdk9-b27
|
||||
5282a14f131f897cc9575872c0fae72d47dc4e65 jdk9-b28
|
||||
|
@ -269,3 +269,5 @@ f87c5be90e01a7ffb47947108eb3e0b0b1920880 jdk9-b20
|
||||
875450e7ef8dde8f59db662ec1351ea30b8cb35d jdk9-b24
|
||||
a31efe49556a7c12f9ea2c9ee8b4fae8aa67723a jdk9-b25
|
||||
dde9f5cfde5f46e62ceb5fab81151578e5277aef jdk9-b26
|
||||
f0870554049807d3392bd7976ab114f7f2b7bafa jdk9-b27
|
||||
1828f73b35cfe35e460e41fd6e087ab1f83e0621 jdk9-b28
|
||||
|
@ -35,7 +35,7 @@ ifeq ($(OPENJDK_TARGET_OS), macosx)
|
||||
|
||||
# JDK_BUNDLE_DIR and JRE_BUNDLE_DIR are defined in SPEC.
|
||||
|
||||
MACOSX_PLIST_SRC := $(JDK_TOPDIR)/make/bundle
|
||||
MACOSX_PLIST_SRC := $(JDK_TOPDIR)/make/data/bundle
|
||||
|
||||
# All these OPENJDK checks are needed since there is no coherency between
|
||||
# these values in open and closed. Should probably be fixed.
|
||||
|
@ -29,9 +29,7 @@ include $(SPEC)
|
||||
include MakeBase.gmk
|
||||
include JavaCompilation.gmk
|
||||
include NativeCompilation.gmk
|
||||
|
||||
# Setup the java compilers for the JDK build.
|
||||
include SetupJava.gmk
|
||||
include SetupJavaCompilers.gmk
|
||||
|
||||
# Prepare the find cache.
|
||||
$(eval $(call FillCacheFind, $(JDK_TOPDIR)/src))
|
||||
@ -316,19 +314,6 @@ $(eval $(call SetupJVMTIDemo,compiledMethodLoad, agent_util))
|
||||
$(eval $(call SetupJVMTIDemo,gctest, agent_util))
|
||||
$(eval $(call SetupJVMTIDemo,heapTracker, agent_util java_crw_demo))
|
||||
$(eval $(call SetupJVMTIDemo,heapViewer, agent_util))
|
||||
|
||||
# On AIX, hprof requires 'dladdr' from src/aix/porting/porting_aix.cpp
|
||||
BUILD_LIBHPROF_AIX_EXTRA_SRC :=
|
||||
BUILD_LIBHPROF_AIX_EXTRA_CFLAGS :=
|
||||
ifeq ($(OPENJDK_TARGET_OS), aix)
|
||||
BUILD_LIBHPROF_AIX_EXTRA_SRC += $(JDK_TOPDIR)/src/aix/porting
|
||||
BUILD_LIBHPROF_AIX_EXTRA_CFLAGS += -I$(JDK_TOPDIR)/src/aix/porting
|
||||
endif
|
||||
|
||||
$(eval $(call SetupJVMTIDemo,hprof, java_crw_demo, \
|
||||
$(BUILD_LIBHPROF_AIX_EXTRA_CFLAGS), C, \
|
||||
-ldl, ws2_32.lib winmm.lib, -lsocket -lnsl, -lpthread, $(BUILD_LIBHPROF_AIX_EXTRA_SRC)))
|
||||
|
||||
$(eval $(call SetupJVMTIDemo,minst, agent_util java_crw_demo))
|
||||
$(eval $(call SetupJVMTIDemo,mtrace, agent_util java_crw_demo))
|
||||
$(eval $(call SetupJVMTIDemo,waiters, agent_util, , C++))
|
||||
@ -336,34 +321,6 @@ $(eval $(call SetupJVMTIDemo,versionCheck, agent_util))
|
||||
|
||||
##################################################################################################
|
||||
|
||||
$(JDK_OUTPUTDIR)/demo/jpda/com/sun/tools/example/README: \
|
||||
$(JDK_TOPDIR)/src/demo/share/jpda/com/sun/tools/example/README
|
||||
$(call install-file)
|
||||
$(CHMOD) -f ug+w $@
|
||||
|
||||
$(eval $(call SetupArchive,JPDA_JAR, \
|
||||
$(JDK_OUTPUTDIR)/demo/jpda/com/sun/tools/example/README, \
|
||||
SRCS := $(JDK_TOPDIR)/src/demo/share/jpda \
|
||||
$(JDK_TOPDIR)/src/jdk.jdi/share/classes \
|
||||
$(JDK_OUTPUTDIR)/demo/jpda/com/sun/tools/example, \
|
||||
INCLUDES := com/sun/tools/example README, \
|
||||
SUFFIXES := .java .html .jj README, \
|
||||
JAR := $(JDK_OUTPUTDIR)/demo/jpda/examples.jar, \
|
||||
MANIFEST := $(JDK_TOPDIR)/make/data/mainmanifest/manifest.mf, \
|
||||
EXTRA_MANIFEST_ATTR := Main-Class:$$(SPACE), \
|
||||
SKIP_METAINF := true))
|
||||
|
||||
$(eval $(call SetupZipArchive,JPDA_ZIP, \
|
||||
SRC := $(JDK_TOPDIR)/src/demo/share/jpda \
|
||||
$(JDK_TOPDIR)/src/jdk.jdi/share/classes, \
|
||||
INCLUDES := com/sun/tools/example, \
|
||||
SUFFIXES := .java .html .jj README, \
|
||||
ZIP := $(JDK_OUTPUTDIR)/demo/jpda/src.zip))
|
||||
|
||||
BUILD_DEMOS += $(JPDA_JAR) $(JPDA_ZIP)
|
||||
|
||||
##################################################################################################
|
||||
|
||||
$(JDK_OUTPUTDIR)/demo/management/index.html: $(DEMO_SHARE_SRC)/management/index.html
|
||||
$(call install-file)
|
||||
$(CHMOD) -f ug+w $@
|
||||
|
@ -28,7 +28,7 @@ default: all
|
||||
include $(SPEC)
|
||||
include MakeBase.gmk
|
||||
include JavaCompilation.gmk
|
||||
include SetupJava.gmk
|
||||
include SetupJavaCompilers.gmk
|
||||
|
||||
##########################################################################################
|
||||
|
||||
|
@ -1,202 +0,0 @@
|
||||
#
|
||||
# Copyright (c) 2011, 2013, Oracle and/or its affiliates. All rights reserved.
|
||||
# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
||||
#
|
||||
# This code is free software; you can redistribute it and/or modify it
|
||||
# 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.
|
||||
#
|
||||
|
||||
# Copy icu and _dict files used by the text break iterator
|
||||
|
||||
COPY_PATTERNS := .icu _dict .dat _options .js aliasmap .spp .wav .css \
|
||||
.png .gif .xml .dtd .txt oqlhelp.html content-types.properties
|
||||
|
||||
# These directories should not be copied at all
|
||||
EXCLUDES += \
|
||||
java/awt/doc-files \
|
||||
java/lang/doc-files \
|
||||
javax/swing/doc-files \
|
||||
javax/swing/text/doc-files \
|
||||
javax/swing/plaf/synth/doc-files \
|
||||
javax/swing/undo/doc-files \
|
||||
sun/awt/X11/doc-files \
|
||||
sun/util/cldr/resources \
|
||||
#
|
||||
|
||||
# These files should never be included
|
||||
EXFILES += build.xml README.txt version.txt
|
||||
|
||||
# These icons are handled in GensrcIcons.gmk
|
||||
EXFILES += \
|
||||
sun/awt/X11/java-icon16.png \
|
||||
sun/awt/X11/java-icon24.png \
|
||||
sun/awt/X11/java-icon32.png \
|
||||
sun/awt/X11/java-icon48.png \
|
||||
$(wildcard $(JDK_TOPDIR)/src/share/classes/sun/awt/resources/*.png) \
|
||||
#
|
||||
|
||||
ifndef OPENJDK
|
||||
# Theses icons have closed replacements
|
||||
SWING_PLAF_MOTIF_RESOURCES_DIR := $(JDK_TOPDIR)/src/share/classes/com/sun/java/swing/plaf/motif
|
||||
EXFILES += \
|
||||
$(JDK_TOPDIR)/src/share/classes/com/sun/java/swing/plaf/windows/icons/JavaCup32.png \
|
||||
$(JDK_TOPDIR)/src/share/classes/javax/swing/plaf/basic/icons/JavaCup16.png \
|
||||
$(wildcard $(SWING_PLAF_MOTIF_RESOURCES_DIR)/icons/*.gif) \
|
||||
$(wildcard $(SWING_PLAF_MOTIF_RESOURCES_DIR)/icons/*.png) \
|
||||
#
|
||||
|
||||
EXFILES += mib_core.txt
|
||||
endif
|
||||
|
||||
ifeq ($(ENABLE_JFR), true)
|
||||
JFR_CONFIGURATION_DIR_CLOSED := $(JDK_TOPDIR)/src/closed/share/classes/oracle/jrockit/jfr/settings
|
||||
COPY_FILES += \
|
||||
$(JFR_CONFIGURATION_DIR_CLOSED)/jfc.xsd
|
||||
endif
|
||||
|
||||
SWING_BEANINFO_RESOURCES_SRC_DIR = $(JDK_TOPDIR)/make/data/swingbeaninfo/images
|
||||
SWING_BEANINFO_RESOURCES_SRC = $(wildcard $(SWING_BEANINFO_RESOURCES_SRC_DIR)/*.gif)
|
||||
OUT_BEANINFO_RESOURCES = $(patsubst $(SWING_BEANINFO_RESOURCES_SRC_DIR)%, \
|
||||
$(JDK_OUTPUTDIR)/classes/javax/swing/beaninfo/images/%, \
|
||||
$(SWING_BEANINFO_RESOURCES_SRC))
|
||||
|
||||
COPY_EXTRA += $(OUT_BEANINFO_RESOURCES)
|
||||
|
||||
# The exception handling of swing beaninfo
|
||||
# These resources violates the convention of having code and resources together under
|
||||
# $(JDK_TOPDIR)/src/.../classes directories
|
||||
$(JDK_OUTPUTDIR)/classes/javax/swing/beaninfo/images/%.gif: \
|
||||
$(JDK_TOPDIR)/make/data/swingbeaninfo/images/%.gif
|
||||
$(call install-file)
|
||||
|
||||
##########################################################################################
|
||||
#
|
||||
# Copy the META-INF/services configuration files that are scattered around the source tree
|
||||
# into classes/META-INF/services. Be aware that META-INF directories that are located at a
|
||||
# source root (.../classes/META-INF) are automatically copied verbatim by the
|
||||
# SetupJavaCompilation macro.
|
||||
#
|
||||
# Any other META-INF/services configuration file is found here and platform specific comments
|
||||
# are uncommented and the configuration file is stored in the output META-INF directory.
|
||||
|
||||
# Make sure the output directory is created.
|
||||
$(eval $(call MakeDir, $(JDK_OUTPUTDIR)/classes/META-INF/services))
|
||||
# Find all META-INF/services/* files
|
||||
ALL_META-INF_DIRS_share := $(shell $(FIND) $(JDK_TOPDIR)/src/share/classes -type d -a -name META-INF)
|
||||
ALL_META-INF_DIRS_targetapi := $(shell $(FIND) $(JDK_TOPDIR)/src/$(OPENJDK_TARGET_OS_API_DIR)/classes -type d -a -name META-INF)
|
||||
# Platform specific overrides shared
|
||||
ifneq ($(ALL_META-INF_DIRS_targetapi), )
|
||||
ALL_META-INF_DIRS := $(ALL_META-INF_DIRS_targetapi) \
|
||||
$(filter-out %$(patsubst $(JDK_TOPDIR)/src/$(OPENJDK_TARGET_OS_API_DIR)/classes%,%,$(ALL_META-INF_DIRS_targetapi)), \
|
||||
$(ALL_META-INF_DIRS_share))
|
||||
else
|
||||
ALL_META-INF_DIRS := $(ALL_META-INF_DIRS_share)
|
||||
endif
|
||||
|
||||
SRC_SERVICES_FILES := $(wildcard $(addsuffix /services/*, $(ALL_META-INF_DIRS)))
|
||||
|
||||
# The number of services files are relatively few. If the increase in numbers, then
|
||||
# we have to use ListPathsSafelyNow here.
|
||||
# Change $(JDK_TOPDIR)/src/.../META-INF/services/yyyy into $(JDK_OUTPUTDIR)/classes/META-INF/services/yyyy
|
||||
# The \n in the printf command is needed to make sed work on Solaris.
|
||||
OUT_SERVICES_FILES := $(addprefix $(JDK_OUTPUTDIR)/classes/META-INF/services/, \
|
||||
$(shell $(PRINTF) "$(SRC_SERVICES_FILES)\n" | $(SED) -e 's|/[^ ]*/META-INF/services/||g'))
|
||||
OUT_SERVICES_FILES_COLON := $(addsuffix :, $(OUT_SERVICES_FILES))
|
||||
# Exception handling for print services with no META-INF directory
|
||||
SRC_SERVICES_FILES_PRINT = $(wildcard $(JDK_TOPDIR)/src/$(OPENJDK_TARGET_OS_API_DIR)/classes/sun/print/services/*)
|
||||
OUT_SERVICES_FILES_PRINT = $(addprefix $(JDK_OUTPUTDIR)/classes/META-INF/services/, \
|
||||
$(patsubst $(JDK_TOPDIR)/src/$(OPENJDK_TARGET_OS_API_DIR)/classes/sun/print/services/%, %, \
|
||||
$(SRC_SERVICES_FILES_PRINT)))
|
||||
OUT_SERVICES_FILES_PRINT_COLON = $(addsuffix :, $(OUT_SERVICES_FILES_PRINT))
|
||||
RULES_SERVICES_PRINT = $(join $(OUT_SERVICES_FILES_PRINT_COLON), $(SRC_SERVICES_FILES_PRINT))
|
||||
|
||||
# Now setup the dependency rules to generate a META-INF/services/... from the correct source.
|
||||
META-INF_RULES_SERVICES := $(RULES_SERVICES_PRINT) $(join $(OUT_SERVICES_FILES_COLON), $(SRC_SERVICES_FILES))
|
||||
# Eval the newly created rules to incorporate them into the make tree.
|
||||
define addto_meta-inf_services
|
||||
$1
|
||||
echo $(LOG_INFO) Installing META-INF/services/$$(@F)
|
||||
$(CAT) $$< | $(SED) -e "s/^#\[$(OPENJDK_TARGET_OS)\]//" > $$@
|
||||
endef
|
||||
$(foreach i, $(META-INF_RULES_SERVICES), $(eval $(call addto_meta-inf_services, $i)))
|
||||
# Here is the generic rule, whose receipt the above rules will trigger.
|
||||
|
||||
COPY_EXTRA += $(OUT_SERVICES_FILES)
|
||||
COPY_EXTRA += $(OUT_SERVICES_FILES_PRINT)
|
||||
|
||||
################################################################################
|
||||
|
||||
JAVAX_SOUND_SRC := $(JDK_TOPDIR)/src/share/classes/com/sun/media/sound/services
|
||||
|
||||
JAVAX_SOUND_SRC_FILES := \
|
||||
javax.sound.midi.spi.MidiDeviceProvider \
|
||||
javax.sound.midi.spi.MidiFileReader \
|
||||
javax.sound.midi.spi.MidiFileWriter \
|
||||
javax.sound.midi.spi.SoundbankReader \
|
||||
javax.sound.sampled.spi.AudioFileReader \
|
||||
javax.sound.sampled.spi.AudioFileWriter \
|
||||
javax.sound.sampled.spi.FormatConversionProvider \
|
||||
javax.sound.sampled.spi.MixerProvider
|
||||
|
||||
COPY_EXTRA += $(addprefix $(JDK_OUTPUTDIR)/classes/META-INF/services/, $(JAVAX_SOUND_SRC_FILES))
|
||||
|
||||
JAVAX_SOUND_RULES := $(foreach F, $(JAVAX_SOUND_SRC_FILES), $(JDK_OUTPUTDIR)/classes/META-INF/services/$(notdir $F):$(JAVAX_SOUND_SRC)/$F)
|
||||
|
||||
$(foreach R, $(JAVAX_SOUND_RULES), $(eval $(call addto_meta-inf_services, $R)))
|
||||
|
||||
################################################################################
|
||||
|
||||
ifneq ($(OPENJDK_TARGET_OS), macosx)
|
||||
OPENJDK_TARGET_OS_FLAVORMAP_PROPERTIES = $(JDK_TOPDIR)/src/$(OPENJDK_TARGET_OS_API_DIR)/classes/sun/awt/datatransfer/flavormap.properties
|
||||
else
|
||||
OPENJDK_TARGET_OS_FLAVORMAP_PROPERTIES = $(JDK_TOPDIR)/src/macosx/classes/sun/awt/datatransfer/flavormap.properties
|
||||
endif
|
||||
|
||||
$(JDK_OUTPUTDIR)/classes/sun/awt/datatransfer/flavormap.properties: $(OPENJDK_TARGET_OS_FLAVORMAP_PROPERTIES)
|
||||
$(install-file)
|
||||
|
||||
COPY_EXTRA += $(JDK_OUTPUTDIR)/classes/sun/awt/datatransfer/flavormap.properties
|
||||
|
||||
################################################################################
|
||||
|
||||
CLEAN_FILES := $(wildcard \
|
||||
$(JDK_TOPDIR)/src/share/classes/com/sun/imageio/plugins/common/*.properties \
|
||||
$(JDK_TOPDIR)/src/share/classes/com/sun/java/util/jar/pack/*.properties \
|
||||
$(JDK_TOPDIR)/src/share/classes/com/sun/jndi/cosnaming/jndiprovider.properties \
|
||||
$(JDK_TOPDIR)/src/share/classes/com/sun/jndi/ldap/jndiprovider.properties \
|
||||
$(JDK_TOPDIR)/src/share/classes/com/sun/org/apache/xml/internal/security/resource/*.properties \
|
||||
$(JDK_TOPDIR)/src/share/classes/com/sun/rowset/*.properties \
|
||||
$(JDK_TOPDIR)/src/share/classes/com/sun/tools/script/shell/*.properties \
|
||||
$(JDK_TOPDIR)/src/share/classes/javax/sql/rowset/*.properties \
|
||||
$(JDK_TOPDIR)/src/share/classes/sun/rmi/registry/resources/*.properties \
|
||||
$(JDK_TOPDIR)/src/share/classes/sun/rmi/rmic/resources/*.properties \
|
||||
$(JDK_TOPDIR)/src/share/classes/sun/rmi/server/resources/*.properties \
|
||||
$(JDK_TOPDIR)/src/share/classes/sun/tools/javac/resources/*.properties \
|
||||
$(JDK_TOPDIR)/src/share/classes/sun/tools/jconsole/resources/*.properties \
|
||||
$(JDK_TOPDIR)/src/share/classes/sun/tools/serialver/resources/*.properties \
|
||||
)
|
||||
|
||||
# Copy zh_HK files from zh_TW
|
||||
|
||||
$(JDK_OUTPUTDIR)/classes/%_zh_HK.properties: $(JDK_OUTPUTDIR)/classes/%_zh_TW.properties
|
||||
$(install-file)
|
||||
|
||||
COPY_EXTRA += $(patsubst $(JDK_TOPDIR)/src/share/classes/%, $(JDK_OUTPUTDIR)/classes/%, \
|
||||
$(subst _zh_TW,_zh_HK, $(filter %_zh_TW.properties, $(CLEAN_FILES))))
|
@ -524,7 +524,6 @@ $(eval $(call SetupArchive,BUILD_TOOLS_JAR, , \
|
||||
EXCLUDES := $(TOOLS_JAR_EXCLUDES), \
|
||||
EXTRA_FILES := \
|
||||
$(JDK_OUTPUTDIR)/modules/jdk.jdi/META-INF/services/com.sun.jdi.connect.Connector \
|
||||
$(JDK_OUTPUTDIR)/classes/META-INF/services/com.sun.jdi.connect.Connector \
|
||||
META-INF/services/com.sun.jdi.connect.spi.TransportService \
|
||||
META-INF/services/com.sun.tools.attach.spi.AttachProvider \
|
||||
META-INF/services/com.sun.tools.internal.ws.wscompile.Plugin \
|
||||
|
@ -32,8 +32,6 @@ include JavaCompilation.gmk
|
||||
# The jars created in this file are required for the exploded jdk image to function and
|
||||
# cannot wait to be built in the images target.
|
||||
|
||||
SECURITY_CLASSES_SUBDIR := modules
|
||||
|
||||
##########################################################################################
|
||||
# Create manifest for security jars
|
||||
#
|
||||
@ -67,7 +65,7 @@ SUNPKCS11_JAR_DST := $(JDK_OUTPUTDIR)/lib/ext/sunpkcs11.jar
|
||||
SUNPKCS11_JAR_UNSIGNED := $(JDK_OUTPUTDIR)/jce/unsigned/sunpkcs11.jar
|
||||
|
||||
$(eval $(call SetupArchive,BUILD_SUNPKCS11_JAR, , \
|
||||
SRCS := $(JDK_OUTPUTDIR)/$(SECURITY_CLASSES_SUBDIR)/jdk.crypto.pkcs11, \
|
||||
SRCS := $(JDK_OUTPUTDIR)/modules/jdk.crypto.pkcs11, \
|
||||
SUFFIXES := .class, \
|
||||
INCLUDES := sun/security/pkcs11, \
|
||||
JAR := $(SUNPKCS11_JAR_UNSIGNED), \
|
||||
@ -94,7 +92,7 @@ SUNEC_JAR_DST := $(JDK_OUTPUTDIR)/lib/ext/sunec.jar
|
||||
SUNEC_JAR_UNSIGNED := $(JDK_OUTPUTDIR)/jce/unsigned/sunec.jar
|
||||
|
||||
$(eval $(call SetupArchive,BUILD_SUNEC_JAR, , \
|
||||
SRCS := $(JDK_OUTPUTDIR)/$(SECURITY_CLASSES_SUBDIR)/jdk.crypto.ec, \
|
||||
SRCS := $(JDK_OUTPUTDIR)/modules/jdk.crypto.ec, \
|
||||
SUFFIXES := .class, \
|
||||
INCLUDES := sun/security/ec, \
|
||||
JAR := $(SUNEC_JAR_UNSIGNED), \
|
||||
@ -122,7 +120,7 @@ SUNJCE_PROVIDER_JAR_UNSIGNED := $(JDK_OUTPUTDIR)/jce/unsigned/sunjce_provider.ja
|
||||
|
||||
ifneq ($(BUILD_CRYPTO), no)
|
||||
$(eval $(call SetupArchive,BUILD_SUNJCE_PROVIDER_JAR, , \
|
||||
SRCS := $(JDK_OUTPUTDIR)/$(SECURITY_CLASSES_SUBDIR)/java.base, \
|
||||
SRCS := $(JDK_OUTPUTDIR)/modules/java.base, \
|
||||
SUFFIXES := .class, \
|
||||
INCLUDES := com/sun/crypto/provider, \
|
||||
JAR := $(SUNJCE_PROVIDER_JAR_UNSIGNED), \
|
||||
@ -153,7 +151,7 @@ JCE_JAR_UNSIGNED := $(JDK_OUTPUTDIR)/jce/unsigned/jce.jar
|
||||
|
||||
ifneq ($(BUILD_CRYPTO), no)
|
||||
$(eval $(call SetupArchive,BUILD_JCE_JAR, , \
|
||||
SRCS := $(JDK_OUTPUTDIR)/$(SECURITY_CLASSES_SUBDIR)/java.base, \
|
||||
SRCS := $(JDK_OUTPUTDIR)/modules/java.base, \
|
||||
SUFFIXES := .class, \
|
||||
INCLUDES := javax/crypto sun/security/internal, \
|
||||
JAR := $(JCE_JAR_UNSIGNED), \
|
||||
@ -185,7 +183,7 @@ ifeq ($(OPENJDK_TARGET_OS), windows)
|
||||
SUNMSCAPI_JAR_UNSIGNED := $(JDK_OUTPUTDIR)/jce/unsigned/sunmscapi.jar
|
||||
|
||||
$(eval $(call SetupArchive,BUILD_SUNMSCAPI_JAR, , \
|
||||
SRCS := $(JDK_OUTPUTDIR)/$(SECURITY_CLASSES_SUBDIR)/jdk.crypto.mscapi, \
|
||||
SRCS := $(JDK_OUTPUTDIR)/modules/jdk.crypto.mscapi, \
|
||||
SUFFIXES := .class, \
|
||||
INCLUDES := sun/security/mscapi, \
|
||||
JAR := $(SUNMSCAPI_JAR_UNSIGNED), \
|
||||
@ -218,7 +216,7 @@ ifeq ($(OPENJDK_TARGET_OS), solaris)
|
||||
UCRYPTO_JAR_SRC := $(JDK_TOPDIR)/make/closed/tools/crypto/ucrypto/ucrypto.jar
|
||||
|
||||
$(eval $(call SetupArchive,BUILD_UCRYPTO_JAR, , \
|
||||
SRCS := $(JDK_OUTPUTDIR)/$(SECURITY_CLASSES_SUBDIR)/jdk.crypto.ucrypto, \
|
||||
SRCS := $(JDK_OUTPUTDIR)/modules/jdk.crypto.ucrypto, \
|
||||
SUFFIXES := .class, \
|
||||
INCLUDES := com/oracle/security/ucrypto, \
|
||||
JAR := $(UCRYPTO_JAR_UNSIGNED), \
|
||||
|
@ -32,10 +32,7 @@ include $(SPEC)
|
||||
include MakeBase.gmk
|
||||
include JavaCompilation.gmk
|
||||
include NativeCompilation.gmk
|
||||
include SetupJava.gmk
|
||||
|
||||
# Cache all finds needed for this file.
|
||||
$(eval $(call FillCacheFind, $(JDK_TOPDIR)/make/src/classes))
|
||||
include SetupJavaCompilers.gmk
|
||||
|
||||
# The exception handling of swing beaninfo which have the own tool directory
|
||||
ifeq (, $(BUILD_TOOLS_JDK))
|
||||
@ -101,6 +98,9 @@ TOOL_TZDB = $(JAVA_SMALL) -cp $(JDK_OUTPUTDIR)/btclasses \
|
||||
TOOL_BLACKLISTED_CERTS = $(JAVA_SMALL) -cp $(JDK_OUTPUTDIR)/btclasses \
|
||||
build.tools.blacklistedcertsconverter.BlacklistedCertsConverter
|
||||
|
||||
TOOL_MAKEJAVASECURITY = $(JAVA_SMALL) -cp $(JDK_OUTPUTDIR)/btclasses \
|
||||
build.tools.makejavasecurity.MakeJavaSecurity
|
||||
|
||||
|
||||
# TODO: There are references to the jdwpgen.jar in jdk/make/netbeans/jdwpgen/build.xml
|
||||
# and nbproject/project.properties in the same dir. Needs to be looked at.
|
||||
@ -134,10 +134,7 @@ TOOL_CHECKDEPS = $(JAVA_SMALL) -Xbootclasspath/p:$(INTERIM_LANGTOOLS_JAR) \
|
||||
|
||||
TOOL_GENMODULESXML = $(JAVA_SMALL) -Xbootclasspath/p:$(INTERIM_LANGTOOLS_JAR) \
|
||||
-cp "$(JDK_OUTPUTDIR)/btclasses$(PATH_SEP)$(JDK_OUTPUTDIR)" \
|
||||
build.tools.module.GenerateModulesXml
|
||||
|
||||
TOOL_ADDTORESTRICTEDPKGS = $(JAVA_SMALL) -cp $(JDK_OUTPUTDIR)/btclasses \
|
||||
build.tools.addtorestrictedpkgs.AddToRestrictedPkgs
|
||||
build.tools.module.GenJdepsModulesXml
|
||||
|
||||
##########################################################################################
|
||||
|
||||
|
@ -32,17 +32,17 @@ $(eval $(call IncludeCustomExtension, jdk, copy/Copy-java.base.gmk))
|
||||
# Copy exported header files to outputdir.
|
||||
#
|
||||
JAVA_BASE_HEADERS := \
|
||||
$(INCLUDEDIR)/jni.h \
|
||||
$(INCLUDEDIR)/jvmti.h \
|
||||
$(INCLUDEDIR)/jvmticmlr.h \
|
||||
$(INCLUDEDIR)/classfile_constants.h \
|
||||
$(OPENJDK_TARGET_OS_INCLUDE)/jni_md.h \
|
||||
$(INCLUDE_DST_DIR)/jni.h \
|
||||
$(INCLUDE_DST_DIR)/jvmti.h \
|
||||
$(INCLUDE_DST_DIR)/jvmticmlr.h \
|
||||
$(INCLUDE_DST_DIR)/classfile_constants.h \
|
||||
$(INCLUDE_DST_OS_DIR)/jni_md.h \
|
||||
#
|
||||
|
||||
$(INCLUDEDIR)/%.h: $(JDK_TOPDIR)/src/java.base/share/native/include/%.h
|
||||
$(INCLUDE_DST_DIR)/%.h: $(JDK_TOPDIR)/src/java.base/share/native/include/%.h
|
||||
$(call install-file)
|
||||
|
||||
$(OPENJDK_TARGET_OS_INCLUDE)/%.h: \
|
||||
$(INCLUDE_DST_OS_DIR)/%.h: \
|
||||
$(JDK_TOPDIR)/src/java.base/$(OPENJDK_TARGET_OS_EXPORT_DIR)/native/include/%.h
|
||||
$(call install-file)
|
||||
|
||||
@ -50,17 +50,17 @@ $(OPENJDK_TARGET_OS_INCLUDE)/%.h: \
|
||||
|
||||
CALENDARS_SRC := $(JDK_TOPDIR)/src/java.base/share/conf
|
||||
|
||||
$(LIBDIR)/calendars.properties: $(CALENDARS_SRC)/calendars.properties
|
||||
$(LIB_DST_DIR)/calendars.properties: $(CALENDARS_SRC)/calendars.properties
|
||||
$(call install-file)
|
||||
|
||||
BASE_CONF_FILES += $(LIBDIR)/calendars.properties
|
||||
BASE_CONF_FILES += $(LIB_DST_DIR)/calendars.properties
|
||||
|
||||
$(LIBDIR)/hijrah-config-umalqura.properties: $(CALENDARS_SRC)/hijrah-config-umalqura.properties
|
||||
$(LIB_DST_DIR)/hijrah-config-umalqura.properties: $(CALENDARS_SRC)/hijrah-config-umalqura.properties
|
||||
$(MKDIR) -p $(@D)
|
||||
$(RM) $@
|
||||
$(CP) $< $@
|
||||
|
||||
BASE_CONF_FILES += $(LIBDIR)/hijrah-config-umalqura.properties
|
||||
BASE_CONF_FILES += $(LIB_DST_DIR)/hijrah-config-umalqura.properties
|
||||
|
||||
################################################################################
|
||||
|
||||
@ -68,10 +68,10 @@ ifneq ($(findstring $(OPENJDK_TARGET_OS), windows aix),)
|
||||
|
||||
TZMAPPINGS_SRC := $(JDK_TOPDIR)/src/java.base/$(OPENJDK_TARGET_OS)/conf
|
||||
|
||||
$(LIBDIR)/tzmappings: $(TZMAPPINGS_SRC)/tzmappings
|
||||
$(LIB_DST_DIR)/tzmappings: $(TZMAPPINGS_SRC)/tzmappings
|
||||
$(call install-file)
|
||||
|
||||
BASE_CONF_FILES += $(LIBDIR)/tzmappings
|
||||
BASE_CONF_FILES += $(LIB_DST_DIR)/tzmappings
|
||||
|
||||
endif
|
||||
|
||||
|
@ -30,20 +30,20 @@ $(eval $(call IncludeCustomExtension, jdk, copy/Copy-java.desktop.gmk))
|
||||
################################################################################
|
||||
|
||||
JAVA_DESKTOP_HEADERS := \
|
||||
$(INCLUDEDIR)/jawt.h \
|
||||
$(OPENJDK_TARGET_OS_INCLUDE)/jawt_md.h \
|
||||
$(INCLUDE_DST_DIR)/jawt.h \
|
||||
$(INCLUDE_DST_OS_DIR)/jawt_md.h \
|
||||
#
|
||||
|
||||
$(INCLUDEDIR)/%.h: $(JDK_TOPDIR)/src/java.desktop/share/native/include/%.h
|
||||
$(INCLUDE_DST_DIR)/%.h: $(JDK_TOPDIR)/src/java.desktop/share/native/include/%.h
|
||||
$(call install-file)
|
||||
|
||||
$(OPENJDK_TARGET_OS_INCLUDE)/%.h: \
|
||||
$(INCLUDE_DST_OS_DIR)/%.h: \
|
||||
$(JDK_TOPDIR)/src/java.desktop/$(OPENJDK_TARGET_OS_EXPORT_DIR)/native/include/%.h
|
||||
$(call install-file)
|
||||
|
||||
################################################################################
|
||||
|
||||
ICCPROFILE_DEST_DIR := $(LIBDIR)/cmm
|
||||
ICCPROFILE_DEST_DIR := $(LIB_DST_DIR)/cmm
|
||||
|
||||
ifdef OPENJDK
|
||||
ICCPROFILE_SRC_DIR := $(JDK_TOPDIR)/src/java.desktop/share/conf/cmm/lcms
|
||||
@ -102,20 +102,20 @@ DESKTOP_CONF_FILES += $(JDK_OUTPUTDIR)/lib/sound.properties
|
||||
|
||||
################################################################################
|
||||
#
|
||||
# Copy property files from sun/print to LIBDIR
|
||||
# Copy property files from sun/print to LIB_DST_DIR
|
||||
#
|
||||
PSFONTPROPFILE_SRC_DIR := $(JDK_TOPDIR)/src/java.desktop/share/conf
|
||||
PSFONTPROPFILE_SRCS := $(wildcard $(PSFONTPROPFILE_SRC_DIR)/psfont*.properties*)
|
||||
PSFONTPROPFILE_TARGET_FILES := $(subst $(PSFONTPROPFILE_SRC_DIR),$(LIBDIR),$(PSFONTPROPFILE_SRCS))
|
||||
PSFONTPROPFILE_TARGET_FILES := $(subst $(PSFONTPROPFILE_SRC_DIR),$(LIB_DST_DIR),$(PSFONTPROPFILE_SRCS))
|
||||
|
||||
$(LIBDIR)/%: $(PSFONTPROPFILE_SRC_DIR)/%
|
||||
$(LIB_DST_DIR)/%: $(PSFONTPROPFILE_SRC_DIR)/%
|
||||
$(call install-file)
|
||||
|
||||
DESKTOP_CONF_FILES += $(PSFONTPROPFILE_TARGET_FILES)
|
||||
|
||||
################################################################################
|
||||
#
|
||||
# Copy cursor.properties and cursors gif files to LIBDIR
|
||||
# Copy cursor.properties and cursors gif files to LIB_DST_DIR
|
||||
#
|
||||
ifneq ($(OPENJDK_TARGET_OS), macosx)
|
||||
OPENJDK_TARGET_OS_LIB_SRC := $(JDK_TOPDIR)/src/java.desktop/$(OPENJDK_TARGET_OS_API_DIR)/conf
|
||||
@ -123,7 +123,7 @@ else
|
||||
OPENJDK_TARGET_OS_LIB_SRC := $(JDK_TOPDIR)/src/java.desktop/macosx/conf
|
||||
endif
|
||||
|
||||
CURSORS_DEST_DIR := $(LIBDIR)/images/cursors
|
||||
CURSORS_DEST_DIR := $(LIB_DST_DIR)/images/cursors
|
||||
CURSORS_OPENJDK_TARGET_OS_LIB_SRC := $(JDK_TOPDIR)/src/java.desktop/$(OPENJDK_TARGET_OS_API_DIR)/conf/images/cursors
|
||||
|
||||
$(CURSORS_DEST_DIR)/cursors.properties: $(CURSORS_OPENJDK_TARGET_OS_LIB_SRC)/cursors.properties
|
||||
|
@ -29,10 +29,10 @@ include CopyCommon.gmk
|
||||
|
||||
LOGGING_LIB_SRC := $(JDK_TOPDIR)/src/java.logging/share/conf
|
||||
|
||||
$(LIBDIR)/logging.properties: $(LOGGING_LIB_SRC)/logging.properties
|
||||
$(LIB_DST_DIR)/logging.properties: $(LOGGING_LIB_SRC)/logging.properties
|
||||
$(call install-file)
|
||||
|
||||
LOGGING_CONF_FILES := $(LIBDIR)/logging.properties
|
||||
LOGGING_CONF_FILES := $(LIB_DST_DIR)/logging.properties
|
||||
|
||||
################################################################################
|
||||
|
||||
|
@ -27,7 +27,7 @@ include CopyCommon.gmk
|
||||
|
||||
################################################################################
|
||||
|
||||
MGMT_LIBDIR := $(LIBDIR)/management
|
||||
MGMT_LIBDIR := $(LIB_DST_DIR)/management
|
||||
MGMT_LIB_SRC := $(JDK_TOPDIR)/src/java.management/share/conf
|
||||
MGMT_SRC_FILES := $(wildcard $(MGMT_LIB_SRC)/*)
|
||||
MGMT_TARGET_FILES := $(subst $(MGMT_LIB_SRC),$(MGMT_LIBDIR),$(MGMT_SRC_FILES))
|
||||
|
@ -27,12 +27,12 @@ include CopyCommon.gmk
|
||||
|
||||
################################################################################
|
||||
|
||||
HPROF_SRC := $(JDK_TOPDIR)/src/demo/share/jvmti/hprof/jvm.hprof.txt
|
||||
HPROF_SRC := $(JDK_TOPDIR)/src/jdk.hprof.agent/share/native/libhprof/jvm.hprof.txt
|
||||
|
||||
$(LIBDIR)/jvm.hprof.txt: $(HPROF_SRC)
|
||||
$(LIB_DST_DIR)/jvm.hprof.txt: $(HPROF_SRC)
|
||||
$(call install-file)
|
||||
|
||||
HPROF_CONF_FILES := $(LIBDIR)/jvm.hprof.txt
|
||||
HPROF_CONF_FILES := $(LIB_DST_DIR)/jvm.hprof.txt
|
||||
|
||||
################################################################################
|
||||
|
||||
|
@ -28,9 +28,9 @@ include CopyCommon.gmk
|
||||
################################################################################
|
||||
|
||||
|
||||
JDK_DEBUG_AGENT_HEADERS := $(INCLUDEDIR)/jdwpTransport.h
|
||||
JDK_DEBUG_AGENT_HEADERS := $(INCLUDE_DST_DIR)/jdwpTransport.h
|
||||
|
||||
$(INCLUDEDIR)/%.h: $(JDK_TOPDIR)/src/jdk.jdwp.agent/share/native/include/%.h
|
||||
$(INCLUDE_DST_DIR)/%.h: $(JDK_TOPDIR)/src/jdk.jdwp.agent/share/native/include/%.h
|
||||
$(call install-file)
|
||||
|
||||
################################################################################
|
||||
|
@ -28,13 +28,13 @@ default: all
|
||||
include $(SPEC)
|
||||
include MakeBase.gmk
|
||||
|
||||
INCLUDEDIR = $(JDK_OUTPUTDIR)/include
|
||||
LIBDIR := $(JDK_OUTPUTDIR)/lib
|
||||
INCLUDE_DST_DIR := $(JDK_OUTPUTDIR)/include
|
||||
LIB_DST_DIR := $(JDK_OUTPUTDIR)/lib
|
||||
|
||||
OPENJDK_TARGET_OS_INCLUDE = $(INCLUDEDIR)/$(OPENJDK_TARGET_OS)
|
||||
INCLUDE_DST_OS_DIR := $(INCLUDE_DST_DIR)/$(OPENJDK_TARGET_OS)
|
||||
|
||||
ifeq ($(OPENJDK_TARGET_OS), windows)
|
||||
OPENJDK_TARGET_OS_INCLUDE = $(INCLUDEDIR)/win32
|
||||
INCLUDE_DST_OS_DIR := $(INCLUDE_DST_DIR)/win32
|
||||
else ifeq ($(OPENJDK_TARGET_OS), macosx)
|
||||
OPENJDK_TARGET_OS_INCLUDE = $(INCLUDEDIR)/darwin
|
||||
INCLUDE_DST_OS_DIR := $(INCLUDE_DST_DIR)/darwin
|
||||
endif
|
||||
|
@ -24,9 +24,14 @@
|
||||
# questions.
|
||||
#
|
||||
|
||||
# Minimal version for AIX using the standard Latin Type1 Fonts from the
|
||||
# package X11.fnt.iso_T1. These fonts are installed by default into
|
||||
# "/usr/lpp/X11/lib/X11/fonts/Type1" and sym-linked to "/usr/lib/X11/fonts/Type1"
|
||||
#
|
||||
# Portions Copyright (c) 2014 IBM Corporation
|
||||
#
|
||||
|
||||
# This file references the standard Latin Type1 fonts from the AIX package
|
||||
# X11.fnt.iso_T1 and the Unicode TrueType fonts from X11.fnt.ucs.ttf. They
|
||||
# are located by default under "/usr/lpp/X11/lib/X11/fonts/{Type1,TrueType}"
|
||||
# and sym-linked to "/usr/lib/X11/fonts/".
|
||||
|
||||
# Version
|
||||
|
||||
@ -34,44 +39,381 @@ version=1
|
||||
|
||||
# Component Font Mappings
|
||||
|
||||
dialog.plain.latin-1=-*-helvetica-medium-r-normal--*-%d-100-100-p-*-iso10646-1
|
||||
dialog.bold.latin-1=-*-helvetica-bold-r-normal--*-%d-100-100-p-*-iso10646-1
|
||||
dialog.italic.latin-1=-*-helvetica-medium-o-normal--*-%d-100-100-p-*-iso10646-1
|
||||
dialog.bolditalic.latin-1=-*-helvetica-bold-o-normal--*-%d-100-100-p-*-iso10646-1
|
||||
allfonts.iso10646-extB=-monotype-sansmonowtextb-medium-r-normal--*-%d-75-75-m-*-unicode-2
|
||||
|
||||
dialoginput.plain.latin-1=-*-courier-medium-r-normal--*-%d-100-100-m-*-iso10646-1
|
||||
dialoginput.bold.latin-1=-*-courier-bold-r-normal--*-%d-100-100-m-*-iso10646-1
|
||||
dialoginput.italic.latin-1=-*-courier-medium-o-normal--*-%d-100-100-m-*-iso10646-1
|
||||
dialoginput.bolditalic.latin-1=-*-courier-bold-o-normal--*-%d-100-100-m-*-iso10646-1
|
||||
|
||||
sansserif.plain.latin-1=-*-helvetica-medium-r-normal--*-%d-100-100-p-*-iso10646-1
|
||||
sansserif.bold.latin-1=-*-helvetica-bold-r-normal--*-%d-100-100-p-*-iso10646-1
|
||||
sansserif.italic.latin-1=-*-helvetica-medium-o-normal--*-%d-100-100-p-*-iso10646-1
|
||||
sansserif.bolditalic.latin-1=-*-helvetica-bold-o-normal--*-%d-100-100-p-*-iso10646-1
|
||||
dialog.plain.latin-1=-*-helvetica-medium-r-normal--*-%d-100-100-p-*-iso8859-1
|
||||
dialog.plain.thai=-ibm-thaihelvetica-medium-r-normal--*-%d-75-75-p-*-ucs2.thai-0
|
||||
dialog.plain.ukranian-ibm1124=-*-*-medium-r-normal--*-%d-75-75-p-*-ucs2.i18n-0
|
||||
dialog.plain.japanese-x0208=-monotype-sanswt-medium-r-normal--*-%d-75-75-*-*-jisx0208.1983-0
|
||||
dialog.plain.japanese-x0201=-monotype-sanswt-medium-r-normal--*-%d-75-75-*-*-jisx0201.1976-0
|
||||
dialog.plain.japanese-udc=-monotype-sanswt-medium-r-normal--*-%d-75-75-*-*-ibm-udcjp
|
||||
dialog.plain.japanese-iso10646=-monotype-sanswt-medium-r-normal--*-%d-75-75-*-*-ucs2.cjk_japan-0
|
||||
dialog.plain.korean=-monotype-sanswt-medium-r-normal--*-%d-75-75-*-*-ksc5601.1987-0
|
||||
dialog.plain.korean-iso10646=-monotype-sanswt-medium-r-normal--*-%d-75-75-*-*-ucs2.cjk_korea-0
|
||||
dialog.plain.chinese=-monotype-sanswt-medium-r-normal--*-%d-75-75-*-*-gb2312.1980-0
|
||||
dialog.plain.chinese-iso10646=-monotype-sanswt-medium-r-normal--*-%d-75-75-*-*-ucs2.cjk_china-0
|
||||
dialog.plain.taiwanese-iso10646=-monotype-sanswt-medium-r-normal--*-%d-75-75-*-*-ucs2.cjk_taiwan-0
|
||||
|
||||
serif.plain.latin-1=-*-times new roman-medium-r-normal--*-%d-100-100-p-*-iso10646-1
|
||||
serif.bold.latin-1=-*-times new roman-bold-r-normal--*-%d-100-100-p-*-iso10646-1
|
||||
serif.italic.latin-1=-*-times new roman-medium-i-normal--*-%d-100-100-p-*-iso10646-1
|
||||
serif.bolditalic.latin-1=-*-times new roman-bold-i-normal--*-%d-100-100-p-*-iso10646-1
|
||||
dialog.bold.latin-1=-*-helvetica-bold-r-normal--*-%d-100-100-p-*-iso8859-1
|
||||
dialog.bold.thai=-ibm-thaihelvetica-medium-r-normal--*-%d-75-75-p-*-ucs2.thai-0
|
||||
dialog.bold.ukranian-ibm1124=-*-*-bold-r-normal--*-%d-75-75-p-*-ucs2.i18n-0
|
||||
dialog.bold.japanese-x0208=-monotype-sanswt-medium-r-normal--*-%d-75-75-*-*-jisx0208.1983-0
|
||||
dialog.bold.japanese-x0201=-monotype-sanswt-medium-r-normal--*-%d-75-75-*-*-jisx0201.1976-0
|
||||
dialog.bold.japanese-udc=-monotype-sanswt-medium-r-normal--*-%d-75-75-*-*-ibm-udcjp
|
||||
dialog.bold.japanese-iso10646=-monotype-sanswt-medium-r-normal--*-%d-75-75-*-*-ucs2.cjk_japan-0
|
||||
dialog.bold.korean=-monotype-sanswt-medium-r-normal--*-%d-75-75-*-*-ksc5601.1987-0
|
||||
dialog.bold.korean-iso10646=-monotype-sanswt-medium-r-normal--*-%d-75-75-*-*-ucs2.cjk_korea-0
|
||||
dialog.bold.chinese=-monotype-sanswt-medium-r-normal--*-%d-75-75-*-*-gb2312.1980-0
|
||||
dialog.bold.chinese-iso10646=-monotype-sanswt-medium-r-normal--*-%d-75-75-*-*-ucs2.cjk_china-0
|
||||
dialog.bold.taiwanese-iso10646=-monotype-sanswt-medium-r-normal--*-%d-75-75-*-*-ucs2.cjk_taiwan-0
|
||||
|
||||
monospaced.plain.latin-1=-*-courier-medium-r-normal--*-%d-100-100-m-*-iso10646-1
|
||||
monospaced.bold.latin-1=-*-courier-bold-r-normal--*-%d-100-100-m-*-iso10646-1
|
||||
monospaced.italic.latin-1=-*-courier-medium-o-normal--*-%d-100-100-m-*-iso10646-1
|
||||
monospaced.bolditalic.latin-1=-*-courier-bold-o-normal--*-%d-100-100-m-*-iso10646-1
|
||||
dialog.italic.latin-1=-*-helvetica-medium-o-normal--*-%d-100-100-p-*-iso8859-1
|
||||
dialog.italic.thai=-ibm-thaihelvetica-medium-r-normal--*-%d-75-75-p-*-ucs2.thai-0
|
||||
dialog.italic.ukranian-ibm1124=-*-*-medium-i-normal--*-%d-75-75-p-*-ucs2.i18n-0
|
||||
dialog.italic.japanese-x0208=-monotype-sanswt-medium-r-normal--*-%d-75-75-*-*-jisx0208.1983-0
|
||||
dialog.italic.japanese-x0201=-monotype-sanswt-medium-r-normal--*-%d-75-75-*-*-jisx0201.1976-0
|
||||
dialog.italic.japanese-udc=-monotype-sanswt-medium-r-normal--*-%d-75-75-*-*-ibm-udcjp
|
||||
dialog.italic.japanese-iso10646=-monotype-sanswt-medium-r-normal--*-%d-75-75-*-*-ucs2.cjk_japan-0
|
||||
dialog.italic.korean=-monotype-sanswt-medium-r-normal--*-%d-75-75-*-*-ksc5601.1987-0
|
||||
dialog.italic.korean-iso10646=-monotype-sanswt-medium-r-normal--*-%d-75-75-*-*-ucs2.cjk_korea-0
|
||||
dialog.italic.chinese=-monotype-sanswt-medium-r-normal--*-%d-75-75-*-*-gb2312.1980-0
|
||||
dialog.italic.chinese-iso10646=-monotype-sanswt-medium-r-normal--*-%d-75-75-*-*-ucs2.cjk_china-0
|
||||
dialog.italic.taiwanese-iso10646=-monotype-sanswt-medium-r-normal--*-%d-75-75-*-*-ucs2.cjk_taiwan-0
|
||||
|
||||
dialog.bolditalic.latin-1=-*-helvetica-bold-o-normal--*-%d-100-100-p-*-iso8859-1
|
||||
dialog.bolditalic.thai=-ibm-thaihelvetica-medium-r-normal--*-%d-75-75-p-*-ucs2.thai-0
|
||||
dialog.bolditalic.ukranian-ibm1124=-*-*-medium-r-normal--*-%d-75-75-p-*-ucs2.i18n-0
|
||||
dialog.bolditalic.japanese-x0208=-monotype-sanswt-medium-r-normal--*-%d-75-75-*-*-jisx0208.1983-0
|
||||
dialog.bolditalic.japanese-x0201=-monotype-sanswt-medium-r-normal--*-%d-75-75-*-*-jisx0201.1976-0
|
||||
dialog.bolditalic.japanese-udc=-monotype-sanswt-medium-r-normal--*-%d-75-75-*-*-ibm-udcjp
|
||||
dialog.bolditalic.japanese-iso10646=-monotype-sanswt-medium-r-normal--*-%d-75-75-*-*-ucs2.cjk_japan-0
|
||||
dialog.bolditalic.korean=-monotype-sanswt-medium-r-normal--*-%d-75-75-*-*-ksc5601.1987-0
|
||||
dialog.bolditalic.korean-iso10646=-monotype-sanswt-medium-r-normal--*-%d-75-75-*-*-ucs2.cjk_korea-0
|
||||
dialog.bolditalic.chinese=-monotype-sanswt-medium-r-normal--*-%d-75-75-*-*-gb2312.1980-0
|
||||
dialog.bolditalic.chinese-iso10646=-monotype-sanswt-medium-r-normal--*-%d-75-75-*-*-ucs2.cjk_china-0
|
||||
dialog.bolditalic.taiwanese-iso10646=-monotype-sanswt-medium-r-normal--*-%d-75-75-*-*-ucs2.cjk_taiwan-0
|
||||
|
||||
dialoginput.plain.latin-1=-*-courier-medium-r-normal--*-%d-100-100-m-*-iso8859-1
|
||||
dialoginput.plain.thai=-ibm-thaicourier-medium-r-normal--*-%d-75-75-m-*-ucs2.thai-0
|
||||
dialoginput.plain.ukranian-ibm1124=-*-*-medium-r-normal--*-%d-75-75-m-*-ucs2.i18n-0
|
||||
dialoginput.plain.japanese-x0208=-monotype-sansmonowt-medium-r-normal--*-%d-75-75-*-*-jisx0208.1983-0
|
||||
dialoginput.plain.japanese-x0201=-monotype-sansmonowt-medium-r-normal--*-%d-75-75-*-*-jisx0201.1976-0
|
||||
dialoginput.plain.japanese-udc=-monotype-sansmonowt-medium-r-normal--*-%d-75-75-*-*-ibm-udcjp
|
||||
dialoginput.plain.japanese-iso10646=-monotype-sansmonowt-medium-r-normal--*-%d-75-75-*-*-ucs2.cjk_japan-0
|
||||
dialoginput.plain.korean=-monotype-sansmonowt-medium-r-normal--*-%d-75-75-*-*-ksc5601.1987-0
|
||||
dialoginput.plain.korean-iso10646=-monotype-sansmonowt-medium-r-normal--*-%d-75-75-*-*-ucs2.cjk_korea-0
|
||||
dialoginput.plain.chinese=-monotype-sansmonowt-medium-r-normal--*-%d-75-75-*-*-gb2312.1980-0
|
||||
dialoginput.plain.chinese-iso10646=-monotype-sansmonowt-medium-r-normal--*-%d-75-75-*-*-ucs2.cjk_china-0
|
||||
dialoginput.plain.taiwanese-iso10646=-monotype-sansmonowt-medium-r-normal--*-%d-75-75-*-*-ucs2.cjk_taiwan-0
|
||||
|
||||
dialoginput.bold.latin-1=-*-courier-bold-r-normal--*-%d-100-100-m-*-iso8859-1
|
||||
dialoginput.bold.thai=-ibm-thaicourier-medium-r-normal--*-%d-75-75-m-*-ucs2.thai-0
|
||||
dialoginput.bold.ukranian-ibm1124=-*-*-bold-r-normal--*-%d-75-75-m-*-ucs2.i18n-0
|
||||
dialoginput.bold.japanese-x0208=-monotype-sansmonowt-medium-r-normal--*-%d-75-75-*-*-jisx0208.1983-0
|
||||
dialoginput.bold.japanese-x0201=-monotype-sansmonowt-medium-r-normal--*-%d-75-75-*-*-jisx0201.1976-0
|
||||
dialoginput.bold.japanese-udc=-monotype-sansmonowt-medium-r-normal--*-%d-75-75-*-*-ibm-udcjp
|
||||
dialoginput.bold.japanese-iso10646=-monotype-sansmonowt-medium-r-normal--*-%d-75-75-*-*-ucs2.cjk_japan-0
|
||||
dialoginput.bold.korean=-monotype-sansmonowt-medium-r-normal--*-%d-75-75-*-*-ksc5601.1987-0
|
||||
dialoginput.bold.korean-iso10646=-monotype-sansmonowt-medium-r-normal--*-%d-75-75-*-*-ucs2.cjk_korea-0
|
||||
dialoginput.bold.chinese=-monotype-sansmonowt-medium-r-normal--*-%d-75-75-*-*-gb2312.1980-0
|
||||
dialoginput.bold.chinese-iso10646=-monotype-sansmonowt-medium-r-normal--*-%d-75-75-*-*-ucs2.cjk_china-0
|
||||
dialoginput.bold.taiwanese-iso10646=-monotype-sansmonowt-medium-r-normal--*-%d-75-75-*-*-ucs2.cjk_taiwan-0
|
||||
|
||||
dialoginput.italic.latin-1=-*-courier-medium-o-normal--*-%d-100-100-m-*-iso8859-1
|
||||
dialoginput.italic.thai=-ibm-thaicourier-medium-r-normal--*-%d-75-75-m-*-ucs2.thai-0
|
||||
dialoginput.italic.ukranian-ibm1124=-*-*-medium-i-normal--*-%d-75-75-m-*-ucs2.i18n-0
|
||||
dialoginput.italic.japanese-x0208=-monotype-sansmonowt-medium-r-normal--*-%d-75-75-*-*-jisx0208.1983-0
|
||||
dialoginput.italic.japanese-x0201=-monotype-sansmonowt-medium-r-normal--*-%d-75-75-*-*-jisx0201.1976-0
|
||||
dialoginput.italic.japanese-udc=-monotype-sansmonowt-medium-r-normal--*-%d-75-75-*-*-ibm-udcjp
|
||||
dialoginput.italic.japanese-iso10646=-monotype-sansmonowt-medium-r-normal--*-%d-75-75-*-*-ucs2.cjk_japan-0
|
||||
dialoginput.italic.korean=-monotype-sansmonowt-medium-r-normal--*-%d-75-75-*-*-ksc5601.1987-0
|
||||
dialoginput.italic.korean-iso10646=-monotype-sansmonowt-medium-r-normal--*-%d-75-75-*-*-ucs2.cjk_korea-0
|
||||
dialoginput.italic.chinese=-monotype-sansmonowt-medium-r-normal--*-%d-75-75-*-*-gb2312.1980-0
|
||||
dialoginput.italic.chinese-iso10646=-monotype-sansmonowt-medium-r-normal--*-%d-75-75-*-*-ucs2.cjk_china-0
|
||||
dialoginput.italic.taiwanese-iso10646=-monotype-sansmonowt-medium-r-normal--*-%d-75-75-*-*-ucs2.cjk_taiwan-0
|
||||
|
||||
dialoginput.bolditalic.latin-1=-*-courier-bold-o-normal--*-%d-100-100-m-*-iso8859-1
|
||||
dialoginput.bolditalic.thai=-ibm-thaicourier-medium-r-normal--*-%d-75-75-m-*-ucs2.thai-0
|
||||
dialoginput.bolditalic.ukranian-ibm1124=-*-*-medium-r-normal--*-%d-75-75-m-*-ucs2.i18n-0
|
||||
dialoginput.bolditalic.japanese-x0208=-monotype-sansmonowt-medium-r-normal--*-%d-75-75-*-*-jisx0208.1983-0
|
||||
dialoginput.bolditalic.japanese-x0201=-monotype-sansmonowt-medium-r-normal--*-%d-75-75-*-*-jisx0201.1976-0
|
||||
dialoginput.bolditalic.japanese-udc=-monotype-sansmonowt-medium-r-normal--*-%d-75-75-*-*-ibm-udcjp
|
||||
dialoginput.bolditalic.japanese-iso10646=-monotype-sansmonowt-medium-r-normal--*-%d-75-75-*-*-ucs2.cjk_japan-0
|
||||
dialoginput.bolditalic.korean=-monotype-sansmonowt-medium-r-normal--*-%d-75-75-*-*-ksc5601.1987-0
|
||||
dialoginput.bolditalic.korean-iso10646=-monotype-sansmonowt-medium-r-normal--*-%d-75-75-*-*-ucs2.cjk_korea-0
|
||||
dialoginput.bolditalic.chinese=-monotype-sansmonowt-medium-r-normal--*-%d-75-75-*-*-gb2312.1980-0
|
||||
dialoginput.bolditalic.chinese-iso10646=-monotype-sansmonowt-medium-r-normal--*-%d-75-75-*-*-ucs2.cjk_china-0
|
||||
dialoginput.bolditalic.taiwanese-iso10646=-monotype-sansmonowt-medium-r-normal--*-%d-75-75-*-*-ucs2.cjk_taiwan-0
|
||||
|
||||
sansserif.plain.latin-1=-*-helvetica-medium-r-normal--*-%d-100-100-p-*-iso8859-1
|
||||
sansserif.plain.thai=-ibm-thaihelvetica-medium-r-normal--*-%d-75-75-p-*-ucs2.thai-0
|
||||
sansserif.plain.ukranian-ibm1124=-*-*-medium-r-normal--*-%d-75-75-p-*-ucs2.i18n-0
|
||||
sansserif.plain.japanese-x0208=-monotype-sanswt-medium-r-normal--*-%d-75-75-*-*-jisx0208.1983-0
|
||||
sansserif.plain.japanese-x0201=-monotype-sanswt-medium-r-normal--*-%d-75-75-*-*-jisx0201.1976-0
|
||||
sansserif.plain.japanese-udc=-monotype-sanswt-medium-r-normal--*-%d-75-75-*-*-ibm-udcjp
|
||||
sansserif.plain.japanese-iso10646=-monotype-sanswt-medium-r-normal--*-%d-75-75-*-*-ucs2.cjk_japan-0
|
||||
sansserif.plain.korean=-monotype-sanswt-medium-r-normal--*-%d-75-75-*-*-ksc5601.1987-0
|
||||
sansserif.plain.korean-iso10646=-monotype-sanswt-medium-r-normal--*-%d-75-75-*-*-ucs2.cjk_korea-0
|
||||
sansserif.plain.chinese=-monotype-sanswt-medium-r-normal--*-%d-75-75-*-*-gb2312.1980-0
|
||||
sansserif.plain.chinese-iso10646=-monotype-sanswt-medium-r-normal--*-%d-75-75-*-*-ucs2.cjk_china-0
|
||||
sansserif.plain.taiwanese-iso10646=-monotype-sanswt-medium-r-normal--*-%d-75-75-*-*-ucs2.cjk_taiwan-0
|
||||
|
||||
sansserif.bold.latin-1=-*-helvetica-bold-r-normal--*-%d-100-100-p-*-iso8859-1
|
||||
sansserif.bold.thai=-ibm-thaihelvetica-medium-r-normal--*-%d-75-75-p-*-ucs2.thai-0
|
||||
sansserif.bold.ukranian-ibm1124=-*-*-bold-r-normal--*-%d-75-75-p-*-ucs2.i18n-0
|
||||
sansserif.bold.japanese-x0208=-monotype-sanswt-medium-r-normal--*-%d-75-75-*-*-jisx0208.1983-0
|
||||
sansserif.bold.japanese-x0201=-monotype-sanswt-medium-r-normal--*-%d-75-75-*-*-jisx0201.1976-0
|
||||
sansserif.bold.japanese-udc=-monotype-sanswt-medium-r-normal--*-%d-75-75-*-*-ibm-udcjp
|
||||
sansserif.bold.japanese-iso10646=-monotype-sanswt-medium-r-normal--*-%d-75-75-*-*-ucs2.cjk_japan-0
|
||||
sansserif.bold.korean=-monotype-sanswt-medium-r-normal--*-%d-75-75-*-*-ksc5601.1987-0
|
||||
sansserif.bold.korean-iso10646=-monotype-sanswt-medium-r-normal--*-%d-75-75-*-*-ucs2.cjk_korea-0
|
||||
sansserif.bold.chinese=-monotype-sanswt-medium-r-normal--*-%d-75-75-*-*-gb2312.1980-0
|
||||
sansserif.bold.chinese-iso10646=-monotype-sanswt-medium-r-normal--*-%d-75-75-*-*-ucs2.cjk_china-0
|
||||
sansserif.bold.taiwanese-iso10646=-monotype-sanswt-medium-r-normal--*-%d-75-75-*-*-ucs2.cjk_taiwan-0
|
||||
|
||||
sansserif.italic.latin-1=-*-helvetica-medium-o-normal--*-%d-100-100-p-*-iso8859-1
|
||||
sansserif.italic.thai=-ibm-thaihelvetica-medium-r-normal--*-%d-75-75-p-*-ucs2.thai-0
|
||||
sansserif.italic.ukranian-ibm1124=-*-*-medium-i-normal--*-%d-75-75-p-*-ucs2.i18n-0
|
||||
sansserif.italic.japanese-x0208=-monotype-sanswt-medium-r-normal--*-%d-75-75-*-*-jisx0208.1983-0
|
||||
sansserif.italic.japanese-x0201=-monotype-sanswt-medium-r-normal--*-%d-75-75-*-*-jisx0201.1976-0
|
||||
sansserif.italic.japanese-udc=-monotype-sanswt-medium-r-normal--*-%d-75-75-*-*-ibm-udcjp
|
||||
sansserif.italic.japanese-iso10646=-monotype-sanswt-medium-r-normal--*-%d-75-75-*-*-ucs2.cjk_japan-0
|
||||
sansserif.italic.korean=-monotype-sanswt-medium-r-normal--*-%d-75-75-*-*-ksc5601.1987-0
|
||||
sansserif.italic.korean-iso10646=-monotype-sanswt-medium-r-normal--*-%d-75-75-*-*-ucs2.cjk_korea-0
|
||||
sansserif.italic.chinese=-monotype-sanswt-medium-r-normal--*-%d-75-75-*-*-gb2312.1980-0
|
||||
sansserif.italic.chinese-iso10646=-monotype-sanswt-medium-r-normal--*-%d-75-75-*-*-ucs2.cjk_china-0
|
||||
sansserif.italic.taiwanese-iso10646=-monotype-sanswt-medium-r-normal--*-%d-75-75-*-*-ucs2.cjk_taiwan-0
|
||||
|
||||
sansserif.bolditalic.latin-1=-*-helvetica-bold-o-normal--*-%d-100-100-p-*-iso8859-1
|
||||
sansserif.bolditalic.thai=-ibm-thaihelvetica-medium-r-normal--*-%d-75-75-p-*-ucs2.thai-0
|
||||
sansserif.bolditalic.ukranian-ibm1124=-*-*-medium-r-normal--*-%d-75-75-p-*-ucs2.i18n-0
|
||||
sansserif.bolditalic.japanese-x0208=-monotype-sanswt-medium-r-normal--*-%d-75-75-*-*-jisx0208.1983-0
|
||||
sansserif.bolditalic.japanese-x0201=-monotype-sanswt-medium-r-normal--*-%d-75-75-*-*-jisx0201.1976-0
|
||||
sansserif.bolditalic.japanese-udc=-monotype-sanswt-medium-r-normal--*-%d-75-75-*-*-ibm-udcjp
|
||||
sansserif.bolditalic.japanese-iso10646=-monotype-sanswt-medium-r-normal--*-%d-75-75-*-*-ucs2.cjk_japan-0
|
||||
sansserif.bolditalic.korean=-monotype-sanswt-medium-r-normal--*-%d-75-75-*-*-ksc5601.1987-0
|
||||
sansserif.bolditalic.korean-iso10646=-monotype-sanswt-medium-r-normal--*-%d-75-75-*-*-ucs2.cjk_korea-0
|
||||
sansserif.bolditalic.chinese=-monotype-sanswt-medium-r-normal--*-%d-75-75-*-*-gb2312.1980-0
|
||||
sansserif.bolditalic.chinese-iso10646=-monotype-sanswt-medium-r-normal--*-%d-75-75-*-*-ucs2.cjk_china-0
|
||||
sansserif.bolditalic.taiwanese-iso10646=-monotype-sanswt-medium-r-normal--*-%d-75-75-*-*-ucs2.cjk_taiwan-0
|
||||
|
||||
serif.plain.latin-1=-*-times new roman-medium-r-normal--*-%d-100-100-p-*-iso8859-1
|
||||
serif.plain.thai=-ibm-thaitimes-medium-r-normal--*-%d-75-75-p-*-ucs2.thai-0
|
||||
serif.plain.ukranian-ibm1124=-*-*-medium-r-normal--*-%d-75-75-p-*-ucs2.i18n-0
|
||||
serif.plain.japanese-x0208=-monotype-timesnewromanwt-medium-r-normal--*-%d-75-75-*-*-jisx0208.1983-0
|
||||
serif.plain.japanese-x0201=-monotype-timesnewromanwt-medium-r-normal--*-%d-75-75-*-*-jisx0201.1976-0
|
||||
serif.plain.japanese-udc=-monotype-timesnewromanwt-medium-r-normal--*-%d-75-75-*-*-ibm-udcjp
|
||||
serif.plain.japanese-iso10646=-monotype-timesnewromanwt-medium-r-normal--*-%d-75-75-*-*-ucs2.cjk_japan-0
|
||||
serif.plain.korean=-monotype-timesnewromanwt-medium-r-normal--*-%d-75-75-*-*-ksc5601.1987-0
|
||||
serif.plain.korean-iso10646=-monotype-timesnewromanwt-medium-r-normal--*-%d-75-75-*-*-ucs2.cjk_korea-0
|
||||
serif.plain.chinese=-monotype-timesnewromanwt-medium-r-normal--*-%d-75-75-*-*-gb2312.1980-0
|
||||
serif.plain.chinese-iso10646=-monotype-timesnewromanwt-medium-r-normal--*-%d-75-75-*-*-ucs2.cjk_china-0
|
||||
serif.plain.taiwanese-iso10646=-monotype-timesnewromanwt-medium-r-normal--*-%d-75-75-*-*-ucs2.cjk_taiwan-0
|
||||
|
||||
serif.bold.latin-1=-*-times new roman-bold-r-normal--*-%d-100-100-p-*-iso8859-1
|
||||
serif.bold.thai=-ibm-thaitimes-medium-r-normal--*-%d-75-75-p-*-ucs2.thai-0
|
||||
serif.bold.ukranian-ibm1124=-*-*-bold-r-normal--*-%d-75-75-p-*-ucs2.i18n-0
|
||||
serif.bold.japanese-x0208=-monotype-timesnewromanwt-medium-r-normal--*-%d-75-75-*-*-jisx0208.1983-0
|
||||
serif.bold.japanese-x0201=-monotype-timesnewromanwt-medium-r-normal--*-%d-75-75-*-*-jisx0201.1976-0
|
||||
serif.bold.japanese-udc=-monotype-timesnewromanwt-medium-r-normal--*-%d-75-75-*-*-ibm-udcjp
|
||||
serif.bold.japanese-iso10646=-monotype-timesnewromanwt-medium-r-normal--*-%d-75-75-*-*-ucs2.cjk_japan-0
|
||||
serif.bold.korean=-monotype-timesnewromanwt-medium-r-normal--*-%d-75-75-*-*-ksc5601.1987-0
|
||||
serif.bold.korean-iso10646=-monotype-timesnewromanwt-medium-r-normal--*-%d-75-75-*-*-ucs2.cjk_korea-0
|
||||
serif.bold.chinese=-monotype-timesnewromanwt-medium-r-normal--*-%d-75-75-*-*-gb2312.1980-0
|
||||
serif.bold.chinese-iso10646=-monotype-timesnewromanwt-medium-r-normal--*-%d-75-75-*-*-ucs2.cjk_china-0
|
||||
serif.bold.taiwanese-iso10646=-monotype-timesnewromanwt-medium-r-normal--*-%d-75-75-*-*-ucs2.cjk_taiwan-0
|
||||
|
||||
|
||||
serif.italic.latin-1=-*-times new roman-medium-i-normal--*-%d-100-100-p-*-iso8859-1
|
||||
serif.italic.thai=-ibm-thaitimes-medium-r-normal--*-%d-75-75-p-*-ucs2.thai-0
|
||||
serif.italic.ukranian-ibm1124=-*-*-medium-i-normal--*-%d-75-75-p-*-ucs2.i18n-0
|
||||
serif.italic.japanese-x0208=-monotype-timesnewromanwt-medium-r-normal--*-%d-75-75-*-*-jisx0208.1983-0
|
||||
serif.italic.japanese-x0201=-monotype-timesnewromanwt-medium-r-normal--*-%d-75-75-*-*-jisx0201.1976-0
|
||||
serif.italic.japanese-udc=-monotype-timesnewromanwt-medium-r-normal--*-%d-75-75-*-*-ibm-udcjp
|
||||
serif.italic.japanese-iso10646=-monotype-timesnewromanwt-medium-r-normal--*-%d-75-75-*-*-ucs2.cjk_japan-0
|
||||
serif.italic.korean=-monotype-timesnewromanwt-medium-r-normal--*-%d-75-75-*-*-ksc5601.1987-0
|
||||
serif.italic.korean-iso10646=-monotype-timesnewromanwt-medium-r-normal--*-%d-75-75-*-*-ucs2.cjk_korea-0
|
||||
serif.italic.chinese=-monotype-timesnewromanwt-medium-r-normal--*-%d-75-75-*-*-gb2312.1980-0
|
||||
serif.italic.chinese-iso10646=-monotype-timesnewromanwt-medium-r-normal--*-%d-75-75-*-*-ucs2.cjk_china-0
|
||||
serif.italic.taiwanese-iso10646=-monotype-timesnewromanwt-medium-r-normal--*-%d-75-75-*-*-ucs2.cjk_taiwan-0
|
||||
|
||||
serif.bolditalic.latin-1=-*-times new roman-bold-i-normal--*-%d-100-100-p-*-iso8859-1
|
||||
serif.bolditalic.thai=-ibm-thaitimes-medium-r-normal--*-%d-75-75-p-*-ucs2.thai-0
|
||||
serif.bolditalic.ukranian-ibm1124=-*-*-medium-r-normal--*-%d-75-75-p-*-ucs2.i18n-0
|
||||
serif.bolditalic.japanese-x0208=-monotype-timesnewromanwt-medium-r-normal--*-%d-75-75-*-*-jisx0208.1983-0
|
||||
serif.bolditalic.japanese-x0201=-monotype-timesnewromanwt-medium-r-normal--*-%d-75-75-*-*-jisx0201.1976-0
|
||||
serif.bolditalic.japanese-udc=-monotype-timesnewromanwt-medium-r-normal--*-%d-75-75-*-*-ibm-udcjp
|
||||
serif.bolditalic.japanese-iso10646=-monotype-timesnewromanwt-medium-r-normal--*-%d-75-75-*-*-ucs2.cjk_japan-0
|
||||
serif.bolditalic.korean=-monotype-timesnewromanwt-medium-r-normal--*-%d-75-75-*-*-ksc5601.1987-0
|
||||
serif.bolditalic.korean-iso10646=-monotype-timesnewromanwt-medium-r-normal--*-%d-75-75-*-*-ucs2.cjk_korea-0
|
||||
serif.bolditalic.chinese=-monotype-timesnewromanwt-medium-r-normal--*-%d-75-75-*-*-gb2312.1980-0
|
||||
serif.bolditalic.chinese-iso10646=-monotype-timesnewromanwt-medium-r-normal--*-%d-75-75-*-*-ucs2.cjk_china-0
|
||||
serif.bolditalic.taiwanese-iso10646=-monotype-timesnewromanwt-medium-r-normal--*-%d-75-75-*-*-ucs2.cjk_taiwan-0
|
||||
|
||||
monospaced.plain.latin-1=-*-courier-medium-r-normal--*-%d-100-100-m-*-iso8859-1
|
||||
monospaced.plain.thai=-ibm-thaicourier-medium-r-normal--*-%d-75-75-m-*-ucs2.thai-0
|
||||
monospaced.plain.ukranian-ibm1124=-*-*-medium-r-normal--*-%d-75-75-m-*-ucs2.i18n-0
|
||||
monospaced.plain.japanese-x0208=-monotype-sansmonowt-medium-r-normal--*-%d-75-75-*-*-jisx0208.1983-0
|
||||
monospaced.plain.japanese-x0201=-monotype-sansmonowt-medium-r-normal--*-%d-75-75-*-*-jisx0201.1976-0
|
||||
monospaced.plain.japanese-udc=-monotype-sansmonowt-medium-r-normal--*-%d-75-75-*-*-ibm-udcjp
|
||||
monospaced.plain.japanese-iso10646=-monotype-sansmonowt-medium-r-normal--*-%d-75-75-*-*-ucs2.cjk_japan-0
|
||||
monospaced.plain.korean=-monotype-sansmonowt-medium-r-normal--*-%d-75-75-*-*-ksc5601.1987-0
|
||||
monospaced.plain.korean-iso10646=-monotype-sansmonowt-medium-r-normal--*-%d-75-75-*-*-ucs2.cjk_korea-0
|
||||
monospaced.plain.chinese=-monotype-sansmonowt-medium-r-normal--*-%d-75-75-*-*-gb2312.1980-0
|
||||
monospaced.plain.chinese-iso10646=-monotype-sansmonowt-medium-r-normal--*-%d-75-75-*-*-ucs2.cjk_china-0
|
||||
monospaced.plain.taiwanese-iso10646=-monotype-sansmonowt-medium-r-normal--*-%d-75-75-*-*-ucs2.cjk_taiwan-0
|
||||
|
||||
monospaced.bold.latin-1=-*-courier-bold-r-normal--*-%d-100-100-m-*-iso8859-1
|
||||
monospaced.bold.thai=-ibm-thaicourier-medium-r-normal--*-%d-75-75-m-*-ucs2.thai-0
|
||||
monospaced.bold.ukranian-ibm1124=-*-*-bold-r-normal--*-%d-75-75-m-*-ucs2.i18n-0
|
||||
monospaced.bold.japanese-x0208=-monotype-sansmonowt-medium-r-normal--*-%d-75-75-*-*-jisx0208.1983-0
|
||||
monospaced.bold.japanese-x0201=-monotype-sansmonowt-medium-r-normal--*-%d-75-75-*-*-jisx0201.1976-0
|
||||
monospaced.bold.japanese-udc=-monotype-sansmonowt-medium-r-normal--*-%d-75-75-*-*-ibm-udcjp
|
||||
monospaced.bold.japanese-iso10646=-monotype-sansmonowt-medium-r-normal--*-%d-75-75-*-*-ucs2.cjk_japan-0
|
||||
monospaced.bold.korean=-monotype-sansmonowt-medium-r-normal--*-%d-75-75-*-*-ksc5601.1987-0
|
||||
monospaced.bold.korean-iso10646=-monotype-sansmonowt-medium-r-normal--*-%d-75-75-*-*-ucs2.cjk_korea-0
|
||||
monospaced.bold.chinese=-monotype-sansmonowt-medium-r-normal--*-%d-75-75-*-*-gb2312.1980-0
|
||||
monospaced.bold.chinese-iso10646=-monotype-sansmonowt-medium-r-normal--*-%d-75-75-*-*-ucs2.cjk_china-0
|
||||
monospaced.bold.taiwanese-iso10646=-monotype-sansmonowt-medium-r-normal--*-%d-75-75-*-*-ucs2.cjk_taiwan-0
|
||||
|
||||
monospaced.italic.latin-1=-*-courier-medium-o-normal--*-%d-100-100-m-*-iso8859-1
|
||||
monospaced.italic.thai=-ibm-thaicourier-medium-r-normal--*-%d-75-75-m-*-ucs2.thai-0
|
||||
monospaced.italic.ukranian-ibm1124=-*-*-medium-i-normal--*-%d-75-75-m-*-ucs2.i18n-0
|
||||
monospaced.italic.japanese-x0208=-monotype-sansmonowt-medium-r-normal--*-%d-75-75-*-*-jisx0208.1983-0
|
||||
monospaced.italic.japanese-x0201=-monotype-sansmonowt-medium-r-normal--*-%d-75-75-*-*-jisx0201.1976-0
|
||||
monospaced.italic.japanese-udc=-monotype-sansmonowt-medium-r-normal--*-%d-75-75-*-*-ibm-udcjp
|
||||
monospaced.italic.japanese-iso10646=-monotype-sansmonowt-medium-r-normal--*-%d-75-75-*-*-ucs2.cjk_japan-0
|
||||
monospaced.italic.korean=-monotype-sansmonowt-medium-r-normal--*-%d-75-75-*-*-ksc5601.1987-0
|
||||
monospaced.italic.korean-iso10646=-monotype-sansmonowt-medium-r-normal--*-%d-75-75-*-*-ucs2.cjk_korea-0
|
||||
monospaced.italic.chinese=-monotype-sansmonowt-medium-r-normal--*-%d-75-75-*-*-gb2312.1980-0
|
||||
monospaced.italic.chinese-iso10646=-monotype-sansmonowt-medium-r-normal--*-%d-75-75-*-*-ucs2.cjk_china-0
|
||||
monospaced.italic.taiwanese-iso10646=-monotype-sansmonowt-medium-r-normal--*-%d-75-75-*-*-ucs2.cjk_taiwan-0
|
||||
|
||||
monospaced.bolditalic.latin-1=-*-courier-bold-o-normal--*-%d-100-100-m-*-iso8859-1
|
||||
monospaced.bolditalic.thai=-ibm-thaicourier-medium-r-normal--*-%d-75-75-m-*-ucs2.thai-0
|
||||
monospaced.bolditalic.ukranian-ibm1124=-*-*-medium-r-normal--*-%d-75-75-m-*-ucs2.i18n-0
|
||||
monospaced.bolditalic.japanese-x0208=-monotype-sansmonowt-medium-r-normal--*-%d-75-75-*-*-jisx0208.1983-0
|
||||
monospaced.bolditalic.japanese-x0201=-monotype-sansmonowt-medium-r-normal--*-%d-75-75-*-*-jisx0201.1976-0
|
||||
monospaced.bolditalic.japanese-udc=-monotype-sansmonowt-medium-r-normal--*-%d-75-75-*-*-ibm-udcjp
|
||||
monospaced.bolditalic.japanese-iso10646=-monotype-sansmonowt-medium-r-normal--*-%d-75-75-*-*-ucs2.cjk_japan-0
|
||||
monospaced.bolditalic.korean=-monotype-sansmonowt-medium-r-normal--*-%d-75-75-*-*-ksc5601.1987-0
|
||||
monospaced.bolditalic.korean-iso10646=-monotype-sansmonowt-medium-r-normal--*-%d-75-75-*-*-ucs2.cjk_korea-0
|
||||
monospaced.bolditalic.chinese=-monotype-sansmonowt-medium-r-normal--*-%d-75-75-*-*-gb2312.1980-0
|
||||
monospaced.bolditalic.chinese-iso10646=-monotype-sansmonowt-medium-r-normal--*-%d-75-75-*-*-ucs2.cjk_china-0
|
||||
monospaced.bolditalic.taiwanese-iso10646=-monotype-sansmonowt-medium-r-normal--*-%d-75-75-*-*-ucs2.cjk_taiwan-0
|
||||
|
||||
# Search Sequences
|
||||
|
||||
sequence.allfonts=latin-1
|
||||
sequence.allfonts.UTF-8=latin-1,japanese-iso10646
|
||||
# Uk_UA
|
||||
sequence.allfonts.x-IBM1124=latin-1,ukranian-ibm1124
|
||||
# Japanese
|
||||
sequence.allfonts.x-IBM943C=latin-1,japanese-x0201,japanese-x0208,japanese-udc
|
||||
sequence.allfonts.x-IBM29626C=latin-1,japanese-x0201,japanese-x0208,japanese-udc
|
||||
sequence.allfonts.UTF-8.ja=japanese-iso10646,latin-1,iso10646-extB
|
||||
# Chinese
|
||||
sequence.allfonts.x-EUC_CN=latin-1,chinese
|
||||
sequence.allfonts.GB18030=latin-1,chinese-iso10646,iso10646-extB
|
||||
sequence.allfonts.UTF-8.zh.CN=latin-1,chinese-iso10646,iso10646-extB
|
||||
# Taiwanese
|
||||
sequence.allfonts.x-IBM964=latin-1,taiwanese-iso10646
|
||||
sequence.allfonts.Big5=latin-1,taiwanese-iso10646
|
||||
sequence.allfonts.UTF-8.zh.TW=latin-1,taiwanese-iso10646
|
||||
# Korean
|
||||
sequence.allfonts.x-IBM970=latin-1,korean
|
||||
sequence.allfonts.UTF-8.ko=latin-1,korean-iso10646
|
||||
# Thai
|
||||
sequence.allfonts.TIS-620=latin-1,thai
|
||||
sequence.allfonts.UTF-8.th=latin-1,thai
|
||||
# fallback
|
||||
sequence.fallback=thai,chinese-iso10646,taiwanese-iso10646,japanese-iso10646,korean-iso10646,iso10646-extB
|
||||
|
||||
# Exclusion Ranges
|
||||
exclusion.japanese-iso10646=0000-00ff
|
||||
|
||||
# Font File Names
|
||||
filename.-*-courier-medium-r-normal--*-%d-100-100-m-*-iso8859-1=/usr/lpp/X11/lib/X11/fonts/Type1/cour.pfa
|
||||
filename.-*-courier-bold-r-normal--*-%d-100-100-m-*-iso8859-1=/usr/lpp/X11/lib/X11/fonts/Type1/courb.pfa
|
||||
filename.-*-courier-medium-o-normal--*-%d-100-100-m-*-iso8859-1=/usr/lpp/X11/lib/X11/fonts/Type1/couri.pfa
|
||||
filename.-*-courier-bold-o-normal--*-%d-100-100-m-*-iso8859-1=/usr/lpp/X11/lib/X11/fonts/Type1/courbi.pfa
|
||||
filename.-*-helvetica-medium-r-normal--*-%d-100-100-p-*-iso8859-1=/usr/lpp/X11/lib/X11/fonts/Type1/helv.pfa
|
||||
filename.-*-helvetica-bold-r-normal--*-%d-100-100-p-*-iso8859-1=/usr/lpp/X11/lib/X11/fonts/Type1/helvb.pfa
|
||||
filename.-*-helvetica-medium-o-normal--*-%d-100-100-p-*-iso8859-1=/usr/lpp/X11/lib/X11/fonts/Type1/helvi.pfa
|
||||
filename.-*-helvetica-bold-o-normal--*-%d-100-100-p-*-iso8859-1=/usr/lpp/X11/lib/X11/fonts/Type1/helvbi.pfa
|
||||
filename.-*-times_new_roman-medium-r-normal--*-%d-100-100-p-*-iso8859-1=/usr/lpp/X11/lib/X11/fonts/Type1/tnr.pfa
|
||||
filename.-*-times_new_roman-bold-r-normal--*-%d-100-100-p-*-iso8859-1=/usr/lpp/X11/lib/X11/fonts/Type1/tnrb.pfa
|
||||
filename.-*-times_new_roman-medium-i-normal--*-%d-100-100-p-*-iso8859-1=/usr/lpp/X11/lib/X11/fonts/Type1/tnri.pfa
|
||||
filename.-*-times_new_roman-bold-i-normal--*-%d-100-100-p-*-iso8859-1=/usr/lpp/X11/lib/X11/fonts/Type1/tnrbi.pfa
|
||||
|
||||
|
||||
filename.-monotype-sansmonowtextb-medium-r-normal--*-%d-75-75-m-*-unicode-2=/usr/lpp/X11/lib/X11/fonts/TrueType/MTSanXBA.ttf
|
||||
|
||||
filename.-monotype-timesnewromanwt-medium-r-normal--*-%d-75-75-*-*-jisx0208.1983-0=/usr/lpp/X11/lib/X11/fonts/TrueType/tnrwt_j.ttf
|
||||
filename.-monotype-timesnewromanwt-medium-r-normal--*-%d-75-75-*-*-jisx0201.1976-0=/usr/lpp/X11/lib/X11/fonts/TrueType/tnrwt_j.ttf
|
||||
filename.-monotype-timesnewromanwt-medium-r-normal--*-%d-75-75-*-*-ibm-udcjp=/usr/lpp/X11/lib/X11/fonts/TrueType/tnrwt_j.ttf
|
||||
filename.-monotype-timesnewromanwt-medium-r-normal--*-%d-75-75-*-*-ucs2.cjk_japan-0=/usr/lpp/X11/lib/X11/fonts/TrueType/tnrwt_j.ttf
|
||||
filename.-monotype-timesnewromanwt-medium-r-normal--*-%d-75-75-*-*-ksc5601.1987-0=/usr/lpp/X11/lib/X11/fonts/TrueType/tnrwt_k.ttf
|
||||
filename.-monotype-timesnewromanwt-medium-r-normal--*-%d-75-75-*-*-ucs2.cjk_korea-0=/usr/lpp/X11/lib/X11/fonts/TrueType/tnrwt_k.ttf
|
||||
filename.-monotype-timesnewromanwt-medium-r-normal--*-%d-75-75-*-*-gb2312.1980-0=/usr/lpp/X11/lib/X11/fonts/TrueType/tnrwt_s.ttf
|
||||
filename.-monotype-timesnewromanwt-medium-r-normal--*-%d-75-75-*-*-ucs2.cjk_china-0=/usr/lpp/X11/lib/X11/fonts/TrueType/tnrwt_s.ttf
|
||||
filename.-monotype-timesnewromanwt-medium-r-normal--*-%d-75-75-*-*-gb2312.1980-0=/usr/lpp/X11/lib/X11/fonts/TrueType/tnrwt_s.ttf
|
||||
filename.-monotype-timesnewromanwt-medium-r-normal--*-%d-75-75-*-*-ucs2.cjk_china-0=/usr/lpp/X11/lib/X11/fonts/TrueType/tnrwt_s.ttf
|
||||
filename.-monotype-timesnewromanwt-medium-r-normal--*-%d-75-75-*-*-ucs2.cjk_taiwan-0=/usr/lpp/X11/lib/X11/fonts/TrueType/tnrwt_t.ttf
|
||||
|
||||
filename.-monotype-sansmonowt-medium-r-normal--*-%d-75-75-*-*-jisx0208.1983-0=/usr/lpp/X11/lib/X11/fonts/TrueType/mtsansdj.ttf
|
||||
filename.-monotype-sansmonowt-medium-r-normal--*-%d-75-75-*-*-jisx0201.1976-0=/usr/lpp/X11/lib/X11/fonts/TrueType/mtsansdj.ttf
|
||||
filename.-monotype-sansmonowt-medium-r-normal--*-%d-75-75-*-*-ibm-udcjp=/usr/lpp/X11/lib/X11/fonts/TrueType/mtsansdj.ttf
|
||||
filename.-monotype-sansmonowt-medium-r-normal--*-%d-75-75-*-*-ucs2.cjk_japan-0=/usr/lpp/X11/lib/X11/fonts/TrueType/mtsansdj.ttf
|
||||
filename.-monotype-sansmonowt-medium-r-normal--*-%d-75-75-*-*-ksc5601.1987-0=/usr/lpp/X11/lib/X11/fonts/TrueType/mtsansdk.ttf
|
||||
filename.-monotype-sansmonowt-medium-r-normal--*-%d-75-75-*-*-ucs2.cjk_korea-0=/usr/lpp/X11/lib/X11/fonts/TrueType/mtsansdk.ttf
|
||||
filename.-monotype-sansmonowt-medium-r-normal--*-%d-75-75-*-*-gb2312.1980-0=/usr/lpp/X11/lib/X11/fonts/TrueType/mtsansds.ttf
|
||||
filename.-monotype-sansmonowt-medium-r-normal--*-%d-75-75-*-*-ucs2.cjk_china-0=/usr/lpp/X11/lib/X11/fonts/TrueType/mtsansds.ttf
|
||||
filename.-monotype-sansmonowt-medium-r-normal--*-%d-75-75-*-*-ucs2.cjk_taiwan-0=/usr/lpp/X11/lib/X11/fonts/TrueType/mtsansdt.ttf
|
||||
filename.-monotype-sanswt-medium-r-normal--*-%d-75-75-*-*-jisx0208.1983-0=/usr/lpp/X11/lib/X11/fonts/TrueType/mtsans_j.ttf
|
||||
filename.-monotype-sanswt-medium-r-normal--*-%d-75-75-*-*-jisx0201.1976-0=/usr/lpp/X11/lib/X11/fonts/TrueType/mtsans_j.ttf
|
||||
filename.-monotype-sanswt-medium-r-normal--*-%d-75-75-*-*-ibm-udcjp=/usr/lpp/X11/lib/X11/fonts/TrueType/mtsans_j.ttf
|
||||
filename.-monotype-sanswt-medium-r-normal--*-%d-75-75-*-*-ucs2.cjk_japan-0=/usr/lpp/X11/lib/X11/fonts/TrueType/mtsans_j.ttf
|
||||
filename.-monotype-sanswt-medium-r-normal--*-%d-75-75-*-*-ksc5601.1987-0=/usr/lpp/X11/lib/X11/fonts/TrueType/mtsans_k.ttf
|
||||
filename.-monotype-sanswt-medium-r-normal--*-%d-75-75-*-*-ucs2.cjk_korea-0=/usr/lpp/X11/lib/X11/fonts/TrueType/mtsans_k.ttf
|
||||
filename.-monotype-sanswt-medium-r-normal--*-%d-75-75-*-*-gb2312.1980-0=/usr/lpp/X11/lib/X11/fonts/TrueType/mtsans_s.ttf
|
||||
filename.-monotype-sanswt-medium-r-normal--*-%d-75-75-*-*-ucs2.cjk_china-0=/usr/lpp/X11/lib/X11/fonts/TrueType/mtsans_s.ttf
|
||||
filename.-monotype-sanswt-medium-r-normal--*-%d-75-75-*-*-ucs2.cjk_taiwan-0=/usr/lpp/X11/lib/X11/fonts/TrueType/mtsans_t.ttf
|
||||
|
||||
filename.-monotype-timesnewromanwt-medium-r-normal--*-%d-75-75-*-*-iso8859-15=/usr/lpp/X11/lib/X11/fonts/TrueType/tnrwt_j.ttf
|
||||
filename.-monotype-sansmonowt-medium-r-normal--*-%d-75-75-*-*-iso8859-15=/usr/lpp/X11/lib/X11/fonts/TrueType/mtsansdj.ttf
|
||||
|
||||
filename.-ibm-thaicourier-medium-r-normal--*-%d-75-75-m-*-ucs2.thai-0=/usr/lpp/X11/lib/X11/fonts/TrueType/courth.ttf
|
||||
filename.-ibm-thaihelvetica-medium-r-normal--*-%d-75-75-p-*-ucs2.thai-0=/usr/lpp/X11/lib/X11/fonts/TrueType/helvth.ttf
|
||||
filename.-ibm-thaitimes-medium-r-normal--*-%d-75-75-p-*-ucs2.thai-0=/usr/lpp/X11/lib/X11/fonts/TrueType/timeth.ttf
|
||||
|
||||
filename.-*-*-medium-r-normal--*-%d-*-*-p-*-ibm-1046=/usr/lpp/X11/lib/X11/fonts/TrueType/tnrwt_j.ttf
|
||||
filename.-*-*-bold-r-normal--*-%d-*-*-p-*-ibm-1046=/usr/lpp/X11/lib/X11/fonts/TrueType/tnrwt_j.ttf
|
||||
filename.-*-*-medium-i-normal--*-%d-*-*-p-*-ibm-1046=/usr/lpp/X11/lib/X11/fonts/TrueType/tnrwt_j.ttf
|
||||
filename.-*-*-bold-i-normal--*-%d-*-*-p-*-ibm-1046=/usr/lpp/X11/lib/X11/fonts/TrueType/tnrwt_j.ttf
|
||||
filename.-*-*-medium-r-normal--*-%d-*-*-m-*-ibm-1046=/usr/lpp/X11/lib/X11/fonts/TrueType/mtsansdj.ttf
|
||||
filename.-*-*-bold-r-normal--*-%d-*-*-m-*-ibm-1046=/usr/lpp/X11/lib/X11/fonts/TrueType/mtsansdj.ttf
|
||||
filename.-*-*-medium-i-normal--*-%d-*-*-m-*-ibm-1046=/usr/lpp/X11/lib/X11/fonts/TrueType/mtsansdj.ttf
|
||||
filename.-*-*-bold-i-normal--*-%d-*-*-m-*-ibm-1046=/usr/lpp/X11/lib/X11/fonts/TrueType/mtsansdj.ttf
|
||||
|
||||
filename.-*-*-medium-r-normal--*-%d-75-75-p-*-ucs2.i18n-0=/usr/lpp/X11/lib/X11/fonts/TrueType/tnrwt_j.ttf
|
||||
filename.-*-*-bold-r-normal--*-%d-75-75-p-*-ucs2.i18n-0=/usr/lpp/X11/lib/X11/fonts/TrueType/tnrwt_j.ttf
|
||||
filename.-*-*-medium-i-normal--*-%d-75-75-p-*-ucs2.i18n-0=/usr/lpp/X11/lib/X11/fonts/TrueType/tnrwt_j.ttf
|
||||
filename.-*-*-medium-r-normal--*-%d-75-75-m-*-ucs2.i18n-0=/usr/lpp/X11/lib/X11/fonts/TrueType/mtsansdj.ttf
|
||||
filename.-*-*-bold-r-normal--*-%d-75-75-m-*-ucs2.i18n-0=/usr/lpp/X11/lib/X11/fonts/TrueType/mtsansdj.ttf
|
||||
filename.-*-*-medium-i-normal--*-%d-75-75-m-*-ucs2.i18n-0=/usr/lpp/X11/lib/X11/fonts/TrueType/mtsansdj.ttf
|
||||
|
||||
# AWT font path
|
||||
awtfontpath.japanese-x0201=/usr/lpp/X11/lib/X11/fonts/TrueType
|
||||
awtfontpath.japanese-x0208=/usr/lpp/X11/lib/X11/fonts/TrueType
|
||||
awtfontpath.japanese-udc=/usr/lpp/X11/lib/X11/fonts/TrueType
|
||||
awtfontpath.japanese-iso10646=/usr/lpp/X11/lib/X11/fonts/TrueType
|
||||
awtfontpath.korean=/usr/lpp/X11/lib/X11/fonts/TrueType
|
||||
awtfontpath.korean-iso10646=/usr/lpp/X11/lib/X11/fonts/TrueType
|
||||
awtfontpath.chinese=/usr/lpp/X11/lib/X11/fonts/TrueType
|
||||
awtfontpath.chinese-iso10646=/usr/lpp/X11/lib/X11/fonts/TrueType
|
||||
awtfontpath.taiwanese-iso10646=/usr/lpp/X11/lib/X11/fonts/TrueType
|
||||
awtfontpath.thai=/usr/lpp/X11/lib/X11/fonts/TrueType
|
||||
awtfontpath.iso10646-extB=/usr/lpp/X11/lib/X11/fonts/TrueType
|
||||
|
||||
filename.-*-courier-medium-r-normal--*-%d-100-100-m-*-iso10646-1=/usr/lpp/X11/lib/X11/fonts/Type1/cour.pfa
|
||||
filename.-*-courier-bold-r-normal--*-%d-100-100-m-*-iso10646-1=/usr/lpp/X11/lib/X11/fonts/Type1/courb.pfa
|
||||
filename.-*-courier-medium-o-normal--*-%d-100-100-m-*-iso10646-1=/usr/lpp/X11/lib/X11/fonts/Type1/couri.pfa
|
||||
filename.-*-courier-bold-o-normal--*-%d-100-100-m-*-iso10646-1=/usr/lpp/X11/lib/X11/fonts/Type1/courbi.pfa
|
||||
filename.-*-helvetica-medium-r-normal--*-%d-100-100-p-*-iso10646-1=/usr/lpp/X11/lib/X11/fonts/Type1/helv.pfa
|
||||
filename.-*-helvetica-bold-r-normal--*-%d-100-100-p-*-iso10646-1=/usr/lpp/X11/lib/X11/fonts/Type1/helvb.pfa
|
||||
filename.-*-helvetica-medium-o-normal--*-%d-100-100-p-*-iso10646-1=/usr/lpp/X11/lib/X11/fonts/Type1/helvi.pfa
|
||||
filename.-*-helvetica-bold-o-normal--*-%d-100-100-p-*-iso10646-1=/usr/lpp/X11/lib/X11/fonts/Type1/helvbi.pfa
|
||||
filename.-*-times_new_roman-medium-r-normal--*-%d-100-100-p-*-iso10646-1=/usr/lpp/X11/lib/X11/fonts/Type1/tnr.pfa
|
||||
filename.-*-times_new_roman-bold-r-normal--*-%d-100-100-p-*-iso10646-1=/usr/lpp/X11/lib/X11/fonts/Type1/tnrb.pfa
|
||||
filename.-*-times_new_roman-medium-i-normal--*-%d-100-100-p-*-iso10646-1=/usr/lpp/X11/lib/X11/fonts/Type1/tnri.pfa
|
||||
filename.-*-times_new_roman-bold-i-normal--*-%d-100-100-p-*-iso10646-1=/usr/lpp/X11/lib/X11/fonts/Type1/tnrbi.pfa
|
||||
|
@ -62,25 +62,18 @@ GENDATA += $(GENDATA_CURDATA)
|
||||
|
||||
##########################################################################################
|
||||
|
||||
PROPS_SRC := $(JDK_TOPDIR)/src/java.base/share/conf/security/java.security-$(OPENJDK_TARGET_OS)
|
||||
PROPS_DST := $(JDK_OUTPUTDIR)/lib/security/java.security
|
||||
GENDATA_JAVA_SECURITY_SRC := $(JDK_TOPDIR)/src/java.base/share/conf/security/java.security
|
||||
GENDATA_JAVA_SECURITY := $(JDK_OUTPUTDIR)/lib/security/java.security
|
||||
|
||||
# Optionally set this variable to a file to add extra restricted packages.
|
||||
ifneq ($(RESTRICTED_PKGS_SRC), )
|
||||
# RESTRICTED_PKGS_SRC is optionally set in custom extension for this makefile
|
||||
|
||||
$(PROPS_DST): $(PROPS_SRC) $(RESTRICTED_PKGS_SRC)
|
||||
$(GENDATA_JAVA_SECURITY): $(BUILD_TOOLS) $(GENDATA_JAVA_SECURITY_SRC) $(RESTRICTED_PKGS_SRC)
|
||||
$(ECHO) "Generating java.security"
|
||||
$(MKDIR) -p $(@D)
|
||||
$(TOOL_ADDTORESTRICTEDPKGS) $(PROPS_SRC) $@.tmp `$(CAT) $(RESTRICTED_PKGS_SRC) | $(TR) "\n" " "`
|
||||
$(MV) $@.tmp $@
|
||||
$(TOOL_MAKEJAVASECURITY) $(GENDATA_JAVA_SECURITY_SRC) $@ $(OPENJDK_TARGET_OS) \
|
||||
$(RESTRICTED_PKGS_SRC) || exit 1
|
||||
|
||||
else
|
||||
|
||||
$(PROPS_DST): $(PROPS_SRC)
|
||||
$(call install-file)
|
||||
|
||||
endif
|
||||
|
||||
GENDATA += $(PROPS_DST)
|
||||
GENDATA += $(GENDATA_JAVA_SECURITY)
|
||||
|
||||
##########################################################################################
|
||||
|
||||
|
@ -1,10 +1,12 @@
|
||||
#
|
||||
# Copyright (c) 2004, 2011, Oracle and/or its affiliates. All rights reserved.
|
||||
# Copyright (c) 2014, Oracle and/or its affiliates. All rights reserved.
|
||||
# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
||||
#
|
||||
# This code is free software; you can redistribute it and/or modify it
|
||||
# under the terms of the GNU General Public License version 2 only, as
|
||||
# published by the Free Software Foundation.
|
||||
# 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
|
||||
@ -21,37 +23,24 @@
|
||||
# questions.
|
||||
#
|
||||
|
||||
# @test
|
||||
# @bug 4990825
|
||||
# @run shell jps-help.sh
|
||||
# @summary Test that output of 'jps -?' matches the usage.out file
|
||||
include GendataCommon.gmk
|
||||
|
||||
. ${TESTSRC-.}/../../jvmstat/testlibrary/utils.sh
|
||||
$(eval $(call IncludeCustomExtension, jdk, gendata/Gendata-jdk.dev.gmk))
|
||||
|
||||
setup
|
||||
GENDATA := $(JDK_OUTPUTDIR)/modules/jdk.dev/com/sun/tools/jdeps/resources/jdeps-modules.xml
|
||||
METADATA_FILES += $(TOPDIR)/modules.xml
|
||||
|
||||
JPS="${TESTJAVA}/bin/jps"
|
||||
#
|
||||
# Generate modules.xml for jdeps to use
|
||||
# It augments $(TOPDIR)/modules.xml to include module membership
|
||||
#
|
||||
$(GENDATA): $(BUILD_TOOLS_JDK) $(METADATA_FILES)
|
||||
$(MKDIR) -p $(@D)
|
||||
$(RM) $@
|
||||
$(TOOL_GENMODULESXML) -o $@ -mp $(JDK_OUTPUTDIR)/modules $(METADATA_FILES)
|
||||
|
||||
rm -f jps.out 2>/dev/null
|
||||
${JPS} -J-XX:+UsePerfData -? > jps.out 2>&1
|
||||
jdk.dev: $(GENDATA)
|
||||
|
||||
diff -w jps.out ${TESTSRC}/usage.out
|
||||
if [ $? != 0 ]
|
||||
then
|
||||
echo "Output of jps -? differ from expected output. Failed."
|
||||
rm -f jps.out 2>/dev/null
|
||||
exit 1
|
||||
fi
|
||||
all: $(GENDATA)
|
||||
|
||||
rm -f jps.out 2>/dev/null
|
||||
${JPS} -J-XX:+UsePerfData -help > jps.out 2>&1
|
||||
|
||||
diff -w jps.out ${TESTSRC}/usage.out
|
||||
if [ $? != 0 ]
|
||||
then
|
||||
echo "Output of jps -help differ from expected output. Failed."
|
||||
rm -f jps.out 2>/dev/null
|
||||
exit 1
|
||||
fi
|
||||
|
||||
exit 0
|
||||
.PHONY: all jdk.dev
|
@ -28,9 +28,7 @@ default: all
|
||||
include $(SPEC)
|
||||
include MakeBase.gmk
|
||||
include JavaCompilation.gmk
|
||||
|
||||
# Setup the java compilers for the JDK build.
|
||||
include SetupJava.gmk
|
||||
include SetupJavaCompilers.gmk
|
||||
# We need the tools.
|
||||
include Tools.gmk
|
||||
|
||||
|
@ -30,9 +30,7 @@ include MakeBase.gmk
|
||||
include JavaCompilation.gmk
|
||||
include NativeCompilation.gmk
|
||||
include TextFileProcessing.gmk
|
||||
|
||||
# Setup the java compilers for the JDK build.
|
||||
include SetupJava.gmk
|
||||
include SetupJavaCompilers.gmk
|
||||
# We need the tools.
|
||||
include Tools.gmk
|
||||
|
||||
|
@ -1,5 +1,5 @@
|
||||
#
|
||||
# Copyright (c) 2011, 2013, Oracle and/or its affiliates. All rights reserved.
|
||||
# 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
|
||||
@ -28,13 +28,15 @@
|
||||
# into LocaleDataMetaInfo.java
|
||||
|
||||
# First go look for all locale files
|
||||
LOCALE_FILES := $(shell $(FIND) $(JDK_TOPDIR)/src/*/share/classes \
|
||||
LOCALE_FILES := $(shell $(FIND) $(JDK_TOPDIR)/src/java.base/share/classes \
|
||||
$(JDK_TOPDIR)/src/jdk.localedata/share/classes \
|
||||
-name "FormatData_*.java" -o -name "FormatData_*.properties" -o \
|
||||
-name "CollationData_*.java" -o -name "CollationData_*.properties" -o \
|
||||
-name "TimeZoneNames_*.java" -o -name "TimeZoneNames_*.properties" -o \
|
||||
-name "LocaleNames_*.java" -o -name "LocaleNames_*.properties" -o \
|
||||
-name "CurrencyNames_*.java" -o -name "CurrencyNames_*.properties" -o \
|
||||
-name "CalendarData_*.java" -o -name "CalendarData_*.properties")
|
||||
-name "CalendarData_*.java" -o -name "CalendarData_*.properties" -o \
|
||||
-name "BreakIteratorInfo_*.java" -o -name "BreakIteratorRules_*.java")
|
||||
|
||||
# Then translate the locale files into for example: FormatData_sv
|
||||
LOCALE_RESOURCES := $(sort $(subst .properties,,$(subst .java,,$(notdir $(LOCALE_FILES)))))
|
||||
@ -86,6 +88,12 @@ $(eval $(call CaptureLocale,FormatData))
|
||||
#sun.text.resources.CollationData
|
||||
$(eval $(call CaptureLocale,CollationData))
|
||||
|
||||
#sun.text.resources.BreakIteratorInfo
|
||||
$(eval $(call CaptureLocale,BreakIteratorInfo))
|
||||
|
||||
#sun.text.resources.BreakIteratorRules
|
||||
$(eval $(call CaptureLocale,BreakIteratorRules))
|
||||
|
||||
#sun.util.resources.TimeZoneNames
|
||||
$(eval $(call CaptureLocale,TimeZoneNames))
|
||||
|
||||
|
@ -23,9 +23,6 @@
|
||||
# questions.
|
||||
#
|
||||
|
||||
# Prepare the find cache.
|
||||
$(eval $(call FillCacheFind, $(wildcard $(JDK_TOPDIR)/src/*/*/classes)))
|
||||
|
||||
# All .properties files to be compiled are appended to this variable.
|
||||
ALL_COMPILED_PROPSOURCES :=
|
||||
# All generated .java files from compilation are appended to this variable.
|
||||
@ -76,7 +73,6 @@ COMPILE_PROP_SRC_FILES := \
|
||||
$(JDK_TOPDIR)/src/java.management/share/classes/sun/management/resources \
|
||||
$(JDK_TOPDIR)/src/java.desktop/share/classes/sun/print/resources \
|
||||
$(JDK_TOPDIR)/src/jdk.dev/share/classes/sun/tools/jar/resources \
|
||||
$(JDK_TOPDIR)/src/jdk.dev/share/classes/jdk/jigsaw/tools/jlink/resources \
|
||||
$(JDK_TOPDIR)/src/java.logging/share/classes/sun/util/logging/resources)) \
|
||||
#
|
||||
|
||||
|
@ -32,15 +32,6 @@ endef
|
||||
|
||||
################################################################################
|
||||
|
||||
# Filter com.sun.tools.attach.spi.AttachProvider
|
||||
$(JDK_OUTPUTDIR)/gensrc/jdk.attach/META-INF/services/com.sun.tools.attach.spi.AttachProvider: \
|
||||
$(JDK_TOPDIR)/src/jdk.attach/share/classes/META-INF/services/com.sun.tools.attach.spi.AttachProvider
|
||||
$(process-provider)
|
||||
|
||||
GENSRC_JDK_ATTACH += $(JDK_OUTPUTDIR)/gensrc/jdk.attach/META-INF/services/com.sun.tools.attach.spi.AttachProvider
|
||||
|
||||
################################################################################
|
||||
|
||||
# Filter com.sun.jdi.connect.Connector
|
||||
$(JDK_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
|
||||
|
@ -78,11 +78,8 @@ $(JDK_OUTPUTDIR)/gensrc_no_srczip/_the.generated_beaninfo: $(BEANS_SRC) \
|
||||
$(MKDIR) -p $(JDK_OUTPUTDIR)/gensrc_no_srczip/java.desktop/javax/swing
|
||||
$(JAVA) -Djava.awt.headless=true $(NEW_JAVADOC) \
|
||||
-sourcepath "$(subst $(SPACE),$(PATH_SEP),\
|
||||
$(if $(SHUFFLED),$(wildcard $(JDK_TOPDIR)/src/*/*/classes) \
|
||||
$(JDK_OUTPUTDIR)/gensrc/java.base, \
|
||||
$(JDK_TOPDIR)/src/share/classes \
|
||||
$(JDK_TOPDIR)/src/$(OPENJDK_TARGET_OS_API_DIR)/classes \
|
||||
$(JDK_OUTPUTDIR)/gensrc))" \
|
||||
$(wildcard $(JDK_TOPDIR)/src/*/*/classes) \
|
||||
$(JDK_OUTPUTDIR)/gensrc/java.base)" \
|
||||
-doclet build.tools.swingbeaninfo.GenDocletBeanInfo \
|
||||
-x $(SWINGBEAN_DEBUG_FLAG) -d $(JDK_OUTPUTDIR)/gensrc_no_srczip/java.desktop/javax/swing \
|
||||
-t $(DOCLET_DATA_DIR)/SwingBeanInfo.template -docletpath $(JDK_OUTPUTDIR)/btclasses \
|
||||
|
@ -23,12 +23,9 @@
|
||||
# questions.
|
||||
#
|
||||
|
||||
# Hook to include the corresponding custom file, if present.
|
||||
$(eval $(call IncludeCustomExtension, jdk, lib/Awt2dLibraries.gmk))
|
||||
|
||||
WIN_AWT_LIB := $(JDK_OUTPUTDIR)/objs/libawt/awt.lib
|
||||
|
||||
##########################################################################################
|
||||
################################################################################
|
||||
|
||||
BUILD_LIBMLIB_SRC := $(JDK_TOPDIR)/src/java.desktop/share/native/libmlib_image \
|
||||
$(JDK_TOPDIR)/src/java.desktop/share/native/common/sun/awt/medialib
|
||||
@ -76,7 +73,7 @@ $(BUILD_LIBMLIB_IMAGE): $(BUILD_LIBJAVA)
|
||||
|
||||
DESKTOP_LIBRARIES += $(BUILD_LIBMLIB_IMAGE)
|
||||
|
||||
##########################################################################################
|
||||
################################################################################
|
||||
|
||||
ifeq ($(OPENJDK_TARGET_OS)-$(OPENJDK_TARGET_CPU_ARCH), solaris-sparc)
|
||||
|
||||
@ -144,7 +141,7 @@ ifeq ($(OPENJDK_TARGET_OS)-$(OPENJDK_TARGET_CPU_ARCH), solaris-sparc)
|
||||
|
||||
endif
|
||||
|
||||
##########################################################################################
|
||||
################################################################################
|
||||
|
||||
LIBAWT_DIRS := $(JDK_TOPDIR)/src/java.desktop/share/native/libawt \
|
||||
$(JDK_TOPDIR)/src/java.desktop/$(OPENJDK_TARGET_OS_API_DIR)/native/libawt \
|
||||
@ -152,13 +149,17 @@ LIBAWT_DIRS := $(JDK_TOPDIR)/src/java.desktop/share/native/libawt \
|
||||
$(JDK_TOPDIR)/src/java.desktop/$(OPENJDK_TARGET_OS_API_DIR)/native/common/sun/awt \
|
||||
#
|
||||
|
||||
ifeq ($(OPENJDK_TARGET_OS), aix)
|
||||
LIBAWT_DIRS += $(JDK_TOPDIR)/src/java.desktop/$(OPENJDK_TARGET_OS)/native/libawt
|
||||
endif
|
||||
|
||||
ifeq ($(OPENJDK_TARGET_OS), windows)
|
||||
LIBAWT_DIRS += $(JDK_TOPDIR)/src/java.desktop/share/native/common/sun/awt/utility
|
||||
else
|
||||
LIBAWT_EXFILES := sun/java2d/ShaderList.c
|
||||
endif
|
||||
|
||||
ifneq ($(filter $(OPENJDK_TARGET_OS), solaris linux macosx), )
|
||||
ifneq ($(filter $(OPENJDK_TARGET_OS), solaris linux macosx aix), )
|
||||
LIBAWT_EXFILES += awt_Font.c CUPSfuncs.c fontpath.c X11Color.c
|
||||
endif
|
||||
|
||||
@ -168,14 +169,11 @@ endif
|
||||
|
||||
LIBAWT_CFLAGS += -I$(JDK_OUTPUTDIR)/gensrc_headers/java.desktop \
|
||||
$(addprefix -I, $(shell find $(LIBAWT_DIRS) -type d)) \
|
||||
-I$(JDK_TOPDIR)/src/java.desktop/$(OPENJDK_TARGET_OS_API_DIR)/native/common/sun/awt \
|
||||
$(LIBJAVA_HEADER_FLAGS) \
|
||||
$(addprefix -I, $(BUILD_LIBMLIB_IMAGE_SRC)) \
|
||||
#
|
||||
|
||||
LIBAWT_CFLAGS += -D__MEDIALIB_OLD_NAMES -D__USE_J2D_NAMES \
|
||||
$(X_CFLAGS) \
|
||||
$(foreach dir, $(LIBAWT_DIRS), -I$(dir))
|
||||
LIBAWT_CFLAGS += -D__MEDIALIB_OLD_NAMES -D__USE_J2D_NAMES $(X_CFLAGS)
|
||||
|
||||
ifeq ($(OPENJDK_TARGET_OS), macosx)
|
||||
endif
|
||||
@ -296,7 +294,7 @@ endif
|
||||
|
||||
DESKTOP_LIBRARIES += $(BUILD_LIBAWT)
|
||||
|
||||
##########################################################################################
|
||||
################################################################################
|
||||
|
||||
ifeq ($(findstring $(OPENJDK_TARGET_OS),windows macosx),)
|
||||
ifndef BUILD_HEADLESS_ONLY
|
||||
@ -388,7 +386,7 @@ ifeq ($(findstring $(OPENJDK_TARGET_OS),windows macosx),)
|
||||
endif
|
||||
endif
|
||||
|
||||
##########################################################################################
|
||||
################################################################################
|
||||
|
||||
LIBLCMS_SRC := $(JDK_TOPDIR)/src/java.desktop/share/native/liblcms
|
||||
LIBLCMS_CPPFLAGS += -I$(JDK_OUTPUTDIR)/gensrc_headers/java.desktop \
|
||||
@ -441,7 +439,7 @@ DESKTOP_LIBRARIES += $(BUILD_LIBLCMS)
|
||||
|
||||
$(BUILD_LIBLCMS): $(BUILD_LIBAWT)
|
||||
|
||||
##########################################################################################
|
||||
################################################################################
|
||||
|
||||
ifdef OPENJDK
|
||||
BUILD_LIBJAVAJPEG_MAPFILE := $(JDK_TOPDIR)/make/mapfiles/libjpeg/mapfile-vers
|
||||
@ -515,7 +513,7 @@ $(BUILD_LIBJAVAJPEG): $(BUILD_LIBJAVA)
|
||||
|
||||
DESKTOP_LIBRARIES += $(BUILD_LIBJAVAJPEG)
|
||||
|
||||
##########################################################################################
|
||||
################################################################################
|
||||
|
||||
LIBFONTMANAGER_SRC := $(JDK_TOPDIR)/src/java.desktop/share/native/libfontmanager \
|
||||
$(JDK_TOPDIR)/src/java.desktop/$(OPENJDK_TARGET_OS_API_DIR)/native/libfontmanager
|
||||
@ -607,54 +605,7 @@ endif
|
||||
|
||||
DESKTOP_LIBRARIES += $(BUILD_LIBFONTMANAGER)
|
||||
|
||||
##########################################################################################
|
||||
|
||||
ifndef OPENJDK
|
||||
|
||||
LIBT2K_SRC := $(JDK_TOPDIR)/src/closed/java.desktop/share/native/libt2k
|
||||
LIBT2K_CFLAGS := $(addprefix -I, $(LIBT2K_SRC)) \
|
||||
-I$(JDK_TOPDIR)/src/closed/java.desktop/share/native/libt2k/t2k \
|
||||
-I$(JDK_TOPDIR)/src/java.desktop/share/native/libfontmanager \
|
||||
-I$(JDK_TOPDIR)/src/java.desktop/share/native/libawt/sun/java2d \
|
||||
-I$(JDK_TOPDIR)/src/java.desktop/share/native/libawt/sun/java2d/loops \
|
||||
-I$(JDK_TOPDIR)/src/java.desktop/share/native/common/sun/font \
|
||||
-I$(JDK_TOPDIR)/src/java.base/share/native/libjava \
|
||||
-I$(JDK_TOPDIR)/src/java.base/$(OPENJDK_TARGET_OS_API_DIR)/native/libjava \
|
||||
-I$(JDK_OUTPUTDIR)/gensrc_headers/java.desktop \
|
||||
#
|
||||
|
||||
$(eval $(call SetupNativeCompilation,BUILD_LIBT2K, \
|
||||
LIBRARY := t2k, \
|
||||
OUTPUT_DIR := $(INSTALL_LIBRARIES_HERE), \
|
||||
SRC := $(LIBT2K_SRC), \
|
||||
EXCLUDE_FILES := t2k/orion.c, \
|
||||
LANG := C++, \
|
||||
OPTIMIZATION := HIGH, \
|
||||
CFLAGS := $(CFLAGS_JDKLIB) $(LIBT2K_CFLAGS), \
|
||||
CXXFLAGS := $(CXXFLAGS_JDKLIB) $(LIBT2K_CFLAGS), \
|
||||
CFLAGS_windows = -DCC_NOEX, \
|
||||
CXXFLAGS_windows = -DCC_NOEX, \
|
||||
MAPFILE := $(JDK_TOPDIR)/make/mapfiles/libt2k/mapfile-vers, \
|
||||
LDFLAGS := $(LDFLAGS_JDKLIB) $(LDFLAGS_CXX_JDK) \
|
||||
$(call SET_SHARED_LIBRARY_ORIGIN), \
|
||||
LDFLAGS_windows := user32.lib $(JDK_OUTPUTDIR)/objs/libfontmanager/fontmanager.lib, \
|
||||
LDFLAGS_SUFFIX_posix := $(LIBM) $(LIBCXX) -lfontmanager -ljava -ljvm -lc, \
|
||||
LDFLAGS_SUFFIX_solaris := -lawt -lawt_xawt, \
|
||||
VERSIONINFO_RESOURCE := $(GLOBAL_VERSION_INFO_RESOURCE), \
|
||||
RC_FLAGS := $(RC_FLAGS) \
|
||||
-D "JDK_FNAME=t2k.dll" \
|
||||
-D "JDK_INTERNAL_NAME=t2k" \
|
||||
-D "JDK_FTYPE=0x2L", \
|
||||
OBJECT_DIR := $(JDK_OUTPUTDIR)/objs/libt2k, \
|
||||
DEBUG_SYMBOLS := $(DEBUG_ALL_BINARIES)))
|
||||
|
||||
# t2k is linked against fontmanager
|
||||
$(BUILD_LIBT2K): $(BUILD_LIBFONTMANAGER)
|
||||
|
||||
DESKTOP_LIBRARIES += $(BUILD_LIBT2K)
|
||||
endif
|
||||
|
||||
##########################################################################################
|
||||
################################################################################
|
||||
|
||||
ifeq ($(OPENJDK_TARGET_OS), windows)
|
||||
LIBJAWT_SRC := $(JDK_TOPDIR)/src/java.desktop/$(OPENJDK_TARGET_OS_API_DIR)/native/libjawt
|
||||
@ -768,99 +719,7 @@ endif # OPENJDK_TARGET_OS
|
||||
|
||||
DESKTOP_LIBRARIES += $(BUILD_LIBJAWT)
|
||||
|
||||
##########################################################################################
|
||||
|
||||
ifndef OPENJDK
|
||||
|
||||
LIBKCMS_SRC := $(JDK_TOPDIR)/src/closed/java.desktop/share/native/libkcms \
|
||||
$(JDK_TOPDIR)/src/closed/java.desktop/$(OPENJDK_TARGET_OS_API_DIR)/native/libkcms \
|
||||
#
|
||||
LIBKCMS_CFLAGS += $(addprefix -I, $(LIBKCMS_SRC)) \
|
||||
-I$(JDK_TOPDIR)/src/java.base/share/native/libjava \
|
||||
-I$(JDK_TOPDIR)/src/java.base/$(OPENJDK_TARGET_OS_API_DIR)/native/libjava \
|
||||
-I$(JDK_OUTPUTDIR)/gensrc_headers/java.desktop \
|
||||
#
|
||||
LIBKCMS_VERSIONINFO_RESOURCE := $(JDK_TOPDIR)/src/closed/java.desktop/windows/native/libkcms/cmm.rc
|
||||
|
||||
LIBKCMS_CFLAGS += $(CFLAGS_JDKLIB)
|
||||
|
||||
ifeq ($(OPENJDK_TARGET_OS), solaris)
|
||||
# This particular library uses a feature called PIC_CODE_SMALL (on solaris)
|
||||
# implement it like this...since it's only used here
|
||||
LIBKCMS_CFLAGS := $(patsubst -KPIC, -Kpic, $(LIBKCMS_CFLAGS))
|
||||
else ifeq ($(OPENJDK_TARGET_CPU_ARCH), ppc)
|
||||
LIBKCMS_CFLAGS := $(patsubst -fPIC, -fpic, $(LIBKCMS_CFLAGS))
|
||||
endif
|
||||
|
||||
$(eval $(call SetupNativeCompilation,BUILD_LIBKCMS, \
|
||||
LIBRARY := kcms, \
|
||||
OUTPUT_DIR := $(INSTALL_LIBRARIES_HERE), \
|
||||
SRC := $(LIBKCMS_SRC), \
|
||||
LANG := C, \
|
||||
EXCLUDE_FILES := $(BUILD_LIBKCMS_EXCLUDE_FILES), \
|
||||
OPTIMIZATION := LOW, \
|
||||
CFLAGS := $(LIBKCMS_CFLAGS) \
|
||||
-DJAVACMM -DFUT_CALC_EX -DNO_FUT_GCONST, \
|
||||
CFLAGS_linux := -Wno-missing-field-initializers, \
|
||||
MAPFILE := $(JDK_TOPDIR)/make/mapfiles/libkcms/mapfile-vers, \
|
||||
LDFLAGS := $(LDFLAGS_JDKLIB) \
|
||||
$(call SET_SHARED_LIBRARY_ORIGIN), \
|
||||
LDFLAGS_SUFFIX_linux := -lc -lpthread, \
|
||||
LDFLAGS_SUFFIX_solaris := -lc, \
|
||||
LDFLAGS_SUFFIX_windows := $(WIN_JAVA_LIB) advapi32.lib user32.lib version.lib, \
|
||||
LDFLAGS_SUFFIX_posix := -lm -ljava -ljvm, \
|
||||
VERSIONINFO_RESOURCE := $(LIBKCMS_VERSIONINFO_RESOURCE), \
|
||||
RC_FLAGS := $(RC_FLAGS) \
|
||||
-D "JDK_FNAME=kcms.dll" \
|
||||
-D "JDK_INTERNAL_NAME=kcms" \
|
||||
-D "JDK_FTYPE=0x2L", \
|
||||
OBJECT_DIR := $(JDK_OUTPUTDIR)/objs/libkcms, \
|
||||
DEBUG_SYMBOLS := $(DEBUG_ALL_BINARIES)))
|
||||
|
||||
$(BUILD_LIBKCMS): $(BUILD_LIBJAVA)
|
||||
|
||||
DESKTOP_LIBRARIES += $(BUILD_LIBKCMS)
|
||||
|
||||
endif
|
||||
|
||||
##########################################################################################
|
||||
|
||||
ifndef OPENJDK
|
||||
ifeq ($(OPENJDK_TARGET_OS), solaris)
|
||||
ifneq ($(OPENJDK_TARGET_CPU), x86_64)
|
||||
|
||||
ifeq ($(shell if test "$(OS_VERSION_MAJOR)" -eq 5 -a "$(OS_VERSION_MINOR)" -le 10; then $(ECHO) ok; fi), ok)
|
||||
|
||||
SUNWJDGA_MAPFILE :=
|
||||
ifeq ($(OPENJDK_TARGET_CPU_ARCH), sparc)
|
||||
SUNWJDGA_MAPFILE := $(JDK_TOPDIR)/make/mapfiles/libjdga/mapfile-vers
|
||||
endif
|
||||
|
||||
$(eval $(call SetupNativeCompilation,BUILD_LIBSUNWJDGA, \
|
||||
LIBRARY := sunwjdga, \
|
||||
OUTPUT_DIR := $(INSTALL_LIBRARIES_HERE), \
|
||||
SRC := $(JDK_TOPDIR)/src/java.desktop/unix/native/libsunwjdga, \
|
||||
LANG := C, \
|
||||
OPTIMIZATION := LOW, \
|
||||
CFLAGS := $(CFLAGS_JDKLIB) \
|
||||
-I$(JDK_TOPDIR)/src/share/javavm/export \
|
||||
-I$(JDK_TOPDIR)/src/$(OPENJDK_TARGET_OS_API_DIR)/javavm/export \
|
||||
$(X_CFLAGS), \
|
||||
MAPFILE := $(SUNWJDGA_MAPFILE), \
|
||||
LDFLAGS := $(LDFLAGS_JDKLIB) \
|
||||
$(call SET_SHARED_LIBRARY_ORIGIN), \
|
||||
LDFLAGS_SUFFIX := $(X_LIBS) -ldga -lX11 $(LIBDL) -lc, \
|
||||
OBJECT_DIR := $(JDK_OUTPUTDIR)/objs/libsunwjdga, \
|
||||
DEBUG_SYMBOLS := $(DEBUG_ALL_BINARIES)))
|
||||
|
||||
DESKTOP_LIBRARIES += $(BUILD_LIBSUNWJDGA)
|
||||
|
||||
endif
|
||||
endif
|
||||
endif
|
||||
endif
|
||||
|
||||
##########################################################################################
|
||||
################################################################################
|
||||
|
||||
ifeq ($(BUILD_HEADLESS), true)
|
||||
# Mac and Windows only use the native AWT lib, do not build libawt_headless
|
||||
@ -932,7 +791,7 @@ ifeq ($(BUILD_HEADLESS), true)
|
||||
endif
|
||||
endif
|
||||
|
||||
##########################################################################################
|
||||
################################################################################
|
||||
|
||||
ifndef BUILD_HEADLESS_ONLY
|
||||
|
||||
@ -973,7 +832,6 @@ ifndef BUILD_HEADLESS_ONLY
|
||||
#
|
||||
|
||||
ifeq ($(OPENJDK_TARGET_OS), macosx)
|
||||
LIBSPLASHSCREEN_CFLAGS += -F/System/Library/Frameworks/JavaVM.framework/Frameworks
|
||||
LIBSPLASHSCREEN_CFLAGS += -DWITH_MACOSX
|
||||
LIBSPLASHSCREEN_CFLAGS += -I$(JDK_TOPDIR)/src/java.desktop/macosx/native/libosxapp
|
||||
|
||||
@ -1042,47 +900,7 @@ ifndef BUILD_HEADLESS_ONLY
|
||||
|
||||
endif
|
||||
|
||||
##########################################################################################
|
||||
|
||||
ifndef OPENJDK
|
||||
|
||||
LIBDCPR_SRC_DIRS := $(JDK_TOPDIR)/src/closed/java.desktop/share/native/libdcpr
|
||||
LIBDCPR_CFLAGS := $(addprefix -I, $(shell $(FIND) $(LIBDCPR_SRC_DIRS) -type d)) \
|
||||
-I$(JDK_TOPDIR)/src/java.desktop/share/native/libawt/sun/java2d/pipe \
|
||||
-I$(JDK_TOPDIR)/src/java.base/share/native/libjava \
|
||||
-I$(JDK_TOPDIR)/src/java.base/$(OPENJDK_TARGET_OS_API_DIR)/native/libjava \
|
||||
-I$(JDK_OUTPUTDIR)/gensrc_headers/java.desktop \
|
||||
#
|
||||
|
||||
$(eval $(call SetupNativeCompilation,BUILD_LIBDCPR, \
|
||||
LIBRARY := dcpr, \
|
||||
OUTPUT_DIR := $(INSTALL_LIBRARIES_HERE), \
|
||||
SRC := $(LIBDCPR_SRC_DIRS), \
|
||||
LANG := C, \
|
||||
OPTIMIZATION := LOW, \
|
||||
CFLAGS := $(CFLAGS_JDKLIB) \
|
||||
$(LIBDCPR_CFLAGS), \
|
||||
MAPFILE := $(JDK_TOPDIR)/make/mapfiles/libdcpr/mapfile-vers, \
|
||||
LDFLAGS := $(LDFLAGS_JDKLIB) \
|
||||
$(call SET_SHARED_LIBRARY_ORIGIN), \
|
||||
LDFLAGS_SUFFIX := $(LIBM) $(LDFLAGS_JDKLIB_SUFFIX), \
|
||||
LDFLAGS_SUFFIX_windows := $(WIN_JAVA_LIB), \
|
||||
LDFLAGS_SUFFIX_posix := -lm, \
|
||||
VERSIONINFO_RESOURCE := $(GLOBAL_VERSION_INFO_RESOURCE), \
|
||||
RC_FLAGS := $(RC_FLAGS) \
|
||||
-D "JDK_FNAME=dcpr.dll" \
|
||||
-D "JDK_INTERNAL_NAME=dcpr" \
|
||||
-D "JDK_FTYPE=0x2L", \
|
||||
OBJECT_DIR := $(JDK_OUTPUTDIR)/objs/libdcpr, \
|
||||
DEBUG_SYMBOLS := $(DEBUG_ALL_BINARIES)))
|
||||
|
||||
$(BUILD_LIBDCPR): $(BUILD_LIBJAVA)
|
||||
|
||||
DESKTOP_LIBRARIES += $(BUILD_LIBDCPR)
|
||||
|
||||
endif
|
||||
|
||||
##########################################################################################
|
||||
################################################################################
|
||||
|
||||
ifeq ($(OPENJDK_TARGET_OS), macosx)
|
||||
|
||||
@ -1159,7 +977,7 @@ ifeq ($(OPENJDK_TARGET_OS), macosx)
|
||||
|
||||
endif
|
||||
|
||||
##########################################################################################
|
||||
################################################################################
|
||||
|
||||
ifeq ($(OPENJDK_TARGET_OS), macosx)
|
||||
|
||||
@ -1200,3 +1018,8 @@ ifeq ($(OPENJDK_TARGET_OS), macosx)
|
||||
#$(BUILD_LIBOSXUI): $(BUILD_LIBJAVA)
|
||||
|
||||
endif
|
||||
|
||||
################################################################################
|
||||
|
||||
# Hook to include the corresponding custom file, if present.
|
||||
$(eval $(call IncludeCustomExtension, jdk, lib/Awt2dLibraries.gmk))
|
||||
|
@ -26,6 +26,8 @@
|
||||
WIN_VERIFY_LIB := $(JDK_OUTPUTDIR)/objs/libverify/verify.lib
|
||||
|
||||
##########################################################################################
|
||||
# libfdlibm is statically linked with libjava below and not delivered into the
|
||||
# product on its own.
|
||||
|
||||
BUILD_LIBFDLIBM_OPTIMIZATION := HIGH
|
||||
|
||||
|
@ -25,6 +25,10 @@
|
||||
|
||||
include LibCommon.gmk
|
||||
|
||||
# Prepare the find cache.
|
||||
$(eval $(call FillCacheFind, $(wildcard $(JDK_TOPDIR)/src/java.base/*/native \
|
||||
$(JDK_TOPDIR)/src/*/java.base/*/native)))
|
||||
|
||||
include CoreLibraries.gmk
|
||||
include NetworkingLibraries.gmk
|
||||
include NioLibraries.gmk
|
||||
|
@ -25,6 +25,10 @@
|
||||
|
||||
include LibCommon.gmk
|
||||
|
||||
# Prepare the find cache.
|
||||
$(eval $(call FillCacheFind, $(wildcard $(JDK_TOPDIR)/src/java.desktop/*/native \
|
||||
$(JDK_TOPDIR)/src/*/java.desktop/*/native)))
|
||||
|
||||
include PlatformLibraries.gmk
|
||||
include Awt2dLibraries.gmk
|
||||
include SoundLibraries.gmk
|
||||
|
@ -27,33 +27,11 @@ include LibCommon.gmk
|
||||
|
||||
################################################################################
|
||||
|
||||
ifeq ($(OPENJDK_TARGET_OS), aix)
|
||||
LIBATTACH_OS_API_DIR := aix
|
||||
else
|
||||
LIBATTACH_OS_API_DIR := $(OPENJDK_TARGET_OS_API_DIR)
|
||||
endif
|
||||
|
||||
LIBATTACH_SRC := $(JDK_TOPDIR)/src/jdk.attach/$(LIBATTACH_OS_API_DIR)/native/libattach
|
||||
|
||||
LIBATTACH_EXCLUDE_FILES :=
|
||||
ifneq ($(OPENJDK_TARGET_OS), solaris)
|
||||
LIBATTACH_EXCLUDE_FILES += SolarisVirtualMachine.c
|
||||
endif
|
||||
ifneq ($(OPENJDK_TARGET_OS), linux)
|
||||
LIBATTACH_EXCLUDE_FILES += LinuxVirtualMachine.c
|
||||
endif
|
||||
ifneq ($(OPENJDK_TARGET_OS), macosx)
|
||||
LIBATTACH_EXCLUDE_FILES += BsdVirtualMachine.c
|
||||
endif
|
||||
ifneq ($(OPENJDK_TARGET_OS),aix)
|
||||
LIBATTACH_EXCLUDE_FILES += AixVirtualMachine.c
|
||||
endif
|
||||
|
||||
$(eval $(call SetupNativeCompilation,BUILD_LIBATTACH, \
|
||||
LIBRARY := attach, \
|
||||
OUTPUT_DIR := $(INSTALL_LIBRARIES_HERE), \
|
||||
SRC := $(LIBATTACH_SRC), \
|
||||
EXCLUDE_FILES := $(LIBATTACH_EXCLUDE_FILES), \
|
||||
SRC := $(JDK_TOPDIR)/src/jdk.attach/$(OPENJDK_TARGET_OS)/native/libattach, \
|
||||
LANG := C, \
|
||||
OPTIMIZATION := LOW, \
|
||||
CFLAGS := $(CFLAGS_JDKLIB) $(CFLAGS_WARNINGS_ARE_ERRORS) \
|
||||
|
@ -27,11 +27,11 @@ include LibCommon.gmk
|
||||
|
||||
################################################################################
|
||||
|
||||
BUILD_LIBHPROF_SRC := $(JDK_TOPDIR)/src/demo/share/jvmti/hprof \
|
||||
$(JDK_TOPDIR)/src/demo/$(OPENJDK_TARGET_OS_API_DIR)/jvmti/hprof
|
||||
BUILD_LIBHPROF_SRC := $(call FindSrcDirsForLib, jdk.hprof.agent, hprof)
|
||||
|
||||
BUILD_LIBHPROF_CFLAGS := $(addprefix -I, $(BUILD_LIBHPROF_SRC)) \
|
||||
-I$(JDK_TOPDIR)/src/demo/share/jvmti/java_crw_demo
|
||||
|
||||
|
||||
BUILD_LIBHPROF_LDFLAGS :=
|
||||
|
||||
LIBHPROF_OPTIMIZATION := HIGHEST
|
||||
|
@ -29,9 +29,6 @@ include $(SPEC)
|
||||
include MakeBase.gmk
|
||||
include NativeCompilation.gmk
|
||||
|
||||
# Prepare the find cache.
|
||||
$(eval $(call FillCacheFind, $(wildcard $(JDK_TOPDIR)/src/*/*/native)))
|
||||
|
||||
# Build tools
|
||||
include Tools.gmk
|
||||
|
||||
|
@ -44,7 +44,7 @@ ifneq ($(OPENJDK_TARGET_OS), macosx)
|
||||
endif
|
||||
|
||||
ifeq ($(OPENJDK_TARGET_OS), aix)
|
||||
LIBNET_SRC_DIRS += $(JDK_TOPDIR)/src/aix/native/java/net/
|
||||
LIBNET_SRC_DIRS += $(JDK_TOPDIR)/src/java.base/$(OPENJDK_TARGET_OS)/native/libnet/java/net/
|
||||
endif
|
||||
|
||||
$(eval $(call SetupNativeCompilation,BUILD_LIBNET, \
|
||||
|
@ -56,17 +56,8 @@ endif
|
||||
|
||||
ifeq ($(OPENJDK_TARGET_OS), aix)
|
||||
BUILD_LIBNIO_MAPFILE:=$(JDK_TOPDIR)/make/mapfiles/libnio/mapfile-$(OPENJDK_TARGET_OS)
|
||||
BUILD_LIBNIO_FILES += \
|
||||
AixPollPort.c \
|
||||
InheritedChannel.c \
|
||||
AixNativeThread.c \
|
||||
PollArrayWrapper.c \
|
||||
UnixAsynchronousServerSocketChannelImpl.c \
|
||||
UnixAsynchronousSocketChannelImpl.c \
|
||||
GnomeFileTypeDetector.c \
|
||||
UnixCopyFile.c \
|
||||
AixNativeDispatcher.c \
|
||||
UnixNativeDispatcher.c
|
||||
BUILD_LIBNIO_EXFILES += \
|
||||
NativeThread.c
|
||||
endif
|
||||
|
||||
$(eval $(call SetupNativeCompilation,BUILD_LIBNIO, \
|
||||
|
@ -27,13 +27,13 @@
|
||||
|
||||
SUNWprivate_1.1 {
|
||||
global:
|
||||
Java_sun_tools_attach_AixVirtualMachine_socket
|
||||
Java_sun_tools_attach_AixVirtualMachine_connect
|
||||
Java_sun_tools_attach_AixVirtualMachine_sendQuitTo
|
||||
Java_sun_tools_attach_AixVirtualMachine_checkPermissions
|
||||
Java_sun_tools_attach_AixVirtualMachine_close
|
||||
Java_sun_tools_attach_AixVirtualMachine_read
|
||||
Java_sun_tools_attach_AixVirtualMachine_write
|
||||
Java_sun_tools_attach_VirtualMachineImpl_socket
|
||||
Java_sun_tools_attach_VirtualMachineImpl_connect
|
||||
Java_sun_tools_attach_VirtualMachineImpl_sendQuitTo
|
||||
Java_sun_tools_attach_VirtualMachineImpl_checkPermissions
|
||||
Java_sun_tools_attach_VirtualMachineImpl_close
|
||||
Java_sun_tools_attach_VirtualMachineImpl_read
|
||||
Java_sun_tools_attach_VirtualMachineImpl_write
|
||||
local:
|
||||
*;
|
||||
};
|
||||
|
@ -27,17 +27,17 @@
|
||||
|
||||
SUNWprivate_1.1 {
|
||||
global:
|
||||
Java_sun_tools_attach_LinuxVirtualMachine_checkPermissions;
|
||||
Java_sun_tools_attach_LinuxVirtualMachine_close;
|
||||
Java_sun_tools_attach_LinuxVirtualMachine_connect;
|
||||
Java_sun_tools_attach_LinuxVirtualMachine_getLinuxThreadsManager;
|
||||
Java_sun_tools_attach_LinuxVirtualMachine_isLinuxThreads;
|
||||
Java_sun_tools_attach_LinuxVirtualMachine_open;
|
||||
Java_sun_tools_attach_LinuxVirtualMachine_sendQuitTo;
|
||||
Java_sun_tools_attach_LinuxVirtualMachine_sendQuitToChildrenOf;
|
||||
Java_sun_tools_attach_LinuxVirtualMachine_socket;
|
||||
Java_sun_tools_attach_LinuxVirtualMachine_read;
|
||||
Java_sun_tools_attach_LinuxVirtualMachine_write;
|
||||
Java_sun_tools_attach_VirtualMachineImpl_checkPermissions;
|
||||
Java_sun_tools_attach_VirtualMachineImpl_close;
|
||||
Java_sun_tools_attach_VirtualMachineImpl_connect;
|
||||
Java_sun_tools_attach_VirtualMachineImpl_getLinuxThreadsManager;
|
||||
Java_sun_tools_attach_VirtualMachineImpl_isLinuxThreads;
|
||||
Java_sun_tools_attach_VirtualMachineImpl_open;
|
||||
Java_sun_tools_attach_VirtualMachineImpl_sendQuitTo;
|
||||
Java_sun_tools_attach_VirtualMachineImpl_sendQuitToChildrenOf;
|
||||
Java_sun_tools_attach_VirtualMachineImpl_socket;
|
||||
Java_sun_tools_attach_VirtualMachineImpl_read;
|
||||
Java_sun_tools_attach_VirtualMachineImpl_write;
|
||||
local:
|
||||
*;
|
||||
};
|
||||
|
@ -27,12 +27,12 @@
|
||||
|
||||
SUNWprivate_1.1 {
|
||||
global:
|
||||
Java_sun_tools_attach_SolarisVirtualMachine_checkPermissions;
|
||||
Java_sun_tools_attach_SolarisVirtualMachine_enqueue;
|
||||
Java_sun_tools_attach_SolarisVirtualMachine_open;
|
||||
Java_sun_tools_attach_SolarisVirtualMachine_close;
|
||||
Java_sun_tools_attach_SolarisVirtualMachine_read;
|
||||
Java_sun_tools_attach_SolarisVirtualMachine_sigquit;
|
||||
Java_sun_tools_attach_VirtualMachineImpl_checkPermissions;
|
||||
Java_sun_tools_attach_VirtualMachineImpl_enqueue;
|
||||
Java_sun_tools_attach_VirtualMachineImpl_open;
|
||||
Java_sun_tools_attach_VirtualMachineImpl_close;
|
||||
Java_sun_tools_attach_VirtualMachineImpl_read;
|
||||
Java_sun_tools_attach_VirtualMachineImpl_sigquit;
|
||||
local:
|
||||
*;
|
||||
};
|
||||
|
@ -78,13 +78,13 @@ SUNWprivate_1.1 {
|
||||
Java_java_io_FileInputStream_available;
|
||||
Java_java_io_FileInputStream_close0;
|
||||
Java_java_io_FileInputStream_initIDs;
|
||||
Java_java_io_FileInputStream_open;
|
||||
Java_java_io_FileInputStream_open0;
|
||||
Java_java_io_FileInputStream_read0;
|
||||
Java_java_io_FileInputStream_readBytes;
|
||||
Java_java_io_FileInputStream_skip;
|
||||
Java_java_io_FileOutputStream_close0;
|
||||
Java_java_io_FileOutputStream_initIDs;
|
||||
Java_java_io_FileOutputStream_open;
|
||||
Java_java_io_FileOutputStream_open0;
|
||||
Java_java_io_FileOutputStream_write;
|
||||
Java_java_io_FileOutputStream_writeBytes;
|
||||
Java_java_io_ObjectInputStream_bytesToDoubles;
|
||||
@ -97,7 +97,7 @@ SUNWprivate_1.1 {
|
||||
Java_java_io_RandomAccessFile_getFilePointer;
|
||||
Java_java_io_RandomAccessFile_initIDs;
|
||||
Java_java_io_RandomAccessFile_length;
|
||||
Java_java_io_RandomAccessFile_open;
|
||||
Java_java_io_RandomAccessFile_open0;
|
||||
Java_java_io_RandomAccessFile_read0;
|
||||
Java_java_io_RandomAccessFile_readBytes;
|
||||
Java_java_io_RandomAccessFile_seek0;
|
||||
|
@ -44,7 +44,7 @@ text: .text%Java_java_io_UnixFileSystem_initIDs;
|
||||
text: .text%Java_java_io_UnixFileSystem_canonicalize;
|
||||
text: .text%JNU_GetStringPlatformChars;
|
||||
text: .text%JNU_ReleaseStringPlatformChars;
|
||||
text: .text%Java_java_io_FileInputStream_open;
|
||||
text: .text%Java_java_io_FileInputStream_open0;
|
||||
text: .text%fileOpen;
|
||||
text: .text%Java_java_io_FileInputStream_readBytes;
|
||||
text: .text%readBytes;
|
||||
|
@ -47,7 +47,7 @@ text: .text%Java_java_io_UnixFileSystem_initIDs;
|
||||
text: .text%Java_java_io_UnixFileSystem_canonicalize;
|
||||
text: .text%JNU_GetStringPlatformChars;
|
||||
text: .text%JNU_ReleaseStringPlatformChars;
|
||||
text: .text%Java_java_io_FileInputStream_open;
|
||||
text: .text%Java_java_io_FileInputStream_open0;
|
||||
text: .text%fileOpen;
|
||||
text: .text%Java_java_io_FileInputStream_readBytes;
|
||||
text: .text%readBytes;
|
||||
|
@ -57,7 +57,7 @@ text: .text%Java_java_lang_ClassLoader_00024NativeLibrary_load;
|
||||
text: .text%Java_java_lang_ClassLoader_00024NativeLibrary_find;
|
||||
text: .text%Java_java_lang_Float_floatToIntBits;
|
||||
text: .text%Java_java_lang_Double_doubleToLongBits;
|
||||
text: .text%Java_java_io_FileInputStream_open;
|
||||
text: .text%Java_java_io_FileInputStream_open0;
|
||||
text: .text%fileOpen;
|
||||
text: .text%Java_java_io_UnixFileSystem_getLength;
|
||||
text: .text%Java_java_io_FileInputStream_readBytes;
|
||||
@ -90,7 +90,7 @@ text: .text%JNU_NotifyAll;
|
||||
text: .text%JNU_CallMethodByName;
|
||||
text: .text%JNU_CallMethodByNameV;
|
||||
text: .text%Java_java_util_logging_FileHandler_lockFile;
|
||||
text: .text%Java_java_io_FileOutputStream_open;
|
||||
text: .text%Java_java_io_FileOutputStream_open0;
|
||||
text: .text%Java_java_io_UnixFileSystem_createDirectory;
|
||||
text: .text%Java_java_io_UnixFileSystem_getLastModifiedTime;
|
||||
text: .text%Java_java_util_prefs_FileSystemPreferences_lockFile0;
|
||||
|
@ -79,6 +79,7 @@ SUNWprivate_1.1 {
|
||||
Java_sun_nio_ch_InheritedChannel_close0;
|
||||
Java_sun_nio_ch_InheritedChannel_dup;
|
||||
Java_sun_nio_ch_InheritedChannel_dup2;
|
||||
Java_sun_nio_ch_InheritedChannel_initIDs;
|
||||
Java_sun_nio_ch_InheritedChannel_open0;
|
||||
Java_sun_nio_ch_InheritedChannel_peerAddress0;
|
||||
Java_sun_nio_ch_InheritedChannel_peerPort0;
|
||||
|
@ -62,6 +62,7 @@ SUNWprivate_1.1 {
|
||||
Java_sun_nio_ch_InheritedChannel_close0;
|
||||
Java_sun_nio_ch_InheritedChannel_dup;
|
||||
Java_sun_nio_ch_InheritedChannel_dup2;
|
||||
Java_sun_nio_ch_InheritedChannel_initIDs;
|
||||
Java_sun_nio_ch_InheritedChannel_open0;
|
||||
Java_sun_nio_ch_InheritedChannel_peerAddress0;
|
||||
Java_sun_nio_ch_InheritedChannel_peerPort0;
|
||||
|
@ -67,6 +67,7 @@ SUNWprivate_1.1 {
|
||||
Java_sun_nio_ch_InheritedChannel_close0;
|
||||
Java_sun_nio_ch_InheritedChannel_dup;
|
||||
Java_sun_nio_ch_InheritedChannel_dup2;
|
||||
Java_sun_nio_ch_InheritedChannel_initIDs;
|
||||
Java_sun_nio_ch_InheritedChannel_open0;
|
||||
Java_sun_nio_ch_InheritedChannel_peerAddress0;
|
||||
Java_sun_nio_ch_InheritedChannel_peerPort0;
|
||||
|
@ -201,6 +201,7 @@ FULL_JRE_RTJAR_INCLUDE_PACKAGES := \
|
||||
sun/audio \
|
||||
sun/awt \
|
||||
sun/corba \
|
||||
sun/datatransfer \
|
||||
sun/dc \
|
||||
sun/font \
|
||||
sun/java2d \
|
||||
|
@ -1,105 +0,0 @@
|
||||
/*
|
||||
* Copyright (c) 2013, Oracle and/or its affiliates. All rights reserved.
|
||||
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
||||
*
|
||||
* This code is free software; you can redistribute it and/or modify it
|
||||
* under the terms of the GNU General Public License version 2 only, as
|
||||
* published by the Free Software Foundation. Oracle designates this
|
||||
* particular file as subject to the "Classpath" exception as provided
|
||||
* by Oracle in the LICENSE file that accompanied this code.
|
||||
*
|
||||
* This code is distributed in the hope that it will be useful, but WITHOUT
|
||||
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
|
||||
* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
|
||||
* version 2 for more details (a copy is included in the LICENSE file that
|
||||
* accompanied this code).
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License version
|
||||
* 2 along with this work; if not, write to the Free Software Foundation,
|
||||
* Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
|
||||
*
|
||||
* Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
|
||||
* or visit www.oracle.com if you need additional information or have any
|
||||
* questions.
|
||||
*/
|
||||
|
||||
package build.tools.addtorestrictedpkgs;
|
||||
|
||||
import java.io.*;
|
||||
|
||||
/**
|
||||
* Adds additional packages to the package.access and package.definition
|
||||
* security properties.
|
||||
*/
|
||||
public class AddToRestrictedPkgs {
|
||||
|
||||
private static final String PKG_ACC = "package.access";
|
||||
private static final String PKG_DEF = "package.definition";
|
||||
private static final int PKG_ACC_INDENT = 15;
|
||||
private static final int PKG_DEF_INDENT = 19;
|
||||
|
||||
public static void main(String[] args) throws Exception {
|
||||
|
||||
if (args.length < 3) {
|
||||
System.err.println("Usage: java AddToRestrictedPkgs " +
|
||||
"[input java.security file name] " +
|
||||
"[output java.security file name] " +
|
||||
"[packages ...]");
|
||||
System.exit(1);
|
||||
}
|
||||
|
||||
try (FileReader fr = new FileReader(args[0]);
|
||||
BufferedReader br = new BufferedReader(fr);
|
||||
FileWriter fw = new FileWriter(args[1]);
|
||||
BufferedWriter bw = new BufferedWriter(fw))
|
||||
{
|
||||
// parse the file line-by-line, looking for pkg access properties
|
||||
String line = br.readLine();
|
||||
while (line != null) {
|
||||
if (line.startsWith(PKG_ACC)) {
|
||||
writePackages(br, bw, line, PKG_ACC_INDENT, args);
|
||||
} else if (line.startsWith(PKG_DEF)) {
|
||||
writePackages(br, bw, line, PKG_DEF_INDENT, args);
|
||||
} else {
|
||||
writeLine(bw, line);
|
||||
}
|
||||
line = br.readLine();
|
||||
}
|
||||
bw.flush();
|
||||
}
|
||||
}
|
||||
|
||||
private static void writePackages(BufferedReader br, BufferedWriter bw,
|
||||
String line, int numSpaces,
|
||||
String[] args) throws IOException {
|
||||
// parse property until EOL, not including line breaks
|
||||
while (line.endsWith("\\")) {
|
||||
writeLine(bw, line);
|
||||
line = br.readLine();
|
||||
}
|
||||
// append comma and line-break to last package
|
||||
writeLine(bw, line + ",\\");
|
||||
// add new packages, one per line
|
||||
for (int i = 2; i < args.length - 1; i++) {
|
||||
indent(bw, numSpaces);
|
||||
writeLine(bw, args[i] + ",\\");
|
||||
}
|
||||
indent(bw, numSpaces);
|
||||
writeLine(bw, args[args.length - 1]);
|
||||
}
|
||||
|
||||
private static void writeLine(BufferedWriter bw, String line)
|
||||
throws IOException
|
||||
{
|
||||
bw.write(line);
|
||||
bw.newLine();
|
||||
}
|
||||
|
||||
private static void indent(BufferedWriter bw, int numSpaces)
|
||||
throws IOException
|
||||
{
|
||||
for (int i = 0; i < numSpaces; i++) {
|
||||
bw.append(' ');
|
||||
}
|
||||
}
|
||||
}
|
@ -0,0 +1,168 @@
|
||||
/*
|
||||
* Copyright (c) 2013, 2014, Oracle and/or its affiliates. All rights reserved.
|
||||
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
||||
*
|
||||
* This code is free software; you can redistribute it and/or modify it
|
||||
* under the terms of the GNU General Public License version 2 only, as
|
||||
* published by the Free Software Foundation. Oracle designates this
|
||||
* particular file as subject to the "Classpath" exception as provided
|
||||
* by Oracle in the LICENSE file that accompanied this code.
|
||||
*
|
||||
* This code is distributed in the hope that it will be useful, but WITHOUT
|
||||
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
|
||||
* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
|
||||
* version 2 for more details (a copy is included in the LICENSE file that
|
||||
* accompanied this code).
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License version
|
||||
* 2 along with this work; if not, write to the Free Software Foundation,
|
||||
* Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
|
||||
*
|
||||
* Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
|
||||
* or visit www.oracle.com if you need additional information or have any
|
||||
* questions.
|
||||
*/
|
||||
|
||||
package build.tools.makejavasecurity;
|
||||
|
||||
import java.io.*;
|
||||
import java.nio.file.Files;
|
||||
import java.nio.file.Paths;
|
||||
import java.util.*;
|
||||
|
||||
/**
|
||||
* Builds the java.security file, including
|
||||
*
|
||||
* 1. Adds additional packages to the package.access and
|
||||
* package.definition security properties.
|
||||
* 2. Filter out platform-unrelated parts
|
||||
*
|
||||
* In order to easily maintain platform-related entries, every item
|
||||
* (including the last line) in package.access and package.definition
|
||||
* MUST end with ',\'. A blank line MUST exist after the last line.
|
||||
*/
|
||||
public class MakeJavaSecurity {
|
||||
|
||||
private static final String PKG_ACC = "package.access";
|
||||
private static final String PKG_DEF = "package.definition";
|
||||
private static final int PKG_ACC_INDENT = 15;
|
||||
private static final int PKG_DEF_INDENT = 19;
|
||||
|
||||
public static void main(String[] args) throws Exception {
|
||||
|
||||
if (args.length < 3) {
|
||||
System.err.println("Usage: java MakeJavaSecurity " +
|
||||
"[input java.security file name] " +
|
||||
"[output java.security file name] " +
|
||||
"[openjdk target os] " +
|
||||
"[more restricted packages file name?]");
|
||||
System.exit(1);
|
||||
}
|
||||
|
||||
// more restricted packages
|
||||
List<String> extraLines;
|
||||
if (args.length == 4) {
|
||||
extraLines = Files.readAllLines(Paths.get(args[3]));
|
||||
} else {
|
||||
extraLines = Collections.emptyList();
|
||||
}
|
||||
|
||||
List<String> lines = new ArrayList<>();
|
||||
|
||||
// read raw java.security and add more restricted packages
|
||||
try (FileReader fr = new FileReader(args[0]);
|
||||
BufferedReader br = new BufferedReader(fr)) {
|
||||
// looking for pkg access properties
|
||||
String line = br.readLine();
|
||||
while (line != null) {
|
||||
if (line.startsWith(PKG_ACC)) {
|
||||
addPackages(br, lines, line, PKG_ACC_INDENT, extraLines);
|
||||
} else if (line.startsWith(PKG_DEF)) {
|
||||
addPackages(br, lines, line, PKG_DEF_INDENT, extraLines);
|
||||
} else {
|
||||
lines.add(line);
|
||||
}
|
||||
line = br.readLine();
|
||||
}
|
||||
}
|
||||
|
||||
// Filter out platform-unrelated ones. We only support
|
||||
// #ifdef, #ifndef, and #endif.
|
||||
int mode = 0; // 0: out of block, 1: in match, 2: in non-match
|
||||
Iterator<String> iter = lines.iterator();
|
||||
while (iter.hasNext()) {
|
||||
String line = iter.next();
|
||||
if (line.startsWith("#endif")) {
|
||||
mode = 0;
|
||||
iter.remove();
|
||||
} else if (line.startsWith("#ifdef ")) {
|
||||
mode = line.endsWith(args[2])?1:2;
|
||||
iter.remove();
|
||||
} else if (line.startsWith("#ifndef ")) {
|
||||
mode = line.endsWith(args[2])?2:1;
|
||||
iter.remove();
|
||||
} else {
|
||||
if (mode == 2) iter.remove();
|
||||
}
|
||||
}
|
||||
|
||||
// Update .tbd to .1, .2, etc.
|
||||
Map<String,Integer> count = new HashMap<>();
|
||||
for (int i=0; i<lines.size(); i++) {
|
||||
String line = lines.get(i);
|
||||
int index = line.indexOf(".tbd");
|
||||
if (index >= 0) {
|
||||
String prefix = line.substring(0, index);
|
||||
int n = count.getOrDefault(prefix, 1);
|
||||
count.put(prefix, n+1);
|
||||
lines.set(i, prefix + "." + n + line.substring(index+4));
|
||||
}
|
||||
}
|
||||
|
||||
// Clean up the last line of PKG_ACC and PKG_DEF blocks.
|
||||
// Not really necessary since a blank line follows.
|
||||
boolean inBlock = false;
|
||||
for (int i=0; i<lines.size(); i++) {
|
||||
String line = lines.get(i);
|
||||
if (line.startsWith(PKG_ACC) || line.startsWith(PKG_DEF)) {
|
||||
inBlock = true;
|
||||
}
|
||||
if (inBlock) {
|
||||
if (line.isEmpty()) {
|
||||
String lastLine = lines.get(i-1);
|
||||
lines.set(i-1, lastLine.substring(0, lastLine.length()-2));
|
||||
inBlock = false;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Files.write(Paths.get(args[1]), lines);
|
||||
}
|
||||
|
||||
private static void addPackages(BufferedReader br, List<String> lines,
|
||||
String line, int numSpaces,
|
||||
List<String> args) throws IOException {
|
||||
// parse property until EOL, not including line breaks
|
||||
boolean first = true;
|
||||
while (!line.isEmpty()) {
|
||||
if (!line.startsWith("#")) {
|
||||
if (!line.endsWith(",\\") ||
|
||||
(!first && line.contains("="))) {
|
||||
throw new IOException("Invalid line: " + line);
|
||||
}
|
||||
}
|
||||
lines.add(line);
|
||||
line = br.readLine();
|
||||
first = false;
|
||||
}
|
||||
// add new packages, one per line
|
||||
for (String arg: args) {
|
||||
if (arg.startsWith("#")) {
|
||||
lines.add(arg);
|
||||
} else {
|
||||
lines.add(String.format("%"+numSpaces+"s", "") + arg + ",\\");
|
||||
}
|
||||
}
|
||||
lines.add(line);
|
||||
}
|
||||
}
|
@ -25,6 +25,7 @@
|
||||
|
||||
package build.tools.module;
|
||||
|
||||
import java.io.BufferedInputStream;
|
||||
import java.io.File;
|
||||
import java.io.IOException;
|
||||
import java.io.InputStream;
|
||||
@ -49,47 +50,56 @@ import javax.xml.stream.events.Attribute;
|
||||
import javax.xml.stream.events.XMLEvent;
|
||||
|
||||
/**
|
||||
* This tool is used to generate com/sun/tools/jdeps/resources/modules.xml
|
||||
* for jdeps to analyze dependencies and enforce module boundaries.
|
||||
* GenJdepsModulesXml augments the input modules.xml file(s)
|
||||
* to include the module membership from the given path to
|
||||
* the JDK exploded image. The output file is used by jdeps
|
||||
* to analyze dependencies and enforce module boundaries.
|
||||
*
|
||||
* $ java build.tools.module.GenerateModulesXml \
|
||||
* com/sun/tools/jdeps/resources/modules.xml $OUTPUTDIR/modules
|
||||
* The input modules.xml file defines the modular structure of
|
||||
* the JDK as described in JEP 200: The Modular JDK
|
||||
* (http://openjdk.java.net/jeps/200).
|
||||
*
|
||||
* This will generate modules.xml as jdeps resources that extend
|
||||
* the metadata to include module membership (jdeps needs the
|
||||
* membership information to determine which module a type belongs to.)
|
||||
* $ java build.tools.module.GenJdepsModulesXml \
|
||||
* -o com/sun/tools/jdeps/resources/modules.xml \
|
||||
* -mp $OUTPUTDIR/modules \
|
||||
* top/modules.xml
|
||||
*/
|
||||
public final class GenerateModulesXml {
|
||||
public final class GenJdepsModulesXml {
|
||||
private final static String USAGE =
|
||||
"Usage: GenerateModulesXml <output file> build/modules";
|
||||
"Usage: GenJdepsModulesXml -o <output file> -mp build/modules path-to-modules-xml";
|
||||
|
||||
public static void main(String[] args) throws Exception {
|
||||
if (args.length < 2) {
|
||||
Path outfile = null;
|
||||
Path modulepath = null;
|
||||
int i = 0;
|
||||
while (i < args.length) {
|
||||
String arg = args[i];
|
||||
if (arg.equals("-o")) {
|
||||
outfile = Paths.get(args[i+1]);
|
||||
i = i+2;
|
||||
} else if (arg.equals("-mp")) {
|
||||
modulepath = Paths.get(args[i+1]);
|
||||
i = i+2;
|
||||
if (!Files.isDirectory(modulepath)) {
|
||||
System.err.println(modulepath + " is not a directory");
|
||||
System.exit(1);
|
||||
}
|
||||
} else {
|
||||
break;
|
||||
}
|
||||
}
|
||||
if (outfile == null || modulepath == null || i >= args.length) {
|
||||
System.err.println(USAGE);
|
||||
System.exit(-1);
|
||||
}
|
||||
|
||||
Path outfile = Paths.get(args[0]);
|
||||
Path modulepath = Paths.get(args[1]);
|
||||
|
||||
if (!Files.isDirectory(modulepath)) {
|
||||
System.err.println(modulepath + " is not a directory");
|
||||
System.exit(1);
|
||||
}
|
||||
GenerateModulesXml gentool =
|
||||
new GenerateModulesXml(modulepath);
|
||||
Set<Module> modules;
|
||||
try (InputStream in = GenerateModulesXml.class.getResourceAsStream("modules.xml")) {
|
||||
modules = gentool.load(in);
|
||||
}
|
||||
|
||||
InputStream in = GenerateModulesXml.class.getResourceAsStream("closed/modules.xml");
|
||||
if (in != null) {
|
||||
try {
|
||||
GenJdepsModulesXml gentool = new GenJdepsModulesXml(modulepath);
|
||||
Set<Module> modules = new HashSet<>();
|
||||
for (; i < args.length; i++) {
|
||||
Path p = Paths.get(args[i]);
|
||||
try (InputStream in = new BufferedInputStream(Files.newInputStream(p))) {
|
||||
Set<Module> mods = gentool.load(in);
|
||||
modules.addAll(mods);
|
||||
} finally {
|
||||
in.close();
|
||||
}
|
||||
}
|
||||
|
||||
@ -98,7 +108,7 @@ public final class GenerateModulesXml {
|
||||
}
|
||||
|
||||
final Path modulepath;
|
||||
public GenerateModulesXml(Path modulepath) {
|
||||
public GenJdepsModulesXml(Path modulepath) {
|
||||
this.modulepath = modulepath;
|
||||
}
|
||||
|
||||
@ -275,7 +285,7 @@ public final class GenerateModulesXml {
|
||||
m.exports().keySet().stream()
|
||||
.filter(pn -> m.exports().get(pn).isEmpty())
|
||||
.sorted()
|
||||
.forEach(pn -> GenerateModulesXml.this.writeExportElement(xtw, pn, depth+1));
|
||||
.forEach(pn -> writeExportElement(xtw, pn, depth+1));
|
||||
m.exports().entrySet().stream()
|
||||
.filter(e -> !e.getValue().isEmpty())
|
||||
.sorted(Map.Entry.comparingByKey())
|
@ -1 +0,0 @@
|
||||
string=This is Java 2D! (Default)
|
@ -1 +0,0 @@
|
||||
string=This is Java 2D! (German) \u00f6 \u00df \u00dc
|
@ -1 +0,0 @@
|
||||
string=This is Java 2D! (English) A B C
|
@ -1 +0,0 @@
|
||||
string=This is Java 2D! (English in Great Britain) \u0075 \u006b Z
|
@ -1 +0,0 @@
|
||||
string=Java 2D\u3067\u3059\u3002(\u30C7\u30D5\u30A9\u30EB\u30C8)
|
@ -1 +0,0 @@
|
||||
string=This is Java 2D! (Korean)
|
@ -1 +0,0 @@
|
||||
string=\u8FD9\u662F Java 2D! (\u9ED8\u8BA4\u503C)
|
@ -1,5 +0,0 @@
|
||||
en US
|
||||
en GB
|
||||
ko KO
|
||||
ab KO
|
||||
de DE
|
@ -1,3 +0,0 @@
|
||||
Please refer to the documentation in:
|
||||
|
||||
doc/index.html
|
@ -1,67 +0,0 @@
|
||||
/*
|
||||
* Copyright (c) 1999, 2011, Oracle and/or its affiliates. All rights reserved.
|
||||
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
||||
*
|
||||
* This code is free software; you can redistribute it and/or modify it
|
||||
* under the terms of the GNU General Public License version 2 only, as
|
||||
* published by the Free Software Foundation. Oracle designates this
|
||||
* particular file as subject to the "Classpath" exception as provided
|
||||
* by Oracle in the LICENSE file that accompanied this code.
|
||||
*
|
||||
* This code is distributed in the hope that it will be useful, but WITHOUT
|
||||
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
|
||||
* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
|
||||
* version 2 for more details (a copy is included in the LICENSE file that
|
||||
* accompanied this code).
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License version
|
||||
* 2 along with this work; if not, write to the Free Software Foundation,
|
||||
* Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
|
||||
*
|
||||
* Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
|
||||
* or visit www.oracle.com if you need additional information or have any
|
||||
* questions.
|
||||
*/
|
||||
|
||||
/*
|
||||
* This source code is provided to illustrate the usage of a given feature
|
||||
* or technique and has been deliberately simplified. Additional steps
|
||||
* required for a production-quality application, such as security checks,
|
||||
* input validation and proper error handling, might not be present in
|
||||
* this sample code.
|
||||
*/
|
||||
|
||||
|
||||
package com.sun.tools.example.debug.bdi;
|
||||
|
||||
import com.sun.jdi.*;
|
||||
|
||||
public class AccessWatchpointSpec extends WatchpointSpec {
|
||||
|
||||
AccessWatchpointSpec(EventRequestSpecList specs,
|
||||
ReferenceTypeSpec refSpec, String fieldId) {
|
||||
super(specs, refSpec, fieldId);
|
||||
}
|
||||
|
||||
/**
|
||||
* The 'refType' is known to match.
|
||||
*/
|
||||
@Override
|
||||
void resolve(ReferenceType refType) throws InvalidTypeException,
|
||||
NoSuchFieldException {
|
||||
if (!(refType instanceof ClassType)) {
|
||||
throw new InvalidTypeException();
|
||||
}
|
||||
Field field = refType.fieldByName(fieldId);
|
||||
if (field == null) {
|
||||
throw new NoSuchFieldException(fieldId);
|
||||
}
|
||||
setRequest(refType.virtualMachine().eventRequestManager()
|
||||
.createAccessWatchpointRequest(field));
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean equals(Object obj) {
|
||||
return (obj instanceof AccessWatchpointSpec) && super.equals(obj);
|
||||
}
|
||||
}
|
@ -1,51 +0,0 @@
|
||||
/*
|
||||
* Copyright (c) 1998, 2011, Oracle and/or its affiliates. All rights reserved.
|
||||
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
||||
*
|
||||
* This code is free software; you can redistribute it and/or modify it
|
||||
* under the terms of the GNU General Public License version 2 only, as
|
||||
* published by the Free Software Foundation. Oracle designates this
|
||||
* particular file as subject to the "Classpath" exception as provided
|
||||
* by Oracle in the LICENSE file that accompanied this code.
|
||||
*
|
||||
* This code is distributed in the hope that it will be useful, but WITHOUT
|
||||
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
|
||||
* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
|
||||
* version 2 for more details (a copy is included in the LICENSE file that
|
||||
* accompanied this code).
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License version
|
||||
* 2 along with this work; if not, write to the Free Software Foundation,
|
||||
* Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
|
||||
*
|
||||
* Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
|
||||
* or visit www.oracle.com if you need additional information or have any
|
||||
* questions.
|
||||
*/
|
||||
|
||||
/*
|
||||
* This source code is provided to illustrate the usage of a given feature
|
||||
* or technique and has been deliberately simplified. Additional steps
|
||||
* required for a production-quality application, such as security checks,
|
||||
* input validation and proper error handling, might not be present in
|
||||
* this sample code.
|
||||
*/
|
||||
|
||||
|
||||
package com.sun.tools.example.debug.bdi;
|
||||
|
||||
public class AmbiguousMethodException extends Exception
|
||||
{
|
||||
|
||||
private static final long serialVersionUID = 7793370943251707514L;
|
||||
|
||||
public AmbiguousMethodException()
|
||||
{
|
||||
super();
|
||||
}
|
||||
|
||||
public AmbiguousMethodException(String s)
|
||||
{
|
||||
super(s);
|
||||
}
|
||||
}
|
@ -1,67 +0,0 @@
|
||||
/*
|
||||
* Copyright (c) 1999, 2011, Oracle and/or its affiliates. All rights reserved.
|
||||
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
||||
*
|
||||
* This code is free software; you can redistribute it and/or modify it
|
||||
* under the terms of the GNU General Public License version 2 only, as
|
||||
* published by the Free Software Foundation. Oracle designates this
|
||||
* particular file as subject to the "Classpath" exception as provided
|
||||
* by Oracle in the LICENSE file that accompanied this code.
|
||||
*
|
||||
* This code is distributed in the hope that it will be useful, but WITHOUT
|
||||
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
|
||||
* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
|
||||
* version 2 for more details (a copy is included in the LICENSE file that
|
||||
* accompanied this code).
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License version
|
||||
* 2 along with this work; if not, write to the Free Software Foundation,
|
||||
* Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
|
||||
*
|
||||
* Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
|
||||
* or visit www.oracle.com if you need additional information or have any
|
||||
* questions.
|
||||
*/
|
||||
|
||||
/*
|
||||
* This source code is provided to illustrate the usage of a given feature
|
||||
* or technique and has been deliberately simplified. Additional steps
|
||||
* required for a production-quality application, such as security checks,
|
||||
* input validation and proper error handling, might not be present in
|
||||
* this sample code.
|
||||
*/
|
||||
|
||||
|
||||
package com.sun.tools.example.debug.bdi;
|
||||
|
||||
public abstract class BreakpointSpec extends EventRequestSpec {
|
||||
|
||||
BreakpointSpec(EventRequestSpecList specs, ReferenceTypeSpec refSpec) {
|
||||
super(specs, refSpec);
|
||||
}
|
||||
|
||||
@Override
|
||||
void notifySet(SpecListener listener, SpecEvent evt) {
|
||||
listener.breakpointSet(evt);
|
||||
}
|
||||
|
||||
@Override
|
||||
void notifyDeferred(SpecListener listener, SpecEvent evt) {
|
||||
listener.breakpointDeferred(evt);
|
||||
}
|
||||
|
||||
@Override
|
||||
void notifyResolved(SpecListener listener, SpecEvent evt) {
|
||||
listener.breakpointResolved(evt);
|
||||
}
|
||||
|
||||
@Override
|
||||
void notifyDeleted(SpecListener listener, SpecEvent evt) {
|
||||
listener.breakpointDeleted(evt);
|
||||
}
|
||||
|
||||
@Override
|
||||
void notifyError(SpecListener listener, SpecErrorEvent evt) {
|
||||
listener.breakpointError(evt);
|
||||
}
|
||||
}
|
@ -1,309 +0,0 @@
|
||||
/*
|
||||
* Copyright (c) 1998, 2011, Oracle and/or its affiliates. All rights reserved.
|
||||
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
||||
*
|
||||
* This code is free software; you can redistribute it and/or modify it
|
||||
* under the terms of the GNU General Public License version 2 only, as
|
||||
* published by the Free Software Foundation. Oracle designates this
|
||||
* particular file as subject to the "Classpath" exception as provided
|
||||
* by Oracle in the LICENSE file that accompanied this code.
|
||||
*
|
||||
* This code is distributed in the hope that it will be useful, but WITHOUT
|
||||
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
|
||||
* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
|
||||
* version 2 for more details (a copy is included in the LICENSE file that
|
||||
* accompanied this code).
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License version
|
||||
* 2 along with this work; if not, write to the Free Software Foundation,
|
||||
* Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
|
||||
*
|
||||
* Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
|
||||
* or visit www.oracle.com if you need additional information or have any
|
||||
* questions.
|
||||
*/
|
||||
|
||||
/*
|
||||
* This source code is provided to illustrate the usage of a given feature
|
||||
* or technique and has been deliberately simplified. Additional steps
|
||||
* required for a production-quality application, such as security checks,
|
||||
* input validation and proper error handling, might not be present in
|
||||
* this sample code.
|
||||
*/
|
||||
|
||||
|
||||
package com.sun.tools.example.debug.bdi;
|
||||
|
||||
import com.sun.jdi.*;
|
||||
import com.sun.jdi.connect.LaunchingConnector;
|
||||
import com.sun.jdi.connect.Connector;
|
||||
import com.sun.jdi.connect.VMStartException;
|
||||
import com.sun.jdi.connect.IllegalConnectorArgumentsException;
|
||||
import java.io.*;
|
||||
import java.util.Map;
|
||||
import javax.swing.SwingUtilities;
|
||||
|
||||
|
||||
class ChildSession extends Session {
|
||||
|
||||
private Process process;
|
||||
|
||||
private PrintWriter in;
|
||||
private BufferedReader out;
|
||||
private BufferedReader err;
|
||||
|
||||
private InputListener input;
|
||||
private OutputListener output;
|
||||
private OutputListener error;
|
||||
|
||||
public ChildSession(ExecutionManager runtime,
|
||||
String userVMArgs, String cmdLine,
|
||||
InputListener input,
|
||||
OutputListener output,
|
||||
OutputListener error,
|
||||
OutputListener diagnostics) {
|
||||
this(runtime, getVM(diagnostics, userVMArgs, cmdLine),
|
||||
input, output, error, diagnostics);
|
||||
}
|
||||
|
||||
public ChildSession(ExecutionManager runtime,
|
||||
LaunchingConnector connector,
|
||||
Map<String, Connector.Argument> arguments,
|
||||
InputListener input,
|
||||
OutputListener output,
|
||||
OutputListener error,
|
||||
OutputListener diagnostics) {
|
||||
this(runtime, generalGetVM(diagnostics, connector, arguments),
|
||||
input, output, error, diagnostics);
|
||||
}
|
||||
|
||||
private ChildSession(ExecutionManager runtime,
|
||||
VirtualMachine vm,
|
||||
InputListener input,
|
||||
OutputListener output,
|
||||
OutputListener error,
|
||||
OutputListener diagnostics) {
|
||||
super(vm, runtime, diagnostics);
|
||||
this.input = input;
|
||||
this.output = output;
|
||||
this.error = error;
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean attach() {
|
||||
|
||||
if (!connectToVMProcess()) {
|
||||
diagnostics.putString("Could not launch VM");
|
||||
return false;
|
||||
}
|
||||
|
||||
/*
|
||||
* Create a Thread that will retrieve and display any output.
|
||||
* Needs to be high priority, else debugger may exit before
|
||||
* it can be displayed.
|
||||
*/
|
||||
|
||||
//### Rename InputWriter and OutputReader classes
|
||||
//### Thread priorities cribbed from ttydebug. Think about them.
|
||||
|
||||
OutputReader outputReader =
|
||||
new OutputReader("output reader", "output",
|
||||
out, output, diagnostics);
|
||||
outputReader.setPriority(Thread.MAX_PRIORITY-1);
|
||||
outputReader.start();
|
||||
|
||||
OutputReader errorReader =
|
||||
new OutputReader("error reader", "error",
|
||||
err, error, diagnostics);
|
||||
errorReader.setPriority(Thread.MAX_PRIORITY-1);
|
||||
errorReader.start();
|
||||
|
||||
InputWriter inputWriter =
|
||||
new InputWriter("input writer", in, input);
|
||||
inputWriter.setPriority(Thread.MAX_PRIORITY-1);
|
||||
inputWriter.start();
|
||||
|
||||
if (!super.attach()) {
|
||||
if (process != null) {
|
||||
process.destroy();
|
||||
process = null;
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
//### debug
|
||||
//System.out.println("IO after attach: "+ inputWriter + " " + outputReader + " "+ errorReader);
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void detach() {
|
||||
|
||||
//### debug
|
||||
//System.out.println("IO before detach: "+ inputWriter + " " + outputReader + " "+ errorReader);
|
||||
|
||||
super.detach();
|
||||
|
||||
/*
|
||||
inputWriter.quit();
|
||||
outputReader.quit();
|
||||
errorReader.quit();
|
||||
*/
|
||||
|
||||
if (process != null) {
|
||||
process.destroy();
|
||||
process = null;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
/**
|
||||
* Launch child java interpreter, return host:port
|
||||
*/
|
||||
|
||||
static private void dumpStream(OutputListener diagnostics,
|
||||
InputStream stream) throws IOException {
|
||||
BufferedReader in =
|
||||
new BufferedReader(new InputStreamReader(stream));
|
||||
String line;
|
||||
while ((line = in.readLine()) != null) {
|
||||
diagnostics.putString(line);
|
||||
}
|
||||
}
|
||||
|
||||
static private void dumpFailedLaunchInfo(OutputListener diagnostics,
|
||||
Process process) {
|
||||
try {
|
||||
dumpStream(diagnostics, process.getErrorStream());
|
||||
dumpStream(diagnostics, process.getInputStream());
|
||||
} catch (IOException e) {
|
||||
diagnostics.putString("Unable to display process output: " +
|
||||
e.getMessage());
|
||||
}
|
||||
}
|
||||
|
||||
static private VirtualMachine getVM(OutputListener diagnostics,
|
||||
String userVMArgs,
|
||||
String cmdLine) {
|
||||
VirtualMachineManager manager = Bootstrap.virtualMachineManager();
|
||||
LaunchingConnector connector = manager.defaultConnector();
|
||||
Map<String, Connector.Argument> arguments = connector.defaultArguments();
|
||||
arguments.get("options").setValue(userVMArgs);
|
||||
arguments.get("main").setValue(cmdLine);
|
||||
return generalGetVM(diagnostics, connector, arguments);
|
||||
}
|
||||
|
||||
static private VirtualMachine generalGetVM(OutputListener diagnostics,
|
||||
LaunchingConnector connector,
|
||||
Map<String, Connector.Argument> arguments) {
|
||||
VirtualMachine vm = null;
|
||||
try {
|
||||
diagnostics.putString("Starting child.");
|
||||
vm = connector.launch(arguments);
|
||||
} catch (IOException ioe) {
|
||||
diagnostics.putString("Unable to start child: " + ioe.getMessage());
|
||||
} catch (IllegalConnectorArgumentsException icae) {
|
||||
diagnostics.putString("Unable to start child: " + icae.getMessage());
|
||||
} catch (VMStartException vmse) {
|
||||
diagnostics.putString("Unable to start child: " + vmse.getMessage() + '\n');
|
||||
dumpFailedLaunchInfo(diagnostics, vmse.process());
|
||||
}
|
||||
return vm;
|
||||
}
|
||||
|
||||
private boolean connectToVMProcess() {
|
||||
if (vm == null) {
|
||||
return false;
|
||||
}
|
||||
process = vm.process();
|
||||
in = new PrintWriter(new OutputStreamWriter(process.getOutputStream()));
|
||||
//### Note small buffer sizes!
|
||||
out = new BufferedReader(new InputStreamReader(process.getInputStream()), 1);
|
||||
err = new BufferedReader(new InputStreamReader(process.getErrorStream()), 1);
|
||||
return true;
|
||||
}
|
||||
|
||||
/**
|
||||
* Threads to handle application input/output.
|
||||
*/
|
||||
|
||||
private static class OutputReader extends Thread {
|
||||
|
||||
private String streamName;
|
||||
private BufferedReader stream;
|
||||
private OutputListener output;
|
||||
private OutputListener diagnostics;
|
||||
private boolean running = true;
|
||||
private char[] buffer = new char[512];
|
||||
|
||||
OutputReader(String threadName,
|
||||
String streamName,
|
||||
BufferedReader stream,
|
||||
OutputListener output,
|
||||
OutputListener diagnostics) {
|
||||
super(threadName);
|
||||
this.streamName = streamName;
|
||||
this.stream = stream;
|
||||
this.output = output;
|
||||
this.diagnostics = diagnostics;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void run() {
|
||||
try {
|
||||
int count;
|
||||
while (running && (count = stream.read(buffer, 0, 512)) != -1) {
|
||||
if (count > 0) {
|
||||
// Run in Swing event dispatcher thread.
|
||||
final String chars = new String(buffer, 0, count);
|
||||
SwingUtilities.invokeLater(new Runnable() {
|
||||
@Override
|
||||
public void run() {
|
||||
output.putString(chars);
|
||||
}
|
||||
});
|
||||
}
|
||||
//### Should we sleep briefly here?
|
||||
}
|
||||
} catch (IOException e) {
|
||||
// Run in Swing event dispatcher thread.
|
||||
SwingUtilities.invokeLater(new Runnable() {
|
||||
@Override
|
||||
public void run() {
|
||||
diagnostics.putString("IO error reading " +
|
||||
streamName +
|
||||
" stream of child java interpreter");
|
||||
}
|
||||
});
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
private static class InputWriter extends Thread {
|
||||
|
||||
private PrintWriter stream;
|
||||
private InputListener input;
|
||||
private boolean running = true;
|
||||
|
||||
InputWriter(String threadName,
|
||||
PrintWriter stream,
|
||||
InputListener input) {
|
||||
super(threadName);
|
||||
this.stream = stream;
|
||||
this.input = input;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void run() {
|
||||
String line;
|
||||
while (running) {
|
||||
line = input.getLine();
|
||||
stream.println(line);
|
||||
// Should not be needed for println above!
|
||||
stream.flush();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
}
|
@ -1,168 +0,0 @@
|
||||
/*
|
||||
* Copyright (c) 1999, 2011, Oracle and/or its affiliates. All rights reserved.
|
||||
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
||||
*
|
||||
* This code is free software; you can redistribute it and/or modify it
|
||||
* under the terms of the GNU General Public License version 2 only, as
|
||||
* published by the Free Software Foundation. Oracle designates this
|
||||
* particular file as subject to the "Classpath" exception as provided
|
||||
* by Oracle in the LICENSE file that accompanied this code.
|
||||
*
|
||||
* This code is distributed in the hope that it will be useful, but WITHOUT
|
||||
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
|
||||
* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
|
||||
* version 2 for more details (a copy is included in the LICENSE file that
|
||||
* accompanied this code).
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License version
|
||||
* 2 along with this work; if not, write to the Free Software Foundation,
|
||||
* Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
|
||||
*
|
||||
* Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
|
||||
* or visit www.oracle.com if you need additional information or have any
|
||||
* questions.
|
||||
*/
|
||||
|
||||
/*
|
||||
* This source code is provided to illustrate the usage of a given feature
|
||||
* or technique and has been deliberately simplified. Additional steps
|
||||
* required for a production-quality application, such as security checks,
|
||||
* input validation and proper error handling, might not be present in
|
||||
* this sample code.
|
||||
*/
|
||||
|
||||
|
||||
package com.sun.tools.example.debug.bdi;
|
||||
|
||||
import com.sun.jdi.*;
|
||||
import com.sun.jdi.request.EventRequest;
|
||||
|
||||
abstract public class EventRequestSpec {
|
||||
|
||||
static final int STATUS_UNRESOLVED = 1;
|
||||
static final int STATUS_RESOLVED = 2;
|
||||
static final int STATUS_ERROR = 3;
|
||||
|
||||
static final Object specPropertyKey = "spec";
|
||||
|
||||
final EventRequestSpecList specs;
|
||||
final ReferenceTypeSpec refSpec;
|
||||
EventRequest request = null;
|
||||
|
||||
int status = STATUS_UNRESOLVED;
|
||||
|
||||
EventRequestSpec(EventRequestSpecList specs, ReferenceTypeSpec refSpec) {
|
||||
this.specs = specs;
|
||||
this.refSpec = refSpec;
|
||||
}
|
||||
|
||||
void setRequest(EventRequest request) {
|
||||
this.request = request;
|
||||
request.putProperty(specPropertyKey, this);
|
||||
request.enable();
|
||||
}
|
||||
|
||||
/**
|
||||
* The 'refType' is known to match.
|
||||
*/
|
||||
abstract void resolve(ReferenceType refType) throws Exception;
|
||||
|
||||
abstract void notifySet(SpecListener listener, SpecEvent evt);
|
||||
abstract void notifyDeferred(SpecListener listener, SpecEvent evt);
|
||||
abstract void notifyResolved(SpecListener listener, SpecEvent evt);
|
||||
abstract void notifyDeleted(SpecListener listener, SpecEvent evt);
|
||||
abstract void notifyError(SpecListener listener, SpecErrorEvent evt);
|
||||
|
||||
/**
|
||||
* The 'refType' is known to match.
|
||||
*/
|
||||
void resolveNotify(ReferenceType refType) {
|
||||
try {
|
||||
resolve(refType);
|
||||
status = STATUS_RESOLVED;
|
||||
specs.notifyResolved(this);
|
||||
} catch(Exception exc) {
|
||||
status = STATUS_ERROR;
|
||||
specs.notifyError(this, exc);
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* See if 'refType' matches and resolve.
|
||||
*/
|
||||
void attemptResolve(ReferenceType refType) {
|
||||
if (!isResolved() && refSpec.matches(refType)) {
|
||||
resolveNotify(refType);
|
||||
}
|
||||
}
|
||||
|
||||
void attemptImmediateResolve(VirtualMachine vm) {
|
||||
// try to resolve immediately
|
||||
for (ReferenceType refType : vm.allClasses()) {
|
||||
if (refSpec.matches(refType)) {
|
||||
try {
|
||||
resolve(refType);
|
||||
status = STATUS_RESOLVED;
|
||||
specs.notifySet(this);
|
||||
} catch(Exception exc) {
|
||||
status = STATUS_ERROR;
|
||||
specs.notifyError(this, exc);
|
||||
}
|
||||
return;
|
||||
}
|
||||
}
|
||||
specs.notifyDeferred(this);
|
||||
}
|
||||
|
||||
public EventRequest getEventRequest() {
|
||||
return request;
|
||||
}
|
||||
|
||||
/**
|
||||
* @return true if this spec has been resolved.
|
||||
*/
|
||||
public boolean isResolved() {
|
||||
return status == STATUS_RESOLVED;
|
||||
}
|
||||
|
||||
/**
|
||||
* @return true if this spec has not yet been resolved.
|
||||
*/
|
||||
public boolean isUnresolved() {
|
||||
return status == STATUS_UNRESOLVED;
|
||||
}
|
||||
|
||||
/**
|
||||
* @return true if this spec is unresolvable due to error.
|
||||
*/
|
||||
public boolean isErroneous() {
|
||||
return status == STATUS_ERROR;
|
||||
}
|
||||
|
||||
public String getStatusString() {
|
||||
switch (status) {
|
||||
case STATUS_RESOLVED:
|
||||
return "resolved";
|
||||
case STATUS_UNRESOLVED:
|
||||
return "deferred";
|
||||
case STATUS_ERROR:
|
||||
return "erroneous";
|
||||
}
|
||||
return "unknown";
|
||||
}
|
||||
|
||||
boolean isJavaIdentifier(String s) {
|
||||
return Utils.isJavaIdentifier(s);
|
||||
}
|
||||
|
||||
public String errorMessageFor(Exception e) {
|
||||
if (e instanceof IllegalArgumentException) {
|
||||
return ("Invalid command syntax");
|
||||
} else if (e instanceof RuntimeException) {
|
||||
// A runtime exception that we were not expecting
|
||||
throw (RuntimeException)e;
|
||||
} else {
|
||||
return ("Internal error; unable to set" + this);
|
||||
}
|
||||
}
|
||||
}
|
@ -1,187 +0,0 @@
|
||||
/*
|
||||
* Copyright (c) 1999, 2011, Oracle and/or its affiliates. All rights reserved.
|
||||
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
||||
*
|
||||
* This code is free software; you can redistribute it and/or modify it
|
||||
* under the terms of the GNU General Public License version 2 only, as
|
||||
* published by the Free Software Foundation. Oracle designates this
|
||||
* particular file as subject to the "Classpath" exception as provided
|
||||
* by Oracle in the LICENSE file that accompanied this code.
|
||||
*
|
||||
* This code is distributed in the hope that it will be useful, but WITHOUT
|
||||
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
|
||||
* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
|
||||
* version 2 for more details (a copy is included in the LICENSE file that
|
||||
* accompanied this code).
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License version
|
||||
* 2 along with this work; if not, write to the Free Software Foundation,
|
||||
* Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
|
||||
*
|
||||
* Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
|
||||
* or visit www.oracle.com if you need additional information or have any
|
||||
* questions.
|
||||
*/
|
||||
|
||||
/*
|
||||
* This source code is provided to illustrate the usage of a given feature
|
||||
* or technique and has been deliberately simplified. Additional steps
|
||||
* required for a production-quality application, such as security checks,
|
||||
* input validation and proper error handling, might not be present in
|
||||
* this sample code.
|
||||
*/
|
||||
|
||||
|
||||
package com.sun.tools.example.debug.bdi;
|
||||
|
||||
import com.sun.jdi.*;
|
||||
import com.sun.jdi.request.*;
|
||||
|
||||
import java.util.*;
|
||||
|
||||
class EventRequestSpecList {
|
||||
|
||||
// all specs
|
||||
private List<EventRequestSpec> eventRequestSpecs = Collections.synchronizedList(
|
||||
new ArrayList<EventRequestSpec>());
|
||||
|
||||
final ExecutionManager runtime;
|
||||
|
||||
EventRequestSpecList(ExecutionManager runtime) {
|
||||
this.runtime = runtime;
|
||||
}
|
||||
|
||||
/**
|
||||
* Resolve all deferred eventRequests waiting for 'refType'.
|
||||
*/
|
||||
void resolve(ReferenceType refType) {
|
||||
synchronized(eventRequestSpecs) {
|
||||
for (EventRequestSpec spec : eventRequestSpecs) {
|
||||
spec.attemptResolve(refType);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
void install(EventRequestSpec ers, VirtualMachine vm) {
|
||||
synchronized (eventRequestSpecs) {
|
||||
eventRequestSpecs.add(ers);
|
||||
}
|
||||
if (vm != null) {
|
||||
ers.attemptImmediateResolve(vm);
|
||||
}
|
||||
}
|
||||
|
||||
BreakpointSpec
|
||||
createClassLineBreakpoint(String classPattern, int line) {
|
||||
ReferenceTypeSpec refSpec =
|
||||
new PatternReferenceTypeSpec(classPattern);
|
||||
return new LineBreakpointSpec(this, refSpec, line);
|
||||
}
|
||||
|
||||
BreakpointSpec
|
||||
createSourceLineBreakpoint(String sourceName, int line) {
|
||||
ReferenceTypeSpec refSpec =
|
||||
new SourceNameReferenceTypeSpec(sourceName, line);
|
||||
return new LineBreakpointSpec(this, refSpec, line);
|
||||
}
|
||||
|
||||
BreakpointSpec
|
||||
createMethodBreakpoint(String classPattern,
|
||||
String methodId, List<String> methodArgs) {
|
||||
ReferenceTypeSpec refSpec =
|
||||
new PatternReferenceTypeSpec(classPattern);
|
||||
return new MethodBreakpointSpec(this, refSpec,
|
||||
methodId, methodArgs);
|
||||
}
|
||||
|
||||
ExceptionSpec
|
||||
createExceptionIntercept(String classPattern,
|
||||
boolean notifyCaught,
|
||||
boolean notifyUncaught) {
|
||||
ReferenceTypeSpec refSpec =
|
||||
new PatternReferenceTypeSpec(classPattern);
|
||||
return new ExceptionSpec(this, refSpec,
|
||||
notifyCaught, notifyUncaught);
|
||||
}
|
||||
|
||||
AccessWatchpointSpec
|
||||
createAccessWatchpoint(String classPattern, String fieldId) {
|
||||
ReferenceTypeSpec refSpec =
|
||||
new PatternReferenceTypeSpec(classPattern);
|
||||
return new AccessWatchpointSpec(this, refSpec, fieldId);
|
||||
}
|
||||
|
||||
ModificationWatchpointSpec
|
||||
createModificationWatchpoint(String classPattern, String fieldId) {
|
||||
ReferenceTypeSpec refSpec =
|
||||
new PatternReferenceTypeSpec(classPattern);
|
||||
return new ModificationWatchpointSpec(this, refSpec, fieldId);
|
||||
}
|
||||
|
||||
void delete(EventRequestSpec ers) {
|
||||
EventRequest request = ers.getEventRequest();
|
||||
synchronized (eventRequestSpecs) {
|
||||
eventRequestSpecs.remove(ers);
|
||||
}
|
||||
if (request != null) {
|
||||
request.virtualMachine().eventRequestManager()
|
||||
.deleteEventRequest(request);
|
||||
}
|
||||
notifyDeleted(ers);
|
||||
//### notify delete - here?
|
||||
}
|
||||
|
||||
List<EventRequestSpec> eventRequestSpecs() {
|
||||
// We need to make a copy to avoid synchronization problems
|
||||
synchronized (eventRequestSpecs) {
|
||||
return new ArrayList<EventRequestSpec>(eventRequestSpecs);
|
||||
}
|
||||
}
|
||||
|
||||
// -------- notify routines --------------------
|
||||
|
||||
@SuppressWarnings("unchecked")
|
||||
private Vector<SpecListener> specListeners() {
|
||||
return (Vector<SpecListener>)runtime.specListeners.clone();
|
||||
}
|
||||
|
||||
void notifySet(EventRequestSpec spec) {
|
||||
Vector<SpecListener> l = specListeners();
|
||||
SpecEvent evt = new SpecEvent(spec);
|
||||
for (int i = 0; i < l.size(); i++) {
|
||||
spec.notifySet(l.elementAt(i), evt);
|
||||
}
|
||||
}
|
||||
|
||||
void notifyDeferred(EventRequestSpec spec) {
|
||||
Vector<SpecListener> l = specListeners();
|
||||
SpecEvent evt = new SpecEvent(spec);
|
||||
for (int i = 0; i < l.size(); i++) {
|
||||
spec.notifyDeferred(l.elementAt(i), evt);
|
||||
}
|
||||
}
|
||||
|
||||
void notifyDeleted(EventRequestSpec spec) {
|
||||
Vector<SpecListener> l = specListeners();
|
||||
SpecEvent evt = new SpecEvent(spec);
|
||||
for (int i = 0; i < l.size(); i++) {
|
||||
spec.notifyDeleted(l.elementAt(i), evt);
|
||||
}
|
||||
}
|
||||
|
||||
void notifyResolved(EventRequestSpec spec) {
|
||||
Vector<SpecListener> l = specListeners();
|
||||
SpecEvent evt = new SpecEvent(spec);
|
||||
for (int i = 0; i < l.size(); i++) {
|
||||
spec.notifyResolved(l.elementAt(i), evt);
|
||||
}
|
||||
}
|
||||
|
||||
void notifyError(EventRequestSpec spec, Exception exc) {
|
||||
Vector<SpecListener> l = specListeners();
|
||||
SpecErrorEvent evt = new SpecErrorEvent(spec, exc);
|
||||
for (int i = 0; i < l.size(); i++) {
|
||||
spec.notifyError(l.elementAt(i), evt);
|
||||
}
|
||||
}
|
||||
}
|
@ -1,109 +0,0 @@
|
||||
/*
|
||||
* Copyright (c) 1999, 2011, Oracle and/or its affiliates. All rights reserved.
|
||||
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
||||
*
|
||||
* This code is free software; you can redistribute it and/or modify it
|
||||
* under the terms of the GNU General Public License version 2 only, as
|
||||
* published by the Free Software Foundation. Oracle designates this
|
||||
* particular file as subject to the "Classpath" exception as provided
|
||||
* by Oracle in the LICENSE file that accompanied this code.
|
||||
*
|
||||
* This code is distributed in the hope that it will be useful, but WITHOUT
|
||||
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
|
||||
* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
|
||||
* version 2 for more details (a copy is included in the LICENSE file that
|
||||
* accompanied this code).
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License version
|
||||
* 2 along with this work; if not, write to the Free Software Foundation,
|
||||
* Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
|
||||
*
|
||||
* Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
|
||||
* or visit www.oracle.com if you need additional information or have any
|
||||
* questions.
|
||||
*/
|
||||
|
||||
/*
|
||||
* This source code is provided to illustrate the usage of a given feature
|
||||
* or technique and has been deliberately simplified. Additional steps
|
||||
* required for a production-quality application, such as security checks,
|
||||
* input validation and proper error handling, might not be present in
|
||||
* this sample code.
|
||||
*/
|
||||
|
||||
|
||||
package com.sun.tools.example.debug.bdi;
|
||||
|
||||
import com.sun.jdi.ReferenceType;
|
||||
|
||||
public class ExceptionSpec extends EventRequestSpec {
|
||||
|
||||
boolean notifyCaught;
|
||||
boolean notifyUncaught;
|
||||
|
||||
ExceptionSpec(EventRequestSpecList specs, ReferenceTypeSpec refSpec,
|
||||
boolean notifyCaught, boolean notifyUncaught)
|
||||
{
|
||||
super(specs, refSpec);
|
||||
this.notifyCaught = notifyCaught;
|
||||
this.notifyUncaught = notifyUncaught;
|
||||
}
|
||||
|
||||
@Override
|
||||
void notifySet(SpecListener listener, SpecEvent evt) {
|
||||
listener.exceptionInterceptSet(evt);
|
||||
}
|
||||
|
||||
@Override
|
||||
void notifyDeferred(SpecListener listener, SpecEvent evt) {
|
||||
listener.exceptionInterceptDeferred(evt);
|
||||
}
|
||||
|
||||
@Override
|
||||
void notifyResolved(SpecListener listener, SpecEvent evt) {
|
||||
listener.exceptionInterceptResolved(evt);
|
||||
}
|
||||
|
||||
@Override
|
||||
void notifyDeleted(SpecListener listener, SpecEvent evt) {
|
||||
listener.exceptionInterceptDeleted(evt);
|
||||
}
|
||||
|
||||
@Override
|
||||
void notifyError(SpecListener listener, SpecErrorEvent evt) {
|
||||
listener.exceptionInterceptError(evt);
|
||||
}
|
||||
|
||||
/**
|
||||
* The 'refType' is known to match.
|
||||
*/
|
||||
@Override
|
||||
void resolve(ReferenceType refType) {
|
||||
setRequest(refType.virtualMachine().eventRequestManager()
|
||||
.createExceptionRequest(refType,
|
||||
notifyCaught, notifyUncaught));
|
||||
}
|
||||
|
||||
@Override
|
||||
public int hashCode() {
|
||||
return refSpec.hashCode();
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean equals(Object obj) {
|
||||
if (obj instanceof ExceptionSpec) {
|
||||
ExceptionSpec es = (ExceptionSpec)obj;
|
||||
|
||||
return refSpec.equals(es.refSpec);
|
||||
} else {
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public String toString() {
|
||||
StringBuilder sb = new StringBuilder("exception catch ");
|
||||
sb.append(refSpec.toString());
|
||||
return sb.toString();
|
||||
}
|
||||
}
|
@ -1,824 +0,0 @@
|
||||
/*
|
||||
* Copyright (c) 1998, 2011, Oracle and/or its affiliates. All rights reserved.
|
||||
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
||||
*
|
||||
* This code is free software; you can redistribute it and/or modify it
|
||||
* under the terms of the GNU General Public License version 2 only, as
|
||||
* published by the Free Software Foundation. Oracle designates this
|
||||
* particular file as subject to the "Classpath" exception as provided
|
||||
* by Oracle in the LICENSE file that accompanied this code.
|
||||
*
|
||||
* This code is distributed in the hope that it will be useful, but WITHOUT
|
||||
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
|
||||
* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
|
||||
* version 2 for more details (a copy is included in the LICENSE file that
|
||||
* accompanied this code).
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License version
|
||||
* 2 along with this work; if not, write to the Free Software Foundation,
|
||||
* Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
|
||||
*
|
||||
* Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
|
||||
* or visit www.oracle.com if you need additional information or have any
|
||||
* questions.
|
||||
*/
|
||||
|
||||
/*
|
||||
* This source code is provided to illustrate the usage of a given feature
|
||||
* or technique and has been deliberately simplified. Additional steps
|
||||
* required for a production-quality application, such as security checks,
|
||||
* input validation and proper error handling, might not be present in
|
||||
* this sample code.
|
||||
*/
|
||||
|
||||
|
||||
package com.sun.tools.example.debug.bdi;
|
||||
|
||||
import com.sun.jdi.*;
|
||||
import com.sun.jdi.request.*;
|
||||
import com.sun.jdi.connect.*;
|
||||
import com.sun.tools.example.debug.expr.ExpressionParser;
|
||||
import com.sun.tools.example.debug.expr.ParseException;
|
||||
|
||||
import java.io.*;
|
||||
import java.util.*;
|
||||
|
||||
import com.sun.tools.example.debug.event.*;
|
||||
|
||||
import javax.swing.SwingUtilities;
|
||||
|
||||
/**
|
||||
* Move this towards being only state and functionality
|
||||
* that spans across Sessions (and thus VMs).
|
||||
*/
|
||||
public class ExecutionManager {
|
||||
|
||||
private Session session;
|
||||
|
||||
/**
|
||||
* Get/set JDI trace mode.
|
||||
*/
|
||||
int traceMode = VirtualMachine.TRACE_NONE;
|
||||
|
||||
////////////////// Listener registration //////////////////
|
||||
|
||||
// Session Listeners
|
||||
|
||||
ArrayList<SessionListener> sessionListeners = new ArrayList<SessionListener>();
|
||||
|
||||
public void addSessionListener(SessionListener listener) {
|
||||
sessionListeners.add(listener);
|
||||
}
|
||||
|
||||
public void removeSessionListener(SessionListener listener) {
|
||||
sessionListeners.remove(listener);
|
||||
}
|
||||
|
||||
// Spec Listeners
|
||||
|
||||
ArrayList<SpecListener> specListeners = new ArrayList<SpecListener>();
|
||||
|
||||
public void addSpecListener(SpecListener cl) {
|
||||
specListeners.add(cl);
|
||||
}
|
||||
|
||||
public void removeSpecListener(SpecListener cl) {
|
||||
specListeners.remove(cl);
|
||||
}
|
||||
|
||||
// JDI Listeners
|
||||
|
||||
ArrayList<JDIListener> jdiListeners = new ArrayList<JDIListener>();
|
||||
|
||||
/**
|
||||
* Adds a JDIListener
|
||||
*/
|
||||
public void addJDIListener(JDIListener jl) {
|
||||
jdiListeners.add(jl);
|
||||
}
|
||||
|
||||
/**
|
||||
* Adds a JDIListener - at the specified position
|
||||
*/
|
||||
public void addJDIListener(int index, JDIListener jl) {
|
||||
jdiListeners.add(index, jl);
|
||||
}
|
||||
|
||||
/**
|
||||
* Removes a JDIListener
|
||||
*/
|
||||
public void removeJDIListener(JDIListener jl) {
|
||||
jdiListeners.remove(jl);
|
||||
}
|
||||
|
||||
// App Echo Listeners
|
||||
|
||||
private ArrayList<OutputListener> appEchoListeners = new ArrayList<OutputListener>();
|
||||
|
||||
public void addApplicationEchoListener(OutputListener l) {
|
||||
appEchoListeners.add(l);
|
||||
}
|
||||
|
||||
public void removeApplicationEchoListener(OutputListener l) {
|
||||
appEchoListeners.remove(l);
|
||||
}
|
||||
|
||||
// App Output Listeners
|
||||
|
||||
private ArrayList<OutputListener> appOutputListeners = new ArrayList<OutputListener>();
|
||||
|
||||
public void addApplicationOutputListener(OutputListener l) {
|
||||
appOutputListeners.add(l);
|
||||
}
|
||||
|
||||
public void removeApplicationOutputListener(OutputListener l) {
|
||||
appOutputListeners.remove(l);
|
||||
}
|
||||
|
||||
// App Error Listeners
|
||||
|
||||
private ArrayList<OutputListener> appErrorListeners = new ArrayList<OutputListener>();
|
||||
|
||||
public void addApplicationErrorListener(OutputListener l) {
|
||||
appErrorListeners.add(l);
|
||||
}
|
||||
|
||||
public void removeApplicationErrorListener(OutputListener l) {
|
||||
appErrorListeners.remove(l);
|
||||
}
|
||||
|
||||
// Diagnostic Listeners
|
||||
|
||||
private ArrayList<OutputListener> diagnosticsListeners = new ArrayList<OutputListener>();
|
||||
|
||||
public void addDiagnosticsListener(OutputListener l) {
|
||||
diagnosticsListeners.add(l);
|
||||
}
|
||||
|
||||
public void removeDiagnosticsListener(OutputListener l) {
|
||||
diagnosticsListeners.remove(l);
|
||||
}
|
||||
|
||||
/////////// End Listener Registration //////////////
|
||||
|
||||
//### We probably don't want this public
|
||||
public VirtualMachine vm() {
|
||||
return session == null ? null : session.vm;
|
||||
}
|
||||
|
||||
void ensureActiveSession() throws NoSessionException {
|
||||
if (session == null) {
|
||||
throw new NoSessionException();
|
||||
}
|
||||
}
|
||||
|
||||
public EventRequestManager eventRequestManager() {
|
||||
return vm() == null ? null : vm().eventRequestManager();
|
||||
}
|
||||
|
||||
/**
|
||||
* Get JDI trace mode.
|
||||
*/
|
||||
public int getTraceMode(int mode) {
|
||||
return traceMode;
|
||||
}
|
||||
|
||||
/**
|
||||
* Set JDI trace mode.
|
||||
*/
|
||||
public void setTraceMode(int mode) {
|
||||
traceMode = mode;
|
||||
if (session != null) {
|
||||
session.setTraceMode(mode);
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Determine if VM is interrupted, i.e, present and not running.
|
||||
*/
|
||||
public boolean isInterrupted() /* should: throws NoSessionException */ {
|
||||
// ensureActiveSession();
|
||||
return session.interrupted;
|
||||
}
|
||||
|
||||
/**
|
||||
* Return a list of ReferenceType objects for all
|
||||
* currently loaded classes and interfaces.
|
||||
* Array types are not returned.
|
||||
*/
|
||||
public List<ReferenceType> allClasses() throws NoSessionException {
|
||||
ensureActiveSession();
|
||||
return vm().allClasses();
|
||||
}
|
||||
|
||||
/**
|
||||
* Return a ReferenceType object for the currently
|
||||
* loaded class or interface whose fully-qualified
|
||||
* class name is specified, else return null if there
|
||||
* is none.
|
||||
*
|
||||
* In general, we must return a list of types, because
|
||||
* multiple class loaders could have loaded a class
|
||||
* with the same fully-qualified name.
|
||||
*/
|
||||
public List<ReferenceType> findClassesByName(String name) throws NoSessionException {
|
||||
ensureActiveSession();
|
||||
return vm().classesByName(name);
|
||||
}
|
||||
|
||||
/**
|
||||
* Return a list of ReferenceType objects for all
|
||||
* currently loaded classes and interfaces whose name
|
||||
* matches the given pattern. The pattern syntax is
|
||||
* open to some future revision, but currently consists
|
||||
* of a fully-qualified class name in which the first
|
||||
* component may optionally be a "*" character, designating
|
||||
* an arbitrary prefix.
|
||||
*/
|
||||
public List<ReferenceType> findClassesMatchingPattern(String pattern)
|
||||
throws NoSessionException {
|
||||
ensureActiveSession();
|
||||
List<ReferenceType> result = new ArrayList<ReferenceType>(); //### Is default size OK?
|
||||
if (pattern.startsWith("*.")) {
|
||||
// Wildcard matches any leading package name.
|
||||
pattern = pattern.substring(1);
|
||||
for (ReferenceType type : vm().allClasses()) {
|
||||
if (type.name().endsWith(pattern)) {
|
||||
result.add(type);
|
||||
}
|
||||
}
|
||||
return result;
|
||||
} else {
|
||||
// It's a class name.
|
||||
return vm().classesByName(pattern);
|
||||
}
|
||||
}
|
||||
|
||||
/*
|
||||
* Return a list of ThreadReference objects corresponding
|
||||
* to the threads that are currently active in the VM.
|
||||
* A thread is removed from the list just before the
|
||||
* thread terminates.
|
||||
*/
|
||||
|
||||
public List<ThreadReference> allThreads() throws NoSessionException {
|
||||
ensureActiveSession();
|
||||
return vm().allThreads();
|
||||
}
|
||||
|
||||
/*
|
||||
* Return a list of ThreadGroupReference objects corresponding
|
||||
* to the top-level threadgroups that are currently active in the VM.
|
||||
* Note that a thread group may be empty, or contain no threads as
|
||||
* descendents.
|
||||
*/
|
||||
|
||||
public List<ThreadGroupReference> topLevelThreadGroups() throws NoSessionException {
|
||||
ensureActiveSession();
|
||||
return vm().topLevelThreadGroups();
|
||||
}
|
||||
|
||||
/*
|
||||
* Return the system threadgroup.
|
||||
*/
|
||||
|
||||
public ThreadGroupReference systemThreadGroup()
|
||||
throws NoSessionException {
|
||||
ensureActiveSession();
|
||||
return vm().topLevelThreadGroups().get(0);
|
||||
}
|
||||
|
||||
/*
|
||||
* Evaluate an expression.
|
||||
*/
|
||||
|
||||
public Value evaluate(final StackFrame f, String expr)
|
||||
throws ParseException,
|
||||
InvocationException,
|
||||
InvalidTypeException,
|
||||
ClassNotLoadedException,
|
||||
NoSessionException,
|
||||
IncompatibleThreadStateException {
|
||||
ExpressionParser.GetFrame frameGetter = null;
|
||||
ensureActiveSession();
|
||||
if (f != null) {
|
||||
frameGetter = new ExpressionParser.GetFrame() {
|
||||
@Override
|
||||
public StackFrame get() /* throws IncompatibleThreadStateException */ {
|
||||
return f;
|
||||
}
|
||||
};
|
||||
}
|
||||
return ExpressionParser.evaluate(expr, vm(), frameGetter);
|
||||
}
|
||||
|
||||
|
||||
/*
|
||||
* Start a new VM.
|
||||
*/
|
||||
|
||||
public void run(boolean suspended,
|
||||
String vmArgs,
|
||||
String className,
|
||||
String args) throws VMLaunchFailureException {
|
||||
|
||||
endSession();
|
||||
|
||||
//### Set a breakpoint on 'main' method.
|
||||
//### Would be cleaner if we could just bring up VM already suspended.
|
||||
if (suspended) {
|
||||
//### Set breakpoint at 'main(java.lang.String[])'.
|
||||
List<String> argList = new ArrayList<String>(1);
|
||||
argList.add("java.lang.String[]");
|
||||
createMethodBreakpoint(className, "main", argList);
|
||||
}
|
||||
|
||||
String cmdLine = className + " " + args;
|
||||
|
||||
startSession(new ChildSession(this, vmArgs, cmdLine,
|
||||
appInput, appOutput, appError,
|
||||
diagnostics));
|
||||
}
|
||||
|
||||
/*
|
||||
* Attach to an existing VM.
|
||||
*/
|
||||
public void attach(String portName) throws VMLaunchFailureException {
|
||||
endSession();
|
||||
|
||||
//### Changes made here for connectors have broken the
|
||||
//### the 'Session' abstraction. The 'Session.attach()'
|
||||
//### method is intended to encapsulate all of the various
|
||||
//### ways in which session start-up can fail. (maddox 12/18/98)
|
||||
|
||||
/*
|
||||
* Now that attaches and launches both go through Connectors,
|
||||
* it may be worth creating a new subclass of Session for
|
||||
* attach sessions.
|
||||
*/
|
||||
VirtualMachineManager mgr = Bootstrap.virtualMachineManager();
|
||||
AttachingConnector connector = mgr.attachingConnectors().get(0);
|
||||
Map<String, Connector.Argument> arguments = connector.defaultArguments();
|
||||
arguments.get("port").setValue(portName);
|
||||
|
||||
Session newSession = internalAttach(connector, arguments);
|
||||
if (newSession != null) {
|
||||
startSession(newSession);
|
||||
}
|
||||
}
|
||||
|
||||
private Session internalAttach(AttachingConnector connector,
|
||||
Map<String, Connector.Argument> arguments) {
|
||||
try {
|
||||
VirtualMachine vm = connector.attach(arguments);
|
||||
return new Session(vm, this, diagnostics);
|
||||
} catch (IOException ioe) {
|
||||
diagnostics.putString("\n Unable to attach to target VM: " +
|
||||
ioe.getMessage());
|
||||
} catch (IllegalConnectorArgumentsException icae) {
|
||||
diagnostics.putString("\n Invalid connector arguments: " +
|
||||
icae.getMessage());
|
||||
}
|
||||
return null;
|
||||
}
|
||||
|
||||
private Session internalListen(ListeningConnector connector,
|
||||
Map<String, Connector.Argument> arguments) {
|
||||
try {
|
||||
VirtualMachine vm = connector.accept(arguments);
|
||||
return new Session(vm, this, diagnostics);
|
||||
} catch (IOException ioe) {
|
||||
diagnostics.putString(
|
||||
"\n Unable to accept connection to target VM: " +
|
||||
ioe.getMessage());
|
||||
} catch (IllegalConnectorArgumentsException icae) {
|
||||
diagnostics.putString("\n Invalid connector arguments: " +
|
||||
icae.getMessage());
|
||||
}
|
||||
return null;
|
||||
}
|
||||
|
||||
/*
|
||||
* Connect via user specified arguments
|
||||
* @return true on success
|
||||
*/
|
||||
public boolean explictStart(Connector connector, Map<String, Connector.Argument> arguments)
|
||||
throws VMLaunchFailureException {
|
||||
Session newSession = null;
|
||||
|
||||
endSession();
|
||||
|
||||
if (connector instanceof LaunchingConnector) {
|
||||
// we were launched, use ChildSession
|
||||
newSession = new ChildSession(this, (LaunchingConnector)connector,
|
||||
arguments,
|
||||
appInput, appOutput, appError,
|
||||
diagnostics);
|
||||
} else if (connector instanceof AttachingConnector) {
|
||||
newSession = internalAttach((AttachingConnector)connector,
|
||||
arguments);
|
||||
} else if (connector instanceof ListeningConnector) {
|
||||
newSession = internalListen((ListeningConnector)connector,
|
||||
arguments);
|
||||
} else {
|
||||
diagnostics.putString("\n Unknown connector: " + connector);
|
||||
}
|
||||
if (newSession != null) {
|
||||
startSession(newSession);
|
||||
}
|
||||
return newSession != null;
|
||||
}
|
||||
|
||||
/*
|
||||
* Detach from VM. If VM was started by debugger, terminate it.
|
||||
*/
|
||||
public void detach() throws NoSessionException {
|
||||
ensureActiveSession();
|
||||
endSession();
|
||||
}
|
||||
|
||||
private void startSession(Session s) throws VMLaunchFailureException {
|
||||
if (!s.attach()) {
|
||||
throw new VMLaunchFailureException();
|
||||
}
|
||||
session = s;
|
||||
EventRequestManager em = vm().eventRequestManager();
|
||||
ClassPrepareRequest classPrepareRequest = em.createClassPrepareRequest();
|
||||
//### We must allow the deferred breakpoints to be resolved before
|
||||
//### we continue executing the class. We could optimize if there
|
||||
//### were no deferred breakpoints outstanding for a particular class.
|
||||
//### Can we do this with JDI?
|
||||
classPrepareRequest.setSuspendPolicy(EventRequest.SUSPEND_ALL);
|
||||
classPrepareRequest.enable();
|
||||
ClassUnloadRequest classUnloadRequest = em.createClassUnloadRequest();
|
||||
classUnloadRequest.setSuspendPolicy(EventRequest.SUSPEND_NONE);
|
||||
classUnloadRequest.enable();
|
||||
ThreadStartRequest threadStartRequest = em.createThreadStartRequest();
|
||||
threadStartRequest.setSuspendPolicy(EventRequest.SUSPEND_NONE);
|
||||
threadStartRequest.enable();
|
||||
ThreadDeathRequest threadDeathRequest = em.createThreadDeathRequest();
|
||||
threadDeathRequest.setSuspendPolicy(EventRequest.SUSPEND_NONE);
|
||||
threadDeathRequest.enable();
|
||||
ExceptionRequest exceptionRequest =
|
||||
em.createExceptionRequest(null, false, true);
|
||||
exceptionRequest.setSuspendPolicy(EventRequest.SUSPEND_ALL);
|
||||
exceptionRequest.enable();
|
||||
validateThreadInfo();
|
||||
session.interrupted = true;
|
||||
notifySessionStart();
|
||||
}
|
||||
|
||||
void endSession() {
|
||||
if (session != null) {
|
||||
session.detach();
|
||||
session = null;
|
||||
invalidateThreadInfo();
|
||||
notifySessionDeath();
|
||||
}
|
||||
}
|
||||
|
||||
/*
|
||||
* Suspend all VM activity.
|
||||
*/
|
||||
|
||||
public void interrupt() throws NoSessionException {
|
||||
ensureActiveSession();
|
||||
vm().suspend();
|
||||
//### Is it guaranteed that the interrupt has happened?
|
||||
validateThreadInfo();
|
||||
session.interrupted = true;
|
||||
notifyInterrupted();
|
||||
}
|
||||
|
||||
/*
|
||||
* Resume interrupted VM.
|
||||
*/
|
||||
|
||||
public void go() throws NoSessionException, VMNotInterruptedException {
|
||||
ensureActiveSession();
|
||||
invalidateThreadInfo();
|
||||
session.interrupted = false;
|
||||
notifyContinued();
|
||||
vm().resume();
|
||||
}
|
||||
|
||||
/*
|
||||
* Stepping.
|
||||
*/
|
||||
void clearPreviousStep(ThreadReference thread) {
|
||||
/*
|
||||
* A previous step may not have completed on this thread;
|
||||
* if so, it gets removed here.
|
||||
*/
|
||||
EventRequestManager mgr = vm().eventRequestManager();
|
||||
for (StepRequest request : mgr.stepRequests()) {
|
||||
if (request.thread().equals(thread)) {
|
||||
mgr.deleteEventRequest(request);
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
private void generalStep(ThreadReference thread, int size, int depth)
|
||||
throws NoSessionException {
|
||||
ensureActiveSession();
|
||||
invalidateThreadInfo();
|
||||
session.interrupted = false;
|
||||
notifyContinued();
|
||||
|
||||
clearPreviousStep(thread);
|
||||
EventRequestManager reqMgr = vm().eventRequestManager();
|
||||
StepRequest request = reqMgr.createStepRequest(thread,
|
||||
size, depth);
|
||||
// We want just the next step event and no others
|
||||
request.addCountFilter(1);
|
||||
request.enable();
|
||||
vm().resume();
|
||||
}
|
||||
|
||||
public void stepIntoInstruction(ThreadReference thread)
|
||||
throws NoSessionException {
|
||||
generalStep(thread, StepRequest.STEP_MIN, StepRequest.STEP_INTO);
|
||||
}
|
||||
|
||||
public void stepOverInstruction(ThreadReference thread)
|
||||
throws NoSessionException {
|
||||
generalStep(thread, StepRequest.STEP_MIN, StepRequest.STEP_OVER);
|
||||
}
|
||||
|
||||
public void stepIntoLine(ThreadReference thread)
|
||||
throws NoSessionException,
|
||||
AbsentInformationException {
|
||||
generalStep(thread, StepRequest.STEP_LINE, StepRequest.STEP_INTO);
|
||||
}
|
||||
|
||||
public void stepOverLine(ThreadReference thread)
|
||||
throws NoSessionException,
|
||||
AbsentInformationException {
|
||||
generalStep(thread, StepRequest.STEP_LINE, StepRequest.STEP_OVER);
|
||||
}
|
||||
|
||||
public void stepOut(ThreadReference thread)
|
||||
throws NoSessionException {
|
||||
generalStep(thread, StepRequest.STEP_MIN, StepRequest.STEP_OUT);
|
||||
}
|
||||
|
||||
/*
|
||||
* Thread control.
|
||||
*/
|
||||
|
||||
public void suspendThread(ThreadReference thread) throws NoSessionException {
|
||||
ensureActiveSession();
|
||||
thread.suspend();
|
||||
}
|
||||
|
||||
public void resumeThread(ThreadReference thread) throws NoSessionException {
|
||||
ensureActiveSession();
|
||||
thread.resume();
|
||||
}
|
||||
|
||||
public void stopThread(ThreadReference thread) throws NoSessionException {
|
||||
ensureActiveSession();
|
||||
//### Need an exception now. Which one to use?
|
||||
//thread.stop();
|
||||
}
|
||||
|
||||
/*
|
||||
* ThreadInfo objects -- Allow query of thread status and stack.
|
||||
*/
|
||||
|
||||
private List<ThreadInfo> threadInfoList = new LinkedList<ThreadInfo>();
|
||||
//### Should be weak! (in the value, not the key)
|
||||
private HashMap<ThreadReference, ThreadInfo> threadInfoMap = new HashMap<ThreadReference, ThreadInfo>();
|
||||
|
||||
public ThreadInfo threadInfo(ThreadReference thread) {
|
||||
if (session == null || thread == null) {
|
||||
return null;
|
||||
}
|
||||
ThreadInfo info = threadInfoMap.get(thread);
|
||||
if (info == null) {
|
||||
//### Should not hardcode initial frame count and prefetch here!
|
||||
//info = new ThreadInfo(thread, 10, 10);
|
||||
info = new ThreadInfo(thread);
|
||||
if (session.interrupted) {
|
||||
info.validate();
|
||||
}
|
||||
threadInfoList.add(info);
|
||||
threadInfoMap.put(thread, info);
|
||||
}
|
||||
return info;
|
||||
}
|
||||
|
||||
void validateThreadInfo() {
|
||||
session.interrupted = true;
|
||||
for (ThreadInfo threadInfo : threadInfoList) {
|
||||
threadInfo.validate();
|
||||
}
|
||||
}
|
||||
|
||||
private void invalidateThreadInfo() {
|
||||
if (session != null) {
|
||||
session.interrupted = false;
|
||||
for (ThreadInfo threadInfo : threadInfoList) {
|
||||
threadInfo.invalidate();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
void removeThreadInfo(ThreadReference thread) {
|
||||
ThreadInfo info = threadInfoMap.get(thread);
|
||||
if (info != null) {
|
||||
info.invalidate();
|
||||
threadInfoMap.remove(thread);
|
||||
threadInfoList.remove(info);
|
||||
}
|
||||
}
|
||||
|
||||
/*
|
||||
* Listen for Session control events.
|
||||
*/
|
||||
|
||||
private void notifyInterrupted() {
|
||||
ArrayList<SessionListener> l = new ArrayList<SessionListener>(sessionListeners);
|
||||
EventObject evt = new EventObject(this);
|
||||
for (int i = 0; i < l.size(); i++) {
|
||||
l.get(i).sessionInterrupt(evt);
|
||||
}
|
||||
}
|
||||
|
||||
private void notifyContinued() {
|
||||
ArrayList<SessionListener> l = new ArrayList<SessionListener>(sessionListeners);
|
||||
EventObject evt = new EventObject(this);
|
||||
for (int i = 0; i < l.size(); i++) {
|
||||
l.get(i).sessionContinue(evt);
|
||||
}
|
||||
}
|
||||
|
||||
private void notifySessionStart() {
|
||||
ArrayList<SessionListener> l = new ArrayList<SessionListener>(sessionListeners);
|
||||
EventObject evt = new EventObject(this);
|
||||
for (int i = 0; i < l.size(); i++) {
|
||||
l.get(i).sessionStart(evt);
|
||||
}
|
||||
}
|
||||
|
||||
private void notifySessionDeath() {
|
||||
/*** noop for now
|
||||
ArrayList<SessionListener> l = new ArrayList<SessionListener>(sessionListeners);
|
||||
EventObject evt = new EventObject(this);
|
||||
for (int i = 0; i < l.size(); i++) {
|
||||
((SessionListener)l.get(i)).sessionDeath(evt);
|
||||
}
|
||||
****/
|
||||
}
|
||||
|
||||
/*
|
||||
* Listen for input and output requests from the application
|
||||
* being debugged. These are generated only when the debuggee
|
||||
* is spawned as a child of the debugger.
|
||||
*/
|
||||
|
||||
private Object inputLock = new Object();
|
||||
private LinkedList<String> inputBuffer = new LinkedList<String>();
|
||||
|
||||
private void resetInputBuffer() {
|
||||
synchronized (inputLock) {
|
||||
inputBuffer = new LinkedList<String>();
|
||||
}
|
||||
}
|
||||
|
||||
public void sendLineToApplication(String line) {
|
||||
synchronized (inputLock) {
|
||||
inputBuffer.addFirst(line);
|
||||
inputLock.notifyAll();
|
||||
}
|
||||
}
|
||||
|
||||
private InputListener appInput = new InputListener() {
|
||||
@Override
|
||||
public String getLine() {
|
||||
// Don't allow reader to be interrupted -- catch and retry.
|
||||
String line = null;
|
||||
while (line == null) {
|
||||
synchronized (inputLock) {
|
||||
try {
|
||||
while (inputBuffer.size() < 1) {
|
||||
inputLock.wait();
|
||||
}
|
||||
line = inputBuffer.removeLast();
|
||||
} catch (InterruptedException e) {}
|
||||
}
|
||||
}
|
||||
// We must not be holding inputLock here, as the listener
|
||||
// that we call to echo a line might call us re-entrantly
|
||||
// to provide another line of input.
|
||||
// Run in Swing event dispatcher thread.
|
||||
final String input = line;
|
||||
SwingUtilities.invokeLater(new Runnable() {
|
||||
@Override
|
||||
public void run() {
|
||||
echoInputLine(input);
|
||||
}
|
||||
});
|
||||
return line;
|
||||
}
|
||||
};
|
||||
|
||||
private static String newline = System.getProperty("line.separator");
|
||||
|
||||
private void echoInputLine(String line) {
|
||||
ArrayList<OutputListener> l = new ArrayList<OutputListener>(appEchoListeners);
|
||||
for (int i = 0; i < l.size(); i++) {
|
||||
OutputListener ol = l.get(i);
|
||||
ol.putString(line);
|
||||
ol.putString(newline);
|
||||
}
|
||||
}
|
||||
|
||||
private OutputListener appOutput = new OutputListener() {
|
||||
@Override
|
||||
public void putString(String string) {
|
||||
ArrayList<OutputListener> l = new ArrayList<OutputListener>(appEchoListeners);
|
||||
for (int i = 0; i < l.size(); i++) {
|
||||
l.get(i).putString(string);
|
||||
}
|
||||
}
|
||||
};
|
||||
|
||||
private OutputListener appError = new OutputListener() {
|
||||
@Override
|
||||
public void putString(String string) {
|
||||
ArrayList<OutputListener> l = new ArrayList<OutputListener>(appEchoListeners);
|
||||
for (int i = 0; i < l.size(); i++) {
|
||||
l.get(i).putString(string);
|
||||
}
|
||||
}
|
||||
};
|
||||
|
||||
private OutputListener diagnostics = new OutputListener() {
|
||||
@Override
|
||||
public void putString(String string) {
|
||||
ArrayList<OutputListener> l = new ArrayList<OutputListener>(diagnosticsListeners);
|
||||
for (int i = 0; i < l.size(); i++) {
|
||||
l.get(i).putString(string);
|
||||
}
|
||||
}
|
||||
};
|
||||
|
||||
///////////// Spec Request Creation/Deletion/Query ///////////
|
||||
|
||||
private EventRequestSpecList specList = new EventRequestSpecList(this);
|
||||
|
||||
public BreakpointSpec
|
||||
createSourceLineBreakpoint(String sourceName, int line) {
|
||||
return specList.createSourceLineBreakpoint(sourceName, line);
|
||||
}
|
||||
|
||||
public BreakpointSpec
|
||||
createClassLineBreakpoint(String classPattern, int line) {
|
||||
return specList.createClassLineBreakpoint(classPattern, line);
|
||||
}
|
||||
|
||||
public BreakpointSpec
|
||||
createMethodBreakpoint(String classPattern,
|
||||
String methodId, List<String> methodArgs) {
|
||||
return specList.createMethodBreakpoint(classPattern,
|
||||
methodId, methodArgs);
|
||||
}
|
||||
|
||||
public ExceptionSpec
|
||||
createExceptionIntercept(String classPattern,
|
||||
boolean notifyCaught,
|
||||
boolean notifyUncaught) {
|
||||
return specList.createExceptionIntercept(classPattern,
|
||||
notifyCaught,
|
||||
notifyUncaught);
|
||||
}
|
||||
|
||||
public AccessWatchpointSpec
|
||||
createAccessWatchpoint(String classPattern, String fieldId) {
|
||||
return specList.createAccessWatchpoint(classPattern, fieldId);
|
||||
}
|
||||
|
||||
public ModificationWatchpointSpec
|
||||
createModificationWatchpoint(String classPattern, String fieldId) {
|
||||
return specList.createModificationWatchpoint(classPattern,
|
||||
fieldId);
|
||||
}
|
||||
|
||||
public void delete(EventRequestSpec spec) {
|
||||
specList.delete(spec);
|
||||
}
|
||||
|
||||
void resolve(ReferenceType refType) {
|
||||
specList.resolve(refType);
|
||||
}
|
||||
|
||||
public void install(EventRequestSpec spec) {
|
||||
specList.install(spec, vm());
|
||||
}
|
||||
|
||||
public List<EventRequestSpec> eventRequestSpecs() {
|
||||
return specList.eventRequestSpecs();
|
||||
}
|
||||
}
|
@ -1,40 +0,0 @@
|
||||
/*
|
||||
* Copyright (c) 1998, 2011, Oracle and/or its affiliates. All rights reserved.
|
||||
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
||||
*
|
||||
* This code is free software; you can redistribute it and/or modify it
|
||||
* under the terms of the GNU General Public License version 2 only, as
|
||||
* published by the Free Software Foundation. Oracle designates this
|
||||
* particular file as subject to the "Classpath" exception as provided
|
||||
* by Oracle in the LICENSE file that accompanied this code.
|
||||
*
|
||||
* This code is distributed in the hope that it will be useful, but WITHOUT
|
||||
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
|
||||
* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
|
||||
* version 2 for more details (a copy is included in the LICENSE file that
|
||||
* accompanied this code).
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License version
|
||||
* 2 along with this work; if not, write to the Free Software Foundation,
|
||||
* Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
|
||||
*
|
||||
* Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
|
||||
* or visit www.oracle.com if you need additional information or have any
|
||||
* questions.
|
||||
*/
|
||||
|
||||
/*
|
||||
* This source code is provided to illustrate the usage of a given feature
|
||||
* or technique and has been deliberately simplified. Additional steps
|
||||
* required for a production-quality application, such as security checks,
|
||||
* input validation and proper error handling, might not be present in
|
||||
* this sample code.
|
||||
*/
|
||||
|
||||
|
||||
package com.sun.tools.example.debug.bdi;
|
||||
|
||||
public class FrameIndexOutOfBoundsException extends IndexOutOfBoundsException {
|
||||
|
||||
private static final long serialVersionUID = -4870148107027371437L;
|
||||
}
|
@ -1,193 +0,0 @@
|
||||
/*
|
||||
* Copyright (c) 1999, 2011, Oracle and/or its affiliates. All rights reserved.
|
||||
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
||||
*
|
||||
* This code is free software; you can redistribute it and/or modify it
|
||||
* under the terms of the GNU General Public License version 2 only, as
|
||||
* published by the Free Software Foundation. Oracle designates this
|
||||
* particular file as subject to the "Classpath" exception as provided
|
||||
* by Oracle in the LICENSE file that accompanied this code.
|
||||
*
|
||||
* This code is distributed in the hope that it will be useful, but WITHOUT
|
||||
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
|
||||
* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
|
||||
* version 2 for more details (a copy is included in the LICENSE file that
|
||||
* accompanied this code).
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License version
|
||||
* 2 along with this work; if not, write to the Free Software Foundation,
|
||||
* Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
|
||||
*
|
||||
* Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
|
||||
* or visit www.oracle.com if you need additional information or have any
|
||||
* questions.
|
||||
*/
|
||||
|
||||
/*
|
||||
* This source code is provided to illustrate the usage of a given feature
|
||||
* or technique and has been deliberately simplified. Additional steps
|
||||
* required for a production-quality application, such as security checks,
|
||||
* input validation and proper error handling, might not be present in
|
||||
* this sample code.
|
||||
*/
|
||||
|
||||
|
||||
package com.sun.tools.example.debug.bdi;
|
||||
|
||||
import com.sun.jdi.*;
|
||||
import com.sun.jdi.event.*;
|
||||
|
||||
import com.sun.tools.example.debug.event.*;
|
||||
|
||||
import javax.swing.SwingUtilities;
|
||||
|
||||
/**
|
||||
*/
|
||||
class JDIEventSource extends Thread {
|
||||
|
||||
private /*final*/ EventQueue queue;
|
||||
private /*final*/ Session session;
|
||||
private /*final*/ ExecutionManager runtime;
|
||||
private final JDIListener firstListener = new FirstListener();
|
||||
|
||||
private boolean wantInterrupt; //### Hack
|
||||
|
||||
/**
|
||||
* Create event source.
|
||||
*/
|
||||
JDIEventSource(Session session) {
|
||||
super("JDI Event Set Dispatcher");
|
||||
this.session = session;
|
||||
this.runtime = session.runtime;
|
||||
this.queue = session.vm.eventQueue();
|
||||
}
|
||||
|
||||
@Override
|
||||
public void run() {
|
||||
try {
|
||||
runLoop();
|
||||
} catch (Exception exc) {
|
||||
//### Do something different for InterruptedException???
|
||||
// just exit
|
||||
}
|
||||
session.running = false;
|
||||
}
|
||||
|
||||
private void runLoop() throws InterruptedException {
|
||||
AbstractEventSet es;
|
||||
do {
|
||||
EventSet jdiEventSet = queue.remove();
|
||||
es = AbstractEventSet.toSpecificEventSet(jdiEventSet);
|
||||
session.interrupted = es.suspendedAll();
|
||||
dispatchEventSet(es);
|
||||
} while(!(es instanceof VMDisconnectEventSet));
|
||||
}
|
||||
|
||||
//### Gross foul hackery!
|
||||
private void dispatchEventSet(final AbstractEventSet es) {
|
||||
SwingUtilities.invokeLater(new Runnable() {
|
||||
@Override
|
||||
public void run() {
|
||||
boolean interrupted = es.suspendedAll();
|
||||
es.notify(firstListener);
|
||||
boolean wantInterrupt = JDIEventSource.this.wantInterrupt;
|
||||
for (JDIListener jl : session.runtime.jdiListeners) {
|
||||
es.notify(jl);
|
||||
}
|
||||
if (interrupted && !wantInterrupt) {
|
||||
session.interrupted = false;
|
||||
//### Catch here is a hack
|
||||
try {
|
||||
session.vm.resume();
|
||||
} catch (VMDisconnectedException ee) {}
|
||||
}
|
||||
if (es instanceof ThreadDeathEventSet) {
|
||||
ThreadReference t = ((ThreadDeathEventSet)es).getThread();
|
||||
session.runtime.removeThreadInfo(t);
|
||||
}
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
private void finalizeEventSet(AbstractEventSet es) {
|
||||
if (session.interrupted && !wantInterrupt) {
|
||||
session.interrupted = false;
|
||||
//### Catch here is a hack
|
||||
try {
|
||||
session.vm.resume();
|
||||
} catch (VMDisconnectedException ee) {}
|
||||
}
|
||||
if (es instanceof ThreadDeathEventSet) {
|
||||
ThreadReference t = ((ThreadDeathEventSet)es).getThread();
|
||||
session.runtime.removeThreadInfo(t);
|
||||
}
|
||||
}
|
||||
|
||||
//### This is a Hack, deal with it
|
||||
private class FirstListener implements JDIListener {
|
||||
|
||||
@Override
|
||||
public void accessWatchpoint(AccessWatchpointEventSet e) {
|
||||
session.runtime.validateThreadInfo();
|
||||
wantInterrupt = true;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void classPrepare(ClassPrepareEventSet e) {
|
||||
wantInterrupt = false;
|
||||
runtime.resolve(e.getReferenceType());
|
||||
}
|
||||
|
||||
@Override
|
||||
public void classUnload(ClassUnloadEventSet e) {
|
||||
wantInterrupt = false;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void exception(ExceptionEventSet e) {
|
||||
wantInterrupt = true;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void locationTrigger(LocationTriggerEventSet e) {
|
||||
session.runtime.validateThreadInfo();
|
||||
wantInterrupt = true;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void modificationWatchpoint(ModificationWatchpointEventSet e) {
|
||||
session.runtime.validateThreadInfo();
|
||||
wantInterrupt = true;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void threadDeath(ThreadDeathEventSet e) {
|
||||
wantInterrupt = false;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void threadStart(ThreadStartEventSet e) {
|
||||
wantInterrupt = false;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void vmDeath(VMDeathEventSet e) {
|
||||
//### Should have some way to notify user
|
||||
//### that VM died before the session ended.
|
||||
wantInterrupt = false;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void vmDisconnect(VMDisconnectEventSet e) {
|
||||
//### Notify user?
|
||||
wantInterrupt = false;
|
||||
session.runtime.endSession();
|
||||
}
|
||||
|
||||
@Override
|
||||
public void vmStart(VMStartEventSet e) {
|
||||
//### Do we need to do anything with it?
|
||||
wantInterrupt = false;
|
||||
}
|
||||
}
|
||||
}
|
@ -1,130 +0,0 @@
|
||||
/*
|
||||
* Copyright (c) 1999, 2011, Oracle and/or its affiliates. All rights reserved.
|
||||
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
||||
*
|
||||
* This code is free software; you can redistribute it and/or modify it
|
||||
* under the terms of the GNU General Public License version 2 only, as
|
||||
* published by the Free Software Foundation. Oracle designates this
|
||||
* particular file as subject to the "Classpath" exception as provided
|
||||
* by Oracle in the LICENSE file that accompanied this code.
|
||||
*
|
||||
* This code is distributed in the hope that it will be useful, but WITHOUT
|
||||
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
|
||||
* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
|
||||
* version 2 for more details (a copy is included in the LICENSE file that
|
||||
* accompanied this code).
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License version
|
||||
* 2 along with this work; if not, write to the Free Software Foundation,
|
||||
* Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
|
||||
*
|
||||
* Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
|
||||
* or visit www.oracle.com if you need additional information or have any
|
||||
* questions.
|
||||
*/
|
||||
|
||||
/*
|
||||
* This source code is provided to illustrate the usage of a given feature
|
||||
* or technique and has been deliberately simplified. Additional steps
|
||||
* required for a production-quality application, such as security checks,
|
||||
* input validation and proper error handling, might not be present in
|
||||
* this sample code.
|
||||
*/
|
||||
|
||||
|
||||
package com.sun.tools.example.debug.bdi;
|
||||
|
||||
import com.sun.jdi.*;
|
||||
import java.util.List;
|
||||
|
||||
public class LineBreakpointSpec extends BreakpointSpec {
|
||||
int lineNumber;
|
||||
|
||||
LineBreakpointSpec(EventRequestSpecList specs,
|
||||
ReferenceTypeSpec refSpec, int lineNumber) {
|
||||
super(specs, refSpec);
|
||||
this.lineNumber = lineNumber;
|
||||
}
|
||||
|
||||
/**
|
||||
* The 'refType' is known to match.
|
||||
*/
|
||||
@Override
|
||||
void resolve(ReferenceType refType) throws InvalidTypeException,
|
||||
LineNotFoundException {
|
||||
if (!(refType instanceof ClassType)) {
|
||||
throw new InvalidTypeException();
|
||||
}
|
||||
Location location = location((ClassType)refType);
|
||||
setRequest(refType.virtualMachine().eventRequestManager()
|
||||
.createBreakpointRequest(location));
|
||||
}
|
||||
|
||||
private Location location(ClassType clazz) throws
|
||||
LineNotFoundException {
|
||||
Location location = null;
|
||||
try {
|
||||
List<Location> locs = clazz.locationsOfLine(lineNumber());
|
||||
if (locs.size() == 0) {
|
||||
throw new LineNotFoundException();
|
||||
}
|
||||
// TODO handle multiple locations
|
||||
location = locs.get(0);
|
||||
if (location.method() == null) {
|
||||
throw new LineNotFoundException();
|
||||
}
|
||||
} catch (AbsentInformationException e) {
|
||||
/*
|
||||
* TO DO: throw something more specific, or allow
|
||||
* AbsentInfo exception to pass through.
|
||||
*/
|
||||
throw new LineNotFoundException();
|
||||
}
|
||||
return location;
|
||||
}
|
||||
|
||||
public int lineNumber() {
|
||||
return lineNumber;
|
||||
}
|
||||
|
||||
@Override
|
||||
public int hashCode() {
|
||||
return refSpec.hashCode() + lineNumber;
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean equals(Object obj) {
|
||||
if (obj instanceof LineBreakpointSpec) {
|
||||
LineBreakpointSpec breakpoint = (LineBreakpointSpec)obj;
|
||||
|
||||
return refSpec.equals(breakpoint.refSpec) &&
|
||||
(lineNumber == breakpoint.lineNumber);
|
||||
} else {
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public String errorMessageFor(Exception e) {
|
||||
if (e instanceof LineNotFoundException) {
|
||||
return ("No code at line " + lineNumber() + " in " + refSpec);
|
||||
} else if (e instanceof InvalidTypeException) {
|
||||
return ("Breakpoints can be located only in classes. " +
|
||||
refSpec + " is an interface or array");
|
||||
} else {
|
||||
return super.errorMessageFor( e);
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public String toString() {
|
||||
StringBuilder sb = new StringBuilder("breakpoint ");
|
||||
sb.append(refSpec.toString());
|
||||
sb.append(':');
|
||||
sb.append(lineNumber);
|
||||
sb.append(" (");
|
||||
sb.append(getStatusString());
|
||||
sb.append(')');
|
||||
return sb.toString();
|
||||
}
|
||||
}
|
Some files were not shown because too many files have changed in this diff Show More
Loading…
Reference in New Issue
Block a user