--- a/.hgtags Thu Mar 01 16:35:36 2018 -0500
+++ b/.hgtags Fri Mar 02 21:00:12 2018 +0100
@@ -471,3 +471,6 @@
107413b070b92c88bde6230ceb4a19b579781068 jdk-10+43
dfa46cfe56346884a61efdc30dc50f7505d66761 jdk-11+1
03ae177c26b016353e5ea1cab6ffd051dfa086ca jdk-11+2
+663f20fc51091bd7f95d18448850ba091207b7bd jdk-10+44
+4f96cf952e71cb8a127334494faf28880c26181b jdk-10+45
+1fd4d6068f54561cfc67d54fc9ca84af7212c4f8 jdk-11+3
--- a/doc/building.html Thu Mar 01 16:35:36 2018 -0500
+++ b/doc/building.html Fri Mar 02 21:00:12 2018 +0100
@@ -44,10 +44,7 @@
<li><a href="#ibm-xl-cc">IBM XL C/C++</a></li>
</ul></li>
<li><a href="#boot-jdk-requirements">Boot JDK Requirements</a><ul>
-<li><a href="#jdk-8-on-linux">JDK 8 on Linux</a></li>
-<li><a href="#jdk-8-on-windows">JDK 8 on Windows</a></li>
-<li><a href="#jdk-8-on-macos">JDK 8 on macOS</a></li>
-<li><a href="#jdk-8-on-aix">JDK 8 on AIX</a></li>
+<li><a href="#getting-jdk-binaries">Getting JDK binaries</a></li>
</ul></li>
<li><a href="#external-library-requirements">External Library Requirements</a><ul>
<li><a href="#freetype">FreeType</a></li>
@@ -364,16 +361,12 @@
<p>See the <a href="http://cr.openjdk.java.net/~simonis/ppc-aix-port">OpenJDK PowerPC Port Status Page</a> for details.</p>
<h2 id="boot-jdk-requirements">Boot JDK Requirements</h2>
<p>Paradoxically, building OpenJDK requires a pre-existing JDK. This is called the "boot JDK". The boot JDK does not have to be OpenJDK, though. If you are porting OpenJDK to a new platform, chances are that there already exists another JDK for that platform that is usable as boot JDK.</p>
-<p>The rule of thumb is that the boot JDK for building JDK major version <em>N</em> should be an JDK of major version <em>N-1</em>, so for building JDK 9 a JDK 8 would be suitable as boot JDK. However, OpenJDK should be able to "build itself", so an up-to-date build of the current OpenJDK source is an acceptable alternative. If you are following the <em>N-1</em> rule, make sure you got the latest update version, since JDK 8 GA might not be able to build JDK 9 on all platforms.</p>
+<p>The rule of thumb is that the boot JDK for building JDK major version <em>N</em> should be a JDK of major version <em>N-1</em>, so for building JDK 9 a JDK 8 would be suitable as boot JDK. However, OpenJDK should be able to "build itself", so an up-to-date build of the current OpenJDK source is an acceptable alternative. If you are following the <em>N-1</em> rule, make sure you've got the latest update version, since JDK 8 GA might not be able to build JDK 9 on all platforms.</p>
+<p>Early in the release cycle, version <em>N-1</em> may not yet have been released. In that case, the preferred boot JDK will be version <em>N-2</em> until version <em>N-1</em> is available.</p>
<p>If the Boot JDK is not automatically detected, or the wrong JDK is picked, use <code>--with-boot-jdk</code> to point to the JDK to use.</p>
-<h3 id="jdk-8-on-linux">JDK 8 on Linux</h3>
-<p>On apt-based distros (like Debian and Ubuntu), <code>sudo apt-get install openjdk-8-jdk</code> is typically enough to install OpenJDK 8. On rpm-based distros (like Fedora and Red Hat), try <code>sudo yum install java-1.8.0-openjdk-devel</code>.</p>
-<h3 id="jdk-8-on-windows">JDK 8 on Windows</h3>
-<p>No pre-compiled binaries of OpenJDK 8 are readily available for Windows at the time of writing. An alternative is to download the <a href="http://www.oracle.com/technetwork/java/javase/downloads">Oracle JDK</a>. Another is the <a href="https://adoptopenjdk.net/">Adopt OpenJDK Project</a>, which publishes experimental prebuilt binaries for Windows.</p>
-<h3 id="jdk-8-on-macos">JDK 8 on macOS</h3>
-<p>No pre-compiled binaries of OpenJDK 8 are readily available for macOS at the time of writing. An alternative is to download the <a href="http://www.oracle.com/technetwork/java/javase/downloads">Oracle JDK</a>, or to install it using <code>brew cask install java</code>. Another option is the <a href="https://adoptopenjdk.net/">Adopt OpenJDK Project</a>, which publishes experimental prebuilt binaries for macOS.</p>
-<h3 id="jdk-8-on-aix">JDK 8 on AIX</h3>
-<p>No pre-compiled binaries of OpenJDK 8 are readily available for AIX at the time of writing. A starting point for working with OpenJDK on AIX is the <a href="http://openjdk.java.net/projects/ppc-aix-port/">PowerPC/AIX Port Project</a>.</p>
+<h3 id="getting-jdk-binaries">Getting JDK binaries</h3>
+<p>OpenJDK binaries for Linux, Windows and macOS can be downloaded from <a href="http://jdk.java.net">jdk.java.net</a>. An alternative is to download the <a href="http://www.oracle.com/technetwork/java/javase/downloads">Oracle JDK</a>. Another is the <a href="https://adoptopenjdk.net/">Adopt OpenJDK Project</a>, which publishes experimental prebuilt binaries for various platforms.</p>
+<p>On Linux you can also get OpenJDK from the Linux distribution. On apt-based distros (like Debian and Ubuntu), <code>sudo apt-get install openjdk-<VERSION>-jdk</code> is typically enough to install OpenJDK <VERSION>. On rpm-based distros (like Fedora and Red Hat), try <code>sudo yum install java-<VERSION>-openjdk-devel</code>.</p>
<h2 id="external-library-requirements">External Library Requirements</h2>
<p>Different platforms require different external libraries. In general, libraries are not optional - that is, they are either required or not used.</p>
<p>If a required library is not detected by <code>configure</code>, you need to provide the path to it. There are two forms of the <code>configure</code> arguments to point to an external library: <code>--with-<LIB>=<path></code> or <code>--with-<LIB>-include=<path to include> --with-<LIB>-lib=<path to lib></code>. The first variant is more concise, but require the include files an library files to reside in a default hierarchy under this directory. In most cases, it works fine.</p>
@@ -758,12 +751,7 @@
spawn failed</code></pre>
<p>This can be a sign of a Cygwin problem. See the information about solving problems in the <a href="#cygwin">Cygwin</a> section. Rebooting the computer might help temporarily.</p>
<h3 id="getting-help">Getting Help</h3>
-<p>If none of the suggestions in this document helps you, or if you find what you believe is a bug in the build system, please contact the Build Group by sending a mail to <script type="text/javascript">
-<!--
-h='openjdk.java.net';a='@';n='build-dev';e=n+a+h;
-document.write('<a h'+'ref'+'="ma'+'ilto'+':'+e+'" clas'+'s="em' + 'ail">'+e+'<\/'+'a'+'>');
-// -->
-</script><noscript>build-dev at openjdk dot java dot net</noscript>. Please include the relevant parts of the configure and/or build log.</p>
+<p>If none of the suggestions in this document helps you, or if you find what you believe is a bug in the build system, please contact the Build Group by sending a mail to <a href="mailto:build-dev@openjdk.java.net">build-dev@openjdk.java.net</a>. Please include the relevant parts of the configure and/or build log.</p>
<p>If you need general help or advice about developing for OpenJDK, you can also contact the Adoption Group. See the section on <a href="#contributing-to-openjdk">Contributing to OpenJDK</a> for more information.</p>
<h2 id="hints-and-suggestions-for-advanced-users">Hints and Suggestions for Advanced Users</h2>
<h3 id="setting-up-a-forest-for-pushing-changes-defpath">Setting Up a Forest for Pushing Changes (defpath)</h3>
--- a/doc/building.md Thu Mar 01 16:35:36 2018 -0500
+++ b/doc/building.md Fri Mar 02 21:00:12 2018 +0100
@@ -401,43 +401,31 @@
another JDK for that platform that is usable as boot JDK.
The rule of thumb is that the boot JDK for building JDK major version *N*
-should be an JDK of major version *N-1*, so for building JDK 9 a JDK 8 would be
+should be a JDK of major version *N-1*, so for building JDK 9 a JDK 8 would be
suitable as boot JDK. However, OpenJDK should be able to "build itself", so an
up-to-date build of the current OpenJDK source is an acceptable alternative. If
-you are following the *N-1* rule, make sure you got the latest update version,
-since JDK 8 GA might not be able to build JDK 9 on all platforms.
+you are following the *N-1* rule, make sure you've got the latest update
+version, since JDK 8 GA might not be able to build JDK 9 on all platforms.
+
+Early in the release cycle, version *N-1* may not yet have been released. In
+that case, the preferred boot JDK will be version *N-2* until version *N-1*
+is available.
If the Boot JDK is not automatically detected, or the wrong JDK is picked, use
`--with-boot-jdk` to point to the JDK to use.
-### JDK 8 on Linux
-
-On apt-based distros (like Debian and Ubuntu), `sudo apt-get install
-openjdk-8-jdk` is typically enough to install OpenJDK 8. On rpm-based distros
-(like Fedora and Red Hat), try `sudo yum install java-1.8.0-openjdk-devel`.
-
-### JDK 8 on Windows
-
-No pre-compiled binaries of OpenJDK 8 are readily available for Windows at the
-time of writing. An alternative is to download the [Oracle JDK](
-http://www.oracle.com/technetwork/java/javase/downloads). Another is the [Adopt
-OpenJDK Project](https://adoptopenjdk.net/), which publishes experimental
-prebuilt binaries for Windows.
+### Getting JDK binaries
-### JDK 8 on macOS
+OpenJDK binaries for Linux, Windows and macOS can be downloaded from
+[jdk.java.net](http://jdk.java.net). An alternative is to download the
+[Oracle JDK](http://www.oracle.com/technetwork/java/javase/downloads). Another
+is the [Adopt OpenJDK Project](https://adoptopenjdk.net/), which publishes
+experimental prebuilt binaries for various platforms.
-No pre-compiled binaries of OpenJDK 8 are readily available for macOS at the
-time of writing. An alternative is to download the [Oracle JDK](
-http://www.oracle.com/technetwork/java/javase/downloads), or to install it
-using `brew cask install java`. Another option is the [Adopt OpenJDK Project](
-https://adoptopenjdk.net/), which publishes experimental prebuilt binaries for
-macOS.
-
-### JDK 8 on AIX
-
-No pre-compiled binaries of OpenJDK 8 are readily available for AIX at the
-time of writing. A starting point for working with OpenJDK on AIX is
-the [PowerPC/AIX Port Project](http://openjdk.java.net/projects/ppc-aix-port/).
+On Linux you can also get OpenJDK from the Linux distribution. On apt-based
+distros (like Debian and Ubuntu), `sudo apt-get install openjdk-<VERSION>-jdk`
+is typically enough to install OpenJDK \<VERSION\>. On rpm-based distros (like
+Fedora and Red Hat), try `sudo yum install java-<VERSION>-openjdk-devel`.
## External Library Requirements
--- a/make/CompileJavaModules.gmk Thu Mar 01 16:35:36 2018 -0500
+++ b/make/CompileJavaModules.gmk Fri Mar 02 21:00:12 2018 +0100
@@ -252,6 +252,10 @@
################################################################################
+java.transaction.xa_ADD_JAVAC_FLAGS += -Xdoclint:all/protected '-Xdoclint/package:javax.*'
+
+################################################################################
+
java.sql_ADD_JAVAC_FLAGS += -Xdoclint:all/protected '-Xdoclint/package:java.*,javax.*'
java.sql_SETUP := GENERATE_JDKBYTECODE_NOWARNINGS
--- a/make/Docs.gmk Thu Mar 01 16:35:36 2018 -0500
+++ b/make/Docs.gmk Fri Mar 02 21:00:12 2018 +0100
@@ -61,7 +61,7 @@
$(SUPPORT_OUTPUTDIR)/rmic/* $(TOPDIR)/src/*/share/doc/stub)
# URLs
-JAVADOC_BASE_URL := http://www.oracle.com/pls/topic/lookup?ctx=javase9&id=homepage
+JAVADOC_BASE_URL := http://www.oracle.com/pls/topic/lookup?ctx=javase10&id=homepage
BUG_SUBMIT_URL := http://bugreport.java.com/bugreport/
COPYRIGHT_URL := {@docroot}/../legal/copyright.html
LICENSE_URL := http://www.oracle.com/technetwork/java/javase/terms/license/java10speclicense.html
--- a/make/InitSupport.gmk Thu Mar 01 16:35:36 2018 -0500
+++ b/make/InitSupport.gmk Fri Mar 02 21:00:12 2018 +0100
@@ -435,7 +435,7 @@
define PrepareCompareBuild
$(ECHO) "Preparing for comparison rebuild"
# Apply patch, if any
- $(if $(COMPARE_BUILD_PATCH), $(PATCH) -p1 < $(COMPARE_BUILD_PATCH))
+ $(if $(COMPARE_BUILD_PATCH), cd $(topdir) && $(PATCH) -p1 < $(COMPARE_BUILD_PATCH))
# Move the first build away temporarily
$(RM) -r $(topdir)/build/.compare-build-temp
$(MKDIR) -p $(topdir)/build/.compare-build-temp
@@ -455,7 +455,7 @@
# Cleanup after a compare build
define CleanupCompareBuild
# If running with a COMPARE_BUILD patch, reverse-apply it
- $(if $(COMPARE_BUILD_PATCH), $(PATCH) -R -p1 < $(COMPARE_BUILD_PATCH))
+ $(if $(COMPARE_BUILD_PATCH), cd $(topdir) && $(PATCH) -R -p1 < $(COMPARE_BUILD_PATCH))
# Move this build away and restore the original build
$(MKDIR) -p $(topdir)/build/compare-build
$(MV) $(OUTPUTDIR) $(COMPARE_BUILD_OUTPUTDIR)
--- a/make/Main.gmk Thu Mar 01 16:35:36 2018 -0500
+++ b/make/Main.gmk Fri Mar 02 21:00:12 2018 +0100
@@ -399,10 +399,13 @@
update-build-docs:
+($(CD) $(TOPDIR)/make && $(MAKE) $(MAKE_ARGS) -f UpdateBuildDocs.gmk)
+update-x11wrappers:
+ +($(CD) $(TOPDIR)/make && $(MAKE) $(MAKE_ARGS) -f UpdateX11Wrappers.gmk)
+
ALL_TARGETS += docs-jdk-api-javadoc docs-jdk-api-modulegraph \
docs-javase-api-javadoc docs-javase-api-modulegraph \
docs-reference-api-javadoc docs-reference-api-modulegraph docs-jdk-specs \
- docs-jdk-index docs-zip update-build-docs
+ docs-jdk-index docs-zip update-build-docs update-x11wrappers
################################################################################
# Cross compilation support
@@ -724,9 +727,9 @@
# If not already set, set the JVM target so that the JVM will be built.
JVM_MAIN_TARGETS ?= hotspot
-
+
# Building java.base-jmod requires all of VM (ie hotspot) to be built.
- java.base-jmod: $(JVM_MAIN_TARGETS)
+ java.base-jmod: $(JVM_MAIN_TARGETS)
# Declare dependencies from <module>-jmod to all other module targets
# When creating a BUILDJDK, the java compilation has already been done by the
@@ -830,7 +833,7 @@
# If not already set, then set the JVM specific docs targets
JVM_DOCS_TARGETS ?= hotspot-$(JVM_VARIANT_MAIN)-gensrc
-
+
# The gensrc steps for hotspot and jdk.jdi create html spec files.
docs-jdk-specs: $(JVM_DOCS_TARGETS) jdk.jdi-gensrc \
docs-jdk-index
@@ -894,6 +897,8 @@
generate-summary: jmods buildtools-modules
+ update-x11wrappers: java.base-copy buildtools-jdk
+
endif
################################################################################
--- a/make/RunTests.gmk Thu Mar 01 16:35:36 2018 -0500
+++ b/make/RunTests.gmk Fri Mar 02 21:00:12 2018 +0100
@@ -60,6 +60,18 @@
endif
endef
+# Setup _NT_SYMBOL_PATH on Windows
+ifeq ($(OPENJDK_TARGET_OS), windows)
+ ifndef _NT_SYMBOL_PATH
+ # Can't use PathList here as it adds quotes around the value.
+ _NT_SYMBOL_PATH := \
+ $(subst $(SPACE),;, $(foreach p, $(sort $(dir $(wildcard \
+ $(addprefix $(SYMBOLS_IMAGE_DIR)/bin/, *.pdb */*.pdb)))), $(call FixPath, $p)))
+ export _NT_SYMBOL_PATH
+ $(info _NT_SYMBOL_PATH $(_NT_SYMBOL_PATH))
+ endif
+endif
+
################################################################################
# Hook to include the corresponding custom file, if present.
$(eval $(call IncludeCustomExtension, RunTests.gmk))
@@ -496,6 +508,11 @@
$1_JTREG_BASIC_OPTIONS += -e:JIB_DATA_DIR
# Some tests needs to find a boot JDK using the JDK8_HOME variable.
$1_JTREG_BASIC_OPTIONS += -e:JDK8_HOME=$$(BOOT_JDK)
+ # If running on Windows, propagate the _NT_SYMBOL_PATH to enable
+ # symbol lookup in hserr files
+ ifeq ($$(OPENJDK_TARGET_OS), windows)
+ $1_JTREG_BASIC_OPTIONS += -e:_NT_SYMBOL_PATH
+ endif
$1_JTREG_BASIC_OPTIONS += \
$$(addprefix -javaoption:, $$(JTREG_JAVA_OPTIONS)) \
--- a/make/RunTestsPrebuilt.gmk Thu Mar 01 16:35:36 2018 -0500
+++ b/make/RunTestsPrebuilt.gmk Fri Mar 02 21:00:12 2018 +0100
@@ -113,6 +113,7 @@
# These can have default values based on the ones above
$(eval $(call SetupVariable,JDK_IMAGE_DIR,$(OUTPUTDIR)/images/jdk))
$(eval $(call SetupVariable,TEST_IMAGE_DIR,$(OUTPUTDIR)/images/test))
+$(eval $(call SetupVariable,SYMBOLS_IMAGE_DIR,$(OUTPUTDIR)/images/symbols))
# Provide default values for tools that we need
$(eval $(call SetupVariable,MAKE,make,NO_CHECK))
@@ -245,6 +246,7 @@
JT_HOME := $(JT_HOME), \
JDK_IMAGE_DIR := $(JDK_IMAGE_DIR), \
TEST_IMAGE_DIR := $(TEST_IMAGE_DIR), \
+ SYMBOLS_IMAGE_DIR := $(SYMBOLS_IMAGE_DIR), \
MAKE := $(MAKE), \
BASH := $(BASH), \
JIB_JAR := $(JIB_JAR), \
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/make/UpdateX11Wrappers.gmk Fri Mar 02 21:00:12 2018 +0100
@@ -0,0 +1,101 @@
+#
+# Copyright (c) 2012, 2018, Oracle and/or its affiliates. All rights reserved.
+# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+#
+# This code is free software; you can redistribute it and/or modify it
+# under the terms of the GNU General Public License version 2 only, as
+# published by the Free Software Foundation. Oracle designates this
+# particular file as subject to the "Classpath" exception as provided
+# by Oracle in the LICENSE file that accompanied this code.
+#
+# This code is distributed in the hope that it will be useful, but WITHOUT
+# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+# FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
+# version 2 for more details (a copy is included in the LICENSE file that
+# accompanied this code).
+#
+# You should have received a copy of the GNU General Public License version
+# 2 along with this work; if not, write to the Free Software Foundation,
+# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
+#
+# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
+# or visit www.oracle.com if you need additional information or have any
+# questions.
+#
+
+################################################################################
+
+default: all
+
+include $(SPEC)
+include MakeBase.gmk
+include NativeCompilation.gmk
+include ToolsJdk.gmk
+
+################################################################################
+# This file is responsible for extracting the x11 native struct offsets to
+# the xawt Java library. The tool needs to be run on the os/arch that
+# will host the final jvm, thus the tool cannot be used when cross compiling.
+#
+# Two versions of the generated offset file, sizes-32.txt and sizes-64.txt are
+# committed into the source code repository. These are the ones used in
+# GensrcX11Wrappers.gmk to generate the Java code during the build.
+################################################################################
+
+ifeq ($(COMPILE_TYPE), cross)
+ $(error It is not possible to update the x11wrappers when cross-compiling)
+endif
+
+X11WRAPPERS_OUTPUT := $(SUPPORT_OUTPUTDIR)/x11wrappers
+
+GENSRC_X11WRAPPERS_DATADIR := $(TOPDIR)/make/data/x11wrappergen
+
+BITS := $(OPENJDK_TARGET_CPU_BITS)
+
+# Generate the C code for the program that will output the offset file.
+$(X11WRAPPERS_OUTPUT)/src/data_generator.c: $(GENSRC_X11WRAPPERS_DATADIR)/xlibtypes.txt $(BUILD_TOOLS_JDK)
+ $(call LogInfo, Generating X11 wrapper data generator source code)
+ $(call MakeDir, $(@D))
+ $(call ExecuteWithLog, $@, \
+ $(TOOL_WRAPPERGENERATOR) gen_c_source $@ $(GENSRC_X11WRAPPERS_DATADIR)/xlibtypes.txt $(BITS))
+
+DATA_GENERATOR_INCLUDES := \
+ -I$(TOPDIR)/src/hotspot/share/include \
+ -I$(TOPDIR)/src/hotspot/os/$(HOTSPOT_TARGET_OS_TYPE)/include \
+ -I$(SUPPORT_OUTPUTDIR)/modules_include/java.base \
+ -I$(SUPPORT_OUTPUTDIR)/modules_include/java.base/$(OPENJDK_TARGET_OS_INCLUDE_SUBDIR) \
+ -I$(TOPDIR)/src/java.base/share/native/libjava \
+ -I$(TOPDIR)/src/java.base/$(OPENJDK_TARGET_OS_TYPE)/native/libjava \
+ -I$(TOPDIR)/src/java.desktop/$(OPENJDK_TARGET_OS_TYPE)/native/common/awt \
+ -I$(TOPDIR)/src/java.desktop/share/native/common/awt/debug \
+ -I$(TOPDIR)/src/java.desktop/share/native/libawt/awt/image/cvutils \
+ #
+
+# Compile the generated C code into an executable.
+$(eval $(call SetupNativeCompilation, BUILD_DATA_GENERATOR, \
+ PROGRAM := data_generator, \
+ OUTPUT_DIR := $(X11WRAPPERS_OUTPUT)/bin, \
+ EXTRA_FILES := $(X11WRAPPERS_OUTPUT)/src/data_generator.c, \
+ CFLAGS := $(X_CFLAGS) $(DATA_GENERATOR_INCLUDES) $(CFLAGS_JDKEXE), \
+ LDFLAGS := $(LDFLAGS_JDKEXE), \
+ LIBS := $(X_LIBS) -lc, \
+ OBJECT_DIR := $(X11WRAPPERS_OUTPUT)/objs, \
+))
+
+# Run the executable to create the data file.
+$(GENSRC_X11WRAPPERS_DATADIR)/sizes-$(BITS).txt: $(BUILD_DATA_GENERATOR_TARGET)
+ $(call LogInfo, Generating X11 wrapper data files)
+ $(call MakeDir, $(@D))
+ $(call ExecuteWithLog, $(X11WRAPPERS_OUTPUT)/generation, \
+ $(BUILD_DATA_GENERATOR_TARGET) | $(SORT) > $@)
+ $(ECHO) IMPORTANT: If you update the X11 wrapper data files, they most certainly
+ $(ECHO) need to be updated for both 32 and 64 bit platforms. You have now
+ $(ECHO) updated them for $(BITS) bit platforms only.
+
+TARGETS += $(GENSRC_X11WRAPPERS_DATADIR)/sizes-$(BITS).txt
+
+################################################################################
+
+all: $(TARGETS)
+
+.PHONY: all default
--- a/make/autoconf/basics.m4 Thu Mar 01 16:35:36 2018 -0500
+++ b/make/autoconf/basics.m4 Fri Mar 02 21:00:12 2018 +0100
@@ -1127,6 +1127,8 @@
fi
fi
BASIC_REQUIRE_PROGS(SETFILE, SetFile)
+ elif test "x$OPENJDK_TARGET_OS" = "xsolaris"; then
+ BASIC_REQUIRE_PROGS(ELFEDIT, elfedit)
fi
])
--- a/make/autoconf/boot-jdk.m4 Thu Mar 01 16:35:36 2018 -0500
+++ b/make/autoconf/boot-jdk.m4 Fri Mar 02 21:00:12 2018 +0100
@@ -77,10 +77,11 @@
BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $HEAD -n 1`
# Extra M4 quote needed to protect [] in grep expression.
- [FOUND_CORRECT_VERSION=`$ECHO $BOOT_JDK_VERSION | $EGREP '\"10([\.+-].*)?\"|\"9([\.+-].*)?\"'`]
+ [FOUND_CORRECT_VERSION=`$ECHO $BOOT_JDK_VERSION \
+ | $EGREP "\"(${DEFAULT_ACCEPTABLE_BOOT_VERSIONS// /|})([\.+-].*)?\""`]
if test "x$FOUND_CORRECT_VERSION" = x; then
AC_MSG_NOTICE([Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring])
- AC_MSG_NOTICE([(Your Boot JDK must be version 9 or 10)])
+ AC_MSG_NOTICE([(Your Boot JDK version must be one of: $DEFAULT_ACCEPTABLE_BOOT_VERSIONS)])
BOOT_JDK_FOUND=no
else
# We're done! :-)
@@ -510,10 +511,10 @@
BUILD_JDK_VERSION=`"$BUILD_JDK/bin/java" -version 2>&1 | $HEAD -n 1`
# Extra M4 quote needed to protect [] in grep expression.
- [FOUND_CORRECT_VERSION=`echo $BUILD_JDK_VERSION | $EGREP '\"10([\.+-].*)?\"'`]
+ [FOUND_CORRECT_VERSION=`echo $BUILD_JDK_VERSION | $EGREP "\"$VERSION_FEATURE([\.+-].*)?\""`]
if test "x$FOUND_CORRECT_VERSION" = x; then
AC_MSG_NOTICE([Potential Build JDK found at $BUILD_JDK is incorrect JDK version ($BUILD_JDK_VERSION); ignoring])
- AC_MSG_NOTICE([(Your Build JDK must be version 10)])
+ AC_MSG_NOTICE([(Your Build JDK must be version $VERSION_FEATURE)])
BUILD_JDK_FOUND=no
else
# We're done!
--- a/make/autoconf/configure.ac Thu Mar 01 16:35:36 2018 -0500
+++ b/make/autoconf/configure.ac Fri Mar 02 21:00:12 2018 +0100
@@ -163,10 +163,9 @@
# First determine the toolchain type (compiler family)
TOOLCHAIN_DETERMINE_TOOLCHAIN_TYPE
-# User supplied flags should be used when configure detects compilers
-FLAGS_SETUP_USER_SUPPLIED_FLAGS
-# The sysroot cflags are needed for configure to be able to run the compilers
-FLAGS_SETUP_SYSROOT_FLAGS
+# The global flags are needed for configure to be able to run the compilers
+# correctly.
+FLAGS_PRE_TOOLCHAIN
# Then detect the actual binaries needed
TOOLCHAIN_PRE_DETECTION
@@ -184,17 +183,15 @@
# Setup Jib dependency tool
TOOLCHAIN_SETUP_JIB
-FLAGS_SETUP_INIT_FLAGS
+# After toolchain setup, we need to process some flags to be able to continue.
+FLAGS_POST_TOOLCHAIN
# Now we can test some aspects on the target using configure macros.
PLATFORM_SETUP_OPENJDK_TARGET_BITS
PLATFORM_SETUP_OPENJDK_TARGET_ENDIANNESS
# Configure flags for the tools
-FLAGS_SETUP_COMPILER_FLAGS_FOR_LIBS
-FLAGS_SETUP_COMPILER_FLAGS_FOR_OPTIMIZATION
-FLAGS_SETUP_COMPILER_FLAGS_FOR_JDK
-FLAGS_SETUP_COMPILER_FLAGS_MISC
+FLAGS_SETUP_FLAGS
# Setup debug symbols (need objcopy from the toolchain for that)
JDKOPT_SETUP_DEBUG_SYMBOLS
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/make/autoconf/flags-cflags.m4 Fri Mar 02 21:00:12 2018 +0100
@@ -0,0 +1,878 @@
+#
+# Copyright (c) 2011, 2018, Oracle and/or its affiliates. All rights reserved.
+# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+#
+# This code is free software; you can redistribute it and/or modify it
+# under the terms of the GNU General Public License version 2 only, as
+# published by the Free Software Foundation. Oracle designates this
+# particular file as subject to the "Classpath" exception as provided
+# by Oracle in the LICENSE file that accompanied this code.
+#
+# This code is distributed in the hope that it will be useful, but WITHOUT
+# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+# FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
+# version 2 for more details (a copy is included in the LICENSE file that
+# accompanied this code).
+#
+# You should have received a copy of the GNU General Public License version
+# 2 along with this work; if not, write to the Free Software Foundation,
+# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
+#
+# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
+# or visit www.oracle.com if you need additional information or have any
+# questions.
+#
+
+################################################################################
+#
+# Setup flags for C/C++ compiler
+#
+
+###############################################################################
+#
+# How to compile shared libraries.
+#
+AC_DEFUN([FLAGS_SETUP_SHARED_LIBS],
+[
+ if test "x$TOOLCHAIN_TYPE" = xgcc; then
+ C_FLAG_REORDER=''
+
+ # Default works for linux, might work on other platforms as well.
+ SHARED_LIBRARY_FLAGS='-shared'
+ SET_EXECUTABLE_ORIGIN='-Wl,-rpath,\$$ORIGIN[$]1'
+ SET_SHARED_LIBRARY_ORIGIN="-Wl,-z,origin $SET_EXECUTABLE_ORIGIN"
+ SET_SHARED_LIBRARY_NAME='-Wl,-soname=[$]1'
+ SET_SHARED_LIBRARY_MAPFILE='-Wl,-version-script=[$]1'
+
+ elif test "x$TOOLCHAIN_TYPE" = xclang; then
+ C_FLAG_REORDER=''
+
+ if test "x$OPENJDK_TARGET_OS" = xmacosx; then
+ # Linking is different on MacOSX
+ SHARED_LIBRARY_FLAGS="-dynamiclib -compatibility_version 1.0.0 -current_version 1.0.0"
+ SET_EXECUTABLE_ORIGIN='-Wl,-rpath,@loader_path$(or [$]1,/.)'
+ SET_SHARED_LIBRARY_ORIGIN="$SET_EXECUTABLE_ORIGIN"
+ SET_SHARED_LIBRARY_NAME='-Wl,-install_name,@rpath/[$]1'
+ SET_SHARED_LIBRARY_MAPFILE='-Wl,-exported_symbols_list,[$]1'
+
+ else
+ # Default works for linux, might work on other platforms as well.
+ SHARED_LIBRARY_FLAGS='-shared'
+ SET_EXECUTABLE_ORIGIN='-Wl,-rpath,\$$ORIGIN[$]1'
+ SET_SHARED_LIBRARY_NAME='-Wl,-soname=[$]1'
+ SET_SHARED_LIBRARY_MAPFILE='-Wl,-version-script=[$]1'
+
+ # arm specific settings
+ if test "x$OPENJDK_TARGET_CPU" = "xarm"; then
+ # '-Wl,-z,origin' isn't used on arm.
+ SET_SHARED_LIBRARY_ORIGIN='-Wl,-rpath,\$$$$ORIGIN[$]1'
+ else
+ SET_SHARED_LIBRARY_ORIGIN="-Wl,-z,origin $SET_EXECUTABLE_ORIGIN"
+ fi
+ fi
+
+ elif test "x$TOOLCHAIN_TYPE" = xsolstudio; then
+ C_FLAG_REORDER='-xF'
+ SHARED_LIBRARY_FLAGS="-G"
+ SET_EXECUTABLE_ORIGIN='-R\$$ORIGIN[$]1'
+ SET_SHARED_LIBRARY_ORIGIN="$SET_EXECUTABLE_ORIGIN"
+ SET_SHARED_LIBRARY_NAME='-h [$]1'
+ SET_SHARED_LIBRARY_MAPFILE='-M[$]1'
+
+ elif test "x$TOOLCHAIN_TYPE" = xxlc; then
+ C_FLAG_REORDER=''
+ SHARED_LIBRARY_FLAGS="-qmkshrobj -bM:SRE -bnoentry"
+ SET_EXECUTABLE_ORIGIN=""
+ SET_SHARED_LIBRARY_ORIGIN=''
+ SET_SHARED_LIBRARY_NAME=''
+ SET_SHARED_LIBRARY_MAPFILE=''
+
+ elif test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
+ C_FLAG_REORDER=''
+ SHARED_LIBRARY_FLAGS="-dll"
+ SET_EXECUTABLE_ORIGIN=''
+ SET_SHARED_LIBRARY_ORIGIN=''
+ SET_SHARED_LIBRARY_NAME=''
+ SET_SHARED_LIBRARY_MAPFILE='-def:[$]1'
+ fi
+
+ AC_SUBST(C_FLAG_REORDER)
+ AC_SUBST(SET_EXECUTABLE_ORIGIN)
+ AC_SUBST(SET_SHARED_LIBRARY_ORIGIN)
+ AC_SUBST(SET_SHARED_LIBRARY_NAME)
+ AC_SUBST(SET_SHARED_LIBRARY_MAPFILE)
+ AC_SUBST(SHARED_LIBRARY_FLAGS)
+])
+
+AC_DEFUN([FLAGS_SETUP_DEBUG_SYMBOLS],
+[
+ # Debug symbols
+ if test "x$TOOLCHAIN_TYPE" = xgcc; then
+ CFLAGS_DEBUG_SYMBOLS="-g"
+ elif test "x$TOOLCHAIN_TYPE" = xclang; then
+ CFLAGS_DEBUG_SYMBOLS="-g"
+ elif test "x$TOOLCHAIN_TYPE" = xsolstudio; then
+ # -g0 enables debug symbols without disabling inlining.
+ CFLAGS_DEBUG_SYMBOLS="-g0 -xs"
+ elif test "x$TOOLCHAIN_TYPE" = xxlc; then
+ CFLAGS_DEBUG_SYMBOLS="-g"
+ elif test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
+ CFLAGS_DEBUG_SYMBOLS="-Z7 -d2Zi+"
+ fi
+
+ AC_SUBST(CFLAGS_DEBUG_SYMBOLS)
+
+ # FIXME: This was never used in the old build. What to do with it?
+ if test "x$TOOLCHAIN_TYPE" = xgcc; then
+ # "-Og" suppported for GCC 4.8 and later
+ CFLAG_OPTIMIZE_DEBUG_FLAG="-Og"
+ FLAGS_COMPILER_CHECK_ARGUMENTS(ARGUMENT: [$CFLAG_OPTIMIZE_DEBUG_FLAG],
+ IF_TRUE: [HAS_CFLAG_OPTIMIZE_DEBUG=true],
+ IF_FALSE: [HAS_CFLAG_OPTIMIZE_DEBUG=false])
+ fi
+])
+
+AC_DEFUN([FLAGS_SETUP_WARNINGS],
+[
+ AC_ARG_ENABLE([warnings-as-errors], [AS_HELP_STRING([--disable-warnings-as-errors],
+ [do not consider native warnings to be an error @<:@enabled@:>@])])
+
+ AC_MSG_CHECKING([if native warnings are errors])
+ if test "x$enable_warnings_as_errors" = "xyes"; then
+ AC_MSG_RESULT([yes (explicitly set)])
+ WARNINGS_AS_ERRORS=true
+ elif test "x$enable_warnings_as_errors" = "xno"; then
+ AC_MSG_RESULT([no])
+ WARNINGS_AS_ERRORS=false
+ elif test "x$enable_warnings_as_errors" = "x"; then
+ AC_MSG_RESULT([yes (default)])
+ WARNINGS_AS_ERRORS=true
+ else
+ AC_MSG_ERROR([--enable-warnings-as-errors accepts no argument])
+ fi
+
+ AC_SUBST(WARNINGS_AS_ERRORS)
+
+ case "${TOOLCHAIN_TYPE}" in
+ microsoft)
+ DISABLE_WARNING_PREFIX="-wd"
+ CFLAGS_WARNINGS_ARE_ERRORS="-WX"
+ ;;
+ solstudio)
+ DISABLE_WARNING_PREFIX="-erroff="
+ CFLAGS_WARNINGS_ARE_ERRORS="-errtags -errwarn=%all"
+ ;;
+ gcc)
+ # Prior to gcc 4.4, a -Wno-X where X is unknown for that version of gcc will cause an error
+ FLAGS_COMPILER_CHECK_ARGUMENTS(ARGUMENT: [-Wno-this-is-a-warning-that-do-not-exist],
+ IF_TRUE: [GCC_CAN_DISABLE_WARNINGS=true],
+ IF_FALSE: [GCC_CAN_DISABLE_WARNINGS=false]
+ )
+ if test "x$GCC_CAN_DISABLE_WARNINGS" = "xtrue"; then
+ DISABLE_WARNING_PREFIX="-Wno-"
+ else
+ DISABLE_WARNING_PREFIX=
+ fi
+ CFLAGS_WARNINGS_ARE_ERRORS="-Werror"
+ # Repeate the check for the BUILD_CC and BUILD_CXX. Need to also reset
+ # CFLAGS since any target specific flags will likely not work with the
+ # build compiler
+ CC_OLD="$CC"
+ CXX_OLD="$CXX"
+ CC="$BUILD_CC"
+ CXX="$BUILD_CXX"
+ CFLAGS_OLD="$CFLAGS"
+ CFLAGS=""
+ FLAGS_COMPILER_CHECK_ARGUMENTS(ARGUMENT: [-Wno-this-is-a-warning-that-do-not-exist],
+ IF_TRUE: [BUILD_CC_CAN_DISABLE_WARNINGS=true],
+ IF_FALSE: [BUILD_CC_CAN_DISABLE_WARNINGS=false]
+ )
+ if test "x$BUILD_CC_CAN_DISABLE_WARNINGS" = "xtrue"; then
+ BUILD_CC_DISABLE_WARNING_PREFIX="-Wno-"
+ else
+ BUILD_CC_DISABLE_WARNING_PREFIX=
+ fi
+ CC="$CC_OLD"
+ CXX="$CXX_OLD"
+ CFLAGS="$CFLAGS_OLD"
+ ;;
+ clang)
+ DISABLE_WARNING_PREFIX="-Wno-"
+ CFLAGS_WARNINGS_ARE_ERRORS="-Werror"
+ ;;
+ xlc)
+ DISABLE_WARNING_PREFIX="-qsuppress="
+ CFLAGS_WARNINGS_ARE_ERRORS="-qhalt=w"
+ ;;
+ esac
+ AC_SUBST(DISABLE_WARNING_PREFIX)
+ AC_SUBST(BUILD_CC_DISABLE_WARNING_PREFIX)
+ AC_SUBST(CFLAGS_WARNINGS_ARE_ERRORS)
+])
+
+AC_DEFUN([FLAGS_SETUP_QUALITY_CHECKS],
+[
+ # bounds, memory and behavior checking options
+ if test "x$TOOLCHAIN_TYPE" = xgcc; then
+ case $DEBUG_LEVEL in
+ release )
+ # no adjustment
+ ;;
+ fastdebug )
+ # no adjustment
+ ;;
+ slowdebug )
+ # FIXME: By adding this to C(XX)FLAGS_DEBUG_OPTIONS/JVM_CFLAGS_SYMBOLS it
+ # get's added conditionally on whether we produce debug symbols or not.
+ # This is most likely not really correct.
+
+ # Add runtime stack smashing and undefined behavior checks.
+ # Not all versions of gcc support -fstack-protector
+ STACK_PROTECTOR_CFLAG="-fstack-protector-all"
+ FLAGS_COMPILER_CHECK_ARGUMENTS(ARGUMENT: [$STACK_PROTECTOR_CFLAG -Werror],
+ IF_FALSE: [STACK_PROTECTOR_CFLAG=""])
+
+ CFLAGS_DEBUG_OPTIONS="$STACK_PROTECTOR_CFLAG --param ssp-buffer-size=1"
+ CXXFLAGS_DEBUG_OPTIONS="$STACK_PROTECTOR_CFLAG --param ssp-buffer-size=1"
+
+ if test "x$STACK_PROTECTOR_CFLAG" != x; then
+ JVM_CFLAGS_SYMBOLS="$JVM_CFLAGS_SYMBOLS $STACK_PROTECTOR_CFLAG --param ssp-buffer-size=1"
+ fi
+ ;;
+ esac
+ fi
+])
+
+AC_DEFUN([FLAGS_SETUP_OPTIMIZATION],
+[
+ if test "x$TOOLCHAIN_TYPE" = xsolstudio; then
+ CC_HIGHEST="-fns -fsimple -fsingle -xbuiltin=%all -xdepend -xrestrict -xlibmil"
+
+ C_O_FLAG_HIGHEST_JVM="-xO4"
+ C_O_FLAG_DEBUG_JVM=""
+ C_O_FLAG_SIZE=""
+ C_O_FLAG_DEBUG=""
+ C_O_FLAG_NONE=""
+ if test "x$OPENJDK_TARGET_CPU_ARCH" = "xx86"; then
+ C_O_FLAG_HIGHEST="-xO4 -Wu,-O4~yz $CC_HIGHEST"
+ C_O_FLAG_HI="-xO4 -Wu,-O4~yz"
+ C_O_FLAG_NORM="-xO2 -Wu,-O2~yz"
+ elif test "x$OPENJDK_TARGET_CPU_ARCH" = "xsparc"; then
+ C_O_FLAG_HIGHEST="-xO4 -Wc,-Qrm-s -Wc,-Qiselect-T0 \
+ -xprefetch=auto,explicit -xchip=ultra $CC_HIGHEST"
+ C_O_FLAG_HI="-xO4 -Wc,-Qrm-s -Wc,-Qiselect-T0"
+ C_O_FLAG_NORM="-xO2 -Wc,-Qrm-s -Wc,-Qiselect-T0"
+ fi
+ elif test "x$TOOLCHAIN_TYPE" = xgcc; then
+ C_O_FLAG_HIGHEST_JVM="-O3"
+ C_O_FLAG_HIGHEST="-O3"
+ C_O_FLAG_HI="-O3"
+ C_O_FLAG_NORM="-O2"
+ C_O_FLAG_SIZE="-Os"
+ C_O_FLAG_DEBUG="-O0"
+ C_O_FLAG_DEBUG_JVM="-O0"
+ C_O_FLAG_NONE="-O0"
+ elif test "x$TOOLCHAIN_TYPE" = xclang; then
+ if test "x$OPENJDK_TARGET_OS" = xmacosx; then
+ # On MacOSX we optimize for size, something
+ # we should do for all platforms?
+ C_O_FLAG_HIGHEST_JVM="-Os"
+ C_O_FLAG_HIGHEST="-Os"
+ C_O_FLAG_HI="-Os"
+ C_O_FLAG_NORM="-Os"
+ C_O_FLAG_DEBUG_JVM=""
+ else
+ C_O_FLAG_HIGHEST_JVM="-O3"
+ C_O_FLAG_HIGHEST="-O3"
+ C_O_FLAG_HI="-O3"
+ C_O_FLAG_NORM="-O2"
+ C_O_FLAG_DEBUG_JVM="-O0"
+ fi
+ C_O_FLAG_SIZE="-Os"
+ C_O_FLAG_DEBUG="-O0"
+ C_O_FLAG_NONE="-O0"
+ elif test "x$TOOLCHAIN_TYPE" = xxlc; then
+ C_O_FLAG_HIGHEST_JVM="-O3 -qhot=level=1 -qinline -qinlglue"
+ C_O_FLAG_HIGHEST="-O3 -qhot=level=1 -qinline -qinlglue"
+ C_O_FLAG_HI="-O3 -qinline -qinlglue"
+ C_O_FLAG_NORM="-O2"
+ C_O_FLAG_DEBUG="-qnoopt"
+ # FIXME: Value below not verified.
+ C_O_FLAG_DEBUG_JVM=""
+ C_O_FLAG_NONE="-qnoopt"
+ elif test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
+ C_O_FLAG_HIGHEST_JVM="-O2 -Oy-"
+ C_O_FLAG_HIGHEST="-O2"
+ C_O_FLAG_HI="-O1"
+ C_O_FLAG_NORM="-O1"
+ C_O_FLAG_DEBUG="-Od"
+ C_O_FLAG_DEBUG_JVM=""
+ C_O_FLAG_NONE="-Od"
+ C_O_FLAG_SIZE="-Os"
+ fi
+
+ # Now copy to C++ flags
+ CXX_O_FLAG_HIGHEST_JVM="$C_O_FLAG_HIGHEST_JVM"
+ CXX_O_FLAG_HIGHEST="$C_O_FLAG_HIGHEST"
+ CXX_O_FLAG_HI="$C_O_FLAG_HI"
+ CXX_O_FLAG_NORM="$C_O_FLAG_NORM"
+ CXX_O_FLAG_DEBUG="$C_O_FLAG_DEBUG"
+ CXX_O_FLAG_DEBUG_JVM="$C_O_FLAG_DEBUG_JVM"
+ CXX_O_FLAG_NONE="$C_O_FLAG_NONE"
+ CXX_O_FLAG_SIZE="$C_O_FLAG_SIZE"
+
+ if test "x$TOOLCHAIN_TYPE" = xsolstudio; then
+ # In solstudio, also add this to C (but not C++) flags...
+ C_O_FLAG_HIGHEST="$C_O_FLAG_HIGHEST -xalias_level=basic"
+ fi
+
+ # Adjust optimization flags according to debug level.
+ case $DEBUG_LEVEL in
+ release )
+ # no adjustment
+ ;;
+ fastdebug )
+ # Not quite so much optimization
+ C_O_FLAG_HI="$C_O_FLAG_NORM"
+ CXX_O_FLAG_HI="$CXX_O_FLAG_NORM"
+ ;;
+ slowdebug )
+ # Disable optimization
+ C_O_FLAG_HIGHEST_JVM="$C_O_FLAG_DEBUG_JVM"
+ C_O_FLAG_HIGHEST="$C_O_FLAG_DEBUG"
+ C_O_FLAG_HI="$C_O_FLAG_DEBUG"
+ C_O_FLAG_NORM="$C_O_FLAG_DEBUG"
+ C_O_FLAG_SIZE="$C_O_FLAG_DEBUG"
+ CXX_O_FLAG_HIGHEST_JVM="$CXX_O_FLAG_DEBUG_JVM"
+ CXX_O_FLAG_HIGHEST="$CXX_O_FLAG_DEBUG"
+ CXX_O_FLAG_HI="$CXX_O_FLAG_DEBUG"
+ CXX_O_FLAG_NORM="$CXX_O_FLAG_DEBUG"
+ CXX_O_FLAG_SIZE="$CXX_O_FLAG_DEBUG"
+ ;;
+ esac
+
+ AC_SUBST(C_O_FLAG_HIGHEST_JVM)
+ AC_SUBST(C_O_FLAG_HIGHEST)
+ AC_SUBST(C_O_FLAG_HI)
+ AC_SUBST(C_O_FLAG_NORM)
+ AC_SUBST(C_O_FLAG_NONE)
+ AC_SUBST(C_O_FLAG_SIZE)
+ AC_SUBST(CXX_O_FLAG_HIGHEST_JVM)
+ AC_SUBST(CXX_O_FLAG_HIGHEST)
+ AC_SUBST(CXX_O_FLAG_HI)
+ AC_SUBST(CXX_O_FLAG_NORM)
+ AC_SUBST(CXX_O_FLAG_NONE)
+ AC_SUBST(CXX_O_FLAG_SIZE)
+])
+
+AC_DEFUN([FLAGS_SETUP_CFLAGS],
+[
+ ### CFLAGS
+
+ FLAGS_SETUP_CFLAGS_HELPER
+
+ FLAGS_OS=$OPENJDK_TARGET_OS
+ FLAGS_OS_TYPE=$OPENJDK_TARGET_OS_TYPE
+ FLAGS_CPU=$OPENJDK_TARGET_CPU
+ FLAGS_CPU_ARCH=$OPENJDK_TARGET_CPU_ARCH
+ FLAGS_CPU_BITS=$OPENJDK_TARGET_CPU_BITS
+ FLAGS_CPU_ENDIAN=$OPENJDK_TARGET_CPU_ENDIAN
+ FLAGS_CPU_LEGACY=$OPENJDK_TARGET_CPU_LEGACY
+ FLAGS_CPU_LEGACY_LIB=$OPENJDK_TARGET_CPU_LEGACY_LIB
+
+ FLAGS_SETUP_CFLAGS_CPU_DEP([TARGET])
+
+ FLAGS_OS=$OPENJDK_BUILD_OS
+ FLAGS_OS_TYPE=$OPENJDK_BUILD_OS_TYPE
+ FLAGS_CPU=$OPENJDK_BUILD_CPU
+ FLAGS_CPU_ARCH=$OPENJDK_BUILD_CPU_ARCH
+ FLAGS_CPU_BITS=$OPENJDK_BUILD_CPU_BITS
+ FLAGS_CPU_ENDIAN=$OPENJDK_BUILD_CPU_ENDIAN
+ FLAGS_CPU_LEGACY=$OPENJDK_BUILD_CPU_LEGACY
+ FLAGS_CPU_LEGACY_LIB=$OPENJDK_BUILD_CPU_LEGACY_LIB
+
+ FLAGS_SETUP_CFLAGS_CPU_DEP([BUILD], [OPENJDK_BUILD_])
+
+ # Tests are only ever compiled for TARGET
+ CFLAGS_TESTLIB="$CFLAGS_JDKLIB"
+ CXXFLAGS_TESTLIB="$CXXFLAGS_JDKLIB"
+ CFLAGS_TESTEXE="$CFLAGS_JDKEXE"
+ CXXFLAGS_TESTEXE="$CXXFLAGS_JDKEXE"
+
+ AC_SUBST(CFLAGS_TESTLIB)
+ AC_SUBST(CFLAGS_TESTEXE)
+ AC_SUBST(CXXFLAGS_TESTLIB)
+ AC_SUBST(CXXFLAGS_TESTEXE)
+])
+
+################################################################################
+# platform independent
+AC_DEFUN([FLAGS_SETUP_CFLAGS_HELPER],
+[
+ #### OS DEFINES, these should be independent on toolchain
+ if test "x$OPENJDK_TARGET_OS" = xlinux; then
+ CFLAGS_OS_DEF_JVM="-DLINUX"
+ CFLAGS_OS_DEF_JDK="-D_GNU_SOURCE -D_REENTRANT -D_LARGEFILE64_SOURCE"
+ elif test "x$OPENJDK_TARGET_OS" = xsolaris; then
+ CFLAGS_OS_DEF_JVM="-DSOLARIS"
+ CFLAGS_OS_DEF_JDK="-D__solaris__"
+ elif test "x$OPENJDK_TARGET_OS" = xmacosx; then
+ CFLAGS_OS_DEF_JVM="-D_ALLBSD_SOURCE -D_DARWIN_C_SOURCE -D_XOPEN_SOURCE"
+ CFLAGS_OS_DEF_JDK="-D_ALLBSD_SOURCE -D_DARWIN_UNLIMITED_SELECT"
+ elif test "x$OPENJDK_TARGET_OS" = xaix; then
+ CFLAGS_OS_DEF_JVM="-DAIX"
+ elif test "x$OPENJDK_TARGET_OS" = xbsd; then
+ CFLAGS_OS_DEF_JDK="-D_ALLBSD_SOURCE"
+ elif test "x$OPENJDK_TARGET_OS" = xwindows; then
+ CFLAGS_OS_DEF_JVM="-D_WINDOWS -DWIN32 -D_JNI_IMPLEMENTATION_"
+ fi
+
+ # Setup target OS define. Use OS target name but in upper case.
+ OPENJDK_TARGET_OS_UPPERCASE=`$ECHO $OPENJDK_TARGET_OS | $TR 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
+ CFLAGS_OS_DEF_JDK="$CFLAGS_OS_DEF_JDK -D$OPENJDK_TARGET_OS_UPPERCASE"
+
+ #### GLOBAL DEFINES
+ # Set some common defines. These works for all compilers, but assume
+ # -D is universally accepted.
+
+ # Always enable optional macros for VM.
+ ALWAYS_CFLAGS_JVM="-D__STDC_FORMAT_MACROS -D__STDC_LIMIT_MACROS -D__STDC_CONSTANT_MACROS"
+
+ # Setup some hard coded includes
+ ALWAYS_CFLAGS_JDK=" \
+ -I\$(SUPPORT_OUTPUTDIR)/modules_include/java.base \
+ -I\$(SUPPORT_OUTPUTDIR)/modules_include/java.base/\$(OPENJDK_TARGET_OS_INCLUDE_SUBDIR) \
+ -I${TOPDIR}/src/java.base/share/native/libjava \
+ -I${TOPDIR}/src/java.base/$OPENJDK_TARGET_OS_TYPE/native/libjava \
+ -I${TOPDIR}/src/hotspot/share/include \
+ -I${TOPDIR}/src/hotspot/os/${HOTSPOT_TARGET_OS_TYPE}/include"
+
+ ###############################################################################
+
+ # Adjust flags according to debug level.
+ # Setup debug/release defines
+ if test "x$DEBUG_LEVEL" = xrelease; then
+ DEBUG_CFLAGS_JDK="-DNDEBUG"
+ if test "x$OPENJDK_TARGET_OS" = xsolaris; then
+ DEBUG_CFLAGS_JDK="$DEBUG_CFLAGS_JDK -DTRIMMED"
+ fi
+ else
+ DEBUG_CFLAGS_JDK="-DDEBUG"
+
+ if test "x$TOOLCHAIN_TYPE" = xxlc; then
+ # We need '-qminimaltoc' or '-qpic=large -bbigtoc' if the TOC overflows.
+ # Hotspot now overflows its 64K TOC (currently only for debug),
+ # so for debug we build with '-qpic=large -bbigtoc'.
+ DEBUG_CFLAGS_JVM="-qpic=large"
+ fi
+ fi
+
+ if test "x$DEBUG_LEVEL" != xrelease; then
+ DEBUG_OPTIONS_FLAGS_JDK="$CFLAGS_DEBUG_OPTIONS"
+ DEBUG_SYMBOLS_CFLAGS_JDK="$CFLAGS_DEBUG_SYMBOLS"
+ fi
+
+ #### TOOLCHAIN DEFINES
+
+ if test "x$TOOLCHAIN_TYPE" = xgcc; then
+ ALWAYS_DEFINES_JVM="-D_GNU_SOURCE -D_REENTRANT"
+ elif test "x$TOOLCHAIN_TYPE" = xclang; then
+ ALWAYS_DEFINES_JVM="-D_GNU_SOURCE"
+ elif test "x$TOOLCHAIN_TYPE" = xsolstudio; then
+ ALWAYS_DEFINES_JVM="-DSPARC_WORKS -D_Crun_inline_placement"
+ ALWAYS_DEFINES_JDK="-DTRACING -DMACRO_MEMSYS_OPS -DBREAKPTS"
+ ALWAYS_DEFINES_JDK_CXXONLY="-DCC_NOEX"
+ elif test "x$TOOLCHAIN_TYPE" = xxlc; then
+ ALWAYS_DEFINES_JVM="-D_REENTRANT"
+ ALWAYS_DEFINES_JDK="-D_GNU_SOURCE -D_REENTRANT -D_LARGEFILE64_SOURCE -DSTDC"
+ elif test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
+ ALWAYS_DEFINES_JDK="-DWIN32_LEAN_AND_MEAN -D_CRT_SECURE_NO_DEPRECATE \
+ -D_CRT_NONSTDC_NO_DEPRECATE -DWIN32 -DIAL"
+ fi
+
+ ###############################################################################
+ #
+ #
+ # CFLAGS BASIC
+ if test "x$TOOLCHAIN_TYPE" = xgcc || test "x$TOOLCHAIN_TYPE" = xclang; then
+ # COMMON to gcc and clang
+ TOOLCHAIN_CFLAGS_JVM="-pipe -fno-rtti -fno-exceptions \
+ -fvisibility=hidden -fno-strict-aliasing -fno-omit-frame-pointer"
+ fi
+
+ if test "x$TOOLCHAIN_TYPE" = xgcc; then
+ TOOLCHAIN_CFLAGS_JVM="$TOOLCHAIN_CFLAGS_JVM -fcheck-new"
+ TOOLCHAIN_CFLAGS_JDK="-pipe"
+ TOOLCHAIN_CFLAGS_JDK_CONLY="-fno-strict-aliasing" # technically NOT for CXX (but since this gives *worse* performance, use no-strict-aliasing everywhere!)
+
+ CXXSTD_CXXFLAG="-std=gnu++98"
+ FLAGS_CXX_COMPILER_CHECK_ARGUMENTS(ARGUMENT: [$CXXSTD_CXXFLAG -Werror],
+ IF_FALSE: [CXXSTD_CXXFLAG=""])
+ TOOLCHAIN_CFLAGS_JDK_CXXONLY="$CXXSTD_CXXFLAG"
+ TOOLCHAIN_CFLAGS_JVM="$TOOLCHAIN_CFLAGS_JVM $CXXSTD_CXXFLAG"
+ ADLC_CXXFLAG="$CXXSTD_CXXFLAG"
+
+
+ elif test "x$TOOLCHAIN_TYPE" = xclang; then
+ # Restrict the debug information created by Clang to avoid
+ # too big object files and speed the build up a little bit
+ # (see http://llvm.org/bugs/show_bug.cgi?id=7554)
+ TOOLCHAIN_CFLAGS_JVM="$TOOLCHAIN_CFLAGS_JVM -flimit-debug-info"
+
+ if test "x$OPENJDK_TARGET_OS" = xlinux; then
+ TOOLCHAIN_CFLAGS_JDK="-pipe"
+ TOOLCHAIN_CFLAGS_JDK_CONLY="-fno-strict-aliasing" # technically NOT for CXX
+ fi
+ elif test "x$TOOLCHAIN_TYPE" = xsolstudio; then
+ TOOLCHAIN_CFLAGS_JDK="-mt"
+ TOOLCHAIN_CFLAGS_JDK_CONLY="-xc99=%none -xCC -Xa -v -W0,-noglobal" # C only
+ TOOLCHAIN_CFLAGS_JDK_CXXONLY="-features=no%except -norunpath -xnolib" # CXX only
+ TOOLCHAIN_CFLAGS_JVM="-template=no%extdef -features=no%split_init \
+ -library=stlport4 -mt -features=no%except"
+ if test "x$DEBUG_LEVEL" = xslowdebug; then
+ # Previously -g was used instead of -g0 for slowdebug; this is equivalent
+ # to setting +d.
+ TOOLCHAIN_CFLAGS_JVM="$TOOLCHAIN_CFLAGS_JVM +d"
+ fi
+
+ elif test "x$TOOLCHAIN_TYPE" = xxlc; then
+ TOOLCHAIN_CFLAGS_JDK="-qchars=signed -qfullpath -qsaveopt" # add on both CFLAGS
+ TOOLCHAIN_CFLAGS_JVM="-qtune=balanced \
+ -qalias=noansi -qstrict -qtls=default -qlanglvl=c99vla \
+ -qlanglvl=noredefmac -qnortti -qnoeh -qignerrno"
+ elif test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
+ TOOLCHAIN_CFLAGS_JVM="-nologo -MD -MP"
+ TOOLCHAIN_CFLAGS_JDK="-nologo -MD -Zc:wchar_t-"
+ fi
+
+ # CFLAGS WARNINGS STUFF
+ # Set JVM_CFLAGS warning handling
+ if test "x$TOOLCHAIN_TYPE" = xgcc || test "x$TOOLCHAIN_TYPE" = xclang; then
+ # COMMON to gcc and clang
+ WARNING_CFLAGS_JVM="-Wpointer-arith -Wsign-compare -Wunused-function"
+ if ! HOTSPOT_CHECK_JVM_VARIANT(zero); then
+ # Non-zero builds have stricter warnings
+ WARNING_CFLAGS_JVM="$WARNING_CFLAGS_JVM -Wundef -Wformat=2"
+ fi
+
+ fi
+ if test "x$TOOLCHAIN_TYPE" = xgcc; then
+ WARNING_CFLAGS_JDK="-Wall -Wextra -Wno-unused -Wno-unused-parameter -Wformat=2"
+ WARNING_CFLAGS_JVM="$WARNING_CFLAGS_JVM -Wunused-value -Woverloaded-virtual"
+
+ if ! HOTSPOT_CHECK_JVM_VARIANT(zero); then
+ # Non-zero builds have stricter warnings
+ WARNING_CFLAGS_JVM="$WARNING_CFLAGS_JVM -Wreturn-type"
+ fi
+ elif test "x$TOOLCHAIN_TYPE" = xclang; then
+ WARNING_CFLAGS_JVM="$WARNING_CFLAGS_JVM -Wno-deprecated"
+ if test "x$OPENJDK_TARGET_OS" = xlinux; then
+ WARNING_CFLAGS_JVM="$WARNING_CFLAGS_JVM -Wno-sometimes-uninitialized"
+ WARNING_CFLAGS_JDK="-Wall -Wextra -Wno-unused -Wno-unused-parameter -Wformat=2"
+ fi
+ elif test "x$TOOLCHAIN_TYPE" = xsolstudio; then
+ WARNING_CFLAGS_JDK_CONLY="-errshort=tags"
+ WARNING_CFLAGS_JDK_CXXONLY="+w"
+ WARNING_CFLAGS_JDK="-errtags=yes -errfmt"
+ elif test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
+ WARNING_CFLAGS="-W3"
+ WARNING_CFLAGS_JDK="-wd4800"
+ fi
+
+ # Set some additional per-OS defines.
+
+ # Additional macosx handling
+ if test "x$OPENJDK_TARGET_OS" = xmacosx; then
+ OS_CFLAGS="-DMAC_OS_X_VERSION_MIN_REQUIRED=$MACOSX_VERSION_MIN_NODOTS \
+ -mmacosx-version-min=$MACOSX_VERSION_MIN"
+
+ if test -n "$MACOSX_VERSION_MAX"; then
+ OS_CFLAGS="$OS_CFLAGS \
+ -DMAC_OS_X_VERSION_MAX_ALLOWED=$MACOSX_VERSION_MAX_NODOTS"
+ fi
+ fi
+
+ # Where does this really belong??
+ if test "x$TOOLCHAIN_TYPE" = xgcc || test "x$TOOLCHAIN_TYPE" = xclang; then
+ PICFLAG="-fPIC"
+ elif test "x$TOOLCHAIN_TYPE" = xsolstudio; then
+ PICFLAG="-KPIC"
+ elif test "x$TOOLCHAIN_TYPE" = xxlc; then
+ # '-qpic' defaults to 'qpic=small'. This means that the compiler generates only
+ # one instruction for accessing the TOC. If the TOC grows larger than 64K, the linker
+ # will have to patch this single instruction with a call to some out-of-order code which
+ # does the load from the TOC. This is of course slow. But in that case we also would have
+ # to use '-bbigtoc' for linking anyway so we could also change the PICFLAG to 'qpic=large'.
+ # With 'qpic=large' the compiler will by default generate a two-instruction sequence which
+ # can be patched directly by the linker and does not require a jump to out-of-order code.
+ # Another alternative instead of using 'qpic=large -bbigtoc' may be to use '-qminimaltoc'
+ # instead. This creates a distinct TOC for every compilation unit (and thus requires two
+ # loads for accessing a global variable). But there are rumors that this may be seen as a
+ # 'performance feature' because of improved code locality of the symbols used in a
+ # compilation unit.
+ PICFLAG="-qpic"
+ elif test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
+ PICFLAG=""
+ fi
+
+ JVM_PICFLAG="$PICFLAG"
+ JDK_PICFLAG="$PICFLAG"
+
+ if test "x$OPENJDK_TARGET_OS" = xmacosx; then
+ # Linking is different on MacOSX
+ JDK_PICFLAG=''
+ if test "x$STATIC_BUILD" = xtrue; then
+ JVM_PICFLAG=""
+ fi
+ fi
+
+ if test "x$OPENJDK_TARGET_OS" = xmacosx; then
+ OS_CFLAGS_JVM="$OS_CFLAGS_JVM -mno-omit-leaf-frame-pointer -mstack-alignment=16"
+ fi
+
+ # Optional POSIX functionality needed by the JVM
+ #
+ # Check if clock_gettime is available and in which library. This indicates
+ # availability of CLOCK_MONOTONIC for hotspot. But we don't need to link, so
+ # don't let it update LIBS.
+ save_LIBS="$LIBS"
+ AC_SEARCH_LIBS(clock_gettime, rt, [HAS_CLOCK_GETTIME=true], [])
+ if test "x$LIBS" = "x-lrt "; then
+ CLOCK_GETTIME_IN_LIBRT=true
+ fi
+ LIBS="$save_LIBS"
+
+ if test "x$HAS_CLOCK_GETTIME" = "xtrue"; then
+ OS_CFLAGS_JVM="$OS_CFLAGS_JVM -DSUPPORTS_CLOCK_MONOTONIC"
+ if test "x$CLOCK_GETTIME_IN_LIBRT" = "xtrue"; then
+ OS_CFLAGS_JVM="$OS_CFLAGS_JVM -DNEEDS_LIBRT"
+ fi
+ fi
+
+ # EXPORT
+ AC_SUBST(ADLC_CXXFLAG)
+])
+
+################################################################################
+# $1 - Either BUILD or TARGET to pick the correct OS/CPU variables to check
+# conditionals against.
+# $2 - Optional prefix for each variable defined.
+AC_DEFUN([FLAGS_SETUP_CFLAGS_CPU_DEP],
+[
+ #### CPU DEFINES, these should (in theory) be independent on toolchain
+
+ # Setup target CPU
+ # Setup endianness
+ if test "x$FLAGS_CPU_ENDIAN" = xlittle; then
+ $1_DEFINES_CPU_JVM="-DVM_LITTLE_ENDIAN"
+ fi
+ if test "x$TOOLCHAIN_TYPE" = xsolstudio; then
+ # The macro _LITTLE_ENDIAN needs to be defined the same to avoid the
+ # Sun C compiler warning message: warning: macro redefined: _LITTLE_ENDIAN
+ if test "x$FLAGS_CPU_ENDIAN" = xlittle; then
+ $1_DEFINES_CPU_JDK="-D_LITTLE_ENDIAN="
+ else
+ $1_DEFINES_CPU_JDK="-D_BIG_ENDIAN="
+ fi
+ else
+ if test "x$FLAGS_CPU_ENDIAN" = xlittle; then
+ $1_DEFINES_CPU_JDK="-D_LITTLE_ENDIAN"
+ else
+ $1_DEFINES_CPU_JDK="-D_BIG_ENDIAN"
+ fi
+ fi
+
+ # setup CPU bit size
+ $1_DEFINES_CPU_JDK="${$1_DEFINES_CPU_JDK} -DARCH='\"$FLAGS_CPU_LEGACY\"' \
+ -D$FLAGS_CPU_LEGACY"
+
+ if test "x$FLAGS_CPU_BITS" = x64; then
+ # -D_LP64=1 is only set on linux and mac. Setting on windows causes diff in
+ # unpack200.exe.
+ if test "x$FLAGS_OS" = xlinux || test "x$FLAGS_OS" = xmacosx; then
+ $1_DEFINES_CPU_JDK="${$1_DEFINES_CPU_JDK} -D_LP64=1"
+ fi
+ if test "x$FLAGS_OS" != xsolaris && test "x$FLAGS_OS" != xaix; then
+ # Solaris does not have _LP64=1 in the old build.
+ # xlc on AIX defines _LP64=1 by default and issues a warning if we redefine it.
+ $1_DEFINES_CPU_JVM="${$1_DEFINES_CPU_JVM} -D_LP64=1"
+ fi
+ fi
+
+ # toolchain dependend, per-cpu
+ if test "x$TOOLCHAIN_TYPE" = xsolstudio; then
+ if test "x$FLAGS_CPU_ARCH" = xx86; then
+ $1_DEFINES_CPU_JDK="${$1_DEFINES_CPU_JDK} -DcpuIntel -Di586 -D$FLAGS_CPU_LEGACY_LIB"
+ fi
+ elif test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
+ if test "x$FLAGS_CPU" = xx86_64; then
+ $1_DEFINES_CPU_JDK="${$1_DEFINES_CPU_JDK} -D_AMD64_ -Damd64"
+ else
+ $1_DEFINES_CPU_JDK="${$1_DEFINES_CPU_JDK} -D_X86_ -Dx86"
+ fi
+ fi
+
+ # CFLAGS PER CPU
+ if test "x$TOOLCHAIN_TYPE" = xgcc || test "x$TOOLCHAIN_TYPE" = xclang; then
+ # COMMON to gcc and clang
+ if test "x$FLAGS_CPU" = xx86; then
+ # Force compatibility with i586 on 32 bit intel platforms.
+ $1_CFLAGS_CPU="-march=i586"
+ fi
+ fi
+
+ if test "x$TOOLCHAIN_TYPE" = xgcc; then
+ if test "x$FLAGS_CPU" = xarm; then
+ # -Wno-psabi to get rid of annoying "note: the mangling of 'va_list' has changed in GCC 4.4"
+ $1_CFLAGS_CPU="-fsigned-char -Wno-psabi $ARM_ARCH_TYPE_FLAGS $ARM_FLOAT_TYPE_FLAGS -DJDK_ARCH_ABI_PROP_NAME='\"\$(JDK_ARCH_ABI_PROP_NAME)\"'"
+ $1_CFLAGS_CPU_JVM="-DARM"
+ elif test "x$FLAGS_CPU" = xaarch64; then
+ if test "x$HOTSPOT_TARGET_CPU_PORT" = xarm64; then
+ $1_CFLAGS_CPU_JVM="-fsigned-char -DARM"
+ fi
+ elif test "x$FLAGS_CPU_ARCH" = xppc; then
+ $1_CFLAGS_CPU_JVM="-minsert-sched-nops=regroup_exact -mno-multiple -mno-string"
+ if test "x$FLAGS_CPU" = xppc64; then
+ # -mminimal-toc fixes `relocation truncated to fit' error for gcc 4.1.
+ # Use ppc64 instructions, but schedule for power5
+ $1_CFLAGS_CPU_JVM="${$1_CFLAGS_CPU_JVM} -mminimal-toc -mcpu=powerpc64 -mtune=power5"
+ elif test "x$FLAGS_CPU" = xppc64le; then
+ # Little endian machine uses ELFv2 ABI.
+ # Use Power8, this is the first CPU to support PPC64 LE with ELFv2 ABI.
+ $1_CFLAGS_CPU_JVM="${$1_CFLAGS_CPU_JVM} -DABI_ELFv2 -mcpu=power8 -mtune=power8"
+ fi
+ elif test "x$FLAGS_CPU" = xs390x; then
+ $1_CFLAGS_CPU="-mbackchain -march=z10"
+ fi
+
+ if test "x$FLAGS_CPU_ARCH" != xarm && test "x$FLAGS_CPU_ARCH" != xppc; then
+ # for all archs except arm and ppc, prevent gcc to omit frame pointer
+ $1_CFLAGS_CPU_JDK="${$1_CFLAGS_CPU_JDK} -fno-omit-frame-pointer"
+ fi
+
+ elif test "x$TOOLCHAIN_TYPE" = xclang; then
+ if test "x$FLAGS_OS" = xlinux; then
+ # ppc test not really needed for clang
+ if test "x$FLAGS_CPU_ARCH" != xarm && test "x$FLAGS_CPU_ARCH" != xppc; then
+ # for all archs except arm and ppc, prevent gcc to omit frame pointer
+ $1_CFLAGS_CPU_JDK="${$1_CFLAGS_CPU_JDK} -fno-omit-frame-pointer"
+ fi
+ fi
+
+ elif test "x$TOOLCHAIN_TYPE" = xsolstudio; then
+ if test "x$FLAGS_CPU" = xx86_64; then
+ # NOTE: -xregs=no%frameptr is supposed to be default on x64
+ $1_CFLAGS_CPU_JDK="-xregs=no%frameptr"
+ elif test "x$FLAGS_CPU" = xsparcv9; then
+ $1_CFLAGS_CPU_JVM="-xarch=sparc"
+ $1_CFLAGS_CPU_JDK_LIBONLY="-xregs=no%appl"
+ fi
+
+ elif test "x$TOOLCHAIN_TYPE" = xxlc; then
+ if test "x$FLAGS_CPU" = xppc64; then
+ $1_CFLAGS_CPU_JVM="-qarch=ppc64"
+ fi
+
+ elif test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
+ if test "x$FLAGS_CPU" = xx86; then
+ $1_CFLAGS_CPU_JVM="-arch:IA32"
+ elif test "x$OPENJDK_TARGET_CPU" = xx86_64; then
+ if test "x$DEBUG_LEVEL" != xrelease; then
+ # NOTE: This is probably redundant; -homeparams is default on
+ # non-release builds.
+ $1_CFLAGS_CPU_JVM="-homeparams"
+ fi
+ fi
+ fi
+
+ if test "x$TOOLCHAIN_TYPE" = xgcc; then
+ TOOLCHAIN_CHECK_COMPILER_VERSION(VERSION: 6, PREFIX: $2, IF_AT_LEAST: FLAGS_SETUP_GCC6_COMPILER_FLAGS($1))
+ $1_TOOLCHAIN_CFLAGS="${$1_GCC6_CFLAGS}"
+
+ TOOLCHAIN_CHECK_COMPILER_VERSION(VERSION: [4.8], PREFIX: $2,
+ IF_AT_LEAST: [
+ # These flags either do not work or give spurious warnings prior to gcc 4.8.
+ $1_WARNING_CFLAGS_JVM="-Wno-format-zero-length -Wtype-limits -Wuninitialized"
+ ]
+ )
+ fi
+
+ # EXPORT to API
+ CFLAGS_JVM_COMMON="$ALWAYS_CFLAGS_JVM $ALWAYS_DEFINES_JVM $TOOLCHAIN_CFLAGS_JVM \
+ $OS_CFLAGS $OS_CFLAGS_JVM $CFLAGS_OS_DEF_JVM $DEBUG_CFLAGS_JVM \
+ $WARNING_CFLAGS $WARNING_CFLAGS_JVM $JVM_PICFLAG"
+
+ CFLAGS_JDK_COMMON="$ALWAYS_CFLAGS_JDK $ALWAYS_DEFINES_JDK $TOOLCHAIN_CFLAGS_JDK \
+ $OS_CFLAGS $CFLAGS_OS_DEF_JDK $DEBUG_CFLAGS_JDK $DEBUG_OPTIONS_FLAGS_JDK \
+ $WARNING_CFLAGS $WARNING_CFLAGS_JDK $DEBUG_SYMBOLS_CFLAGS_JDK"
+
+ # Use ${$2EXTRA_CFLAGS} to block EXTRA_CFLAGS to be added to build flags.
+ # (Currently we don't have any OPENJDK_BUILD_EXTRA_CFLAGS, but that might
+ # change in the future.)
+
+ CFLAGS_JDK_COMMON_CONLY="$TOOLCHAIN_CFLAGS_JDK_CONLY \
+ $WARNING_CFLAGS_JDK_CONLY ${$2EXTRA_CFLAGS}"
+ CFLAGS_JDK_COMMON_CXXONLY="$ALWAYS_DEFINES_JDK_CXXONLY $TOOLCHAIN_CFLAGS_JDK_CXXONLY \
+ $WARNING_CFLAGS_JDK_CXXONLY ${$2EXTRA_CXXFLAGS}"
+
+ $1_CFLAGS_JVM="${$1_DEFINES_CPU_JVM} ${$1_CFLAGS_CPU} ${$1_CFLAGS_CPU_JVM} ${$1_TOOLCHAIN_CFLAGS} ${$1_WARNING_CFLAGS_JVM}"
+ $1_CFLAGS_JDK="${$1_DEFINES_CPU_JDK} ${$1_CFLAGS_CPU} ${$1_CFLAGS_CPU_JDK} ${$1_TOOLCHAIN_CFLAGS}"
+
+ $2JVM_CFLAGS="$CFLAGS_JVM_COMMON ${$1_CFLAGS_JVM} ${$2EXTRA_CXXFLAGS}"
+
+ $2CFLAGS_JDKEXE="$CFLAGS_JDK_COMMON $CFLAGS_JDK_COMMON_CONLY ${$1_CFLAGS_JDK}"
+ $2CXXFLAGS_JDKEXE="$CFLAGS_JDK_COMMON $CFLAGS_JDK_COMMON_CXXONLY ${$1_CFLAGS_JDK}"
+ $2CFLAGS_JDKLIB="${$2CFLAGS_JDKEXE} $JDK_PICFLAG ${$1_CFLAGS_CPU_JDK_LIBONLY}"
+ $2CXXFLAGS_JDKLIB="${$2CXXFLAGS_JDKEXE} $JDK_PICFLAG ${$1_CFLAGS_CPU_JDK_LIBONLY}"
+
+ AC_SUBST($2JVM_CFLAGS)
+ AC_SUBST($2CFLAGS_JDKLIB)
+ AC_SUBST($2CFLAGS_JDKEXE)
+ AC_SUBST($2CXXFLAGS_JDKLIB)
+ AC_SUBST($2CXXFLAGS_JDKEXE)
+])
+
+# FLAGS_SETUP_GCC6_COMPILER_FLAGS([PREFIX])
+# Arguments:
+# $1 - Prefix for each variable defined.
+AC_DEFUN([FLAGS_SETUP_GCC6_COMPILER_FLAGS],
+[
+ # These flags are required for GCC 6 builds as undefined behaviour in OpenJDK code
+ # runs afoul of the more aggressive versions of these optimisations.
+ # Notably, value range propagation now assumes that the this pointer of C++
+ # member functions is non-null.
+ NO_DELETE_NULL_POINTER_CHECKS_CFLAG="-fno-delete-null-pointer-checks"
+ dnl Argument check is disabled until FLAGS_COMPILER_CHECK_ARGUMENTS handles cross-compilation
+ dnl FLAGS_COMPILER_CHECK_ARGUMENTS(ARGUMENT: [$NO_DELETE_NULL_POINTER_CHECKS_CFLAG -Werror],
+ dnl IF_FALSE: [NO_DELETE_NULL_POINTER_CHECKS_CFLAG=""])
+ NO_LIFETIME_DSE_CFLAG="-fno-lifetime-dse"
+ dnl Argument check is disabled until FLAGS_COMPILER_CHECK_ARGUMENTS handles cross-compilation
+ dnl FLAGS_COMPILER_CHECK_ARGUMENTS(ARGUMENT: [$NO_LIFETIME_DSE_CFLAG -Werror],
+ dnl IF_FALSE: [NO_LIFETIME_DSE_CFLAG=""])
+ AC_MSG_NOTICE([GCC >= 6 detected; adding ${NO_DELETE_NULL_POINTER_CHECKS_CFLAG} and ${NO_LIFETIME_DSE_CFLAG}])
+ $1_GCC6_CFLAGS="${NO_DELETE_NULL_POINTER_CHECKS_CFLAG} ${NO_LIFETIME_DSE_CFLAG}"
+])
+
+# Documentation on common flags used for solstudio in HIGHEST.
+#
+# WARNING: Use of OPTIMIZATION_LEVEL=HIGHEST in your Makefile needs to be
+# done with care, there are some assumptions below that need to
+# be understood about the use of pointers, and IEEE behavior.
+#
+# -fns: Use non-standard floating point mode (not IEEE 754)
+# -fsimple: Do some simplification of floating point arithmetic (not IEEE 754)
+# -fsingle: Use single precision floating point with 'float'
+# -xalias_level=basic: Assume memory references via basic pointer types do not alias
+# (Source with excessing pointer casting and data access with mixed
+# pointer types are not recommended)
+# -xbuiltin=%all: Use intrinsic or inline versions for math/std functions
+# (If you expect perfect errno behavior, do not use this)
+# -xdepend: Loop data dependency optimizations (need -xO3 or higher)
+# -xrestrict: Pointer parameters to functions do not overlap
+# (Similar to -xalias_level=basic usage, but less obvious sometimes.
+# If you pass in multiple pointers to the same data, do not use this)
+# -xlibmil: Inline some library routines
+# (If you expect perfect errno behavior, do not use this)
+# -xlibmopt: Use optimized math routines (CURRENTLY DISABLED)
+# (If you expect perfect errno behavior, do not use this)
+# Can cause undefined external on Solaris 8 X86 on __sincos, removing for now
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/make/autoconf/flags-ldflags.m4 Fri Mar 02 21:00:12 2018 +0100
@@ -0,0 +1,234 @@
+#
+# Copyright (c) 2011, 2018, Oracle and/or its affiliates. All rights reserved.
+# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+#
+# This code is free software; you can redistribute it and/or modify it
+# under the terms of the GNU General Public License version 2 only, as
+# published by the Free Software Foundation. Oracle designates this
+# particular file as subject to the "Classpath" exception as provided
+# by Oracle in the LICENSE file that accompanied this code.
+#
+# This code is distributed in the hope that it will be useful, but WITHOUT
+# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+# FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
+# version 2 for more details (a copy is included in the LICENSE file that
+# accompanied this code).
+#
+# You should have received a copy of the GNU General Public License version
+# 2 along with this work; if not, write to the Free Software Foundation,
+# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
+#
+# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
+# or visit www.oracle.com if you need additional information or have any
+# questions.
+#
+
+################################################################################
+#
+
+AC_DEFUN([FLAGS_SETUP_LDFLAGS],
+[
+ FLAGS_SETUP_LDFLAGS_HELPER
+
+ # Setup the target toolchain
+
+ # On some platforms (mac) the linker warns about non existing -L dirs.
+ # For any of the variants server, client or minimal, the dir matches the
+ # variant name. The "main" variant should be used for linking. For the
+ # rest, the dir is just server.
+ if HOTSPOT_CHECK_JVM_VARIANT(server) || HOTSPOT_CHECK_JVM_VARIANT(client) \
+ || HOTSPOT_CHECK_JVM_VARIANT(minimal); then
+ TARGET_JVM_VARIANT_PATH=$JVM_VARIANT_MAIN
+ else
+ TARGET_JVM_VARIANT_PATH=server
+ fi
+ FLAGS_SETUP_LDFLAGS_CPU_DEP([TARGET])
+
+ # Setup the build toolchain
+
+ # When building a buildjdk, it's always only the server variant
+ BUILD_JVM_VARIANT_PATH=server
+
+ FLAGS_SETUP_LDFLAGS_CPU_DEP([BUILD], [OPENJDK_BUILD_])
+
+ LDFLAGS_TESTLIB="$LDFLAGS_JDKLIB"
+ LDFLAGS_TESTEXE="$LDFLAGS_JDKEXE ${TARGET_LDFLAGS_JDK_LIBPATH}"
+ AC_SUBST(LDFLAGS_TESTLIB)
+ AC_SUBST(LDFLAGS_TESTEXE)
+])
+
+################################################################################
+
+# CPU independent LDFLAGS setup, used for both target and build toolchain.
+AC_DEFUN([FLAGS_SETUP_LDFLAGS_HELPER],
+[
+ # Setup basic LDFLAGS
+ if test "x$TOOLCHAIN_TYPE" = xgcc; then
+ # "-z relro" supported in GNU binutils 2.17 and later
+ LINKER_RELRO_FLAG="-Wl,-z,relro"
+ FLAGS_LINKER_CHECK_ARGUMENTS(ARGUMENT: [$LINKER_RELRO_FLAG],
+ IF_TRUE: [HAS_LINKER_RELRO=true],
+ IF_FALSE: [HAS_LINKER_RELRO=false])
+
+ # "-z now" supported in GNU binutils 2.11 and later
+ LINKER_NOW_FLAG="-Wl,-z,now"
+ FLAGS_LINKER_CHECK_ARGUMENTS(ARGUMENT: [$LINKER_NOW_FLAG],
+ IF_TRUE: [HAS_LINKER_NOW=true],
+ IF_FALSE: [HAS_LINKER_NOW=false])
+
+ # If this is a --hash-style=gnu system, use --hash-style=both, why?
+ # We have previously set HAS_GNU_HASH if this is the case
+ if test -n "$HAS_GNU_HASH"; then
+ BASIC_LDFLAGS="-Wl,--hash-style=both"
+ LIBJSIG_HASHSTYLE_LDFLAGS="-Wl,--hash-style=both"
+ fi
+
+ # And since we now know that the linker is gnu, then add -z defs, to forbid
+ # undefined symbols in object files.
+ BASIC_LDFLAGS="$BASIC_LDFLAGS -Wl,-z,defs"
+
+ BASIC_LDFLAGS_JVM_ONLY="-Wl,-z,noexecstack -Wl,-O1"
+
+ BASIC_LDFLAGS_JDK_LIB_ONLY="-Wl,-z,noexecstack"
+ LIBJSIG_NOEXECSTACK_LDFLAGS="-Wl,-z,noexecstack"
+
+
+ if test "x$HAS_LINKER_RELRO" = "xtrue"; then
+ BASIC_LDFLAGS_JVM_ONLY="$BASIC_LDFLAGS_JVM_ONLY $LINKER_RELRO_FLAG"
+ fi
+
+ elif test "x$TOOLCHAIN_TYPE" = xclang; then
+ BASIC_LDFLAGS_JVM_ONLY="-mno-omit-leaf-frame-pointer -mstack-alignment=16 \
+ -stdlib=libstdc++ -fPIC"
+
+ elif test "x$TOOLCHAIN_TYPE" = xsolstudio; then
+ BASIC_LDFLAGS="-Wl,-z,defs"
+ BASIC_LDFLAGS_ONLYCXX="-norunpath"
+ BASIC_LDFLAGS_ONLYCXX_JDK_ONLY="-xnolib"
+
+ BASIC_LDFLAGS_JDK_ONLY="-ztext"
+ BASIC_LDFLAGS_JVM_ONLY="-library=%none -mt -z noversion"
+
+ elif test "x$TOOLCHAIN_TYPE" = xxlc; then
+ BASIC_LDFLAGS="-b64 -brtl -bnolibpath -bexpall -bernotok -btextpsize:64K \
+ -bdatapsize:64K -bstackpsize:64K"
+ BASIC_LDFLAGS_JVM_ONLY="-Wl,-lC_r"
+
+ elif test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
+ BASIC_LDFLAGS="-nologo -opt:ref"
+ BASIC_LDFLAGS_JDK_ONLY="-incremental:no"
+ BASIC_LDFLAGS_JVM_ONLY="-opt:icf,8 -subsystem:windows -base:0x8000000"
+ fi
+
+ # Setup OS-dependent LDFLAGS
+ if test "x$TOOLCHAIN_TYPE" = xclang || test "x$TOOLCHAIN_TYPE" = xgcc; then
+ if test "x$OPENJDK_TARGET_OS" = xmacosx; then
+ # Assume clang or gcc.
+ # FIXME: We should really generalize SET_SHARED_LIBRARY_ORIGIN instead.
+ OS_LDFLAGS_JVM_ONLY="-Wl,-rpath,@loader_path/. -Wl,-rpath,@loader_path/.."
+ OS_LDFLAGS_JDK_ONLY="-mmacosx-version-min=$MACOSX_VERSION_MIN"
+ fi
+ fi
+
+ # Setup debug level-dependent LDFLAGS
+ if test "x$TOOLCHAIN_TYPE" = xgcc; then
+ if test "x$OPENJDK_TARGET_OS" = xlinux; then
+ if test x$DEBUG_LEVEL = xrelease; then
+ DEBUGLEVEL_LDFLAGS_JDK_ONLY="$DEBUGLEVEL_LDFLAGS_JDK_ONLY -Wl,-O1"
+ else
+ # mark relocations read only on (fast/slow) debug builds
+ if test "x$HAS_LINKER_RELRO" = "xtrue"; then
+ DEBUGLEVEL_LDFLAGS_JDK_ONLY="$LINKER_RELRO_FLAG"
+ fi
+ fi
+ if test x$DEBUG_LEVEL = xslowdebug; then
+ if test "x$HAS_LINKER_NOW" = "xtrue"; then
+ # do relocations at load
+ DEBUGLEVEL_LDFLAGS="$LINKER_NOW_FLAG"
+ fi
+ fi
+ fi
+
+ elif test "x$TOOLCHAIN_TYPE" = xxlc; then
+ # We need '-qminimaltoc' or '-qpic=large -bbigtoc' if the TOC overflows.
+ # Hotspot now overflows its 64K TOC (currently only for debug),
+ # so we build with '-qpic=large -bbigtoc'.
+ if test "x$DEBUG_LEVEL" != xrelease; then
+ DEBUGLEVEL_LDFLAGS_JVM_ONLY="$DEBUGLEVEL_LDFLAGS_JVM_ONLY -bbigtoc"
+ fi
+ fi
+
+ # Setup LDFLAGS for linking executables
+ if test "x$TOOLCHAIN_TYPE" = xgcc; then
+ EXECUTABLE_LDFLAGS="$EXECUTABLE_LDFLAGS -Wl,--allow-shlib-undefined"
+ fi
+
+ # Export some intermediate variables for compatibility
+ LDFLAGS_CXX_JDK="$BASIC_LDFLAGS_ONLYCXX $BASIC_LDFLAGS_ONLYCXX_JDK_ONLY $DEBUGLEVEL_LDFLAGS_JDK_ONLY"
+ AC_SUBST(LDFLAGS_CXX_JDK)
+ AC_SUBST(LIBJSIG_HASHSTYLE_LDFLAGS)
+ AC_SUBST(LIBJSIG_NOEXECSTACK_LDFLAGS)
+])
+
+################################################################################
+# $1 - Either BUILD or TARGET to pick the correct OS/CPU variables to check
+# conditionals against.
+# $2 - Optional prefix for each variable defined.
+AC_DEFUN([FLAGS_SETUP_LDFLAGS_CPU_DEP],
+[
+ # Setup CPU-dependent basic LDFLAGS. These can differ between the target and
+ # build toolchain.
+ if test "x$TOOLCHAIN_TYPE" = xgcc; then
+ if test "x${OPENJDK_$1_CPU}" = xx86; then
+ $1_CPU_LDFLAGS_JVM_ONLY="-march=i586"
+ elif test "x$OPENJDK_$1_CPU" = xarm; then
+ $1_CPU_LDFLAGS_JVM_ONLY="${$1_CPU_LDFLAGS_JVM_ONLY} -fsigned-char"
+ $1_CPU_LDFLAGS="$ARM_ARCH_TYPE_FLAGS $ARM_FLOAT_TYPE_FLAGS"
+ elif test "x$FLAGS_CPU" = xaarch64; then
+ if test "x$HOTSPOT_TARGET_CPU_PORT" = xarm64; then
+ $1_CPU_LDFLAGS_JVM_ONLY="${$1_CPU_LDFLAGS_JVM_ONLY} -fsigned-char"
+ fi
+ fi
+
+ elif test "x$TOOLCHAIN_TYPE" = xsolstudio; then
+ if test "x${OPENJDK_$1_CPU}" = "xsparcv9"; then
+ $1_CPU_LDFLAGS_JVM_ONLY="-xarch=sparc"
+ fi
+
+ elif test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
+ if test "x${OPENJDK_$1_CPU}" = "xx86"; then
+ $1_CPU_LDFLAGS="-safeseh"
+ # NOTE: Old build added -machine. Probably not needed.
+ $1_CPU_LDFLAGS_JVM_ONLY="-machine:I386"
+ $1_CPU_EXECUTABLE_LDFLAGS="-stack:327680"
+ else
+ $1_CPU_LDFLAGS_JVM_ONLY="-machine:AMD64"
+ $1_CPU_EXECUTABLE_LDFLAGS="-stack:1048576"
+ fi
+ fi
+
+ # JVM_VARIANT_PATH depends on if this is build or target...
+ if test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
+ $1_LDFLAGS_JDK_LIBPATH="-libpath:${OUTPUTDIR}/support/modules_libs/java.base"
+ else
+ $1_LDFLAGS_JDK_LIBPATH="-L\$(SUPPORT_OUTPUTDIR)/modules_libs/java.base \
+ -L\$(SUPPORT_OUTPUTDIR)/modules_libs/java.base/${$1_JVM_VARIANT_PATH}"
+ fi
+
+ # Export variables according to old definitions, prefix with $2 if present.
+ LDFLAGS_JDK_COMMON="$BASIC_LDFLAGS $BASIC_LDFLAGS_JDK_ONLY \
+ $OS_LDFLAGS_JDK_ONLY $DEBUGLEVEL_LDFLAGS_JDK_ONLY ${$2EXTRA_LDFLAGS}"
+ $2LDFLAGS_JDKLIB="$LDFLAGS_JDK_COMMON $BASIC_LDFLAGS_JDK_LIB_ONLY \
+ ${$1_LDFLAGS_JDK_LIBPATH} $SHARED_LIBRARY_FLAGS"
+ $2LDFLAGS_JDKEXE="$LDFLAGS_JDK_COMMON $EXECUTABLE_LDFLAGS \
+ ${$1_CPU_EXECUTABLE_LDFLAGS}"
+
+ $2JVM_LDFLAGS="$BASIC_LDFLAGS $BASIC_LDFLAGS_JVM_ONLY $OS_LDFLAGS_JVM_ONLY \
+ $DEBUGLEVEL_LDFLAGS $DEBUGLEVEL_LDFLAGS_JVM_ONLY $BASIC_LDFLAGS_ONLYCXX \
+ ${$1_CPU_LDFLAGS} ${$1_CPU_LDFLAGS_JVM_ONLY} ${$2EXTRA_LDFLAGS}"
+
+ AC_SUBST($2LDFLAGS_JDKLIB)
+ AC_SUBST($2LDFLAGS_JDKEXE)
+
+ AC_SUBST($2JVM_LDFLAGS)
+])
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/make/autoconf/flags-other.m4 Fri Mar 02 21:00:12 2018 +0100
@@ -0,0 +1,126 @@
+#
+# Copyright (c) 2011, 2018, Oracle and/or its affiliates. All rights reserved.
+# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+#
+# This code is free software; you can redistribute it and/or modify it
+# under the terms of the GNU General Public License version 2 only, as
+# published by the Free Software Foundation. Oracle designates this
+# particular file as subject to the "Classpath" exception as provided
+# by Oracle in the LICENSE file that accompanied this code.
+#
+# This code is distributed in the hope that it will be useful, but WITHOUT
+# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+# FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
+# version 2 for more details (a copy is included in the LICENSE file that
+# accompanied this code).
+#
+# You should have received a copy of the GNU General Public License version
+# 2 along with this work; if not, write to the Free Software Foundation,
+# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
+#
+# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
+# or visit www.oracle.com if you need additional information or have any
+# questions.
+#
+
+################################################################################
+#
+# Setup flags for other tools than C/C++ compiler
+#
+
+AC_DEFUN([FLAGS_SETUP_ARFLAGS],
+[
+ # FIXME: figure out if we should select AR flags depending on OS or toolchain.
+ if test "x$OPENJDK_TARGET_OS" = xmacosx; then
+ ARFLAGS="-r -mmacosx-version-min=$MACOSX_VERSION_MIN"
+ elif test "x$OPENJDK_TARGET_OS" = xaix; then
+ ARFLAGS="-X64"
+ elif test "x$OPENJDK_TARGET_OS" = xwindows; then
+ # lib.exe is used as AR to create static libraries.
+ ARFLAGS="-nologo -NODEFAULTLIB:MSVCRT"
+ else
+ ARFLAGS=""
+ fi
+
+ AC_SUBST(ARFLAGS)
+])
+
+AC_DEFUN([FLAGS_SETUP_STRIPFLAGS],
+[
+ ## Setup strip.
+ # FIXME: should this really be per platform, or should it be per toolchain type?
+ # strip is not provided by clang or solstudio; so guessing platform makes most sense.
+ # FIXME: we should really only export STRIPFLAGS from here, not POST_STRIP_CMD.
+ if test "x$OPENJDK_TARGET_OS" = xlinux; then
+ STRIPFLAGS="-g"
+ elif test "x$OPENJDK_TARGET_OS" = xsolaris; then
+ STRIPFLAGS="-x"
+ elif test "x$OPENJDK_TARGET_OS" = xmacosx; then
+ STRIPFLAGS="-S"
+ elif test "x$OPENJDK_TARGET_OS" = xaix; then
+ STRIPFLAGS="-X32_64"
+ fi
+
+ AC_SUBST(STRIPFLAGS)
+])
+
+AC_DEFUN([FLAGS_SETUP_RCFLAGS],
+[
+ # On Windows, we need to set RC flags.
+ if test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
+ RC_FLAGS="-nologo -l0x409"
+ JVM_RCFLAGS="-nologo"
+ if test "x$DEBUG_LEVEL" = xrelease; then
+ RC_FLAGS="$RC_FLAGS -DNDEBUG"
+ JVM_RCFLAGS="$JVM_RCFLAGS -DNDEBUG"
+ fi
+
+ # The version variables used to create RC_FLAGS may be overridden
+ # in a custom configure script, or possibly the command line.
+ # Let those variables be expanded at make time in spec.gmk.
+ # The \$ are escaped to the shell, and the $(...) variables
+ # are evaluated by make.
+ RC_FLAGS="$RC_FLAGS \
+ -D\"JDK_VERSION_STRING=\$(VERSION_STRING)\" \
+ -D\"JDK_COMPANY=\$(COMPANY_NAME)\" \
+ -D\"JDK_COMPONENT=\$(PRODUCT_NAME) \$(JDK_RC_PLATFORM_NAME) binary\" \
+ -D\"JDK_VER=\$(VERSION_NUMBER)\" \
+ -D\"JDK_COPYRIGHT=Copyright \xA9 $COPYRIGHT_YEAR\" \
+ -D\"JDK_NAME=\$(PRODUCT_NAME) \$(JDK_RC_PLATFORM_NAME) \$(VERSION_FEATURE)\" \
+ -D\"JDK_FVER=\$(subst .,\$(COMMA),\$(VERSION_NUMBER_FOUR_POSITIONS))\""
+
+ JVM_RCFLAGS="$JVM_RCFLAGS \
+ -D\"HS_BUILD_ID=\$(VERSION_STRING)\" \
+ -D\"HS_COMPANY=\$(COMPANY_NAME)\" \
+ -D\"JDK_DOTVER=\$(VERSION_NUMBER_FOUR_POSITIONS)\" \
+ -D\"HS_COPYRIGHT=Copyright $COPYRIGHT_YEAR\" \
+ -D\"HS_NAME=\$(PRODUCT_NAME) \$(VERSION_SHORT)\" \
+ -D\"JDK_VER=\$(subst .,\$(COMMA),\$(VERSION_NUMBER_FOUR_POSITIONS))\" \
+ -D\"HS_FNAME=jvm.dll\" \
+ -D\"HS_INTERNAL_NAME=jvm\""
+ fi
+ AC_SUBST(RC_FLAGS)
+ AC_SUBST(JVM_RCFLAGS)
+])
+
+################################################################################
+# platform independent
+AC_DEFUN([FLAGS_SETUP_ASFLAGS],
+[
+ if test "x$OPENJDK_TARGET_OS" = xmacosx; then
+ JVM_BASIC_ASFLAGS="-x assembler-with-cpp -mno-omit-leaf-frame-pointer -mstack-alignment=16"
+ fi
+])
+
+################################################################################
+# $1 - Either BUILD or TARGET to pick the correct OS/CPU variables to check
+# conditionals against.
+# $2 - Optional prefix for each variable defined.
+AC_DEFUN([FLAGS_SETUP_ASFLAGS_CPU_DEP],
+[
+ # Misuse EXTRA_CFLAGS to mimic old behavior
+ $2JVM_ASFLAGS="$JVM_BASIC_ASFLAGS ${$2EXTRA_CFLAGS}"
+
+ AC_SUBST($2JVM_ASFLAGS)
+])
+
--- a/make/autoconf/flags.m4 Thu Mar 01 16:35:36 2018 -0500
+++ b/make/autoconf/flags.m4 Fri Mar 02 21:00:12 2018 +0100
@@ -23,6 +23,10 @@
# questions.
#
+m4_include([flags-cflags.m4])
+m4_include([flags-ldflags.m4])
+m4_include([flags-other.m4])
+
################################################################################
#
# Setup ABI profile (for arm)
@@ -94,21 +98,6 @@
AC_MSG_CHECKING([for ABI property name])
AC_MSG_RESULT([$JDK_ARCH_ABI_PROP_NAME])
AC_SUBST(JDK_ARCH_ABI_PROP_NAME)
-
- # Pass these on to the open part of configure as if they were set using
- # --with-extra-c[xx]flags.
- EXTRA_CFLAGS="$EXTRA_CFLAGS $ARM_ARCH_TYPE_FLAGS $ARM_FLOAT_TYPE_FLAGS"
- EXTRA_CXXFLAGS="$EXTRA_CXXFLAGS $ARM_ARCH_TYPE_FLAGS $ARM_FLOAT_TYPE_FLAGS"
- # Get rid of annoying "note: the mangling of 'va_list' has changed in GCC 4.4"
- # FIXME: This should not really be set using extra_cflags.
- if test "x$OPENJDK_TARGET_CPU" = xarm; then
- EXTRA_CFLAGS="$EXTRA_CFLAGS -Wno-psabi"
- EXTRA_CXXFLAGS="$EXTRA_CXXFLAGS -Wno-psabi"
- fi
- # Also add JDK_ARCH_ABI_PROP_NAME define, but only to CFLAGS.
- EXTRA_CFLAGS="$EXTRA_CFLAGS -DJDK_ARCH_ABI_PROP_NAME='\"\$(JDK_ARCH_ABI_PROP_NAME)\"'"
- # And pass the architecture flags to the linker as well
- EXTRA_LDFLAGS="$EXTRA_LDFLAGS $ARM_ARCH_TYPE_FLAGS $ARM_FLOAT_TYPE_FLAGS"
fi
# When building with an abi profile, the name of that profile is appended on the
@@ -118,19 +107,58 @@
fi
])
+AC_DEFUN([FLAGS_SETUP_MACOSX_VERSION],
+[
+ # Additional macosx handling
+ if test "x$OPENJDK_TARGET_OS" = xmacosx; then
+ # MACOSX_VERSION_MIN specifies the lowest version of Macosx that the built
+ # binaries should be compatible with, even if compiled on a newer version
+ # of the OS. It currently has a hard coded value. Setting this also limits
+ # exposure to API changes in header files. Bumping this is likely to
+ # require code changes to build.
+ MACOSX_VERSION_MIN=10.7.0
+ MACOSX_VERSION_MIN_NODOTS=${MACOSX_VERSION_MIN//\./}
+
+ AC_SUBST(MACOSX_VERSION_MIN)
+
+ # Setting --with-macosx-version-max=<version> makes it an error to build or
+ # link to macosx APIs that are newer than the given OS version. The expected
+ # format for <version> is either nn.n.n or nn.nn.nn. See /usr/include/AvailabilityMacros.h.
+ AC_ARG_WITH([macosx-version-max], [AS_HELP_STRING([--with-macosx-version-max],
+ [error on use of newer functionality. @<:@macosx@:>@])],
+ [
+ if echo "$with_macosx_version_max" | $GREP -q "^[[0-9]][[0-9]]\.[[0-9]]\.[[0-9]]\$"; then
+ MACOSX_VERSION_MAX=$with_macosx_version_max
+ elif echo "$with_macosx_version_max" | $GREP -q "^[[0-9]][[0-9]]\.[[0-9]][[0-9]]\.[[0-9]][[0-9]]\$"; then
+ MACOSX_VERSION_MAX=$with_macosx_version_max
+ elif test "x$with_macosx_version_max" = "xno"; then
+ # Use build system default
+ MACOSX_VERSION_MAX=
+ else
+ AC_MSG_ERROR([osx version format must be nn.n.n or nn.nn.nn])
+ fi
+ ],
+ [MACOSX_VERSION_MAX=]
+ )
+ MACOSX_VERSION_MAX_NODOTS=${MACOSX_VERSION_MAX//\./}
+
+ AC_SUBST(MACOSX_VERSION_MAX)
+ fi
+])
+
# Reset the global CFLAGS/LDFLAGS variables and initialize them with the
# corresponding configure arguments instead
AC_DEFUN_ONCE([FLAGS_SETUP_USER_SUPPLIED_FLAGS],
[
- if test "x$CFLAGS" != "x${ADDED_CFLAGS}"; then
+ if test "x$CFLAGS" != "x"; then
AC_MSG_WARN([Ignoring CFLAGS($CFLAGS) found in environment. Use --with-extra-cflags])
fi
- if test "x$CXXFLAGS" != "x${ADDED_CXXFLAGS}"; then
+ if test "x$CXXFLAGS" != "x"; then
AC_MSG_WARN([Ignoring CXXFLAGS($CXXFLAGS) found in environment. Use --with-extra-cxxflags])
fi
- if test "x$LDFLAGS" != "x${ADDED_LDFLAGS}"; then
+ if test "x$LDFLAGS" != "x"; then
AC_MSG_WARN([Ignoring LDFLAGS($LDFLAGS) found in environment. Use --with-extra-ldflags])
fi
@@ -143,20 +171,9 @@
AC_ARG_WITH(extra-ldflags, [AS_HELP_STRING([--with-extra-ldflags],
[extra flags to be used when linking jdk])])
- EXTRA_CFLAGS="$with_extra_cflags"
- EXTRA_CXXFLAGS="$with_extra_cxxflags"
- EXTRA_LDFLAGS="$with_extra_ldflags"
-
- AC_SUBST(EXTRA_CFLAGS)
- AC_SUBST(EXTRA_CXXFLAGS)
- AC_SUBST(EXTRA_LDFLAGS)
-
- # The global CFLAGS and LDLAGS variables are used by configure tests and
- # should include the extra parameters
- CFLAGS="$EXTRA_CFLAGS"
- CXXFLAGS="$EXTRA_CXXFLAGS"
- LDFLAGS="$EXTRA_LDFLAGS"
- CPPFLAGS=""
+ USER_CFLAGS="$with_extra_cflags"
+ USER_CXXFLAGS="$with_extra_cxxflags"
+ USER_LDFLAGS="$with_extra_ldflags"
])
# Setup the sysroot flags and add them to global CFLAGS and LDFLAGS so
@@ -193,11 +210,6 @@
$1SYSROOT_CFLAGS="-isysroot [$]$1SYSROOT"
$1SYSROOT_LDFLAGS="-isysroot [$]$1SYSROOT"
fi
- # The global CFLAGS and LDFLAGS variables need these for configure to function
- $1CFLAGS="[$]$1CFLAGS [$]$1SYSROOT_CFLAGS"
- $1CPPFLAGS="[$]$1CPPFLAGS [$]$1SYSROOT_CFLAGS"
- $1CXXFLAGS="[$]$1CXXFLAGS [$]$1SYSROOT_CFLAGS"
- $1LDFLAGS="[$]$1LDFLAGS [$]$1SYSROOT_LDFLAGS"
fi
if test "x$OPENJDK_TARGET_OS" = xmacosx; then
@@ -214,7 +226,53 @@
AC_SUBST($1SYSROOT_LDFLAGS)
])
-AC_DEFUN_ONCE([FLAGS_SETUP_INIT_FLAGS],
+AC_DEFUN_ONCE([FLAGS_PRE_TOOLCHAIN],
+[
+ # We should always include user supplied flags
+ FLAGS_SETUP_USER_SUPPLIED_FLAGS
+ # The sysroot flags are needed for configure to be able to run the compilers
+ FLAGS_SETUP_SYSROOT_FLAGS
+
+ if test "x$TOOLCHAIN_TYPE" = xxlc; then
+ MACHINE_FLAG="-q${OPENJDK_TARGET_CPU_BITS}"
+ elif test "x$TOOLCHAIN_TYPE" != xmicrosoft; then
+ if test "x$OPENJDK_TARGET_CPU" != xaarch64 &&
+ test "x$OPENJDK_TARGET_CPU" != xarm; then
+ MACHINE_FLAG="-m${OPENJDK_TARGET_CPU_BITS}"
+ fi
+ fi
+
+ # FIXME: global flags are not used yet...
+ # The "global" flags will *always* be set. Without them, it is not possible to
+ # get a working compilation.
+ GLOBAL_CFLAGS="$MACHINE_FLAG $SYSROOT_CFLAGS $USER_CFLAGS"
+ GLOBAL_CXXFLAGS="$MACHINE_FLAG $SYSROOT_CFLAGS $USER_CXXFLAGS"
+ GLOBAL_LDFLAGS="$MACHINE_FLAG $SYSROOT_LDFLAGS $USER_LDFLAGS"
+ # FIXME: Don't really know how to do with this, but this was the old behavior
+ GLOBAL_CPPFLAGS="$SYSROOT_CFLAGS"
+ AC_SUBST(GLOBAL_CFLAGS)
+ AC_SUBST(GLOBAL_CXXFLAGS)
+ AC_SUBST(GLOBAL_LDFLAGS)
+ AC_SUBST(GLOBAL_CPPFLAGS)
+
+ # FIXME: For compatilibity, export this as EXTRA_CFLAGS for now.
+ EXTRA_CFLAGS="$MACHINE_FLAG $USER_CFLAGS"
+ EXTRA_CXXFLAGS="$MACHINE_FLAG $USER_CXXFLAGS"
+ EXTRA_LDFLAGS="$MACHINE_FLAG $USER_LDFLAGS"
+
+ AC_SUBST(EXTRA_CFLAGS)
+ AC_SUBST(EXTRA_CXXFLAGS)
+ AC_SUBST(EXTRA_LDFLAGS)
+
+ # For autoconf testing to work, the global flags must also be stored in the
+ # "unnamed" CFLAGS etc.
+ CFLAGS="$GLOBAL_CFLAGS"
+ CXXFLAGS="$GLOBAL_CXXFLAGS"
+ LDFLAGS="$GLOBAL_LDFLAGS"
+ CPPFLAGS="$GLOBAL_CPPFLAGS"
+])
+
+AC_DEFUN([FLAGS_SETUP_TOOLCHAIN_CONTROL],
[
# COMPILER_TARGET_BITS_FLAG : option for selecting 32- or 64-bit output
# COMPILER_COMMAND_FILE_FLAG : option for passing a command file to the compiler
@@ -249,38 +307,17 @@
$RM command.file
fi
fi
+
AC_SUBST(COMPILER_TARGET_BITS_FLAG)
AC_SUBST(COMPILER_COMMAND_FILE_FLAG)
AC_SUBST(COMPILER_BINDCMD_FILE_FLAG)
- # FIXME: figure out if we should select AR flags depending on OS or toolchain.
- if test "x$OPENJDK_TARGET_OS" = xmacosx; then
- ARFLAGS="-r"
- elif test "x$OPENJDK_TARGET_OS" = xaix; then
- ARFLAGS="-X64"
- elif test "x$OPENJDK_TARGET_OS" = xwindows; then
- # lib.exe is used as AR to create static libraries.
- ARFLAGS="-nologo -NODEFAULTLIB:MSVCRT"
- else
- ARFLAGS=""
- fi
- AC_SUBST(ARFLAGS)
-
- ## Setup strip.
- # FIXME: should this really be per platform, or should it be per toolchain type?
- # strip is not provided by clang or solstudio; so guessing platform makes most sense.
- # FIXME: we should really only export STRIPFLAGS from here, not POST_STRIP_CMD.
- if test "x$OPENJDK_TARGET_OS" = xlinux; then
- STRIPFLAGS="-g"
- elif test "x$OPENJDK_TARGET_OS" = xsolaris; then
- STRIPFLAGS="-x"
- elif test "x$OPENJDK_TARGET_OS" = xmacosx; then
- STRIPFLAGS="-S"
- elif test "x$OPENJDK_TARGET_OS" = xaix; then
- STRIPFLAGS="-X32_64"
- fi
-
- AC_SUBST(STRIPFLAGS)
+ # Check that the compiler supports -mX (or -qX on AIX) flags
+ # Set COMPILER_SUPPORTS_TARGET_BITS_FLAG to 'true' if it does
+ FLAGS_COMPILER_CHECK_ARGUMENTS(ARGUMENT: [${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}],
+ IF_TRUE: [COMPILER_SUPPORTS_TARGET_BITS_FLAG=true],
+ IF_FALSE: [COMPILER_SUPPORTS_TARGET_BITS_FLAG=false])
+ AC_SUBST(COMPILER_SUPPORTS_TARGET_BITS_FLAG)
if test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
CC_OUT_OPTION=-Fo
@@ -303,216 +340,6 @@
AC_SUBST(LD_OUT_OPTION)
AC_SUBST(AR_OUT_OPTION)
- # On Windows, we need to set RC flags.
- if test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
- RC_FLAGS="-nologo -l0x409"
- JVM_RCFLAGS="-nologo"
- if test "x$DEBUG_LEVEL" = xrelease; then
- RC_FLAGS="$RC_FLAGS -DNDEBUG"
- JVM_RCFLAGS="$JVM_RCFLAGS -DNDEBUG"
- fi
-
- # The version variables used to create RC_FLAGS may be overridden
- # in a custom configure script, or possibly the command line.
- # Let those variables be expanded at make time in spec.gmk.
- # The \$ are escaped to the shell, and the $(...) variables
- # are evaluated by make.
- RC_FLAGS="$RC_FLAGS \
- -D\"JDK_VERSION_STRING=\$(VERSION_STRING)\" \
- -D\"JDK_COMPANY=\$(COMPANY_NAME)\" \
- -D\"JDK_COMPONENT=\$(PRODUCT_NAME) \$(JDK_RC_PLATFORM_NAME) binary\" \
- -D\"JDK_VER=\$(VERSION_NUMBER)\" \
- -D\"JDK_COPYRIGHT=Copyright \xA9 $COPYRIGHT_YEAR\" \
- -D\"JDK_NAME=\$(PRODUCT_NAME) \$(JDK_RC_PLATFORM_NAME) \$(VERSION_FEATURE)\" \
- -D\"JDK_FVER=\$(subst .,\$(COMMA),\$(VERSION_NUMBER_FOUR_POSITIONS))\""
-
- JVM_RCFLAGS="$JVM_RCFLAGS \
- -D\"HS_BUILD_ID=\$(VERSION_STRING)\" \
- -D\"HS_COMPANY=\$(COMPANY_NAME)\" \
- -D\"JDK_DOTVER=\$(VERSION_NUMBER_FOUR_POSITIONS)\" \
- -D\"HS_COPYRIGHT=Copyright $COPYRIGHT_YEAR\" \
- -D\"HS_NAME=\$(PRODUCT_NAME) \$(VERSION_SHORT)\" \
- -D\"JDK_VER=\$(subst .,\$(COMMA),\$(VERSION_NUMBER_FOUR_POSITIONS))\" \
- -D\"HS_FNAME=jvm.dll\" \
- -D\"HS_INTERNAL_NAME=jvm\""
- fi
- AC_SUBST(RC_FLAGS)
- AC_SUBST(JVM_RCFLAGS)
-
- if test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
- # silence copyright notice and other headers.
- COMMON_CCXXFLAGS="$COMMON_CCXXFLAGS -nologo"
- fi
-])
-
-AC_DEFUN([FLAGS_SETUP_COMPILER_FLAGS_FOR_LIBS],
-[
- ###############################################################################
- #
- # How to compile shared libraries.
- #
-
- if test "x$TOOLCHAIN_TYPE" = xgcc; then
- PICFLAG="-fPIC"
- C_FLAG_REORDER=''
- CXX_FLAG_REORDER=''
-
- if test "x$OPENJDK_TARGET_OS" = xmacosx; then
- # Linking is different on MacOSX
- if test "x$STATIC_BUILD" = xtrue; then
- SHARED_LIBRARY_FLAGS ='-undefined dynamic_lookup'
- else
- SHARED_LIBRARY_FLAGS="-dynamiclib -compatibility_version 1.0.0 -current_version 1.0.0 $PICFLAG"
- JVM_CFLAGS="$JVM_CFLAGS $PICFLAG"
- fi
- SET_EXECUTABLE_ORIGIN='-Wl,-rpath,@loader_path$(or [$]1,/.)'
- SET_SHARED_LIBRARY_ORIGIN="$SET_EXECUTABLE_ORIGIN"
- SET_SHARED_LIBRARY_NAME='-Wl,-install_name,@rpath/[$]1'
- SET_SHARED_LIBRARY_MAPFILE='-Wl,-exported_symbols_list,[$]1'
- else
- # Default works for linux, might work on other platforms as well.
- SHARED_LIBRARY_FLAGS='-shared'
- SET_EXECUTABLE_ORIGIN='-Wl,-rpath,\$$ORIGIN[$]1'
- SET_SHARED_LIBRARY_ORIGIN="-Wl,-z,origin $SET_EXECUTABLE_ORIGIN"
- SET_SHARED_LIBRARY_NAME='-Wl,-soname=[$]1'
- SET_SHARED_LIBRARY_MAPFILE='-Wl,-version-script=[$]1'
- fi
- elif test "x$TOOLCHAIN_TYPE" = xclang; then
- C_FLAG_REORDER=''
- CXX_FLAG_REORDER=''
-
- if test "x$OPENJDK_TARGET_OS" = xmacosx; then
- # Linking is different on MacOSX
- PICFLAG=''
- SHARED_LIBRARY_FLAGS="-dynamiclib -compatibility_version 1.0.0 -current_version 1.0.0 $PICFLAG"
- SET_EXECUTABLE_ORIGIN='-Wl,-rpath,@loader_path$(or [$]1,/.)'
- SET_SHARED_LIBRARY_ORIGIN="$SET_EXECUTABLE_ORIGIN"
- SET_SHARED_LIBRARY_NAME='-Wl,-install_name,@rpath/[$]1'
- SET_SHARED_LIBRARY_MAPFILE='-Wl,-exported_symbols_list,[$]1'
-
- if test "x$STATIC_BUILD" = xfalse; then
- JVM_CFLAGS="$JVM_CFLAGS -fPIC"
- fi
- else
- # Default works for linux, might work on other platforms as well.
- PICFLAG='-fPIC'
- SHARED_LIBRARY_FLAGS='-shared'
- SET_EXECUTABLE_ORIGIN='-Wl,-rpath,\$$ORIGIN[$]1'
- SET_SHARED_LIBRARY_NAME='-Wl,-soname=[$]1'
- SET_SHARED_LIBRARY_MAPFILE='-Wl,-version-script=[$]1'
-
- # arm specific settings
- if test "x$OPENJDK_TARGET_CPU" = "xarm"; then
- # '-Wl,-z,origin' isn't used on arm.
- SET_SHARED_LIBRARY_ORIGIN='-Wl,-rpath,\$$$$ORIGIN[$]1'
- else
- SET_SHARED_LIBRARY_ORIGIN="-Wl,-z,origin $SET_EXECUTABLE_ORIGIN"
- fi
-
- fi
- elif test "x$TOOLCHAIN_TYPE" = xsolstudio; then
- if test "x$OPENJDK_TARGET_CPU" = xsparcv9; then
- PICFLAG="-xcode=pic32"
- else
- PICFLAG="-KPIC"
- fi
- C_FLAG_REORDER='-xF'
- CXX_FLAG_REORDER='-xF'
- SHARED_LIBRARY_FLAGS="-G"
- SET_EXECUTABLE_ORIGIN='-R\$$ORIGIN[$]1'
- SET_SHARED_LIBRARY_ORIGIN="$SET_EXECUTABLE_ORIGIN"
- SET_SHARED_LIBRARY_NAME='-h [$]1'
- SET_SHARED_LIBRARY_MAPFILE='-M[$]1'
- elif test "x$TOOLCHAIN_TYPE" = xxlc; then
- # '-qpic' defaults to 'qpic=small'. This means that the compiler generates only
- # one instruction for accessing the TOC. If the TOC grows larger than 64K, the linker
- # will have to patch this single instruction with a call to some out-of-order code which
- # does the load from the TOC. This is of course slow. But in that case we also would have
- # to use '-bbigtoc' for linking anyway so we could also change the PICFLAG to 'qpic=large'.
- # With 'qpic=large' the compiler will by default generate a two-instruction sequence which
- # can be patched directly by the linker and does not require a jump to out-of-order code.
- # Another alternative instead of using 'qpic=large -bbigtoc' may be to use '-qminimaltoc'
- # instead. This creates a distinct TOC for every compilation unit (and thus requires two
- # loads for accessing a global variable). But there are rumors that this may be seen as a
- # 'performance feature' because of improved code locality of the symbols used in a
- # compilation unit.
- PICFLAG="-qpic"
- JVM_CFLAGS="$JVM_CFLAGS $PICFLAG"
- C_FLAG_REORDER=''
- CXX_FLAG_REORDER=''
- SHARED_LIBRARY_FLAGS="-qmkshrobj -bM:SRE -bnoentry"
- SET_EXECUTABLE_ORIGIN=""
- SET_SHARED_LIBRARY_ORIGIN=''
- SET_SHARED_LIBRARY_NAME=''
- SET_SHARED_LIBRARY_MAPFILE=''
- elif test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
- PICFLAG=""
- C_FLAG_REORDER=''
- CXX_FLAG_REORDER=''
- SHARED_LIBRARY_FLAGS="-dll"
- SET_EXECUTABLE_ORIGIN=''
- SET_SHARED_LIBRARY_ORIGIN=''
- SET_SHARED_LIBRARY_NAME=''
- SET_SHARED_LIBRARY_MAPFILE='-def:[$]1'
- fi
-
- AC_SUBST(C_FLAG_REORDER)
- AC_SUBST(CXX_FLAG_REORDER)
- AC_SUBST(SET_EXECUTABLE_ORIGIN)
- AC_SUBST(SET_SHARED_LIBRARY_ORIGIN)
- AC_SUBST(SET_SHARED_LIBRARY_NAME)
- AC_SUBST(SET_SHARED_LIBRARY_MAPFILE)
- AC_SUBST(SHARED_LIBRARY_FLAGS)
-
- # The (cross) compiler is now configured, we can now test capabilities
- # of the target platform.
-])
-
-# Documentation on common flags used for solstudio in HIGHEST.
-#
-# WARNING: Use of OPTIMIZATION_LEVEL=HIGHEST in your Makefile needs to be
-# done with care, there are some assumptions below that need to
-# be understood about the use of pointers, and IEEE behavior.
-#
-# -fns: Use non-standard floating point mode (not IEEE 754)
-# -fsimple: Do some simplification of floating point arithmetic (not IEEE 754)
-# -fsingle: Use single precision floating point with 'float'
-# -xalias_level=basic: Assume memory references via basic pointer types do not alias
-# (Source with excessing pointer casting and data access with mixed
-# pointer types are not recommended)
-# -xbuiltin=%all: Use intrinsic or inline versions for math/std functions
-# (If you expect perfect errno behavior, do not use this)
-# -xdepend: Loop data dependency optimizations (need -xO3 or higher)
-# -xrestrict: Pointer parameters to functions do not overlap
-# (Similar to -xalias_level=basic usage, but less obvious sometimes.
-# If you pass in multiple pointers to the same data, do not use this)
-# -xlibmil: Inline some library routines
-# (If you expect perfect errno behavior, do not use this)
-# -xlibmopt: Use optimized math routines (CURRENTLY DISABLED)
-# (If you expect perfect errno behavior, do not use this)
-# Can cause undefined external on Solaris 8 X86 on __sincos, removing for now
-
- # FIXME: this will never happen since sparc != sparcv9, ie 32 bit, which we don't build anymore.
- # Bug?
- #if test "x$OPENJDK_TARGET_CPU" = xsparc; then
- # CFLAGS_JDK="${CFLAGS_JDK} -xmemalign=4s"
- # CXXFLAGS_JDK="${CXXFLAGS_JDK} -xmemalign=4s"
- #fi
-
-AC_DEFUN_ONCE([FLAGS_SETUP_COMPILER_FLAGS_FOR_OPTIMIZATION],
-[
-
- ###############################################################################
- #
- # Setup the opt flags for different compilers
- # and different operating systems.
- #
-
- # FIXME: this was indirectly the old default, but just inherited.
- # if test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
- # C_FLAG_DEPS="-MMD -MF"
- # fi
-
# Generate make dependency files
if test "x$TOOLCHAIN_TYPE" = xgcc; then
C_FLAG_DEPS="-MMD -MF"
@@ -526,887 +353,44 @@
CXX_FLAG_DEPS="$C_FLAG_DEPS"
AC_SUBST(C_FLAG_DEPS)
AC_SUBST(CXX_FLAG_DEPS)
-
- # Debug symbols
- if test "x$TOOLCHAIN_TYPE" = xgcc; then
- if test "x$OPENJDK_TARGET_CPU_BITS" = "x64" && test "x$DEBUG_LEVEL" = "xfastdebug"; then
- # reduce from default "-g2" option to save space
- CFLAGS_DEBUG_SYMBOLS="-g1"
- CXXFLAGS_DEBUG_SYMBOLS="-g1"
- else
- CFLAGS_DEBUG_SYMBOLS="-g"
- CXXFLAGS_DEBUG_SYMBOLS="-g"
- fi
- elif test "x$TOOLCHAIN_TYPE" = xclang; then
- CFLAGS_DEBUG_SYMBOLS="-g"
- CXXFLAGS_DEBUG_SYMBOLS="-g"
- elif test "x$TOOLCHAIN_TYPE" = xsolstudio; then
- CFLAGS_DEBUG_SYMBOLS="-g -xs"
- # -g0 enables debug symbols without disabling inlining.
- CXXFLAGS_DEBUG_SYMBOLS="-g0 -xs"
- elif test "x$TOOLCHAIN_TYPE" = xxlc; then
- CFLAGS_DEBUG_SYMBOLS="-g"
- CXXFLAGS_DEBUG_SYMBOLS="-g"
- elif test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
- CFLAGS_DEBUG_SYMBOLS="-Zi"
- CXXFLAGS_DEBUG_SYMBOLS="-Zi"
- fi
- AC_SUBST(CFLAGS_DEBUG_SYMBOLS)
- AC_SUBST(CXXFLAGS_DEBUG_SYMBOLS)
-
- # Debug symbols for JVM_CFLAGS
- if test "x$TOOLCHAIN_TYPE" = xsolstudio; then
- JVM_CFLAGS_SYMBOLS="$JVM_CFLAGS_SYMBOLS -xs"
- if test "x$DEBUG_LEVEL" = xslowdebug; then
- JVM_CFLAGS_SYMBOLS="$JVM_CFLAGS_SYMBOLS -g"
- else
- # -g0 does not disable inlining, which -g does.
- JVM_CFLAGS_SYMBOLS="$JVM_CFLAGS_SYMBOLS -g0"
- fi
- elif test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
- JVM_CFLAGS_SYMBOLS="$JVM_CFLAGS_SYMBOLS -Z7 -d2Zi+"
- else
- JVM_CFLAGS_SYMBOLS="$JVM_CFLAGS_SYMBOLS -g"
- fi
- AC_SUBST(JVM_CFLAGS_SYMBOLS)
-
- # bounds, memory and behavior checking options
- if test "x$TOOLCHAIN_TYPE" = xgcc; then
- case $DEBUG_LEVEL in
- release )
- # no adjustment
- ;;
- fastdebug )
- # no adjustment
- ;;
- slowdebug )
- # FIXME: By adding this to C(XX)FLAGS_DEBUG_OPTIONS/JVM_CFLAGS_SYMBOLS it
- # get's added conditionally on whether we produce debug symbols or not.
- # This is most likely not really correct.
-
- # Add runtime stack smashing and undefined behavior checks.
- # Not all versions of gcc support -fstack-protector
- STACK_PROTECTOR_CFLAG="-fstack-protector-all"
- FLAGS_COMPILER_CHECK_ARGUMENTS(ARGUMENT: [$STACK_PROTECTOR_CFLAG -Werror], IF_FALSE: [STACK_PROTECTOR_CFLAG=""])
-
- CFLAGS_DEBUG_OPTIONS="$STACK_PROTECTOR_CFLAG --param ssp-buffer-size=1"
- CXXFLAGS_DEBUG_OPTIONS="$STACK_PROTECTOR_CFLAG --param ssp-buffer-size=1"
- if test "x$STACK_PROTECTOR_CFLAG" != x; then
- JVM_CFLAGS_SYMBOLS="$JVM_CFLAGS_SYMBOLS $STACK_PROTECTOR_CFLAG --param ssp-buffer-size=1"
- fi
- ;;
- esac
- fi
-
- if test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
- if test "x$DEBUG_LEVEL" != xrelease; then
- if test "x$OPENJDK_TARGET_CPU" = xx86_64; then
- JVM_CFLAGS="$JVM_CFLAGS -homeparams"
- fi
- fi
- fi
-
- # Optimization levels
- if test "x$TOOLCHAIN_TYPE" = xsolstudio; then
- CC_HIGHEST="$CC_HIGHEST -fns -fsimple -fsingle -xbuiltin=%all -xdepend -xrestrict -xlibmil"
-
- if test "x$OPENJDK_TARGET_CPU_ARCH" = "xx86"; then
- # FIXME: seems we always set -xregs=no%frameptr; put it elsewhere more global?
- C_O_FLAG_HIGHEST_JVM="-xO4"
- C_O_FLAG_HIGHEST="-xO4 -Wu,-O4~yz $CC_HIGHEST -xalias_level=basic -xregs=no%frameptr"
- C_O_FLAG_HI="-xO4 -Wu,-O4~yz -xregs=no%frameptr"
- C_O_FLAG_NORM="-xO2 -Wu,-O2~yz -xregs=no%frameptr"
- C_O_FLAG_DEBUG="-xregs=no%frameptr"
- C_O_FLAG_DEBUG_JVM=""
- C_O_FLAG_NONE="-xregs=no%frameptr"
- CXX_O_FLAG_HIGHEST_JVM="-xO4"
- CXX_O_FLAG_HIGHEST="-xO4 -Qoption ube -O4~yz $CC_HIGHEST -xregs=no%frameptr"
- CXX_O_FLAG_HI="-xO4 -Qoption ube -O4~yz -xregs=no%frameptr"
- CXX_O_FLAG_NORM="-xO2 -Qoption ube -O2~yz -xregs=no%frameptr"
- CXX_O_FLAG_DEBUG="-xregs=no%frameptr"
- CXX_O_FLAG_DEBUG_JVM=""
- CXX_O_FLAG_NONE="-xregs=no%frameptr"
- if test "x$OPENJDK_TARGET_CPU_BITS" = "x32"; then
- C_O_FLAG_HIGHEST="$C_O_FLAG_HIGHEST -xchip=pentium"
- CXX_O_FLAG_HIGHEST="$CXX_O_FLAG_HIGHEST -xchip=pentium"
- fi
- elif test "x$OPENJDK_TARGET_CPU_ARCH" = "xsparc"; then
- C_O_FLAG_HIGHEST_JVM="-xO4"
- C_O_FLAG_HIGHEST="-xO4 -Wc,-Qrm-s -Wc,-Qiselect-T0 $CC_HIGHEST -xalias_level=basic -xprefetch=auto,explicit -xchip=ultra"
- C_O_FLAG_HI="-xO4 -Wc,-Qrm-s -Wc,-Qiselect-T0"
- C_O_FLAG_NORM="-xO2 -Wc,-Qrm-s -Wc,-Qiselect-T0"
- C_O_FLAG_DEBUG=""
- C_O_FLAG_DEBUG_JVM=""
- C_O_FLAG_NONE=""
- CXX_O_FLAG_HIGHEST_JVM="-xO4"
- CXX_O_FLAG_HIGHEST="-xO4 -Qoption cg -Qrm-s -Qoption cg -Qiselect-T0 $CC_HIGHEST -xprefetch=auto,explicit -xchip=ultra"
- CXX_O_FLAG_HI="-xO4 -Qoption cg -Qrm-s -Qoption cg -Qiselect-T0"
- CXX_O_FLAG_NORM="-xO2 -Qoption cg -Qrm-s -Qoption cg -Qiselect-T0"
- CXX_O_FLAG_DEBUG=""
- CXX_O_FLAG_DEBUG_JVM=""
- CXX_O_FLAG_NONE=""
- fi
- else
- # The remaining toolchains share opt flags between CC and CXX;
- # setup for C and duplicate afterwards.
- if test "x$TOOLCHAIN_TYPE" = xgcc; then
- if test "x$OPENJDK_TARGET_OS" = xmacosx; then
- # On MacOSX we optimize for size, something
- # we should do for all platforms?
- C_O_FLAG_HIGHEST_JVM="-Os"
- C_O_FLAG_HIGHEST="-Os"
- C_O_FLAG_HI="-Os"
- C_O_FLAG_NORM="-Os"
- C_O_FLAG_SIZE="-Os"
- else
- C_O_FLAG_HIGHEST_JVM="-O3"
- C_O_FLAG_HIGHEST="-O3"
- C_O_FLAG_HI="-O3"
- C_O_FLAG_NORM="-O2"
- C_O_FLAG_SIZE="-Os"
- fi
- C_O_FLAG_DEBUG="-O0"
- if test "x$OPENJDK_TARGET_OS" = xmacosx; then
- C_O_FLAG_DEBUG_JVM=""
- elif test "x$OPENJDK_TARGET_OS" = xlinux; then
- C_O_FLAG_DEBUG_JVM="-O0"
- fi
- C_O_FLAG_NONE="-O0"
- elif test "x$TOOLCHAIN_TYPE" = xclang; then
- if test "x$OPENJDK_TARGET_OS" = xmacosx; then
- # On MacOSX we optimize for size, something
- # we should do for all platforms?
- C_O_FLAG_HIGHEST_JVM="-Os"
- C_O_FLAG_HIGHEST="-Os"
- C_O_FLAG_HI="-Os"
- C_O_FLAG_NORM="-Os"
- C_O_FLAG_SIZE="-Os"
- else
- C_O_FLAG_HIGHEST_JVM="-O3"
- C_O_FLAG_HIGHEST="-O3"
- C_O_FLAG_HI="-O3"
- C_O_FLAG_NORM="-O2"
- C_O_FLAG_SIZE="-Os"
- fi
- C_O_FLAG_DEBUG="-O0"
- if test "x$OPENJDK_TARGET_OS" = xmacosx; then
- C_O_FLAG_DEBUG_JVM=""
- elif test "x$OPENJDK_TARGET_OS" = xlinux; then
- C_O_FLAG_DEBUG_JVM="-O0"
- fi
- C_O_FLAG_NONE="-O0"
- elif test "x$TOOLCHAIN_TYPE" = xxlc; then
- C_O_FLAG_HIGHEST_JVM="-O3 -qhot=level=1 -qinline -qinlglue"
- C_O_FLAG_HIGHEST="-O3 -qhot=level=1 -qinline -qinlglue"
- C_O_FLAG_HI="-O3 -qinline -qinlglue"
- C_O_FLAG_NORM="-O2"
- C_O_FLAG_DEBUG="-qnoopt"
- # FIXME: Value below not verified.
- C_O_FLAG_DEBUG_JVM=""
- C_O_FLAG_NONE="-qnoopt"
- elif test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
- C_O_FLAG_HIGHEST_JVM="-O2 -Oy-"
- C_O_FLAG_HIGHEST="-O2"
- C_O_FLAG_HI="-O1"
- C_O_FLAG_NORM="-O1"
- C_O_FLAG_DEBUG="-Od"
- C_O_FLAG_DEBUG_JVM=""
- C_O_FLAG_NONE="-Od"
- C_O_FLAG_SIZE="-Os"
- fi
- CXX_O_FLAG_HIGHEST_JVM="$C_O_FLAG_HIGHEST_JVM"
- CXX_O_FLAG_HIGHEST="$C_O_FLAG_HIGHEST"
- CXX_O_FLAG_HI="$C_O_FLAG_HI"
- CXX_O_FLAG_NORM="$C_O_FLAG_NORM"
- CXX_O_FLAG_DEBUG="$C_O_FLAG_DEBUG"
- CXX_O_FLAG_DEBUG_JVM="$C_O_FLAG_DEBUG_JVM"
- CXX_O_FLAG_NONE="$C_O_FLAG_NONE"
- CXX_O_FLAG_SIZE="$C_O_FLAG_SIZE"
- fi
-
- # Adjust optimization flags according to debug level.
- case $DEBUG_LEVEL in
- release )
- # no adjustment
- ;;
- fastdebug )
- # Not quite so much optimization
- C_O_FLAG_HI="$C_O_FLAG_NORM"
- CXX_O_FLAG_HI="$CXX_O_FLAG_NORM"
- ;;
- slowdebug )
- # Disable optimization
- C_O_FLAG_HIGHEST_JVM="$C_O_FLAG_DEBUG_JVM"
- C_O_FLAG_HIGHEST="$C_O_FLAG_DEBUG"
- C_O_FLAG_HI="$C_O_FLAG_DEBUG"
- C_O_FLAG_NORM="$C_O_FLAG_DEBUG"
- C_O_FLAG_SIZE="$C_O_FLAG_DEBUG"
- CXX_O_FLAG_HIGHEST_JVM="$CXX_O_FLAG_DEBUG_JVM"
- CXX_O_FLAG_HIGHEST="$CXX_O_FLAG_DEBUG"
- CXX_O_FLAG_HI="$CXX_O_FLAG_DEBUG"
- CXX_O_FLAG_NORM="$CXX_O_FLAG_DEBUG"
- CXX_O_FLAG_SIZE="$CXX_O_FLAG_DEBUG"
- ;;
- esac
-
- AC_SUBST(C_O_FLAG_HIGHEST_JVM)
- AC_SUBST(C_O_FLAG_HIGHEST)
- AC_SUBST(C_O_FLAG_HI)
- AC_SUBST(C_O_FLAG_NORM)
- AC_SUBST(C_O_FLAG_DEBUG)
- AC_SUBST(C_O_FLAG_NONE)
- AC_SUBST(C_O_FLAG_SIZE)
- AC_SUBST(CXX_O_FLAG_HIGHEST_JVM)
- AC_SUBST(CXX_O_FLAG_HIGHEST)
- AC_SUBST(CXX_O_FLAG_HI)
- AC_SUBST(CXX_O_FLAG_NORM)
- AC_SUBST(CXX_O_FLAG_DEBUG)
- AC_SUBST(CXX_O_FLAG_NONE)
- AC_SUBST(CXX_O_FLAG_SIZE)
])
-
-AC_DEFUN([FLAGS_SETUP_COMPILER_FLAGS_FOR_JDK],
+AC_DEFUN_ONCE([FLAGS_POST_TOOLCHAIN],
[
-
- FLAGS_SETUP_ABI_PROFILE
-
- # Optional POSIX functionality needed by the JVM
- #
- # Check if clock_gettime is available and in which library. This indicates
- # availability of CLOCK_MONOTONIC for hotspot. But we don't need to link, so
- # don't let it update LIBS.
- save_LIBS="$LIBS"
- AC_SEARCH_LIBS(clock_gettime, rt, [HAS_CLOCK_GETTIME=true], [])
- if test "x$LIBS" = "x-lrt "; then
- CLOCK_GETTIME_IN_LIBRT=true
- fi
- LIBS="$save_LIBS"
+ FLAGS_SETUP_TOOLCHAIN_CONTROL
- FLAGS_SETUP_COMPILER_FLAGS_FOR_JDK_HELPER([TARGET])
- FLAGS_SETUP_COMPILER_FLAGS_FOR_JDK_HELPER([BUILD], [OPENJDK_BUILD_])
-
- # Tests are only ever compiled for TARGET
- # Flags for compiling test libraries
- CFLAGS_TESTLIB="$COMMON_CCXXFLAGS_JDK $CFLAGS_JDK $PICFLAG $CFLAGS_JDKLIB_EXTRA"
- CXXFLAGS_TESTLIB="$COMMON_CCXXFLAGS_JDK $CXXFLAGS_JDK $PICFLAG $CXXFLAGS_JDKLIB_EXTRA"
-
- # Flags for compiling test executables
- CFLAGS_TESTEXE="$COMMON_CCXXFLAGS_JDK $CFLAGS_JDK"
- CXXFLAGS_TESTEXE="$COMMON_CCXXFLAGS_JDK $CXXFLAGS_JDK"
-
- AC_SUBST(CFLAGS_TESTLIB)
- AC_SUBST(CFLAGS_TESTEXE)
- AC_SUBST(CXXFLAGS_TESTLIB)
- AC_SUBST(CXXFLAGS_TESTEXE)
-
- LDFLAGS_TESTLIB="$LDFLAGS_JDKLIB"
- LDFLAGS_TESTEXE="$LDFLAGS_JDKEXE $JAVA_BASE_LDFLAGS"
-
- AC_SUBST(LDFLAGS_TESTLIB)
- AC_SUBST(LDFLAGS_TESTEXE)
+ if test "x$BUILD_SYSROOT" != x; then
+ FLAGS_SETUP_SYSROOT_FLAGS([BUILD_])
+ else
+ BUILD_SYSROOT_CFLAGS="$SYSROOT_CFLAGS"
+ BUILD_SYSROOT_LDFLAGS="$SYSROOT_LDFLAGS"
+ fi
+ AC_SUBST(BUILD_SYSROOT_CFLAGS)
+ AC_SUBST(BUILD_SYSROOT_LDFLAGS)
])
-################################################################################
-# $1 - Either BUILD or TARGET to pick the correct OS/CPU variables to check
-# conditionals against.
-# $2 - Optional prefix for each variable defined.
-AC_DEFUN([FLAGS_SETUP_COMPILER_FLAGS_FOR_JDK_HELPER],
+AC_DEFUN([FLAGS_SETUP_FLAGS],
[
- # Special extras...
- if test "x$TOOLCHAIN_TYPE" = xsolstudio; then
- if test "x$OPENJDK_$1_CPU_ARCH" = "xsparc"; then
- $2CFLAGS_JDKLIB_EXTRA="${$2CFLAGS_JDKLIB_EXTRA} -xregs=no%appl"
- $2CXXFLAGS_JDKLIB_EXTRA="${$2CXXFLAGS_JDKLIB_EXTRA} -xregs=no%appl"
- fi
- $2CFLAGS_JDKLIB_EXTRA="${$2CFLAGS_JDKLIB_EXTRA} -errtags=yes -errfmt"
- $2CXXFLAGS_JDKLIB_EXTRA="${$2CXXFLAGS_JDKLIB_EXTRA} -errtags=yes -errfmt"
- elif test "x$TOOLCHAIN_TYPE" = xxlc; then
- $2CFLAGS_JDK="${$2CFLAGS_JDK} -qchars=signed -qfullpath -qsaveopt"
- $2CXXFLAGS_JDK="${$2CXXFLAGS_JDK} -qchars=signed -qfullpath -qsaveopt"
- elif test "x$TOOLCHAIN_TYPE" = xgcc; then
- $2CXXSTD_CXXFLAG="-std=gnu++98"
- FLAGS_CXX_COMPILER_CHECK_ARGUMENTS(ARGUMENT: [[$]$2CXXSTD_CXXFLAG -Werror],
- IF_FALSE: [$2CXXSTD_CXXFLAG=""])
- $2CXXFLAGS_JDK="${$2CXXFLAGS_JDK} ${$2CXXSTD_CXXFLAG}"
- $2JVM_CFLAGS="${$2JVM_CFLAGS} ${$2CXXSTD_CXXFLAG}"
- AC_SUBST($2CXXSTD_CXXFLAG)
- fi
- if test "x$OPENJDK_TARGET_OS" = xsolaris; then
- $2CFLAGS_JDK="${$2CFLAGS_JDK} -D__solaris__"
- $2CXXFLAGS_JDK="${$2CXXFLAGS_JDK} -D__solaris__"
- fi
-
- $2CFLAGS_JDK="${$2CFLAGS_JDK} ${$2EXTRA_CFLAGS}"
- $2CXXFLAGS_JDK="${$2CXXFLAGS_JDK} ${$2EXTRA_CXXFLAGS}"
- $2LDFLAGS_JDK="${$2LDFLAGS_JDK} ${$2EXTRA_LDFLAGS}"
-
- ###############################################################################
- #
- # Now setup the CFLAGS and LDFLAGS for the JDK build.
- # Later we will also have CFLAGS and LDFLAGS for the hotspot subrepo build.
- #
-
- # Setup compiler/platform specific flags into
- # $2CFLAGS_JDK - C Compiler flags
- # $2CXXFLAGS_JDK - C++ Compiler flags
- # $2COMMON_CCXXFLAGS_JDK - common to C and C++
- if test "x$TOOLCHAIN_TYPE" = xgcc; then
- $2JVM_CFLAGS="[$]$2JVM_CFLAGS -D_GNU_SOURCE"
- $2JVM_CFLAGS="[$]$2JVM_CFLAGS -D_REENTRANT"
- $2JVM_CFLAGS="[$]$2JVM_CFLAGS -fcheck-new"
- if test "x$OPENJDK_$1_CPU" = xx86; then
- # Force compatibility with i586 on 32 bit intel platforms.
- $2COMMON_CCXXFLAGS="${$2COMMON_CCXXFLAGS} -march=i586"
- $2JVM_CFLAGS="[$]$2JVM_CFLAGS -march=i586"
- fi
- $2COMMON_CCXXFLAGS_JDK="[$]$2COMMON_CCXXFLAGS [$]$2COMMON_CCXXFLAGS_JDK -Wall -Wextra -Wno-unused -Wno-unused-parameter -Wformat=2 \
- -pipe -D_GNU_SOURCE -D_REENTRANT -D_LARGEFILE64_SOURCE"
- case $OPENJDK_$1_CPU_ARCH in
- arm )
- # on arm we don't prevent gcc to omit frame pointer but do prevent strict aliasing
- $2CFLAGS_JDK="${$2CFLAGS_JDK} -fno-strict-aliasing"
- $2COMMON_CCXXFLAGS_JDK="${$2COMMON_CCXXFLAGS_JDK} -fsigned-char"
- ;;
- ppc )
- # on ppc we don't prevent gcc to omit frame pointer but do prevent strict aliasing
- $2CFLAGS_JDK="${$2CFLAGS_JDK} -fno-strict-aliasing"
- ;;
- s390 )
- $2COMMON_CCXXFLAGS_JDK="[$]$2COMMON_CCXXFLAGS_JDK -fno-omit-frame-pointer -mbackchain -march=z10"
- $2CFLAGS_JDK="${$2CFLAGS_JDK} -fno-strict-aliasing"
- ;;
- * )
- $2COMMON_CCXXFLAGS_JDK="[$]$2COMMON_CCXXFLAGS_JDK -fno-omit-frame-pointer"
- $2CFLAGS_JDK="${$2CFLAGS_JDK} -fno-strict-aliasing"
- ;;
- esac
- TOOLCHAIN_CHECK_COMPILER_VERSION(VERSION: 6, PREFIX: $2, IF_AT_LEAST: FLAGS_SETUP_GCC6_COMPILER_FLAGS($2))
- elif test "x$TOOLCHAIN_TYPE" = xclang; then
- $2JVM_CFLAGS="[$]$2JVM_CFLAGS -D_GNU_SOURCE"
-
- # Restrict the debug information created by Clang to avoid
- # too big object files and speed the build up a little bit
- # (see http://llvm.org/bugs/show_bug.cgi?id=7554)
- $2JVM_CFLAGS="[$]$2JVM_CFLAGS -flimit-debug-info"
- if test "x$OPENJDK_$1_OS" = xlinux; then
- if test "x$OPENJDK_$1_CPU" = xx86; then
- # Force compatibility with i586 on 32 bit intel platforms.
- $2COMMON_CCXXFLAGS="${$2COMMON_CCXXFLAGS} -march=i586"
- $2JVM_CFLAGS="[$]$2JVM_CFLAGS -march=i586"
- fi
- $2JVM_CFLAGS="[$]$2JVM_CFLAGS -Wno-sometimes-uninitialized"
- $2COMMON_CCXXFLAGS_JDK="[$]$2COMMON_CCXXFLAGS [$]$2COMMON_CCXXFLAGS_JDK -Wall -Wextra -Wno-unused -Wno-unused-parameter -Wformat=2 \
- -pipe -D_GNU_SOURCE -D_REENTRANT -D_LARGEFILE64_SOURCE"
- case $OPENJDK_$1_CPU_ARCH in
- ppc )
- # on ppc we don't prevent gcc to omit frame pointer but do prevent strict aliasing
- $2CFLAGS_JDK="${$2CFLAGS_JDK} -fno-strict-aliasing"
- ;;
- * )
- $2COMMON_CCXXFLAGS_JDK="[$]$2COMMON_CCXXFLAGS_JDK -fno-omit-frame-pointer"
- $2CFLAGS_JDK="${$2CFLAGS_JDK} -fno-strict-aliasing"
- ;;
- esac
- fi
- elif test "x$TOOLCHAIN_TYPE" = xsolstudio; then
- $2JVM_CFLAGS="[$]$2JVM_CFLAGS -DSPARC_WORKS"
- $2COMMON_CCXXFLAGS_JDK="[$]$2COMMON_CCXXFLAGS [$]$2COMMON_CCXXFLAGS_JDK -DTRACING -DMACRO_MEMSYS_OPS -DBREAKPTS"
- if test "x$OPENJDK_$1_CPU_ARCH" = xx86; then
- $2COMMON_CCXXFLAGS_JDK="[$]$2COMMON_CCXXFLAGS_JDK -DcpuIntel -Di586 -D$OPENJDK_$1_CPU_LEGACY_LIB"
- fi
-
- $2CFLAGS_JDK="[$]$2CFLAGS_JDK -xc99=%none -xCC -errshort=tags -Xa -v -mt -W0,-noglobal"
- $2CXXFLAGS_JDK="[$]$2CXXFLAGS_JDK -errtags=yes +w -mt -features=no%except -DCC_NOEX -norunpath -xnolib"
- elif test "x$TOOLCHAIN_TYPE" = xxlc; then
- $2JVM_CFLAGS="[$]$2JVM_CFLAGS -D_REENTRANT"
- $2CFLAGS_JDK="[$]$2CFLAGS_JDK -D_GNU_SOURCE -D_REENTRANT -D_LARGEFILE64_SOURCE -DSTDC"
- $2CXXFLAGS_JDK="[$]$2CXXFLAGS_JDK -D_GNU_SOURCE -D_REENTRANT -D_LARGEFILE64_SOURCE -DSTDC"
- elif test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
- $2COMMON_CCXXFLAGS_JDK="[$]$2COMMON_CCXXFLAGS [$]$2COMMON_CCXXFLAGS_JDK \
- -MD -Zc:wchar_t- -W3 -wd4800 \
- -DWIN32_LEAN_AND_MEAN \
- -D_CRT_SECURE_NO_DEPRECATE -D_CRT_NONSTDC_NO_DEPRECATE \
- -DWIN32 -DIAL"
- if test "x$OPENJDK_$1_CPU" = xx86_64; then
- $2COMMON_CCXXFLAGS_JDK="[$]$2COMMON_CCXXFLAGS_JDK -D_AMD64_ -Damd64"
- else
- $2COMMON_CCXXFLAGS_JDK="[$]$2COMMON_CCXXFLAGS_JDK -D_X86_ -Dx86"
- fi
- # If building with Visual Studio 2010, we can still use _STATIC_CPPLIB to
- # avoid bundling msvcpNNN.dll. Doesn't work with newer versions of visual
- # studio.
- if test "x$TOOLCHAIN_VERSION" = "x2010"; then
- STATIC_CPPLIB_FLAGS="-D_STATIC_CPPLIB -D_DISABLE_DEPRECATE_STATIC_CPPLIB"
- $2COMMON_CCXXFLAGS_JDK="[$]$2COMMON_CCXXFLAGS_JDK $STATIC_CPPLIB_FLAGS"
- $2JVM_CFLAGS="[$]$2JVM_CFLAGS $STATIC_CPPLIB_FLAGS"
- fi
- fi
-
- ###############################################################################
+ FLAGS_SETUP_MACOSX_VERSION
+ FLAGS_SETUP_ABI_PROFILE
- # Adjust flags according to debug level.
- case $DEBUG_LEVEL in
- fastdebug | slowdebug )
- $2CFLAGS_JDK="[$]$2CFLAGS_JDK $CFLAGS_DEBUG_SYMBOLS $CFLAGS_DEBUG_OPTIONS"
- $2CXXFLAGS_JDK="[$]$2CXXFLAGS_JDK $CXXFLAGS_DEBUG_SYMBOLS $CXXFLAGS_DEBUG_OPTIONS"
- ;;
- release )
- ;;
- * )
- AC_MSG_ERROR([Unrecognized \$DEBUG_LEVEL: $DEBUG_LEVEL])
- ;;
- esac
-
- # Set some common defines. These works for all compilers, but assume
- # -D is universally accepted.
-
- # Setup endianness
- if test "x$OPENJDK_$1_CPU_ENDIAN" = xlittle; then
- # The macro _LITTLE_ENDIAN needs to be defined the same to avoid the
- # Sun C compiler warning message: warning: macro redefined: _LITTLE_ENDIAN
- # (The Solaris X86 system defines this in file /usr/include/sys/isa_defs.h).
- # Note: -Dmacro is the same as #define macro 1
- # -Dmacro= is the same as #define macro
- if test "x$OPENJDK_$1_OS" = xsolaris; then
- $2COMMON_CCXXFLAGS_JDK="[$]$2COMMON_CCXXFLAGS_JDK -D_LITTLE_ENDIAN="
- else
- $2COMMON_CCXXFLAGS_JDK="[$]$2COMMON_CCXXFLAGS_JDK -D_LITTLE_ENDIAN"
- fi
- else
- # Same goes for _BIG_ENDIAN. Do we really need to set *ENDIAN on Solaris if they
- # are defined in the system?
- if test "x$OPENJDK_$1_OS" = xsolaris; then
- $2COMMON_CCXXFLAGS_JDK="[$]$2COMMON_CCXXFLAGS_JDK -D_BIG_ENDIAN="
- else
- $2COMMON_CCXXFLAGS_JDK="[$]$2COMMON_CCXXFLAGS_JDK -D_BIG_ENDIAN"
- fi
- fi
-
- # Always enable optional macros for VM.
- $2JVM_CFLAGS="[$]$2JVM_CFLAGS -D__STDC_FORMAT_MACROS"
- $2JVM_CFLAGS="[$]$2JVM_CFLAGS -D__STDC_LIMIT_MACROS"
- $2JVM_CFLAGS="[$]$2JVM_CFLAGS -D__STDC_CONSTANT_MACROS"
-
- # Setup target OS define. Use OS target name but in upper case.
- OPENJDK_$1_OS_UPPERCASE=`$ECHO $OPENJDK_$1_OS | $TR 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
- $2COMMON_CCXXFLAGS_JDK="[$]$2COMMON_CCXXFLAGS_JDK -D$OPENJDK_$1_OS_UPPERCASE"
-
- # Setup target CPU
- $2COMMON_CCXXFLAGS_JDK="[$]$2COMMON_CCXXFLAGS_JDK \
- $OPENJDK_$1_ADD_LP64 \
- -DARCH='\"$OPENJDK_$1_CPU_LEGACY\"' -D$OPENJDK_$1_CPU_LEGACY"
-
- # Setup debug/release defines
- if test "x$DEBUG_LEVEL" = xrelease; then
- $2COMMON_CCXXFLAGS_JDK="[$]$2COMMON_CCXXFLAGS_JDK -DNDEBUG"
- if test "x$OPENJDK_$1_OS" = xsolaris; then
- $2COMMON_CCXXFLAGS_JDK="[$]$2COMMON_CCXXFLAGS_JDK -DTRIMMED"
- fi
- else
- $2COMMON_CCXXFLAGS_JDK="[$]$2COMMON_CCXXFLAGS_JDK -DDEBUG"
- fi
-
- # Optional POSIX functionality needed by the VM
-
- if test "x$HAS_CLOCK_GETTIME" = "xtrue"; then
- $2JVM_CFLAGS="[$]$2JVM_CFLAGS -DSUPPORTS_CLOCK_MONOTONIC"
- if test "x$CLOCK_GETTIME_IN_LIBRT" = "xtrue"; then
- $2JVM_CFLAGS="[$]$2JVM_CFLAGS -DNEEDS_LIBRT"
- fi
- fi
-
-
- # Set some additional per-OS defines.
- if test "x$OPENJDK_$1_OS" = xlinux; then
- $2JVM_CFLAGS="[$]$2JVM_CFLAGS -DLINUX"
- $2JVM_CFLAGS="[$]$2JVM_CFLAGS -pipe $PICFLAG -fno-rtti -fno-exceptions \
- -fvisibility=hidden -fno-strict-aliasing -fno-omit-frame-pointer"
- elif test "x$OPENJDK_$1_OS" = xsolaris; then
- $2JVM_CFLAGS="[$]$2JVM_CFLAGS -DSOLARIS"
- $2JVM_CFLAGS="[$]$2JVM_CFLAGS -template=no%extdef -features=no%split_init \
- -D_Crun_inline_placement -library=stlport4 $PICFLAG -mt -features=no%except"
- elif test "x$OPENJDK_$1_OS" = xmacosx; then
- $2COMMON_CCXXFLAGS_JDK="[$]$2COMMON_CCXXFLAGS_JDK -D_ALLBSD_SOURCE -D_DARWIN_UNLIMITED_SELECT"
- $2JVM_CFLAGS="[$]$2JVM_CFLAGS -D_ALLBSD_SOURCE"
- $2JVM_CFLAGS="[$]$2JVM_CFLAGS -D_DARWIN_C_SOURCE -D_XOPEN_SOURCE"
- $2JVM_CFLAGS="[$]$2JVM_CFLAGS -fno-rtti -fno-exceptions -fvisibility=hidden \
- -mno-omit-leaf-frame-pointer -mstack-alignment=16 -pipe -fno-strict-aliasing \
- -fno-omit-frame-pointer"
- elif test "x$OPENJDK_$1_OS" = xaix; then
- $2JVM_CFLAGS="[$]$2JVM_CFLAGS -DAIX"
- $2JVM_CFLAGS="[$]$2JVM_CFLAGS -qtune=balanced \
- -qalias=noansi -qstrict -qtls=default -qlanglvl=c99vla \
- -qlanglvl=noredefmac -qnortti -qnoeh -qignerrno"
- # We need '-qminimaltoc' or '-qpic=large -bbigtoc' if the TOC overflows.
- # Hotspot now overflows its 64K TOC (currently only for debug),
- # so for debug we build with '-qpic=large -bbigtoc'.
- if test "x$DEBUG_LEVEL" = xslowdebug || test "x$DEBUG_LEVEL" = xfastdebug; then
- $2JVM_CFLAGS="[$]$2JVM_CFLAGS -qpic=large"
- fi
- elif test "x$OPENJDK_$1_OS" = xbsd; then
- $2COMMON_CCXXFLAGS_JDK="[$]$2COMMON_CCXXFLAGS_JDK -D_ALLBSD_SOURCE"
- elif test "x$OPENJDK_$1_OS" = xwindows; then
- $2JVM_CFLAGS="[$]$2JVM_CFLAGS -D_WINDOWS -DWIN32 -D_JNI_IMPLEMENTATION_"
- $2JVM_CFLAGS="[$]$2JVM_CFLAGS -nologo -W3 -MD -MP"
- fi
-
- # Set some additional per-CPU defines.
- if test "x$OPENJDK_$1_OS-$OPENJDK_$1_CPU" = xwindows-x86; then
- $2JVM_CFLAGS="[$]$2JVM_CFLAGS -arch:IA32"
- elif test "x$OPENJDK_$1_OS-$OPENJDK_$1_CPU" = xsolaris-sparcv9; then
- $2JVM_CFLAGS="[$]$2JVM_CFLAGS -xarch=sparc"
- elif test "x$OPENJDK_$1_CPU" = xppc64; then
- if test "x$OPENJDK_$1_OS" = xlinux; then
- $2JVM_CFLAGS="[$]$2JVM_CFLAGS -minsert-sched-nops=regroup_exact -mno-multiple -mno-string"
- # fixes `relocation truncated to fit' error for gcc 4.1.
- $2JVM_CFLAGS="[$]$2JVM_CFLAGS -mminimal-toc"
- # Use ppc64 instructions, but schedule for power5
- $2JVM_CFLAGS="[$]$2JVM_CFLAGS -mcpu=powerpc64 -mtune=power5"
- elif test "x$OPENJDK_$1_OS" = xaix; then
- $2JVM_CFLAGS="[$]$2JVM_CFLAGS -qarch=ppc64"
- fi
- elif test "x$OPENJDK_$1_CPU" = xppc64le; then
- if test "x$OPENJDK_$1_OS" = xlinux; then
- $2JVM_CFLAGS="[$]$2JVM_CFLAGS -minsert-sched-nops=regroup_exact -mno-multiple -mno-string"
- # Little endian machine uses ELFv2 ABI.
- $2JVM_CFLAGS="[$]$2JVM_CFLAGS -DABI_ELFv2"
- # Use Power8, this is the first CPU to support PPC64 LE with ELFv2 ABI.
- $2JVM_CFLAGS="[$]$2JVM_CFLAGS -mcpu=power8 -mtune=power8"
- fi
- elif test "x$OPENJDK_$1_CPU" = xs390x; then
- if test "x$OPENJDK_$1_OS" = xlinux; then
- $2JVM_CFLAGS="[$]$2JVM_CFLAGS -mbackchain -march=z10"
- fi
- fi
-
- if test "x$OPENJDK_$1_CPU_ENDIAN" = xlittle; then
- $2JVM_CFLAGS="[$]$2JVM_CFLAGS -DVM_LITTLE_ENDIAN"
- fi
-
- if test "x$OPENJDK_$1_CPU_BITS" = x64; then
- if test "x$OPENJDK_$1_OS" != xsolaris && test "x$OPENJDK_$1_OS" != xaix; then
- # Solaris does not have _LP64=1 in the old build.
- # xlc on AIX defines _LP64=1 by default and issues a warning if we redefine it.
- $2JVM_CFLAGS="[$]$2JVM_CFLAGS -D_LP64=1"
- fi
- fi
-
- # Set $2JVM_CFLAGS warning handling
- if test "x$OPENJDK_$1_OS" = xlinux; then
- $2JVM_CFLAGS="[$]$2JVM_CFLAGS -Wpointer-arith -Wsign-compare -Wunused-function \
- -Wunused-value -Woverloaded-virtual"
+ FLAGS_SETUP_SHARED_LIBS
+ FLAGS_SETUP_DEBUG_SYMBOLS
+ FLAGS_SETUP_WARNINGS
+ FLAGS_SETUP_QUALITY_CHECKS
+ FLAGS_SETUP_OPTIMIZATION
- if test "x$TOOLCHAIN_TYPE" = xgcc; then
- TOOLCHAIN_CHECK_COMPILER_VERSION(VERSION: [4.8], PREFIX: $2,
- IF_AT_LEAST: [
- # These flags either do not work or give spurious warnings prior to gcc 4.8.
- $2JVM_CFLAGS="[$]$2JVM_CFLAGS -Wno-format-zero-length -Wtype-limits -Wuninitialized"
- ]
- )
- fi
- if ! HOTSPOT_CHECK_JVM_VARIANT(zero); then
- # Non-zero builds have stricter warnings
- $2JVM_CFLAGS="[$]$2JVM_CFLAGS -Wreturn-type -Wundef -Wformat=2"
- else
- if test "x$TOOLCHAIN_TYPE" = xclang; then
- # Some versions of llvm do not like -Wundef
- $2JVM_CFLAGS="[$]$2JVM_CFLAGS -Wno-undef"
- fi
- fi
- elif test "x$OPENJDK_$1_OS" = xmacosx; then
- $2JVM_CFLAGS="[$]$2JVM_CFLAGS -Wno-deprecated -Wpointer-arith \
- -Wsign-compare -Wundef -Wunused-function -Wformat=2"
- fi
-
- # Additional macosx handling
- if test "x$OPENJDK_$1_OS" = xmacosx; then
- # MACOSX_VERSION_MIN specifies the lowest version of Macosx that the built
- # binaries should be compatible with, even if compiled on a newer version
- # of the OS. It currently has a hard coded value. Setting this also limits
- # exposure to API changes in header files. Bumping this is likely to
- # require code changes to build.
- MACOSX_VERSION_MIN=10.7.0
- AC_SUBST(MACOSX_VERSION_MIN)
-
- # Setting --with-macosx-version-max=<version> makes it an error to build or
- # link to macosx APIs that are newer than the given OS version. The expected
- # format for <version> is either nn.n.n or nn.nn.nn. See /usr/include/AvailabilityMacros.h.
- AC_ARG_WITH([macosx-version-max], [AS_HELP_STRING([--with-macosx-version-max],
- [error on use of newer functionality. @<:@macosx@:>@])],
- [
- if echo "$with_macosx_version_max" | $GREP -q "^[[0-9]][[0-9]]\.[[0-9]]\.[[0-9]]\$"; then
- MACOSX_VERSION_MAX=$with_macosx_version_max
- elif echo "$with_macosx_version_max" | $GREP -q "^[[0-9]][[0-9]]\.[[0-9]][[0-9]]\.[[0-9]][[0-9]]\$"; then
- MACOSX_VERSION_MAX=$with_macosx_version_max
- elif test "x$with_macosx_version_max" = "xno"; then
- # Use build system default
- MACOSX_VERSION_MAX=
- else
- AC_MSG_ERROR([osx version format must be nn.n.n or nn.nn.nn])
- fi
- ],
- [MACOSX_VERSION_MAX=]
- )
- AC_SUBST(MACOSX_VERSION_MAX)
-
- # Let the flags variables get resolved in make for easier override on make
- # command line. AvailabilityMacros.h versions have no dots, ex: 1070.
- $2COMMON_CCXXFLAGS_JDK="[$]$2COMMON_CCXXFLAGS_JDK \
- -DMAC_OS_X_VERSION_MIN_REQUIRED=\$(subst .,,\$(MACOSX_VERSION_MIN)) \
- -mmacosx-version-min=\$(MACOSX_VERSION_MIN)"
- $2LDFLAGS_JDK="[$]$2LDFLAGS_JDK -mmacosx-version-min=\$(MACOSX_VERSION_MIN)"
- $2JVM_CFLAGS="[$]$2JVM_CFLAGS \
- -DMAC_OS_X_VERSION_MIN_REQUIRED=\$(subst .,,\$(MACOSX_VERSION_MIN)) \
- -mmacosx-version-min=\$(MACOSX_VERSION_MIN)"
- $2ARFLAGS="$2$ARFLAGS -mmacosx-version-min=\$(MACOSX_VERSION_MIN)"
-
- if test -n "$MACOSX_VERSION_MAX"; then
- $2COMMON_CCXXFLAGS_JDK="[$]$2COMMON_CCXXFLAGS_JDK \
- -DMAC_OS_X_VERSION_MAX_ALLOWED=\$(subst .,,\$(MACOSX_VERSION_MAX))"
- $2JVM_CFLAGS="[$]$2JVM_CFLAGS \
- -DMAC_OS_X_VERSION_MAX_ALLOWED=\$(subst .,,\$(MACOSX_VERSION_MAX))"
- fi
- fi
-
- # Setup some hard coded includes
- $2COMMON_CCXXFLAGS_JDK="[$]$2COMMON_CCXXFLAGS_JDK \
- -I\$(SUPPORT_OUTPUTDIR)/modules_include/java.base \
- -I\$(SUPPORT_OUTPUTDIR)/modules_include/java.base/\$(OPENJDK_TARGET_OS_INCLUDE_SUBDIR) \
- -I${TOPDIR}/src/java.base/share/native/libjava \
- -I${TOPDIR}/src/java.base/$OPENJDK_$1_OS_TYPE/native/libjava \
- -I${TOPDIR}/src/hotspot/share/include \
- -I${TOPDIR}/src/hotspot/os/${HOTSPOT_$1_OS_TYPE}/include"
-
- # The shared libraries are compiled using the picflag.
- $2CFLAGS_JDKLIB="[$]$2COMMON_CCXXFLAGS_JDK \
- [$]$2CFLAGS_JDK [$]$2EXTRA_CFLAGS_JDK $PICFLAG [$]$2CFLAGS_JDKLIB_EXTRA"
- $2CXXFLAGS_JDKLIB="[$]$2COMMON_CCXXFLAGS_JDK \
- [$]$2CXXFLAGS_JDK [$]$2EXTRA_CXXFLAGS_JDK $PICFLAG [$]$2CXXFLAGS_JDKLIB_EXTRA"
-
- # Executable flags
- $2CFLAGS_JDKEXE="[$]$2COMMON_CCXXFLAGS_JDK [$]$2CFLAGS_JDK [$]$2EXTRA_CFLAGS_JDK"
- $2CXXFLAGS_JDKEXE="[$]$2COMMON_CCXXFLAGS_JDK [$]$2CXXFLAGS_JDK [$]$2EXTRA_CXXFLAGS_JDK"
-
- AC_SUBST($2CFLAGS_JDKLIB)
- AC_SUBST($2CFLAGS_JDKEXE)
- AC_SUBST($2CXXFLAGS_JDKLIB)
- AC_SUBST($2CXXFLAGS_JDKEXE)
-
- # Setup LDFLAGS et al.
- #
+ FLAGS_SETUP_CFLAGS
+ FLAGS_SETUP_LDFLAGS
- if test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
- LDFLAGS_MICROSOFT="-nologo -opt:ref"
- $2LDFLAGS_JDK="[$]$2LDFLAGS_JDK $LDFLAGS_MICROSOFT -incremental:no"
- $2JVM_LDFLAGS="[$]$2JVM_LDFLAGS $LDFLAGS_MICROSOFT -opt:icf,8 -subsystem:windows -base:0x8000000 -ignore:4281"
- if test "x$OPENJDK_$1_CPU_BITS" = "x32"; then
- LDFLAGS_SAFESH="-safeseh"
- $2LDFLAGS_JDK="[$]$2LDFLAGS_JDK $LDFLAGS_SAFESH"
- $2JVM_LDFLAGS="[$]$2JVM_LDFLAGS $LDFLAGS_SAFESH"
- # NOTE: Old build added -machine. Probably not needed.
- $2JVM_LDFLAGS="[$]$2JVM_LDFLAGS -machine:I386"
- else
- $2JVM_LDFLAGS="[$]$2JVM_LDFLAGS -machine:AMD64"
- fi
- elif test "x$TOOLCHAIN_TYPE" = xclang; then
- $2JVM_LDFLAGS="[$]$2JVM_LDFLAGS -mno-omit-leaf-frame-pointer -mstack-alignment=16 -stdlib=libstdc++ -fPIC"
- if test "x$OPENJDK_$1_OS" = xmacosx; then
- # FIXME: We should really generalize SET_SHARED_LIBRARY_ORIGIN instead.
- $2JVM_LDFLAGS="[$]$2JVM_LDFLAGS -Wl,-rpath,@loader_path/. -Wl,-rpath,@loader_path/.."
- fi
- elif test "x$TOOLCHAIN_TYPE" = xgcc; then
- # If this is a --hash-style=gnu system, use --hash-style=both, why?
- # We have previously set HAS_GNU_HASH if this is the case
- if test -n "$HAS_GNU_HASH"; then
- $2LDFLAGS_HASH_STYLE="-Wl,--hash-style=both"
- $2LDFLAGS_JDK="${$2LDFLAGS_JDK} [$]$2LDFLAGS_HASH_STYLE"
- $2JVM_LDFLAGS="[$]$2JVM_LDFLAGS [$]$2LDFLAGS_HASH_STYLE"
- fi
- if test "x$OPENJDK_$1_OS" = xmacosx; then
- $2JVM_LDFLAGS="[$]$2JVM_LDFLAGS -Wl,-rpath,@loader_path/. -Wl,-rpath,@loader_path/.."
- fi
- if test "x$OPENJDK_$1_OS" = xlinux; then
- # And since we now know that the linker is gnu, then add -z defs, to forbid
- # undefined symbols in object files.
- LDFLAGS_NO_UNDEF_SYM="-Wl,-z,defs"
- $2LDFLAGS_JDK="${$2LDFLAGS_JDK} $LDFLAGS_NO_UNDEF_SYM"
- $2JVM_LDFLAGS="[$]$2JVM_LDFLAGS $LDFLAGS_NO_UNDEF_SYM"
- LDFLAGS_NO_EXEC_STACK="-Wl,-z,noexecstack"
- $2JVM_LDFLAGS="[$]$2JVM_LDFLAGS $LDFLAGS_NO_EXEC_STACK"
- if test "x$OPENJDK_$1_CPU" = xx86; then
- $2JVM_LDFLAGS="[$]$2JVM_LDFLAGS -march=i586"
- fi
- case $DEBUG_LEVEL in
- release )
- # tell linker to optimize libraries.
- # Should this be supplied to the OSS linker as well?
- LDFLAGS_DEBUGLEVEL_release="-Wl,-O1"
- $2LDFLAGS_JDK="${$2LDFLAGS_JDK} $LDFLAGS_DEBUGLEVEL_release"
- $2JVM_LDFLAGS="[$]$2JVM_LDFLAGS $LDFLAGS_DEBUGLEVEL_release"
- if test "x$HAS_LINKER_RELRO" = "xtrue"; then
- $2JVM_LDFLAGS="[$]$2JVM_LDFLAGS $LINKER_RELRO_FLAG"
- fi
- ;;
- slowdebug )
- # Hotspot always let the linker optimize
- $2JVM_LDFLAGS="[$]$2JVM_LDFLAGS -Wl,-O1"
- if test "x$HAS_LINKER_NOW" = "xtrue"; then
- # do relocations at load
- $2LDFLAGS_JDK="[$]$2LDFLAGS_JDK $LINKER_NOW_FLAG"
- $2LDFLAGS_CXX_JDK="[$]$2LDFLAGS_CXX_JDK $LINKER_NOW_FLAG"
- $2JVM_LDFLAGS="[$]$2JVM_LDFLAGS $LINKER_NOW_FLAG"
- fi
- if test "x$HAS_LINKER_RELRO" = "xtrue"; then
- # mark relocations read only
- $2LDFLAGS_JDK="[$]$2LDFLAGS_JDK $LINKER_RELRO_FLAG"
- $2LDFLAGS_CXX_JDK="[$]$2LDFLAGS_CXX_JDK $LINKER_RELRO_FLAG"
- $2JVM_LDFLAGS="[$]$2JVM_LDFLAGS $LINKER_RELRO_FLAG"
- fi
- ;;
- fastdebug )
- # Hotspot always let the linker optimize
- $2JVM_LDFLAGS="[$]$2JVM_LDFLAGS -Wl,-O1"
- if test "x$HAS_LINKER_RELRO" = "xtrue"; then
- # mark relocations read only
- $2LDFLAGS_JDK="[$]$2LDFLAGS_JDK $LINKER_RELRO_FLAG"
- $2LDFLAGS_CXX_JDK="[$]$2LDFLAGS_CXX_JDK $LINKER_RELRO_FLAG"
- $2JVM_LDFLAGS="[$]$2JVM_LDFLAGS $LINKER_RELRO_FLAG"
- fi
- ;;
- * )
- AC_MSG_ERROR([Unrecognized \$DEBUG_LEVEL: $DEBUG_LEVEL])
- ;;
- esac
- fi
- elif test "x$TOOLCHAIN_TYPE" = xsolstudio; then
- LDFLAGS_SOLSTUDIO="-Wl,-z,defs"
- $2LDFLAGS_JDK="[$]$2LDFLAGS_JDK $LDFLAGS_SOLSTUDIO -ztext"
- LDFLAGS_CXX_SOLSTUDIO="-norunpath"
- $2LDFLAGS_CXX_JDK="[$]$2LDFLAGS_CXX_JDK $LDFLAGS_CXX_SOLSTUDIO -xnolib"
- $2JVM_LDFLAGS="[$]$2JVM_LDFLAGS $LDFLAGS_SOLSTUDIO -library=%none -mt $LDFLAGS_CXX_SOLSTUDIO -z noversion"
- if test "x$OPENJDK_$1_CPU_ARCH" = "xsparc"; then
- $2JVM_LDFLAGS="[$]$2JVM_LDFLAGS -xarch=sparc"
- fi
- elif test "x$TOOLCHAIN_TYPE" = xxlc; then
- LDFLAGS_XLC="-b64 -brtl -bnolibpath -bexpall -bernotok -btextpsize:64K -bdatapsize:64K -bstackpsize:64K"
- $2LDFLAGS_JDK="${$2LDFLAGS_JDK} $LDFLAGS_XLC"
- $2JVM_LDFLAGS="[$]$2JVM_LDFLAGS $LDFLAGS_XLC"
- # We need '-qminimaltoc' or '-qpic=large -bbigtoc' if the TOC overflows.
- # Hotspot now overflows its 64K TOC (currently only for debug),
- # so we build with '-qpic=large -bbigtoc'.
- if test "x$DEBUG_LEVEL" = xslowdebug || test "x$DEBUG_LEVEL" = xfastdebug; then
- $2JVM_LDFLAGS="[$]$2JVM_LDFLAGS -bbigtoc"
- fi
- fi
+ FLAGS_SETUP_ARFLAGS
+ FLAGS_SETUP_STRIPFLAGS
+ FLAGS_SETUP_RCFLAGS
- # Customize LDFLAGS for executables
-
- $2LDFLAGS_JDKEXE="${$2LDFLAGS_JDK}"
-
- if test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
- if test "x$OPENJDK_$1_CPU_BITS" = "x64"; then
- LDFLAGS_STACK_SIZE=1048576
- else
- LDFLAGS_STACK_SIZE=327680
- fi
- $2LDFLAGS_JDKEXE="${$2LDFLAGS_JDKEXE} /STACK:$LDFLAGS_STACK_SIZE"
- elif test "x$OPENJDK_$1_OS" = xlinux; then
- $2LDFLAGS_JDKEXE="[$]$2LDFLAGS_JDKEXE -Wl,--allow-shlib-undefined"
- fi
-
- $2LDFLAGS_JDKEXE="${$2LDFLAGS_JDKEXE} ${$2EXTRA_LDFLAGS_JDK}"
-
- # Customize LDFLAGS for libs
- $2LDFLAGS_JDKLIB="${$2LDFLAGS_JDK}"
-
- $2LDFLAGS_JDKLIB="${$2LDFLAGS_JDKLIB} ${SHARED_LIBRARY_FLAGS}"
- $2LDFLAGS_JDKLIB="${$2LDFLAGS_JDKLIB} ${LDFLAGS_NO_EXEC_STACK}"
- if test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
- $2JAVA_BASE_LDFLAGS="${$2JAVA_BASE_LDFLAGS} \
- -libpath:${OUTPUTDIR}/support/modules_libs/java.base"
- $2JDKLIB_LIBS=""
- else
- $2JAVA_BASE_LDFLAGS="${$2JAVA_BASE_LDFLAGS} \
- -L\$(SUPPORT_OUTPUTDIR)/modules_libs/java.base"
-
- if test "x$1" = "xTARGET"; then
- # On some platforms (mac) the linker warns about non existing -L dirs.
- # For any of the variants server, client or minimal, the dir matches the
- # variant name. The "main" variant should be used for linking. For the
- # rest, the dir is just server.
- if HOTSPOT_CHECK_JVM_VARIANT(server) || HOTSPOT_CHECK_JVM_VARIANT(client) \
- || HOTSPOT_CHECK_JVM_VARIANT(minimal); then
- $2JAVA_BASE_LDFLAGS="${$2JAVA_BASE_LDFLAGS} \
- -L\$(SUPPORT_OUTPUTDIR)/modules_libs/java.base/$JVM_VARIANT_MAIN"
- else
- $2JAVA_BASE_LDFLAGS="${$2JAVA_BASE_LDFLAGS} \
- -L\$(SUPPORT_OUTPUTDIR)/modules_libs/java.base/server"
- fi
- elif test "x$1" = "xBUILD"; then
- # When building a buildjdk, it's always only the server variant
- $2JAVA_BASE_LDFLAGS="${$2JAVA_BASE_LDFLAGS} \
- -L\$(SUPPORT_OUTPUTDIR)/modules_libs/java.base/server"
- fi
-
- $2JDKLIB_LIBS="-ljava -ljvm"
- if test "x$TOOLCHAIN_TYPE" = xsolstudio; then
- $2JDKLIB_LIBS="[$]$2JDKLIB_LIBS -lc"
- fi
-
- fi
-
-$2LDFLAGS_JDKLIB="${$2LDFLAGS_JDKLIB} ${$2JAVA_BASE_LDFLAGS}"
-
- # Set $2JVM_LIBS (per os)
- if test "x$OPENJDK_$1_OS" = xlinux; then
- $2JVM_LIBS="[$]$2JVM_LIBS -lm -ldl -lpthread"
- elif test "x$OPENJDK_$1_OS" = xsolaris; then
- # FIXME: This hard-coded path is not really proper.
- if test "x$OPENJDK_$1_CPU" = xx86_64; then
- $2SOLARIS_LIBM_LIBS="/usr/lib/amd64/libm.so.1"
- elif test "x$OPENJDK_$1_CPU" = xsparcv9; then
- $2SOLARIS_LIBM_LIBS="/usr/lib/sparcv9/libm.so.1"
- fi
- $2JVM_LIBS="[$]$2JVM_LIBS -lsocket -lsched -ldl $SOLARIS_LIBM_LIBS -lCrun \
- -lthread -ldoor -lc -ldemangle -lnsl -lrt"
- elif test "x$OPENJDK_$1_OS" = xmacosx; then
- $2JVM_LIBS="[$]$2JVM_LIBS -lm"
- elif test "x$OPENJDK_$1_OS" = xaix; then
- $2JVM_LIBS="[$]$2JVM_LIBS -Wl,-lC_r -lm -ldl -lpthread"
- elif test "x$OPENJDK_$1_OS" = xbsd; then
- $2JVM_LIBS="[$]$2JVM_LIBS -lm"
- elif test "x$OPENJDK_$1_OS" = xwindows; then
- $2JVM_LIBS="[$]$2JVM_LIBS kernel32.lib user32.lib gdi32.lib winspool.lib \
- comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib \
- wsock32.lib winmm.lib version.lib psapi.lib"
- fi
-
- # Set $2JVM_ASFLAGS
- if test "x$OPENJDK_$1_OS" = xlinux; then
- if test "x$OPENJDK_$1_CPU" = xx86; then
- $2JVM_ASFLAGS="[$]$2JVM_ASFLAGS -march=i586"
- fi
- elif test "x$OPENJDK_$1_OS" = xmacosx; then
- $2JVM_ASFLAGS="[$]$2JVM_ASFLAGS -x assembler-with-cpp -mno-omit-leaf-frame-pointer -mstack-alignment=16"
- fi
-
- $2LDFLAGS_JDKLIB="${$2LDFLAGS_JDKLIB} ${$2EXTRA_LDFLAGS_JDK}"
-
- AC_SUBST($2LDFLAGS_JDKLIB)
- AC_SUBST($2LDFLAGS_JDKEXE)
- AC_SUBST($2JDKLIB_LIBS)
- AC_SUBST($2JDKEXE_LIBS)
- AC_SUBST($2LDFLAGS_CXX_JDK)
- AC_SUBST($2LDFLAGS_HASH_STYLE)
- AC_SUBST($2LDFLAGS_NO_EXEC_STACK)
-
- AC_SUBST($2JVM_CFLAGS)
- AC_SUBST($2JVM_LDFLAGS)
- AC_SUBST($2JVM_ASFLAGS)
- AC_SUBST($2JVM_LIBS)
-
+ FLAGS_SETUP_ASFLAGS
+ FLAGS_SETUP_ASFLAGS_CPU_DEP([TARGET])
+ FLAGS_SETUP_ASFLAGS_CPU_DEP([BUILD], [OPENJDK_BUILD_])
])
# FLAGS_C_COMPILER_CHECK_ARGUMENTS(ARGUMENT: [ARGUMENT], IF_TRUE: [RUN-IF-TRUE],
@@ -1520,110 +504,3 @@
ARG_IF_FALSE
fi
])
-
-AC_DEFUN_ONCE([FLAGS_SETUP_COMPILER_FLAGS_MISC],
-[
- # Check that the compiler supports -mX (or -qX on AIX) flags
- # Set COMPILER_SUPPORTS_TARGET_BITS_FLAG to 'true' if it does
- FLAGS_COMPILER_CHECK_ARGUMENTS(ARGUMENT: [${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}],
- IF_TRUE: [COMPILER_SUPPORTS_TARGET_BITS_FLAG=true],
- IF_FALSE: [COMPILER_SUPPORTS_TARGET_BITS_FLAG=false])
- AC_SUBST(COMPILER_SUPPORTS_TARGET_BITS_FLAG)
-
- AC_ARG_ENABLE([warnings-as-errors], [AS_HELP_STRING([--disable-warnings-as-errors],
- [do not consider native warnings to be an error @<:@enabled@:>@])])
-
- AC_MSG_CHECKING([if native warnings are errors])
- if test "x$enable_warnings_as_errors" = "xyes"; then
- AC_MSG_RESULT([yes (explicitly set)])
- WARNINGS_AS_ERRORS=true
- elif test "x$enable_warnings_as_errors" = "xno"; then
- AC_MSG_RESULT([no])
- WARNINGS_AS_ERRORS=false
- elif test "x$enable_warnings_as_errors" = "x"; then
- AC_MSG_RESULT([yes (default)])
- WARNINGS_AS_ERRORS=true
- else
- AC_MSG_ERROR([--enable-warnings-as-errors accepts no argument])
- fi
-
- AC_SUBST(WARNINGS_AS_ERRORS)
-
- case "${TOOLCHAIN_TYPE}" in
- microsoft)
- DISABLE_WARNING_PREFIX="-wd"
- CFLAGS_WARNINGS_ARE_ERRORS="-WX"
- ;;
- solstudio)
- DISABLE_WARNING_PREFIX="-erroff="
- CFLAGS_WARNINGS_ARE_ERRORS="-errtags -errwarn=%all"
- ;;
- gcc)
- # Prior to gcc 4.4, a -Wno-X where X is unknown for that version of gcc will cause an error
- FLAGS_COMPILER_CHECK_ARGUMENTS(ARGUMENT: [-Wno-this-is-a-warning-that-do-not-exist],
- IF_TRUE: [GCC_CAN_DISABLE_WARNINGS=true],
- IF_FALSE: [GCC_CAN_DISABLE_WARNINGS=false]
- )
- if test "x$GCC_CAN_DISABLE_WARNINGS" = "xtrue"; then
- DISABLE_WARNING_PREFIX="-Wno-"
- else
- DISABLE_WARNING_PREFIX=
- fi
- CFLAGS_WARNINGS_ARE_ERRORS="-Werror"
- # Repeate the check for the BUILD_CC and BUILD_CXX. Need to also reset
- # CFLAGS since any target specific flags will likely not work with the
- # build compiler
- CC_OLD="$CC"
- CXX_OLD="$CXX"
- CC="$BUILD_CC"
- CXX="$BUILD_CXX"
- CFLAGS_OLD="$CFLAGS"
- CFLAGS=""
- FLAGS_COMPILER_CHECK_ARGUMENTS(ARGUMENT: [-Wno-this-is-a-warning-that-do-not-exist],
- IF_TRUE: [BUILD_CC_CAN_DISABLE_WARNINGS=true],
- IF_FALSE: [BUILD_CC_CAN_DISABLE_WARNINGS=false]
- )
- if test "x$BUILD_CC_CAN_DISABLE_WARNINGS" = "xtrue"; then
- BUILD_CC_DISABLE_WARNING_PREFIX="-Wno-"
- else
- BUILD_CC_DISABLE_WARNING_PREFIX=
- fi
- CC="$CC_OLD"
- CXX="$CXX_OLD"
- CFLAGS="$CFLAGS_OLD"
- ;;
- clang)
- DISABLE_WARNING_PREFIX="-Wno-"
- CFLAGS_WARNINGS_ARE_ERRORS="-Werror"
- ;;
- xlc)
- DISABLE_WARNING_PREFIX="-qsuppress="
- CFLAGS_WARNINGS_ARE_ERRORS="-qhalt=w"
- ;;
- esac
- AC_SUBST(DISABLE_WARNING_PREFIX)
- AC_SUBST(BUILD_CC_DISABLE_WARNING_PREFIX)
- AC_SUBST(CFLAGS_WARNINGS_ARE_ERRORS)
-])
-
-# FLAGS_SETUP_GCC6_COMPILER_FLAGS([PREFIX])
-# Arguments:
-# $1 - Optional prefix for each variable defined.
-AC_DEFUN([FLAGS_SETUP_GCC6_COMPILER_FLAGS],
-[
- # These flags are required for GCC 6 builds as undefined behaviour in OpenJDK code
- # runs afoul of the more aggressive versions of these optimisations.
- # Notably, value range propagation now assumes that the this pointer of C++
- # member functions is non-null.
- NO_DELETE_NULL_POINTER_CHECKS_CFLAG="-fno-delete-null-pointer-checks"
- dnl Argument check is disabled until FLAGS_COMPILER_CHECK_ARGUMENTS handles cross-compilation
- dnl FLAGS_COMPILER_CHECK_ARGUMENTS(ARGUMENT: [$NO_DELETE_NULL_POINTER_CHECKS_CFLAG -Werror],
- dnl IF_FALSE: [NO_DELETE_NULL_POINTER_CHECKS_CFLAG=""])
- NO_LIFETIME_DSE_CFLAG="-fno-lifetime-dse"
- dnl Argument check is disabled until FLAGS_COMPILER_CHECK_ARGUMENTS handles cross-compilation
- dnl FLAGS_COMPILER_CHECK_ARGUMENTS(ARGUMENT: [$NO_LIFETIME_DSE_CFLAG -Werror],
- dnl IF_FALSE: [NO_LIFETIME_DSE_CFLAG=""])
- AC_MSG_NOTICE([GCC >= 6 detected; adding ${NO_DELETE_NULL_POINTER_CHECKS_CFLAG} and ${NO_LIFETIME_DSE_CFLAG}])
- $1CFLAGS_JDK="[$]$1CFLAGS_JDK ${NO_DELETE_NULL_POINTER_CHECKS_CFLAG} ${NO_LIFETIME_DSE_CFLAG}"
- $1JVM_CFLAGS="[$]$1JVM_CFLAGS ${NO_DELETE_NULL_POINTER_CHECKS_CFLAG} ${NO_LIFETIME_DSE_CFLAG}"
-])
--- a/make/autoconf/hotspot.m4 Thu Mar 01 16:35:36 2018 -0500
+++ b/make/autoconf/hotspot.m4 Fri Mar 02 21:00:12 2018 +0100
@@ -1,5 +1,5 @@
#
-# Copyright (c) 2011, 2017, Oracle and/or its affiliates. All rights reserved.
+# Copyright (c) 2011, 2018, Oracle and/or its affiliates. All rights reserved.
# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
#
# This code is free software; you can redistribute it and/or modify it
@@ -277,13 +277,9 @@
if test "x$OPENJDK_TARGET_CPU" = xarm; then
HOTSPOT_TARGET_CPU=arm_32
HOTSPOT_TARGET_CPU_DEFINE="ARM32"
- JVM_LDFLAGS="$JVM_LDFLAGS -fsigned-char"
- JVM_CFLAGS="$JVM_CFLAGS -DARM -fsigned-char"
elif test "x$OPENJDK_TARGET_CPU" = xaarch64 && test "x$HOTSPOT_TARGET_CPU_PORT" = xarm64; then
HOTSPOT_TARGET_CPU=arm_64
HOTSPOT_TARGET_CPU_ARCH=arm
- JVM_LDFLAGS="$JVM_LDFLAGS -fsigned-char"
- JVM_CFLAGS="$JVM_CFLAGS -DARM -fsigned-char"
fi
# Verify that dependencies are met for explicitly set features.
--- a/make/autoconf/lib-std.m4 Thu Mar 01 16:35:36 2018 -0500
+++ b/make/autoconf/lib-std.m4 Fri Mar 02 21:00:12 2018 +0100
@@ -1,5 +1,5 @@
#
-# Copyright (c) 2011, 2016, Oracle and/or its affiliates. All rights reserved.
+# Copyright (c) 2011, 2018, Oracle and/or its affiliates. All rights reserved.
# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
#
# This code is free software; you can redistribute it and/or modify it
@@ -81,6 +81,9 @@
if test "x$TOOLCHAIN_TYPE" = xsolstudio && test "x$LIBCXX" = x; then
LIBCXX="${SYSROOT}/usr/lib${OPENJDK_TARGET_CPU_ISADIR}/libCrun.so.1"
fi
+ if test "x$TOOLCHAIN_TYPE" = xsolstudio; then
+ LIBCXX_JVM="-lCrun"
+ fi
AC_SUBST(LIBCXX)
--- a/make/autoconf/libraries.m4 Thu Mar 01 16:35:36 2018 -0500
+++ b/make/autoconf/libraries.m4 Fri Mar 02 21:00:12 2018 +0100
@@ -1,5 +1,5 @@
#
-# Copyright (c) 2011, 2017, Oracle and/or its affiliates. All rights reserved.
+# Copyright (c) 2011, 2018, Oracle and/or its affiliates. All rights reserved.
# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
#
# This code is free software; you can redistribute it and/or modify it
@@ -101,6 +101,68 @@
LIB_SETUP_BUNDLED_LIBS
LIB_SETUP_MISC_LIBS
LIB_SETUP_SOLARIS_STLPORT
+
+ if test "x$TOOLCHAIN_TYPE" = xsolstudio; then
+ ALWAYS_LIBS="-lc"
+ else
+ ALWAYS_LIBS=""
+ fi
+
+ BASIC_JDKLIB_LIBS=""
+ if test "x$TOOLCHAIN_TYPE" != xmicrosoft; then
+ BASIC_JDKLIB_LIBS="-ljava -ljvm"
+ fi
+ BASIC_JDKLIB_LIBS="$BASIC_JDKLIB_LIBS $ALWAYS_LIBS"
+
+ # Math library
+ if test "x$OPENJDK_TARGET_OS" != xsolaris; then
+ BASIC_JVM_LIBS="$LIBM"
+ else
+ # FIXME: This hard-coded path is not really proper.
+ if test "x$OPENJDK_TARGET_CPU" = xx86_64; then
+ BASIC_SOLARIS_LIBM_LIBS="/usr/lib/amd64/libm.so.1"
+ elif test "x$OPENJDK_TARGET_CPU" = xsparcv9; then
+ BASIC_SOLARIS_LIBM_LIBS="/usr/lib/sparcv9/libm.so.1"
+ fi
+ BASIC_JVM_LIBS="$BASIC_SOLARIS_LIBM_LIBS"
+ fi
+
+ # Dynamic loading library
+ if test "x$OPENJDK_TARGET_OS" = xlinux || test "x$OPENJDK_TARGET_OS" = xsolaris || test "x$OPENJDK_TARGET_OS" = xaix; then
+ BASIC_JVM_LIBS="$BASIC_JVM_LIBS $LIBDL"
+ fi
+
+ # Threading library
+ if test "x$OPENJDK_TARGET_OS" = xlinux || test "x$OPENJDK_TARGET_OS" = xaix; then
+ BASIC_JVM_LIBS="$BASIC_JVM_LIBS -lpthread"
+ elif test "x$OPENJDK_TARGET_OS" = xsolaris; then
+ BASIC_JVM_LIBS="$BASIC_JVM_LIBS -lthread"
+ fi
+
+ if test "x$OPENJDK_TARGET_OS" = xsolaris; then
+ BASIC_JVM_LIBS="$BASIC_JVM_LIBS -lsocket -lsched -ldoor -ldemangle -lnsl \
+ -lrt"
+ BASIC_JVM_LIBS="$BASIC_JVM_LIBS $LIBCXX_JVM"
+ fi
+
+ if test "x$OPENJDK_TARGET_OS" = xwindows; then
+ BASIC_JVM_LIBS="$BASIC_JVM_LIBS kernel32.lib user32.lib gdi32.lib winspool.lib \
+ comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib \
+ wsock32.lib winmm.lib version.lib psapi.lib"
+ fi
+ BASIC_JVM_LIBS="$BASIC_JVM_LIBS $ALWAYS_LIBS"
+
+ JDKLIB_LIBS="$BASIC_JDKLIB_LIBS"
+ JDKEXE_LIBS=""
+ JVM_LIBS="$BASIC_JVM_LIBS"
+ OPENJDK_BUILD_JDKLIB_LIBS="$BASIC_JDKLIB_LIBS"
+ OPENJDK_BUILD_JVM_LIBS="$BASIC_JVM_LIBS"
+
+ AC_SUBST(JDKLIB_LIBS)
+ AC_SUBST(JDKEXE_LIBS)
+ AC_SUBST(JVM_LIBS)
+ AC_SUBST(OPENJDK_BUILD_JDKLIB_LIBS)
+ AC_SUBST(OPENJDK_BUILD_JVM_LIBS)
])
################################################################################
--- a/make/autoconf/platform.m4 Thu Mar 01 16:35:36 2018 -0500
+++ b/make/autoconf/platform.m4 Fri Mar 02 21:00:12 2018 +0100
@@ -1,5 +1,5 @@
#
-# Copyright (c) 2011, 2017, Oracle and/or its affiliates. All rights reserved.
+# Copyright (c) 2011, 2018, Oracle and/or its affiliates. All rights reserved.
# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
#
# This code is free software; you can redistribute it and/or modify it
@@ -403,15 +403,6 @@
OPENJDK_$1_BUNDLE_PLATFORM="${OPENJDK_$1_OS_BUNDLE}-${OPENJDK_$1_CPU_BUNDLE}"
AC_SUBST(OPENJDK_$1_BUNDLE_PLATFORM)
- if test "x$OPENJDK_$1_CPU_BITS" = x64; then
- # -D_LP64=1 is only set on linux and mac. Setting on windows causes diff in
- # unpack200.exe. This variable is used in
- # FLAGS_SETUP_COMPILER_FLAGS_FOR_JDK_HELPER.
- if test "x$OPENJDK_$1_OS" = xlinux || test "x$OPENJDK_$1_OS" = xmacosx; then
- OPENJDK_$1_ADD_LP64="-D_LP64=1"
- fi
- fi
-
if test "x$COMPILE_TYPE" = "xcross"; then
# FIXME: ... or should this include reduced builds..?
DEFINE_CROSS_COMPILE_ARCH="CROSS_COMPILE_ARCH:=$OPENJDK_$1_CPU_LEGACY"
@@ -563,31 +554,6 @@
AC_SUBST(OS_VERSION_MICRO)
])
-# Support macro for PLATFORM_SETUP_OPENJDK_TARGET_BITS.
-# Add -mX to various FLAGS variables.
-AC_DEFUN([PLATFORM_SET_COMPILER_TARGET_BITS_FLAGS],
-[
- # When we add flags to the "official" CFLAGS etc, we need to
- # keep track of these additions in ADDED_CFLAGS etc. These
- # will later be checked to make sure only controlled additions
- # have been made to CFLAGS etc.
- ADDED_CFLAGS=" ${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}"
- ADDED_CXXFLAGS=" ${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}"
- ADDED_LDFLAGS=" ${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}"
-
- CFLAGS="${CFLAGS}${ADDED_CFLAGS}"
- CXXFLAGS="${CXXFLAGS}${ADDED_CXXFLAGS}"
- LDFLAGS="${LDFLAGS}${ADDED_LDFLAGS}"
-
- CFLAGS_JDK="${CFLAGS_JDK}${ADDED_CFLAGS}"
- CXXFLAGS_JDK="${CXXFLAGS_JDK}${ADDED_CXXFLAGS}"
- LDFLAGS_JDK="${LDFLAGS_JDK}${ADDED_LDFLAGS}"
-
- JVM_CFLAGS="$JVM_CFLAGS $ADDED_CFLAGS"
- JVM_LDFLAGS="$JVM_LDFLAGS $ADDED_LDFLAGS"
- JVM_ASFLAGS="$JVM_ASFLAGS $ADDED_CFLAGS"
-])
-
AC_DEFUN_ONCE([PLATFORM_SETUP_OPENJDK_TARGET_BITS],
[
###############################################################################
@@ -597,22 +563,6 @@
# is made at runtime.)
#
- if test "x$OPENJDK_TARGET_OS" = xsolaris || test "x$OPENJDK_TARGET_OS" = xaix; then
- # Always specify -m flag on Solaris
- # And -q on AIX because otherwise the compiler produces 32-bit objects by default
- PLATFORM_SET_COMPILER_TARGET_BITS_FLAGS
- elif test "x$COMPILE_TYPE" = xreduced; then
- if test "x$OPENJDK_TARGET_OS_TYPE" = xunix; then
- # Specify -m if running reduced on unix platforms
- PLATFORM_SET_COMPILER_TARGET_BITS_FLAGS
- fi
- fi
- if test "x$OPENJDK_TARGET_OS" = xmacosx; then
- JVM_CFLAGS="$JVM_CFLAGS ${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}"
- JVM_LDFLAGS="$JVM_LDFLAGS ${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}"
- JVM_ASFLAGS="$JVM_ASFLAGS ${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}"
- fi
-
# Make compilation sanity check
AC_CHECK_HEADERS([stdio.h], , [
AC_MSG_NOTICE([Failed to compile stdio.h. This likely implies missing compile dependencies.])
@@ -635,33 +585,14 @@
TESTED_TARGET_CPU_BITS=`expr 8 \* $ac_cv_sizeof_int_p`
if test "x$TESTED_TARGET_CPU_BITS" != "x$OPENJDK_TARGET_CPU_BITS"; then
- # This situation may happen on 64-bit platforms where the compiler by default only generates 32-bit objects
- # Let's try to implicitely set the compilers target architecture and retry the test
- AC_MSG_NOTICE([The tested number of bits in the target ($TESTED_TARGET_CPU_BITS) differs from the number of bits expected to be found in the target ($OPENJDK_TARGET_CPU_BITS).])
- AC_MSG_NOTICE([Retrying with platforms compiler target bits flag to ${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}])
- PLATFORM_SET_COMPILER_TARGET_BITS_FLAGS
-
- # We have to unset 'ac_cv_sizeof_int_p' first, otherwise AC_CHECK_SIZEOF will use the previously cached value!
- unset ac_cv_sizeof_int_p
- # And we have to undef the definition of SIZEOF_INT_P in confdefs.h by the previous invocation of AC_CHECK_SIZEOF
- cat >>confdefs.h <<_ACEOF
-#undef SIZEOF_INT_P
-_ACEOF
-
- AC_CHECK_SIZEOF([int *], [1111])
-
- TESTED_TARGET_CPU_BITS=`expr 8 \* $ac_cv_sizeof_int_p`
-
- if test "x$TESTED_TARGET_CPU_BITS" != "x$OPENJDK_TARGET_CPU_BITS"; then
- AC_MSG_NOTICE([The tested number of bits in the target ($TESTED_TARGET_CPU_BITS) differs from the number of bits expected to be found in the target ($OPENJDK_TARGET_CPU_BITS)])
- if test "x$COMPILE_TYPE" = xreduced; then
- HELP_MSG_MISSING_DEPENDENCY([reduced])
- AC_MSG_NOTICE([You are doing a reduced build. Check that you have 32-bit libraries installed. $HELP_MSG])
- elif test "x$COMPILE_TYPE" = xcross; then
- AC_MSG_NOTICE([You are doing a cross-compilation. Check that you have all target platform libraries installed.])
- fi
- AC_MSG_ERROR([Cannot continue.])
+ AC_MSG_NOTICE([The tested number of bits in the target ($TESTED_TARGET_CPU_BITS) differs from the number of bits expected to be found in the target ($OPENJDK_TARGET_CPU_BITS)])
+ if test "x$COMPILE_TYPE" = xreduced; then
+ HELP_MSG_MISSING_DEPENDENCY([reduced])
+ AC_MSG_NOTICE([You are doing a reduced build. Check that you have 32-bit libraries installed. $HELP_MSG])
+ elif test "x$COMPILE_TYPE" = xcross; then
+ AC_MSG_NOTICE([You are doing a cross-compilation. Check that you have all target platform libraries installed.])
fi
+ AC_MSG_ERROR([Cannot continue.])
fi
fi
--- a/make/autoconf/spec.gmk.in Thu Mar 01 16:35:36 2018 -0500
+++ b/make/autoconf/spec.gmk.in Fri Mar 02 21:00:12 2018 +0100
@@ -423,7 +423,7 @@
WARNINGS_AS_ERRORS := @WARNINGS_AS_ERRORS@
CFLAGS_CCACHE:=@CFLAGS_CCACHE@
-CXXSTD_CXXFLAG=@CXXSTD_CXXFLAG@
+ADLC_CXXFLAG=@ADLC_CXXFLAG@
# Tools that potentially need to be cross compilation aware.
CC:=@FIXPATH@ @CCACHE@ @ICECC@ @CC@
@@ -436,11 +436,10 @@
CFLAGS_JDKEXE:=@CFLAGS_JDKEXE@
CXXFLAGS_JDKEXE:=@CXXFLAGS_JDKEXE@
-LDFLAGS_HASH_STYLE := @LDFLAGS_HASH_STYLE@
-LDFLAGS_NO_EXEC_STACK := @LDFLAGS_NO_EXEC_STACK@
+LIBJSIG_HASHSTYLE_LDFLAGS := @LIBJSIG_HASHSTYLE_LDFLAGS@
+LIBJSIG_NOEXECSTACK_LDFLAGS := @LIBJSIG_NOEXECSTACK_LDFLAGS@
JVM_CFLAGS := @JVM_CFLAGS@
-JVM_CFLAGS_SYMBOLS := @JVM_CFLAGS_SYMBOLS@
JVM_LDFLAGS := @JVM_LDFLAGS@
JVM_ASFLAGS := @JVM_ASFLAGS@
JVM_LIBS := @JVM_LIBS@
@@ -524,7 +523,6 @@
# Options for C/CXX compiler to be used if linking is performed
# using reorder file
C_FLAG_REORDER:=@C_FLAG_REORDER@
-CXX_FLAG_REORDER:=@CXX_FLAG_REORDER@
#
# Options for generating debug symbols
@@ -533,7 +531,6 @@
ZIP_EXTERNAL_DEBUG_SYMBOLS := @ZIP_EXTERNAL_DEBUG_SYMBOLS@
CFLAGS_DEBUG_SYMBOLS:=@CFLAGS_DEBUG_SYMBOLS@
-CXXFLAGS_DEBUG_SYMBOLS:=@CXXFLAGS_DEBUG_SYMBOLS@
#
# Compress (or not) jars
@@ -710,6 +707,7 @@
LDD:=@LDD@
OTOOL:=@OTOOL@
READELF:=@READELF@
+ELFEDIT:=@ELFEDIT@
EXPR:=@EXPR@
FILE:=@FILE@
DOT:=@DOT@
--- a/make/autoconf/toolchain.m4 Thu Mar 01 16:35:36 2018 -0500
+++ b/make/autoconf/toolchain.m4 Fri Mar 02 21:00:12 2018 +0100
@@ -1,5 +1,5 @@
#
-# Copyright (c) 2011, 2017, Oracle and/or its affiliates. All rights reserved.
+# Copyright (c) 2011, 2018, Oracle and/or its affiliates. All rights reserved.
# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
#
# This code is free software; you can redistribute it and/or modify it
@@ -783,7 +783,6 @@
fi
BUILD_SYSROOT="$BUILD_DEVKIT_SYSROOT"
- FLAGS_SETUP_SYSROOT_FLAGS([BUILD_])
# Fallback default of just /bin if DEVKIT_PATH is not defined
if test "x$BUILD_DEVKIT_TOOLCHAIN_PATH" = x; then
@@ -830,8 +829,6 @@
BUILD_AS="$AS"
BUILD_OBJCOPY="$OBJCOPY"
BUILD_STRIP="$STRIP"
- BUILD_SYSROOT_CFLAGS="$SYSROOT_CFLAGS"
- BUILD_SYSROOT_LDFLAGS="$SYSROOT_LDFLAGS"
BUILD_AR="$AR"
TOOLCHAIN_PREPARE_FOR_VERSION_COMPARISONS([], [OPENJDK_BUILD_])
@@ -843,8 +840,6 @@
AC_SUBST(BUILD_LDCXX)
AC_SUBST(BUILD_NM)
AC_SUBST(BUILD_AS)
- AC_SUBST(BUILD_SYSROOT_CFLAGS)
- AC_SUBST(BUILD_SYSROOT_LDFLAGS)
AC_SUBST(BUILD_AR)
])
@@ -876,24 +871,6 @@
# If this is a --hash-style=gnu system, use --hash-style=both, why?
HAS_GNU_HASH=`$CC -dumpspecs 2>/dev/null | $GREP 'hash-style=gnu'`
# This is later checked when setting flags.
-
- # "-Og" suppported for GCC 4.8 and later
- CFLAG_OPTIMIZE_DEBUG_FLAG="-Og"
- FLAGS_COMPILER_CHECK_ARGUMENTS(ARGUMENT: [$CFLAG_OPTIMIZE_DEBUG_FLAG],
- IF_TRUE: [HAS_CFLAG_OPTIMIZE_DEBUG=true],
- IF_FALSE: [HAS_CFLAG_OPTIMIZE_DEBUG=false])
-
- # "-z relro" supported in GNU binutils 2.17 and later
- LINKER_RELRO_FLAG="-Wl,-z,relro"
- FLAGS_LINKER_CHECK_ARGUMENTS(ARGUMENT: [$LINKER_RELRO_FLAG],
- IF_TRUE: [HAS_LINKER_RELRO=true],
- IF_FALSE: [HAS_LINKER_RELRO=false])
-
- # "-z now" supported in GNU binutils 2.11 and later
- LINKER_NOW_FLAG="-Wl,-z,now"
- FLAGS_LINKER_CHECK_ARGUMENTS(ARGUMENT: [$LINKER_NOW_FLAG],
- IF_TRUE: [HAS_LINKER_NOW=true],
- IF_FALSE: [HAS_LINKER_NOW=false])
fi
# Check for broken SuSE 'ld' for which 'Only anonymous version tag is allowed
--- a/make/autoconf/version-numbers Thu Mar 01 16:35:36 2018 -0500
+++ b/make/autoconf/version-numbers Fri Mar 02 21:00:12 2018 +0100
@@ -32,6 +32,7 @@
DEFAULT_VERSION_DATE=2018-09-18
DEFAULT_VERSION_CLASSFILE_MAJOR=55 # "`$EXPR $DEFAULT_VERSION_FEATURE + 44`"
DEFAULT_VERSION_CLASSFILE_MINOR=0
+DEFAULT_ACCEPTABLE_BOOT_VERSIONS="9 10 11"
LAUNCHER_NAME=openjdk
PRODUCT_NAME=OpenJDK
--- a/make/common/Modules.gmk Thu Mar 01 16:35:36 2018 -0500
+++ b/make/common/Modules.gmk Fri Mar 02 21:00:12 2018 +0100
@@ -94,6 +94,7 @@
java.smartcardio \
java.sql \
java.sql.rowset \
+ java.transaction.xa \
java.xml.crypto \
jdk.accessibility \
jdk.charsets \
--- a/make/common/NativeCompilation.gmk Thu Mar 01 16:35:36 2018 -0500
+++ b/make/common/NativeCompilation.gmk Fri Mar 02 21:00:12 2018 +0100
@@ -1,5 +1,5 @@
#
-# Copyright (c) 2011, 2016, Oracle and/or its affiliates. All rights reserved.
+# Copyright (c) 2011, 2018, Oracle and/or its affiliates. All rights reserved.
# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
#
# This code is free software; you can redistribute it and/or modify it
@@ -30,7 +30,7 @@
ifndef _NATIVE_COMPILATION_GMK
_NATIVE_COMPILATION_GMK := 1
-ifeq (,$(_MAKEBASE_GMK))
+ifeq ($(_MAKEBASE_GMK), )
$(error You must include MakeBase.gmk prior to including NativeCompilation.gmk)
endif
@@ -150,7 +150,7 @@
define replace_with_obj_extension
$(strip \
$(foreach extension, $(NATIVE_SOURCE_EXTENSIONS), \
- $(patsubst $(extension),%$(OBJ_SUFFIX),$(filter $(extension),$1))) \
+ $(patsubst $(extension),%$(OBJ_SUFFIX), $(filter $(extension), $1))) \
)
endef
@@ -183,150 +183,160 @@
-e 's/$$$$/ :/' \
#
-define add_native_source
- # param 1 = BUILD_MYPACKAGE
- # parma 2 = the source file name (..../alfa.c or .../beta.cpp)
- # param 3 = the bin dir that stores all .o (.obj) and .d files.
- # param 4 = the c flags to the compiler
- # param 5 = the c compiler
- # param 6 = the c++ flags to the compiler
- # param 7 = the c++ compiler
- # param 8 = the flags to the assembler
- # param 9 = set to disable THIS_FILE
-
- ifeq ($9, )
- $1_$2_THIS_FILE = -DTHIS_FILE='"$$(<F)"'
- endif
+################################################################################
+# Create the recipe needed to compile a single native source file.
+#
+# Parameter 1 is the name of the rule, based on the name of the library/
+# program being build and the name of the source code file, e.g.
+# BUILD_LIBFOO_fooMain.cpp.
+#
+# Remaining parameters are named arguments:
+# FILE - The full path of the source file to compiler
+# BASE - The name of the rule for the entire binary to build ($1)
+# DISABLE_THIS_FILE_DEFINE - Set to true to disable the THIS_FILE define.
+#
+SetupCompileNativeFile = $(NamedParamsMacroTemplate)
+define SetupCompileNativeFileBody
+ $1_FILENAME := $$(notdir $$($1_FILE))
- ifeq ($$($1_$(notdir $2)_OPTIMIZATION), )
- $1_$(notdir $2)_OPT_CFLAGS := $$($1_OPT_CFLAGS)
- $1_$(notdir $2)_OPT_CXXFLAGS := $$($1_OPT_CXXFLAGS)
- else
- ifeq (NONE, $$($1_$(notdir $2)_OPTIMIZATION))
- $1_$(notdir $2)_OPT_CFLAGS := $(C_O_FLAG_NONE)
- $1_$(notdir $2)_OPT_CXXFLAGS := $(CXX_O_FLAG_NONE)
- else ifeq (LOW, $$($1_$(notdir $2)_OPTIMIZATION))
- $1_$(notdir $2)_OPT_CFLAGS := $(C_O_FLAG_NORM)
- $1_$(notdir $2)_OPT_CXXFLAGS := $(CXX_O_FLAG_NORM)
- else ifeq (HIGH, $$($1_$(notdir $2)_OPTIMIZATION))
- $1_$(notdir $2)_OPT_CFLAGS := $(C_O_FLAG_HI)
- $1_$(notdir $2)_OPT_CXXFLAGS := $(CXX_O_FLAG_HI)
- else ifeq (HIGHEST, $$($1_$(notdir $2)_OPTIMIZATION))
- $1_$(notdir $2)_OPT_CFLAGS := $(C_O_FLAG_HIGHEST)
- $1_$(notdir $2)_OPT_CXXFLAGS := $(CXX_O_FLAG_HIGHEST)
- else ifeq (HIGHEST_JVM, $$($1_$(notdir $2)_OPTIMIZATION))
- $1_$(notdir $2)_OPT_CFLAGS := $(C_O_FLAG_HIGHEST_JVM)
- $1_$(notdir $2)_OPT_CXXFLAGS := $(CXX_O_FLAG_HIGHEST_JVM)
- else ifeq (SIZE, $$($1_$(notdir $2)_OPTIMIZATION))
- $1_$(notdir $2)_OPT_CFLAGS := $(C_O_FLAG_SIZE)
- $1_$(notdir $2)_OPT_CXXFLAGS := $(CXX_O_FLAG_SIZE)
- else
- $$(error Unknown value for OPTIMIZATION: $$($1_$(notdir $2)_OPTIMIZATION))
+ # The target file to be generated.
+ $1_OBJ := $$($$($1_BASE)_OBJECT_DIR)/$$(call replace_with_obj_extension, \
+ $$($1_FILENAME))
+
+ # Only continue if this object file hasn't been processed already. This lets
+ # the first found source file override any other with the same name.
+ ifeq ($$(findstring $$($1_OBJ), $$($$($1_BASE)_OBJS_SO_FAR)), )
+ $$($1_BASE)_OBJS_SO_FAR += $$($1_OBJ)
+ # This is the definite source file to use for $1_FILENAME.
+ $1_SRC_FILE := $$($1_FILE)
+
+ ifneq ($$($1_DISABLE_THIS_FILE_DEFINE), true)
+ $1_THIS_FILE = -DTHIS_FILE='"$$(<F)"'
endif
- endif
-
- ifneq ($$($1_PRECOMPILED_HEADER), )
- ifeq ($$(filter $$(notdir $2), $$($1_PRECOMPILED_HEADER_EXCLUDE)), )
- $1_$2_USE_PCH_FLAGS := $$($1_USE_PCH_FLAGS)
- endif
- endif
- ifneq (,$$(filter %.c,$2))
- # Compile as a C file
- $1_$2_FLAGS=$(CFLAGS_CCACHE) $$($1_$2_USE_PCH_FLAGS) $4 \
- $$($1_$(notdir $2)_OPT_CFLAGS) \
- $$($1_$(notdir $2)_CFLAGS) $$($1_$2_THIS_FILE) -c
- $1_$2_COMP=$5
- $1_$2_DEP_FLAG:=$(C_FLAG_DEPS)
- else ifneq (,$$(filter %.m,$2))
- # Compile as an Objective-C file
- $1_$2_FLAGS=-x objective-c $(CFLAGS_CCACHE) $$($1_$2_USE_PCH_FLAGS) $4 \
- $$($1_$(notdir $2)_OPT_CFLAGS) \
- $$($1_$(notdir $2)_CFLAGS) $$($1_$2_THIS_FILE) -c
- $1_$2_COMP=$5
- $1_$2_DEP_FLAG:=$(C_FLAG_DEPS)
- else ifneq (,$$(filter %.s %.S,$2))
- # Compile as assembler file
- $1_$2_FLAGS=$8
- $1_$2_COMP=$(AS)
- $1_$2_DEP_FLAG:=
- else ifneq (,$$(filter %.cpp,$2)$$(filter %.cc,$2)$$(filter %.mm,$2))
- # Compile as a C++ or Objective-C++ file
- $1_$2_FLAGS=$(CFLAGS_CCACHE) $$($1_$2_USE_PCH_FLAGS) $6 \
- $$($1_$(notdir $2)_OPT_CXXFLAGS) \
- $$($1_$(notdir $2)_CXXFLAGS) $$($1_$2_THIS_FILE) -c
- $1_$2_COMP=$7
- $1_$2_DEP_FLAG:=$(CXX_FLAG_DEPS)
- else
- $$(error Internal error in NativeCompilation.gmk: no compiler for file $2)
- endif
- # Generate the .o (.obj) file name and place it in the bin dir.
- $1_$2_OBJ := $3/$$(call replace_with_obj_extension, $$(notdir $2))
- # Only continue if this object file hasn't been processed already. This lets the first found
- # source file override any other with the same name.
- ifeq (,$$(findstring $$($1_$2_OBJ),$$($1_OBJS_SO_FAR)))
- $1_OBJS_SO_FAR+=$$($1_$2_OBJ)
- ifeq (,$$(filter %.s %.S,$2))
- # And this is the dependency file for this obj file.
- $1_$2_DEP:=$$(patsubst %$(OBJ_SUFFIX),%.d,$$($1_$2_OBJ))
- # The dependency target file lists all dependencies as empty targets
- # to avoid make error "No rule to make target" for removed files
- $1_$2_DEP_TARGETS:=$$(patsubst %$(OBJ_SUFFIX),%.d.targets,$$($1_$2_OBJ))
+ ifeq ($$($1_OPTIMIZATION), )
+ $1_OPT_CFLAGS := $$($$($1_BASE)_OPT_CFLAGS)
+ $1_OPT_CXXFLAGS := $$($$($1_BASE)_OPT_CXXFLAGS)
+ else
+ ifeq ($$($1_OPTIMIZATION), NONE)
+ $1_OPT_CFLAGS := $(C_O_FLAG_NONE)
+ $1_OPT_CXXFLAGS := $(CXX_O_FLAG_NONE)
+ else ifeq ($$($1_OPTIMIZATION), LOW)
+ $1_OPT_CFLAGS := $(C_O_FLAG_NORM)
+ $1_OPT_CXXFLAGS := $(CXX_O_FLAG_NORM)
+ else ifeq ($$($1_OPTIMIZATION), HIGH)
+ $1_OPT_CFLAGS := $(C_O_FLAG_HI)
+ $1_OPT_CXXFLAGS := $(CXX_O_FLAG_HI)
+ else ifeq ($$($1_OPTIMIZATION), HIGHEST)
+ $1_OPT_CFLAGS := $(C_O_FLAG_HIGHEST)
+ $1_OPT_CXXFLAGS := $(CXX_O_FLAG_HIGHEST)
+ else ifeq ($$($1_OPTIMIZATION), HIGHEST_JVM)
+ $1_OPT_CFLAGS := $(C_O_FLAG_HIGHEST_JVM)
+ $1_OPT_CXXFLAGS := $(CXX_O_FLAG_HIGHEST_JVM)
+ else ifeq ($$($1_OPTIMIZATION), SIZE)
+ $1_OPT_CFLAGS := $(C_O_FLAG_SIZE)
+ $1_OPT_CXXFLAGS := $(CXX_O_FLAG_SIZE)
+ else
+ $$(error Unknown value for file OPTIMIZATION: $$($1_OPTIMIZATION))
+ endif
+ endif
- # Include previously generated dependency information. (if it exists)
- -include $$($1_$2_DEP)
- -include $$($1_$2_DEP_TARGETS)
-
- ifeq ($(TOOLCHAIN_TYPE), microsoft)
- # To avoid name clashes between pdbs for objects and libs/execs, put
- # object pdbs in a separate subdir.
- $1_$2_DEBUG_OUT_FLAGS:=-Fd$$(strip $$(patsubst $$($1_OBJECT_DIR)/%, \
- $$($1_OBJECT_DIR)/pdb/%, $$(patsubst %$(OBJ_SUFFIX),%.pdb,$$($1_$2_OBJ))))
+ ifneq ($$($$($1_BASE)_PRECOMPILED_HEADER), )
+ ifeq ($$(filter $$($1_FILENAME), $$($$($1_BASE)_PRECOMPILED_HEADER_EXCLUDE)), )
+ $1_USE_PCH_FLAGS := $$($$($1_BASE)_USE_PCH_FLAGS)
endif
endif
- ifneq ($$(strip $$($1_$(notdir $2)_CFLAGS) $$($1_$(notdir $2)_CXXFLAGS) \
- $$($1_$(notdir $2)_OPTIMIZATION)), )
- $1_$2_VARDEPS := $$($1_$(notdir $2)_CFLAGS) $$($1_$(notdir $2)_CXXFLAGS) \
- $$($1_$(notdir $2)_OPT_CFLAGS) $$($1_$(notdir $2)_OPT_CXXFLAGS)
- $1_$2_VARDEPS_FILE := $$(call DependOnVariable, $1_$2_VARDEPS, $$($1_$2_OBJ).vardeps)
+ $1_BASE_CFLAGS := $$($$($1_BASE)_CFLAGS) $$($$($1_BASE)_EXTRA_CFLAGS) \
+ $$($$($1_BASE)_SYSROOT_CFLAGS)
+ $1_BASE_CXXFLAGS := $$($$($1_BASE)_CXXFLAGS) $$($$($1_BASE)_EXTRA_CXXFLAGS) \
+ $$($$($1_BASE)_SYSROOT_CFLAGS) $$($1_EXTRA_CXXFLAGS)
+
+ ifneq ($$(filter %.c, $$($1_FILENAME)), )
+ # Compile as a C file
+ $1_FLAGS := $(CFLAGS_CCACHE) $$($1_USE_PCH_FLAGS) $$($1_BASE_CFLAGS) \
+ $$($1_OPT_CFLAGS) $$($1_CFLAGS) $$($1_THIS_FILE) -c
+ $1_COMPILER := $$($$($1_BASE)_CC)
+ $1_DEP_FLAG := $(C_FLAG_DEPS)
+ else ifneq ($$(filter %.m, $$($1_FILENAME)), )
+ # Compile as an Objective-C file
+ $1_FLAGS := -x objective-c $(CFLAGS_CCACHE) $$($1_USE_PCH_FLAGS) \
+ $$($1_BASE_CFLAGS) $$($1_OPT_CFLAGS) $$($1_CFLAGS) $$($1_THIS_FILE) -c
+ $1_COMPILER := $$($$($1_BASE)_CC)
+ $1_DEP_FLAG := $(C_FLAG_DEPS)
+ else ifneq ($$(filter %.s %.S, $$($1_FILENAME)), )
+ # Compile as assembler file
+ $1_FLAGS := $$($$($1_BASE)_ASFLAGS)
+ $1_COMPILER := $(AS)
+ $1_DEP_FLAG :=
+ else ifneq ($$(filter %.cpp %.cc %.mm, $$($1_FILENAME)), )
+ # Compile as a C++ or Objective-C++ file
+ $1_FLAGS := $(CFLAGS_CCACHE) $$($1_USE_PCH_FLAGS) $$($1_BASE_CXXFLAGS) \
+ $$($1_OPT_CXXFLAGS) $$($1_CXXFLAGS) $$($1_THIS_FILE) -c
+ $1_COMPILER := $$($$($1_BASE)_CXX)
+ $1_DEP_FLAG := $(CXX_FLAG_DEPS)
+ else
+ $$(error Internal error in NativeCompilation.gmk: no compiler for file $$($1_FILENAME))
endif
- $$($1_$2_OBJ) : $2 $$($1_COMPILE_VARDEPS_FILE) $$($1_$2_VARDEPS_FILE) | $$($1_BUILD_INFO)
- $$(call LogInfo, Compiling $$(notdir $2) (for $$(notdir $$($1_TARGET))))
- $$(call MakeDir, $$(@D) $$(@D)/pdb)
+ ifeq ($$(filter %.s %.S, $$($1_FILENAME)), )
+ # And this is the dependency file for this obj file.
+ $1_DEP := $$(patsubst %$(OBJ_SUFFIX),%.d,$$($1_OBJ))
+ # The dependency target file lists all dependencies as empty targets to
+ # avoid make error "No rule to make target" for removed files
+ $1_DEP_TARGETS := $$(patsubst %$(OBJ_SUFFIX),%.d.targets,$$($1_OBJ))
+
+ # Include previously generated dependency information. (if it exists)
+ -include $$($1_DEP)
+ -include $$($1_DEP_TARGETS)
+ endif
+
+ ifneq ($$(strip $$($1_CFLAGS) $$($1_CXXFLAGS) $$($1_OPTIMIZATION)), )
+ $1_VARDEPS := $$($1_CFLAGS) $$($1_CXXFLAGS) $$($1_OPT_CFLAGS) \
+ $$($1_OPT_CXXFLAGS)
+ $1_VARDEPS_FILE := $$(call DependOnVariable, $1_VARDEPS, $$($1_OBJ).vardeps)
+ endif
+
+ $$($1_OBJ): $$($1_SRC_FILE) $$($$($1_BASE)_COMPILE_VARDEPS_FILE) \
+ $$($1_VARDEPS_FILE) | $$($$($1_BASE)_BUILD_INFO)
+ $$(call LogInfo, Compiling $$($1_FILENAME) (for $$($$($1_BASE)_BASENAME)))
+ $$(call MakeDir, $$(@D))
ifneq ($(TOOLCHAIN_TYPE), microsoft)
- ifeq ($(TOOLCHAIN_TYPE)$$(filter %.s,$2), solstudio)
- # The Solaris studio compiler doesn't output the full path to the object file in the
- # generated deps files. Fixing it with sed. If compiling assembly, don't try this.
+ ifeq ($(TOOLCHAIN_TYPE)$$(filter %.s, $$($1_FILENAME)), solstudio)
+ # The Solaris studio compiler doesn't output the full path to the
+ # object file in the generated deps files. Fixing it with sed. If
+ # compiling assembly, don't try this.
$$(call ExecuteWithLog, $$@, \
- $$($1_$2_COMP) $$($1_$2_FLAGS) $$($1_$2_DEP_FLAG) $$($1_$2_DEP).tmp $(CC_OUT_OPTION)$$($1_$2_OBJ) $2)
- $(SED) 's|^$$(@F):|$$@:|' $$($1_$2_DEP).tmp > $$($1_$2_DEP)
+ $$($1_COMPILER) $$($1_FLAGS) $$($1_DEP_FLAG) $$($1_DEP).tmp \
+ $(CC_OUT_OPTION)$$($1_OBJ) $$($1_SRC_FILE))
+ $(SED) 's|^$$(@F):|$$@:|' $$($1_DEP).tmp > $$($1_DEP)
else
$$(call ExecuteWithLog, $$@, \
- $$($1_$2_COMP) $$($1_$2_FLAGS) $$($1_$2_DEP_FLAG) $$($1_$2_DEP) $(CC_OUT_OPTION)$$($1_$2_OBJ) $2)
+ $$($1_COMPILER) $$($1_FLAGS) $$($1_DEP_FLAG) $$($1_DEP) \
+ $(CC_OUT_OPTION)$$($1_OBJ) $$($1_SRC_FILE))
endif
# Create a dependency target file from the dependency file.
# Solution suggested by http://make.mad-scientist.net/papers/advanced-auto-dependency-generation/
- ifneq ($$($1_$2_DEP),)
- $(SED) $(DEPENDENCY_TARGET_SED_PATTERN) $$($1_$2_DEP) > $$($1_$2_DEP_TARGETS)
+ ifneq ($$($1_DEP), )
+ $(SED) $(DEPENDENCY_TARGET_SED_PATTERN) $$($1_DEP) > $$($1_DEP_TARGETS)
endif
else
- # The Visual Studio compiler lacks a feature for generating make dependencies, but by
- # setting -showIncludes, all included files are printed. These are filtered out and
- # parsed into make dependences.
- # Keep as much as possible on one execution line for best performance on Windows.
- # No need to save exit code from compilation since pipefail is always active on
- # Windows.
+ # The Visual Studio compiler lacks a feature for generating make
+ # dependencies, but by setting -showIncludes, all included files are
+ # printed. These are filtered out and parsed into make dependences.
+ #
+ # Keep as much as possible on one execution line for best performance
+ # on Windows. No need to save exit code from compilation since
+ # pipefail is always active on Windows.
$$(call ExecuteWithLog, $$@, \
- $$($1_$2_COMP) $$($1_$2_FLAGS) -showIncludes $$($1_$2_DEBUG_OUT_FLAGS) \
- $(CC_OUT_OPTION)$$($1_$2_OBJ) $2) \
- | $(GREP) -v -e "^Note: including file:" \
- -e "^$(notdir $2)$$$$" || test "$$$$?" = "1" ; \
- $(ECHO) $$@: \\ > $$($1_$2_DEP) ; \
- $(SED) $(WINDOWS_SHOWINCLUDE_SED_PATTERN) $$($1_$2_OBJ).log \
- | $(SORT) -u >> $$($1_$2_DEP) ; \
- $(SED) $(DEPENDENCY_TARGET_SED_PATTERN) $$($1_$2_DEP) > $$($1_$2_DEP_TARGETS)
+ $$($1_COMPILER) $$($1_FLAGS) -showIncludes \
+ $(CC_OUT_OPTION)$$($1_OBJ) $$($1_SRC_FILE)) \
+ | $(TR) -d '\r' | $(GREP) -v -e "^Note: including file:" \
+ -e "^$$($1_FILENAME)$$$$" || test "$$$$?" = "1" ; \
+ $(ECHO) $$@: \\ > $$($1_DEP) ; \
+ $(SED) $(WINDOWS_SHOWINCLUDE_SED_PATTERN) $$($1_OBJ).log \
+ | $(SORT) -u >> $$($1_DEP) ; \
+ $(SED) $(DEPENDENCY_TARGET_SED_PATTERN) $$($1_DEP) > $$($1_DEP_TARGETS)
endif
endif
endef
@@ -338,6 +348,9 @@
# and the targets generated are listed in a variable by that name.
#
# Remaining parameters are named arguments. These include:
+# NAME The base name for the resulting binary, excluding decorations (like *.exe)
+# TYPE Type of binary (EXECUTABLE, LIBRARY or STATIC_LIBRARY). Default is LIBRARY.
+# SUFFIX Override the default suffix for the output file
# TOOLCHAIN Name of toolchain setup to use. Defaults to TOOLCHAIN_DEFAULT.
# SRC one or more directory roots to scan for C/C++ files.
# CFLAGS the compiler flags to be used, used both for C and C++.
@@ -347,8 +360,6 @@
# ARFLAGS the archiver flags to be used
# OBJECT_DIR the directory where we store the object files
# OUTPUT_DIR the directory where the resulting binary is put
-# LIBRARY the resulting library file
-# PROGRAM the resulting exec file
# INCLUDES only pick source from these directories
# EXCLUDES do not pick source from these directories
# INCLUDE_FILES only compile exactly these files!
@@ -377,113 +388,65 @@
# COPY_DEBUG_SYMBOLS Set to false to override global setting of debug symbol copying
# ZIP_EXTERNAL_DEBUG_SYMBOLS Set to false to override global setting of debug symbol
# zipping
-# CFLAGS_DEBUG_SYMBOLS Overrides the default cflags for enabling debug symbols
-# CXXFLAGS_DEBUG_SYMBOLS Overrides the default cxxflags for enabling debug symbols
# STRIPFLAGS Optionally change the flags given to the strip command
# PRECOMPILED_HEADER Header file to use as precompiled header
# PRECOMPILED_HEADER_EXCLUDE List of source files that should not use PCH
SetupNativeCompilation = $(NamedParamsMacroTemplate)
define SetupNativeCompilationBody
+ # If type is unspecified, default to LIBRARY
+ ifeq ($$($1_TYPE), )
+ $1_TYPE := LIBRARY
+ endif
+
# If we're doing a static build and producing a library
# force it to be a static library and remove the -l libraries
ifeq ($(STATIC_BUILD), true)
- ifneq ($$($1_LIBRARY),)
- $1_STATIC_LIBRARY := $$($1_LIBRARY)
- $1_LIBRARY :=
+ ifeq ($$($1_TYPE), LIBRARY)
+ $1_TYPE := STATIC_LIBRARY
endif
endif
- ifneq (,$$($1_BIN))
- $$(error BIN has been replaced with OBJECT_DIR)
- endif
-
- ifneq (,$$($1_LIB))
- $$(error LIB has been replaced with LIBRARY)
- endif
-
- ifneq (,$$($1_EXE))
- $$(error EXE has been replaced with PROGRAM)
- endif
-
- ifneq (,$$($1_LIBRARY))
- ifeq (,$$($1_OUTPUT_DIR))
- $$(error LIBRARY requires OUTPUT_DIR)
- endif
-
- ifneq ($$($1_LIBRARY),$(basename $$($1_LIBRARY)))
- $$(error directory of LIBRARY should be specified using OUTPUT_DIR)
- endif
-
- ifneq (,$(findstring $(SHARED_LIBRARY_SUFFIX),$$($1_LIBRARY)))
- $$(error LIBRARY should be specified without SHARED_LIBRARY_SUFFIX: $(SHARED_LIBRARY_SUFFIX))
- endif
-
- ifneq (,$(findstring $(LIBRARY_PREFIX),$$($1_LIBRARY)))
- $$(error LIBRARY should be specified without LIBRARY_PREFIX: $(LIBRARY_PREFIX))
- endif
-
- ifeq ($$($1_SUFFIX), )
- $1_SUFFIX := $(SHARED_LIBRARY_SUFFIX)
- endif
-
- $1_BASENAME:=$(LIBRARY_PREFIX)$$($1_LIBRARY)$$($1_SUFFIX)
- $1_TARGET:=$$($1_OUTPUT_DIR)/$$($1_BASENAME)
- $1_NOSUFFIX:=$(LIBRARY_PREFIX)$$($1_LIBRARY)
- endif
-
- ifneq (,$$($1_STATIC_LIBRARY))
- ifeq (,$$($1_OUTPUT_DIR))
- $$(error STATIC_LIBRARY requires OUTPUT_DIR)
- endif
-
- ifneq ($$($1_STATIC_LIBRARY),$(basename $$($1_STATIC_LIBRARY)))
- $$(error directory of STATIC_LIBRARY should be specified using OUTPUT_DIR)
- endif
-
- ifneq (,$(findstring $(STATIC_LIBRARY_SUFFIX),$$($1_STATIC_LIBRARY)))
- $$(error STATIC_LIBRARY should be specified without STATIC_LIBRARY_SUFFIX: $(STATIC_LIBRARY_SUFFIX))
- endif
-
- ifneq (,$(findstring $(LIBRARY_PREFIX),$$($1_STATIC_LIBRARY)))
- $$(error STATIC_LIBRARY should be specified without LIBRARY_PREFIX: $(LIBRARY_PREFIX))
- endif
-
- ifeq ($$($1_SUFFIX), )
- $1_SUFFIX := $(STATIC_LIBRARY_SUFFIX)
- endif
-
- $1_BASENAME:=$(LIBRARY_PREFIX)$$($1_STATIC_LIBRARY)$$($1_SUFFIX)
- $1_TARGET:=$$($1_OUTPUT_DIR)/$$($1_BASENAME)
- $1_NOSUFFIX:=$(LIBRARY_PREFIX)$$($1_STATIC_LIBRARY)
- endif
-
- ifneq (,$$($1_PROGRAM))
- ifeq (,$$($1_OUTPUT_DIR))
- $$(error PROGRAM requires OUTPUT_DIR)
- endif
-
- ifneq ($$($1_PROGRAM),$(basename $$($1_PROGRAM)))
- $$(error directory of PROGRAM should be specified using OUTPUT_DIR)
- endif
-
- ifneq (,$(findstring $(EXE_SUFFIX),$$($1_PROGRAM)))
- $$(error PROGRAM should be specified without EXE_SUFFIX: $(EXE_SUFFIX))
- endif
-
+ ifeq ($$($1_TYPE), EXECUTABLE)
+ $1_PREFIX :=
ifeq ($$($1_SUFFIX), )
$1_SUFFIX := $(EXE_SUFFIX)
endif
+ else
+ $1_PREFIX := $(LIBRARY_PREFIX)
+ ifeq ($$($1_TYPE), LIBRARY)
+ ifeq ($$($1_SUFFIX), )
+ $1_SUFFIX := $(SHARED_LIBRARY_SUFFIX)
+ endif
+ else ifeq ($$($1_TYPE), STATIC_LIBRARY)
+ ifeq ($$($1_SUFFIX), )
+ $1_SUFFIX := $(STATIC_LIBRARY_SUFFIX)
+ endif
+ endif
+ endif
- $1_BASENAME:=$$($1_PROGRAM)$$($1_SUFFIX)
- $1_TARGET:=$$($1_OUTPUT_DIR)/$$($1_BASENAME)
- $1_NOSUFFIX:=$$($1_PROGRAM)
+ ifneq ($$($1_NAME), $(basename $$($1_NAME)))
+ $$(error NAME must not contain any directory path in $1)
endif
- $1_SAFE_NAME := $$(strip $$(subst /,_, $1))
+ ifneq ($(findstring $$($1_SUFFIX), $$($1_NAME)), )
+ $$(error NAME should be specified without suffix: $$($1_SUFFIX) in $1)
+ endif
+ ifneq ($(findstring $$($1_PREFIX), $$($1_NAME)), )
+ $$(error NAME should be specified without prefix: $$($1_PREFIX) in $1)
+ endif
+ ifeq ($$($1_OUTPUT_DIR), )
+ $$(error OUTPUT_DIR is missing in $1)
+ endif
+ ifneq ($$($1_MANIFEST), )
+ ifeq ($$($1_MANIFEST_VERSION), )
+ $$(error If MANIFEST is provided, then MANIFEST_VERSION is required in $1)
+ endif
+ endif
- ifeq (,$$($1_TARGET))
- $$(error Neither PROGRAM, LIBRARY nor STATIC_LIBRARY has been specified for SetupNativeCompilation)
- endif
+ $1_BASENAME := $$($1_PREFIX)$$($1_NAME)$$($1_SUFFIX)
+ $1_TARGET := $$($1_OUTPUT_DIR)/$$($1_BASENAME)
+ $1_NOSUFFIX := $$($1_PREFIX)$$($1_NAME)
+ $1_SAFE_NAME := $$(strip $$(subst /,_, $1))
# Setup the toolchain to be used
$$(call SetIfEmpty, $1_TOOLCHAIN, TOOLCHAIN_DEFAULT)
@@ -499,41 +462,35 @@
$$(call SetIfEmpty, $1_SYSROOT_CFLAGS, $$($$($1_TOOLCHAIN)_SYSROOT_CFLAGS))
$$(call SetIfEmpty, $1_SYSROOT_LDFLAGS, $$($$($1_TOOLCHAIN)_SYSROOT_LDFLAGS))
- ifneq ($$($1_MANIFEST), )
- ifeq ($$($1_MANIFEST_VERSION), )
- $$(error If MANIFEST is provided, then MANIFEST_VERSION is required in $1)
- endif
- endif
-
# Make sure the dirs exist.
- $$(call MakeDir,$$($1_OBJECT_DIR) $$($1_OUTPUT_DIR))
- $$(foreach d,$$($1_SRC), $$(if $$(wildcard $$d),, \
+ $$(call MakeDir, $$($1_OBJECT_DIR) $$($1_OUTPUT_DIR))
+ $$(foreach d, $$($1_SRC), $$(if $$(wildcard $$d), , \
$$(error SRC specified to SetupNativeCompilation $1 contains missing directory $$d)))
# Find all files in the source trees. Preserve order.
- $1_SRCS := $$(foreach s, $$($1_SRC), $$(call CacheFind,$$(s)))
+ $1_SRCS := $$(foreach s, $$($1_SRC), $$(call CacheFind, $$(s)))
$1_SRCS := $$(filter $$(NATIVE_SOURCE_EXTENSIONS), $$($1_SRCS))
# Extract the C/C++ files.
ifneq ($$($1_EXCLUDE_PATTERNS), )
# We must not match the exclude pattern against the src root(s).
$1_SRCS_WITHOUT_ROOTS := $$($1_SRCS)
- $$(foreach i,$$($1_SRC),$$(eval $1_SRCS_WITHOUT_ROOTS := $$(patsubst \
+ $$(foreach i, $$($1_SRC), $$(eval $1_SRCS_WITHOUT_ROOTS := $$(patsubst \
$$i/%,%, $$($1_SRCS_WITHOUT_ROOTS))))
$1_ALL_EXCLUDE_FILES := $$(call containing, $$($1_EXCLUDE_PATTERNS), \
$$($1_SRCS_WITHOUT_ROOTS))
endif
- ifneq ($$($1_EXCLUDE_FILES),)
+ ifneq ($$($1_EXCLUDE_FILES), )
$1_ALL_EXCLUDE_FILES += $$($1_EXCLUDE_FILES)
endif
- ifneq ($$($1_ALL_EXCLUDE_FILES),)
+ ifneq ($$($1_ALL_EXCLUDE_FILES), )
$1_EXCLUDE_FILES_PAT := $$($1_ALL_EXCLUDE_FILES) \
- $$(foreach i,$$($1_SRC),$$(addprefix $$i/,$$($1_ALL_EXCLUDE_FILES)))
- $1_EXCLUDE_FILES_PAT := $$(addprefix %,$$($1_EXCLUDE_FILES_PAT))
- $1_SRCS := $$(filter-out $$($1_EXCLUDE_FILES_PAT),$$($1_SRCS))
+ $$(foreach i, $$($1_SRC), $$(addprefix $$i/, $$($1_ALL_EXCLUDE_FILES)))
+ $1_EXCLUDE_FILES_PAT := $$(addprefix %, $$($1_EXCLUDE_FILES_PAT))
+ $1_SRCS := $$(filter-out $$($1_EXCLUDE_FILES_PAT), $$($1_SRCS))
endif
ifneq ($$($1_INCLUDE_FILES), )
- $1_INCLUDE_FILES_PAT := $$(foreach i,$$($1_SRC),$$(addprefix $$i/,$$($1_INCLUDE_FILES)))
- $1_SRCS := $$(filter $$($1_INCLUDE_FILES_PAT),$$($1_SRCS))
+ $1_INCLUDE_FILES_PAT := $$(foreach i, $$($1_SRC), $$(addprefix $$i/, $$($1_INCLUDE_FILES)))
+ $1_SRCS := $$(filter $$($1_INCLUDE_FILES_PAT), $$($1_SRCS))
endif
# There can be only a single bin dir root, no need to foreach over the roots.
$1_BINS := $$(wildcard $$($1_OBJECT_DIR)/*$(OBJ_SUFFIX))
@@ -541,29 +498,29 @@
# and we have a list of all existing object files: $$($1_BINS)
# Prepend the source/bin path to the filter expressions. Then do the filtering.
- ifneq ($$($1_INCLUDES),)
- $1_SRC_INCLUDES := $$(foreach i,$$($1_SRC),$$(addprefix $$i/,$$(addsuffix /%,$$($1_INCLUDES))))
- $1_SRCS := $$(filter $$($1_SRC_INCLUDES),$$($1_SRCS))
+ ifneq ($$($1_INCLUDES), )
+ $1_SRC_INCLUDES := $$(foreach i, $$($1_SRC), $$(addprefix $$i/, $$(addsuffix /%, $$($1_INCLUDES))))
+ $1_SRCS := $$(filter $$($1_SRC_INCLUDES), $$($1_SRCS))
endif
- ifneq ($$($1_EXCLUDES),)
- $1_SRC_EXCLUDES := $$(addsuffix /%,$$($1_EXCLUDES))
- $1_SRC_EXCLUDES += $$(foreach i,$$($1_SRC),$$(addprefix $$i/,$$(addsuffix /%,$$($1_EXCLUDES))))
- $1_SRCS := $$(filter-out $$($1_SRC_EXCLUDES),$$($1_SRCS))
+ ifneq ($$($1_EXCLUDES), )
+ $1_SRC_EXCLUDES := $$(addsuffix /%, $$($1_EXCLUDES))
+ $1_SRC_EXCLUDES += $$(foreach i, $$($1_SRC), $$(addprefix $$i/, $$(addsuffix /%, $$($1_EXCLUDES))))
+ $1_SRCS := $$(filter-out $$($1_SRC_EXCLUDES), $$($1_SRCS))
endif
$1_SRCS += $$($1_EXTRA_FILES)
- ifeq (,$$($1_SRCS))
+ ifeq ($$($1_SRCS), )
$$(error No sources found for $1 when looking inside the dirs $$($1_SRC))
endif
# Calculate the expected output from compiling the sources
$1_EXPECTED_OBJS_FILENAMES := $$(call replace_with_obj_extension, $$(notdir $$($1_SRCS)))
- $1_EXPECTED_OBJS := $$(addprefix $$($1_OBJECT_DIR)/,$$($1_EXPECTED_OBJS_FILENAMES))
+ $1_EXPECTED_OBJS := $$(addprefix $$($1_OBJECT_DIR)/, $$($1_EXPECTED_OBJS_FILENAMES))
# Are there too many object files on disk? Perhaps because some source file was removed?
- $1_SUPERFLOUS_OBJS:=$$(sort $$(filter-out $$($1_EXPECTED_OBJS),$$($1_BINS)))
+ $1_SUPERFLOUS_OBJS := $$(sort $$(filter-out $$($1_EXPECTED_OBJS), $$($1_BINS)))
# Clean out the superfluous object files.
- ifneq ($$($1_SUPERFLUOUS_OBJS),)
+ ifneq ($$($1_SUPERFLUOUS_OBJS), )
$$(shell $(RM) -f $$($1_SUPERFLUOUS_OBJS))
endif
# Sort to remove dupliates and provide a reproducable order on the input files to the linker.
@@ -571,64 +528,62 @@
# Pickup extra OPENJDK_TARGET_OS_TYPE, OPENJDK_TARGET_OS, and/or OPENJDK_TARGET_OS plus
# OPENJDK_TARGET_CPU pair dependent variables for CFLAGS.
- $1_EXTRA_CFLAGS:=$$($1_CFLAGS_$(OPENJDK_TARGET_OS_TYPE)) $$($1_CFLAGS_$(OPENJDK_TARGET_OS)) \
+ $1_EXTRA_CFLAGS := $$($1_CFLAGS_$(OPENJDK_TARGET_OS_TYPE)) $$($1_CFLAGS_$(OPENJDK_TARGET_OS)) \
$$($1_CFLAGS_$(OPENJDK_TARGET_OS)_$(OPENJDK_TARGET_CPU))
- ifneq ($(DEBUG_LEVEL),release)
+ ifneq ($(DEBUG_LEVEL), release)
# Pickup extra debug dependent variables for CFLAGS
- $1_EXTRA_CFLAGS+=$$($1_CFLAGS_debug)
- $1_EXTRA_CFLAGS+=$$($1_CFLAGS_$(OPENJDK_TARGET_OS_TYPE)_debug)
- $1_EXTRA_CFLAGS+=$$($1_CFLAGS_$(OPENJDK_TARGET_OS)_debug)
- $1_EXTRA_CFLAGS+=$$($1_CFLAGS_$(OPENJDK_TARGET_OS)_$(OPENJDK_TARGET_CPU)_debug)
+ $1_EXTRA_CFLAGS += $$($1_CFLAGS_debug)
+ $1_EXTRA_CFLAGS += $$($1_CFLAGS_$(OPENJDK_TARGET_OS_TYPE)_debug)
+ $1_EXTRA_CFLAGS += $$($1_CFLAGS_$(OPENJDK_TARGET_OS)_debug)
+ $1_EXTRA_CFLAGS += $$($1_CFLAGS_$(OPENJDK_TARGET_OS)_$(OPENJDK_TARGET_CPU)_debug)
else
- $1_EXTRA_CFLAGS+=$$($1_CFLAGS_release)
- $1_EXTRA_CFLAGS+=$$($1_CFLAGS_$(OPENJDK_TARGET_OS_TYPE)_release)
- $1_EXTRA_CFLAGS+=$$($1_CFLAGS_$(OPENJDK_TARGET_OS)_release)
- $1_EXTRA_CFLAGS+=$$($1_CFLAGS_$(OPENJDK_TARGET_OS)_$(OPENJDK_TARGET_CPU)_release)
+ $1_EXTRA_CFLAGS += $$($1_CFLAGS_release)
+ $1_EXTRA_CFLAGS += $$($1_CFLAGS_$(OPENJDK_TARGET_OS_TYPE)_release)
+ $1_EXTRA_CFLAGS += $$($1_CFLAGS_$(OPENJDK_TARGET_OS)_release)
+ $1_EXTRA_CFLAGS += $$($1_CFLAGS_$(OPENJDK_TARGET_OS)_$(OPENJDK_TARGET_CPU)_release)
endif
# Pickup extra OPENJDK_TARGET_OS_TYPE and/or OPENJDK_TARGET_OS dependent variables for CXXFLAGS.
- $1_EXTRA_CXXFLAGS:=$$($1_CXXFLAGS_$(OPENJDK_TARGET_OS_TYPE)) $$($1_CXXFLAGS_$(OPENJDK_TARGET_OS))
- ifneq ($(DEBUG_LEVEL),release)
+ $1_EXTRA_CXXFLAGS := $$($1_CXXFLAGS_$(OPENJDK_TARGET_OS_TYPE)) $$($1_CXXFLAGS_$(OPENJDK_TARGET_OS))
+ ifneq ($(DEBUG_LEVEL), release)
# Pickup extra debug dependent variables for CXXFLAGS
- $1_EXTRA_CXXFLAGS+=$$($1_CXXFLAGS_debug)
- $1_EXTRA_CXXFLAGS+=$$($1_CXXFLAGS_$(OPENJDK_TARGET_OS_TYPE)_debug)
- $1_EXTRA_CXXFLAGS+=$$($1_CXXFLAGS_$(OPENJDK_TARGET_OS)_debug)
+ $1_EXTRA_CXXFLAGS += $$($1_CXXFLAGS_debug)
+ $1_EXTRA_CXXFLAGS += $$($1_CXXFLAGS_$(OPENJDK_TARGET_OS_TYPE)_debug)
+ $1_EXTRA_CXXFLAGS += $$($1_CXXFLAGS_$(OPENJDK_TARGET_OS)_debug)
else
- $1_EXTRA_CXXFLAGS+=$$($1_CXXFLAGS_release)
- $1_EXTRA_CXXFLAGS+=$$($1_CXXFLAGS_$(OPENJDK_TARGET_OS_TYPE)_release)
- $1_EXTRA_CXXFLAGS+=$$($1_CXXFLAGS_$(OPENJDK_TARGET_OS)_release)
+ $1_EXTRA_CXXFLAGS += $$($1_CXXFLAGS_release)
+ $1_EXTRA_CXXFLAGS += $$($1_CXXFLAGS_$(OPENJDK_TARGET_OS_TYPE)_release)
+ $1_EXTRA_CXXFLAGS += $$($1_CXXFLAGS_$(OPENJDK_TARGET_OS)_release)
endif
# If no C++ flags are explicitly set, default to using the C flags.
# After that, we can set additional C++ flags that should not interfere
# with the mechanism for copying the C flags by default.
- ifeq ($$($1_CXXFLAGS),)
- $1_CXXFLAGS:=$$($1_CFLAGS)
+ ifeq ($$($1_CXXFLAGS), )
+ $1_CXXFLAGS := $$($1_CFLAGS)
endif
- ifeq ($$(strip $$($1_EXTRA_CXXFLAGS)),)
- $1_EXTRA_CXXFLAGS:=$$($1_EXTRA_CFLAGS)
+ ifeq ($$(strip $$($1_EXTRA_CXXFLAGS)), )
+ $1_EXTRA_CXXFLAGS := $$($1_EXTRA_CFLAGS)
endif
ifeq ($(COMPILE_WITH_DEBUG_SYMBOLS), true)
- $$(call SetIfEmpty, $1_CFLAGS_DEBUG_SYMBOLS, $(CFLAGS_DEBUG_SYMBOLS))
- $$(call SetIfEmpty, $1_CXXFLAGS_DEBUG_SYMBOLS, $(CXXFLAGS_DEBUG_SYMBOLS))
- $1_EXTRA_CFLAGS += $$($1_CFLAGS_DEBUG_SYMBOLS)
- $1_EXTRA_CXXFLAGS += $$($1_CXXFLAGS_DEBUG_SYMBOLS)
+ $1_EXTRA_CFLAGS += $$(CFLAGS_DEBUG_SYMBOLS)
+ $1_EXTRA_CXXFLAGS += $$(CFLAGS_DEBUG_SYMBOLS)
endif
- ifneq (,$$($1_REORDER))
+ ifneq ($$($1_REORDER), )
$1_EXTRA_CFLAGS += $$(C_FLAG_REORDER)
- $1_EXTRA_CXXFLAGS += $$(CXX_FLAG_REORDER)
+ $1_EXTRA_CXXFLAGS += $$(C_FLAG_REORDER)
endif
# Pass the library name for static JNI library naming
- ifneq ($$($1_STATIC_LIBRARY),)
- $1_EXTRA_CFLAGS += -DLIBRARY_NAME=$$($1_STATIC_LIBRARY)
- $1_EXTRA_CXXFLAGS += -DLIBRARY_NAME=$$($1_STATIC_LIBRARY)
+ ifeq ($$($1_TYPE), STATIC_LIBRARY)
+ $1_EXTRA_CFLAGS += -DLIBRARY_NAME=$$($1_NAME)
+ $1_EXTRA_CXXFLAGS += -DLIBRARY_NAME=$$($1_NAME)
endif
# Pick up disabled warnings, if possible on this platform.
- ifneq ($(DISABLE_WARNING_PREFIX),)
+ ifneq ($(DISABLE_WARNING_PREFIX), )
$1_EXTRA_CFLAGS += $$(addprefix $(DISABLE_WARNING_PREFIX), \
$$($1_DISABLED_WARNINGS_$(TOOLCHAIN_TYPE)) \
$$($1_DISABLED_WARNINGS_C_$(TOOLCHAIN_TYPE)))
@@ -639,8 +594,8 @@
# Check if warnings should be considered errors.
# Pick first binary and toolchain specific, then binary specific, then general setting.
- ifeq ($$($1_WARNINGS_AS_ERRORS_$(TOOLCHAIN_TYPE)),)
- ifeq ($$($1_WARNINGS_AS_ERRORS),)
+ ifeq ($$($1_WARNINGS_AS_ERRORS_$(TOOLCHAIN_TYPE)), )
+ ifeq ($$($1_WARNINGS_AS_ERRORS), )
$1_WARNINGS_AS_ERRORS_$(TOOLCHAIN_TYPE) := $$(WARNINGS_AS_ERRORS)
else
$1_WARNINGS_AS_ERRORS_$(TOOLCHAIN_TYPE) := $$($1_WARNINGS_AS_ERRORS)
@@ -692,11 +647,12 @@
$1_GENERATED_PCH_SRC := $$($1_OBJECT_DIR)/$1_pch.cpp
$1_GENERATED_PCH_OBJ := $$($1_OBJECT_DIR)/$1_pch.obj
- $$(eval $$(call add_native_source,$1,$$($1_GENERATED_PCH_SRC), \
- $$($1_OBJECT_DIR),,, \
- $$($1_CXXFLAGS) $$($1_EXTRA_CXXFLAGS) $$($1_SYSROOT_CFLAGS) \
- -Fp$$($1_PCH_FILE) -Yc$$(notdir $$($1_PRECOMPILED_HEADER)), \
- $$($1_CXX),,no_this_file))
+ $$(eval $$(call SetupCompileNativeFile, $1_$$(notdir $$($1_GENERATED_PCH_SRC)), \
+ FILE := $$($1_GENERATED_PCH_SRC), \
+ BASE := $1, \
+ EXTRA_CXXFLAGS := -Fp$$($1_PCH_FILE) -Yc$$(notdir $$($1_PRECOMPILED_HEADER)), \
+ DISABLE_THIS_FILE_DEFINE := true, \
+ ))
$1_USE_PCH_FLAGS := \
-Fp$$($1_PCH_FILE) -Yu$$(notdir $$($1_PRECOMPILED_HEADER))
@@ -739,18 +695,18 @@
endif
endif
- # Now call add_native_source for each source file we are going to compile.
- $$(foreach p,$$($1_SRCS), \
- $$(eval $$(call add_native_source,$1,$$p,$$($1_OBJECT_DIR), \
- $$($1_CFLAGS) $$($1_EXTRA_CFLAGS) $$($1_SYSROOT_CFLAGS), \
- $$($1_CC), \
- $$($1_CXXFLAGS) $$($1_EXTRA_CXXFLAGS) $$($1_SYSROOT_CFLAGS), \
- $$($1_CXX), $$($1_ASFLAGS))))
+ # Now call SetupCompileNativeFile for each source file we are going to compile.
+ $$(foreach file, $$($1_SRCS), \
+ $$(eval $$(call SetupCompileNativeFile, $1_$$(notdir $$(file)),\
+ FILE := $$(file), \
+ BASE := $1, \
+ )) \
+ )
# Setup rule for printing progress info when compiling source files.
# This is a rough heuristic and may not always print accurate information.
$$($1_BUILD_INFO): $$($1_SRCS) $$($1_COMPILE_VARDEPS_FILE)
- ifeq ($$(wildcard $$($1_TARGET)),)
+ ifeq ($$(wildcard $$($1_TARGET)), )
$(ECHO) 'Creating $$(subst $$(OUTPUTDIR)/,,$$($1_TARGET)) from $$(words \
$$(filter-out %.vardeps, $$?)) file(s)'
else
@@ -763,10 +719,10 @@
# On windows we need to create a resource file
ifeq ($(OPENJDK_TARGET_OS), windows)
- ifneq (,$$($1_VERSIONINFO_RESOURCE))
- $1_RES:=$$($1_OBJECT_DIR)/$$($1_BASENAME).res
- $1_RES_DEP:=$$($1_RES).d
- $1_RES_DEP_TARGETS:=$$($1_RES).d.targets
+ ifneq ($$($1_VERSIONINFO_RESOURCE), )
+ $1_RES := $$($1_OBJECT_DIR)/$$($1_BASENAME).res
+ $1_RES_DEP := $$($1_RES).d
+ $1_RES_DEP_TARGETS := $$($1_RES).d.targets
-include $$($1_RES_DEP)
-include $$($1_RES_DEP_TARGETS)
@@ -775,7 +731,7 @@
$$($1_RES).vardeps)
$$($1_RES): $$($1_VERSIONINFO_RESOURCE) $$($1_RES_VARDEPS_FILE)
- $$(call LogInfo, Compiling resource $$(notdir $$($1_VERSIONINFO_RESOURCE)) (for $$(notdir $$($1_TARGET))))
+ $$(call LogInfo, Compiling resource $$(notdir $$($1_VERSIONINFO_RESOURCE)) (for $$($1_BASENAME)))
$$(call MakeDir, $$(@D) $$($1_OBJECT_DIR))
$$(call ExecuteWithLog, $$@, \
$$($1_RC) $$($1_RC_FLAGS) $$($1_SYSROOT_CFLAGS) $(CC_OUT_OPTION)$$@ \
@@ -798,10 +754,10 @@
endif
endif
- ifneq ($(DISABLE_MAPFILES),true)
+ ifneq ($(DISABLE_MAPFILES), true)
$1_REAL_MAPFILE := $$($1_MAPFILE)
- ifneq ($(OPENJDK_TARGET_OS),windows)
- ifneq (,$$($1_REORDER))
+ ifneq ($(OPENJDK_TARGET_OS), windows)
+ ifneq ($$($1_REORDER), )
$1_REAL_MAPFILE := $$($1_OBJECT_DIR)/mapfile
$$($1_REAL_MAPFILE) : $$($1_MAPFILE) $$($1_REORDER)
@@ -815,9 +771,9 @@
# Pickup extra OPENJDK_TARGET_OS_TYPE and/or OPENJDK_TARGET_OS dependent variables
# for LDFLAGS and LIBS
- $1_EXTRA_LDFLAGS:=$$($1_LDFLAGS_$(OPENJDK_TARGET_OS_TYPE)) $$($1_LDFLAGS_$(OPENJDK_TARGET_OS))
- $1_EXTRA_LIBS:=$$($1_LIBS_$(OPENJDK_TARGET_OS_TYPE)) $$($1_LIBS_$(OPENJDK_TARGET_OS))
- ifneq (,$$($1_REAL_MAPFILE))
+ $1_EXTRA_LDFLAGS := $$($1_LDFLAGS_$(OPENJDK_TARGET_OS_TYPE)) $$($1_LDFLAGS_$(OPENJDK_TARGET_OS))
+ $1_EXTRA_LIBS := $$($1_LIBS_$(OPENJDK_TARGET_OS_TYPE)) $$($1_LIBS_$(OPENJDK_TARGET_OS))
+ ifneq ($$($1_REAL_MAPFILE), )
$1_EXTRA_LDFLAGS += $(call SET_SHARED_LIBRARY_MAPFILE,$$($1_REAL_MAPFILE))
endif
@@ -835,7 +791,7 @@
ifeq ($$($1_COPY_DEBUG_SYMBOLS), true)
ifneq ($$($1_DEBUG_SYMBOLS), false)
# Only copy debug symbols for dynamic libraries and programs.
- ifeq ($$($1_STATIC_LIBRARY), )
+ ifneq ($$($1_TYPE), STATIC_LIBRARY)
# Generate debuginfo files.
ifeq ($(OPENJDK_TARGET_OS), windows)
$1_EXTRA_LDFLAGS += -debug "-pdb:$$($1_OUTPUT_DIR)/$$($1_NOSUFFIX).pdb" \
@@ -899,17 +855,17 @@
endif
endif
- ifneq (,$$($1_LIBRARY))
+ ifeq ($$($1_TYPE), LIBRARY)
# Generating a dynamic library.
$1_EXTRA_LDFLAGS += $$(call SET_SHARED_LIBRARY_NAME,$$($1_BASENAME))
ifeq ($(OPENJDK_TARGET_OS), windows)
- $1_EXTRA_LDFLAGS += "-implib:$$($1_OBJECT_DIR)/$$($1_LIBRARY).lib"
+ $1_EXTRA_LDFLAGS += "-implib:$$($1_OBJECT_DIR)/$$($1_NAME).lib"
# Create a rule for the import lib so that other rules may depend on it
- $$($1_OBJECT_DIR)/$$($1_LIBRARY).lib: $$($1_TARGET)
+ $$($1_OBJECT_DIR)/$$($1_NAME).lib: $$($1_TARGET)
endif
# Create loadmap on AIX. Helps in diagnosing some problems.
- ifneq ($(COMPILER_BINDCMD_FILE_FLAG),)
+ ifneq ($(COMPILER_BINDCMD_FILE_FLAG), )
$1_EXTRA_LDFLAGS += $(COMPILER_BINDCMD_FILE_FLAG)$$($1_OBJECT_DIR)/$$($1_NOSUFFIX).loadmap
endif
@@ -924,7 +880,7 @@
# If there are many object files, use an @-file...
ifneq ($$(word 17, $$($1_ALL_OBJS)), )
$1_OBJ_FILE_LIST := $$($1_OBJECT_DIR)/_$1_objectfilenames.txt
- ifneq ($(COMPILER_COMMAND_FILE_FLAG),)
+ ifneq ($(COMPILER_COMMAND_FILE_FLAG), )
$1_LD_OBJ_ARG := $(COMPILER_COMMAND_FILE_FLAG)$$($1_OBJ_FILE_LIST)
else
# ...except for toolchains which don't support them.
@@ -986,7 +942,7 @@
endif
- ifneq (,$$($1_STATIC_LIBRARY))
+ ifeq ($$($1_TYPE), STATIC_LIBRARY)
$1_VARDEPS := $$($1_AR) $$($1_ARFLAGS) $$($1_LIBS) \
$$($1_EXTRA_LIBS)
$1_VARDEPS_FILE := $$(call DependOnVariable, $1_VARDEPS, \
@@ -1000,7 +956,7 @@
endif
$$($1_TARGET): $$($1_ALL_OBJS) $$($1_RES) $$($1_VARDEPS_FILE) $$(STATIC_MAPFILE_DEP)
- $$(call LogInfo, Archiving $$($1_STATIC_LIBRARY))
+ $$(call LogInfo, Building static library $$($1_BASENAME))
$$(call ExecuteWithLog, $$($1_OBJECT_DIR)/$$($1_SAFE_NAME)_link, \
$$($1_AR) $$($1_ARFLAGS) $(AR_OUT_OPTION)$$($1_TARGET) $$($1_ALL_OBJS) \
$$($1_RES))
@@ -1013,7 +969,7 @@
endif
endif
- ifneq (,$$($1_PROGRAM))
+ ifeq ($$($1_TYPE), EXECUTABLE)
# A executable binary has been specified, setup the target for it.
$1_VARDEPS := $$($1_LD) $$($1_SYSROOT_LDFLAGS) $$($1_LDFLAGS) $$($1_EXTRA_LDFLAGS) \
$$($1_LIBS) $$($1_EXTRA_LIBS) $$($1_MT) \
@@ -1038,13 +994,13 @@
$$($1_LIBS) $$($1_EXTRA_LIBS))
ifeq ($(OPENJDK_TARGET_OS), windows)
ifneq ($$($1_MANIFEST), )
- $$($1_MT) -nologo -manifest $$($1_MANIFEST) -identity:"$$($1_PROGRAM).exe, version=$$($1_MANIFEST_VERSION)" -outputresource:$$@;#1
+ $$($1_MT) -nologo -manifest $$($1_MANIFEST) -identity:"$$($1_NAME).exe, version=$$($1_MANIFEST_VERSION)" -outputresource:$$@;#1
endif
endif
# This only works if the openjdk_codesign identity is present on the system. Let
# silently fail otherwise.
- ifneq (,$(CODESIGN))
- ifneq (,$$($1_CODESIGN))
+ ifneq ($(CODESIGN), )
+ ifneq ($$($1_CODESIGN), )
$(CODESIGN) -s openjdk_codesign $$@
endif
endif
--- a/make/common/TestFilesCompilation.gmk Thu Mar 01 16:35:36 2018 -0500
+++ b/make/common/TestFilesCompilation.gmk Fri Mar 02 21:00:12 2018 +0100
@@ -1,5 +1,5 @@
#
-# Copyright (c) 2015, 2016, Oracle and/or its affiliates. All rights reserved.
+# Copyright (c) 2015, 2018, Oracle and/or its affiliates. All rights reserved.
# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
#
# This code is free software; you can redistribute it and/or modify it
@@ -59,13 +59,15 @@
ifeq ($$($1_TYPE), LIBRARY)
$1_PREFIX = lib
$1_OUTPUT_SUBDIR := lib
- $1_CFLAGS := $(CFLAGS_TESTLIB) $(CFLAGS_WARNINGS_ARE_ERRORS)
+ $1_CFLAGS := $(CFLAGS_TESTLIB)
$1_LDFLAGS := $(LDFLAGS_TESTLIB) $(call SET_SHARED_LIBRARY_ORIGIN)
+ $1_COMPILATION_TYPE := LIBRARY
else ifeq ($$($1_TYPE), PROGRAM)
$1_PREFIX = exe
$1_OUTPUT_SUBDIR := bin
- $1_CFLAGS := $(CFLAGS_TESTEXE) $(CFLAGS_WARNINGS_ARE_ERRORS)
+ $1_CFLAGS := $(CFLAGS_TESTEXE)
$1_LDFLAGS := $(LDFLAGS_TESTEXE)
+ $1_COMPILATION_TYPE := EXECUTABLE
else
$$(error Unknown type: $$($1_TYPE))
endif
@@ -78,7 +80,8 @@
$$(foreach file, $$($1_FILE_LIST),\
$$(eval name := $$(strip $$(patsubst $$($1_PREFIX)%, %, $$(basename $$(notdir $$(file)))))) \
$$(eval $$(call SetupNativeCompilation, BUILD_TEST_$$(name), \
- $$($1_TYPE) := $$(name), \
+ NAME := $$(name), \
+ TYPE := $$($1_COMPILATION_TYPE), \
SRC := $$(patsubst %/,%,$$(dir $$(file))), \
INCLUDE_FILES := $$(notdir $$(file)), \
OBJECT_DIR := $$($1_OUTPUT_DIR)/support/$$($1_PREFIX)$$(name), \
--- a/make/conf/jib-profiles.js Thu Mar 01 16:35:36 2018 -0500
+++ b/make/conf/jib-profiles.js Fri Mar 02 21:00:12 2018 +0100
@@ -743,11 +743,22 @@
dependencies: [ "devkit" ],
environment_path: input.get("devkit", "install_path")
+ "/Xcode.app/Contents/Developer/usr/bin"
- }
+ };
profiles["run-test"] = concatObjects(profiles["run-test"], macosxRunTestExtra);
profiles["run-test-jprt"] = concatObjects(profiles["run-test-jprt"], macosxRunTestExtra);
profiles["run-test-prebuilt"] = concatObjects(profiles["run-test-prebuilt"], macosxRunTestExtra);
}
+ // On windows we want the debug symbols available at test time
+ if (input.build_os == "windows") {
+ windowsRunTestPrebuiltExtra = {
+ dependencies: [ testedProfile + ".jdk_symbols" ],
+ environment: {
+ "PRODUCT_SYMBOLS_HOME": input.get(testedProfile + ".jdk_symbols", "home_path"),
+ }
+ };
+ profiles["run-test-prebuilt"] = concatObjects(profiles["run-test-prebuilt"],
+ windowsRunTestPrebuiltExtra);
+ }
// Generate the missing platform attributes
profiles = generatePlatformAttributes(profiles);
--- a/make/data/x11wrappergen/functions.txt Thu Mar 01 16:35:36 2018 -0500
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,26 +0,0 @@
-!XGetWindowProperty|int
- w long
- property Atom
- long_offset long
- long_length long
- delete Bool
- req_type Atom
- actual_type Atom out
- actual_format int out
- number_of_items long out
- bytes_after long out
- data pointer out free
-!XQueryTree|int
- w long
- root long out
- parent long out
- children pointer out free
- nchildren int out
-!XTranslateCoordinates|int
- scr_w long
- dest_w long
- src_x int
- src_y int
- dest_x int out
- dest_y int out
- child long out
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/make/data/x11wrappergen/sizes-32.txt Fri Mar 02 21:00:12 2018 +0100
@@ -0,0 +1,1017 @@
+Atom 4
+AwtGraphicsConfigData 128
+AwtGraphicsConfigData.awt_cmap 4
+AwtGraphicsConfigData.AwtColorMatch 56
+AwtGraphicsConfigData.awt_depth 0
+AwtGraphicsConfigData.awtImage 52
+AwtGraphicsConfigData.awt_num_colors 48
+AwtGraphicsConfigData.awt_visInfo 8
+AwtGraphicsConfigData.color_data 84
+AwtGraphicsConfigData.glxInfo 88
+AwtGraphicsConfigData.isTranslucencySupported 92
+AwtGraphicsConfigData.monoImage 60
+AwtGraphicsConfigData.monoPixmap 64
+AwtGraphicsConfigData.monoPixmapGC 76
+AwtGraphicsConfigData.monoPixmapHeight 72
+AwtGraphicsConfigData.monoPixmapWidth 68
+AwtGraphicsConfigData.pixelStride 80
+AwtGraphicsConfigData.renderPictFormat 96
+awtImageData 304
+awtImageData.clrdata 16
+awtImageData.convert 48
+awtImageData.Depth 0
+awtImageData.wsImageFormat 4
+AwtScreenData 24
+AwtScreenData.blackpixel 12
+AwtScreenData.configs 20
+AwtScreenData.defaultConfig 16
+AwtScreenData.numConfigs 0
+AwtScreenData.root 4
+AwtScreenData.whitepixel 8
+Bool 4
+ColorData 48
+ColorData.awt_Colors 0
+ColorData.awt_icmLUT2Colors 12
+ColorData.awt_icmLUT 8
+ColorData.awt_numICMcolors 4
+ColorData.img_clr_tbl 20
+ColorData.img_grays 16
+ColorData.img_oda_blue 32
+ColorData.img_oda_green 28
+ColorData.img_oda_red 24
+ColorData.pGrayInverseLutData 36
+ColorData.representsPrimaries 44
+ColorData.screendata 40
+ColorEntry 4
+ColorEntry.b 2
+ColorEntry.flags 3
+ColorEntry.g 1
+ColorEntry.r 0
+Depth 12
+Depth.depth 0
+Depth.nvisuals 4
+Depth.visuals 8
+int 4
+long 4
+PropMwmHints 20
+PropMwmHints.decorations 8
+PropMwmHints.flags 0
+PropMwmHints.functions 4
+PropMwmHints.inputMode 12
+PropMwmHints.status 16
+ptr 4
+Screen 80
+Screen.backing_store 68
+Screen.black_pixel 56
+Screen.cmap 48
+Screen.default_gc 44
+Screen.depths 32
+Screen.display 4
+Screen.ext_data 0
+ScreenFormat 16
+ScreenFormat.bits_per_pixel 8
+ScreenFormat.depth 4
+ScreenFormat.ext_data 0
+ScreenFormat.scanline_pad 12
+Screen.height 16
+Screen.max_maps 60
+Screen.mheight 24
+Screen.min_maps 64
+Screen.mwidth 20
+Screen.ndepths 28
+Screen.root 8
+Screen.root_depth 36
+Screen.root_input_mask 76
+Screen.root_visual 40
+Screen.save_unders 72
+Screen.white_pixel 52
+Screen.width 12
+short 2
+Visual 32
+Visual.bits_per_rgb 24
+Visual.blue_mask 20
+Visual.class 8
+Visual.ext_data 0
+Visual.green_mask 16
+Visual.map_entries 28
+Visual.red_mask 12
+Visual.visualid 4
+Window 4
+XAnyEvent 20
+XAnyEvent.display 12
+XAnyEvent.send_event 8
+XAnyEvent.serial 4
+XAnyEvent.type 0
+XAnyEvent.window 16
+XArc 12
+XArc.angle1 8
+XArc.angle2 10
+XArc.height 6
+XArc.width 4
+XArc.x 0
+XArc.y 2
+XButtonEvent 60
+XButtonEvent.button 52
+XButtonEvent.display 12
+XButtonEvent.root 20
+XButtonEvent.same_screen 56
+XButtonEvent.send_event 8
+XButtonEvent.serial 4
+XButtonEvent.state 48
+XButtonEvent.subwindow 24
+XButtonEvent.time 28
+XButtonEvent.type 0
+XButtonEvent.window 16
+XButtonEvent.x 32
+XButtonEvent.x_root 40
+XButtonEvent.y 36
+XButtonEvent.y_root 44
+XChar2b 2
+XChar2b.byte1 0
+XChar2b.byte2 1
+XCharStruct 12
+XCharStruct.ascent 6
+XCharStruct.attributes 10
+XCharStruct.descent 8
+XCharStruct.lbearing 0
+XCharStruct.rbearing 2
+XCharStruct.width 4
+XCirculateEvent 28
+XCirculateEvent.display 12
+XCirculateEvent.event 16
+XCirculateEvent.place 24
+XCirculateEvent.send_event 8
+XCirculateEvent.serial 4
+XCirculateEvent.type 0
+XCirculateEvent.window 20
+XCirculateRequestEvent 28
+XCirculateRequestEvent.display 12
+XCirculateRequestEvent.parent 16
+XCirculateRequestEvent.place 24
+XCirculateRequestEvent.send_event 8
+XCirculateRequestEvent.serial 4
+XCirculateRequestEvent.type 0
+XCirculateRequestEvent.window 20
+XClassHint 8
+XClassHint.res_class 4
+XClassHint.res_name 0
+XClientMessageEvent 48
+XClientMessageEvent.data 28
+XClientMessageEvent.display 12
+XClientMessageEvent.format 24
+XClientMessageEvent.message_type 20
+XClientMessageEvent.send_event 8
+XClientMessageEvent.serial 4
+XClientMessageEvent.type 0
+XClientMessageEvent.window 16
+XColor 12
+XColor.blue 8
+XColor.flags 10
+XColor.green 6
+XColormapEvent 32
+XColormapEvent.colormap 20
+XColormapEvent.display 12
+XColormapEvent.new 24
+XColormapEvent.send_event 8
+XColormapEvent.serial 4
+XColormapEvent.state 28
+XColormapEvent.type 0
+XColormapEvent.window 16
+XColor.pad 11
+XColor.pixel 0
+XColor.red 4
+XComposeStatus 8
+XComposeStatus.chars_matched 4
+XComposeStatus.compose_ptr 0
+XConfigureEvent 52
+XConfigureEvent.above 44
+XConfigureEvent.border_width 40
+XConfigureEvent.display 12
+XConfigureEvent.event 16
+XConfigureEvent.height 36
+XConfigureEvent.override_redirect 48
+XConfigureEvent.send_event 8
+XConfigureEvent.serial 4
+XConfigureEvent.type 0
+XConfigureEvent.width 32
+XConfigureEvent.window 20
+XConfigureEvent.x 24
+XConfigureEvent.y 28
+XConfigureRequestEvent 56
+XConfigureRequestEvent.above 44
+XConfigureRequestEvent.border_width 40
+XConfigureRequestEvent.detail 48
+XConfigureRequestEvent.display 12
+XConfigureRequestEvent.height 36
+XConfigureRequestEvent.parent 16
+XConfigureRequestEvent.send_event 8
+XConfigureRequestEvent.serial 4
+XConfigureRequestEvent.type 0
+XConfigureRequestEvent.value_mask 52
+XConfigureRequestEvent.width 32
+XConfigureRequestEvent.window 20
+XConfigureRequestEvent.x 24
+XConfigureRequestEvent.y 28
+XCreateWindowEvent 48
+XCreateWindowEvent.border_width 40
+XCreateWindowEvent.display 12
+XCreateWindowEvent.height 36
+XCreateWindowEvent.override_redirect 44
+XCreateWindowEvent.parent 16
+XCreateWindowEvent.send_event 8
+XCreateWindowEvent.serial 4
+XCreateWindowEvent.type 0
+XCreateWindowEvent.width 32
+XCreateWindowEvent.window 20
+XCreateWindowEvent.x 24
+XCreateWindowEvent.y 28
+XCrossingEvent 68
+XCrossingEvent.detail 52
+XCrossingEvent.display 12
+XCrossingEvent.focus 60
+XCrossingEvent.mode 48
+XCrossingEvent.root 20
+XCrossingEvent.same_screen 56
+XCrossingEvent.send_event 8
+XCrossingEvent.serial 4
+XCrossingEvent.state 64
+XCrossingEvent.subwindow 24
+XCrossingEvent.time 28
+XCrossingEvent.type 0
+XCrossingEvent.window 16
+XCrossingEvent.x 32
+XCrossingEvent.x_root 40
+XCrossingEvent.y 36
+XCrossingEvent.y_root 44
+XdbeSwapInfo 8
+XdbeSwapInfo.swap_action 4
+XdbeSwapInfo.swap_window 0
+XDestroyWindowEvent 24
+XDestroyWindowEvent.display 12
+XDestroyWindowEvent.event 16
+XDestroyWindowEvent.send_event 8
+XDestroyWindowEvent.serial 4
+XDestroyWindowEvent.type 0
+XDestroyWindowEvent.window 20
+XErrorEvent 20
+XErrorEvent.display 4
+XErrorEvent.error_code 16
+XErrorEvent.minor_code 18
+XErrorEvent.request_code 17
+XErrorEvent.resourceid 8
+XErrorEvent.serial 12
+XErrorEvent.type 0
+XEvent 96
+XEvent.pad 0
+XEvent.type 0
+XEvent.xany 0
+XEvent.xbutton 0
+XEvent.xcirculate 0
+XEvent.xcirculaterequest 0
+XEvent.xclient 0
+XEvent.xcolormap 0
+XEvent.xconfigure 0
+XEvent.xconfigurerequest 0
+XEvent.xcreatewindow 0
+XEvent.xcrossing 0
+XEvent.xdestroywindow 0
+XEvent.xerror 0
+XEvent.xexpose 0
+XEvent.xfocus 0
+XEvent.xgraphicsexpose 0
+XEvent.xgravity 0
+XEvent.xkey 0
+XEvent.xkeymap 0
+XEvent.xmap 0
+XEvent.xmapping 0
+XEvent.xmaprequest 0
+XEvent.xmotion 0
+XEvent.xnoexpose 0
+XEvent.xproperty 0
+XEvent.xreparent 0
+XEvent.xresizerequest 0
+XEvent.xselection 0
+XEvent.xselectionclear 0
+XEvent.xselectionrequest 0
+XEvent.xunmap 0
+XEvent.xvisibility 0
+XExposeEvent 40
+XExposeEvent.count 36
+XExposeEvent.display 12
+XExposeEvent.height 32
+XExposeEvent.send_event 8
+XExposeEvent.serial 4
+XExposeEvent.type 0
+XExposeEvent.width 28
+XExposeEvent.window 16
+XExposeEvent.x 20
+XExposeEvent.y 24
+XExtCodes 16
+XExtCodes.extension 0
+XExtCodes.first_error 12
+XExtCodes.first_event 8
+XExtCodes.major_opcode 4
+XExtData 16
+XExtData.free_private 8
+XExtData.next 4
+XExtData.number 0
+XExtData.private_data 12
+XFocusChangeEvent 28
+XFocusChangeEvent.detail 24
+XFocusChangeEvent.display 12
+XFocusChangeEvent.mode 20
+XFocusChangeEvent.send_event 8
+XFocusChangeEvent.serial 4
+XFocusChangeEvent.type 0
+XFocusChangeEvent.window 16
+XFontProp 8
+XFontProp.card32 4
+XFontProp.name 0
+XFontSetExtents 16
+XFontSetExtents.max_ink_extent 0
+XFontSetExtents.max_logical_extent 8
+XFontStruct 80
+XFontStruct.all_chars_exist 28
+XFontStruct.ascent 72
+XFontStruct.descent 76
+XFontStruct.direction 8
+XFontStruct.ext_data 0
+XFontStruct.fid 4
+XFontStruct.max_bounds 56
+XFontStruct.max_byte1 24
+XFontStruct.max_char_or_byte2 16
+XFontStruct.min_bounds 44
+XFontStruct.min_byte1 20
+XFontStruct.min_char_or_byte2 12
+XFontStruct.n_properties 36
+XFontStruct.per_char 68
+XFontStruct.properties 40
+XGCValues 92
+XGCValues.arc_mode 40
+XGCValues.background 12
+XGCValues.cap_style 24
+XGCValues.clip_mask 80
+XGCValues.clip_x_origin 72
+XGCValues.clip_y_origin 76
+XGCValues.dashes 88
+XGCValues.dash_offset 84
+XGCValues.fill_rule 36
+XGCValues.fill_style 32
+XGCValues.font 60
+XGCValues.foreground 8
+XGCValues.function 0
+XGCValues.graphics_exposures 68
+XGCValues.join_style 28
+XGCValues.line_style 20
+XGCValues.line_width 16
+XGCValues.plane_mask 4
+XGCValues.stipple 48
+XGCValues.subwindow_mode 64
+XGCValues.tile 44
+XGCValues.ts_x_origin 52
+XGCValues.ts_y_origin 56
+XGraphicsExposeEvent 48
+XGraphicsExposeEvent.count 36
+XGraphicsExposeEvent.display 12
+XGraphicsExposeEvent.drawable 16
+XGraphicsExposeEvent.height 32
+XGraphicsExposeEvent.major_code 40
+XGraphicsExposeEvent.minor_code 44
+XGraphicsExposeEvent.send_event 8
+XGraphicsExposeEvent.serial 4
+XGraphicsExposeEvent.type 0
+XGraphicsExposeEvent.width 28
+XGraphicsExposeEvent.x 20
+XGraphicsExposeEvent.y 24
+XGravityEvent 32
+XGravityEvent.display 12
+XGravityEvent.event 16
+XGravityEvent.send_event 8
+XGravityEvent.serial 4
+XGravityEvent.type 0
+XGravityEvent.window 20
+XGravityEvent.x 24
+XGravityEvent.y 28
+XHostAddress 12
+XHostAddress.address 8
+XHostAddress.family 0
+XHostAddress.length 4
+XIconSize 24
+XIconSize.height_inc 20
+XIconSize.max_height 12
+XIconSize.max_width 8
+XIconSize.min_height 4
+XIconSize.min_width 0
+XIconSize.width_inc 16
+XImage 88
+XImage.bitmap_bit_order 28
+XImage.bitmap_pad 32
+XImage.bitmap_unit 24
+XImage.bits_per_pixel 44
+XImage.blue_mask 56
+XImage.byte_order 20
+XImage.bytes_per_line 40
+XImage.data 16
+XImage.depth 36
+XImage.f.add_pixel 84
+XImage.f.create_image 64
+XImage.f.destroy_image 68
+XImage.f.get_pixel 72
+XImage.format 12
+XImage.f.put_pixel 76
+XImage.f.sub_image 80
+XImage.green_mask 52
+XImage.height 4
+XImage.obdata 60
+XImage.red_mask 48
+XImage.width 0
+XImage.xoffset 8
+XIMCallback 8
+XIMCallback.callback 4
+XIMCallback.client_data 0
+XIMHotKeyTrigger 12
+XIMHotKeyTrigger.keysym 0
+XIMHotKeyTrigger.modifier 4
+XIMHotKeyTrigger.modifier_mask 8
+XIMHotKeyTriggers 8
+XIMHotKeyTriggers.key 4
+XIMHotKeyTriggers.num_hot_key 0
+XIMPreeditCaretCallbackStruct 12
+XIMPreeditCaretCallbackStruct.direction 4
+XIMPreeditCaretCallbackStruct.position 0
+XIMPreeditCaretCallbackStruct.style 8
+XIMPreeditDrawCallbackStruct 16
+XIMPreeditDrawCallbackStruct.caret 0
+XIMPreeditDrawCallbackStruct.chg_first 4
+XIMPreeditDrawCallbackStruct.chg_length 8
+XIMPreeditDrawCallbackStruct.text 12
+XIMPreeditStateNotifyCallbackStruct 4
+XIMPreeditStateNotifyCallbackStruct.state 0
+XIMStatusDrawCallbackStruct 8
+XIMStatusDrawCallbackStruct.data 4
+XIMStatusDrawCallbackStruct.type 0
+XIMStringConversionCallbackStruct 16
+XIMStringConversionCallbackStruct.direction 4
+XIMStringConversionCallbackStruct.factor 10
+XIMStringConversionCallbackStruct.operation 8
+XIMStringConversionCallbackStruct.position 0
+XIMStringConversionCallbackStruct.text 12
+XIMStringConversionText 16
+XIMStringConversionText.encoding_is_wchar 8
+XIMStringConversionText.feedback 4
+XIMStringConversionText.length 0
+XIMStringConversionText.string 12
+XIMStyles 8
+XIMStyles.count_styles 0
+XIMStyles.supported_styles 4
+XIMText 16
+XIMText.encoding_is_wchar 8
+XIMText.feedback 4
+XIMText.length 0
+XIMText.string 12
+XIMValuesList 8
+XIMValuesList.count_values 0
+XIMValuesList.supported_values 4
+XkbAccessXNotifyEvent 44
+XkbAccessXNotifyEvent.debounce_delay 40
+XkbAccessXNotifyEvent.detail 28
+XkbAccessXNotifyEvent.device 24
+XkbAccessXNotifyEvent.display 12
+XkbAccessXNotifyEvent.keycode 32
+XkbAccessXNotifyEvent.send_event 8
+XkbAccessXNotifyEvent.serial 4
+XkbAccessXNotifyEvent.sk_delay 36
+XkbAccessXNotifyEvent.time 16
+XkbAccessXNotifyEvent.type 0
+XkbAccessXNotifyEvent.xkb_type 20
+XkbActionMessageEvent 56
+XkbActionMessageEvent.device 24
+XkbActionMessageEvent.display 12
+XkbActionMessageEvent.group 40
+XkbActionMessageEvent.keycode 28
+XkbActionMessageEvent.key_event_follows 36
+XkbActionMessageEvent.message 48
+XkbActionMessageEvent.mods 44
+XkbActionMessageEvent.press 32
+XkbActionMessageEvent.send_event 8
+XkbActionMessageEvent.serial 4
+XkbActionMessageEvent.time 16
+XkbActionMessageEvent.type 0
+XkbActionMessageEvent.xkb_type 20
+XkbAnyEvent 28
+XkbAnyEvent.device 24
+XkbAnyEvent.display 12
+XkbAnyEvent.send_event 8
+XkbAnyEvent.serial 4
+XkbAnyEvent.time 16
+XkbAnyEvent.type 0
+XkbAnyEvent.xkb_type 20
+XkbBellNotifyEvent 60
+XkbBellNotifyEvent.bell_class 40
+XkbBellNotifyEvent.bell_id 44
+XkbBellNotifyEvent.device 24
+XkbBellNotifyEvent.display 12
+XkbBellNotifyEvent.duration 36
+XkbBellNotifyEvent.event_only 56
+XkbBellNotifyEvent.name 48
+XkbBellNotifyEvent.percent 28
+XkbBellNotifyEvent.pitch 32
+XkbBellNotifyEvent.send_event 8
+XkbBellNotifyEvent.serial 4
+XkbBellNotifyEvent.time 16
+XkbBellNotifyEvent.type 0
+XkbBellNotifyEvent.window 52
+XkbBellNotifyEvent.xkb_type 20
+XkbCompatMapNotifyEvent 44
+XkbCompatMapNotifyEvent.changed_groups 28
+XkbCompatMapNotifyEvent.device 24
+XkbCompatMapNotifyEvent.display 12
+XkbCompatMapNotifyEvent.first_si 32
+XkbCompatMapNotifyEvent.num_si 36
+XkbCompatMapNotifyEvent.num_total_si 40
+XkbCompatMapNotifyEvent.send_event 8
+XkbCompatMapNotifyEvent.serial 4
+XkbCompatMapNotifyEvent.time 16
+XkbCompatMapNotifyEvent.type 0
+XkbCompatMapNotifyEvent.xkb_type 20
+XkbControlsNotifyEvent 48
+XkbControlsNotifyEvent.changed_ctrls 28
+XkbControlsNotifyEvent.device 24
+XkbControlsNotifyEvent.display 12
+XkbControlsNotifyEvent.enabled_ctrl_changes 36
+XkbControlsNotifyEvent.enabled_ctrls 32
+XkbControlsNotifyEvent.event_type 45
+XkbControlsNotifyEvent.keycode 44
+XkbControlsNotifyEvent.num_groups 40
+XkbControlsNotifyEvent.req_major 46
+XkbControlsNotifyEvent.req_minor 47
+XkbControlsNotifyEvent.send_event 8
+XkbControlsNotifyEvent.serial 4
+XkbControlsNotifyEvent.time 16
+XkbControlsNotifyEvent.type 0
+XkbControlsNotifyEvent.xkb_type 20
+XkbEvent 96
+XkbEvent.accessx 0
+XkbEvent.any 0
+XkbEvent.bell 0
+XkbEvent.compat 0
+XkbEvent.core 0
+XkbEvent.ctrls 0
+XkbEvent.device 0
+XkbEvent.indicators 0
+XkbEvent.map 0
+XkbEvent.message 0
+XkbEvent.names 0
+XkbEvent.new_kbd 0
+XkbEvent.state 0
+XkbEvent.type 0
+XkbExtensionDeviceNotifyEvent 64
+XkbExtensionDeviceNotifyEvent.device 24
+XkbExtensionDeviceNotifyEvent.display 12
+XkbExtensionDeviceNotifyEvent.first_btn 40
+XkbExtensionDeviceNotifyEvent.led_class 56
+XkbExtensionDeviceNotifyEvent.led_id 60
+XkbExtensionDeviceNotifyEvent.leds_defined 48
+XkbExtensionDeviceNotifyEvent.led_state 52
+XkbExtensionDeviceNotifyEvent.num_btns 44
+XkbExtensionDeviceNotifyEvent.reason 28
+XkbExtensionDeviceNotifyEvent.send_event 8
+XkbExtensionDeviceNotifyEvent.serial 4
+XkbExtensionDeviceNotifyEvent.supported 32
+XkbExtensionDeviceNotifyEvent.time 16
+XkbExtensionDeviceNotifyEvent.type 0
+XkbExtensionDeviceNotifyEvent.unsupported 36
+XkbExtensionDeviceNotifyEvent.xkb_type 20
+XkbIndicatorNotifyEvent 36
+XkbIndicatorNotifyEvent.changed 28
+XkbIndicatorNotifyEvent.device 24
+XkbIndicatorNotifyEvent.display 12
+XkbIndicatorNotifyEvent.send_event 8
+XkbIndicatorNotifyEvent.serial 4
+XkbIndicatorNotifyEvent.state 32
+XkbIndicatorNotifyEvent.time 16
+XkbIndicatorNotifyEvent.type 0
+XkbIndicatorNotifyEvent.xkb_type 20
+XkbMapNotifyEvent 80
+XkbMapNotifyEvent.changed 28
+XkbMapNotifyEvent.device 24
+XkbMapNotifyEvent.display 12
+XkbMapNotifyEvent.first_key_act 47
+XkbMapNotifyEvent.first_key_behavior 48
+XkbMapNotifyEvent.first_key_explicit 49
+XkbMapNotifyEvent.first_key_sym 46
+XkbMapNotifyEvent.first_modmap_key 50
+XkbMapNotifyEvent.first_type 36
+XkbMapNotifyEvent.first_vmodmap_key 51
+XkbMapNotifyEvent.flags 32
+XkbMapNotifyEvent.max_key_code 45
+XkbMapNotifyEvent.min_key_code 44
+XkbMapNotifyEvent.num_key_acts 56
+XkbMapNotifyEvent.num_key_behaviors 60
+XkbMapNotifyEvent.num_key_explicit 64
+XkbMapNotifyEvent.num_key_syms 52
+XkbMapNotifyEvent.num_modmap_keys 68
+XkbMapNotifyEvent.num_types 40
+XkbMapNotifyEvent.num_vmodmap_keys 72
+XkbMapNotifyEvent.send_event 8
+XkbMapNotifyEvent.serial 4
+XkbMapNotifyEvent.time 16
+XkbMapNotifyEvent.type 0
+XkbMapNotifyEvent.vmods 76
+XkbMapNotifyEvent.xkb_type 20
+XkbNamesNotifyEvent 76
+XkbNamesNotifyEvent.changed 28
+XkbNamesNotifyEvent.changed_groups 60
+XkbNamesNotifyEvent.changed_indicators 64
+XkbNamesNotifyEvent.changed_vmods 56
+XkbNamesNotifyEvent.device 24
+XkbNamesNotifyEvent.display 12
+XkbNamesNotifyEvent.first_key 68
+XkbNamesNotifyEvent.first_lvl 40
+XkbNamesNotifyEvent.first_type 32
+XkbNamesNotifyEvent.num_aliases 48
+XkbNamesNotifyEvent.num_keys 72
+XkbNamesNotifyEvent.num_lvls 44
+XkbNamesNotifyEvent.num_radio_groups 52
+XkbNamesNotifyEvent.num_types 36
+XkbNamesNotifyEvent.send_event 8
+XkbNamesNotifyEvent.serial 4
+XkbNamesNotifyEvent.time 16
+XkbNamesNotifyEvent.type 0
+XkbNamesNotifyEvent.xkb_type 20
+XkbNewKeyboardNotifyEvent 56
+XkbNewKeyboardNotifyEvent.changed 48
+XkbNewKeyboardNotifyEvent.device 24
+XkbNewKeyboardNotifyEvent.display 12
+XkbNewKeyboardNotifyEvent.max_key_code 36
+XkbNewKeyboardNotifyEvent.min_key_code 32
+XkbNewKeyboardNotifyEvent.old_device 28
+XkbNewKeyboardNotifyEvent.old_max_key_code 44
+XkbNewKeyboardNotifyEvent.old_min_key_code 40
+XkbNewKeyboardNotifyEvent.req_major 52
+XkbNewKeyboardNotifyEvent.req_minor 53
+XkbNewKeyboardNotifyEvent.send_event 8
+XkbNewKeyboardNotifyEvent.serial 4
+XkbNewKeyboardNotifyEvent.time 16
+XkbNewKeyboardNotifyEvent.type 0
+XkbNewKeyboardNotifyEvent.xkb_type 20
+XkbStateNotifyEvent 80
+XkbStateNotifyEvent.base_group 36
+XkbStateNotifyEvent.base_mods 52
+XkbStateNotifyEvent.changed 28
+XkbStateNotifyEvent.compat_grab_mods 69
+XkbStateNotifyEvent.compat_lookup_mods 71
+XkbStateNotifyEvent.compat_state 64
+XkbStateNotifyEvent.device 24
+XkbStateNotifyEvent.display 12
+XkbStateNotifyEvent.event_type 77
+XkbStateNotifyEvent.grab_mods 68
+XkbStateNotifyEvent.group 32
+XkbStateNotifyEvent.keycode 76
+XkbStateNotifyEvent.latched_group 40
+XkbStateNotifyEvent.latched_mods 56
+XkbStateNotifyEvent.locked_group 44
+XkbStateNotifyEvent.locked_mods 60
+XkbStateNotifyEvent.lookup_mods 70
+XkbStateNotifyEvent.mods 48
+XkbStateNotifyEvent.ptr_buttons 72
+XkbStateNotifyEvent.req_major 78
+XkbStateNotifyEvent.req_minor 79
+XkbStateNotifyEvent.send_event 8
+XkbStateNotifyEvent.serial 4
+XkbStateNotifyEvent.time 16
+XkbStateNotifyEvent.type 0
+XkbStateNotifyEvent.xkb_type 20
+XKeyboardControl 32
+XKeyboardControl.auto_repeat_mode 28
+XKeyboardControl.bell_duration 12
+XKeyboardControl.bell_percent 4
+XKeyboardControl.bell_pitch 8
+XKeyboardControl.key 24
+XKeyboardControl.key_click_percent 0
+XKeyboardControl.led 16
+XKeyboardControl.led_mode 20
+XKeyboardState 56
+XKeyboardState.auto_repeats 24
+XKeyboardState.bell_duration 12
+XKeyboardState.bell_percent 4
+XKeyboardState.bell_pitch 8
+XKeyboardState.global_auto_repeat 20
+XKeyboardState.key_click_percent 0
+XKeyboardState.led_mask 16
+XKeyEvent 60
+XKeyEvent.display 12
+XKeyEvent.keycode 52
+XKeyEvent.root 20
+XKeyEvent.same_screen 56
+XKeyEvent.send_event 8
+XKeyEvent.serial 4
+XKeyEvent.state 48
+XKeyEvent.subwindow 24
+XKeyEvent.time 28
+XKeyEvent.type 0
+XKeyEvent.window 16
+XKeyEvent.x 32
+XKeyEvent.x_root 40
+XKeyEvent.y 36
+XKeyEvent.y_root 44
+XKeymapEvent 52
+XKeymapEvent.display 12
+XKeymapEvent.key_vector 20
+XKeymapEvent.send_event 8
+XKeymapEvent.serial 4
+XKeymapEvent.type 0
+XKeymapEvent.window 16
+XMapEvent 28
+XMapEvent.display 12
+XMapEvent.event 16
+XMapEvent.override_redirect 24
+XMapEvent.send_event 8
+XMapEvent.serial 4
+XMapEvent.type 0
+XMapEvent.window 20
+XMappingEvent 32
+XMappingEvent.count 28
+XMappingEvent.display 12
+XMappingEvent.first_keycode 24
+XMappingEvent.request 20
+XMappingEvent.send_event 8
+XMappingEvent.serial 4
+XMappingEvent.type 0
+XMappingEvent.window 16
+XMapRequestEvent 24
+XMapRequestEvent.display 12
+XMapRequestEvent.parent 16
+XMapRequestEvent.send_event 8
+XMapRequestEvent.serial 4
+XMapRequestEvent.type 0
+XMapRequestEvent.window 20
+XmbTextItem 16
+XmbTextItem.chars 0
+XmbTextItem.delta 8
+XmbTextItem.font_set 12
+XmbTextItem.nchars 4
+XModifierKeymap 8
+XModifierKeymap.max_keypermod 0
+XModifierKeymap.modifiermap 4
+XMotionEvent 60
+XMotionEvent.display 12
+XMotionEvent.is_hint 52
+XMotionEvent.root 20
+XMotionEvent.same_screen 56
+XMotionEvent.send_event 8
+XMotionEvent.serial 4
+XMotionEvent.state 48
+XMotionEvent.subwindow 24
+XMotionEvent.time 28
+XMotionEvent.type 0
+XMotionEvent.window 16
+XMotionEvent.x 32
+XMotionEvent.x_root 40
+XMotionEvent.y 36
+XMotionEvent.y_root 44
+XNoExposeEvent 28
+XNoExposeEvent.display 12
+XNoExposeEvent.drawable 16
+XNoExposeEvent.major_code 20
+XNoExposeEvent.minor_code 24
+XNoExposeEvent.send_event 8
+XNoExposeEvent.serial 4
+XNoExposeEvent.type 0
+XOMCharSetList 8
+XOMCharSetList.charset_count 0
+XOMCharSetList.charset_list 4
+XOMFontInfo 12
+XOMFontInfo.font_name_list 8
+XOMFontInfo.font_struct_list 4
+XOMFontInfo.num_font 0
+XOMOrientation 8
+XOMOrientation.num_orientation 0
+XOMOrientation.orientation 4
+XPixmapFormatValues 12
+XPixmapFormatValues.bits_per_pixel 4
+XPixmapFormatValues.depth 0
+XPixmapFormatValues.scanline_pad 8
+XPoint 4
+XPoint.x 0
+XPoint.y 2
+XPropertyEvent 32
+XPropertyEvent.atom 20
+XPropertyEvent.display 12
+XPropertyEvent.send_event 8
+XPropertyEvent.serial 4
+XPropertyEvent.state 28
+XPropertyEvent.time 24
+XPropertyEvent.type 0
+XPropertyEvent.window 16
+XRectangle 8
+XRectangle.height 6
+XRectangle.width 4
+XRectangle.x 0
+XRectangle.y 2
+XRenderDirectFormat 16
+XRenderDirectFormat.alpha 12
+XRenderDirectFormat.alphaMask 14
+XRenderDirectFormat.blue 8
+XRenderDirectFormat.blueMask 10
+XRenderDirectFormat.green 4
+XRenderDirectFormat.greenMask 6
+XRenderDirectFormat.red 0
+XRenderDirectFormat.redMask 2
+XRenderPictFormat 32
+XRenderPictFormat.colormap 28
+XRenderPictFormat.depth 8
+XRenderPictFormat.direct 12
+XRenderPictFormat.id 0
+XRenderPictFormat.type 4
+XReparentEvent 40
+XReparentEvent.display 12
+XReparentEvent.event 16
+XReparentEvent.override_redirect 36
+XReparentEvent.parent 24
+XReparentEvent.send_event 8
+XReparentEvent.serial 4
+XReparentEvent.type 0
+XReparentEvent.window 20
+XReparentEvent.x 28
+XReparentEvent.y 32
+XResizeRequestEvent 28
+XResizeRequestEvent.display 12
+XResizeRequestEvent.height 24
+XResizeRequestEvent.send_event 8
+XResizeRequestEvent.serial 4
+XResizeRequestEvent.type 0
+XResizeRequestEvent.width 20
+XResizeRequestEvent.window 16
+XSegment 8
+XSegment.x1 0
+XSegment.x2 4
+XSegment.y1 2
+XSegment.y2 6
+XSelectionClearEvent 28
+XSelectionClearEvent.display 12
+XSelectionClearEvent.selection 20
+XSelectionClearEvent.send_event 8
+XSelectionClearEvent.serial 4
+XSelectionClearEvent.time 24
+XSelectionClearEvent.type 0
+XSelectionClearEvent.window 16
+XSelectionEvent 36
+XSelectionEvent.display 12
+XSelectionEvent.property 28
+XSelectionEvent.requestor 16
+XSelectionEvent.selection 20
+XSelectionEvent.send_event 8
+XSelectionEvent.serial 4
+XSelectionEvent.target 24
+XSelectionEvent.time 32
+XSelectionEvent.type 0
+XSelectionRequestEvent 40
+XSelectionRequestEvent.display 12
+XSelectionRequestEvent.owner 16
+XSelectionRequestEvent.property 32
+XSelectionRequestEvent.requestor 20
+XSelectionRequestEvent.selection 24
+XSelectionRequestEvent.send_event 8
+XSelectionRequestEvent.serial 4
+XSelectionRequestEvent.target 28
+XSelectionRequestEvent.time 36
+XSelectionRequestEvent.type 0
+XSetWindowAttributes 60
+XSetWindowAttributes.background_pixel 4
+XSetWindowAttributes.background_pixmap 0
+XSetWindowAttributes.backing_pixel 32
+XSetWindowAttributes.backing_planes 28
+XSetWindowAttributes.backing_store 24
+XSetWindowAttributes.bit_gravity 16
+XSetWindowAttributes.border_pixel 12
+XSetWindowAttributes.border_pixmap 8
+XSetWindowAttributes.colormap 52
+XSetWindowAttributes.cursor 56
+XSetWindowAttributes.do_not_propagate_mask 44
+XSetWindowAttributes.event_mask 40
+XSetWindowAttributes.override_redirect 48
+XSetWindowAttributes.save_under 36
+XSetWindowAttributes.win_gravity 20
+XSizeHints 72
+XSizeHints.base_height 64
+XSizeHints.base_width 60
+XSizeHints.flags 0
+XSizeHints.height 16
+XSizeHints.height_inc 40
+XSizeHints.max_aspect.x 52
+XSizeHints.max_aspect.y 56
+XSizeHints.max_height 32
+XSizeHints.max_width 28
+XSizeHints.min_aspect.x 44
+XSizeHints.min_aspect.y 48
+XSizeHints.min_height 24
+XSizeHints.min_width 20
+XSizeHints.width 12
+XSizeHints.width_inc 36
+XSizeHints.win_gravity 68
+XSizeHints.x 4
+XSizeHints.y 8
+XStandardColormap 40
+XStandardColormap.base_pixel 28
+XStandardColormap.blue_max 20
+XStandardColormap.blue_mult 24
+XStandardColormap.colormap 0
+XStandardColormap.green_max 12
+XStandardColormap.green_mult 16
+XStandardColormap.killid 36
+XStandardColormap.red_max 4
+XStandardColormap.red_mult 8
+XStandardColormap.visualid 32
+XTextItem 16
+XTextItem16 16
+XTextItem16.chars 0
+XTextItem16.delta 8
+XTextItem16.font 12
+XTextItem16.nchars 4
+XTextItem.chars 0
+XTextItem.delta 8
+XTextItem.font 12
+XTextItem.nchars 4
+XTextProperty 16
+XTextProperty.encoding 4
+XTextProperty.format 8
+XTextProperty.nitems 12
+XTextProperty.value 0
+XTimeCoord 8
+XTimeCoord.time 0
+XTimeCoord.x 4
+XTimeCoord.y 6
+XUnmapEvent 28
+XUnmapEvent.display 12
+XUnmapEvent.event 16
+XUnmapEvent.from_configure 24
+XUnmapEvent.send_event 8
+XUnmapEvent.serial 4
+XUnmapEvent.type 0
+XUnmapEvent.window 20
+XVisibilityEvent 24
+XVisibilityEvent.display 12
+XVisibilityEvent.send_event 8
+XVisibilityEvent.serial 4
+XVisibilityEvent.state 20
+XVisibilityEvent.type 0
+XVisibilityEvent.window 16
+XVisualInfo 40
+XVisualInfo.bits_per_rgb 36
+XVisualInfo.blue_mask 28
+XVisualInfo.class 16
+XVisualInfo.colormap_size 32
+XVisualInfo.depth 12
+XVisualInfo.green_mask 24
+XVisualInfo.red_mask 20
+XVisualInfo.screen 8
+XVisualInfo.visual 0
+XVisualInfo.visualid 4
+XwcTextItem 16
+XwcTextItem.chars 0
+XwcTextItem.delta 8
+XwcTextItem.font_set 12
+XwcTextItem.nchars 4
+XWindowAttributes 92
+XWindowAttributes.all_event_masks 72
+XWindowAttributes.backing_pixel 52
+XWindowAttributes.backing_planes 48
+XWindowAttributes.backing_store 44
+XWindowAttributes.bit_gravity 36
+XWindowAttributes.border_width 16
+XWindowAttributes.class 32
+XWindowAttributes.colormap 60
+XWindowAttributes.depth 20
+XWindowAttributes.do_not_propagate_mask 80
+XWindowAttributes.height 12
+XWindowAttributes.map_installed 64
+XWindowAttributes.map_state 68
+XWindowAttributes.override_redirect 84
+XWindowAttributes.root 28
+XWindowAttributes.save_under 56
+XWindowAttributes.screen 88
+XWindowAttributes.visual 24
+XWindowAttributes.width 8
+XWindowAttributes.win_gravity 40
+XWindowAttributes.x 0
+XWindowAttributes.y 4
+XWindowAttributes.your_event_mask 76
+XWindowChanges 28
+XWindowChanges.border_width 16
+XWindowChanges.height 12
+XWindowChanges.sibling 20
+XWindowChanges.stack_mode 24
+XWindowChanges.width 8
+XWindowChanges.x 0
+XWindowChanges.y 4
+XWMHints 36
+XWMHints.flags 0
+XWMHints.icon_mask 28
+XWMHints.icon_pixmap 12
+XWMHints.icon_window 16
+XWMHints.icon_x 20
+XWMHints.icon_y 24
+XWMHints.initial_state 8
+XWMHints.input 4
+XWMHints.window_group 32
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/make/data/x11wrappergen/sizes-64.txt Fri Mar 02 21:00:12 2018 +0100
@@ -0,0 +1,1017 @@
+Atom 8
+AwtGraphicsConfigData 208
+AwtGraphicsConfigData.awt_cmap 8
+AwtGraphicsConfigData.AwtColorMatch 96
+AwtGraphicsConfigData.awt_depth 0
+AwtGraphicsConfigData.awtImage 88
+AwtGraphicsConfigData.awt_num_colors 80
+AwtGraphicsConfigData.awt_visInfo 16
+AwtGraphicsConfigData.color_data 144
+AwtGraphicsConfigData.glxInfo 152
+AwtGraphicsConfigData.isTranslucencySupported 160
+AwtGraphicsConfigData.monoImage 104
+AwtGraphicsConfigData.monoPixmap 112
+AwtGraphicsConfigData.monoPixmapGC 128
+AwtGraphicsConfigData.monoPixmapHeight 124
+AwtGraphicsConfigData.monoPixmapWidth 120
+AwtGraphicsConfigData.pixelStride 136
+AwtGraphicsConfigData.renderPictFormat 168
+awtImageData 560
+awtImageData.clrdata 16
+awtImageData.convert 48
+awtImageData.Depth 0
+awtImageData.wsImageFormat 4
+AwtScreenData 48
+AwtScreenData.blackpixel 24
+AwtScreenData.configs 40
+AwtScreenData.defaultConfig 32
+AwtScreenData.numConfigs 0
+AwtScreenData.root 8
+AwtScreenData.whitepixel 16
+Bool 4
+ColorData 88
+ColorData.awt_Colors 0
+ColorData.awt_icmLUT 16
+ColorData.awt_icmLUT2Colors 24
+ColorData.awt_numICMcolors 8
+ColorData.img_clr_tbl 40
+ColorData.img_grays 32
+ColorData.img_oda_blue 64
+ColorData.img_oda_green 56
+ColorData.img_oda_red 48
+ColorData.pGrayInverseLutData 72
+ColorData.representsPrimaries 84
+ColorData.screendata 80
+ColorEntry 4
+ColorEntry.b 2
+ColorEntry.flags 3
+ColorEntry.g 1
+ColorEntry.r 0
+Depth 16
+Depth.depth 0
+Depth.nvisuals 4
+Depth.visuals 8
+int 4
+long 8
+PropMwmHints 40
+PropMwmHints.decorations 16
+PropMwmHints.flags 0
+PropMwmHints.functions 8
+PropMwmHints.inputMode 24
+PropMwmHints.status 32
+ptr 8
+Screen 128
+Screen.backing_store 112
+Screen.black_pixel 96
+Screen.cmap 80
+Screen.default_gc 72
+Screen.depths 48
+Screen.display 8
+Screen.ext_data 0
+ScreenFormat 24
+ScreenFormat.bits_per_pixel 12
+ScreenFormat.depth 8
+ScreenFormat.ext_data 0
+ScreenFormat.scanline_pad 16
+Screen.height 28
+Screen.max_maps 104
+Screen.mheight 36
+Screen.min_maps 108
+Screen.mwidth 32
+Screen.ndepths 40
+Screen.root 16
+Screen.root_depth 56
+Screen.root_input_mask 120
+Screen.root_visual 64
+Screen.save_unders 116
+Screen.white_pixel 88
+Screen.width 24
+short 2
+Visual 56
+Visual.bits_per_rgb 48
+Visual.blue_mask 40
+Visual.class 16
+Visual.ext_data 0
+Visual.green_mask 32
+Visual.map_entries 52
+Visual.red_mask 24
+Visual.visualid 8
+Window 8
+XAnyEvent 40
+XAnyEvent.display 24
+XAnyEvent.send_event 16
+XAnyEvent.serial 8
+XAnyEvent.type 0
+XAnyEvent.window 32
+XArc 12
+XArc.angle1 8
+XArc.angle2 10
+XArc.height 6
+XArc.width 4
+XArc.x 0
+XArc.y 2
+XButtonEvent 96
+XButtonEvent.button 84
+XButtonEvent.display 24
+XButtonEvent.root 40
+XButtonEvent.same_screen 88
+XButtonEvent.send_event 16
+XButtonEvent.serial 8
+XButtonEvent.state 80
+XButtonEvent.subwindow 48
+XButtonEvent.time 56
+XButtonEvent.type 0
+XButtonEvent.window 32
+XButtonEvent.x 64
+XButtonEvent.x_root 72
+XButtonEvent.y 68
+XButtonEvent.y_root 76
+XChar2b 2
+XChar2b.byte1 0
+XChar2b.byte2 1
+XCharStruct 12
+XCharStruct.ascent 6
+XCharStruct.attributes 10
+XCharStruct.descent 8
+XCharStruct.lbearing 0
+XCharStruct.rbearing 2
+XCharStruct.width 4
+XCirculateEvent 56
+XCirculateEvent.display 24
+XCirculateEvent.event 32
+XCirculateEvent.place 48
+XCirculateEvent.send_event 16
+XCirculateEvent.serial 8
+XCirculateEvent.type 0
+XCirculateEvent.window 40
+XCirculateRequestEvent 56
+XCirculateRequestEvent.display 24
+XCirculateRequestEvent.parent 32
+XCirculateRequestEvent.place 48
+XCirculateRequestEvent.send_event 16
+XCirculateRequestEvent.serial 8
+XCirculateRequestEvent.type 0
+XCirculateRequestEvent.window 40
+XClassHint 16
+XClassHint.res_class 8
+XClassHint.res_name 0
+XClientMessageEvent 96
+XClientMessageEvent.data 56
+XClientMessageEvent.display 24
+XClientMessageEvent.format 48
+XClientMessageEvent.message_type 40
+XClientMessageEvent.send_event 16
+XClientMessageEvent.serial 8
+XClientMessageEvent.type 0
+XClientMessageEvent.window 32
+XColor 16
+XColor.blue 12
+XColor.flags 14
+XColor.green 10
+XColormapEvent 56
+XColormapEvent.colormap 40
+XColormapEvent.display 24
+XColormapEvent.new 48
+XColormapEvent.send_event 16
+XColormapEvent.serial 8
+XColormapEvent.state 52
+XColormapEvent.type 0
+XColormapEvent.window 32
+XColor.pad 15
+XColor.pixel 0
+XColor.red 8
+XComposeStatus 16
+XComposeStatus.chars_matched 8
+XComposeStatus.compose_ptr 0
+XConfigureEvent 88
+XConfigureEvent.above 72
+XConfigureEvent.border_width 64
+XConfigureEvent.display 24
+XConfigureEvent.event 32
+XConfigureEvent.height 60
+XConfigureEvent.override_redirect 80
+XConfigureEvent.send_event 16
+XConfigureEvent.serial 8
+XConfigureEvent.type 0
+XConfigureEvent.width 56
+XConfigureEvent.window 40
+XConfigureEvent.x 48
+XConfigureEvent.y 52
+XConfigureRequestEvent 96
+XConfigureRequestEvent.above 72
+XConfigureRequestEvent.border_width 64
+XConfigureRequestEvent.detail 80
+XConfigureRequestEvent.display 24
+XConfigureRequestEvent.height 60
+XConfigureRequestEvent.parent 32
+XConfigureRequestEvent.send_event 16
+XConfigureRequestEvent.serial 8
+XConfigureRequestEvent.type 0
+XConfigureRequestEvent.value_mask 88
+XConfigureRequestEvent.width 56
+XConfigureRequestEvent.window 40
+XConfigureRequestEvent.x 48
+XConfigureRequestEvent.y 52
+XCreateWindowEvent 72
+XCreateWindowEvent.border_width 64
+XCreateWindowEvent.display 24
+XCreateWindowEvent.height 60
+XCreateWindowEvent.override_redirect 68
+XCreateWindowEvent.parent 32
+XCreateWindowEvent.send_event 16
+XCreateWindowEvent.serial 8
+XCreateWindowEvent.type 0
+XCreateWindowEvent.width 56
+XCreateWindowEvent.window 40
+XCreateWindowEvent.x 48
+XCreateWindowEvent.y 52
+XCrossingEvent 104
+XCrossingEvent.detail 84
+XCrossingEvent.display 24
+XCrossingEvent.focus 92
+XCrossingEvent.mode 80
+XCrossingEvent.root 40
+XCrossingEvent.same_screen 88
+XCrossingEvent.send_event 16
+XCrossingEvent.serial 8
+XCrossingEvent.state 96
+XCrossingEvent.subwindow 48
+XCrossingEvent.time 56
+XCrossingEvent.type 0
+XCrossingEvent.window 32
+XCrossingEvent.x 64
+XCrossingEvent.x_root 72
+XCrossingEvent.y 68
+XCrossingEvent.y_root 76
+XdbeSwapInfo 16
+XdbeSwapInfo.swap_action 8
+XdbeSwapInfo.swap_window 0
+XDestroyWindowEvent 48
+XDestroyWindowEvent.display 24
+XDestroyWindowEvent.event 32
+XDestroyWindowEvent.send_event 16
+XDestroyWindowEvent.serial 8
+XDestroyWindowEvent.type 0
+XDestroyWindowEvent.window 40
+XErrorEvent 40
+XErrorEvent.display 8
+XErrorEvent.error_code 32
+XErrorEvent.minor_code 34
+XErrorEvent.request_code 33
+XErrorEvent.resourceid 16
+XErrorEvent.serial 24
+XErrorEvent.type 0
+XEvent 192
+XEvent.pad 0
+XEvent.type 0
+XEvent.xany 0
+XEvent.xbutton 0
+XEvent.xcirculate 0
+XEvent.xcirculaterequest 0
+XEvent.xclient 0
+XEvent.xcolormap 0
+XEvent.xconfigure 0
+XEvent.xconfigurerequest 0
+XEvent.xcreatewindow 0
+XEvent.xcrossing 0
+XEvent.xdestroywindow 0
+XEvent.xerror 0
+XEvent.xexpose 0
+XEvent.xfocus 0
+XEvent.xgraphicsexpose 0
+XEvent.xgravity 0
+XEvent.xkey 0
+XEvent.xkeymap 0
+XEvent.xmap 0
+XEvent.xmapping 0
+XEvent.xmaprequest 0
+XEvent.xmotion 0
+XEvent.xnoexpose 0
+XEvent.xproperty 0
+XEvent.xreparent 0
+XEvent.xresizerequest 0
+XEvent.xselection 0
+XEvent.xselectionclear 0
+XEvent.xselectionrequest 0
+XEvent.xunmap 0
+XEvent.xvisibility 0
+XExposeEvent 64
+XExposeEvent.count 56
+XExposeEvent.display 24
+XExposeEvent.height 52
+XExposeEvent.send_event 16
+XExposeEvent.serial 8
+XExposeEvent.type 0
+XExposeEvent.width 48
+XExposeEvent.window 32
+XExposeEvent.x 40
+XExposeEvent.y 44
+XExtCodes 16
+XExtCodes.extension 0
+XExtCodes.first_error 12
+XExtCodes.first_event 8
+XExtCodes.major_opcode 4
+XExtData 32
+XExtData.free_private 16
+XExtData.next 8
+XExtData.number 0
+XExtData.private_data 24
+XFocusChangeEvent 48
+XFocusChangeEvent.detail 44
+XFocusChangeEvent.display 24
+XFocusChangeEvent.mode 40
+XFocusChangeEvent.send_event 16
+XFocusChangeEvent.serial 8
+XFocusChangeEvent.type 0
+XFocusChangeEvent.window 32
+XFontProp 16
+XFontProp.card32 8
+XFontProp.name 0
+XFontSetExtents 16
+XFontSetExtents.max_ink_extent 0
+XFontSetExtents.max_logical_extent 8
+XFontStruct 96
+XFontStruct.all_chars_exist 36
+XFontStruct.ascent 88
+XFontStruct.descent 92
+XFontStruct.direction 16
+XFontStruct.ext_data 0
+XFontStruct.fid 8
+XFontStruct.max_bounds 68
+XFontStruct.max_byte1 32
+XFontStruct.max_char_or_byte2 24
+XFontStruct.min_bounds 56
+XFontStruct.min_byte1 28
+XFontStruct.min_char_or_byte2 20
+XFontStruct.n_properties 44
+XFontStruct.per_char 80
+XFontStruct.properties 48
+XGCValues 128
+XGCValues.arc_mode 56
+XGCValues.background 24
+XGCValues.cap_style 40
+XGCValues.clip_mask 112
+XGCValues.clip_x_origin 104
+XGCValues.clip_y_origin 108
+XGCValues.dashes 124
+XGCValues.dash_offset 120
+XGCValues.fill_rule 52
+XGCValues.fill_style 48
+XGCValues.font 88
+XGCValues.foreground 16
+XGCValues.function 0
+XGCValues.graphics_exposures 100
+XGCValues.join_style 44
+XGCValues.line_style 36
+XGCValues.line_width 32
+XGCValues.plane_mask 8
+XGCValues.stipple 72
+XGCValues.subwindow_mode 96
+XGCValues.tile 64
+XGCValues.ts_x_origin 80
+XGCValues.ts_y_origin 84
+XGraphicsExposeEvent 72
+XGraphicsExposeEvent.count 56
+XGraphicsExposeEvent.display 24
+XGraphicsExposeEvent.drawable 32
+XGraphicsExposeEvent.height 52
+XGraphicsExposeEvent.major_code 60
+XGraphicsExposeEvent.minor_code 64
+XGraphicsExposeEvent.send_event 16
+XGraphicsExposeEvent.serial 8
+XGraphicsExposeEvent.type 0
+XGraphicsExposeEvent.width 48
+XGraphicsExposeEvent.x 40
+XGraphicsExposeEvent.y 44
+XGravityEvent 56
+XGravityEvent.display 24
+XGravityEvent.event 32
+XGravityEvent.send_event 16
+XGravityEvent.serial 8
+XGravityEvent.type 0
+XGravityEvent.window 40
+XGravityEvent.x 48
+XGravityEvent.y 52
+XHostAddress 16
+XHostAddress.address 8
+XHostAddress.family 0
+XHostAddress.length 4
+XIconSize 24
+XIconSize.height_inc 20
+XIconSize.max_height 12
+XIconSize.max_width 8
+XIconSize.min_height 4
+XIconSize.min_width 0
+XIconSize.width_inc 16
+XImage 136
+XImage.bitmap_bit_order 32
+XImage.bitmap_pad 36
+XImage.bitmap_unit 28
+XImage.bits_per_pixel 48
+XImage.blue_mask 72
+XImage.byte_order 24
+XImage.bytes_per_line 44
+XImage.data 16
+XImage.depth 40
+XImage.f.add_pixel 128
+XImage.f.create_image 88
+XImage.f.destroy_image 96
+XImage.f.get_pixel 104
+XImage.format 12
+XImage.f.put_pixel 112
+XImage.f.sub_image 120
+XImage.green_mask 64
+XImage.height 4
+XImage.obdata 80
+XImage.red_mask 56
+XImage.width 0
+XImage.xoffset 8
+XIMCallback 16
+XIMCallback.callback 8
+XIMCallback.client_data 0
+XIMHotKeyTrigger 16
+XIMHotKeyTrigger.keysym 0
+XIMHotKeyTrigger.modifier 8
+XIMHotKeyTrigger.modifier_mask 12
+XIMHotKeyTriggers 16
+XIMHotKeyTriggers.key 8
+XIMHotKeyTriggers.num_hot_key 0
+XIMPreeditCaretCallbackStruct 12
+XIMPreeditCaretCallbackStruct.direction 4
+XIMPreeditCaretCallbackStruct.position 0
+XIMPreeditCaretCallbackStruct.style 8
+XIMPreeditDrawCallbackStruct 24
+XIMPreeditDrawCallbackStruct.caret 0
+XIMPreeditDrawCallbackStruct.chg_first 4
+XIMPreeditDrawCallbackStruct.chg_length 8
+XIMPreeditDrawCallbackStruct.text 16
+XIMPreeditStateNotifyCallbackStruct 8
+XIMPreeditStateNotifyCallbackStruct.state 0
+XIMStatusDrawCallbackStruct 16
+XIMStatusDrawCallbackStruct.data 8
+XIMStatusDrawCallbackStruct.type 0
+XIMStringConversionCallbackStruct 24
+XIMStringConversionCallbackStruct.direction 4
+XIMStringConversionCallbackStruct.factor 10
+XIMStringConversionCallbackStruct.operation 8
+XIMStringConversionCallbackStruct.position 0
+XIMStringConversionCallbackStruct.text 16
+XIMStringConversionText 32
+XIMStringConversionText.encoding_is_wchar 16
+XIMStringConversionText.feedback 8
+XIMStringConversionText.length 0
+XIMStringConversionText.string 24
+XIMStyles 16
+XIMStyles.count_styles 0
+XIMStyles.supported_styles 8
+XIMText 32
+XIMText.encoding_is_wchar 16
+XIMText.feedback 8
+XIMText.length 0
+XIMText.string 24
+XIMValuesList 16
+XIMValuesList.count_values 0
+XIMValuesList.supported_values 8
+XkbAccessXNotifyEvent 64
+XkbAccessXNotifyEvent.debounce_delay 60
+XkbAccessXNotifyEvent.detail 48
+XkbAccessXNotifyEvent.device 44
+XkbAccessXNotifyEvent.display 24
+XkbAccessXNotifyEvent.keycode 52
+XkbAccessXNotifyEvent.send_event 16
+XkbAccessXNotifyEvent.serial 8
+XkbAccessXNotifyEvent.sk_delay 56
+XkbAccessXNotifyEvent.time 32
+XkbAccessXNotifyEvent.type 0
+XkbAccessXNotifyEvent.xkb_type 40
+XkbActionMessageEvent 80
+XkbActionMessageEvent.device 44
+XkbActionMessageEvent.display 24
+XkbActionMessageEvent.group 60
+XkbActionMessageEvent.keycode 48
+XkbActionMessageEvent.key_event_follows 56
+XkbActionMessageEvent.message 68
+XkbActionMessageEvent.mods 64
+XkbActionMessageEvent.press 52
+XkbActionMessageEvent.send_event 16
+XkbActionMessageEvent.serial 8
+XkbActionMessageEvent.time 32
+XkbActionMessageEvent.type 0
+XkbActionMessageEvent.xkb_type 40
+XkbAnyEvent 48
+XkbAnyEvent.device 44
+XkbAnyEvent.display 24
+XkbAnyEvent.send_event 16
+XkbAnyEvent.serial 8
+XkbAnyEvent.time 32
+XkbAnyEvent.type 0
+XkbAnyEvent.xkb_type 40
+XkbBellNotifyEvent 96
+XkbBellNotifyEvent.bell_class 60
+XkbBellNotifyEvent.bell_id 64
+XkbBellNotifyEvent.device 44
+XkbBellNotifyEvent.display 24
+XkbBellNotifyEvent.duration 56
+XkbBellNotifyEvent.event_only 88
+XkbBellNotifyEvent.name 72
+XkbBellNotifyEvent.percent 48
+XkbBellNotifyEvent.pitch 52
+XkbBellNotifyEvent.send_event 16
+XkbBellNotifyEvent.serial 8
+XkbBellNotifyEvent.time 32
+XkbBellNotifyEvent.type 0
+XkbBellNotifyEvent.window 80
+XkbBellNotifyEvent.xkb_type 40
+XkbCompatMapNotifyEvent 64
+XkbCompatMapNotifyEvent.changed_groups 48
+XkbCompatMapNotifyEvent.device 44
+XkbCompatMapNotifyEvent.display 24
+XkbCompatMapNotifyEvent.first_si 52
+XkbCompatMapNotifyEvent.num_si 56
+XkbCompatMapNotifyEvent.num_total_si 60
+XkbCompatMapNotifyEvent.send_event 16
+XkbCompatMapNotifyEvent.serial 8
+XkbCompatMapNotifyEvent.time 32
+XkbCompatMapNotifyEvent.type 0
+XkbCompatMapNotifyEvent.xkb_type 40
+XkbControlsNotifyEvent 72
+XkbControlsNotifyEvent.changed_ctrls 48
+XkbControlsNotifyEvent.device 44
+XkbControlsNotifyEvent.display 24
+XkbControlsNotifyEvent.enabled_ctrl_changes 56
+XkbControlsNotifyEvent.enabled_ctrls 52
+XkbControlsNotifyEvent.event_type 65
+XkbControlsNotifyEvent.keycode 64
+XkbControlsNotifyEvent.num_groups 60
+XkbControlsNotifyEvent.req_major 66
+XkbControlsNotifyEvent.req_minor 67
+XkbControlsNotifyEvent.send_event 16
+XkbControlsNotifyEvent.serial 8
+XkbControlsNotifyEvent.time 32
+XkbControlsNotifyEvent.type 0
+XkbControlsNotifyEvent.xkb_type 40
+XkbEvent 192
+XkbEvent.accessx 0
+XkbEvent.any 0
+XkbEvent.bell 0
+XkbEvent.compat 0
+XkbEvent.core 0
+XkbEvent.ctrls 0
+XkbEvent.device 0
+XkbEvent.indicators 0
+XkbEvent.map 0
+XkbEvent.message 0
+XkbEvent.names 0
+XkbEvent.new_kbd 0
+XkbEvent.state 0
+XkbEvent.type 0
+XkbExtensionDeviceNotifyEvent 88
+XkbExtensionDeviceNotifyEvent.device 44
+XkbExtensionDeviceNotifyEvent.display 24
+XkbExtensionDeviceNotifyEvent.first_btn 60
+XkbExtensionDeviceNotifyEvent.led_class 76
+XkbExtensionDeviceNotifyEvent.led_id 80
+XkbExtensionDeviceNotifyEvent.leds_defined 68
+XkbExtensionDeviceNotifyEvent.led_state 72
+XkbExtensionDeviceNotifyEvent.num_btns 64
+XkbExtensionDeviceNotifyEvent.reason 48
+XkbExtensionDeviceNotifyEvent.send_event 16
+XkbExtensionDeviceNotifyEvent.serial 8
+XkbExtensionDeviceNotifyEvent.supported 52
+XkbExtensionDeviceNotifyEvent.time 32
+XkbExtensionDeviceNotifyEvent.type 0
+XkbExtensionDeviceNotifyEvent.unsupported 56
+XkbExtensionDeviceNotifyEvent.xkb_type 40
+XkbIndicatorNotifyEvent 56
+XkbIndicatorNotifyEvent.changed 48
+XkbIndicatorNotifyEvent.device 44
+XkbIndicatorNotifyEvent.display 24
+XkbIndicatorNotifyEvent.send_event 16
+XkbIndicatorNotifyEvent.serial 8
+XkbIndicatorNotifyEvent.state 52
+XkbIndicatorNotifyEvent.time 32
+XkbIndicatorNotifyEvent.type 0
+XkbIndicatorNotifyEvent.xkb_type 40
+XkbMapNotifyEvent 104
+XkbMapNotifyEvent.changed 48
+XkbMapNotifyEvent.device 44
+XkbMapNotifyEvent.display 24
+XkbMapNotifyEvent.first_key_act 67
+XkbMapNotifyEvent.first_key_behavior 68
+XkbMapNotifyEvent.first_key_explicit 69
+XkbMapNotifyEvent.first_key_sym 66
+XkbMapNotifyEvent.first_modmap_key 70
+XkbMapNotifyEvent.first_type 56
+XkbMapNotifyEvent.first_vmodmap_key 71
+XkbMapNotifyEvent.flags 52
+XkbMapNotifyEvent.max_key_code 65
+XkbMapNotifyEvent.min_key_code 64
+XkbMapNotifyEvent.num_key_acts 76
+XkbMapNotifyEvent.num_key_behaviors 80
+XkbMapNotifyEvent.num_key_explicit 84
+XkbMapNotifyEvent.num_key_syms 72
+XkbMapNotifyEvent.num_modmap_keys 88
+XkbMapNotifyEvent.num_types 60
+XkbMapNotifyEvent.num_vmodmap_keys 92
+XkbMapNotifyEvent.send_event 16
+XkbMapNotifyEvent.serial 8
+XkbMapNotifyEvent.time 32
+XkbMapNotifyEvent.type 0
+XkbMapNotifyEvent.vmods 96
+XkbMapNotifyEvent.xkb_type 40
+XkbNamesNotifyEvent 96
+XkbNamesNotifyEvent.changed 48
+XkbNamesNotifyEvent.changed_groups 80
+XkbNamesNotifyEvent.changed_indicators 84
+XkbNamesNotifyEvent.changed_vmods 76
+XkbNamesNotifyEvent.device 44
+XkbNamesNotifyEvent.display 24
+XkbNamesNotifyEvent.first_key 88
+XkbNamesNotifyEvent.first_lvl 60
+XkbNamesNotifyEvent.first_type 52
+XkbNamesNotifyEvent.num_aliases 68
+XkbNamesNotifyEvent.num_keys 92
+XkbNamesNotifyEvent.num_lvls 64
+XkbNamesNotifyEvent.num_radio_groups 72
+XkbNamesNotifyEvent.num_types 56
+XkbNamesNotifyEvent.send_event 16
+XkbNamesNotifyEvent.serial 8
+XkbNamesNotifyEvent.time 32
+XkbNamesNotifyEvent.type 0
+XkbNamesNotifyEvent.xkb_type 40
+XkbNewKeyboardNotifyEvent 80
+XkbNewKeyboardNotifyEvent.changed 68
+XkbNewKeyboardNotifyEvent.device 44
+XkbNewKeyboardNotifyEvent.display 24
+XkbNewKeyboardNotifyEvent.max_key_code 56
+XkbNewKeyboardNotifyEvent.min_key_code 52
+XkbNewKeyboardNotifyEvent.old_device 48
+XkbNewKeyboardNotifyEvent.old_max_key_code 64
+XkbNewKeyboardNotifyEvent.old_min_key_code 60
+XkbNewKeyboardNotifyEvent.req_major 72
+XkbNewKeyboardNotifyEvent.req_minor 73
+XkbNewKeyboardNotifyEvent.send_event 16
+XkbNewKeyboardNotifyEvent.serial 8
+XkbNewKeyboardNotifyEvent.time 32
+XkbNewKeyboardNotifyEvent.type 0
+XkbNewKeyboardNotifyEvent.xkb_type 40
+XkbStateNotifyEvent 104
+XkbStateNotifyEvent.base_group 56
+XkbStateNotifyEvent.base_mods 72
+XkbStateNotifyEvent.changed 48
+XkbStateNotifyEvent.compat_grab_mods 89
+XkbStateNotifyEvent.compat_lookup_mods 91
+XkbStateNotifyEvent.compat_state 84
+XkbStateNotifyEvent.device 44
+XkbStateNotifyEvent.display 24
+XkbStateNotifyEvent.event_type 97
+XkbStateNotifyEvent.grab_mods 88
+XkbStateNotifyEvent.group 52
+XkbStateNotifyEvent.keycode 96
+XkbStateNotifyEvent.latched_group 60
+XkbStateNotifyEvent.latched_mods 76
+XkbStateNotifyEvent.locked_group 64
+XkbStateNotifyEvent.locked_mods 80
+XkbStateNotifyEvent.lookup_mods 90
+XkbStateNotifyEvent.mods 68
+XkbStateNotifyEvent.ptr_buttons 92
+XkbStateNotifyEvent.req_major 98
+XkbStateNotifyEvent.req_minor 99
+XkbStateNotifyEvent.send_event 16
+XkbStateNotifyEvent.serial 8
+XkbStateNotifyEvent.time 32
+XkbStateNotifyEvent.type 0
+XkbStateNotifyEvent.xkb_type 40
+XKeyboardControl 32
+XKeyboardControl.auto_repeat_mode 28
+XKeyboardControl.bell_duration 12
+XKeyboardControl.bell_percent 4
+XKeyboardControl.bell_pitch 8
+XKeyboardControl.key 24
+XKeyboardControl.key_click_percent 0
+XKeyboardControl.led 16
+XKeyboardControl.led_mode 20
+XKeyboardState 64
+XKeyboardState.auto_repeats 28
+XKeyboardState.bell_duration 12
+XKeyboardState.bell_percent 4
+XKeyboardState.bell_pitch 8
+XKeyboardState.global_auto_repeat 24
+XKeyboardState.key_click_percent 0
+XKeyboardState.led_mask 16
+XKeyEvent 96
+XKeyEvent.display 24
+XKeyEvent.keycode 84
+XKeyEvent.root 40
+XKeyEvent.same_screen 88
+XKeyEvent.send_event 16
+XKeyEvent.serial 8
+XKeyEvent.state 80
+XKeyEvent.subwindow 48
+XKeyEvent.time 56
+XKeyEvent.type 0
+XKeyEvent.window 32
+XKeyEvent.x 64
+XKeyEvent.x_root 72
+XKeyEvent.y 68
+XKeyEvent.y_root 76
+XKeymapEvent 72
+XKeymapEvent.display 24
+XKeymapEvent.key_vector 40
+XKeymapEvent.send_event 16
+XKeymapEvent.serial 8
+XKeymapEvent.type 0
+XKeymapEvent.window 32
+XMapEvent 56
+XMapEvent.display 24
+XMapEvent.event 32
+XMapEvent.override_redirect 48
+XMapEvent.send_event 16
+XMapEvent.serial 8
+XMapEvent.type 0
+XMapEvent.window 40
+XMappingEvent 56
+XMappingEvent.count 48
+XMappingEvent.display 24
+XMappingEvent.first_keycode 44
+XMappingEvent.request 40
+XMappingEvent.send_event 16
+XMappingEvent.serial 8
+XMappingEvent.type 0
+XMappingEvent.window 32
+XMapRequestEvent 48
+XMapRequestEvent.display 24
+XMapRequestEvent.parent 32
+XMapRequestEvent.send_event 16
+XMapRequestEvent.serial 8
+XMapRequestEvent.type 0
+XMapRequestEvent.window 40
+XmbTextItem 24
+XmbTextItem.chars 0
+XmbTextItem.delta 12
+XmbTextItem.font_set 16
+XmbTextItem.nchars 8
+XModifierKeymap 16
+XModifierKeymap.max_keypermod 0
+XModifierKeymap.modifiermap 8
+XMotionEvent 96
+XMotionEvent.display 24
+XMotionEvent.is_hint 84
+XMotionEvent.root 40
+XMotionEvent.same_screen 88
+XMotionEvent.send_event 16
+XMotionEvent.serial 8
+XMotionEvent.state 80
+XMotionEvent.subwindow 48
+XMotionEvent.time 56
+XMotionEvent.type 0
+XMotionEvent.window 32
+XMotionEvent.x 64
+XMotionEvent.x_root 72
+XMotionEvent.y 68
+XMotionEvent.y_root 76
+XNoExposeEvent 48
+XNoExposeEvent.display 24
+XNoExposeEvent.drawable 32
+XNoExposeEvent.major_code 40
+XNoExposeEvent.minor_code 44
+XNoExposeEvent.send_event 16
+XNoExposeEvent.serial 8
+XNoExposeEvent.type 0
+XOMCharSetList 16
+XOMCharSetList.charset_count 0
+XOMCharSetList.charset_list 8
+XOMFontInfo 24
+XOMFontInfo.font_name_list 16
+XOMFontInfo.font_struct_list 8
+XOMFontInfo.num_font 0
+XOMOrientation 16
+XOMOrientation.num_orientation 0
+XOMOrientation.orientation 8
+XPixmapFormatValues 12
+XPixmapFormatValues.bits_per_pixel 4
+XPixmapFormatValues.depth 0
+XPixmapFormatValues.scanline_pad 8
+XPoint 4
+XPoint.x 0
+XPoint.y 2
+XPropertyEvent 64
+XPropertyEvent.atom 40
+XPropertyEvent.display 24
+XPropertyEvent.send_event 16
+XPropertyEvent.serial 8
+XPropertyEvent.state 56
+XPropertyEvent.time 48
+XPropertyEvent.type 0
+XPropertyEvent.window 32
+XRectangle 8
+XRectangle.height 6
+XRectangle.width 4
+XRectangle.x 0
+XRectangle.y 2
+XRenderDirectFormat 16
+XRenderDirectFormat.alpha 12
+XRenderDirectFormat.alphaMask 14
+XRenderDirectFormat.blue 8
+XRenderDirectFormat.blueMask 10
+XRenderDirectFormat.green 4
+XRenderDirectFormat.greenMask 6
+XRenderDirectFormat.red 0
+XRenderDirectFormat.redMask 2
+XRenderPictFormat 40
+XRenderPictFormat.colormap 32
+XRenderPictFormat.depth 12
+XRenderPictFormat.direct 16
+XRenderPictFormat.id 0
+XRenderPictFormat.type 8
+XReparentEvent 72
+XReparentEvent.display 24
+XReparentEvent.event 32
+XReparentEvent.override_redirect 64
+XReparentEvent.parent 48
+XReparentEvent.send_event 16
+XReparentEvent.serial 8
+XReparentEvent.type 0
+XReparentEvent.window 40
+XReparentEvent.x 56
+XReparentEvent.y 60
+XResizeRequestEvent 48
+XResizeRequestEvent.display 24
+XResizeRequestEvent.height 44
+XResizeRequestEvent.send_event 16
+XResizeRequestEvent.serial 8
+XResizeRequestEvent.type 0
+XResizeRequestEvent.width 40
+XResizeRequestEvent.window 32
+XSegment 8
+XSegment.x1 0
+XSegment.x2 4
+XSegment.y1 2
+XSegment.y2 6
+XSelectionClearEvent 56
+XSelectionClearEvent.display 24
+XSelectionClearEvent.selection 40
+XSelectionClearEvent.send_event 16
+XSelectionClearEvent.serial 8
+XSelectionClearEvent.time 48
+XSelectionClearEvent.type 0
+XSelectionClearEvent.window 32
+XSelectionEvent 72
+XSelectionEvent.display 24
+XSelectionEvent.property 56
+XSelectionEvent.requestor 32
+XSelectionEvent.selection 40
+XSelectionEvent.send_event 16
+XSelectionEvent.serial 8
+XSelectionEvent.target 48
+XSelectionEvent.time 64
+XSelectionEvent.type 0
+XSelectionRequestEvent 80
+XSelectionRequestEvent.display 24
+XSelectionRequestEvent.owner 32
+XSelectionRequestEvent.property 64
+XSelectionRequestEvent.requestor 40
+XSelectionRequestEvent.selection 48
+XSelectionRequestEvent.send_event 16
+XSelectionRequestEvent.serial 8
+XSelectionRequestEvent.target 56
+XSelectionRequestEvent.time 72
+XSelectionRequestEvent.type 0
+XSetWindowAttributes 112
+XSetWindowAttributes.background_pixel 8
+XSetWindowAttributes.background_pixmap 0
+XSetWindowAttributes.backing_pixel 56
+XSetWindowAttributes.backing_planes 48
+XSetWindowAttributes.backing_store 40
+XSetWindowAttributes.bit_gravity 32
+XSetWindowAttributes.border_pixel 24
+XSetWindowAttributes.border_pixmap 16
+XSetWindowAttributes.colormap 96
+XSetWindowAttributes.cursor 104
+XSetWindowAttributes.do_not_propagate_mask 80
+XSetWindowAttributes.event_mask 72
+XSetWindowAttributes.override_redirect 88
+XSetWindowAttributes.save_under 64
+XSetWindowAttributes.win_gravity 36
+XSizeHints 80
+XSizeHints.base_height 68
+XSizeHints.base_width 64
+XSizeHints.flags 0
+XSizeHints.height 20
+XSizeHints.height_inc 44
+XSizeHints.max_aspect.x 56
+XSizeHints.max_aspect.y 60
+XSizeHints.max_height 36
+XSizeHints.max_width 32
+XSizeHints.min_aspect.x 48
+XSizeHints.min_aspect.y 52
+XSizeHints.min_height 28
+XSizeHints.min_width 24
+XSizeHints.width 16
+XSizeHints.width_inc 40
+XSizeHints.win_gravity 72
+XSizeHints.x 8
+XSizeHints.y 12
+XStandardColormap 80
+XStandardColormap.base_pixel 56
+XStandardColormap.blue_max 40
+XStandardColormap.blue_mult 48
+XStandardColormap.colormap 0
+XStandardColormap.green_max 24
+XStandardColormap.green_mult 32
+XStandardColormap.killid 72
+XStandardColormap.red_max 8
+XStandardColormap.red_mult 16
+XStandardColormap.visualid 64
+XTextItem16 24
+XTextItem16.chars 0
+XTextItem16.delta 12
+XTextItem16.font 16
+XTextItem16.nchars 8
+XTextItem 24
+XTextItem.chars 0
+XTextItem.delta 12
+XTextItem.font 16
+XTextItem.nchars 8
+XTextProperty 32
+XTextProperty.encoding 8
+XTextProperty.format 16
+XTextProperty.nitems 24
+XTextProperty.value 0
+XTimeCoord 16
+XTimeCoord.time 0
+XTimeCoord.x 8
+XTimeCoord.y 10
+XUnmapEvent 56
+XUnmapEvent.display 24
+XUnmapEvent.event 32
+XUnmapEvent.from_configure 48
+XUnmapEvent.send_event 16
+XUnmapEvent.serial 8
+XUnmapEvent.type 0
+XUnmapEvent.window 40
+XVisibilityEvent 48
+XVisibilityEvent.display 24
+XVisibilityEvent.send_event 16
+XVisibilityEvent.serial 8
+XVisibilityEvent.state 40
+XVisibilityEvent.type 0
+XVisibilityEvent.window 32
+XVisualInfo 64
+XVisualInfo.bits_per_rgb 60
+XVisualInfo.blue_mask 48
+XVisualInfo.class 24
+XVisualInfo.colormap_size 56
+XVisualInfo.depth 20
+XVisualInfo.green_mask 40
+XVisualInfo.red_mask 32
+XVisualInfo.screen 16
+XVisualInfo.visual 0
+XVisualInfo.visualid 8
+XwcTextItem 24
+XwcTextItem.chars 0
+XwcTextItem.delta 12
+XwcTextItem.font_set 16
+XwcTextItem.nchars 8
+XWindowAttributes 136
+XWindowAttributes.all_event_masks 96
+XWindowAttributes.backing_pixel 64
+XWindowAttributes.backing_planes 56
+XWindowAttributes.backing_store 52
+XWindowAttributes.bit_gravity 44
+XWindowAttributes.border_width 16
+XWindowAttributes.class 40
+XWindowAttributes.colormap 80
+XWindowAttributes.depth 20
+XWindowAttributes.do_not_propagate_mask 112
+XWindowAttributes.height 12
+XWindowAttributes.map_installed 88
+XWindowAttributes.map_state 92
+XWindowAttributes.override_redirect 120
+XWindowAttributes.root 32
+XWindowAttributes.save_under 72
+XWindowAttributes.screen 128
+XWindowAttributes.visual 24
+XWindowAttributes.width 8
+XWindowAttributes.win_gravity 48
+XWindowAttributes.x 0
+XWindowAttributes.y 4
+XWindowAttributes.your_event_mask 104
+XWindowChanges 40
+XWindowChanges.border_width 16
+XWindowChanges.height 12
+XWindowChanges.sibling 24
+XWindowChanges.stack_mode 32
+XWindowChanges.width 8
+XWindowChanges.x 0
+XWindowChanges.y 4
+XWMHints 56
+XWMHints.flags 0
+XWMHints.icon_mask 40
+XWMHints.icon_pixmap 16
+XWMHints.icon_window 24
+XWMHints.icon_x 32
+XWMHints.icon_y 36
+XWMHints.initial_state 12
+XWMHints.input 8
+XWMHints.window_group 48
--- a/make/data/x11wrappergen/sizes.32 Thu Mar 01 16:35:36 2018 -0500
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,1017 +0,0 @@
-long 4
-int 4
-short 2
-ptr 4
-Bool 4
-Atom 4
-Window 4
-XExtData.number 0
-XExtData.next 4
-XExtData.free_private 8
-XExtData.private_data 12
-XExtData 16
-XIMStringConversionCallbackStruct.position 0
-XIMStringConversionCallbackStruct.direction 4
-XIMStringConversionCallbackStruct.operation 8
-XIMStringConversionCallbackStruct.factor 10
-XIMStringConversionCallbackStruct.text 12
-XIMStringConversionCallbackStruct 16
-XkbNewKeyboardNotifyEvent.type 0
-XkbNewKeyboardNotifyEvent.serial 4
-XkbNewKeyboardNotifyEvent.send_event 8
-XkbNewKeyboardNotifyEvent.display 12
-XkbNewKeyboardNotifyEvent.time 16
-XkbNewKeyboardNotifyEvent.xkb_type 20
-XkbNewKeyboardNotifyEvent.device 24
-XkbNewKeyboardNotifyEvent.old_device 28
-XkbNewKeyboardNotifyEvent.min_key_code 32
-XkbNewKeyboardNotifyEvent.max_key_code 36
-XkbNewKeyboardNotifyEvent.old_min_key_code 40
-XkbNewKeyboardNotifyEvent.old_max_key_code 44
-XkbNewKeyboardNotifyEvent.changed 48
-XkbNewKeyboardNotifyEvent.req_major 52
-XkbNewKeyboardNotifyEvent.req_minor 53
-XkbNewKeyboardNotifyEvent 56
-XTimeCoord.time 0
-XTimeCoord.x 4
-XTimeCoord.y 6
-XTimeCoord 8
-XkbCompatMapNotifyEvent.type 0
-XkbCompatMapNotifyEvent.serial 4
-XkbCompatMapNotifyEvent.send_event 8
-XkbCompatMapNotifyEvent.display 12
-XkbCompatMapNotifyEvent.time 16
-XkbCompatMapNotifyEvent.xkb_type 20
-XkbCompatMapNotifyEvent.device 24
-XkbCompatMapNotifyEvent.changed_groups 28
-XkbCompatMapNotifyEvent.first_si 32
-XkbCompatMapNotifyEvent.num_si 36
-XkbCompatMapNotifyEvent.num_total_si 40
-XkbCompatMapNotifyEvent 44
-XIMStatusDrawCallbackStruct.type 0
-XIMStatusDrawCallbackStruct.data 4
-XIMStatusDrawCallbackStruct 8
-XKeyboardControl.key_click_percent 0
-XKeyboardControl.bell_percent 4
-XKeyboardControl.bell_pitch 8
-XKeyboardControl.bell_duration 12
-XKeyboardControl.led 16
-XKeyboardControl.led_mode 20
-XKeyboardControl.key 24
-XKeyboardControl.auto_repeat_mode 28
-XKeyboardControl 32
-XSelectionClearEvent.type 0
-XSelectionClearEvent.serial 4
-XSelectionClearEvent.send_event 8
-XSelectionClearEvent.display 12
-XSelectionClearEvent.window 16
-XSelectionClearEvent.selection 20
-XSelectionClearEvent.time 24
-XSelectionClearEvent 28
-XWindowChanges.x 0
-XWindowChanges.y 4
-XWindowChanges.width 8
-XWindowChanges.height 12
-XWindowChanges.border_width 16
-XWindowChanges.sibling 20
-XWindowChanges.stack_mode 24
-XWindowChanges 28
-XIMPreeditCaretCallbackStruct.position 0
-XIMPreeditCaretCallbackStruct.direction 4
-XIMPreeditCaretCallbackStruct.style 8
-XIMPreeditCaretCallbackStruct 12
-XOMCharSetList.charset_count 0
-XOMCharSetList.charset_list 4
-XOMCharSetList 8
-XOMFontInfo.num_font 0
-XOMFontInfo.font_struct_list 4
-XOMFontInfo.font_name_list 8
-XOMFontInfo 12
-AwtScreenData.numConfigs 0
-AwtScreenData.root 4
-AwtScreenData.whitepixel 8
-AwtScreenData.blackpixel 12
-AwtScreenData.defaultConfig 16
-AwtScreenData.configs 20
-AwtScreenData 24
-XIMHotKeyTrigger.keysym 0
-XIMHotKeyTrigger.modifier 4
-XIMHotKeyTrigger.modifier_mask 8
-XIMHotKeyTrigger 12
-XCirculateEvent.type 0
-XCirculateEvent.serial 4
-XCirculateEvent.send_event 8
-XCirculateEvent.display 12
-XCirculateEvent.event 16
-XCirculateEvent.window 20
-XCirculateEvent.place 24
-XCirculateEvent 28
-Screen.ext_data 0
-Screen.display 4
-Screen.root 8
-Screen.width 12
-Screen.height 16
-Screen.mwidth 20
-Screen.mheight 24
-Screen.ndepths 28
-Screen.depths 32
-Screen.root_depth 36
-Screen.root_visual 40
-Screen.default_gc 44
-Screen.cmap 48
-Screen.white_pixel 52
-Screen.black_pixel 56
-Screen.max_maps 60
-Screen.min_maps 64
-Screen.backing_store 68
-Screen.save_unders 72
-Screen.root_input_mask 76
-Screen 80
-XMapRequestEvent.type 0
-XMapRequestEvent.serial 4
-XMapRequestEvent.send_event 8
-XMapRequestEvent.display 12
-XMapRequestEvent.parent 16
-XMapRequestEvent.window 20
-XMapRequestEvent 24
-XIMText.length 0
-XIMText.feedback 4
-XIMText.encoding_is_wchar 8
-XIMText.string 12
-XIMText 16
-XGraphicsExposeEvent.type 0
-XGraphicsExposeEvent.serial 4
-XGraphicsExposeEvent.send_event 8
-XGraphicsExposeEvent.display 12
-XGraphicsExposeEvent.drawable 16
-XGraphicsExposeEvent.x 20
-XGraphicsExposeEvent.y 24
-XGraphicsExposeEvent.width 28
-XGraphicsExposeEvent.height 32
-XGraphicsExposeEvent.count 36
-XGraphicsExposeEvent.major_code 40
-XGraphicsExposeEvent.minor_code 44
-XGraphicsExposeEvent 48
-XEvent.type 0
-XEvent.xany 0
-XEvent.xkey 0
-XEvent.xbutton 0
-XEvent.xmotion 0
-XEvent.xcrossing 0
-XEvent.xfocus 0
-XEvent.xexpose 0
-XEvent.xgraphicsexpose 0
-XEvent.xnoexpose 0
-XEvent.xvisibility 0
-XEvent.xcreatewindow 0
-XEvent.xdestroywindow 0
-XEvent.xunmap 0
-XEvent.xmap 0
-XEvent.xmaprequest 0
-XEvent.xreparent 0
-XEvent.xconfigure 0
-XEvent.xgravity 0
-XEvent.xresizerequest 0
-XEvent.xconfigurerequest 0
-XEvent.xcirculate 0
-XEvent.xcirculaterequest 0
-XEvent.xproperty 0
-XEvent.xselectionclear 0
-XEvent.xselectionrequest 0
-XEvent.xselection 0
-XEvent.xcolormap 0
-XEvent.xclient 0
-XEvent.xmapping 0
-XEvent.xerror 0
-XEvent.xkeymap 0
-XEvent.pad 0
-XEvent 96
-XRenderDirectFormat.red 0
-XRenderDirectFormat.redMask 2
-XRenderDirectFormat.green 4
-XRenderDirectFormat.greenMask 6
-XRenderDirectFormat.blue 8
-XRenderDirectFormat.blueMask 10
-XRenderDirectFormat.alpha 12
-XRenderDirectFormat.alphaMask 14
-XRenderDirectFormat 16
-ColorData.awt_Colors 0
-ColorData.awt_numICMcolors 4
-ColorData.awt_icmLUT 8
-ColorData.awt_icmLUT2Colors 12
-ColorData.img_grays 16
-ColorData.img_clr_tbl 20
-ColorData.img_oda_red 24
-ColorData.img_oda_green 28
-ColorData.img_oda_blue 32
-ColorData.pGrayInverseLutData 36
-ColorData.screendata 40
-ColorData.representsPrimaries 44
-ColorData 48
-XFontStruct.ext_data 0
-XFontStruct.fid 4
-XFontStruct.direction 8
-XFontStruct.min_char_or_byte2 12
-XFontStruct.max_char_or_byte2 16
-XFontStruct.min_byte1 20
-XFontStruct.max_byte1 24
-XFontStruct.all_chars_exist 28
-XFontStruct.n_properties 36
-XFontStruct.properties 40
-XFontStruct.min_bounds 44
-XFontStruct.max_bounds 56
-XFontStruct.per_char 68
-XFontStruct.ascent 72
-XFontStruct.descent 76
-XFontStruct 80
-XExtCodes.extension 0
-XExtCodes.major_opcode 4
-XExtCodes.first_event 8
-XExtCodes.first_error 12
-XExtCodes 16
-XFontSetExtents.max_ink_extent 0
-XFontSetExtents.max_logical_extent 8
-XFontSetExtents 16
-XSelectionEvent.type 0
-XSelectionEvent.serial 4
-XSelectionEvent.send_event 8
-XSelectionEvent.display 12
-XSelectionEvent.requestor 16
-XSelectionEvent.selection 20
-XSelectionEvent.target 24
-XSelectionEvent.property 28
-XSelectionEvent.time 32
-XSelectionEvent 36
-XArc.x 0
-XArc.y 2
-XArc.width 4
-XArc.height 6
-XArc.angle1 8
-XArc.angle2 10
-XArc 12
-XErrorEvent.type 0
-XErrorEvent.display 4
-XErrorEvent.resourceid 8
-XErrorEvent.serial 12
-XErrorEvent.error_code 16
-XErrorEvent.request_code 17
-XErrorEvent.minor_code 18
-XErrorEvent 20
-XConfigureRequestEvent.type 0
-XConfigureRequestEvent.serial 4
-XConfigureRequestEvent.send_event 8
-XConfigureRequestEvent.display 12
-XConfigureRequestEvent.parent 16
-XConfigureRequestEvent.window 20
-XConfigureRequestEvent.x 24
-XConfigureRequestEvent.y 28
-XConfigureRequestEvent.width 32
-XConfigureRequestEvent.height 36
-XConfigureRequestEvent.border_width 40
-XConfigureRequestEvent.above 44
-XConfigureRequestEvent.detail 48
-XConfigureRequestEvent.value_mask 52
-XConfigureRequestEvent 56
-ScreenFormat.ext_data 0
-ScreenFormat.depth 4
-ScreenFormat.bits_per_pixel 8
-ScreenFormat.scanline_pad 12
-ScreenFormat 16
-XButtonEvent.type 0
-XButtonEvent.serial 4
-XButtonEvent.send_event 8
-XButtonEvent.display 12
-XButtonEvent.window 16
-XButtonEvent.root 20
-XButtonEvent.subwindow 24
-XButtonEvent.time 28
-XButtonEvent.x 32
-XButtonEvent.y 36
-XButtonEvent.x_root 40
-XButtonEvent.y_root 44
-XButtonEvent.state 48
-XButtonEvent.button 52
-XButtonEvent.same_screen 56
-XButtonEvent 60
-XFontProp.name 0
-XFontProp.card32 4
-XFontProp 8
-XIMValuesList.count_values 0
-XIMValuesList.supported_values 4
-XIMValuesList 8
-XKeymapEvent.type 0
-XKeymapEvent.serial 4
-XKeymapEvent.send_event 8
-XKeymapEvent.display 12
-XKeymapEvent.window 16
-XKeymapEvent.key_vector 20
-XKeymapEvent 52
-XTextItem16.chars 0
-XTextItem16.nchars 4
-XTextItem16.delta 8
-XTextItem16.font 12
-XTextItem16 16
-XIMPreeditDrawCallbackStruct.caret 0
-XIMPreeditDrawCallbackStruct.chg_first 4
-XIMPreeditDrawCallbackStruct.chg_length 8
-XIMPreeditDrawCallbackStruct.text 12
-XIMPreeditDrawCallbackStruct 16
-XVisualInfo.visual 0
-XVisualInfo.visualid 4
-XVisualInfo.screen 8
-XVisualInfo.depth 12
-XVisualInfo.class 16
-XVisualInfo.red_mask 20
-XVisualInfo.green_mask 24
-XVisualInfo.blue_mask 28
-XVisualInfo.colormap_size 32
-XVisualInfo.bits_per_rgb 36
-XVisualInfo 40
-XkbControlsNotifyEvent.type 0
-XkbControlsNotifyEvent.serial 4
-XkbControlsNotifyEvent.send_event 8
-XkbControlsNotifyEvent.display 12
-XkbControlsNotifyEvent.time 16
-XkbControlsNotifyEvent.xkb_type 20
-XkbControlsNotifyEvent.device 24
-XkbControlsNotifyEvent.changed_ctrls 28
-XkbControlsNotifyEvent.enabled_ctrls 32
-XkbControlsNotifyEvent.enabled_ctrl_changes 36
-XkbControlsNotifyEvent.num_groups 40
-XkbControlsNotifyEvent.keycode 44
-XkbControlsNotifyEvent.event_type 45
-XkbControlsNotifyEvent.req_major 46
-XkbControlsNotifyEvent.req_minor 47
-XkbControlsNotifyEvent 48
-PropMwmHints.flags 0
-PropMwmHints.functions 4
-PropMwmHints.decorations 8
-PropMwmHints.inputMode 12
-PropMwmHints.status 16
-PropMwmHints 20
-XClientMessageEvent.type 0
-XClientMessageEvent.serial 4
-XClientMessageEvent.send_event 8
-XClientMessageEvent.display 12
-XClientMessageEvent.window 16
-XClientMessageEvent.message_type 20
-XClientMessageEvent.format 24
-XClientMessageEvent.data 28
-XClientMessageEvent 48
-XAnyEvent.type 0
-XAnyEvent.serial 4
-XAnyEvent.send_event 8
-XAnyEvent.display 12
-XAnyEvent.window 16
-XAnyEvent 20
-XkbIndicatorNotifyEvent.type 0
-XkbIndicatorNotifyEvent.serial 4
-XkbIndicatorNotifyEvent.send_event 8
-XkbIndicatorNotifyEvent.display 12
-XkbIndicatorNotifyEvent.time 16
-XkbIndicatorNotifyEvent.xkb_type 20
-XkbIndicatorNotifyEvent.device 24
-XkbIndicatorNotifyEvent.changed 28
-XkbIndicatorNotifyEvent.state 32
-XkbIndicatorNotifyEvent 36
-XIMPreeditStateNotifyCallbackStruct.state 0
-XIMPreeditStateNotifyCallbackStruct 4
-XkbAnyEvent.type 0
-XkbAnyEvent.serial 4
-XkbAnyEvent.send_event 8
-XkbAnyEvent.display 12
-XkbAnyEvent.time 16
-XkbAnyEvent.xkb_type 20
-XkbAnyEvent.device 24
-XkbAnyEvent 28
-XMotionEvent.type 0
-XMotionEvent.serial 4
-XMotionEvent.send_event 8
-XMotionEvent.display 12
-XMotionEvent.window 16
-XMotionEvent.root 20
-XMotionEvent.subwindow 24
-XMotionEvent.time 28
-XMotionEvent.x 32
-XMotionEvent.y 36
-XMotionEvent.x_root 40
-XMotionEvent.y_root 44
-XMotionEvent.state 48
-XMotionEvent.is_hint 52
-XMotionEvent.same_screen 56
-XMotionEvent 60
-XIMHotKeyTriggers.num_hot_key 0
-XIMHotKeyTriggers.key 4
-XIMHotKeyTriggers 8
-XIMStyles.count_styles 0
-XIMStyles.supported_styles 4
-XIMStyles 8
-XkbExtensionDeviceNotifyEvent.type 0
-XkbExtensionDeviceNotifyEvent.serial 4
-XkbExtensionDeviceNotifyEvent.send_event 8
-XkbExtensionDeviceNotifyEvent.display 12
-XkbExtensionDeviceNotifyEvent.time 16
-XkbExtensionDeviceNotifyEvent.xkb_type 20
-XkbExtensionDeviceNotifyEvent.device 24
-XkbExtensionDeviceNotifyEvent.reason 28
-XkbExtensionDeviceNotifyEvent.supported 32
-XkbExtensionDeviceNotifyEvent.unsupported 36
-XkbExtensionDeviceNotifyEvent.first_btn 40
-XkbExtensionDeviceNotifyEvent.num_btns 44
-XkbExtensionDeviceNotifyEvent.leds_defined 48
-XkbExtensionDeviceNotifyEvent.led_state 52
-XkbExtensionDeviceNotifyEvent.led_class 56
-XkbExtensionDeviceNotifyEvent.led_id 60
-XkbExtensionDeviceNotifyEvent 64
-XwcTextItem.chars 0
-XwcTextItem.nchars 4
-XwcTextItem.delta 8
-XwcTextItem.font_set 12
-XwcTextItem 16
-XClassHint.res_name 0
-XClassHint.res_class 4
-XClassHint 8
-XChar2b.byte1 0
-XChar2b.byte2 1
-XChar2b 2
-XSetWindowAttributes.background_pixmap 0
-XSetWindowAttributes.background_pixel 4
-XSetWindowAttributes.border_pixmap 8
-XSetWindowAttributes.border_pixel 12
-XSetWindowAttributes.bit_gravity 16
-XSetWindowAttributes.win_gravity 20
-XSetWindowAttributes.backing_store 24
-XSetWindowAttributes.backing_planes 28
-XSetWindowAttributes.backing_pixel 32
-XSetWindowAttributes.save_under 36
-XSetWindowAttributes.event_mask 40
-XSetWindowAttributes.do_not_propagate_mask 44
-XSetWindowAttributes.override_redirect 48
-XSetWindowAttributes.colormap 52
-XSetWindowAttributes.cursor 56
-XSetWindowAttributes 60
-XRenderPictFormat.id 0
-XRenderPictFormat.type 4
-XRenderPictFormat.depth 8
-XRenderPictFormat.direct 12
-XRenderPictFormat.colormap 28
-XRenderPictFormat 32
-XReparentEvent.type 0
-XReparentEvent.serial 4
-XReparentEvent.send_event 8
-XReparentEvent.display 12
-XReparentEvent.event 16
-XReparentEvent.window 20
-XReparentEvent.parent 24
-XReparentEvent.x 28
-XReparentEvent.y 32
-XReparentEvent.override_redirect 36
-XReparentEvent 40
-XCirculateRequestEvent.type 0
-XCirculateRequestEvent.serial 4
-XCirculateRequestEvent.send_event 8
-XCirculateRequestEvent.display 12
-XCirculateRequestEvent.parent 16
-XCirculateRequestEvent.window 20
-XCirculateRequestEvent.place 24
-XCirculateRequestEvent 28
-XImage.width 0
-XImage.height 4
-XImage.xoffset 8
-XImage.format 12
-XImage.data 16
-XImage.byte_order 20
-XImage.bitmap_unit 24
-XImage.bitmap_bit_order 28
-XImage.bitmap_pad 32
-XImage.depth 36
-XImage.bytes_per_line 40
-XImage.bits_per_pixel 44
-XImage.red_mask 48
-XImage.green_mask 52
-XImage.blue_mask 56
-XImage.obdata 60
-XImage.f.create_image 64
-XImage.f.destroy_image 68
-XImage.f.get_pixel 72
-XImage.f.put_pixel 76
-XImage.f.sub_image 80
-XImage.f.add_pixel 84
-XImage 88
-XKeyEvent.type 0
-XKeyEvent.serial 4
-XKeyEvent.send_event 8
-XKeyEvent.display 12
-XKeyEvent.window 16
-XKeyEvent.root 20
-XKeyEvent.subwindow 24
-XKeyEvent.time 28
-XKeyEvent.x 32
-XKeyEvent.y 36
-XKeyEvent.x_root 40
-XKeyEvent.y_root 44
-XKeyEvent.state 48
-XKeyEvent.keycode 52
-XKeyEvent.same_screen 56
-XKeyEvent 60
-XkbActionMessageEvent.type 0
-XkbActionMessageEvent.serial 4
-XkbActionMessageEvent.send_event 8
-XkbActionMessageEvent.display 12
-XkbActionMessageEvent.time 16
-XkbActionMessageEvent.xkb_type 20
-XkbActionMessageEvent.device 24
-XkbActionMessageEvent.keycode 28
-XkbActionMessageEvent.press 32
-XkbActionMessageEvent.key_event_follows 36
-XkbActionMessageEvent.group 40
-XkbActionMessageEvent.mods 44
-XkbActionMessageEvent.message 48
-XkbActionMessageEvent 56
-XdbeSwapInfo.swap_window 0
-XdbeSwapInfo.swap_action 4
-XdbeSwapInfo 8
-XTextItem.chars 0
-XTextItem.nchars 4
-XTextItem.delta 8
-XTextItem.font 12
-XTextItem 16
-XModifierKeymap.max_keypermod 0
-XModifierKeymap.modifiermap 4
-XModifierKeymap 8
-XCharStruct.lbearing 0
-XCharStruct.rbearing 2
-XCharStruct.width 4
-XCharStruct.ascent 6
-XCharStruct.descent 8
-XCharStruct.attributes 10
-XCharStruct 12
-XGravityEvent.type 0
-XGravityEvent.serial 4
-XGravityEvent.send_event 8
-XGravityEvent.display 12
-XGravityEvent.event 16
-XGravityEvent.window 20
-XGravityEvent.x 24
-XGravityEvent.y 28
-XGravityEvent 32
-Visual.ext_data 0
-Visual.visualid 4
-Visual.class 8
-Visual.red_mask 12
-Visual.green_mask 16
-Visual.blue_mask 20
-Visual.bits_per_rgb 24
-Visual.map_entries 28
-Visual 32
-XOMOrientation.num_orientation 0
-XOMOrientation.orientation 4
-XOMOrientation 8
-XkbAccessXNotifyEvent.type 0
-XkbAccessXNotifyEvent.serial 4
-XkbAccessXNotifyEvent.send_event 8
-XkbAccessXNotifyEvent.display 12
-XkbAccessXNotifyEvent.time 16
-XkbAccessXNotifyEvent.xkb_type 20
-XkbAccessXNotifyEvent.device 24
-XkbAccessXNotifyEvent.detail 28
-XkbAccessXNotifyEvent.keycode 32
-XkbAccessXNotifyEvent.sk_delay 36
-XkbAccessXNotifyEvent.debounce_delay 40
-XkbAccessXNotifyEvent 44
-XWindowAttributes.x 0
-XWindowAttributes.y 4
-XWindowAttributes.width 8
-XWindowAttributes.height 12
-XWindowAttributes.border_width 16
-XWindowAttributes.depth 20
-XWindowAttributes.visual 24
-XWindowAttributes.root 28
-XWindowAttributes.class 32
-XWindowAttributes.bit_gravity 36
-XWindowAttributes.win_gravity 40
-XWindowAttributes.backing_store 44
-XWindowAttributes.backing_planes 48
-XWindowAttributes.backing_pixel 52
-XWindowAttributes.save_under 56
-XWindowAttributes.colormap 60
-XWindowAttributes.map_installed 64
-XWindowAttributes.map_state 68
-XWindowAttributes.all_event_masks 72
-XWindowAttributes.your_event_mask 76
-XWindowAttributes.do_not_propagate_mask 80
-XWindowAttributes.override_redirect 84
-XWindowAttributes.screen 88
-XWindowAttributes 92
-XmbTextItem.chars 0
-XmbTextItem.nchars 4
-XmbTextItem.delta 8
-XmbTextItem.font_set 12
-XmbTextItem 16
-XMappingEvent.type 0
-XMappingEvent.serial 4
-XMappingEvent.send_event 8
-XMappingEvent.display 12
-XMappingEvent.window 16
-XMappingEvent.request 20
-XMappingEvent.first_keycode 24
-XMappingEvent.count 28
-XMappingEvent 32
-XSizeHints.flags 0
-XSizeHints.x 4
-XSizeHints.y 8
-XSizeHints.width 12
-XSizeHints.height 16
-XSizeHints.min_width 20
-XSizeHints.min_height 24
-XSizeHints.max_width 28
-XSizeHints.max_height 32
-XSizeHints.width_inc 36
-XSizeHints.height_inc 40
-XSizeHints.min_aspect.x 44
-XSizeHints.min_aspect.y 48
-XSizeHints.max_aspect.x 52
-XSizeHints.max_aspect.y 56
-XSizeHints.base_width 60
-XSizeHints.base_height 64
-XSizeHints.win_gravity 68
-XSizeHints 72
-XUnmapEvent.type 0
-XUnmapEvent.serial 4
-XUnmapEvent.send_event 8
-XUnmapEvent.display 12
-XUnmapEvent.event 16
-XUnmapEvent.window 20
-XUnmapEvent.from_configure 24
-XUnmapEvent 28
-awtImageData.Depth 0
-awtImageData.wsImageFormat 4
-awtImageData.clrdata 16
-awtImageData.convert 48
-awtImageData 304
-XkbStateNotifyEvent.type 0
-XkbStateNotifyEvent.serial 4
-XkbStateNotifyEvent.send_event 8
-XkbStateNotifyEvent.display 12
-XkbStateNotifyEvent.time 16
-XkbStateNotifyEvent.xkb_type 20
-XkbStateNotifyEvent.device 24
-XkbStateNotifyEvent.changed 28
-XkbStateNotifyEvent.group 32
-XkbStateNotifyEvent.base_group 36
-XkbStateNotifyEvent.latched_group 40
-XkbStateNotifyEvent.locked_group 44
-XkbStateNotifyEvent.mods 48
-XkbStateNotifyEvent.base_mods 52
-XkbStateNotifyEvent.latched_mods 56
-XkbStateNotifyEvent.locked_mods 60
-XkbStateNotifyEvent.compat_state 64
-XkbStateNotifyEvent.grab_mods 68
-XkbStateNotifyEvent.compat_grab_mods 69
-XkbStateNotifyEvent.lookup_mods 70
-XkbStateNotifyEvent.compat_lookup_mods 71
-XkbStateNotifyEvent.ptr_buttons 72
-XkbStateNotifyEvent.keycode 76
-XkbStateNotifyEvent.event_type 77
-XkbStateNotifyEvent.req_major 78
-XkbStateNotifyEvent.req_minor 79
-XkbStateNotifyEvent 80
-XExposeEvent.type 0
-XExposeEvent.serial 4
-XExposeEvent.send_event 8
-XExposeEvent.display 12
-XExposeEvent.window 16
-XExposeEvent.x 20
-XExposeEvent.y 24
-XExposeEvent.width 28
-XExposeEvent.height 32
-XExposeEvent.count 36
-XExposeEvent 40
-XkbMapNotifyEvent.type 0
-XkbMapNotifyEvent.serial 4
-XkbMapNotifyEvent.send_event 8
-XkbMapNotifyEvent.display 12
-XkbMapNotifyEvent.time 16
-XkbMapNotifyEvent.xkb_type 20
-XkbMapNotifyEvent.device 24
-XkbMapNotifyEvent.changed 28
-XkbMapNotifyEvent.flags 32
-XkbMapNotifyEvent.first_type 36
-XkbMapNotifyEvent.num_types 40
-XkbMapNotifyEvent.min_key_code 44
-XkbMapNotifyEvent.max_key_code 45
-XkbMapNotifyEvent.first_key_sym 46
-XkbMapNotifyEvent.first_key_act 47
-XkbMapNotifyEvent.first_key_behavior 48
-XkbMapNotifyEvent.first_key_explicit 49
-XkbMapNotifyEvent.first_modmap_key 50
-XkbMapNotifyEvent.first_vmodmap_key 51
-XkbMapNotifyEvent.num_key_syms 52
-XkbMapNotifyEvent.num_key_acts 56
-XkbMapNotifyEvent.num_key_behaviors 60
-XkbMapNotifyEvent.num_key_explicit 64
-XkbMapNotifyEvent.num_modmap_keys 68
-XkbMapNotifyEvent.num_vmodmap_keys 72
-XkbMapNotifyEvent.vmods 76
-XkbMapNotifyEvent 80
-XGCValues.function 0
-XGCValues.plane_mask 4
-XGCValues.foreground 8
-XGCValues.background 12
-XGCValues.line_width 16
-XGCValues.line_style 20
-XGCValues.cap_style 24
-XGCValues.join_style 28
-XGCValues.fill_style 32
-XGCValues.fill_rule 36
-XGCValues.arc_mode 40
-XGCValues.tile 44
-XGCValues.stipple 48
-XGCValues.ts_x_origin 52
-XGCValues.ts_y_origin 56
-XGCValues.font 60
-XGCValues.subwindow_mode 64
-XGCValues.graphics_exposures 68
-XGCValues.clip_x_origin 72
-XGCValues.clip_y_origin 76
-XGCValues.clip_mask 80
-XGCValues.dash_offset 84
-XGCValues.dashes 88
-XGCValues 92
-XFocusChangeEvent.type 0
-XFocusChangeEvent.serial 4
-XFocusChangeEvent.send_event 8
-XFocusChangeEvent.display 12
-XFocusChangeEvent.window 16
-XFocusChangeEvent.mode 20
-XFocusChangeEvent.detail 24
-XFocusChangeEvent 28
-XPixmapFormatValues.depth 0
-XPixmapFormatValues.bits_per_pixel 4
-XPixmapFormatValues.scanline_pad 8
-XPixmapFormatValues 12
-XMapEvent.type 0
-XMapEvent.serial 4
-XMapEvent.send_event 8
-XMapEvent.display 12
-XMapEvent.event 16
-XMapEvent.window 20
-XMapEvent.override_redirect 24
-XMapEvent 28
-XkbBellNotifyEvent.type 0
-XkbBellNotifyEvent.serial 4
-XkbBellNotifyEvent.send_event 8
-XkbBellNotifyEvent.display 12
-XkbBellNotifyEvent.time 16
-XkbBellNotifyEvent.xkb_type 20
-XkbBellNotifyEvent.device 24
-XkbBellNotifyEvent.percent 28
-XkbBellNotifyEvent.pitch 32
-XkbBellNotifyEvent.duration 36
-XkbBellNotifyEvent.bell_class 40
-XkbBellNotifyEvent.bell_id 44
-XkbBellNotifyEvent.name 48
-XkbBellNotifyEvent.window 52
-XkbBellNotifyEvent.event_only 56
-XkbBellNotifyEvent 60
-XIMStringConversionText.length 0
-XIMStringConversionText.feedback 4
-XIMStringConversionText.encoding_is_wchar 8
-XIMStringConversionText.string 12
-XIMStringConversionText 16
-XKeyboardState.key_click_percent 0
-XKeyboardState.bell_percent 4
-XKeyboardState.bell_pitch 8
-XKeyboardState.bell_duration 12
-XKeyboardState.led_mask 16
-XKeyboardState.global_auto_repeat 20
-XKeyboardState.auto_repeats 24
-XKeyboardState 56
-XkbEvent.type 0
-XkbEvent.any 0
-XkbEvent.new_kbd 0
-XkbEvent.map 0
-XkbEvent.state 0
-XkbEvent.ctrls 0
-XkbEvent.indicators 0
-XkbEvent.names 0
-XkbEvent.compat 0
-XkbEvent.bell 0
-XkbEvent.message 0
-XkbEvent.accessx 0
-XkbEvent.device 0
-XkbEvent.core 0
-XkbEvent 96
-XPoint.x 0
-XPoint.y 2
-XPoint 4
-XSegment.x1 0
-XSegment.y1 2
-XSegment.x2 4
-XSegment.y2 6
-XSegment 8
-XIconSize.min_width 0
-XIconSize.min_height 4
-XIconSize.max_width 8
-XIconSize.max_height 12
-XIconSize.width_inc 16
-XIconSize.height_inc 20
-XIconSize 24
-XIMCallback.client_data 0
-XIMCallback.callback 4
-XIMCallback 8
-XConfigureEvent.type 0
-XConfigureEvent.serial 4
-XConfigureEvent.send_event 8
-XConfigureEvent.display 12
-XConfigureEvent.event 16
-XConfigureEvent.window 20
-XConfigureEvent.x 24
-XConfigureEvent.y 28
-XConfigureEvent.width 32
-XConfigureEvent.height 36
-XConfigureEvent.border_width 40
-XConfigureEvent.above 44
-XConfigureEvent.override_redirect 48
-XConfigureEvent 52
-XRectangle.x 0
-XRectangle.y 2
-XRectangle.width 4
-XRectangle.height 6
-XRectangle 8
-XkbNamesNotifyEvent.type 0
-XkbNamesNotifyEvent.serial 4
-XkbNamesNotifyEvent.send_event 8
-XkbNamesNotifyEvent.display 12
-XkbNamesNotifyEvent.time 16
-XkbNamesNotifyEvent.xkb_type 20
-XkbNamesNotifyEvent.device 24
-XkbNamesNotifyEvent.changed 28
-XkbNamesNotifyEvent.first_type 32
-XkbNamesNotifyEvent.num_types 36
-XkbNamesNotifyEvent.first_lvl 40
-XkbNamesNotifyEvent.num_lvls 44
-XkbNamesNotifyEvent.num_aliases 48
-XkbNamesNotifyEvent.num_radio_groups 52
-XkbNamesNotifyEvent.changed_vmods 56
-XkbNamesNotifyEvent.changed_groups 60
-XkbNamesNotifyEvent.changed_indicators 64
-XkbNamesNotifyEvent.first_key 68
-XkbNamesNotifyEvent.num_keys 72
-XkbNamesNotifyEvent 76
-XCreateWindowEvent.type 0
-XCreateWindowEvent.serial 4
-XCreateWindowEvent.send_event 8
-XCreateWindowEvent.display 12
-XCreateWindowEvent.parent 16
-XCreateWindowEvent.window 20
-XCreateWindowEvent.x 24
-XCreateWindowEvent.y 28
-XCreateWindowEvent.width 32
-XCreateWindowEvent.height 36
-XCreateWindowEvent.border_width 40
-XCreateWindowEvent.override_redirect 44
-XCreateWindowEvent 48
-XVisibilityEvent.type 0
-XVisibilityEvent.serial 4
-XVisibilityEvent.send_event 8
-XVisibilityEvent.display 12
-XVisibilityEvent.window 16
-XVisibilityEvent.state 20
-XVisibilityEvent 24
-XWMHints.flags 0
-XWMHints.initial_state 8
-XWMHints.icon_pixmap 12
-XWMHints.icon_window 16
-XWMHints.icon_x 20
-XWMHints.icon_y 24
-XWMHints.icon_mask 28
-XWMHints.input 4
-XWMHints.window_group 32
-XWMHints 36
-XCrossingEvent.type 0
-XCrossingEvent.serial 4
-XCrossingEvent.send_event 8
-XCrossingEvent.display 12
-XCrossingEvent.window 16
-XCrossingEvent.root 20
-XCrossingEvent.subwindow 24
-XCrossingEvent.time 28
-XCrossingEvent.x 32
-XCrossingEvent.y 36
-XCrossingEvent.x_root 40
-XCrossingEvent.y_root 44
-XCrossingEvent.mode 48
-XCrossingEvent.detail 52
-XCrossingEvent.same_screen 56
-XCrossingEvent.focus 60
-XCrossingEvent.state 64
-XCrossingEvent 68
-XSelectionRequestEvent.type 0
-XSelectionRequestEvent.serial 4
-XSelectionRequestEvent.send_event 8
-XSelectionRequestEvent.display 12
-XSelectionRequestEvent.owner 16
-XSelectionRequestEvent.requestor 20
-XSelectionRequestEvent.selection 24
-XSelectionRequestEvent.target 28
-XSelectionRequestEvent.property 32
-XSelectionRequestEvent.time 36
-XSelectionRequestEvent 40
-XNoExposeEvent.type 0
-XNoExposeEvent.serial 4
-XNoExposeEvent.send_event 8
-XNoExposeEvent.display 12
-XNoExposeEvent.drawable 16
-XNoExposeEvent.major_code 20
-XNoExposeEvent.minor_code 24
-XNoExposeEvent 28
-XHostAddress.family 0
-XHostAddress.length 4
-XHostAddress.address 8
-XHostAddress 12
-XColormapEvent.type 0
-XColormapEvent.serial 4
-XColormapEvent.send_event 8
-XColormapEvent.display 12
-XColormapEvent.window 16
-XColormapEvent.colormap 20
-XColormapEvent.new 24
-XColormapEvent.state 28
-XColormapEvent 32
-ColorEntry.r 0
-ColorEntry.g 1
-ColorEntry.b 2
-ColorEntry.flags 3
-ColorEntry 4
-XResizeRequestEvent.type 0
-XResizeRequestEvent.serial 4
-XResizeRequestEvent.send_event 8
-XResizeRequestEvent.display 12
-XResizeRequestEvent.window 16
-XResizeRequestEvent.width 20
-XResizeRequestEvent.height 24
-XResizeRequestEvent 28
-Depth.depth 0
-Depth.nvisuals 4
-Depth.visuals 8
-Depth 12
-XPropertyEvent.type 0
-XPropertyEvent.serial 4
-XPropertyEvent.send_event 8
-XPropertyEvent.display 12
-XPropertyEvent.window 16
-XPropertyEvent.atom 20
-XPropertyEvent.time 24
-XPropertyEvent.state 28
-XPropertyEvent 32
-XDestroyWindowEvent.type 0
-XDestroyWindowEvent.serial 4
-XDestroyWindowEvent.send_event 8
-XDestroyWindowEvent.display 12
-XDestroyWindowEvent.event 16
-XDestroyWindowEvent.window 20
-XDestroyWindowEvent 24
-XStandardColormap.colormap 0
-XStandardColormap.red_max 4
-XStandardColormap.red_mult 8
-XStandardColormap.green_max 12
-XStandardColormap.green_mult 16
-XStandardColormap.blue_max 20
-XStandardColormap.blue_mult 24
-XStandardColormap.base_pixel 28
-XStandardColormap.visualid 32
-XStandardColormap.killid 36
-XStandardColormap 40
-XComposeStatus.compose_ptr 0
-XComposeStatus.chars_matched 4
-XComposeStatus 8
-AwtGraphicsConfigData.awt_depth 0
-AwtGraphicsConfigData.awt_cmap 4
-AwtGraphicsConfigData.awt_visInfo 8
-AwtGraphicsConfigData.awt_num_colors 48
-AwtGraphicsConfigData.awtImage 52
-AwtGraphicsConfigData.AwtColorMatch 56
-AwtGraphicsConfigData.monoImage 60
-AwtGraphicsConfigData.monoPixmap 64
-AwtGraphicsConfigData.monoPixmapWidth 68
-AwtGraphicsConfigData.monoPixmapHeight 72
-AwtGraphicsConfigData.monoPixmapGC 76
-AwtGraphicsConfigData.pixelStride 80
-AwtGraphicsConfigData.color_data 84
-AwtGraphicsConfigData.glxInfo 88
-AwtGraphicsConfigData.isTranslucencySupported 92
-AwtGraphicsConfigData.renderPictFormat 96
-AwtGraphicsConfigData 128
-XColor.pixel 0
-XColor.red 4
-XColor.green 6
-XColor.blue 8
-XColor.flags 10
-XColor.pad 11
-XColor 12
-XTextProperty.value 0
-XTextProperty.encoding 4
-XTextProperty.format 8
-XTextProperty.nitems 12
-XTextProperty 16
--- a/make/data/x11wrappergen/sizes.64 Thu Mar 01 16:35:36 2018 -0500
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,1017 +0,0 @@
-long 8
-int 4
-short 2
-ptr 8
-Bool 4
-Atom 8
-Window 8
-XExtData.number 0
-XExtData.next 8
-XExtData.free_private 16
-XExtData.private_data 24
-XExtData 32
-XIMStringConversionCallbackStruct.position 0
-XIMStringConversionCallbackStruct.direction 4
-XIMStringConversionCallbackStruct.operation 8
-XIMStringConversionCallbackStruct.factor 10
-XIMStringConversionCallbackStruct.text 16
-XIMStringConversionCallbackStruct 24
-XkbNewKeyboardNotifyEvent.type 0
-XkbNewKeyboardNotifyEvent.serial 8
-XkbNewKeyboardNotifyEvent.send_event 16
-XkbNewKeyboardNotifyEvent.display 24
-XkbNewKeyboardNotifyEvent.time 32
-XkbNewKeyboardNotifyEvent.xkb_type 40
-XkbNewKeyboardNotifyEvent.device 44
-XkbNewKeyboardNotifyEvent.old_device 48
-XkbNewKeyboardNotifyEvent.min_key_code 52
-XkbNewKeyboardNotifyEvent.max_key_code 56
-XkbNewKeyboardNotifyEvent.old_min_key_code 60
-XkbNewKeyboardNotifyEvent.old_max_key_code 64
-XkbNewKeyboardNotifyEvent.changed 68
-XkbNewKeyboardNotifyEvent.req_major 72
-XkbNewKeyboardNotifyEvent.req_minor 73
-XkbNewKeyboardNotifyEvent 80
-XTimeCoord.time 0
-XTimeCoord.x 8
-XTimeCoord.y 10
-XTimeCoord 16
-XkbCompatMapNotifyEvent.type 0
-XkbCompatMapNotifyEvent.serial 8
-XkbCompatMapNotifyEvent.send_event 16
-XkbCompatMapNotifyEvent.display 24
-XkbCompatMapNotifyEvent.time 32
-XkbCompatMapNotifyEvent.xkb_type 40
-XkbCompatMapNotifyEvent.device 44
-XkbCompatMapNotifyEvent.changed_groups 48
-XkbCompatMapNotifyEvent.first_si 52
-XkbCompatMapNotifyEvent.num_si 56
-XkbCompatMapNotifyEvent.num_total_si 60
-XkbCompatMapNotifyEvent 64
-XIMStatusDrawCallbackStruct.type 0
-XIMStatusDrawCallbackStruct.data 8
-XIMStatusDrawCallbackStruct 16
-XKeyboardControl.key_click_percent 0
-XKeyboardControl.bell_percent 4
-XKeyboardControl.bell_pitch 8
-XKeyboardControl.bell_duration 12
-XKeyboardControl.led 16
-XKeyboardControl.led_mode 20
-XKeyboardControl.key 24
-XKeyboardControl.auto_repeat_mode 28
-XKeyboardControl 32
-XSelectionClearEvent.type 0
-XSelectionClearEvent.serial 8
-XSelectionClearEvent.send_event 16
-XSelectionClearEvent.display 24
-XSelectionClearEvent.window 32
-XSelectionClearEvent.selection 40
-XSelectionClearEvent.time 48
-XSelectionClearEvent 56
-XWindowChanges.x 0
-XWindowChanges.y 4
-XWindowChanges.width 8
-XWindowChanges.height 12
-XWindowChanges.border_width 16
-XWindowChanges.sibling 24
-XWindowChanges.stack_mode 32
-XWindowChanges 40
-XIMPreeditCaretCallbackStruct.position 0
-XIMPreeditCaretCallbackStruct.direction 4
-XIMPreeditCaretCallbackStruct.style 8
-XIMPreeditCaretCallbackStruct 12
-XOMCharSetList.charset_count 0
-XOMCharSetList.charset_list 8
-XOMCharSetList 16
-XOMFontInfo.num_font 0
-XOMFontInfo.font_struct_list 8
-XOMFontInfo.font_name_list 16
-XOMFontInfo 24
-AwtScreenData.numConfigs 0
-AwtScreenData.root 8
-AwtScreenData.whitepixel 16
-AwtScreenData.blackpixel 24
-AwtScreenData.defaultConfig 32
-AwtScreenData.configs 40
-AwtScreenData 48
-XIMHotKeyTrigger.keysym 0
-XIMHotKeyTrigger.modifier 8
-XIMHotKeyTrigger.modifier_mask 12
-XIMHotKeyTrigger 16
-XCirculateEvent.type 0
-XCirculateEvent.serial 8
-XCirculateEvent.send_event 16
-XCirculateEvent.display 24
-XCirculateEvent.event 32
-XCirculateEvent.window 40
-XCirculateEvent.place 48
-XCirculateEvent 56
-Screen.ext_data 0
-Screen.display 8
-Screen.root 16
-Screen.width 24
-Screen.height 28
-Screen.mwidth 32
-Screen.mheight 36
-Screen.ndepths 40
-Screen.depths 48
-Screen.root_depth 56
-Screen.root_visual 64
-Screen.default_gc 72
-Screen.cmap 80
-Screen.white_pixel 88
-Screen.black_pixel 96
-Screen.max_maps 104
-Screen.min_maps 108
-Screen.backing_store 112
-Screen.save_unders 116
-Screen.root_input_mask 120
-Screen 128
-XMapRequestEvent.type 0
-XMapRequestEvent.serial 8
-XMapRequestEvent.send_event 16
-XMapRequestEvent.display 24
-XMapRequestEvent.parent 32
-XMapRequestEvent.window 40
-XMapRequestEvent 48
-XIMText.length 0
-XIMText.feedback 8
-XIMText.encoding_is_wchar 16
-XIMText.string 24
-XIMText 32
-XGraphicsExposeEvent.type 0
-XGraphicsExposeEvent.serial 8
-XGraphicsExposeEvent.send_event 16
-XGraphicsExposeEvent.display 24
-XGraphicsExposeEvent.drawable 32
-XGraphicsExposeEvent.x 40
-XGraphicsExposeEvent.y 44
-XGraphicsExposeEvent.width 48
-XGraphicsExposeEvent.height 52
-XGraphicsExposeEvent.count 56
-XGraphicsExposeEvent.major_code 60
-XGraphicsExposeEvent.minor_code 64
-XGraphicsExposeEvent 72
-XEvent.type 0
-XEvent.xany 0
-XEvent.xkey 0
-XEvent.xbutton 0
-XEvent.xmotion 0
-XEvent.xcrossing 0
-XEvent.xfocus 0
-XEvent.xexpose 0
-XEvent.xgraphicsexpose 0
-XEvent.xnoexpose 0
-XEvent.xvisibility 0
-XEvent.xcreatewindow 0
-XEvent.xdestroywindow 0
-XEvent.xunmap 0
-XEvent.xmap 0
-XEvent.xmaprequest 0
-XEvent.xreparent 0
-XEvent.xconfigure 0
-XEvent.xgravity 0
-XEvent.xresizerequest 0
-XEvent.xconfigurerequest 0
-XEvent.xcirculate 0
-XEvent.xcirculaterequest 0
-XEvent.xproperty 0
-XEvent.xselectionclear 0
-XEvent.xselectionrequest 0
-XEvent.xselection 0
-XEvent.xcolormap 0
-XEvent.xclient 0
-XEvent.xmapping 0
-XEvent.xerror 0
-XEvent.xkeymap 0
-XEvent.pad 0
-XEvent 192
-XRenderDirectFormat.red 0
-XRenderDirectFormat.redMask 2
-XRenderDirectFormat.green 4
-XRenderDirectFormat.greenMask 6
-XRenderDirectFormat.blue 8
-XRenderDirectFormat.blueMask 10
-XRenderDirectFormat.alpha 12
-XRenderDirectFormat.alphaMask 14
-XRenderDirectFormat 16
-ColorData.awt_Colors 0
-ColorData.awt_numICMcolors 8
-ColorData.awt_icmLUT 16
-ColorData.awt_icmLUT2Colors 24
-ColorData.img_grays 32
-ColorData.img_clr_tbl 40
-ColorData.img_oda_red 48
-ColorData.img_oda_green 56
-ColorData.img_oda_blue 64
-ColorData.pGrayInverseLutData 72
-ColorData.screendata 80
-ColorData.representsPrimaries 84
-ColorData 88
-XFontStruct.ext_data 0
-XFontStruct.fid 8
-XFontStruct.direction 16
-XFontStruct.min_char_or_byte2 20
-XFontStruct.max_char_or_byte2 24
-XFontStruct.min_byte1 28
-XFontStruct.max_byte1 32
-XFontStruct.all_chars_exist 36
-XFontStruct.n_properties 44
-XFontStruct.properties 48
-XFontStruct.min_bounds 56
-XFontStruct.max_bounds 68
-XFontStruct.per_char 80
-XFontStruct.ascent 88
-XFontStruct.descent 92
-XFontStruct 96
-XExtCodes.extension 0
-XExtCodes.major_opcode 4
-XExtCodes.first_event 8
-XExtCodes.first_error 12
-XExtCodes 16
-XFontSetExtents.max_ink_extent 0
-XFontSetExtents.max_logical_extent 8
-XFontSetExtents 16
-XSelectionEvent.type 0
-XSelectionEvent.serial 8
-XSelectionEvent.send_event 16
-XSelectionEvent.display 24
-XSelectionEvent.requestor 32
-XSelectionEvent.selection 40
-XSelectionEvent.target 48
-XSelectionEvent.property 56
-XSelectionEvent.time 64
-XSelectionEvent 72
-XArc.x 0
-XArc.y 2
-XArc.width 4
-XArc.height 6
-XArc.angle1 8
-XArc.angle2 10
-XArc 12
-XErrorEvent.type 0
-XErrorEvent.display 8
-XErrorEvent.resourceid 16
-XErrorEvent.serial 24
-XErrorEvent.error_code 32
-XErrorEvent.request_code 33
-XErrorEvent.minor_code 34
-XErrorEvent 40
-XConfigureRequestEvent.type 0
-XConfigureRequestEvent.serial 8
-XConfigureRequestEvent.send_event 16
-XConfigureRequestEvent.display 24
-XConfigureRequestEvent.parent 32
-XConfigureRequestEvent.window 40
-XConfigureRequestEvent.x 48
-XConfigureRequestEvent.y 52
-XConfigureRequestEvent.width 56
-XConfigureRequestEvent.height 60
-XConfigureRequestEvent.border_width 64
-XConfigureRequestEvent.above 72
-XConfigureRequestEvent.detail 80
-XConfigureRequestEvent.value_mask 88
-XConfigureRequestEvent 96
-ScreenFormat.ext_data 0
-ScreenFormat.depth 8
-ScreenFormat.bits_per_pixel 12
-ScreenFormat.scanline_pad 16
-ScreenFormat 24
-XButtonEvent.type 0
-XButtonEvent.serial 8
-XButtonEvent.send_event 16
-XButtonEvent.display 24
-XButtonEvent.window 32
-XButtonEvent.root 40
-XButtonEvent.subwindow 48
-XButtonEvent.time 56
-XButtonEvent.x 64
-XButtonEvent.y 68
-XButtonEvent.x_root 72
-XButtonEvent.y_root 76
-XButtonEvent.state 80
-XButtonEvent.button 84
-XButtonEvent.same_screen 88
-XButtonEvent 96
-XFontProp.name 0
-XFontProp.card32 8
-XFontProp 16
-XIMValuesList.count_values 0
-XIMValuesList.supported_values 8
-XIMValuesList 16
-XKeymapEvent.type 0
-XKeymapEvent.serial 8
-XKeymapEvent.send_event 16
-XKeymapEvent.display 24
-XKeymapEvent.window 32
-XKeymapEvent.key_vector 40
-XKeymapEvent 72
-XTextItem16.chars 0
-XTextItem16.nchars 8
-XTextItem16.delta 12
-XTextItem16.font 16
-XTextItem16 24
-XIMPreeditDrawCallbackStruct.caret 0
-XIMPreeditDrawCallbackStruct.chg_first 4
-XIMPreeditDrawCallbackStruct.chg_length 8
-XIMPreeditDrawCallbackStruct.text 16
-XIMPreeditDrawCallbackStruct 24
-XVisualInfo.visual 0
-XVisualInfo.visualid 8
-XVisualInfo.screen 16
-XVisualInfo.depth 20
-XVisualInfo.class 24
-XVisualInfo.red_mask 32
-XVisualInfo.green_mask 40
-XVisualInfo.blue_mask 48
-XVisualInfo.colormap_size 56
-XVisualInfo.bits_per_rgb 60
-XVisualInfo 64
-XkbControlsNotifyEvent.type 0
-XkbControlsNotifyEvent.serial 8
-XkbControlsNotifyEvent.send_event 16
-XkbControlsNotifyEvent.display 24
-XkbControlsNotifyEvent.time 32
-XkbControlsNotifyEvent.xkb_type 40
-XkbControlsNotifyEvent.device 44
-XkbControlsNotifyEvent.changed_ctrls 48
-XkbControlsNotifyEvent.enabled_ctrls 52
-XkbControlsNotifyEvent.enabled_ctrl_changes 56
-XkbControlsNotifyEvent.num_groups 60
-XkbControlsNotifyEvent.keycode 64
-XkbControlsNotifyEvent.event_type 65
-XkbControlsNotifyEvent.req_major 66
-XkbControlsNotifyEvent.req_minor 67
-XkbControlsNotifyEvent 72
-PropMwmHints.flags 0
-PropMwmHints.functions 8
-PropMwmHints.decorations 16
-PropMwmHints.inputMode 24
-PropMwmHints.status 32
-PropMwmHints 40
-XClientMessageEvent.type 0
-XClientMessageEvent.serial 8
-XClientMessageEvent.send_event 16
-XClientMessageEvent.display 24
-XClientMessageEvent.window 32
-XClientMessageEvent.message_type 40
-XClientMessageEvent.format 48
-XClientMessageEvent.data 56
-XClientMessageEvent 96
-XAnyEvent.type 0
-XAnyEvent.serial 8
-XAnyEvent.send_event 16
-XAnyEvent.display 24
-XAnyEvent.window 32
-XAnyEvent 40
-XkbIndicatorNotifyEvent.type 0
-XkbIndicatorNotifyEvent.serial 8
-XkbIndicatorNotifyEvent.send_event 16
-XkbIndicatorNotifyEvent.display 24
-XkbIndicatorNotifyEvent.time 32
-XkbIndicatorNotifyEvent.xkb_type 40
-XkbIndicatorNotifyEvent.device 44
-XkbIndicatorNotifyEvent.changed 48
-XkbIndicatorNotifyEvent.state 52
-XkbIndicatorNotifyEvent 56
-XIMPreeditStateNotifyCallbackStruct.state 0
-XIMPreeditStateNotifyCallbackStruct 8
-XkbAnyEvent.type 0
-XkbAnyEvent.serial 8
-XkbAnyEvent.send_event 16
-XkbAnyEvent.display 24
-XkbAnyEvent.time 32
-XkbAnyEvent.xkb_type 40
-XkbAnyEvent.device 44
-XkbAnyEvent 48
-XMotionEvent.type 0
-XMotionEvent.serial 8
-XMotionEvent.send_event 16
-XMotionEvent.display 24
-XMotionEvent.window 32
-XMotionEvent.root 40
-XMotionEvent.subwindow 48
-XMotionEvent.time 56
-XMotionEvent.x 64
-XMotionEvent.y 68
-XMotionEvent.x_root 72
-XMotionEvent.y_root 76
-XMotionEvent.state 80
-XMotionEvent.is_hint 84
-XMotionEvent.same_screen 88
-XMotionEvent 96
-XIMHotKeyTriggers.num_hot_key 0
-XIMHotKeyTriggers.key 8
-XIMHotKeyTriggers 16
-XIMStyles.count_styles 0
-XIMStyles.supported_styles 8
-XIMStyles 16
-XkbExtensionDeviceNotifyEvent.type 0
-XkbExtensionDeviceNotifyEvent.serial 8
-XkbExtensionDeviceNotifyEvent.send_event 16
-XkbExtensionDeviceNotifyEvent.display 24
-XkbExtensionDeviceNotifyEvent.time 32
-XkbExtensionDeviceNotifyEvent.xkb_type 40
-XkbExtensionDeviceNotifyEvent.device 44
-XkbExtensionDeviceNotifyEvent.reason 48
-XkbExtensionDeviceNotifyEvent.supported 52
-XkbExtensionDeviceNotifyEvent.unsupported 56
-XkbExtensionDeviceNotifyEvent.first_btn 60
-XkbExtensionDeviceNotifyEvent.num_btns 64
-XkbExtensionDeviceNotifyEvent.leds_defined 68
-XkbExtensionDeviceNotifyEvent.led_state 72
-XkbExtensionDeviceNotifyEvent.led_class 76
-XkbExtensionDeviceNotifyEvent.led_id 80
-XkbExtensionDeviceNotifyEvent 88
-XwcTextItem.chars 0
-XwcTextItem.nchars 8
-XwcTextItem.delta 12
-XwcTextItem.font_set 16
-XwcTextItem 24
-XClassHint.res_name 0
-XClassHint.res_class 8
-XClassHint 16
-XChar2b.byte1 0
-XChar2b.byte2 1
-XChar2b 2
-XSetWindowAttributes.background_pixmap 0
-XSetWindowAttributes.background_pixel 8
-XSetWindowAttributes.border_pixmap 16
-XSetWindowAttributes.border_pixel 24
-XSetWindowAttributes.bit_gravity 32
-XSetWindowAttributes.win_gravity 36
-XSetWindowAttributes.backing_store 40
-XSetWindowAttributes.backing_planes 48
-XSetWindowAttributes.backing_pixel 56
-XSetWindowAttributes.save_under 64
-XSetWindowAttributes.event_mask 72
-XSetWindowAttributes.do_not_propagate_mask 80
-XSetWindowAttributes.override_redirect 88
-XSetWindowAttributes.colormap 96
-XSetWindowAttributes.cursor 104
-XSetWindowAttributes 112
-XRenderPictFormat.id 0
-XRenderPictFormat.type 8
-XRenderPictFormat.depth 12
-XRenderPictFormat.direct 16
-XRenderPictFormat.colormap 32
-XRenderPictFormat 40
-XReparentEvent.type 0
-XReparentEvent.serial 8
-XReparentEvent.send_event 16
-XReparentEvent.display 24
-XReparentEvent.event 32
-XReparentEvent.window 40
-XReparentEvent.parent 48
-XReparentEvent.x 56
-XReparentEvent.y 60
-XReparentEvent.override_redirect 64
-XReparentEvent 72
-XCirculateRequestEvent.type 0
-XCirculateRequestEvent.serial 8
-XCirculateRequestEvent.send_event 16
-XCirculateRequestEvent.display 24
-XCirculateRequestEvent.parent 32
-XCirculateRequestEvent.window 40
-XCirculateRequestEvent.place 48
-XCirculateRequestEvent 56
-XImage.width 0
-XImage.height 4
-XImage.xoffset 8
-XImage.format 12
-XImage.data 16
-XImage.byte_order 24
-XImage.bitmap_unit 28
-XImage.bitmap_bit_order 32
-XImage.bitmap_pad 36
-XImage.depth 40
-XImage.bytes_per_line 44
-XImage.bits_per_pixel 48
-XImage.red_mask 56
-XImage.green_mask 64
-XImage.blue_mask 72
-XImage.obdata 80
-XImage.f.create_image 88
-XImage.f.destroy_image 96
-XImage.f.get_pixel 104
-XImage.f.put_pixel 112
-XImage.f.sub_image 120
-XImage.f.add_pixel 128
-XImage 136
-XKeyEvent.type 0
-XKeyEvent.serial 8
-XKeyEvent.send_event 16
-XKeyEvent.display 24
-XKeyEvent.window 32
-XKeyEvent.root 40
-XKeyEvent.subwindow 48
-XKeyEvent.time 56
-XKeyEvent.x 64
-XKeyEvent.y 68
-XKeyEvent.x_root 72
-XKeyEvent.y_root 76
-XKeyEvent.state 80
-XKeyEvent.keycode 84
-XKeyEvent.same_screen 88
-XKeyEvent 96
-XkbActionMessageEvent.type 0
-XkbActionMessageEvent.serial 8
-XkbActionMessageEvent.send_event 16
-XkbActionMessageEvent.display 24
-XkbActionMessageEvent.time 32
-XkbActionMessageEvent.xkb_type 40
-XkbActionMessageEvent.device 44
-XkbActionMessageEvent.keycode 48
-XkbActionMessageEvent.press 52
-XkbActionMessageEvent.key_event_follows 56
-XkbActionMessageEvent.group 60
-XkbActionMessageEvent.mods 64
-XkbActionMessageEvent.message 68
-XkbActionMessageEvent 80
-XdbeSwapInfo.swap_window 0
-XdbeSwapInfo.swap_action 8
-XdbeSwapInfo 16
-XTextItem.chars 0
-XTextItem.nchars 8
-XTextItem.delta 12
-XTextItem.font 16
-XTextItem 24
-XModifierKeymap.max_keypermod 0
-XModifierKeymap.modifiermap 8
-XModifierKeymap 16
-XCharStruct.lbearing 0
-XCharStruct.rbearing 2
-XCharStruct.width 4
-XCharStruct.ascent 6
-XCharStruct.descent 8
-XCharStruct.attributes 10
-XCharStruct 12
-XGravityEvent.type 0
-XGravityEvent.serial 8
-XGravityEvent.send_event 16
-XGravityEvent.display 24
-XGravityEvent.event 32
-XGravityEvent.window 40
-XGravityEvent.x 48
-XGravityEvent.y 52
-XGravityEvent 56
-Visual.ext_data 0
-Visual.visualid 8
-Visual.class 16
-Visual.red_mask 24
-Visual.green_mask 32
-Visual.blue_mask 40
-Visual.bits_per_rgb 48
-Visual.map_entries 52
-Visual 56
-XOMOrientation.num_orientation 0
-XOMOrientation.orientation 8
-XOMOrientation 16
-XkbAccessXNotifyEvent.type 0
-XkbAccessXNotifyEvent.serial 8
-XkbAccessXNotifyEvent.send_event 16
-XkbAccessXNotifyEvent.display 24
-XkbAccessXNotifyEvent.time 32
-XkbAccessXNotifyEvent.xkb_type 40
-XkbAccessXNotifyEvent.device 44
-XkbAccessXNotifyEvent.detail 48
-XkbAccessXNotifyEvent.keycode 52
-XkbAccessXNotifyEvent.sk_delay 56
-XkbAccessXNotifyEvent.debounce_delay 60
-XkbAccessXNotifyEvent 64
-XWindowAttributes.x 0
-XWindowAttributes.y 4
-XWindowAttributes.width 8
-XWindowAttributes.height 12
-XWindowAttributes.border_width 16
-XWindowAttributes.depth 20
-XWindowAttributes.visual 24
-XWindowAttributes.root 32
-XWindowAttributes.class 40
-XWindowAttributes.bit_gravity 44
-XWindowAttributes.win_gravity 48
-XWindowAttributes.backing_store 52
-XWindowAttributes.backing_planes 56
-XWindowAttributes.backing_pixel 64
-XWindowAttributes.save_under 72
-XWindowAttributes.colormap 80
-XWindowAttributes.map_installed 88
-XWindowAttributes.map_state 92
-XWindowAttributes.all_event_masks 96
-XWindowAttributes.your_event_mask 104
-XWindowAttributes.do_not_propagate_mask 112
-XWindowAttributes.override_redirect 120
-XWindowAttributes.screen 128
-XWindowAttributes 136
-XmbTextItem.chars 0
-XmbTextItem.nchars 8
-XmbTextItem.delta 12
-XmbTextItem.font_set 16
-XmbTextItem 24
-XMappingEvent.type 0
-XMappingEvent.serial 8
-XMappingEvent.send_event 16
-XMappingEvent.display 24
-XMappingEvent.window 32
-XMappingEvent.request 40
-XMappingEvent.first_keycode 44
-XMappingEvent.count 48
-XMappingEvent 56
-XSizeHints.flags 0
-XSizeHints.x 8
-XSizeHints.y 12
-XSizeHints.width 16
-XSizeHints.height 20
-XSizeHints.min_width 24
-XSizeHints.min_height 28
-XSizeHints.max_width 32
-XSizeHints.max_height 36
-XSizeHints.width_inc 40
-XSizeHints.height_inc 44
-XSizeHints.min_aspect.x 48
-XSizeHints.min_aspect.y 52
-XSizeHints.max_aspect.x 56
-XSizeHints.max_aspect.y 60
-XSizeHints.base_width 64
-XSizeHints.base_height 68
-XSizeHints.win_gravity 72
-XSizeHints 80
-XUnmapEvent.type 0
-XUnmapEvent.serial 8
-XUnmapEvent.send_event 16
-XUnmapEvent.display 24
-XUnmapEvent.event 32
-XUnmapEvent.window 40
-XUnmapEvent.from_configure 48
-XUnmapEvent 56
-awtImageData.Depth 0
-awtImageData.wsImageFormat 4
-awtImageData.clrdata 16
-awtImageData.convert 48
-awtImageData 560
-XkbStateNotifyEvent.type 0
-XkbStateNotifyEvent.serial 8
-XkbStateNotifyEvent.send_event 16
-XkbStateNotifyEvent.display 24
-XkbStateNotifyEvent.time 32
-XkbStateNotifyEvent.xkb_type 40
-XkbStateNotifyEvent.device 44
-XkbStateNotifyEvent.changed 48
-XkbStateNotifyEvent.group 52
-XkbStateNotifyEvent.base_group 56
-XkbStateNotifyEvent.latched_group 60
-XkbStateNotifyEvent.locked_group 64
-XkbStateNotifyEvent.mods 68
-XkbStateNotifyEvent.base_mods 72
-XkbStateNotifyEvent.latched_mods 76
-XkbStateNotifyEvent.locked_mods 80
-XkbStateNotifyEvent.compat_state 84
-XkbStateNotifyEvent.grab_mods 88
-XkbStateNotifyEvent.compat_grab_mods 89
-XkbStateNotifyEvent.lookup_mods 90
-XkbStateNotifyEvent.compat_lookup_mods 91
-XkbStateNotifyEvent.ptr_buttons 92
-XkbStateNotifyEvent.keycode 96
-XkbStateNotifyEvent.event_type 97
-XkbStateNotifyEvent.req_major 98
-XkbStateNotifyEvent.req_minor 99
-XkbStateNotifyEvent 104
-XExposeEvent.type 0
-XExposeEvent.serial 8
-XExposeEvent.send_event 16
-XExposeEvent.display 24
-XExposeEvent.window 32
-XExposeEvent.x 40
-XExposeEvent.y 44
-XExposeEvent.width 48
-XExposeEvent.height 52
-XExposeEvent.count 56
-XExposeEvent 64
-XkbMapNotifyEvent.type 0
-XkbMapNotifyEvent.serial 8
-XkbMapNotifyEvent.send_event 16
-XkbMapNotifyEvent.display 24
-XkbMapNotifyEvent.time 32
-XkbMapNotifyEvent.xkb_type 40
-XkbMapNotifyEvent.device 44
-XkbMapNotifyEvent.changed 48
-XkbMapNotifyEvent.flags 52
-XkbMapNotifyEvent.first_type 56
-XkbMapNotifyEvent.num_types 60
-XkbMapNotifyEvent.min_key_code 64
-XkbMapNotifyEvent.max_key_code 65
-XkbMapNotifyEvent.first_key_sym 66
-XkbMapNotifyEvent.first_key_act 67
-XkbMapNotifyEvent.first_key_behavior 68
-XkbMapNotifyEvent.first_key_explicit 69
-XkbMapNotifyEvent.first_modmap_key 70
-XkbMapNotifyEvent.first_vmodmap_key 71
-XkbMapNotifyEvent.num_key_syms 72
-XkbMapNotifyEvent.num_key_acts 76
-XkbMapNotifyEvent.num_key_behaviors 80
-XkbMapNotifyEvent.num_key_explicit 84
-XkbMapNotifyEvent.num_modmap_keys 88
-XkbMapNotifyEvent.num_vmodmap_keys 92
-XkbMapNotifyEvent.vmods 96
-XkbMapNotifyEvent 104
-XGCValues.function 0
-XGCValues.plane_mask 8
-XGCValues.foreground 16
-XGCValues.background 24
-XGCValues.line_width 32
-XGCValues.line_style 36
-XGCValues.cap_style 40
-XGCValues.join_style 44
-XGCValues.fill_style 48
-XGCValues.fill_rule 52
-XGCValues.arc_mode 56
-XGCValues.tile 64
-XGCValues.stipple 72
-XGCValues.ts_x_origin 80
-XGCValues.ts_y_origin 84
-XGCValues.font 88
-XGCValues.subwindow_mode 96
-XGCValues.graphics_exposures 100
-XGCValues.clip_x_origin 104
-XGCValues.clip_y_origin 108
-XGCValues.clip_mask 112
-XGCValues.dash_offset 120
-XGCValues.dashes 124
-XGCValues 128
-XFocusChangeEvent.type 0
-XFocusChangeEvent.serial 8
-XFocusChangeEvent.send_event 16
-XFocusChangeEvent.display 24
-XFocusChangeEvent.window 32
-XFocusChangeEvent.mode 40
-XFocusChangeEvent.detail 44
-XFocusChangeEvent 48
-XPixmapFormatValues.depth 0
-XPixmapFormatValues.bits_per_pixel 4
-XPixmapFormatValues.scanline_pad 8
-XPixmapFormatValues 12
-XMapEvent.type 0
-XMapEvent.serial 8
-XMapEvent.send_event 16
-XMapEvent.display 24
-XMapEvent.event 32
-XMapEvent.window 40
-XMapEvent.override_redirect 48
-XMapEvent 56
-XkbBellNotifyEvent.type 0
-XkbBellNotifyEvent.serial 8
-XkbBellNotifyEvent.send_event 16
-XkbBellNotifyEvent.display 24
-XkbBellNotifyEvent.time 32
-XkbBellNotifyEvent.xkb_type 40
-XkbBellNotifyEvent.device 44
-XkbBellNotifyEvent.percent 48
-XkbBellNotifyEvent.pitch 52
-XkbBellNotifyEvent.duration 56
-XkbBellNotifyEvent.bell_class 60
-XkbBellNotifyEvent.bell_id 64
-XkbBellNotifyEvent.name 72
-XkbBellNotifyEvent.window 80
-XkbBellNotifyEvent.event_only 88
-XkbBellNotifyEvent 96
-XIMStringConversionText.length 0
-XIMStringConversionText.feedback 8
-XIMStringConversionText.encoding_is_wchar 16
-XIMStringConversionText.string 24
-XIMStringConversionText 32
-XKeyboardState.key_click_percent 0
-XKeyboardState.bell_percent 4
-XKeyboardState.bell_pitch 8
-XKeyboardState.bell_duration 12
-XKeyboardState.led_mask 16
-XKeyboardState.global_auto_repeat 24
-XKeyboardState.auto_repeats 28
-XKeyboardState 64
-XkbEvent.type 0
-XkbEvent.any 0
-XkbEvent.new_kbd 0
-XkbEvent.map 0
-XkbEvent.state 0
-XkbEvent.ctrls 0
-XkbEvent.indicators 0
-XkbEvent.names 0
-XkbEvent.compat 0
-XkbEvent.bell 0
-XkbEvent.message 0
-XkbEvent.accessx 0
-XkbEvent.device 0
-XkbEvent.core 0
-XkbEvent 192
-XPoint.x 0
-XPoint.y 2
-XPoint 4
-XSegment.x1 0
-XSegment.y1 2
-XSegment.x2 4
-XSegment.y2 6
-XSegment 8
-XIconSize.min_width 0
-XIconSize.min_height 4
-XIconSize.max_width 8
-XIconSize.max_height 12
-XIconSize.width_inc 16
-XIconSize.height_inc 20
-XIconSize 24
-XIMCallback.client_data 0
-XIMCallback.callback 8
-XIMCallback 16
-XConfigureEvent.type 0
-XConfigureEvent.serial 8
-XConfigureEvent.send_event 16
-XConfigureEvent.display 24
-XConfigureEvent.event 32
-XConfigureEvent.window 40
-XConfigureEvent.x 48
-XConfigureEvent.y 52
-XConfigureEvent.width 56
-XConfigureEvent.height 60
-XConfigureEvent.border_width 64
-XConfigureEvent.above 72
-XConfigureEvent.override_redirect 80
-XConfigureEvent 88
-XRectangle.x 0
-XRectangle.y 2
-XRectangle.width 4
-XRectangle.height 6
-XRectangle 8
-XkbNamesNotifyEvent.type 0
-XkbNamesNotifyEvent.serial 8
-XkbNamesNotifyEvent.send_event 16
-XkbNamesNotifyEvent.display 24
-XkbNamesNotifyEvent.time 32
-XkbNamesNotifyEvent.xkb_type 40
-XkbNamesNotifyEvent.device 44
-XkbNamesNotifyEvent.changed 48
-XkbNamesNotifyEvent.first_type 52
-XkbNamesNotifyEvent.num_types 56
-XkbNamesNotifyEvent.first_lvl 60
-XkbNamesNotifyEvent.num_lvls 64
-XkbNamesNotifyEvent.num_aliases 68
-XkbNamesNotifyEvent.num_radio_groups 72
-XkbNamesNotifyEvent.changed_vmods 76
-XkbNamesNotifyEvent.changed_groups 80
-XkbNamesNotifyEvent.changed_indicators 84
-XkbNamesNotifyEvent.first_key 88
-XkbNamesNotifyEvent.num_keys 92
-XkbNamesNotifyEvent 96
-XCreateWindowEvent.type 0
-XCreateWindowEvent.serial 8
-XCreateWindowEvent.send_event 16
-XCreateWindowEvent.display 24
-XCreateWindowEvent.parent 32
-XCreateWindowEvent.window 40
-XCreateWindowEvent.x 48
-XCreateWindowEvent.y 52
-XCreateWindowEvent.width 56
-XCreateWindowEvent.height 60
-XCreateWindowEvent.border_width 64
-XCreateWindowEvent.override_redirect 68
-XCreateWindowEvent 72
-XVisibilityEvent.type 0
-XVisibilityEvent.serial 8
-XVisibilityEvent.send_event 16
-XVisibilityEvent.display 24
-XVisibilityEvent.window 32
-XVisibilityEvent.state 40
-XVisibilityEvent 48
-XWMHints.flags 0
-XWMHints.initial_state 12
-XWMHints.icon_pixmap 16
-XWMHints.icon_window 24
-XWMHints.icon_x 32
-XWMHints.icon_y 36
-XWMHints.icon_mask 40
-XWMHints.input 8
-XWMHints.window_group 48
-XWMHints 56
-XCrossingEvent.type 0
-XCrossingEvent.serial 8
-XCrossingEvent.send_event 16
-XCrossingEvent.display 24
-XCrossingEvent.window 32
-XCrossingEvent.root 40
-XCrossingEvent.subwindow 48
-XCrossingEvent.time 56
-XCrossingEvent.x 64
-XCrossingEvent.y 68
-XCrossingEvent.x_root 72
-XCrossingEvent.y_root 76
-XCrossingEvent.mode 80
-XCrossingEvent.detail 84
-XCrossingEvent.same_screen 88
-XCrossingEvent.focus 92
-XCrossingEvent.state 96
-XCrossingEvent 104
-XSelectionRequestEvent.type 0
-XSelectionRequestEvent.serial 8
-XSelectionRequestEvent.send_event 16
-XSelectionRequestEvent.display 24
-XSelectionRequestEvent.owner 32
-XSelectionRequestEvent.requestor 40
-XSelectionRequestEvent.selection 48
-XSelectionRequestEvent.target 56
-XSelectionRequestEvent.property 64
-XSelectionRequestEvent.time 72
-XSelectionRequestEvent 80
-XNoExposeEvent.type 0
-XNoExposeEvent.serial 8
-XNoExposeEvent.send_event 16
-XNoExposeEvent.display 24
-XNoExposeEvent.drawable 32
-XNoExposeEvent.major_code 40
-XNoExposeEvent.minor_code 44
-XNoExposeEvent 48
-XHostAddress.family 0
-XHostAddress.length 4
-XHostAddress.address 8
-XHostAddress 16
-XColormapEvent.type 0
-XColormapEvent.serial 8
-XColormapEvent.send_event 16
-XColormapEvent.display 24
-XColormapEvent.window 32
-XColormapEvent.colormap 40
-XColormapEvent.new 48
-XColormapEvent.state 52
-XColormapEvent 56
-ColorEntry.r 0
-ColorEntry.g 1
-ColorEntry.b 2
-ColorEntry.flags 3
-ColorEntry 4
-XResizeRequestEvent.type 0
-XResizeRequestEvent.serial 8
-XResizeRequestEvent.send_event 16
-XResizeRequestEvent.display 24
-XResizeRequestEvent.window 32
-XResizeRequestEvent.width 40
-XResizeRequestEvent.height 44
-XResizeRequestEvent 48
-Depth.depth 0
-Depth.nvisuals 4
-Depth.visuals 8
-Depth 16
-XPropertyEvent.type 0
-XPropertyEvent.serial 8
-XPropertyEvent.send_event 16
-XPropertyEvent.display 24
-XPropertyEvent.window 32
-XPropertyEvent.atom 40
-XPropertyEvent.time 48
-XPropertyEvent.state 56
-XPropertyEvent 64
-XDestroyWindowEvent.type 0
-XDestroyWindowEvent.serial 8
-XDestroyWindowEvent.send_event 16
-XDestroyWindowEvent.display 24
-XDestroyWindowEvent.event 32
-XDestroyWindowEvent.window 40
-XDestroyWindowEvent 48
-XStandardColormap.colormap 0
-XStandardColormap.red_max 8
-XStandardColormap.red_mult 16
-XStandardColormap.green_max 24
-XStandardColormap.green_mult 32
-XStandardColormap.blue_max 40
-XStandardColormap.blue_mult 48
-XStandardColormap.base_pixel 56
-XStandardColormap.visualid 64
-XStandardColormap.killid 72
-XStandardColormap 80
-XComposeStatus.compose_ptr 0
-XComposeStatus.chars_matched 8
-XComposeStatus 16
-AwtGraphicsConfigData.awt_depth 0
-AwtGraphicsConfigData.awt_cmap 8
-AwtGraphicsConfigData.awt_visInfo 16
-AwtGraphicsConfigData.awt_num_colors 80
-AwtGraphicsConfigData.awtImage 88
-AwtGraphicsConfigData.AwtColorMatch 96
-AwtGraphicsConfigData.monoImage 104
-AwtGraphicsConfigData.monoPixmap 112
-AwtGraphicsConfigData.monoPixmapWidth 120
-AwtGraphicsConfigData.monoPixmapHeight 124
-AwtGraphicsConfigData.monoPixmapGC 128
-AwtGraphicsConfigData.pixelStride 136
-AwtGraphicsConfigData.color_data 144
-AwtGraphicsConfigData.glxInfo 152
-AwtGraphicsConfigData.isTranslucencySupported 160
-AwtGraphicsConfigData.renderPictFormat 168
-AwtGraphicsConfigData 208
-XColor.pixel 0
-XColor.red 8
-XColor.green 10
-XColor.blue 12
-XColor.flags 14
-XColor.pad 15
-XColor 16
-XTextProperty.value 0
-XTextProperty.encoding 8
-XTextProperty.format 16
-XTextProperty.nitems 24
-XTextProperty 32
--- a/make/data/x11wrappergen/sizes.64-solaris-i386 Thu Mar 01 16:35:36 2018 -0500
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,1017 +0,0 @@
-long 8
-int 4
-short 2
-ptr 8
-Bool 4
-Atom 8
-Window 8
-XExtData.number 0
-XExtData.next 8
-XExtData.free_private 16
-XExtData.private_data 24
-XExtData 32
-XIMStringConversionCallbackStruct.position 0
-XIMStringConversionCallbackStruct.direction 4
-XIMStringConversionCallbackStruct.operation 8
-XIMStringConversionCallbackStruct.factor 10
-XIMStringConversionCallbackStruct.text 16
-XIMStringConversionCallbackStruct 24
-XkbNewKeyboardNotifyEvent.type 0
-XkbNewKeyboardNotifyEvent.serial 8
-XkbNewKeyboardNotifyEvent.send_event 16
-XkbNewKeyboardNotifyEvent.display 24
-XkbNewKeyboardNotifyEvent.time 32
-XkbNewKeyboardNotifyEvent.xkb_type 40
-XkbNewKeyboardNotifyEvent.device 44
-XkbNewKeyboardNotifyEvent.old_device 48
-XkbNewKeyboardNotifyEvent.min_key_code 52
-XkbNewKeyboardNotifyEvent.max_key_code 56
-XkbNewKeyboardNotifyEvent.old_min_key_code 60
-XkbNewKeyboardNotifyEvent.old_max_key_code 64
-XkbNewKeyboardNotifyEvent.changed 68
-XkbNewKeyboardNotifyEvent.req_major 72
-XkbNewKeyboardNotifyEvent.req_minor 73
-XkbNewKeyboardNotifyEvent 80
-XTimeCoord.time 0
-XTimeCoord.x 8
-XTimeCoord.y 10
-XTimeCoord 16
-XkbCompatMapNotifyEvent.type 0
-XkbCompatMapNotifyEvent.serial 8
-XkbCompatMapNotifyEvent.send_event 16
-XkbCompatMapNotifyEvent.display 24
-XkbCompatMapNotifyEvent.time 32
-XkbCompatMapNotifyEvent.xkb_type 40
-XkbCompatMapNotifyEvent.device 44
-XkbCompatMapNotifyEvent.changed_groups 48
-XkbCompatMapNotifyEvent.first_si 52
-XkbCompatMapNotifyEvent.num_si 56
-XkbCompatMapNotifyEvent.num_total_si 60
-XkbCompatMapNotifyEvent 64
-XIMStatusDrawCallbackStruct.type 0
-XIMStatusDrawCallbackStruct.data 8
-XIMStatusDrawCallbackStruct 16
-XKeyboardControl.key_click_percent 0
-XKeyboardControl.bell_percent 4
-XKeyboardControl.bell_pitch 8
-XKeyboardControl.bell_duration 12
-XKeyboardControl.led 16
-XKeyboardControl.led_mode 20
-XKeyboardControl.key 24
-XKeyboardControl.auto_repeat_mode 28
-XKeyboardControl 32
-XSelectionClearEvent.type 0
-XSelectionClearEvent.serial 8
-XSelectionClearEvent.send_event 16
-XSelectionClearEvent.display 24
-XSelectionClearEvent.window 32
-XSelectionClearEvent.selection 40
-XSelectionClearEvent.time 48
-XSelectionClearEvent 56
-XWindowChanges.x 0
-XWindowChanges.y 4
-XWindowChanges.width 8
-XWindowChanges.height 12
-XWindowChanges.border_width 16
-XWindowChanges.sibling 24
-XWindowChanges.stack_mode 32
-XWindowChanges 40
-XIMPreeditCaretCallbackStruct.position 0
-XIMPreeditCaretCallbackStruct.direction 4
-XIMPreeditCaretCallbackStruct.style 8
-XIMPreeditCaretCallbackStruct 12
-XOMCharSetList.charset_count 0
-XOMCharSetList.charset_list 8
-XOMCharSetList 16
-XOMFontInfo.num_font 0
-XOMFontInfo.font_struct_list 8
-XOMFontInfo.font_name_list 16
-XOMFontInfo 24
-AwtScreenData.numConfigs 0
-AwtScreenData.root 8
-AwtScreenData.whitepixel 16
-AwtScreenData.blackpixel 24
-AwtScreenData.defaultConfig 32
-AwtScreenData.configs 40
-AwtScreenData 48
-XIMHotKeyTrigger.keysym 0
-XIMHotKeyTrigger.modifier 8
-XIMHotKeyTrigger.modifier_mask 12
-XIMHotKeyTrigger 16
-XCirculateEvent.type 0
-XCirculateEvent.serial 8
-XCirculateEvent.send_event 16
-XCirculateEvent.display 24
-XCirculateEvent.event 32
-XCirculateEvent.window 40
-XCirculateEvent.place 48
-XCirculateEvent 56
-Screen.ext_data 0
-Screen.display 8
-Screen.root 16
-Screen.width 24
-Screen.height 28
-Screen.mwidth 32
-Screen.mheight 36
-Screen.ndepths 40
-Screen.depths 48
-Screen.root_depth 56
-Screen.root_visual 64
-Screen.default_gc 72
-Screen.cmap 80
-Screen.white_pixel 88
-Screen.black_pixel 96
-Screen.max_maps 104
-Screen.min_maps 108
-Screen.backing_store 112
-Screen.save_unders 116
-Screen.root_input_mask 120
-Screen 128
-XMapRequestEvent.type 0
-XMapRequestEvent.serial 8
-XMapRequestEvent.send_event 16
-XMapRequestEvent.display 24
-XMapRequestEvent.parent 32
-XMapRequestEvent.window 40
-XMapRequestEvent 48
-XIMText.length 0
-XIMText.feedback 8
-XIMText.encoding_is_wchar 16
-XIMText.string 24
-XIMText 32
-XGraphicsExposeEvent.type 0
-XGraphicsExposeEvent.serial 8
-XGraphicsExposeEvent.send_event 16
-XGraphicsExposeEvent.display 24
-XGraphicsExposeEvent.drawable 32
-XGraphicsExposeEvent.x 40
-XGraphicsExposeEvent.y 44
-XGraphicsExposeEvent.width 48
-XGraphicsExposeEvent.height 52
-XGraphicsExposeEvent.count 56
-XGraphicsExposeEvent.major_code 60
-XGraphicsExposeEvent.minor_code 64
-XGraphicsExposeEvent 72
-XEvent.type 0
-XEvent.xany 0
-XEvent.xkey 0
-XEvent.xbutton 0
-XEvent.xmotion 0
-XEvent.xcrossing 0
-XEvent.xfocus 0
-XEvent.xexpose 0
-XEvent.xgraphicsexpose 0
-XEvent.xnoexpose 0
-XEvent.xvisibility 0
-XEvent.xcreatewindow 0
-XEvent.xdestroywindow 0
-XEvent.xunmap 0
-XEvent.xmap 0
-XEvent.xmaprequest 0
-XEvent.xreparent 0
-XEvent.xconfigure 0
-XEvent.xgravity 0
-XEvent.xresizerequest 0
-XEvent.xconfigurerequest 0
-XEvent.xcirculate 0
-XEvent.xcirculaterequest 0
-XEvent.xproperty 0
-XEvent.xselectionclear 0
-XEvent.xselectionrequest 0
-XEvent.xselection 0
-XEvent.xcolormap 0
-XEvent.xclient 0
-XEvent.xmapping 0
-XEvent.xerror 0
-XEvent.xkeymap 0
-XEvent.pad 0
-XEvent 192
-XRenderDirectFormat.red 0
-XRenderDirectFormat.redMask 2
-XRenderDirectFormat.green 4
-XRenderDirectFormat.greenMask 6
-XRenderDirectFormat.blue 8
-XRenderDirectFormat.blueMask 10
-XRenderDirectFormat.alpha 12
-XRenderDirectFormat.alphaMask 14
-XRenderDirectFormat 16
-ColorData.awt_Colors 0
-ColorData.awt_numICMcolors 8
-ColorData.awt_icmLUT 16
-ColorData.awt_icmLUT2Colors 24
-ColorData.img_grays 32
-ColorData.img_clr_tbl 40
-ColorData.img_oda_red 48
-ColorData.img_oda_green 56
-ColorData.img_oda_blue 64
-ColorData.pGrayInverseLutData 72
-ColorData.screendata 80
-ColorData.representsPrimaries 84
-ColorData 88
-XFontStruct.ext_data 0
-XFontStruct.fid 8
-XFontStruct.direction 16
-XFontStruct.min_char_or_byte2 20
-XFontStruct.max_char_or_byte2 24
-XFontStruct.min_byte1 28
-XFontStruct.max_byte1 32
-XFontStruct.all_chars_exist 36
-XFontStruct.n_properties 44
-XFontStruct.properties 48
-XFontStruct.min_bounds 56
-XFontStruct.max_bounds 68
-XFontStruct.per_char 80
-XFontStruct.ascent 88
-XFontStruct.descent 92
-XFontStruct 96
-XExtCodes.extension 0
-XExtCodes.major_opcode 4
-XExtCodes.first_event 8
-XExtCodes.first_error 12
-XExtCodes 16
-XFontSetExtents.max_ink_extent 0
-XFontSetExtents.max_logical_extent 8
-XFontSetExtents 16
-XSelectionEvent.type 0
-XSelectionEvent.serial 8
-XSelectionEvent.send_event 16
-XSelectionEvent.display 24
-XSelectionEvent.requestor 32
-XSelectionEvent.selection 40
-XSelectionEvent.target 48
-XSelectionEvent.property 56
-XSelectionEvent.time 64
-XSelectionEvent 72
-XArc.x 0
-XArc.y 2
-XArc.width 4
-XArc.height 6
-XArc.angle1 8
-XArc.angle2 10
-XArc 12
-XErrorEvent.type 0
-XErrorEvent.display 8
-XErrorEvent.resourceid 16
-XErrorEvent.serial 24
-XErrorEvent.error_code 32
-XErrorEvent.request_code 33
-XErrorEvent.minor_code 34
-XErrorEvent 40
-XConfigureRequestEvent.type 0
-XConfigureRequestEvent.serial 8
-XConfigureRequestEvent.send_event 16
-XConfigureRequestEvent.display 24
-XConfigureRequestEvent.parent 32
-XConfigureRequestEvent.window 40
-XConfigureRequestEvent.x 48
-XConfigureRequestEvent.y 52
-XConfigureRequestEvent.width 56
-XConfigureRequestEvent.height 60
-XConfigureRequestEvent.border_width 64
-XConfigureRequestEvent.above 72
-XConfigureRequestEvent.detail 80
-XConfigureRequestEvent.value_mask 88
-XConfigureRequestEvent 96
-ScreenFormat.ext_data 0
-ScreenFormat.depth 8
-ScreenFormat.bits_per_pixel 12
-ScreenFormat.scanline_pad 16
-ScreenFormat 24
-XButtonEvent.type 0
-XButtonEvent.serial 8
-XButtonEvent.send_event 16
-XButtonEvent.display 24
-XButtonEvent.window 32
-XButtonEvent.root 40
-XButtonEvent.subwindow 48
-XButtonEvent.time 56
-XButtonEvent.x 64
-XButtonEvent.y 68
-XButtonEvent.x_root 72
-XButtonEvent.y_root 76
-XButtonEvent.state 80
-XButtonEvent.button 84
-XButtonEvent.same_screen 88
-XButtonEvent 96
-XFontProp.name 0
-XFontProp.card32 8
-XFontProp 16
-XIMValuesList.count_values 0
-XIMValuesList.supported_values 8
-XIMValuesList 16
-XKeymapEvent.type 0
-XKeymapEvent.serial 8
-XKeymapEvent.send_event 16
-XKeymapEvent.display 24
-XKeymapEvent.window 32
-XKeymapEvent.key_vector 40
-XKeymapEvent 72
-XTextItem16.chars 0
-XTextItem16.nchars 8
-XTextItem16.delta 12
-XTextItem16.font 16
-XTextItem16 24
-XIMPreeditDrawCallbackStruct.caret 0
-XIMPreeditDrawCallbackStruct.chg_first 4
-XIMPreeditDrawCallbackStruct.chg_length 8
-XIMPreeditDrawCallbackStruct.text 16
-XIMPreeditDrawCallbackStruct 24
-XVisualInfo.visual 0
-XVisualInfo.visualid 8
-XVisualInfo.screen 16
-XVisualInfo.depth 20
-XVisualInfo.class 24
-XVisualInfo.red_mask 32
-XVisualInfo.green_mask 40
-XVisualInfo.blue_mask 48
-XVisualInfo.colormap_size 56
-XVisualInfo.bits_per_rgb 60
-XVisualInfo 64
-XkbControlsNotifyEvent.type 0
-XkbControlsNotifyEvent.serial 8
-XkbControlsNotifyEvent.send_event 16
-XkbControlsNotifyEvent.display 24
-XkbControlsNotifyEvent.time 32
-XkbControlsNotifyEvent.xkb_type 40
-XkbControlsNotifyEvent.device 44
-XkbControlsNotifyEvent.changed_ctrls 48
-XkbControlsNotifyEvent.enabled_ctrls 52
-XkbControlsNotifyEvent.enabled_ctrl_changes 56
-XkbControlsNotifyEvent.num_groups 60
-XkbControlsNotifyEvent.keycode 64
-XkbControlsNotifyEvent.event_type 65
-XkbControlsNotifyEvent.req_major 66
-XkbControlsNotifyEvent.req_minor 67
-XkbControlsNotifyEvent 72
-PropMwmHints.flags 0
-PropMwmHints.functions 8
-PropMwmHints.decorations 16
-PropMwmHints.inputMode 24
-PropMwmHints.status 32
-PropMwmHints 40
-XClientMessageEvent.type 0
-XClientMessageEvent.serial 8
-XClientMessageEvent.send_event 16
-XClientMessageEvent.display 24
-XClientMessageEvent.window 32
-XClientMessageEvent.message_type 40
-XClientMessageEvent.format 48
-XClientMessageEvent.data 56
-XClientMessageEvent 96
-XAnyEvent.type 0
-XAnyEvent.serial 8
-XAnyEvent.send_event 16
-XAnyEvent.display 24
-XAnyEvent.window 32
-XAnyEvent 40
-XkbIndicatorNotifyEvent.type 0
-XkbIndicatorNotifyEvent.serial 8
-XkbIndicatorNotifyEvent.send_event 16
-XkbIndicatorNotifyEvent.display 24
-XkbIndicatorNotifyEvent.time 32
-XkbIndicatorNotifyEvent.xkb_type 40
-XkbIndicatorNotifyEvent.device 44
-XkbIndicatorNotifyEvent.changed 48
-XkbIndicatorNotifyEvent.state 52
-XkbIndicatorNotifyEvent 56
-XIMPreeditStateNotifyCallbackStruct.state 0
-XIMPreeditStateNotifyCallbackStruct 8
-XkbAnyEvent.type 0
-XkbAnyEvent.serial 8
-XkbAnyEvent.send_event 16
-XkbAnyEvent.display 24
-XkbAnyEvent.time 32
-XkbAnyEvent.xkb_type 40
-XkbAnyEvent.device 44
-XkbAnyEvent 48
-XMotionEvent.type 0
-XMotionEvent.serial 8
-XMotionEvent.send_event 16
-XMotionEvent.display 24
-XMotionEvent.window 32
-XMotionEvent.root 40
-XMotionEvent.subwindow 48
-XMotionEvent.time 56
-XMotionEvent.x 64
-XMotionEvent.y 68
-XMotionEvent.x_root 72
-XMotionEvent.y_root 76
-XMotionEvent.state 80
-XMotionEvent.is_hint 84
-XMotionEvent.same_screen 88
-XMotionEvent 96
-XIMHotKeyTriggers.num_hot_key 0
-XIMHotKeyTriggers.key 8
-XIMHotKeyTriggers 16
-XIMStyles.count_styles 0
-XIMStyles.supported_styles 8
-XIMStyles 16
-XkbExtensionDeviceNotifyEvent.type 0
-XkbExtensionDeviceNotifyEvent.serial 8
-XkbExtensionDeviceNotifyEvent.send_event 16
-XkbExtensionDeviceNotifyEvent.display 24
-XkbExtensionDeviceNotifyEvent.time 32
-XkbExtensionDeviceNotifyEvent.xkb_type 40
-XkbExtensionDeviceNotifyEvent.device 44
-XkbExtensionDeviceNotifyEvent.reason 48
-XkbExtensionDeviceNotifyEvent.supported 52
-XkbExtensionDeviceNotifyEvent.unsupported 56
-XkbExtensionDeviceNotifyEvent.first_btn 60
-XkbExtensionDeviceNotifyEvent.num_btns 64
-XkbExtensionDeviceNotifyEvent.leds_defined 68
-XkbExtensionDeviceNotifyEvent.led_state 72
-XkbExtensionDeviceNotifyEvent.led_class 76
-XkbExtensionDeviceNotifyEvent.led_id 80
-XkbExtensionDeviceNotifyEvent 88
-XwcTextItem.chars 0
-XwcTextItem.nchars 8
-XwcTextItem.delta 12
-XwcTextItem.font_set 16
-XwcTextItem 24
-XClassHint.res_name 0
-XClassHint.res_class 8
-XClassHint 16
-XChar2b.byte1 0
-XChar2b.byte2 1
-XChar2b 2
-XSetWindowAttributes.background_pixmap 0
-XSetWindowAttributes.background_pixel 8
-XSetWindowAttributes.border_pixmap 16
-XSetWindowAttributes.border_pixel 24
-XSetWindowAttributes.bit_gravity 32
-XSetWindowAttributes.win_gravity 36
-XSetWindowAttributes.backing_store 40
-XSetWindowAttributes.backing_planes 48
-XSetWindowAttributes.backing_pixel 56
-XSetWindowAttributes.save_under 64
-XSetWindowAttributes.event_mask 72
-XSetWindowAttributes.do_not_propagate_mask 80
-XSetWindowAttributes.override_redirect 88
-XSetWindowAttributes.colormap 96
-XSetWindowAttributes.cursor 104
-XSetWindowAttributes 112
-XRenderPictFormat.id 0
-XRenderPictFormat.type 8
-XRenderPictFormat.depth 12
-XRenderPictFormat.direct 16
-XRenderPictFormat.colormap 32
-XRenderPictFormat 40
-XReparentEvent.type 0
-XReparentEvent.serial 8
-XReparentEvent.send_event 16
-XReparentEvent.display 24
-XReparentEvent.event 32
-XReparentEvent.window 40
-XReparentEvent.parent 48
-XReparentEvent.x 56
-XReparentEvent.y 60
-XReparentEvent.override_redirect 64
-XReparentEvent 72
-XCirculateRequestEvent.type 0
-XCirculateRequestEvent.serial 8
-XCirculateRequestEvent.send_event 16
-XCirculateRequestEvent.display 24
-XCirculateRequestEvent.parent 32
-XCirculateRequestEvent.window 40
-XCirculateRequestEvent.place 48
-XCirculateRequestEvent 56
-XImage.width 0
-XImage.height 4
-XImage.xoffset 8
-XImage.format 12
-XImage.data 16
-XImage.byte_order 24
-XImage.bitmap_unit 28
-XImage.bitmap_bit_order 32
-XImage.bitmap_pad 36
-XImage.depth 40
-XImage.bytes_per_line 44
-XImage.bits_per_pixel 48
-XImage.red_mask 56
-XImage.green_mask 64
-XImage.blue_mask 72
-XImage.obdata 80
-XImage.f.create_image 88
-XImage.f.destroy_image 96
-XImage.f.get_pixel 104
-XImage.f.put_pixel 112
-XImage.f.sub_image 120
-XImage.f.add_pixel 128
-XImage 136
-XKeyEvent.type 0
-XKeyEvent.serial 8
-XKeyEvent.send_event 16
-XKeyEvent.display 24
-XKeyEvent.window 32
-XKeyEvent.root 40
-XKeyEvent.subwindow 48
-XKeyEvent.time 56
-XKeyEvent.x 64
-XKeyEvent.y 68
-XKeyEvent.x_root 72
-XKeyEvent.y_root 76
-XKeyEvent.state 80
-XKeyEvent.keycode 84
-XKeyEvent.same_screen 88
-XKeyEvent 96
-XkbActionMessageEvent.type 0
-XkbActionMessageEvent.serial 8
-XkbActionMessageEvent.send_event 16
-XkbActionMessageEvent.display 24
-XkbActionMessageEvent.time 32
-XkbActionMessageEvent.xkb_type 40
-XkbActionMessageEvent.device 44
-XkbActionMessageEvent.keycode 48
-XkbActionMessageEvent.press 52
-XkbActionMessageEvent.key_event_follows 56
-XkbActionMessageEvent.group 60
-XkbActionMessageEvent.mods 64
-XkbActionMessageEvent.message 68
-XkbActionMessageEvent 80
-XdbeSwapInfo.swap_window 0
-XdbeSwapInfo.swap_action 8
-XdbeSwapInfo 16
-XTextItem.chars 0
-XTextItem.nchars 8
-XTextItem.delta 12
-XTextItem.font 16
-XTextItem 24
-XModifierKeymap.max_keypermod 0
-XModifierKeymap.modifiermap 8
-XModifierKeymap 16
-XCharStruct.lbearing 0
-XCharStruct.rbearing 2
-XCharStruct.width 4
-XCharStruct.ascent 6
-XCharStruct.descent 8
-XCharStruct.attributes 10
-XCharStruct 12
-XGravityEvent.type 0
-XGravityEvent.serial 8
-XGravityEvent.send_event 16
-XGravityEvent.display 24
-XGravityEvent.event 32
-XGravityEvent.window 40
-XGravityEvent.x 48
-XGravityEvent.y 52
-XGravityEvent 56
-Visual.ext_data 0
-Visual.visualid 8
-Visual.class 16
-Visual.red_mask 24
-Visual.green_mask 32
-Visual.blue_mask 40
-Visual.bits_per_rgb 48
-Visual.map_entries 52
-Visual 56
-XOMOrientation.num_orientation 0
-XOMOrientation.orientation 8
-XOMOrientation 16
-XkbAccessXNotifyEvent.type 0
-XkbAccessXNotifyEvent.serial 8
-XkbAccessXNotifyEvent.send_event 16
-XkbAccessXNotifyEvent.display 24
-XkbAccessXNotifyEvent.time 32
-XkbAccessXNotifyEvent.xkb_type 40
-XkbAccessXNotifyEvent.device 44
-XkbAccessXNotifyEvent.detail 48
-XkbAccessXNotifyEvent.keycode 52
-XkbAccessXNotifyEvent.sk_delay 56
-XkbAccessXNotifyEvent.debounce_delay 60
-XkbAccessXNotifyEvent 64
-XWindowAttributes.x 0
-XWindowAttributes.y 4
-XWindowAttributes.width 8
-XWindowAttributes.height 12
-XWindowAttributes.border_width 16
-XWindowAttributes.depth 20
-XWindowAttributes.visual 24
-XWindowAttributes.root 32
-XWindowAttributes.class 40
-XWindowAttributes.bit_gravity 44
-XWindowAttributes.win_gravity 48
-XWindowAttributes.backing_store 52
-XWindowAttributes.backing_planes 56
-XWindowAttributes.backing_pixel 64
-XWindowAttributes.save_under 72
-XWindowAttributes.colormap 80
-XWindowAttributes.map_installed 88
-XWindowAttributes.map_state 92
-XWindowAttributes.all_event_masks 96
-XWindowAttributes.your_event_mask 104
-XWindowAttributes.do_not_propagate_mask 112
-XWindowAttributes.override_redirect 120
-XWindowAttributes.screen 128
-XWindowAttributes 136
-XmbTextItem.chars 0
-XmbTextItem.nchars 8
-XmbTextItem.delta 12
-XmbTextItem.font_set 16
-XmbTextItem 24
-XMappingEvent.type 0
-XMappingEvent.serial 8
-XMappingEvent.send_event 16
-XMappingEvent.display 24
-XMappingEvent.window 32
-XMappingEvent.request 40
-XMappingEvent.first_keycode 44
-XMappingEvent.count 48
-XMappingEvent 56
-XSizeHints.flags 0
-XSizeHints.x 8
-XSizeHints.y 12
-XSizeHints.width 16
-XSizeHints.height 20
-XSizeHints.min_width 24
-XSizeHints.min_height 28
-XSizeHints.max_width 32
-XSizeHints.max_height 36
-XSizeHints.width_inc 40
-XSizeHints.height_inc 44
-XSizeHints.min_aspect.x 48
-XSizeHints.min_aspect.y 52
-XSizeHints.max_aspect.x 56
-XSizeHints.max_aspect.y 60
-XSizeHints.base_width 64
-XSizeHints.base_height 68
-XSizeHints.win_gravity 72
-XSizeHints 80
-XUnmapEvent.type 0
-XUnmapEvent.serial 8
-XUnmapEvent.send_event 16
-XUnmapEvent.display 24
-XUnmapEvent.event 32
-XUnmapEvent.window 40
-XUnmapEvent.from_configure 48
-XUnmapEvent 56
-awtImageData.Depth 0
-awtImageData.wsImageFormat 4
-awtImageData.clrdata 16
-awtImageData.convert 48
-awtImageData 560
-XkbStateNotifyEvent.type 0
-XkbStateNotifyEvent.serial 8
-XkbStateNotifyEvent.send_event 16
-XkbStateNotifyEvent.display 24
-XkbStateNotifyEvent.time 32
-XkbStateNotifyEvent.xkb_type 40
-XkbStateNotifyEvent.device 44
-XkbStateNotifyEvent.changed 48
-XkbStateNotifyEvent.group 52
-XkbStateNotifyEvent.base_group 56
-XkbStateNotifyEvent.latched_group 60
-XkbStateNotifyEvent.locked_group 64
-XkbStateNotifyEvent.mods 68
-XkbStateNotifyEvent.base_mods 72
-XkbStateNotifyEvent.latched_mods 76
-XkbStateNotifyEvent.locked_mods 80
-XkbStateNotifyEvent.compat_state 84
-XkbStateNotifyEvent.grab_mods 88
-XkbStateNotifyEvent.compat_grab_mods 89
-XkbStateNotifyEvent.lookup_mods 90
-XkbStateNotifyEvent.compat_lookup_mods 91
-XkbStateNotifyEvent.ptr_buttons 92
-XkbStateNotifyEvent.keycode 96
-XkbStateNotifyEvent.event_type 97
-XkbStateNotifyEvent.req_major 98
-XkbStateNotifyEvent.req_minor 99
-XkbStateNotifyEvent 104
-XExposeEvent.type 0
-XExposeEvent.serial 8
-XExposeEvent.send_event 16
-XExposeEvent.display 24
-XExposeEvent.window 32
-XExposeEvent.x 40
-XExposeEvent.y 44
-XExposeEvent.width 48
-XExposeEvent.height 52
-XExposeEvent.count 56
-XExposeEvent 64
-XkbMapNotifyEvent.type 0
-XkbMapNotifyEvent.serial 8
-XkbMapNotifyEvent.send_event 16
-XkbMapNotifyEvent.display 24
-XkbMapNotifyEvent.time 32
-XkbMapNotifyEvent.xkb_type 40
-XkbMapNotifyEvent.device 44
-XkbMapNotifyEvent.changed 48
-XkbMapNotifyEvent.flags 52
-XkbMapNotifyEvent.first_type 56
-XkbMapNotifyEvent.num_types 60
-XkbMapNotifyEvent.min_key_code 64
-XkbMapNotifyEvent.max_key_code 65
-XkbMapNotifyEvent.first_key_sym 66
-XkbMapNotifyEvent.first_key_act 67
-XkbMapNotifyEvent.first_key_behavior 68
-XkbMapNotifyEvent.first_key_explicit 69
-XkbMapNotifyEvent.first_modmap_key 70
-XkbMapNotifyEvent.first_vmodmap_key 71
-XkbMapNotifyEvent.num_key_syms 72
-XkbMapNotifyEvent.num_key_acts 76
-XkbMapNotifyEvent.num_key_behaviors 80
-XkbMapNotifyEvent.num_key_explicit 84
-XkbMapNotifyEvent.num_modmap_keys 88
-XkbMapNotifyEvent.num_vmodmap_keys 92
-XkbMapNotifyEvent.vmods 96
-XkbMapNotifyEvent 104
-XGCValues.function 0
-XGCValues.plane_mask 8
-XGCValues.foreground 16
-XGCValues.background 24
-XGCValues.line_width 32
-XGCValues.line_style 36
-XGCValues.cap_style 40
-XGCValues.join_style 44
-XGCValues.fill_style 48
-XGCValues.fill_rule 52
-XGCValues.arc_mode 56
-XGCValues.tile 64
-XGCValues.stipple 72
-XGCValues.ts_x_origin 80
-XGCValues.ts_y_origin 84
-XGCValues.font 88
-XGCValues.subwindow_mode 96
-XGCValues.graphics_exposures 100
-XGCValues.clip_x_origin 104
-XGCValues.clip_y_origin 108
-XGCValues.clip_mask 112
-XGCValues.dash_offset 120
-XGCValues.dashes 124
-XGCValues 128
-XFocusChangeEvent.type 0
-XFocusChangeEvent.serial 8
-XFocusChangeEvent.send_event 16
-XFocusChangeEvent.display 24
-XFocusChangeEvent.window 32
-XFocusChangeEvent.mode 40
-XFocusChangeEvent.detail 44
-XFocusChangeEvent 48
-XPixmapFormatValues.depth 0
-XPixmapFormatValues.bits_per_pixel 4
-XPixmapFormatValues.scanline_pad 8
-XPixmapFormatValues 12
-XMapEvent.type 0
-XMapEvent.serial 8
-XMapEvent.send_event 16
-XMapEvent.display 24
-XMapEvent.event 32
-XMapEvent.window 40
-XMapEvent.override_redirect 48
-XMapEvent 56
-XkbBellNotifyEvent.type 0
-XkbBellNotifyEvent.serial 8
-XkbBellNotifyEvent.send_event 16
-XkbBellNotifyEvent.display 24
-XkbBellNotifyEvent.time 32
-XkbBellNotifyEvent.xkb_type 40
-XkbBellNotifyEvent.device 44
-XkbBellNotifyEvent.percent 48
-XkbBellNotifyEvent.pitch 52
-XkbBellNotifyEvent.duration 56
-XkbBellNotifyEvent.bell_class 60
-XkbBellNotifyEvent.bell_id 64
-XkbBellNotifyEvent.name 72
-XkbBellNotifyEvent.window 80
-XkbBellNotifyEvent.event_only 88
-XkbBellNotifyEvent 96
-XIMStringConversionText.length 0
-XIMStringConversionText.feedback 8
-XIMStringConversionText.encoding_is_wchar 16
-XIMStringConversionText.string 24
-XIMStringConversionText 32
-XKeyboardState.key_click_percent 0
-XKeyboardState.bell_percent 4
-XKeyboardState.bell_pitch 8
-XKeyboardState.bell_duration 12
-XKeyboardState.led_mask 16
-XKeyboardState.global_auto_repeat 24
-XKeyboardState.auto_repeats 28
-XKeyboardState 64
-XkbEvent.type 0
-XkbEvent.any 0
-XkbEvent.new_kbd 0
-XkbEvent.map 0
-XkbEvent.state 0
-XkbEvent.ctrls 0
-XkbEvent.indicators 0
-XkbEvent.names 0
-XkbEvent.compat 0
-XkbEvent.bell 0
-XkbEvent.message 0
-XkbEvent.accessx 0
-XkbEvent.device 0
-XkbEvent.core 0
-XkbEvent 192
-XPoint.x 0
-XPoint.y 2
-XPoint 4
-XSegment.x1 0
-XSegment.y1 2
-XSegment.x2 4
-XSegment.y2 6
-XSegment 8
-XIconSize.min_width 0
-XIconSize.min_height 4
-XIconSize.max_width 8
-XIconSize.max_height 12
-XIconSize.width_inc 16
-XIconSize.height_inc 20
-XIconSize 24
-XIMCallback.client_data 0
-XIMCallback.callback 8
-XIMCallback 16
-XConfigureEvent.type 0
-XConfigureEvent.serial 8
-XConfigureEvent.send_event 16
-XConfigureEvent.display 24
-XConfigureEvent.event 32
-XConfigureEvent.window 40
-XConfigureEvent.x 48
-XConfigureEvent.y 52
-XConfigureEvent.width 56
-XConfigureEvent.height 60
-XConfigureEvent.border_width 64
-XConfigureEvent.above 72
-XConfigureEvent.override_redirect 80
-XConfigureEvent 88
-XRectangle.x 0
-XRectangle.y 2
-XRectangle.width 4
-XRectangle.height 6
-XRectangle 8
-XkbNamesNotifyEvent.type 0
-XkbNamesNotifyEvent.serial 8
-XkbNamesNotifyEvent.send_event 16
-XkbNamesNotifyEvent.display 24
-XkbNamesNotifyEvent.time 32
-XkbNamesNotifyEvent.xkb_type 40
-XkbNamesNotifyEvent.device 44
-XkbNamesNotifyEvent.changed 48
-XkbNamesNotifyEvent.first_type 52
-XkbNamesNotifyEvent.num_types 56
-XkbNamesNotifyEvent.first_lvl 60
-XkbNamesNotifyEvent.num_lvls 64
-XkbNamesNotifyEvent.num_aliases 68
-XkbNamesNotifyEvent.num_radio_groups 72
-XkbNamesNotifyEvent.changed_vmods 76
-XkbNamesNotifyEvent.changed_groups 80
-XkbNamesNotifyEvent.changed_indicators 84
-XkbNamesNotifyEvent.first_key 88
-XkbNamesNotifyEvent.num_keys 92
-XkbNamesNotifyEvent 96
-XCreateWindowEvent.type 0
-XCreateWindowEvent.serial 8
-XCreateWindowEvent.send_event 16
-XCreateWindowEvent.display 24
-XCreateWindowEvent.parent 32
-XCreateWindowEvent.window 40
-XCreateWindowEvent.x 48
-XCreateWindowEvent.y 52
-XCreateWindowEvent.width 56
-XCreateWindowEvent.height 60
-XCreateWindowEvent.border_width 64
-XCreateWindowEvent.override_redirect 68
-XCreateWindowEvent 72
-XVisibilityEvent.type 0
-XVisibilityEvent.serial 8
-XVisibilityEvent.send_event 16
-XVisibilityEvent.display 24
-XVisibilityEvent.window 32
-XVisibilityEvent.state 40
-XVisibilityEvent 48
-XWMHints.flags 0
-XWMHints.initial_state 12
-XWMHints.icon_pixmap 16
-XWMHints.icon_window 24
-XWMHints.icon_x 32
-XWMHints.icon_y 36
-XWMHints.icon_mask 40
-XWMHints.input 8
-XWMHints.window_group 48
-XWMHints 56
-XCrossingEvent.type 0
-XCrossingEvent.serial 8
-XCrossingEvent.send_event 16
-XCrossingEvent.display 24
-XCrossingEvent.window 32
-XCrossingEvent.root 40
-XCrossingEvent.subwindow 48
-XCrossingEvent.time 56
-XCrossingEvent.x 64
-XCrossingEvent.y 68
-XCrossingEvent.x_root 72
-XCrossingEvent.y_root 76
-XCrossingEvent.mode 80
-XCrossingEvent.detail 84
-XCrossingEvent.same_screen 88
-XCrossingEvent.focus 92
-XCrossingEvent.state 96
-XCrossingEvent 104
-XSelectionRequestEvent.type 0
-XSelectionRequestEvent.serial 8
-XSelectionRequestEvent.send_event 16
-XSelectionRequestEvent.display 24
-XSelectionRequestEvent.owner 32
-XSelectionRequestEvent.requestor 40
-XSelectionRequestEvent.selection 48
-XSelectionRequestEvent.target 56
-XSelectionRequestEvent.property 64
-XSelectionRequestEvent.time 72
-XSelectionRequestEvent 80
-XNoExposeEvent.type 0
-XNoExposeEvent.serial 8
-XNoExposeEvent.send_event 16
-XNoExposeEvent.display 24
-XNoExposeEvent.drawable 32
-XNoExposeEvent.major_code 40
-XNoExposeEvent.minor_code 44
-XNoExposeEvent 48
-XHostAddress.family 0
-XHostAddress.length 4
-XHostAddress.address 8
-XHostAddress 16
-XColormapEvent.type 0
-XColormapEvent.serial 8
-XColormapEvent.send_event 16
-XColormapEvent.display 24
-XColormapEvent.window 32
-XColormapEvent.colormap 40
-XColormapEvent.new 48
-XColormapEvent.state 52
-XColormapEvent 56
-ColorEntry.r 0
-ColorEntry.g 1
-ColorEntry.b 2
-ColorEntry.flags 3
-ColorEntry 4
-XResizeRequestEvent.type 0
-XResizeRequestEvent.serial 8
-XResizeRequestEvent.send_event 16
-XResizeRequestEvent.display 24
-XResizeRequestEvent.window 32
-XResizeRequestEvent.width 40
-XResizeRequestEvent.height 44
-XResizeRequestEvent 48
-Depth.depth 0
-Depth.nvisuals 4
-Depth.visuals 8
-Depth 16
-XPropertyEvent.type 0
-XPropertyEvent.serial 8
-XPropertyEvent.send_event 16
-XPropertyEvent.display 24
-XPropertyEvent.window 32
-XPropertyEvent.atom 40
-XPropertyEvent.time 48
-XPropertyEvent.state 56
-XPropertyEvent 64
-XDestroyWindowEvent.type 0
-XDestroyWindowEvent.serial 8
-XDestroyWindowEvent.send_event 16
-XDestroyWindowEvent.display 24
-XDestroyWindowEvent.event 32
-XDestroyWindowEvent.window 40
-XDestroyWindowEvent 48
-XStandardColormap.colormap 0
-XStandardColormap.red_max 8
-XStandardColormap.red_mult 16
-XStandardColormap.green_max 24
-XStandardColormap.green_mult 32
-XStandardColormap.blue_max 40
-XStandardColormap.blue_mult 48
-XStandardColormap.base_pixel 56
-XStandardColormap.visualid 64
-XStandardColormap.killid 72
-XStandardColormap 80
-XComposeStatus.compose_ptr 0
-XComposeStatus.chars_matched 8
-XComposeStatus 16
-AwtGraphicsConfigData.awt_depth 0
-AwtGraphicsConfigData.awt_cmap 8
-AwtGraphicsConfigData.awt_visInfo 16
-AwtGraphicsConfigData.awt_num_colors 80
-AwtGraphicsConfigData.awtImage 88
-AwtGraphicsConfigData.AwtColorMatch 96
-AwtGraphicsConfigData.monoImage 104
-AwtGraphicsConfigData.monoPixmap 112
-AwtGraphicsConfigData.monoPixmapWidth 120
-AwtGraphicsConfigData.monoPixmapHeight 124
-AwtGraphicsConfigData.monoPixmapGC 128
-AwtGraphicsConfigData.pixelStride 136
-AwtGraphicsConfigData.color_data 144
-AwtGraphicsConfigData.glxInfo 152
-AwtGraphicsConfigData.isTranslucencySupported 160
-AwtGraphicsConfigData.renderPictFormat 168
-AwtGraphicsConfigData 208
-XColor.pixel 0
-XColor.red 8
-XColor.green 10
-XColor.blue 12
-XColor.flags 14
-XColor.pad 15
-XColor 16
-XTextProperty.value 0
-XTextProperty.encoding 8
-XTextProperty.format 16
-XTextProperty.nitems 24
-XTextProperty 32
--- a/make/data/x11wrappergen/xlibtypes.txt Thu Mar 01 16:35:36 2018 -0500
+++ b/make/data/x11wrappergen/xlibtypes.txt Fri Mar 02 21:00:12 2018 +0100
@@ -1,9 +1,9 @@
-//
//
// This file is used for automated generation of java classes to wrap native structures.
-// The detail on format of this file see WrapperGenerator.java
+// For details on format of this file, see WrapperGenerator.java
//
-// WARNING: if you modified this file, you need to regenerate sizes.64-solaris-i386
+// WARNING: If you modify this file, you need to regenerate sizes-32.txt and sizes-64.txt.
+// Run "make update-x11wrappers" to do this.
//
XExtData
--- a/make/gensrc/Gensrc-java.desktop.gmk Thu Mar 01 16:35:36 2018 -0500
+++ b/make/gensrc/Gensrc-java.desktop.gmk Fri Mar 02 21:00:12 2018 +0100
@@ -30,10 +30,10 @@
ifneq ($(OPENJDK_TARGET_OS), windows)
include GensrcIcons.gmk
+endif
- ifneq ($(OPENJDK_TARGET_OS), macosx)
- include GensrcX11Wrappers.gmk
- endif
+ifneq ($(filter $(OPENJDK_TARGET_OS), linux solaris aix), )
+ include GensrcX11Wrappers.gmk
endif
include GensrcSwing.gmk
--- a/make/gensrc/GensrcX11Wrappers.gmk Thu Mar 01 16:35:36 2018 -0500
+++ b/make/gensrc/GensrcX11Wrappers.gmk Fri Mar 02 21:00:12 2018 +0100
@@ -1,5 +1,5 @@
#
-# Copyright (c) 2012, 2017, Oracle and/or its affiliates. All rights reserved.
+# Copyright (c) 2012, 2018, Oracle and/or its affiliates. All rights reserved.
# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
#
# This code is free software; you can redistribute it and/or modify it
@@ -23,106 +23,32 @@
# questions.
#
-# This file is responsible for extracting the x11 native struct offsets to
-# the xawt Java library. The tool needs to be run on the os/arch that
-# will host the final jvm, thus the tool cannot be used when cross compiling.
+# Generate java sources using the X11 offsets that are precalculated in files
+# make/data/x11wrappergen/sizes-<address size>.txt.
-# To enable cross compiling, the two versions of the generated offset file,
-# sizes.32 and sizes.64 are committed into the source code repository.
-# These are the ones used.
+GENSRC_X11WRAPPERS_OUTPUT_TOP := $(SUPPORT_OUTPUTDIR)/gensrc/java.desktop
-# However when not cross compiling, the offset generator tool is built and
-# run, to verify that it still generates the same sizes.32 and sizes.64.
+GENSRC_X11WRAPPERS_MARKER := $(GENSRC_X11WRAPPERS_OUTPUT_TOP)/_x11wrappers.marker
-GENSRC_X11WRAPPERS :=
-# Put temporary c-code and executable to calculate offsets here.
-# Also put verification offset file here as well.
-GENSRC_X11WRAPPERS_TMP := $(SUPPORT_OUTPUTDIR)/gensrc/java.desktop/_x11wrappers
# Put the generated Java classes used to interface X11 from awt here.
-GENSRC_X11WRAPPERS_DST := $(SUPPORT_OUTPUTDIR)/gensrc/java.desktop/sun/awt/X11
+GENSRC_X11WRAPPERS_OUTPUTDIR := $(GENSRC_X11WRAPPERS_OUTPUT_TOP)/sun/awt/X11
# The pre-calculated offset file are stored here:
-GENSRC_SIZER_DIR := $(TOPDIR)/make/data/x11wrappergen
+GENSRC_X11WRAPPERS_DATADIR := $(TOPDIR)/make/data/x11wrappergen
+GENSRC_X11WRAPPERS_DATA := $(GENSRC_X11WRAPPERS_DATADIR)/sizes-$(OPENJDK_TARGET_CPU_BITS).txt
+
+$(info ExecuteWithLog is $(call ExecuteWithLog $(GENSRC_X11WRAPPERS_OUTPUT_TOP)/foobar, CMDLINE))
-# Normal case is to generate only according to target bits
-GENSRC_X11_VERSION := $(OPENJDK_TARGET_CPU_BITS)
-ifeq ($(OPENJDK_TARGET_CPU_BITS), 64)
- ifneq ($(OPENJDK_TARGET_OS), linux)
- # On all 64-bit systems except Linux, generate both 32 and 64 bit versions
- GENSRC_X11_VERSION := 32 64
- endif
-else
- ifeq ($(OPENJDK_TARGET_OS), solaris)
- # As a special case, solaris 32-bit also generates the 64-bit version
- GENSRC_X11_VERSION := 32 64
- endif
-endif
-
-GENSRC_X11_SIZES_USED := $(addprefix $(GENSRC_X11WRAPPERS_TMP)/sizes., $(GENSRC_X11_VERSION))
-
-# Copy only the sizes.* files that are actually needed. WrapperGenerator picks up any it finds from the
-# file prefix it is given so those not needed need to be hidden.
-$(GENSRC_X11WRAPPERS_TMP)/sizes.%: $(GENSRC_SIZER_DIR)/sizes.%
- $(call MakeDir, $(@D))
- $(RM) '$@'
- $(SORT) $< > $@
-
-# Run the tool on the offset files copied from the source repository to generate several Java classes
-# used in awt.
-$(SUPPORT_OUTPUTDIR)/gensrc/java.desktop/_the.generated.x11: $(GENSRC_X11_SIZES_USED) $(BUILD_TOOLS_JDK)
- $(call MakeDir, $(GENSRC_X11WRAPPERS_DST))
- $(TOOL_WRAPPERGENERATOR) $(GENSRC_X11WRAPPERS_DST) $(GENSRC_SIZER_DIR)/xlibtypes.txt "gen" $(GENSRC_X11WRAPPERS_TMP)/sizes
+# Run the tool on the offset files to generate several Java classes used in awt.
+$(GENSRC_X11WRAPPERS_MARKER): $(BUILD_TOOLS_JDK) $(GENSRC_X11WRAPPERS_DATA) \
+ $(GENSRC_X11WRAPPERS_DATADIR)/xlibtypes.txt
+ $(call MakeDir, $(GENSRC_X11WRAPPERS_OUTPUTDIR))
+ $(call LogInfo, Generating X11 wrapper source files)
+ $(call ExecuteWithLog, $@, \
+ $(TOOL_WRAPPERGENERATOR) gen_java $(GENSRC_X11WRAPPERS_OUTPUTDIR) \
+ $(GENSRC_X11WRAPPERS_DATADIR)/xlibtypes.txt $(GENSRC_X11WRAPPERS_DATA) \
+ $(OPENJDK_TARGET_CPU_BITS))
$(TOUCH) $@
-GENSRC_X11WRAPPERS += $(SUPPORT_OUTPUTDIR)/gensrc/java.desktop/_the.generated.x11
-ifneq ($(COMPILE_TYPE), cross)
- # This is not a cross compile, regenerate the offset file, so that we
- # can compare it with the version in the source code repository.
-
- # Generate the C code for the program that will output the offset file.
- $(GENSRC_X11WRAPPERS_TMP)/sizer.%.c: $(GENSRC_SIZER_DIR)/xlibtypes.txt $(BUILD_TOOLS_JDK)
- $(call LogInfo, Generating X11 wrapper ($*-bit version))
- $(call MakeDir, $(@D))
- $(TOOL_WRAPPERGENERATOR) $(@D) $(GENSRC_SIZER_DIR)/xlibtypes.txt "sizer" $*
-
- # use -m32/-m64 only if the compiler supports it
- ifeq ($(COMPILER_SUPPORTS_TARGET_BITS_FLAG), true)
- MEMORY_MODEL_FLAG="$(COMPILER_TARGET_BITS_FLAG)$*"
- endif
-
- SIZER_CFLAGS := \
- -I$(TOPDIR)/src/hotspot/share/include \
- -I$(TOPDIR)/src/hotspot/os/$(HOTSPOT_TARGET_OS_TYPE)/include \
- -I$(SUPPORT_OUTPUTDIR)/modules_include/java.base \
- -I$(SUPPORT_OUTPUTDIR)/modules_include/java.base/$(OPENJDK_TARGET_OS_INCLUDE_SUBDIR) \
- -I$(TOPDIR)/src/java.base/share/native/libjava \
- -I$(TOPDIR)/src/java.base/$(OPENJDK_TARGET_OS_TYPE)/native/libjava \
- -I$(TOPDIR)/src/java.desktop/$(OPENJDK_TARGET_OS_TYPE)/native/common/awt \
- -I$(TOPDIR)/src/java.desktop/share/native/common/awt/debug \
- -I$(TOPDIR)/src/java.desktop/share/native/libawt/awt/image/cvutils \
- #
-
- # Compile the C code into an executable.
- $(GENSRC_X11WRAPPERS_TMP)/sizer.%.exe: $(GENSRC_X11WRAPPERS_TMP)/sizer.%.c
- $(call MakeDir, $(@D))
- (cd $(@D) && $(CC) $(MEMORY_MODEL_FLAG) -o $@ $< \
- $(X_CFLAGS) \
- $(X_LIBS) \
- $(SIZER_CFLAGS) -lc)
-
- .PRECIOUS: $(GENSRC_X11WRAPPERS_TMP)/sizer.%.exe $(GENSRC_X11WRAPPERS_TMP)/sizer.%.c
-
- # Run the executable create the offset file and check that it is identical
- # to the offset file in the source code repository.
- $(GENSRC_X11WRAPPERS_TMP)/sizes.%.verification: $(GENSRC_X11WRAPPERS_TMP)/sizer.%.exe
- $(call LogInfo, Verifying X11 wrapper sizes)
- $(call MakeDir, $(@D))
- $(GENSRC_X11WRAPPERS_TMP)/sizer.$*.exe | $(SORT) > $@.tmp
- $(DIFF) $(GENSRC_X11WRAPPERS_TMP)/sizes.$*.verification.tmp $(GENSRC_X11WRAPPERS_TMP)/sizes.$*
- mv $@.tmp $@
-
- GENSRC_X11WRAPPERS += $(GENSRC_X11WRAPPERS_TMP)/sizes.$(OPENJDK_TARGET_CPU_BITS).verification
-endif
-
-GENSRC_JAVA_DESKTOP += $(GENSRC_X11WRAPPERS)
+GENSRC_JAVA_DESKTOP += $(GENSRC_X11WRAPPERS_MARKER)
--- a/make/hotspot/gensrc/GensrcAdlc.gmk Thu Mar 01 16:35:36 2018 -0500
+++ b/make/hotspot/gensrc/GensrcAdlc.gmk Fri Mar 02 21:00:12 2018 +0100
@@ -1,5 +1,5 @@
#
-# Copyright (c) 2013, 2017, Oracle and/or its affiliates. All rights reserved.
+# Copyright (c) 2013, 2018, Oracle and/or its affiliates. All rights reserved.
# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
#
# This code is free software; you can redistribute it and/or modify it
@@ -52,8 +52,8 @@
endif
# Set the C++ standard if supported
- ADLC_CFLAGS += $(CXXSTD_CXXFLAG)
-
+ ADLC_CFLAGS += $(ADLC_CXXFLAG)
+
# NOTE: The old build didn't set -DASSERT for windows but it doesn't seem to
# hurt.
ADLC_CFLAGS += -DASSERT
@@ -63,6 +63,8 @@
ADLC_CFLAGS += -I$(TOPDIR)/src/hotspot/share
$(eval $(call SetupNativeCompilation, BUILD_ADLC, \
+ NAME := adlc, \
+ TYPE := EXECUTABLE, \
TOOLCHAIN := TOOLCHAIN_BUILD_LINK_CXX, \
SRC := $(TOPDIR)/src/hotspot/share/adlc, \
EXTRA_FILES := $(TOPDIR)/src/hotspot/share/opto/opcodes.cpp, \
@@ -71,7 +73,6 @@
LIBS := $(ADLC_LIBS), \
OBJECT_DIR := $(JVM_VARIANT_OUTPUTDIR)/tools/adlc/objs, \
OUTPUT_DIR := $(JVM_VARIANT_OUTPUTDIR)/tools/adlc, \
- PROGRAM := adlc, \
DEBUG_SYMBOLS := false, \
DISABLED_WARNINGS_clang := tautological-compare, \
DISABLED_WARNINGS_solstudio := notemsource, \
--- a/make/hotspot/gensrc/GensrcDtrace.gmk Thu Mar 01 16:35:36 2018 -0500
+++ b/make/hotspot/gensrc/GensrcDtrace.gmk Fri Mar 02 21:00:12 2018 +0100
@@ -1,5 +1,5 @@
#
-# Copyright (c) 2013, 2016, Oracle and/or its affiliates. All rights reserved.
+# Copyright (c) 2013, 2018, Oracle and/or its affiliates. All rights reserved.
# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
#
# This code is free software; you can redistribute it and/or modify it
@@ -46,7 +46,7 @@
$(call LogInfo, Generating dtrace header file $(@F))
$(call MakeDir, $(@D) $(DTRACE_SUPPORT_DIR))
$(call ExecuteWithLog, $(DTRACE_SUPPORT_DIR)/$(@F).d, \
- ( $(CC) -E $(DTRACE_CPP_FLAGS) $< > $(DTRACE_SUPPORT_DIR)/$(@F).d ) )
+ ($(CPP) $(DTRACE_CPP_FLAGS) $< > $(DTRACE_SUPPORT_DIR)/$(@F).d))
$(call ExecuteWithLog, $@, $(DTRACE) $(DTRACE_FLAGS) -h -o $@ -s $(DTRACE_SUPPORT_DIR)/$(@F).d)
# Process all .d files in DTRACE_SOURCE_DIR. They are:
--- a/make/hotspot/lib/CompileDtracePostJvm.gmk Thu Mar 01 16:35:36 2018 -0500
+++ b/make/hotspot/lib/CompileDtracePostJvm.gmk Fri Mar 02 21:00:12 2018 +0100
@@ -1,5 +1,5 @@
#
-# Copyright (c) 2013, 2017, Oracle and/or its affiliates. All rights reserved.
+# Copyright (c) 2013, 2018, Oracle and/or its affiliates. All rights reserved.
# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
#
# This code is free software; you can redistribute it and/or modify it
@@ -46,17 +46,14 @@
# in the libjvm.so, using JVM_CFLAGS as setup in CompileJvm.gmk. Otherwise
# this would preferrably have been done as a part of GensrcDtrace.gmk.
$(eval $(call SetupNativeCompilation, BUILD_DTRACE_GEN_OFFSETS, \
+ NAME := dtraceGenOffsets, \
+ TYPE := EXECUTABLE, \
SRC := $(TOPDIR)/make/hotspot/src/native/dtrace, \
- CC := $(BUILD_CXX), \
- CXX := $(BUILD_CXX), \
- LDEXE := $(BUILD_CXX), \
- generateJvmOffsets.cpp_CXXFLAGS := $(JVM_CFLAGS) -mt -xnolib -norunpath, \
- generateJvmOffsetsMain.c_CFLAGS := -mt -m64 -norunpath -z nodefs, \
+ TOOLCHAIN := $(TOOLCHAIN_BUILD), \
LDFLAGS := -m64, \
- LIBS := -lc, \
+ CFLAGS := -m64 $(JVM_CFLAGS), \
OBJECT_DIR := $(JVM_VARIANT_OUTPUTDIR)/tools/dtrace-gen-offsets/objs, \
OUTPUT_DIR := $(JVM_VARIANT_OUTPUTDIR)/tools/dtrace-gen-offsets, \
- PROGRAM := dtraceGenOffsets, \
))
DTRACE_GEN_OFFSETS_TOOL := $(BUILD_DTRACE_GEN_OFFSETS_TARGET)
@@ -77,25 +74,12 @@
JVM_OFFSETS_INDEX_H := $(DTRACE_SUPPORT_DIR)/JvmOffsetsIndex.h
# Run the dtrace-gen-offset tool to generate these three files.
+ # The generated JvmOffsets.cpp is compiled with the rest of libjvm.
$(eval $(call SetupDtraceOffsetsGeneration, $(JVM_OFFSETS_H), header))
$(eval $(call SetupDtraceOffsetsGeneration, $(JVM_OFFSETS_INDEX_H), index))
$(eval $(call SetupDtraceOffsetsGeneration, $(JVM_OFFSETS_CPP), table))
############################################################################
- # Compile JVM_OFFSETS_OBJ which is linked with libjvm.so.
-
- # JvmOffsets.cpp is compiled without the common JVM_CFLAGS. Otherwise, the
- # natural way would have been to included this source code in BUILD_LIBJVM.
- JVM_OFFSETS_CFLAGS := -m64
- ifeq ($(OPENJDK_TARGET_CPU), sparcv9)
- JVM_OFFSETS_CFLAGS += -xarch=sparc
- endif
-
- $(JVM_OFFSETS_OBJ): $(JVM_OFFSETS_CPP) $(JVM_OFFSETS_H)
- $(call LogInfo, Compiling dtrace file JvmOffsets.cpp (for libjvm.so))
- $(call ExecuteWithLog, $@, $(CXX) -c -I$(<D) -o $@ $(JVM_OFFSETS_CFLAGS) $<)
-
- ############################################################################
# Generate DTRACE_OBJ which is linked with libjvm.so.
# Concatenate all *.d files into a single file
@@ -146,8 +130,8 @@
$(DTRACE_OBJ): $(JVM_OUTPUTDIR)/objs/dtrace.d $(DTRACE_INSTRUMENTED_OBJS)
$(call LogInfo, Generating $(@F) from $(<F) and object files)
$(call MakeDir, $(DTRACE_SUPPORT_DIR))
- $(call ExecuteWithLog, $(DTRACE_SUPPORT_DIR)/$(@F).d, $(CC) -E \
- $(DTRACE_CPP_FLAGS) $< > $(DTRACE_SUPPORT_DIR)/$(@F).d)
+ $(call ExecuteWithLog, $(DTRACE_SUPPORT_DIR)/$(@F).d, \
+ ($(CPP) $(DTRACE_CPP_FLAGS) $< > $(DTRACE_SUPPORT_DIR)/$(@F).d))
$(call ExecuteWithLog, $@, $(DTRACE) $(DTRACE_FLAGS) -xlazyload -o $@ \
-s $(DTRACE_SUPPORT_DIR)/$(@F).d $(sort $(DTRACE_INSTRUMENTED_OBJS)))
@@ -156,21 +140,29 @@
# Unfortunately dtrace generates incorrect types for some symbols in
# dtrace_jhelper.o, resulting in "warning: symbol X has differing types"
- # This is tracked in JDK-6890703.
- $(DTRACE_JHELPER_OBJ): $(TOPDIR)/src/hotspot/os/solaris/dtrace/jhelper.d \
- $(JVM_OFFSETS_INDEX_H)
- $(call LogInfo, Running dtrace for $(<F))
- $(call ExecuteWithLog, $@, $(DTRACE) $(DTRACE_FLAGS) $(DTRACE_CPP_FLAGS) -C \
- -I$(DTRACE_SUPPORT_DIR) -o $@ -s $<)
+ # See JDK-6890703 for details.
+ # We work around this by fixing the types for these symbols using elfedit,
+ # after dtrace has generated the .o file.
+ JHELPER_DTRACE_SRC := $(TOPDIR)/src/hotspot/os/solaris/dtrace/jhelper.d
+
+ GetElfeditCommands = \
+ $(foreach symbol, \
+ $(shell $(GREP) ^extern $(JHELPER_DTRACE_SRC) | $(AWK) '{ gsub(";","") ; print $$3 }'), \
+ -e 'sym:st_type $(symbol) 1')
- # NOTE: We should really do something like this, but unfortunately this
- # results in a compilation error. :-(
- # $(call MakeDir, $(DTRACE_SUPPORT_DIR))
- # $(call ExecuteWithLog, $(DTRACE_SUPPORT_DIR)/$(@F).d, $(CC) -E \
- # $(DTRACE_CPP_FLAGS) -I$(DTRACE_SUPPORT_DIR) $^ \
- # > $(DTRACE_SUPPORT_DIR)/$(@F).d)
- # $(call ExecuteWithLog, $@, $(DTRACE) $(DTRACE_FLAGS) -o $@ \
- # -s $(DTRACE_SUPPORT_DIR)/$(@F).d)
+ # Make sure we run our selected compiler for preprocessing instead of letting
+ # the dtrace tool pick it on it's own.
+ $(DTRACE_JHELPER_OBJ): $(JHELPER_DTRACE_SRC) $(JVM_OFFSETS_INDEX_H)
+ $(call LogInfo, Running dtrace for $(<F))
+ $(call MakeDir, $(DTRACE_SUPPORT_DIR))
+ $(call ExecuteWithLog, $(DTRACE_SUPPORT_DIR)/$(@F).d, \
+ ($(CPP) $(DTRACE_CPP_FLAGS) -I$(DTRACE_SUPPORT_DIR) $^ \
+ > $(DTRACE_SUPPORT_DIR)/$(@F).d))
+ $(call ExecuteWithLog, $@, $(DTRACE) $(DTRACE_FLAGS) -o $@ \
+ -s $(DTRACE_SUPPORT_DIR)/$(@F).d)
+ ifeq ($(OPENJDK_TARGET_CPU_ARCH), sparc)
+ $(call ExecuteWithLog, $@.elfedit, $(ELFEDIT) $(call GetElfeditCommands) $@)
+ endif
############################################################################
# Build the stand-alone dtrace libraries
@@ -178,7 +170,7 @@
LIBJVM_DTRACE_OUTPUTDIR := $(JVM_VARIANT_OUTPUTDIR)/libjvm_dtrace
$(eval $(call SetupNativeCompilation, BUILD_LIBJVM_DTRACE, \
- LIBRARY := jvm_dtrace, \
+ NAME := jvm_dtrace, \
OUTPUT_DIR := $(JVM_LIB_OUTPUTDIR), \
SRC := $(TOPDIR)/src/java.base/solaris/native/libjvm_dtrace, \
CFLAGS := -m64 -G -mt -KPIC, \
@@ -193,7 +185,7 @@
# Note that libjvm_db.c has tests for COMPILER2, but this was never set by
# the old build.
$(eval $(call SetupNativeCompilation, BUILD_LIBJVM_DB, \
- LIBRARY := jvm_db, \
+ NAME := jvm_db, \
OUTPUT_DIR := $(JVM_LIB_OUTPUTDIR), \
SRC := $(TOPDIR)/src/java.base/solaris/native/libjvm_db, \
CFLAGS := -I$(JVM_VARIANT_OUTPUTDIR)/gensrc -I$(DTRACE_SUPPORT_DIR) \
--- a/make/hotspot/lib/CompileDtracePreJvm.gmk Thu Mar 01 16:35:36 2018 -0500
+++ b/make/hotspot/lib/CompileDtracePreJvm.gmk Fri Mar 02 21:00:12 2018 +0100
@@ -1,5 +1,5 @@
#
-# Copyright (c) 2016, Oracle and/or its affiliates. All rights reserved.
+# Copyright (c) 2016, 2018, Oracle and/or its affiliates. All rights reserved.
# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
#
# This code is free software; you can redistribute it and/or modify it
@@ -29,8 +29,11 @@
# CompileJvm.gmk
DTRACE_OBJ := $(JVM_OUTPUTDIR)/objs/dtrace.o
DTRACE_JHELPER_OBJ := $(JVM_OUTPUTDIR)/objs/dtrace_jhelper.o
- JVM_OFFSETS_OBJ := $(JVM_OUTPUTDIR)/objs/JvmOffsets.o
+ DTRACE_EXTRA_OBJECT_FILES := $(DTRACE_OBJ) $(DTRACE_JHELPER_OBJ)
- DTRACE_EXTRA_OBJECT_FILES := $(DTRACE_OBJ) $(DTRACE_JHELPER_OBJ) $(JVM_OFFSETS_OBJ)
+ # Since we cannot generate JvmOffsets.cpp as part of the gensrc step,
+ # we need this special hook to get it to compile with the rest of libjvm.
+ JVM_OFFSETS_CPP := $(DTRACE_SUPPORT_DIR)/JvmOffsets.cpp
+ DTRACE_EXTRA_SOURCE_FILES := $(JVM_OFFSETS_CPP)
endif
endif
--- a/make/hotspot/lib/CompileGtest.gmk Thu Mar 01 16:35:36 2018 -0500
+++ b/make/hotspot/lib/CompileGtest.gmk Fri Mar 02 21:00:12 2018 +0100
@@ -63,8 +63,8 @@
# exclusive to the gtest libjvm.so.
$(eval $(call SetupNativeCompilation, BUILD_GTEST_LIBJVM, \
+ NAME := jvm, \
TOOLCHAIN := TOOLCHAIN_LINK_CXX, \
- LIBRARY := jvm, \
OUTPUT_DIR := $(JVM_OUTPUTDIR)/gtest, \
OBJECT_DIR := $(JVM_OUTPUTDIR)/gtest/objs, \
SRC := $(GTEST_TEST_SRC), \
@@ -81,8 +81,6 @@
CFLAGS_solaris := -DGTEST_HAS_EXCEPTIONS=0 -library=stlport4, \
CFLAGS_macosx := -DGTEST_OS_MAC=1, \
CFLAGS_aix := -qpic=large, \
- CFLAGS_DEBUG_SYMBOLS := $(JVM_CFLAGS_SYMBOLS), \
- CXXFLAGS_DEBUG_SYMBOLS := $(JVM_CFLAGS_SYMBOLS), \
DISABLED_WARNINGS_gcc := undef, \
DISABLED_WARNINGS_clang := undef switch format-nonliteral \
tautological-undefined-compare $(BUILD_LIBJVM_DISABLED_WARNINGS_clang), \
@@ -108,14 +106,13 @@
$(eval $(call SetupNativeCompilation, BUILD_GTEST_LAUNCHER, \
TOOLCHAIN := TOOLCHAIN_LINK_CXX, \
- PROGRAM := gtestLauncher, \
+ NAME := gtestLauncher, \
+ TYPE := EXECUTABLE, \
OUTPUT_DIR := $(JVM_OUTPUTDIR)/gtest, \
EXTRA_FILES := $(GTEST_LAUNCHER_SRC), \
OBJECT_DIR := $(JVM_OUTPUTDIR)/gtest/launcher-objs, \
CFLAGS := $(JVM_CFLAGS) -I$(GTEST_FRAMEWORK_SRC) \
-I$(GTEST_FRAMEWORK_SRC)/include, \
- CFLAGS_DEBUG_SYMBOLS := $(JVM_CFLAGS_SYMBOLS), \
- CXXFLAGS_DEBUG_SYMBOLS := $(JVM_CFLAGS_SYMBOLS), \
LDFLAGS := $(LDFLAGS_JDKEXE), \
LDFLAGS_unix := -L$(JVM_OUTPUTDIR)/gtest $(call SET_SHARED_LIBRARY_ORIGIN), \
LDFLAGS_solaris := -library=stlport4, \
--- a/make/hotspot/lib/CompileJvm.gmk Thu Mar 01 16:35:36 2018 -0500
+++ b/make/hotspot/lib/CompileJvm.gmk Fri Mar 02 21:00:12 2018 +0100
@@ -1,5 +1,5 @@
#
-# Copyright (c) 2013, 2017, Oracle and/or its affiliates. All rights reserved.
+# Copyright (c) 2013, 2018, Oracle and/or its affiliates. All rights reserved.
# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
#
# This code is free software; you can redistribute it and/or modify it
@@ -210,17 +210,16 @@
# Now set up the actual compilation of the main hotspot native library
$(eval $(call SetupNativeCompilation, BUILD_LIBJVM, \
+ NAME := jvm, \
TOOLCHAIN := TOOLCHAIN_LINK_CXX, \
- LIBRARY := jvm, \
OUTPUT_DIR := $(JVM_LIB_OUTPUTDIR), \
SRC := $(JVM_SRC_DIRS), \
+ EXTRA_FILES := $(DTRACE_EXTRA_SOURCE_FILES), \
EXCLUDES := $(JVM_EXCLUDES), \
EXCLUDE_FILES := $(JVM_EXCLUDE_FILES), \
EXCLUDE_PATTERNS := $(JVM_EXCLUDE_PATTERNS), \
EXTRA_OBJECT_FILES := $(DTRACE_EXTRA_OBJECT_FILES), \
CFLAGS := $(JVM_CFLAGS), \
- CFLAGS_DEBUG_SYMBOLS := $(JVM_CFLAGS_SYMBOLS), \
- CXXFLAGS_DEBUG_SYMBOLS := $(JVM_CFLAGS_SYMBOLS), \
vm_version.cpp_CXXFLAGS := $(CFLAGS_VM_VERSION), \
arguments.cpp_CXXFLAGS := $(CFLAGS_VM_VERSION), \
DISABLED_WARNINGS_clang := tautological-compare, \
--- a/make/hotspot/lib/CompileLibjsig.gmk Thu Mar 01 16:35:36 2018 -0500
+++ b/make/hotspot/lib/CompileLibjsig.gmk Fri Mar 02 21:00:12 2018 +0100
@@ -1,5 +1,5 @@
#
-# Copyright (c) 2013, 2017, Oracle and/or its affiliates. All rights reserved.
+# Copyright (c) 2013, 2018, Oracle and/or its affiliates. All rights reserved.
# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
#
# This code is free software; you can redistribute it and/or modify it
@@ -36,7 +36,7 @@
ifeq ($(STATIC_BUILD), false)
ifeq ($(OPENJDK_TARGET_OS), linux)
LIBJSIG_CFLAGS := -fPIC -D_GNU_SOURCE -D_REENTRANT $(EXTRA_CFLAGS)
- LIBJSIG_LDFLAGS := $(LDFLAGS_HASH_STYLE) ${LDFLAGS_NO_EXEC_STACK} $(EXTRA_CFLAGS)
+ LIBJSIG_LDFLAGS := $(LIBJSIG_HASHSTYLE_LDFLAGS) ${LIBJSIG_NOEXECSTACK_LDFLAGS} $(EXTRA_CFLAGS)
LIBJSIG_LIBS := $(LIBDL)
# NOTE: The old build compiled this library without -soname.
@@ -76,7 +76,7 @@
else ifeq ($(OPENJDK_TARGET_OS), macosx)
LIBJSIG_CFLAGS := -m64 -D_GNU_SOURCE -pthread -mno-omit-leaf-frame-pointer -mstack-alignment=16 -fPIC
- LIBJSIG_LDFLAGS := $(LDFLAGS_HASH_STYLE)
+ LIBJSIG_LDFLAGS := $(LIBJSIG_HASHSTYLE_LDFLAGS)
else
$(error Unknown target OS $(OPENJDK_TARGET_OS) in CompileLibjsig.gmk)
endif
@@ -90,7 +90,7 @@
LIB_OUTPUTDIR := $(call FindLibDirForModule, java.base)
$(eval $(call SetupNativeCompilation, BUILD_LIBJSIG, \
- LIBRARY := jsig, \
+ NAME := jsig, \
SRC := $(LIBJSIG_SRC_DIR), \
OUTPUT_DIR := $(LIB_OUTPUTDIR), \
LANG := C, \
--- a/make/hotspot/src/native/dtrace/generateJvmOffsets.cpp Thu Mar 01 16:35:36 2018 -0500
+++ b/make/hotspot/src/native/dtrace/generateJvmOffsets.cpp Fri Mar 02 21:00:12 2018 +0100
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2003, 2016, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2003, 2018, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
@@ -297,3 +297,30 @@
fflush(stdout);
return 0;
}
+
+const char *HELP =
+ "HELP: generateJvmOffsets {-header | -index | -table} \n";
+
+int main(int argc, const char *argv[]) {
+ GEN_variant gen_var;
+
+ if (argc != 2) {
+ printf("%s", HELP);
+ return 1;
+ }
+
+ if (0 == strcmp(argv[1], "-header")) {
+ gen_var = GEN_OFFSET;
+ }
+ else if (0 == strcmp(argv[1], "-index")) {
+ gen_var = GEN_INDEX;
+ }
+ else if (0 == strcmp(argv[1], "-table")) {
+ gen_var = GEN_TABLE;
+ }
+ else {
+ printf("%s", HELP);
+ return 1;
+ }
+ return generateJvmOffsets(gen_var);
+}
--- a/make/hotspot/src/native/dtrace/generateJvmOffsetsMain.c Thu Mar 01 16:35:36 2018 -0500
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,53 +0,0 @@
-/*
- * Copyright (c) 2003, 2010, Oracle and/or its affiliates. All rights reserved.
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * This code is free software; you can redistribute it and/or modify it
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
- * or visit www.oracle.com if you need additional information or have any
- * questions.
- *
- */
-
-
-#include "generateJvmOffsets.h"
-
-const char *HELP =
- "HELP: generateJvmOffsets {-header | -index | -table} \n";
-
-int main(int argc, const char *argv[]) {
- GEN_variant gen_var;
-
- if (argc != 2) {
- printf("%s", HELP);
- return 1;
- }
-
- if (0 == strcmp(argv[1], "-header")) {
- gen_var = GEN_OFFSET;
- }
- else if (0 == strcmp(argv[1], "-index")) {
- gen_var = GEN_INDEX;
- }
- else if (0 == strcmp(argv[1], "-table")) {
- gen_var = GEN_TABLE;
- }
- else {
- printf("%s", HELP);
- return 1;
- }
- return generateJvmOffsets(gen_var);
-}
--- a/make/jdk/src/classes/build/tools/jigsaw/GenGraphs.java Thu Mar 01 16:35:36 2018 -0500
+++ b/make/jdk/src/classes/build/tools/jigsaw/GenGraphs.java Fri Mar 02 21:00:12 2018 +0100
@@ -142,6 +142,7 @@
ranks.add(Set.of("java.logging", "java.scripting", "java.xml"));
ranks.add(Set.of("java.sql"));
+ ranks.add(Set.of("java.transaction.xa"));
ranks.add(Set.of("java.compiler", "java.instrument"));
ranks.add(Set.of("java.desktop", "java.management"));
--- a/make/jdk/src/classes/build/tools/jigsaw/technology-summary.html Thu Mar 01 16:35:36 2018 -0500
+++ b/make/jdk/src/classes/build/tools/jigsaw/technology-summary.html Fri Mar 02 21:00:12 2018 +0100
@@ -20,8 +20,8 @@
<table>
<tr><th>Legend</th></tr>
-<tr class="se-base"><td><a href="https://jcp.org/en/jsr/platform?listBy=2&listByType=platform">JCP technology in the Java SE Platform only -- in java.base</a></td></tr>
-<tr class="se-misc"><td><a href="https://jcp.org/en/jsr/platform?listBy=2&listByType=platform">JCP technology in the Java SE Platform only -- not in java.base</a></td></tr>
+<tr class="se-base"><td><a href="https://jcp.org/en/jsr/platform?listBy=2&listByType=platform">JCP technology in the Java SE Platform -- in java.base</a></td></tr>
+<tr class="se-misc"><td><a href="https://jcp.org/en/jsr/platform?listBy=2&listByType=platform">JCP technology in the Java SE Platform -- not in java.base</a></td></tr>
<tr class="se-ext"><td><a href="http://docs.oracle.com/javase/8/docs/technotes/guides/standards/#endorsed-standards-apis">JCP technology in the Java SE Platform derived from non-JCP standards</a></a></td></tr>
<tr class="non-se"><td>JCP technology not included in the Java SE Platform</td></tr>
</table>
@@ -402,10 +402,10 @@
<td></td>
</tr>
<tr class="se-misc">
-<td><a href="https://jcp.org/en/jsr/detail?id=907">907</a></td>
+<td>---</td>
<td>JTA (XA)</td>
-<td>Original JSR</td>
-<td><a href="module-summary.html#java.sql">java.sql</a></td>
+<td>UJSR for Java SE</td>
+<td><a href="module-summary.html#java.transaction.xa">java.transaction.xa</a></td>
<td>plat</td>
<td>No</td>
<td>Formerly a <a href="http://docs.oracle.com/javase/8/docs/technotes/guides/standards/#standalone-technologies">Standalone Technology</a> (unlisted)</td>
--- a/make/jdk/src/classes/build/tools/taglet/ExtLink.java Thu Mar 01 16:35:36 2018 -0500
+++ b/make/jdk/src/classes/build/tools/taglet/ExtLink.java Fri Mar 02 21:00:12 2018 +0100
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2017, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2017, 2018, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
@@ -49,14 +49,14 @@
* will produce the following html
* <p>
* {@code
- * Please see <a href="https://www.oracle.com/pls/topic/lookup?ctx=javase9&id=Borealis">a spectacular</a> sight.
+ * Please see <a href="https://www.oracle.com/pls/topic/lookup?ctx=javase10&id=Borealis">a spectacular</a> sight.
* }
*/
public class ExtLink implements Taglet {
static final String TAG_NAME = "extLink";
- static final String URL = "https://www.oracle.com/pls/topic/lookup?ctx=javase9&id=";
+ static final String URL = "https://www.oracle.com/pls/topic/lookup?ctx=javase10&id=";
static final Pattern TAG_PATTERN = Pattern.compile("(?s)(\\s*)(?<name>\\w+)(\\s+)(?<desc>.*)$");
--- a/make/jdk/src/classes/build/tools/x11wrappergen/WrapperGenerator.java Thu Mar 01 16:35:36 2018 -0500
+++ b/make/jdk/src/classes/build/tools/x11wrappergen/WrapperGenerator.java Fri Mar 02 21:00:12 2018 +0100
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2003, 2013, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2003, 2018, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
@@ -1109,7 +1109,6 @@
}
public void writeJavaWrapperClass(String outputDir) {
-// (new File(outputDir, package_path)).mkdirs();
try {
for (Enumeration e = symbolTable.elements() ; e.hasMoreElements() ;) {
BaseType tp = (BaseType) e.nextElement();
@@ -1126,7 +1125,6 @@
}
}
-
public void writeNativeSizer(String file)
{
int type;
@@ -1136,7 +1134,6 @@
StructType stp;
Enumeration eo;
-
try {
FileOutputStream fs = new FileOutputStream(file);
@@ -1158,7 +1155,6 @@
pw.println(" unsigned long status;\n");
pw.println("} PropMwmHints;\n");
-
pw.println("\n\nint main(){");
j=0;
for ( eo = symbolTable.elements() ; eo.hasMoreElements() ;) {
@@ -1182,7 +1178,6 @@
pw.println("printf(\"Atom\t%d\\n\",(int)sizeof(Atom));");
pw.println("printf(\"Window\t%d\\n\",(int)sizeof(Window));");
-
for (eo = symbolTable.elements() ; eo.hasMoreElements() ;) {
@@ -1234,7 +1229,8 @@
symbolTable.put("Atom", new AtomicType(AtomicType.TYPE_ATOM, "", "Atom"));
symbolTable.put("ulong", new AtomicType(AtomicType.TYPE_ULONG, "", "ulong"));
}
- public WrapperGenerator(String outputDir, String xlibFilename) {
+
+ public WrapperGenerator(String xlibFilename) {
initTypes();
try {
BufferedReader in = new BufferedReader(new FileReader(xlibFilename));
@@ -1303,33 +1299,19 @@
catch (Exception e) {
e.printStackTrace();
}
+ }
- }
- private void makeSizer(String outputDir) {
- if (wide) {
- sizerFileName = "sizer.64.c";
- } else {
- sizerFileName = "sizer.32.c";
- }
- File fp = new File(outputDir, sizerFileName);
+ private void makeSizer(String sizerFileName) {
+ File fp = new File(sizerFileName);
writeNativeSizer(fp.getAbsolutePath());
}
- private boolean readSizeInfo(String sizeInfo) {
+
+ private boolean readFileSizeInfo(String filename, boolean wide) {
try {
- File f = new File(sizeInfo+".32");
boolean res = true;
- FileInputStream fis = null;
- if (f.exists()) {
- fis = new FileInputStream(f);
- res = readSizeInfo(fis, false);
- fis.close();
- }
- f = new File(sizeInfo+".64");
- if (f.exists()) {
- fis = new FileInputStream(f);
- res &= readSizeInfo(fis, true);
- fis.close();
- }
+ FileInputStream fis = new FileInputStream(filename);
+ res = readSizeInfo(fis, wide);
+ fis.close();
return res;
} catch (Exception e) {
e.printStackTrace();
@@ -1337,8 +1319,8 @@
}
}
- private void startGeneration(String outputDir, String sizeInfo) {
- if (readSizeInfo(sizeInfo))
+ private void startGeneration(String outputDir, String filename, boolean wide) {
+ if (readFileSizeInfo(filename, wide))
{
writeJavaWrapperClass(outputDir);
}
@@ -1348,21 +1330,22 @@
}
public static void main(String[] args) {
+ if (args.length < 4) {
+ System.out.println("Usage:\nWrapperGenerator gen_java <output_dir> <xlibtypes.txt> <sizes-*.txt> <platform>");
+ System.out.println(" or");
+ System.out.println("WrapperGenerator gen_c_source <output_file> <xlibtypes.txt> <platform>");
+ System.out.println("Where <platform>: 32, 64");
- if (args.length < 4) {
- System.out.println("Usage:\nWrapperGenerator <output_dir> <xlibtypes.txt> <action> [<platform> | <sizes info file>]");
- System.out.println("Where <action>: gen, sizer");
- System.out.println(" <platform>: 32, 64");
System.exit(1);
}
- WrapperGenerator xparser = new WrapperGenerator(args[0], args[1]);
- if (args[2].equals("sizer")) {
+ WrapperGenerator xparser = new WrapperGenerator(args[2]);
+ if (args[0].equals("gen_c_source")) {
xparser.wide = args[3].equals("64");
- xparser.makeSizer(args[0]);
- } else if (args[2].equals("gen")) {
- xparser.startGeneration(args[0], args[3]);
+ xparser.makeSizer(args[1]);
+ } else if (args[0].equals("gen_java")) {
+ boolean wide = args[4].equals("64");
+ xparser.startGeneration(args[1], args[3], wide);
}
}
-
}
--- a/make/langtools/tools/crules/AbstractCodingRulesAnalyzer.java Thu Mar 01 16:35:36 2018 -0500
+++ b/make/langtools/tools/crules/AbstractCodingRulesAnalyzer.java Fri Mar 02 21:00:12 2018 +0100
@@ -4,7 +4,9 @@
*
* 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
--- a/make/langtools/tools/crules/AssertCheckAnalyzer.java Thu Mar 01 16:35:36 2018 -0500
+++ b/make/langtools/tools/crules/AssertCheckAnalyzer.java Fri Mar 02 21:00:12 2018 +0100
@@ -4,7 +4,9 @@
*
* 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
--- a/make/langtools/tools/crules/CodingRulesAnalyzerPlugin.java Thu Mar 01 16:35:36 2018 -0500
+++ b/make/langtools/tools/crules/CodingRulesAnalyzerPlugin.java Fri Mar 02 21:00:12 2018 +0100
@@ -4,7 +4,9 @@
*
* 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
--- a/make/langtools/tools/crules/DefinedByAnalyzer.java Thu Mar 01 16:35:36 2018 -0500
+++ b/make/langtools/tools/crules/DefinedByAnalyzer.java Fri Mar 02 21:00:12 2018 +0100
@@ -4,7 +4,9 @@
*
* 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
--- a/make/langtools/tools/crules/LegacyLogMethodAnalyzer.java Thu Mar 01 16:35:36 2018 -0500
+++ b/make/langtools/tools/crules/LegacyLogMethodAnalyzer.java Fri Mar 02 21:00:12 2018 +0100
@@ -4,7 +4,9 @@
*
* 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
--- a/make/langtools/tools/crules/MutableFieldsAnalyzer.java Thu Mar 01 16:35:36 2018 -0500
+++ b/make/langtools/tools/crules/MutableFieldsAnalyzer.java Fri Mar 02 21:00:12 2018 +0100
@@ -4,7 +4,9 @@
*
* 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
--- a/make/langtools/tools/propertiesparser/gen/ClassGenerator.java Thu Mar 01 16:35:36 2018 -0500
+++ b/make/langtools/tools/propertiesparser/gen/ClassGenerator.java Fri Mar 02 21:00:12 2018 +0100
@@ -4,7 +4,9 @@
*
* 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
--- a/make/langtools/tools/propertiesparser/parser/Message.java Thu Mar 01 16:35:36 2018 -0500
+++ b/make/langtools/tools/propertiesparser/parser/Message.java Fri Mar 02 21:00:12 2018 +0100
@@ -4,7 +4,9 @@
*
* 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
--- a/make/langtools/tools/propertiesparser/parser/MessageFile.java Thu Mar 01 16:35:36 2018 -0500
+++ b/make/langtools/tools/propertiesparser/parser/MessageFile.java Fri Mar 02 21:00:12 2018 +0100
@@ -4,7 +4,9 @@
*
* 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
--- a/make/langtools/tools/propertiesparser/parser/MessageInfo.java Thu Mar 01 16:35:36 2018 -0500
+++ b/make/langtools/tools/propertiesparser/parser/MessageInfo.java Fri Mar 02 21:00:12 2018 +0100
@@ -4,7 +4,9 @@
*
* 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
--- a/make/langtools/tools/propertiesparser/parser/MessageLine.java Thu Mar 01 16:35:36 2018 -0500
+++ b/make/langtools/tools/propertiesparser/parser/MessageLine.java Fri Mar 02 21:00:12 2018 +0100
@@ -4,7 +4,9 @@
*
* 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
--- a/make/langtools/tools/propertiesparser/parser/MessageType.java Thu Mar 01 16:35:36 2018 -0500
+++ b/make/langtools/tools/propertiesparser/parser/MessageType.java Fri Mar 02 21:00:12 2018 +0100
@@ -4,7 +4,9 @@
*
* 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
--- a/make/launcher/Launcher-java.base.gmk Thu Mar 01 16:35:36 2018 -0500
+++ b/make/launcher/Launcher-java.base.gmk Fri Mar 02 21:00:12 2018 +0100
@@ -1,5 +1,5 @@
#
-# Copyright (c) 2011, 2017, Oracle and/or its affiliates. All rights reserved.
+# Copyright (c) 2011, 2018, Oracle and/or its affiliates. All rights reserved.
# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
#
# This code is free software; you can redistribute it and/or modify it
@@ -73,6 +73,8 @@
ifeq ($(OPENJDK_TARGET_OS), linux)
$(eval $(call SetupNativeCompilation, BUILD_JEXEC, \
+ NAME := jexec, \
+ TYPE := EXECUTABLE, \
SRC := $(TOPDIR)/src/$(MODULE)/unix/native/launcher, \
INCLUDE_FILES := jexec.c, \
OPTIMIZATION := LOW, \
@@ -83,7 +85,6 @@
LDFLAGS := $(LDFLAGS_JDKEXE), \
OBJECT_DIR := $(SUPPORT_OUTPUTDIR)/native/$(MODULE)/jexec_obj, \
OUTPUT_DIR := $(SUPPORT_OUTPUTDIR)/modules_libs/$(MODULE), \
- PROGRAM := jexec, \
))
TARGETS += $(BUILD_JEXEC)
@@ -93,6 +94,8 @@
ifneq ($(findstring $(OPENJDK_TARGET_OS), macosx solaris aix), )
$(eval $(call SetupNativeCompilation, BUILD_JSPAWNHELPER, \
+ NAME := jspawnhelper, \
+ TYPE := EXECUTABLE, \
SRC := $(TOPDIR)/src/$(MODULE)/unix/native/jspawnhelper, \
OPTIMIZATION := LOW, \
CFLAGS := $(CFLAGS_JDKEXE) -I$(TOPDIR)/src/$(MODULE)/unix/native/libjava, \
@@ -100,7 +103,6 @@
LDFLAGS := $(LDFLAGS_JDKEXE), \
OBJECT_DIR := $(SUPPORT_OUTPUTDIR)/native/$(MODULE)/jspawnhelper, \
OUTPUT_DIR := $(SUPPORT_OUTPUTDIR)/modules_libs/$(MODULE), \
- PROGRAM := jspawnhelper, \
))
TARGETS += $(BUILD_JSPAWNHELPER)
--- a/make/launcher/Launcher-jdk.accessibility.gmk Thu Mar 01 16:35:36 2018 -0500
+++ b/make/launcher/Launcher-jdk.accessibility.gmk Fri Mar 02 21:00:12 2018 +0100
@@ -1,5 +1,5 @@
#
-# Copyright (c) 2014, 2016, Oracle and/or its affiliates. All rights reserved.
+# Copyright (c) 2014, 2018, Oracle and/or its affiliates. All rights reserved.
# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
#
# This code is free software; you can redistribute it and/or modify it
@@ -33,7 +33,9 @@
JABSWITCH_SRC := $(TOPDIR)/src/jdk.accessibility/windows/native/jabswitch
ACCESSBRIDGE_SRC := $(TOPDIR)/src/jdk.accessibility/windows/native/common
- $(eval $(call SetupNativeCompilation,BUILD_JABSWITCH, \
+ $(eval $(call SetupNativeCompilation, BUILD_JABSWITCH, \
+ NAME := jabswitch, \
+ TYPE := EXECUTABLE, \
SRC := $(JABSWITCH_SRC), \
INCLUDE_FILES := jabswitch.cpp, \
CFLAGS := $(filter-out -Zc:wchar_t-, $(CFLAGS_JDKEXE)) -Zc:wchar_t \
@@ -44,7 +46,6 @@
LIBS := advapi32.lib version.lib user32.lib, \
OBJECT_DIR := $(SUPPORT_OUTPUTDIR)/native/jdk.accessibility/jabswitch, \
OUTPUT_DIR := $(SUPPORT_OUTPUTDIR)/modules_cmds/jdk.accessibility, \
- PROGRAM := jabswitch, \
VERSIONINFO_RESOURCE := $(ACCESSBRIDGE_SRC)/AccessBridgeStatusWindow.RC, \
RC_FLAGS := $(RC_FLAGS) \
-D "JDK_FNAME=jabswitch.exe" \
@@ -70,6 +71,8 @@
# Parameter 2 ACCESSBRIDGE_ARCH_ -D suffix
$$(eval $$(call SetupNativeCompilation, BUILD_JACCESSINSPECTOR$1, \
+ NAME := jaccessinspector$1, \
+ TYPE := EXECUTABLE, \
SRC := $(TOPDIR)/jaccessinspector $(TOPDIR)/common \
$(TOPDIR)/toolscommon $(TOPDIR)/bridge, \
CFLAGS := $$(CFLAGS_JDKEXE) $(TOOLS_CFLAGS) -DACCESSBRIDGE_ARCH_$2 -EHsc, \
@@ -77,7 +80,6 @@
LIBS := advapi32.lib user32.lib, \
OBJECT_DIR := $(SUPPORT_OUTPUTDIR)/native/jdk.accessibility/jaccessinspector$1, \
OUTPUT_DIR := $(SUPPORT_OUTPUTDIR)/modules_cmds/jdk.accessibility, \
- PROGRAM := jaccessinspector$1, \
VERSIONINFO_RESOURCE := $(TOPDIR)/jaccessinspector/jaccessinspectorWindow.rc, \
RC_FLAGS := $$(RC_FLAGS) \
-D "JDK_FNAME=jaccessinspector$1.exe" \
@@ -96,7 +98,9 @@
# Parameter 1 File name suffix
# Parameter 2 ACCESSBRIDGE_ARCH_ -D suffix
- $$(eval $$(call SetupNativeCompilation,BUILD_JACCESSWALKER$1, \
+ $$(eval $$(call SetupNativeCompilation, BUILD_JACCESSWALKER$1, \
+ NAME := jaccesswalker$1, \
+ TYPE := EXECUTABLE, \
SRC := $(TOPDIR)/jaccesswalker $(TOPDIR)/common \
$(TOPDIR)/toolscommon $(TOPDIR)/bridge, \
CFLAGS := $$(CFLAGS_JDKEXE) $(TOOLS_CFLAGS) -DACCESSBRIDGE_ARCH_$2 -EHsc, \
@@ -104,7 +108,6 @@
LIBS := advapi32.lib comctl32.lib gdi32.lib user32.lib, \
OBJECT_DIR := $(SUPPORT_OUTPUTDIR)/native/jdk.accessibility/jaccesswalker$1, \
OUTPUT_DIR := $(SUPPORT_OUTPUTDIR)/modules_cmds/jdk.accessibility, \
- PROGRAM := jaccesswalker$1, \
VERSIONINFO_RESOURCE := $(TOPDIR)/jaccesswalker/jaccesswalkerWindow.rc, \
RC_FLAGS := $$(RC_FLAGS) \
-D "JDK_FNAME=jaccesswalker$1.exe" \
--- a/make/launcher/Launcher-jdk.pack.gmk Thu Mar 01 16:35:36 2018 -0500
+++ b/make/launcher/Launcher-jdk.pack.gmk Fri Mar 02 21:00:12 2018 +0100
@@ -1,5 +1,5 @@
#
-# Copyright (c) 2011, 2016, Oracle and/or its affiliates. All rights reserved.
+# Copyright (c) 2011, 2018, Oracle and/or its affiliates. All rights reserved.
# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
#
# This code is free software; you can redistribute it and/or modify it
@@ -73,7 +73,9 @@
UNPACK_MAPFILE := $(UNPACK_MAPFILE_DIR)/mapfile-vers-unpack200
endif
-$(eval $(call SetupNativeCompilation,BUILD_UNPACKEXE, \
+$(eval $(call SetupNativeCompilation, BUILD_UNPACKEXE, \
+ NAME := unpack200, \
+ TYPE := EXECUTABLE, \
SRC := $(UNPACKEXE_SRC), \
TOOLCHAIN := TOOLCHAIN_LINK_CXX, \
OPTIMIZATION := LOW, \
@@ -91,7 +93,6 @@
LIBS_solaris := -lc, \
OBJECT_DIR := $(SUPPORT_OUTPUTDIR)/native/$(MODULE)/unpackexe, \
OUTPUT_DIR := $(SUPPORT_OUTPUTDIR)/modules_cmds/$(MODULE), \
- PROGRAM := unpack200, \
VERSIONINFO_RESOURCE := $(GLOBAL_VERSION_INFO_RESOURCE), \
RC_FLAGS := $(RC_FLAGS) \
-D "JDK_FNAME=unpack200.exe" \
--- a/make/launcher/LauncherCommon.gmk Thu Mar 01 16:35:36 2018 -0500
+++ b/make/launcher/LauncherCommon.gmk Fri Mar 02 21:00:12 2018 +0100
@@ -1,5 +1,5 @@
#
-# Copyright (c) 2011, 2016, Oracle and/or its affiliates. All rights reserved.
+# Copyright (c) 2011, 2018, Oracle and/or its affiliates. All rights reserved.
# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
#
# This code is free software; you can redistribute it and/or modify it
@@ -183,6 +183,8 @@
endif
$$(eval $$(call SetupNativeCompilation, BUILD_LAUNCHER_$1, \
+ NAME := $1, \
+ TYPE := EXECUTABLE, \
EXTRA_FILES := $(LAUNCHER_SRC)/main.c, \
OPTIMIZATION := $$($1_OPTIMIZATION), \
CFLAGS := $$($1_CFLAGS) \
@@ -211,7 +213,6 @@
$$($1_LIBS_windows), \
OBJECT_DIR := $(SUPPORT_OUTPUTDIR)/native/$(MODULE)/$1_objs, \
OUTPUT_DIR := $$($1_OUTPUT_DIR), \
- PROGRAM := $1, \
VERSIONINFO_RESOURCE := $$($1_VERSION_INFO_RESOURCE), \
RC_FLAGS := $$(RC_FLAGS) \
-D "JDK_FNAME=$1$(EXE_SUFFIX)" \
--- a/make/lib/Awt2dLibraries.gmk Thu Mar 01 16:35:36 2018 -0500
+++ b/make/lib/Awt2dLibraries.gmk Fri Mar 02 21:00:12 2018 +0100
@@ -1,5 +1,5 @@
#
-# Copyright (c) 2011, 2016, Oracle and/or its affiliates. All rights reserved.
+# Copyright (c) 2011, 2018, Oracle and/or its affiliates. All rights reserved.
# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
#
# This code is free software; you can redistribute it and/or modify it
@@ -48,8 +48,8 @@
BUILD_LIBMLIB_LDLIBS += $(LIBM) $(LIBDL)
endif
-$(eval $(call SetupNativeCompilation,BUILD_LIBMLIB_IMAGE, \
- LIBRARY := mlib_image, \
+$(eval $(call SetupNativeCompilation, BUILD_LIBMLIB_IMAGE, \
+ NAME := mlib_image, \
OUTPUT_DIR := $(INSTALL_LIBRARIES_HERE), \
SRC := $(BUILD_LIBMLIB_SRC), \
EXCLUDE_FILES := mlib_c_ImageBlendTable.c, \
@@ -107,8 +107,8 @@
LIBMLIB_IMAGE_V_CFLAGS += $(filter-out -DMLIB_NO_LIBSUNMATH, $(BUILD_LIBMLIB_CFLAGS))
- $(eval $(call SetupNativeCompilation,BUILD_LIBMLIB_IMAGE_V, \
- LIBRARY := mlib_image_v, \
+ $(eval $(call SetupNativeCompilation, BUILD_LIBMLIB_IMAGE_V, \
+ NAME := mlib_image_v, \
OUTPUT_DIR := $(INSTALL_LIBRARIES_HERE), \
SRC := $(LIBMLIB_IMAGE_V_SRC), \
EXCLUDE_FILES := $(BUILD_LIBMLIB_IMAGE_V_EXFILES), \
@@ -226,8 +226,8 @@
LIBAWT_CFLAGS += -fgcse-after-reload
endif
-$(eval $(call SetupNativeCompilation,BUILD_LIBAWT, \
- LIBRARY := awt, \
+$(eval $(call SetupNativeCompilation, BUILD_LIBAWT, \
+ NAME := awt, \
OUTPUT_DIR := $(INSTALL_LIBRARIES_HERE), \
SRC := $(LIBAWT_DIRS), \
EXCLUDES := $(LIBAWT_EXCLUDES), \
@@ -347,8 +347,8 @@
BUILD_LIBAWT_XAWT_debug_mem.c_CFLAGS := -w
endif
- $(eval $(call SetupNativeCompilation,BUILD_LIBAWT_XAWT, \
- LIBRARY := awt_xawt, \
+ $(eval $(call SetupNativeCompilation, BUILD_LIBAWT_XAWT, \
+ NAME := awt_xawt, \
OUTPUT_DIR := $(INSTALL_LIBRARIES_HERE), \
SRC := $(LIBAWT_XAWT_DIRS), \
EXCLUDES := $(LIBAWT_XAWT_EXCLUDES), \
@@ -406,8 +406,8 @@
LIBLCMS_CPPFLAGS += $(addprefix -I, $(LIBLCMS_SRC))
endif
-$(eval $(call SetupNativeCompilation,BUILD_LIBLCMS, \
- LIBRARY := lcms, \
+$(eval $(call SetupNativeCompilation, BUILD_LIBLCMS, \
+ NAME := lcms, \
OUTPUT_DIR := $(INSTALL_LIBRARIES_HERE), \
SRC := $(LIBLCMS_SRC), \
INCLUDE_FILES := $(BUILD_LIBLCMS_INCLUDE_FILES), \
@@ -483,8 +483,8 @@
BUILD_LIBJAVAJPEG_HEADERS := $(addprefix -I, $(LIBJAVAJPEG_SRC))
endif
-$(eval $(call SetupNativeCompilation,BUILD_LIBJAVAJPEG, \
- LIBRARY := javajpeg, \
+$(eval $(call SetupNativeCompilation, BUILD_LIBJAVAJPEG, \
+ NAME := javajpeg, \
OUTPUT_DIR := $(INSTALL_LIBRARIES_HERE), \
SRC := $(LIBJAVAJPEG_SRC), \
INCLUDE_FILES := $(BUILD_LIBJAVAJPEG_INCLUDE_FILES), \
@@ -547,8 +547,8 @@
endif
endif
- $(eval $(call SetupNativeCompilation,BUILD_LIBAWT_HEADLESS, \
- LIBRARY := awt_headless, \
+ $(eval $(call SetupNativeCompilation, BUILD_LIBAWT_HEADLESS, \
+ NAME := awt_headless, \
OUTPUT_DIR := $(INSTALL_LIBRARIES_HERE), \
SRC := $(LIBAWT_HEADLESS_DIRS), \
EXCLUDES := $(LIBAWT_HEADLESS_EXCLUDES), \
@@ -657,8 +657,8 @@
BUILD_LIBFONTMANAGER_ExtensionSubtables.cpp_CXXFLAGS := -fno-strict-aliasing
endif
-$(eval $(call SetupNativeCompilation,BUILD_LIBFONTMANAGER, \
- LIBRARY := fontmanager, \
+$(eval $(call SetupNativeCompilation, BUILD_LIBFONTMANAGER, \
+ NAME := fontmanager, \
OUTPUT_DIR := $(SUPPORT_OUTPUTDIR)/native/$(MODULE)/libfontmanager, \
SRC := $(LIBFONTMANAGER_SRC), \
EXCLUDE_FILES := $(LIBFONTMANAGER_EXCLUDE_FILES) \
@@ -691,7 +691,7 @@
LIBS := $(BUILD_LIBFONTMANAGER_FONTLIB), \
LIBS_unix := -lawt -ljava -ljvm $(LIBM) $(LIBCXX), \
LIBS_linux := -lc, \
- LIBS_solaris := -lawt_headless -lc, \
+ LIBS_solaris := -lc, \
LIBS_aix := -lawt_headless,\
LIBS_windows := $(WIN_JAVA_LIB) advapi32.lib user32.lib gdi32.lib \
$(WIN_AWT_LIB), \
@@ -744,8 +744,8 @@
ifeq ($(OPENJDK_TARGET_CPU), x86)
KERNEL32_LIB := kernel32.lib
endif
- $(eval $(call SetupNativeCompilation,BUILD_LIBJAWT, \
- LIBRARY := jawt, \
+ $(eval $(call SetupNativeCompilation, BUILD_LIBJAWT, \
+ NAME := jawt, \
OUTPUT_DIR := $(INSTALL_LIBRARIES_HERE), \
SRC := $(LIBJAWT_SRC), \
INCLUDE_FILES := $(LIBJAWT_INCLUDE_FILES), \
@@ -804,8 +804,8 @@
endif
endif
- $(eval $(call SetupNativeCompilation,BUILD_LIBJAWT, \
- LIBRARY := jawt, \
+ $(eval $(call SetupNativeCompilation, BUILD_LIBJAWT, \
+ NAME := jawt, \
OUTPUT_DIR := $(INSTALL_LIBRARIES_HERE), \
SRC := $(LIBJAWT_SRC), \
INCLUDE_FILES := $(JAWT_FILES), \
@@ -935,8 +935,8 @@
LIBSPLASHSCREEN_LIBS += $(X_LIBS) -lX11 -lXext $(LIBM) -lpthread -ldl
endif
- $(eval $(call SetupNativeCompilation,BUILD_LIBSPLASHSCREEN, \
- LIBRARY := splashscreen, \
+ $(eval $(call SetupNativeCompilation, BUILD_LIBSPLASHSCREEN, \
+ NAME := splashscreen, \
OUTPUT_DIR := $(INSTALL_LIBRARIES_HERE), \
SRC := $(LIBSPLASHSCREEN_DIRS), \
EXCLUDE_FILES := imageioJPEG.c jpegdecoder.c pngtest.c, \
@@ -1008,8 +1008,8 @@
LIBAWT_LWAWT_EXFILES := fontpath.c awt_Font.c X11Color.c
LIBAWT_LWAWT_EXCLUDES := $(TOPDIR)/src/java.desktop/unix/native/common/awt/medialib
- $(eval $(call SetupNativeCompilation,BUILD_LIBAWT_LWAWT, \
- LIBRARY := awt_lwawt, \
+ $(eval $(call SetupNativeCompilation, BUILD_LIBAWT_LWAWT, \
+ NAME := awt_lwawt, \
OUTPUT_DIR := $(INSTALL_LIBRARIES_HERE), \
SRC := $(LIBAWT_LWAWT_DIRS), \
INCLUDE_FILES := $(LIBAWT_LWAWT_FILES), \
@@ -1057,8 +1057,8 @@
ifeq ($(OPENJDK_TARGET_OS), macosx)
- $(eval $(call SetupNativeCompilation,BUILD_LIBOSXUI, \
- LIBRARY := osxui, \
+ $(eval $(call SetupNativeCompilation, BUILD_LIBOSXUI, \
+ NAME := osxui, \
OUTPUT_DIR := $(INSTALL_LIBRARIES_HERE), \
SRC := $(TOPDIR)/src/java.desktop/macosx/native/libosxui, \
OPTIMIZATION := LOW, \
--- a/make/lib/CoreLibraries.gmk Thu Mar 01 16:35:36 2018 -0500
+++ b/make/lib/CoreLibraries.gmk Fri Mar 02 21:00:12 2018 +0100
@@ -1,5 +1,5 @@
#
-# Copyright (c) 2011, 2016, Oracle and/or its affiliates. All rights reserved.
+# Copyright (c) 2011, 2018, Oracle and/or its affiliates. All rights reserved.
# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
#
# This code is free software; you can redistribute it and/or modify it
@@ -55,8 +55,9 @@
LIBFDLIBM_CFLAGS := -I$(LIBFDLIBM_SRC)
ifneq ($(OPENJDK_TARGET_OS), macosx)
- $(eval $(call SetupNativeCompilation,BUILD_LIBFDLIBM, \
- STATIC_LIBRARY := fdlibm, \
+ $(eval $(call SetupNativeCompilation, BUILD_LIBFDLIBM, \
+ NAME := fdlibm, \
+ TYPE := STATIC_LIBRARY, \
OUTPUT_DIR := $(SUPPORT_OUTPUTDIR)/native/$(MODULE), \
SRC := $(LIBFDLIBM_SRC), \
OPTIMIZATION := $(BUILD_LIBFDLIBM_OPTIMIZATION), \
@@ -77,8 +78,8 @@
# On macosx the old build does partial (incremental) linking of fdlibm instead of
# a plain static library.
- $(eval $(call SetupNativeCompilation,BUILD_LIBFDLIBM_MAC, \
- LIBRARY := fdlibm, \
+ $(eval $(call SetupNativeCompilation, BUILD_LIBFDLIBM_MAC, \
+ NAME := fdlibm, \
OUTPUT_DIR := $(SUPPORT_OUTPUTDIR)/native/$(MODULE)/libfdlibm, \
SRC := $(LIBFDLIBM_SRC), \
CFLAGS := $(CFLAGS_JDKLIB) $(LIBFDLIBM_CFLAGS), \
@@ -107,8 +108,8 @@
endif
endif
-$(eval $(call SetupNativeCompilation,BUILD_LIBVERIFY, \
- LIBRARY := verify, \
+$(eval $(call SetupNativeCompilation, BUILD_LIBVERIFY, \
+ NAME := verify, \
OUTPUT_DIR := $(INSTALL_LIBRARIES_HERE), \
SRC := $(TOPDIR)/src/java.base/share/native/libverify, \
OPTIMIZATION := $(LIBVERIFY_OPTIMIZATION), \
@@ -155,8 +156,8 @@
endif
endif
-$(eval $(call SetupNativeCompilation,BUILD_LIBJAVA, \
- LIBRARY := java, \
+$(eval $(call SetupNativeCompilation, BUILD_LIBJAVA, \
+ NAME := java, \
OUTPUT_DIR := $(INSTALL_LIBRARIES_HERE), \
SRC := $(LIBJAVA_SRC_DIRS), \
OPTIMIZATION := HIGH, \
@@ -218,8 +219,8 @@
BUILD_LIBZIP_MMAP := -DUSE_MMAP
endif
-$(eval $(call SetupNativeCompilation,BUILD_LIBZIP, \
- LIBRARY := zip, \
+$(eval $(call SetupNativeCompilation, BUILD_LIBZIP, \
+ NAME := zip, \
OUTPUT_DIR := $(INSTALL_LIBRARIES_HERE), \
OPTIMIZATION := LOW, \
SRC := $(TOPDIR)/src/java.base/share/native/libzip, \
@@ -262,8 +263,8 @@
-I$(SUPPORT_OUTPUTDIR)/headers/java.base \
#
-$(eval $(call SetupNativeCompilation,BUILD_LIBJIMAGE, \
- LIBRARY := jimage, \
+$(eval $(call SetupNativeCompilation, BUILD_LIBJIMAGE, \
+ NAME := jimage, \
TOOLCHAIN := TOOLCHAIN_LINK_CXX, \
OUTPUT_DIR := $(INSTALL_LIBRARIES_HERE), \
OPTIMIZATION := LOW, \
@@ -358,8 +359,8 @@
)
endif
-$(eval $(call SetupNativeCompilation,BUILD_LIBJLI, \
- LIBRARY := jli, \
+$(eval $(call SetupNativeCompilation, BUILD_LIBJLI, \
+ NAME := jli, \
OUTPUT_DIR := $(LIBJLI_OUTPUT_DIR), \
SRC := $(LIBJLI_SRC_DIRS), \
EXCLUDE_FILES := $(LIBJLI_EXCLUDE_FILES), \
@@ -415,8 +416,9 @@
# with the shared library, so the static library is given a different name. No harm
# in doing it for all platform to reduce complexity.
ifeq ($(OPENJDK_TARGET_OS), windows)
- $(eval $(call SetupNativeCompilation,BUILD_LIBJLI_STATIC, \
- STATIC_LIBRARY := jli_static, \
+ $(eval $(call SetupNativeCompilation, BUILD_LIBJLI_STATIC, \
+ NAME := jli_static, \
+ TYPE := STATIC_LIBRARY, \
OUTPUT_DIR := $(SUPPORT_OUTPUTDIR)/native/$(MODULE), \
SRC := $(LIBJLI_SRC_DIRS), \
EXCLUDE_FILES := $(LIBJLI_EXCLUDE_FILES), \
@@ -434,8 +436,8 @@
# On macosx they do partial (incremental) linking of libjli_static.a
# code it here...rather than add support to NativeCompilation
# as this is first time I see it
- $(eval $(call SetupNativeCompilation,BUILD_LIBJLI_STATIC, \
- LIBRARY := jli_static, \
+ $(eval $(call SetupNativeCompilation, BUILD_LIBJLI_STATIC, \
+ NAME := jli_static, \
OUTPUT_DIR := $(SUPPORT_OUTPUTDIR)/native/$(MODULE), \
SRC := $(LIBJLI_SRC_DIRS), \
EXCLUDE_FILES := $(LIBJLI_EXCLUDE_FILES), \
@@ -457,8 +459,9 @@
else ifeq ($(OPENJDK_TARGET_OS), aix)
# AIX also requires a static libjli because the compiler doesn't support '-rpath'
- $(eval $(call SetupNativeCompilation,BUILD_LIBJLI_STATIC, \
- STATIC_LIBRARY := jli_static, \
+ $(eval $(call SetupNativeCompilation, BUILD_LIBJLI_STATIC, \
+ NAME := jli_static, \
+ TYPE := STATIC_LIBRARY, \
OUTPUT_DIR := $(SUPPORT_OUTPUTDIR)/native/$(MODULE), \
SRC := $(LIBJLI_SRC_DIRS), \
EXCLUDE_FILES := $(LIBJLI_EXCLUDE_FILES), \
--- a/make/lib/Lib-java.instrument.gmk Thu Mar 01 16:35:36 2018 -0500
+++ b/make/lib/Lib-java.instrument.gmk Fri Mar 02 21:00:12 2018 +0100
@@ -1,5 +1,5 @@
#
-# Copyright (c) 2011, 2016, Oracle and/or its affiliates. All rights reserved.
+# Copyright (c) 2011, 2018, Oracle and/or its affiliates. All rights reserved.
# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
#
# This code is free software; you can redistribute it and/or modify it
@@ -49,8 +49,8 @@
LIBINSTRUMENT_CFLAGS += -Dstrcasecmp=stricmp
endif
-$(eval $(call SetupNativeCompilation,BUILD_LIBINSTRUMENT, \
- LIBRARY := instrument, \
+$(eval $(call SetupNativeCompilation, BUILD_LIBINSTRUMENT, \
+ NAME := instrument, \
OUTPUT_DIR := $(INSTALL_LIBRARIES_HERE), \
SRC := $(LIBINSTRUMENT_SRC), \
OPTIMIZATION := LOW, \
--- a/make/lib/Lib-java.management.gmk Thu Mar 01 16:35:36 2018 -0500
+++ b/make/lib/Lib-java.management.gmk Fri Mar 02 21:00:12 2018 +0100
@@ -1,5 +1,5 @@
#
-# Copyright (c) 2011, 2017, Oracle and/or its affiliates. All rights reserved.
+# Copyright (c) 2011, 2018, Oracle and/or its affiliates. All rights reserved.
# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
#
# This code is free software; you can redistribute it and/or modify it
@@ -44,8 +44,8 @@
endif
endif
-$(eval $(call SetupNativeCompilation,BUILD_LIBMANAGEMENT, \
- LIBRARY := management, \
+$(eval $(call SetupNativeCompilation, BUILD_LIBMANAGEMENT, \
+ NAME := management, \
OUTPUT_DIR := $(INSTALL_LIBRARIES_HERE), \
SRC := $(LIBMANAGEMENT_SRC), \
OPTIMIZATION := $(LIBMANAGEMENT_OPTIMIZATION), \
--- a/make/lib/Lib-java.prefs.gmk Thu Mar 01 16:35:36 2018 -0500
+++ b/make/lib/Lib-java.prefs.gmk Fri Mar 02 21:00:12 2018 +0100
@@ -1,5 +1,5 @@
#
-# Copyright (c) 2011, 2015, Oracle and/or its affiliates. All rights reserved.
+# Copyright (c) 2011, 2018, Oracle and/or its affiliates. All rights reserved.
# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
#
# This code is free software; you can redistribute it and/or modify it
@@ -33,8 +33,8 @@
LIBPREF_SRC_DIRS := $(TOPDIR)/src/java.prefs/$(OPENJDK_TARGET_OS_TYPE)/native/libprefs
endif
-$(eval $(call SetupNativeCompilation,BUILD_LIBPREFS, \
- LIBRARY := prefs, \
+$(eval $(call SetupNativeCompilation, BUILD_LIBPREFS, \
+ NAME := prefs, \
OUTPUT_DIR := $(INSTALL_LIBRARIES_HERE), \
SRC := $(LIBPREF_SRC_DIRS), \
OPTIMIZATION := HIGH, \
--- a/make/lib/Lib-java.rmi.gmk Thu Mar 01 16:35:36 2018 -0500
+++ b/make/lib/Lib-java.rmi.gmk Fri Mar 02 21:00:12 2018 +0100
@@ -1,5 +1,5 @@
#
-# Copyright (c) 2016, Oracle and/or its affiliates. All rights reserved.
+# Copyright (c) 2016, 2018, Oracle and/or its affiliates. All rights reserved.
# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
#
# This code is free software; you can redistribute it and/or modify it
@@ -27,8 +27,8 @@
################################################################################
-$(eval $(call SetupNativeCompilation,BUILD_LIBRMI, \
- LIBRARY := rmi, \
+$(eval $(call SetupNativeCompilation, BUILD_LIBRMI, \
+ NAME := rmi, \
OUTPUT_DIR := $(INSTALL_LIBRARIES_HERE), \
SRC := $(TOPDIR)/src/java.rmi/share/native/librmi, \
OPTIMIZATION := LOW, \
--- a/make/lib/Lib-java.security.jgss.gmk Thu Mar 01 16:35:36 2018 -0500
+++ b/make/lib/Lib-java.security.jgss.gmk Fri Mar 02 21:00:12 2018 +0100
@@ -1,5 +1,5 @@
#
-# Copyright (c) 2011, 2015, Oracle and/or its affiliates. All rights reserved.
+# Copyright (c) 2011, 2018, Oracle and/or its affiliates. All rights reserved.
# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
#
# This code is free software; you can redistribute it and/or modify it
@@ -32,8 +32,8 @@
$(TOPDIR)/src/java.security.jgss/$(OPENJDK_TARGET_OS_TYPE)/native/libj2gss \
#
- $(eval $(call SetupNativeCompilation,BUILD_LIBJ2GSS, \
- LIBRARY := j2gss, \
+ $(eval $(call SetupNativeCompilation, BUILD_LIBJ2GSS, \
+ NAME := j2gss, \
OUTPUT_DIR := $(INSTALL_LIBRARIES_HERE), \
SRC := $(LIBJ2GSS_SRC), \
OPTIMIZATION := LOW, \
@@ -74,8 +74,8 @@
ifneq ($(BUILD_LIBKRB5_NAME), )
# libosxkrb5 needs to call deprecated krb5 APIs so that java
# can use the native credentials cache.
- $(eval $(call SetupNativeCompilation,BUILD_LIBKRB5, \
- LIBRARY := $(BUILD_LIBKRB5_NAME), \
+ $(eval $(call SetupNativeCompilation, BUILD_LIBKRB5, \
+ NAME := $(BUILD_LIBKRB5_NAME), \
OUTPUT_DIR := $(INSTALL_LIBRARIES_HERE), \
SRC := $(BUILD_LIBKRB5_SRC), \
OPTIMIZATION := LOW, \
--- a/make/lib/Lib-java.smartcardio.gmk Thu Mar 01 16:35:36 2018 -0500
+++ b/make/lib/Lib-java.smartcardio.gmk Fri Mar 02 21:00:12 2018 +0100
@@ -1,5 +1,5 @@
#
-# Copyright (c) 2011, 2015, Oracle and/or its affiliates. All rights reserved.
+# Copyright (c) 2011, 2018, Oracle and/or its affiliates. All rights reserved.
# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
#
# This code is free software; you can redistribute it and/or modify it
@@ -33,8 +33,8 @@
-I$(TOPDIR)/src/java.smartcardio/$(OPENJDK_TARGET_OS_TYPE)/native/libj2pcsc/MUSCLE \
-I$(SUPPORT_OUTPUTDIR)/headers/java.smartcardio
-$(eval $(call SetupNativeCompilation,BUILD_LIBJ2PCSC, \
- LIBRARY := j2pcsc, \
+$(eval $(call SetupNativeCompilation, BUILD_LIBJ2PCSC, \
+ NAME := j2pcsc, \
OUTPUT_DIR := $(INSTALL_LIBRARIES_HERE), \
SRC := $(LIBJ2PCSC_SRC), \
CFLAGS_unix := -D__sun_jdk, \
--- a/make/lib/Lib-jdk.accessibility.gmk Thu Mar 01 16:35:36 2018 -0500
+++ b/make/lib/Lib-jdk.accessibility.gmk Fri Mar 02 21:00:12 2018 +0100
@@ -1,5 +1,5 @@
#
-# Copyright (c) 2014, 2016, Oracle and/or its affiliates. All rights reserved.
+# Copyright (c) 2014, 2018, Oracle and/or its affiliates. All rights reserved.
# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
#
# This code is free software; you can redistribute it and/or modify it
@@ -41,8 +41,8 @@
# Parameter 1 Suffix
# Parameter 2 ACCESSBRIDGE_ARCH_ suffix
- $(call SetupNativeCompilation,BUILD_JAVAACCESSBRIDGE$1, \
- LIBRARY = javaaccessbridge$1, \
+ $(call SetupNativeCompilation, BUILD_JAVAACCESSBRIDGE$1, \
+ NAME := javaaccessbridge$1, \
OUTPUT_DIR := $(INSTALL_LIBRARIES_HERE), \
SRC := $(JAVA_AB_SRCDIR), \
OPTIMIZATION := LOW, \
@@ -71,8 +71,8 @@
define SetupWinDLL
# Parameter 1 Suffix
# Parameter 2 ACCESSBRIDGE_ARCH_ suffix
- $(call SetupNativeCompilation,BUILD_WINDOWSACCESSBRIDGE$1, \
- LIBRARY = windowsaccessbridge$1, \
+ $(call SetupNativeCompilation, BUILD_WINDOWSACCESSBRIDGE$1, \
+ NAME := windowsaccessbridge$1, \
OUTPUT_DIR := $(INSTALL_LIBRARIES_HERE), \
SRC := $(WIN_AB_SRCDIR), \
OPTIMIZATION := LOW, \
@@ -99,8 +99,8 @@
define SetupAccessBridgeSysInfo
- $(call SetupNativeCompilation,BUILD_ACCESSBRIDGESYSINFO, \
- LIBRARY = jabsysinfo, \
+ $(call SetupNativeCompilation, BUILD_ACCESSBRIDGESYSINFO, \
+ NAME := jabsysinfo, \
OUTPUT_DIR := $(INSTALL_LIBRARIES_HERE), \
SRC := $(SYSINFO_SRCDIR), \
OPTIMIZATION := LOW, \
--- a/make/lib/Lib-jdk.attach.gmk Thu Mar 01 16:35:36 2018 -0500
+++ b/make/lib/Lib-jdk.attach.gmk Fri Mar 02 21:00:12 2018 +0100
@@ -1,5 +1,5 @@
#
-# Copyright (c) 2011, 2015, Oracle and/or its affiliates. All rights reserved.
+# Copyright (c) 2011, 2018, Oracle and/or its affiliates. All rights reserved.
# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
#
# This code is free software; you can redistribute it and/or modify it
@@ -34,8 +34,8 @@
LIBATTACH_CFLAGS := -DPSAPI_VERSION=1
endif
-$(eval $(call SetupNativeCompilation,BUILD_LIBATTACH, \
- LIBRARY := attach, \
+$(eval $(call SetupNativeCompilation, BUILD_LIBATTACH, \
+ NAME := attach, \
OUTPUT_DIR := $(INSTALL_LIBRARIES_HERE), \
SRC := $(call FindSrcDirsForLib, jdk.attach, attach), \
OPTIMIZATION := LOW, \
--- a/make/lib/Lib-jdk.crypto.cryptoki.gmk Thu Mar 01 16:35:36 2018 -0500
+++ b/make/lib/Lib-jdk.crypto.cryptoki.gmk Fri Mar 02 21:00:12 2018 +0100
@@ -1,5 +1,5 @@
#
-# Copyright (c) 2011, 2017, Oracle and/or its affiliates. All rights reserved.
+# Copyright (c) 2011, 2018, Oracle and/or its affiliates. All rights reserved.
# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
#
# This code is free software; you can redistribute it and/or modify it
@@ -30,8 +30,8 @@
LIBJ2PKCS11_SRC := $(TOPDIR)/src/jdk.crypto.cryptoki/share/native/libj2pkcs11 \
$(TOPDIR)/src/jdk.crypto.cryptoki/$(OPENJDK_TARGET_OS_TYPE)/native/libj2pkcs11
-$(eval $(call SetupNativeCompilation,BUILD_LIBJ2PKCS11, \
- LIBRARY := j2pkcs11, \
+$(eval $(call SetupNativeCompilation, BUILD_LIBJ2PKCS11, \
+ NAME := j2pkcs11, \
OUTPUT_DIR := $(INSTALL_LIBRARIES_HERE), \
SRC := $(LIBJ2PKCS11_SRC), \
OPTIMIZATION := LOW, \
--- a/make/lib/Lib-jdk.crypto.ec.gmk Thu Mar 01 16:35:36 2018 -0500
+++ b/make/lib/Lib-jdk.crypto.ec.gmk Fri Mar 02 21:00:12 2018 +0100
@@ -1,5 +1,5 @@
#
-# Copyright (c) 2011, 2015, Oracle and/or its affiliates. All rights reserved.
+# Copyright (c) 2011, 2018, Oracle and/or its affiliates. All rights reserved.
# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
#
# This code is free software; you can redistribute it and/or modify it
@@ -43,8 +43,8 @@
ECC_JNI_SOLSPARC_FILTER := -xregs=no%appl
endif
- $(eval $(call SetupNativeCompilation,BUILD_LIBSUNEC, \
- LIBRARY := sunec, \
+ $(eval $(call SetupNativeCompilation, BUILD_LIBSUNEC, \
+ NAME := sunec, \
OUTPUT_DIR := $(INSTALL_LIBRARIES_HERE), \
SRC := $(LIBSUNEC_SRC), \
TOOLCHAIN := TOOLCHAIN_LINK_CXX, \
--- a/make/lib/Lib-jdk.crypto.mscapi.gmk Thu Mar 01 16:35:36 2018 -0500
+++ b/make/lib/Lib-jdk.crypto.mscapi.gmk Fri Mar 02 21:00:12 2018 +0100
@@ -1,5 +1,5 @@
#
-# Copyright (c) 2011, 2015, Oracle and/or its affiliates. All rights reserved.
+# Copyright (c) 2011, 2018, Oracle and/or its affiliates. All rights reserved.
# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
#
# This code is free software; you can redistribute it and/or modify it
@@ -31,8 +31,8 @@
LIBSUNMSCAPI_SRC := $(TOPDIR)/src/jdk.crypto.mscapi/$(OPENJDK_TARGET_OS_TYPE)/native/libsunmscapi
- $(eval $(call SetupNativeCompilation,BUILD_LIBSUNMSCAPI, \
- LIBRARY := sunmscapi, \
+ $(eval $(call SetupNativeCompilation, BUILD_LIBSUNMSCAPI, \
+ NAME := sunmscapi, \
OUTPUT_DIR := $(INSTALL_LIBRARIES_HERE), \
SRC := $(LIBSUNMSCAPI_SRC), \
OPTIMIZATION := LOW, \
--- a/make/lib/Lib-jdk.crypto.ucrypto.gmk Thu Mar 01 16:35:36 2018 -0500
+++ b/make/lib/Lib-jdk.crypto.ucrypto.gmk Fri Mar 02 21:00:12 2018 +0100
@@ -1,5 +1,5 @@
#
-# Copyright (c) 2014, 2016, Oracle and/or its affiliates. All rights reserved.
+# Copyright (c) 2014, 2018, Oracle and/or its affiliates. All rights reserved.
# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
#
# This code is free software; you can redistribute it and/or modify it
@@ -31,8 +31,8 @@
LIBJ2UCRYPTO_SRC := $(TOPDIR)/src/jdk.crypto.ucrypto/solaris/native/libj2ucrypto
- $(eval $(call SetupNativeCompilation,BUILD_LIBJ2UCRYPTO, \
- LIBRARY := j2ucrypto, \
+ $(eval $(call SetupNativeCompilation, BUILD_LIBJ2UCRYPTO, \
+ NAME := j2ucrypto, \
OUTPUT_DIR := $(INSTALL_LIBRARIES_HERE), \
SRC := $(LIBJ2UCRYPTO_SRC), \
OPTIMIZATION := LOW, \
--- a/make/lib/Lib-jdk.hotspot.agent.gmk Thu Mar 01 16:35:36 2018 -0500
+++ b/make/lib/Lib-jdk.hotspot.agent.gmk Fri Mar 02 21:00:12 2018 +0100
@@ -1,5 +1,5 @@
#
-# Copyright (c) 2015, 2016, Oracle and/or its affiliates. All rights reserved.
+# Copyright (c) 2015, 2018, Oracle and/or its affiliates. All rights reserved.
# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
#
# This code is free software; you can redistribute it and/or modify it
@@ -78,7 +78,7 @@
else ifeq ($(OPENJDK_TARGET_OS), windows)
SA_NAME := sawindbg
- COMMON_CFLAGS := -D_WINDOWS -D_DEBUG -D_CONSOLE -D_MBCS -EHsc -FD
+ COMMON_CFLAGS := -D_WINDOWS -D_DEBUG -D_CONSOLE -D_MBCS -EHsc
SA_CFLAGS := $(subst -DWIN32_LEAN_AND_MEAN,, $(CFLAGS_JDKLIB)) \
$(COMMON_CFLAGS)
SA_CXXFLAGS := $(subst -DWIN32_LEAN_AND_MEAN,, $(CXXFLAGS_JDKLIB)) \
@@ -98,12 +98,12 @@
################################################################################
$(eval $(call SetupNativeCompilation, BUILD_LIBSA, \
+ NAME := $(SA_NAME), \
TOOLCHAIN := $(SA_TOOLCHAIN), \
OPTIMIZATION := NONE, \
DISABLED_WARNINGS_microsoft := 4267, \
DISABLED_WARNINGS_gcc := sign-compare, \
DISABLED_WARNINGS_CXX_solstudio := truncwarn unknownpragma, \
- LIBRARY := $(SA_NAME), \
OUTPUT_DIR := $(call FindLibDirForModule, $(MODULE)), \
SRC := $(SA_SRC), \
EXCLUDE_FILES := test.c saproc_audit.cpp $(SA_EXCLUDE_FILES), \
--- a/make/lib/Lib-jdk.internal.le.gmk Thu Mar 01 16:35:36 2018 -0500
+++ b/make/lib/Lib-jdk.internal.le.gmk Fri Mar 02 21:00:12 2018 +0100
@@ -1,5 +1,5 @@
#
-# Copyright (c) 2015, Oracle and/or its affiliates. All rights reserved.
+# Copyright (c) 2015, 2018, Oracle and/or its affiliates. All rights reserved.
# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
#
# This code is free software; you can redistribute it and/or modify it
@@ -36,8 +36,8 @@
-I$(SUPPORT_OUTPUTDIR)/headers/jdk.internal.le \
#
- $(eval $(call SetupNativeCompilation,BUILD_LIBLE, \
- LIBRARY := le, \
+ $(eval $(call SetupNativeCompilation, BUILD_LIBLE, \
+ NAME := le, \
OUTPUT_DIR := $(INSTALL_LIBRARIES_HERE), \
SRC := $(LIBLE_SRC), \
OPTIMIZATION := LOW, \
--- a/make/lib/Lib-jdk.jdi.gmk Thu Mar 01 16:35:36 2018 -0500
+++ b/make/lib/Lib-jdk.jdi.gmk Fri Mar 02 21:00:12 2018 +0100
@@ -1,5 +1,5 @@
#
-# Copyright (c) 2011, 2016, Oracle and/or its affiliates. All rights reserved.
+# Copyright (c) 2011, 2018, Oracle and/or its affiliates. All rights reserved.
# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
#
# This code is free software; you can redistribute it and/or modify it
@@ -39,8 +39,8 @@
-I$(SUPPORT_OUTPUTDIR)/headers/jdk.jdi \
#
- $(eval $(call SetupNativeCompilation,BUILD_LIBDT_SHMEM, \
- LIBRARY := dt_shmem, \
+ $(eval $(call SetupNativeCompilation, BUILD_LIBDT_SHMEM, \
+ NAME := dt_shmem, \
OUTPUT_DIR := $(INSTALL_LIBRARIES_HERE), \
SRC := $(LIBDT_SHMEM_SRC), \
OPTIMIZATION := LOW, \
--- a/make/lib/Lib-jdk.jdwp.agent.gmk Thu Mar 01 16:35:36 2018 -0500
+++ b/make/lib/Lib-jdk.jdwp.agent.gmk Fri Mar 02 21:00:12 2018 +0100
@@ -1,5 +1,5 @@
#
-# Copyright (c) 2011, 2016, Oracle and/or its affiliates. All rights reserved.
+# Copyright (c) 2011, 2018, Oracle and/or its affiliates. All rights reserved.
# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
#
# This code is free software; you can redistribute it and/or modify it
@@ -36,8 +36,8 @@
-I$(TOPDIR)/src/jdk.jdwp.agent/share/native/include \
#
-$(eval $(call SetupNativeCompilation,BUILD_LIBDT_SOCKET, \
- LIBRARY := dt_socket, \
+$(eval $(call SetupNativeCompilation, BUILD_LIBDT_SOCKET, \
+ NAME := dt_socket, \
OUTPUT_DIR := $(INSTALL_LIBRARIES_HERE), \
SRC := $(LIBDT_SOCKET_SRC), \
OPTIMIZATION := LOW, \
@@ -73,8 +73,8 @@
$(addprefix -I, $(LIBJDWP_SRC))
# JDWP_LOGGING causes log messages to be compiled into the library.
-$(eval $(call SetupNativeCompilation,BUILD_LIBJDWP, \
- LIBRARY := jdwp, \
+$(eval $(call SetupNativeCompilation, BUILD_LIBJDWP, \
+ NAME := jdwp, \
OUTPUT_DIR := $(INSTALL_LIBRARIES_HERE), \
SRC := $(LIBJDWP_SRC), \
OPTIMIZATION := LOW, \
--- a/make/lib/Lib-jdk.management.agent.gmk Thu Mar 01 16:35:36 2018 -0500
+++ b/make/lib/Lib-jdk.management.agent.gmk Fri Mar 02 21:00:12 2018 +0100
@@ -1,5 +1,5 @@
#
-# Copyright (c) 2017, Oracle and/or its affiliates. All rights reserved.
+# Copyright (c) 2017, 2018, Oracle and/or its affiliates. All rights reserved.
# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
#
# This code is free software; you can redistribute it and/or modify it
@@ -33,8 +33,8 @@
$(LIBJAVA_HEADER_FLAGS) \
#
-$(eval $(call SetupNativeCompilation,BUILD_LIBMANAGEMENT_AGENT, \
- LIBRARY := management_agent, \
+$(eval $(call SetupNativeCompilation, BUILD_LIBMANAGEMENT_AGENT, \
+ NAME := management_agent, \
OUTPUT_DIR := $(INSTALL_LIBRARIES_HERE), \
SRC := $(LIBMANAGEMENT_AGENT_SRC), \
OPTIMIZATION := LOW, \
--- a/make/lib/Lib-jdk.management.gmk Thu Mar 01 16:35:36 2018 -0500
+++ b/make/lib/Lib-jdk.management.gmk Fri Mar 02 21:00:12 2018 +0100
@@ -1,5 +1,5 @@
#
-# Copyright (c) 2015, Oracle and/or its affiliates. All rights reserved.
+# Copyright (c) 2015, 2018, Oracle and/or its affiliates. All rights reserved.
# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
#
# This code is free software; you can redistribute it and/or modify it
@@ -53,8 +53,8 @@
endif
endif
-$(eval $(call SetupNativeCompilation,BUILD_LIBMANAGEMENT_EXT, \
- LIBRARY := management_ext, \
+$(eval $(call SetupNativeCompilation, BUILD_LIBMANAGEMENT_EXT, \
+ NAME := management_ext, \
OUTPUT_DIR := $(INSTALL_LIBRARIES_HERE), \
SRC := $(LIBMANAGEMENT_EXT_SRC), \
LANG := C, \
--- a/make/lib/Lib-jdk.net.gmk Thu Mar 01 16:35:36 2018 -0500
+++ b/make/lib/Lib-jdk.net.gmk Fri Mar 02 21:00:12 2018 +0100
@@ -1,5 +1,5 @@
#
-# Copyright (c) 2016, 2017, Oracle and/or its affiliates. All rights reserved.
+# Copyright (c) 2016, 2018, Oracle and/or its affiliates. All rights reserved.
# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
#
# This code is free software; you can redistribute it and/or modify it
@@ -30,7 +30,7 @@
ifeq ($(OPENJDK_TARGET_OS), solaris)
$(eval $(call SetupNativeCompilation, BUILD_LIBEXTNET, \
- LIBRARY := extnet, \
+ NAME := extnet, \
OUTPUT_DIR := $(INSTALL_LIBRARIES_HERE), \
SRC := $(TOPDIR)/src/jdk.net/solaris/native/libextnet, \
OPTIMIZATION := LOW, \
@@ -51,7 +51,7 @@
ifeq ($(OPENJDK_TARGET_OS), linux)
$(eval $(call SetupNativeCompilation, BUILD_LIBEXTNET, \
- LIBRARY := extnet, \
+ NAME := extnet, \
OUTPUT_DIR := $(INSTALL_LIBRARIES_HERE), \
SRC := $(TOPDIR)/src/jdk.net/linux/native/libextnet, \
OPTIMIZATION := LOW, \
--- a/make/lib/Lib-jdk.pack.gmk Thu Mar 01 16:35:36 2018 -0500
+++ b/make/lib/Lib-jdk.pack.gmk Fri Mar 02 21:00:12 2018 +0100
@@ -1,5 +1,5 @@
#
-# Copyright (c) 2011, 2015, Oracle and/or its affiliates. All rights reserved.
+# Copyright (c) 2011, 2018, Oracle and/or its affiliates. All rights reserved.
# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
#
# This code is free software; you can redistribute it and/or modify it
@@ -27,8 +27,8 @@
################################################################################
-$(eval $(call SetupNativeCompilation,BUILD_LIBUNPACK, \
- LIBRARY := unpack, \
+$(eval $(call SetupNativeCompilation, BUILD_LIBUNPACK, \
+ NAME := unpack, \
OUTPUT_DIR := $(INSTALL_LIBRARIES_HERE), \
SRC := $(TOPDIR)/src/jdk.pack/share/native/libunpack \
$(TOPDIR)/src/jdk.pack/share/native/common-unpack, \
--- a/make/lib/Lib-jdk.sctp.gmk Thu Mar 01 16:35:36 2018 -0500
+++ b/make/lib/Lib-jdk.sctp.gmk Fri Mar 02 21:00:12 2018 +0100
@@ -1,5 +1,5 @@
#
-# Copyright (c) 2011, 2015, Oracle and/or its affiliates. All rights reserved.
+# Copyright (c) 2011, 2018, Oracle and/or its affiliates. All rights reserved.
# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
#
# This code is free software; you can redistribute it and/or modify it
@@ -30,8 +30,8 @@
ifeq ($(OPENJDK_TARGET_OS_TYPE), unix)
ifeq (, $(filter $(OPENJDK_TARGET_OS), macosx aix))
- $(eval $(call SetupNativeCompilation,BUILD_LIBSCTP, \
- LIBRARY := sctp, \
+ $(eval $(call SetupNativeCompilation, BUILD_LIBSCTP, \
+ NAME := sctp, \
OUTPUT_DIR := $(INSTALL_LIBRARIES_HERE), \
SRC := $(TOPDIR)/src/jdk.sctp/$(OPENJDK_TARGET_OS_TYPE)/native/libsctp, \
OPTIMIZATION := LOW, \
--- a/make/lib/Lib-jdk.security.auth.gmk Thu Mar 01 16:35:36 2018 -0500
+++ b/make/lib/Lib-jdk.security.auth.gmk Fri Mar 02 21:00:12 2018 +0100
@@ -1,5 +1,5 @@
#
-# Copyright (c) 2011, 2015, Oracle and/or its affiliates. All rights reserved.
+# Copyright (c) 2011, 2018, Oracle and/or its affiliates. All rights reserved.
# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
#
# This code is free software; you can redistribute it and/or modify it
@@ -38,8 +38,8 @@
LIBJAAS_NAME := jaas_nt
endif
-$(eval $(call SetupNativeCompilation,BUILD_LIBJAAS, \
- LIBRARY := $(LIBJAAS_NAME), \
+$(eval $(call SetupNativeCompilation, BUILD_LIBJAAS, \
+ NAME := $(LIBJAAS_NAME), \
OUTPUT_DIR := $(INSTALL_LIBRARIES_HERE), \
SRC := $(call FindSrcDirsForLib, jdk.security.auth, jaas), \
OPTIMIZATION := LOW, \
--- a/make/lib/LibosxLibraries.gmk Thu Mar 01 16:35:36 2018 -0500
+++ b/make/lib/LibosxLibraries.gmk Fri Mar 02 21:00:12 2018 +0100
@@ -1,5 +1,5 @@
#
-# Copyright (c) 2011, 2015, Oracle and/or its affiliates. All rights reserved.
+# Copyright (c) 2011, 2018, Oracle and/or its affiliates. All rights reserved.
# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
#
# This code is free software; you can redistribute it and/or modify it
@@ -34,8 +34,8 @@
-I$(SUPPORT_OUTPUTDIR)/headers/java.desktop \
#
- $(eval $(call SetupNativeCompilation,BUILD_LIBOSX, \
- LIBRARY := osx, \
+ $(eval $(call SetupNativeCompilation, BUILD_LIBOSX, \
+ NAME := osx, \
OUTPUT_DIR := $(INSTALL_LIBRARIES_HERE), \
SRC := $(LIBOSX_DIRS), \
OPTIMIZATION := LOW, \
--- a/make/lib/NetworkingLibraries.gmk Thu Mar 01 16:35:36 2018 -0500
+++ b/make/lib/NetworkingLibraries.gmk Fri Mar 02 21:00:12 2018 +0100
@@ -1,5 +1,5 @@
#
-# Copyright (c) 2011, 2017, Oracle and/or its affiliates. All rights reserved.
+# Copyright (c) 2011, 2018, Oracle and/or its affiliates. All rights reserved.
# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
#
# This code is free software; you can redistribute it and/or modify it
@@ -25,8 +25,8 @@
LIBNET_SRC_DIRS := $(call FindSrcDirsForLib, java.base, net)
-$(eval $(call SetupNativeCompilation,BUILD_LIBNET, \
- LIBRARY := net, \
+$(eval $(call SetupNativeCompilation, BUILD_LIBNET, \
+ NAME := net, \
OUTPUT_DIR := $(INSTALL_LIBRARIES_HERE), \
SRC := $(LIBNET_SRC_DIRS), \
OPTIMIZATION := LOW, \
--- a/make/lib/NioLibraries.gmk Thu Mar 01 16:35:36 2018 -0500
+++ b/make/lib/NioLibraries.gmk Fri Mar 02 21:00:12 2018 +0100
@@ -1,5 +1,5 @@
#
-# Copyright (c) 2011, 2016, Oracle and/or its affiliates. All rights reserved.
+# Copyright (c) 2011, 2018, Oracle and/or its affiliates. All rights reserved.
# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
#
# This code is free software; you can redistribute it and/or modify it
@@ -56,8 +56,8 @@
BUILD_LIBNIO_MAPFILE := $(TOPDIR)/make/mapfiles/libnio/mapfile-$(OPENJDK_TARGET_OS)
endif
-$(eval $(call SetupNativeCompilation,BUILD_LIBNIO, \
- LIBRARY := nio, \
+$(eval $(call SetupNativeCompilation, BUILD_LIBNIO, \
+ NAME := nio, \
OUTPUT_DIR := $(INSTALL_LIBRARIES_HERE), \
SRC := $(BUILD_LIBNIO_SRC), \
EXCLUDE_FILES := $(BUILD_LIBNIO_EXFILES), \
--- a/make/lib/PlatformLibraries.gmk Thu Mar 01 16:35:36 2018 -0500
+++ b/make/lib/PlatformLibraries.gmk Fri Mar 02 21:00:12 2018 +0100
@@ -1,5 +1,5 @@
#
-# Copyright (c) 2011, 2015, Oracle and/or its affiliates. All rights reserved.
+# Copyright (c) 2011, 2018, Oracle and/or its affiliates. All rights reserved.
# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
#
# This code is free software; you can redistribute it and/or modify it
@@ -29,8 +29,8 @@
LIBOSXAPP_SRC := $(TOPDIR)/src/java.desktop/macosx/native/libosxapp
- $(eval $(call SetupNativeCompilation,BUILD_LIBOSXAPP, \
- LIBRARY := osxapp, \
+ $(eval $(call SetupNativeCompilation, BUILD_LIBOSXAPP, \
+ NAME := osxapp, \
OUTPUT_DIR := $(INSTALL_LIBRARIES_HERE), \
SRC := $(LIBOSXAPP_SRC), \
OPTIMIZATION := LOW, \
--- a/make/lib/SecurityLibraries.gmk Thu Mar 01 16:35:36 2018 -0500
+++ b/make/lib/SecurityLibraries.gmk Fri Mar 02 21:00:12 2018 +0100
@@ -1,5 +1,5 @@
#
-# Copyright (c) 2015, Oracle and/or its affiliates. All rights reserved.
+# Copyright (c) 2015, 2018, Oracle and/or its affiliates. All rights reserved.
# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
#
# This code is free software; you can redistribute it and/or modify it
@@ -26,7 +26,7 @@
include LibCommon.gmk
ifeq ($(OPENJDK_TARGET_OS), macosx)
- # JavaNativeFoundation framework not supported in static builds
+ # JavaNativeFoundation framework not supported in static builds
ifneq ($(STATIC_BUILD), true)
################################################################################
@@ -36,8 +36,8 @@
$(LIBJAVA_HEADER_FLAGS) \
-I$(SUPPORT_OUTPUTDIR)/headers/java.base \
- $(eval $(call SetupNativeCompilation,BUILD_LIBOSXSECURITY, \
- LIBRARY := osxsecurity, \
+ $(eval $(call SetupNativeCompilation, BUILD_LIBOSXSECURITY, \
+ NAME := osxsecurity, \
OUTPUT_DIR := $(INSTALL_LIBRARIES_HERE), \
SRC := $(LIBOSXSECURITY_DIRS), \
OPTIMIZATION := LOW, \
--- a/make/lib/SoundLibraries.gmk Thu Mar 01 16:35:36 2018 -0500
+++ b/make/lib/SoundLibraries.gmk Fri Mar 02 21:00:12 2018 +0100
@@ -1,5 +1,5 @@
#
-# Copyright (c) 2011, 2015, Oracle and/or its affiliates. All rights reserved.
+# Copyright (c) 2011, 2018, Oracle and/or its affiliates. All rights reserved.
# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
#
# This code is free software; you can redistribute it and/or modify it
@@ -114,8 +114,8 @@
LIBJSOUND_CFLAGS += -DEXTRA_SOUND_JNI_LIBS='"$(EXTRA_SOUND_JNI_LIBS)"'
-$(eval $(call SetupNativeCompilation,BUILD_LIBJSOUND, \
- LIBRARY := jsound, \
+$(eval $(call SetupNativeCompilation, BUILD_LIBJSOUND, \
+ NAME := jsound, \
OUTPUT_DIR := $(INSTALL_LIBRARIES_HERE), \
SRC := $(LIBJSOUND_SRC_DIRS), \
INCLUDE_FILES := $(LIBJSOUND_SRC_FILES), \
@@ -149,8 +149,8 @@
ifneq ($(filter jsoundalsa, $(EXTRA_SOUND_JNI_LIBS)), )
- $(eval $(call SetupNativeCompilation,BUILD_LIBJSOUNDALSA, \
- LIBRARY := jsoundalsa, \
+ $(eval $(call SetupNativeCompilation, BUILD_LIBJSOUNDALSA, \
+ NAME := jsoundalsa, \
OUTPUT_DIR := $(INSTALL_LIBRARIES_HERE), \
SRC := $(LIBJSOUND_SRC_DIRS), \
INCLUDE_FILES := Utilities.c $(LIBJSOUND_MIDIFILES) $(LIBJSOUND_PORTFILES) \
@@ -186,8 +186,8 @@
ifneq ($(filter jsoundds, $(EXTRA_SOUND_JNI_LIBS)), )
- $(eval $(call SetupNativeCompilation,BUILD_LIBJSOUNDDS, \
- LIBRARY := jsoundds, \
+ $(eval $(call SetupNativeCompilation, BUILD_LIBJSOUNDDS, \
+ NAME := jsoundds, \
OUTPUT_DIR := $(INSTALL_LIBRARIES_HERE), \
SRC := $(LIBJSOUND_SRC_DIRS), \
INCLUDE_FILES := Utilities.c $(LIBJSOUND_DAUDIOFILES) \
--- a/make/test/BuildFailureHandler.gmk Thu Mar 01 16:35:36 2018 -0500
+++ b/make/test/BuildFailureHandler.gmk Fri Mar 02 21:00:12 2018 +0100
@@ -1,5 +1,5 @@
#
-# Copyright (c) 2016, Oracle and/or its affiliates. All rights reserved.
+# Copyright (c) 2016, 2018, Oracle and/or its affiliates. All rights reserved.
# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
#
# This code is free software; you can redistribute it and/or modify it
@@ -64,7 +64,7 @@
ifeq ($(OPENJDK_TARGET_OS), windows)
$(eval $(call SetupNativeCompilation, BUILD_LIBTIMEOUT_HANDLER, \
- LIBRARY := timeoutHandler, \
+ NAME := timeoutHandler, \
SRC := $(FH_BASEDIR)/src/windows/native/libtimeoutHandler, \
OBJECT_DIR := $(FH_SUPPORT)/libtimeoutHandler, \
OUTPUT_DIR := $(FH_SUPPORT), \
--- a/make/test/JtregNativeJdk.gmk Thu Mar 01 16:35:36 2018 -0500
+++ b/make/test/JtregNativeJdk.gmk Fri Mar 02 21:00:12 2018 +0100
@@ -1,5 +1,5 @@
#
-# Copyright (c) 2015, 2017, Oracle and/or its affiliates. All rights reserved.
+# Copyright (c) 2015, 2018, Oracle and/or its affiliates. All rights reserved.
# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
#
# This code is free software; you can redistribute it and/or modify it
@@ -50,6 +50,7 @@
ifneq ($(OPENJDK_TARGET_OS), windows)
BUILD_JDK_JTREG_NATIVE_SRC += $(TOPDIR)/test/jdk/java/nio/channels/FileChannel/directio
+ BUILD_JDK_JTREG_NATIVE_SRC += $(TOPDIR)/test/jdk/java/nio/channels/spi/SelectorProvider/inheritedChannel
endif
BUILD_JDK_JTREG_OUTPUT_DIR := $(OUTPUTDIR)/support/test/jdk/jtreg/native
@@ -59,9 +60,14 @@
ifeq ($(OPENJDK_TARGET_OS), windows)
WIN_LIB_JAVA := $(SUPPORT_OUTPUTDIR)/native/java.base/libjava/java.lib
BUILD_JDK_JTREG_LIBRARIES_LIBS_libstringPlatformChars := $(WIN_LIB_JAVA)
+else ifeq ($(OPENJDK_TARGET_OS), linux)
+ BUILD_JDK_JTREG_LIBRARIES_LIBS_libstringPlatformChars := -ljava
+ BUILD_JDK_JTREG_LIBRARIES_LIBS_libDirectIO := -ljava
+ BUILD_JDK_JTREG_LIBRARIES_LIBS_libInheritedChannel := -ljava
else ifeq ($(OPENJDK_TARGET_OS), solaris)
BUILD_JDK_JTREG_LIBRARIES_LIBS_libstringPlatformChars := -ljava -lc
BUILD_JDK_JTREG_LIBRARIES_LIBS_libDirectIO := -ljava -lc
+ BUILD_JDK_JTREG_LIBRARIES_LIBS_libInheritedChannel := -ljava -lc
else
BUILD_JDK_JTREG_LIBRARIES_LIBS_libstringPlatformChars := -ljava
BUILD_JDK_JTREG_LIBRARIES_LIBS_libDirectIO := -ljava
--- a/src/hotspot/os/solaris/dtrace/jhelper.d Thu Mar 01 16:35:36 2018 -0500
+++ b/src/hotspot/os/solaris/dtrace/jhelper.d Fri Mar 02 21:00:12 2018 +0100
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2003, 2013, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2003, 2018, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
@@ -19,7 +19,7 @@
* Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
* or visit www.oracle.com if you need additional information or have any
* questions.
- *
+ *
*/
/* This file is auto-generated */
@@ -30,7 +30,7 @@
#ifdef DEBUG
#define MARK_LINE this->line = __LINE__
#else
-#define MARK_LINE
+#define MARK_LINE
#endif
#ifdef _LP64
@@ -59,9 +59,8 @@
#define copyin_int32(ADDR) *(int32_t*) copyin((pointer) (ADDR), sizeof(int32_t))
#define copyin_uint8(ADDR) *(uint8_t*) copyin((pointer) (ADDR), sizeof(uint8_t))
-#define SAME(x) x
#define copyin_offset(JVM_CONST) JVM_CONST = \
- copyin_int32(JvmOffsetsPtr + SAME(IDX_)JVM_CONST * sizeof(int32_t))
+ copyin_int32(JvmOffsetsPtr + IDX_##JVM_CONST * sizeof(int32_t))
int init_done;
@@ -97,7 +96,7 @@
/!init_done && !this->done/
{
MARK_LINE;
-
+
copyin_offset(POINTER_SIZE);
copyin_offset(COMPILER);
copyin_offset(OFFSET_CollectedHeap_reserved);
@@ -158,7 +157,9 @@
#endif
/* Read address of GrowableArray<CodeHeaps*> */
- this->code_heaps_address = copyin_ptr(&``__1cJCodeCacheG_heaps_);
+ // this->code_heaps_address = copyin_ptr(&``__1cJCodeCacheG_heaps_);
+ this->code_heaps_address = * ( uint64_t * ) copyin ( ( uint64_t ) ( &``__1cJCodeCacheG_heaps_ ) , sizeof ( uint64_t ) );
+
/* Read address of _data array field in GrowableArray */
this->code_heaps_array_address = copyin_ptr(this->code_heaps_address + OFFSET_GrowableArray_CodeHeap_data);
this->number_of_heaps = copyin_uint32(this->code_heaps_address + OFFSET_GrowableArray_CodeHeap_len);
@@ -168,7 +169,9 @@
/*
* Get Java heap bounds
*/
- this->Universe_collectedHeap = copyin_ptr(&``__1cIUniverseO_collectedHeap_);
+ // this->Universe_collectedHeap = copyin_ptr(&``__1cIUniverseO_collectedHeap_);
+ this->Universe_collectedHeap = * ( uint64_t * ) copyin ( ( uint64_t ) ( &``__1cIUniverseO_collectedHeap_ ) , sizeof ( uint64_t ) );
+
this->heap_start = copyin_ptr(this->Universe_collectedHeap +
OFFSET_CollectedHeap_reserved +
OFFSET_MemRegion_start);
@@ -181,8 +184,8 @@
}
/*
- * IMPORTANT: At the moment the ustack helper supports up to 5 code heaps in
- * the code cache. If more code heaps are added the following probes have to
+ * IMPORTANT: At the moment the ustack helper supports up to 5 code heaps in
+ * the code cache. If more code heaps are added the following probes have to
* be extended. This is done by simply adding a probe to get the heap bounds
* and another probe to set the code heap address of the newly created heap.
*/
@@ -197,7 +200,7 @@
/* CodeHeap 1 */
init_done = 1;
this->code_heap1_address = copyin_ptr(this->code_heaps_array_address);
- this->code_heap1_low = copyin_ptr(this->code_heap1_address +
+ this->code_heap1_low = copyin_ptr(this->code_heap1_address +
OFFSET_CodeHeap_memory + OFFSET_VirtualSpace_low);
this->code_heap1_high = copyin_ptr(this->code_heap1_address +
OFFSET_CodeHeap_memory + OFFSET_VirtualSpace_high);
@@ -211,7 +214,7 @@
init_done = 2;
this->code_heaps_array_address = this->code_heaps_array_address + POINTER_SIZE;
this->code_heap2_address = copyin_ptr(this->code_heaps_array_address);
- this->code_heap2_low = copyin_ptr(this->code_heap2_address +
+ this->code_heap2_low = copyin_ptr(this->code_heap2_address +
OFFSET_CodeHeap_memory + OFFSET_VirtualSpace_low);
this->code_heap2_high = copyin_ptr(this->code_heap2_address +
OFFSET_CodeHeap_memory + OFFSET_VirtualSpace_high);
@@ -224,7 +227,7 @@
init_done = 3;
this->code_heaps_array_address = this->code_heaps_array_address + POINTER_SIZE;
this->code_heap3_address = copyin_ptr(this->code_heaps_array_address);
- this->code_heap3_low = copyin_ptr(this->code_heap3_address +
+ this->code_heap3_low = copyin_ptr(this->code_heap3_address +
OFFSET_CodeHeap_memory + OFFSET_VirtualSpace_low);
this->code_heap3_high = copyin_ptr(this->code_heap3_address +
OFFSET_CodeHeap_memory + OFFSET_VirtualSpace_high);
@@ -237,7 +240,7 @@
init_done = 4;
this->code_heaps_array_address = this->code_heaps_array_address + POINTER_SIZE;
this->code_heap4_address = copyin_ptr(this->code_heaps_array_address);
- this->code_heap4_low = copyin_ptr(this->code_heap4_address +
+ this->code_heap4_low = copyin_ptr(this->code_heap4_address +
OFFSET_CodeHeap_memory + OFFSET_VirtualSpace_low);
this->code_heap4_high = copyin_ptr(this->code_heap4_address +
OFFSET_CodeHeap_memory + OFFSET_VirtualSpace_high);
@@ -250,7 +253,7 @@
init_done = 5;
this->code_heaps_array_address = this->code_heaps_array_address + POINTER_SIZE;
this->code_heap5_address = copyin_ptr(this->code_heaps_array_address);
- this->code_heap5_low = copyin_ptr(this->code_heap5_address +
+ this->code_heap5_low = copyin_ptr(this->code_heap5_address +
OFFSET_CodeHeap_memory + OFFSET_VirtualSpace_low);
this->code_heap5_high = copyin_ptr(this->code_heap5_address +
OFFSET_CodeHeap_memory + OFFSET_VirtualSpace_high);
@@ -309,10 +312,10 @@
/!this->done && this->codecache/
{
MARK_LINE;
- /*
+ /*
* Get code heap configuration
*/
- this->code_heap_low = copyin_ptr(this->code_heap_address +
+ this->code_heap_low = copyin_ptr(this->code_heap_address +
OFFSET_CodeHeap_memory + OFFSET_VirtualSpace_low);
this->code_heap_segmap_low = copyin_ptr(this->code_heap_address +
OFFSET_CodeHeap_segmap + OFFSET_VirtualSpace_low);
@@ -506,10 +509,10 @@
/*
* Now we need to add a trailing '\0' and possibly a tag character.
*/
- this->result[this->klassSymbolLength + 1 +
+ this->result[this->klassSymbolLength + 1 +
this->nameSymbolLength +
this->signatureSymbolLength] = this->suffix;
- this->result[this->klassSymbolLength + 2 +
+ this->result[this->klassSymbolLength + 2 +
this->nameSymbolLength +
this->signatureSymbolLength] = '\0';
@@ -519,7 +522,7 @@
dtrace:helper:ustack:
/this->done && this->error == (char *) NULL/
{
- this->result;
+ this->result;
}
dtrace:helper:ustack:
--- a/src/hotspot/share/gc/g1/g1RemSet.cpp Thu Mar 01 16:35:36 2018 -0500
+++ b/src/hotspot/share/gc/g1/g1RemSet.cpp Fri Mar 02 21:00:12 2018 +0100
@@ -587,6 +587,20 @@
return;
}
+ // While we are processing RSet buffers during the collection, we
+ // actually don't want to scan any cards on the collection set,
+ // since we don't want to update remembered sets with entries that
+ // point into the collection set, given that live objects from the
+ // collection set are about to move and such entries will be stale
+ // very soon. This change also deals with a reliability issue which
+ // involves scanning a card in the collection set and coming across
+ // an array that was being chunked and looking malformed. Note,
+ // however, that if evacuation fails, we have to scan any objects
+ // that were not moved and create any missing entries.
+ if (r->in_collection_set()) {
+ return;
+ }
+
// The result from the hot card cache insert call is either:
// * pointer to the current card
// (implying that the current card is not 'hot'),
@@ -611,7 +625,8 @@
// Check whether the region formerly in the cache should be
// ignored, as discussed earlier for the original card. The
- // region could have been freed while in the cache.
+ // region could have been freed while in the cache. The cset is
+ // not relevant here, since we're in concurrent phase.
if (!r->is_old_or_humongous()) {
return;
}
--- a/src/java.base/share/classes/java/lang/AbstractStringBuilder.java Thu Mar 01 16:35:36 2018 -0500
+++ b/src/java.base/share/classes/java/lang/AbstractStringBuilder.java Fri Mar 02 21:00:12 2018 +0100
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2003, 2017, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2003, 2018, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
@@ -89,6 +89,29 @@
}
/**
+ * Compares the objects of two AbstractStringBuilder implementations lexicographically.
+ *
+ * @since 11
+ */
+ int compareTo(AbstractStringBuilder another) {
+ if (this == another) {
+ return 0;
+ }
+
+ byte val1[] = value;
+ byte val2[] = another.value;
+ int count1 = this.count;
+ int count2 = another.count;
+
+ if (coder == another.coder) {
+ return isLatin1() ? StringLatin1.compareTo(val1, val2, count1, count2)
+ : StringUTF16.compareTo(val1, val2, count1, count2);
+ }
+ return isLatin1() ? StringLatin1.compareToUTF16(val1, val2, count1, count2)
+ : StringUTF16.compareToLatin1(val1, val2, count1, count2);
+ }
+
+ /**
* Returns the length (character count).
*
* @return the length of the sequence of characters currently
--- a/src/java.base/share/classes/java/lang/CharSequence.java Thu Mar 01 16:35:36 2018 -0500
+++ b/src/java.base/share/classes/java/lang/CharSequence.java Fri Mar 02 21:00:12 2018 +0100
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2000, 2017, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2000, 2018, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
@@ -26,6 +26,7 @@
package java.lang;
import java.util.NoSuchElementException;
+import java.util.Objects;
import java.util.PrimitiveIterator;
import java.util.Spliterator;
import java.util.Spliterators;
@@ -43,9 +44,9 @@
*
* <p> This interface does not refine the general contracts of the {@link
* java.lang.Object#equals(java.lang.Object) equals} and {@link
- * java.lang.Object#hashCode() hashCode} methods. The result of comparing two
- * objects that implement {@code CharSequence} is therefore, in general,
- * undefined. Each object may be implemented by a different class, and there
+ * java.lang.Object#hashCode() hashCode} methods. The result of testing two objects
+ * that implement {@code CharSequence} for equality is therefore, in general, undefined.
+ * Each object may be implemented by a different class, and there
* is no guarantee that each class will be capable of testing its instances
* for equality with those of the other. It is therefore inappropriate to use
* arbitrary {@code CharSequence} instances as elements in a set or as keys in
@@ -237,4 +238,54 @@
Spliterator.ORDERED,
false);
}
+
+ /**
+ * Compares two {@code CharSequence} instances lexicographically. Returns a
+ * negative value, zero, or a positive value if the first sequence is lexicographically
+ * less than, equal to, or greater than the second, respectively.
+ *
+ * <p>
+ * The lexicographical ordering of {@code CharSequence} is defined as follows.
+ * Consider a {@code CharSequence} <i>cs</i> of length <i>len</i> to be a
+ * sequence of char values, <i>cs[0]</i> to <i>cs[len-1]</i>. Suppose <i>k</i>
+ * is the lowest index at which the corresponding char values from each sequence
+ * differ. The lexicographic ordering of the sequences is determined by a numeric
+ * comparison of the char values <i>cs1[k]</i> with <i>cs2[k]</i>. If there is
+ * no such index <i>k</i>, the shorter sequence is considered lexicographically
+ * less than the other. If the sequences have the same length, the sequences are
+ * considered lexicographically equal.
+ *
+ *
+ * @param cs1 the first {@code CharSequence}
+ * @param cs2 the second {@code CharSequence}
+ *
+ * @return the value {@code 0} if the two {@code CharSequence} are equal;
+ * a negative integer if the first {@code CharSequence}
+ * is lexicographically less than the second; or a
+ * positive integer if the first {@code CharSequence} is
+ * lexicographically greater than the second.
+ *
+ * @since 11
+ */
+ @SuppressWarnings("unchecked")
+ public static int compare(CharSequence cs1, CharSequence cs2) {
+ if (Objects.requireNonNull(cs1) == Objects.requireNonNull(cs2)) {
+ return 0;
+ }
+
+ if (cs1.getClass() == cs2.getClass() && cs1 instanceof Comparable) {
+ return ((Comparable<Object>) cs1).compareTo(cs2);
+ }
+
+ for (int i = 0, len = Math.min(cs1.length(), cs2.length()); i < len; i++) {
+ char a = cs1.charAt(i);
+ char b = cs2.charAt(i);
+ if (a != b) {
+ return a - b;
+ }
+ }
+
+ return cs1.length() - cs2.length();
+ }
+
}
--- a/src/java.base/share/classes/java/lang/Character.java Thu Mar 01 16:35:36 2018 -0500
+++ b/src/java.base/share/classes/java/lang/Character.java Fri Mar 02 21:00:12 2018 +0100
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2002, 2017, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2002, 2018, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
@@ -7568,6 +7568,11 @@
* specified {@code char}. The result is a string of length
* 1 consisting solely of the specified {@code char}.
*
+ * @apiNote This method cannot handle <a
+ * href="#supplementary"> supplementary characters</a>. To support
+ * all Unicode characters, including supplementary characters, use
+ * the {@link #toString(int)} method.
+ *
* @param c the {@code char} to be converted
* @return the string representation of the specified {@code char}
* @since 1.4
@@ -7577,6 +7582,22 @@
}
/**
+ * Returns a {@code String} object representing the
+ * specified character (Unicode code point). The result is a string of
+ * length 1 or 2, consisting solely of the specified {@code codePoint}.
+ *
+ * @param codePoint the {@code codePoint} to be converted
+ * @return the string representation of the specified {@code codePoint}
+ * @exception IllegalArgumentException if the specified
+ * {@code codePoint} is not a {@linkplain #isValidCodePoint
+ * valid Unicode code point}.
+ * @since 11
+ */
+ public static String toString(int codePoint) {
+ return String.valueOfCodePoint(codePoint);
+ }
+
+ /**
* Determines whether the specified code point is a valid
* <a href="http://www.unicode.org/glossary/#code_point">
* Unicode code point value</a>.
--- a/src/java.base/share/classes/java/lang/String.java Thu Mar 01 16:35:36 2018 -0500
+++ b/src/java.base/share/classes/java/lang/String.java Fri Mar 02 21:00:12 2018 +0100
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 1994, 2017, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 1994, 2018, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
@@ -2963,6 +2963,55 @@
*/
public native String intern();
+ /**
+ * Returns a string whose value is the concatenation of this
+ * string repeated {@code count} times.
+ * <p>
+ * If this string is empty or count is zero then the empty
+ * string is returned.
+ *
+ * @param count number of times to repeat
+ *
+ * @return A string composed of this string repeated
+ * {@code count} times or the empty string if this
+ * string is empty or count is zero
+ *
+ * @throws IllegalArgumentException if the {@code count} is
+ * negative.
+ *
+ * @since 11
+ */
+ public String repeat(int count) {
+ if (count < 0) {
+ throw new IllegalArgumentException("count is negative: " + count);
+ }
+ if (count == 1) {
+ return this;
+ }
+ final int len = value.length;
+ if (len == 0 || count == 0) {
+ return "";
+ }
+ if (len == 1) {
+ final byte[] single = new byte[count];
+ Arrays.fill(single, value[0]);
+ return new String(single, coder);
+ }
+ if (Integer.MAX_VALUE / count < len) {
+ throw new OutOfMemoryError("Repeating " + len + " bytes String " + count +
+ " times will produce a String exceeding maximum size.");
+ }
+ final int limit = len * count;
+ final byte[] multiple = new byte[limit];
+ System.arraycopy(value, 0, multiple, 0, len);
+ int copied = len;
+ for (; copied < limit - copied; copied <<= 1) {
+ System.arraycopy(multiple, 0, multiple, copied, copied);
+ }
+ System.arraycopy(multiple, 0, multiple, copied, limit - copied);
+ return new String(multiple, coder);
+ }
+
////////////////////////////////////////////////////////////////
/**
@@ -3108,4 +3157,27 @@
"begin " + begin + ", end " + end + ", length " + length);
}
}
+
+ /**
+ * Returns the string representation of the {@code codePoint}
+ * argument.
+ *
+ * @param codePoint a {@code codePoint}.
+ * @return a string of length {@code 1} or {@code 2} containing
+ * as its single character the argument {@code codePoint}.
+ * @throws IllegalArgumentException if the specified
+ * {@code codePoint} is not a {@linkplain Character#isValidCodePoint
+ * valid Unicode code point}.
+ */
+ static String valueOfCodePoint(int codePoint) {
+ if (COMPACT_STRINGS && StringLatin1.canEncode(codePoint)) {
+ return new String(StringLatin1.toBytes((char)codePoint), LATIN1);
+ } else if (Character.isBmpCodePoint(codePoint)) {
+ return new String(StringUTF16.toBytes((char)codePoint), UTF16);
+ } else if (Character.isSupplementaryCodePoint(codePoint)) {
+ return new String(StringUTF16.toBytesSupplementary(codePoint), UTF16);
+ }
+
+ throw new IllegalArgumentException("Not a valid Unicode code point");
+ }
}
--- a/src/java.base/share/classes/java/lang/StringBuffer.java Thu Mar 01 16:35:36 2018 -0500
+++ b/src/java.base/share/classes/java/lang/StringBuffer.java Fri Mar 02 21:00:12 2018 +0100
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 1994, 2013, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 1994, 2018, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
@@ -90,6 +90,14 @@
* this one, as it supports all of the same operations but it is faster, as
* it performs no synchronization.
*
+ * @apiNote
+ * {@code StringBuffer} implements {@code Comparable} but does not override
+ * {@link Object#equals equals}. Thus, the natural ordering of {@code StringBuffer}
+ * is inconsistent with equals. Care should be exercised if {@code StringBuffer}
+ * objects are used as keys in a {@code SortedMap} or elements in a {@code SortedSet}.
+ * See {@link Comparable}, {@link java.util.SortedMap SortedMap}, or
+ * {@link java.util.SortedSet SortedSet} for more information.
+ *
* @author Arthur van Hoff
* @see java.lang.StringBuilder
* @see java.lang.String
@@ -97,7 +105,7 @@
*/
public final class StringBuffer
extends AbstractStringBuilder
- implements java.io.Serializable, CharSequence
+ implements java.io.Serializable, Comparable<StringBuffer>, CharSequence
{
/**
@@ -162,6 +170,35 @@
append(seq);
}
+ /**
+ * Compares two {@code StringBuffer} instances lexicographically. This method
+ * follows the same rules for lexicographical comparison as defined in the
+ * {@linkplain java.lang.CharSequence#compare(java.lang.CharSequence,
+ * java.lang.CharSequence) CharSequence.compare(this, another)} method.
+ *
+ * <p>
+ * For finer-grained, locale-sensitive String comparison, refer to
+ * {@link java.text.Collator}.
+ *
+ * @implNote
+ * This method synchronizes on {@code this}, the current object, but not
+ * {@code StringBuffer another} with which {@code this StringBuffer} is compared.
+ *
+ * @param another the {@code StringBuffer} to be compared with
+ *
+ * @return the value {@code 0} if this {@code StringBuffer} contains the same
+ * character sequence as that of the argument {@code StringBuffer}; a negative integer
+ * if this {@code StringBuffer} is lexicographically less than the
+ * {@code StringBuffer} argument; or a positive integer if this {@code StringBuffer}
+ * is lexicographically greater than the {@code StringBuffer} argument.
+ *
+ * @since 11
+ */
+ @Override
+ public synchronized int compareTo(StringBuffer another) {
+ return super.compareTo(another);
+ }
+
@Override
public synchronized int length() {
return count;
--- a/src/java.base/share/classes/java/lang/StringBuilder.java Thu Mar 01 16:35:36 2018 -0500
+++ b/src/java.base/share/classes/java/lang/StringBuilder.java Fri Mar 02 21:00:12 2018 +0100
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2003, 2013, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2003, 2018, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
@@ -69,6 +69,14 @@
* or method in this class will cause a {@link NullPointerException} to be
* thrown.
*
+ * @apiNote
+ * {@code StringBuilder} implements {@code Comparable} but does not override
+ * {@link Object#equals equals}. Thus, the natural ordering of {@code StringBuilder}
+ * is inconsistent with equals. Care should be exercised if {@code StringBuilder}
+ * objects are used as keys in a {@code SortedMap} or elements in a {@code SortedSet}.
+ * See {@link Comparable}, {@link java.util.SortedMap SortedMap}, or
+ * {@link java.util.SortedSet SortedSet} for more information.
+ *
* @author Michael McCloskey
* @see java.lang.StringBuffer
* @see java.lang.String
@@ -76,7 +84,7 @@
*/
public final class StringBuilder
extends AbstractStringBuilder
- implements java.io.Serializable, CharSequence
+ implements java.io.Serializable, Comparable<StringBuilder>, CharSequence
{
/** use serialVersionUID for interoperability */
@@ -130,6 +138,31 @@
append(seq);
}
+ /**
+ * Compares two {@code StringBuilder} instances lexicographically. This method
+ * follows the same rules for lexicographical comparison as defined in the
+ * {@linkplain java.lang.CharSequence#compare(java.lang.CharSequence,
+ * java.lang.CharSequence) CharSequence.compare(this, another)} method.
+ *
+ * <p>
+ * For finer-grained, locale-sensitive String comparison, refer to
+ * {@link java.text.Collator}.
+ *
+ * @param another the {@code StringBuilder} to be compared with
+ *
+ * @return the value {@code 0} if this {@code StringBuilder} contains the same
+ * character sequence as that of the argument {@code StringBuilder}; a negative integer
+ * if this {@code StringBuilder} is lexicographically less than the
+ * {@code StringBuilder} argument; or a positive integer if this {@code StringBuilder}
+ * is lexicographically greater than the {@code StringBuilder} argument.
+ *
+ * @since 11
+ */
+ @Override
+ public int compareTo(StringBuilder another) {
+ return super.compareTo(another);
+ }
+
@Override
public StringBuilder append(Object obj) {
return append(String.valueOf(obj));
--- a/src/java.base/share/classes/java/lang/StringLatin1.java Thu Mar 01 16:35:36 2018 -0500
+++ b/src/java.base/share/classes/java/lang/StringLatin1.java Fri Mar 02 21:00:12 2018 +0100
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2015, 2017, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2015, 2018, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
@@ -103,6 +103,10 @@
public static int compareTo(byte[] value, byte[] other) {
int len1 = value.length;
int len2 = other.length;
+ return compareTo(value, other, len1, len2);
+ }
+
+ public static int compareTo(byte[] value, byte[] other, int len1, int len2) {
int lim = Math.min(len1, len2);
for (int k = 0; k < lim; k++) {
if (value[k] != other[k]) {
@@ -116,6 +120,20 @@
public static int compareToUTF16(byte[] value, byte[] other) {
int len1 = length(value);
int len2 = StringUTF16.length(other);
+ return compareToUTF16Values(value, other, len1, len2);
+ }
+
+ /*
+ * Checks the boundary and then compares the byte arrays.
+ */
+ public static int compareToUTF16(byte[] value, byte[] other, int len1, int len2) {
+ checkOffset(len1, length(value));
+ checkOffset(len2, StringUTF16.length(other));
+
+ return compareToUTF16Values(value, other, len1, len2);
+ }
+
+ private static int compareToUTF16Values(byte[] value, byte[] other, int len1, int len2) {
int lim = Math.min(len1, len2);
for (int k = 0; k < lim; k++) {
char c1 = getChar(value, k);
--- a/src/java.base/share/classes/java/lang/StringUTF16.java Thu Mar 01 16:35:36 2018 -0500
+++ b/src/java.base/share/classes/java/lang/StringUTF16.java Fri Mar 02 21:00:12 2018 +0100
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2015, 2017, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2015, 2018, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
@@ -235,6 +235,13 @@
return result;
}
+ static byte[] toBytesSupplementary(int cp) {
+ byte[] result = new byte[4];
+ putChar(result, 0, Character.highSurrogate(cp));
+ putChar(result, 1, Character.lowSurrogate(cp));
+ return result;
+ }
+
@HotSpotIntrinsicCandidate
public static void getChars(byte[] value, int srcBegin, int srcEnd, char dst[], int dstBegin) {
// We need a range check here because 'getChar' has no checks
@@ -273,6 +280,20 @@
public static int compareTo(byte[] value, byte[] other) {
int len1 = length(value);
int len2 = length(other);
+ return compareValues(value, other, len1, len2);
+ }
+
+ /*
+ * Checks the boundary and then compares the byte arrays.
+ */
+ public static int compareTo(byte[] value, byte[] other, int len1, int len2) {
+ checkOffset(len1, value);
+ checkOffset(len2, other);
+
+ return compareValues(value, other, len1, len2);
+ }
+
+ private static int compareValues(byte[] value, byte[] other, int len1, int len2) {
int lim = Math.min(len1, len2);
for (int k = 0; k < lim; k++) {
char c1 = getChar(value, k);
@@ -289,6 +310,10 @@
return -StringLatin1.compareToUTF16(other, value);
}
+ public static int compareToLatin1(byte[] value, byte[] other, int len1, int len2) {
+ return -StringLatin1.compareToUTF16(other, value, len2, len1);
+ }
+
public static int compareToCI(byte[] value, byte[] other) {
int len1 = length(value);
int len2 = length(other);
--- a/src/java.base/share/classes/java/lang/Thread.java Thu Mar 01 16:35:36 2018 -0500
+++ b/src/java.base/share/classes/java/lang/Thread.java Fri Mar 02 21:00:12 2018 +0100
@@ -1007,22 +1007,22 @@
* @spec JSR-51
*/
public void interrupt() {
- Thread me = Thread.currentThread();
- if (this != me)
+ if (this != Thread.currentThread()) {
checkAccess();
+ // thread may be blocked in an I/O operation
+ synchronized (blockerLock) {
+ Interruptible b = blocker;
+ if (b != null) {
+ interrupt0(); // set interrupt status
+ b.interrupt(this);
+ return;
+ }
+ }
+ }
+
// set interrupt status
interrupt0();
-
- // thread may be blocked in an I/O operation
- if (this != me && blocker != null) {
- synchronized (blockerLock) {
- Interruptible b = blocker;
- if (b != null) {
- b.interrupt(this);
- }
- }
- }
}
/**
--- a/src/java.base/share/classes/java/lang/invoke/InvokerBytecodeGenerator.java Thu Mar 01 16:35:36 2018 -0500
+++ b/src/java.base/share/classes/java/lang/invoke/InvokerBytecodeGenerator.java Fri Mar 02 21:00:12 2018 +0100
@@ -93,6 +93,10 @@
private ClassWriter cw;
private MethodVisitor mv;
+ /** Single element internal class name lookup cache. */
+ private Class<?> lastClass;
+ private String lastInternalName;
+
private static final MemberName.Factory MEMBERNAME_FACTORY = MemberName.getFactory();
private static final Class<?> HOST_CLASS = LambdaForm.class;
@@ -602,13 +606,18 @@
mv.visitInsn(opcode);
}
- private static String getInternalName(Class<?> c) {
+ private String getInternalName(Class<?> c) {
if (c == Object.class) return OBJ;
else if (c == Object[].class) return OBJARY;
else if (c == Class.class) return CLS;
else if (c == MethodHandle.class) return MH;
assert(VerifyAccess.isTypeVisible(c, Object.class)) : c.getName();
- return c.getName().replace('.', '/');
+
+ if (c == lastClass) {
+ return lastInternalName;
+ }
+ lastClass = c;
+ return lastInternalName = c.getName().replace('.', '/');
}
private static MemberName resolveFrom(String name, MethodType type, Class<?> holder) {
--- a/src/java.base/share/classes/java/net/URLClassLoader.java Thu Mar 01 16:35:36 2018 -0500
+++ b/src/java.base/share/classes/java/net/URLClassLoader.java Fri Mar 02 21:00:12 2018 +0100
@@ -105,7 +105,8 @@
* @exception SecurityException if a security manager exists and its
* {@code checkCreateClassLoader} method doesn't allow
* creation of a class loader.
- * @exception NullPointerException if {@code urls} is {@code null}.
+ * @exception NullPointerException if {@code urls} or any of its
+ * elements is {@code null}.
* @see SecurityManager#checkCreateClassLoader
*/
public URLClassLoader(URL[] urls, ClassLoader parent) {
@@ -149,7 +150,8 @@
* @exception SecurityException if a security manager exists and its
* {@code checkCreateClassLoader} method doesn't allow
* creation of a class loader.
- * @exception NullPointerException if {@code urls} is {@code null}.
+ * @exception NullPointerException if {@code urls} or any of its
+ * elements is {@code null}.
* @see SecurityManager#checkCreateClassLoader
*/
public URLClassLoader(URL[] urls) {
@@ -192,7 +194,8 @@
* @exception SecurityException if a security manager exists and its
* {@code checkCreateClassLoader} method doesn't allow
* creation of a class loader.
- * @exception NullPointerException if {@code urls} is {@code null}.
+ * @exception NullPointerException if {@code urls} or any of its
+ * elements is {@code null}.
* @see SecurityManager#checkCreateClassLoader
*/
public URLClassLoader(URL[] urls, ClassLoader parent,
@@ -221,7 +224,8 @@
* @param parent the parent class loader for delegation
*
* @throws IllegalArgumentException if the given name is empty.
- * @throws NullPointerException if {@code urls} is {@code null}.
+ * @throws NullPointerException if {@code urls} or any of its
+ * elements is {@code null}.
*
* @throws SecurityException if a security manager exists and its
* {@link SecurityManager#checkCreateClassLoader()} method doesn't
@@ -256,7 +260,8 @@
* @param factory the URLStreamHandlerFactory to use when creating URLs
*
* @throws IllegalArgumentException if the given name is empty.
- * @throws NullPointerException if {@code urls} is {@code null}.
+ * @throws NullPointerException if {@code urls} or any of its
+ * elements is {@code null}.
*
* @throws SecurityException if a security manager exists and its
* {@code checkCreateClassLoader} method doesn't allow
@@ -805,7 +810,8 @@
*
* @param urls the URLs to search for classes and resources
* @param parent the parent class loader for delegation
- * @exception NullPointerException if {@code urls} is {@code null}.
+ * @exception NullPointerException if {@code urls} or any of its
+ * elements is {@code null}.
* @return the resulting class loader
*/
public static URLClassLoader newInstance(final URL[] urls,
@@ -831,7 +837,8 @@
* loading the class.
*
* @param urls the URLs to search for classes and resources
- * @exception NullPointerException if {@code urls} is {@code null}.
+ * @exception NullPointerException if {@code urls} or any of its
+ * elements is {@code null}.
* @return the resulting class loader
*/
public static URLClassLoader newInstance(final URL[] urls) {
--- a/src/java.base/share/classes/java/nio/charset/CoderResult.java Thu Mar 01 16:35:36 2018 -0500
+++ b/src/java.base/share/classes/java/nio/charset/CoderResult.java Fri Mar 02 21:00:12 2018 +0100
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2001, 2013, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2001, 2018, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
@@ -25,11 +25,10 @@
package java.nio.charset;
-import java.lang.ref.WeakReference;
-import java.nio.*;
+import java.nio.BufferOverflowException;
+import java.nio.BufferUnderflowException;
+import java.util.concurrent.ConcurrentHashMap;
import java.util.Map;
-import java.util.HashMap;
-
/**
* A description of the result state of a coder.
@@ -191,37 +190,20 @@
public static final CoderResult OVERFLOW
= new CoderResult(CR_OVERFLOW, 0);
- private abstract static class Cache {
-
- private Map<Integer,WeakReference<CoderResult>> cache = null;
-
- protected abstract CoderResult create(int len);
+ private static final class Cache {
+ static final Cache INSTANCE = new Cache();
+ private Cache() {}
- private synchronized CoderResult get(int len) {
- if (len <= 0)
- throw new IllegalArgumentException("Non-positive length");
- Integer k = len;
- WeakReference<CoderResult> w;
- CoderResult e = null;
- if (cache == null) {
- cache = new HashMap<>();
- } else if ((w = cache.get(k)) != null) {
- e = w.get();
- }
- if (e == null) {
- e = create(len);
- cache.put(k, new WeakReference<>(e));
- }
- return e;
- }
-
+ final Map<Integer, CoderResult> unmappable = new ConcurrentHashMap<>();
+ final Map<Integer, CoderResult> malformed = new ConcurrentHashMap<>();
}
- private static Cache malformedCache
- = new Cache() {
- public CoderResult create(int len) {
- return new CoderResult(CR_MALFORMED, len);
- }};
+ private static final CoderResult[] malformed4 = new CoderResult[] {
+ new CoderResult(CR_MALFORMED, 1),
+ new CoderResult(CR_MALFORMED, 2),
+ new CoderResult(CR_MALFORMED, 3),
+ new CoderResult(CR_MALFORMED, 4),
+ };
/**
* Static factory method that returns the unique object describing a
@@ -233,14 +215,20 @@
* @return The requested coder-result object
*/
public static CoderResult malformedForLength(int length) {
- return malformedCache.get(length);
+ if (length <= 0)
+ throw new IllegalArgumentException("Non-positive length");
+ if (length <= 4)
+ return malformed4[length - 1];
+ return Cache.INSTANCE.malformed.computeIfAbsent(length,
+ n -> new CoderResult(CR_MALFORMED, n));
}
- private static Cache unmappableCache
- = new Cache() {
- public CoderResult create(int len) {
- return new CoderResult(CR_UNMAPPABLE, len);
- }};
+ private static final CoderResult[] unmappable4 = new CoderResult[] {
+ new CoderResult(CR_UNMAPPABLE, 1),
+ new CoderResult(CR_UNMAPPABLE, 2),
+ new CoderResult(CR_UNMAPPABLE, 3),
+ new CoderResult(CR_UNMAPPABLE, 4),
+ };
/**
* Static factory method that returns the unique result object describing
@@ -252,7 +240,12 @@
* @return The requested coder-result object
*/
public static CoderResult unmappableForLength(int length) {
- return unmappableCache.get(length);
+ if (length <= 0)
+ throw new IllegalArgumentException("Non-positive length");
+ if (length <= 4)
+ return unmappable4[length - 1];
+ return Cache.INSTANCE.unmappable.computeIfAbsent(length,
+ n -> new CoderResult(CR_UNMAPPABLE, n));
}
/**
--- a/src/java.base/share/classes/java/util/jar/Attributes.java Thu Mar 01 16:35:36 2018 -0500
+++ b/src/java.base/share/classes/java/util/jar/Attributes.java Fri Mar 02 21:00:12 2018 +0100
@@ -40,7 +40,9 @@
* The Attributes class maps Manifest attribute names to associated string
* values. Valid attribute names are case-insensitive, are restricted to
* the ASCII characters in the set [0-9a-zA-Z_-], and cannot exceed 70
- * characters in length. Attribute values can contain any characters and
+ * characters in length. There must be a colon and a SPACE after the name;
+ * the combined length will not exceed 72 characters.
+ * Attribute values can contain any characters and
* will be UTF8-encoded when written to the output stream. See the
* <a href="{@docRoot}/../specs/jar/jar.html">JAR File Specification</a>
* for more information about valid attribute names and values.
@@ -310,8 +312,8 @@
}
buffer.append(value);
+ Manifest.make72Safe(buffer);
buffer.append("\r\n");
- Manifest.make72Safe(buffer);
os.writeBytes(buffer.toString());
}
os.writeBytes("\r\n");
@@ -355,8 +357,8 @@
}
buffer.append(value);
+ Manifest.make72Safe(buffer);
buffer.append("\r\n");
- Manifest.make72Safe(buffer);
out.writeBytes(buffer.toString());
}
}
--- a/src/java.base/share/classes/java/util/jar/Manifest.java Thu Mar 01 16:35:36 2018 -0500
+++ b/src/java.base/share/classes/java/util/jar/Manifest.java Fri Mar 02 21:00:12 2018 +0100
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 1997, 2013, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 1997, 2018, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
@@ -157,8 +157,8 @@
value = new String(vb, 0, 0, vb.length);
}
buffer.append(value);
+ make72Safe(buffer);
buffer.append("\r\n");
- make72Safe(buffer);
dos.writeBytes(buffer.toString());
e.getValue().write(dos);
}
@@ -170,13 +170,11 @@
*/
static void make72Safe(StringBuffer line) {
int length = line.length();
- if (length > 72) {
- int index = 70;
- while (index < length - 2) {
- line.insert(index, "\r\n ");
- index += 72;
- length += 3;
- }
+ int index = 72;
+ while (index < length) {
+ line.insert(index, "\r\n ");
+ index += 74; // + line width + line break ("\r\n")
+ length += 3; // + line break ("\r\n") and space
}
return;
}
--- a/src/java.base/share/classes/javax/security/auth/AuthPermission.java Thu Mar 01 16:35:36 2018 -0500
+++ b/src/java.base/share/classes/javax/security/auth/AuthPermission.java Fri Mar 02 21:00:12 2018 +0100
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 1998, 2015, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 1998, 2018, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
@@ -32,7 +32,7 @@
*
* <p> The target name is the name of a security configuration parameter
* (see below). Currently the {@code AuthPermission} object is used to
- * guard access to the {@link Policy}, {@link Subject},
+ * guard access to the {@link Subject},
* {@link javax.security.auth.login.LoginContext}, and
* {@link javax.security.auth.login.Configuration} objects.
*
@@ -121,21 +121,6 @@
* {@code LoginContext}.
* </pre>
*
- * <p> {@code javax.security.auth.Policy} has been
- * deprecated in favor of {@code java.security.Policy}.
- * Therefore, the following target names have also been deprecated:
- *
- * <pre>
- * getPolicy - allow the caller to retrieve the system-wide
- * Subject-based access control policy.
- *
- * setPolicy - allow the caller to set the system-wide
- * Subject-based access control policy.
- *
- * refreshPolicy - allow the caller to refresh the system-wide
- * Subject-based access control policy.
- * </pre>
- *
* @implNote
* Implementations may define additional target names, but should use naming
* conventions such as reverse domain name notation to avoid name clashes.
--- a/src/java.base/share/classes/javax/security/auth/Policy.java Thu Mar 01 16:35:36 2018 -0500
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,356 +0,0 @@
-/*
- * Copyright (c) 1998, 2017, Oracle and/or its affiliates. All rights reserved.
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * This code is free software; you can redistribute it and/or modify it
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
- * or visit www.oracle.com if you need additional information or have any
- * questions.
- */
-
-package javax.security.auth;
-
-import java.security.Security;
-import java.security.AccessController;
-import java.security.PrivilegedAction;
-import java.security.PrivilegedExceptionAction;
-import java.util.Objects;
-import sun.security.util.Debug;
-
-/**
- * <p> This is an abstract class for representing the system policy for
- * Subject-based authorization. A subclass implementation
- * of this class provides a means to specify a Subject-based
- * access control {@code Policy}.
- *
- * <p> A {@code Policy} object can be queried for the set of
- * Permissions granted to code running as a
- * {@code Principal} in the following manner:
- *
- * <pre>
- * policy = Policy.getPolicy();
- * PermissionCollection perms = policy.getPermissions(subject,
- * codeSource);
- * </pre>
- *
- * The {@code Policy} object consults the local policy and returns
- * and appropriate {@code Permissions} object with the
- * Permissions granted to the Principals associated with the
- * provided {@code subject}, and granted to the code specified
- * by the provided {@code codeSource}.
- *
- * <p> A {@code Policy} contains the following information.
- * Note that this example only represents the syntax for the default
- * {@code Policy} implementation. Subclass implementations of this class
- * may implement alternative syntaxes and may retrieve the
- * {@code Policy} from any source such as files, databases,
- * or servers.
- *
- * <p> Each entry in the {@code Policy} is represented as
- * a <b><i>grant</i></b> entry. Each <b><i>grant</i></b> entry
- * specifies a codebase, code signers, and Principals triplet,
- * as well as the Permissions granted to that triplet.
- *
- * <pre>
- * grant CodeBase ["URL"], Signedby ["signers"],
- * Principal [Principal_Class] "Principal_Name" {
- * Permission Permission_Class ["Target_Name"]
- * [, "Permission_Actions"]
- * [, signedBy "SignerName"];
- * };
- * </pre>
- *
- * The CodeBase and Signedby components of the triplet name/value pairs
- * are optional. If they are not present, then any codebase will match,
- * and any signer (including unsigned code) will match.
- * For Example,
- *
- * <pre>
- * grant CodeBase "foo.com", Signedby "foo",
- * Principal com.sun.security.auth.UnixPrincipal "duke" {
- * permission java.io.FilePermission "/home/duke", "read, write";
- * };
- * </pre>
- *
- * This <b><i>grant</i></b> entry specifies that code from "foo.com",
- * signed by "foo', and running as a {@code UnixPrincipal} with the
- * name, duke, has one {@code Permission}. This {@code Permission}
- * permits the executing code to read and write files in the directory,
- * "/home/duke".
- *
- * <p> To "run" as a particular {@code Principal},
- * code invokes the {@code Subject.doAs(subject, ...)} method.
- * After invoking that method, the code runs as all the Principals
- * associated with the specified {@code Subject}.
- * Note that this {@code Policy} (and the Permissions
- * granted in this {@code Policy}) only become effective
- * after the call to {@code Subject.doAs} has occurred.
- *
- * <p> Multiple Principals may be listed within one <b><i>grant</i></b> entry.
- * All the Principals in the grant entry must be associated with
- * the {@code Subject} provided to {@code Subject.doAs}
- * for that {@code Subject} to be granted the specified Permissions.
- *
- * <pre>
- * grant Principal com.sun.security.auth.UnixPrincipal "duke",
- * Principal com.sun.security.auth.UnixNumericUserPrincipal "0" {
- * permission java.io.FilePermission "/home/duke", "read, write";
- * permission java.net.SocketPermission "duke.com", "connect";
- * };
- * </pre>
- *
- * This entry grants any code running as both "duke" and "0"
- * permission to read and write files in duke's home directory,
- * as well as permission to make socket connections to "duke.com".
- *
- * <p> Note that non Principal-based grant entries are not permitted
- * in this {@code Policy}. Therefore, grant entries such as:
- *
- * <pre>
- * grant CodeBase "foo.com", Signedby "foo" {
- * permission java.io.FilePermission "/tmp/scratch", "read, write";
- * };
- * </pre>
- *
- * are rejected. Such permission must be listed in the
- * {@code java.security.Policy}.
- *
- * <p> The default {@code Policy} implementation can be changed by
- * setting the value of the {@code auth.policy.provider} security property to
- * the fully qualified name of the desired {@code Policy} implementation class.
- *
- * @deprecated Replaced by java.security.Policy.
- * java.security.Policy has a method:
- * <pre>
- * public PermissionCollection getPermissions
- * (java.security.ProtectionDomain pd)
- *
- * </pre>
- * and ProtectionDomain has a constructor:
- * <pre>
- * public ProtectionDomain
- * (CodeSource cs,
- * PermissionCollection permissions,
- * ClassLoader loader,
- * Principal[] principals)
- * </pre>
- *
- * These two APIs provide callers the means to query the
- * Policy for Principal-based Permission entries.
- * This class is subject to removal in a future version of Java SE.
- *
- * @since 1.4
- * @see java.security.Security security properties
- */
-@Deprecated(since="1.4", forRemoval=true)
-public abstract class Policy {
-
- private static Policy policy;
- private static final String AUTH_POLICY =
- "sun.security.provider.AuthPolicyFile";
-
- private final java.security.AccessControlContext acc =
- java.security.AccessController.getContext();
-
- // true if a custom (not AUTH_POLICY) system-wide policy object is set
- private static boolean isCustomPolicy;
-
- /**
- * Sole constructor. (For invocation by subclass constructors, typically
- * implicit.)
- */
- protected Policy() { }
-
- /**
- * Returns the installed Policy object.
- * This method first calls
- * {@code SecurityManager.checkPermission} with the
- * {@code AuthPermission("getPolicy")} permission
- * to ensure the caller has permission to get the Policy object.
- *
- * @return the installed Policy. The return value cannot be
- * {@code null}.
- *
- * @exception java.lang.SecurityException if the current thread does not
- * have permission to get the Policy object.
- *
- * @see #setPolicy
- */
- public static Policy getPolicy() {
- java.lang.SecurityManager sm = System.getSecurityManager();
- if (sm != null) sm.checkPermission(new AuthPermission("getPolicy"));
- return getPolicyNoCheck();
- }
-
- /**
- * Returns the installed Policy object, skipping the security check.
- *
- * @return the installed Policy.
- *
- */
- static Policy getPolicyNoCheck() {
- if (policy == null) {
-
- synchronized(Policy.class) {
-
- if (policy == null) {
- String policy_class = null;
- policy_class = AccessController.doPrivileged
- (new PrivilegedAction<String>() {
- public String run() {
- return java.security.Security.getProperty
- ("auth.policy.provider");
- }
- });
- if (policy_class == null) {
- policy_class = AUTH_POLICY;
- }
-
- try {
- final String finalClass = policy_class;
-
- Policy untrustedImpl = AccessController.doPrivileged(
- new PrivilegedExceptionAction<Policy>() {
- public Policy run() throws ClassNotFoundException,
- InstantiationException,
- IllegalAccessException {
- Class<? extends Policy> implClass = Class.forName(
- finalClass, false,
- Thread.currentThread().getContextClassLoader()
- ).asSubclass(Policy.class);
- return implClass.newInstance();
- }
- });
- AccessController.doPrivileged(
- new PrivilegedExceptionAction<Void>() {
- public Void run() {
- setPolicy(untrustedImpl);
- isCustomPolicy = !finalClass.equals(AUTH_POLICY);
- return null;
- }
- }, Objects.requireNonNull(untrustedImpl.acc)
- );
- } catch (Exception e) {
- throw new SecurityException
- (sun.security.util.ResourcesMgr.getString
- ("unable.to.instantiate.Subject.based.policy"));
- }
- }
- }
- }
- return policy;
- }
-
-
- /**
- * Sets the system-wide Policy object. This method first calls
- * {@code SecurityManager.checkPermission} with the
- * {@code AuthPermission("setPolicy")}
- * permission to ensure the caller has permission to set the Policy.
- *
- * @param policy the new system Policy object.
- *
- * @exception java.lang.SecurityException if the current thread does not
- * have permission to set the Policy.
- *
- * @see #getPolicy
- */
- public static void setPolicy(Policy policy) {
- java.lang.SecurityManager sm = System.getSecurityManager();
- if (sm != null) sm.checkPermission(new AuthPermission("setPolicy"));
- Policy.policy = policy;
- // all non-null policy objects are assumed to be custom
- isCustomPolicy = policy != null ? true : false;
- }
-
- /**
- * Returns true if a custom (not AUTH_POLICY) system-wide policy object
- * has been set or installed. This method is called by
- * SubjectDomainCombiner to provide backwards compatibility for
- * developers that provide their own javax.security.auth.Policy
- * implementations.
- *
- * @return true if a custom (not AUTH_POLICY) system-wide policy object
- * has been set; false otherwise
- */
- static boolean isCustomPolicySet(Debug debug) {
- if (policy != null) {
- if (debug != null && isCustomPolicy) {
- debug.println("Providing backwards compatibility for " +
- "javax.security.auth.policy implementation: " +
- policy.toString());
- }
- return isCustomPolicy;
- }
- // check if custom policy has been set using auth.policy.provider prop
- String policyClass = java.security.AccessController.doPrivileged
- (new java.security.PrivilegedAction<String>() {
- public String run() {
- return Security.getProperty("auth.policy.provider");
- }
- });
- if (policyClass != null && !policyClass.equals(AUTH_POLICY)) {
- if (debug != null) {
- debug.println("Providing backwards compatibility for " +
- "javax.security.auth.policy implementation: " +
- policyClass);
- }
- return true;
- }
- return false;
- }
-
- /**
- * Retrieve the Permissions granted to the Principals associated with
- * the specified {@code CodeSource}.
- *
- * @param subject the {@code Subject}
- * whose associated Principals,
- * in conjunction with the provided
- * {@code CodeSource}, determines the Permissions
- * returned by this method. This parameter
- * may be {@code null}.
- *
- * @param cs the code specified by its {@code CodeSource}
- * that determines, in conjunction with the provided
- * {@code Subject}, the Permissions
- * returned by this method. This parameter may be
- * {@code null}.
- *
- * @return the Collection of Permissions granted to all the
- * {@code Subject} and code specified in
- * the provided <i>subject</i> and <i>cs</i>
- * parameters.
- */
- public abstract java.security.PermissionCollection getPermissions
- (Subject subject,
- java.security.CodeSource cs);
-
- /**
- * Refresh and reload the Policy.
- *
- * <p>This method causes this object to refresh/reload its current
- * Policy. This is implementation-dependent.
- * For example, if the Policy object is stored in
- * a file, calling {@code refresh} will cause the file to be re-read.
- *
- * @exception SecurityException if the caller does not have permission
- * to refresh the Policy.
- */
- public abstract void refresh();
-}
--- a/src/java.base/share/classes/javax/security/auth/SubjectDomainCombiner.java Thu Mar 01 16:35:36 2018 -0500
+++ b/src/java.base/share/classes/javax/security/auth/SubjectDomainCombiner.java Fri Mar 02 21:00:12 2018 +0100
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 1999, 2016, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 1999, 2018, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
@@ -26,13 +26,9 @@
package javax.security.auth;
import java.security.AccessController;
-import java.security.Permission;
-import java.security.Permissions;
-import java.security.PermissionCollection;
import java.security.Principal;
import java.security.PrivilegedAction;
import java.security.ProtectionDomain;
-import java.security.Security;
import java.util.Set;
import java.util.WeakHashMap;
import java.lang.ref.WeakReference;
@@ -56,15 +52,6 @@
sun.security.util.Debug.getInstance("combiner",
"\t[SubjectDomainCombiner]");
- @SuppressWarnings({"deprecation", "removal"})
- // Note: check only at classloading time, not dynamically during combine()
- private static final boolean useJavaxPolicy =
- javax.security.auth.Policy.isCustomPolicySet(debug);
-
- // Relevant only when useJavaxPolicy is true
- private static final boolean allowCaching =
- (useJavaxPolicy && cachePolicy());
-
/**
* Associate the provided {@code Subject} with this
* {@code SubjectDomainCombiner}.
@@ -196,12 +183,6 @@
return null;
}
- // maintain backwards compatibility for developers who provide
- // their own custom javax.security.auth.Policy implementations
- if (useJavaxPolicy) {
- return combineJavaxPolicy(currentDomains, assignedDomains);
- }
-
int cLen = (currentDomains == null ? 0 : currentDomains.length);
int aLen = (assignedDomains == null ? 0 : assignedDomains.length);
@@ -292,151 +273,6 @@
}
}
- /**
- * Use the javax.security.auth.Policy implementation
- */
- private ProtectionDomain[] combineJavaxPolicy(
- ProtectionDomain[] currentDomains,
- ProtectionDomain[] assignedDomains) {
-
- if (!allowCaching) {
- java.security.AccessController.doPrivileged
- (new PrivilegedAction<Void>() {
- @SuppressWarnings({"deprecation", "removal"})
- public Void run() {
- // Call refresh only caching is disallowed
- javax.security.auth.Policy.getPolicy().refresh();
- return null;
- }
- });
- }
-
-
- int cLen = (currentDomains == null ? 0 : currentDomains.length);
- int aLen = (assignedDomains == null ? 0 : assignedDomains.length);
-
- // the ProtectionDomains for the new AccessControlContext
- // that we will return
- ProtectionDomain[] newDomains = new ProtectionDomain[cLen + aLen];
-
- synchronized(cachedPDs) {
- if (!subject.isReadOnly() &&
- !subject.getPrincipals().equals(principalSet)) {
-
- // if the Subject was mutated, clear the PD cache
- Set<Principal> newSet = subject.getPrincipals();
- synchronized(newSet) {
- principalSet = new java.util.HashSet<Principal>(newSet);
- }
- principals = principalSet.toArray
- (new Principal[principalSet.size()]);
- cachedPDs.clear();
-
- if (debug != null) {
- debug.println("Subject mutated - clearing cache");
- }
- }
-
- for (int i = 0; i < cLen; i++) {
- ProtectionDomain pd = currentDomains[i];
- ProtectionDomain subjectPd = cachedPDs.getValue(pd);
-
- if (subjectPd == null) {
- if (pd.staticPermissionsOnly()) {
- // keep static ProtectionDomain objects static
- subjectPd = pd;
- } else {
- // XXX
- // we must first add the original permissions.
- // that way when we later add the new JAAS permissions,
- // any unresolved JAAS-related permissions will
- // automatically get resolved.
-
- // get the original perms
- Permissions perms = new Permissions();
- PermissionCollection coll = pd.getPermissions();
- java.util.Enumeration<Permission> e;
- if (coll != null) {
- synchronized (coll) {
- e = coll.elements();
- while (e.hasMoreElements()) {
- Permission newPerm =
- e.nextElement();
- perms.add(newPerm);
- }
- }
- }
-
- // get perms from the policy
- final java.security.CodeSource finalCs = pd.getCodeSource();
- final Subject finalS = subject;
- PermissionCollection newPerms =
- java.security.AccessController.doPrivileged
- (new PrivilegedAction<PermissionCollection>() {
- @SuppressWarnings({"deprecation", "removal"})
- public PermissionCollection run() {
- return
- javax.security.auth.Policy.getPolicy().getPermissions
- (finalS, finalCs);
- }
- });
-
- // add the newly granted perms,
- // avoiding duplicates
- synchronized (newPerms) {
- e = newPerms.elements();
- while (e.hasMoreElements()) {
- Permission newPerm = e.nextElement();
- if (!perms.implies(newPerm)) {
- perms.add(newPerm);
- if (debug != null)
- debug.println (
- "Adding perm " + newPerm + "\n");
- }
- }
- }
- subjectPd = new ProtectionDomain
- (finalCs, perms, pd.getClassLoader(), principals);
- }
- if (allowCaching)
- cachedPDs.putValue(pd, subjectPd);
- }
- newDomains[i] = subjectPd;
- }
- }
-
- if (debug != null) {
- debug.println("updated current: ");
- for (int i = 0; i < cLen; i++) {
- debug.println("\tupdated[" + i + "] = " + newDomains[i]);
- }
- }
-
- // now add on the assigned domains
- if (aLen > 0) {
- System.arraycopy(assignedDomains, 0, newDomains, cLen, aLen);
- }
-
- if (debug != null) {
- if (newDomains == null || newDomains.length == 0) {
- debug.println("returning null");
- } else {
- debug.println("combinedDomains: ");
- for (int i = 0; i < newDomains.length; i++) {
- debug.println("newDomain " + i + ": " +
- newDomains[i].toString());
- }
- }
- }
-
- // return the new ProtectionDomains
- if (newDomains == null || newDomains.length == 0) {
- return null;
- } else {
- return newDomains;
- }
- }
-
private static ProtectionDomain[] optimize(ProtectionDomain[] domains) {
if (domains == null || domains.length == 0)
return null;
@@ -476,21 +312,6 @@
return ((num == 0 || optimized.length == 0) ? null : optimized);
}
- private static boolean cachePolicy() {
- String s = AccessController.doPrivileged
- (new PrivilegedAction<String>() {
- public String run() {
- return Security.getProperty("cache.auth.policy");
- }
- });
- if (s != null) {
- return Boolean.parseBoolean(s);
- }
-
- // cache by default
- return true;
- }
-
private static void printInputDomains(ProtectionDomain[] currentDomains,
ProtectionDomain[] assignedDomains) {
if (currentDomains == null || currentDomains.length == 0) {
--- a/src/java.base/share/classes/sun/invoke/util/BytecodeDescriptor.java Thu Mar 01 16:35:36 2018 -0500
+++ b/src/java.base/share/classes/sun/invoke/util/BytecodeDescriptor.java Fri Mar 02 21:00:12 2018 +0100
@@ -107,6 +107,11 @@
}
public static String unparse(Class<?> type) {
+ if (type == Object.class) {
+ return "Ljava/lang/Object;";
+ } else if (type == int.class) {
+ return "I";
+ }
StringBuilder sb = new StringBuilder();
unparseSig(type, sb);
return sb.toString();
@@ -148,6 +153,8 @@
char c = Wrapper.forBasicType(t).basicTypeChar();
if (c != 'L') {
sb.append(c);
+ } else if (t == Object.class) {
+ sb.append("Ljava/lang/Object;");
} else {
boolean lsemi = (!t.isArray());
if (lsemi) sb.append('L');
--- a/src/java.base/share/classes/sun/net/www/MimeTable.java Thu Mar 01 16:35:36 2018 -0500
+++ b/src/java.base/share/classes/sun/net/www/MimeTable.java Fri Mar 02 21:00:12 2018 +0100
@@ -57,9 +57,6 @@
"/etc/mailcap",
"/usr/etc/mailcap",
"/usr/local/etc/mailcap",
- System.getProperty("hotjava.home",
- "/usr/local/hotjava")
- + "/lib/mailcap",
};
return null;
}
--- a/src/java.base/share/classes/sun/nio/ch/SelChImpl.java Thu Mar 01 16:35:36 2018 -0500
+++ b/src/java.base/share/classes/sun/nio/ch/SelChImpl.java Fri Mar 02 21:00:12 2018 +0100
@@ -63,8 +63,6 @@
void translateAndSetInterestOps(int ops, SelectionKeyImpl sk);
- int validOps();
-
void kill() throws IOException;
}
--- a/src/java.base/share/classes/sun/nio/ch/SocketChannelImpl.java Thu Mar 01 16:35:36 2018 -0500
+++ b/src/java.base/share/classes/sun/nio/ch/SocketChannelImpl.java Fri Mar 02 21:00:12 2018 +0100
@@ -96,7 +96,7 @@
private static final int ST_CLOSING = 3;
private static final int ST_KILLPENDING = 4;
private static final int ST_KILLED = 5;
- private int state;
+ private volatile int state; // need stateLock to change
// IDs of native threads doing reads and writes, for signalling
private long readerThread;
@@ -148,12 +148,37 @@
}
}
- // @throws ClosedChannelException if channel is closed
+ /**
+ * Checks that the channel is open.
+ *
+ * @throws ClosedChannelException if channel is closed (or closing)
+ */
private void ensureOpen() throws ClosedChannelException {
if (!isOpen())
throw new ClosedChannelException();
}
+ /**
+ * Checks that the channel is open and connected.
+ *
+ * @apiNote This method uses the "state" field to check if the channel is
+ * open. It should never be used in conjuncion with isOpen or ensureOpen
+ * as these methods check AbstractInterruptibleChannel's closed field - that
+ * field is set before implCloseSelectableChannel is called and so before
+ * the state is changed.
+ *
+ * @throws ClosedChannelException if channel is closed (or closing)
+ * @throws NotYetConnectedException if open and not connected
+ */
+ private void ensureOpenAndConnected() throws ClosedChannelException {
+ int state = this.state;
+ if (state < ST_CONNECTED) {
+ throw new NotYetConnectedException();
+ } else if (state > ST_CONNECTED) {
+ throw new ClosedChannelException();
+ }
+ }
+
@Override
public Socket socket() {
synchronized (stateLock) {
@@ -275,13 +300,14 @@
if (blocking) {
// set hook for Thread.interrupt
begin();
- }
- synchronized (stateLock) {
- ensureOpen();
- if (state != ST_CONNECTED)
- throw new NotYetConnectedException();
- if (blocking)
+
+ synchronized (stateLock) {
+ ensureOpenAndConnected();
+ // record thread so it can be signalled if needed
readerThread = NativeThread.current();
+ }
+ } else {
+ ensureOpenAndConnected();
}
}
@@ -385,15 +411,16 @@
if (blocking) {
// set hook for Thread.interrupt
begin();
- }
- synchronized (stateLock) {
- ensureOpen();
- if (isOutputClosed)
- throw new ClosedChannelException();
- if (state != ST_CONNECTED)
- throw new NotYetConnectedException();
- if (blocking)
+
+ synchronized (stateLock) {
+ ensureOpenAndConnected();
+ if (isOutputClosed)
+ throw new ClosedChannelException();
+ // record thread so it can be signalled if needed
writerThread = NativeThread.current();
+ }
+ } else {
+ ensureOpenAndConnected();
}
}
@@ -574,38 +601,48 @@
@Override
public boolean isConnected() {
- synchronized (stateLock) {
- return (state == ST_CONNECTED);
- }
+ return (state == ST_CONNECTED);
}
@Override
public boolean isConnectionPending() {
- synchronized (stateLock) {
- return (state == ST_CONNECTIONPENDING);
- }
+ return (state == ST_CONNECTIONPENDING);
}
/**
* Marks the beginning of a connect operation that might block.
- *
+ * @param blocking true if configured blocking
+ * @param isa the remote address
* @throws ClosedChannelException if the channel is closed
* @throws AlreadyConnectedException if already connected
* @throws ConnectionPendingException is a connection is pending
+ * @throws IOException if the pre-connect hook fails
*/
- private void beginConnect(boolean blocking) throws ClosedChannelException {
+ private void beginConnect(boolean blocking, InetSocketAddress isa)
+ throws IOException
+ {
if (blocking) {
// set hook for Thread.interrupt
begin();
}
synchronized (stateLock) {
ensureOpen();
+ int state = this.state;
if (state == ST_CONNECTED)
throw new AlreadyConnectedException();
if (state == ST_CONNECTIONPENDING)
throw new ConnectionPendingException();
- if (blocking)
+ assert state == ST_UNCONNECTED;
+ this.state = ST_CONNECTIONPENDING;
+
+ if (localAddress == null)
+ NetHooks.beforeTcpConnect(fd, isa.getAddress(), isa.getPort());
+ remoteAddress = isa;
+
+ if (blocking) {
+ // record thread so it can be signalled if needed
readerThread = NativeThread.current();
+ }
}
}
@@ -614,11 +651,21 @@
*
* @throws AsynchronousCloseException if the channel was closed due to this
* thread being interrupted on a blocking connect operation.
+ * @throws IOException if completed and unable to obtain the local address
*/
private void endConnect(boolean blocking, boolean completed)
- throws AsynchronousCloseException
+ throws IOException
{
endRead(blocking, completed);
+
+ if (completed) {
+ synchronized (stateLock) {
+ if (state == ST_CONNECTIONPENDING) {
+ localAddress = Net.localAddress(fd);
+ state = ST_CONNECTED;
+ }
+ }
+ }
}
@Override
@@ -628,64 +675,37 @@
if (sm != null)
sm.checkConnect(isa.getAddress().getHostAddress(), isa.getPort());
- readLock.lock();
- try {
- writeLock.lock();
- try {
- // notify before-connect hook
- synchronized (stateLock) {
- if (state == ST_UNCONNECTED && localAddress == null) {
- NetHooks.beforeTcpConnect(fd, isa.getAddress(), isa.getPort());
- }
- }
+ InetAddress ia = isa.getAddress();
+ if (ia.isAnyLocalAddress())
+ ia = InetAddress.getLocalHost();
- InetAddress ia = isa.getAddress();
- if (ia.isAnyLocalAddress())
- ia = InetAddress.getLocalHost();
-
- int n = 0;
- boolean blocking = isBlocking();
+ try {
+ readLock.lock();
+ try {
+ writeLock.lock();
try {
+ int n = 0;
+ boolean blocking = isBlocking();
try {
- beginConnect(blocking);
- if (blocking) {
- do {
- n = Net.connect(fd, ia, isa.getPort());
- } while (n == IOStatus.INTERRUPTED && isOpen());
- } else {
+ beginConnect(blocking, isa);
+ do {
n = Net.connect(fd, ia, isa.getPort());
- }
+ } while (n == IOStatus.INTERRUPTED && isOpen());
} finally {
- endConnect(blocking, n > 0);
+ endConnect(blocking, (n > 0));
}
- } catch (IOException x) {
- // connect failed, close socket
- close();
- throw x;
- }
-
- // connection may be established
- synchronized (stateLock) {
- if (!isOpen())
- throw new AsynchronousCloseException();
- remoteAddress = isa;
- if (n > 0) {
- // connected established
- localAddress = Net.localAddress(fd);
- state = ST_CONNECTED;
- return true;
- } else {
- // connection pending
- assert !blocking;
- state = ST_CONNECTIONPENDING;
- return false;
- }
+ assert IOStatus.check(n);
+ return n > 0;
+ } finally {
+ writeLock.unlock();
}
} finally {
- writeLock.unlock();
+ readLock.unlock();
}
- } finally {
- readLock.unlock();
+ } catch (IOException ioe) {
+ // connect failed, close the channel
+ close();
+ throw ioe;
}
}
@@ -704,8 +724,10 @@
ensureOpen();
if (state != ST_CONNECTIONPENDING)
throw new NoConnectionPendingException();
- if (blocking)
+ if (blocking) {
+ // record thread so it can be signalled if needed
readerThread = NativeThread.current();
+ }
}
}
@@ -714,65 +736,62 @@
*
* @throws AsynchronousCloseException if the channel was closed due to this
* thread being interrupted on a blocking connect operation.
+ * @throws IOException if completed and unable to obtain the local address
*/
private void endFinishConnect(boolean blocking, boolean completed)
- throws AsynchronousCloseException
+ throws IOException
{
endRead(blocking, completed);
+
+ if (completed) {
+ synchronized (stateLock) {
+ if (state == ST_CONNECTIONPENDING) {
+ localAddress = Net.localAddress(fd);
+ state = ST_CONNECTED;
+ }
+ }
+ }
}
@Override
public boolean finishConnect() throws IOException {
- readLock.lock();
try {
- writeLock.lock();
+ readLock.lock();
try {
- // already connected?
- synchronized (stateLock) {
- if (state == ST_CONNECTED)
+ writeLock.lock();
+ try {
+ // no-op if already connected
+ if (isConnected())
return true;
- }
- int n = 0;
- boolean blocking = isBlocking();
- try {
+ boolean blocking = isBlocking();
+ boolean connected = false;
try {
beginFinishConnect(blocking);
+ int n = 0;
if (blocking) {
do {
n = checkConnect(fd, true);
- } while (n == 0 || (n == IOStatus.INTERRUPTED) && isOpen());
+ } while ((n == 0 || n == IOStatus.INTERRUPTED) && isOpen());
} else {
n = checkConnect(fd, false);
}
+ connected = (n > 0);
} finally {
- endFinishConnect(blocking, n > 0);
+ endFinishConnect(blocking, connected);
}
- } catch (IOException x) {
- close();
- throw x;
- }
-
- // post finishConnect, connection may be established
- synchronized (stateLock) {
- if (!isOpen())
- throw new AsynchronousCloseException();
- if (n > 0) {
- // connection established
- localAddress = Net.localAddress(fd);
- state = ST_CONNECTED;
- return true;
- } else {
- // connection still pending
- assert !blocking;
- return false;
- }
+ assert (blocking && connected) ^ !blocking;
+ return connected;
+ } finally {
+ writeLock.unlock();
}
} finally {
- writeLock.unlock();
+ readLock.unlock();
}
- } finally {
- readLock.unlock();
+ } catch (IOException ioe) {
+ // connect failed, close the channel
+ close();
+ throw ioe;
}
}
@@ -994,20 +1013,17 @@
return (newOps & ~oldOps) != 0;
}
+ boolean connected = isConnected();
if (((ops & Net.POLLIN) != 0) &&
- ((intOps & SelectionKey.OP_READ) != 0) &&
- (state == ST_CONNECTED))
+ ((intOps & SelectionKey.OP_READ) != 0) && connected)
newOps |= SelectionKey.OP_READ;
if (((ops & Net.POLLCONN) != 0) &&
- ((intOps & SelectionKey.OP_CONNECT) != 0) &&
- ((state == ST_UNCONNECTED) || (state == ST_CONNECTIONPENDING))) {
+ ((intOps & SelectionKey.OP_CONNECT) != 0) && isConnectionPending())
newOps |= SelectionKey.OP_CONNECT;
- }
if (((ops & Net.POLLOUT) != 0) &&
- ((intOps & SelectionKey.OP_WRITE) != 0) &&
- (state == ST_CONNECTED))
+ ((intOps & SelectionKey.OP_WRITE) != 0) && connected)
newOps |= SelectionKey.OP_WRITE;
sk.nioReadyOps(newOps);
--- a/src/java.base/share/classes/sun/security/provider/AuthPolicyFile.java Thu Mar 01 16:35:36 2018 -0500
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,1197 +0,0 @@
-/*
- * Copyright (c) 1999, 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 sun.security.provider;
-
-import java.io.*;
-import java.lang.reflect.*;
-import java.net.URL;
-import java.util.*;
-
-import java.security.AccessController;
-import java.security.CodeSource;
-import java.security.KeyStore;
-import java.security.KeyStoreException;
-import java.security.Permission;
-import java.security.Permissions;
-import java.security.PermissionCollection;
-import java.security.Principal;
-import java.security.PrivilegedAction;
-import java.security.UnresolvedPermission;
-import java.security.Security;
-import java.security.cert.Certificate;
-import java.security.cert.X509Certificate;
-
-import javax.security.auth.Subject;
-import javax.security.auth.PrivateCredentialPermission;
-
-import sun.security.provider.PolicyParser.GrantEntry;
-import sun.security.provider.PolicyParser.PermissionEntry;
-import sun.security.provider.PolicyParser.PrincipalEntry;
-import sun.security.util.Debug;
-import sun.security.util.PolicyUtil;
-import sun.security.util.PropertyExpander;
-
-/**
- * See {@code com.sun.security.auth.PolicyFile} for the class description.
- * This class is necessary in order to support a default
- * {@code javax.security.auth.Policy} implementation on the compact1 and
- * compact2 profiles.
- *
- * @deprecated As of JDK 1.4, replaced by
- * {@code sun.security.provider.PolicyFile}.
- * This class is entirely deprecated.
- */
-@Deprecated
-@SuppressWarnings("removal")
-public class AuthPolicyFile extends javax.security.auth.Policy {
-
- static final ResourceBundle rb =
- AccessController.doPrivileged(new PrivilegedAction<ResourceBundle>() {
- @Override public ResourceBundle run() {
- return (ResourceBundle.getBundle
- ("sun.security.util.AuthResources"));
- }
- });
-
- private static final Debug debug = Debug.getInstance("policy",
- "\t[Auth Policy]");
-
- private static final String AUTH_POLICY = "java.security.auth.policy";
- private static final String SECURITY_MANAGER = "java.security.manager";
- private static final String AUTH_POLICY_URL = "auth.policy.url.";
-
- private Vector<PolicyEntry> policyEntries;
- private Hashtable<Object, Object> aliasMapping;
-
- private boolean initialized = false;
-
- private boolean expandProperties = true;
- private boolean ignoreIdentityScope = true;
-
- // for use with the reflection API
- private static final Class<?>[] PARAMS = { String.class, String.class};
-
- /**
- * Initializes the Policy object and reads the default policy
- * configuration file(s) into the Policy object.
- */
- public AuthPolicyFile() {
- // initialize Policy if either the AUTH_POLICY or
- // SECURITY_MANAGER properties are set
- String prop = System.getProperty(AUTH_POLICY);
-
- if (prop == null) {
- prop = System.getProperty(SECURITY_MANAGER);
- }
- if (prop != null) {
- init();
- }
- }
-
- private synchronized void init() {
- if (initialized) {
- return;
- }
-
- policyEntries = new Vector<PolicyEntry>();
- aliasMapping = new Hashtable<Object, Object>(11);
-
- initPolicyFile();
- initialized = true;
- }
-
- @Override
- public synchronized void refresh() {
-
- java.lang.SecurityManager sm = System.getSecurityManager();
- if (sm != null) {
- sm.checkPermission(new javax.security.auth.AuthPermission
- ("refreshPolicy"));
- }
-
- // XXX
- //
- // 1) if code instantiates PolicyFile directly, then it will need
- // all the permissions required for the PolicyFile initialization
- // 2) if code calls Policy.getPolicy, then it simply needs
- // AuthPermission(getPolicy), and the javax.security.auth.Policy
- // implementation instantiates PolicyFile in a doPrivileged block
- // 3) if after instantiating a Policy (either via #1 or #2),
- // code calls refresh, it simply needs
- // AuthPermission(refreshPolicy). then PolicyFile wraps
- // the refresh in a doPrivileged block.
- initialized = false;
- AccessController.doPrivileged(new PrivilegedAction<Void>() {
- @Override public Void run() {
- init();
- return null;
- }
- });
- }
-
- private KeyStore initKeyStore(URL policyUrl, String keyStoreName,
- String keyStoreType) {
- if (keyStoreName != null) {
- try {
- /*
- * location of keystore is specified as absolute URL in policy
- * file, or is relative to URL of policy file
- */
- URL keyStoreUrl = null;
- try {
- keyStoreUrl = new URL(keyStoreName);
- // absolute URL
- } catch (java.net.MalformedURLException e) {
- // relative URL
- keyStoreUrl = new URL(policyUrl, keyStoreName);
- }
-
- if (debug != null) {
- debug.println("reading keystore"+keyStoreUrl);
- }
-
- InputStream inStream = new BufferedInputStream(
- PolicyUtil.getInputStream(keyStoreUrl));
-
- KeyStore ks;
- if (keyStoreType != null)
- ks = KeyStore.getInstance(keyStoreType);
- else
- ks = KeyStore.getInstance(KeyStore.getDefaultType());
- ks.load(inStream, null);
- inStream.close();
- return ks;
- } catch (Exception e) {
- // ignore, treat it like we have no keystore
- if (debug != null) {
- debug.println("Debug info only. No keystore.");
- e.printStackTrace();
- }
- return null;
- }
- }
- return null;
- }
-
- private void initPolicyFile() {
-
- String prop = Security.getProperty("policy.expandProperties");
- if (prop != null) {
- expandProperties = prop.equalsIgnoreCase("true");
- }
-
- String iscp = Security.getProperty("policy.ignoreIdentityScope");
- if (iscp != null) {
- ignoreIdentityScope = iscp.equalsIgnoreCase("true");
- }
-
- String allowSys = Security.getProperty("policy.allowSystemProperty");
- if (allowSys != null && allowSys.equalsIgnoreCase("true")) {
- String extra_policy = System.getProperty(AUTH_POLICY);
- if (extra_policy != null) {
- boolean overrideAll = false;
- if (extra_policy.startsWith("=")) {
- overrideAll = true;
- extra_policy = extra_policy.substring(1);
- }
- try {
- extra_policy = PropertyExpander.expand(extra_policy);
- URL policyURL;
- File policyFile = new File(extra_policy);
- if (policyFile.exists()) {
- policyURL =
- new URL("file:" + policyFile.getCanonicalPath());
- } else {
- policyURL = new URL(extra_policy);
- }
- if (debug != null) {
- debug.println("reading " + policyURL);
- }
- init(policyURL);
- } catch (Exception e) {
- // ignore.
- if (debug != null) {
- debug.println("caught exception: " + e);
- }
-
- }
- if (overrideAll) {
- if (debug != null) {
- debug.println("overriding other policies!");
- }
- return;
- }
- }
- }
-
- int n = 1;
- boolean loaded_one = false;
- String policy_url;
-
- while ((policy_url = Security.getProperty(AUTH_POLICY_URL+n)) != null) {
- try {
- policy_url = PropertyExpander.expand(policy_url).replace
- (File.separatorChar, '/');
- if (debug != null) {
- debug.println("reading " + policy_url);
- }
- init(new URL(policy_url));
- loaded_one = true;
- } catch (Exception e) {
- if (debug != null) {
- debug.println("Debug info only. Error reading policy " + e);
- e.printStackTrace();
- }
- // ignore that policy
- }
- n++;
- }
-
- if (loaded_one == false) {
- // do not load a static policy
- }
- }
-
- /**
- * Checks public key. If it is marked as trusted in
- * the identity database, add it to the policy
- * with the AllPermission.
- */
- private boolean checkForTrustedIdentity(final Certificate cert) {
- return false;
- }
-
- /**
- * Reads a policy configuration into the Policy object using a
- * Reader object.
- *
- * @param policyFile the policy Reader object.
- */
- private void init(URL policy) {
- PolicyParser pp = new PolicyParser(expandProperties);
- try (InputStreamReader isr
- = new InputStreamReader(PolicyUtil.getInputStream(policy))) {
- pp.read(isr);
- KeyStore keyStore = initKeyStore(policy, pp.getKeyStoreUrl(),
- pp.getKeyStoreType());
- Enumeration<GrantEntry> enum_ = pp.grantElements();
- while (enum_.hasMoreElements()) {
- GrantEntry ge = enum_.nextElement();
- addGrantEntry(ge, keyStore);
- }
- } catch (PolicyParser.ParsingException pe) {
- System.err.println(AUTH_POLICY +
- rb.getString(".error.parsing.") + policy);
- System.err.println(AUTH_POLICY + rb.getString("COLON") +
- pe.getMessage());
- if (debug != null) {
- pe.printStackTrace();
- }
- } catch (Exception e) {
- if (debug != null) {
- debug.println("error parsing " + policy);
- debug.println(e.toString());
- e.printStackTrace();
- }
- }
- }
-
- /**
- * Given a PermissionEntry, create a codeSource.
- *
- * @return null if signedBy alias is not recognized
- */
- CodeSource getCodeSource(GrantEntry ge, KeyStore keyStore)
- throws java.net.MalformedURLException
- {
- Certificate[] certs = null;
- if (ge.signedBy != null) {
- certs = getCertificates(keyStore, ge.signedBy);
- if (certs == null) {
- // we don't have a key for this alias,
- // just return
- if (debug != null) {
- debug.println(" no certs for alias " +
- ge.signedBy + ", ignoring.");
- }
- return null;
- }
- }
-
- URL location;
- if (ge.codeBase != null) {
- location = new URL(ge.codeBase);
- } else {
- location = null;
- }
-
- if (ge.principals == null || ge.principals.size() == 0) {
- return (canonicalizeCodebase
- (new CodeSource(location, certs),
- false));
- } else {
- return (canonicalizeCodebase
- (new SubjectCodeSource(null, ge.principals, location, certs),
- false));
- }
- }
-
- /**
- * Add one policy entry to the vector.
- */
- private void addGrantEntry(GrantEntry ge, KeyStore keyStore) {
-
- if (debug != null) {
- debug.println("Adding policy entry: ");
- debug.println(" signedBy " + ge.signedBy);
- debug.println(" codeBase " + ge.codeBase);
- if (ge.principals != null) {
- for (PrincipalEntry pppe : ge.principals) {
- debug.println(" " + pppe.getPrincipalClass() +
- " " + pppe.getPrincipalName());
- }
- }
- debug.println();
- }
-
- try {
- CodeSource codesource = getCodeSource(ge, keyStore);
- // skip if signedBy alias was unknown...
- if (codesource == null) return;
-
- PolicyEntry entry = new PolicyEntry(codesource);
- Enumeration<PermissionEntry> enum_ = ge.permissionElements();
- while (enum_.hasMoreElements()) {
- PermissionEntry pe = enum_.nextElement();
- try {
- // XXX special case PrivateCredentialPermission-SELF
- Permission perm;
- if (pe.permission.equals
- ("javax.security.auth.PrivateCredentialPermission") &&
- pe.name.endsWith(" self")) {
- perm = getInstance(pe.permission,
- pe.name + " \"self\"",
- pe.action);
- } else {
- perm = getInstance(pe.permission,
- pe.name,
- pe.action);
- }
- entry.add(perm);
- if (debug != null) {
- debug.println(" "+perm);
- }
- } catch (ClassNotFoundException cnfe) {
- Certificate[] certs;
- if (pe.signedBy != null) {
- certs = getCertificates(keyStore, pe.signedBy);
- } else {
- certs = null;
- }
-
- // only add if we had no signer or we had
- // a signer and found the keys for it.
- if (certs != null || pe.signedBy == null) {
- Permission perm = new UnresolvedPermission(
- pe.permission,
- pe.name,
- pe.action,
- certs);
- entry.add(perm);
- if (debug != null) {
- debug.println(" "+perm);
- }
- }
- } catch (java.lang.reflect.InvocationTargetException ite) {
- System.err.println
- (AUTH_POLICY +
- rb.getString(".error.adding.Permission.") +
- pe.permission +
- rb.getString("SPACE") +
- ite.getTargetException());
- } catch (Exception e) {
- System.err.println
- (AUTH_POLICY +
- rb.getString(".error.adding.Permission.") +
- pe.permission +
- rb.getString("SPACE") +
- e);
- }
- }
- policyEntries.addElement(entry);
- } catch (Exception e) {
- System.err.println
- (AUTH_POLICY +
- rb.getString(".error.adding.Entry.") +
- ge +
- rb.getString("SPACE") +
- e);
- }
-
- if (debug != null) {
- debug.println();
- }
- }
-
- /**
- * Returns a new Permission object of the given Type. The Permission is
- * created by getting the
- * Class object using the <code>Class.forName</code> method, and using
- * the reflection API to invoke the (String name, String actions)
- * constructor on the
- * object.
- *
- * @param type the type of Permission being created.
- * @param name the name of the Permission being created.
- * @param actions the actions of the Permission being created.
- *
- * @exception ClassNotFoundException if the particular Permission
- * class could not be found.
- *
- * @exception IllegalAccessException if the class or initializer is
- * not accessible.
- *
- * @exception InstantiationException if getInstance tries to
- * instantiate an abstract class or an interface, or if the
- * instantiation fails for some other reason.
- *
- * @exception NoSuchMethodException if the (String, String) constructor
- * is not found.
- *
- * @exception InvocationTargetException if the underlying Permission
- * constructor throws an exception.
- *
- */
- private static final Permission getInstance(String type,
- String name,
- String actions)
- throws ClassNotFoundException,
- InstantiationException,
- IllegalAccessException,
- NoSuchMethodException,
- InvocationTargetException
- {
- //XXX we might want to keep a hash of created factories...
- Class<?> pc = Class.forName(type);
- Constructor<?> c = pc.getConstructor(PARAMS);
- return (Permission) c.newInstance(new Object[] { name, actions });
- }
-
- /**
- * Fetch all certs associated with this alias.
- */
- Certificate[] getCertificates(KeyStore keyStore, String aliases) {
-
- Vector<Certificate> vcerts = null;
-
- StringTokenizer st = new StringTokenizer(aliases, ",");
- int n = 0;
-
- while (st.hasMoreTokens()) {
- String alias = st.nextToken().trim();
- n++;
- Certificate cert = null;
- // See if this alias's cert has already been cached
- cert = (Certificate) aliasMapping.get(alias);
- if (cert == null && keyStore != null) {
-
- try {
- cert = keyStore.getCertificate(alias);
- } catch (KeyStoreException kse) {
- // never happens, because keystore has already been loaded
- // when we call this
- }
- if (cert != null) {
- aliasMapping.put(alias, cert);
- aliasMapping.put(cert, alias);
- }
- }
-
- if (cert != null) {
- if (vcerts == null) {
- vcerts = new Vector<Certificate>();
- }
- vcerts.addElement(cert);
- }
- }
-
- // make sure n == vcerts.size, since we are doing a logical *and*
- if (vcerts != null && n == vcerts.size()) {
- Certificate[] certs = new Certificate[vcerts.size()];
- vcerts.copyInto(certs);
- return certs;
- } else {
- return null;
- }
- }
-
- /**
- * Enumerate all the entries in the global policy object.
- * This method is used by policy admin tools. The tools
- * should use the Enumeration methods on the returned object
- * to fetch the elements sequentially.
- */
- private final synchronized Enumeration<PolicyEntry> elements() {
- return policyEntries.elements();
- }
-
- @Override
- public PermissionCollection getPermissions(final Subject subject,
- final CodeSource codesource) {
-
- // 1) if code instantiates PolicyFile directly, then it will need
- // all the permissions required for the PolicyFile initialization
- // 2) if code calls Policy.getPolicy, then it simply needs
- // AuthPermission(getPolicy), and the javax.security.auth.Policy
- // implementation instantiates PolicyFile in a doPrivileged block
- // 3) if after instantiating a Policy (either via #1 or #2),
- // code calls getPermissions, PolicyFile wraps the call
- // in a doPrivileged block.
- return AccessController.doPrivileged
- (new PrivilegedAction<PermissionCollection>() {
- @Override public PermissionCollection run() {
- SubjectCodeSource scs = new SubjectCodeSource(
- subject, null,
- codesource == null ? null : codesource.getLocation(),
- codesource == null ? null : codesource.getCertificates());
- if (initialized) {
- return getPermissions(new Permissions(), scs);
- } else {
- return new PolicyPermissions(AuthPolicyFile.this, scs);
- }
- }
- });
- }
-
- /**
- * Examines the global policy for the specified CodeSource, and
- * creates a PermissionCollection object with
- * the set of permissions for that principal's protection domain.
- *
- * @param CodeSource the codesource associated with the caller.
- * This encapsulates the original location of the code (where the code
- * came from) and the public key(s) of its signer.
- *
- * @return the set of permissions according to the policy.
- */
- PermissionCollection getPermissions(CodeSource codesource) {
-
- if (initialized) {
- return getPermissions(new Permissions(), codesource);
- } else {
- return new PolicyPermissions(this, codesource);
- }
- }
-
- /**
- * Examines the global policy for the specified CodeSource, and
- * creates a PermissionCollection object with
- * the set of permissions for that principal's protection domain.
- *
- * @param permissions the permissions to populate
- * @param codesource the codesource associated with the caller.
- * This encapsulates the original location of the code (where the code
- * came from) and the public key(s) of its signer.
- *
- * @return the set of permissions according to the policy.
- */
- Permissions getPermissions(final Permissions perms,
- final CodeSource cs)
- {
- if (!initialized) {
- init();
- }
-
- final CodeSource[] codesource = {null};
-
- codesource[0] = canonicalizeCodebase(cs, true);
-
- if (debug != null) {
- debug.println("evaluate(" + codesource[0] + ")\n");
- }
-
- // needs to be in a begin/endPrivileged block because
- // codesource.implies calls URL.equals which does an
- // InetAddress lookup
-
- for (int i = 0; i < policyEntries.size(); i++) {
-
- PolicyEntry entry = policyEntries.elementAt(i);
-
- if (debug != null) {
- debug.println("PolicyFile CodeSource implies: " +
- entry.codesource.toString() + "\n\n" +
- "\t" + codesource[0].toString() + "\n\n");
- }
-
- if (entry.codesource.implies(codesource[0])) {
- for (int j = 0; j < entry.permissions.size(); j++) {
- Permission p = entry.permissions.elementAt(j);
- if (debug != null) {
- debug.println(" granting " + p);
- }
- if (!addSelfPermissions(p, entry.codesource,
- codesource[0], perms)) {
- // we could check for duplicates
- // before adding new permissions,
- // but the SubjectDomainCombiner
- // already checks for duplicates later
- perms.add(p);
- }
- }
- }
- }
-
- // now see if any of the keys are trusted ids.
-
- if (!ignoreIdentityScope) {
- Certificate[] certs = codesource[0].getCertificates();
- if (certs != null) {
- for (int k=0; k < certs.length; k++) {
- if (aliasMapping.get(certs[k]) == null &&
- checkForTrustedIdentity(certs[k])) {
- // checkForTrustedIdentity added it
- // to the policy for us. next time
- // around we'll find it. This time
- // around we need to add it.
- perms.add(new java.security.AllPermission());
- }
- }
- }
- }
- return perms;
- }
-
- /**
- * Returns true if 'Self' permissions were added to the provided
- * 'perms', and false otherwise.
- *
- * <p>
- *
- * @param p check to see if this Permission is a "SELF"
- * PrivateCredentialPermission. <p>
- *
- * @param entryCs the codesource for the Policy entry.
- *
- * @param accCs the codesource for from the current AccessControlContext.
- *
- * @param perms the PermissionCollection where the individual
- * PrivateCredentialPermissions will be added.
- */
- private boolean addSelfPermissions(final Permission p,
- CodeSource entryCs,
- CodeSource accCs,
- Permissions perms) {
-
- if (!(p instanceof PrivateCredentialPermission)) {
- return false;
- }
-
- if (!(entryCs instanceof SubjectCodeSource)) {
- return false;
- }
-
- PrivateCredentialPermission pcp = (PrivateCredentialPermission)p;
- SubjectCodeSource scs = (SubjectCodeSource)entryCs;
-
- // see if it is a SELF permission
- String[][] pPrincipals = pcp.getPrincipals();
- if (pPrincipals.length <= 0 ||
- !pPrincipals[0][0].equalsIgnoreCase("self") ||
- !pPrincipals[0][1].equalsIgnoreCase("self")) {
-
- // regular PrivateCredentialPermission
- return false;
- } else {
-
- // granted a SELF permission - create a
- // PrivateCredentialPermission for each
- // of the Policy entry's CodeSource Principals
-
- if (scs.getPrincipals() == null) {
- // XXX SubjectCodeSource has no Subject???
- return true;
- }
-
- for (PrincipalEntry principal : scs.getPrincipals()) {
-
- // if the Policy entry's Principal does not contain a
- // WILDCARD for the Principal name, then a
- // new PrivateCredentialPermission is created
- // for the Principal listed in the Policy entry.
- // if the Policy entry's Principal contains a WILDCARD
- // for the Principal name, then a new
- // PrivateCredentialPermission is created
- // for each Principal associated with the Subject
- // in the current ACC.
-
- String[][] principalInfo = getPrincipalInfo(principal, accCs);
-
- for (int i = 0; i < principalInfo.length; i++) {
-
- // here's the new PrivateCredentialPermission
-
- PrivateCredentialPermission newPcp =
- new PrivateCredentialPermission
- (pcp.getCredentialClass() +
- " " +
- principalInfo[i][0] +
- " " +
- "\"" + principalInfo[i][1] + "\"",
- "read");
-
- if (debug != null) {
- debug.println("adding SELF permission: " +
- newPcp.toString());
- }
-
- perms.add(newPcp);
- }
- }
- }
- return true;
- }
-
- /**
- * return the principal class/name pair in the 2D array.
- * array[x][y]: x corresponds to the array length.
- * if (y == 0), it's the principal class.
- * if (y == 1), it's the principal name.
- */
- private String[][] getPrincipalInfo(PrincipalEntry principal,
- final CodeSource accCs) {
-
- // there are 3 possibilities:
- // 1) the entry's Principal class and name are not wildcarded
- // 2) the entry's Principal name is wildcarded only
- // 3) the entry's Principal class and name are wildcarded
-
- if (!principal.getPrincipalClass().equals
- (PrincipalEntry.WILDCARD_CLASS) &&
- !principal.getPrincipalName().equals
- (PrincipalEntry.WILDCARD_NAME)) {
-
- // build a PrivateCredentialPermission for the principal
- // from the Policy entry
- String[][] info = new String[1][2];
- info[0][0] = principal.getPrincipalClass();
- info[0][1] = principal.getPrincipalName();
- return info;
-
- } else if (!principal.getPrincipalClass().equals
- (PrincipalEntry.WILDCARD_CLASS) &&
- principal.getPrincipalName().equals
- (PrincipalEntry.WILDCARD_NAME)) {
-
- // build a PrivateCredentialPermission for all
- // the Subject's principals that are instances of principalClass
-
- // the accCs is guaranteed to be a SubjectCodeSource
- // because the earlier CodeSource.implies succeeded
- SubjectCodeSource scs = (SubjectCodeSource)accCs;
-
- Set<? extends Principal> principalSet = null;
- try {
- // principal.principalClass should extend Principal
- // If it doesn't, we should stop here with a ClassCastException.
- @SuppressWarnings("unchecked")
- Class<? extends Principal> pClass = (Class<? extends Principal>)
- Class.forName(principal.getPrincipalClass(), false,
- ClassLoader.getSystemClassLoader());
- principalSet = scs.getSubject().getPrincipals(pClass);
- } catch (Exception e) {
- if (debug != null) {
- debug.println("problem finding Principal Class " +
- "when expanding SELF permission: " +
- e.toString());
- }
- }
-
- if (principalSet == null) {
- // error
- return new String[0][0];
- }
-
- String[][] info = new String[principalSet.size()][2];
-
- int i = 0;
- for (Principal p : principalSet) {
- info[i][0] = p.getClass().getName();
- info[i][1] = p.getName();
- i++;
- }
- return info;
-
- } else {
-
- // build a PrivateCredentialPermission for every
- // one of the current Subject's principals
-
- // the accCs is guaranteed to be a SubjectCodeSource
- // because the earlier CodeSource.implies succeeded
- SubjectCodeSource scs = (SubjectCodeSource)accCs;
- Set<Principal> principalSet = scs.getSubject().getPrincipals();
-
- String[][] info = new String[principalSet.size()][2];
-
- int i = 0;
- for (Principal p : principalSet) {
- info[i][0] = p.getClass().getName();
- info[i][1] = p.getName();
- i++;
- }
- return info;
- }
- }
-
- /*
- * Returns the signer certificates from the list of certificates associated
- * with the given code source.
- *
- * The signer certificates are those certificates that were used to verify
- * signed code originating from the codesource location.
- *
- * This method assumes that in the given code source, each signer
- * certificate is followed by its supporting certificate chain
- * (which may be empty), and that the signer certificate and its
- * supporting certificate chain are ordered bottom-to-top (i.e., with the
- * signer certificate first and the (root) certificate authority last).
- */
- Certificate[] getSignerCertificates(CodeSource cs) {
- Certificate[] certs = null;
- if ((certs = cs.getCertificates()) == null) {
- return null;
- }
- for (int i = 0; i < certs.length; i++) {
- if (!(certs[i] instanceof X509Certificate))
- return cs.getCertificates();
- }
-
- // Do we have to do anything?
- int i = 0;
- int count = 0;
- while (i < certs.length) {
- count++;
- while (((i+1) < certs.length)
- && ((X509Certificate)certs[i]).getIssuerDN().equals(
- ((X509Certificate)certs[i+1]).getSubjectDN())) {
- i++;
- }
- i++;
- }
- if (count == certs.length) {
- // Done
- return certs;
- }
-
- ArrayList<Certificate> userCertList = new ArrayList<>();
- i = 0;
- while (i < certs.length) {
- userCertList.add(certs[i]);
- while (((i+1) < certs.length)
- && ((X509Certificate)certs[i]).getIssuerDN().equals(
- ((X509Certificate)certs[i+1]).getSubjectDN())) {
- i++;
- }
- i++;
- }
- Certificate[] userCerts = new Certificate[userCertList.size()];
- userCertList.toArray(userCerts);
- return userCerts;
- }
-
- private CodeSource canonicalizeCodebase(CodeSource cs,
- boolean extractSignerCerts) {
- CodeSource canonCs = cs;
- if (cs.getLocation() != null &&
- cs.getLocation().getProtocol().equalsIgnoreCase("file")) {
- try {
- String path = cs.getLocation().getFile().replace
- ('/',
- File.separatorChar);
- URL csUrl = null;
- if (path.endsWith("*")) {
- // remove trailing '*' because it causes canonicalization
- // to fail on win32
- path = path.substring(0, path.length()-1);
- boolean appendFileSep = false;
- if (path.endsWith(File.separator)) {
- appendFileSep = true;
- }
- if (path.equals("")) {
- path = System.getProperty("user.dir");
- }
- File f = new File(path);
- path = f.getCanonicalPath();
- StringBuilder sb = new StringBuilder(path);
- // reappend '*' to canonicalized filename (note that
- // canonicalization may have removed trailing file
- // separator, so we have to check for that, too)
- if (!path.endsWith(File.separator) &&
- (appendFileSep || f.isDirectory())) {
- sb.append(File.separatorChar);
- }
- sb.append('*');
- path = sb.toString();
- } else {
- path = new File(path).getCanonicalPath();
- }
- csUrl = new File(path).toURL();
-
- if (cs instanceof SubjectCodeSource) {
- SubjectCodeSource scs = (SubjectCodeSource)cs;
- if (extractSignerCerts) {
- canonCs = new SubjectCodeSource(scs.getSubject(),
- scs.getPrincipals(),
- csUrl,
- getSignerCertificates(scs));
- } else {
- canonCs = new SubjectCodeSource(scs.getSubject(),
- scs.getPrincipals(),
- csUrl,
- scs.getCertificates());
- }
- } else {
- if (extractSignerCerts) {
- canonCs = new CodeSource(csUrl,
- getSignerCertificates(cs));
- } else {
- canonCs = new CodeSource(csUrl,
- cs.getCertificates());
- }
- }
- } catch (IOException ioe) {
- // leave codesource as it is, unless we have to extract its
- // signer certificates
- if (extractSignerCerts) {
- if (!(cs instanceof SubjectCodeSource)) {
- canonCs = new CodeSource(cs.getLocation(),
- getSignerCertificates(cs));
- } else {
- SubjectCodeSource scs = (SubjectCodeSource)cs;
- canonCs = new SubjectCodeSource(scs.getSubject(),
- scs.getPrincipals(),
- scs.getLocation(),
- getSignerCertificates(scs));
- }
- }
- }
- } else {
- if (extractSignerCerts) {
- if (!(cs instanceof SubjectCodeSource)) {
- canonCs = new CodeSource(cs.getLocation(),
- getSignerCertificates(cs));
- } else {
- SubjectCodeSource scs = (SubjectCodeSource)cs;
- canonCs = new SubjectCodeSource(scs.getSubject(),
- scs.getPrincipals(),
- scs.getLocation(),
- getSignerCertificates(scs));
- }
- }
- }
- return canonCs;
- }
-
- /**
- * Each entry in the policy configuration file is represented by a
- * PolicyEntry object. <p>
- *
- * A PolicyEntry is a (CodeSource,Permission) pair. The
- * CodeSource contains the (URL, PublicKey) that together identify
- * where the Java bytecodes come from and who (if anyone) signed
- * them. The URL could refer to localhost. The URL could also be
- * null, meaning that this policy entry is given to all comers, as
- * long as they match the signer field. The signer could be null,
- * meaning the code is not signed. <p>
- *
- * The Permission contains the (Type, Name, Action) triplet. <p>
- *
- * For now, the Policy object retrieves the public key from the
- * X.509 certificate on disk that corresponds to the signedBy
- * alias specified in the Policy config file. For reasons of
- * efficiency, the Policy object keeps a hashtable of certs already
- * read in. This could be replaced by a secure internal key
- * store.
- *
- * <p>
- * For example, the entry
- * <pre>
- * permission java.io.File "/tmp", "read,write",
- * signedBy "Duke";
- * </pre>
- * is represented internally
- * <pre>
- *
- * FilePermission f = new FilePermission("/tmp", "read,write");
- * PublicKey p = publickeys.get("Duke");
- * URL u = InetAddress.getLocalHost();
- * CodeBase c = new CodeBase( p, u );
- * pe = new PolicyEntry(f, c);
- * </pre>
- *
- * @author Marianne Mueller
- * @author Roland Schemers
- * @see java.security.CodeSource
- * @see java.security.Policy
- * @see java.security.Permissions
- * @see java.security.ProtectionDomain
- */
- private static class PolicyEntry {
-
- CodeSource codesource;
- Vector<Permission> permissions;
-
- /**
- * Given a Permission and a CodeSource, create a policy entry.
- *
- * XXX Decide if/how to add validity fields and "purpose" fields to
- * XXX policy entries
- *
- * @param cs the CodeSource, which encapsulates the URL and the public
- * key attributes from the policy config file. Validity checks
- * are performed on the public key before PolicyEntry is called.
- *
- */
- PolicyEntry(CodeSource cs) {
- this.codesource = cs;
- this.permissions = new Vector<Permission>();
- }
-
- /**
- * add a Permission object to this entry.
- */
- void add(Permission p) {
- permissions.addElement(p);
- }
-
- /**
- * Return the CodeSource for this policy entry
- */
- CodeSource getCodeSource() {
- return this.codesource;
- }
-
- @Override
- public String toString(){
- StringBuilder sb = new StringBuilder();
- sb.append(rb.getString("LPARAM"));
- sb.append(getCodeSource());
- sb.append("\n");
- for (int j = 0; j < permissions.size(); j++) {
- Permission p = permissions.elementAt(j);
- sb.append(rb.getString("SPACE"));
- sb.append(rb.getString("SPACE"));
- sb.append(p);
- sb.append(rb.getString("NEWLINE"));
- }
- sb.append(rb.getString("RPARAM"));
- sb.append(rb.getString("NEWLINE"));
- return sb.toString();
- }
-
- }
-}
-
-@SuppressWarnings("deprecation")
-class PolicyPermissions extends PermissionCollection {
-
- private static final long serialVersionUID = -1954188373270545523L;
-
- private CodeSource codesource;
- private Permissions perms;
- private AuthPolicyFile policy;
- private boolean notInit; // have we pulled in the policy permissions yet?
- private Vector<Permission> additionalPerms;
-
- PolicyPermissions(AuthPolicyFile policy,
- CodeSource codesource)
- {
- this.codesource = codesource;
- this.policy = policy;
- this.perms = null;
- this.notInit = true;
- this.additionalPerms = null;
- }
-
- @Override
- public void add(Permission permission) {
- if (isReadOnly())
- throw new SecurityException
- (AuthPolicyFile.rb.getString
- ("attempt.to.add.a.Permission.to.a.readonly.PermissionCollection"));
-
- if (perms == null) {
- if (additionalPerms == null) {
- additionalPerms = new Vector<Permission>();
- }
- additionalPerms.add(permission);
- } else {
- perms.add(permission);
- }
- }
-
- private synchronized void init() {
- if (notInit) {
- if (perms == null) {
- perms = new Permissions();
- }
- if (additionalPerms != null) {
- Enumeration<Permission> e = additionalPerms.elements();
- while (e.hasMoreElements()) {
- perms.add(e.nextElement());
- }
- additionalPerms = null;
- }
- policy.getPermissions(perms, codesource);
- notInit = false;
- }
- }
-
- @Override
- public boolean implies(Permission permission) {
- if (notInit) {
- init();
- }
- return perms.implies(permission);
- }
-
- @Override
- public Enumeration<Permission> elements() {
- if (notInit) {
- init();
- }
- return perms.elements();
- }
-
- @Override
- public String toString() {
- if (notInit) {
- init();
- }
- return perms.toString();
- }
-}
--- a/src/java.base/share/classes/sun/security/provider/PolicyFile.java Thu Mar 01 16:35:36 2018 -0500
+++ b/src/java.base/share/classes/sun/security/provider/PolicyFile.java Fri Mar 02 21:00:12 2018 +0100
@@ -51,13 +51,6 @@
* This class represents a default Policy implementation for the
* "JavaPolicy" type.
*
- * Note:
- * For backward compatibility with JAAS 1.0 it loads
- * both java.auth.policy and java.policy. However, it
- * is recommended that java.auth.policy not be used
- * and that java.policy contain all grant entries including
- * those that contain principal-based entries.
- *
* <p> This object stores the policy for the entire Java runtime,
* and is the amalgamation of multiple static policy
* configurations that resides in files.
@@ -75,17 +68,13 @@
* are needed in order for the runtime to operate correctly.
* <li>
* Loop through the <code>java.security.Security</code> properties,
- * <i>policy.url.1</i>, <i>policy.url.2</i>, ...,
- * <i>policy.url.X</i>" and
- * <i>auth.policy.url.1</i>, <i>auth.policy.url.2</i>, ...,
- * <i>auth.policy.url.X</i>". These properties are set
+ * and <i>policy.url.1</i>, <i>policy.url.2</i>, ...,
+ * <i>policy.url.X</i>". These properties are set
* in the Java security properties file, which is located in the file named
* <JAVA_HOME>/conf/security/java.security.
* Each property value specifies a <code>URL</code> pointing to a
* policy file to be loaded. Read in and load each policy.
*
- * <i>auth.policy.url</i> is supported only for backward compatibility.
- *
* If none of these could be loaded, use a builtin static policy
* equivalent to the conf/security/java.policy file.
*
@@ -98,21 +87,7 @@
* <i>policy.allowSystemProperty</i> is set to <i>true</i>),
* also load that policy.
*
- * <li>
- * The <code>java.lang.System</code> property
- * <i>java.security.auth.policy</i> may also be set to a
- * <code>URL</code> pointing to another policy file
- * (which is the case when a user uses the -D switch at runtime).
- * If this property is defined, and its use is allowed by the
- * security property file (the Security property,
- * <i>policy.allowSystemProperty</i> is set to <i>true</i>),
- * also load that policy.
- *
- * <i>java.security.auth.policy</i> is supported only for backward
- * compatibility.
- *
- * If the <i>java.security.policy</i> or
- * <i>java.security.auth.policy</i> property is defined using
+ * If the <i>java.security.policy</i> property is defined using
* "==" (rather than "="), then load the specified policy file and ignore
* all other configured policies. Note, that the default.policy file is
* also loaded, as specified in the first step of the algorithm above.
@@ -269,8 +244,6 @@
"javax.security.auth.x500.X500Principal";
private static final String POLICY = "java.security.policy";
private static final String POLICY_URL = "policy.url.";
- private static final String AUTH_POLICY = "java.security.auth.policy";
- private static final String AUTH_POLICY_URL = "auth.policy.url.";
private static final int DEFAULT_CACHE_SIZE = 1;
@@ -411,14 +384,6 @@
/**
* Caller did not specify URL via Policy.getInstance.
* Read from URLs listed in the java.security properties file.
- *
- * We call initPolicyFile with POLICY, POLICY_URL and then
- * call it with AUTH_POLICY and AUTH_POLICY_URL.
- * So first we will process the JAVA standard policy
- * and then process the JAVA AUTH Policy.
- * This is for backward compatibility as well as to handle
- * cases where the user has a single unified policyfile
- * with both java policy entries and auth entries
*/
boolean loaded_one = initPolicyFile(POLICY, POLICY_URL, newInfo);
@@ -428,8 +393,6 @@
// use static policy if all else fails
initStaticPolicy(newInfo);
}
-
- initPolicyFile(AUTH_POLICY, AUTH_POLICY_URL, newInfo);
}
}
--- a/src/java.base/share/classes/sun/security/util/Resources.java Thu Mar 01 16:35:36 2018 -0500
+++ b/src/java.base/share/classes/sun/security/util/Resources.java Fri Mar 02 21:00:12 2018 +0100
@@ -150,11 +150,6 @@
// sun.security.pkcs11.SunPKCS11
{"PKCS11.Token.providerName.Password.",
"PKCS11 Token [{0}] Password: "},
-
- /* --- DEPRECATED --- */
- // javax.security.auth.Policy
- {"unable.to.instantiate.Subject.based.policy",
- "unable to instantiate Subject-based policy"}
};
--- a/src/java.base/share/native/libjava/System.c Thu Mar 01 16:35:36 2018 -0500
+++ b/src/java.base/share/native/libjava/System.c Fri Mar 02 21:00:12 2018 +0100
@@ -260,7 +260,6 @@
PUTPROP(props, "user.variant", sprops->variant);
}
PUTPROP(props, "file.encoding", sprops->encoding);
- PUTPROP(props, "sun.jnu.encoding", sprops->sun_jnu_encoding);
if (sprops->sun_stdout_encoding != NULL) {
PUTPROP(props, "sun.stdout.encoding", sprops->sun_stdout_encoding);
}
@@ -319,6 +318,7 @@
/* !!! DO NOT call PUTPROP_ForPlatformNString before this line !!!
* !!! I18n properties have not been set up yet !!!
*/
+ InitializeEncoding(env, sprops->sun_jnu_encoding);
/* Printing properties */
/* Note: java.awt.printerjob is an implementation private property which
@@ -418,6 +418,9 @@
(*env)->DeleteLocalRef(env, jVMVal);
}
+ // Platform defined encoding properties override any on the command line
+ PUTPROP(props, "sun.jnu.encoding", sprops->sun_jnu_encoding);
+
return ret;
}
--- a/src/java.base/share/native/libjava/jni_util.c Thu Mar 01 16:35:36 2018 -0500
+++ b/src/java.base/share/native/libjava/jni_util.c Fri Mar 02 21:00:12 2018 +0100
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 1997, 2016, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 1997, 2018, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
@@ -774,14 +774,10 @@
return newSizedStringJava(env, str, len);
}
-/* Initialize the fast encoding. If the "sun.jnu.encoding" property
- * has not yet been set, we leave fastEncoding == NO_ENCODING_YET.
- */
+/* Initialize the fast encoding from the encoding name. */
void
-initializeEncoding(JNIEnv *env)
+InitializeEncoding(JNIEnv *env, const char *encname)
{
- jstring propname = 0;
- jstring enc = 0;
jclass strClazz = NULL;
if ((*env)->EnsureLocalCapacity(env, 3) < 0)
@@ -790,61 +786,49 @@
strClazz = JNU_ClassString(env);
CHECK_NULL(strClazz);
- propname = (*env)->NewStringUTF(env, "sun.jnu.encoding");
- if (propname) {
- jboolean exc;
- enc = JNU_CallStaticMethodByName
- (env,
- &exc,
- "java/lang/System",
- "getProperty",
- "(Ljava/lang/String;)Ljava/lang/String;",
- propname).l;
- if (!exc) {
- if (enc) {
- const char* encname = (*env)->GetStringUTFChars(env, enc, 0);
- if (encname) {
- /*
- * On Solaris with nl_langinfo() called in GetJavaProperties():
- *
- * locale undefined -> NULL -> hardcoded default
- * "C" locale -> "" -> hardcoded default (on 2.6)
- * "C" locale -> "ISO646-US" (on Sol 7/8)
- * "en_US" locale -> "ISO8859-1"
- * "en_GB" locale -> "ISO8859-1" (on Sol 7/8)
- * "en_UK" locale -> "ISO8859-1" (on 2.6)
- */
- if ((strcmp(encname, "8859_1") == 0) ||
- (strcmp(encname, "ISO8859-1") == 0) ||
- (strcmp(encname, "ISO8859_1") == 0) ||
- (strcmp(encname, "ISO-8859-1") == 0)) {
- fastEncoding = FAST_8859_1;
- } else if (strcmp(encname, "UTF-8") == 0) {
- fastEncoding = FAST_UTF_8;
- jnuEncoding = (jstring)(*env)->NewGlobalRef(env, enc);
- } else if (strcmp(encname, "ISO646-US") == 0) {
- fastEncoding = FAST_646_US;
- } else if (strcmp(encname, "Cp1252") == 0 ||
- /* This is a temporary fix until we move */
- /* to wide character versions of all Windows */
- /* calls. */
- strcmp(encname, "utf-16le") == 0) {
- fastEncoding = FAST_CP1252;
- } else {
- fastEncoding = NO_FAST_ENCODING;
- jnuEncoding = (jstring)(*env)->NewGlobalRef(env, enc);
- }
- (*env)->ReleaseStringUTFChars(env, enc, encname);
- }
- }
+ if (encname) {
+ /*
+ * On Solaris with nl_langinfo() called in GetJavaProperties():
+ *
+ * locale undefined -> NULL -> hardcoded default
+ * "C" locale -> "" -> hardcoded default (on 2.6)
+ * "C" locale -> "ISO646-US" (on Sol 7/8)
+ * "en_US" locale -> "ISO8859-1"
+ * "en_GB" locale -> "ISO8859-1" (on Sol 7/8)
+ * "en_UK" locale -> "ISO8859-1" (on 2.6)
+ */
+ if ((strcmp(encname, "8859_1") == 0) ||
+ (strcmp(encname, "ISO8859-1") == 0) ||
+ (strcmp(encname, "ISO8859_1") == 0) ||
+ (strcmp(encname, "ISO-8859-1") == 0)) {
+ fastEncoding = FAST_8859_1;
+ } else if (strcmp(encname, "UTF-8") == 0) {
+ jstring enc = (*env)->NewStringUTF(env, encname);
+ if (enc == NULL)
+ return;
+ fastEncoding = FAST_UTF_8;
+ jnuEncoding = (jstring)(*env)->NewGlobalRef(env, enc);
+ (*env)->DeleteLocalRef(env, enc);
+ } else if (strcmp(encname, "ISO646-US") == 0) {
+ fastEncoding = FAST_646_US;
+ } else if (strcmp(encname, "Cp1252") == 0 ||
+ /* This is a temporary fix until we move */
+ /* to wide character versions of all Windows */
+ /* calls. */
+ strcmp(encname, "utf-16le") == 0) {
+ fastEncoding = FAST_CP1252;
} else {
- (*env)->ExceptionClear(env);
+ jstring enc = (*env)->NewStringUTF(env, encname);
+ if (enc == NULL)
+ return;
+ fastEncoding = NO_FAST_ENCODING;
+ jnuEncoding = (jstring)(*env)->NewGlobalRef(env, enc);
+ (*env)->DeleteLocalRef(env, enc);
}
} else {
- (*env)->ExceptionClear(env);
+ JNU_ThrowInternalError(env, "platform encoding undefined");
+ return;
}
- (*env)->DeleteLocalRef(env, propname);
- (*env)->DeleteLocalRef(env, enc);
/* Initialize method-id cache */
String_getBytes_ID = (*env)->GetMethodID(env, strClazz,
@@ -865,19 +849,18 @@
JNIEXPORT jstring JNICALL
JNU_NewStringPlatform(JNIEnv *env, const char *str)
{
- if (fastEncoding == NO_ENCODING_YET) {
- initializeEncoding(env);
- JNU_CHECK_EXCEPTION_RETURN(env, NULL);
- }
-
- if ((fastEncoding == FAST_8859_1) || (fastEncoding == NO_ENCODING_YET))
+ if (fastEncoding == FAST_UTF_8)
+ return newStringUTF8(env, str);
+ if (fastEncoding == FAST_8859_1)
return newString8859_1(env, str);
if (fastEncoding == FAST_646_US)
return newString646_US(env, str);
if (fastEncoding == FAST_CP1252)
return newStringCp1252(env, str);
- if (fastEncoding == FAST_UTF_8)
- return newStringUTF8(env, str);
+ if (fastEncoding == NO_ENCODING_YET) {
+ JNU_ThrowInternalError(env, "platform encoding not initialized");
+ return NULL;
+ }
return newStringJava(env, str);
}
@@ -985,20 +968,18 @@
if (isCopy)
*isCopy = JNI_TRUE;
- if (fastEncoding == NO_ENCODING_YET) {
- initializeEncoding(env);
- JNU_CHECK_EXCEPTION_RETURN(env, 0);
- }
-
- if ((fastEncoding == FAST_8859_1) || (fastEncoding == NO_ENCODING_YET))
+ if (fastEncoding == FAST_UTF_8)
+ return getStringUTF8(env, jstr);
+ if (fastEncoding == FAST_8859_1)
return getString8859_1Chars(env, jstr);
if (fastEncoding == FAST_646_US)
return getString646_USChars(env, jstr);
if (fastEncoding == FAST_CP1252)
return getStringCp1252Chars(env, jstr);
- if (fastEncoding == FAST_UTF_8)
- return getStringUTF8(env, jstr);
- else
+ if (fastEncoding == NO_ENCODING_YET) {
+ JNU_ThrowInternalError(env, "platform encoding not initialized");
+ return 0;
+ } else
return getStringBytes(env, jstr);
}
--- a/src/java.base/share/native/libjava/jni_util.h Thu Mar 01 16:35:36 2018 -0500
+++ b/src/java.base/share/native/libjava/jni_util.h Fri Mar 02 21:00:12 2018 +0100
@@ -388,7 +388,7 @@
int getFastEncoding();
-void initializeEncoding();
+void InitializeEncoding(JNIEnv *env, const char *name);
void* getProcessHandle();
--- a/src/java.base/unix/native/libnio/ch/Net.c Thu Mar 01 16:35:36 2018 -0500
+++ b/src/java.base/unix/native/libnio/ch/Net.c Fri Mar 02 21:00:12 2018 +0100
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2001, 2017, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2001, 2018, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
@@ -293,8 +293,7 @@
int sa_len = 0;
int rv;
- if (NET_InetAddressToSockaddr(env, iao, port, &sa, &sa_len,
- preferIPv6) != 0) {
+ if (NET_InetAddressToSockaddr(env, iao, port, &sa, &sa_len, preferIPv6) != 0) {
return IOS_THROWN;
}
@@ -761,11 +760,11 @@
break;
#endif
case ECONNREFUSED:
+ case ETIMEDOUT:
+ case ENOTCONN:
xn = JNU_JAVANETPKG "ConnectException";
break;
- case ETIMEDOUT:
- xn = JNU_JAVANETPKG "ConnectException";
- break;
+
case EHOSTUNREACH:
xn = JNU_JAVANETPKG "NoRouteToHostException";
break;
--- a/src/java.base/unix/native/libnio/ch/SocketChannelImpl.c Thu Mar 01 16:35:36 2018 -0500
+++ b/src/java.base/unix/native/libnio/ch/SocketChannelImpl.c Fri Mar 02 21:00:12 2018 +0100
@@ -59,23 +59,29 @@
poller.events = POLLOUT;
poller.revents = 0;
result = poll(&poller, 1, block ? -1 : 0);
+
if (result < 0) {
- JNU_ThrowIOExceptionWithLastError(env, "Poll failed");
- return IOS_THROWN;
+ if (errno == EINTR) {
+ return IOS_INTERRUPTED;
+ } else {
+ JNU_ThrowIOExceptionWithLastError(env, "poll failed");
+ return IOS_THROWN;
+ }
}
if (!block && (result == 0))
- return IOS_UNAVAILABLE;
+ return IOS_UNAVAILABLE;
- if (poller.revents) {
+ if (result > 0) {
errno = 0;
result = getsockopt(fd, SOL_SOCKET, SO_ERROR, &error, &n);
if (result < 0) {
- handleSocketError(env, errno);
- return JNI_FALSE;
+ return handleSocketError(env, errno);
} else if (error) {
- handleSocketError(env, error);
- return JNI_FALSE;
+ return handleSocketError(env, error);
+ } else if ((poller.revents & POLLHUP) != 0) {
+ return handleSocketError(env, ENOTCONN);
}
+ // connected
return 1;
}
return 0;
--- a/src/java.base/windows/native/libnet/NetworkInterface_winXP.c Thu Mar 01 16:35:36 2018 -0500
+++ b/src/java.base/windows/native/libnet/NetworkInterface_winXP.c Fri Mar 02 21:00:12 2018 +0100
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2003, 2017, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2003, 2018, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
@@ -39,14 +39,15 @@
#ifdef DEBUG
void printnif (netif *nif) {
#ifdef _WIN64
- printf ("nif:0x%I64x name:%s\n", nif,nif->name);
+ printf ("nif:0x%I64x name:%s\n", (UINT_PTR)nif, nif->name);
#else
- printf ("nif:0x%x name:%s\n", nif,nif->name);
+ printf ("nif:0x%x name:%s\n", nif, nif->name);
#endif
if (nif->dNameIsUnicode) {
- printf ("dName:%S index:%d ", nif->displayName,nif->index);
+ printf ("dName:%S index:%d ", (unsigned short *)nif->displayName,
+ nif->index);
} else {
- printf ("dName:%s index:%d ", nif->displayName,nif->index);
+ printf ("dName:%s index:%d ", nif->displayName, nif->index);
}
printf ("naddrs:%d\n", nif->naddrs);
}
--- a/src/java.base/windows/native/libnio/ch/SocketChannelImpl.c Thu Mar 01 16:35:36 2018 -0500
+++ b/src/java.base/windows/native/libnio/ch/SocketChannelImpl.c Fri Mar 02 21:00:12 2018 +0100
@@ -58,9 +58,7 @@
jobject fdo, jboolean block)
{
int optError = 0;
- int lastError = 0;
- int result = 0;
- int retry = 0;
+ int result;
int n = sizeof(int);
jint fd = fdval(env, fdo);
fd_set wr, ex;
@@ -73,64 +71,33 @@
result = select(fd+1, 0, &wr, &ex, block ? NULL : &t);
- /* save last winsock error */
- if (result == SOCKET_ERROR) {
- lastError = WSAGetLastError();
- }
-
- if (block) { /* must configure socket back to blocking state */
- u_long argp = 0;
- int r = ioctlsocket(fd, FIONBIO, &argp);
- if (r == SOCKET_ERROR) {
- handleSocketError(env, WSAGetLastError());
- }
- }
-
if (result == 0) { /* timeout */
return block ? 0 : IOS_UNAVAILABLE;
} else {
- if (result == SOCKET_ERROR) { /* select failed */
- handleSocketError(env, lastError);
+ if (result == SOCKET_ERROR) { /* select failed */
+ handleSocketError(env, WSAGetLastError());
return IOS_THROWN;
}
}
- /*
- * Socket is writable or error occurred. On some Windows editions
- * the socket will appear writable when the connect fails so we
- * check for error rather than writable.
- */
- if (!FD_ISSET(fd, &ex)) {
- return 1; /* connection established */
+ // connection established if writable and no error to check
+ if (FD_ISSET(fd, &wr) && !FD_ISSET(fd, &ex)) {
+ return 1;
}
- /*
- * A getsockopt( SO_ERROR ) may indicate success on NT4 even
- * though the connection has failed. The workaround is to allow
- * winsock to be scheduled and this is done via by yielding.
- * As the yield approach is problematic in heavy load situations
- * we attempt up to 3 times to get the failure reason.
- */
- for (retry=0; retry<3; retry++) {
- result = getsockopt((SOCKET)fd,
- SOL_SOCKET,
- SO_ERROR,
- (char *)&optError,
- &n);
- if (result == SOCKET_ERROR) {
- int lastError = WSAGetLastError();
- if (lastError == WSAEINPROGRESS) {
- return IOS_UNAVAILABLE;
- }
- NET_ThrowNew(env, lastError, "getsockopt");
- return IOS_THROWN;
+ result = getsockopt((SOCKET)fd,
+ SOL_SOCKET,
+ SO_ERROR,
+ (char *)&optError,
+ &n);
+ if (result == SOCKET_ERROR) {
+ int lastError = WSAGetLastError();
+ if (lastError == WSAEINPROGRESS) {
+ return IOS_UNAVAILABLE;
}
- if (optError) {
- break;
- }
- Sleep(0);
+ NET_ThrowNew(env, lastError, "getsockopt");
+ return IOS_THROWN;
}
-
if (optError != NO_ERROR) {
handleSocketError(env, optError);
return IOS_THROWN;
--- a/src/java.desktop/macosx/classes/com/apple/eawt/_AppMenuBarHandler.java Thu Mar 01 16:35:36 2018 -0500
+++ b/src/java.desktop/macosx/classes/com/apple/eawt/_AppMenuBarHandler.java Fri Mar 02 21:00:12 2018 +0100
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2011, 2017, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2011, 2018, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
@@ -52,6 +52,8 @@
return instance;
}
+ private static ScreenMenuBar defaultMenuBar;
+
// callback from the native delegate -init function
private static void initMenuStates(final boolean aboutMenuItemVisible,
final boolean aboutMenuItemEnabled,
@@ -76,6 +78,9 @@
void setDefaultMenuBar(final JMenuBar menuBar) {
installDefaultMenuBar(menuBar);
+ if (menuBar == null) {
+ return;
+ }
// scan the current frames, and see if any are foreground
final Frame[] frames = Frame.getFrames();
@@ -100,8 +105,13 @@
}
static void installDefaultMenuBar(final JMenuBar menuBar) {
+
if (menuBar == null) {
// intentionally clearing the default menu
+ if (defaultMenuBar != null) {
+ defaultMenuBar.removeNotify();
+ defaultMenuBar = null;
+ }
nativeSetDefaultMenuBar(0);
return;
}
@@ -124,7 +134,14 @@
throw new IllegalStateException("Application.setDefaultMenuBar() only works if apple.laf.useScreenMenuBar=true");
}
- screenMenuBar.addNotify();
+ if (screenMenuBar != defaultMenuBar) {
+ if (defaultMenuBar != null) {
+ defaultMenuBar.removeNotify();
+ }
+ defaultMenuBar = screenMenuBar;
+ screenMenuBar.addNotify();
+ }
+
final Object peer = AWTAccessor.getMenuComponentAccessor().getPeer(screenMenuBar);
if (!(peer instanceof CMenuBar)) {
// such a thing should not be possible
--- a/src/java.desktop/share/classes/javax/swing/JList.java Thu Mar 01 16:35:36 2018 -0500
+++ b/src/java.desktop/share/classes/javax/swing/JList.java Fri Mar 02 21:00:12 2018 +0100
@@ -2359,6 +2359,7 @@
/**
* Selects the specified object from the list.
+ * If the object passed is {@code null}, the selection is cleared.
*
* @param anObject the object to select
* @param shouldScroll {@code true} if the list should scroll to display
@@ -2366,7 +2367,7 @@
*/
public void setSelectedValue(Object anObject,boolean shouldScroll) {
if(anObject == null)
- setSelectedIndex(-1);
+ clearSelection();
else if(!anObject.equals(getSelectedValue())) {
int i,c;
ListModel<E> dm = getModel();
--- a/src/java.desktop/share/classes/javax/swing/RepaintManager.java Thu Mar 01 16:35:36 2018 -0500
+++ b/src/java.desktop/share/classes/javax/swing/RepaintManager.java Fri Mar 02 21:00:12 2018 +0100
@@ -110,6 +110,8 @@
private Dimension doubleBufferMaxSize;
+ private boolean isCustomMaxBufferSizeSet = false;
+
// Support for both the standard and volatile offscreen buffers exists to
// provide backwards compatibility for the [rare] programs which may be
// calling getOffScreenBuffer() and not expecting to get a VolatileImage.
@@ -335,7 +337,13 @@
}
private void displayChanged() {
- clearImages();
+ if (isCustomMaxBufferSizeSet) {
+ clearImages();
+ } else {
+ // Reset buffer maximum size to get valid size from updated graphics
+ // environment in getDoubleBufferMaximumSize()
+ setDoubleBufferMaximumSize(null);
+ }
}
/**
@@ -1156,8 +1164,10 @@
public void setDoubleBufferMaximumSize(Dimension d) {
doubleBufferMaxSize = d;
if (doubleBufferMaxSize == null) {
+ isCustomMaxBufferSizeSet = false;
clearImages();
} else {
+ isCustomMaxBufferSizeSet = true;
clearImages(d.width, d.height);
}
}
--- a/src/java.desktop/unix/classes/sun/java2d/xr/XRBackendNative.java Thu Mar 01 16:35:36 2018 -0500
+++ b/src/java.desktop/unix/classes/sun/java2d/xr/XRBackendNative.java Fri Mar 02 21:00:12 2018 +0100
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2010, 2013, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2010, 2018, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
@@ -149,7 +149,7 @@
XRColor c = new XRColor();
for (int i = 0; i < pixels.length; i++) {
- c.setColorValues(pixels[i], true);
+ c.setColorValues(pixels[i]);
renderColors[i * 4 + 0] = (short) c.alpha;
renderColors[i * 4 + 1] = (short) c.red;
renderColors[i * 4 + 2] = (short) c.green;
--- a/src/java.desktop/unix/classes/sun/java2d/xr/XRColor.java Thu Mar 01 16:35:36 2018 -0500
+++ b/src/java.desktop/unix/classes/sun/java2d/xr/XRColor.java Fri Mar 02 21:00:12 2018 +0100
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2010, 2013, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2010, 2018, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
@@ -73,7 +73,7 @@
XRColor c = new XRColor();
for (int i = 0; i < pixels.length; i++) {
- c.setColorValues(pixels[i], true);
+ c.setColorValues(pixels[i]);
colorValues[i * 4 + 0] = c.alpha;
colorValues[i * 4 + 1] = c.red;
colorValues[i * 4 + 2] = c.green;
@@ -83,7 +83,7 @@
return colorValues;
}
- public void setColorValues(int pixel, boolean pre) {
+ public void setColorValues(int pixel) {
long pix = XRUtils.intToULong(pixel);
alpha = (int) (((pix & 0xFF000000) >> 16) + 255);
red = (int) (((pix & 0x00FF0000) >> 8) + 255);
@@ -93,13 +93,6 @@
if (alpha == 255) {
alpha = 0;
}
-
- if (!pre) {
- double alphaMult = XRUtils.XFixedToDouble(alpha);
- this.red = (int) (red * alphaMult);
- this.green = (int) (green * alphaMult);
- this.blue = (int) (blue * alphaMult);
- }
}
public static int byteToXRColorValue(int byteValue) {
--- a/src/java.desktop/unix/classes/sun/java2d/xr/XRCompositeManager.java Thu Mar 01 16:35:36 2018 -0500
+++ b/src/java.desktop/unix/classes/sun/java2d/xr/XRCompositeManager.java Fri Mar 02 21:00:12 2018 +0100
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2010, 2013, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2010, 2018, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
@@ -131,7 +131,7 @@
}
public void setForeground(int pixel) {
- solidColor.setColorValues(pixel, true);
+ solidColor.setColorValues(pixel);
}
public void setGradientPaint(XRSurfaceData gradient) {
--- a/src/java.desktop/unix/classes/sun/java2d/xr/XRSolidSrcPict.java Thu Mar 01 16:35:36 2018 -0500
+++ b/src/java.desktop/unix/classes/sun/java2d/xr/XRSolidSrcPict.java Fri Mar 02 21:00:12 2018 +0100
@@ -47,7 +47,7 @@
public XRSurfaceData prepareSrcPict(int pixelVal) {
if(pixelVal != curPixVal) {
- xrCol.setColorValues(pixelVal, true);
+ xrCol.setColorValues(pixelVal);
con.renderRectangle(srcPict.picture, XRUtils.PictOpSrc, xrCol, 0, 0, 1, 1);
this.curPixVal = pixelVal;
}
--- a/src/java.desktop/unix/native/libawt_xawt/awt/multiVis.c Thu Mar 01 16:35:36 2018 -0500
+++ b/src/java.desktop/unix/native/libawt_xawt/awt/multiVis.c Fri Mar 02 21:00:12 2018 +0100
@@ -394,77 +394,50 @@
XRectangle bbox; /* bounding box of grabbed area */
list_ptr regions;/* list of regions to read from */
{
- image_region_type *reg;
- int32_t dst_x, dst_y; /* where in pixmap to write (UL) */
- int32_t diff;
-
- XImage *reg_image,*ximage ;
- int32_t srcRect_x,srcRect_y,srcRect_width,srcRect_height ;
- int32_t rem ;
- int32_t bytes_per_line;
- int32_t bitmap_unit;
-
- bitmap_unit = sizeof (long);
- if (format == ZPixmap)
- bytes_per_line = width*depth/8;
- else
- bytes_per_line = width/8;
-
-
- /* Find out how many more bytes are required for padding so that
- ** bytes per scan line will be multiples of bitmap_unit bits */
- if (format == ZPixmap) {
- rem = (bytes_per_line*8)%bitmap_unit;
- if (rem)
- bytes_per_line += (rem/8 + 1);
- }
+ XImage *ximage ;
+ image_region_type* reg;
+ int32_t rect;
ximage = XCreateImage(disp,fakeVis,(uint32_t) depth,format,0,NULL,
(uint32_t)width,(uint32_t)height,8,0);
- bytes_per_line = ximage->bytes_per_line;
-
- if (format == ZPixmap)
- ximage->data = malloc(height*bytes_per_line);
- else
- ximage->data = malloc(height*bytes_per_line*depth);
-
+ ximage->data = calloc(ximage->bytes_per_line*height*((format==ZPixmap)? 1 : depth), sizeof(char));
ximage->bits_per_pixel = depth; /** Valid only if format is ZPixmap ***/
for (reg = (image_region_type *) first_in_list( regions); reg;
reg = (image_region_type *) next_in_list( regions))
{
- int32_t rect;
- struct my_XRegion *vis_reg;
- vis_reg = (struct my_XRegion *)(reg->visible_region);
- for (rect = 0;
- rect < vis_reg->numRects;
- rect++)
+ struct my_XRegion *vis_reg = (struct my_XRegion *)(reg->visible_region);
+ for (rect = 0; rect < vis_reg->numRects; rect++)
{
- /** ------------------------------------------------------------------------
- Intersect bbox with visible part of region giving src rect & output
- location. Width is the min right side minus the max left side.
- Similar for height. Offset src rect so x,y are relative to
- origin of win, not the root-relative visible rect of win.
- ------------------------------------------------------------------------ **/
- srcRect_width = MIN( vis_reg->rects[rect].x2, bbox.width + bbox.x)
- - MAX( vis_reg->rects[rect].x1, bbox.x);
+ /** ------------------------------------------------------------------------
+ Intersect bbox with visible part of region giving src rect & output
+ location. Width is the min right side minus the max left side.
+ Similar for height. Offset src rect so x,y are relative to
+ origin of win, not the root-relative visible rect of win.
+ ------------------------------------------------------------------------ **/
+ int32_t srcRect_width = MIN( vis_reg->rects[rect].x2, bbox.width + bbox.x)
+ - MAX( vis_reg->rects[rect].x1, bbox.x);
+
+ int32_t srcRect_height = MIN( vis_reg->rects[rect].y2, bbox.height + bbox.y)
+ - MAX( vis_reg->rects[rect].y1, bbox.y);
- srcRect_height = MIN( vis_reg->rects[rect].y2, bbox.height + bbox.y)
- - MAX( vis_reg->rects[rect].y1, bbox.y);
+ int32_t diff = bbox.x - vis_reg->rects[rect].x1;
+ int32_t srcRect_x = MAX( 0, diff) + (vis_reg->rects[rect].x1 - reg->x_rootrel - reg->border);
+ int32_t dst_x = MAX( 0, -diff) ;
- diff = bbox.x - vis_reg->rects[rect].x1;
- srcRect_x = MAX( 0, diff) + (vis_reg->rects[rect].x1 - reg->x_rootrel - reg->border);
- dst_x = MAX( 0, -diff) ;
- diff = bbox.y - vis_reg->rects[rect].y1;
- srcRect_y = MAX( 0, diff) + (vis_reg->rects[rect].y1 - reg->y_rootrel - reg->border);
- dst_y = MAX( 0, -diff) ;
- reg_image = XGetImage(disp,reg->win,srcRect_x,srcRect_y,
- (uint32_t) srcRect_width, (uint32_t) srcRect_height,AllPlanes,format) ;
- TransferImage(disp,reg_image,srcRect_width,
- srcRect_height,reg,ximage,dst_x,dst_y) ;
- XDestroyImage(reg_image);
- }
+ diff = bbox.y - vis_reg->rects[rect].y1;
+ int32_t srcRect_y = MAX( 0, diff) + (vis_reg->rects[rect].y1 - reg->y_rootrel - reg->border);
+ int32_t dst_y = MAX( 0, -diff) ;
+ XImage* reg_image = XGetImage(disp,reg->win,srcRect_x,srcRect_y,
+ (uint32_t) srcRect_width, (uint32_t) srcRect_height,AllPlanes,format) ;
+
+ if (reg_image) {
+ TransferImage(disp,reg_image,srcRect_width,
+ srcRect_height,reg,ximage,dst_x,dst_y) ;
+ XDestroyImage(reg_image);
+ }
+ }
}
return ximage ;
}
--- a/src/java.management/share/classes/java/lang/management/MonitorInfo.java Thu Mar 01 16:35:36 2018 -0500
+++ b/src/java.management/share/classes/java/lang/management/MonitorInfo.java Fri Mar 02 21:00:12 2018 +0100
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2005, 2017, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2005, 2018, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
@@ -116,11 +116,10 @@
* <tbody style="text-align:left">
* <tr>
* <th scope="row">lockedStackFrame</th>
- * <td><code>CompositeData as specified in the
- * <a href="ThreadInfo.html#StackTrace">stackTrace</a>
- * attribute defined in the {@link ThreadInfo#from
- * ThreadInfo.from} method.
- * </code></td>
+ * <td><a href="ThreadInfo.html#stackTraceElement">
+ * {@code CompositeData} for {@code StackTraceElement}</a> as specified
+ * in {@link ThreadInfo#from(CompositeData)} method.
+ * </td>
* </tr>
* <tr>
* <th scope="row">lockedStackDepth</th>
@@ -134,7 +133,7 @@
* @throws IllegalArgumentException if {@code cd} does not
* represent a {@code MonitorInfo} with the attributes described
* above.
-
+ *
* @return a {@code MonitorInfo} object represented
* by {@code cd} if {@code cd} is not {@code null};
* {@code null} otherwise.
--- a/src/java.management/share/classes/java/lang/management/ThreadInfo.java Thu Mar 01 16:35:36 2018 -0500
+++ b/src/java.management/share/classes/java/lang/management/ThreadInfo.java Fri Mar 02 21:00:12 2018 +0100
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2003, 2017, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2003, 2018, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
@@ -25,6 +25,7 @@
package java.lang.management;
+import javax.management.openmbean.ArrayType;
import javax.management.openmbean.CompositeData;
import sun.management.ManagementFactoryHelper;
import sun.management.ThreadInfoCompositeData;
@@ -110,7 +111,6 @@
private StackTraceElement[] stackTrace;
private MonitorInfo[] lockedMonitors;
private LockInfo[] lockedSynchronizers;
-
private static MonitorInfo[] EMPTY_MONITORS = new MonitorInfo[0];
private static LockInfo[] EMPTY_SYNCS = new LockInfo[0];
@@ -264,6 +264,11 @@
/*
* Constructs a {@code ThreadInfo} object from a
* {@link CompositeData CompositeData}.
+ *
+ * @throws IllegalArgumentException if the given CompositeData does not
+ * contain all of the attributes defined for ThreadInfo of version <= N.
+ *
+ * @see ThreadInfo#from
*/
private ThreadInfo(CompositeData cd) {
ThreadInfoCompositeData ticd = ThreadInfoCompositeData.getInstance(cd);
@@ -281,41 +286,11 @@
suspended = ticd.suspended();
inNative = ticd.inNative();
stackTrace = ticd.stackTrace();
-
- // 6.0 attributes
- if (ticd.hasV6()) {
- lock = ticd.lockInfo();
- lockedMonitors = ticd.lockedMonitors();
- lockedSynchronizers = ticd.lockedSynchronizers();
- } else {
- // lockInfo is a new attribute added in 1.6 ThreadInfo
- // If cd is a 5.0 version, construct the LockInfo object
- // from the lockName value.
- if (lockName != null) {
- String result[] = lockName.split("@");
- if (result.length == 2) {
- int identityHashCode = Integer.parseInt(result[1], 16);
- lock = new LockInfo(result[0], identityHashCode);
- } else {
- assert result.length == 2;
- lock = null;
- }
- } else {
- lock = null;
- }
- lockedMonitors = EMPTY_MONITORS;
- lockedSynchronizers = EMPTY_SYNCS;
- }
-
- // 9.0 attributes
- if (ticd.isCurrentVersion()) {
- daemon = ticd.isDaemon();
- priority = ticd.getPriority();
- } else {
- // Not ideal, but unclear what else we can do.
- daemon = false;
- priority = Thread.NORM_PRIORITY;
- }
+ lock = ticd.lockInfo();
+ lockedMonitors = ticd.lockedMonitors();
+ lockedSynchronizers = ticd.lockedSynchronizers();
+ daemon = ticd.isDaemon();
+ priority = ticd.getPriority();
}
/**
@@ -692,52 +667,105 @@
/**
* Returns a {@code ThreadInfo} object represented by the
* given {@code CompositeData}.
- * The given {@code CompositeData} must contain the following attributes
- * unless otherwise specified below:
+ *
+ * <a id="attributes"></a>
+ * A {@code CompositeData} representing a {@code ThreadInfo} of
+ * version <em>N</em> must contain all of the attributes defined
+ * in version ≤ <em>N</em> unless specified otherwise.
+ * The same rule applies the composite type of the given
+ * {@code CompositeData} and transitively to attributes whose
+ * {@linkplain CompositeData#getCompositeType() type} or
+ * {@linkplain ArrayType#getElementOpenType() component type} is
+ * {@code CompositeType}.
+ * <p>
+ * A {@code CompositeData} representing {@code ThreadInfo} of
+ * version <em>N</em> contains {@code "stackTrace"} attribute and
+ * {@code "lockedMonitors"} attribute representing
+ * an array of {@code StackTraceElement} and
+ * an array of {@link MonitorInfo} respectively
+ * and their types are of version <em>N</em>.
+ * The {@code "lockedStackFrame"} attribute in
+ * {@link MonitorInfo#from(CompositeData) MonitorInfo}'s composite type
+ * must represent {@code StackTraceElement} of the same version <em>N</em>.
+ * Otherwise, this method will throw {@code IllegalArgumentException}.
+ *
* <table class="striped" style="margin-left:2em">
- * <caption style="display:none">The attributes and their types the given CompositeData contains</caption>
+ * <caption style="display:none">The attributes and their types for ThreadInfo's composite data</caption>
* <thead>
* <tr>
* <th scope="col">Attribute Name</th>
* <th scope="col">Type</th>
+ * <th scope="col">Since</th>
* </tr>
* </thead>
* <tbody style="text-align:left">
* <tr>
* <th scope="row">threadId</th>
* <td>{@code java.lang.Long}</td>
+ * <td>5</td>
* </tr>
* <tr>
* <th scope="row">threadName</th>
* <td>{@code java.lang.String}</td>
+ * <td>5</td>
* </tr>
* <tr>
* <th scope="row">threadState</th>
* <td>{@code java.lang.String}</td>
+ * <td>5</td>
* </tr>
* <tr>
* <th scope="row">suspended</th>
* <td>{@code java.lang.Boolean}</td>
+ * <td>5</td>
* </tr>
* <tr>
* <th scope="row">inNative</th>
* <td>{@code java.lang.Boolean}</td>
+ * <td>5</td>
* </tr>
* <tr>
* <th scope="row">blockedCount</th>
* <td>{@code java.lang.Long}</td>
+ * <td>5</td>
* </tr>
* <tr>
* <th scope="row">blockedTime</th>
* <td>{@code java.lang.Long}</td>
+ * <td>5</td>
* </tr>
* <tr>
* <th scope="row">waitedCount</th>
* <td>{@code java.lang.Long}</td>
+ * <td>5</td>
* </tr>
* <tr>
* <th scope="row">waitedTime</th>
* <td>{@code java.lang.Long}</td>
+ * <td>5</td>
+ * </tr>
+ * <tr>
+ * <th scope="row">lockName</th>
+ * <td>{@code java.lang.String}</td>
+ * <td>5</td>
+ * </tr>
+ * <tr>
+ * <th scope="row">lockOwnerId</th>
+ * <td>{@code java.lang.Long}</td>
+ * <td>5</td>
+ * </tr>
+ * <tr>
+ * <th scope="row">lockOwnerName</th>
+ * <td>{@code java.lang.String}</td>
+ * <td>5</td>
+ * </tr>
+ * <tr>
+ * <th scope="row"><a id="StackTrace">stackTrace</a></th>
+ * <td>{@code javax.management.openmbean.CompositeData[]}, each element
+ * is a {@code CompositeData} representing {@code StackTraceElement}
+ * as specified <a href="#stackTraceElement">below</a>.
+ * </td>
+ * <td>5</td>
* </tr>
* <tr>
* <th scope="row">lockInfo</th>
@@ -745,78 +773,21 @@
* - the mapped type for {@link LockInfo} as specified in the
* {@link LockInfo#from} method.
* <p>
- * If {@code cd} does not contain this attribute,
+ * If the given {@code CompositeData} does not contain this attribute,
* the {@code LockInfo} object will be constructed from
- * the value of the {@code lockName} attribute. </td>
- * </tr>
- * <tr>
- * <th scope="row">lockName</th>
- * <td>{@code java.lang.String}</td>
- * </tr>
- * <tr>
- * <th scope="row">lockOwnerId</th>
- * <td>{@code java.lang.Long}</td>
- * </tr>
- * <tr>
- * <th scope="row">lockOwnerName</th>
- * <td>{@code java.lang.String}</td>
- * </tr>
- * <tr>
- * <th scope="row"><a id="StackTrace">stackTrace</a></th>
- * <td>{@code javax.management.openmbean.CompositeData[]}
- * <p>
- * Each element is a {@code CompositeData} representing
- * StackTraceElement containing the following attributes:
- * <table class="striped" style="margin-left:2em">
- * <caption style="display:none">The attributes and their types the given CompositeData contains</caption>
- * <thead style="text-align:center">
- * <tr>
- * <th scope="col">Attribute Name</th>
- * <th scope="col">Type</th>
- * </tr>
- * </thead>
- * <tbody style="text-align:left">
- * <tr>
- * <th scope="row">moduleName</th>
- * <td>{@code java.lang.String}</td>
- * </tr>
- * <tr>
- * <th scope="row">moduleVersion</th>
- * <td>{@code java.lang.String}</td>
- * </tr>
- * <tr>
- * <th scope="row">className</th>
- * <td>{@code java.lang.String}</td>
- * </tr>
- * <tr>
- * <th scope="row">methodName</th>
- * <td>{@code java.lang.String}</td>
- * </tr>
- * <tr>
- * <th scope="row">fileName</th>
- * <td>{@code java.lang.String}</td>
- * </tr>
- * <tr>
- * <th scope="row">lineNumber</th>
- * <td>{@code java.lang.Integer}</td>
- * </tr>
- * <tr>
- * <th scope="row">nativeMethod</th>
- * <td>{@code java.lang.Boolean}</td>
- * </tr>
- * </tbody>
- * </table>
- * </td>
+ * the value of the {@code lockName} attribute.</td>
+ * <td>6</td>
* </tr>
* <tr>
* <th scope="row">lockedMonitors</th>
* <td>{@code javax.management.openmbean.CompositeData[]}
* whose element type is the mapped type for
* {@link MonitorInfo} as specified in the
- * {@link MonitorInfo#from Monitor.from} method.
+ * {@link MonitorInfo#from MonitorInfo.from} method.
* <p>
- * If {@code cd} does not contain this attribute,
- * this attribute will be set to an empty array. </td>
+ * If the given {@code CompositeData} does not contain this attribute,
+ * this attribute will be set to an empty array.</td>
+ * <td>6</td>
* </tr>
* <tr>
* <th scope="row">lockedSynchronizers</th>
@@ -824,25 +795,93 @@
* whose element type is the mapped type for
* {@link LockInfo} as specified in the {@link LockInfo#from} method.
* <p>
- * If {@code cd} does not contain this attribute,
- * this attribute will be set to an empty array. </td>
+ * If the given {@code CompositeData} does not contain this attribute,
+ * this attribute will be set to an empty array.</td>
+ * <td>6</td>
* </tr>
* <tr>
* <th scope="row">daemon</th>
- * <td>{@code java.lang.Boolean}</td>
+ * <td>{@code java.lang.Boolean}
+ * <p>
+ * If the given {@code CompositeData} does not contain this attribute,
+ * this attribute will be set to {@code false}.</td>
+ * <td>9</td>
* </tr>
* <tr>
* <th scope="row">priority</th>
+ * <td>{@code java.lang.Integer}
+ * <p>
+ * If the given {@code CompositeData} does not contain this attribute,
+ * This attribute will be set to {@link Thread#NORM_PRIORITY}.</td>
+ * <td>9</td>
+ * </tr>
+ * </tbody>
+ * </table>
+ *
+ * <a id="stackTraceElement">A {@code CompositeData} representing
+ * {@code StackTraceElement}</a> of version <em>N</em> must contain
+ * all of the attributes defined in version ≤ <em>N</em>
+ * unless specified otherwise.
+ *
+ * <table class="striped" style="margin-left:2em">
+ * <caption style="display:none">The attributes and their types for StackTraceElement's composite data</caption>
+ * <thead style="text-align:center">
+ * <tr>
+ * <th scope="col">Attribute Name</th>
+ * <th scope="col">Type</th>
+ * <th scope="col">Since</th>
+ * </tr>
+ * </thead>
+ * <tbody style="text-align:left">
+ * <tr>
+ * <th scope="row">classLoaderName</th>
+ * <td>{@code java.lang.String}</td>
+ * <td>9</td>
+ * </tr>
+ * <tr>
+ * <th scope="row">moduleName</th>
+ * <td>{@code java.lang.String}</td>
+ * <td>9</td>
+ * </tr>
+ * <tr>
+ * <th scope="row">moduleVersion</th>
+ * <td>{@code java.lang.String}</td>
+ * <td>9</td>
+ * </tr>
+ * <tr>
+ * <th scope="row">className</th>
+ * <td>{@code java.lang.String}</td>
+ * <td>5</td>
+ * </tr>
+ * <tr>
+ * <th scope="row">methodName</th>
+ * <td>{@code java.lang.String}</td>
+ * <td>5</td>
+ * </tr>
+ * <tr>
+ * <th scope="row">fileName</th>
+ * <td>{@code java.lang.String}</td>
+ * <td>5</td>
+ * </tr>
+ * <tr>
+ * <th scope="row">lineNumber</th>
* <td>{@code java.lang.Integer}</td>
+ * <td>5</td>
+ * </tr>
+ * <tr>
+ * <th scope="row">nativeMethod</th>
+ * <td>{@code java.lang.Boolean}</td>
+ * <td>5</td>
* </tr>
* </tbody>
* </table>
*
* @param cd {@code CompositeData} representing a {@code ThreadInfo}
*
- * @throws IllegalArgumentException if {@code cd} does not
- * represent a {@code ThreadInfo} with the attributes described
- * above.
+ * @throws IllegalArgumentException if the given {@code cd} and
+ * its composite type does not contain all of
+ * <a href="#attributes">the attributes</a> defined for a
+ * {@code ThreadInfo} of a specific runtime version.
*
* @return a {@code ThreadInfo} object represented
* by {@code cd} if {@code cd} is not {@code null};
--- a/src/java.management/share/classes/sun/management/LockInfoCompositeData.java Thu Mar 01 16:35:36 2018 -0500
+++ b/src/java.management/share/classes/sun/management/LockInfoCompositeData.java Fri Mar 02 21:00:12 2018 +0100
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2012, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2012, 2018, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
@@ -58,15 +58,15 @@
protected CompositeData getCompositeData() {
// CONTENTS OF THIS ARRAY MUST BE SYNCHRONIZED WITH
- // lockInfoItemNames!
+ // LOCK_INFO_ATTRIBUTES!
final Object[] lockInfoItemValues = {
new String(lock.getClassName()),
lock.getIdentityHashCode(),
};
try {
- return new CompositeDataSupport(lockInfoCompositeType,
- lockInfoItemNames,
+ return new CompositeDataSupport(LOCK_INFO_COMPOSITE_TYPE,
+ LOCK_INFO_ATTRIBUTES,
lockInfoItemValues);
} catch (OpenDataException e) {
// Should never reach here
@@ -74,10 +74,10 @@
}
}
- private static final CompositeType lockInfoCompositeType;
+ private static final CompositeType LOCK_INFO_COMPOSITE_TYPE;
static {
try {
- lockInfoCompositeType = (CompositeType)
+ LOCK_INFO_COMPOSITE_TYPE = (CompositeType)
MappedMXBeanType.toOpenType(LockInfo.class);
} catch (OpenDataException e) {
// Should never reach here
@@ -85,13 +85,13 @@
}
}
- static CompositeType getLockInfoCompositeType() {
- return lockInfoCompositeType;
+ static CompositeType compositeType() {
+ return LOCK_INFO_COMPOSITE_TYPE;
}
private static final String CLASS_NAME = "className";
private static final String IDENTITY_HASH_CODE = "identityHashCode";
- private static final String[] lockInfoItemNames = {
+ private static final String[] LOCK_INFO_ATTRIBUTES = {
CLASS_NAME,
IDENTITY_HASH_CODE,
};
@@ -104,7 +104,7 @@
throw new NullPointerException("Null CompositeData");
}
- if (!isTypeMatched(lockInfoCompositeType, cd.getCompositeType())) {
+ if (!isTypeMatched(LOCK_INFO_COMPOSITE_TYPE, cd.getCompositeType())) {
throw new IllegalArgumentException(
"Unexpected composite type for LockInfo");
}
--- a/src/java.management/share/classes/sun/management/MonitorInfoCompositeData.java Thu Mar 01 16:35:36 2018 -0500
+++ b/src/java.management/share/classes/sun/management/MonitorInfoCompositeData.java Fri Mar 02 21:00:12 2018 +0100
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2005, 2012, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2005, 2018, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
@@ -30,7 +30,7 @@
import javax.management.openmbean.CompositeData;
import javax.management.openmbean.CompositeDataSupport;
import javax.management.openmbean.OpenDataException;
-import java.util.Set;
+import javax.management.openmbean.OpenType;
/**
* A CompositeData for MonitorInfo for the local management support.
@@ -55,14 +55,14 @@
protected CompositeData getCompositeData() {
// CONTENTS OF THIS ARRAY MUST BE SYNCHRONIZED WITH
- // monitorInfoItemNames!
+ // MONITOR_INFO_ATTRIBUTES!
- int len = monitorInfoItemNames.length;
+ int len = MONITOR_INFO_ATTRIBUTES.length;
Object[] values = new Object[len];
CompositeData li = LockInfoCompositeData.toCompositeData(lock);
for (int i = 0; i < len; i++) {
- String item = monitorInfoItemNames[i];
+ String item = MONITOR_INFO_ATTRIBUTES[i];
if (item.equals(LOCKED_STACK_FRAME)) {
StackTraceElement ste = lock.getLockedStackFrame();
values[i] = (ste != null ? StackTraceElementCompositeData.
@@ -76,8 +76,8 @@
}
try {
- return new CompositeDataSupport(monitorInfoCompositeType,
- monitorInfoItemNames,
+ return new CompositeDataSupport(MONITOR_INFO_COMPOSITE_TYPE,
+ MONITOR_INFO_ATTRIBUTES,
values);
} catch (OpenDataException e) {
// Should never reach here
@@ -85,28 +85,50 @@
}
}
- private static final CompositeType monitorInfoCompositeType;
- private static final String[] monitorInfoItemNames;
+ private static final String CLASS_NAME = "className";
+ private static final String IDENTITY_HASH_CODE = "identityHashCode";
+ private static final String LOCKED_STACK_FRAME = "lockedStackFrame";
+ private static final String LOCKED_STACK_DEPTH = "lockedStackDepth";
+
+ private static final String[] MONITOR_INFO_ATTRIBUTES = {
+ CLASS_NAME,
+ IDENTITY_HASH_CODE,
+ LOCKED_STACK_FRAME,
+ LOCKED_STACK_DEPTH
+ };
+
+ private static final CompositeType MONITOR_INFO_COMPOSITE_TYPE;
+ private static final CompositeType V6_COMPOSITE_TYPE;
static {
try {
- monitorInfoCompositeType = (CompositeType)
+ MONITOR_INFO_COMPOSITE_TYPE = (CompositeType)
MappedMXBeanType.toOpenType(MonitorInfo.class);
- Set<String> s = monitorInfoCompositeType.keySet();
- monitorInfoItemNames = s.toArray(new String[0]);
+
+ OpenType<?>[] types = new OpenType<?>[MONITOR_INFO_ATTRIBUTES.length];
+ for (int i = 0; i < MONITOR_INFO_ATTRIBUTES.length; i++) {
+ String name = MONITOR_INFO_ATTRIBUTES[i];
+ types[i] = name.equals(LOCKED_STACK_FRAME)
+ ? StackTraceElementCompositeData.v5CompositeType()
+ : MONITOR_INFO_COMPOSITE_TYPE.getType(name);
+ }
+ V6_COMPOSITE_TYPE = new CompositeType("MonitorInfo",
+ "JDK 6 MonitorInfo",
+ MONITOR_INFO_ATTRIBUTES,
+ MONITOR_INFO_ATTRIBUTES,
+ types);
} catch (OpenDataException e) {
// Should never reach here
throw new AssertionError(e);
}
}
- static CompositeType getMonitorInfoCompositeType() {
- return monitorInfoCompositeType;
+ static CompositeType v6CompositeType() {
+ return V6_COMPOSITE_TYPE;
}
- private static final String CLASS_NAME = "className";
- private static final String IDENTITY_HASH_CODE = "identityHashCode";
- private static final String LOCKED_STACK_FRAME = "lockedStackFrame";
- private static final String LOCKED_STACK_DEPTH = "lockedStackDepth";
+ static CompositeType compositeType() {
+ return MONITOR_INFO_COMPOSITE_TYPE;
+ }
public static String getClassName(CompositeData cd) {
return getString(cd, CLASS_NAME);
@@ -138,7 +160,8 @@
throw new NullPointerException("Null CompositeData");
}
- if (!isTypeMatched(monitorInfoCompositeType, cd.getCompositeType())) {
+ if (!isTypeMatched(MONITOR_INFO_COMPOSITE_TYPE, cd.getCompositeType()) &&
+ !isTypeMatched(V6_COMPOSITE_TYPE, cd.getCompositeType())) {
throw new IllegalArgumentException(
"Unexpected composite type for MonitorInfo");
}
--- a/src/java.management/share/classes/sun/management/StackTraceElementCompositeData.java Thu Mar 01 16:35:36 2018 -0500
+++ b/src/java.management/share/classes/sun/management/StackTraceElementCompositeData.java Fri Mar 02 21:00:12 2018 +0100
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2005, 2008, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2005, 2018, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
@@ -25,13 +25,13 @@
package sun.management;
-import java.util.HashMap;
-import java.util.Map;
-import java.util.function.Predicate;
import javax.management.openmbean.CompositeType;
import javax.management.openmbean.CompositeData;
import javax.management.openmbean.CompositeDataSupport;
import javax.management.openmbean.OpenDataException;
+import javax.management.openmbean.OpenType;
+import java.util.Arrays;
+import java.util.stream.Stream;
/**
* A CompositeData for StackTraceElement for the local management support.
@@ -52,12 +52,7 @@
public static StackTraceElement from(CompositeData cd) {
validateCompositeData(cd);
- if (stackTraceElementV6CompositeType.equals(cd.getCompositeType())) {
- return new StackTraceElement(getString(cd, CLASS_NAME),
- getString(cd, METHOD_NAME),
- getString(cd, FILE_NAME),
- getInt(cd, LINE_NUMBER));
- } else {
+ if (STACK_TRACE_ELEMENT_COMPOSITE_TYPE.equals(cd.getCompositeType())) {
return new StackTraceElement(getString(cd, CLASS_LOADER_NAME),
getString(cd, MODULE_NAME),
getString(cd, MODULE_VERSION),
@@ -65,6 +60,12 @@
getString(cd, METHOD_NAME),
getString(cd, FILE_NAME),
getInt(cd, LINE_NUMBER));
+ } else {
+ return new StackTraceElement(getString(cd, CLASS_NAME),
+ getString(cd, METHOD_NAME),
+ getString(cd, FILE_NAME),
+ getInt(cd, LINE_NUMBER));
+
}
}
@@ -75,7 +76,7 @@
protected CompositeData getCompositeData() {
// CONTENTS OF THIS ARRAY MUST BE SYNCHRONIZED WITH
- // stackTraceElementItemNames!
+ // STACK_TRACE_ELEMENT_ATTRIBUTES!
final Object[] stackTraceElementItemValues = {
ste.getClassLoaderName(),
ste.getModuleName(),
@@ -87,8 +88,8 @@
ste.isNativeMethod(),
};
try {
- return new CompositeDataSupport(stackTraceElementCompositeType,
- stackTraceElementItemNames,
+ return new CompositeDataSupport(STACK_TRACE_ELEMENT_COMPOSITE_TYPE,
+ STACK_TRACE_ELEMENT_ATTRIBUTES,
stackTraceElementItemValues);
} catch (OpenDataException e) {
// Should never reach here
@@ -106,11 +107,7 @@
private static final String LINE_NUMBER = "lineNumber";
private static final String NATIVE_METHOD = "nativeMethod";
-
- private static final String[] stackTraceElementItemNames = {
- CLASS_LOADER_NAME,
- MODULE_NAME,
- MODULE_VERSION,
+ private static final String[] V5_ATTRIBUTES = {
CLASS_NAME,
METHOD_NAME,
FILE_NAME,
@@ -118,30 +115,48 @@
NATIVE_METHOD,
};
- private static final String[] stackTraceElementV9ItemNames = {
+ private static final String[] V9_ATTRIBUTES = {
CLASS_LOADER_NAME,
MODULE_NAME,
MODULE_VERSION,
};
- private static final CompositeType stackTraceElementCompositeType;
- private static final CompositeType stackTraceElementV6CompositeType;
+ private static final String[] STACK_TRACE_ELEMENT_ATTRIBUTES =
+ Stream.of(V5_ATTRIBUTES, V9_ATTRIBUTES).flatMap(Arrays::stream)
+ .toArray(String[]::new);
+
+ private static final CompositeType STACK_TRACE_ELEMENT_COMPOSITE_TYPE;
+ private static final CompositeType V5_COMPOSITE_TYPE;
static {
try {
- stackTraceElementCompositeType = (CompositeType)
+ STACK_TRACE_ELEMENT_COMPOSITE_TYPE = (CompositeType)
MappedMXBeanType.toOpenType(StackTraceElement.class);
- stackTraceElementV6CompositeType =
- TypeVersionMapper.getInstance().getVersionedCompositeType(
- stackTraceElementCompositeType,
- TypeVersionMapper.V6
- );
+
+ OpenType<?>[] types = new OpenType<?>[V5_ATTRIBUTES.length];
+ for (int i=0; i < V5_ATTRIBUTES.length; i++) {
+ String name = V5_ATTRIBUTES[i];
+ types[i] = STACK_TRACE_ELEMENT_COMPOSITE_TYPE.getType(name);
+ }
+ V5_COMPOSITE_TYPE = new CompositeType("StackTraceElement",
+ "JDK 5 StackTraceElement",
+ V5_ATTRIBUTES,
+ V5_ATTRIBUTES,
+ types);
} catch (OpenDataException e) {
// Should never reach here
throw new AssertionError(e);
}
}
- /** Validate if the input CompositeData has the expected
+ static CompositeType v5CompositeType() {
+ return V5_COMPOSITE_TYPE;
+ }
+ static CompositeType compositeType() {
+ return STACK_TRACE_ELEMENT_COMPOSITE_TYPE;
+ }
+
+ /**
+ * Validate if the input CompositeData has the expected
* CompositeType (i.e. contain all attributes with expected
* names and types).
*/
@@ -151,22 +166,11 @@
}
CompositeType ct = cd.getCompositeType();
- if (!isTypeMatched(stackTraceElementCompositeType, ct)) {
- if (!isTypeMatched(stackTraceElementV6CompositeType, ct)) {
- throw new IllegalArgumentException(
- "Unexpected composite type for StackTraceElement");
- }
+ if (!isTypeMatched(STACK_TRACE_ELEMENT_COMPOSITE_TYPE, ct) &&
+ !isTypeMatched(V5_COMPOSITE_TYPE, ct)) {
+ throw new IllegalArgumentException(
+ "Unexpected composite type for StackTraceElement");
}
}
-
- static boolean isV6Attribute(String name) {
- for(String attrName : stackTraceElementV9ItemNames) {
- if (name.equals(attrName)) {
- return false;
- }
- }
- return true;
- }
-
private static final long serialVersionUID = -2704607706598396827L;
}
--- a/src/java.management/share/classes/sun/management/ThreadInfoCompositeData.java Thu Mar 01 16:35:36 2018 -0500
+++ b/src/java.management/share/classes/sun/management/ThreadInfoCompositeData.java Fri Mar 02 21:00:12 2018 +0100
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2004, 2012, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2004, 2018, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
@@ -28,10 +28,16 @@
import java.lang.management.ThreadInfo;
import java.lang.management.MonitorInfo;
import java.lang.management.LockInfo;
+import java.util.Arrays;
+import java.util.HashMap;
+import java.util.Map;
+import java.util.stream.Stream;
+import javax.management.openmbean.ArrayType;
import javax.management.openmbean.CompositeType;
import javax.management.openmbean.CompositeData;
import javax.management.openmbean.CompositeDataSupport;
import javax.management.openmbean.OpenDataException;
+import javax.management.openmbean.OpenType;
/**
* A CompositeData for ThreadInfo for the local management support.
@@ -41,35 +47,21 @@
public class ThreadInfoCompositeData extends LazyCompositeData {
private final ThreadInfo threadInfo;
private final CompositeData cdata;
- private final boolean currentVersion;
- private final boolean hasV6;
private ThreadInfoCompositeData(ThreadInfo ti) {
this.threadInfo = ti;
- this.currentVersion = true;
this.cdata = null;
- this.hasV6 = true;
}
private ThreadInfoCompositeData(CompositeData cd) {
this.threadInfo = null;
- this.currentVersion = ThreadInfoCompositeData.isCurrentVersion(cd);
this.cdata = cd;
- this.hasV6 = ThreadInfoCompositeData.hasV6(cd);
}
public ThreadInfo getThreadInfo() {
return threadInfo;
}
- public boolean hasV6() {
- return hasV6;
- }
-
- public boolean isCurrentVersion() {
- return currentVersion;
- }
-
public static ThreadInfoCompositeData getInstance(CompositeData cd) {
validateCompositeData(cd);
return new ThreadInfoCompositeData(cd);
@@ -112,7 +104,7 @@
}
// CONTENTS OF THIS ARRAY MUST BE SYNCHRONIZED WITH
- // threadInfoItemNames!
+ // THREAD_INFO_ATTRIBUTES!
final Object[] threadInfoItemValues = {
threadInfo.getThreadId(),
threadInfo.getThreadName(),
@@ -126,8 +118,8 @@
threadInfo.getLockOwnerId(),
threadInfo.getLockOwnerName(),
stackTraceData,
- threadInfo.isSuspended(),
- threadInfo.isInNative(),
+ threadInfo.isSuspended(),
+ threadInfo.isInNative(),
lockedMonitorsData,
lockedSyncsData,
threadInfo.isDaemon(),
@@ -135,8 +127,8 @@
};
try {
- return new CompositeDataSupport(threadInfoCompositeType,
- threadInfoItemNames,
+ return new CompositeDataSupport(compositeType(),
+ THREAD_INFO_ATTRIBTUES,
threadInfoItemValues);
} catch (OpenDataException e) {
// Should never reach here
@@ -164,7 +156,7 @@
private static final String LOCKED_MONITORS = "lockedMonitors";
private static final String LOCKED_SYNCS = "lockedSynchronizers";
- private static final String[] threadInfoItemNames = {
+ private static final String[] V5_ATTRIBUTES = {
THREAD_ID,
THREAD_NAME,
THREAD_STATE,
@@ -172,109 +164,28 @@
BLOCKED_COUNT,
WAITED_TIME,
WAITED_COUNT,
- LOCK_INFO,
LOCK_NAME,
LOCK_OWNER_ID,
LOCK_OWNER_NAME,
STACK_TRACE,
SUSPENDED,
- IN_NATIVE,
- LOCKED_MONITORS,
- LOCKED_SYNCS,
- DAEMON,
- PRIORITY,
+ IN_NATIVE
};
- // New attributes added in 6.0 ThreadInfo
- private static final String[] threadInfoV6Attributes = {
+ private static final String[] V6_ATTRIBUTES = {
LOCK_INFO,
LOCKED_MONITORS,
LOCKED_SYNCS,
};
- private static final String[] threadInfoV9Attributes = {
+ private static final String[] V9_ATTRIBUTES = {
DAEMON,
PRIORITY,
};
- // Current version of ThreadInfo
- private static final CompositeType threadInfoCompositeType;
- // Previous version of ThreadInfo
- private static final CompositeType threadInfoV6CompositeType;
- // Previous-previous version of ThreadInfo
- private static final CompositeType threadInfoV5CompositeType;
- private static final CompositeType lockInfoCompositeType;
- static {
- try {
- threadInfoCompositeType = (CompositeType)
- MappedMXBeanType.toOpenType(ThreadInfo.class);
- // Form a CompositeType for JDK 5.0 ThreadInfo version
-
- threadInfoV5CompositeType =
- TypeVersionMapper.getInstance().getVersionedCompositeType(
- threadInfoCompositeType, TypeVersionMapper.V5
- );
-
- threadInfoV6CompositeType =
- TypeVersionMapper.getInstance().getVersionedCompositeType(
- threadInfoCompositeType, TypeVersionMapper.V6
- );
- } catch (OpenDataException e) {
- // Should never reach here
- throw new AssertionError(e);
- }
-
- // Each CompositeData object has its CompositeType associated
- // with it. So we can get the CompositeType representing LockInfo
- // from a mapped CompositeData for any LockInfo object.
- // Thus we construct a random LockInfo object and pass it
- // to LockInfoCompositeData to do the conversion.
- Object o = new Object();
- LockInfo li = new LockInfo(o.getClass().getName(),
- System.identityHashCode(o));
- CompositeData cd = LockInfoCompositeData.toCompositeData(li);
- lockInfoCompositeType = cd.getCompositeType();
- }
-
- static boolean isV5Attribute(String itemName) {
- for (String n : threadInfoV6Attributes) {
- if (itemName.equals(n)) {
- return false;
- }
- }
- for (String n : threadInfoV9Attributes) {
- if (itemName.equals(n)) {
- return false;
- }
- }
- return true;
- }
-
- static boolean isV6Attribute(String itemName) {
- for (String n : threadInfoV9Attributes) {
- if (itemName.equals(n)) {
- return false;
- }
- }
- return true;
- }
-
- public static boolean isCurrentVersion(CompositeData cd) {
- if (cd == null) {
- throw new NullPointerException("Null CompositeData");
- }
-
- return isTypeMatched(threadInfoCompositeType, cd.getCompositeType());
- }
-
- private static boolean hasV6(CompositeData cd) {
- if (cd == null) {
- throw new NullPointerException("Null CompositeData");
- }
-
- return isTypeMatched(threadInfoCompositeType, cd.getCompositeType()) ||
- isTypeMatched(threadInfoV6CompositeType, cd.getCompositeType());
- }
+ private static final String[] THREAD_INFO_ATTRIBTUES =
+ Stream.of(V5_ATTRIBUTES, V6_ATTRIBUTES, V9_ATTRIBUTES)
+ .flatMap(Arrays::stream).toArray(String[]::new);
public long threadId() {
return getLong(cdata, THREAD_ID);
@@ -333,12 +244,18 @@
return getBoolean(cdata, IN_NATIVE);
}
+ /*
+ * if daemon attribute is not present, default to false.
+ */
public boolean isDaemon() {
- return getBoolean(cdata, DAEMON);
+ return cdata.containsKey(DAEMON) ? getBoolean(cdata, DAEMON) : false;
}
+ /*
+ * if priority attribute is not present, default to norm priority.
+ */
public int getPriority(){
- return getInt(cdata, PRIORITY);
+ return cdata.containsKey(PRIORITY) ? getInt(cdata, PRIORITY) : Thread.NORM_PRIORITY;
}
public StackTraceElement[] stackTrace() {
@@ -356,13 +273,37 @@
return stackTrace;
}
- // 6.0 new attributes
+ /*
+ * lockInfo is a new attribute added in JDK 6 ThreadInfo
+ * If cd is a 5.0 version, construct the LockInfo object
+ * from the lockName value.
+ */
public LockInfo lockInfo() {
- CompositeData lockInfoData = (CompositeData) cdata.get(LOCK_INFO);
- return LockInfo.from(lockInfoData);
+ if (cdata.containsKey(LOCK_INFO)) {
+ CompositeData lockInfoData = (CompositeData) cdata.get(LOCK_INFO);
+ return LockInfo.from(lockInfoData);
+ } else {
+ String lockName = lockName();
+ LockInfo lock = null;
+ if (lockName != null) {
+ String result[] = lockName.split("@");
+ if (result.length == 2) {
+ int identityHashCode = Integer.parseInt(result[1], 16);
+ lock = new LockInfo(result[0], identityHashCode);
+ }
+ }
+ return lock;
+ }
}
+ /**
+ * Returns an empty array if locked_monitors attribute is not present.
+ */
public MonitorInfo[] lockedMonitors() {
+ if (!cdata.containsKey(LOCKED_MONITORS)) {
+ return new MonitorInfo[0];
+ }
+
CompositeData[] lockedMonitorsData =
(CompositeData[]) cdata.get(LOCKED_MONITORS);
@@ -377,7 +318,14 @@
return monitors;
}
+ /**
+ * Returns an empty array if locked_monitors attribute is not present.
+ */
public LockInfo[] lockedSynchronizers() {
+ if (!cdata.containsKey(LOCKED_SYNCS)) {
+ return new LockInfo[0];
+ }
+
CompositeData[] lockedSyncsData =
(CompositeData[]) cdata.get(LOCKED_SYNCS);
@@ -391,7 +339,8 @@
return locks;
}
- /** Validate if the input CompositeData has the expected
+ /**
+ * Validate if the input CompositeData has the expected
* CompositeType (i.e. contain all attributes with expected
* names and types).
*/
@@ -401,62 +350,98 @@
}
CompositeType type = cd.getCompositeType();
- boolean currentVersion = true;
- if (!isTypeMatched(threadInfoCompositeType, type)) {
- currentVersion = false;
- // check if cd is an older version
- if (!isTypeMatched(threadInfoV5CompositeType, type) &&
- !isTypeMatched(threadInfoV6CompositeType, type)) {
- throw new IllegalArgumentException(
- "Unexpected composite type for ThreadInfo");
+ int version;
+ if (Arrays.stream(V9_ATTRIBUTES).anyMatch(type::containsKey)) {
+ version = Runtime.version().feature();
+ } else if (Arrays.stream(V6_ATTRIBUTES).anyMatch(type::containsKey)) {
+ version = 6;
+ } else {
+ version = 5;
+ }
+
+ if (!isTypeMatched(ThreadInfoCompositeTypes.ofVersion(version), type)) {
+ throw new IllegalArgumentException(
+ "Unexpected composite type for ThreadInfo of version " + version);
+ }
+ }
+
+ public static CompositeType compositeType() {
+ return ThreadInfoCompositeTypes.compositeTypes.get(0);
+ }
+
+ static class ThreadInfoCompositeTypes {
+ static final int CURRENT = Runtime.version().feature();
+ static final Map<Integer, CompositeType> compositeTypes = initCompositeTypes();
+ /*
+ * Returns CompositeType of the given runtime version
+ */
+ static CompositeType ofVersion(int version) {
+ return compositeTypes.get(version);
+ }
+
+ static Map<Integer, CompositeType> initCompositeTypes() {
+ Map<Integer, CompositeType> types = new HashMap<>();
+ CompositeType ctype = initCompositeType();
+ types.put(CURRENT, ctype);
+ types.put(5, initV5CompositeType(ctype));
+ types.put(6, initV6CompositeType(ctype));
+ return types;
+ }
+
+ static CompositeType initCompositeType() {
+ try {
+ return (CompositeType)MappedMXBeanType.toOpenType(ThreadInfo.class);
+ } catch (OpenDataException e) {
+ // Should never reach here
+ throw new AssertionError(e);
}
}
- CompositeData[] stackTraceData =
- (CompositeData[]) cd.get(STACK_TRACE);
- if (stackTraceData == null) {
- throw new IllegalArgumentException(
- "StackTraceElement[] is missing");
- }
- if (stackTraceData.length > 0) {
- StackTraceElementCompositeData.validateCompositeData(stackTraceData[0]);
+ static CompositeType initV5CompositeType(CompositeType threadInfoCompositeType) {
+ try {
+ OpenType<?>[] v5Types = new OpenType<?>[V5_ATTRIBUTES.length];
+ for (int i = 0; i < v5Types.length; i++) {
+ String name = V5_ATTRIBUTES[i];
+ v5Types[i] = name.equals(STACK_TRACE)
+ ? new ArrayType<>(1, StackTraceElementCompositeData.v5CompositeType())
+ : threadInfoCompositeType.getType(name);
+ }
+ return new CompositeType("ThreadInfo",
+ "JDK 5 ThreadInfo",
+ V5_ATTRIBUTES,
+ V5_ATTRIBUTES,
+ v5Types);
+ } catch (OpenDataException e) {
+ // Should never reach here
+ throw new AssertionError(e);
+ }
}
- // validate v6 attributes
- if (currentVersion) {
- CompositeData li = (CompositeData) cd.get(LOCK_INFO);
- if (li != null) {
- if (!isTypeMatched(lockInfoCompositeType,
- li.getCompositeType())) {
- throw new IllegalArgumentException(
- "Unexpected composite type for \"" +
- LOCK_INFO + "\" attribute.");
+ static CompositeType initV6CompositeType(CompositeType threadInfoCompositeType) {
+ try {
+ String[] v6Names = Stream.of(V5_ATTRIBUTES, V6_ATTRIBUTES)
+ .flatMap(Arrays::stream).toArray(String[]::new);
+ OpenType<?>[] v6Types = new OpenType<?>[v6Names.length];
+ for (int i = 0; i < v6Names.length; i++) {
+ String name = v6Names[i];
+ OpenType<?> ot = threadInfoCompositeType.getType(name);
+ if (name.equals(STACK_TRACE)) {
+ ot = new ArrayType<>(1, StackTraceElementCompositeData.v5CompositeType());
+ } else if (name.equals(LOCKED_MONITORS)) {
+ ot = new ArrayType<>(1, MonitorInfoCompositeData.v6CompositeType());
+ }
+ v6Types[i] = ot;
}
- }
-
- CompositeData[] lms = (CompositeData[]) cd.get(LOCKED_MONITORS);
- if (lms == null) {
- throw new IllegalArgumentException("MonitorInfo[] is null");
+ return new CompositeType("ThreadInfo",
+ "JDK 6 ThreadInfo",
+ v6Names,
+ v6Names,
+ v6Types);
+ } catch (OpenDataException e) {
+ // Should never reach here
+ throw new AssertionError(e);
}
- if (lms.length > 0) {
- MonitorInfoCompositeData.validateCompositeData(lms[0]);
- }
-
- CompositeData[] lsyncs = (CompositeData[]) cd.get(LOCKED_SYNCS);
- if (lsyncs == null) {
- throw new IllegalArgumentException("LockInfo[] is null");
- }
- if (lsyncs.length > 0) {
- if (!isTypeMatched(lockInfoCompositeType,
- lsyncs[0].getCompositeType())) {
- throw new IllegalArgumentException(
- "Unexpected composite type for \"" +
- LOCKED_SYNCS + "\" attribute.");
- }
- }
-
}
}
-
private static final long serialVersionUID = 2464378539119753175L;
}
--- a/src/java.management/share/classes/sun/management/TypeVersionMapper.java Thu Mar 01 16:35:36 2018 -0500
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,174 +0,0 @@
-/*
- * Copyright (c) 2015, Oracle and/or its affiliates. All rights reserved.
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * This code is free software; you can redistribute it and/or modify it
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. 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 sun.management;
-
-import java.lang.management.ThreadInfo;
-import java.util.ArrayList;
-import java.util.HashMap;
-import java.util.List;
-import java.util.Map;
-import java.util.function.Predicate;
-import javax.management.openmbean.ArrayType;
-import javax.management.openmbean.CompositeType;
-import javax.management.openmbean.OpenDataException;
-import javax.management.openmbean.OpenType;
-import javax.management.openmbean.SimpleType;
-import javax.management.openmbean.TabularType;
-import static sun.management.Util.toStringArray;
-
-/**
- * Provides simplistic support for versioning of {@linkplain CompositeType} instances
- * based on the latest version and filtering out certain items.
- */
-final class TypeVersionMapper {
- private static final class Singleton {
- private final static TypeVersionMapper INSTANCE = new TypeVersionMapper();
- }
-
- final static String V5 = "J2SE 5.0";
- final static String V6 = "Java SE 6";
-
- private final Map<String, Map<String, Predicate<String>>> filterMap;
-
- private TypeVersionMapper() {
- filterMap = new HashMap<>();
- setupStackTraceElement();
- setupThreadInfo();
- }
-
- public static TypeVersionMapper getInstance() {
- return Singleton.INSTANCE;
- }
-
- private void setupStackTraceElement() {
- Map<String, Predicate<String>> filter = new HashMap<>();
- filterMap.put(StackTraceElement.class.getName(), filter);
- filter.put(V5, StackTraceElementCompositeData::isV6Attribute);
- filter.put(V6, StackTraceElementCompositeData::isV6Attribute);
- }
-
- private void setupThreadInfo() {
- Map<String, Predicate<String>> filter = new HashMap<>();
- filterMap.put(ThreadInfo.class.getName(), filter);
- filter.put(V5, ThreadInfoCompositeData::isV5Attribute);
- filter.put(V6, ThreadInfoCompositeData::isV6Attribute);
- }
-
- /**
- * Retrieves the specified version of a {@linkplain CompositeType} instance.
- * @param type The current (latest) version of {@linkplain CompositeType}
- * @param version The version identifier (eg. {@linkplain TypeVersionMapper#V5})
- * @return Returns the {@linkplain CompositeType} corresponding to the requested
- * version.
- * @throws OpenDataException
- */
- CompositeType getVersionedCompositeType(CompositeType type, String version)
- throws OpenDataException
- {
- Predicate<String> filter = getFilter(type.getTypeName(), version);
- if (filter == null) {
- return type;
- }
-
- List<String> itemNames = new ArrayList<>();
- List<String> itemDesc = new ArrayList<>();
- List<OpenType<?>> itemTypes = new ArrayList<>();
-
- for(String item : type.keySet()) {
- if (filter.test(item)) {
- itemNames.add(item);
- itemDesc.add(type.getDescription(item));
- itemTypes.add(getVersionedType(
- type.getType(item),
- version
- ));
- }
- }
- return new CompositeType(
- type.getTypeName(),
- version != null ? version + " " + type.getDescription() : type.getDescription(),
- itemNames.toArray(new String[itemNames.size()]),
- itemDesc.toArray(new String[itemDesc.size()]),
- itemTypes.toArray(new OpenType<?>[itemTypes.size()])
- );
- }
-
- private OpenType<?> getVersionedType(OpenType<?> type, String version)
- throws OpenDataException
- {
- if (type instanceof ArrayType) {
- return getVersionedArrayType((ArrayType)type, version);
- }
- if (type instanceof CompositeType) {
- return getVersionedCompositeType((CompositeType)type, version);
- }
- if (type instanceof TabularType) {
- return getVersionedTabularType((TabularType)type, version);
- }
- return type;
- }
-
- private ArrayType<?> getVersionedArrayType(ArrayType<?> type, String version)
- throws OpenDataException
- {
- if (type.isPrimitiveArray()) {
- return type;
- }
- OpenType<?> ot = getVersionedType(
- type.getElementOpenType(),
- version
- );
- if (ot instanceof SimpleType) {
- return new ArrayType<>((SimpleType<?>)ot, type.isPrimitiveArray());
- } else {
- return new ArrayType<>(type.getDimension(), ot);
- }
- }
-
- private TabularType getVersionedTabularType(TabularType type, String version)
- throws OpenDataException
- {
- CompositeType ct = getVersionedCompositeType(
- type.getRowType(),
- version
- );
-
- if (ct != null) {
- return new TabularType(
- type.getTypeName(), type.getDescription(), ct,
- toStringArray(type.getIndexNames()));
- }
- return null;
- }
-
- private Predicate<String> getFilter(String type, String version) {
- Map<String, Predicate<String>> versionMap = filterMap.get(type);
- if (versionMap == null) {
- return null;
- }
-
- return versionMap.get(version);
- }
-}
--- a/src/java.prefs/windows/classes/java/util/prefs/WindowsPreferences.java Thu Mar 01 16:35:36 2018 -0500
+++ b/src/java.prefs/windows/classes/java/util/prefs/WindowsPreferences.java Fri Mar 02 21:00:12 2018 +0100
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2000, 2015, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2000, 2018, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
@@ -172,22 +172,22 @@
/**
* Java wrapper for Windows registry API RegOpenKey()
*/
- private static native int[] WindowsRegOpenKey(int hKey, byte[] subKey,
- int securityMask);
+ private static native long[] WindowsRegOpenKey(long hKey, byte[] subKey,
+ int securityMask);
/**
* Retries RegOpenKey() MAX_ATTEMPTS times before giving up.
*/
- private static int[] WindowsRegOpenKey1(int hKey, byte[] subKey,
- int securityMask) {
- int[] result = WindowsRegOpenKey(hKey, subKey, securityMask);
+ private static long[] WindowsRegOpenKey1(long hKey, byte[] subKey,
+ int securityMask) {
+ long[] result = WindowsRegOpenKey(hKey, subKey, securityMask);
if (result[ERROR_CODE] == ERROR_SUCCESS) {
return result;
} else if (result[ERROR_CODE] == ERROR_FILE_NOT_FOUND) {
logger().warning("Trying to recreate Windows registry node " +
byteArrayToString(subKey) + " at root 0x" +
- Integer.toHexString(hKey) + ".");
+ Long.toHexString(hKey) + ".");
// Try recreation
- int handle = WindowsRegCreateKeyEx(hKey, subKey)[NATIVE_HANDLE];
+ long handle = WindowsRegCreateKeyEx(hKey, subKey)[NATIVE_HANDLE];
WindowsRegCloseKey(handle);
return WindowsRegOpenKey(hKey, subKey, securityMask);
} else if (result[ERROR_CODE] != ERROR_ACCESS_DENIED) {
@@ -211,18 +211,18 @@
/**
* Java wrapper for Windows registry API RegCloseKey()
*/
- private static native int WindowsRegCloseKey(int hKey);
+ private static native int WindowsRegCloseKey(long hKey);
/**
* Java wrapper for Windows registry API RegCreateKeyEx()
*/
- private static native int[] WindowsRegCreateKeyEx(int hKey, byte[] subKey);
+ private static native long[] WindowsRegCreateKeyEx(long hKey, byte[] subKey);
/**
* Retries RegCreateKeyEx() MAX_ATTEMPTS times before giving up.
*/
- private static int[] WindowsRegCreateKeyEx1(int hKey, byte[] subKey) {
- int[] result = WindowsRegCreateKeyEx(hKey, subKey);
+ private static long[] WindowsRegCreateKeyEx1(long hKey, byte[] subKey) {
+ long[] result = WindowsRegCreateKeyEx(hKey, subKey);
if (result[ERROR_CODE] == ERROR_SUCCESS) {
return result;
} else {
@@ -245,17 +245,17 @@
/**
* Java wrapper for Windows registry API RegDeleteKey()
*/
- private static native int WindowsRegDeleteKey(int hKey, byte[] subKey);
+ private static native int WindowsRegDeleteKey(long hKey, byte[] subKey);
/**
* Java wrapper for Windows registry API RegFlushKey()
*/
- private static native int WindowsRegFlushKey(int hKey);
+ private static native int WindowsRegFlushKey(long hKey);
/**
* Retries RegFlushKey() MAX_ATTEMPTS times before giving up.
*/
- private static int WindowsRegFlushKey1(int hKey) {
+ private static int WindowsRegFlushKey1(long hKey) {
int result = WindowsRegFlushKey(hKey);
if (result == ERROR_SUCCESS) {
return result;
@@ -280,17 +280,17 @@
/**
* Java wrapper for Windows registry API RegQueryValueEx()
*/
- private static native byte[] WindowsRegQueryValueEx(int hKey,
+ private static native byte[] WindowsRegQueryValueEx(long hKey,
byte[] valueName);
/**
* Java wrapper for Windows registry API RegSetValueEx()
*/
- private static native int WindowsRegSetValueEx(int hKey, byte[] valueName,
+ private static native int WindowsRegSetValueEx(long hKey, byte[] valueName,
byte[] value);
/**
* Retries RegSetValueEx() MAX_ATTEMPTS times before giving up.
*/
- private static int WindowsRegSetValueEx1(int hKey, byte[] valueName,
+ private static int WindowsRegSetValueEx1(long hKey, byte[] valueName,
byte[] value) {
int result = WindowsRegSetValueEx(hKey, valueName, value);
if (result == ERROR_SUCCESS) {
@@ -316,18 +316,18 @@
/**
* Java wrapper for Windows registry API RegDeleteValue()
*/
- private static native int WindowsRegDeleteValue(int hKey, byte[] valueName);
+ private static native int WindowsRegDeleteValue(long hKey, byte[] valueName);
/**
* Java wrapper for Windows registry API RegQueryInfoKey()
*/
- private static native int[] WindowsRegQueryInfoKey(int hKey);
+ private static native long[] WindowsRegQueryInfoKey(long hKey);
/**
* Retries RegQueryInfoKey() MAX_ATTEMPTS times before giving up.
*/
- private static int[] WindowsRegQueryInfoKey1(int hKey) {
- int[] result = WindowsRegQueryInfoKey(hKey);
+ private static long[] WindowsRegQueryInfoKey1(long hKey) {
+ long[] result = WindowsRegQueryInfoKey(hKey);
if (result[ERROR_CODE] == ERROR_SUCCESS) {
return result;
} else {
@@ -351,13 +351,13 @@
/**
* Java wrapper for Windows registry API RegEnumKeyEx()
*/
- private static native byte[] WindowsRegEnumKeyEx(int hKey, int subKeyIndex,
+ private static native byte[] WindowsRegEnumKeyEx(long hKey, int subKeyIndex,
int maxKeyLength);
/**
* Retries RegEnumKeyEx() MAX_ATTEMPTS times before giving up.
*/
- private static byte[] WindowsRegEnumKeyEx1(int hKey, int subKeyIndex,
+ private static byte[] WindowsRegEnumKeyEx1(long hKey, int subKeyIndex,
int maxKeyLength) {
byte[] result = WindowsRegEnumKeyEx(hKey, subKeyIndex, maxKeyLength);
if (result != null) {
@@ -383,12 +383,12 @@
/**
* Java wrapper for Windows registry API RegEnumValue()
*/
- private static native byte[] WindowsRegEnumValue(int hKey, int valueIndex,
+ private static native byte[] WindowsRegEnumValue(long hKey, int valueIndex,
int maxValueNameLength);
/**
* Retries RegEnumValueEx() MAX_ATTEMPTS times before giving up.
*/
- private static byte[] WindowsRegEnumValue1(int hKey, int valueIndex,
+ private static byte[] WindowsRegEnumValue1(long hKey, int valueIndex,
int maxValueNameLength) {
byte[] result = WindowsRegEnumValue(hKey, valueIndex,
maxValueNameLength);
@@ -421,18 +421,18 @@
*/
private WindowsPreferences(WindowsPreferences parent, String name) {
super(parent, name);
- int parentNativeHandle = parent.openKey(KEY_CREATE_SUB_KEY, KEY_READ);
+ long parentNativeHandle = parent.openKey(KEY_CREATE_SUB_KEY, KEY_READ);
if (parentNativeHandle == NULL_NATIVE_HANDLE) {
// if here, openKey failed and logged
isBackingStoreAvailable = false;
return;
}
- int[] result =
+ long[] result =
WindowsRegCreateKeyEx1(parentNativeHandle, toWindowsName(name));
if (result[ERROR_CODE] != ERROR_SUCCESS) {
logger().warning("Could not create windows registry node " +
byteArrayToString(windowsAbsolutePath()) +
- " at root 0x" + Integer.toHexString(rootNativeHandle()) +
+ " at root 0x" + Long.toHexString(rootNativeHandle()) +
". Windows RegCreateKeyEx(...) returned error code " +
result[ERROR_CODE] + ".");
isBackingStoreAvailable = false;
@@ -451,14 +451,14 @@
* @param rootNativeHandle Native handle to one of Windows top level keys.
* @param rootDirectory Path to root directory, as a byte-encoded string.
*/
- private WindowsPreferences(int rootNativeHandle, byte[] rootDirectory) {
+ private WindowsPreferences(long rootNativeHandle, byte[] rootDirectory) {
super(null, "");
- int[] result =
+ long[] result =
WindowsRegCreateKeyEx1(rootNativeHandle, rootDirectory);
if (result[ERROR_CODE] != ERROR_SUCCESS) {
logger().warning("Could not open/create prefs root node " +
byteArrayToString(windowsAbsolutePath()) +
- " at root 0x" + Integer.toHexString(rootNativeHandle()) +
+ " at root 0x" + Long.toHexString(rootNativeHandle()) +
". Windows RegCreateKeyEx(...) returned error code " +
result[ERROR_CODE] + ".");
isBackingStoreAvailable = false;
@@ -497,7 +497,7 @@
* @see #openKey(int, byte[], int)
* @see #closeKey(int)
*/
- private int openKey(int securityMask) {
+ private long openKey(int securityMask) {
return openKey(securityMask, securityMask);
}
@@ -511,7 +511,7 @@
* @see #openKey(int, byte[], int)
* @see #closeKey(int)
*/
- private int openKey(int mask1, int mask2) {
+ private long openKey(int mask1, int mask2) {
return openKey(windowsAbsolutePath(), mask1, mask2);
}
@@ -527,12 +527,12 @@
* @see #openKey(int, byte[],int)
* @see #closeKey(int)
*/
- private int openKey(byte[] windowsAbsolutePath, int mask1, int mask2) {
+ private long openKey(byte[] windowsAbsolutePath, int mask1, int mask2) {
/* Check if key's path is short enough be opened at once
otherwise use a path-splitting procedure */
if (windowsAbsolutePath.length <= MAX_WINDOWS_PATH_LENGTH + 1) {
- int[] result = WindowsRegOpenKey1(rootNativeHandle(),
- windowsAbsolutePath, mask1);
+ long[] result = WindowsRegOpenKey1(rootNativeHandle(),
+ windowsAbsolutePath, mask1);
if (result[ERROR_CODE] == ERROR_ACCESS_DENIED && mask2 != mask1)
result = WindowsRegOpenKey1(rootNativeHandle(),
windowsAbsolutePath, mask2);
@@ -541,7 +541,7 @@
logger().warning("Could not open windows registry node " +
byteArrayToString(windowsAbsolutePath()) +
" at root 0x" +
- Integer.toHexString(rootNativeHandle()) +
+ Long.toHexString(rootNativeHandle()) +
". Windows RegOpenKey(...) returned error code " +
result[ERROR_CODE] + ".");
result[NATIVE_HANDLE] = NULL_NATIVE_HANDLE;
@@ -550,7 +550,7 @@
"Could not open windows registry node " +
byteArrayToString(windowsAbsolutePath()) +
" at root 0x" +
- Integer.toHexString(rootNativeHandle()) +
+ Long.toHexString(rootNativeHandle()) +
": Access denied");
}
}
@@ -573,12 +573,12 @@
* @see #openKey(byte[],int)
* @see #closeKey(int)
*/
- private int openKey(int nativeHandle, byte[] windowsRelativePath,
- int mask1, int mask2) {
+ private long openKey(long nativeHandle, byte[] windowsRelativePath,
+ int mask1, int mask2) {
/* If the path is short enough open at once. Otherwise split the path */
if (windowsRelativePath.length <= MAX_WINDOWS_PATH_LENGTH + 1 ) {
- int[] result = WindowsRegOpenKey1(nativeHandle,
- windowsRelativePath, mask1);
+ long[] result = WindowsRegOpenKey1(nativeHandle,
+ windowsRelativePath, mask1);
if (result[ERROR_CODE] == ERROR_ACCESS_DENIED && mask2 != mask1)
result = WindowsRegOpenKey1(nativeHandle,
windowsRelativePath, mask2);
@@ -586,7 +586,7 @@
if (result[ERROR_CODE] != ERROR_SUCCESS) {
logger().warning("Could not open windows registry node " +
byteArrayToString(windowsAbsolutePath()) +
- " at root 0x" + Integer.toHexString(nativeHandle) +
+ " at root 0x" + Long.toHexString(nativeHandle) +
". Windows RegOpenKey(...) returned error code " +
result[ERROR_CODE] + ".");
result[NATIVE_HANDLE] = NULL_NATIVE_HANDLE;
@@ -610,13 +610,13 @@
separatorPosition - 1];
System.arraycopy(windowsRelativePath, separatorPosition+1,
nextRelativePath, 0, nextRelativePath.length);
- int nextNativeHandle = openKey(nativeHandle, nextRelativeRoot,
+ long nextNativeHandle = openKey(nativeHandle, nextRelativeRoot,
mask1, mask2);
if (nextNativeHandle == NULL_NATIVE_HANDLE) {
return NULL_NATIVE_HANDLE;
}
- int result = openKey(nextNativeHandle, nextRelativePath,
- mask1,mask2);
+ long result = openKey(nextNativeHandle, nextRelativePath,
+ mask1,mask2);
closeKey(nextNativeHandle);
return result;
}
@@ -630,13 +630,13 @@
* @see #openKey(byte[],int)
* @see #openKey(int, byte[],int)
*/
- private void closeKey(int nativeHandle) {
+ private void closeKey(long nativeHandle) {
int result = WindowsRegCloseKey(nativeHandle);
if (result != ERROR_SUCCESS) {
logger().warning("Could not close windows registry node " +
byteArrayToString(windowsAbsolutePath()) +
" at root 0x" +
- Integer.toHexString(rootNativeHandle()) +
+ Long.toHexString(rootNativeHandle()) +
". Windows RegCloseKey(...) returned error code " +
result + ".");
}
@@ -649,7 +649,7 @@
* @see #getSpi(String)
*/
protected void putSpi(String javaName, String value) {
- int nativeHandle = openKey(KEY_SET_VALUE);
+ long nativeHandle = openKey(KEY_SET_VALUE);
if (nativeHandle == NULL_NATIVE_HANDLE) {
isBackingStoreAvailable = false;
return;
@@ -662,7 +662,7 @@
" at Windows registry node " +
byteArrayToString(windowsAbsolutePath()) +
" at root 0x" +
- Integer.toHexString(rootNativeHandle()) +
+ Long.toHexString(rootNativeHandle()) +
". Windows RegSetValueEx(...) returned error code " +
result + ".");
isBackingStoreAvailable = false;
@@ -677,7 +677,7 @@
* @see #putSpi(String, String)
*/
protected String getSpi(String javaName) {
- int nativeHandle = openKey(KEY_QUERY_VALUE);
+ long nativeHandle = openKey(KEY_QUERY_VALUE);
if (nativeHandle == NULL_NATIVE_HANDLE) {
return null;
}
@@ -699,7 +699,7 @@
* been deleted.
*/
protected void removeSpi(String key) {
- int nativeHandle = openKey(KEY_SET_VALUE);
+ long nativeHandle = openKey(KEY_SET_VALUE);
if (nativeHandle == NULL_NATIVE_HANDLE) {
return;
}
@@ -709,7 +709,7 @@
logger().warning("Could not delete windows registry value " +
byteArrayToString(windowsAbsolutePath()) + "\\" +
toWindowsName(key) + " at root 0x" +
- Integer.toHexString(rootNativeHandle()) +
+ Long.toHexString(rootNativeHandle()) +
". Windows RegDeleteValue(...) returned error code " +
result + ".");
isBackingStoreAvailable = false;
@@ -725,27 +725,27 @@
*/
protected String[] keysSpi() throws BackingStoreException{
// Find out the number of values
- int nativeHandle = openKey(KEY_QUERY_VALUE);
+ long nativeHandle = openKey(KEY_QUERY_VALUE);
if (nativeHandle == NULL_NATIVE_HANDLE) {
throw new BackingStoreException(
"Could not open windows registry node " +
byteArrayToString(windowsAbsolutePath()) +
" at root 0x" +
- Integer.toHexString(rootNativeHandle()) + ".");
+ Long.toHexString(rootNativeHandle()) + ".");
}
- int[] result = WindowsRegQueryInfoKey1(nativeHandle);
+ long[] result = WindowsRegQueryInfoKey1(nativeHandle);
if (result[ERROR_CODE] != ERROR_SUCCESS) {
String info = "Could not query windows registry node " +
byteArrayToString(windowsAbsolutePath()) +
" at root 0x" +
- Integer.toHexString(rootNativeHandle()) +
+ Long.toHexString(rootNativeHandle()) +
". Windows RegQueryInfoKeyEx(...) returned error code " +
result[ERROR_CODE] + ".";
logger().warning(info);
throw new BackingStoreException(info);
}
- int maxValueNameLength = result[MAX_VALUE_NAME_LENGTH];
- int valuesNumber = result[VALUES_NUMBER];
+ int maxValueNameLength = (int)result[MAX_VALUE_NAME_LENGTH];
+ int valuesNumber = (int)result[VALUES_NUMBER];
if (valuesNumber == 0) {
closeKey(nativeHandle);
return new String[0];
@@ -759,7 +759,7 @@
String info =
"Could not enumerate value #" + i + " of windows node " +
byteArrayToString(windowsAbsolutePath()) + " at root 0x" +
- Integer.toHexString(rootNativeHandle()) + ".";
+ Long.toHexString(rootNativeHandle()) + ".";
logger().warning(info);
throw new BackingStoreException(info);
}
@@ -777,27 +777,27 @@
*/
protected String[] childrenNamesSpi() throws BackingStoreException {
// Open key
- int nativeHandle = openKey(KEY_ENUMERATE_SUB_KEYS | KEY_QUERY_VALUE);
+ long nativeHandle = openKey(KEY_ENUMERATE_SUB_KEYS | KEY_QUERY_VALUE);
if (nativeHandle == NULL_NATIVE_HANDLE) {
throw new BackingStoreException(
"Could not open windows registry node " +
byteArrayToString(windowsAbsolutePath()) +
" at root 0x" +
- Integer.toHexString(rootNativeHandle()) + ".");
+ Long.toHexString(rootNativeHandle()) + ".");
}
// Get number of children
- int[] result = WindowsRegQueryInfoKey1(nativeHandle);
+ long[] result = WindowsRegQueryInfoKey1(nativeHandle);
if (result[ERROR_CODE] != ERROR_SUCCESS) {
String info = "Could not query windows registry node " +
byteArrayToString(windowsAbsolutePath()) +
- " at root 0x" + Integer.toHexString(rootNativeHandle()) +
+ " at root 0x" + Long.toHexString(rootNativeHandle()) +
". Windows RegQueryInfoKeyEx(...) returned error code " +
result[ERROR_CODE] + ".";
logger().warning(info);
throw new BackingStoreException(info);
}
- int maxKeyLength = result[MAX_KEY_LENGTH];
- int subKeysNumber = result[SUBKEYS_NUMBER];
+ int maxKeyLength = (int)result[MAX_KEY_LENGTH];
+ int subKeysNumber = (int)result[SUBKEYS_NUMBER];
if (subKeysNumber == 0) {
closeKey(nativeHandle);
return new String[0];
@@ -812,7 +812,7 @@
String info =
"Could not enumerate key #" + i + " of windows node " +
byteArrayToString(windowsAbsolutePath()) + " at root 0x" +
- Integer.toHexString(rootNativeHandle()) + ". ";
+ Long.toHexString(rootNativeHandle()) + ". ";
logger().warning(info);
throw new BackingStoreException(info);
}
@@ -839,20 +839,20 @@
throw new BackingStoreException(
"flush(): Backing store not available.");
}
- int nativeHandle = openKey(KEY_READ);
+ long nativeHandle = openKey(KEY_READ);
if (nativeHandle == NULL_NATIVE_HANDLE) {
throw new BackingStoreException(
"Could not open windows registry node " +
byteArrayToString(windowsAbsolutePath()) +
" at root 0x" +
- Integer.toHexString(rootNativeHandle()) + ".");
+ Long.toHexString(rootNativeHandle()) + ".");
}
int result = WindowsRegFlushKey1(nativeHandle);
if (result != ERROR_SUCCESS) {
String info = "Could not flush windows registry node " +
byteArrayToString(windowsAbsolutePath()) +
" at root 0x" +
- Integer.toHexString(rootNativeHandle()) +
+ Long.toHexString(rootNativeHandle()) +
". Windows RegFlushKey(...) returned error code " +
result + ".";
logger().warning(info);
@@ -891,21 +891,21 @@
* is not available.
*/
public void removeNodeSpi() throws BackingStoreException {
- int parentNativeHandle =
+ long parentNativeHandle =
((WindowsPreferences)parent()).openKey(DELETE);
if (parentNativeHandle == NULL_NATIVE_HANDLE) {
throw new BackingStoreException(
"Could not open parent windows registry node of " +
byteArrayToString(windowsAbsolutePath()) +
" at root 0x" +
- Integer.toHexString(rootNativeHandle()) + ".");
+ Long.toHexString(rootNativeHandle()) + ".");
}
int result =
WindowsRegDeleteKey(parentNativeHandle, toWindowsName(name()));
if (result != ERROR_SUCCESS) {
String info = "Could not delete windows registry node " +
byteArrayToString(windowsAbsolutePath()) +
- " at root 0x" + Integer.toHexString(rootNativeHandle()) +
+ " at root 0x" + Long.toHexString(rootNativeHandle()) +
". Windows RegDeleteKeyEx(...) returned error code " +
result + ".";
logger().warning(info);
@@ -1089,7 +1089,7 @@
if ((ch < 0x0020) || (ch > 0x007f)){
// write \udddd
windowsName.append("/u");
- String hex = Integer.toHexString(javaName.charAt(i));
+ String hex = Long.toHexString(javaName.charAt(i));
StringBuilder hex4 = new StringBuilder(hex);
hex4.reverse();
int len = 4 - hex4.length();
@@ -1115,7 +1115,7 @@
/**
* Returns native handle for the top Windows node for this node.
*/
- private int rootNativeHandle() {
+ private long rootNativeHandle() {
return (isUserNode()
? USER_ROOT_NATIVE_HANDLE
: SYSTEM_ROOT_NATIVE_HANDLE);
--- a/src/java.prefs/windows/native/libprefs/WindowsPreferences.c Thu Mar 01 16:35:36 2018 -0500
+++ b/src/java.prefs/windows/native/libprefs/WindowsPreferences.c Fri Mar 02 21:00:12 2018 +0100
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2000, 2015, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2000, 2018, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
@@ -37,222 +37,222 @@
*/
DEF_STATIC_JNI_OnLoad
- JNIEXPORT jintArray JNICALL Java_java_util_prefs_WindowsPreferences_WindowsRegOpenKey
- (JNIEnv* env, jclass this_class, jint hKey, jbyteArray lpSubKey, jint securityMask) {
- HKEY handle;
- char* str;
- int tmp[2];
- int errorCode=-1;
- jintArray result;
- str = (*env)->GetByteArrayElements(env, lpSubKey, NULL);
- CHECK_NULL_RETURN(str, NULL);
- errorCode = RegOpenKeyEx((HKEY)hKey, str, 0, securityMask, &handle);
- (*env)->ReleaseByteArrayElements(env, lpSubKey, str, 0);
- tmp[0]= (int) handle;
- tmp[1]= errorCode;
- result = (*env)->NewIntArray(env,2);
- if (result != NULL) {
- (*env)->SetIntArrayRegion(env, result, 0, 2, tmp);
- }
- return result;
+JNIEXPORT jlongArray JNICALL
+Java_java_util_prefs_WindowsPreferences_WindowsRegOpenKey(JNIEnv* env,
+ jclass this_class, jlong hKey, jbyteArray lpSubKey, jint securityMask) {
+ char* str = (*env)->GetByteArrayElements(env, lpSubKey, NULL);
+ CHECK_NULL_RETURN(str, NULL);
+
+ HKEY handle;
+ int errorCode = RegOpenKeyEx((HKEY) hKey, str, 0, securityMask, &handle);
+ (*env)->ReleaseByteArrayElements(env, lpSubKey, str, 0);
+
+ jlong tmp[2];
+ tmp[0] = (jlong) handle;
+ tmp[1] = errorCode;
+ jlongArray result = (*env)->NewLongArray(env, 2);
+ if (result != NULL) {
+ (*env)->SetLongArrayRegion(env, result, 0, 2, tmp);
+ }
+ return result;
+}
+
+JNIEXPORT jint JNICALL
+Java_java_util_prefs_WindowsPreferences_WindowsRegCloseKey(JNIEnv* env,
+ jclass this_class, jlong hKey) {
+ return (jint) RegCloseKey((HKEY) hKey);
+};
+
+JNIEXPORT jlongArray JNICALL
+Java_java_util_prefs_WindowsPreferences_WindowsRegCreateKeyEx(JNIEnv* env,
+ jclass this_class, jlong hKey, jbyteArray lpSubKey) {
+ char* str = (*env)->GetByteArrayElements(env, lpSubKey, NULL);
+ CHECK_NULL_RETURN(str, NULL);
+
+ HKEY handle;
+ DWORD lpdwDisposition;
+ int errorCode = RegCreateKeyEx((HKEY) hKey, str, 0, NULL,
+ REG_OPTION_NON_VOLATILE, KEY_READ,
+ NULL, &handle, &lpdwDisposition);
+ (*env)->ReleaseByteArrayElements(env, lpSubKey, str, 0);
+
+ jlong tmp[3];
+ tmp[0] = (jlong) handle;
+ tmp[1] = errorCode;
+ tmp[2] = lpdwDisposition;
+ jlongArray result = (*env)->NewLongArray(env, 3);
+ if (result != NULL) {
+ (*env)->SetLongArrayRegion(env, result, 0, 3, tmp);
+ }
+ return result;
+}
+
+JNIEXPORT jint JNICALL
+Java_java_util_prefs_WindowsPreferences_WindowsRegDeleteKey(JNIEnv* env,
+ jclass this_class, jlong hKey, jbyteArray lpSubKey) {
+ char* str = (*env)->GetByteArrayElements(env, lpSubKey, NULL);
+ CHECK_NULL_RETURN(str, -1);
+
+ int result = RegDeleteKey((HKEY) hKey, str);
+ (*env)->ReleaseByteArrayElements(env, lpSubKey, str, 0);
+ return result;
+
+};
+
+JNIEXPORT jint JNICALL
+Java_java_util_prefs_WindowsPreferences_WindowsRegFlushKey(JNIEnv* env,
+ jclass this_class, jlong hKey) {
+ return RegFlushKey((HKEY) hKey);
+}
+
+JNIEXPORT jbyteArray JNICALL
+Java_java_util_prefs_WindowsPreferences_WindowsRegQueryValueEx(JNIEnv* env,
+ jclass this_class, jlong hKey, jbyteArray valueName) {
+ char* valueNameStr = (*env)->GetByteArrayElements(env, valueName, NULL);
+ CHECK_NULL_RETURN(valueNameStr, NULL);
+
+ DWORD valueType;
+ DWORD valueSize;
+ if (RegQueryValueEx((HKEY) hKey, valueNameStr, NULL, &valueType, NULL,
+ &valueSize) != ERROR_SUCCESS) {
+ (*env)->ReleaseByteArrayElements(env, valueName, valueNameStr, 0);
+ return NULL;
}
- JNIEXPORT jint JNICALL Java_java_util_prefs_WindowsPreferences_WindowsRegCloseKey
- (JNIEnv* env, jclass this_class, jint hKey) {
- return (jint) RegCloseKey((HKEY) hKey);
- };
-
- JNIEXPORT jintArray JNICALL Java_java_util_prefs_WindowsPreferences_WindowsRegCreateKeyEx
- (JNIEnv* env, jclass this_class, jint hKey, jbyteArray lpSubKey) {
- HKEY handle;
- char* str;
- int tmp[3];
- DWORD lpdwDisposition;
- int errorCode;
- jintArray result = NULL;
- str = (*env)->GetByteArrayElements(env, lpSubKey, NULL);
- CHECK_NULL_RETURN(str, NULL);
- errorCode = RegCreateKeyEx((HKEY)hKey, str, 0, NULL,
- REG_OPTION_NON_VOLATILE, KEY_READ,
- NULL, &handle, &lpdwDisposition);
- (*env)->ReleaseByteArrayElements(env, lpSubKey, str, 0);
- tmp[0]= (int) handle;
- tmp[1]= errorCode;
- tmp[2]= lpdwDisposition;
- result = (*env)->NewIntArray(env,3);
- if (result != NULL) {
- (*env)->SetIntArrayRegion(env, result, 0, 3, tmp);
- }
- return result;
- }
-
- JNIEXPORT jint JNICALL Java_java_util_prefs_WindowsPreferences_WindowsRegDeleteKey
- (JNIEnv* env, jclass this_class, jint hKey, jbyteArray lpSubKey) {
- char* str;
- int result;
- str = (*env)->GetByteArrayElements(env, lpSubKey, NULL);
- CHECK_NULL_RETURN(str, -1);
- result = RegDeleteKey((HKEY)hKey, str);
- (*env)->ReleaseByteArrayElements(env, lpSubKey, str, 0);
- return result;
-
- };
-
- JNIEXPORT jint JNICALL Java_java_util_prefs_WindowsPreferences_WindowsRegFlushKey
- (JNIEnv* env, jclass this_class, jint hKey) {
- return RegFlushKey ((HKEY)hKey);
- }
-
- JNIEXPORT jbyteArray JNICALL Java_java_util_prefs_WindowsPreferences_WindowsRegQueryValueEx
- (JNIEnv* env, jclass this_class, jint hKey, jbyteArray valueName) {
- char* valueNameStr;
- char* buffer;
- jbyteArray result;
- DWORD valueType;
- DWORD valueSize;
- valueNameStr = (*env)->GetByteArrayElements(env, valueName, NULL);
- CHECK_NULL_RETURN(valueNameStr, NULL);
- if (RegQueryValueEx((HKEY)hKey, valueNameStr, NULL, &valueType, NULL,
- &valueSize) != ERROR_SUCCESS) {
- (*env)->ReleaseByteArrayElements(env, valueName, valueNameStr, 0);
- return NULL;
- }
-
- buffer = (char*)malloc(valueSize);
- if (buffer != NULL) {
- if (RegQueryValueEx((HKEY)hKey, valueNameStr, NULL, &valueType, buffer,
- &valueSize) != ERROR_SUCCESS) {
- free(buffer);
- (*env)->ReleaseByteArrayElements(env, valueName, valueNameStr, 0);
- return NULL;
- }
- } else {
- JNU_ThrowOutOfMemoryError(env, "native memory allocation failed");
+ char* buffer = (char*) malloc(valueSize);
+ if (buffer != NULL) {
+ if (RegQueryValueEx((HKEY) hKey, valueNameStr, NULL, &valueType, buffer,
+ &valueSize) != ERROR_SUCCESS) {
+ free(buffer);
(*env)->ReleaseByteArrayElements(env, valueName, valueNameStr, 0);
return NULL;
}
-
- if (valueType == REG_SZ) {
- result = (*env)->NewByteArray(env, valueSize);
- if (result != NULL) {
- (*env)->SetByteArrayRegion(env, result, 0, valueSize, buffer);
- }
- } else {
- result = NULL;
- }
- free(buffer);
+ } else {
+ JNU_ThrowOutOfMemoryError(env, "native memory allocation failed");
(*env)->ReleaseByteArrayElements(env, valueName, valueNameStr, 0);
- return result;
- }
-
-
-
-
- JNIEXPORT jint JNICALL Java_java_util_prefs_WindowsPreferences_WindowsRegSetValueEx
- (JNIEnv* env, jclass this_class, jint hKey, jbyteArray valueName, jbyteArray data) {
- char* valueNameStr;
- char* dataStr;
- int size = -1;
- int nameSize = -1;
- int error_code = -1;
- if ((valueName == NULL)||(data == NULL)) {return -1;}
- size = (*env)->GetArrayLength(env, data);
- dataStr = (*env)->GetByteArrayElements(env, data, NULL);
- CHECK_NULL_RETURN(dataStr, -1);
- valueNameStr = (*env)->GetByteArrayElements(env, valueName, NULL);
- if (valueNameStr != NULL) {
- error_code = RegSetValueEx((HKEY)hKey, valueNameStr, 0,
- REG_SZ, dataStr, size);
- (*env)->ReleaseByteArrayElements(env, valueName, valueNameStr, 0);
- }
- (*env)->ReleaseByteArrayElements(env, data, dataStr, 0);
- return error_code;
+ return NULL;
}
- JNIEXPORT jint JNICALL Java_java_util_prefs_WindowsPreferences_WindowsRegDeleteValue
- (JNIEnv* env, jclass this_class, jint hKey, jbyteArray valueName) {
- char* valueNameStr;
- int error_code = -1;
- if (valueName == NULL) {return -1;}
- valueNameStr = (*env)->GetByteArrayElements(env, valueName, NULL);
- CHECK_NULL_RETURN(valueNameStr, -1);
- error_code = RegDeleteValue((HKEY)hKey, valueNameStr);
+ jbyteArray result;
+ if (valueType == REG_SZ) {
+ result = (*env)->NewByteArray(env, valueSize);
+ if (result != NULL) {
+ (*env)->SetByteArrayRegion(env, result, 0, valueSize, buffer);
+ }
+ } else {
+ result = NULL;
+ }
+ free(buffer);
+ (*env)->ReleaseByteArrayElements(env, valueName, valueNameStr, 0);
+ return result;
+}
+
+JNIEXPORT jint JNICALL
+Java_java_util_prefs_WindowsPreferences_WindowsRegSetValueEx(JNIEnv* env,
+ jclass this_class, jlong hKey, jbyteArray valueName, jbyteArray data) {
+ if ((valueName == NULL) || (data == NULL)) {
+ return -1;
+ }
+ int size = (*env)->GetArrayLength(env, data);
+ char* dataStr = (*env)->GetByteArrayElements(env, data, NULL);
+ CHECK_NULL_RETURN(dataStr, -1);
+
+ char* valueNameStr = (*env)->GetByteArrayElements(env, valueName, NULL);
+ int error_code = -1;
+ if (valueNameStr != NULL) {
+ error_code = RegSetValueEx((HKEY) hKey, valueNameStr, 0,
+ REG_SZ, dataStr, size);
(*env)->ReleaseByteArrayElements(env, valueName, valueNameStr, 0);
- return error_code;
- }
+ }
+ (*env)->ReleaseByteArrayElements(env, data, dataStr, 0);
+ return error_code;
+}
+
+JNIEXPORT jint JNICALL
+Java_java_util_prefs_WindowsPreferences_WindowsRegDeleteValue(JNIEnv* env,
+ jclass this_class, jlong hKey, jbyteArray valueName) {
+ if (valueName == NULL) {
+ return -1;
+ }
+ char* valueNameStr = (*env)->GetByteArrayElements(env, valueName, NULL);
+ CHECK_NULL_RETURN(valueNameStr, -1);
- JNIEXPORT jintArray JNICALL Java_java_util_prefs_WindowsPreferences_WindowsRegQueryInfoKey
- (JNIEnv* env, jclass this_class, jint hKey) {
- jintArray result = NULL;
- int tmp[5];
- int valuesNumber = -1;
- int maxValueNameLength = -1;
- int maxSubKeyLength = -1;
- int subKeysNumber = -1;
- int errorCode = -1;
- errorCode = RegQueryInfoKey((HKEY)hKey, NULL, NULL, NULL,
- &subKeysNumber, &maxSubKeyLength, NULL,
- &valuesNumber, &maxValueNameLength,
- NULL, NULL, NULL);
- tmp[0]= subKeysNumber;
- tmp[1]= (int)errorCode;
- tmp[2]= valuesNumber;
- tmp[3]= maxSubKeyLength;
- tmp[4]= maxValueNameLength;
- result = (*env)->NewIntArray(env,5);
- if (result != NULL) {
- (*env)->SetIntArrayRegion(env, result, 0, 5, tmp);
- }
- return result;
+ int error_code = RegDeleteValue((HKEY) hKey, valueNameStr);
+ (*env)->ReleaseByteArrayElements(env, valueName, valueNameStr, 0);
+ return error_code;
+}
+
+JNIEXPORT jlongArray JNICALL
+Java_java_util_prefs_WindowsPreferences_WindowsRegQueryInfoKey(JNIEnv* env,
+ jclass this_class, jlong hKey) {
+ int subKeysNumber;
+ int maxSubKeyLength;
+ int valuesNumber;
+ int maxValueNameLength;
+ int errorCode = RegQueryInfoKey((HKEY) hKey, NULL, NULL, NULL,
+ &subKeysNumber, &maxSubKeyLength, NULL,
+ &valuesNumber, &maxValueNameLength,
+ NULL, NULL, NULL);
+
+ jlong tmp[5];
+ tmp[0] = subKeysNumber;
+ tmp[1] = errorCode;
+ tmp[2] = valuesNumber;
+ tmp[3] = maxSubKeyLength;
+ tmp[4] = maxValueNameLength;
+ jintArray result = (*env)->NewLongArray(env, 5);
+ if (result != NULL) {
+ (*env)->SetLongArrayRegion(env, result, 0, 5, tmp);
+ }
+ return result;
+}
+
+JNIEXPORT jbyteArray JNICALL
+Java_java_util_prefs_WindowsPreferences_WindowsRegEnumKeyEx(JNIEnv* env,
+ jclass this_class, jlong hKey, jint subKeyIndex, jint maxKeyLength) {
+ int size = maxKeyLength;
+ char* buffer = (char*) malloc(maxKeyLength);
+ if (buffer == NULL) {
+ JNU_ThrowOutOfMemoryError(env, "native memory allocation failed");
+ return NULL;
+ }
+ if (RegEnumKeyEx((HKEY) hKey, subKeyIndex, buffer, &size, NULL, NULL,
+ NULL, NULL) != ERROR_SUCCESS) {
+ free(buffer);
+ return NULL;
}
- JNIEXPORT jbyteArray JNICALL Java_java_util_prefs_WindowsPreferences_WindowsRegEnumKeyEx
- (JNIEnv* env, jclass this_class, jint hKey , jint subKeyIndex, jint maxKeyLength) {
- int size = maxKeyLength;
- jbyteArray result;
- char* buffer = NULL;
- buffer = (char*)malloc(maxKeyLength);
- if (buffer == NULL) {
- JNU_ThrowOutOfMemoryError(env, "native memory allocation failed");
- return NULL;
- }
- if (RegEnumKeyEx((HKEY) hKey, subKeyIndex, buffer, &size, NULL, NULL,
- NULL, NULL) != ERROR_SUCCESS){
+ jbyteArray result = (*env)->NewByteArray(env, size + 1);
+ if (result != NULL) {
+ (*env)->SetByteArrayRegion(env, result, 0, size + 1, buffer);
+ }
+ free(buffer);
+ return result;
+}
+
+JNIEXPORT jbyteArray JNICALL
+Java_java_util_prefs_WindowsPreferences_WindowsRegEnumValue(JNIEnv* env,
+ jclass this_class, jlong hKey, jint valueIndex, jint maxValueNameLength) {
+ int size = maxValueNameLength;
+ char* buffer = (char*) malloc(maxValueNameLength);
+ if (buffer == NULL) {
+ JNU_ThrowOutOfMemoryError(env, "native memory allocation failed");
+ return NULL;
+ }
+
+ int error_code = RegEnumValue((HKEY) hKey, valueIndex, buffer,
+ &size, NULL, NULL, NULL, NULL);
+ if (error_code != ERROR_SUCCESS) {
free(buffer);
return NULL;
- }
- result = (*env)->NewByteArray(env, size + 1);
- if (result != NULL) {
- (*env)->SetByteArrayRegion(env, result, 0, size + 1, buffer);
- }
- free(buffer);
- return result;
- }
-
- JNIEXPORT jbyteArray JNICALL Java_java_util_prefs_WindowsPreferences_WindowsRegEnumValue
- (JNIEnv* env, jclass this_class, jint hKey , jint valueIndex, jint maxValueNameLength){
- int size = maxValueNameLength;
- jbyteArray result;
- char* buffer = NULL;
- int error_code;
- buffer = (char*)malloc(maxValueNameLength);
- if (buffer == NULL) {
- JNU_ThrowOutOfMemoryError(env, "native memory allocation failed");
- return NULL;
- }
- error_code = RegEnumValue((HKEY) hKey, valueIndex, buffer,
- &size, NULL, NULL, NULL, NULL);
- if (error_code!= ERROR_SUCCESS){
- free(buffer);
- return NULL;
- }
- result = (*env)->NewByteArray(env, size + 1);
- if (result != NULL) {
- (*env)->SetByteArrayRegion(env, result, 0, size + 1, buffer);
- }
- free(buffer);
- return result;
- }
+ }
+ jbyteArray result = (*env)->NewByteArray(env, size + 1);
+ if (result != NULL) {
+ (*env)->SetByteArrayRegion(env, result, 0, size + 1, buffer);
+ }
+ free(buffer);
+ return result;
+}
#ifdef __cplusplus
--- a/src/java.se/share/classes/module-info.java Thu Mar 01 16:35:36 2018 -0500
+++ b/src/java.se/share/classes/module-info.java Fri Mar 02 21:00:12 2018 +0100
@@ -55,6 +55,7 @@
requires transitive java.security.sasl;
requires transitive java.sql;
requires transitive java.sql.rowset;
+ requires transitive java.transaction.xa;
requires transitive java.xml;
requires transitive java.xml.crypto;
}
--- a/src/java.sql/share/classes/javax/transaction/xa/XAException.java Thu Mar 01 16:35:36 2018 -0500
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,201 +0,0 @@
-/*
- * Copyright (c) 2000, 2001, Oracle and/or its affiliates. All rights reserved.
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * This code is free software; you can redistribute it and/or modify it
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
- * or visit www.oracle.com if you need additional information or have any
- * questions.
- */
-
-package javax.transaction.xa;
-
-/**
- * The XAException is thrown by the Resource Manager (RM) to inform the
- * Transaction Manager of an error encountered by the involved transaction.
- *
- * @since 1.4
- */
-public class XAException extends Exception {
-
- /**
- * Specify serialVersionUID for backward compatibility
- */
- private static final long serialVersionUID = -8249683284832867751L;
-
- /**
- * The error code with which to create the SystemException.
- *
- * @serial The error code for the exception
- */
- public int errorCode;
-
- /**
- * Create an XAException.
- */
- public XAException() {
- super();
- }
-
- /**
- * Create an XAException with a given string.
- *
- * @param s The <code>String</code> object containing the exception
- * message.
- */
- public XAException(String s) {
- super(s);
- }
-
- /**
- * Create an XAException with a given error code.
- *
- * @param errcode The error code identifying the exception.
- */
- public XAException(int errcode) {
- super();
- errorCode = errcode;
- }
-
- /**
- * The inclusive lower bound of the rollback codes.
- */
- public final static int XA_RBBASE = 100;
-
- /**
- * Indicates that the rollback was caused by an unspecified reason.
- */
- public final static int XA_RBROLLBACK = XA_RBBASE;
-
- /**
- * Indicates that the rollback was caused by a communication failure.
- */
- public final static int XA_RBCOMMFAIL = XA_RBBASE + 1;
-
- /**
- * A deadlock was detected.
- */
- public final static int XA_RBDEADLOCK = XA_RBBASE + 2;
-
- /**
- * A condition that violates the integrity of the resource was detected.
- */
- public final static int XA_RBINTEGRITY = XA_RBBASE + 3;
-
- /**
- * The resource manager rolled back the transaction branch for a reason
- * not on this list.
- */
- public final static int XA_RBOTHER = XA_RBBASE + 4;
-
- /**
- * A protocol error occurred in the resource manager.
- */
- public final static int XA_RBPROTO = XA_RBBASE + 5;
-
- /**
- * A transaction branch took too long.
- */
- public final static int XA_RBTIMEOUT = XA_RBBASE + 6;
-
- /**
- * May retry the transaction branch.
- */
- public final static int XA_RBTRANSIENT = XA_RBBASE + 7;
-
- /**
- * The inclusive upper bound of the rollback error code.
- */
- public final static int XA_RBEND = XA_RBTRANSIENT;
-
- /**
- * Resumption must occur where the suspension occurred.
- */
- public final static int XA_NOMIGRATE = 9;
-
- /**
- * The transaction branch may have been heuristically completed.
- */
- public final static int XA_HEURHAZ = 8;
-
- /**
- * The transaction branch has been heuristically committed.
- */
- public final static int XA_HEURCOM = 7;
-
- /**
- * The transaction branch has been heuristically rolled back.
- */
- public final static int XA_HEURRB = 6;
-
- /**
- * The transaction branch has been heuristically committed and
- * rolled back.
- */
- public final static int XA_HEURMIX = 5;
-
- /**
- * Routine returned with no effect and may be reissued.
- */
- public final static int XA_RETRY = 4;
-
- /**
- * The transaction branch was read-only and has been committed.
- */
- public final static int XA_RDONLY = 3;
-
- /**
- * There is an asynchronous operation already outstanding.
- */
- public final static int XAER_ASYNC = -2;
-
- /**
- * A resource manager error has occurred in the transaction branch.
- */
- public final static int XAER_RMERR = -3;
-
- /**
- * The XID is not valid.
- */
- public final static int XAER_NOTA = -4;
-
- /**
- * Invalid arguments were given.
- */
- public final static int XAER_INVAL = -5;
-
- /**
- * Routine was invoked in an inproper context.
- */
- public final static int XAER_PROTO = -6;
-
- /**
- * Resource manager is unavailable.
- */
- public final static int XAER_RMFAIL = -7;
-
- /**
- * The XID already exists.
- */
- public final static int XAER_DUPID = -8;
-
- /**
- * The resource manager is doing work outside a global transaction.
- */
- public final static int XAER_OUTSIDE = -9;
-}
--- a/src/java.sql/share/classes/javax/transaction/xa/XAResource.java Thu Mar 01 16:35:36 2018 -0500
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,306 +0,0 @@
-/*
- * Copyright (c) 2000, 2001, Oracle and/or its affiliates. All rights reserved.
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * This code is free software; you can redistribute it and/or modify it
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
- * or visit www.oracle.com if you need additional information or have any
- * questions.
- */
-
-package javax.transaction.xa;
-
-/**
- * The XAResource interface is a Java mapping of the industry standard
- * XA interface based on the X/Open CAE Specification (Distributed
- * Transaction Processing: The XA Specification).
- *
- * <p>The XA interface defines the contract between a Resource Manager
- * and a Transaction Manager in a distributed transaction processing
- * (DTP) environment. A JDBC driver or a JMS provider implements
- * this interface to support the association between a global transaction
- * and a database or message service connection.
- *
- * <p>The XAResource interface can be supported by any transactional
- * resource that is intended to be used by application programs in an
- * environment where transactions are controlled by an external
- * transaction manager. An example of such a resource is a database
- * management system. An application may access data through multiple
- * database connections. Each database connection is enlisted with
- * the transaction manager as a transactional resource. The transaction
- * manager obtains an XAResource for each connection participating
- * in a global transaction. The transaction manager uses the
- * <code>start</code> method
- * to associate the global transaction with the resource, and it uses the
- * <code>end</code> method to disassociate the transaction from
- * the resource. The resource
- * manager is responsible for associating the global transaction to all
- * work performed on its data between the start and end method invocations.
- *
- * <p>At transaction commit time, the resource managers are informed by
- * the transaction manager to prepare, commit, or rollback a transaction
- * according to the two-phase commit protocol.</p>
- *
- * @since 1.4
- */
-public interface XAResource {
-
- /**
- * Commits the global transaction specified by xid.
- *
- * @param xid A global transaction identifier
- *
- * @param onePhase If true, the resource manager should use a one-phase
- * commit protocol to commit the work done on behalf of xid.
- *
- * @exception XAException An error has occurred. Possible XAExceptions
- * are XA_HEURHAZ, XA_HEURCOM, XA_HEURRB, XA_HEURMIX, XAER_RMERR,
- * XAER_RMFAIL, XAER_NOTA, XAER_INVAL, or XAER_PROTO.
- *
- * <P>If the resource manager did not commit the transaction and the
- * paramether onePhase is set to true, the resource manager may throw
- * one of the XA_RB* exceptions. Upon return, the resource manager has
- * rolled back the branch's work and has released all held resources.
- */
- void commit(Xid xid, boolean onePhase) throws XAException;
-
- /**
- * Ends the work performed on behalf of a transaction branch.
- * The resource manager disassociates the XA resource from the
- * transaction branch specified and lets the transaction
- * complete.
- *
- * <p>If TMSUSPEND is specified in the flags, the transaction branch
- * is temporarily suspended in an incomplete state. The transaction
- * context is in a suspended state and must be resumed via the
- * <code>start</code> method with TMRESUME specified.</p>
- *
- * <p>If TMFAIL is specified, the portion of work has failed.
- * The resource manager may mark the transaction as rollback-only</p>
- *
- * <p>If TMSUCCESS is specified, the portion of work has completed
- * successfully.</p>
- *
- * @param xid A global transaction identifier that is the same as
- * the identifier used previously in the <code>start</code> method.
- *
- * @param flags One of TMSUCCESS, TMFAIL, or TMSUSPEND.
- *
- * @exception XAException An error has occurred. Possible XAException
- * values are XAER_RMERR, XAER_RMFAILED, XAER_NOTA, XAER_INVAL,
- * XAER_PROTO, or XA_RB*.
- */
- void end(Xid xid, int flags) throws XAException;
-
- /**
- * Tells the resource manager to forget about a heuristically
- * completed transaction branch.
- *
- * @param xid A global transaction identifier.
- *
- * @exception XAException An error has occurred. Possible exception
- * values are XAER_RMERR, XAER_RMFAIL, XAER_NOTA, XAER_INVAL, or
- * XAER_PROTO.
- */
- void forget(Xid xid) throws XAException;
-
- /**
- * Obtains the current transaction timeout value set for this
- * XAResource instance. If <CODE>XAResource.setTransactionTimeout</CODE>
- * was not used prior to invoking this method, the return value
- * is the default timeout set for the resource manager; otherwise,
- * the value used in the previous <CODE>setTransactionTimeout</CODE>
- * call is returned.
- *
- * @return the transaction timeout value in seconds.
- *
- * @exception XAException An error has occurred. Possible exception
- * values are XAER_RMERR and XAER_RMFAIL.
- */
- int getTransactionTimeout() throws XAException;
-
- /**
- * This method is called to determine if the resource manager
- * instance represented by the target object is the same as the
- * resouce manager instance represented by the parameter <i>xares</i>.
- *
- * @param xares An XAResource object whose resource manager instance
- * is to be compared with the resource manager instance of the
- * target object.
- *
- * @return <i>true</i> if it's the same RM instance; otherwise
- * <i>false</i>.
- *
- * @exception XAException An error has occurred. Possible exception
- * values are XAER_RMERR and XAER_RMFAIL.
- */
- boolean isSameRM(XAResource xares) throws XAException;
-
- /**
- * Ask the resource manager to prepare for a transaction commit
- * of the transaction specified in xid.
- *
- * @param xid A global transaction identifier.
- *
- * @exception XAException An error has occurred. Possible exception
- * values are: XA_RB*, XAER_RMERR, XAER_RMFAIL, XAER_NOTA, XAER_INVAL,
- * or XAER_PROTO.
- *
- * @return A value indicating the resource manager's vote on the
- * outcome of the transaction. The possible values are: XA_RDONLY
- * or XA_OK. If the resource manager wants to roll back the
- * transaction, it should do so by raising an appropriate XAException
- * in the prepare method.
- */
- int prepare(Xid xid) throws XAException;
-
- /**
- * Obtains a list of prepared transaction branches from a resource
- * manager. The transaction manager calls this method during recovery
- * to obtain the list of transaction branches that are currently in
- * prepared or heuristically completed states.
- *
- * @param flag One of TMSTARTRSCAN, TMENDRSCAN, TMNOFLAGS. TMNOFLAGS
- * must be used when no other flags are set in the parameter.
- *
- * @exception XAException An error has occurred. Possible values are
- * XAER_RMERR, XAER_RMFAIL, XAER_INVAL, and XAER_PROTO.
- *
- * @return The resource manager returns zero or more XIDs of the
- * transaction branches that are currently in a prepared or
- * heuristically completed state. If an error occurs during the
- * operation, the resource manager should throw the appropriate
- * XAException.
- */
- Xid[] recover(int flag) throws XAException;
-
- /**
- * Informs the resource manager to roll back work done on behalf
- * of a transaction branch.
- *
- * @param xid A global transaction identifier.
- *
- * @exception XAException An error has occurred.
- */
- void rollback(Xid xid) throws XAException;
-
- /**
- * Sets the current transaction timeout value for this <CODE>XAResource</CODE>
- * instance. Once set, this timeout value is effective until
- * <code>setTransactionTimeout</code> is invoked again with a different
- * value. To reset the timeout value to the default value used by the resource
- * manager, set the value to zero.
- *
- * If the timeout operation is performed successfully, the method returns
- * <i>true</i>; otherwise <i>false</i>. If a resource manager does not
- * support explicitly setting the transaction timeout value, this method
- * returns <i>false</i>.
- *
- * @param seconds The transaction timeout value in seconds.
- *
- * @return <i>true</i> if the transaction timeout value is set successfully;
- * otherwise <i>false</i>.
- *
- * @exception XAException An error has occurred. Possible exception values
- * are XAER_RMERR, XAER_RMFAIL, or XAER_INVAL.
- */
- boolean setTransactionTimeout(int seconds) throws XAException;
-
- /**
- * Starts work on behalf of a transaction branch specified in
- * <code>xid</code>.
- *
- * If TMJOIN is specified, the start applies to joining a transaction
- * previously seen by the resource manager. If TMRESUME is specified,
- * the start applies to resuming a suspended transaction specified in the
- * parameter <code>xid</code>.
- *
- * If neither TMJOIN nor TMRESUME is specified and the transaction
- * specified by <code>xid</code> has previously been seen by the resource
- * manager, the resource manager throws the XAException exception with
- * XAER_DUPID error code.
- *
- * @param xid A global transaction identifier to be associated
- * with the resource.
- *
- * @param flags One of TMNOFLAGS, TMJOIN, or TMRESUME.
- *
- * @exception XAException An error has occurred. Possible exceptions
- * are XA_RB*, XAER_RMERR, XAER_RMFAIL, XAER_DUPID, XAER_OUTSIDE,
- * XAER_NOTA, XAER_INVAL, or XAER_PROTO.
- */
- void start(Xid xid, int flags) throws XAException;
-
- /**
- * Ends a recovery scan.
- */
- public final static int TMENDRSCAN = 0x00800000;
-
- /**
- * Disassociates the caller and marks the transaction branch
- * rollback-only.
- */
- public final static int TMFAIL = 0x20000000;
-
- /**
- * Caller is joining existing transaction branch.
- */
- public final static int TMJOIN = 0x00200000;
-
- /**
- * Use TMNOFLAGS to indicate no flags value is selected.
- */
- public final static int TMNOFLAGS = 0x00000000;
-
- /**
- * Caller is using one-phase optimization.
- */
- public final static int TMONEPHASE = 0x40000000;
-
- /**
- * Caller is resuming association with a suspended
- * transaction branch.
- */
- public final static int TMRESUME = 0x08000000;
-
- /**
- * Starts a recovery scan.
- */
- public final static int TMSTARTRSCAN = 0x01000000;
-
- /**
- * Disassociates caller from a transaction branch.
- */
- public final static int TMSUCCESS = 0x04000000;
-
- /**
- * Caller is suspending (not ending) its association with
- * a transaction branch.
- */
- public final static int TMSUSPEND = 0x02000000;
-
- /**
- * The transaction branch has been read-only and has been committed.
- */
- public final static int XA_RDONLY = 0x00000003;
-
- /**
- * The transaction work has been prepared normally.
- */
- public final static int XA_OK = 0;
-}
--- a/src/java.sql/share/classes/javax/transaction/xa/Xid.java Thu Mar 01 16:35:36 2018 -0500
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,72 +0,0 @@
-/*
- * Copyright (c) 2000, 2002, Oracle and/or its affiliates. All rights reserved.
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * This code is free software; you can redistribute it and/or modify it
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
- * or visit www.oracle.com if you need additional information or have any
- * questions.
- */
-
-package javax.transaction.xa;
-
-/**
- * The Xid interface is a Java mapping of the X/Open transaction identifier
- * XID structure. This interface specifies three accessor methods to
- * retrieve a global transaction format ID, global transaction ID,
- * and branch qualifier. The Xid interface is used by the transaction
- * manager and the resource managers. This interface is not visible to
- * the application programs.
- *
- * @since 1.4
- */
-public interface Xid {
-
- /**
- * Maximum number of bytes returned by {@link #getGlobalTransactionId }.
- */
- final static int MAXGTRIDSIZE = 64;
-
- /**
- * Maximum number of bytes returned by {@link #getBranchQualifier }.
- */
- final static int MAXBQUALSIZE = 64;
-
- /**
- * Obtain the format identifier part of the XID.
- *
- * @return Format identifier. O means the OSI CCR format.
- */
- int getFormatId();
-
- /**
- * Obtain the global transaction identifier part of XID as an array
- * of bytes.
- *
- * @return Global transaction identifier.
- */
- byte[] getGlobalTransactionId();
-
- /**
- * Obtain the transaction branch identifier part of XID as an array
- * of bytes.
- *
- * @return Global transaction identifier.
- */
- byte[] getBranchQualifier();
-}
--- a/src/java.sql/share/classes/javax/transaction/xa/package.html Thu Mar 01 16:35:36 2018 -0500
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,41 +0,0 @@
-<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2 Final//EN">
-<html>
-<head>
-<!--
-Copyright (c) 2001, Oracle and/or its affiliates. All rights reserved.
-DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
-
-This code is free software; you can redistribute it and/or modify it
-under the terms of the GNU General Public License version 2 only, as
-published by the Free Software Foundation. Oracle designates this
-particular file as subject to the "Classpath" exception as provided
-by Oracle in the LICENSE file that accompanied this code.
-
-This code is distributed in the hope that it will be useful, but WITHOUT
-ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
-FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
-version 2 for more details (a copy is included in the LICENSE file that
-accompanied this code).
-
-You should have received a copy of the GNU General Public License version
-2 along with this work; if not, write to the Free Software Foundation,
-Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
-
-Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
-or visit www.oracle.com if you need additional information or have any
-questions.
--->
-
-</head>
-<body bgcolor="white">
-
-Provides the API that defines the contract between the transaction
-manager and the resource manager, which allows the transaction
-manager to enlist and delist resource objects (supplied by the
-resource manager driver) in JTA transactions. The driver vendor
-for a specific resource manager provides the implementation of
-this API.
-
-@since 1.4
-</body>
-</html>
--- a/src/java.sql/share/classes/module-info.java Thu Mar 01 16:35:36 2018 -0500
+++ b/src/java.sql/share/classes/module-info.java Fri Mar 02 21:00:12 2018 +0100
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2014, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2014, 2018, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
@@ -33,11 +33,11 @@
*/
module java.sql {
requires transitive java.logging;
+ requires transitive java.transaction.xa;
requires transitive java.xml;
exports java.sql;
exports javax.sql;
- exports javax.transaction.xa;
uses java.sql.Driver;
}
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/src/java.transaction.xa/share/classes/javax/transaction/xa/XAException.java Fri Mar 02 21:00:12 2018 +0100
@@ -0,0 +1,201 @@
+/*
+ * Copyright (c) 2000, 2001, Oracle and/or its affiliates. All rights reserved.
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * This code is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU General Public License version 2 only, as
+ * published by the Free Software Foundation. Oracle designates this
+ * particular file as subject to the "Classpath" exception as provided
+ * by Oracle in the LICENSE file that accompanied this code.
+ *
+ * This code is distributed in the hope that it will be useful, but WITHOUT
+ * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
+ * version 2 for more details (a copy is included in the LICENSE file that
+ * accompanied this code).
+ *
+ * You should have received a copy of the GNU General Public License version
+ * 2 along with this work; if not, write to the Free Software Foundation,
+ * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
+ *
+ * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
+ * or visit www.oracle.com if you need additional information or have any
+ * questions.
+ */
+
+package javax.transaction.xa;
+
+/**
+ * The XAException is thrown by the Resource Manager (RM) to inform the
+ * Transaction Manager of an error encountered by the involved transaction.
+ *
+ * @since 1.4
+ */
+public class XAException extends Exception {
+
+ /**
+ * Specify serialVersionUID for backward compatibility
+ */
+ private static final long serialVersionUID = -8249683284832867751L;
+
+ /**
+ * The error code with which to create the SystemException.
+ *
+ * @serial The error code for the exception
+ */
+ public int errorCode;
+
+ /**
+ * Create an XAException.
+ */
+ public XAException() {
+ super();
+ }
+
+ /**
+ * Create an XAException with a given string.
+ *
+ * @param s The <code>String</code> object containing the exception
+ * message.
+ */
+ public XAException(String s) {
+ super(s);
+ }
+
+ /**
+ * Create an XAException with a given error code.
+ *
+ * @param errcode The error code identifying the exception.
+ */
+ public XAException(int errcode) {
+ super();
+ errorCode = errcode;
+ }
+
+ /**
+ * The inclusive lower bound of the rollback codes.
+ */
+ public final static int XA_RBBASE = 100;
+
+ /**
+ * Indicates that the rollback was caused by an unspecified reason.
+ */
+ public final static int XA_RBROLLBACK = XA_RBBASE;
+
+ /**
+ * Indicates that the rollback was caused by a communication failure.
+ */
+ public final static int XA_RBCOMMFAIL = XA_RBBASE + 1;
+
+ /**
+ * A deadlock was detected.
+ */
+ public final static int XA_RBDEADLOCK = XA_RBBASE + 2;
+
+ /**
+ * A condition that violates the integrity of the resource was detected.
+ */
+ public final static int XA_RBINTEGRITY = XA_RBBASE + 3;
+
+ /**
+ * The resource manager rolled back the transaction branch for a reason
+ * not on this list.
+ */
+ public final static int XA_RBOTHER = XA_RBBASE + 4;
+
+ /**
+ * A protocol error occurred in the resource manager.
+ */
+ public final static int XA_RBPROTO = XA_RBBASE + 5;
+
+ /**
+ * A transaction branch took too long.
+ */
+ public final static int XA_RBTIMEOUT = XA_RBBASE + 6;
+
+ /**
+ * May retry the transaction branch.
+ */
+ public final static int XA_RBTRANSIENT = XA_RBBASE + 7;
+
+ /**
+ * The inclusive upper bound of the rollback error code.
+ */
+ public final static int XA_RBEND = XA_RBTRANSIENT;
+
+ /**
+ * Resumption must occur where the suspension occurred.
+ */
+ public final static int XA_NOMIGRATE = 9;
+
+ /**
+ * The transaction branch may have been heuristically completed.
+ */
+ public final static int XA_HEURHAZ = 8;
+
+ /**
+ * The transaction branch has been heuristically committed.
+ */
+ public final static int XA_HEURCOM = 7;
+
+ /**
+ * The transaction branch has been heuristically rolled back.
+ */
+ public final static int XA_HEURRB = 6;
+
+ /**
+ * The transaction branch has been heuristically committed and
+ * rolled back.
+ */
+ public final static int XA_HEURMIX = 5;
+
+ /**
+ * Routine returned with no effect and may be reissued.
+ */
+ public final static int XA_RETRY = 4;
+
+ /**
+ * The transaction branch was read-only and has been committed.
+ */
+ public final static int XA_RDONLY = 3;
+
+ /**
+ * There is an asynchronous operation already outstanding.
+ */
+ public final static int XAER_ASYNC = -2;
+
+ /**
+ * A resource manager error has occurred in the transaction branch.
+ */
+ public final static int XAER_RMERR = -3;
+
+ /**
+ * The XID is not valid.
+ */
+ public final static int XAER_NOTA = -4;
+
+ /**
+ * Invalid arguments were given.
+ */
+ public final static int XAER_INVAL = -5;
+
+ /**
+ * Routine was invoked in an inproper context.
+ */
+ public final static int XAER_PROTO = -6;
+
+ /**
+ * Resource manager is unavailable.
+ */
+ public final static int XAER_RMFAIL = -7;
+
+ /**
+ * The XID already exists.
+ */
+ public final static int XAER_DUPID = -8;
+
+ /**
+ * The resource manager is doing work outside a global transaction.
+ */
+ public final static int XAER_OUTSIDE = -9;
+}
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/src/java.transaction.xa/share/classes/javax/transaction/xa/XAResource.java Fri Mar 02 21:00:12 2018 +0100
@@ -0,0 +1,306 @@
+/*
+ * Copyright (c) 2000, 2001, Oracle and/or its affiliates. All rights reserved.
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * This code is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU General Public License version 2 only, as
+ * published by the Free Software Foundation. Oracle designates this
+ * particular file as subject to the "Classpath" exception as provided
+ * by Oracle in the LICENSE file that accompanied this code.
+ *
+ * This code is distributed in the hope that it will be useful, but WITHOUT
+ * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
+ * version 2 for more details (a copy is included in the LICENSE file that
+ * accompanied this code).
+ *
+ * You should have received a copy of the GNU General Public License version
+ * 2 along with this work; if not, write to the Free Software Foundation,
+ * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
+ *
+ * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
+ * or visit www.oracle.com if you need additional information or have any
+ * questions.
+ */
+
+package javax.transaction.xa;
+
+/**
+ * The XAResource interface is a Java mapping of the industry standard
+ * XA interface based on the X/Open CAE Specification (Distributed
+ * Transaction Processing: The XA Specification).
+ *
+ * <p>The XA interface defines the contract between a Resource Manager
+ * and a Transaction Manager in a distributed transaction processing
+ * (DTP) environment. A JDBC driver or a JMS provider implements
+ * this interface to support the association between a global transaction
+ * and a database or message service connection.
+ *
+ * <p>The XAResource interface can be supported by any transactional
+ * resource that is intended to be used by application programs in an
+ * environment where transactions are controlled by an external
+ * transaction manager. An example of such a resource is a database
+ * management system. An application may access data through multiple
+ * database connections. Each database connection is enlisted with
+ * the transaction manager as a transactional resource. The transaction
+ * manager obtains an XAResource for each connection participating
+ * in a global transaction. The transaction manager uses the
+ * <code>start</code> method
+ * to associate the global transaction with the resource, and it uses the
+ * <code>end</code> method to disassociate the transaction from
+ * the resource. The resource
+ * manager is responsible for associating the global transaction to all
+ * work performed on its data between the start and end method invocations.
+ *
+ * <p>At transaction commit time, the resource managers are informed by
+ * the transaction manager to prepare, commit, or rollback a transaction
+ * according to the two-phase commit protocol.</p>
+ *
+ * @since 1.4
+ */
+public interface XAResource {
+
+ /**
+ * Commits the global transaction specified by xid.
+ *
+ * @param xid A global transaction identifier
+ *
+ * @param onePhase If true, the resource manager should use a one-phase
+ * commit protocol to commit the work done on behalf of xid.
+ *
+ * @exception XAException An error has occurred. Possible XAExceptions
+ * are XA_HEURHAZ, XA_HEURCOM, XA_HEURRB, XA_HEURMIX, XAER_RMERR,
+ * XAER_RMFAIL, XAER_NOTA, XAER_INVAL, or XAER_PROTO.
+ *
+ * <P>If the resource manager did not commit the transaction and the
+ * paramether onePhase is set to true, the resource manager may throw
+ * one of the XA_RB* exceptions. Upon return, the resource manager has
+ * rolled back the branch's work and has released all held resources.
+ */
+ void commit(Xid xid, boolean onePhase) throws XAException;
+
+ /**
+ * Ends the work performed on behalf of a transaction branch.
+ * The resource manager disassociates the XA resource from the
+ * transaction branch specified and lets the transaction
+ * complete.
+ *
+ * <p>If TMSUSPEND is specified in the flags, the transaction branch
+ * is temporarily suspended in an incomplete state. The transaction
+ * context is in a suspended state and must be resumed via the
+ * <code>start</code> method with TMRESUME specified.</p>
+ *
+ * <p>If TMFAIL is specified, the portion of work has failed.
+ * The resource manager may mark the transaction as rollback-only</p>
+ *
+ * <p>If TMSUCCESS is specified, the portion of work has completed
+ * successfully.</p>
+ *
+ * @param xid A global transaction identifier that is the same as
+ * the identifier used previously in the <code>start</code> method.
+ *
+ * @param flags One of TMSUCCESS, TMFAIL, or TMSUSPEND.
+ *
+ * @exception XAException An error has occurred. Possible XAException
+ * values are XAER_RMERR, XAER_RMFAILED, XAER_NOTA, XAER_INVAL,
+ * XAER_PROTO, or XA_RB*.
+ */
+ void end(Xid xid, int flags) throws XAException;
+
+ /**
+ * Tells the resource manager to forget about a heuristically
+ * completed transaction branch.
+ *
+ * @param xid A global transaction identifier.
+ *
+ * @exception XAException An error has occurred. Possible exception
+ * values are XAER_RMERR, XAER_RMFAIL, XAER_NOTA, XAER_INVAL, or
+ * XAER_PROTO.
+ */
+ void forget(Xid xid) throws XAException;
+
+ /**
+ * Obtains the current transaction timeout value set for this
+ * XAResource instance. If <CODE>XAResource.setTransactionTimeout</CODE>
+ * was not used prior to invoking this method, the return value
+ * is the default timeout set for the resource manager; otherwise,
+ * the value used in the previous <CODE>setTransactionTimeout</CODE>
+ * call is returned.
+ *
+ * @return the transaction timeout value in seconds.
+ *
+ * @exception XAException An error has occurred. Possible exception
+ * values are XAER_RMERR and XAER_RMFAIL.
+ */
+ int getTransactionTimeout() throws XAException;
+
+ /**
+ * This method is called to determine if the resource manager
+ * instance represented by the target object is the same as the
+ * resouce manager instance represented by the parameter <i>xares</i>.
+ *
+ * @param xares An XAResource object whose resource manager instance
+ * is to be compared with the resource manager instance of the
+ * target object.
+ *
+ * @return <i>true</i> if it's the same RM instance; otherwise
+ * <i>false</i>.
+ *
+ * @exception XAException An error has occurred. Possible exception
+ * values are XAER_RMERR and XAER_RMFAIL.
+ */
+ boolean isSameRM(XAResource xares) throws XAException;
+
+ /**
+ * Ask the resource manager to prepare for a transaction commit
+ * of the transaction specified in xid.
+ *
+ * @param xid A global transaction identifier.
+ *
+ * @exception XAException An error has occurred. Possible exception
+ * values are: XA_RB*, XAER_RMERR, XAER_RMFAIL, XAER_NOTA, XAER_INVAL,
+ * or XAER_PROTO.
+ *
+ * @return A value indicating the resource manager's vote on the
+ * outcome of the transaction. The possible values are: XA_RDONLY
+ * or XA_OK. If the resource manager wants to roll back the
+ * transaction, it should do so by raising an appropriate XAException
+ * in the prepare method.
+ */
+ int prepare(Xid xid) throws XAException;
+
+ /**
+ * Obtains a list of prepared transaction branches from a resource
+ * manager. The transaction manager calls this method during recovery
+ * to obtain the list of transaction branches that are currently in
+ * prepared or heuristically completed states.
+ *
+ * @param flag One of TMSTARTRSCAN, TMENDRSCAN, TMNOFLAGS. TMNOFLAGS
+ * must be used when no other flags are set in the parameter.
+ *
+ * @exception XAException An error has occurred. Possible values are
+ * XAER_RMERR, XAER_RMFAIL, XAER_INVAL, and XAER_PROTO.
+ *
+ * @return The resource manager returns zero or more XIDs of the
+ * transaction branches that are currently in a prepared or
+ * heuristically completed state. If an error occurs during the
+ * operation, the resource manager should throw the appropriate
+ * XAException.
+ */
+ Xid[] recover(int flag) throws XAException;
+
+ /**
+ * Informs the resource manager to roll back work done on behalf
+ * of a transaction branch.
+ *
+ * @param xid A global transaction identifier.
+ *
+ * @exception XAException An error has occurred.
+ */
+ void rollback(Xid xid) throws XAException;
+
+ /**
+ * Sets the current transaction timeout value for this <CODE>XAResource</CODE>
+ * instance. Once set, this timeout value is effective until
+ * <code>setTransactionTimeout</code> is invoked again with a different
+ * value. To reset the timeout value to the default value used by the resource
+ * manager, set the value to zero.
+ *
+ * If the timeout operation is performed successfully, the method returns
+ * <i>true</i>; otherwise <i>false</i>. If a resource manager does not
+ * support explicitly setting the transaction timeout value, this method
+ * returns <i>false</i>.
+ *
+ * @param seconds The transaction timeout value in seconds.
+ *
+ * @return <i>true</i> if the transaction timeout value is set successfully;
+ * otherwise <i>false</i>.
+ *
+ * @exception XAException An error has occurred. Possible exception values
+ * are XAER_RMERR, XAER_RMFAIL, or XAER_INVAL.
+ */
+ boolean setTransactionTimeout(int seconds) throws XAException;
+
+ /**
+ * Starts work on behalf of a transaction branch specified in
+ * <code>xid</code>.
+ *
+ * If TMJOIN is specified, the start applies to joining a transaction
+ * previously seen by the resource manager. If TMRESUME is specified,
+ * the start applies to resuming a suspended transaction specified in the
+ * parameter <code>xid</code>.
+ *
+ * If neither TMJOIN nor TMRESUME is specified and the transaction
+ * specified by <code>xid</code> has previously been seen by the resource
+ * manager, the resource manager throws the XAException exception with
+ * XAER_DUPID error code.
+ *
+ * @param xid A global transaction identifier to be associated
+ * with the resource.
+ *
+ * @param flags One of TMNOFLAGS, TMJOIN, or TMRESUME.
+ *
+ * @exception XAException An error has occurred. Possible exceptions
+ * are XA_RB*, XAER_RMERR, XAER_RMFAIL, XAER_DUPID, XAER_OUTSIDE,
+ * XAER_NOTA, XAER_INVAL, or XAER_PROTO.
+ */
+ void start(Xid xid, int flags) throws XAException;
+
+ /**
+ * Ends a recovery scan.
+ */
+ public final static int TMENDRSCAN = 0x00800000;
+
+ /**
+ * Disassociates the caller and marks the transaction branch
+ * rollback-only.
+ */
+ public final static int TMFAIL = 0x20000000;
+
+ /**
+ * Caller is joining existing transaction branch.
+ */
+ public final static int TMJOIN = 0x00200000;
+
+ /**
+ * Use TMNOFLAGS to indicate no flags value is selected.
+ */
+ public final static int TMNOFLAGS = 0x00000000;
+
+ /**
+ * Caller is using one-phase optimization.
+ */
+ public final static int TMONEPHASE = 0x40000000;
+
+ /**
+ * Caller is resuming association with a suspended
+ * transaction branch.
+ */
+ public final static int TMRESUME = 0x08000000;
+
+ /**
+ * Starts a recovery scan.
+ */
+ public final static int TMSTARTRSCAN = 0x01000000;
+
+ /**
+ * Disassociates caller from a transaction branch.
+ */
+ public final static int TMSUCCESS = 0x04000000;
+
+ /**
+ * Caller is suspending (not ending) its association with
+ * a transaction branch.
+ */
+ public final static int TMSUSPEND = 0x02000000;
+
+ /**
+ * The transaction branch has been read-only and has been committed.
+ */
+ public final static int XA_RDONLY = 0x00000003;
+
+ /**
+ * The transaction work has been prepared normally.
+ */
+ public final static int XA_OK = 0;
+}
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/src/java.transaction.xa/share/classes/javax/transaction/xa/Xid.java Fri Mar 02 21:00:12 2018 +0100
@@ -0,0 +1,72 @@
+/*
+ * Copyright (c) 2000, 2002, Oracle and/or its affiliates. All rights reserved.
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * This code is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU General Public License version 2 only, as
+ * published by the Free Software Foundation. Oracle designates this
+ * particular file as subject to the "Classpath" exception as provided
+ * by Oracle in the LICENSE file that accompanied this code.
+ *
+ * This code is distributed in the hope that it will be useful, but WITHOUT
+ * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
+ * version 2 for more details (a copy is included in the LICENSE file that
+ * accompanied this code).
+ *
+ * You should have received a copy of the GNU General Public License version
+ * 2 along with this work; if not, write to the Free Software Foundation,
+ * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
+ *
+ * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
+ * or visit www.oracle.com if you need additional information or have any
+ * questions.
+ */
+
+package javax.transaction.xa;
+
+/**
+ * The Xid interface is a Java mapping of the X/Open transaction identifier
+ * XID structure. This interface specifies three accessor methods to
+ * retrieve a global transaction format ID, global transaction ID,
+ * and branch qualifier. The Xid interface is used by the transaction
+ * manager and the resource managers. This interface is not visible to
+ * the application programs.
+ *
+ * @since 1.4
+ */
+public interface Xid {
+
+ /**
+ * Maximum number of bytes returned by {@link #getGlobalTransactionId }.
+ */
+ final static int MAXGTRIDSIZE = 64;
+
+ /**
+ * Maximum number of bytes returned by {@link #getBranchQualifier }.
+ */
+ final static int MAXBQUALSIZE = 64;
+
+ /**
+ * Obtain the format identifier part of the XID.
+ *
+ * @return Format identifier. O means the OSI CCR format.
+ */
+ int getFormatId();
+
+ /**
+ * Obtain the global transaction identifier part of XID as an array
+ * of bytes.
+ *
+ * @return Global transaction identifier.
+ */
+ byte[] getGlobalTransactionId();
+
+ /**
+ * Obtain the transaction branch identifier part of XID as an array
+ * of bytes.
+ *
+ * @return Global transaction identifier.
+ */
+ byte[] getBranchQualifier();
+}
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/src/java.transaction.xa/share/classes/javax/transaction/xa/package-info.java Fri Mar 02 21:00:12 2018 +0100
@@ -0,0 +1,36 @@
+/*
+ * Copyright (c) 2001, 2018, Oracle and/or its affiliates. All rights reserved.
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * This code is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU General Public License version 2 only, as
+ * published by the Free Software Foundation. Oracle designates this
+ * particular file as subject to the "Classpath" exception as provided
+ * by Oracle in the LICENSE file that accompanied this code.
+ *
+ * This code is distributed in the hope that it will be useful, but WITHOUT
+ * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
+ * version 2 for more details (a copy is included in the LICENSE file that
+ * accompanied this code).
+ *
+ * You should have received a copy of the GNU General Public License version
+ * 2 along with this work; if not, write to the Free Software Foundation,
+ * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
+ *
+ * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
+ * or visit www.oracle.com if you need additional information or have any
+ * questions.
+ */
+
+/**
+ * Provides the API that defines the contract between the transaction manager
+ * and the resource manager, which allows the transaction manager to enlist
+ * and delist resource objects (supplied by the resource manager driver) in
+ * JTA transactions. The driver vendor for a specific resource manager provides
+ * the implementation of this API.
+ *
+ * @since 1.4
+ */
+
+package javax.transaction.xa;
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/src/java.transaction.xa/share/classes/module-info.java Fri Mar 02 21:00:12 2018 +0100
@@ -0,0 +1,36 @@
+/*
+ * Copyright (c) 2018, Oracle and/or its affiliates. All rights reserved.
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * This code is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU General Public License version 2 only, as
+ * published by the Free Software Foundation. Oracle designates this
+ * particular file as subject to the "Classpath" exception as provided
+ * by Oracle in the LICENSE file that accompanied this code.
+ *
+ * This code is distributed in the hope that it will be useful, but WITHOUT
+ * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
+ * version 2 for more details (a copy is included in the LICENSE file that
+ * accompanied this code).
+ *
+ * You should have received a copy of the GNU General Public License version
+ * 2 along with this work; if not, write to the Free Software Foundation,
+ * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
+ *
+ * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
+ * or visit www.oracle.com if you need additional information or have any
+ * questions.
+ */
+
+/**
+ * Defines an API for supporting distributed transactions in JDBC.
+ *
+ * @moduleGraph
+ * @since 11
+ */
+module java.transaction.xa {
+
+ exports javax.transaction.xa;
+
+}
--- a/src/jdk.compiler/share/classes/com/sun/tools/javac/parser/JavacParser.java Thu Mar 01 16:35:36 2018 -0500
+++ b/src/jdk.compiler/share/classes/com/sun/tools/javac/parser/JavacParser.java Fri Mar 02 21:00:12 2018 +0100
@@ -35,7 +35,6 @@
import com.sun.tools.javac.code.Source.Feature;
import com.sun.tools.javac.parser.Tokens.*;
import com.sun.tools.javac.parser.Tokens.Comment.CommentStyle;
-import com.sun.tools.javac.resources.CompilerProperties;
import com.sun.tools.javac.resources.CompilerProperties.Errors;
import com.sun.tools.javac.resources.CompilerProperties.Fragments;
import com.sun.tools.javac.resources.CompilerProperties.Warnings;
@@ -43,9 +42,7 @@
import com.sun.tools.javac.tree.JCTree.*;
import com.sun.tools.javac.util.*;
import com.sun.tools.javac.util.JCDiagnostic.DiagnosticFlag;
-import com.sun.tools.javac.util.JCDiagnostic.DiagnosticPosition;
import com.sun.tools.javac.util.JCDiagnostic.Error;
-import com.sun.tools.javac.util.JCDiagnostic.Warning;
import com.sun.tools.javac.util.JCDiagnostic.Fragment;
import com.sun.tools.javac.util.List;
@@ -58,6 +55,9 @@
import static com.sun.tools.javac.parser.Tokens.TokenKind.IMPORT;
import static com.sun.tools.javac.parser.Tokens.TokenKind.LT;
import static com.sun.tools.javac.tree.JCTree.Tag.*;
+import static com.sun.tools.javac.resources.CompilerProperties.Fragments.ImplicitAndExplicitNotAllowed;
+import static com.sun.tools.javac.resources.CompilerProperties.Fragments.VarAndExplicitNotAllowed;
+import static com.sun.tools.javac.resources.CompilerProperties.Fragments.VarAndImplicitNotAllowed;
/** The parser maps a token sequence into an abstract syntax
* tree. It operates by recursive descent, with code derived
@@ -1673,8 +1673,6 @@
CAST,
EXPLICIT_LAMBDA,
IMPLICIT_LAMBDA,
- IMPLICIT_LAMBDA_ALL_VAR,
- BAD_LAMBDA,
PARENS
}
@@ -1682,89 +1680,82 @@
List<JCVariableDecl> params = explicitParams ?
formalParameters(true) :
implicitParameters(hasParens);
-
if (explicitParams) {
- LambdaClassfier lambdaClassfier = new LambdaClassfier();
+ LambdaClassifier lambdaClassifier = new LambdaClassifier();
for (JCVariableDecl param: params) {
if (param.vartype != null &&
isRestrictedLocalVarTypeName(param.vartype) &&
param.vartype.hasTag(TYPEARRAY)) {
log.error(DiagnosticFlag.SYNTAX, param.pos, Errors.VarNotAllowedArray);
}
- if (param.vartype != null && param.name != names.empty) {
- if (isRestrictedLocalVarTypeName(param.vartype)) {
- lambdaClassfier.addImplicitVarParameter();
- } else {
- lambdaClassfier.addExplicitParameter();
- }
- }
- if (param.vartype == null && param.name != names.empty ||
- param.vartype != null && param.name == names.empty) {
- lambdaClassfier.addImplicitParameter();
- }
- if (lambdaClassfier.result() == ParensResult.BAD_LAMBDA) {
+ lambdaClassifier.addParameter(param);
+ if (lambdaClassifier.result() == LambdaParameterKind.ERROR) {
break;
}
}
- if (lambdaClassfier.diagFragment != null) {
- log.error(DiagnosticFlag.SYNTAX, pos, Errors.InvalidLambdaParameterDeclaration(lambdaClassfier.diagFragment));
+ if (lambdaClassifier.diagFragment != null) {
+ log.error(DiagnosticFlag.SYNTAX, pos, Errors.InvalidLambdaParameterDeclaration(lambdaClassifier.diagFragment));
+ }
+ for (JCVariableDecl param: params) {
+ if (param.vartype != null && isRestrictedLocalVarTypeName(param.vartype)) {
+ param.vartype = null;
+ }
}
}
return lambdaExpressionOrStatementRest(params, pos);
}
- class LambdaClassfier {
- ParensResult kind; //ParensResult.EXPLICIT_LAMBDA;
+ enum LambdaParameterKind {
+ EXPLICIT(0),
+ IMPLICIT(1),
+ VAR(2),
+ ERROR(-1);
+
+ private final int index;
+
+ LambdaParameterKind(int index) {
+ this.index = index;
+ }
+ }
+
+ private final static Fragment[][] decisionTable = new Fragment[][]{
+ /* EXPLICIT IMPLICIT VAR */
+ /* EXPLICIT */ {null, ImplicitAndExplicitNotAllowed, VarAndExplicitNotAllowed},
+ /* IMPLICIT */ {ImplicitAndExplicitNotAllowed, null, VarAndImplicitNotAllowed},
+ /* VAR */ {VarAndExplicitNotAllowed, VarAndImplicitNotAllowed, null}
+ };
+
+ class LambdaClassifier {
+
+ LambdaParameterKind kind;
Fragment diagFragment;
List<JCVariableDecl> params;
- void addExplicitParameter() {
- reduce(ParensResult.EXPLICIT_LAMBDA);
- }
-
- void addImplicitVarParameter() {
- reduce(ParensResult.IMPLICIT_LAMBDA_ALL_VAR);
+ void addParameter(JCVariableDecl param) {
+ if (param.vartype != null && param.name != names.empty) {
+ if (isRestrictedLocalVarTypeName(param.vartype)) {
+ reduce(LambdaParameterKind.VAR);
+ } else {
+ reduce(LambdaParameterKind.EXPLICIT);
+ }
+ }
+ if (param.vartype == null && param.name != names.empty ||
+ param.vartype != null && param.name == names.empty) {
+ reduce(LambdaParameterKind.IMPLICIT);
+ }
}
- void addImplicitParameter() {
- reduce(ParensResult.IMPLICIT_LAMBDA);
- }
-
- private void reduce(ParensResult newKind) {
+ private void reduce(LambdaParameterKind newKind) {
if (kind == null) {
kind = newKind;
- } else if (kind != newKind && kind != ParensResult.BAD_LAMBDA) {
- ParensResult currentKind = kind;
- kind = ParensResult.BAD_LAMBDA;
- switch (currentKind) {
- case EXPLICIT_LAMBDA:
- if (newKind == ParensResult.IMPLICIT_LAMBDA) {
- diagFragment = Fragments.ImplicitAndExplicitNotAllowed;
- } else if (newKind == ParensResult.IMPLICIT_LAMBDA_ALL_VAR) {
- diagFragment = Fragments.VarAndExplicitNotAllowed;
- }
- break;
- case IMPLICIT_LAMBDA:
- if (newKind == ParensResult.EXPLICIT_LAMBDA) {
- diagFragment = Fragments.ImplicitAndExplicitNotAllowed;
- } else if (newKind == ParensResult.IMPLICIT_LAMBDA_ALL_VAR) {
- diagFragment = Fragments.VarAndImplicitNotAllowed;
- }
- break;
- case IMPLICIT_LAMBDA_ALL_VAR:
- if (newKind == ParensResult.EXPLICIT_LAMBDA) {
- diagFragment = Fragments.VarAndExplicitNotAllowed;
- } else if (newKind == ParensResult.IMPLICIT_LAMBDA) {
- diagFragment = Fragments.VarAndImplicitNotAllowed;
- }
- break;
- default:
- throw new AssertionError("unexpected option for field kind");
- }
+ } else if (kind != newKind && kind != LambdaParameterKind.ERROR) {
+ LambdaParameterKind currentKind = kind;
+ kind = LambdaParameterKind.ERROR;
+ diagFragment = decisionTable[currentKind.index][newKind.index];
}
}
- ParensResult result() {
+ LambdaParameterKind result() {
return kind;
}
}
--- a/src/jdk.crypto.mscapi/windows/native/libsunmscapi/security.cpp Thu Mar 01 16:35:36 2018 -0500
+++ b/src/jdk.crypto.mscapi/windows/native/libsunmscapi/security.cpp Fri Mar 02 21:00:12 2018 +0100
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2005, 2016, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2005, 2018, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
@@ -92,7 +92,7 @@
* Overloaded 'operator new[]' variant, which will raise Java's
* OutOfMemoryError in the case of a failure.
*/
-static void* operator new[](std::size_t size, JNIEnv *env)
+void* operator new[](std::size_t size, JNIEnv *env)
{
void* buf = ::operator new[](size, std::nothrow);
if (buf == NULL) {
@@ -1356,212 +1356,6 @@
}
}
-
-
-
-/*
- * Class: sun_security_mscapi_RSACipher
- * Method: findCertificateUsingAlias
- * Signature: (Ljava/lang/String;Ljava/lang/String;)J
- */
-JNIEXPORT jlong JNICALL Java_sun_security_mscapi_RSACipher_findCertificateUsingAlias
- (JNIEnv *env, jobject obj, jstring jCertStoreName, jstring jCertAliasName)
-{
- const char* pszCertStoreName = NULL;
- const char* pszCertAliasName = NULL;
- HCERTSTORE hCertStore = NULL;
- PCCERT_CONTEXT pCertContext = NULL;
- char* pszNameString = NULL; // certificate's friendly name
- DWORD cchNameString = 0;
-
- __try
- {
- if ((pszCertStoreName = env->GetStringUTFChars(jCertStoreName, NULL))
- == NULL) {
- __leave;
- }
- if ((pszCertAliasName = env->GetStringUTFChars(jCertAliasName, NULL))
- == NULL) {
- __leave;
- }
-
- // Open a system certificate store.
- if ((hCertStore = ::CertOpenSystemStore(NULL, pszCertStoreName)) == NULL) {
- ThrowException(env, KEYSTORE_EXCEPTION, GetLastError());
- __leave;
- }
-
- // Use CertEnumCertificatesInStore to get the certificates
- // from the open store. pCertContext must be reset to
- // NULL to retrieve the first certificate in the store.
- while (pCertContext = ::CertEnumCertificatesInStore(hCertStore, pCertContext))
- {
- if ((cchNameString = ::CertGetNameString(pCertContext,
- CERT_NAME_FRIENDLY_DISPLAY_TYPE, 0, NULL, NULL, 0)) == 1) {
-
- continue; // not found
- }
-
- pszNameString = new (env) char[cchNameString];
- if (pszNameString == NULL) {
- __leave;
- }
-
- if (::CertGetNameString(pCertContext,
- CERT_NAME_FRIENDLY_DISPLAY_TYPE, 0, NULL, pszNameString,
- cchNameString) == 1) {
-
- continue; // not found
- }
-
- // Compare the certificate's friendly name with supplied alias name
- if (strcmp(pszCertAliasName, pszNameString) == 0) {
- delete [] pszNameString;
- break;
-
- } else {
- delete [] pszNameString;
- }
- }
- }
- __finally
- {
- if (hCertStore)
- ::CertCloseStore(hCertStore, 0);
-
- if (pszCertStoreName)
- env->ReleaseStringUTFChars(jCertStoreName, pszCertStoreName);
-
- if (pszCertAliasName)
- env->ReleaseStringUTFChars(jCertAliasName, pszCertAliasName);
- }
-
- return (jlong) pCertContext;
-}
-
-/*
- * Class: sun_security_mscapi_RSACipher
- * Method: getKeyFromCert
- * Signature: (JZ)J
- */
-JNIEXPORT jlong JNICALL Java_sun_security_mscapi_RSACipher_getKeyFromCert
- (JNIEnv *env, jobject obj, jlong pCertContext, jboolean usePrivateKey)
-{
- HCRYPTPROV hCryptProv = NULL;
- HCRYPTKEY hKey = NULL;
- DWORD dwKeySpec;
- BOOL bCallerFreeProv = FALSE;
- BOOL bRes;
-
- __try
- {
- if (usePrivateKey == JNI_TRUE) {
- // Locate the key container for the certificate's private key
-
- // First, probe it silently
- bRes = ::CryptAcquireCertificatePrivateKey(
- (PCCERT_CONTEXT) pCertContext, CRYPT_ACQUIRE_SILENT_FLAG,
- NULL, &hCryptProv, &dwKeySpec, &bCallerFreeProv);
-
- if (bRes == FALSE && GetLastError() != NTE_SILENT_CONTEXT)
- {
- ThrowException(env, KEYSTORE_EXCEPTION, GetLastError());
- __leave;
- }
-
- if (bCallerFreeProv == TRUE) {
- ::CryptReleaseContext(hCryptProv, NULL);
- bCallerFreeProv = FALSE;
- }
-
- // Now, do it normally (not silently)
- if (::CryptAcquireCertificatePrivateKey(
- (PCCERT_CONTEXT) pCertContext, 0, NULL, &hCryptProv,
- &dwKeySpec, &bCallerFreeProv) == FALSE)
- {
- ThrowException(env, KEYSTORE_EXCEPTION, GetLastError());
- __leave;
- }
-
- // Get a handle to the private key
- if (::CryptGetUserKey(hCryptProv, dwKeySpec, &hKey) == FALSE) {
- ThrowException(env, KEY_EXCEPTION, GetLastError());
- __leave;
- }
- }
- else // use public key
- {
- bCallerFreeProv = TRUE;
-
- // Acquire a CSP context.
- if (::CryptAcquireContext(&hCryptProv, "J2SE", NULL,
- PROV_RSA_FULL, 0) == FALSE)
- {
- // If CSP context hasn't been created, create one.
- //
- if (::CryptAcquireContext(&hCryptProv, "J2SE", NULL,
- PROV_RSA_FULL, CRYPT_NEWKEYSET) == FALSE)
- {
- ThrowException(env, KEYSTORE_EXCEPTION, GetLastError());
- __leave;
- }
- }
-
- // Import the certificate's public key into the key container
- if (::CryptImportPublicKeyInfo(hCryptProv, X509_ASN_ENCODING,
- &(((PCCERT_CONTEXT) pCertContext)->pCertInfo->SubjectPublicKeyInfo),
- &hKey) == FALSE)
- {
- ThrowException(env, KEY_EXCEPTION, GetLastError());
- __leave;
- }
- }
- }
- __finally
- {
- //--------------------------------------------------------------------
- // Clean up.
-
- if (bCallerFreeProv == TRUE && hCryptProv != NULL)
- ::CryptReleaseContext(hCryptProv, 0);
- }
-
- return hKey; // TODO - when finished with this key, call
- // CryptDestroyKey(hKey)
-}
-
-/*
- * Class: sun_security_mscapi_KeyStore
- * Method: getKeyLength
- * Signature: (J)I
- */
-JNIEXPORT jint JNICALL Java_sun_security_mscapi_KeyStore_getKeyLength
- (JNIEnv *env, jobject obj, jlong hKey)
-{
- DWORD dwDataLen = sizeof(DWORD);
- BYTE pbData[sizeof(DWORD)];
- DWORD length = 0;
-
- __try
- {
- // Get key length (in bits)
- //TODO - may need to use KP_BLOCKLEN instead?
- if (!(::CryptGetKeyParam((HCRYPTKEY) hKey, KP_KEYLEN, (BYTE *)pbData, &dwDataLen,
- 0))) {
-
- ThrowException(env, KEY_EXCEPTION, GetLastError());
- __leave;
- }
- length = (DWORD) pbData;
- }
- __finally
- {
- // no cleanup required
- }
-
- return (jint) length;
-}
-
/*
* Class: sun_security_mscapi_RSACipher
* Method: encryptDecrypt
@@ -1804,38 +1598,47 @@
* Convert an array in big-endian byte order into little-endian byte order.
*/
int convertToLittleEndian(JNIEnv *env, jbyteArray source, jbyte* destination,
- int destinationLength) {
+ int destinationLength) {
+
+ int result = -1;
+ jbyte* sourceBytes = NULL;
- int sourceLength = env->GetArrayLength(source);
+ __try {
+ int sourceLength = env->GetArrayLength(source);
+
+ sourceBytes = env->GetByteArrayElements(source, 0);
+ if (sourceBytes == NULL) {
+ __leave;
+ }
- jbyte* sourceBytes = env->GetByteArrayElements(source, 0);
- if (sourceBytes == NULL) {
- return -1;
- }
+ int copyLen = sourceLength;
+ if (sourceLength > destinationLength) {
+ // source might include an extra sign byte
+ if (sourceLength == destinationLength + 1 && sourceBytes[0] == 0) {
+ copyLen--;
+ } else {
+ __leave;
+ }
+ }
- int copyLen = sourceLength;
- if (sourceLength > destinationLength) {
- // source might include an extra sign byte
- if (sourceLength == destinationLength + 1 && sourceBytes[0] == 0) {
- copyLen--;
- } else {
- return -1;
+ // Copy bytes from the end of the source array to the beginning of the
+ // destination array (until the destination array is full).
+ // This ensures that the sign byte from the source array will be excluded.
+ for (int i = 0; i < copyLen; i++) {
+ destination[i] = sourceBytes[sourceLength - 1 - i];
+ }
+ if (copyLen < destinationLength) {
+ memset(destination + copyLen, 0, destinationLength - copyLen);
+ }
+ result = destinationLength;
+ } __finally {
+ // Clean up.
+ if (sourceBytes) {
+ env->ReleaseByteArrayElements(source, sourceBytes, JNI_ABORT);
}
}
- // Copy bytes from the end of the source array to the beginning of the
- // destination array (until the destination array is full).
- // This ensures that the sign byte from the source array will be excluded.
- for (int i = 0; i < copyLen; i++) {
- destination[i] = sourceBytes[sourceLength - 1 - i];
- }
- if (copyLen < destinationLength) {
- memset(destination + copyLen, 0, destinationLength - copyLen);
- }
-
- env->ReleaseByteArrayElements(source, sourceBytes, JNI_ABORT);
-
- return destinationLength;
+ return result;
}
/*
--- a/src/jdk.httpserver/share/classes/sun/net/httpserver/ServerImpl.java Thu Mar 01 16:35:36 2018 -0500
+++ b/src/jdk.httpserver/share/classes/sun/net/httpserver/ServerImpl.java Fri Mar 02 21:00:12 2018 +0100
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2005, 2017, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2005, 2018, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
@@ -395,7 +395,6 @@
} else {
try {
if (key.isReadable()) {
- boolean closed;
SocketChannel chan = (SocketChannel)key.channel();
HttpConnection conn = (HttpConnection)key.attachment();
@@ -437,7 +436,6 @@
}
public void handle (SocketChannel chan, HttpConnection conn)
- throws IOException
{
try {
Exchange t = new Exchange (chan, protocol, conn);
@@ -448,6 +446,9 @@
} catch (IOException e) {
logger.log (Level.TRACE, "Dispatcher (5)", e);
closeConnection(conn);
+ } catch (Throwable e) {
+ logger.log (Level.TRACE, "Dispatcher (6)", e);
+ closeConnection(conn);
}
}
}
--- a/src/jdk.javadoc/share/classes/jdk/javadoc/internal/doclets/formats/html/HtmlConfiguration.java Thu Mar 01 16:35:36 2018 -0500
+++ b/src/jdk.javadoc/share/classes/jdk/javadoc/internal/doclets/formats/html/HtmlConfiguration.java Fri Mar 02 21:00:12 2018 +0100
@@ -307,8 +307,7 @@
}
if (htmlVersion == null) {
- reporter.print(WARNING, getText("doclet.HTML_version_not_specified", helpfile));
- htmlVersion = HtmlVersion.HTML4;
+ htmlVersion = HtmlVersion.HTML5;
}
// check if helpfile exists
@@ -658,6 +657,7 @@
new Option(resources, "-html4") {
@Override
public boolean process(String opt, List<String> args) {
+ reporter.print(WARNING, getText("doclet.HTML_4_specified", helpfile));
htmlVersion = HtmlVersion.HTML4;
return true;
}
--- a/src/jdk.javadoc/share/classes/jdk/javadoc/internal/doclets/formats/html/resources/standard.properties Thu Mar 01 16:35:36 2018 -0500
+++ b/src/jdk.javadoc/share/classes/jdk/javadoc/internal/doclets/formats/html/resources/standard.properties Fri Mar 02 21:00:12 2018 +0100
@@ -445,9 +445,8 @@
disable checks for the specified packages.
# L10N: do not localize the option names -html4 and -html5
-doclet.HTML_version_not_specified=\
- You have not specified the version of HTML to use.\n\
- The default is currently HTML 4.01, but this will change to HTML5\n\
- in a future release. To suppress this warning, please specify the\n\
- version of HTML used in your documentation comments and to be\n\
- generated by this doclet, using the -html4 or -html5 options.
+doclet.HTML_4_specified=\
+ You have specified the HTML version as HTML 4.01 by using the -html4 option.\n\
+ The default is currently HTML5 and the support for HTML 4.01 will be removed\n\
+ in a future release. To suppress this warning, please ensure that any HTML constructs\n\
+ in your comments are valid in HTML5, and remove the -html4 option.
--- a/src/jdk.jshell/share/classes/jdk/jshell/TaskFactory.java Thu Mar 01 16:35:36 2018 -0500
+++ b/src/jdk.jshell/share/classes/jdk/jshell/TaskFactory.java Fri Mar 02 21:00:12 2018 +0100
@@ -311,15 +311,18 @@
return fm.createSourceFileObject(w, w.classFullName(), w.wrapped());
}
+ /**
+ * Get the source information from the wrap. If this is external, or
+ * otherwise does not have wrap info, just use source code.
+ * @param d the Diagnostic from the compiler
+ * @return the corresponding Diag
+ */
@Override
public Diag diag(Diagnostic<? extends JavaFileObject> d) {
- SourceMemoryJavaFileObject smjfo = (SourceMemoryJavaFileObject) d.getSource();
- if (smjfo == null) {
- // Handle failure that doesn't preserve mapping
- return new StringSourceHandler().diag(d);
- }
- OuterWrap w = (OuterWrap) smjfo.getOrigin();
- return w.wrapDiag(d);
+ JavaFileObject jfo = d.getSource();
+ return jfo instanceof SourceMemoryJavaFileObject
+ ? ((OuterWrap) ((SourceMemoryJavaFileObject) jfo).getOrigin()).wrapDiag(d)
+ : new StringSourceHandler().diag(d);
}
}
--- a/src/jdk.scripting.nashorn/share/classes/jdk/nashorn/internal/codegen/Label.java Thu Mar 01 16:35:36 2018 -0500
+++ b/src/jdk.scripting.nashorn/share/classes/jdk/nashorn/internal/codegen/Label.java Fri Mar 02 21:00:12 2018 +0100
@@ -101,7 +101,7 @@
}
/**
- * Retrieve the top <tt>count</tt> types on the stack without modifying it.
+ * Retrieve the top <code>count</code> types on the stack without modifying it.
*
* @param count number of types to return
* @return array of Types
--- a/src/jdk.scripting.nashorn/share/classes/jdk/nashorn/internal/codegen/MethodEmitter.java Thu Mar 01 16:35:36 2018 -0500
+++ b/src/jdk.scripting.nashorn/share/classes/jdk/nashorn/internal/codegen/MethodEmitter.java Fri Mar 02 21:00:12 2018 +0100
@@ -2057,7 +2057,7 @@
}
/**
- * Retrieve the top <tt>count</tt> types on the stack without modifying it.
+ * Retrieve the top <code>count</code> types on the stack without modifying it.
*
* @param count number of types to return
* @return array of Types
--- a/src/jdk.scripting.nashorn/share/classes/jdk/nashorn/internal/ir/Block.java Thu Mar 01 16:35:36 2018 -0500
+++ b/src/jdk.scripting.nashorn/share/classes/jdk/nashorn/internal/ir/Block.java Fri Mar 02 21:00:12 2018 +0100
@@ -257,7 +257,7 @@
}
/**
- * Test if this block represents a <tt>catch</tt> block in a <tt>try</tt> statement.
+ * Test if this block represents a <code>catch</code> block in a <code>try</code> statement.
* This is used by the Splitter as catch blocks are not be subject to splitting.
*
* @return true if this block represents a catch block in a try statement.
--- a/src/jdk.scripting.nashorn/share/classes/jdk/nashorn/internal/parser/DateParser.java Thu Mar 01 16:35:36 2018 -0500
+++ b/src/jdk.scripting.nashorn/share/classes/jdk/nashorn/internal/parser/DateParser.java Fri Mar 02 21:00:12 2018 +0100
@@ -41,7 +41,7 @@
* of different formats.
*
* <p>This class is neither thread-safe nor reusable. Calling the
- * <tt>parse()</tt> method more than once will yield undefined results.</p>
+ * <code>parse()</code> method more than once will yield undefined results.</p>
*/
public class DateParser {
@@ -118,7 +118,7 @@
}
/**
- * Construct a new <tt>DateParser</tt> instance for parsing the given string.
+ * Construct a new <code>DateParser</code> instance for parsing the given string.
* @param string the string to be parsed
*/
public DateParser(final String string) {
@@ -130,7 +130,7 @@
/**
* Try parsing the given string as date according to the extended ISO 8601 format
* specified in ES5 15.9.1.15. Fall back to legacy mode if that fails.
- * This method returns <tt>true</tt> if the string could be parsed.
+ * This method returns <code>true</code> if the string could be parsed.
* @return true if the string could be parsed as date
*/
public boolean parse() {
@@ -143,8 +143,8 @@
*
* <pre> [('-'|'+')yy]yyyy[-MM[-dd]][Thh:mm[:ss[.sss]][Z|(+|-)hh:mm]] </pre>
*
- * <p>If the string does not contain a time zone offset, the <tt>TIMEZONE</tt> field
- * is set to <tt>0</tt> (GMT).</p>
+ * <p>If the string does not contain a time zone offset, the <code>TIMEZONE</code> field
+ * is set to <code>0</code> (GMT).</p>
* @return true if string represents a valid ES5 date string.
*/
public boolean parseEcmaDate() {
@@ -221,14 +221,14 @@
/**
* Try parsing the date using a fuzzy algorithm that can handle a variety of formats.
*
- * <p>Numbers separated by <tt>':'</tt> are treated as time values, optionally followed by a
- * millisecond value separated by <tt>'.'</tt>. Other number values are treated as date values.
+ * <p>Numbers separated by <code>':'</code> are treated as time values, optionally followed by a
+ * millisecond value separated by <code>'.'</code>. Other number values are treated as date values.
* The exact sequence of day, month, and year values to apply is determined heuristically.</p>
*
* <p>English month names and selected time zone names as well as AM/PM markers are recognized
- * and handled properly. Additionally, numeric time zone offsets such as <tt>(+|-)hh:mm</tt> or
- * <tt>(+|-)hhmm</tt> are recognized. If the string does not contain a time zone offset
- * the <tt>TIMEZONE</tt>field is left undefined, meaning the local time zone should be applied.</p>
+ * and handled properly. Additionally, numeric time zone offsets such as <code>(+|-)hh:mm</code> or
+ * <code>(+|-)hhmm</code> are recognized. If the string does not contain a time zone offset
+ * the <code>TIMEZONE</code>field is left undefined, meaning the local time zone should be applied.</p>
*
* <p>English weekday names are recognized but ignored. All text in parentheses is ignored as well.
* All other text causes parsing to fail.</p>
@@ -331,10 +331,10 @@
}
/**
- * Get the parsed date and time fields as an array of <tt>Integers</tt>.
+ * Get the parsed date and time fields as an array of <code>Integers</code>.
*
* <p>If parsing was successful, all fields are guaranteed to be set except for the
- * <tt>TIMEZONE</tt> field which may be <tt>null</tt>, meaning that local time zone
+ * <code>TIMEZONE</code> field which may be <code>null</code>, meaning that local time zone
* offset should be applied.</p>
*
* @return the parsed date fields
--- a/src/jdk.scripting.nashorn/share/classes/jdk/nashorn/internal/parser/Lexer.java Thu Mar 01 16:35:36 2018 -0500
+++ b/src/jdk.scripting.nashorn/share/classes/jdk/nashorn/internal/parser/Lexer.java Fri Mar 02 21:00:12 2018 +0100
@@ -592,7 +592,7 @@
/**
* Check whether the given token represents the beginning of a literal. If so scan
- * the literal and return <tt>true</tt>, otherwise return false.
+ * the literal and return <code>true</code>, otherwise return false.
*
* @param token the token.
* @param startTokenType the token type.
--- a/src/jdk.scripting.nashorn/share/classes/jdk/nashorn/internal/runtime/ConsString.java Thu Mar 01 16:35:36 2018 -0500
+++ b/src/jdk.scripting.nashorn/share/classes/jdk/nashorn/internal/runtime/ConsString.java Fri Mar 02 21:00:12 2018 +0100
@@ -32,7 +32,7 @@
/**
* This class represents a string composed of two parts which may themselves be
- * instances of <tt>ConsString</tt> or {@link String}. Copying of characters to
+ * instances of <code>ConsString</code> or {@link String}. Copying of characters to
* a proper string is delayed until it becomes necessary.
*/
public final class ConsString implements CharSequence {
--- a/src/jdk.scripting.nashorn/share/classes/jdk/nashorn/internal/runtime/linker/NameCodec.java Thu Mar 01 16:35:36 2018 -0500
+++ b/src/jdk.scripting.nashorn/share/classes/jdk/nashorn/internal/runtime/linker/NameCodec.java Fri Mar 02 21:00:12 2018 +0100
@@ -60,15 +60,15 @@
* Dangerous characters are the union of all characters forbidden
* or otherwise restricted by the JVM specification,
* plus their mates, if they are brackets
- * (<code><big><b>[</b></big></code> and <code><big><b>]</b></big></code>,
- * <code><big><b><</b></big></code> and <code><big><b>></b></big></code>),
- * plus, arbitrarily, the colon character <code><big><b>:</b></big></code>.
+ * (<code><b>[</b></code> and <code><b>]</b></code>,
+ * <code><b><</b></code> and <code><b>></b></code>),
+ * plus, arbitrarily, the colon character <code><b>:</b></code>.
* There is no distinction between type, method, and field names.
* This makes it easier to convert between mangled names of different
* types, since they do not need to be decoded (demangled).
* </p>
* <p>
- * The escape character is backslash <code><big><b>\</b></big></code>
+ * The escape character is backslash <code><b>\</b></code>
* (also known as reverse solidus).
* This character is, until now, unheard of in bytecode names,
* but traditional in the proposed role.
@@ -92,32 +92,32 @@
* </p>
* <p>
* The dangerous characters are
- * <code><big><b>/</b></big></code> (forward slash, used to delimit package components),
- * <code><big><b>.</b></big></code> (dot, also a package delimiter),
- * <code><big><b>;</b></big></code> (semicolon, used in signatures),
- * <code><big><b>$</b></big></code> (dollar, used in inner classes and synthetic members),
- * <code><big><b><</b></big></code> (left angle),
- * <code><big><b>></b></big></code> (right angle),
- * <code><big><b>[</b></big></code> (left square bracket, used in array types),
- * <code><big><b>]</b></big></code> (right square bracket, reserved in this scheme for language use),
- * and <code><big><b>:</b></big></code> (colon, reserved in this scheme for language use).
+ * <code><b>/</b></code> (forward slash, used to delimit package components),
+ * <code><b>.</b></code> (dot, also a package delimiter),
+ * <code><b>;</b></code> (semicolon, used in signatures),
+ * <code><b>$</b></code> (dollar, used in inner classes and synthetic members),
+ * <code><b><</b></code> (left angle),
+ * <code><b>></b></code> (right angle),
+ * <code><b>[</b></code> (left square bracket, used in array types),
+ * <code><b>]</b></code> (right square bracket, reserved in this scheme for language use),
+ * and <code><b>:</b></code> (colon, reserved in this scheme for language use).
* Their replacements are, respectively,
- * <code><big><b>|</b></big></code> (vertical bar),
- * <code><big><b>,</b></big></code> (comma),
- * <code><big><b>?</b></big></code> (question mark),
- * <code><big><b>%</b></big></code> (percent),
- * <code><big><b>^</b></big></code> (caret),
- * <code><big><b>_</b></big></code> (underscore), and
- * <code><big><b>{</b></big></code> (left curly bracket),
- * <code><big><b>}</b></big></code> (right curly bracket),
- * <code><big><b>!</b></big></code> (exclamation mark).
+ * <code><b>|</b></code> (vertical bar),
+ * <code><b>,</b></code> (comma),
+ * <code><b>?</b></code> (question mark),
+ * <code><b>%</b></code> (percent),
+ * <code><b>^</b></code> (caret),
+ * <code><b>_</b></code> (underscore), and
+ * <code><b>{</b></code> (left curly bracket),
+ * <code><b>}</b></code> (right curly bracket),
+ * <code><b>!</b></code> (exclamation mark).
* In addition, the replacement character for the escape character itself is
- * <code><big><b>-</b></big></code> (hyphen),
+ * <code><b>-</b></code> (hyphen),
* and the replacement character for the null prefix is
- * <code><big><b>=</b></big></code> (equal sign).
+ * <code><b>=</b></code> (equal sign).
* </p>
* <p>
- * An escape character <code><big><b>\</b></big></code>
+ * An escape character <code><b>\</b></code>
* followed by any of these replacement characters
* is an escape sequence, and there are no other escape sequences.
* An equal sign is only part of an escape sequence
@@ -135,16 +135,16 @@
* string can contain <cite>accidental escapes</cite>, apparent escape
* sequences which must not be interpreted as manglings.
* These are disabled by replacing their leading backslash with an
- * escape sequence (<code><big><b>\-</b></big></code>). To mangle a string, three logical steps
+ * escape sequence (<code><b>\-</b></code>). To mangle a string, three logical steps
* are required, though they may be carried out in one pass:
* </p>
* <ol>
* <li>In each accidental escape, replace the backslash with an escape sequence
- * (<code><big><b>\-</b></big></code>).</li>
+ * (<code><b>\-</b></code>).</li>
* <li>Replace each dangerous character with an escape sequence
- * (<code><big><b>\|</b></big></code> for <code><big><b>/</b></big></code>, etc.).</li>
+ * (<code><b>\|</b></code> for <code><b>/</b></code>, etc.).</li>
* <li>If the first two steps introduced any change, <em>and</em>
- * if the string does not already begin with a backslash, prepend a null prefix (<code><big><b>\=</b></big></code>).</li>
+ * if the string does not already begin with a backslash, prepend a null prefix (<code><b>\=</b></code>).</li>
* </ol>
*
* To demangle a mangled string that begins with an escape,
@@ -174,9 +174,9 @@
* is a many-to-one function.
* A mangled string is defined as <cite>validly mangled</cite> if
* it is in fact the unique mangling of its spelling string.
- * Three examples of invalidly mangled strings are <code><big><b>\=foo</b></big></code>,
- * <code><big><b>\-bar</b></big></code>, and <code><big><b>baz\!</b></big></code>, which demangle to <code><big><b>foo</b></big></code>, <code><big><b>\bar</b></big></code>, and
- * <code><big><b>baz\!</b></big></code>, but then remangle to <code><big><b>foo</b></big></code>, <code><big><b>\bar</b></big></code>, and <code><big><b>\=baz\-!</b></big></code>.
+ * Three examples of invalidly mangled strings are <code><b>\=foo</b></code>,
+ * <code><b>\-bar</b></code>, and <code><b>baz\!</b></code>, which demangle to <code><b>foo</b></code>, <code><b>\bar</b></code>, and
+ * <code><b>baz\!</b></code>, but then remangle to <code><b>foo</b></code>, <code><b>\bar</b></code>, and <code><b>\=baz\-!</b></code>.
* If a language back-end or runtime is using mangled names,
* it should never present an invalidly mangled bytecode
* name to the JVM. If the runtime encounters one,
@@ -237,10 +237,10 @@
* </p>
* <p>
* For example, an HTML-like spelling
- * <code><big><b><pre></b></big></code> mangles to
- * <code><big><b>\^pre\_</b></big></code> and could
+ * <code><b><pre></b></code> mangles to
+ * <code><b>\^pre\_</b></code> and could
* display more cleanly as
- * <code><big><b>'<pre>'</b></big></code>,
+ * <code><b>'<pre>'</b></code>,
* with the quotes included.
* Such string-like conventions are <em>not</em> suitable
* for mangled bytecode names, in part because
@@ -256,11 +256,11 @@
* which contain dangerous characters (like dots in field
* names or brackets in method names) should not be
* simply quoted. The bytecode names
- * <code><big><b>\=phase\,1</b></big></code> and
- * <code><big><b>phase.1</b></big></code> are distinct,
+ * <code><b>\=phase\,1</b></code> and
+ * <code><b>phase.1</b></code> are distinct,
* and in demangled displays they should be presented as
- * <code><big><b>'phase.1'</b></big></code> and something like
- * <code><big><b>'phase'.1</b></big></code>, respectively.
+ * <code><b>'phase.1'</b></code> and something like
+ * <code><b>'phase'.1</b></code>, respectively.
* </p>
*/
public final class NameCodec {
--- a/test/TestCommon.gmk Thu Mar 01 16:35:36 2018 -0500
+++ b/test/TestCommon.gmk Fri Mar 02 21:00:12 2018 +0100
@@ -34,6 +34,9 @@
USE_JTREG_ASSERT ?= true
LIMIT_JTREG_VM_MEMORY ?= true
+X:=
+SPACE:=$(X) $(X)
+
.DEFAULT : all
# Empty these to get rid of some default rules
@@ -87,6 +90,11 @@
endif
endif
+# convert list of directories to dos paths
+define MixedDirs
+$(foreach i,$1,$(shell $(GETMIXEDPATH) "${i}"))
+endef
+
ifdef ALT_SLASH_JAVA
SLASH_JAVA = $(ALT_SLASH_JAVA)
endif
@@ -124,6 +132,19 @@
PRODUCT_HOME := $(PRODUCT_HOME)
endif
+# On Windows, setup the _NT_SYMBOL_PATH if possible.
+ifeq ($(PLATFORM), windows)
+ ifndef _NT_SYMBOL_PATH
+ ifdef PRODUCT_SYMBOLS_HOME
+ _NT_SYMBOL_PATH := \
+ $(subst $(SPACE),;,$(strip $(call MixedDirs, $(sort $(dir $(wildcard \
+ $(addprefix $(PRODUCT_SYMBOLS_HOME)/bin/, *.pdb */*.pdb)))))))
+ export _NT_SYMBOL_PATH
+ endif
+ endif
+ JTREG_BASIC_OPTIONS += -e:_NT_SYMBOL_PATH='$(_NT_SYMBOL_PATH)'
+endif
+
# Expect JPRT to set JPRT_PRODUCT_ARGS (e.g. -server etc.)
# Should be passed into 'java' only.
# Could include: -d64 -server -client OR any java option
@@ -335,11 +356,6 @@
JTREG_EXCLUSIONS = $(addprefix -exclude:, $(wildcard $(PROBLEM_LISTS)))
endif
-# convert list of directories to dos paths
-define MixedDirs
-$(foreach i,$1,$(shell $(GETMIXEDPATH) "${i}"))
-endef
-
# ------------------------------------------------------------------
# When called from JPRT the TESTDIRS variable is set to the jtreg tests to run
--- a/test/jdk/ProblemList.txt Thu Mar 01 16:35:36 2018 -0500
+++ b/test/jdk/ProblemList.txt Fri Mar 02 21:00:12 2018 +0100
@@ -111,8 +111,10 @@
# jdk_awt
+java/awt/BasicStroke/DashScaleMinWidth.java 8198411 windows-all
+java/awt/BasicStroke/DashZeroWidth.java 8198411 windows-all
java/awt/event/MouseEvent/MouseClickTest/MouseClickTest.html 8168389 windows-all,macosx-all
-java/awt/Focus/ActualFocusedWindowTest/ActualFocusedWindowBlockingTest.java 8168408 windows-all
+java/awt/Focus/ActualFocusedWindowTest/ActualFocusedWindowBlockingTest.java 8168408 windows-all,macosx-all
java/awt/Focus/FocusOwnerFrameOnClick/FocusOwnerFrameOnClick.java 8081489 generic-all
java/awt/Focus/IconifiedFrameFocusChangeTest/IconifiedFrameFocusChangeTest.java 6849364 generic-all
java/awt/Focus/AutoRequestFocusTest/AutoRequestFocusToFrontTest.java 6848406 generic-all
@@ -120,28 +122,62 @@
java/awt/Frame/MaximizedUndecorated/MaximizedUndecorated.java 8022302 generic-all
java/awt/FileDialog/FileDialogIconTest/FileDialogIconTest.java 8160558 windows-all
+java/awt/FileDialog/8003399/bug8003399.java 8198334 windows-all
java/awt/event/MouseWheelEvent/InfiniteRecursion/InfiniteRecursion.java 8060176 windows-all,macosx-all
java/awt/event/MouseWheelEvent/InfiniteRecursion/InfiniteRecursion_1.java 8060176 windows-all,macosx-all
java/awt/dnd/BadSerializaionTest/BadSerializationTest.java 8039082 generic-all
-java/awt/Focus/ChoiceFocus/ChoiceFocus.java 8169103 windows-all
+java/awt/dnd/MissingEventsOnModalDialog/MissingEventsOnModalDialogTest.java 8164464 linux-all,macosx-all
+java/awt/dnd/URIListBetweenJVMsTest/URIListBetweenJVMsTest.html 8171510 macosx-all
+java/awt/dnd/7171812/bug7171812.java 8041447 macosx-all
+java/awt/Focus/ChoiceFocus/ChoiceFocus.java 8169103 windows-all,macosx-all
+java/awt/Focus/ClearLwQueueBreakTest/ClearLwQueueBreakTest.java 8198618 macosx-all
+java/awt/Focus/ConsumeNextKeyTypedOnModalShowTest/ConsumeNextKeyTypedOnModalShowTest.java 6986252 macosx-all
+java/awt/Focus/FocusTraversalPolicy/ButtonGroupLayoutTraversal/ButtonGroupLayoutTraversalTest.java 8198619 macosx-all
+java/awt/Focus/KeyEventForBadFocusOwnerTest/KeyEventForBadFocusOwnerTest.java 8198621 macosx-all
+java/awt/Focus/MouseClickRequestFocusRaceTest/MouseClickRequestFocusRaceTest.java 8194753 linux-all,macosx-all
+java/awt/Focus/NoAutotransferToDisabledCompTest/NoAutotransferToDisabledCompTest.java 7152980 macosx-all
+java/awt/Focus/ShowFrameCheckForegroundTest/ShowFrameCheckForegroundTest.java 8028701 macosx-all
+java/awt/Focus/SimpleWindowActivationTest/SimpleWindowActivationTest.java 8159599 macosx-all
+java/awt/Focus/TypeAhead/TestFocusFreeze.java 8198622 macosx-all
+java/awt/Focus/WrongKeyTypedConsumedTest/WrongKeyTypedConsumedTest.java 8169096 macosx-all
java/awt/event/KeyEvent/CorrectTime/CorrectTime.java 6626492 generic-all
+java/awt/EventQueue/6980209/bug6980209.java 8198615 macosx-all
java/awt/Frame/MaximizedToUnmaximized/MaximizedToUnmaximized.java 8129569 generic-all
+java/awt/Frame/ExceptionOnSetExtendedStateTest/ExceptionOnSetExtendedStateTest.java 8198237 macosx-all
+java/awt/Frame/ShapeNotSetSometimes/ShapeNotSetSometimes.java 8144030 macosx-all
+java/awt/Frame/UnfocusableMaximizedFrameResizablity/UnfocusableMaximizedFrameResizablity.java 7158623 macosx-all
+java/awt/grab/EmbeddedFrameTest1/EmbeddedFrameTest1.java 7080150 macosx-all
java/awt/event/InputEvent/EventWhenTest/EventWhenTest.java 8168646 generic-all
+java/awt/KeyboardFocusmanager/TypeAhead/EnqueueWithDialogButtonTest/EnqueueWithDialogButtonTest.java 8198623 macosx-all
+java/awt/KeyboardFocusmanager/TypeAhead/FreezeTest/FreezeTest.java 8198623 macosx-all
+java/awt/KeyboardFocusmanager/TypeAhead/SubMenuShowTest/SubMenuShowTest.html 8198624 macosx-all
+java/awt/KeyboardFocusmanager/TypeAhead/TestDialogTypeAhead.html 8198626 macosx-all
+java/awt/Mixing/AWT_Mixing/HierarchyBoundsListenerMixingTest.java 8049405 macosx-all
java/awt/Mixing/AWT_Mixing/OpaqueOverlappingChoice.java 8048171 generic-all
-java/awt/Mixing/AWT_Mixing/JMenuBarOverlapping.java 8159451 linux-all,windows-all
+java/awt/Mixing/AWT_Mixing/JMenuBarOverlapping.java 8159451 linux-all,windows-all,macosx-all
java/awt/Mixing/AWT_Mixing/JSplitPaneOverlapping.java 6986109 windows-all
java/awt/Mixing/AWT_Mixing/JInternalFrameMoveOverlapping.java 6986109 windows-all
-java/awt/Mixing/AWT_Mixing/JSplitPaneOverlapping.java 8194765 windows-all
+java/awt/Mixing/AWT_Mixing/JSplitPaneOverlapping.java 8194765 windows-all,macosx-all
java/awt/Mixing/AWT_Mixing/MixingPanelsResizing.java 8049405 generic-all
+java/awt/Mixing/AWT_Mixing/JComboBoxOverlapping.java 8049405 macosx-all
+java/awt/Mixing/AWT_Mixing/JPopupMenuOverlapping.java 8049405 macosx-all
+java/awt/Mixing/NonOpaqueInternalFrame.java 7124549 macosx-all
java/awt/Focus/ActualFocusedWindowTest/ActualFocusedWindowRetaining.java 6829264 generic-all
java/awt/datatransfer/DragImage/MultiResolutionDragImageTest.java 8080982 generic-all
+java/awt/datatransfer/SystemFlavorMap/AddFlavorTest.java 8079268 linux-all
java/awt/Toolkit/ScreenInsetsTest/ScreenInsetsTest.java 6829250 windows-all
+java/awt/Toolkit/RealSync/Test.java 6849383 macosx-all
java/awt/LightweightComponent/LightweightEventTest/LightweightEventTest.java 8159252 windows-all
java/awt/EventDispatchThread/HandleExceptionOnEDT/HandleExceptionOnEDT.java 6990210 generic-all
java/awt/EventDispatchThread/LoopRobustness/LoopRobustness.html 4931413 windows-all
java/awt/FullScreen/FullScreenInsets/FullScreenInsets.java 7019055 windows-all
-java/awt/Focus/8013611/JDK8013611.java 8175366 windows-all
-java/awt/Focus/6981400/Test1.java 8029675 windows-all
+java/awt/FullScreen/UninitializedDisplayModeChangeTest/UninitializedDisplayModeChangeTest.java 8198335 windows-all
+java/awt/Focus/8013611/JDK8013611.java 8175366 windows-all,macosx-all
+java/awt/Focus/6378278/InputVerifierTest.java 8198616 macosx-all
+java/awt/Focus/6382144/EndlessLoopTest.java 8198617 macosx-all
+java/awt/Focus/6981400/Test1.java 8029675 windows-all,macosx-all
+java/awt/Focus/8073453/AWTFocusTransitionTest.java 8136517 macosx-all
+java/awt/Focus/8073453/SwingFocusTransitionTest.java 8136517 macosx-all
java/awt/Focus/6981400/Test3.java 8173264 generic-all
java/awt/event/KeyEvent/ExtendedKeyCode/ExtendedKeyCodeTest.java 8169476 windows-all
java/awt/event/KeyEvent/KeyChar/KeyCharTest.java 8169474 windows-all
@@ -152,8 +188,8 @@
java/awt/dnd/URIListToFileListBetweenJVMsTest/URIListToFileListBetweenJVMsTest.html 8194947 generic-all
java/awt/dnd/ImageTransferTest/ImageTransferTest.java 8176556 generic-all
-java/awt/Dialog/MakeWindowAlwaysOnTop/MakeWindowAlwaysOnTop.java 7054585 generic-all
java/awt/Frame/SetMaximizedBounds/SetMaximizedBounds.java 8196006 windows-all
+java/awt/Frame/FramesGC/FramesGC.java 8079069 macosx-all
java/awt/FullScreen/AltTabCrashTest/AltTabCrashTest.java 8047218 generic-all
java/awt/GridLayout/LayoutExtraGaps/LayoutExtraGaps.java 8000171 windows-all
java/awt/Mouse/GetMousePositionTest/GetMousePositionWithPopup.java 8196017 windows-all
@@ -161,7 +197,7 @@
java/awt/TrayIcon/ActionCommand/ActionCommand.java 8150540 windows-all
java/awt/TrayIcon/ActionEventMask/ActionEventMask.java 8150540 windows-all
java/awt/TrayIcon/ActionEventTest/ActionEventTest.java 8150540 windows-all
-java/awt/TrayIcon/ModalityTest/ModalityTest.java 8150540 windows-all
+java/awt/TrayIcon/ModalityTest/ModalityTest.java 8150540 windows-all,macosx-all
java/awt/TrayIcon/MouseEventMask/MouseEventMaskTest.java 8150540 windows-all
java/awt/TrayIcon/MouseEventMask/MouseEventMovedTest.java 8150540 windows-all
java/awt/TrayIcon/MouseMovedTest/MouseMovedTest.java 8150540 windows-all
@@ -169,102 +205,275 @@
java/awt/TrayIcon/TrayIconEventModifiers/TrayIconEventModifiersTest.java 8150540 windows-all
java/awt/TrayIcon/TrayIconEvents/TrayIconEventsTest.java 8150540 windows-all
java/awt/TrayIcon/TrayIconMouseTest/TrayIconMouseTest.java 8150540 windows-all
-java/awt/TrayIcon/TrayIconPopup/TrayIconPopupClickTest.java 8150540 windows-all
+java/awt/TrayIcon/TrayIconPopup/TrayIconPopupClickTest.java 8150540 windows-all,macosx-all
java/awt/TrayIcon/TrayIconPopup/TrayIconPopupTest.java 8150540 windows-all
java/awt/TrayIcon/PopupMenuLeakTest/PopupMenuLeakTest.java 8196440 linux-all
java/awt/Window/Grab/GrabTest.java 8196019 windows-all
java/awt/Window/ShapedAndTranslucentWindows/ShapedTranslucentWindowClick.java 8196020 windows-all
+java/awt/Window/ShapedAndTranslucentWindows/FocusAWTTest.java 8061236 macosx-all
+java/awt/Window/ShapedAndTranslucentWindows/SetShapeAndClick.java 8197936 macosx-all
+java/awt/Window/ShapedAndTranslucentWindows/SetShapeDynamicallyAndClick.java 8013450 macosx-all
+java/awt/Window/ShapedAndTranslucentWindows/Shaped.java 8078999 macosx-all
+java/awt/Window/ShapedAndTranslucentWindows/ShapedByAPI.java 8078999 macosx-all
+java/awt/Window/ShapedAndTranslucentWindows/ShapedTranslucent.java 8078999 macosx-all
+java/awt/Window/ShapedAndTranslucentWindows/ShapedTranslucentWindowClick.java 8196020 macosx-all
+java/awt/Window/ShapedAndTranslucentWindows/StaticallyShaped.java 8165218 macosx-all
+java/awt/Window/AlwaysOnTop/AutoTestOnTop.java 6847593 macosx-all
+java/awt/Window/GrabSequence/GrabSequence.java 6848409 macosx-all
java/awt/font/TextLayout/CombiningPerf.java 8192931 generic-all
+java/awt/font/TextLayout/TextLayoutBounds.java 8169188 macosx-all
+java/awt/font/MonospacedGlyphWidth/MonospacedGlyphWidthTest.java 8198412 linux-all,solaris-all
+java/awt/font/StyledMetrics/BoldSpace.java 8198422 linux-all
+java/awt/FontMetrics/FontCrash.java 8198336 windows-all
java/awt/image/DrawImage/IncorrectAlphaSurface2SW.java 8056077 generic-all
java/awt/image/DrawImage/IncorrectClipXorModeSW2Surface.java 8196025 windows-all
java/awt/image/DrawImage/IncorrectClipXorModeSurface2Surface.java 8196025 windows-all
java/awt/image/DrawImage/IncorrectSourceOffset.java 8196086 windows-all
java/awt/image/DrawImage/IncorrectUnmanagedImageRotatedClip.java 8196087 windows-all
+java/awt/image/MultiResolutionImage/MultiResolutionDrawImageWithTransformTest.java 8198390 generic-all
+java/awt/image/multiresolution/MultiresolutionIconTest.java 8169187 macosx-all
java/awt/print/Headless/HeadlessPrinterJob.java 8196088 windows-all
+java/awt/print/PrinterJob/TestPgfmtSetMPA.java 8198343 generic-all
+sun/awt/datatransfer/SuplementaryCharactersTransferTest.java 8011371 generic-all
+sun/awt/shell/ShellFolderMemoryLeak.java 8197794 windows-all
sun/java2d/DirectX/OnScreenRenderingResizeTest/OnScreenRenderingResizeTest.java 8022403 generic-all
sun/java2d/DirectX/OverriddenInsetsTest/OverriddenInsetsTest.java 8196102 generic-all
sun/java2d/DirectX/RenderingToCachedGraphicsTest/RenderingToCachedGraphicsTest.java 8196180 windows-all
sun/java2d/GdiRendering/InsetClipping.java 8196181 windows-all
-sun/java2d/OpenGL/CopyAreaOOB.java 7001973 windows-all
+sun/java2d/OpenGL/CopyAreaOOB.java 7001973 windows-all,macosx-all
+sun/java2d/SunGraphics2D/EmptyClipRenderingTest.java 8144029 macosx-all
sun/java2d/SunGraphics2D/DrawImageBilinear.java 8191506 generic-all
sun/java2d/SunGraphics2D/PolyVertTest.java 6986565 generic-all
sun/java2d/SunGraphics2D/SimplePrimQuality.java 7992007 generic-all
-sun/java2d/SunGraphics2D/SourceClippingBlitTest/SourceClippingBlitTest.java 8196191 windows-all
-sun/java2d/pipe/InterpolationQualityTest.java 8171303 windows-all,linux-all
+sun/java2d/SunGraphics2D/SourceClippingBlitTest/SourceClippingBlitTest.java 8196191 windows-all,macosx-all
+sun/java2d/pipe/InterpolationQualityTest.java 8171303 windows-all,linux-all,macosx-all
java/awt/FullScreen/BufferStrategyExceptionTest/BufferStrategyExceptionTest.java 8196186 windows-all
java/awt/FullScreen/DisplayChangeVITest/DisplayChangeVITest.java 8169469 windows-all
java/awt/FullScreen/NonExistentDisplayModeTest/NonExistentDisplayModeTest.java 8196187 windows-all
java/awt/Graphics/ClippedCopyAreaTest/ClippedCopyAreaTest.java 8196436 linux-all
java/awt/Graphics/CopyScaledArea/CopyScaledAreaTest.java 8196189 windows-all
+java/awt/Graphics2D/DrawString/DrawRotatedStringUsingRotatedFont.java 8197796 generic-all
java/awt/GraphicsDevice/CloneConfigsTest.java 8196190 windows-all
java/awt/TextArea/TextAreaScrolling/TextAreaScrolling.java 8196300 windows-all
java/awt/print/PrinterJob/Margins.java 8196301 windows-all
+java/awt/print/PrinterJob/PSQuestionMark.java 7003378 windows-all
+java/awt/print/PrinterJob/GlyphPositions.java 7003378 windows-all
java/awt/Choice/PopupPosTest/PopupPosTest.html 8192930 windows-all
+java/awt/Choice/ChoiceKeyEventReaction/ChoiceKeyEventReaction.html 6849922 macosx-all
+java/awt/Choice/ChoiceMouseWheelTest/ChoiceMouseWheelTest.java 7100044 macosx-all
+java/awt/Component/CreateImage/CreateImage.java 8198334 windows-all
java/awt/Component/GetScreenLocTest.java 4753654 windows-all
java/awt/Choice/SelectCurrentItemTest/SelectCurrentItemTest.html 8192929 windows-all
-java/awt/Dialog/MakeWindowAlwaysOnTop/MakeWindowAlwaysOnTop.java 7054586 windows-all
+java/awt/Clipboard/HTMLTransferTest/HTMLTransferTest.html 8017454 macosx-all
java/awt/Dialog/SiblingChildOrder/SiblingChildOrderTest.java 8193940 windows-all
java/awt/Focus/NonFocusableWindowTest/NoEventsTest.java 8000171 windows-all
java/awt/Frame/MiscUndecorated/RepaintTest.java 8079267 windows-all
java/awt/Robot/ModifierRobotKey/ModifierRobotKeyTest.java 8157173 windows-all
+java/awt/Modal/FileDialog/FileDialogAppModal1Test.java 8198664 macosx-all
+java/awt/Modal/FileDialog/FileDialogAppModal2Test.java 8198664 macosx-all
+java/awt/Modal/FileDialog/FileDialogAppModal3Test.java 8198664 macosx-all
+java/awt/Modal/FileDialog/FileDialogAppModal4Test.java 8198664 macosx-all
+java/awt/Modal/FileDialog/FileDialogAppModal5Test.java 8198664 macosx-all
+java/awt/Modal/FileDialog/FileDialogAppModal6Test.java 8198664 macosx-all
+java/awt/Modal/FileDialog/FileDialogDocModal1Test.java 8198664 macosx-all
+java/awt/Modal/FileDialog/FileDialogDocModal2Test.java 8198664 macosx-all
+java/awt/Modal/FileDialog/FileDialogDocModal3Test.java 8198664 macosx-all
+java/awt/Modal/FileDialog/FileDialogDocModal4Test.java 8198664 macosx-all
+java/awt/Modal/FileDialog/FileDialogDocModal5Test.java 8198664 macosx-all
+java/awt/Modal/FileDialog/FileDialogDocModal6Test.java 8198664 macosx-all
+java/awt/Modal/FileDialog/FileDialogDocModal7Test.java 8198664 macosx-all
+java/awt/Modal/FileDialog/FileDialogModal1Test.java 8198664 macosx-all
+java/awt/Modal/FileDialog/FileDialogModal2Test.java 8198664 macosx-all
+java/awt/Modal/FileDialog/FileDialogModal3Test.java 8198664 macosx-all
+java/awt/Modal/FileDialog/FileDialogModal4Test.java 8198664 macosx-all
+java/awt/Modal/FileDialog/FileDialogModal5Test.java 8198664 macosx-all
+java/awt/Modal/FileDialog/FileDialogModal6Test.java 8198664 macosx-all
+java/awt/Modal/FileDialog/FileDialogNonModal1Test.java 8198664 macosx-all
+java/awt/Modal/FileDialog/FileDialogNonModal2Test.java 8198664 macosx-all
+java/awt/Modal/FileDialog/FileDialogNonModal3Test.java 8198664 macosx-all
+java/awt/Modal/FileDialog/FileDialogNonModal4Test.java 8198664 macosx-all
+java/awt/Modal/FileDialog/FileDialogNonModal5Test.java 8198664 macosx-all
+java/awt/Modal/FileDialog/FileDialogNonModal6Test.java 8198664 macosx-all
+java/awt/Modal/FileDialog/FileDialogNonModal7Test.java 8198664 macosx-all
java/awt/Modal/FileDialog/FileDialogTKModal1Test.java 8196430 generic-all
java/awt/Modal/FileDialog/FileDialogTKModal2Test.java 8196430 generic-all
java/awt/Modal/FileDialog/FileDialogTKModal3Test.java 8196430 generic-all
java/awt/Modal/FileDialog/FileDialogTKModal4Test.java 8196430 generic-all
java/awt/Modal/FileDialog/FileDialogTKModal5Test.java 8196430 generic-all
java/awt/Modal/FileDialog/FileDialogTKModal6Test.java 8196430 generic-all
-java/awt/Modal/ModalExclusionTests/ApplicationExcludeDialogPageSetupTest.java 8196431 linux-all
-java/awt/Modal/ModalExclusionTests/ApplicationExcludeDialogPrintSetupTest.java 8196431 linux-all
-java/awt/Modal/ModalExclusionTests/ApplicationExcludeFramePageSetupTest.java 8196431 linux-all
-java/awt/Modal/ModalExclusionTests/ApplicationExcludeFramePrintSetupTest.java 8196431 linux-all
-java/awt/Modal/ModalExclusionTests/ToolkitExcludeDialogPageSetupTest.java 8196431 linux-all
-java/awt/Modal/ModalExclusionTests/ToolkitExcludeDialogPrintSetupTest.java 8196431 linux-all
-java/awt/Modal/ModalExclusionTests/ToolkitExcludeFramePageSetupTest.java 8196431 linux-all
-java/awt/Modal/ModalExclusionTests/ToolkitExcludeFramePrintSetupTest.java 8196431 linux-all
+java/awt/Modal/FileDialog/FileDialogTKModal7Test.java 8196430 macosx-all
+java/awt/Modal/ModalBlockingTests/BlockingDDAppModalTest.java 8198665 macosx-all
+java/awt/Modal/ModalBlockingTests/BlockingDDDocModalTest.java 8198665 macosx-all
+java/awt/Modal/ModalBlockingTests/BlockingDDModelessTest.java 8198665 macosx-all
+java/awt/Modal/ModalBlockingTests/BlockingDDNonModalTest.java 8198665 macosx-all
+java/awt/Modal/ModalBlockingTests/BlockingDDSetModalTest.java 8198665 macosx-all
+java/awt/Modal/ModalBlockingTests/BlockingDDToolkitModalTest.java 8198665 macosx-all
+java/awt/Modal/ModalBlockingTests/BlockingDFAppModalTest.java 8198665 macosx-all
+java/awt/Modal/ModalBlockingTests/BlockingDFSetModalTest.java 8198665 macosx-all
+java/awt/Modal/ModalBlockingTests/BlockingDFToolkitModalTest.java 8198665 macosx-all
+java/awt/Modal/ModalBlockingTests/BlockingDFWModeless1Test.java 8198665 macosx-all
+java/awt/Modal/ModalBlockingTests/BlockingDFWModeless2Test.java 8198665 macosx-all
+java/awt/Modal/ModalBlockingTests/BlockingDFWNonModal1Test.java 8198665 macosx-all
+java/awt/Modal/ModalBlockingTests/BlockingDFWNonModal2Test.java 8198665 macosx-all
+java/awt/Modal/ModalBlockingTests/BlockingDocModalTest.java 8198665 macosx-all
+java/awt/Modal/ModalBlockingTests/BlockingFDModelessTest.java 8198665 macosx-all
+java/awt/Modal/ModalBlockingTests/BlockingFDNonModalTest.java 8198665 macosx-all
+java/awt/Modal/ModalBlockingTests/BlockingFDWDocModal1Test.java 8198665 macosx-all
+java/awt/Modal/ModalBlockingTests/BlockingFDWDocModal2Test.java 8198665 macosx-all
+java/awt/Modal/ModalBlockingTests/BlockingFDWDocModal3Test.java 8198665 macosx-all
+java/awt/Modal/ModalBlockingTests/BlockingFDWDocModal4Test.java 8198665 macosx-all
+java/awt/Modal/ModalBlockingTests/BlockingFDWModeless1Test.java 8198665 macosx-all
+java/awt/Modal/ModalBlockingTests/BlockingFDWModeless2Test.java 8198665 macosx-all
+java/awt/Modal/ModalBlockingTests/BlockingFDWModeless3Test.java 8198665 macosx-all
+java/awt/Modal/ModalBlockingTests/BlockingFDWModeless4Test.java 8198665 macosx-all
+java/awt/Modal/ModalBlockingTests/BlockingFDWNonModal1Test.java 8198665 macosx-all
+java/awt/Modal/ModalBlockingTests/BlockingFDWNonModal2Test.java 8198665 macosx-all
+java/awt/Modal/ModalBlockingTests/BlockingFDWNonModal3Test.java 8198665 macosx-all
+java/awt/Modal/ModalBlockingTests/BlockingFDWNonModal4Test.java 8198665 macosx-all
+java/awt/Modal/ModalBlockingTests/BlockingWindowsAppModal1Test.java 8198665 macosx-all
+java/awt/Modal/ModalBlockingTests/BlockingWindowsAppModal2Test.java 8198665 macosx-all
+java/awt/Modal/ModalBlockingTests/BlockingWindowsAppModal3Test.java 8198665 macosx-all
+java/awt/Modal/ModalBlockingTests/BlockingWindowsAppModal4Test.java 8198665 macosx-all
+java/awt/Modal/ModalBlockingTests/BlockingWindowsAppModal5Test.java 8198665 macosx-all
+java/awt/Modal/ModalBlockingTests/BlockingWindowsAppModal6Test.java 8198665 macosx-all
+java/awt/Modal/ModalBlockingTests/BlockingWindowsDocModal1Test.java 8198665 macosx-all
+java/awt/Modal/ModalBlockingTests/BlockingWindowsDocModal2Test.java 8198665 macosx-all
+java/awt/Modal/ModalBlockingTests/BlockingWindowsSetModal1Test.java 8198665 macosx-all
+java/awt/Modal/ModalBlockingTests/BlockingWindowsSetModal2Test.java 8198665 macosx-all
+java/awt/Modal/ModalBlockingTests/BlockingWindowsSetModal3Test.java 8198665 macosx-all
+java/awt/Modal/ModalBlockingTests/BlockingWindowsSetModal4Test.java 8198665 macosx-all
+java/awt/Modal/ModalBlockingTests/BlockingWindowsSetModal5Test.java 8198665 macosx-all
+java/awt/Modal/ModalBlockingTests/BlockingWindowsSetModal6Test.java 8198665 macosx-all
+java/awt/Modal/ModalBlockingTests/BlockingWindowsToolkitModal1Test.java 8198665 macosx-all
+java/awt/Modal/ModalBlockingTests/BlockingWindowsToolkitModal2Test.java 8198665 macosx-all
+java/awt/Modal/ModalBlockingTests/BlockingWindowsToolkitModal3Test.java 8198665 macosx-all
+java/awt/Modal/ModalBlockingTests/BlockingWindowsToolkitModal4Test.java 8198665 macosx-all
+java/awt/Modal/ModalBlockingTests/BlockingWindowsToolkitModal5Test.java 8198665 macosx-all
+java/awt/Modal/ModalBlockingTests/BlockingWindowsToolkitModal6Test.java 8198665 macosx-all
+java/awt/Modal/ModalBlockingTests/UnblockedDialogAppModalTest.java 8198665 macosx-all
+java/awt/Modal/ModalBlockingTests/UnblockedDialogDocModalTest.java 8198665 macosx-all
+java/awt/Modal/ModalBlockingTests/UnblockedDialogModelessTest.java 8198665 macosx-all
+java/awt/Modal/ModalBlockingTests/UnblockedDialogNonModalTest.java 8198665 macosx-all
+java/awt/Modal/ModalBlockingTests/UnblockedDialogSetModalTest.java 8198665 macosx-all
+java/awt/Modal/ModalBlockingTests/UnblockedDialogToolkitModalTest.java 8198665 macosx-all
+java/awt/Modal/ModalDialogOrderingTest/ModalDialogOrderingTest.java 8066259 macosx-all
+java/awt/Modal/ModalExclusionTests/ApplicationExcludeFrameFileTest.java 8047179 macosx-all
+java/awt/Modal/ModalExclusionTests/ApplicationExcludeDialogFileTest.java 8047179 macosx-all
+java/awt/Modal/ModalExclusionTests/ApplicationExcludeDialogPageSetupTest.java 8196431 linux-all,macosx-all
+java/awt/Modal/ModalExclusionTests/ApplicationExcludeDialogPrintSetupTest.java 8196431 linux-all,macosx-all
+java/awt/Modal/ModalExclusionTests/ApplicationExcludeFramePageSetupTest.java 8196431 linux-all,macosx-all
+java/awt/Modal/ModalExclusionTests/ApplicationExcludeFramePrintSetupTest.java 8196431 linux-all,macosx-all
+java/awt/Modal/ModalExclusionTests/ToolkitExcludeFrameFileTest.java 8047179 macosx-all
+java/awt/Modal/ModalExclusionTests/ToolkitExcludeDialogFileTest.java 8196431 macosx-all
+java/awt/Modal/ModalExclusionTests/ToolkitExcludeDialogPageSetupTest.java 8196431 linux-all,macosx-all
+java/awt/Modal/ModalExclusionTests/ToolkitExcludeDialogPrintSetupTest.java 8196431 linux-all,macosx-all
+java/awt/Modal/ModalExclusionTests/ToolkitExcludeFramePageSetupTest.java 8196431 linux-all,macosx-all
+java/awt/Modal/ModalExclusionTests/ToolkitExcludeFramePrintSetupTest.java 8196431 linux-all,macosx-all
java/awt/Modal/ModalFocusTransferTests/FocusTransferWDFAppModal2Test.java 8058813 windows-all
java/awt/Modal/ModalFocusTransferTests/FocusTransferWDFModeless2Test.java 8196191 windows-all
-java/awt/Modal/ModalFocusTransferTests/FocusTransferDWFDocModalTest.java 8196432 linux-all
-java/awt/Modal/ModalFocusTransferTests/FocusTransferDWFModelessTest.java 8196432 linux-all
-java/awt/Modal/ModalFocusTransferTests/FocusTransferDWFNonModalTest.java 8196432 linux-all
+java/awt/Modal/ModalFocusTransferTests/FocusTransferDWFDocModalTest.java 8196432 linux-all,macosx-all
+java/awt/Modal/ModalFocusTransferTests/FocusTransferDWFModelessTest.java 8196432 linux-all,macosx-all
+java/awt/Modal/ModalFocusTransferTests/FocusTransferDWFNonModalTest.java 8196432 linux-all,macosx-all
java/awt/Modal/ModalFocusTransferTests/FocusTransferDialogsModelessTest.java 8196432 linux-all
java/awt/Modal/ModalFocusTransferTests/FocusTransferDialogsNonModalTest.java 8196432 linux-all
java/awt/Modal/ModalFocusTransferTests/FocusTransferFDWDocModalTest.java 8196432 linux-all
java/awt/Modal/ModalFocusTransferTests/FocusTransferFDWModelessTest.java 8196432 linux-all
java/awt/Modal/ModalFocusTransferTests/FocusTransferFDWNonModalTest.java 8196432 linux-all
-java/awt/Modal/ModalFocusTransferTests/FocusTransferFWDAppModal1Test.java 8196432 linux-all
-java/awt/Modal/ModalFocusTransferTests/FocusTransferFWDAppModal2Test.java 8196432 linux-all
-java/awt/Modal/ModalFocusTransferTests/FocusTransferFWDAppModal3Test.java 8196432 linux-all
-java/awt/Modal/ModalFocusTransferTests/FocusTransferFWDAppModal4Test.java 8196432 linux-all
-java/awt/Modal/ModalFocusTransferTests/FocusTransferFWDDocModal1Test.java 8196432 linux-all
-java/awt/Modal/ModalFocusTransferTests/FocusTransferFWDDocModal2Test.java 8196432 linux-all
-java/awt/Modal/ModalFocusTransferTests/FocusTransferFWDDocModal3Test.java 8196432 linux-all
-java/awt/Modal/ModalFocusTransferTests/FocusTransferFWDDocModal4Test.java 8196432 linux-all
-java/awt/Modal/ModalFocusTransferTests/FocusTransferFWDModeless1Test.java 8196432 linux-all
-java/awt/Modal/ModalFocusTransferTests/FocusTransferFWDModeless2Test.java 8196432 linux-all
-java/awt/Modal/ModalFocusTransferTests/FocusTransferFWDModeless3Test.java 8196432 linux-all
-java/awt/Modal/ModalFocusTransferTests/FocusTransferFWDModeless4Test.java 8196432 linux-all
-java/awt/Modal/ModalFocusTransferTests/FocusTransferFWDNonModal1Test.java 8196432 linux-all
-java/awt/Modal/ModalFocusTransferTests/FocusTransferFWDNonModal2Test.java 8196432 linux-all
-java/awt/Modal/ModalFocusTransferTests/FocusTransferFWDNonModal3Test.java 8196432 linux-all
-java/awt/Modal/ModalFocusTransferTests/FocusTransferFWDNonModal4Test.java 8196432 linux-all
+java/awt/Modal/ModalFocusTransferTests/FocusTransferFWDAppModal1Test.java 8196432 linux-all,macosx-all
+java/awt/Modal/ModalFocusTransferTests/FocusTransferFWDAppModal2Test.java 8196432 linux-all,macosx-all
+java/awt/Modal/ModalFocusTransferTests/FocusTransferFWDAppModal3Test.java 8196432 linux-all,macosx-all
+java/awt/Modal/ModalFocusTransferTests/FocusTransferFWDAppModal4Test.java 8196432 linux-all,macosx-all
+java/awt/Modal/ModalFocusTransferTests/FocusTransferFWDDocModal1Test.java 8196432 linux-all,macosx-all
+java/awt/Modal/ModalFocusTransferTests/FocusTransferFWDDocModal2Test.java 8196432 linux-all,macosx-all
+java/awt/Modal/ModalFocusTransferTests/FocusTransferFWDDocModal3Test.java 8196432 linux-all,macosx-all
+java/awt/Modal/ModalFocusTransferTests/FocusTransferFWDDocModal4Test.java 8196432 linux-all,macosx-all
+java/awt/Modal/ModalFocusTransferTests/FocusTransferFWDModeless1Test.java 8196432 linux-all,macosx-all
+java/awt/Modal/ModalFocusTransferTests/FocusTransferFWDModeless2Test.java 8196432 linux-all,macosx-all
+java/awt/Modal/ModalFocusTransferTests/FocusTransferFWDModeless3Test.java 8196432 linux-all,macosx-all
+java/awt/Modal/ModalFocusTransferTests/FocusTransferFWDModeless4Test.java 8196432 linux-all,macosx-all
+java/awt/Modal/ModalFocusTransferTests/FocusTransferFWDNonModal1Test.java 8196432 linux-all,macosx-all
+java/awt/Modal/ModalFocusTransferTests/FocusTransferFWDNonModal2Test.java 8196432 linux-all,macosx-all
+java/awt/Modal/ModalFocusTransferTests/FocusTransferFWDNonModal3Test.java 8196432 linux-all,macosx-all
+java/awt/Modal/ModalFocusTransferTests/FocusTransferFWDNonModal4Test.java 8196432 linux-all,macosx-all
java/awt/Modal/ModalFocusTransferTests/FocusTransferWDFDocModal2Test.java 8196432 linux-all
java/awt/Modal/ModalFocusTransferTests/FocusTransferWDFNonModal2Test.java 8196432 linux-all
+java/awt/Modal/MultipleDialogs/MultipleDialogs1Test.java 8198665 macosx-all
+java/awt/Modal/MultipleDialogs/MultipleDialogs2Test.java 8198665 macosx-all
+java/awt/Modal/MultipleDialogs/MultipleDialogs3Test.java 8198665 macosx-all
+java/awt/Modal/MultipleDialogs/MultipleDialogs4Test.java 8198665 macosx-all
+java/awt/Modal/MultipleDialogs/MultipleDialogs5Test.java 8198665 macosx-all
java/awt/Mouse/GetMousePositionTest/GetMousePositionWithOverlay.java 8196435 linux-all
+java/awt/Mouse/EnterExitEvents/DragWindowOutOfFrameTest.java 8177326 macosx-all
+java/awt/Mouse/EnterExitEvents/DragWindowTest.java 8023562 macosx-all
+java/awt/Mouse/EnterExitEvents/ResizingFrameTest.java 8005021 macosx-all
+java/awt/Mouse/EnterExitEvents/FullscreenEnterEventTest.java 8051455 macosx-all
+java/awt/Mouse/MouseModifiersUnitTest/MouseModifiersUnitTest_Standard.java 7124407 macosx-all
+java/awt/Mouse/RemovedComponentMouseListener/RemovedComponentMouseListener.java 8157170 macosx-all
java/awt/Focus/ForwardingFocusToProxyMotifTest/ForwardingFocusToProxyMotifTest.java 8196436 linux-all
java/awt/Window/OverrideRedirectRemoved/ChildWindowProblem.java 8196438 linux-all
-java/awt/Modal/ToBack/ToBackAppModal1Test.java 8196441 linux-all
-java/awt/Modal/ToBack/ToBackAppModal2Test.java 8196441 linux-all
-java/awt/Modal/ToBack/ToBackAppModal3Test.java 8196441 linux-all
-java/awt/Modal/ToBack/ToBackAppModal4Test.java 8196441 linux-all
-java/awt/Modal/ToBack/ToBackModal1Test.java 8196441 linux-all
-java/awt/Modal/ToBack/ToBackModal2Test.java 8196441 linux-all
-java/awt/Modal/ToBack/ToBackModal3Test.java 8196441 linux-all
-java/awt/Modal/ToBack/ToBackModal4Test.java 8196441 linux-all
-java/awt/Modal/ToBack/ToBackTKModal1Test.java 8196441 linux-all
-java/awt/Modal/ToBack/ToBackTKModal2Test.java 8196441 linux-all
-java/awt/Modal/ToBack/ToBackTKModal3Test.java 8196441 linux-all
-java/awt/Modal/ToBack/ToBackTKModal4Test.java 8196441 linux-all
+java/awt/Modal/ToBack/ToBackAppModal1Test.java 8196441 linux-all,macosx-all
+java/awt/Modal/ToBack/ToBackAppModal2Test.java 8196441 linux-all,macosx-all
+java/awt/Modal/ToBack/ToBackAppModal3Test.java 8196441 linux-all,macosx-all
+java/awt/Modal/ToBack/ToBackAppModal4Test.java 8196441 linux-all,macosx-all
+java/awt/Modal/ToBack/ToBackAppModal5Test.java 8196441 macosx-all
+java/awt/Modal/ToBack/ToBackModal1Test.java 8196441 linux-all,macosx-all
+java/awt/Modal/ToBack/ToBackModal2Test.java 8196441 linux-all,macosx-all
+java/awt/Modal/ToBack/ToBackModal3Test.java 8196441 linux-all,macosx-all
+java/awt/Modal/ToBack/ToBackModal4Test.java 8196441 linux-all,macosx-all
+java/awt/Modal/ToBack/ToBackTKModal1Test.java 8196441 linux-all,macosx-all
+java/awt/Modal/ToBack/ToBackTKModal2Test.java 8196441 linux-all,macosx-all
+java/awt/Modal/ToBack/ToBackTKModal3Test.java 8196441 linux-all,macosx-all
+java/awt/Modal/ToBack/ToBackTKModal4Test.java 8196441 linux-all,macosx-all
+java/awt/Modal/ToBack/ToBackTKModal5Test.java 8196441 macosx-all
+java/awt/Modal/ToBack/ToBackDocModal1Test.java 8196441 linux-all,macosx-all
+java/awt/Modal/ToBack/ToBackDocModal2Test.java 8196441 linux-all,macosx-all
+java/awt/Modal/ToBack/ToBackDocModal3Test.java 8196441 linux-all,macosx-all
+java/awt/Modal/ToBack/ToBackDocModal4Test.java 8196441 linux-all,macosx-all
+java/awt/Modal/ToBack/ToBackDocModal5Test.java 8196441 linux-all,macosx-all
+java/awt/Modal/ToBack/ToBackModeless1Test.java 8196441 macosx-all
+java/awt/Modal/ToBack/ToBackModeless2Test.java 8196441 macosx-all
+java/awt/Modal/ToBack/ToBackModeless3Test.java 8196441 macosx-all
+java/awt/Modal/ToBack/ToBackModeless4Test.java 8196441 macosx-all
+java/awt/Modal/ToBack/ToBackModeless5Test.java 8196441 macosx-all
+java/awt/Modal/ToBack/ToBackNonModal1Test.java 8196441 macosx-all
+java/awt/Modal/ToBack/ToBackNonModal2Test.java 8196441 macosx-all
+java/awt/Modal/ToBack/ToBackNonModal3Test.java 8196441 macosx-all
+java/awt/Modal/ToBack/ToBackNonModal4Test.java 8196441 macosx-all
+java/awt/Modal/ToBack/ToBackNonModal5Test.java 8196441 macosx-all
+java/awt/Modal/OnTop/OnTopAppModal1Test.java 8198666 macosx-all
+java/awt/Modal/OnTop/OnTopAppModal2Test.java 8198666 macosx-all
+java/awt/Modal/OnTop/OnTopAppModal3Test.java 8198666 macosx-all
+java/awt/Modal/OnTop/OnTopAppModal4Test.java 8198666 macosx-all
+java/awt/Modal/OnTop/OnTopAppModal5Test.java 8198666 macosx-all
+java/awt/Modal/OnTop/OnTopAppModal6Test.java 8198666 macosx-all
+java/awt/Modal/OnTop/OnTopDocModal1Test.java 8198666 macosx-all
+java/awt/Modal/OnTop/OnTopDocModal2Test.java 8198666 macosx-all
+java/awt/Modal/OnTop/OnTopDocModal3Test.java 8198666 macosx-all
+java/awt/Modal/OnTop/OnTopDocModal4Test.java 8198666 macosx-all
+java/awt/Modal/OnTop/OnTopDocModal5Test.java 8198666 macosx-all
+java/awt/Modal/OnTop/OnTopDocModal6Test.java 8198666 macosx-all
+java/awt/Modal/OnTop/OnTopModal1Test.java 8198666 macosx-all
+java/awt/Modal/OnTop/OnTopModal2Test.java 8198666 macosx-all
+java/awt/Modal/OnTop/OnTopModal3Test.java 8198666 macosx-all
+java/awt/Modal/OnTop/OnTopModal4Test.java 8198666 macosx-all
+java/awt/Modal/OnTop/OnTopModal5Test.java 8198666 macosx-all
+java/awt/Modal/OnTop/OnTopModal6Test.java 8198666 macosx-all
+java/awt/Modal/OnTop/OnTopModal6Test.java 8198666 macosx-all
+java/awt/Modal/OnTop/OnTopModeless1Test.java 8198666 macosx-all
+java/awt/Modal/OnTop/OnTopModeless2Test.java 8198666 macosx-all
+java/awt/Modal/OnTop/OnTopModeless3Test.java 8198666 macosx-all
+java/awt/Modal/OnTop/OnTopModeless4Test.java 8198666 macosx-all
+java/awt/Modal/OnTop/OnTopModeless5Test.java 8198666 macosx-all
+java/awt/Modal/OnTop/OnTopModeless6Test.java 8198666 macosx-all
+java/awt/Modal/OnTop/OnTopTKModal1Test.java 8198666 macosx-all
+java/awt/Modal/OnTop/OnTopTKModal2Test.java 8198666 macosx-all
+java/awt/Modal/OnTop/OnTopTKModal3Test.java 8198666 macosx-all
+java/awt/Modal/OnTop/OnTopTKModal4Test.java 8198666 macosx-all
+java/awt/Modal/OnTop/OnTopTKModal5Test.java 8198666 macosx-all
+java/awt/Modal/OnTop/OnTopTKModal6Test.java 8198666 macosx-all
java/awt/List/SingleModeDeselect/SingleModeDeselect.java 8196301 windows-all
+java/awt/SplashScreen/MultiResolutionSplash/MultiResolutionSplashTest.java 8061235 macosx-all
+javax/print/PrintSEUmlauts/PrintSEUmlauts.java 8135174 generic-all
############################################################################
@@ -274,6 +483,8 @@
java/beans/Introspector/8132566/OverridePropertyInfoTest.java 8132565 generic-all
java/beans/Introspector/8132566/OverrideUserDefPropertyInfoTest.java 8132565 generic-all
+java/beans/XMLEncoder/Test6570354.java 8015593 macosx-all
+
############################################################################
# jdk_lang
@@ -403,52 +614,91 @@
# jdk_swing
+com/sun/java/swing/plaf/windows/Test8173145.java 8198334 windows-all
+
+javax/swing/border/Test6981576.java 8198339 generic-all
javax/swing/JComponent/7154030/bug7154030.java 7190978 generic-all
-javax/swing/JInternalFrame/8160248/JInternalFrameDraggingTest.java 8186513 generic-all
javax/swing/JComboBox/ConsumedKeyTest/ConsumedKeyTest.java 8067986 generic-all
javax/swing/JComponent/6683775/bug6683775.java 8172337 generic-all
-javax/swing/JComboBox/6236162/bug6236162.java 8028707 windows-all
+javax/swing/JComboBox/6236162/bug6236162.java 8028707 windows-all,macosx-all
javax/swing/text/html/parser/Test8017492.java 8022535 generic-all
-javax/swing/JWindow/ShapedAndTranslucentWindows/PerPixelTranslucentCanvas.java 8081476 windows-all
+javax/swing/JButton/8151303/PressedIconTest.java 8198689 macosx-all
+javax/swing/JWindow/ShapedAndTranslucentWindows/PerPixelTranslucentCanvas.java 8081476 windows-all,macosx-all
+javax/swing/JWindow/ShapedAndTranslucentWindows/PerPixelTranslucentSwing.java 8194128 macosx-all
+javax/swing/JWindow/ShapedAndTranslucentWindows/ShapedPerPixelTranslucentGradient.java 8198667 macosx-all
+javax/swing/JWindow/ShapedAndTranslucentWindows/SetShapeAndClickSwing.java 8013450 macosx-all
+javax/swing/JWindow/ShapedAndTranslucentWindows/TranslucentJComboBox.java 8190347 macosx-all
# The next test below is an intermittent failure
javax/swing/JComboBox/8033069/bug8033069ScrollBar.java 8163367 generic-all
-javax/swing/JColorChooser/Test6541987.java 8143021 windows-all,linux-all
+javax/swing/JColorChooser/Test6541987.java 8143021 windows-all,linux-all,macosx-all
+javax/swing/JColorChooser/Test7194184.java 8194126 linux-all,macosx-all
javax/swing/JTable/7124218/SelectEditTableCell.java 8148958 linux-all
+javax/swing/JTable/4235420/bug4235420.java 8079127 linux-all,macosx-all
javax/swing/JTree/DnD/LastNodeLowerHalfDrop.java 8159131 linux-all
+javax/swing/JTree/4633594/JTreeFocusTest.java 8173125 macosx-all
+javax/swing/JTree/8003400/Test8003400.java 8011259 macosx-all
javax/swing/JFileChooser/8041694/bug8041694.java 8196302 windows-all
javax/swing/JInternalFrame/8069348/bug8069348.java 8196303 windows-all
-javax/swing/AbstractButton/6711682/bug6711682.java 8060765 windows-all
-javax/swing/Action/8133039/bug8133039.java 8196089 windows-all
-javax/swing/JComboBox/6559152/bug6559152.java 8196090 windows-all
+javax/swing/AbstractButton/6711682/bug6711682.java 8060765 windows-all,macosx-all
+javax/swing/Action/8133039/bug8133039.java 8196089 windows-all,macosx-all
+javax/swing/JComboBox/6559152/bug6559152.java 8196090 windows-all,macosx-all
javax/swing/JComboBox/6607130/bug6607130.java 8196091 windows-all
-javax/swing/JComboBox/8032878/bug8032878.java 8196092 windows-all
-javax/swing/JComboBox/8057893/bug8057893.java 8169953 windows-all
-javax/swing/JComboBox/8072767/bug8072767.java 8196093 windows-all
+javax/swing/JComboBox/8032878/bug8032878.java 8196092 windows-all,macosx-all
+javax/swing/JComboBox/8057893/bug8057893.java 8169953 windows-all,macosx-all
+javax/swing/JComboBox/8072767/bug8072767.java 8196093 windows-all,macosx-all
javax/swing/JComponent/4337267/bug4337267.java 8146451 windows-all
+javax/swing/JEditorPane/5076514/bug5076514.java 8198321 generic-all
javax/swing/JEditorPane/6917744/bug6917744.java 8194767 generic-all
javax/swing/JFileChooser/4524490/bug4524490.java 8042380 generic-all
javax/swing/JFileChooser/8002077/bug8002077.java 8196094 windows-all
javax/swing/JFileChooser/DeserializedJFileChooser/DeserializedJFileChooserTest.java 8196095 generic-all
+javax/swing/JFileChooser/6396844/TwentyThousandTest.java 8058231 macosx-all
javax/swing/JFrame/8175301/ScaledFrameBackgroundTest.java 8193942 generic-all
javax/swing/JInternalFrame/8020708/bug8020708.java 8194943 windows-all
javax/swing/JList/6462008/bug6462008.java 7156347 generic-all
-javax/swing/JPopupMenu/6580930/bug6580930.java 8196096 windows-all
+javax/swing/JPopupMenu/6580930/bug6580930.java 8196096 windows-all,macosx-all
+javax/swing/JPopupMenu/6800513/bug6800513.java 7184956 macosx-all
javax/swing/JPopupMenu/6675802/bug6675802.java 8196097 windows-all
javax/swing/JTabbedPane/8007563/Test8007563.java 8051591 generic-all
+javax/swing/JTabbedPane/4624207/bug4624207.java 8064922 macosx-all
+javax/swing/JTabbedPane/7024235/Test7024235.java 8028281 macosx-all
javax/swing/SwingUtilities/TestBadBreak/TestBadBreak.java 8160720 generic-all
javax/swing/plaf/basic/BasicTextUI/8001470/bug8001470.java 8196098 windows-all
+javax/swing/plaf/basic/Test6984643.java 8198340 windows-all
javax/swing/text/CSSBorder/6796710/bug6796710.java 8196099 windows-all
javax/swing/text/DefaultCaret/HidingSelection/HidingSelectionTest.java 8194048 windows-all
javax/swing/text/JTextComponent/5074573/bug5074573.java 8196100 windows-all
javax/swing/JFileChooser/6798062/bug6798062.java 8146446 windows-all
-javax/swing/plaf/basic/BasicGraphicsUtils/8132119/bug8132119.java 8196434 linux-all
+javax/swing/plaf/basic/BasicGraphicsUtils/8132119/bug8132119.java 8196434 linux-all,solaris-all
javax/swing/JComboBox/8032878/bug8032878.java 8196439 linux-all
-javax/swing/JComboBox/8182031/ComboPopupTest.java 8196465 linux-all
-javax/swing/JFileChooser/6738668/bug6738668.java 8194946 linux-all,macosx-all
-javax/swing/JFileChooser/8021253/bug8021253.java 8169954 windows-all,linux-all
-javax/swing/JFileChooser/8062561/bug8062561.java 8196466 linux-all
-javax/swing/JInternalFrame/Test6325652.java 8196467 linux-all
-
+javax/swing/JComboBox/8182031/ComboPopupTest.java 8196465 linux-all,macosx-all
+javax/swing/JFileChooser/6738668/bug6738668.java 8194946 generic-all
+javax/swing/JFileChooser/8021253/bug8021253.java 8169954 windows-all,linux-all,macosx-all
+javax/swing/JFileChooser/8062561/bug8062561.java 8196466 linux-all,macosx-all
+javax/swing/JFileChooser/FileSystemView/FileSystemViewListenerLeak.java 8198342 generic-all
+javax/swing/JInternalFrame/Test6325652.java 8196467 linux-all,macosx-all
+javax/swing/JInternalFrame/8145896/TestJInternalFrameMaximize.java 8194944 macosx-all
+javax/swing/JLabel/6596966/bug6596966.java 8040914 macosx-all
+javax/swing/JPopupMenu/4870644/bug4870644.java 8194130 macosx-all
+javax/swing/JPopupMenu/4966112/bug4966112.java 8064915 macosx-all
+javax/swing/MultiUIDefaults/Test6860438.java 8198391 generic-all
+javax/swing/MultiUIDefaults/4300666/bug4300666.java 7105119 macosx-all
+javax/swing/UITest/UITest.java 8198392 generic-all
+javax/swing/plaf/basic/BasicComboBoxEditor/Test8015336.java 8198394 linux-all,macosx-all
+javax/swing/plaf/metal/MetalLookAndFeel/Test8039750.java 8198395 generic-all
+javax/swing/text/DevanagariEditor.java 8198397 linux-all
+javax/swing/JColorChooser/Test6199676.java 8198398 linux-all,macosx-all
+javax/swing/JTable/6735286/bug6735286.java 8198398 linux-all,macosx-all
+javax/swing/SpringLayout/4726194/bug4726194.java 8198399 generic-all
+javax/swing/SwingUtilities/6797139/bug6797139.java 8198400 generic-all
+javax/swing/text/html/parser/Parser/6836089/bug6836089.java 8198401 linux-all,macosx-all
+javax/swing/JTable/8133919/DrawGridLinesTest.java 8198407 generic-all
+javax/swing/text/html/StyleSheet/BackgroundImage/BackgroundImagePosition.java 8198409 generic-all
+javax/swing/text/AbstractDocument/DocumentInsert/DocumentInsertAtWrongPositionTest.java 8198396 generic-all
+javax/swing/JFileChooser/6868611/bug6868611.java 7059834 windows-all
+javax/swing/SwingWorker/6493680/bug6493680.java 8198410 windows-all
+javax/swing/plaf/basic/BasicMenuUI/4983388/bug4983388.java 8042383 macosx-all
+javax/swing/PopupFactory/6276087/NonOpaquePopupMenuTest.java 8065099 macosx-all
############################################################################
@@ -486,10 +736,6 @@
com/sun/jdi/NashornPopFrameTest.java 8187143 generic-all
-com/sun/jdi/EarlyReturnTest.java 8198803 generic-all
-com/sun/jdi/EarlyReturnNegativeTest.java 8198803 generic-all
-com/sun/jdi/MethodExitReturnValuesTest.java 8198803 generic-all
-
############################################################################
# jdk_time
--- a/test/jdk/TEST.groups Thu Mar 01 16:35:36 2018 -0500
+++ b/test/jdk/TEST.groups Fri Mar 02 21:00:12 2018 +0100
@@ -29,6 +29,7 @@
:jdk_lang \
:jdk_util \
:jdk_svc_sanity \
+ :build_sanity \
sun/nio/cs/ISO8859x.java \
java/nio/Buffer \
com/sun/crypto/provider/Cipher \
@@ -61,6 +62,10 @@
# Other test definitions; generally smaller granularity than tiers
#
+# Build source checking
+build_sanity = \
+ sanity/releaseFile
+
# java.lang package and VM runtime support
jdk_lang = \
java/lang \
@@ -264,6 +269,7 @@
jdk_other = \
java/sql \
javax/sql \
+ javax/transaction \
javax/rmi \
javax/naming \
javax/script \
--- a/test/jdk/com/sun/jdi/EarlyReturnNegativeTest.java Thu Mar 01 16:35:36 2018 -0500
+++ b/test/jdk/com/sun/jdi/EarlyReturnNegativeTest.java Fri Mar 02 21:00:12 2018 +0100
@@ -77,8 +77,9 @@
public static ClassLoader classLoaderValue;
{
try {
- urls[0] = new URL("hi there");
- } catch (java.net.MalformedURLException ee) {
+ urls[0] = new URL("file:/foo");
+ } catch (java.net.MalformedURLException ex) {
+ throw new AssertionError(ex);
}
classLoaderValue = new URLClassLoader(urls);
}
--- a/test/jdk/com/sun/jdi/EarlyReturnTest.java Thu Mar 01 16:35:36 2018 -0500
+++ b/test/jdk/com/sun/jdi/EarlyReturnTest.java Fri Mar 02 21:00:12 2018 +0100
@@ -82,8 +82,9 @@
public static ClassLoader classLoaderValue;
{
try {
- urls[0] = new URL("hi there");
- } catch (java.net.MalformedURLException ee) {
+ urls[0] = new URL("file:/foo");
+ } catch (java.net.MalformedURLException ex) {
+ throw new AssertionError(ex);
}
classLoaderValue = new URLClassLoader(urls);
}
@@ -116,8 +117,9 @@
public static ClassLoader eclassLoaderValue;
{
try {
- urls[0] = new URL("been there, done that");
- } catch (java.net.MalformedURLException ee) {
+ urls[0] = new URL("file:/bar");
+ } catch (java.net.MalformedURLException ex) {
+ throw new AssertionError(ex);
}
classLoaderValue = new URLClassLoader(urls);
}
--- a/test/jdk/com/sun/jdi/MethodExitReturnValuesTest.java Thu Mar 01 16:35:36 2018 -0500
+++ b/test/jdk/com/sun/jdi/MethodExitReturnValuesTest.java Fri Mar 02 21:00:12 2018 +0100
@@ -66,8 +66,9 @@
public static ClassLoader classLoaderValue;
{
try {
- urls[0] = new URL("hi there");
- } catch (java.net.MalformedURLException ee) {
+ urls[0] = new URL("file:/foo");
+ } catch (java.net.MalformedURLException ex) {
+ throw new AssertionError(ex);
}
classLoaderValue = new URLClassLoader(urls);
}
--- a/test/jdk/com/sun/jndi/dns/AttributeTests/GetAny.java Thu Mar 01 16:35:36 2018 -0500
+++ b/test/jdk/com/sun/jndi/dns/AttributeTests/GetAny.java Fri Mar 02 21:00:12 2018 +0100
@@ -26,8 +26,7 @@
* @bug 8195976
* @summary Tests that we can get the attributes of a DNS entry using special
* qualifiers.
- * @modules java.xml.bind
- * java.base/sun.security.util
+ * @modules java.base/sun.security.util
* @library ../lib/
* @build DNSTestUtils DNSServer DNSTracer
* @run main GetAny
--- a/test/jdk/com/sun/jndi/dns/lib/DNSServer.java Thu Mar 01 16:35:36 2018 -0500
+++ b/test/jdk/com/sun/jndi/dns/lib/DNSServer.java Fri Mar 02 21:00:12 2018 +0100
@@ -23,7 +23,6 @@
import sun.security.util.HexDumpEncoder;
-import javax.xml.bind.DatatypeConverter;
import java.io.IOException;
import java.net.DatagramPacket;
import java.net.DatagramSocket;
@@ -196,7 +195,7 @@
* Add an DNS encoding to the cache (by request message key).
*/
private void addToCache(String hexString) {
- byte[] encoding = DatatypeConverter.parseHexBinary(hexString);
+ byte[] encoding = parseHexBinary(hexString);
if (encoding.length < DNS_HEADER_SIZE) {
throw new RuntimeException("Invalid DNS message : " + hexString);
}
@@ -261,4 +260,43 @@
return payload;
}
+
+ public static byte[] parseHexBinary(String s) {
+
+ final int len = s.length();
+
+ // "111" is not a valid hex encoding.
+ if (len % 2 != 0) {
+ throw new IllegalArgumentException(
+ "hexBinary needs to be even-length: " + s);
+ }
+
+ byte[] out = new byte[len / 2];
+
+ for (int i = 0; i < len; i += 2) {
+ int h = hexToBin(s.charAt(i));
+ int l = hexToBin(s.charAt(i + 1));
+ if (h == -1 || l == -1) {
+ throw new IllegalArgumentException(
+ "contains illegal character for hexBinary: " + s);
+ }
+
+ out[i / 2] = (byte) (h * 16 + l);
+ }
+
+ return out;
+ }
+
+ private static int hexToBin(char ch) {
+ if ('0' <= ch && ch <= '9') {
+ return ch - '0';
+ }
+ if ('A' <= ch && ch <= 'F') {
+ return ch - 'A' + 10;
+ }
+ if ('a' <= ch && ch <= 'f') {
+ return ch - 'a' + 10;
+ }
+ return -1;
+ }
}
--- a/test/jdk/com/sun/jndi/ldap/blits/AddTests/AddNewEntry.java Thu Mar 01 16:35:36 2018 -0500
+++ b/test/jdk/com/sun/jndi/ldap/blits/AddTests/AddNewEntry.java Fri Mar 02 21:00:12 2018 +0100
@@ -26,11 +26,10 @@
* @bug 8196770
* @summary Verify capability to add a new entry to the directory using the
* ADD operation.
- * @modules java.xml.bind
- * java.naming/com.sun.jndi.ldap
+ * @modules java.naming/com.sun.jndi.ldap
* @library ../../lib/ /javax/naming/module/src/test/test/
* @build LDAPServer LDAPTestUtils
- * @run main AddNewEntry
+ * @run main/othervm AddNewEntry
*/
import javax.naming.NamingEnumeration;
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/test/jdk/com/sun/net/httpserver/TaskRejectedTest.java Fri Mar 02 21:00:12 2018 +0100
@@ -0,0 +1,107 @@
+/*
+ * Copyright (c) 2018, Oracle and/or its affiliates. All rights reserved.
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * This code is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU General Public License version 2 only, as
+ * published by the Free Software Foundation.
+ *
+ * This code is distributed in the hope that it will be useful, but WITHOUT
+ * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
+ * version 2 for more details (a copy is included in the LICENSE file that
+ * accompanied this code).
+ *
+ * You should have received a copy of the GNU General Public License version
+ * 2 along with this work; if not, write to the Free Software Foundation,
+ * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
+ *
+ * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
+ * or visit www.oracle.com if you need additional information or have any
+ * questions.
+ */
+
+/**
+ * @test
+ * @bug 8169358
+ * @summary HttpServer does not close client connection when RejectedExecutionException occurs.
+ */
+
+import com.sun.net.httpserver.HttpServer;
+
+import java.io.IOException;
+import java.net.HttpURLConnection;
+import java.net.InetAddress;
+import java.net.InetSocketAddress;
+import java.net.MalformedURLException;
+import java.net.SocketException;
+import java.net.SocketTimeoutException;
+import java.net.URL;
+import java.util.concurrent.Executor;
+import java.util.concurrent.Executors;
+import java.util.concurrent.RejectedExecutionException;
+import java.util.logging.ConsoleHandler;
+import java.util.logging.Handler;
+import java.util.logging.Level;
+import java.util.logging.Logger;
+
+
+public class TaskRejectedTest {
+
+ private static final int BACKLOG = 0;
+
+ private static final String REQUEST_PATH = "/";
+
+ private static final int TIMEOUT = 10000; // 10 sec
+
+ private static void runClient(InetSocketAddress listenAddr)
+ throws MalformedURLException, IOException {
+ URL url = new URL("http", listenAddr.getHostString(),
+ listenAddr.getPort(), REQUEST_PATH);
+ HttpURLConnection con = (HttpURLConnection)url.openConnection();
+ con.setConnectTimeout(TIMEOUT);
+ con.setReadTimeout(TIMEOUT);
+
+ try {
+ con.connect();
+ con.getResponseCode();
+ } catch (SocketTimeoutException e) {
+ throw new RuntimeException("Connection was not closed by peer.", e);
+ } catch (SocketException e) {
+ // Expected (connection reset)
+ } finally {
+ con.disconnect();
+ }
+ }
+
+ public static void main(String[] args) throws Exception {
+ Logger logger = Logger.getLogger(
+ HttpServer.class.getPackage().getName());
+ Handler consoleHandler = new ConsoleHandler();
+ consoleHandler.setLevel(Level.FINEST);
+ logger.setLevel(Level.FINEST);
+ logger.addHandler(consoleHandler);
+
+ Executor executor = Executors.newSingleThreadExecutor(r -> {
+ throw new RejectedExecutionException("test");
+ });
+
+ InetSocketAddress addr = new InetSocketAddress(
+ InetAddress.getLoopbackAddress(), 0);
+ HttpServer httpServer = HttpServer.create(addr, BACKLOG);
+ httpServer.setExecutor(executor);
+
+ httpServer.createContext(REQUEST_PATH, exc -> {
+ exc.sendResponseHeaders(200, 0);
+ exc.close();
+ });
+
+ try {
+ httpServer.start();
+ runClient(httpServer.getAddress());
+ } finally {
+ httpServer.stop(0);
+ }
+ }
+}
+
--- a/test/jdk/java/awt/Color/XRenderTranslucentColorDrawTest.java Thu Mar 01 16:35:36 2018 -0500
+++ b/test/jdk/java/awt/Color/XRenderTranslucentColorDrawTest.java Fri Mar 02 21:00:12 2018 +0100
@@ -23,6 +23,7 @@
/*
* @test
+ * @key headful
* @bug 8176795
* @summary Test verifies that we get proper color when we draw translucent
* color over an opaque color using X Render extension in Linux.
--- a/test/jdk/java/awt/Desktop/8064934/bug8064934.java Thu Mar 01 16:35:36 2018 -0500
+++ b/test/jdk/java/awt/Desktop/8064934/bug8064934.java Fri Mar 02 21:00:12 2018 +0100
@@ -23,6 +23,8 @@
/* @test
* @bug 8064934
+ * @key headful
+ * @requires (os.family == "windows")
* @summary Incorrect Exception message from java.awt.Desktop.open()
* @author Dmitry Markov
* @library ../../../../lib/testlibrary
--- a/test/jdk/java/awt/Desktop/OpenByUNCPathNameTest/OpenByUNCPathNameTest.java Thu Mar 01 16:35:36 2018 -0500
+++ b/test/jdk/java/awt/Desktop/OpenByUNCPathNameTest/OpenByUNCPathNameTest.java Fri Mar 02 21:00:12 2018 +0100
@@ -23,6 +23,8 @@
/* @test
@bug 6550588
+ @key headful
+ @requires (os.family == "windows")
@summary java.awt.Desktop cannot open file with Windows UNC filename
@author Anton Litvinov
*/
--- a/test/jdk/java/awt/Dialog/MakeWindowAlwaysOnTop/MakeWindowAlwaysOnTop.java Thu Mar 01 16:35:36 2018 -0500
+++ b/test/jdk/java/awt/Dialog/MakeWindowAlwaysOnTop/MakeWindowAlwaysOnTop.java Fri Mar 02 21:00:12 2018 +0100
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2010, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2010, 2018 Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
@@ -24,7 +24,7 @@
/*
@test
@key headful
- @bug 6829546
+ @bug 6829546, 8197808
@summary tests that an always-on-top modal dialog doesn't make any windows always-on-top
@author artem.ananiev: area=awt.modal
@library ../../regtesthelpers
@@ -32,9 +32,13 @@
@run main MakeWindowAlwaysOnTop
*/
-import java.awt.*;
-import java.awt.event.*;
-
+import java.awt.Frame;
+import java.awt.Dialog;
+import java.awt.EventQueue;
+import java.awt.Color;
+import java.awt.Robot;
+import java.awt.Point;
+import java.awt.event.InputEvent;
import test.java.awt.regtesthelpers.Util;
public class MakeWindowAlwaysOnTop
@@ -59,21 +63,9 @@
d = new Dialog(null, "Modal dialog", Dialog.ModalityType.APPLICATION_MODAL);
d.setBounds(500, 500, 160, 160);
d.setAlwaysOnTop(true);
- EventQueue.invokeLater(new Runnable()
- {
- public void run()
- {
- d.setVisible(true);
- }
- });
+ EventQueue.invokeLater(() -> d.setVisible(true) );
// Wait until the dialog is shown
- EventQueue.invokeAndWait(new Runnable()
- {
- public void run()
- {
- // Empty
- }
- });
+ EventQueue.invokeAndWait(() -> { /* Empty */ });
r.delay(100);
Util.waitForIdle(r);
@@ -104,29 +96,30 @@
// Bring it above the first frame
t.toFront();
- r.delay(100);
+
+ r.delay(200);
Util.waitForIdle(r);
+
Color c = r.getPixelColor(p.x + f.getWidth() / 2, p.y + f.getHeight() / 2);
System.out.println("Color = " + c);
- System.out.flush();
+
+ String exceptionMessage = null;
// If the color is RED, then the first frame is now always-on-top
- if (Color.RED.equals(c))
- {
- throw new RuntimeException("Test FAILED: the frame is always-on-top");
- }
- else if (!Color.BLUE.equals(c))
- {
- throw new RuntimeException("Test FAILED: unknown window is on top of the frame");
- }
- else
- {
- System.out.println("Test PASSED");
- System.out.flush();
+ if (Color.RED.equals(c)) {
+ exceptionMessage = "Test FAILED: the frame is always-on-top";
+ } else if (!Color.BLUE.equals(c)) {
+ exceptionMessage = "Test FAILED: unknown window is on top of the frame";
}
// Dispose all the windows
t.dispose();
f.dispose();
+
+ if (exceptionMessage != null) {
+ throw new RuntimeException(exceptionMessage);
+ } else {
+ System.out.println("Test PASSED");
+ }
}
}
--- a/test/jdk/java/awt/EmbeddedFrame/GraphicsConfigTest/GraphicsConfigTest.java Thu Mar 01 16:35:36 2018 -0500
+++ b/test/jdk/java/awt/EmbeddedFrame/GraphicsConfigTest/GraphicsConfigTest.java Fri Mar 02 21:00:12 2018 +0100
@@ -24,6 +24,7 @@
/*
* @test
* @bug 6356322
+ * @key headful
* @summary Tests that embedded frame's graphics configuration is updated
* correctly when it is moved to another screen in multiscreen system,
* XToolkit
--- a/test/jdk/java/awt/FileDialog/FileDialogMemoryLeak/FileDialogLeakTest.java Thu Mar 01 16:35:36 2018 -0500
+++ b/test/jdk/java/awt/FileDialog/FileDialogMemoryLeak/FileDialogLeakTest.java Fri Mar 02 21:00:12 2018 +0100
@@ -27,6 +27,7 @@
/**
* @test
+ * @key headful
* @bug 8177758
* @requires os.family == "windows"
* @summary Regression in java.awt.FileDialog
--- a/test/jdk/java/awt/FileDialog/ISCthrownByFileListTest/ISCthrownByFileListTest.java Thu Mar 01 16:35:36 2018 -0500
+++ b/test/jdk/java/awt/FileDialog/ISCthrownByFileListTest/ISCthrownByFileListTest.java Fri Mar 02 21:00:12 2018 +0100
@@ -24,6 +24,7 @@
/*
@test
@bug 6304979
+ @key headful
@summary REG: File Dialog throws ArrayIndexOutOfBounds Exception on XToolkit with b45
@author Dmitry Cherepanov: area=awt.filedialog
@run main/othervm -Dsun.awt.disableGtkFileDialogs=true ISCthrownByFileListTest
--- a/test/jdk/java/awt/FileDialog/MoveToTrashTest.java Thu Mar 01 16:35:36 2018 -0500
+++ b/test/jdk/java/awt/FileDialog/MoveToTrashTest.java Fri Mar 02 21:00:12 2018 +0100
@@ -23,6 +23,7 @@
/*
@test
+ @key headful
@bug 8190515 8193468
@summary java.awt.Desktop.moveToTrash(File) prompts on Windows 7 but not on Mac.
@run main MoveToTrashTest
--- a/test/jdk/java/awt/Focus/SortingFPT/JDK8048887.java Thu Mar 01 16:35:36 2018 -0500
+++ b/test/jdk/java/awt/Focus/SortingFPT/JDK8048887.java Fri Mar 02 21:00:12 2018 +0100
@@ -23,6 +23,7 @@
/*
@test
+ @key headful
@bug 8048887 8164937
@summary Tests SortingFTP for an exception caused by the tim-sort algo.
@author anton.tarasov: area=awt.focus
--- a/test/jdk/java/awt/Frame/MaximizedToUnmaximized/MaximizedToUnmaximized.java Thu Mar 01 16:35:36 2018 -0500
+++ b/test/jdk/java/awt/Frame/MaximizedToUnmaximized/MaximizedToUnmaximized.java Fri Mar 02 21:00:12 2018 +0100
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2015, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2015, 2018, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
@@ -31,9 +31,11 @@
/**
* @test
* @key headful
- * @bug 8065739
+ * @bug 8065739 8129569
+ * @requires (os.family == "mac")
* @summary [macosx] Frame warps to lower left of screen when displayed
* @author Alexandr Scherbatiy
+ * @run main MaximizedToUnmaximized
*/
public class MaximizedToUnmaximized {
--- a/test/jdk/java/awt/FullScreen/UninitializedDisplayModeChangeTest/UninitializedDisplayModeChangeTest.java Thu Mar 01 16:35:36 2018 -0500
+++ b/test/jdk/java/awt/FullScreen/UninitializedDisplayModeChangeTest/UninitializedDisplayModeChangeTest.java Fri Mar 02 21:00:12 2018 +0100
@@ -23,8 +23,8 @@
/**
* @test
- * @bug 6358034
- * @bug 6568560
+ * @bug 6358034 6568560
+ * @key headful
* @summary Tests that no exception is thrown when display mode is changed
* externally
* @compile UninitializedDisplayModeChangeTest.java DisplayModeChanger.java
--- a/test/jdk/java/awt/Graphics2D/ScaledTransform/ScaledTransform.java Thu Mar 01 16:35:36 2018 -0500
+++ b/test/jdk/java/awt/Graphics2D/ScaledTransform/ScaledTransform.java Fri Mar 02 21:00:12 2018 +0100
@@ -33,6 +33,7 @@
/*
* @test
* @bug 8069361
+ * @key headful
* @summary SunGraphics2D.getDefaultTransform() does not include scale factor
* @author Alexander Scherbatiy
* @run main ScaledTransform
--- a/test/jdk/java/awt/Gtk/GtkVersionTest/GtkVersionTest.java Thu Mar 01 16:35:36 2018 -0500
+++ b/test/jdk/java/awt/Gtk/GtkVersionTest/GtkVersionTest.java Fri Mar 02 21:00:12 2018 +0100
@@ -22,6 +22,7 @@
*/
/* @test
+ * @key headful
* @bug 8156121
* @summary "Fail forward" fails for GTK3 if no GTK2 available
* @modules java.desktop/sun.awt
--- a/test/jdk/java/awt/JAWT/JAWT.sh Thu Mar 01 16:35:36 2018 -0500
+++ b/test/jdk/java/awt/JAWT/JAWT.sh Fri Mar 02 21:00:12 2018 +0100
@@ -22,6 +22,7 @@
# questions.
# @test JAWT.sh
+# @key headful
# @bug 7190587
# @summary Tests Java AWT native interface library
# @author kshefov
@@ -111,7 +112,7 @@
else
ARCH="i386"
fi
- SYST="cygwin"
+ SYST="cygwin"
MAKE="make"
;;
Darwin )
--- a/test/jdk/java/awt/List/SetBackgroundTest/SetBackgroundTest.java Thu Mar 01 16:35:36 2018 -0500
+++ b/test/jdk/java/awt/List/SetBackgroundTest/SetBackgroundTest.java Fri Mar 02 21:00:12 2018 +0100
@@ -24,6 +24,8 @@
/*
@test
@bug 6246467
+ @key headful
+ @requires (os.family == "linux") | (os.family == "solaris")
@summary List does not honor user specified background, foreground colors on XToolkit
@author Dmitry Cherepanov area=awt.list
@library ../../../../lib/testlibrary
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/test/jdk/java/awt/MenuBar/DefaultMenuBarDispose.java Fri Mar 02 21:00:12 2018 +0100
@@ -0,0 +1,87 @@
+/*
+ * Copyright (c) 2018, Oracle and/or its affiliates. All rights reserved.
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * This code is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU General Public License version 2 only, as
+ * published by the Free Software Foundation. Oracle designates this
+ * particular file as subject to the "Classpath" exception as provided
+ * by Oracle in the LICENSE file that accompanied this code.
+ *
+ * This code is distributed in the hope that it will be useful, but WITHOUT
+ * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
+ * version 2 for more details (a copy is included in the LICENSE file that
+ * accompanied this code).
+ *
+ * You should have received a copy of the GNU General Public License version
+ * 2 along with this work; if not, write to the Free Software Foundation,
+ * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
+ *
+ * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
+ * or visit www.oracle.com if you need additional information or have any
+ * questions.
+ */
+
+/**
+ * @test
+ * @key headful
+ * @bug 8196322
+ * @summary [macosx] When the screen menu bar is used, clearing the default menu bar should permit AWT shutdown
+ * @author Alan Snyder
+ * @run main/othervm DefaultMenuBarDispose
+ * @requires (os.family == "mac")
+ */
+
+import java.awt.Desktop;
+import java.lang.reflect.InvocationTargetException;
+import javax.swing.JMenuBar;
+import javax.swing.SwingUtilities;
+
+public class DefaultMenuBarDispose
+{
+ public DefaultMenuBarDispose()
+ {
+ Thread watcher = new Thread(() -> {
+ try {
+ synchronized (this) {
+ wait(5000);
+ }
+ throw new RuntimeException("Test failed: failed to exit");
+ } catch (InterruptedException ex) {
+ }
+ });
+ watcher.setDaemon(true);
+ watcher.start();
+
+ runSwing(() ->
+ {
+ JMenuBar mb = new JMenuBar();
+ Desktop.getDesktop().setDefaultMenuBar(mb);
+ Desktop.getDesktop().setDefaultMenuBar(null);
+ }
+ );
+ }
+
+ private static void runSwing(Runnable r)
+ {
+ try {
+ SwingUtilities.invokeAndWait(r);
+ } catch (InterruptedException e) {
+ } catch (InvocationTargetException e) {
+ throw new RuntimeException(e);
+ }
+ }
+
+ public static void main(String[] args)
+ {
+ if (!System.getProperty("os.name").contains("OS X")) {
+ System.out.println("This test is for MacOS only. Automatically passed on other platforms.");
+ return;
+ }
+
+ System.setProperty("apple.laf.useScreenMenuBar", "true");
+
+ new DefaultMenuBarDispose();
+ }
+}
--- a/test/jdk/java/awt/Mouse/MouseModifiersUnitTest/ExtraButtonDrag.java Thu Mar 01 16:35:36 2018 -0500
+++ b/test/jdk/java/awt/Mouse/MouseModifiersUnitTest/ExtraButtonDrag.java Fri Mar 02 21:00:12 2018 +0100
@@ -22,7 +22,7 @@
*/
/*
- @test %I% %E%
+ @test
@key headful
@bug 6315717
@summary verifies that drag events are coming for every button if the property is set to true
--- a/test/jdk/java/awt/Paint/PaintNativeOnUpdate.java Thu Mar 01 16:35:36 2018 -0500
+++ b/test/jdk/java/awt/Paint/PaintNativeOnUpdate.java Fri Mar 02 21:00:12 2018 +0100
@@ -36,7 +36,7 @@
* @library ../../../lib/testlibrary
* @build ExtendedRobot
* @author Sergey Bylokhov
- @ @run main PaintNativeOnUpdate
+ * @run main PaintNativeOnUpdate
*/
public final class PaintNativeOnUpdate extends Label {
--- a/test/jdk/java/awt/Robot/AcceptExtraMouseButtons/AcceptExtraMouseButtons.java Thu Mar 01 16:35:36 2018 -0500
+++ b/test/jdk/java/awt/Robot/AcceptExtraMouseButtons/AcceptExtraMouseButtons.java Fri Mar 02 21:00:12 2018 +0100
@@ -22,7 +22,7 @@
*/
/*
- @test %I% %E%
+ @test
@key headful
@bug 6315717
@summary verifies that Robot is accepting extra mouse buttons
--- a/test/jdk/java/awt/TextArea/DisposeTest/TestDispose.java Thu Mar 01 16:35:36 2018 -0500
+++ b/test/jdk/java/awt/TextArea/DisposeTest/TestDispose.java Fri Mar 02 21:00:12 2018 +0100
@@ -27,6 +27,7 @@
/* @test
* @bug 7155298
+ * @key headful
* @run main/othervm/timeout=60 TestDispose
* @summary Editable TextArea blocks GUI application from exit.
* @author Sean Chou
--- a/test/jdk/java/awt/TextField/DisposeTest/TestDispose.java Thu Mar 01 16:35:36 2018 -0500
+++ b/test/jdk/java/awt/TextField/DisposeTest/TestDispose.java Fri Mar 02 21:00:12 2018 +0100
@@ -27,6 +27,7 @@
/* @test
* @bug 7155298
+ * @key headful
* @run main/othervm/timeout=60 TestDispose
* @summary Editable TextField blocks GUI application from exit.
* @author Sean Chou
--- a/test/jdk/java/awt/Toolkit/BadDisplayTest/BadDisplayTest.java Thu Mar 01 16:35:36 2018 -0500
+++ b/test/jdk/java/awt/Toolkit/BadDisplayTest/BadDisplayTest.java Fri Mar 02 21:00:12 2018 +0100
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2012, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2012, 2018, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
@@ -24,18 +24,23 @@
/*
* @test
+ * @key headful
* @summary Test that Toolkit.getDefaultToolkit throws AWTError exception if bad DISPLAY variable was set
* @bug 6818083
*
* @run shell/timeout=240 BadDisplayTest.sh
*/
-import java.awt.*;
+import java.awt.AWTError;
+import java.awt.Toolkit;
public class BadDisplayTest{
public static void main(String[] args) {
+ if (Boolean.getBoolean("java.awt.headless")) {
+ return;
+ }
- Throwable th = null;
+ Throwable th = null;
try {
Toolkit.getDefaultToolkit();
} catch (Throwable x) {
--- a/test/jdk/java/awt/Toolkit/DesktopProperties/rfe4758438.java Thu Mar 01 16:35:36 2018 -0500
+++ b/test/jdk/java/awt/Toolkit/DesktopProperties/rfe4758438.java Fri Mar 02 21:00:12 2018 +0100
@@ -28,6 +28,7 @@
/*
* @test
+ * @key headful
* @bug 4758438
* @summary Testcase to check the implementation of RFE 4758438
* The RFE suggests that the GNOME desktop properties
--- a/test/jdk/java/awt/Toolkit/RealSync/Test.java Thu Mar 01 16:35:36 2018 -0500
+++ b/test/jdk/java/awt/Toolkit/RealSync/Test.java Fri Mar 02 21:00:12 2018 +0100
@@ -24,6 +24,7 @@
/*
@test
@bug 6252005
+ @key headful
@summary Tests that realSync feature works
@author denis.mikhalkin: area=awt.toolkit
@modules java.desktop/sun.awt
@@ -150,7 +151,7 @@
}
}
errors.clear();
- System.exit(1);
+ throw new Error();
}
public static void asser(boolean value) {
--- a/test/jdk/java/awt/TrayIcon/8072769/bug8072769.java Thu Mar 01 16:35:36 2018 -0500
+++ b/test/jdk/java/awt/TrayIcon/8072769/bug8072769.java Fri Mar 02 21:00:12 2018 +0100
@@ -23,6 +23,8 @@
/* @test
@bug 8072769
+ @key headful
+ @requires (os.family == "windows")
@summary System tray icon title freezes java
@author Semyon Sadetsky
@library ../../../../lib/testlibrary
--- a/test/jdk/java/awt/TrayIcon/ActionCommand/ActionCommand.java Thu Mar 01 16:35:36 2018 -0500
+++ b/test/jdk/java/awt/TrayIcon/ActionCommand/ActionCommand.java Fri Mar 02 21:00:12 2018 +0100
@@ -26,6 +26,7 @@
/*
* @test
+ * @key headful
* @summary Check the return value of the getActionCommand method
* of the ActionEvent triggered when TrayIcon is double clicked
* (single clicked, on Mac)
--- a/test/jdk/java/awt/TrayIcon/ActionEventMask/ActionEventMask.java Thu Mar 01 16:35:36 2018 -0500
+++ b/test/jdk/java/awt/TrayIcon/ActionEventMask/ActionEventMask.java Fri Mar 02 21:00:12 2018 +0100
@@ -27,6 +27,7 @@
/*
* @test
+ * @key headful
* @summary Check if ActionEvent triggered when a TrayIcon is double
* (single, on Mac) clicked is visible by an AWTEventListener
* added to the Toolkit. It also checks if all listeners are
--- a/test/jdk/java/awt/TrayIcon/ActionEventTest/ActionEventTest.java Thu Mar 01 16:35:36 2018 -0500
+++ b/test/jdk/java/awt/TrayIcon/ActionEventTest/ActionEventTest.java Fri Mar 02 21:00:12 2018 +0100
@@ -24,6 +24,7 @@
/*
* @test
* @bug 6191390 8154328
+ * @key headful
* @summary Verify that ActionEvent is received with correct modifiers set.
* @modules java.desktop/java.awt:open
* @modules java.desktop/java.awt.peer
--- a/test/jdk/java/awt/TrayIcon/CtorTest/CtorTest.java Thu Mar 01 16:35:36 2018 -0500
+++ b/test/jdk/java/awt/TrayIcon/CtorTest/CtorTest.java Fri Mar 02 21:00:12 2018 +0100
@@ -24,6 +24,7 @@
/*
@test
@bug 6759726
+ @key headful
@summary TrayIcon constructor throws NPE instead of documented IAE
@author Dmitry Cherepanov area=awt.tray
@run main CtorTest
--- a/test/jdk/java/awt/TrayIcon/GetTrayIconsTest/GetTrayIcons.java Thu Mar 01 16:35:36 2018 -0500
+++ b/test/jdk/java/awt/TrayIcon/GetTrayIconsTest/GetTrayIcons.java Fri Mar 02 21:00:12 2018 +0100
@@ -26,6 +26,7 @@
/*
* @test
+ * @key headful
* @summary Check the getTrayIcons method of the SystemTray
* @author Dmitriy Ermashov (dmitriy.ermashov@oracle.com)
* @run main GetTrayIcons
--- a/test/jdk/java/awt/TrayIcon/InterJVMTest/InterJVM.java Thu Mar 01 16:35:36 2018 -0500
+++ b/test/jdk/java/awt/TrayIcon/InterJVMTest/InterJVM.java Fri Mar 02 21:00:12 2018 +0100
@@ -23,6 +23,7 @@
/*
* @test
+ * @key headful
* @summary Check if TrayIcon added by a JVM is not visible
* in another JVM
* @author Dmitriy Ermashov (dmitriy.ermashov@oracle.com)
--- a/test/jdk/java/awt/TrayIcon/ModalityTest/ModalityTest.java Thu Mar 01 16:35:36 2018 -0500
+++ b/test/jdk/java/awt/TrayIcon/ModalityTest/ModalityTest.java Fri Mar 02 21:00:12 2018 +0100
@@ -27,6 +27,7 @@
/*
* @test
+ * @key headful
* @summary Check for MouseEvents with all mouse buttons
* @author Dmitriy Ermashov (dmitriy.ermashov@oracle.com)
* @modules java.desktop/java.awt:open
--- a/test/jdk/java/awt/TrayIcon/MouseEventMask/MouseEventMaskTest.java Thu Mar 01 16:35:36 2018 -0500
+++ b/test/jdk/java/awt/TrayIcon/MouseEventMask/MouseEventMaskTest.java Fri Mar 02 21:00:12 2018 +0100
@@ -27,6 +27,7 @@
/*
* @test
+ * @key headful
* @summary Check if MouseEvents triggered by TrayIcon are visible
* by an AWTEventListener added to the Toolkit. It also
* checks if all listeners are triggered when AWTEventListeners
--- a/test/jdk/java/awt/TrayIcon/MouseMovedTest/MouseMovedTest.java Thu Mar 01 16:35:36 2018 -0500
+++ b/test/jdk/java/awt/TrayIcon/MouseMovedTest/MouseMovedTest.java Fri Mar 02 21:00:12 2018 +0100
@@ -27,6 +27,7 @@
/*
* @test
+ * @key headful
* @bug 7153700
* @summary Check for mouseMoved event for java.awt.TrayIcon
* @author Dmitriy Ermashov (dmitriy.ermashov@oracle.com)
--- a/test/jdk/java/awt/TrayIcon/PropertyChangeListenerTest.java Thu Mar 01 16:35:36 2018 -0500
+++ b/test/jdk/java/awt/TrayIcon/PropertyChangeListenerTest.java Fri Mar 02 21:00:12 2018 +0100
@@ -28,6 +28,7 @@
/*
* @test
+ * @key headful
* @summary Check if custom property change listener added
* to system tray works correctly
* @author Dmitriy Ermashov (dmitriy.ermashov@oracle.com)
--- a/test/jdk/java/awt/TrayIcon/SecurityCheck/FunctionalityCheck/FunctionalityCheck.java Thu Mar 01 16:35:36 2018 -0500
+++ b/test/jdk/java/awt/TrayIcon/SecurityCheck/FunctionalityCheck/FunctionalityCheck.java Fri Mar 02 21:00:12 2018 +0100
@@ -27,6 +27,7 @@
/*
* @test
+ * @key headful
* @summary Check for MouseEvents with all mouse buttons
* @author Dmitriy Ermashov (dmitriy.ermashov@oracle.com)
* @modules java.desktop/java.awt:open
--- a/test/jdk/java/awt/TrayIcon/SecurityCheck/NoPermissionTest/NoPermissionTest.java Thu Mar 01 16:35:36 2018 -0500
+++ b/test/jdk/java/awt/TrayIcon/SecurityCheck/NoPermissionTest/NoPermissionTest.java Fri Mar 02 21:00:12 2018 +0100
@@ -26,6 +26,7 @@
/*
* @test
+ * @key headful
* @summary Check for SecurityException occurrence if no permissions for system tray granted
* @author Dmitriy Ermashov (dmitriy.ermashov@oracle.com)
* @run main/othervm/policy=tray.policy -Djava.security.manager NoPermissionTest
--- a/test/jdk/java/awt/TrayIcon/SecurityCheck/PermissionTest/PermissionTest.java Thu Mar 01 16:35:36 2018 -0500
+++ b/test/jdk/java/awt/TrayIcon/SecurityCheck/PermissionTest/PermissionTest.java Fri Mar 02 21:00:12 2018 +0100
@@ -26,6 +26,7 @@
/*
* @test
+ * @key headful
* @summary Check for no Exception occurrence if permissions for system tray granted
* @author Dmitriy Ermashov (dmitriy.ermashov@oracle.com)
* @run main/othervm/policy=tray.policy -Djava.security.manager PermissionTest
--- a/test/jdk/java/awt/TrayIcon/SystemTrayInstance/SystemTrayInstanceTest.java Thu Mar 01 16:35:36 2018 -0500
+++ b/test/jdk/java/awt/TrayIcon/SystemTrayInstance/SystemTrayInstanceTest.java Fri Mar 02 21:00:12 2018 +0100
@@ -25,6 +25,7 @@
/*
* @test
+ * @key headful
* @summary Check the getSystemTray method of the SystemTray. Checks if
* a proper instance is returned in supported platforms and a proper
* exception is thrown in unsupported platforms
--- a/test/jdk/java/awt/TrayIcon/TrayIconAddTest/TrayIconAddTest.java Thu Mar 01 16:35:36 2018 -0500
+++ b/test/jdk/java/awt/TrayIcon/TrayIconAddTest/TrayIconAddTest.java Fri Mar 02 21:00:12 2018 +0100
@@ -27,6 +27,7 @@
/*
* @test
+ * @key headful
* @summary Tests the add method of the SystemTray. Checks if it
* throws proper exceptions in case of invalid arguments and adds the
* TrayIcon correctly in case of a proper argument
--- a/test/jdk/java/awt/TrayIcon/TrayIconEvents/TrayIconEventsTest.java Thu Mar 01 16:35:36 2018 -0500
+++ b/test/jdk/java/awt/TrayIcon/TrayIconEvents/TrayIconEventsTest.java Fri Mar 02 21:00:12 2018 +0100
@@ -28,6 +28,7 @@
/*
* @test
+ * @key headful
* @summary Check for MouseEvents with all mouse buttons
* @author Dmitriy Ermashov (dmitriy.ermashov@oracle.com)
* @modules java.desktop/java.awt:open
--- a/test/jdk/java/awt/TrayIcon/TrayIconMethodsTest/TrayIconMethodsTest.java Thu Mar 01 16:35:36 2018 -0500
+++ b/test/jdk/java/awt/TrayIcon/TrayIconMethodsTest/TrayIconMethodsTest.java Fri Mar 02 21:00:12 2018 +0100
@@ -27,6 +27,7 @@
/*
* @test
+ * @key headful
* @summary Check various methods of the TrayIcon - whether the methods
* return the proper values, throws the proper exceptions etc
* @author Dmitriy Ermashov (dmitriy.ermashov@oracle.com)
--- a/test/jdk/java/awt/TrayIcon/TrayIconMouseTest/TrayIconMouseTest.java Thu Mar 01 16:35:36 2018 -0500
+++ b/test/jdk/java/awt/TrayIcon/TrayIconMouseTest/TrayIconMouseTest.java Fri Mar 02 21:00:12 2018 +0100
@@ -31,6 +31,7 @@
/*
* @test
* @bug 6384991
+ * @key headful
* @summary Check if ActionEvent is triggered by a TrayIcon when
* it is double clicked with mouse button 1 on windows
* or single clicked with button 3 on Mac OS X
--- a/test/jdk/java/awt/TrayIcon/TrayIconPopup/TrayIconPopupClickTest.java Thu Mar 01 16:35:36 2018 -0500
+++ b/test/jdk/java/awt/TrayIcon/TrayIconPopup/TrayIconPopupClickTest.java Fri Mar 02 21:00:12 2018 +0100
@@ -34,6 +34,7 @@
/*
* @test
+ * @key headful
* @summary Check if a action performed event is received when TrayIcon display
* message is clicked on.
* @author Shashidhara Veerabhadraiah (shashidhara.veerabhadraiah@oracle.com)
--- a/test/jdk/java/awt/TrayIcon/TrayIconPopup/TrayIconPopupTest.java Thu Mar 01 16:35:36 2018 -0500
+++ b/test/jdk/java/awt/TrayIcon/TrayIconPopup/TrayIconPopupTest.java Fri Mar 02 21:00:12 2018 +0100
@@ -26,6 +26,7 @@
/*
* @test
+ * @key headful
* @summary Check if a JPopupMenu can be displayed when TrayIcon is
* right clicked. It uses a JWindow as the parent of the JPopupMenu
* @author Dmitriy Ermashov (dmitriy.ermashov@oracle.com)
--- a/test/jdk/java/awt/TrayIcon/TrayIconRemoveTest/TrayIconRemoveTest.java Thu Mar 01 16:35:36 2018 -0500
+++ b/test/jdk/java/awt/TrayIcon/TrayIconRemoveTest/TrayIconRemoveTest.java Fri Mar 02 21:00:12 2018 +0100
@@ -26,6 +26,7 @@
/*
* @test
+ * @key headful
* @summary Test the remove method of the TrayIcon
* @author Dmitriy Ermashov (dmitriy.ermashov@oracle.com)
* @run main TrayIconRemoveTest
--- a/test/jdk/java/awt/TrayIcon/TrayIconSizeTest/TrayIconSizeTest.java Thu Mar 01 16:35:36 2018 -0500
+++ b/test/jdk/java/awt/TrayIcon/TrayIconSizeTest/TrayIconSizeTest.java Fri Mar 02 21:00:12 2018 +0100
@@ -27,6 +27,7 @@
/*
* @test
+ * @key headful
* @summary Test the methods TrayIcon.getSize and SystemTray.getTrayIconSize.
* There is no way to check whether the values returned are correct,
* so its checked whether the value is greater than a minimum
--- a/test/jdk/java/awt/TrayIcon/UpdatePopupMenu/UpdatePopupMenu.java Thu Mar 01 16:35:36 2018 -0500
+++ b/test/jdk/java/awt/TrayIcon/UpdatePopupMenu/UpdatePopupMenu.java Fri Mar 02 21:00:12 2018 +0100
@@ -24,6 +24,7 @@
/*
@test
@bug 8147841
+ @key headful
@summary Updating Tray Icon popup menu does not update menu items on Mac OS X
@run main/manual UpdatePopupMenu
*/
--- a/test/jdk/java/awt/Window/GetScreenLocation/GetScreenLocationTest.java Thu Mar 01 16:35:36 2018 -0500
+++ b/test/jdk/java/awt/Window/GetScreenLocation/GetScreenLocationTest.java Fri Mar 02 21:00:12 2018 +0100
@@ -22,7 +22,8 @@
*/
/**
- * @test @summary setLocationRelativeTo stopped working in Ubuntu 13.10 (Unity)
+ * @test
+ * @summary setLocationRelativeTo stopped working in Ubuntu 13.10 (Unity)
* @key headful
* @bug 8036915 8161273
* @run main/othervm -Dsun.java2d.uiScale=1 GetScreenLocationTest
--- a/test/jdk/java/awt/Window/MultiWindowApp/ChildAlwaysOnTopTest.java Thu Mar 01 16:35:36 2018 -0500
+++ b/test/jdk/java/awt/Window/MultiWindowApp/ChildAlwaysOnTopTest.java Fri Mar 02 21:00:12 2018 +0100
@@ -22,8 +22,10 @@
*/
/**
- * @test @summary setAlwaysOnTop doesn't behave correctly in Linux/Solaris under
- * certain scenarios
+ * @test
+ * @key headful
+ * @summary setAlwaysOnTop doesn't behave correctly in Linux/Solaris under
+ * certain scenarios
* @bug 8021961
* @author Semyon Sadetsky
* @run main ChildAlwaysOnTopTest
--- a/test/jdk/java/awt/Window/MultiWindowApp/MultiWindowAppTest.java Thu Mar 01 16:35:36 2018 -0500
+++ b/test/jdk/java/awt/Window/MultiWindowApp/MultiWindowAppTest.java Fri Mar 02 21:00:12 2018 +0100
@@ -22,7 +22,8 @@
*/
/**
- * @test @summary After calling frame.toBack() dialog goes to the back on Ubuntu 12.04
+ * @test
+ * @summary After calling frame.toBack() dialog goes to the back on Ubuntu 12.04
* @key headful
* @bug 8022334
* @author Semyon Sadetsky
--- a/test/jdk/java/awt/dnd/BadSerializaionTest/BadSerializationTest.java Thu Mar 01 16:35:36 2018 -0500
+++ b/test/jdk/java/awt/dnd/BadSerializaionTest/BadSerializationTest.java Fri Mar 02 21:00:12 2018 +0100
@@ -23,6 +23,7 @@
/**
* @test
+ * @key headful
* @bug 8030050
* @summary Validate fields on DnD class deserialization
* @author petr.pchelko@oracle.com
--- a/test/jdk/java/awt/dnd/DisposeFrameOnDragCrash/DisposeFrameOnDragTest.java Thu Mar 01 16:35:36 2018 -0500
+++ b/test/jdk/java/awt/dnd/DisposeFrameOnDragCrash/DisposeFrameOnDragTest.java Fri Mar 02 21:00:12 2018 +0100
@@ -22,7 +22,8 @@
*/
/**
- * @test @summary JVM crash if the frame is disposed in DropTargetListener
+ * @test
+ * @summary JVM crash if the frame is disposed in DropTargetListener
* @key headful
* @author Petr Pchelko
* @library ../../regtesthelpers
--- a/test/jdk/java/awt/dnd/ImageTransferTest/ImageTransferTest.java Thu Mar 01 16:35:36 2018 -0500
+++ b/test/jdk/java/awt/dnd/ImageTransferTest/ImageTransferTest.java Fri Mar 02 21:00:12 2018 +0100
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2014, 2016, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2014, 2018, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
@@ -22,16 +22,17 @@
*/
/*
- @test
- @key headful
- @bug 4397404 4720930
- @summary tests that images of all supported native image formats are transfered properly
- @library ../../../../lib/testlibrary
- @library ../../regtesthelpers/process/
- @build jdk.testlibrary.OSInfo ProcessResults ProcessCommunicator
- @author gas@sparc.spb.su area=Clipboard
- @run main ImageTransferTest
-*/
+ * @test
+ * @key headful
+ * @bug 4397404 4720930 8197926
+ * @summary tests that images of all supported native image formats are
+ * transferred properly
+ * @library ../../../../lib/testlibrary
+ * @library ../../regtesthelpers/process/
+ * @build jdk.testlibrary.OSInfo ProcessResults ProcessCommunicator
+ * @author gas@sparc.spb.su area=Clipboard
+ * @run main/timeout=240 ImageTransferTest
+ */
import test.java.awt.regtesthelpers.process.ProcessCommunicator;
import test.java.awt.regtesthelpers.process.ProcessResults;
@@ -58,48 +59,59 @@
public class ImageTransferTest {
public static void main(String[] arg) throws Exception {
ImageDragSource ids = new ImageDragSource();
- ids.frame.setLocation(100, 100);
- ids.frame.setVisible(true);
- Util.sync();
- String classpath = System.getProperty("java.class.path");
- String[] args = new String[ids.formats.length + 4];
- args[0] = "200";
- args[1] = "100";
- args[2] = args[3] = "150";
+ try {
+ ids.frame.setUndecorated(true);
+ ids.frame.setLocation(100, 100);
+ ids.frame.setVisible(true);
+ Util.sync();
+ String classpath = System.getProperty("java.class.path");
+ String[] args = new String[ids.formats.length + 4];
+ args[0] = "200";
+ args[1] = "100";
+ args[2] = args[3] = "150";
- System.arraycopy(ids.formats, 0, args, 4, ids.formats.length);
- ProcessResults pres = ProcessCommunicator.executeChildProcess(ImageDropTarget.class, classpath, args);
+ System.arraycopy(ids.formats, 0, args, 4, ids.formats.length);
+ String scale = System.getProperty("sun.java2d.uiScale");
+ ProcessResults pres = ProcessCommunicator.
+ executeChildProcess(ImageDropTarget.class, classpath +
+ " -Dsun.java2d.uiScale=" + scale, args);
- if (pres.getStdErr() != null && pres.getStdErr().length() > 0) {
- System.err.println("========= Child VM System.err ========");
- System.err.print(pres.getStdErr());
- System.err.println("======================================");
- }
+ if (pres.getStdErr() != null && pres.getStdErr().length() > 0) {
+ System.err.println("========= Child VM System.err ========");
+ System.err.print(pres.getStdErr());
+ System.err.println("======================================");
+ }
- if (pres.getStdOut() != null && pres.getStdOut().length() > 0) {
- System.err.println("========= Child VM System.out ========");
- System.err.print(pres.getStdOut());
- System.err.println("======================================");
- }
+ if (pres.getStdOut() != null && pres.getStdOut().length() > 0) {
+ System.err.println("========= Child VM System.out ========");
+ System.err.print(pres.getStdOut());
+ System.err.println("======================================");
+ }
- boolean failed = false;
- String passedFormats = "";
- String failedFormats = "";
+ boolean failed = false;
+ String passedFormats = "";
+ String failedFormats = "";
- for (int i = 0; i < ids.passedArray.length; i++) {
- if (ids.passedArray[i]) passedFormats += ids.formats[i] + " ";
- else {
- failed = true;
- failedFormats += ids.formats[i] + " ";
+ for (int i = 0; i < ids.passedArray.length; i++) {
+ if (ids.passedArray[i]) passedFormats += ids.formats[i] + " ";
+ else {
+ failed = true;
+ failedFormats += ids.formats[i] + " ";
+ }
}
- }
- if (failed) {
- throw new RuntimeException("test failed: images in following " +
- "native formats are not transferred properly: " + failedFormats);
- } else {
- System.err.println("images in following " +
- "native formats are transferred properly: " + passedFormats);
+ if (failed) {
+ throw new RuntimeException("test failed: images in following " +
+ "native formats are not transferred properly: " +
+ failedFormats);
+ } else {
+ System.err.println("images in following " +
+ "native formats are transferred properly: " + passedFormats);
+ }
+ } finally {
+ if (ids.frame != null) {
+ ids.frame.dispose();
+ }
}
}
}
@@ -148,17 +160,23 @@
alpha = 0;
red = 0;
}
- pix[index++] = (alpha << 24) | (red << 16) | (green << 8) | blue;
+ pix[index++] =
+ (alpha << 24) | (red << 16) | (green << 8) | blue;
}
}
- return Toolkit.getDefaultToolkit().createImage(new MemoryImageSource(w, h, pix, 0, w));
+ return Toolkit.getDefaultToolkit().
+ createImage(new MemoryImageSource(w, h, pix, 0, w));
}
static String[] retrieveFormatsToTest() {
- SystemFlavorMap sfm = (SystemFlavorMap) SystemFlavorMap.getDefaultFlavorMap();
- java.util.List<String> ln = sfm.getNativesForFlavor(DataFlavor.imageFlavor);
- if (OSInfo.OSType.WINDOWS.equals(OSInfo.getOSType()) && !ln.contains("METAFILEPICT")) {
+ SystemFlavorMap sfm =
+ (SystemFlavorMap) SystemFlavorMap.getDefaultFlavorMap();
+ java.util.List<String> ln =
+ sfm.getNativesForFlavor(DataFlavor.imageFlavor);
+ if (OSInfo.OSType.WINDOWS.equals(OSInfo.getOSType()) &&
+ !ln.contains("METAFILEPICT"))
+ {
// for test failing on JDK without this fix
ln.add("METAFILEPICT");
}
@@ -166,15 +184,17 @@
}
static void leaveFormat(String format) {
- SystemFlavorMap sfm = (SystemFlavorMap) SystemFlavorMap.getDefaultFlavorMap();
- sfm.setFlavorsForNative(format, new DataFlavor[]{DataFlavor.imageFlavor});
+ SystemFlavorMap sfm =
+ (SystemFlavorMap) SystemFlavorMap.getDefaultFlavorMap();
+ sfm.setFlavorsForNative(format,
+ new DataFlavor[]{DataFlavor.imageFlavor});
sfm.setNativesForFlavor(DataFlavor.imageFlavor, new String[]{format});
}
boolean areImagesIdentical(Image im1, Image im2) {
if (formats[fi].equals("JFIF") || formats[fi].equals("image/jpeg") ||
- formats[fi].equals("GIF") || formats[fi].equals("image/gif")) {
+ formats[fi].equals("GIF") || formats[fi].equals("image/gif")) {
// JFIF and GIF are lossy formats
return true;
}
@@ -186,14 +206,14 @@
}
if (formats[fi].equals("PNG") ||
- formats[fi].equals("image/png") ||
- formats[fi].equals("image/x-png")) {
+ formats[fi].equals("image/png") ||
+ formats[fi].equals("image/x-png")) {
// check alpha as well
for (int i = 0; i < ib1.length; i++) {
if (ib1[i] != ib2[i]) {
System.err.println("different pixels: " +
- Integer.toHexString(ib1[i]) + " " +
- Integer.toHexString(ib2[i]));
+ Integer.toHexString(ib1[i]) + " " +
+ Integer.toHexString(ib2[i]));
return false;
}
}
@@ -201,8 +221,8 @@
for (int i = 0; i < ib1.length; i++) {
if ((ib1[i] & 0x00FFFFFF) != (ib2[i] & 0x00FFFFFF)) {
System.err.println("different pixels: " +
- Integer.toHexString(ib1[i]) + " " +
- Integer.toHexString(ib2[i]));
+ Integer.toHexString(ib1[i]) + " " +
+ Integer.toHexString(ib2[i]));
return false;
}
}
@@ -213,7 +233,8 @@
private static int[] getImageData(Image image) {
int width = image.getWidth(null);
int height = image.getHeight(null);
- BufferedImage bimage = new BufferedImage(width, height, BufferedImage.TYPE_INT_ARGB);
+ BufferedImage bimage =
+ new BufferedImage(width, height, BufferedImage.TYPE_INT_ARGB);
Graphics2D g2d = bimage.createGraphics();
try {
g2d.drawImage(image, 0, 0, width, height, null);
@@ -247,8 +268,8 @@
};
new DragSource().createDefaultDragGestureRecognizer(frame,
- DnDConstants.ACTION_COPY,
- dge -> dge.startDrag(null, new ImageSelection(image), dsl));
+ DnDConstants.ACTION_COPY,
+ dge -> dge.startDrag(null, new ImageSelection(image), dsl));
leaveFormat(formats[fi]);
}
@@ -261,12 +282,15 @@
class ImageDropTarget extends ImageTransferer {
private final Robot robot;
+ private static ImageDropTarget idt;
private static Point startPoint, endPoint = new Point(250, 150);
+ private static int dropCount = 0;
ImageDropTarget() throws AWTException {
DropTargetAdapter dropTargetAdapter = new DropTargetAdapter() {
@Override
public void drop(DropTargetDropEvent dtde) {
+ dropCount++;
checkImage(dtde);
startImageDrag();
}
@@ -299,7 +323,8 @@
dtde.dropComplete(true);
notifyTransferSuccess(true);
} else {
- System.err.println("transferred image is different from initial image");
+ System.err.println("transferred image is different from" +
+ " initial image");
dtde.dropComplete(false);
notifyTransferSuccess(false);
}
@@ -317,6 +342,9 @@
try {
Thread.sleep(1000);
} catch (InterruptedException e) {
+ if (idt.frame != null) {
+ idt.frame.dispose();
+ }
e.printStackTrace();
// Exit from the child process
System.exit(1);
@@ -324,7 +352,9 @@
robot.mouseMove(startPoint.x, startPoint.y);
robot.mousePress(InputEvent.BUTTON1_MASK);
for (Point p = new Point(startPoint); !p.equals(endPoint);
- p.translate(sign(endPoint.x - p.x), sign(endPoint.y - p.y))) {
+ p.translate(sign(endPoint.x - p.x),
+ sign(endPoint.y - p.y)))
+ {
robot.mouseMove(p.x, p.y);
try {
Thread.sleep(50);
@@ -341,6 +371,9 @@
if (status) {
System.err.println("format passed: " + formats[fi]);
} else {
+ if (idt.frame != null) {
+ idt.frame.dispose();
+ }
System.err.println("format failed: " + formats[fi]);
System.exit(1);
}
@@ -359,13 +392,15 @@
}
- public static void main(String[] args) {
+ public static void main(String[] args) throws Exception {
+ idt = new ImageDropTarget();
try {
- ImageDropTarget idt = new ImageDropTarget();
+ idt.frame.setUndecorated(true);
int x = Integer.parseInt(args[0]);
int y = Integer.parseInt(args[1]);
- startPoint = new Point(Integer.parseInt(args[2]), Integer.parseInt(args[3]));
+ startPoint = new Point(Integer.parseInt(args[2]),
+ Integer.parseInt(args[3]));
idt.formats = new String[args.length - 4];
System.arraycopy(args, 4, idt.formats, 0, args.length - 4);
@@ -376,7 +411,23 @@
Util.sync();
idt.startImageDrag();
+ new Thread(() -> {
+ try {
+ Thread.sleep(120000);
+ } catch (InterruptedException e) {
+ e.printStackTrace();
+ }
+ if (dropCount == 0) {
+ if (idt.frame != null) {
+ idt.frame.dispose();
+ }
+ System.exit(1);
+ }
+ }).start();
} catch (Throwable e) {
+ if (idt.frame != null) {
+ idt.frame.dispose();
+ }
e.printStackTrace();
System.exit(1);
}
@@ -407,7 +458,9 @@
}
@Override
- public Object getTransferData(DataFlavor flavor) throws UnsupportedFlavorException {
+ public Object getTransferData(DataFlavor flavor)
+ throws UnsupportedFlavorException
+ {
if (flavor.equals(flavors[IMAGE])) {
return data;
} else {
@@ -415,3 +468,4 @@
}
}
}
+
--- a/test/jdk/java/awt/font/TextLayout/TestAATMorxFont.java Thu Mar 01 16:35:36 2018 -0500
+++ b/test/jdk/java/awt/font/TextLayout/TestAATMorxFont.java Fri Mar 02 21:00:12 2018 +0100
@@ -23,6 +23,7 @@
*/
/* @test
+ * @key headful
* @summary verify rendering of MORX fonts on OS X.
* @bug 8031462
*/
--- a/test/jdk/java/awt/image/MultiResolutionImageCommonTest.java Thu Mar 01 16:35:36 2018 -0500
+++ b/test/jdk/java/awt/image/MultiResolutionImageCommonTest.java Fri Mar 02 21:00:12 2018 +0100
@@ -34,7 +34,8 @@
import java.awt.image.MultiResolutionImage;
/**
- * @test @bug 8011059
+ * @test
+ * @bug 8011059
* @author Alexander Scherbatiy
* @summary Test MultiResolution image loading and painting with various scaling
* combinations
--- a/test/jdk/java/awt/image/MultiResolutionImageTest.java Thu Mar 01 16:35:36 2018 -0500
+++ b/test/jdk/java/awt/image/MultiResolutionImageTest.java Fri Mar 02 21:00:12 2018 +0100
@@ -40,7 +40,8 @@
import java.awt.image.MultiResolutionImage;
/**
- * @test @bug 8011059
+ * @test
+ * @bug 8011059
* @key headful
* @author Alexander Scherbatiy
* @summary [macosx] Make JDK demos look perfect on retina displays
--- a/test/jdk/java/awt/print/PrinterJob/DeviceScale.java Thu Mar 01 16:35:36 2018 -0500
+++ b/test/jdk/java/awt/print/PrinterJob/DeviceScale.java Fri Mar 02 21:00:12 2018 +0100
@@ -23,6 +23,7 @@
/* @test 1.2 02/05/15
@bug 4810363 4924441
+ @key printer
@run main DeviceScale
@summary check the peek scale is the same as the device scale, and that the
clips are also the same
--- a/test/jdk/java/awt/print/PrinterJob/DummyPrintTest.java Thu Mar 01 16:35:36 2018 -0500
+++ b/test/jdk/java/awt/print/PrinterJob/DummyPrintTest.java Fri Mar 02 21:00:12 2018 +0100
@@ -23,6 +23,7 @@
/*
* @test
* @bug 6921664
+ * @key printer
* @summary Verifies number of copies and the job name are passed to a
* 3rd party PrintService.
* @run main DummyPrintTest
--- a/test/jdk/java/awt/print/PrinterJob/HeadlessPrintingTest.java Thu Mar 01 16:35:36 2018 -0500
+++ b/test/jdk/java/awt/print/PrinterJob/HeadlessPrintingTest.java Fri Mar 02 21:00:12 2018 +0100
@@ -24,6 +24,7 @@
/**
* @test
* @bug 4936867
+ * @key printer
* @summary Printing crashes in headless mode.
* @run main/othervm HeadlessPrintingTest
*/
--- a/test/jdk/java/awt/print/PrinterJob/PrintCrashTest.java Thu Mar 01 16:35:36 2018 -0500
+++ b/test/jdk/java/awt/print/PrinterJob/PrintCrashTest.java Fri Mar 02 21:00:12 2018 +0100
@@ -23,7 +23,7 @@
/**
* @test
- * @key printer
+ * @key printer headful
* @bug 8163889
* @summary Printing crashes on OSX.
* @run main PrintCrashTest
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/test/jdk/java/lang/CharSequence/Comparison.java Fri Mar 02 21:00:12 2018 +0100
@@ -0,0 +1,143 @@
+/*
+ * Copyright (c) 2018, Oracle and/or its affiliates. All rights reserved.
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * This code is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU General Public License version 2 only, as
+ * published by the Free Software Foundation.
+ *
+ * This code is distributed in the hope that it will be useful, but WITHOUT
+ * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
+ * version 2 for more details (a copy is included in the LICENSE file that
+ * accompanied this code).
+ *
+ * You should have received a copy of the GNU General Public License version
+ * 2 along with this work; if not, write to the Free Software Foundation,
+ * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
+ *
+ * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
+ * or visit www.oracle.com if you need additional information or have any
+ * questions.
+ */
+
+import java.nio.CharBuffer;
+import java.util.Iterator;
+import java.util.Set;
+import java.util.TreeSet;
+import org.testng.Assert;
+import org.testng.annotations.Test;
+
+/**
+ * @test
+ * @bug 8137326
+ * @summary Test to verify the compare method for the CharSequence class.
+ * @run testng Comparison
+ */
+public class Comparison {
+ static char SEP = ':';
+
+ static String[][] books = {
+ {"Biography", "Steve Jobs"},
+ {"Biography", "Elon Musk: Tesla, SpaceX, and the Quest for a Fantastic Future"},
+ {"Law", "Law 101: Everything You Need to Know About American Law, Fourth Edition"},
+ {"Law", "The Tools of Argument: How the Best Lawyers Think, Argue, and Win"},
+ {"History", "The History Book (Big Ideas Simply Explained)"},
+ {"History", "A People's History of the United States"},
+ };
+
+ /**
+ * Verifies the compare method by comparing StringBuilder objects with String
+ * objects.
+ */
+ @Test
+ public void compareWithString() {
+ Set<StringBuilder> sbSet = constructSBSet();
+ Set<String> sSet = constructStringSet();
+ Iterator<StringBuilder> iSB = sbSet.iterator();
+ Iterator<String> iS = sSet.iterator();
+ while (iSB.hasNext()) {
+ int result = CharSequence.compare(iSB.next(), iS.next());
+
+ Assert.assertTrue(result == 0, "Comparing item by item");
+ }
+ }
+
+ /**
+ * Verify comparison between two CharSequence implementations, including String,
+ * StringBuffer and StringBuilder.
+ *
+ * Note: CharBuffer states that "A char buffer is not comparable to any other type of object."
+ */
+ @Test
+ public void testCompare() {
+ StringBuilder sb1 = generateTestBuilder(65, 70, 97, 102);
+ StringBuilder sb2 = generateTestBuilder(65, 70, 97, 102);
+ StringBuilder sb3 = generateTestBuilder(65, 71, 97, 103);
+
+ Assert.assertTrue(CharSequence.compare(sb1, sb2) == 0, "Compare between StringBuilders");
+ Assert.assertFalse(CharSequence.compare(sb1, sb3) == 0, "Compare between StringBuilders");
+
+ Assert.assertTrue(CharSequence.compare(sb1, sb2.toString()) == 0, "Compare between a StringBuilder and String");
+ Assert.assertFalse(CharSequence.compare(sb1, sb3.toString()) == 0, "Compare between a StringBuilder and String");
+
+ StringBuffer buf1 = generateTestBuffer(65, 70, 97, 102);
+ StringBuffer buf2 = generateTestBuffer(65, 70, 97, 102);
+ StringBuffer buf3 = generateTestBuffer(65, 71, 97, 103);
+
+ Assert.assertTrue(CharSequence.compare(buf1, buf2) == 0, "Compare between StringBuffers");
+ Assert.assertFalse(CharSequence.compare(buf1, buf3) == 0, "Compare between StringBuffers");
+
+ Assert.assertTrue(CharSequence.compare(sb1, buf2) == 0, "Compare between a StringBuilder and StringBuffer");
+ Assert.assertFalse(CharSequence.compare(sb1, buf3) == 0, "Compare between a StringBuilder and StringBuffer");
+
+ CharSequence cs1 = (CharSequence)buf1;
+ CharSequence cs2 = (CharSequence)sb1;
+ @SuppressWarnings("unchecked")
+ int result = ((Comparable<Object>)cs1).compareTo(buf2);
+ Assert.assertTrue(result == 0, "Compare between a StringBuilder and StringBuffer");
+ }
+
+
+ private Set<String> constructStringSet() {
+ Set<String> sSet = new TreeSet<>();
+ for (String[] book : books) {
+ sSet.add(book[0] + SEP + book[1]);
+ }
+ return sSet;
+ }
+
+ private Set<StringBuilder> constructSBSet() {
+ Set<StringBuilder> sbSet = new TreeSet<>();
+ for (String[] book : books) {
+ sbSet.add(new StringBuilder(book[0]).append(SEP).append(book[1]));
+ }
+ return sbSet;
+ }
+
+ private static StringBuilder generateTestBuilder(int from1, int to1,
+ int from2, int to2) {
+ StringBuilder aBuffer = new StringBuilder(50);
+
+ for (int i = from1; i < to1; i++) {
+ aBuffer.append((char)i);
+ }
+ for (int i = from2; i < to2; i++) {
+ aBuffer.append((char)i);
+ }
+ return aBuffer;
+ }
+
+ private static StringBuffer generateTestBuffer(int from1, int to1,
+ int from2, int to2) {
+ StringBuffer aBuffer = new StringBuffer(50);
+
+ for (int i = from1; i < to1; i++) {
+ aBuffer.append((char)i);
+ }
+ for (int i = from2; i < to2; i++) {
+ aBuffer.append((char)i);
+ }
+ return aBuffer;
+ }
+}
--- a/test/jdk/java/lang/Character/Supplementary.java Thu Mar 01 16:35:36 2018 -0500
+++ b/test/jdk/java/lang/Character/Supplementary.java Fri Mar 02 21:00:12 2018 +0100
@@ -23,7 +23,7 @@
/*
* @test
- * @bug 4533872 4985214 4985217 5017268 5017280
+ * @bug 4533872 4985214 4985217 4993841 5017268 5017280
* @summary Unit tests for supplementary character support (JSR-204)
* @compile Supplementary.java
* @run main/timeout=600 Supplementary
@@ -59,6 +59,9 @@
test04(str);
test05(str);
+ // Test for toString(int)
+ test06();
+
// Test unpaired surrogates
testUnpaired();
@@ -454,6 +457,23 @@
checkNewIndex(a, 0, index, length);
}
+ /**
+ * Test toString(int)
+ *
+ * This test case assumes that Character.toChars()/String(char[]) work
+ * correctly.
+ */
+ static void test06() {
+ for (int cp = Character.MIN_CODE_POINT; cp <= Character.MAX_CODE_POINT; cp++) {
+ String result = Character.toString(cp);
+ String expected = new String(Character.toChars(cp));
+ if (!result.equals(expected)) {
+ throw new RuntimeException("Wrong string is created. code point: " +
+ cp + ", result: " + result + ", expected: " + expected);
+ }
+ }
+ }
+
private static void checkNewIndex(Object data, int offset, int result, int expected) {
String type = getType(data);
String offsetType = (offset > 0) ? "positive" : (offset < 0) ? "negative" : "0";
@@ -580,6 +600,7 @@
// Test toChar(int)
// toChar(int, char[], int)
+ // toString(int)
// for exceptions
static void testExceptions00() {
callToChars1(-1, IllegalArgumentException.class);
@@ -595,6 +616,9 @@
callToChars3(MIN_SUPPLEMENTARY, new char[1], 0, IndexOutOfBoundsException.class);
callToChars3(MIN_SUPPLEMENTARY, new char[2], -1, IndexOutOfBoundsException.class);
callToChars3(MIN_SUPPLEMENTARY, new char[2], 1, IndexOutOfBoundsException.class);
+
+ callToString(Character.MIN_CODE_POINT - 1, IllegalArgumentException.class);
+ callToString(Character.MAX_CODE_POINT + 1, IllegalArgumentException.class);
}
static final boolean At = true, Before = false;
@@ -834,6 +858,19 @@
+ expectedException.getName());
}
+ private static void callToString(int codePoint, Class expectedException) {
+ try {
+ String s = Character.toString(codePoint);
+ } catch (Exception e) {
+ if (expectedException.isInstance(e)) {
+ return;
+ }
+ throw new RuntimeException("Unspecified exception", e);
+ }
+ throw new RuntimeException("toString(int) didn't throw "
+ + expectedException.getName());
+ }
+
private static String getType(Object data) {
return (data instanceof CharSequence) ? "CharSequence" : "char[]";
}
--- a/test/jdk/java/lang/String/CompactString/CompareTo.java Thu Mar 01 16:35:36 2018 -0500
+++ b/test/jdk/java/lang/String/CompactString/CompareTo.java Fri Mar 02 21:00:12 2018 +0100
@@ -28,8 +28,9 @@
/*
* @test
- * @bug 8077559
- * @summary Tests Compact String. This one is for String.compareTo.
+ * @bug 8077559 8137326
+ * @summary Tests Compact String. Verifies the compareTo method for String,
+ * StringBuilder and StringBuffer.
* @run testng/othervm -XX:+CompactStrings CompareTo
* @run testng/othervm -XX:-CompactStrings CompareTo
*/
@@ -91,4 +92,46 @@
source));
});
}
+
+ /*
+ * Runs the same test with StringBuilder
+ */
+ @Test(dataProvider = "provider")
+ public void testStringBuilder(String str, String anotherString, int expected) {
+ StringBuilder another = new StringBuilder(anotherString);
+ map.get(str)
+ .forEach(
+ (source, data) -> {
+ StringBuilder sb = new StringBuilder(data);
+ assertEquals(
+ sb.compareTo(another),
+ expected,
+ String.format(
+ "testing StringBuilder(%s).compareTo(%s), source : %s, ",
+ escapeNonASCIIs(data),
+ escapeNonASCIIs(anotherString),
+ source));
+ });
+ }
+
+ /*
+ * Runs the same test with StringBuffer
+ */
+ @Test(dataProvider = "provider")
+ public void testStringBuffer(String str, String anotherString, int expected) {
+ StringBuffer another = new StringBuffer(anotherString);
+ map.get(str)
+ .forEach(
+ (source, data) -> {
+ StringBuffer sb = new StringBuffer(data);
+ assertEquals(
+ sb.compareTo(another),
+ expected,
+ String.format(
+ "testing StringBuffer(%s).compareTo(%s), source : %s, ",
+ escapeNonASCIIs(data),
+ escapeNonASCIIs(anotherString),
+ source));
+ });
+ }
}
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/test/jdk/java/lang/String/StringRepeat.java Fri Mar 02 21:00:12 2018 +0100
@@ -0,0 +1,133 @@
+/*
+ * Copyright (c) 2018, Oracle and/or its affiliates. All rights reserved.
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * This code is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU General Public License version 2 only, as
+ * published by the Free Software Foundation.
+ *
+ * This code is distributed in the hope that it will be useful, but WITHOUT
+ * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
+ * version 2 for more details (a copy is included in the LICENSE file that
+ * accompanied this code).
+ *
+ * You should have received a copy of the GNU General Public License version
+ * 2 along with this work; if not, write to the Free Software Foundation,
+ * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
+ *
+ * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
+ * or visit www.oracle.com if you need additional information or have any
+ * questions.
+ */
+
+/*
+ * @test
+ * @summary This exercises String#repeat patterns and limits.
+ * @run main/othervm -Xmx4G StringRepeat
+ */
+
+import java.nio.CharBuffer;
+
+public class StringRepeat {
+ public static void main(String... arg) {
+ test1();
+ test2();
+ }
+
+ /*
+ * Varitions of repeat count.
+ */
+ static int[] REPEATS = {
+ 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16,
+ 32, 64, 128, 256, 512, 1024, 64 * 1024, 1024 * 1024,
+ 16 * 1024 * 1024
+ };
+
+ /*
+ * Varitions of Strings.
+ */
+ static String[] STRINGS = new String[] {
+ "", "\0", " ", "a", "$", "\u2022",
+ "ab", "abc", "abcd", "abcde",
+ "The quick brown fox jumps over the lazy dog."
+ };
+
+ /*
+ * Repeat String function tests.
+ */
+ static void test1() {
+ for (int repeat : REPEATS) {
+ for (String string : STRINGS) {
+ long limit = (long)string.length() * (long)repeat;
+
+ if ((long)(Integer.MAX_VALUE >> 1) <= limit) {
+ break;
+ }
+
+ verify(string.repeat(repeat), string, repeat);
+ }
+ }
+ }
+
+ /*
+ * Repeat String exception tests.
+ */
+ static void test2() {
+ try {
+ "abc".repeat(-1);
+ throw new RuntimeException("No exception for negative repeat count");
+ } catch (IllegalArgumentException ex) {
+ // Correct
+ }
+
+ try {
+ "abc".repeat(Integer.MAX_VALUE - 1);
+ throw new RuntimeException("No exception for large repeat count");
+ } catch (OutOfMemoryError ex) {
+ // Correct
+ }
+ }
+
+ static String truncate(String string) {
+ if (string.length() < 80) {
+ return string;
+ }
+ return string.substring(0, 80) + "...";
+ }
+
+ /*
+ * Verify string repeat patterns.
+ */
+ static void verify(String result, String string, int repeat) {
+ if (string.isEmpty() || repeat == 0) {
+ if (!result.isEmpty()) {
+ System.err.format("\"%s\".repeat(%d)%n", truncate(string), repeat);
+ System.err.format("Result \"%s\"%n", truncate(result));
+ System.err.format("Result expected to be empty, found string of length %d%n", result.length());
+ throw new RuntimeException();
+ }
+ } else {
+ int expected = 0;
+ int count = 0;
+ for (int offset = result.indexOf(string, expected);
+ 0 <= offset;
+ offset = result.indexOf(string, expected)) {
+ count++;
+ if (offset != expected) {
+ System.err.format("\"%s\".repeat(%d)%n", truncate(string), repeat);
+ System.err.format("Result \"%s\"%n", truncate(result));
+ System.err.format("Repeat expected at %d, found at = %d%n", expected, offset);
+ throw new RuntimeException();
+ }
+ expected += string.length();
+ }
+ if (count != repeat) {
+ System.err.format("\"%s\".repeat(%d)%n", truncate(string), repeat);
+ System.err.format("Result \"%s\"%n", truncate(result));
+ System.err.format("Repeat count expected to be %d, found %d%n", repeat, count);
+ throw new RuntimeException();
+ }
+ }
+ }
+}
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/test/jdk/java/lang/StringBuffer/Comparison.java Fri Mar 02 21:00:12 2018 +0100
@@ -0,0 +1,136 @@
+/*
+ * Copyright (c) 2018, Oracle and/or its affiliates. All rights reserved.
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * This code is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU General Public License version 2 only, as
+ * published by the Free Software Foundation.
+ *
+ * This code is distributed in the hope that it will be useful, but WITHOUT
+ * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
+ * version 2 for more details (a copy is included in the LICENSE file that
+ * accompanied this code).
+ *
+ * You should have received a copy of the GNU General Public License version
+ * 2 along with this work; if not, write to the Free Software Foundation,
+ * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
+ *
+ * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
+ * or visit www.oracle.com if you need additional information or have any
+ * questions.
+ */
+
+import java.util.Iterator;
+import java.util.Set;
+import java.util.TreeSet;
+import org.testng.Assert;
+import org.testng.annotations.Test;
+
+/**
+ * @test
+ * @bug 8137326
+ * @summary Test to verify the Comparable implementation for the StringBuffer class.
+ * @run testng Comparison
+ */
+public class Comparison {
+ static char SEP = ':';
+
+ static String[][] books = {
+ {"Biography", "Steve Jobs"},
+ {"Biography", "Elon Musk: Tesla, SpaceX, and the Quest for a Fantastic Future"},
+ {"Law", "Law 101: Everything You Need to Know About American Law, Fourth Edition"},
+ {"Law", "The Tools of Argument: How the Best Lawyers Think, Argue, and Win"},
+ {"History", "The History Book (Big Ideas Simply Explained)"},
+ {"History", "A People's History of the United States"},
+ };
+
+ /**
+ * Verifies the Comparable implementation by comparing with two TreeSet that
+ * contain either StringBuffer or String.
+ */
+ @Test
+ public void compareWithString() {
+ Set<StringBuffer> sbSet = constructSBSet();
+ Set<String> sSet = constructStringSet();
+ Iterator<StringBuffer> iSB = sbSet.iterator();
+ Iterator<String> iS = sSet.iterator();
+ while (iSB.hasNext()) {
+ String temp1 = iSB.next().toString();
+ System.out.println(temp1);
+ String temp2 = iS.next();
+ System.out.println(temp2);
+
+ Assert.assertTrue(temp1.equals(temp2), "Comparing item by item");
+ }
+
+ }
+
+ /**
+ * Compares between StringBuffers
+ */
+ @Test
+ public void testCompare() {
+ StringBuffer sb1 = generateTestBuffer(65, 70, 97, 102);
+ StringBuffer sb2 = generateTestBuffer(65, 70, 97, 102);
+ StringBuffer sb3 = generateTestBuffer(65, 71, 97, 103);
+
+ System.out.println(sb1.toString());
+ System.out.println(sb2.toString());
+ System.out.println(sb3.toString());
+ Assert.assertTrue(sb1.compareTo(sb2) == 0, "Compare sb1 and sb2");
+ Assert.assertFalse(sb1.compareTo(sb3) == 0, "Compare sb1 and sb3");
+ }
+
+ /**
+ * Verifies that the comparison is from index 0 to length() - 1 of the two
+ * character sequences.
+ */
+ @Test
+ public void testModifiedSequence() {
+ StringBuffer sb1 = generateTestBuffer(65, 70, 97, 102);
+ StringBuffer sb2 = generateTestBuffer(65, 70, 98, 103);
+
+ // contain different character sequences
+ Assert.assertFalse(sb1.compareTo(sb2) == 0, "Compare the sequences before truncation");
+
+ // the first 5 characters however are the same
+ sb1.setLength(5);
+ sb2.setLength(5);
+
+ System.out.println(sb1.toString());
+ System.out.println(sb2.toString());
+
+ Assert.assertTrue(sb1.compareTo(sb2) == 0, "Compare sb1 and sb2");
+ Assert.assertTrue(sb1.toString().compareTo(sb2.toString()) == 0, "Compare strings of sb1 and sb2");
+ }
+
+ private Set<String> constructStringSet() {
+ Set<String> sSet = new TreeSet<>();
+ for (String[] book : books) {
+ sSet.add(book[0] + SEP + book[1]);
+ }
+ return sSet;
+ }
+
+ private Set<StringBuffer> constructSBSet() {
+ Set<StringBuffer> sbSet = new TreeSet<>();
+ for (String[] book : books) {
+ sbSet.add(new StringBuffer(book[0]).append(SEP).append(book[1]));
+ }
+ return sbSet;
+ }
+
+ private static StringBuffer generateTestBuffer(int from1, int to1,
+ int from2, int to2) {
+ StringBuffer aBuffer = new StringBuffer(50);
+
+ for (int i = from1; i < to1; i++) {
+ aBuffer.append((char)i);
+ }
+ for (int i = from2; i < to2; i++) {
+ aBuffer.append((char)i);
+ }
+ return aBuffer;
+ }
+}
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/test/jdk/java/lang/StringBuilder/Comparison.java Fri Mar 02 21:00:12 2018 +0100
@@ -0,0 +1,136 @@
+/*
+ * Copyright (c) 2018, Oracle and/or its affiliates. All rights reserved.
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * This code is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU General Public License version 2 only, as
+ * published by the Free Software Foundation.
+ *
+ * This code is distributed in the hope that it will be useful, but WITHOUT
+ * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
+ * version 2 for more details (a copy is included in the LICENSE file that
+ * accompanied this code).
+ *
+ * You should have received a copy of the GNU General Public License version
+ * 2 along with this work; if not, write to the Free Software Foundation,
+ * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
+ *
+ * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
+ * or visit www.oracle.com if you need additional information or have any
+ * questions.
+ */
+
+import java.util.Iterator;
+import java.util.Set;
+import java.util.TreeSet;
+import org.testng.Assert;
+import org.testng.annotations.Test;
+
+/**
+ * @test
+ * @bug 8137326
+ * @summary Test to verify the Comparable implementation for the StringBuilder class.
+ * @run testng Comparison
+ */
+public class Comparison {
+ static char SEP = ':';
+
+ static String[][] books = {
+ {"Biography", "Steve Jobs"},
+ {"Biography", "Elon Musk: Tesla, SpaceX, and the Quest for a Fantastic Future"},
+ {"Law", "Law 101: Everything You Need to Know About American Law, Fourth Edition"},
+ {"Law", "The Tools of Argument: How the Best Lawyers Think, Argue, and Win"},
+ {"History", "The History Book (Big Ideas Simply Explained)"},
+ {"History", "A People's History of the United States"},
+ };
+
+ /**
+ * Verifies the Comparable implementation by comparing with two TreeSet that
+ * contain either StringBuilder or String.
+ */
+ @Test
+ public void compareWithString() {
+ Set<StringBuilder> sbSet = constructSBSet();
+ Set<String> sSet = constructStringSet();
+ Iterator<StringBuilder> iSB = sbSet.iterator();
+ Iterator<String> iS = sSet.iterator();
+ while (iSB.hasNext()) {
+ String temp1 = iSB.next().toString();
+ System.out.println(temp1);
+ String temp2 = iS.next();
+ System.out.println(temp2);
+
+ Assert.assertTrue(temp1.equals(temp2), "Comparing item by item");
+ }
+
+ }
+
+ /**
+ * Compares between StringBuilders
+ */
+ @Test
+ public void testCompare() {
+ StringBuilder sb1 = generateTestBuffer(65, 70, 97, 102);
+ StringBuilder sb2 = generateTestBuffer(65, 70, 97, 102);
+ StringBuilder sb3 = generateTestBuffer(65, 71, 97, 103);
+
+ System.out.println(sb1.toString());
+ System.out.println(sb2.toString());
+ System.out.println(sb3.toString());
+ Assert.assertTrue(sb1.compareTo(sb2) == 0, "Compare sb1 and sb2");
+ Assert.assertFalse(sb1.compareTo(sb3) == 0, "Compare sb1 and sb3");
+ }
+
+ /**
+ * Verifies that the comparison is from index 0 to length() - 1 of the two
+ * character sequences.
+ */
+ @Test
+ public void testModifiedSequence() {
+ StringBuilder sb1 = generateTestBuffer(65, 70, 97, 102);
+ StringBuilder sb2 = generateTestBuffer(65, 70, 98, 103);
+
+ // contain different character sequences
+ Assert.assertFalse(sb1.compareTo(sb2) == 0, "Compare the sequences before truncation");
+
+ // the first 5 characters however are the same
+ sb1.setLength(5);
+ sb2.setLength(5);
+
+ System.out.println(sb1.toString());
+ System.out.println(sb2.toString());
+
+ Assert.assertTrue(sb1.compareTo(sb2) == 0, "Compare sb1 and sb2");
+ Assert.assertTrue(sb1.toString().compareTo(sb2.toString()) == 0, "Compare strings of sb1 and sb2");
+ }
+
+ private Set<String> constructStringSet() {
+ Set<String> sSet = new TreeSet<>();
+ for (String[] book : books) {
+ sSet.add(book[0] + SEP + book[1]);
+ }
+ return sSet;
+ }
+
+ private Set<StringBuilder> constructSBSet() {
+ Set<StringBuilder> sbSet = new TreeSet<>();
+ for (String[] book : books) {
+ sbSet.add(new StringBuilder(book[0]).append(SEP).append(book[1]));
+ }
+ return sbSet;
+ }
+
+ private static StringBuilder generateTestBuffer(int from1, int to1,
+ int from2, int to2) {
+ StringBuilder aBuffer = new StringBuilder(50);
+
+ for (int i = from1; i < to1; i++) {
+ aBuffer.append((char)i);
+ }
+ for (int i = from2; i < to2; i++) {
+ aBuffer.append((char)i);
+ }
+ return aBuffer;
+ }
+}
--- a/test/jdk/java/lang/management/CompositeData/ThreadInfoCompositeData.java Thu Mar 01 16:35:36 2018 -0500
+++ b/test/jdk/java/lang/management/CompositeData/ThreadInfoCompositeData.java Fri Mar 02 21:00:12 2018 +0100
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2004, 2015, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2004, 2018, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
@@ -23,26 +23,26 @@
/*
* @test
- * @bug 4982289
+ * @bug 4982289 8198253
* @summary Test ThreadInfo.from to return a valid
* ThreadInfo object. Or throw exception if
* the input CompositeData is invalid.
* @author Mandy Chung
*
- * @compile OpenTypeConverter.java
- * @build ThreadInfoCompositeData
+ * @build ThreadInfoCompositeData OpenTypeConverter
* @run main ThreadInfoCompositeData
*/
+
import javax.management.openmbean.*;
import java.lang.management.LockInfo;
import java.lang.management.MonitorInfo;
import java.lang.management.ThreadInfo;
+import java.util.Arrays;
import java.util.Objects;
+import java.util.stream.Stream;
public class ThreadInfoCompositeData {
- private static StackTraceElement[] ste = new StackTraceElement[1];
- private static CompositeData[] steCD = new CompositeData[1];
private static String lockClassName = "myClass";
private static int lockIdentityHashCode = 123456;
private static String lockName = lockClassName + '@' +
@@ -53,55 +53,100 @@
public static void main(String[] argv) throws Exception {
// A valid CompositeData is passed to ThreadInfo
createGoodCompositeData();
- // A valid CompositeData for JDK 5.0 ThreadInfo
+ // A valid CompositeData for JDK 5 ThreadInfo
// is passed to ThreadInfo
createV5ThreadInfo();
+ // ThreadInfo of version N can accept lockedMonitors of version >= N
+ withNewMonitorInfoCompositeData();
+
// An invalid CompositeData is passed to ThreadInfo.from()
badNameCompositeData();
badTypeCompositeData();
+ badMissingCompositeData();
+ withV5StackTraceCompositeData();
+ withInvalidMonitorInfoCompositeData();
System.out.println("Test passed");
}
public static void createGoodCompositeData() throws Exception {
- CompositeType ct =
- new CompositeType("MyCompositeType",
- "CompositeType for ThreadInfo",
- validItemNames,
- validItemNames,
- validItemTypes);
- CompositeData cd =
- new CompositeDataSupport(ct,
- validItemNames,
- values);
+ CompositeData cd = Factory.makeThreadInfoCompositeData();
ThreadInfo info = ThreadInfo.from(cd);
checkThreadInfo(info);
+ }
+
+ /*
+ * An invalid CompositeData with JDK 9 attributes but missing JDK 6 attributes
+ */
+ public static void badMissingCompositeData() throws Exception {
+ CompositeData cd = Factory.makeCompositeDataMissingV6();
+ try {
+ ThreadInfo info = ThreadInfo.from(cd);
+ throw new RuntimeException("IllegalArgumentException not thrown");
+ } catch (IllegalArgumentException e) {}
+ }
+
+ static final StackTraceElement STE =
+ new StackTraceElement("FooClass", "getFoo", "Foo.java", 100);
+
+
+ /*
+ * Current version of ThreadInfo but an older version of StackTraceElement
+ */
+ public static void withV5StackTraceCompositeData() throws Exception {
+ CompositeData cd = Factory.makeThreadInfoWithV5StackTrace();
+ try {
+ ThreadInfo info = ThreadInfo.from(cd);
+ throw new RuntimeException("IllegalArgumentException not thrown");
+ } catch (IllegalArgumentException e) {}
+ }
+
+ /*
+ * Current version of ThreadInfo but an older version of MonitorInfo
+ * and the value of "lockedStackFrame" attribute is null.
+ */
+ public static void withInvalidMonitorInfoCompositeData() throws Exception {
+ CompositeData cd = Factory.makeThreadInfoWithIncompatibleMonitorInfo();
+
+ // verify MonitorInfo is valid
+ CompositeData[] monitors = (CompositeData[])cd.get("lockedMonitors");
+ CompositeData ste = (CompositeData)monitors[0].get("lockedStackFrame");
+ if (((Integer)monitors[0].get("lockedStackDepth")) >= 0 || ste != null) {
+ throw new RuntimeException("Expected negative stack depth and null stack frame");
+ }
+ MonitorInfo minfo = MonitorInfo.from(monitors[0]);
+ checkLockInfo(minfo);
+ if (minfo.getLockedStackFrame() != null) {
+ throw new RuntimeException("Expected null stack frame");
+ }
+
+ try {
+ ThreadInfo info = ThreadInfo.from(cd);
+ throw new RuntimeException("IllegalArgumentException not thrown");
+ } catch (IllegalArgumentException e) {}
+ }
+
+ /*
+ * ThreadInfo of version N can accept lockedMonitors of version >= N
+ */
+ public static void withNewMonitorInfoCompositeData() throws Exception {
+ CompositeData cd = Factory.makeThreadInfoWithNewMonitorInfo();
+ ThreadInfo info = ThreadInfo.from(cd);
+ checkThreadInfo(info);
+ }
+
+ /*
+ * Test CompositeData representing JDK 5 ThreadInfo
+ */
+ public static void createV5ThreadInfo() throws Exception {
+ CompositeData cd = Factory.makeThreadInfoV5CompositeData();
+ ThreadInfo info = ThreadInfo.from(cd);
+ checkThreadInfoV5(info);
}
- public static void createV5ThreadInfo() throws Exception {
- String[] v5ItemNames = new String[NUM_V5_ATTS];
- OpenType[] v5ItemTypes = new OpenType[NUM_V5_ATTS];
- Object[] v5ItemValues = new Object[NUM_V5_ATTS];
- for (int i = 0; i < NUM_V5_ATTS; i++) {
- v5ItemNames[i] = validItemNames[i];
- v5ItemTypes[i] = validItemTypes[i];
- v5ItemValues[i] = values[i];
- }
- CompositeType ct =
- new CompositeType("MyCompositeType",
- "CompositeType for JDK 5.0 ThreadInfo",
- v5ItemNames,
- v5ItemNames,
- v5ItemTypes);
- CompositeData cd =
- new CompositeDataSupport(ct,
- v5ItemNames,
- v5ItemValues);
- ThreadInfo info = ThreadInfo.from(cd);
- checkThreadInfo(info);
- }
+ static void checkThreadInfoV5(ThreadInfo info) {
+ Object[] values = Factory.VALUES;
- static void checkThreadInfo(ThreadInfo info) throws Exception {
- if (info.getThreadId() != ((Long) values[THREAD_ID]).longValue()) {
+ if (info.getThreadId() != ((Long) values[THREAD_ID]).longValue()) {
throw new RuntimeException("Thread Id = " + info.getThreadId() +
" expected = " + values[THREAD_ID]);
}
@@ -148,30 +193,35 @@
info.getLockOwnerName() + " expected = " +
values[LOCK_OWNER_NAME]);
}
+
+ checkStackTrace(info.getStackTrace());
+ checkLockInfo(info.getLockInfo());
+ }
+
+ static void checkThreadInfo(ThreadInfo info) {
+ Object[] values = Factory.VALUES;
+
+ checkThreadInfoV5(info);
+
if (!values[DAEMON].equals(info.isDaemon())) {
throw new RuntimeException("Daemon = " +
- info.isDaemon() + " expected = " +
- values[DAEMON]);
+ info.isDaemon() + " expected = " + values[DAEMON]);
}
-
- checkStackTrace(info.getStackTrace());
-
- checkLockInfo(info.getLockInfo());
}
- private static void checkStackTrace(StackTraceElement[] s)
- throws Exception {
- if (ste.length != s.length) {
+ private static void checkStackTrace(StackTraceElement[] s) {
+ if (s.length != 1) {
throw new RuntimeException("Stack Trace length = " +
- s.length + " expected = " + ste.length);
+ s.length + " expected = 1");
}
- StackTraceElement s1 = ste[0];
+ StackTraceElement s1 = STE;
StackTraceElement s2 = s[0];
- if (!s1.getClassName().equals(s2.getClassName())) {
- throw new RuntimeException("Class name = " +
- s2.getClassName() + " expected = " + s1.getClassName());
+ // these attributes may be null
+ if (!Objects.equals(s1.getClassLoaderName(), s2.getClassLoaderName())) {
+ throw new RuntimeException("Class loader name = " +
+ s2.getClassLoaderName() + " expected = " + s1.getClassLoaderName());
}
if (!Objects.equals(s1.getModuleName(), s2.getModuleName())) {
throw new RuntimeException("Module name = " +
@@ -181,6 +231,11 @@
throw new RuntimeException("Module version = " +
s2.getModuleVersion() + " expected = " + s1.getModuleVersion());
}
+
+ if (!s1.getClassName().equals(s2.getClassName())) {
+ throw new RuntimeException("Class name = " +
+ s2.getClassName() + " expected = " + s1.getClassName());
+ }
if (!s1.getMethodName().equals(s2.getMethodName())) {
throw new RuntimeException("Method name = " +
s2.getMethodName() + " expected = " + s1.getMethodName());
@@ -195,8 +250,7 @@
}
}
- private static void checkLockInfo(LockInfo li)
- throws Exception {
+ private static void checkLockInfo(LockInfo li) {
if (!li.getClassName().equals(lockInfo.getClassName())) {
throw new RuntimeException("Class Name = " +
li.getClassName() + " expected = " + lockInfo.getClassName());
@@ -209,227 +263,493 @@
}
public static void badNameCompositeData() throws Exception {
- CompositeType ct =
- new CompositeType("MyCompositeType",
- "CompositeType for ThreadInfo",
- badItemNames,
- badItemNames,
- validItemTypes);
- CompositeData cd =
- new CompositeDataSupport(ct,
- badItemNames,
- values);
-
+ CompositeData cd = Factory.makeCompositeDataWithBadNames();
try {
ThreadInfo info = ThreadInfo.from(cd);
- } catch (IllegalArgumentException e) {
- System.out.println("Expected exception: " +
- e.getMessage());
- return;
- }
- throw new RuntimeException(
- "IllegalArgumentException not thrown");
+ throw new RuntimeException("IllegalArgumentException not thrown");
+ } catch (IllegalArgumentException e) { }
}
public static void badTypeCompositeData() throws Exception {
- CompositeType ct =
- new CompositeType("MyCompositeType",
- "CompositeType for ThreadInfo",
- validItemNames,
- validItemNames,
- badItemTypes);
-
- // patch values[STACK_TRACE] to Long
- values[STACK_TRACE] = new Long(1000);
- values[LOCK_INFO] = new Long(1000);
- CompositeData cd =
- new CompositeDataSupport(ct,
- validItemNames,
- values);
+ CompositeData cd = Factory.makeCompositeDataWithBadTypes();
try {
ThreadInfo info = ThreadInfo.from(cd);
- } catch (IllegalArgumentException e) {
- System.out.println("Expected exception: " +
- e.getMessage());
- return;
- }
- throw new RuntimeException(
- "IllegalArgumentException not thrown");
+ throw new RuntimeException("IllegalArgumentException not thrown");
+ } catch (IllegalArgumentException e) { }
}
- private static final int THREAD_ID = 0;
- private static final int THREAD_NAME = 1;
- private static final int THREAD_STATE = 2;
- private static final int BLOCKED_TIME = 3;
- private static final int BLOCKED_COUNT = 4;
- private static final int WAITED_TIME = 5;
- private static final int WAITED_COUNT = 6;
- private static final int LOCK_NAME = 7;
- private static final int LOCK_OWNER_ID = 8;
+ private static final int THREAD_ID = 0;
+ private static final int THREAD_NAME = 1;
+ private static final int THREAD_STATE = 2;
+ private static final int BLOCKED_TIME = 3;
+ private static final int BLOCKED_COUNT = 4;
+ private static final int WAITED_TIME = 5;
+ private static final int WAITED_COUNT = 6;
+ private static final int LOCK_NAME = 7;
+ private static final int LOCK_OWNER_ID = 8;
private static final int LOCK_OWNER_NAME = 9;
- private static final int STACK_TRACE = 10;
- private static final int SUSPENDED = 11;
- private static final int IN_NATIVE = 12;
- private static final int NUM_V5_ATTS = 13;
- // JDK 6.0 ThreadInfo attributes
- private static final int LOCK_INFO = 13;
- // JDK 9.0 ThreadInfo attributes
- private static final int DAEMON = 14;
- private static final int PRIORITY = 15;
+ private static final int STACK_TRACE = 10;
+ private static final int SUSPENDED = 11;
+ private static final int IN_NATIVE = 12;
+ // JDK 6 ThreadInfo attributes
+ private static final int LOCK_INFO = 13;
+ private static final int LOCKED_MONITORS = 14;
+ private static final int LOCKED_SYNCS = 15;
+ // JDK 9 ThreadInfo attributes
+ private static final int DAEMON = 16;
+ private static final int PRIORITY = 17;
+
+ static class Factory {
- private static final String[] validItemNames = {
- "threadId",
- "threadName",
- "threadState",
- "blockedTime",
- "blockedCount",
- "waitedTime",
- "waitedCount",
- "lockName",
- "lockOwnerId",
- "lockOwnerName",
- "stackTrace",
- "suspended",
- "inNative",
- "lockInfo",
- "daemon",
- "priority",
- };
+ static final CompositeType STE_COMPOSITE_TYPE;
+ static final CompositeType LOCK_INFO_COMPOSITE_TYPE;
+ static final CompositeType MONITOR_INFO_COMPOSITE_TYPE;
+ static final ArrayType STE_ARRAY_COMPOSITE_TYPE;
+ static final ArrayType LOCK_INFO_ARRAY_COMPOSITE_TYPE;
+ static final ArrayType MONITOR_INFO_ARRAY_COMPOSITE_TYPE;
+
+ static {
+ CompositeType steCType = null;
+ CompositeType lockInfoCType = null;
+ CompositeType monitorInfoCType = null;
+ ArrayType steArrayType = null;
+ ArrayType lockInfoArrayType = null;
+ ArrayType monitorInfoArrayType = null;
- private static OpenType[] validItemTypes = {
- SimpleType.LONG,
- SimpleType.STRING,
- SimpleType.STRING,
- SimpleType.LONG,
- SimpleType.LONG,
- SimpleType.LONG,
- SimpleType.LONG,
- SimpleType.STRING,
- SimpleType.LONG,
- SimpleType.STRING,
- null, // ArrayType for StackTraceElement[]
- SimpleType.BOOLEAN,
- SimpleType.BOOLEAN,
- null, // CompositeType for LockInfo
- SimpleType.BOOLEAN,
- SimpleType.INTEGER,
- };
+ try {
+ steCType = (CompositeType) OpenTypeConverter.toOpenType(StackTraceElement.class);
+ lockInfoCType = (CompositeType) OpenTypeConverter.toOpenType(LockInfo.class);
+ monitorInfoCType = (CompositeType) OpenTypeConverter.toOpenType(MonitorInfo.class);
+ steArrayType = new ArrayType(1, steCType);
+ lockInfoArrayType = new ArrayType(1, lockInfoCType);
+ monitorInfoArrayType = new ArrayType(1, monitorInfoCType);
+ } catch (Exception e) {
+ throw new RuntimeException(e);
+ }
+ STE_COMPOSITE_TYPE = steCType;
+ LOCK_INFO_COMPOSITE_TYPE = lockInfoCType;
+ MONITOR_INFO_COMPOSITE_TYPE = monitorInfoCType;
+ STE_ARRAY_COMPOSITE_TYPE = steArrayType;
+ LOCK_INFO_ARRAY_COMPOSITE_TYPE = lockInfoArrayType;
+ MONITOR_INFO_ARRAY_COMPOSITE_TYPE = monitorInfoArrayType;
+ }
+
+ static CompositeData makeThreadInfoCompositeData() throws OpenDataException {
+ CompositeType ct = new CompositeType("MyCompositeType",
+ "CompositeType for ThreadInfo",
+ ITEM_NAMES,
+ ITEM_NAMES,
+ ITEM_TYPES);
+ return new CompositeDataSupport(ct, ITEM_NAMES, VALUES);
+ }
- private static Object[] values = {
- new Long(100),
- "FooThread",
- "RUNNABLE",
- new Long(200),
- new Long(10),
- new Long(300),
- new Long(20),
- lockName,
- new Long(99),
- "BarThread",
- steCD,
- new Boolean(false),
- new Boolean(false),
- null, // To be initialized to lockInfoCD
- new Boolean(false),
- Thread.NORM_PRIORITY,
- };
+ static CompositeData makeThreadInfoV5CompositeData() throws OpenDataException {
+ CompositeType ct = new CompositeType("MyCompositeType",
+ "CompositeType for JDK 5 ThreadInfo",
+ V5_ITEM_NAMES,
+ V5_ITEM_NAMES,
+ V5_ITEM_TYPES);
+ return new CompositeDataSupport(ct, V5_ITEM_NAMES, V5_VALUES);
+ }
- private static final String[] steItemNames = {
- "classLoaderName",
- "moduleName",
- "moduleVersion",
- "className",
- "methodName",
- "fileName",
- "lineNumber",
- "nativeMethod",
- };
-
- private static final String[] lockInfoItemNames = {
- "className",
- "identityHashCode",
- };
-
- static {
- // create stack trace element
- ste[0] = new StackTraceElement("FooClass", "getFoo", "Foo.java", 100);
-
- // initialize the ste[0] and values and validItemTypes
- try {
- CompositeType steCType = (CompositeType)
- OpenTypeConverter.toOpenType(StackTraceElement.class);
- validItemTypes[STACK_TRACE] = new ArrayType(1, steCType);
-
- final Object[] steValue = {
- ste[0].getClassLoaderName(),
- ste[0].getModuleName(),
- ste[0].getModuleVersion(),
- ste[0].getClassName(),
- ste[0].getMethodName(),
- ste[0].getFileName(),
- new Integer(ste[0].getLineNumber()),
- new Boolean(ste[0].isNativeMethod()),
+ static CompositeData makeCompositeDataWithBadTypes() throws OpenDataException {
+ OpenType[] badItemTypes = {
+ SimpleType.LONG,
+ SimpleType.STRING,
+ SimpleType.STRING,
+ SimpleType.LONG,
+ SimpleType.LONG,
+ SimpleType.LONG,
+ SimpleType.LONG,
+ SimpleType.STRING,
+ SimpleType.LONG,
+ SimpleType.STRING,
+ SimpleType.LONG, // bad type
+ SimpleType.BOOLEAN,
+ SimpleType.BOOLEAN,
+ SimpleType.LONG, // bad type
+ SimpleType.LONG, // bad type
+ SimpleType.LONG, // bad type
+ SimpleType.BOOLEAN,
+ SimpleType.INTEGER,
};
- steCD[0] =
- new CompositeDataSupport(steCType,
- steItemNames,
- steValue);
+ CompositeType ct =
+ new CompositeType("Bad item types",
+ "CompositeType for ThreadInfo",
+ ITEM_NAMES,
+ ITEM_NAMES,
+ badItemTypes);
+
+ // Copy before mutating to avoid affecting other tests.
+ Object[] localValues = VALUES.clone();
+
+ // patch values[STACK_TRACE] to Long
+ localValues[STACK_TRACE] = Long.valueOf(1000);
+ localValues[LOCK_INFO] = Long.valueOf(1000);
+ localValues[LOCKED_MONITORS] = Long.valueOf(1000);
+ localValues[LOCKED_SYNCS] = Long.valueOf(1000);
+ return new CompositeDataSupport(ct, ITEM_NAMES, localValues);
+ }
+
+ static CompositeData makeCompositeDataWithBadNames() throws OpenDataException {
+ String[] badItemNames = ITEM_NAMES.clone();
+ badItemNames[STACK_TRACE] = "BadStackTrace"; // bad item name
+
+ CompositeType ct = new CompositeType("Bad item names",
+ "CompositeType for ThreadInfo",
+ badItemNames,
+ badItemNames,
+ ITEM_TYPES);
+ return new CompositeDataSupport(ct,
+ badItemNames,
+ VALUES);
+ }
+
+ /*
+ * Create a CompositeData of ThreadInfo without JDK 6 attributes
+ */
+ static CompositeData makeCompositeDataMissingV6() throws OpenDataException {
+ String[] itemNames = concat(V5_ITEM_NAMES, V9_ITEM_NAMES).toArray(String[]::new);
+ OpenType[] itemTypes = concat(V5_ITEM_TYPES, V9_ITEM_TYPES).toArray(OpenType[]::new);
+ Object[] values = concat(V5_VALUES, V9_VALUES).toArray(Object[]::new);
+
+ CompositeType ct =
+ new CompositeType("InvalidCompositeType",
+ "CompositeType for ThreadInfo",
+ itemNames,
+ itemNames,
+ itemTypes);
+ return new CompositeDataSupport(ct, itemNames, values);
+ }
+
+ static CompositeData makeStackTraceElement() {
+ Object[] steValue = {
+ STE.getClassLoaderName(),
+ STE.getModuleName(),
+ STE.getModuleVersion(),
+ STE.getClassName(),
+ STE.getMethodName(),
+ STE.getFileName(),
+ Integer.valueOf(STE.getLineNumber()),
+ Boolean.valueOf(STE.isNativeMethod()),
+ };
+
+ try {
+ return new CompositeDataSupport(STE_COMPOSITE_TYPE,
+ STE_ITEM_NAMES,
+ steValue);
+ } catch (OpenDataException e) {
+ throw new RuntimeException(e);
+ }
+ }
+
+ static CompositeData makeStackTraceElementV5() throws OpenDataException {
+ CompositeType steV5CType =
+ new CompositeType("JDK 5 StackTraceElement",
+ "CompositeType for JDK 5 StackTraceElement",
+ STE_V5_ITEM_NAMES,
+ STE_V5_ITEM_NAMES,
+ STE_V5_ITEM_TYPES);
+
+ Object[] steV5Value = {
+ STE.getClassName(),
+ STE.getMethodName(),
+ STE.getFileName(),
+ Integer.valueOf(STE.getLineNumber()),
+ Boolean.valueOf(STE.isNativeMethod()),
+ };
+
+ return new CompositeDataSupport(steV5CType, STE_V5_ITEM_NAMES, steV5Value);
+ }
+
+ /*
+ * Create a CompositeData of ThreadInfo without JDK 5 StackTraceElement
+ */
+ static CompositeData makeThreadInfoWithV5StackTrace() throws OpenDataException {
+ OpenType[] badTypes = ITEM_TYPES.clone();
+ Object[] badValues = VALUES.clone();
- CompositeType lockInfoCType = (CompositeType)
- OpenTypeConverter.toOpenType(LockInfo.class);
- validItemTypes[LOCK_INFO] = lockInfoCType;
+ CompositeData[] stackTrace = new CompositeData[1];
+ stackTrace[0] = makeStackTraceElementV5();
+ badTypes[STACK_TRACE] = new ArrayType(1, stackTrace[0].getCompositeType());
+ badValues[STACK_TRACE] = stackTrace;
+ CompositeType ct = new CompositeType("CompositeType",
+ "ThreadInfo with JDK 5 StackTraceElement",
+ ITEM_NAMES,
+ ITEM_NAMES,
+ badTypes);
+ return new CompositeDataSupport(ct, ITEM_NAMES, badValues);
+ }
+
+ /*
+ * Create MonitorInfo with JDK 5 StackTraceElement (i.e. JDK 6 MonitorInfo)
+ * The value of "lockedStackFrame" attribute is null to ensure that
+ * the validation is done.
+ */
+ static CompositeData makeV6MonitorInfo() throws OpenDataException {
+ CompositeData steV5 = makeStackTraceElementV5();
+
+ String[] names = MONITOR_INFO_COMPOSITE_TYPE.keySet().toArray(new String[0]);
+ OpenType[] types = new OpenType[names.length];
+ for (int i=0; i < names.length; i++) {
+ String n = names[i];
+ types[i] = "lockedStackFrame".equals(n)
+ ? steV5.getCompositeType()
+ : MONITOR_INFO_COMPOSITE_TYPE.getType(n);
+ }
+
+ CompositeType ctype =
+ new CompositeType("JDK 6 MonitorInfo",
+ "CompositeType for JDK 6 MonitorInfo",
+ names,
+ names,
+ types);
+
+ Object[] values = {
+ lockClassName,
+ lockIdentityHashCode,
+ -1,
+ null
+ };
+
+ return new CompositeDataSupport(ctype, names, values);
+ }
+
+ /*
+ * Create a CompositeData of ThreadInfo with incompatible MonitorInfo
+ */
+ static CompositeData makeThreadInfoWithIncompatibleMonitorInfo() throws OpenDataException {
+ OpenType[] badTypes = ITEM_TYPES.clone();
+ Object[] badValues = VALUES.clone();
- final Object[] lockInfoValue = {
+ CompositeData[] lockedMonitors = new CompositeData[1];
+ lockedMonitors[0] = makeV6MonitorInfo();
+ badTypes[LOCKED_MONITORS] = new ArrayType(1, lockedMonitors[0].getCompositeType());
+ badValues[LOCKED_MONITORS] = lockedMonitors;
+ CompositeType ct = new CompositeType("CompositeType",
+ "ThreadInfo with incompatible MonitorInfo",
+ ITEM_NAMES,
+ ITEM_NAMES,
+ badTypes);
+ return new CompositeDataSupport(ct, ITEM_NAMES, badValues);
+ }
+
+ static CompositeData makeNewMonitorInfo() throws OpenDataException {
+ String[] names = Stream.concat(MONITOR_INFO_COMPOSITE_TYPE.keySet().stream(),
+ Stream.of("extra")).toArray(String[]::new);
+ OpenType[] types = new OpenType[names.length];
+ for (int i=0; i < names.length; i++) {
+ String n = names[i];
+ types[i] = "extra".equals(n)
+ ? SimpleType.STRING
+ : MONITOR_INFO_COMPOSITE_TYPE.getType(n);
+ }
+
+ CompositeType compositeType =
+ new CompositeType("JDK X MonitorInfo",
+ "CompositeType for JDK X MonitorInfo",
+ names,
+ names,
+ types);
+
+ Object[] values = {
+ lockClassName,
+ lockIdentityHashCode,
+ Integer.valueOf(1),
+ makeStackTraceElement(),
+ "extra"
+ };
+
+ return new CompositeDataSupport(compositeType, names, values);
+ }
+
+ /*
+ * Create a CompositeData of ThreadInfo with a newer version of MonitorInfo
+ */
+ static CompositeData makeThreadInfoWithNewMonitorInfo() throws OpenDataException {
+ OpenType[] types = ITEM_TYPES.clone();
+ Object[] badValues = VALUES.clone();
+
+ CompositeData[] lockedMonitors = new CompositeData[1];
+ lockedMonitors[0] = makeNewMonitorInfo();
+ types[LOCKED_MONITORS] = new ArrayType(1, lockedMonitors[0].getCompositeType());
+ badValues[LOCKED_MONITORS] = lockedMonitors;
+ CompositeType ct = new CompositeType("CompositeType",
+ "ThreadInfo with JDK 5 MonitorInfo",
+ ITEM_NAMES,
+ ITEM_NAMES,
+ types);
+ return new CompositeDataSupport(ct, ITEM_NAMES, badValues);
+ }
+
+ static CompositeData makeLockInfo() {
+ Object[] lockInfoValue = {
lockInfo.getClassName(),
lockInfo.getIdentityHashCode(),
};
- values[LOCK_INFO] =
- new CompositeDataSupport(lockInfoCType,
- lockInfoItemNames,
- lockInfoValue);
- } catch (Exception e) {
- throw new RuntimeException(e);
+ try {
+ return new CompositeDataSupport(LOCK_INFO_COMPOSITE_TYPE,
+ LOCK_INFO_ITEM_NAMES,
+ lockInfoValue);
+ } catch (OpenDataException e) {
+ throw new RuntimeException(e);
+ }
+ }
+
+ static CompositeData[] makeLockedSynchronizers() {
+ CompositeData[] lockedSyncs = new CompositeData[1];
+ lockedSyncs[0] = makeLockInfo();
+ return lockedSyncs;
+ }
+
+ static CompositeData[] makeLockedMonitors() {
+ CompositeData[] lockedMonitorsCD = new CompositeData[1];
+
+ Object[] lockedMonitorsValue = {
+ lockInfo.getClassName(),
+ lockInfo.getIdentityHashCode(),
+ makeStackTraceElement(),
+ Integer.valueOf(1),
+ };
+ try {
+ lockedMonitorsCD[0] =
+ new CompositeDataSupport(MONITOR_INFO_COMPOSITE_TYPE,
+ LOCKED_MONITORS_ITEM_NAMES,
+ lockedMonitorsValue);
+ } catch (OpenDataException e) {
+ throw new RuntimeException(e);
+ }
+ return lockedMonitorsCD;
+ }
+
+ static final String[] V5_ITEM_NAMES = {
+ "threadId",
+ "threadName",
+ "threadState",
+ "blockedTime",
+ "blockedCount",
+ "waitedTime",
+ "waitedCount",
+ "lockName",
+ "lockOwnerId",
+ "lockOwnerName",
+ "stackTrace",
+ "suspended",
+ "inNative",
+ };
+
+ static final String[] V6_ITEM_NAMES = {
+ "lockInfo",
+ "lockedMonitors",
+ "lockedSynchronizers",
+ };
+
+ static final String[] V9_ITEM_NAMES = {
+ "daemon",
+ "priority",
+ };
+
+ static final OpenType[] V5_ITEM_TYPES = {
+ SimpleType.LONG,
+ SimpleType.STRING,
+ SimpleType.STRING,
+ SimpleType.LONG,
+ SimpleType.LONG,
+ SimpleType.LONG,
+ SimpleType.LONG,
+ SimpleType.STRING,
+ SimpleType.LONG,
+ SimpleType.STRING,
+ STE_ARRAY_COMPOSITE_TYPE,
+ SimpleType.BOOLEAN,
+ SimpleType.BOOLEAN,
+ };
+
+ static final OpenType[] V6_ITEM_TYPES = {
+ LOCK_INFO_COMPOSITE_TYPE,
+ MONITOR_INFO_ARRAY_COMPOSITE_TYPE,
+ LOCK_INFO_ARRAY_COMPOSITE_TYPE,
+ };
+
+ static final OpenType[] V9_ITEM_TYPES = {
+ SimpleType.BOOLEAN,
+ SimpleType.INTEGER,
+ };
+
+ static final String[] STE_ITEM_NAMES = {
+ "classLoaderName",
+ "moduleName",
+ "moduleVersion",
+ "className",
+ "methodName",
+ "fileName",
+ "lineNumber",
+ "nativeMethod",
+ };
+
+ static final String[] STE_V5_ITEM_NAMES = Arrays.copyOfRange(STE_ITEM_NAMES, 3, 8);
+
+ static final OpenType[] STE_V5_ITEM_TYPES = {
+ SimpleType.STRING,
+ SimpleType.STRING,
+ SimpleType.STRING,
+ SimpleType.INTEGER,
+ SimpleType.BOOLEAN
+ };
+
+ static final String[] LOCK_INFO_ITEM_NAMES = {
+ "className",
+ "identityHashCode",
+ };
+
+ static final String[] LOCKED_MONITORS_ITEM_NAMES = {
+ LOCK_INFO_ITEM_NAMES[0],
+ LOCK_INFO_ITEM_NAMES[1],
+ "lockedStackFrame",
+ "lockedStackDepth",
+ };
+
+ static final Object[] V5_VALUES = {
+ Long.valueOf(100),
+ "FooThread",
+ "RUNNABLE",
+ Long.valueOf(200),
+ Long.valueOf(10),
+ Long.valueOf(300),
+ Long.valueOf(20),
+ lockName,
+ Long.valueOf(99),
+ "BarThread",
+ new CompositeData[] { makeStackTraceElement() },
+ Boolean.valueOf(false),
+ Boolean.valueOf(false),
+ };
+
+ static final Object[] V6_VALUES = {
+ makeLockInfo(),
+ makeLockedMonitors(),
+ makeLockedSynchronizers(),
+ };
+
+ static final Object[] V9_VALUES = {
+ Boolean.valueOf(true),
+ Thread.NORM_PRIORITY,
+ };
+
+ static final String[] ITEM_NAMES =
+ concat(V5_ITEM_NAMES, V6_ITEM_NAMES, V9_ITEM_NAMES).toArray(String[]::new);
+
+ static final OpenType[] ITEM_TYPES =
+ concat(V5_ITEM_TYPES, V6_ITEM_TYPES, V9_ITEM_TYPES).toArray(OpenType[]::new);
+
+ static final Object[] VALUES =
+ concat(V5_VALUES, V6_VALUES, V9_VALUES).toArray(Object[]::new);
+
+ static <T> Stream<T> concat(T[]... streams) {
+ return Stream.of(streams).flatMap(a -> Arrays.stream(a));
}
}
-
- private static final String[] badItemNames = {
- "threadId",
- "threadName",
- "threadState",
- "blockedTime",
- "blockedCount",
- "waitedTime",
- "waitedCount",
- "lockName",
- "lockOwnerId",
- "lockOwnerName",
- "BadStackTrace", // bad item name
- "suspended",
- "inNative",
- "lockInfo",
- "daemon",
- "priority",
- };
- private static final OpenType[] badItemTypes = {
- SimpleType.LONG,
- SimpleType.STRING,
- SimpleType.STRING,
- SimpleType.LONG,
- SimpleType.LONG,
- SimpleType.LONG,
- SimpleType.LONG,
- SimpleType.STRING,
- SimpleType.LONG,
- SimpleType.STRING,
- SimpleType.LONG, // bad type
- SimpleType.BOOLEAN,
- SimpleType.BOOLEAN,
- SimpleType.LONG, // bad type
- SimpleType.BOOLEAN,
- SimpleType.INTEGER,
- };
-
}
--- a/test/jdk/java/net/URLClassLoader/NullURLTest.java Thu Mar 01 16:35:36 2018 -0500
+++ b/test/jdk/java/net/URLClassLoader/NullURLTest.java Fri Mar 02 21:00:12 2018 +0100
@@ -71,14 +71,14 @@
} catch (NullPointerException e) {
// expected
}
- // This section should be uncommented if 8026517 is fixed.
-// try {
-// loader = new URLClassLoader(invalidURLArray);
-// System.err.println("URLClassLoader(invalidURLArray) did not throw NPE");
-// failures++;
-// } catch (NullPointerException e) {
-// // expected
-// }
+
+ try {
+ loader = new URLClassLoader(invalidURLArray);
+ System.err.println("URLClassLoader(invalidURLArray) did not throw NPE");
+ failures++;
+ } catch (NullPointerException e) {
+ // expected
+ }
try {
loader = new URLClassLoader(validURLArray, null);
@@ -93,14 +93,14 @@
} catch (NullPointerException e) {
// expected
}
- // This section should be uncommented if 8026517 is fixed.
-// try {
-// loader = new URLClassLoader(invalidURLArray, null);
-// System.err.println("URLClassLoader(invalidURLArray, null) did not throw NPE");
-// failures++;
-// } catch (NullPointerException e) {
-// // expected
-// }
+
+ try {
+ loader = new URLClassLoader(invalidURLArray, null);
+ System.err.println("URLClassLoader(invalidURLArray, null) did not throw NPE");
+ failures++;
+ } catch (NullPointerException e) {
+ // expected
+ }
try {
loader = new URLClassLoader(validURLArray, null, null);
@@ -115,14 +115,14 @@
} catch (NullPointerException e) {
// expected
}
- // This section should be uncommented if 8026517 is fixed.
-// try {
-// loader = new URLClassLoader(invalidURLArray, null, null);
-// System.err.println("URLClassLoader(invalidURLArray, null, null) did not throw NPE");
-// failures++;
-// } catch (NullPointerException e) {
-// // expected
-// }
+
+ try {
+ loader = new URLClassLoader(invalidURLArray, null, null);
+ System.err.println("URLClassLoader(invalidURLArray, null, null) did not throw NPE");
+ failures++;
+ } catch (NullPointerException e) {
+ // expected
+ }
try {
loader = URLClassLoader.newInstance(validURLArray);
@@ -137,14 +137,14 @@
} catch (NullPointerException e) {
// expected
}
- // This section should be uncommented if 8026517 is fixed.
-// try {
-// loader = URLClassLoader.newInstance(invalidURLArray);
-// System.err.println("URLClassLoader.newInstance(invalidURLArray) did not throw NPE");
-// failures++;
-// } catch (NullPointerException e) {
-// // expected
-// }
+
+ try {
+ loader = URLClassLoader.newInstance(invalidURLArray);
+ System.err.println("URLClassLoader.newInstance(invalidURLArray) did not throw NPE");
+ failures++;
+ } catch (NullPointerException e) {
+ // expected
+ }
try {
loader = URLClassLoader.newInstance(validURLArray, null);
@@ -159,14 +159,14 @@
} catch (NullPointerException e) {
// expected
}
- // This section should be uncommented if 8026517 is fixed.
-// try {
-// loader = URLClassLoader.newInstance(invalidURLArray, null);
-// System.err.println("URLClassLoader.newInstance(invalidURLArray, null) did not throw NPE");
-// failures++;
-// } catch (NullPointerException e) {
-// // expected
-// }
+
+ try {
+ loader = URLClassLoader.newInstance(invalidURLArray, null);
+ System.err.println("URLClassLoader.newInstance(invalidURLArray, null) did not throw NPE");
+ failures++;
+ } catch (NullPointerException e) {
+ // expected
+ }
if (failures != 0) {
throw new Exception("URLClassLoader NullURLTest had "+failures+" failures!");
--- a/test/jdk/java/nio/channels/AsyncCloseAndInterrupt.java Thu Mar 01 16:35:36 2018 -0500
+++ b/test/jdk/java/nio/channels/AsyncCloseAndInterrupt.java Fri Mar 02 21:00:12 2018 +0100
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2002, 2016, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2002, 2018, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
@@ -708,9 +708,9 @@
test(connectedSocketChannelFactory);
- if (TestUtil.onWindows()) {
+ if (TestUtil.onWindows() || TestUtil.onSolaris()) {
log.println("WARNING Cannot reliably test connect/finishConnect"
- + " operations on Windows");
+ + " operations on this platform");
} else {
// Only the following tests need refuser's connection backlog
// to be saturated
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/test/jdk/java/nio/channels/SocketChannel/CloseDuringConnect.java Fri Mar 02 21:00:12 2018 +0100
@@ -0,0 +1,143 @@
+/*
+ * Copyright (c) 2018, Oracle and/or its affiliates. All rights reserved.
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * This code is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU General Public License version 2 only, as
+ * published by the Free Software Foundation.
+ *
+ * This code is distributed in the hope that it will be useful, but WITHOUT
+ * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
+ * version 2 for more details (a copy is included in the LICENSE file that
+ * accompanied this code).
+ *
+ * You should have received a copy of the GNU General Public License version
+ * 2 along with this work; if not, write to the Free Software Foundation,
+ * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
+ *
+ * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
+ * or visit www.oracle.com if you need additional information or have any
+ * questions.
+ */
+
+/* @test
+ * @bug 8198928
+ * @run main CloseDuringConnect
+ * @summary Attempt to cause a deadlock by closing a SocketChannel in one thread
+ * where another thread is closing the channel after a connect fail
+ */
+
+import java.io.IOException;
+import java.io.UncheckedIOException;
+import java.net.InetAddress;
+import java.net.InetSocketAddress;
+import java.net.SocketAddress;
+import java.nio.channels.SocketChannel;
+import java.util.concurrent.Executors;
+import java.util.concurrent.Future;
+import java.util.concurrent.ScheduledExecutorService;
+import java.util.stream.IntStream;
+import static java.util.concurrent.TimeUnit.MILLISECONDS;
+
+public class CloseDuringConnect {
+
+ // number of test iterations, needs to be 5-10 at least
+ static final int ITERATIONS = 50;
+
+ // maximum delay before closing SocketChannel, in milliseconds
+ static final int MAX_DELAY_BEFORE_CLOSE = 20;
+
+ /**
+ * Returns the socket address of an endpoint that refuses connections. The
+ * endpoint is an InetSocketAddress where the address is the loopback address
+ * and the port is a system port (1-1023 range).
+ */
+ static SocketAddress refusingEndpoint() {
+ InetAddress lb = InetAddress.getLoopbackAddress();
+ int port = 1;
+ while (port < 1024) {
+ SocketAddress sa = new InetSocketAddress(lb, port);
+ try {
+ SocketChannel.open(sa).close();
+ } catch (IOException ioe) {
+ return sa;
+ }
+ port++;
+ }
+ throw new RuntimeException("Unable to find system port that is refusing connections");
+ }
+
+ /**
+ * Invoked by a task in the thread pool to connect to a remote address.
+ * The connection should never be established.
+ */
+ static Void connect(SocketChannel sc, SocketAddress remote) {
+ try {
+ if (!sc.connect(remote)) {
+ while (!sc.finishConnect()) {
+ Thread.yield();
+ }
+ }
+ throw new RuntimeException("Connected, should not happen");
+ } catch (IOException expected) { }
+ if (sc.isConnected())
+ throw new RuntimeException("isConnected return true, should not happen");
+ return null;
+ }
+
+ /**
+ * Invoked by a task in the thread pool to close a socket channel.
+ */
+ static Void close(SocketChannel sc) {
+ try {
+ sc.close();
+ } catch (IOException e) {
+ throw new UncheckedIOException("close failed", e);
+ }
+ return null;
+ }
+
+ /**
+ * Test for deadlock by submitting a task to connect to the given address
+ * while another task closes the socket channel.
+ * @param pool the thread pool to submit or schedule tasks
+ * @param remote the remote address, does not accept connections
+ * @param blocking socket channel blocking mode
+ * @param delay the delay, in millis, before closing the channel
+ */
+ static void test(ScheduledExecutorService pool,
+ SocketAddress remote,
+ boolean blocking,
+ long delay) {
+ try {
+ SocketChannel sc = SocketChannel.open();
+ sc.configureBlocking(blocking);
+ Future<Void> r1 = pool.submit(() -> connect(sc, remote));
+ Future<Void> r2 = pool.schedule(() -> close(sc), delay, MILLISECONDS);
+ r1.get();
+ r2.get();
+ } catch (Throwable t) {
+ throw new RuntimeException("Test failed", t);
+ }
+ }
+
+ public static void main(String[] args) throws Exception {
+ SocketAddress refusing = refusingEndpoint();
+ ScheduledExecutorService pool = Executors.newScheduledThreadPool(2);
+ try {
+ IntStream.range(0, ITERATIONS).forEach(i -> {
+ System.out.format("Iteration %d ...%n", (i + 1));
+
+ // Execute the test for varying delays up to MAX_DELAY_BEFORE_CLOSE,
+ // for socket channels configured both blocking and non-blocking
+ IntStream.range(0, MAX_DELAY_BEFORE_CLOSE).forEach(delay -> {
+ test(pool, refusing, /*blocking mode*/true, delay);
+ test(pool, refusing, /*blocking mode*/false, delay);
+ });
+ });
+ } finally {
+ pool.shutdown();
+ }
+ }
+}
--- a/test/jdk/java/nio/channels/spi/SelectorProvider/inheritedChannel/InheritedChannelTest.java Thu Mar 01 16:35:36 2018 -0500
+++ b/test/jdk/java/nio/channels/spi/SelectorProvider/inheritedChannel/InheritedChannelTest.java Fri Mar 02 21:00:12 2018 +0100
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2017, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2017, 2018 Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
@@ -34,7 +34,7 @@
* jdk.test.lib.Platform
* jdk.test.lib.process.*
* StateTest StateTestService EchoTest EchoService CloseTest Launcher Util
- * @run testng/othervm InheritedChannelTest
+ * @run testng/othervm/native InheritedChannelTest
* @key intermittent
*/
@@ -68,9 +68,7 @@
private static final String OS_ARCH = ARCH.equals("i386") ? "i586" : ARCH;
private static final Path LD_LIBRARY_PATH
- = Paths.get(TEST_SRC, "lib", OS_NAME + "-" + OS_ARCH);
-
- private static final Path LAUNCHERLIB = LD_LIBRARY_PATH.resolve("libLauncher.so");
+ = Paths.get(System.getProperty("java.library.path"));
@DataProvider
public Object[][] testCases() {
@@ -99,11 +97,6 @@
@Test(dataProvider = "testCases")
public void test(String desc, List<String> opts) throws Throwable {
- if (!Files.exists(LAUNCHERLIB)) {
- System.out.println("Cannot find " + LAUNCHERLIB
- + " - library not available for this system");
- return;
- }
System.out.println("LD_LIBRARY_PATH=" + LD_LIBRARY_PATH);
List<String> args = new ArrayList<>();
--- a/test/jdk/java/nio/channels/spi/SelectorProvider/inheritedChannel/Launcher.c Thu Mar 01 16:35:36 2018 -0500
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,165 +0,0 @@
-/*
- *
- *
- * A simple launcher to launch a program as if it was launched by inetd.
- */
-#include <stdio.h>
-#include <stdlib.h>
-#include <sys/types.h>
-#include <sys/socket.h>
-#include <unistd.h>
-#include <dirent.h>
-#include <sys/stat.h>
-#include <fcntl.h>
-#include <ctype.h>
-
-#include "jni.h"
-
-#include "Launcher.h"
-
-/*
- * Throws the exception of the given class name and detail message
- */
-static void ThrowException(JNIEnv *env, const char *name, const char *msg) {
- jclass cls = (*env)->FindClass(env, name);
- if (cls != NULL) {
- (*env)->ThrowNew(env, cls, msg);
- }
-}
-
-/*
- * Convert a jstring to an ISO 8859_1 encoded C string
- */
-static char* getString8859_1Chars(JNIEnv *env, jstring jstr) {
- int i;
- char *result;
- jint len = (*env)->GetStringLength(env, jstr);
- const jchar *str = (*env)->GetStringCritical(env, jstr, 0);
- if (str == 0) {
- return NULL;
- }
-
- result = (char*)malloc(len+1);
- if (result == 0) {
- (*env)->ReleaseStringCritical(env, jstr, str);
- ThrowException(env, "java/lang/OutOfMemoryError", NULL);
- return NULL;
- }
-
- for (i=0; i<len; i++) {
- jchar unicode = str[i];
- if (unicode <= 0x00ff)
- result[i] = unicode;
- else
- result[i] = '?';
- }
-
- result[len] = 0;
- (*env)->ReleaseStringCritical(env, jstr, str);
- return result;
-}
-
-
-/*
- * Class: Launcher
- * Method: launch0
- * Signature: ([Ljava/lang/String;I)V
- */
-JNIEXPORT void JNICALL Java_Launcher_launch0
- (JNIEnv *env, jclass cls, jobjectArray cmdarray, jint serviceFd)
-{
- pid_t pid;
- DIR* dp;
- struct dirent* dirp;
- int thisFd;
- char** cmdv;
- int i, cmdlen;
-
- /*
- * Argument 0 of the command array is the program name.
- * Here we just extract the program name and any arguments into
- * a command array suitable for use with execvp.
- */
- cmdlen = (*env)->GetArrayLength(env, cmdarray);
- if (cmdlen == 0) {
- ThrowException(env, "java/lang/IllegalArgumentException",
- "command array must at least include the program name");
- return;
- }
- cmdv = (char **)malloc((cmdlen + 1) * sizeof(char *));
- if (cmdv == NULL) {
- ThrowException(env, "java/lang/OutOfMemoryError", NULL);
- return;
- }
-
- for (i=0; i<cmdlen; i++) {
- jstring str = (*env)->GetObjectArrayElement(env, cmdarray, i);
- cmdv[i] = (char *) getString8859_1Chars(env, str);
- if (cmdv[i] == NULL) {
- return;
- }
- }
-
- /*
- * Command array must have NULL as the last entry
- */
- cmdv[cmdlen] = NULL;
-
- /*
- * Launch the program. As this isn't a complete inetd or Runtime.exec
- * implementation we don't have a reaper to pick up child exit status.
- */
-#ifdef __solaris__
- pid = fork1();
-#else
- pid = fork();
-#endif
- if (pid != 0) {
- if (pid < 0) {
- ThrowException(env, "java/io/IOException", "fork failed");
- }
- return;
- }
-
- /*
- * We need to close all file descriptors except for serviceFd. To
- * get the list of open file descriptos we read through /proc/self/fd
- * but to open this requires a file descriptor. We could use a specific
- * file descriptor and fdopendir but Linux doesn't seem to support
- * fdopendir. Instead we use opendir and make an assumption on the
- * file descriptor that is used (by opening & closing a file).
- */
- thisFd = open("/dev/null", O_RDONLY);
- if (thisFd < 0) {
- _exit(-1);
- }
- close(thisFd);
-
- if ((dp = opendir("/proc/self/fd")) == NULL) {
- _exit(-1);
- }
-
- while ((dirp = readdir(dp)) != NULL) {
- if (isdigit(dirp->d_name[0])) {
- int fd = strtol(dirp->d_name, NULL, 10);
- if (fd != serviceFd && fd != thisFd) {
- close(fd);
- }
- }
- }
- closedir(dp);
-
- /*
- * At this point all file descriptors are closed except for
- * serviceFd. We not dup 0,1,2 to this file descriptor and
- * close serviceFd. This should leave us with only 0,1,2
- * open and all connected to the same socket.
- */
- dup2(serviceFd, STDIN_FILENO);
- dup2(serviceFd, STDOUT_FILENO);
- dup2(serviceFd, STDERR_FILENO);
- close(serviceFd);
-
- execvp(cmdv[0], cmdv);
- _exit(-1);
-}
--- a/test/jdk/java/nio/channels/spi/SelectorProvider/inheritedChannel/Launcher.java Thu Mar 01 16:35:36 2018 -0500
+++ b/test/jdk/java/nio/channels/spi/SelectorProvider/inheritedChannel/Launcher.java Fri Mar 02 21:00:12 2018 +0100
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2003, 2017, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2003, 2018, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
@@ -35,7 +35,7 @@
public class Launcher {
static {
- System.loadLibrary("Launcher");
+ System.loadLibrary("InheritedChannel");
}
private static native void launch0(String cmdarray[], int fd) throws IOException;
--- a/test/jdk/java/nio/channels/spi/SelectorProvider/inheritedChannel/Makefile Thu Mar 01 16:35:36 2018 -0500
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,79 +0,0 @@
-#
-#
-# Makefile for building libLauncher.so
-#
-# To build libLauncher.so requires :-
-# JAVA_HOME environment variable
-# cc (Solaris) or gcc (Linux) on PATH
-#
-# The library is created in a architecture specific directory :-
-#
-# lib/solaris-sparc/libLauncher.so (Solaris/SPARC)
-# lib/solaris-i586/libLauncher.so (Solaris/x86)
-# lib/linux-i586/libLauncher.so (Linux/x86)
-
-ECHO = echo
-MKDIR = mkdir
-UNAME = uname
-
-uname := $(shell uname)
-
-ifeq ($(uname), SunOS)
- PLATFORM = solaris
- ISAINFO = isainfo
- ARCH_DATA_MODEL=64
- ARCH := $(shell $(ISAINFO) -n)
- CC = cc
- LD = ld
- CFLAGS = -D_REENTRANT -D__solaris__
- LDFLAGS_COMMON = -G
- EXTRA_LIBS = -lc
- CC += -m64 -Kpic
-endif
-
-ifeq ($(uname), Linux)
- PLATFORM = linux
- archExpr = case "`$(UNAME) -m`" in \
- i[3-6]86) \
- $(ECHO) i586 \
- ;; \
- sparc*) \
- $(ECHO) sparc \
- ;; \
- *) \
- $(UNAME) -m \
- ;; \
- esac
- ARCH := $(shell $(archExpr) )
- CC = gcc
- CFLAGS = -fno-strict-aliasing -fPIC -W -Wall
- LD = ld
- LDFLAGS_COMMON = -shared
- EXTRA_LIBS = -lc
-endif
-
-LIBDIR=lib/$(PLATFORM)-$(ARCH)
-LAUNCHERLIB=$(LIBDIR)/libLauncher.so
-
-all: java_home $(LAUNCHERLIB)
-
-$(LAUNCHERLIB) : $(LIBDIR) $(LIBDIR)/Launcher.o
- $(LD) $(LDFLAGS_COMMON) -o $(LAUNCHERLIB) $(LIBDIR)/Launcher.o $(EXTRA_LIBS)
-
-$(LIBDIR):
- @$(MKDIR) -p $(LIBDIR)
-
-$(LIBDIR)/Launcher.o : Launcher.c \
- Launcher.h
- $(CC) -c $(CFLAGS) -o $(LIBDIR)/Launcher.o \
- -I$(JAVA_HOME)/include -I$(JAVA_HOME)/include/$(PLATFORM) Launcher.c
-
-Launcher.class Launcher.h : Launcher.java
- $(JAVA_HOME)/bin/javac -h . Launcher.java
-
-java_home:
-ifndef JAVA_HOME
- @$(ECHO) "ERROR: Your JAVA_HOME environment variable is not set."
- exit 1
-endif
-
--- a/test/jdk/java/nio/channels/spi/SelectorProvider/inheritedChannel/README Thu Mar 01 16:35:36 2018 -0500
+++ b/test/jdk/java/nio/channels/spi/SelectorProvider/inheritedChannel/README Fri Mar 02 21:00:12 2018 +0100
@@ -1,33 +1,16 @@
-
The unit tests in this directory depend on a native launcher library
-(libLauncher.so). This native library is built off-line and the
-resulting libLauncher.so for each processor/OS combination is checked
-into the workspace. The reason for this is because the test environment
-may not have the required compilers/build environment.
+(libInheritedChannel.so). This library is built by executing
-In order to rebuild libLauncher.so the following is required :-
-
-1. Check-out each of the shared libraries (sccs edit)
+$ make test-image-jdk-jtreg-native
-2. Edit Launcher.c with the appropriate changes
-
-3. Execute the make script (gnumake all) on each processor/OS so
-that the appropriate lib/<platform>/libLauncher.so is built.
+in the root directory of the OpenJDK clone. It will generate
+libInheritedChannel.so in two locations:
-4. Test the changes
-
-5. Check-in each of the shared library (sccs delget)
-
-
-For step 4 (re-building libLauncher.so) the following environment is required:
+$ $JDK_ROOT/build/$PLATFORM/support/test/jdk/jtreg/native/lib/libInheritedChannel.so
+$ $JDK_ROOT/build/$PLATFORM/images/test/jdk/jtreg/native/libInheritedChannel.so
-(a) JAVA_HOME needs to be set to J2SE directory, eg:-
- export JAVA_HOME=/usr/local/java/jdk1.5/solaris-sparc
+The test may then be run using jtreg for example as follows:
-(b) For Solaris the SOS8 'cc' needs to be on the PATH, check using:
- # cc -V
- cc: Sun C 5.5 2003/03/12
-
-(c) Execute the make script :-
- Solaris: gnumake all
- Linux: gmake all
+$ jtreg -s -w:/tmp -r:/tmp -va -dir:$JDK_ROOT/test/jdk \
+-nativepath:$JDK_ROOT/build/$PLATFORM/support/test/jdk/jtreg/native/lib \
+java/nio/channels/spi/SelectorProvider/inheritedChannel/InheritedChannelTest.java
Binary file test/jdk/java/nio/channels/spi/SelectorProvider/inheritedChannel/lib/linux-i586/libLauncher.so has changed
Binary file test/jdk/java/nio/channels/spi/SelectorProvider/inheritedChannel/lib/solaris-amd64/libLauncher.so has changed
Binary file test/jdk/java/nio/channels/spi/SelectorProvider/inheritedChannel/lib/solaris-sparcv9/libLauncher.so has changed
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/test/jdk/java/nio/channels/spi/SelectorProvider/inheritedChannel/libInheritedChannel.c Fri Mar 02 21:00:12 2018 +0100
@@ -0,0 +1,184 @@
+/*
+ * Copyright (c) 2003, 2018, Oracle and/or its affiliates. All rights reserved.
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * This code is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU General Public License version 2 only, as
+ * published by the Free Software Foundation.
+ *
+ * This code is distributed in the hope that it will be useful, but WITHOUT
+ * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
+ * version 2 for more details (a copy is included in the LICENSE file that
+ * accompanied this code).
+ *
+ * You should have received a copy of the GNU General Public License version
+ * 2 along with this work; if not, write to the Free Software Foundation,
+ * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
+ *
+ * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
+ * or visit www.oracle.com if you need additional information or have any
+ * questions.
+ */
+
+/*
+ * A simple launcher to launch a program as if it was launched by inetd.
+ */
+#include <stdio.h>
+#include <stdlib.h>
+#include <sys/types.h>
+#include <sys/socket.h>
+#include <unistd.h>
+#include <dirent.h>
+#include <sys/stat.h>
+#include <fcntl.h>
+#include <ctype.h>
+
+#include "jni.h"
+
+/*
+ * Throws the exception of the given class name and detail message
+ */
+static void ThrowException(JNIEnv *env, const char *name, const char *msg) {
+ jclass cls = (*env)->FindClass(env, name);
+ if (cls != NULL) {
+ (*env)->ThrowNew(env, cls, msg);
+ }
+}
+
+/*
+ * Convert a jstring to an ISO 8859_1 encoded C string
+ */
+static char* getString8859_1Chars(JNIEnv *env, jstring jstr) {
+ int i;
+ char *result;
+ jint len = (*env)->GetStringLength(env, jstr);
+ const jchar *str = (*env)->GetStringCritical(env, jstr, 0);
+ if (str == 0) {
+ return NULL;
+ }
+
+ result = (char*)malloc(len+1);
+ if (result == 0) {
+ (*env)->ReleaseStringCritical(env, jstr, str);
+ ThrowException(env, "java/lang/OutOfMemoryError", NULL);
+ return NULL;
+ }
+
+ for (i=0; i<len; i++) {
+ jchar unicode = str[i];
+ if (unicode <= 0x00ff)
+ result[i] = unicode;
+ else
+ result[i] = '?';
+ }
+
+ result[len] = 0;
+ (*env)->ReleaseStringCritical(env, jstr, str);
+ return result;
+}
+
+
+/*
+ * Class: Launcher
+ * Method: launch0
+ * Signature: ([Ljava/lang/String;I)V
+ */
+JNIEXPORT void JNICALL Java_Launcher_launch0
+ (JNIEnv *env, jclass cls, jobjectArray cmdarray, jint serviceFd)
+{
+ pid_t pid;
+ DIR* dp;
+ struct dirent* dirp;
+ int thisFd;
+ char** cmdv;
+ int i, cmdlen;
+
+ /*
+ * Argument 0 of the command array is the program name.
+ * Here we just extract the program name and any arguments into
+ * a command array suitable for use with execvp.
+ */
+ cmdlen = (*env)->GetArrayLength(env, cmdarray);
+ if (cmdlen == 0) {
+ ThrowException(env, "java/lang/IllegalArgumentException",
+ "command array must at least include the program name");
+ return;
+ }
+ cmdv = (char **)malloc((cmdlen + 1) * sizeof(char *));
+ if (cmdv == NULL) {
+ ThrowException(env, "java/lang/OutOfMemoryError", NULL);
+ return;
+ }
+
+ for (i=0; i<cmdlen; i++) {
+ jstring str = (*env)->GetObjectArrayElement(env, cmdarray, i);
+ cmdv[i] = (char *) getString8859_1Chars(env, str);
+ if (cmdv[i] == NULL) {
+ return;
+ }
+ }
+
+ /*
+ * Command array must have NULL as the last entry
+ */
+ cmdv[cmdlen] = NULL;
+
+ /*
+ * Launch the program. As this isn't a complete inetd or Runtime.exec
+ * implementation we don't have a reaper to pick up child exit status.
+ */
+#ifdef __solaris__
+ pid = fork1();
+#else
+ pid = fork();
+#endif
+ if (pid != 0) {
+ if (pid < 0) {
+ ThrowException(env, "java/io/IOException", "fork failed");
+ }
+ return;
+ }
+
+ /*
+ * We need to close all file descriptors except for serviceFd. To
+ * get the list of open file descriptos we read through /proc/self/fd
+ * but to open this requires a file descriptor. We could use a specific
+ * file descriptor and fdopendir but Linux doesn't seem to support
+ * fdopendir. Instead we use opendir and make an assumption on the
+ * file descriptor that is used (by opening & closing a file).
+ */
+ thisFd = open("/dev/null", O_RDONLY);
+ if (thisFd < 0) {
+ _exit(-1);
+ }
+ close(thisFd);
+
+ if ((dp = opendir("/proc/self/fd")) == NULL) {
+ _exit(-1);
+ }
+
+ while ((dirp = readdir(dp)) != NULL) {
+ if (isdigit(dirp->d_name[0])) {
+ int fd = strtol(dirp->d_name, NULL, 10);
+ if (fd != serviceFd && fd != thisFd) {
+ close(fd);
+ }
+ }
+ }
+ closedir(dp);
+
+ /*
+ * At this point all file descriptors are closed except for
+ * serviceFd. We not dup 0,1,2 to this file descriptor and
+ * close serviceFd. This should leave us with only 0,1,2
+ * open and all connected to the same socket.
+ */
+ dup2(serviceFd, STDIN_FILENO);
+ dup2(serviceFd, STDOUT_FILENO);
+ dup2(serviceFd, STDERR_FILENO);
+ close(serviceFd);
+
+ execvp(cmdv[0], cmdv);
+ _exit(-1);
+}
--- a/test/jdk/java/text/Normalizer/NormalizerAPITest.java Thu Mar 01 16:35:36 2018 -0500
+++ b/test/jdk/java/text/Normalizer/NormalizerAPITest.java Fri Mar 02 21:00:12 2018 +0100
@@ -78,7 +78,7 @@
/*
* Check if normalize(null) throws NullPointerException as expected.
*/
- void Test_NullPointerException_java_normalize() {
+ public void Test_NullPointerException_java_normalize() {
boolean error = false;
/* Check null as String to be normalized */
@@ -107,7 +107,7 @@
/*
* Check if normalize(null) throws NullPointerException as expected.
*/
- void Test_NullPointerException_sun_normalize() {
+ public void Test_NullPointerException_sun_normalize() {
boolean error = false;
for (int j = 0; j < options.length; j++) {
@@ -138,7 +138,7 @@
/*
* Check if isNormalized(null) throws NullPointerException as expected.
*/
- void Test_NullPointerException_java_isNormalized() {
+ public void Test_NullPointerException_java_isNormalized() {
boolean error = false;
for (int i = 0; i < forms.length; i++) {
@@ -167,7 +167,7 @@
/*
* Check if isNormalized(null) throws NullPointerException as expected.
*/
- void Test_NullPointerException_sun_isNormalized() {
+ public void Test_NullPointerException_sun_isNormalized() {
boolean error = false;
for (int j = 0; j < options.length; j++) {
@@ -199,7 +199,7 @@
* Check if isNormalized("") doesn't throw NullPointerException and returns
* "" as expected.
*/
- void Test_No_NullPointerException_java_normalize() {
+ public void Test_No_NullPointerException_java_normalize() {
boolean error = false;
for (int i = 0; i < forms.length; i++) {
@@ -223,7 +223,7 @@
* Check if isNormalized("") doesn't throw NullPointerException and returns
* "" as expected.
*/
- void Test_No_NullPointerException_sun_normalize() {
+ public void Test_No_NullPointerException_sun_normalize() {
boolean error = false;
for (int j = 0; j < options.length; j++) {
@@ -248,7 +248,7 @@
* Check if isNormalized("") doesn't throw NullPointerException and returns
* "" as expected.
*/
- void Test_No_NullPointerException_java_isNormalized() {
+ public void Test_No_NullPointerException_java_isNormalized() {
boolean error = false;
for (int i = 0; i < forms.length; i++) {
@@ -271,7 +271,7 @@
* Check if isNormalized("") doesn't throw NullPointerException and returns
* "" as expected.
*/
- void Test_No_NullPointerException_sun_isNormalized() {
+ public void Test_No_NullPointerException_sun_isNormalized() {
boolean error = false;
for (int j = 0; j < options.length; j++) {
@@ -296,7 +296,7 @@
* Check if normalize() and isNormalized() work as expected for every
* known class which implement CharSequence Interface.
*/
- void Test_CharSequence() {
+ public void Test_CharSequence() {
check_CharSequence(String.valueOf(inputData),
String.valueOf(outputData));
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/test/jdk/java/util/jar/Manifest/LineBreakLineWidth.java Fri Mar 02 21:00:12 2018 +0100
@@ -0,0 +1,284 @@
+/*
+ * Copyright (c) 2018, Oracle and/or its affiliates. All rights reserved.
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * This code is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU General Public License version 2 only, as
+ * published by the Free Software Foundation.
+ *
+ * This code is distributed in the hope that it will be useful, but WITHOUT
+ * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
+ * version 2 for more details (a copy is included in the LICENSE file that
+ * accompanied this code).
+ *
+ * You should have received a copy of the GNU General Public License version
+ * 2 along with this work; if not, write to the Free Software Foundation,
+ * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
+ *
+ * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
+ * or visit www.oracle.com if you need additional information or have any
+ * questions.
+ */
+
+import static java.nio.charset.StandardCharsets.UTF_8;
+
+import java.io.ByteArrayInputStream;
+import java.io.ByteArrayOutputStream;
+import java.io.IOException;
+import java.util.jar.Manifest;
+import java.util.jar.Attributes;
+import java.util.jar.Attributes.Name;
+
+import org.testng.annotations.Test;
+import static org.testng.Assert.*;
+
+/**
+ * @test
+ * @bug 6372077
+ * @run testng LineBreakLineWidth
+ * @summary write valid manifests with respect to line breaks
+ * and read any line width
+ */
+public class LineBreakLineWidth {
+
+ /**
+ * maximum header name length from {@link Name#isValid(String)}
+ * not including the name-value delimiter <code>": "</code>
+ */
+ final static int MAX_HEADER_NAME_LENGTH = 70;
+
+ /**
+ * range of one..{@link #TEST_WIDTH_RANGE} covered in this test that
+ * exceeds the range of allowed header name lengths or line widths
+ * in order to also cover invalid cases beyond the valid boundaries
+ * and to keep it somewhat independent from the actual manifest width.
+ * <p>
+ * bigger than 72 (maximum manifest header line with in bytes (not utf-8
+ * encoded characters) but otherwise arbitrarily chosen
+ */
+ final static int TEST_WIDTH_RANGE = 123;
+
+ /**
+ * tests if only valid manifest files can written depending on the header
+ * name length or that an exception occurs already on the attempt to write
+ * an invalid one otherwise and that no invalid manifest can be written.
+ * <p>
+ * due to bug JDK-6372077 it was possible to write a manifest that could
+ * not be read again. independent of the actual manifest line width, such
+ * a situation should never happen, which is the subject of this test.
+ */
+ @Test
+ public void testWriteValidManifestOrException() throws IOException {
+ /*
+ * multi-byte utf-8 characters cannot occur in header names,
+ * only in values which are not subject of this test here.
+ * hence, each character in a header name uses exactly one byte and
+ * variable length utf-8 character encoding doesn't affect this test.
+ */
+
+ String name = "";
+ for (int l = 1; l <= TEST_WIDTH_RANGE; l++) {
+ name += "x";
+ System.out.println("name = " + name + ", "
+ + "name.length = " + name.length());
+
+ if (l <= MAX_HEADER_NAME_LENGTH) {
+ writeValidManifest(name, "somevalue");
+ } else {
+ writeInvalidManifestThrowsException(name, "somevalue");
+ }
+ }
+ }
+
+ static void writeValidManifest(String name, String value)
+ throws IOException {
+ byte[] mfBytes = writeManifest(name, value);
+ Manifest mf = new Manifest(new ByteArrayInputStream(mfBytes));
+ assertMainAndSectionValues(mf, name, value);
+ }
+
+ static void writeInvalidManifestThrowsException(String name, String value)
+ throws IOException {
+ try {
+ writeManifest(name, value);
+ } catch (IllegalArgumentException e) {
+ // no invalid manifest was produced which is considered acceptable
+ return;
+ }
+
+ fail("no error writing manifest considered invalid");
+ }
+
+ /**
+ * tests that manifest files can be read even if the line breaks are
+ * placed in different positions than where the current JDK's
+ * {@link Manifest#write(java.io.OutputStream)} would have put it provided
+ * the manifest is valid otherwise.
+ * <p>
+ * the <a href="{@docRoot}/../specs/jar/jar.html#Notes_on_Manifest_and_Signature_Files">
+ * "Notes on Manifest and Signature Files" in the "JAR File
+ * Specification"</a> state that "no line may be longer than 72 bytes
+ * (not characters), in its utf8-encoded form." but allows for earlier or
+ * additional line breaks.
+ * <p>
+ * the most important purpose of this test case is probably to make sure
+ * that manifest files broken at 70 bytes line width written with the
+ * previous version of {@link Manifest} before this fix still work well.
+ */
+ @Test
+ public void testReadDifferentLineWidths() throws IOException {
+ /*
+ * uses only one-byte utf-8 encoded characters as values.
+ * correctly breaking multi-byte utf-8 encoded characters
+ * would be subject of another test if there was one such.
+ */
+
+ // w: line width
+ // 6 minimum required for section names starting with "Name: "
+ for (int w = 6; w <= TEST_WIDTH_RANGE; w++) {
+
+ // ln: header name length
+ String name = "";
+ // - 2 due to the delimiter ": " that has to fit on the same
+ // line as the name
+ for (int ln = 1; ln <= w - 2; ln++) {
+ name += "x";
+
+ // lv: value length
+ String value = "";
+ for (int lv = 1; lv <= TEST_WIDTH_RANGE; lv++) {
+ value += "y";
+ }
+
+ System.out.println("lineWidth = " + w);
+ System.out.println("name = " + name + ""
+ + ", name.length = " + name.length());
+ System.out.println("value = " + value + ""
+ + ", value.length = " + value.length());
+
+ readSpecificLineWidthManifest(name, value, w);
+ }
+ }
+ }
+
+ static void readSpecificLineWidthManifest(String name, String value,
+ int lineWidth) throws IOException {
+ /*
+ * breaking header names is not allowed and hence cannot be reasonably
+ * tested. it cannot easily be helped, that invalid manifest files
+ * written by the previous Manifest version implementation are illegal
+ * if the header name is 69 or 70 bytes and in that case the name/value
+ * delimiter ": " was broken on a new line.
+ *
+ * changing the line width in Manifest#make72Safe(StringBuffer),
+ * however, also affects at which positions values are broken across
+ * lines (should always have affected values only and never header
+ * names or the delimiter) which is tested here.
+ *
+ * ideally, any previous Manifest implementation would have been used
+ * here to provide manifest files to test reading but these are no
+ * longer available in this version's sources and there might as well
+ * be other libraries writing manifests. Therefore, in order to be able
+ * to test any manifest file considered valid with respect to line
+ * breaks that could not possibly be produced with the current Manifest
+ * implementation, this test provides its own manifests in serialized
+ * form.
+ */
+ String lineBrokenSectionName = breakLines(lineWidth, "Name: " + name);
+ String lineBrokenNameAndValue = breakLines(lineWidth, name + ": " + value);
+
+ ByteArrayOutputStream mfBuf = new ByteArrayOutputStream();
+ mfBuf.write("Manifest-Version: 1.0".getBytes(UTF_8));
+ mfBuf.write("\r\n".getBytes(UTF_8));
+ mfBuf.write(lineBrokenNameAndValue.getBytes(UTF_8));
+ mfBuf.write("\r\n".getBytes(UTF_8));
+ mfBuf.write("\r\n".getBytes(UTF_8));
+ mfBuf.write(lineBrokenSectionName.getBytes(UTF_8));
+ mfBuf.write("\r\n".getBytes(UTF_8));
+ mfBuf.write(lineBrokenNameAndValue.getBytes(UTF_8));
+ mfBuf.write("\r\n".getBytes(UTF_8));
+ mfBuf.write("\r\n".getBytes(UTF_8));
+ byte[] mfBytes = mfBuf.toByteArray();
+ printManifest(mfBytes);
+
+ boolean nameValid = name.length() <= MAX_HEADER_NAME_LENGTH;
+
+ Manifest mf;
+ try {
+ mf = new Manifest(new ByteArrayInputStream(mfBytes));
+ } catch (IOException e) {
+ if (!nameValid &&
+ e.getMessage().startsWith("invalid header field")) {
+ // expected because the name is not valid
+ return;
+ }
+
+ throw new AssertionError(e.getMessage(), e);
+ }
+
+ assertTrue(nameValid, "failed to detect invalid manifest");
+
+ assertMainAndSectionValues(mf, name, value);
+ }
+
+ static String breakLines(int lineWidth, String nameAndValue) {
+ String lineBrokenNameAndValue = "";
+ int charsOnLastLine = 0;
+ for (int i = 0; i < nameAndValue.length(); i++) {
+ lineBrokenNameAndValue += nameAndValue.substring(i, i + 1);
+ charsOnLastLine++;
+ if (0 < i && i < nameAndValue.length() - 1
+ && charsOnLastLine == lineWidth) {
+ lineBrokenNameAndValue += "\r\n ";
+ charsOnLastLine = 1;
+ }
+ }
+ return lineBrokenNameAndValue;
+ }
+
+ static byte[] writeManifest(String name, String value) throws IOException {
+ /*
+ * writing manifest main headers is implemented separately from
+ * writing named sections manifest headers:
+ * - java.util.jar.Attributes.writeMain(DataOutputStream)
+ * - java.util.jar.Attributes.write(DataOutputStream)
+ * which is why this is also covered separately in this test by
+ * always adding the same value twice, in the main attributes as
+ * well as in a named section (using the header name also as the
+ * section name).
+ */
+
+ Manifest mf = new Manifest();
+ mf.getMainAttributes().put(Name.MANIFEST_VERSION, "1.0");
+ mf.getMainAttributes().putValue(name, value);
+
+ Attributes section = new Attributes();
+ section.putValue(name, value);
+ mf.getEntries().put(name, section);
+
+ ByteArrayOutputStream out = new ByteArrayOutputStream();
+ mf.write(out);
+ byte[] mfBytes = out.toByteArray();
+ printManifest(mfBytes);
+ return mfBytes;
+ }
+
+ private static void printManifest(byte[] mfBytes) {
+ final String sepLine = "----------------------------------------------"
+ + "---------------------|-|-|"; // |-positions: ---68-70-72
+ System.out.println(sepLine);
+ System.out.print(new String(mfBytes, UTF_8));
+ System.out.println(sepLine);
+ }
+
+ private static void assertMainAndSectionValues(Manifest mf, String name,
+ String value) {
+ String mainValue = mf.getMainAttributes().getValue(name);
+ String sectionValue = mf.getAttributes(name).getValue(name);
+
+ assertEquals(value, mainValue, "value different in main section");
+ assertEquals(value, sectionValue, "value different in named section");
+ }
+
+}
--- a/test/jdk/javax/accessibility/AccessibilityProvider/basic.sh Thu Mar 01 16:35:36 2018 -0500
+++ b/test/jdk/javax/accessibility/AccessibilityProvider/basic.sh Fri Mar 02 21:00:12 2018 +0100
@@ -21,6 +21,7 @@
# questions.
#
# @test
+# @key headful
# @bug 8055160
# @summary Unit test for javax.accessibility.AccessibilitySPI
#
--- a/test/jdk/javax/imageio/plugins/shared/ImageWriterCompressionTest.java Thu Mar 01 16:35:36 2018 -0500
+++ b/test/jdk/javax/imageio/plugins/shared/ImageWriterCompressionTest.java Fri Mar 02 21:00:12 2018 +0100
@@ -42,7 +42,8 @@
import javax.imageio.stream.ImageOutputStream;
/**
- * @test @bug 6488522
+ * @test
+ * @bug 6488522
* @summary Check the compression support in imageio ImageWriters
* @run main ImageWriterCompressionTest
*/
--- a/test/jdk/javax/print/PrintServiceLookup/CountPrintServices.java Thu Mar 01 16:35:36 2018 -0500
+++ b/test/jdk/javax/print/PrintServiceLookup/CountPrintServices.java Fri Mar 02 21:00:12 2018 +0100
@@ -32,6 +32,7 @@
/*
* @test
* @bug 8032693
+ * @key printer
* @summary Test that lpstat and JDK agree whether there are printers.
*/
public class CountPrintServices {
--- a/test/jdk/javax/print/attribute/ChromaticityValues.java Thu Mar 01 16:35:36 2018 -0500
+++ b/test/jdk/javax/print/attribute/ChromaticityValues.java Fri Mar 02 21:00:12 2018 +0100
@@ -23,6 +23,8 @@
/*
* @test
* @bug 4446106
+ * @key printer
+ * @requires (os.family == "windows")
* @summary Test for chromaticity values.
* @run main ChromaticityValues
*/
--- a/test/jdk/javax/swing/ClientProperty/UIClientPropertyKeyTest/UIClientPropertyKeyTest.java Thu Mar 01 16:35:36 2018 -0500
+++ b/test/jdk/javax/swing/ClientProperty/UIClientPropertyKeyTest/UIClientPropertyKeyTest.java Fri Mar 02 21:00:12 2018 +0100
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2016, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2016, 2018, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
@@ -92,8 +92,10 @@
try {
UIManager.setLookAndFeel(laf.getClassName());
System.out.println("LookAndFeel: " + laf.getClassName());
+ } catch (final UnsupportedLookAndFeelException ignored){
+ System.out.println("Unsupported LookAndFeel: " + laf.getClassName());
} catch (ClassNotFoundException | InstantiationException |
- UnsupportedLookAndFeelException | IllegalAccessException e) {
+ IllegalAccessException e) {
throw new RuntimeException(e);
}
}
--- a/test/jdk/javax/swing/GroupLayout/7071166/bug7071166.java Thu Mar 01 16:35:36 2018 -0500
+++ b/test/jdk/javax/swing/GroupLayout/7071166/bug7071166.java Fri Mar 02 21:00:12 2018 +0100
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2011, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2011, 2018, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
@@ -28,9 +28,22 @@
* @author Pavel Porvatov
*/
-import javax.swing.*;
-import static javax.swing.SwingConstants.*;
-import java.awt.*;
+import java.awt.Container;
+
+import javax.swing.JButton;
+import javax.swing.LayoutStyle;
+import javax.swing.SwingUtilities;
+import javax.swing.UIManager;
+import javax.swing.UnsupportedLookAndFeelException;
+
+import static javax.swing.SwingConstants.EAST;
+import static javax.swing.SwingConstants.NORTH;
+import static javax.swing.SwingConstants.NORTH_EAST;
+import static javax.swing.SwingConstants.NORTH_WEST;
+import static javax.swing.SwingConstants.SOUTH;
+import static javax.swing.SwingConstants.SOUTH_EAST;
+import static javax.swing.SwingConstants.SOUTH_WEST;
+import static javax.swing.SwingConstants.WEST;
public class bug7071166 {
private static final int[] POSITIONS = {NORTH, EAST, SOUTH, WEST, // valid positions
@@ -38,8 +51,11 @@
public static void main(String[] args) throws Exception {
for (UIManager.LookAndFeelInfo lookAndFeelInfo : UIManager.getInstalledLookAndFeels()) {
- UIManager.setLookAndFeel(lookAndFeelInfo.getClassName());
-
+ try {
+ UIManager.setLookAndFeel(lookAndFeelInfo.getClassName());
+ } catch (final UnsupportedLookAndFeelException ignored) {
+ continue;
+ }
System.out.println("LookAndFeel: " + lookAndFeelInfo.getName());
SwingUtilities.invokeAndWait(new Runnable() {
--- a/test/jdk/javax/swing/JComboBox/6632953/bug6632953.java Thu Mar 01 16:35:36 2018 -0500
+++ b/test/jdk/javax/swing/JComboBox/6632953/bug6632953.java Fri Mar 02 21:00:12 2018 +0100
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2010, 2015, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2010, 2018, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
@@ -29,6 +29,7 @@
import javax.swing.JComboBox;
import javax.swing.SwingUtilities;
import javax.swing.UIManager;
+import javax.swing.UnsupportedLookAndFeelException;
import javax.swing.plaf.metal.MetalComboBoxUI;
public class bug6632953 {
@@ -43,6 +44,8 @@
: UIManager.getInstalledLookAndFeels()) {
try {
UIManager.setLookAndFeel(lafInfo.getClassName());
+ } catch (UnsupportedLookAndFeelException ignored) {
+ continue;
} catch (Exception e) {
throw new RuntimeException(e);
}
--- a/test/jdk/javax/swing/JComboBox/7082443/bug7082443.java Thu Mar 01 16:35:36 2018 -0500
+++ b/test/jdk/javax/swing/JComboBox/7082443/bug7082443.java Fri Mar 02 21:00:12 2018 +0100
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2011, 2012, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2011, 2018, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
@@ -36,8 +36,11 @@
public static void main(String[] args) throws Exception {
for (UIManager.LookAndFeelInfo lookAndFeelInfo : UIManager.getInstalledLookAndFeels()) {
if (lookAndFeelInfo.getClassName().contains(GTK_LAF_CLASS)) {
- UIManager.setLookAndFeel(lookAndFeelInfo.getClassName());
-
+ try {
+ UIManager.setLookAndFeel(lookAndFeelInfo.getClassName());
+ } catch (final UnsupportedLookAndFeelException ignored) {
+ continue;
+ }
SwingUtilities.invokeAndWait(new Runnable() {
@Override
public void run() {
--- a/test/jdk/javax/swing/JEditorPane/8080972/TestJEditor.java Thu Mar 01 16:35:36 2018 -0500
+++ b/test/jdk/javax/swing/JEditorPane/8080972/TestJEditor.java Fri Mar 02 21:00:12 2018 +0100
@@ -40,6 +40,7 @@
* @summary Audit Core Reflection in module java.desktop for places that will
* require changes to work with modules
* @author Alexander Scherbatiy
+ * @run main/othervm TestJEditor
*/
public class TestJEditor {
--- a/test/jdk/javax/swing/JEditorPane/bug4714674.java Thu Mar 01 16:35:36 2018 -0500
+++ b/test/jdk/javax/swing/JEditorPane/bug4714674.java Fri Mar 02 21:00:12 2018 +0100
@@ -27,7 +27,7 @@
@author Peter Zhelezniakov
@modules java.desktop
jdk.httpserver
- @run main bug4714674
+ @run main/othervm bug4714674
*/
import javax.swing.*;
--- a/test/jdk/javax/swing/JFileChooser/6489130/bug6489130.java Thu Mar 01 16:35:36 2018 -0500
+++ b/test/jdk/javax/swing/JFileChooser/6489130/bug6489130.java Fri Mar 02 21:00:12 2018 +0100
@@ -22,6 +22,7 @@
*/
/* @test
+ * @key headful
* @bug 6489130
* @summary FileChooserDemo hung by keeping pressing Enter key
* @author Pavel Porvatov
--- a/test/jdk/javax/swing/JFileChooser/6520101/bug6520101.java Thu Mar 01 16:35:36 2018 -0500
+++ b/test/jdk/javax/swing/JFileChooser/6520101/bug6520101.java Fri Mar 02 21:00:12 2018 +0100
@@ -22,7 +22,7 @@
*/
/*
- * @test @(#)bug6520101
+ * @test
* @key headful
* @bug 6520101
* @summary JFileChooser throws OOM in 1.4.2, 5.0u4 and 1.6.0
--- a/test/jdk/javax/swing/JFileChooser/6868611/bug6868611.java Thu Mar 01 16:35:36 2018 -0500
+++ b/test/jdk/javax/swing/JFileChooser/6868611/bug6868611.java Fri Mar 02 21:00:12 2018 +0100
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2009, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2009, 2018, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
@@ -21,73 +21,74 @@
* questions.
*/
-/* @test
- @bug 6868611
- @summary FileSystemView throws NullPointerException
- @author Pavel Porvatov
- @run main bug6868611
-*/
+/*
+ * @test
+ * @bug 6868611 8198004
+ * @summary FileSystemView throws NullPointerException
+ * @author Pavel Porvatov
+ * @run main bug6868611
+ */
import javax.swing.*;
import javax.swing.filechooser.FileSystemView;
import java.io.File;
+import java.nio.file.Files;
public class bug6868611 {
private static final int COUNT = 1000;
+ private static File tempFolder;
+ private static File files[] = new File[COUNT];
public static void main(String[] args) throws Exception {
- String tempDirProp = System.getProperty("java.io.tmpdir");
-
- final String tempDir = tempDirProp == null || !new File(tempDirProp).isDirectory() ?
- System.getProperty("user.home") : tempDirProp;
-
- System.out.println("Temp directory: " + tempDir);
+ int fileCount = 0;
+ try {
+ tempFolder = Files.createTempDirectory("temp_folder").toFile();
- // Create 1000 files
- for (int i = 0; i < 1000; i++) {
- new File(tempDir, "temp" + i).createNewFile();
- }
-
- // Init default FileSystemView
- SwingUtilities.invokeAndWait(new Runnable() {
- public void run() {
- FileSystemView.getFileSystemView().getFiles(new File(tempDir), false);
+ // Try creating 1000 files
+ for (fileCount = 0; fileCount < COUNT; fileCount++) {
+ files[fileCount] = new
+ File(tempFolder, "temp" + fileCount + ".txt");
+ files[fileCount].createNewFile();
}
- });
- for (int i = 0; i < COUNT; i++) {
- Thread thread = new MyThread(tempDir);
+ // Init default FileSystemView
+ SwingUtilities.invokeAndWait(new Runnable() {
+ public void run() {
+ FileSystemView.getFileSystemView().
+ getFiles(tempFolder, false);
+ }
+ });
- thread.start();
-
- Thread.sleep((long) (Math.random() * 100));
-
- thread.interrupt();
+ for (int i = 0; i < COUNT; i++) {
+ Thread thread = new MyThread(tempFolder);
- if (i % 100 == 0) {
- System.out.print("*");
- }
- }
+ thread.start();
+
+ Thread.sleep((long) (Math.random() * 100));
- System.out.println();
-
- // Remove 1000 files
- for (int i = 0; i < 1000; i++) {
- new File(tempDir, "temp" + i).delete();
+ thread.interrupt();
+ }
+ } finally {
+ // Remove created files
+ for (int i = 0; i < fileCount; i++) {
+ Files.delete(files[i].toPath());
+ }
+ Files.delete(tempFolder.toPath());
}
}
private static class MyThread extends Thread {
- private final String dir;
+ private final File dir;
- private MyThread(String dir) {
+ private MyThread(File dir) {
this.dir = dir;
}
public void run() {
FileSystemView fileSystemView = FileSystemView.getFileSystemView();
- fileSystemView.getFiles(new File(dir), false);
+ fileSystemView.getFiles(dir, false);
}
}
}
+
--- a/test/jdk/javax/swing/JFileChooser/7199708/bug7199708.java Thu Mar 01 16:35:36 2018 -0500
+++ b/test/jdk/javax/swing/JFileChooser/7199708/bug7199708.java Fri Mar 02 21:00:12 2018 +0100
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2013, 2016, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2013, 2018, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
@@ -41,10 +41,10 @@
/**
* @test
* @key headful
- * @bug 7199708 8159587
+ * @bug 7199708 8159587 8198005
* @author Alexander Scherbatiy
* @summary FileChooser crashs when opening large folder
- * @run main bug7199708
+ * @run main/timeout=240 bug7199708
*/
public class bug7199708 {
@@ -53,72 +53,88 @@
private static volatile int locationX;
private static volatile int locationY;
private static volatile int width;
+ private static File largeFolder;
+ private static File files[] = new File[FILE_NUMBER];
public static void main(String[] args) throws Exception {
Robot robot = new Robot();
robot.setAutoDelay(50);
- final File folder = createLargeFolder();
- UIManager.setLookAndFeel("javax.swing.plaf.metal.MetalLookAndFeel");
+ try {
+ final File folder = createLargeFolder();
+ UIManager.setLookAndFeel("javax.swing.plaf.metal.MetalLookAndFeel");
- SwingUtilities.invokeLater(new Runnable() {
- public void run() {
- fileChooser = new JFileChooser(folder);
- fileChooser.showSaveDialog(null);
- }
- });
+ SwingUtilities.invokeLater(new Runnable() {
+ public void run() {
+ fileChooser = new JFileChooser(folder);
+ fileChooser.showSaveDialog(null);
+ }
+ });
- robot.waitForIdle();
+ robot.waitForIdle();
- SwingUtilities.invokeLater(new Runnable() {
- public void run() {
- final String detailsTooltip = UIManager.getString("FileChooser."
- + "detailsViewButtonToolTipText", fileChooser.getLocale());
+ SwingUtilities.invokeLater(new Runnable() {
+ public void run() {
+ final String detailsTooltip =
+ UIManager.getString("FileChooser."
+ + "detailsViewButtonToolTipText",
+ fileChooser.getLocale());
- doAction(fileChooser, new ComponentAction() {
- @Override
- public boolean accept(Component component) {
- return (component instanceof AbstractButton)
+ doAction(fileChooser, new ComponentAction() {
+ @Override
+ public boolean accept(Component component) {
+ return (component instanceof AbstractButton)
&& detailsTooltip.equals(
((AbstractButton) component).getToolTipText());
- }
+ }
- @Override
- public void perform(Component component) {
- ((AbstractButton) component).doClick();
- }
- });
+ @Override
+ public void perform(Component component) {
+ ((AbstractButton) component).doClick();
+ }
+ });
- doAction(fileChooser, new ComponentAction() {
- @Override
- public boolean accept(Component component) {
- return (component instanceof JTable);
- }
+ doAction(fileChooser, new ComponentAction() {
+ @Override
+ public boolean accept(Component component) {
+ return (component instanceof JTable);
+ }
- @Override
- public void perform(Component component) {
- Point tableLocation = component.getLocationOnScreen();
- locationX = (int) tableLocation.getX();
- locationY = (int) tableLocation.getY();
- width = (int) fileChooser.getBounds().getWidth();
- }
- });
- }
- });
+ @Override
+ public void perform(Component component) {
+ Point tableLocation = component.getLocationOnScreen();
+ locationX = (int) tableLocation.getX();
+ locationY = (int) tableLocation.getY();
+ width = (int) fileChooser.getBounds().getWidth();
+ }
+ });
+ }
+ });
+
+ robot.waitForIdle();
- robot.waitForIdle();
+ int d = 25;
+ for (int i = 0; i < width / d; i++) {
+ robot.mouseMove(locationX + i * d, locationY + 5);
+ robot.waitForIdle();
+ robot.mousePress(InputEvent.BUTTON1_MASK);
+ robot.waitForIdle();
+ robot.mouseRelease(InputEvent.BUTTON1_MASK);
+ robot.waitForIdle();
+ }
- int d = 25;
- for (int i = 0; i < width / d; i++) {
- robot.mouseMove(locationX + i * d, locationY + 5);
- robot.mousePress(InputEvent.BUTTON1_MASK);
- robot.mouseRelease(InputEvent.BUTTON1_MASK);
+ robot.keyPress(KeyEvent.VK_ESCAPE);
+ robot.waitForIdle();
+ robot.keyRelease(KeyEvent.VK_ESCAPE);
robot.waitForIdle();
+
+ } finally {
+ for (int i = 0; i < FILE_NUMBER; i++) {
+ Files.delete(files[i].toPath());
+ }
+ Files.delete(largeFolder.toPath());
}
-
- robot.keyPress(KeyEvent.VK_ESCAPE);
- robot.keyRelease(KeyEvent.VK_ESCAPE);
}
static void doAction(Component component, ComponentAction action) {
@@ -134,13 +150,11 @@
private static File createLargeFolder() {
try {
- File largeFolder = Files.createTempDirectory("large_folder").toFile();
- largeFolder.deleteOnExit();
+ largeFolder = Files.createTempDirectory("large_folder").toFile();
for (int i = 0; i < FILE_NUMBER; i++) {
- File file = new File(largeFolder, "File_" + i + ".txt");
- file.createNewFile();
- file.deleteOnExit();
+ files[i] = new File(largeFolder, "File_" + i + ".txt");
+ files[i].createNewFile();
}
return largeFolder;
} catch (IOException ex) {
--- a/test/jdk/javax/swing/JFileChooser/8062561/bug8062561.java Thu Mar 01 16:35:36 2018 -0500
+++ b/test/jdk/javax/swing/JFileChooser/8062561/bug8062561.java Fri Mar 02 21:00:12 2018 +0100
@@ -36,6 +36,8 @@
/**
* @test
* @bug 8062561
+ * @key headful
+ * @requires (os.family == "windows")
* @summary File system view returns null default directory
* @library ../../../../lib/testlibrary
* @modules java.desktop/sun.awt
--- a/test/jdk/javax/swing/JFileChooser/8080628/bug8080628.java Thu Mar 01 16:35:36 2018 -0500
+++ b/test/jdk/javax/swing/JFileChooser/8080628/bug8080628.java Fri Mar 02 21:00:12 2018 +0100
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2015, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2015, 2018, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
@@ -25,6 +25,7 @@
import javax.swing.SwingUtilities;
import javax.swing.UIManager;
import javax.swing.UIManager.LookAndFeelInfo;
+import javax.swing.UnsupportedLookAndFeelException;
import sun.swing.SwingUtilities2;
@@ -77,7 +78,11 @@
try {
LookAndFeelInfo[] lafInfo = UIManager.getInstalledLookAndFeels();
for (LookAndFeelInfo info : lafInfo) {
- UIManager.setLookAndFeel(info.getClassName());
+ try {
+ UIManager.setLookAndFeel(info.getClassName());
+ } catch (final UnsupportedLookAndFeelException ignored) {
+ continue;
+ }
for (Locale locale : LOCALES) {
for (String key : MNEMONIC_KEYS) {
--- a/test/jdk/javax/swing/JFrame/Serialization/JFrameMenuSerializationTest.java Thu Mar 01 16:35:36 2018 -0500
+++ b/test/jdk/javax/swing/JFrame/Serialization/JFrameMenuSerializationTest.java Fri Mar 02 21:00:12 2018 +0100
@@ -23,6 +23,7 @@
/**
* @test
+ * @key headful
* @bug 8189201
* @summary [macosx] NotSerializableException during JFrame with MenuBar
* serialization
--- a/test/jdk/javax/swing/JInternalFrame/8160248/JInternalFrameDraggingTest.java Thu Mar 01 16:35:36 2018 -0500
+++ b/test/jdk/javax/swing/JInternalFrame/8160248/JInternalFrameDraggingTest.java Fri Mar 02 21:00:12 2018 +0100
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2016, 2017, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2016, 2018, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
@@ -36,7 +36,7 @@
/**
* @test
* @key headful
- * @bug 8160248 8160332
+ * @bug 8160248 8160332 8186513
* @summary Dragged internal frame leaves artifacts for floating point ui scale
* @run main/othervm -Dsun.java2d.uiScale=1.2 JInternalFrameDraggingTest
* @run main/othervm -Dsun.java2d.uiScale=1.5 JInternalFrameDraggingTest
@@ -69,10 +69,14 @@
BufferedImage img = robot.createScreenCapture(rect);
int testRGB = BACKGROUND_COLOR.getRGB();
- for (int i = 0; i < size; i++) {
+ for (int i = 1; i < size; i++) {
int rgbCW = img.getRGB(i, size / 2);
int rgbCH = img.getRGB(size / 2, i);
if (rgbCW != testRGB || rgbCH != testRGB) {
+ System.out.println("i " + i + " rgbCW " +
+ Integer.toHexString(rgbCW) +
+ " testRGB " + Integer.toHexString(testRGB) +
+ " rgbCH " + Integer.toHexString(rgbCH));
throw new RuntimeException("Background color is wrong!");
}
}
@@ -81,6 +85,7 @@
private static void createAndShowGUI() {
frame = new JFrame();
+ frame.setUndecorated(true);
frame.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
frame.setLayout(new BorderLayout());
--- a/test/jdk/javax/swing/JLayer/8041982/bug8041982.java Thu Mar 01 16:35:36 2018 -0500
+++ b/test/jdk/javax/swing/JLayer/8041982/bug8041982.java Fri Mar 02 21:00:12 2018 +0100
@@ -22,6 +22,7 @@
*/
/* @test
+ * @key headful
* @bug 8041982
* @summary Use of animated icon in JLayer causes CPU spin
* @author Alexander Potochkin
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/test/jdk/javax/swing/JList/SetSelectedValueTest.java Fri Mar 02 21:00:12 2018 +0100
@@ -0,0 +1,77 @@
+/*
+ * Copyright (c) 2018, Oracle and/or its affiliates. All rights reserved.
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * This code is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU General Public License version 2 only, as
+ * published by the Free Software Foundation.
+ *
+ * This code is distributed in the hope that it will be useful, but WITHOUT
+ * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
+ * version 2 for more details (a copy is included in the LICENSE file that
+ * accompanied this code).
+ *
+ * You should have received a copy of the GNU General Public License version
+ * 2 along with this work; if not, write to the Free Software Foundation,
+ * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
+ *
+ * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
+ * or visit www.oracle.com if you need additional information or have any
+ * questions.
+ */
+/*
+ * @test
+ * @key headful
+ * @bug 5076761
+ * @summary Verifies that the selection is cleared when setSelectedValue is
+ * called with null
+ * @run main SetSelectedValueTest
+ */
+
+import javax.swing.SwingUtilities;
+import javax.swing.DefaultListModel;
+import javax.swing.JList;
+import javax.swing.ListSelectionModel;
+import java.util.Collections;
+import java.util.List;
+
+public class SetSelectedValueTest {
+ public static void main(String[] args) throws Exception {
+
+ SwingUtilities.invokeAndWait(new Runnable() {
+ public void run() {
+ // Create a JList with 2 elements
+ DefaultListModel dlm = new DefaultListModel();
+ JList list = new JList<String>(dlm);
+ list.setSelectionMode(
+ ListSelectionModel.MULTIPLE_INTERVAL_SELECTION);
+ dlm.addElement("1");
+ dlm.addElement("2");
+
+ // Select both the elements added in list
+ list.setSelectionInterval(0, 1);
+ checkSelectionByList(list, List.of("1", "2"));
+
+ // Set the selected value as null. This should clear the
+ // selection
+ list.setSelectedValue(null, true);
+ checkSelectionByList(list, Collections.emptyList());
+
+ // Select both the elements added in list
+ list.setSelectionInterval(0, 1);
+ checkSelectionByList(list, List.of("1", "2"));
+ }
+ });
+ }
+
+ static void checkSelectionByList(JList list, List<String> selectionList)
+ throws RuntimeException {
+ List<String> listSelection = list.getSelectedValuesList();
+ if (!listSelection.equals(selectionList)) {
+ System.out.println("Expected: " + selectionList);
+ System.out.println("Actual: " + listSelection);
+ throw new RuntimeException("Wrong selection");
+ }
+ }
+}
--- a/test/jdk/javax/swing/JMenuItem/6883341/bug6883341.java Thu Mar 01 16:35:36 2018 -0500
+++ b/test/jdk/javax/swing/JMenuItem/6883341/bug6883341.java Fri Mar 02 21:00:12 2018 +0100
@@ -24,6 +24,7 @@
/*
* @test
* @bug 6883341
+ * @key headful
* @summary Checks that menu items with no text don't throw an exception
* @author Alexander Potochkin
* @run main bug6883341
--- a/test/jdk/javax/swing/JTable/8031971/bug8031971.java Thu Mar 01 16:35:36 2018 -0500
+++ b/test/jdk/javax/swing/JTable/8031971/bug8031971.java Fri Mar 02 21:00:12 2018 +0100
@@ -32,7 +32,7 @@
* @bug 8031971 8039750
* @author Alexander Scherbatiy
* @summary Use only public methods in the SwingLazyValue
- * @run main bug8031971
+ * @run main/othervm bug8031971
*/
public class bug8031971 {
--- a/test/jdk/javax/swing/JTableHeader/8020039/TableHeaderRendererExceptionTest.java Thu Mar 01 16:35:36 2018 -0500
+++ b/test/jdk/javax/swing/JTableHeader/8020039/TableHeaderRendererExceptionTest.java Fri Mar 02 21:00:12 2018 +0100
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2016, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2016, 2018, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
@@ -22,6 +22,7 @@
*/
import javax.swing.UIManager;
+import javax.swing.UnsupportedLookAndFeelException;
import javax.swing.table.JTableHeader;
/**
@@ -40,8 +41,11 @@
for (UIManager.LookAndFeelInfo lookAndFeelItem : lookAndFeelArray) {
String lookAndFeelString = lookAndFeelItem.getClassName();
-
- UIManager.setLookAndFeel(lookAndFeelString);
+ try{
+ UIManager.setLookAndFeel(lookAndFeelString);
+ } catch (final UnsupportedLookAndFeelException ignored) {
+ continue;
+ }
// Test getTableCellRendererComponent method by passing null table
JTableHeader header = new JTableHeader();
--- a/test/jdk/javax/swing/Popup/TaskbarPositionTest.java Thu Mar 01 16:35:36 2018 -0500
+++ b/test/jdk/javax/swing/Popup/TaskbarPositionTest.java Fri Mar 02 21:00:12 2018 +0100
@@ -27,7 +27,8 @@
import javax.swing.event.*;
/**
- * @test @bug 4245587 4474813 4425878 4767478 8015599
+ * @test
+ * @bug 4245587 4474813 4425878 4767478 8015599
* @key headful
* @author Mark Davidson
* @summary Tests the location of the heavy weight popup portion of JComboBox,
--- a/test/jdk/javax/swing/RepaintManager/DisplayListenerLeak/DisplayListenerLeak.java Thu Mar 01 16:35:36 2018 -0500
+++ b/test/jdk/javax/swing/RepaintManager/DisplayListenerLeak/DisplayListenerLeak.java Fri Mar 02 21:00:12 2018 +0100
@@ -34,6 +34,7 @@
/**
* @test
* @bug 8041654
+ * @key headful
* @modules java.desktop/sun.java2d
* @run main/othervm -Xmx80m DisplayListenerLeak
*/
--- a/test/jdk/javax/swing/Security/6657138/bug6657138.java Thu Mar 01 16:35:36 2018 -0500
+++ b/test/jdk/javax/swing/Security/6657138/bug6657138.java Fri Mar 02 21:00:12 2018 +0100
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2009, 2015, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2009, 2018, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
@@ -68,7 +68,11 @@
continue;
}
String className = laf.getClassName();
- UIManager.setLookAndFeel(className);
+ try {
+ UIManager.setLookAndFeel(className);
+ } catch (final UnsupportedLookAndFeelException ignored) {
+ continue;
+ }
ComponentUI ui = UIManager.getUI(c);
if (ui == null) {
throw new RuntimeException("UI is null for " + c);
--- a/test/jdk/javax/swing/UIDefaults/6302464/bug6302464.java Thu Mar 01 16:35:36 2018 -0500
+++ b/test/jdk/javax/swing/UIDefaults/6302464/bug6302464.java Fri Mar 02 21:00:12 2018 +0100
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2015, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2015, 2018, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
@@ -33,6 +33,7 @@
import javax.swing.UIManager;
import javax.swing.UIDefaults;
import javax.swing.UIManager.LookAndFeelInfo;
+import javax.swing.UnsupportedLookAndFeelException;
import javax.swing.plaf.basic.BasicLookAndFeel;
import static java.awt.RenderingHints.KEY_TEXT_ANTIALIASING;
import static java.awt.RenderingHints.KEY_TEXT_LCD_CONTRAST;
@@ -178,6 +179,7 @@
private static void setLookAndFeel(String lafClass) {
try {
UIManager.setLookAndFeel(lafClass);
+ } catch (final UnsupportedLookAndFeelException ignored) {
} catch (Exception e) {
throw new RuntimeException(e);
}
--- a/test/jdk/javax/swing/UIDefaults/6622002/bug6622002.java Thu Mar 01 16:35:36 2018 -0500
+++ b/test/jdk/javax/swing/UIDefaults/6622002/bug6622002.java Fri Mar 02 21:00:12 2018 +0100
@@ -26,6 +26,7 @@
* @bug 6622002
* @author Alexander Potochkin
* @summary UIDefault.ProxyLazyValue has unsafe reflection usage
+ * @run main/othervm bug6622002
*/
import javax.swing.*;
--- a/test/jdk/javax/swing/UIDefaults/8080972/TestProxyLazyValue.java Thu Mar 01 16:35:36 2018 -0500
+++ b/test/jdk/javax/swing/UIDefaults/8080972/TestProxyLazyValue.java Fri Mar 02 21:00:12 2018 +0100
@@ -28,6 +28,7 @@
* @summary Audit Core Reflection in module java.desktop for places that will
* require changes to work with modules
* @author Alexander Scherbatiy
+ * @run main/othervm TestProxyLazyValue
*/
public class TestProxyLazyValue {
--- a/test/jdk/javax/swing/UIDefaults/8133926/InternalFrameIcon.java Thu Mar 01 16:35:36 2018 -0500
+++ b/test/jdk/javax/swing/UIDefaults/8133926/InternalFrameIcon.java Fri Mar 02 21:00:12 2018 +0100
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2015, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2015, 2018, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
@@ -45,9 +45,10 @@
try {
UIManager.setLookAndFeel(laf.getClassName());
System.out.println("LookAndFeel: " + laf.getClassName());
- } catch (ClassNotFoundException | InstantiationException |
- UnsupportedLookAndFeelException | IllegalAccessException e) {
+ } catch (ClassNotFoundException | IllegalAccessException |
+ InstantiationException e) {
throw new RuntimeException(e);
+ } catch (final UnsupportedLookAndFeelException ignored) {
}
}
--- a/test/jdk/javax/swing/plaf/metal/MetalUtils/bug6190373.java Thu Mar 01 16:35:36 2018 -0500
+++ b/test/jdk/javax/swing/plaf/metal/MetalUtils/bug6190373.java Fri Mar 02 21:00:12 2018 +0100
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2005, 2015, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2005, 2018, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
@@ -102,8 +102,10 @@
try {
UIManager.setLookAndFeel(laf.getClassName());
System.out.println("LookAndFeel: " + laf.getClassName());
+ } catch (final UnsupportedLookAndFeelException ignored){
+ System.out.println("Unsupported LookAndFeel: " + laf.getClassName());
} catch (ClassNotFoundException | InstantiationException |
- UnsupportedLookAndFeelException | IllegalAccessException e) {
+ IllegalAccessException e) {
throw new RuntimeException(e);
}
}
--- a/test/jdk/javax/swing/plaf/nimbus/TestDisabledToolTipBorder.java Thu Mar 01 16:35:36 2018 -0500
+++ b/test/jdk/javax/swing/plaf/nimbus/TestDisabledToolTipBorder.java Fri Mar 02 21:00:12 2018 +0100
@@ -21,7 +21,8 @@
* questions.
*/
/**
- * @test @bug 8058785
+ * @test
+ * @bug 8058785
* @summary Displaying border around the disabled component's tool tip text
* @run main/manual TestDisabledToolTipBorder
*/
--- a/test/jdk/javax/swing/text/View/8080972/TestObjectView.java Thu Mar 01 16:35:36 2018 -0500
+++ b/test/jdk/javax/swing/text/View/8080972/TestObjectView.java Fri Mar 02 21:00:12 2018 +0100
@@ -36,6 +36,7 @@
* @summary Audit Core Reflection in module java.desktop for places that will
* require changes to work with modules
* @author Alexander Scherbatiy
+ * @run main/othervm TestObjectView
*/
public class TestObjectView {
--- a/test/jdk/javax/transaction/testng/Driver.java Thu Mar 01 16:35:36 2018 -0500
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,31 +0,0 @@
-/*
- * Copyright (c) 2016, 2918, Oracle and/or its affiliates. All rights reserved.
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * This code is free software; you can redistribute it and/or modify it
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
- * or visit www.oracle.com if you need additional information or have any
- * questions.
- */
-
-/**
- * @test
- * @modules java.sql
- * @compile
- * test/transaction/XAExceptionTests.java
- * util/SerializedTransactionExceptions.java
- * @run testng/othervm test.transaction.XAExceptionTests
- */
--- a/test/jdk/javax/transaction/testng/test/transaction/XAExceptionTests.java Thu Mar 01 16:35:36 2018 -0500
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,98 +0,0 @@
-/*
- * Copyright (c) 2015, Oracle and/or its affiliates. All rights reserved.
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * This code is free software; you can redistribute it and/or modify it
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
- * or visit www.oracle.com if you need additional information or have any
- * questions.
- */
-package test.transaction;
-
-import java.io.ByteArrayInputStream;
-import java.io.ObjectInputStream;
-import javax.transaction.xa.XAException;
-import static org.testng.Assert.*;
-import org.testng.annotations.Test;
-import util.SerializedTransactionExceptions;
-
-public class XAExceptionTests {
-
- protected final String reason = "reason";
-
- /**
- * Create XAException with no-arg constructor
- */
- @Test
- public void test1() {
- XAException ex = new XAException();
- assertTrue(ex.getMessage() == null
- && ex.getCause() == null
- && ex.errorCode == 0);
- }
-
- /**
- * Create XAException with message
- */
- @Test
- public void test2() {
- XAException ex = new XAException(reason);
- assertTrue(ex.getMessage().equals(reason)
- && ex.getCause() == null
- && ex.errorCode == 0);
- }
-
- /**
- * De-Serialize a XAException from JDBC 4.0 and make sure you can read it
- * back properly
- */
- @Test
- public void test3() throws Exception {
-
- ObjectInputStream ois = new ObjectInputStream(
- new ByteArrayInputStream(SerializedTransactionExceptions.XAE_DATA));
- XAException ex = (XAException) ois.readObject();
- assertTrue(reason.equals(ex.getMessage())
- && ex.getCause() == null
- && ex.errorCode == 0);
- }
-
- /**
- * Create TransactionRolledbackException specifying an error code
- */
- @Test
- public void test4() {
- int error = 21;
- XAException ex = new XAException(error);
- assertTrue(ex.getMessage() == null
- && ex.getCause() == null
- && ex.errorCode == error);
- }
-
- /**
- * Create TransactionRolledbackException specifying an error code
- */
- @Test
- public void test5() {
- int error = 21;
- XAException ex = new XAException(error);
- ex.errorCode = error;
- assertTrue(ex.getMessage() == null
- && ex.getCause() == null
- && ex.errorCode == error);
- }
-
-}
--- a/test/jdk/javax/transaction/testng/util/SerializedTransactionExceptions.java Thu Mar 01 16:35:36 2018 -0500
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,167 +0,0 @@
-/*
- * Copyright (c) 2015, Oracle and/or its affiliates. All rights reserved.
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * This code is free software; you can redistribute it and/or modify it
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
- * or visit www.oracle.com if you need additional information or have any
- * questions.
- */
-package util;
-
-public class SerializedTransactionExceptions {
-
- /**
- * Serialized XAException from JDK 8 with the following values:
- * reason = "This was the error msg"
- * cause = null
- */
- public static byte[] XAE_DATA = {
- (byte) 0xac, (byte) 0xed, (byte) 0x0, (byte) 0x5, (byte) 0x73, (byte) 0x72, (byte) 0x0, (byte) 0x20, (byte) 0x6a, (byte) 0x61, (byte) 0x76, (byte) 0x61, (byte) 0x78, (byte) 0x2e, (byte) 0x74, (byte) 0x72, (byte) 0x61, (byte) 0x6e, (byte) 0x73, (byte) 0x61, (byte) 0x63, (byte) 0x74, (byte) 0x69, (byte) 0x6f, (byte) 0x6e, (byte) 0x2e, (byte) 0x78, (byte) 0x61, (byte) 0x2e, (byte) 0x58, (byte) 0x41, (byte) 0x45,
- (byte) 0x78, (byte) 0x63, (byte) 0x65, (byte) 0x70, (byte) 0x74, (byte) 0x69, (byte) 0x6f, (byte) 0x6e, (byte) 0x8d, (byte) 0x83, (byte) 0x3c, (byte) 0xc2, (byte) 0xda, (byte) 0xf, (byte) 0x2a, (byte) 0x59, (byte) 0x2, (byte) 0x0, (byte) 0x1, (byte) 0x49, (byte) 0x0, (byte) 0x9, (byte) 0x65, (byte) 0x72, (byte) 0x72, (byte) 0x6f, (byte) 0x72, (byte) 0x43, (byte) 0x6f, (byte) 0x64, (byte) 0x65, (byte) 0x78,
- (byte) 0x72, (byte) 0x0, (byte) 0x13, (byte) 0x6a, (byte) 0x61, (byte) 0x76, (byte) 0x61, (byte) 0x2e, (byte) 0x6c, (byte) 0x61, (byte) 0x6e, (byte) 0x67, (byte) 0x2e, (byte) 0x45, (byte) 0x78, (byte) 0x63, (byte) 0x65, (byte) 0x70, (byte) 0x74, (byte) 0x69, (byte) 0x6f, (byte) 0x6e, (byte) 0xd0, (byte) 0xfd, (byte) 0x1f, (byte) 0x3e, (byte) 0x1a, (byte) 0x3b, (byte) 0x1c, (byte) 0xc4, (byte) 0x2, (byte) 0x0,
- (byte) 0x0, (byte) 0x78, (byte) 0x72, (byte) 0x0, (byte) 0x13, (byte) 0x6a, (byte) 0x61, (byte) 0x76, (byte) 0x61, (byte) 0x2e, (byte) 0x6c, (byte) 0x61, (byte) 0x6e, (byte) 0x67, (byte) 0x2e, (byte) 0x54, (byte) 0x68, (byte) 0x72, (byte) 0x6f, (byte) 0x77, (byte) 0x61, (byte) 0x62, (byte) 0x6c, (byte) 0x65, (byte) 0xd5, (byte) 0xc6, (byte) 0x35, (byte) 0x27, (byte) 0x39, (byte) 0x77, (byte) 0xb8, (byte) 0xcb,
- (byte) 0x3, (byte) 0x0, (byte) 0x4, (byte) 0x4c, (byte) 0x0, (byte) 0x5, (byte) 0x63, (byte) 0x61, (byte) 0x75, (byte) 0x73, (byte) 0x65, (byte) 0x74, (byte) 0x0, (byte) 0x15, (byte) 0x4c, (byte) 0x6a, (byte) 0x61, (byte) 0x76, (byte) 0x61, (byte) 0x2f, (byte) 0x6c, (byte) 0x61, (byte) 0x6e, (byte) 0x67, (byte) 0x2f, (byte) 0x54, (byte) 0x68, (byte) 0x72, (byte) 0x6f, (byte) 0x77, (byte) 0x61, (byte) 0x62,
- (byte) 0x6c, (byte) 0x65, (byte) 0x3b, (byte) 0x4c, (byte) 0x0, (byte) 0xd, (byte) 0x64, (byte) 0x65, (byte) 0x74, (byte) 0x61, (byte) 0x69, (byte) 0x6c, (byte) 0x4d, (byte) 0x65, (byte) 0x73, (byte) 0x73, (byte) 0x61, (byte) 0x67, (byte) 0x65, (byte) 0x74, (byte) 0x0, (byte) 0x12, (byte) 0x4c, (byte) 0x6a, (byte) 0x61, (byte) 0x76, (byte) 0x61, (byte) 0x2f, (byte) 0x6c, (byte) 0x61, (byte) 0x6e, (byte) 0x67,
- (byte) 0x2f, (byte) 0x53, (byte) 0x74, (byte) 0x72, (byte) 0x69, (byte) 0x6e, (byte) 0x67, (byte) 0x3b, (byte) 0x5b, (byte) 0x0, (byte) 0xa, (byte) 0x73, (byte) 0x74, (byte) 0x61, (byte) 0x63, (byte) 0x6b, (byte) 0x54, (byte) 0x72, (byte) 0x61, (byte) 0x63, (byte) 0x65, (byte) 0x74, (byte) 0x0, (byte) 0x1e, (byte) 0x5b, (byte) 0x4c, (byte) 0x6a, (byte) 0x61, (byte) 0x76, (byte) 0x61, (byte) 0x2f, (byte) 0x6c,
- (byte) 0x61, (byte) 0x6e, (byte) 0x67, (byte) 0x2f, (byte) 0x53, (byte) 0x74, (byte) 0x61, (byte) 0x63, (byte) 0x6b, (byte) 0x54, (byte) 0x72, (byte) 0x61, (byte) 0x63, (byte) 0x65, (byte) 0x45, (byte) 0x6c, (byte) 0x65, (byte) 0x6d, (byte) 0x65, (byte) 0x6e, (byte) 0x74, (byte) 0x3b, (byte) 0x4c, (byte) 0x0, (byte) 0x14, (byte) 0x73, (byte) 0x75, (byte) 0x70, (byte) 0x70, (byte) 0x72, (byte) 0x65, (byte) 0x73,
- (byte) 0x73, (byte) 0x65, (byte) 0x64, (byte) 0x45, (byte) 0x78, (byte) 0x63, (byte) 0x65, (byte) 0x70, (byte) 0x74, (byte) 0x69, (byte) 0x6f, (byte) 0x6e, (byte) 0x73, (byte) 0x74, (byte) 0x0, (byte) 0x10, (byte) 0x4c, (byte) 0x6a, (byte) 0x61, (byte) 0x76, (byte) 0x61, (byte) 0x2f, (byte) 0x75, (byte) 0x74, (byte) 0x69, (byte) 0x6c, (byte) 0x2f, (byte) 0x4c, (byte) 0x69, (byte) 0x73, (byte) 0x74, (byte) 0x3b,
- (byte) 0x78, (byte) 0x70, (byte) 0x71, (byte) 0x0, (byte) 0x7e, (byte) 0x0, (byte) 0x7, (byte) 0x74, (byte) 0x0, (byte) 0x6, (byte) 0x72, (byte) 0x65, (byte) 0x61, (byte) 0x73, (byte) 0x6f, (byte) 0x6e, (byte) 0x75, (byte) 0x72, (byte) 0x0, (byte) 0x1e, (byte) 0x5b, (byte) 0x4c, (byte) 0x6a, (byte) 0x61, (byte) 0x76, (byte) 0x61, (byte) 0x2e, (byte) 0x6c, (byte) 0x61, (byte) 0x6e, (byte) 0x67, (byte) 0x2e,
- (byte) 0x53, (byte) 0x74, (byte) 0x61, (byte) 0x63, (byte) 0x6b, (byte) 0x54, (byte) 0x72, (byte) 0x61, (byte) 0x63, (byte) 0x65, (byte) 0x45, (byte) 0x6c, (byte) 0x65, (byte) 0x6d, (byte) 0x65, (byte) 0x6e, (byte) 0x74, (byte) 0x3b, (byte) 0x2, (byte) 0x46, (byte) 0x2a, (byte) 0x3c, (byte) 0x3c, (byte) 0xfd, (byte) 0x22, (byte) 0x39, (byte) 0x2, (byte) 0x0, (byte) 0x0, (byte) 0x78, (byte) 0x70, (byte) 0x0,
- (byte) 0x0, (byte) 0x0, (byte) 0x2, (byte) 0x73, (byte) 0x72, (byte) 0x0, (byte) 0x1b, (byte) 0x6a, (byte) 0x61, (byte) 0x76, (byte) 0x61, (byte) 0x2e, (byte) 0x6c, (byte) 0x61, (byte) 0x6e, (byte) 0x67, (byte) 0x2e, (byte) 0x53, (byte) 0x74, (byte) 0x61, (byte) 0x63, (byte) 0x6b, (byte) 0x54, (byte) 0x72, (byte) 0x61, (byte) 0x63, (byte) 0x65, (byte) 0x45, (byte) 0x6c, (byte) 0x65, (byte) 0x6d, (byte) 0x65,
- (byte) 0x6e, (byte) 0x74, (byte) 0x61, (byte) 0x9, (byte) 0xc5, (byte) 0x9a, (byte) 0x26, (byte) 0x36, (byte) 0xdd, (byte) 0x85, (byte) 0x2, (byte) 0x0, (byte) 0x4, (byte) 0x49, (byte) 0x0, (byte) 0xa, (byte) 0x6c, (byte) 0x69, (byte) 0x6e, (byte) 0x65, (byte) 0x4e, (byte) 0x75, (byte) 0x6d, (byte) 0x62, (byte) 0x65, (byte) 0x72, (byte) 0x4c, (byte) 0x0, (byte) 0xe, (byte) 0x64, (byte) 0x65, (byte) 0x63,
- (byte) 0x6c, (byte) 0x61, (byte) 0x72, (byte) 0x69, (byte) 0x6e, (byte) 0x67, (byte) 0x43, (byte) 0x6c, (byte) 0x61, (byte) 0x73, (byte) 0x73, (byte) 0x71, (byte) 0x0, (byte) 0x7e, (byte) 0x0, (byte) 0x4, (byte) 0x4c, (byte) 0x0, (byte) 0x8, (byte) 0x66, (byte) 0x69, (byte) 0x6c, (byte) 0x65, (byte) 0x4e, (byte) 0x61, (byte) 0x6d, (byte) 0x65, (byte) 0x71, (byte) 0x0, (byte) 0x7e, (byte) 0x0, (byte) 0x4,
- (byte) 0x4c, (byte) 0x0, (byte) 0xa, (byte) 0x6d, (byte) 0x65, (byte) 0x74, (byte) 0x68, (byte) 0x6f, (byte) 0x64, (byte) 0x4e, (byte) 0x61, (byte) 0x6d, (byte) 0x65, (byte) 0x71, (byte) 0x0, (byte) 0x7e, (byte) 0x0, (byte) 0x4, (byte) 0x78, (byte) 0x70, (byte) 0x0, (byte) 0x0, (byte) 0x0, (byte) 0x39, (byte) 0x74, (byte) 0x0, (byte) 0x10, (byte) 0x57, (byte) 0x72, (byte) 0x69, (byte) 0x74, (byte) 0x65,
- (byte) 0x53, (byte) 0x65, (byte) 0x72, (byte) 0x69, (byte) 0x61, (byte) 0x6c, (byte) 0x44, (byte) 0x61, (byte) 0x74, (byte) 0x61, (byte) 0x31, (byte) 0x74, (byte) 0x0, (byte) 0x15, (byte) 0x57, (byte) 0x72, (byte) 0x69, (byte) 0x74, (byte) 0x65, (byte) 0x53, (byte) 0x65, (byte) 0x72, (byte) 0x69, (byte) 0x61, (byte) 0x6c, (byte) 0x44, (byte) 0x61, (byte) 0x74, (byte) 0x61, (byte) 0x31, (byte) 0x2e, (byte) 0x6a,
- (byte) 0x61, (byte) 0x76, (byte) 0x61, (byte) 0x74, (byte) 0x0, (byte) 0x3, (byte) 0x72, (byte) 0x75, (byte) 0x6e, (byte) 0x73, (byte) 0x71, (byte) 0x0, (byte) 0x7e, (byte) 0x0, (byte) 0xb, (byte) 0x0, (byte) 0x0, (byte) 0x0, (byte) 0x24, (byte) 0x71, (byte) 0x0, (byte) 0x7e, (byte) 0x0, (byte) 0xd, (byte) 0x71, (byte) 0x0, (byte) 0x7e, (byte) 0x0, (byte) 0xe, (byte) 0x74, (byte) 0x0, (byte) 0x4,
- (byte) 0x6d, (byte) 0x61, (byte) 0x69, (byte) 0x6e, (byte) 0x73, (byte) 0x72, (byte) 0x0, (byte) 0x26, (byte) 0x6a, (byte) 0x61, (byte) 0x76, (byte) 0x61, (byte) 0x2e, (byte) 0x75, (byte) 0x74, (byte) 0x69, (byte) 0x6c, (byte) 0x2e, (byte) 0x43, (byte) 0x6f, (byte) 0x6c, (byte) 0x6c, (byte) 0x65, (byte) 0x63, (byte) 0x74, (byte) 0x69, (byte) 0x6f, (byte) 0x6e, (byte) 0x73, (byte) 0x24, (byte) 0x55, (byte) 0x6e,
- (byte) 0x6d, (byte) 0x6f, (byte) 0x64, (byte) 0x69, (byte) 0x66, (byte) 0x69, (byte) 0x61, (byte) 0x62, (byte) 0x6c, (byte) 0x65, (byte) 0x4c, (byte) 0x69, (byte) 0x73, (byte) 0x74, (byte) 0xfc, (byte) 0xf, (byte) 0x25, (byte) 0x31, (byte) 0xb5, (byte) 0xec, (byte) 0x8e, (byte) 0x10, (byte) 0x2, (byte) 0x0, (byte) 0x1, (byte) 0x4c, (byte) 0x0, (byte) 0x4, (byte) 0x6c, (byte) 0x69, (byte) 0x73, (byte) 0x74,
- (byte) 0x71, (byte) 0x0, (byte) 0x7e, (byte) 0x0, (byte) 0x6, (byte) 0x78, (byte) 0x72, (byte) 0x0, (byte) 0x2c, (byte) 0x6a, (byte) 0x61, (byte) 0x76, (byte) 0x61, (byte) 0x2e, (byte) 0x75, (byte) 0x74, (byte) 0x69, (byte) 0x6c, (byte) 0x2e, (byte) 0x43, (byte) 0x6f, (byte) 0x6c, (byte) 0x6c, (byte) 0x65, (byte) 0x63, (byte) 0x74, (byte) 0x69, (byte) 0x6f, (byte) 0x6e, (byte) 0x73, (byte) 0x24, (byte) 0x55,
- (byte) 0x6e, (byte) 0x6d, (byte) 0x6f, (byte) 0x64, (byte) 0x69, (byte) 0x66, (byte) 0x69, (byte) 0x61, (byte) 0x62, (byte) 0x6c, (byte) 0x65, (byte) 0x43, (byte) 0x6f, (byte) 0x6c, (byte) 0x6c, (byte) 0x65, (byte) 0x63, (byte) 0x74, (byte) 0x69, (byte) 0x6f, (byte) 0x6e, (byte) 0x19, (byte) 0x42, (byte) 0x0, (byte) 0x80, (byte) 0xcb, (byte) 0x5e, (byte) 0xf7, (byte) 0x1e, (byte) 0x2, (byte) 0x0, (byte) 0x1,
- (byte) 0x4c, (byte) 0x0, (byte) 0x1, (byte) 0x63, (byte) 0x74, (byte) 0x0, (byte) 0x16, (byte) 0x4c, (byte) 0x6a, (byte) 0x61, (byte) 0x76, (byte) 0x61, (byte) 0x2f, (byte) 0x75, (byte) 0x74, (byte) 0x69, (byte) 0x6c, (byte) 0x2f, (byte) 0x43, (byte) 0x6f, (byte) 0x6c, (byte) 0x6c, (byte) 0x65, (byte) 0x63, (byte) 0x74, (byte) 0x69, (byte) 0x6f, (byte) 0x6e, (byte) 0x3b, (byte) 0x78, (byte) 0x70, (byte) 0x73,
- (byte) 0x72, (byte) 0x0, (byte) 0x13, (byte) 0x6a, (byte) 0x61, (byte) 0x76, (byte) 0x61, (byte) 0x2e, (byte) 0x75, (byte) 0x74, (byte) 0x69, (byte) 0x6c, (byte) 0x2e, (byte) 0x41, (byte) 0x72, (byte) 0x72, (byte) 0x61, (byte) 0x79, (byte) 0x4c, (byte) 0x69, (byte) 0x73, (byte) 0x74, (byte) 0x78, (byte) 0x81, (byte) 0xd2, (byte) 0x1d, (byte) 0x99, (byte) 0xc7, (byte) 0x61, (byte) 0x9d, (byte) 0x3, (byte) 0x0,
- (byte) 0x1, (byte) 0x49, (byte) 0x0, (byte) 0x4, (byte) 0x73, (byte) 0x69, (byte) 0x7a, (byte) 0x65, (byte) 0x78, (byte) 0x70, (byte) 0x0, (byte) 0x0, (byte) 0x0, (byte) 0x0, (byte) 0x77, (byte) 0x4, (byte) 0x0, (byte) 0x0, (byte) 0x0, (byte) 0x0, (byte) 0x78, (byte) 0x71, (byte) 0x0, (byte) 0x7e, (byte) 0x0, (byte) 0x17, (byte) 0x78, (byte) 0x0, (byte) 0x0, (byte) 0x0, (byte) 0x0
- };
-
- /**
- * Serialized InvalidTransactionException from JDK 8 with the following
- * values:
- * reason = "This was the error msg"
- * cause = null
- */
- public static byte[] ITE_DATA = {
- (byte) 0xac, (byte) 0xed, (byte) 0x0, (byte) 0x5, (byte) 0x73, (byte) 0x72, (byte) 0x0, (byte) 0x2d, (byte) 0x6a, (byte) 0x61, (byte) 0x76, (byte) 0x61, (byte) 0x78, (byte) 0x2e, (byte) 0x74, (byte) 0x72, (byte) 0x61, (byte) 0x6e, (byte) 0x73, (byte) 0x61, (byte) 0x63, (byte) 0x74, (byte) 0x69, (byte) 0x6f, (byte) 0x6e, (byte) 0x2e, (byte) 0x49, (byte) 0x6e, (byte) 0x76, (byte) 0x61, (byte) 0x6c, (byte) 0x69,
- (byte) 0x64, (byte) 0x54, (byte) 0x72, (byte) 0x61, (byte) 0x6e, (byte) 0x73, (byte) 0x61, (byte) 0x63, (byte) 0x74, (byte) 0x69, (byte) 0x6f, (byte) 0x6e, (byte) 0x45, (byte) 0x78, (byte) 0x63, (byte) 0x65, (byte) 0x70, (byte) 0x74, (byte) 0x69, (byte) 0x6f, (byte) 0x6e, (byte) 0x31, (byte) 0xec, (byte) 0x3f, (byte) 0xae, (byte) 0x54, (byte) 0x8e, (byte) 0xdb, (byte) 0x68, (byte) 0x2, (byte) 0x0, (byte) 0x0,
- (byte) 0x78, (byte) 0x72, (byte) 0x0, (byte) 0x18, (byte) 0x6a, (byte) 0x61, (byte) 0x76, (byte) 0x61, (byte) 0x2e, (byte) 0x72, (byte) 0x6d, (byte) 0x69, (byte) 0x2e, (byte) 0x52, (byte) 0x65, (byte) 0x6d, (byte) 0x6f, (byte) 0x74, (byte) 0x65, (byte) 0x45, (byte) 0x78, (byte) 0x63, (byte) 0x65, (byte) 0x70, (byte) 0x74, (byte) 0x69, (byte) 0x6f, (byte) 0x6e, (byte) 0xb8, (byte) 0x8c, (byte) 0x9d, (byte) 0x4e,
- (byte) 0xde, (byte) 0xe4, (byte) 0x7a, (byte) 0x22, (byte) 0x2, (byte) 0x0, (byte) 0x1, (byte) 0x4c, (byte) 0x0, (byte) 0x6, (byte) 0x64, (byte) 0x65, (byte) 0x74, (byte) 0x61, (byte) 0x69, (byte) 0x6c, (byte) 0x74, (byte) 0x0, (byte) 0x15, (byte) 0x4c, (byte) 0x6a, (byte) 0x61, (byte) 0x76, (byte) 0x61, (byte) 0x2f, (byte) 0x6c, (byte) 0x61, (byte) 0x6e, (byte) 0x67, (byte) 0x2f, (byte) 0x54, (byte) 0x68,
- (byte) 0x72, (byte) 0x6f, (byte) 0x77, (byte) 0x61, (byte) 0x62, (byte) 0x6c, (byte) 0x65, (byte) 0x3b, (byte) 0x78, (byte) 0x72, (byte) 0x0, (byte) 0x13, (byte) 0x6a, (byte) 0x61, (byte) 0x76, (byte) 0x61, (byte) 0x2e, (byte) 0x69, (byte) 0x6f, (byte) 0x2e, (byte) 0x49, (byte) 0x4f, (byte) 0x45, (byte) 0x78, (byte) 0x63, (byte) 0x65, (byte) 0x70, (byte) 0x74, (byte) 0x69, (byte) 0x6f, (byte) 0x6e, (byte) 0x6c,
- (byte) 0x80, (byte) 0x73, (byte) 0x64, (byte) 0x65, (byte) 0x25, (byte) 0xf0, (byte) 0xab, (byte) 0x2, (byte) 0x0, (byte) 0x0, (byte) 0x78, (byte) 0x72, (byte) 0x0, (byte) 0x13, (byte) 0x6a, (byte) 0x61, (byte) 0x76, (byte) 0x61, (byte) 0x2e, (byte) 0x6c, (byte) 0x61, (byte) 0x6e, (byte) 0x67, (byte) 0x2e, (byte) 0x45, (byte) 0x78, (byte) 0x63, (byte) 0x65, (byte) 0x70, (byte) 0x74, (byte) 0x69, (byte) 0x6f,
- (byte) 0x6e, (byte) 0xd0, (byte) 0xfd, (byte) 0x1f, (byte) 0x3e, (byte) 0x1a, (byte) 0x3b, (byte) 0x1c, (byte) 0xc4, (byte) 0x2, (byte) 0x0, (byte) 0x0, (byte) 0x78, (byte) 0x72, (byte) 0x0, (byte) 0x13, (byte) 0x6a, (byte) 0x61, (byte) 0x76, (byte) 0x61, (byte) 0x2e, (byte) 0x6c, (byte) 0x61, (byte) 0x6e, (byte) 0x67, (byte) 0x2e, (byte) 0x54, (byte) 0x68, (byte) 0x72, (byte) 0x6f, (byte) 0x77, (byte) 0x61,
- (byte) 0x62, (byte) 0x6c, (byte) 0x65, (byte) 0xd5, (byte) 0xc6, (byte) 0x35, (byte) 0x27, (byte) 0x39, (byte) 0x77, (byte) 0xb8, (byte) 0xcb, (byte) 0x3, (byte) 0x0, (byte) 0x4, (byte) 0x4c, (byte) 0x0, (byte) 0x5, (byte) 0x63, (byte) 0x61, (byte) 0x75, (byte) 0x73, (byte) 0x65, (byte) 0x71, (byte) 0x0, (byte) 0x7e, (byte) 0x0, (byte) 0x2, (byte) 0x4c, (byte) 0x0, (byte) 0xd, (byte) 0x64, (byte) 0x65,
- (byte) 0x74, (byte) 0x61, (byte) 0x69, (byte) 0x6c, (byte) 0x4d, (byte) 0x65, (byte) 0x73, (byte) 0x73, (byte) 0x61, (byte) 0x67, (byte) 0x65, (byte) 0x74, (byte) 0x0, (byte) 0x12, (byte) 0x4c, (byte) 0x6a, (byte) 0x61, (byte) 0x76, (byte) 0x61, (byte) 0x2f, (byte) 0x6c, (byte) 0x61, (byte) 0x6e, (byte) 0x67, (byte) 0x2f, (byte) 0x53, (byte) 0x74, (byte) 0x72, (byte) 0x69, (byte) 0x6e, (byte) 0x67, (byte) 0x3b,
- (byte) 0x5b, (byte) 0x0, (byte) 0xa, (byte) 0x73, (byte) 0x74, (byte) 0x61, (byte) 0x63, (byte) 0x6b, (byte) 0x54, (byte) 0x72, (byte) 0x61, (byte) 0x63, (byte) 0x65, (byte) 0x74, (byte) 0x0, (byte) 0x1e, (byte) 0x5b, (byte) 0x4c, (byte) 0x6a, (byte) 0x61, (byte) 0x76, (byte) 0x61, (byte) 0x2f, (byte) 0x6c, (byte) 0x61, (byte) 0x6e, (byte) 0x67, (byte) 0x2f, (byte) 0x53, (byte) 0x74, (byte) 0x61, (byte) 0x63,
- (byte) 0x6b, (byte) 0x54, (byte) 0x72, (byte) 0x61, (byte) 0x63, (byte) 0x65, (byte) 0x45, (byte) 0x6c, (byte) 0x65, (byte) 0x6d, (byte) 0x65, (byte) 0x6e, (byte) 0x74, (byte) 0x3b, (byte) 0x4c, (byte) 0x0, (byte) 0x14, (byte) 0x73, (byte) 0x75, (byte) 0x70, (byte) 0x70, (byte) 0x72, (byte) 0x65, (byte) 0x73, (byte) 0x73, (byte) 0x65, (byte) 0x64, (byte) 0x45, (byte) 0x78, (byte) 0x63, (byte) 0x65, (byte) 0x70,
- (byte) 0x74, (byte) 0x69, (byte) 0x6f, (byte) 0x6e, (byte) 0x73, (byte) 0x74, (byte) 0x0, (byte) 0x10, (byte) 0x4c, (byte) 0x6a, (byte) 0x61, (byte) 0x76, (byte) 0x61, (byte) 0x2f, (byte) 0x75, (byte) 0x74, (byte) 0x69, (byte) 0x6c, (byte) 0x2f, (byte) 0x4c, (byte) 0x69, (byte) 0x73, (byte) 0x74, (byte) 0x3b, (byte) 0x78, (byte) 0x70, (byte) 0x70, (byte) 0x74, (byte) 0x0, (byte) 0x6, (byte) 0x72, (byte) 0x65,
- (byte) 0x61, (byte) 0x73, (byte) 0x6f, (byte) 0x6e, (byte) 0x75, (byte) 0x72, (byte) 0x0, (byte) 0x1e, (byte) 0x5b, (byte) 0x4c, (byte) 0x6a, (byte) 0x61, (byte) 0x76, (byte) 0x61, (byte) 0x2e, (byte) 0x6c, (byte) 0x61, (byte) 0x6e, (byte) 0x67, (byte) 0x2e, (byte) 0x53, (byte) 0x74, (byte) 0x61, (byte) 0x63, (byte) 0x6b, (byte) 0x54, (byte) 0x72, (byte) 0x61, (byte) 0x63, (byte) 0x65, (byte) 0x45, (byte) 0x6c,
- (byte) 0x65, (byte) 0x6d, (byte) 0x65, (byte) 0x6e, (byte) 0x74, (byte) 0x3b, (byte) 0x2, (byte) 0x46, (byte) 0x2a, (byte) 0x3c, (byte) 0x3c, (byte) 0xfd, (byte) 0x22, (byte) 0x39, (byte) 0x2, (byte) 0x0, (byte) 0x0, (byte) 0x78, (byte) 0x70, (byte) 0x0, (byte) 0x0, (byte) 0x0, (byte) 0x2, (byte) 0x73, (byte) 0x72, (byte) 0x0, (byte) 0x1b, (byte) 0x6a, (byte) 0x61, (byte) 0x76, (byte) 0x61, (byte) 0x2e,
- (byte) 0x6c, (byte) 0x61, (byte) 0x6e, (byte) 0x67, (byte) 0x2e, (byte) 0x53, (byte) 0x74, (byte) 0x61, (byte) 0x63, (byte) 0x6b, (byte) 0x54, (byte) 0x72, (byte) 0x61, (byte) 0x63, (byte) 0x65, (byte) 0x45, (byte) 0x6c, (byte) 0x65, (byte) 0x6d, (byte) 0x65, (byte) 0x6e, (byte) 0x74, (byte) 0x61, (byte) 0x9, (byte) 0xc5, (byte) 0x9a, (byte) 0x26, (byte) 0x36, (byte) 0xdd, (byte) 0x85, (byte) 0x2, (byte) 0x0,
- (byte) 0x4, (byte) 0x49, (byte) 0x0, (byte) 0xa, (byte) 0x6c, (byte) 0x69, (byte) 0x6e, (byte) 0x65, (byte) 0x4e, (byte) 0x75, (byte) 0x6d, (byte) 0x62, (byte) 0x65, (byte) 0x72, (byte) 0x4c, (byte) 0x0, (byte) 0xe, (byte) 0x64, (byte) 0x65, (byte) 0x63, (byte) 0x6c, (byte) 0x61, (byte) 0x72, (byte) 0x69, (byte) 0x6e, (byte) 0x67, (byte) 0x43, (byte) 0x6c, (byte) 0x61, (byte) 0x73, (byte) 0x73, (byte) 0x71,
- (byte) 0x0, (byte) 0x7e, (byte) 0x0, (byte) 0x6, (byte) 0x4c, (byte) 0x0, (byte) 0x8, (byte) 0x66, (byte) 0x69, (byte) 0x6c, (byte) 0x65, (byte) 0x4e, (byte) 0x61, (byte) 0x6d, (byte) 0x65, (byte) 0x71, (byte) 0x0, (byte) 0x7e, (byte) 0x0, (byte) 0x6, (byte) 0x4c, (byte) 0x0, (byte) 0xa, (byte) 0x6d, (byte) 0x65, (byte) 0x74, (byte) 0x68, (byte) 0x6f, (byte) 0x64, (byte) 0x4e, (byte) 0x61, (byte) 0x6d,
- (byte) 0x65, (byte) 0x71, (byte) 0x0, (byte) 0x7e, (byte) 0x0, (byte) 0x6, (byte) 0x78, (byte) 0x70, (byte) 0x0, (byte) 0x0, (byte) 0x0, (byte) 0x3a, (byte) 0x74, (byte) 0x0, (byte) 0x10, (byte) 0x57, (byte) 0x72, (byte) 0x69, (byte) 0x74, (byte) 0x65, (byte) 0x53, (byte) 0x65, (byte) 0x72, (byte) 0x69, (byte) 0x61, (byte) 0x6c, (byte) 0x44, (byte) 0x61, (byte) 0x74, (byte) 0x61, (byte) 0x31, (byte) 0x74,
- (byte) 0x0, (byte) 0x15, (byte) 0x57, (byte) 0x72, (byte) 0x69, (byte) 0x74, (byte) 0x65, (byte) 0x53, (byte) 0x65, (byte) 0x72, (byte) 0x69, (byte) 0x61, (byte) 0x6c, (byte) 0x44, (byte) 0x61, (byte) 0x74, (byte) 0x61, (byte) 0x31, (byte) 0x2e, (byte) 0x6a, (byte) 0x61, (byte) 0x76, (byte) 0x61, (byte) 0x74, (byte) 0x0, (byte) 0x3, (byte) 0x72, (byte) 0x75, (byte) 0x6e, (byte) 0x73, (byte) 0x71, (byte) 0x0,
- (byte) 0x7e, (byte) 0x0, (byte) 0xd, (byte) 0x0, (byte) 0x0, (byte) 0x0, (byte) 0x24, (byte) 0x71, (byte) 0x0, (byte) 0x7e, (byte) 0x0, (byte) 0xf, (byte) 0x71, (byte) 0x0, (byte) 0x7e, (byte) 0x0, (byte) 0x10, (byte) 0x74, (byte) 0x0, (byte) 0x4, (byte) 0x6d, (byte) 0x61, (byte) 0x69, (byte) 0x6e, (byte) 0x73, (byte) 0x72, (byte) 0x0, (byte) 0x26, (byte) 0x6a, (byte) 0x61, (byte) 0x76, (byte) 0x61,
- (byte) 0x2e, (byte) 0x75, (byte) 0x74, (byte) 0x69, (byte) 0x6c, (byte) 0x2e, (byte) 0x43, (byte) 0x6f, (byte) 0x6c, (byte) 0x6c, (byte) 0x65, (byte) 0x63, (byte) 0x74, (byte) 0x69, (byte) 0x6f, (byte) 0x6e, (byte) 0x73, (byte) 0x24, (byte) 0x55, (byte) 0x6e, (byte) 0x6d, (byte) 0x6f, (byte) 0x64, (byte) 0x69, (byte) 0x66, (byte) 0x69, (byte) 0x61, (byte) 0x62, (byte) 0x6c, (byte) 0x65, (byte) 0x4c, (byte) 0x69,
- (byte) 0x73, (byte) 0x74, (byte) 0xfc, (byte) 0xf, (byte) 0x25, (byte) 0x31, (byte) 0xb5, (byte) 0xec, (byte) 0x8e, (byte) 0x10, (byte) 0x2, (byte) 0x0, (byte) 0x1, (byte) 0x4c, (byte) 0x0, (byte) 0x4, (byte) 0x6c, (byte) 0x69, (byte) 0x73, (byte) 0x74, (byte) 0x71, (byte) 0x0, (byte) 0x7e, (byte) 0x0, (byte) 0x8, (byte) 0x78, (byte) 0x72, (byte) 0x0, (byte) 0x2c, (byte) 0x6a, (byte) 0x61, (byte) 0x76,
- (byte) 0x61, (byte) 0x2e, (byte) 0x75, (byte) 0x74, (byte) 0x69, (byte) 0x6c, (byte) 0x2e, (byte) 0x43, (byte) 0x6f, (byte) 0x6c, (byte) 0x6c, (byte) 0x65, (byte) 0x63, (byte) 0x74, (byte) 0x69, (byte) 0x6f, (byte) 0x6e, (byte) 0x73, (byte) 0x24, (byte) 0x55, (byte) 0x6e, (byte) 0x6d, (byte) 0x6f, (byte) 0x64, (byte) 0x69, (byte) 0x66, (byte) 0x69, (byte) 0x61, (byte) 0x62, (byte) 0x6c, (byte) 0x65, (byte) 0x43,
- (byte) 0x6f, (byte) 0x6c, (byte) 0x6c, (byte) 0x65, (byte) 0x63, (byte) 0x74, (byte) 0x69, (byte) 0x6f, (byte) 0x6e, (byte) 0x19, (byte) 0x42, (byte) 0x0, (byte) 0x80, (byte) 0xcb, (byte) 0x5e, (byte) 0xf7, (byte) 0x1e, (byte) 0x2, (byte) 0x0, (byte) 0x1, (byte) 0x4c, (byte) 0x0, (byte) 0x1, (byte) 0x63, (byte) 0x74, (byte) 0x0, (byte) 0x16, (byte) 0x4c, (byte) 0x6a, (byte) 0x61, (byte) 0x76, (byte) 0x61,
- (byte) 0x2f, (byte) 0x75, (byte) 0x74, (byte) 0x69, (byte) 0x6c, (byte) 0x2f, (byte) 0x43, (byte) 0x6f, (byte) 0x6c, (byte) 0x6c, (byte) 0x65, (byte) 0x63, (byte) 0x74, (byte) 0x69, (byte) 0x6f, (byte) 0x6e, (byte) 0x3b, (byte) 0x78, (byte) 0x70, (byte) 0x73, (byte) 0x72, (byte) 0x0, (byte) 0x13, (byte) 0x6a, (byte) 0x61, (byte) 0x76, (byte) 0x61, (byte) 0x2e, (byte) 0x75, (byte) 0x74, (byte) 0x69, (byte) 0x6c,
- (byte) 0x2e, (byte) 0x41, (byte) 0x72, (byte) 0x72, (byte) 0x61, (byte) 0x79, (byte) 0x4c, (byte) 0x69, (byte) 0x73, (byte) 0x74, (byte) 0x78, (byte) 0x81, (byte) 0xd2, (byte) 0x1d, (byte) 0x99, (byte) 0xc7, (byte) 0x61, (byte) 0x9d, (byte) 0x3, (byte) 0x0, (byte) 0x1, (byte) 0x49, (byte) 0x0, (byte) 0x4, (byte) 0x73, (byte) 0x69, (byte) 0x7a, (byte) 0x65, (byte) 0x78, (byte) 0x70, (byte) 0x0, (byte) 0x0,
- (byte) 0x0, (byte) 0x0, (byte) 0x77, (byte) 0x4, (byte) 0x0, (byte) 0x0, (byte) 0x0, (byte) 0x0, (byte) 0x78, (byte) 0x71, (byte) 0x0, (byte) 0x7e, (byte) 0x0, (byte) 0x19, (byte) 0x78, (byte) 0x70
- };
-
- /**
- * Serialized TransactionRequiredException from JDK 8 with the following
- * values:
- * reason = "This was the error msg"
- * cause = null
- */
- public static byte[] TRE_DATA = {
- (byte) 0xac, (byte) 0xed, (byte) 0x0, (byte) 0x5, (byte) 0x73, (byte) 0x72, (byte) 0x0, (byte) 0x2e, (byte) 0x6a, (byte) 0x61, (byte) 0x76, (byte) 0x61, (byte) 0x78, (byte) 0x2e, (byte) 0x74, (byte) 0x72, (byte) 0x61, (byte) 0x6e, (byte) 0x73, (byte) 0x61, (byte) 0x63, (byte) 0x74, (byte) 0x69, (byte) 0x6f, (byte) 0x6e, (byte) 0x2e, (byte) 0x54, (byte) 0x72, (byte) 0x61, (byte) 0x6e, (byte) 0x73, (byte) 0x61,
- (byte) 0x63, (byte) 0x74, (byte) 0x69, (byte) 0x6f, (byte) 0x6e, (byte) 0x52, (byte) 0x65, (byte) 0x71, (byte) 0x75, (byte) 0x69, (byte) 0x72, (byte) 0x65, (byte) 0x64, (byte) 0x45, (byte) 0x78, (byte) 0x63, (byte) 0x65, (byte) 0x70, (byte) 0x74, (byte) 0x69, (byte) 0x6f, (byte) 0x6e, (byte) 0xe5, (byte) 0xa6, (byte) 0x15, (byte) 0x9f, (byte) 0x12, (byte) 0x65, (byte) 0xb5, (byte) 0xd9, (byte) 0x2, (byte) 0x0,
- (byte) 0x0, (byte) 0x78, (byte) 0x72, (byte) 0x0, (byte) 0x18, (byte) 0x6a, (byte) 0x61, (byte) 0x76, (byte) 0x61, (byte) 0x2e, (byte) 0x72, (byte) 0x6d, (byte) 0x69, (byte) 0x2e, (byte) 0x52, (byte) 0x65, (byte) 0x6d, (byte) 0x6f, (byte) 0x74, (byte) 0x65, (byte) 0x45, (byte) 0x78, (byte) 0x63, (byte) 0x65, (byte) 0x70, (byte) 0x74, (byte) 0x69, (byte) 0x6f, (byte) 0x6e, (byte) 0xb8, (byte) 0x8c, (byte) 0x9d,
- (byte) 0x4e, (byte) 0xde, (byte) 0xe4, (byte) 0x7a, (byte) 0x22, (byte) 0x2, (byte) 0x0, (byte) 0x1, (byte) 0x4c, (byte) 0x0, (byte) 0x6, (byte) 0x64, (byte) 0x65, (byte) 0x74, (byte) 0x61, (byte) 0x69, (byte) 0x6c, (byte) 0x74, (byte) 0x0, (byte) 0x15, (byte) 0x4c, (byte) 0x6a, (byte) 0x61, (byte) 0x76, (byte) 0x61, (byte) 0x2f, (byte) 0x6c, (byte) 0x61, (byte) 0x6e, (byte) 0x67, (byte) 0x2f, (byte) 0x54,
- (byte) 0x68, (byte) 0x72, (byte) 0x6f, (byte) 0x77, (byte) 0x61, (byte) 0x62, (byte) 0x6c, (byte) 0x65, (byte) 0x3b, (byte) 0x78, (byte) 0x72, (byte) 0x0, (byte) 0x13, (byte) 0x6a, (byte) 0x61, (byte) 0x76, (byte) 0x61, (byte) 0x2e, (byte) 0x69, (byte) 0x6f, (byte) 0x2e, (byte) 0x49, (byte) 0x4f, (byte) 0x45, (byte) 0x78, (byte) 0x63, (byte) 0x65, (byte) 0x70, (byte) 0x74, (byte) 0x69, (byte) 0x6f, (byte) 0x6e,
- (byte) 0x6c, (byte) 0x80, (byte) 0x73, (byte) 0x64, (byte) 0x65, (byte) 0x25, (byte) 0xf0, (byte) 0xab, (byte) 0x2, (byte) 0x0, (byte) 0x0, (byte) 0x78, (byte) 0x72, (byte) 0x0, (byte) 0x13, (byte) 0x6a, (byte) 0x61, (byte) 0x76, (byte) 0x61, (byte) 0x2e, (byte) 0x6c, (byte) 0x61, (byte) 0x6e, (byte) 0x67, (byte) 0x2e, (byte) 0x45, (byte) 0x78, (byte) 0x63, (byte) 0x65, (byte) 0x70, (byte) 0x74, (byte) 0x69,
- (byte) 0x6f, (byte) 0x6e, (byte) 0xd0, (byte) 0xfd, (byte) 0x1f, (byte) 0x3e, (byte) 0x1a, (byte) 0x3b, (byte) 0x1c, (byte) 0xc4, (byte) 0x2, (byte) 0x0, (byte) 0x0, (byte) 0x78, (byte) 0x72, (byte) 0x0, (byte) 0x13, (byte) 0x6a, (byte) 0x61, (byte) 0x76, (byte) 0x61, (byte) 0x2e, (byte) 0x6c, (byte) 0x61, (byte) 0x6e, (byte) 0x67, (byte) 0x2e, (byte) 0x54, (byte) 0x68, (byte) 0x72, (byte) 0x6f, (byte) 0x77,
- (byte) 0x61, (byte) 0x62, (byte) 0x6c, (byte) 0x65, (byte) 0xd5, (byte) 0xc6, (byte) 0x35, (byte) 0x27, (byte) 0x39, (byte) 0x77, (byte) 0xb8, (byte) 0xcb, (byte) 0x3, (byte) 0x0, (byte) 0x4, (byte) 0x4c, (byte) 0x0, (byte) 0x5, (byte) 0x63, (byte) 0x61, (byte) 0x75, (byte) 0x73, (byte) 0x65, (byte) 0x71, (byte) 0x0, (byte) 0x7e, (byte) 0x0, (byte) 0x2, (byte) 0x4c, (byte) 0x0, (byte) 0xd, (byte) 0x64,
- (byte) 0x65, (byte) 0x74, (byte) 0x61, (byte) 0x69, (byte) 0x6c, (byte) 0x4d, (byte) 0x65, (byte) 0x73, (byte) 0x73, (byte) 0x61, (byte) 0x67, (byte) 0x65, (byte) 0x74, (byte) 0x0, (byte) 0x12, (byte) 0x4c, (byte) 0x6a, (byte) 0x61, (byte) 0x76, (byte) 0x61, (byte) 0x2f, (byte) 0x6c, (byte) 0x61, (byte) 0x6e, (byte) 0x67, (byte) 0x2f, (byte) 0x53, (byte) 0x74, (byte) 0x72, (byte) 0x69, (byte) 0x6e, (byte) 0x67,
- (byte) 0x3b, (byte) 0x5b, (byte) 0x0, (byte) 0xa, (byte) 0x73, (byte) 0x74, (byte) 0x61, (byte) 0x63, (byte) 0x6b, (byte) 0x54, (byte) 0x72, (byte) 0x61, (byte) 0x63, (byte) 0x65, (byte) 0x74, (byte) 0x0, (byte) 0x1e, (byte) 0x5b, (byte) 0x4c, (byte) 0x6a, (byte) 0x61, (byte) 0x76, (byte) 0x61, (byte) 0x2f, (byte) 0x6c, (byte) 0x61, (byte) 0x6e, (byte) 0x67, (byte) 0x2f, (byte) 0x53, (byte) 0x74, (byte) 0x61,
- (byte) 0x63, (byte) 0x6b, (byte) 0x54, (byte) 0x72, (byte) 0x61, (byte) 0x63, (byte) 0x65, (byte) 0x45, (byte) 0x6c, (byte) 0x65, (byte) 0x6d, (byte) 0x65, (byte) 0x6e, (byte) 0x74, (byte) 0x3b, (byte) 0x4c, (byte) 0x0, (byte) 0x14, (byte) 0x73, (byte) 0x75, (byte) 0x70, (byte) 0x70, (byte) 0x72, (byte) 0x65, (byte) 0x73, (byte) 0x73, (byte) 0x65, (byte) 0x64, (byte) 0x45, (byte) 0x78, (byte) 0x63, (byte) 0x65,
- (byte) 0x70, (byte) 0x74, (byte) 0x69, (byte) 0x6f, (byte) 0x6e, (byte) 0x73, (byte) 0x74, (byte) 0x0, (byte) 0x10, (byte) 0x4c, (byte) 0x6a, (byte) 0x61, (byte) 0x76, (byte) 0x61, (byte) 0x2f, (byte) 0x75, (byte) 0x74, (byte) 0x69, (byte) 0x6c, (byte) 0x2f, (byte) 0x4c, (byte) 0x69, (byte) 0x73, (byte) 0x74, (byte) 0x3b, (byte) 0x78, (byte) 0x70, (byte) 0x70, (byte) 0x74, (byte) 0x0, (byte) 0x6, (byte) 0x72,
- (byte) 0x65, (byte) 0x61, (byte) 0x73, (byte) 0x6f, (byte) 0x6e, (byte) 0x75, (byte) 0x72, (byte) 0x0, (byte) 0x1e, (byte) 0x5b, (byte) 0x4c, (byte) 0x6a, (byte) 0x61, (byte) 0x76, (byte) 0x61, (byte) 0x2e, (byte) 0x6c, (byte) 0x61, (byte) 0x6e, (byte) 0x67, (byte) 0x2e, (byte) 0x53, (byte) 0x74, (byte) 0x61, (byte) 0x63, (byte) 0x6b, (byte) 0x54, (byte) 0x72, (byte) 0x61, (byte) 0x63, (byte) 0x65, (byte) 0x45,
- (byte) 0x6c, (byte) 0x65, (byte) 0x6d, (byte) 0x65, (byte) 0x6e, (byte) 0x74, (byte) 0x3b, (byte) 0x2, (byte) 0x46, (byte) 0x2a, (byte) 0x3c, (byte) 0x3c, (byte) 0xfd, (byte) 0x22, (byte) 0x39, (byte) 0x2, (byte) 0x0, (byte) 0x0, (byte) 0x78, (byte) 0x70, (byte) 0x0, (byte) 0x0, (byte) 0x0, (byte) 0x2, (byte) 0x73, (byte) 0x72, (byte) 0x0, (byte) 0x1b, (byte) 0x6a, (byte) 0x61, (byte) 0x76, (byte) 0x61,
- (byte) 0x2e, (byte) 0x6c, (byte) 0x61, (byte) 0x6e, (byte) 0x67, (byte) 0x2e, (byte) 0x53, (byte) 0x74, (byte) 0x61, (byte) 0x63, (byte) 0x6b, (byte) 0x54, (byte) 0x72, (byte) 0x61, (byte) 0x63, (byte) 0x65, (byte) 0x45, (byte) 0x6c, (byte) 0x65, (byte) 0x6d, (byte) 0x65, (byte) 0x6e, (byte) 0x74, (byte) 0x61, (byte) 0x9, (byte) 0xc5, (byte) 0x9a, (byte) 0x26, (byte) 0x36, (byte) 0xdd, (byte) 0x85, (byte) 0x2,
- (byte) 0x0, (byte) 0x4, (byte) 0x49, (byte) 0x0, (byte) 0xa, (byte) 0x6c, (byte) 0x69, (byte) 0x6e, (byte) 0x65, (byte) 0x4e, (byte) 0x75, (byte) 0x6d, (byte) 0x62, (byte) 0x65, (byte) 0x72, (byte) 0x4c, (byte) 0x0, (byte) 0xe, (byte) 0x64, (byte) 0x65, (byte) 0x63, (byte) 0x6c, (byte) 0x61, (byte) 0x72, (byte) 0x69, (byte) 0x6e, (byte) 0x67, (byte) 0x43, (byte) 0x6c, (byte) 0x61, (byte) 0x73, (byte) 0x73,
- (byte) 0x71, (byte) 0x0, (byte) 0x7e, (byte) 0x0, (byte) 0x6, (byte) 0x4c, (byte) 0x0, (byte) 0x8, (byte) 0x66, (byte) 0x69, (byte) 0x6c, (byte) 0x65, (byte) 0x4e, (byte) 0x61, (byte) 0x6d, (byte) 0x65, (byte) 0x71, (byte) 0x0, (byte) 0x7e, (byte) 0x0, (byte) 0x6, (byte) 0x4c, (byte) 0x0, (byte) 0xa, (byte) 0x6d, (byte) 0x65, (byte) 0x74, (byte) 0x68, (byte) 0x6f, (byte) 0x64, (byte) 0x4e, (byte) 0x61,
- (byte) 0x6d, (byte) 0x65, (byte) 0x71, (byte) 0x0, (byte) 0x7e, (byte) 0x0, (byte) 0x6, (byte) 0x78, (byte) 0x70, (byte) 0x0, (byte) 0x0, (byte) 0x0, (byte) 0x3c, (byte) 0x74, (byte) 0x0, (byte) 0x10, (byte) 0x57, (byte) 0x72, (byte) 0x69, (byte) 0x74, (byte) 0x65, (byte) 0x53, (byte) 0x65, (byte) 0x72, (byte) 0x69, (byte) 0x61, (byte) 0x6c, (byte) 0x44, (byte) 0x61, (byte) 0x74, (byte) 0x61, (byte) 0x31,
- (byte) 0x74, (byte) 0x0, (byte) 0x15, (byte) 0x57, (byte) 0x72, (byte) 0x69, (byte) 0x74, (byte) 0x65, (byte) 0x53, (byte) 0x65, (byte) 0x72, (byte) 0x69, (byte) 0x61, (byte) 0x6c, (byte) 0x44, (byte) 0x61, (byte) 0x74, (byte) 0x61, (byte) 0x31, (byte) 0x2e, (byte) 0x6a, (byte) 0x61, (byte) 0x76, (byte) 0x61, (byte) 0x74, (byte) 0x0, (byte) 0x3, (byte) 0x72, (byte) 0x75, (byte) 0x6e, (byte) 0x73, (byte) 0x71,
- (byte) 0x0, (byte) 0x7e, (byte) 0x0, (byte) 0xd, (byte) 0x0, (byte) 0x0, (byte) 0x0, (byte) 0x24, (byte) 0x71, (byte) 0x0, (byte) 0x7e, (byte) 0x0, (byte) 0xf, (byte) 0x71, (byte) 0x0, (byte) 0x7e, (byte) 0x0, (byte) 0x10, (byte) 0x74, (byte) 0x0, (byte) 0x4, (byte) 0x6d, (byte) 0x61, (byte) 0x69, (byte) 0x6e, (byte) 0x73, (byte) 0x72, (byte) 0x0, (byte) 0x26, (byte) 0x6a, (byte) 0x61, (byte) 0x76,
- (byte) 0x61, (byte) 0x2e, (byte) 0x75, (byte) 0x74, (byte) 0x69, (byte) 0x6c, (byte) 0x2e, (byte) 0x43, (byte) 0x6f, (byte) 0x6c, (byte) 0x6c, (byte) 0x65, (byte) 0x63, (byte) 0x74, (byte) 0x69, (byte) 0x6f, (byte) 0x6e, (byte) 0x73, (byte) 0x24, (byte) 0x55, (byte) 0x6e, (byte) 0x6d, (byte) 0x6f, (byte) 0x64, (byte) 0x69, (byte) 0x66, (byte) 0x69, (byte) 0x61, (byte) 0x62, (byte) 0x6c, (byte) 0x65, (byte) 0x4c,
- (byte) 0x69, (byte) 0x73, (byte) 0x74, (byte) 0xfc, (byte) 0xf, (byte) 0x25, (byte) 0x31, (byte) 0xb5, (byte) 0xec, (byte) 0x8e, (byte) 0x10, (byte) 0x2, (byte) 0x0, (byte) 0x1, (byte) 0x4c, (byte) 0x0, (byte) 0x4, (byte) 0x6c, (byte) 0x69, (byte) 0x73, (byte) 0x74, (byte) 0x71, (byte) 0x0, (byte) 0x7e, (byte) 0x0, (byte) 0x8, (byte) 0x78, (byte) 0x72, (byte) 0x0, (byte) 0x2c, (byte) 0x6a, (byte) 0x61,
- (byte) 0x76, (byte) 0x61, (byte) 0x2e, (byte) 0x75, (byte) 0x74, (byte) 0x69, (byte) 0x6c, (byte) 0x2e, (byte) 0x43, (byte) 0x6f, (byte) 0x6c, (byte) 0x6c, (byte) 0x65, (byte) 0x63, (byte) 0x74, (byte) 0x69, (byte) 0x6f, (byte) 0x6e, (byte) 0x73, (byte) 0x24, (byte) 0x55, (byte) 0x6e, (byte) 0x6d, (byte) 0x6f, (byte) 0x64, (byte) 0x69, (byte) 0x66, (byte) 0x69, (byte) 0x61, (byte) 0x62, (byte) 0x6c, (byte) 0x65,
- (byte) 0x43, (byte) 0x6f, (byte) 0x6c, (byte) 0x6c, (byte) 0x65, (byte) 0x63, (byte) 0x74, (byte) 0x69, (byte) 0x6f, (byte) 0x6e, (byte) 0x19, (byte) 0x42, (byte) 0x0, (byte) 0x80, (byte) 0xcb, (byte) 0x5e, (byte) 0xf7, (byte) 0x1e, (byte) 0x2, (byte) 0x0, (byte) 0x1, (byte) 0x4c, (byte) 0x0, (byte) 0x1, (byte) 0x63, (byte) 0x74, (byte) 0x0, (byte) 0x16, (byte) 0x4c, (byte) 0x6a, (byte) 0x61, (byte) 0x76,
- (byte) 0x61, (byte) 0x2f, (byte) 0x75, (byte) 0x74, (byte) 0x69, (byte) 0x6c, (byte) 0x2f, (byte) 0x43, (byte) 0x6f, (byte) 0x6c, (byte) 0x6c, (byte) 0x65, (byte) 0x63, (byte) 0x74, (byte) 0x69, (byte) 0x6f, (byte) 0x6e, (byte) 0x3b, (byte) 0x78, (byte) 0x70, (byte) 0x73, (byte) 0x72, (byte) 0x0, (byte) 0x13, (byte) 0x6a, (byte) 0x61, (byte) 0x76, (byte) 0x61, (byte) 0x2e, (byte) 0x75, (byte) 0x74, (byte) 0x69,
- (byte) 0x6c, (byte) 0x2e, (byte) 0x41, (byte) 0x72, (byte) 0x72, (byte) 0x61, (byte) 0x79, (byte) 0x4c, (byte) 0x69, (byte) 0x73, (byte) 0x74, (byte) 0x78, (byte) 0x81, (byte) 0xd2, (byte) 0x1d, (byte) 0x99, (byte) 0xc7, (byte) 0x61, (byte) 0x9d, (byte) 0x3, (byte) 0x0, (byte) 0x1, (byte) 0x49, (byte) 0x0, (byte) 0x4, (byte) 0x73, (byte) 0x69, (byte) 0x7a, (byte) 0x65, (byte) 0x78, (byte) 0x70, (byte) 0x0,
- (byte) 0x0, (byte) 0x0, (byte) 0x0, (byte) 0x77, (byte) 0x4, (byte) 0x0, (byte) 0x0, (byte) 0x0, (byte) 0x0, (byte) 0x78, (byte) 0x71, (byte) 0x0, (byte) 0x7e, (byte) 0x0, (byte) 0x19, (byte) 0x78, (byte) 0x70
- };
-
- /**
- * Serialized TransactionRolledbackException from JDK 8 with the
- * following values:
- * reason = "This was the error msg"
- * cause = null
- */
- public static byte[] TRBE_DATA = {
- (byte) 0xac, (byte) 0xed, (byte) 0x0, (byte) 0x5, (byte) 0x73, (byte) 0x72, (byte) 0x0, (byte) 0x30, (byte) 0x6a, (byte) 0x61, (byte) 0x76, (byte) 0x61, (byte) 0x78, (byte) 0x2e, (byte) 0x74, (byte) 0x72, (byte) 0x61, (byte) 0x6e, (byte) 0x73, (byte) 0x61, (byte) 0x63, (byte) 0x74, (byte) 0x69, (byte) 0x6f, (byte) 0x6e, (byte) 0x2e, (byte) 0x54, (byte) 0x72, (byte) 0x61, (byte) 0x6e, (byte) 0x73, (byte) 0x61,
- (byte) 0x63, (byte) 0x74, (byte) 0x69, (byte) 0x6f, (byte) 0x6e, (byte) 0x52, (byte) 0x6f, (byte) 0x6c, (byte) 0x6c, (byte) 0x65, (byte) 0x64, (byte) 0x62, (byte) 0x61, (byte) 0x63, (byte) 0x6b, (byte) 0x45, (byte) 0x78, (byte) 0x63, (byte) 0x65, (byte) 0x70, (byte) 0x74, (byte) 0x69, (byte) 0x6f, (byte) 0x6e, (byte) 0xd4, (byte) 0x62, (byte) 0x89, (byte) 0xbe, (byte) 0x47, (byte) 0x2, (byte) 0xe7, (byte) 0xdf,
- (byte) 0x2, (byte) 0x0, (byte) 0x0, (byte) 0x78, (byte) 0x72, (byte) 0x0, (byte) 0x18, (byte) 0x6a, (byte) 0x61, (byte) 0x76, (byte) 0x61, (byte) 0x2e, (byte) 0x72, (byte) 0x6d, (byte) 0x69, (byte) 0x2e, (byte) 0x52, (byte) 0x65, (byte) 0x6d, (byte) 0x6f, (byte) 0x74, (byte) 0x65, (byte) 0x45, (byte) 0x78, (byte) 0x63, (byte) 0x65, (byte) 0x70, (byte) 0x74, (byte) 0x69, (byte) 0x6f, (byte) 0x6e, (byte) 0xb8,
- (byte) 0x8c, (byte) 0x9d, (byte) 0x4e, (byte) 0xde, (byte) 0xe4, (byte) 0x7a, (byte) 0x22, (byte) 0x2, (byte) 0x0, (byte) 0x1, (byte) 0x4c, (byte) 0x0, (byte) 0x6, (byte) 0x64, (byte) 0x65, (byte) 0x74, (byte) 0x61, (byte) 0x69, (byte) 0x6c, (byte) 0x74, (byte) 0x0, (byte) 0x15, (byte) 0x4c, (byte) 0x6a, (byte) 0x61, (byte) 0x76, (byte) 0x61, (byte) 0x2f, (byte) 0x6c, (byte) 0x61, (byte) 0x6e, (byte) 0x67,
- (byte) 0x2f, (byte) 0x54, (byte) 0x68, (byte) 0x72, (byte) 0x6f, (byte) 0x77, (byte) 0x61, (byte) 0x62, (byte) 0x6c, (byte) 0x65, (byte) 0x3b, (byte) 0x78, (byte) 0x72, (byte) 0x0, (byte) 0x13, (byte) 0x6a, (byte) 0x61, (byte) 0x76, (byte) 0x61, (byte) 0x2e, (byte) 0x69, (byte) 0x6f, (byte) 0x2e, (byte) 0x49, (byte) 0x4f, (byte) 0x45, (byte) 0x78, (byte) 0x63, (byte) 0x65, (byte) 0x70, (byte) 0x74, (byte) 0x69,
- (byte) 0x6f, (byte) 0x6e, (byte) 0x6c, (byte) 0x80, (byte) 0x73, (byte) 0x64, (byte) 0x65, (byte) 0x25, (byte) 0xf0, (byte) 0xab, (byte) 0x2, (byte) 0x0, (byte) 0x0, (byte) 0x78, (byte) 0x72, (byte) 0x0, (byte) 0x13, (byte) 0x6a, (byte) 0x61, (byte) 0x76, (byte) 0x61, (byte) 0x2e, (byte) 0x6c, (byte) 0x61, (byte) 0x6e, (byte) 0x67, (byte) 0x2e, (byte) 0x45, (byte) 0x78, (byte) 0x63, (byte) 0x65, (byte) 0x70,
- (byte) 0x74, (byte) 0x69, (byte) 0x6f, (byte) 0x6e, (byte) 0xd0, (byte) 0xfd, (byte) 0x1f, (byte) 0x3e, (byte) 0x1a, (byte) 0x3b, (byte) 0x1c, (byte) 0xc4, (byte) 0x2, (byte) 0x0, (byte) 0x0, (byte) 0x78, (byte) 0x72, (byte) 0x0, (byte) 0x13, (byte) 0x6a, (byte) 0x61, (byte) 0x76, (byte) 0x61, (byte) 0x2e, (byte) 0x6c, (byte) 0x61, (byte) 0x6e, (byte) 0x67, (byte) 0x2e, (byte) 0x54, (byte) 0x68, (byte) 0x72,
- (byte) 0x6f, (byte) 0x77, (byte) 0x61, (byte) 0x62, (byte) 0x6c, (byte) 0x65, (byte) 0xd5, (byte) 0xc6, (byte) 0x35, (byte) 0x27, (byte) 0x39, (byte) 0x77, (byte) 0xb8, (byte) 0xcb, (byte) 0x3, (byte) 0x0, (byte) 0x4, (byte) 0x4c, (byte) 0x0, (byte) 0x5, (byte) 0x63, (byte) 0x61, (byte) 0x75, (byte) 0x73, (byte) 0x65, (byte) 0x71, (byte) 0x0, (byte) 0x7e, (byte) 0x0, (byte) 0x2, (byte) 0x4c, (byte) 0x0,
- (byte) 0xd, (byte) 0x64, (byte) 0x65, (byte) 0x74, (byte) 0x61, (byte) 0x69, (byte) 0x6c, (byte) 0x4d, (byte) 0x65, (byte) 0x73, (byte) 0x73, (byte) 0x61, (byte) 0x67, (byte) 0x65, (byte) 0x74, (byte) 0x0, (byte) 0x12, (byte) 0x4c, (byte) 0x6a, (byte) 0x61, (byte) 0x76, (byte) 0x61, (byte) 0x2f, (byte) 0x6c, (byte) 0x61, (byte) 0x6e, (byte) 0x67, (byte) 0x2f, (byte) 0x53, (byte) 0x74, (byte) 0x72, (byte) 0x69,
- (byte) 0x6e, (byte) 0x67, (byte) 0x3b, (byte) 0x5b, (byte) 0x0, (byte) 0xa, (byte) 0x73, (byte) 0x74, (byte) 0x61, (byte) 0x63, (byte) 0x6b, (byte) 0x54, (byte) 0x72, (byte) 0x61, (byte) 0x63, (byte) 0x65, (byte) 0x74, (byte) 0x0, (byte) 0x1e, (byte) 0x5b, (byte) 0x4c, (byte) 0x6a, (byte) 0x61, (byte) 0x76, (byte) 0x61, (byte) 0x2f, (byte) 0x6c, (byte) 0x61, (byte) 0x6e, (byte) 0x67, (byte) 0x2f, (byte) 0x53,
- (byte) 0x74, (byte) 0x61, (byte) 0x63, (byte) 0x6b, (byte) 0x54, (byte) 0x72, (byte) 0x61, (byte) 0x63, (byte) 0x65, (byte) 0x45, (byte) 0x6c, (byte) 0x65, (byte) 0x6d, (byte) 0x65, (byte) 0x6e, (byte) 0x74, (byte) 0x3b, (byte) 0x4c, (byte) 0x0, (byte) 0x14, (byte) 0x73, (byte) 0x75, (byte) 0x70, (byte) 0x70, (byte) 0x72, (byte) 0x65, (byte) 0x73, (byte) 0x73, (byte) 0x65, (byte) 0x64, (byte) 0x45, (byte) 0x78,
- (byte) 0x63, (byte) 0x65, (byte) 0x70, (byte) 0x74, (byte) 0x69, (byte) 0x6f, (byte) 0x6e, (byte) 0x73, (byte) 0x74, (byte) 0x0, (byte) 0x10, (byte) 0x4c, (byte) 0x6a, (byte) 0x61, (byte) 0x76, (byte) 0x61, (byte) 0x2f, (byte) 0x75, (byte) 0x74, (byte) 0x69, (byte) 0x6c, (byte) 0x2f, (byte) 0x4c, (byte) 0x69, (byte) 0x73, (byte) 0x74, (byte) 0x3b, (byte) 0x78, (byte) 0x70, (byte) 0x70, (byte) 0x74, (byte) 0x0,
- (byte) 0x6, (byte) 0x72, (byte) 0x65, (byte) 0x61, (byte) 0x73, (byte) 0x6f, (byte) 0x6e, (byte) 0x75, (byte) 0x72, (byte) 0x0, (byte) 0x1e, (byte) 0x5b, (byte) 0x4c, (byte) 0x6a, (byte) 0x61, (byte) 0x76, (byte) 0x61, (byte) 0x2e, (byte) 0x6c, (byte) 0x61, (byte) 0x6e, (byte) 0x67, (byte) 0x2e, (byte) 0x53, (byte) 0x74, (byte) 0x61, (byte) 0x63, (byte) 0x6b, (byte) 0x54, (byte) 0x72, (byte) 0x61, (byte) 0x63,
- (byte) 0x65, (byte) 0x45, (byte) 0x6c, (byte) 0x65, (byte) 0x6d, (byte) 0x65, (byte) 0x6e, (byte) 0x74, (byte) 0x3b, (byte) 0x2, (byte) 0x46, (byte) 0x2a, (byte) 0x3c, (byte) 0x3c, (byte) 0xfd, (byte) 0x22, (byte) 0x39, (byte) 0x2, (byte) 0x0, (byte) 0x0, (byte) 0x78, (byte) 0x70, (byte) 0x0, (byte) 0x0, (byte) 0x0, (byte) 0x2, (byte) 0x73, (byte) 0x72, (byte) 0x0, (byte) 0x1b, (byte) 0x6a, (byte) 0x61,
- (byte) 0x76, (byte) 0x61, (byte) 0x2e, (byte) 0x6c, (byte) 0x61, (byte) 0x6e, (byte) 0x67, (byte) 0x2e, (byte) 0x53, (byte) 0x74, (byte) 0x61, (byte) 0x63, (byte) 0x6b, (byte) 0x54, (byte) 0x72, (byte) 0x61, (byte) 0x63, (byte) 0x65, (byte) 0x45, (byte) 0x6c, (byte) 0x65, (byte) 0x6d, (byte) 0x65, (byte) 0x6e, (byte) 0x74, (byte) 0x61, (byte) 0x9, (byte) 0xc5, (byte) 0x9a, (byte) 0x26, (byte) 0x36, (byte) 0xdd,
- (byte) 0x85, (byte) 0x2, (byte) 0x0, (byte) 0x4, (byte) 0x49, (byte) 0x0, (byte) 0xa, (byte) 0x6c, (byte) 0x69, (byte) 0x6e, (byte) 0x65, (byte) 0x4e, (byte) 0x75, (byte) 0x6d, (byte) 0x62, (byte) 0x65, (byte) 0x72, (byte) 0x4c, (byte) 0x0, (byte) 0xe, (byte) 0x64, (byte) 0x65, (byte) 0x63, (byte) 0x6c, (byte) 0x61, (byte) 0x72, (byte) 0x69, (byte) 0x6e, (byte) 0x67, (byte) 0x43, (byte) 0x6c, (byte) 0x61,
- (byte) 0x73, (byte) 0x73, (byte) 0x71, (byte) 0x0, (byte) 0x7e, (byte) 0x0, (byte) 0x6, (byte) 0x4c, (byte) 0x0, (byte) 0x8, (byte) 0x66, (byte) 0x69, (byte) 0x6c, (byte) 0x65, (byte) 0x4e, (byte) 0x61, (byte) 0x6d, (byte) 0x65, (byte) 0x71, (byte) 0x0, (byte) 0x7e, (byte) 0x0, (byte) 0x6, (byte) 0x4c, (byte) 0x0, (byte) 0xa, (byte) 0x6d, (byte) 0x65, (byte) 0x74, (byte) 0x68, (byte) 0x6f, (byte) 0x64,
- (byte) 0x4e, (byte) 0x61, (byte) 0x6d, (byte) 0x65, (byte) 0x71, (byte) 0x0, (byte) 0x7e, (byte) 0x0, (byte) 0x6, (byte) 0x78, (byte) 0x70, (byte) 0x0, (byte) 0x0, (byte) 0x0, (byte) 0x3e, (byte) 0x74, (byte) 0x0, (byte) 0x10, (byte) 0x57, (byte) 0x72, (byte) 0x69, (byte) 0x74, (byte) 0x65, (byte) 0x53, (byte) 0x65, (byte) 0x72, (byte) 0x69, (byte) 0x61, (byte) 0x6c, (byte) 0x44, (byte) 0x61, (byte) 0x74,
- (byte) 0x61, (byte) 0x31, (byte) 0x74, (byte) 0x0, (byte) 0x15, (byte) 0x57, (byte) 0x72, (byte) 0x69, (byte) 0x74, (byte) 0x65, (byte) 0x53, (byte) 0x65, (byte) 0x72, (byte) 0x69, (byte) 0x61, (byte) 0x6c, (byte) 0x44, (byte) 0x61, (byte) 0x74, (byte) 0x61, (byte) 0x31, (byte) 0x2e, (byte) 0x6a, (byte) 0x61, (byte) 0x76, (byte) 0x61, (byte) 0x74, (byte) 0x0, (byte) 0x3, (byte) 0x72, (byte) 0x75, (byte) 0x6e,
- (byte) 0x73, (byte) 0x71, (byte) 0x0, (byte) 0x7e, (byte) 0x0, (byte) 0xd, (byte) 0x0, (byte) 0x0, (byte) 0x0, (byte) 0x24, (byte) 0x71, (byte) 0x0, (byte) 0x7e, (byte) 0x0, (byte) 0xf, (byte) 0x71, (byte) 0x0, (byte) 0x7e, (byte) 0x0, (byte) 0x10, (byte) 0x74, (byte) 0x0, (byte) 0x4, (byte) 0x6d, (byte) 0x61, (byte) 0x69, (byte) 0x6e, (byte) 0x73, (byte) 0x72, (byte) 0x0, (byte) 0x26, (byte) 0x6a,
- (byte) 0x61, (byte) 0x76, (byte) 0x61, (byte) 0x2e, (byte) 0x75, (byte) 0x74, (byte) 0x69, (byte) 0x6c, (byte) 0x2e, (byte) 0x43, (byte) 0x6f, (byte) 0x6c, (byte) 0x6c, (byte) 0x65, (byte) 0x63, (byte) 0x74, (byte) 0x69, (byte) 0x6f, (byte) 0x6e, (byte) 0x73, (byte) 0x24, (byte) 0x55, (byte) 0x6e, (byte) 0x6d, (byte) 0x6f, (byte) 0x64, (byte) 0x69, (byte) 0x66, (byte) 0x69, (byte) 0x61, (byte) 0x62, (byte) 0x6c,
- (byte) 0x65, (byte) 0x4c, (byte) 0x69, (byte) 0x73, (byte) 0x74, (byte) 0xfc, (byte) 0xf, (byte) 0x25, (byte) 0x31, (byte) 0xb5, (byte) 0xec, (byte) 0x8e, (byte) 0x10, (byte) 0x2, (byte) 0x0, (byte) 0x1, (byte) 0x4c, (byte) 0x0, (byte) 0x4, (byte) 0x6c, (byte) 0x69, (byte) 0x73, (byte) 0x74, (byte) 0x71, (byte) 0x0, (byte) 0x7e, (byte) 0x0, (byte) 0x8, (byte) 0x78, (byte) 0x72, (byte) 0x0, (byte) 0x2c,
- (byte) 0x6a, (byte) 0x61, (byte) 0x76, (byte) 0x61, (byte) 0x2e, (byte) 0x75, (byte) 0x74, (byte) 0x69, (byte) 0x6c, (byte) 0x2e, (byte) 0x43, (byte) 0x6f, (byte) 0x6c, (byte) 0x6c, (byte) 0x65, (byte) 0x63, (byte) 0x74, (byte) 0x69, (byte) 0x6f, (byte) 0x6e, (byte) 0x73, (byte) 0x24, (byte) 0x55, (byte) 0x6e, (byte) 0x6d, (byte) 0x6f, (byte) 0x64, (byte) 0x69, (byte) 0x66, (byte) 0x69, (byte) 0x61, (byte) 0x62,
- (byte) 0x6c, (byte) 0x65, (byte) 0x43, (byte) 0x6f, (byte) 0x6c, (byte) 0x6c, (byte) 0x65, (byte) 0x63, (byte) 0x74, (byte) 0x69, (byte) 0x6f, (byte) 0x6e, (byte) 0x19, (byte) 0x42, (byte) 0x0, (byte) 0x80, (byte) 0xcb, (byte) 0x5e, (byte) 0xf7, (byte) 0x1e, (byte) 0x2, (byte) 0x0, (byte) 0x1, (byte) 0x4c, (byte) 0x0, (byte) 0x1, (byte) 0x63, (byte) 0x74, (byte) 0x0, (byte) 0x16, (byte) 0x4c, (byte) 0x6a,
- (byte) 0x61, (byte) 0x76, (byte) 0x61, (byte) 0x2f, (byte) 0x75, (byte) 0x74, (byte) 0x69, (byte) 0x6c, (byte) 0x2f, (byte) 0x43, (byte) 0x6f, (byte) 0x6c, (byte) 0x6c, (byte) 0x65, (byte) 0x63, (byte) 0x74, (byte) 0x69, (byte) 0x6f, (byte) 0x6e, (byte) 0x3b, (byte) 0x78, (byte) 0x70, (byte) 0x73, (byte) 0x72, (byte) 0x0, (byte) 0x13, (byte) 0x6a, (byte) 0x61, (byte) 0x76, (byte) 0x61, (byte) 0x2e, (byte) 0x75,
- (byte) 0x74, (byte) 0x69, (byte) 0x6c, (byte) 0x2e, (byte) 0x41, (byte) 0x72, (byte) 0x72, (byte) 0x61, (byte) 0x79, (byte) 0x4c, (byte) 0x69, (byte) 0x73, (byte) 0x74, (byte) 0x78, (byte) 0x81, (byte) 0xd2, (byte) 0x1d, (byte) 0x99, (byte) 0xc7, (byte) 0x61, (byte) 0x9d, (byte) 0x3, (byte) 0x0, (byte) 0x1, (byte) 0x49, (byte) 0x0, (byte) 0x4, (byte) 0x73, (byte) 0x69, (byte) 0x7a, (byte) 0x65, (byte) 0x78,
- (byte) 0x70, (byte) 0x0, (byte) 0x0, (byte) 0x0, (byte) 0x0, (byte) 0x77, (byte) 0x4, (byte) 0x0, (byte) 0x0, (byte) 0x0, (byte) 0x0, (byte) 0x78, (byte) 0x71, (byte) 0x0, (byte) 0x7e, (byte) 0x0, (byte) 0x19, (byte) 0x78, (byte) 0x70
- };
-
-}
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/test/jdk/javax/transaction/xa/testng/Driver.java Fri Mar 02 21:00:12 2018 +0100
@@ -0,0 +1,33 @@
+/*
+ * Copyright (c) 2016, 2018, Oracle and/or its affiliates. All rights reserved.
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * This code is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU General Public License version 2 only, as
+ * published by the Free Software Foundation.
+ *
+ * This code is distributed in the hope that it will be useful, but WITHOUT
+ * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
+ * version 2 for more details (a copy is included in the LICENSE file that
+ * accompanied this code).
+ *
+ * You should have received a copy of the GNU General Public License version
+ * 2 along with this work; if not, write to the Free Software Foundation,
+ * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
+ *
+ * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
+ * or visit www.oracle.com if you need additional information or have any
+ * questions.
+ */
+
+/**
+ * @test
+ * @modules java.transaction.xa
+ * @compile
+ * test/transaction/XAExceptionTests.java
+ * util/SerializedTransactionExceptions.java
+ * @run testng/othervm Driver
+ */
+public class Driver extends test.transaction.XAExceptionTests {
+}
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/test/jdk/javax/transaction/xa/testng/JavaSqlModuleDriver.java Fri Mar 02 21:00:12 2018 +0100
@@ -0,0 +1,33 @@
+/*
+ * Copyright (c) 2018, Oracle and/or its affiliates. All rights reserved.
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * This code is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU General Public License version 2 only, as
+ * published by the Free Software Foundation.
+ *
+ * This code is distributed in the hope that it will be useful, but WITHOUT
+ * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
+ * version 2 for more details (a copy is included in the LICENSE file that
+ * accompanied this code).
+ *
+ * You should have received a copy of the GNU General Public License version
+ * 2 along with this work; if not, write to the Free Software Foundation,
+ * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
+ *
+ * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
+ * or visit www.oracle.com if you need additional information or have any
+ * questions.
+ */
+
+/**
+ * @test
+ * @modules java.sql
+ * @compile
+ * test/transaction/XAExceptionTests.java
+ * util/SerializedTransactionExceptions.java
+ * @run testng/othervm JavaSqlModuleDriver
+ */
+public class JavaSqlModuleDriver extends test.transaction.XAExceptionTests {
+}
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/test/jdk/javax/transaction/xa/testng/test/transaction/XAExceptionTests.java Fri Mar 02 21:00:12 2018 +0100
@@ -0,0 +1,98 @@
+/*
+ * Copyright (c) 2015, Oracle and/or its affiliates. All rights reserved.
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * This code is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU General Public License version 2 only, as
+ * published by the Free Software Foundation.
+ *
+ * This code is distributed in the hope that it will be useful, but WITHOUT
+ * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
+ * version 2 for more details (a copy is included in the LICENSE file that
+ * accompanied this code).
+ *
+ * You should have received a copy of the GNU General Public License version
+ * 2 along with this work; if not, write to the Free Software Foundation,
+ * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
+ *
+ * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
+ * or visit www.oracle.com if you need additional information or have any
+ * questions.
+ */
+package test.transaction;
+
+import java.io.ByteArrayInputStream;
+import java.io.ObjectInputStream;
+import javax.transaction.xa.XAException;
+import static org.testng.Assert.*;
+import org.testng.annotations.Test;
+import util.SerializedTransactionExceptions;
+
+public class XAExceptionTests {
+
+ protected final String reason = "reason";
+
+ /**
+ * Create XAException with no-arg constructor
+ */
+ @Test
+ public void test1() {
+ XAException ex = new XAException();
+ assertTrue(ex.getMessage() == null
+ && ex.getCause() == null
+ && ex.errorCode == 0);
+ }
+
+ /**
+ * Create XAException with message
+ */
+ @Test
+ public void test2() {
+ XAException ex = new XAException(reason);
+ assertTrue(ex.getMessage().equals(reason)
+ && ex.getCause() == null
+ && ex.errorCode == 0);
+ }
+
+ /**
+ * De-Serialize a XAException from JDBC 4.0 and make sure you can read it
+ * back properly
+ */
+ @Test
+ public void test3() throws Exception {
+
+ ObjectInputStream ois = new ObjectInputStream(
+ new ByteArrayInputStream(SerializedTransactionExceptions.XAE_DATA));
+ XAException ex = (XAException) ois.readObject();
+ assertTrue(reason.equals(ex.getMessage())
+ && ex.getCause() == null
+ && ex.errorCode == 0);
+ }
+
+ /**
+ * Create TransactionRolledbackException specifying an error code
+ */
+ @Test
+ public void test4() {
+ int error = 21;
+ XAException ex = new XAException(error);
+ assertTrue(ex.getMessage() == null
+ && ex.getCause() == null
+ && ex.errorCode == error);
+ }
+
+ /**
+ * Create TransactionRolledbackException specifying an error code
+ */
+ @Test
+ public void test5() {
+ int error = 21;
+ XAException ex = new XAException(error);
+ ex.errorCode = error;
+ assertTrue(ex.getMessage() == null
+ && ex.getCause() == null
+ && ex.errorCode == error);
+ }
+
+}
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/test/jdk/javax/transaction/xa/testng/util/SerializedTransactionExceptions.java Fri Mar 02 21:00:12 2018 +0100
@@ -0,0 +1,167 @@
+/*
+ * Copyright (c) 2015, Oracle and/or its affiliates. All rights reserved.
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * This code is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU General Public License version 2 only, as
+ * published by the Free Software Foundation.
+ *
+ * This code is distributed in the hope that it will be useful, but WITHOUT
+ * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
+ * version 2 for more details (a copy is included in the LICENSE file that
+ * accompanied this code).
+ *
+ * You should have received a copy of the GNU General Public License version
+ * 2 along with this work; if not, write to the Free Software Foundation,
+ * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
+ *
+ * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
+ * or visit www.oracle.com if you need additional information or have any
+ * questions.
+ */
+package util;
+
+public class SerializedTransactionExceptions {
+
+ /**
+ * Serialized XAException from JDK 8 with the following values:
+ * reason = "This was the error msg"
+ * cause = null
+ */
+ public static byte[] XAE_DATA = {
+ (byte) 0xac, (byte) 0xed, (byte) 0x0, (byte) 0x5, (byte) 0x73, (byte) 0x72, (byte) 0x0, (byte) 0x20, (byte) 0x6a, (byte) 0x61, (byte) 0x76, (byte) 0x61, (byte) 0x78, (byte) 0x2e, (byte) 0x74, (byte) 0x72, (byte) 0x61, (byte) 0x6e, (byte) 0x73, (byte) 0x61, (byte) 0x63, (byte) 0x74, (byte) 0x69, (byte) 0x6f, (byte) 0x6e, (byte) 0x2e, (byte) 0x78, (byte) 0x61, (byte) 0x2e, (byte) 0x58, (byte) 0x41, (byte) 0x45,
+ (byte) 0x78, (byte) 0x63, (byte) 0x65, (byte) 0x70, (byte) 0x74, (byte) 0x69, (byte) 0x6f, (byte) 0x6e, (byte) 0x8d, (byte) 0x83, (byte) 0x3c, (byte) 0xc2, (byte) 0xda, (byte) 0xf, (byte) 0x2a, (byte) 0x59, (byte) 0x2, (byte) 0x0, (byte) 0x1, (byte) 0x49, (byte) 0x0, (byte) 0x9, (byte) 0x65, (byte) 0x72, (byte) 0x72, (byte) 0x6f, (byte) 0x72, (byte) 0x43, (byte) 0x6f, (byte) 0x64, (byte) 0x65, (byte) 0x78,
+ (byte) 0x72, (byte) 0x0, (byte) 0x13, (byte) 0x6a, (byte) 0x61, (byte) 0x76, (byte) 0x61, (byte) 0x2e, (byte) 0x6c, (byte) 0x61, (byte) 0x6e, (byte) 0x67, (byte) 0x2e, (byte) 0x45, (byte) 0x78, (byte) 0x63, (byte) 0x65, (byte) 0x70, (byte) 0x74, (byte) 0x69, (byte) 0x6f, (byte) 0x6e, (byte) 0xd0, (byte) 0xfd, (byte) 0x1f, (byte) 0x3e, (byte) 0x1a, (byte) 0x3b, (byte) 0x1c, (byte) 0xc4, (byte) 0x2, (byte) 0x0,
+ (byte) 0x0, (byte) 0x78, (byte) 0x72, (byte) 0x0, (byte) 0x13, (byte) 0x6a, (byte) 0x61, (byte) 0x76, (byte) 0x61, (byte) 0x2e, (byte) 0x6c, (byte) 0x61, (byte) 0x6e, (byte) 0x67, (byte) 0x2e, (byte) 0x54, (byte) 0x68, (byte) 0x72, (byte) 0x6f, (byte) 0x77, (byte) 0x61, (byte) 0x62, (byte) 0x6c, (byte) 0x65, (byte) 0xd5, (byte) 0xc6, (byte) 0x35, (byte) 0x27, (byte) 0x39, (byte) 0x77, (byte) 0xb8, (byte) 0xcb,
+ (byte) 0x3, (byte) 0x0, (byte) 0x4, (byte) 0x4c, (byte) 0x0, (byte) 0x5, (byte) 0x63, (byte) 0x61, (byte) 0x75, (byte) 0x73, (byte) 0x65, (byte) 0x74, (byte) 0x0, (byte) 0x15, (byte) 0x4c, (byte) 0x6a, (byte) 0x61, (byte) 0x76, (byte) 0x61, (byte) 0x2f, (byte) 0x6c, (byte) 0x61, (byte) 0x6e, (byte) 0x67, (byte) 0x2f, (byte) 0x54, (byte) 0x68, (byte) 0x72, (byte) 0x6f, (byte) 0x77, (byte) 0x61, (byte) 0x62,
+ (byte) 0x6c, (byte) 0x65, (byte) 0x3b, (byte) 0x4c, (byte) 0x0, (byte) 0xd, (byte) 0x64, (byte) 0x65, (byte) 0x74, (byte) 0x61, (byte) 0x69, (byte) 0x6c, (byte) 0x4d, (byte) 0x65, (byte) 0x73, (byte) 0x73, (byte) 0x61, (byte) 0x67, (byte) 0x65, (byte) 0x74, (byte) 0x0, (byte) 0x12, (byte) 0x4c, (byte) 0x6a, (byte) 0x61, (byte) 0x76, (byte) 0x61, (byte) 0x2f, (byte) 0x6c, (byte) 0x61, (byte) 0x6e, (byte) 0x67,
+ (byte) 0x2f, (byte) 0x53, (byte) 0x74, (byte) 0x72, (byte) 0x69, (byte) 0x6e, (byte) 0x67, (byte) 0x3b, (byte) 0x5b, (byte) 0x0, (byte) 0xa, (byte) 0x73, (byte) 0x74, (byte) 0x61, (byte) 0x63, (byte) 0x6b, (byte) 0x54, (byte) 0x72, (byte) 0x61, (byte) 0x63, (byte) 0x65, (byte) 0x74, (byte) 0x0, (byte) 0x1e, (byte) 0x5b, (byte) 0x4c, (byte) 0x6a, (byte) 0x61, (byte) 0x76, (byte) 0x61, (byte) 0x2f, (byte) 0x6c,
+ (byte) 0x61, (byte) 0x6e, (byte) 0x67, (byte) 0x2f, (byte) 0x53, (byte) 0x74, (byte) 0x61, (byte) 0x63, (byte) 0x6b, (byte) 0x54, (byte) 0x72, (byte) 0x61, (byte) 0x63, (byte) 0x65, (byte) 0x45, (byte) 0x6c, (byte) 0x65, (byte) 0x6d, (byte) 0x65, (byte) 0x6e, (byte) 0x74, (byte) 0x3b, (byte) 0x4c, (byte) 0x0, (byte) 0x14, (byte) 0x73, (byte) 0x75, (byte) 0x70, (byte) 0x70, (byte) 0x72, (byte) 0x65, (byte) 0x73,
+ (byte) 0x73, (byte) 0x65, (byte) 0x64, (byte) 0x45, (byte) 0x78, (byte) 0x63, (byte) 0x65, (byte) 0x70, (byte) 0x74, (byte) 0x69, (byte) 0x6f, (byte) 0x6e, (byte) 0x73, (byte) 0x74, (byte) 0x0, (byte) 0x10, (byte) 0x4c, (byte) 0x6a, (byte) 0x61, (byte) 0x76, (byte) 0x61, (byte) 0x2f, (byte) 0x75, (byte) 0x74, (byte) 0x69, (byte) 0x6c, (byte) 0x2f, (byte) 0x4c, (byte) 0x69, (byte) 0x73, (byte) 0x74, (byte) 0x3b,
+ (byte) 0x78, (byte) 0x70, (byte) 0x71, (byte) 0x0, (byte) 0x7e, (byte) 0x0, (byte) 0x7, (byte) 0x74, (byte) 0x0, (byte) 0x6, (byte) 0x72, (byte) 0x65, (byte) 0x61, (byte) 0x73, (byte) 0x6f, (byte) 0x6e, (byte) 0x75, (byte) 0x72, (byte) 0x0, (byte) 0x1e, (byte) 0x5b, (byte) 0x4c, (byte) 0x6a, (byte) 0x61, (byte) 0x76, (byte) 0x61, (byte) 0x2e, (byte) 0x6c, (byte) 0x61, (byte) 0x6e, (byte) 0x67, (byte) 0x2e,
+ (byte) 0x53, (byte) 0x74, (byte) 0x61, (byte) 0x63, (byte) 0x6b, (byte) 0x54, (byte) 0x72, (byte) 0x61, (byte) 0x63, (byte) 0x65, (byte) 0x45, (byte) 0x6c, (byte) 0x65, (byte) 0x6d, (byte) 0x65, (byte) 0x6e, (byte) 0x74, (byte) 0x3b, (byte) 0x2, (byte) 0x46, (byte) 0x2a, (byte) 0x3c, (byte) 0x3c, (byte) 0xfd, (byte) 0x22, (byte) 0x39, (byte) 0x2, (byte) 0x0, (byte) 0x0, (byte) 0x78, (byte) 0x70, (byte) 0x0,
+ (byte) 0x0, (byte) 0x0, (byte) 0x2, (byte) 0x73, (byte) 0x72, (byte) 0x0, (byte) 0x1b, (byte) 0x6a, (byte) 0x61, (byte) 0x76, (byte) 0x61, (byte) 0x2e, (byte) 0x6c, (byte) 0x61, (byte) 0x6e, (byte) 0x67, (byte) 0x2e, (byte) 0x53, (byte) 0x74, (byte) 0x61, (byte) 0x63, (byte) 0x6b, (byte) 0x54, (byte) 0x72, (byte) 0x61, (byte) 0x63, (byte) 0x65, (byte) 0x45, (byte) 0x6c, (byte) 0x65, (byte) 0x6d, (byte) 0x65,
+ (byte) 0x6e, (byte) 0x74, (byte) 0x61, (byte) 0x9, (byte) 0xc5, (byte) 0x9a, (byte) 0x26, (byte) 0x36, (byte) 0xdd, (byte) 0x85, (byte) 0x2, (byte) 0x0, (byte) 0x4, (byte) 0x49, (byte) 0x0, (byte) 0xa, (byte) 0x6c, (byte) 0x69, (byte) 0x6e, (byte) 0x65, (byte) 0x4e, (byte) 0x75, (byte) 0x6d, (byte) 0x62, (byte) 0x65, (byte) 0x72, (byte) 0x4c, (byte) 0x0, (byte) 0xe, (byte) 0x64, (byte) 0x65, (byte) 0x63,
+ (byte) 0x6c, (byte) 0x61, (byte) 0x72, (byte) 0x69, (byte) 0x6e, (byte) 0x67, (byte) 0x43, (byte) 0x6c, (byte) 0x61, (byte) 0x73, (byte) 0x73, (byte) 0x71, (byte) 0x0, (byte) 0x7e, (byte) 0x0, (byte) 0x4, (byte) 0x4c, (byte) 0x0, (byte) 0x8, (byte) 0x66, (byte) 0x69, (byte) 0x6c, (byte) 0x65, (byte) 0x4e, (byte) 0x61, (byte) 0x6d, (byte) 0x65, (byte) 0x71, (byte) 0x0, (byte) 0x7e, (byte) 0x0, (byte) 0x4,
+ (byte) 0x4c, (byte) 0x0, (byte) 0xa, (byte) 0x6d, (byte) 0x65, (byte) 0x74, (byte) 0x68, (byte) 0x6f, (byte) 0x64, (byte) 0x4e, (byte) 0x61, (byte) 0x6d, (byte) 0x65, (byte) 0x71, (byte) 0x0, (byte) 0x7e, (byte) 0x0, (byte) 0x4, (byte) 0x78, (byte) 0x70, (byte) 0x0, (byte) 0x0, (byte) 0x0, (byte) 0x39, (byte) 0x74, (byte) 0x0, (byte) 0x10, (byte) 0x57, (byte) 0x72, (byte) 0x69, (byte) 0x74, (byte) 0x65,
+ (byte) 0x53, (byte) 0x65, (byte) 0x72, (byte) 0x69, (byte) 0x61, (byte) 0x6c, (byte) 0x44, (byte) 0x61, (byte) 0x74, (byte) 0x61, (byte) 0x31, (byte) 0x74, (byte) 0x0, (byte) 0x15, (byte) 0x57, (byte) 0x72, (byte) 0x69, (byte) 0x74, (byte) 0x65, (byte) 0x53, (byte) 0x65, (byte) 0x72, (byte) 0x69, (byte) 0x61, (byte) 0x6c, (byte) 0x44, (byte) 0x61, (byte) 0x74, (byte) 0x61, (byte) 0x31, (byte) 0x2e, (byte) 0x6a,
+ (byte) 0x61, (byte) 0x76, (byte) 0x61, (byte) 0x74, (byte) 0x0, (byte) 0x3, (byte) 0x72, (byte) 0x75, (byte) 0x6e, (byte) 0x73, (byte) 0x71, (byte) 0x0, (byte) 0x7e, (byte) 0x0, (byte) 0xb, (byte) 0x0, (byte) 0x0, (byte) 0x0, (byte) 0x24, (byte) 0x71, (byte) 0x0, (byte) 0x7e, (byte) 0x0, (byte) 0xd, (byte) 0x71, (byte) 0x0, (byte) 0x7e, (byte) 0x0, (byte) 0xe, (byte) 0x74, (byte) 0x0, (byte) 0x4,
+ (byte) 0x6d, (byte) 0x61, (byte) 0x69, (byte) 0x6e, (byte) 0x73, (byte) 0x72, (byte) 0x0, (byte) 0x26, (byte) 0x6a, (byte) 0x61, (byte) 0x76, (byte) 0x61, (byte) 0x2e, (byte) 0x75, (byte) 0x74, (byte) 0x69, (byte) 0x6c, (byte) 0x2e, (byte) 0x43, (byte) 0x6f, (byte) 0x6c, (byte) 0x6c, (byte) 0x65, (byte) 0x63, (byte) 0x74, (byte) 0x69, (byte) 0x6f, (byte) 0x6e, (byte) 0x73, (byte) 0x24, (byte) 0x55, (byte) 0x6e,
+ (byte) 0x6d, (byte) 0x6f, (byte) 0x64, (byte) 0x69, (byte) 0x66, (byte) 0x69, (byte) 0x61, (byte) 0x62, (byte) 0x6c, (byte) 0x65, (byte) 0x4c, (byte) 0x69, (byte) 0x73, (byte) 0x74, (byte) 0xfc, (byte) 0xf, (byte) 0x25, (byte) 0x31, (byte) 0xb5, (byte) 0xec, (byte) 0x8e, (byte) 0x10, (byte) 0x2, (byte) 0x0, (byte) 0x1, (byte) 0x4c, (byte) 0x0, (byte) 0x4, (byte) 0x6c, (byte) 0x69, (byte) 0x73, (byte) 0x74,
+ (byte) 0x71, (byte) 0x0, (byte) 0x7e, (byte) 0x0, (byte) 0x6, (byte) 0x78, (byte) 0x72, (byte) 0x0, (byte) 0x2c, (byte) 0x6a, (byte) 0x61, (byte) 0x76, (byte) 0x61, (byte) 0x2e, (byte) 0x75, (byte) 0x74, (byte) 0x69, (byte) 0x6c, (byte) 0x2e, (byte) 0x43, (byte) 0x6f, (byte) 0x6c, (byte) 0x6c, (byte) 0x65, (byte) 0x63, (byte) 0x74, (byte) 0x69, (byte) 0x6f, (byte) 0x6e, (byte) 0x73, (byte) 0x24, (byte) 0x55,
+ (byte) 0x6e, (byte) 0x6d, (byte) 0x6f, (byte) 0x64, (byte) 0x69, (byte) 0x66, (byte) 0x69, (byte) 0x61, (byte) 0x62, (byte) 0x6c, (byte) 0x65, (byte) 0x43, (byte) 0x6f, (byte) 0x6c, (byte) 0x6c, (byte) 0x65, (byte) 0x63, (byte) 0x74, (byte) 0x69, (byte) 0x6f, (byte) 0x6e, (byte) 0x19, (byte) 0x42, (byte) 0x0, (byte) 0x80, (byte) 0xcb, (byte) 0x5e, (byte) 0xf7, (byte) 0x1e, (byte) 0x2, (byte) 0x0, (byte) 0x1,
+ (byte) 0x4c, (byte) 0x0, (byte) 0x1, (byte) 0x63, (byte) 0x74, (byte) 0x0, (byte) 0x16, (byte) 0x4c, (byte) 0x6a, (byte) 0x61, (byte) 0x76, (byte) 0x61, (byte) 0x2f, (byte) 0x75, (byte) 0x74, (byte) 0x69, (byte) 0x6c, (byte) 0x2f, (byte) 0x43, (byte) 0x6f, (byte) 0x6c, (byte) 0x6c, (byte) 0x65, (byte) 0x63, (byte) 0x74, (byte) 0x69, (byte) 0x6f, (byte) 0x6e, (byte) 0x3b, (byte) 0x78, (byte) 0x70, (byte) 0x73,
+ (byte) 0x72, (byte) 0x0, (byte) 0x13, (byte) 0x6a, (byte) 0x61, (byte) 0x76, (byte) 0x61, (byte) 0x2e, (byte) 0x75, (byte) 0x74, (byte) 0x69, (byte) 0x6c, (byte) 0x2e, (byte) 0x41, (byte) 0x72, (byte) 0x72, (byte) 0x61, (byte) 0x79, (byte) 0x4c, (byte) 0x69, (byte) 0x73, (byte) 0x74, (byte) 0x78, (byte) 0x81, (byte) 0xd2, (byte) 0x1d, (byte) 0x99, (byte) 0xc7, (byte) 0x61, (byte) 0x9d, (byte) 0x3, (byte) 0x0,
+ (byte) 0x1, (byte) 0x49, (byte) 0x0, (byte) 0x4, (byte) 0x73, (byte) 0x69, (byte) 0x7a, (byte) 0x65, (byte) 0x78, (byte) 0x70, (byte) 0x0, (byte) 0x0, (byte) 0x0, (byte) 0x0, (byte) 0x77, (byte) 0x4, (byte) 0x0, (byte) 0x0, (byte) 0x0, (byte) 0x0, (byte) 0x78, (byte) 0x71, (byte) 0x0, (byte) 0x7e, (byte) 0x0, (byte) 0x17, (byte) 0x78, (byte) 0x0, (byte) 0x0, (byte) 0x0, (byte) 0x0
+ };
+
+ /**
+ * Serialized InvalidTransactionException from JDK 8 with the following
+ * values:
+ * reason = "This was the error msg"
+ * cause = null
+ */
+ public static byte[] ITE_DATA = {
+ (byte) 0xac, (byte) 0xed, (byte) 0x0, (byte) 0x5, (byte) 0x73, (byte) 0x72, (byte) 0x0, (byte) 0x2d, (byte) 0x6a, (byte) 0x61, (byte) 0x76, (byte) 0x61, (byte) 0x78, (byte) 0x2e, (byte) 0x74, (byte) 0x72, (byte) 0x61, (byte) 0x6e, (byte) 0x73, (byte) 0x61, (byte) 0x63, (byte) 0x74, (byte) 0x69, (byte) 0x6f, (byte) 0x6e, (byte) 0x2e, (byte) 0x49, (byte) 0x6e, (byte) 0x76, (byte) 0x61, (byte) 0x6c, (byte) 0x69,
+ (byte) 0x64, (byte) 0x54, (byte) 0x72, (byte) 0x61, (byte) 0x6e, (byte) 0x73, (byte) 0x61, (byte) 0x63, (byte) 0x74, (byte) 0x69, (byte) 0x6f, (byte) 0x6e, (byte) 0x45, (byte) 0x78, (byte) 0x63, (byte) 0x65, (byte) 0x70, (byte) 0x74, (byte) 0x69, (byte) 0x6f, (byte) 0x6e, (byte) 0x31, (byte) 0xec, (byte) 0x3f, (byte) 0xae, (byte) 0x54, (byte) 0x8e, (byte) 0xdb, (byte) 0x68, (byte) 0x2, (byte) 0x0, (byte) 0x0,
+ (byte) 0x78, (byte) 0x72, (byte) 0x0, (byte) 0x18, (byte) 0x6a, (byte) 0x61, (byte) 0x76, (byte) 0x61, (byte) 0x2e, (byte) 0x72, (byte) 0x6d, (byte) 0x69, (byte) 0x2e, (byte) 0x52, (byte) 0x65, (byte) 0x6d, (byte) 0x6f, (byte) 0x74, (byte) 0x65, (byte) 0x45, (byte) 0x78, (byte) 0x63, (byte) 0x65, (byte) 0x70, (byte) 0x74, (byte) 0x69, (byte) 0x6f, (byte) 0x6e, (byte) 0xb8, (byte) 0x8c, (byte) 0x9d, (byte) 0x4e,
+ (byte) 0xde, (byte) 0xe4, (byte) 0x7a, (byte) 0x22, (byte) 0x2, (byte) 0x0, (byte) 0x1, (byte) 0x4c, (byte) 0x0, (byte) 0x6, (byte) 0x64, (byte) 0x65, (byte) 0x74, (byte) 0x61, (byte) 0x69, (byte) 0x6c, (byte) 0x74, (byte) 0x0, (byte) 0x15, (byte) 0x4c, (byte) 0x6a, (byte) 0x61, (byte) 0x76, (byte) 0x61, (byte) 0x2f, (byte) 0x6c, (byte) 0x61, (byte) 0x6e, (byte) 0x67, (byte) 0x2f, (byte) 0x54, (byte) 0x68,
+ (byte) 0x72, (byte) 0x6f, (byte) 0x77, (byte) 0x61, (byte) 0x62, (byte) 0x6c, (byte) 0x65, (byte) 0x3b, (byte) 0x78, (byte) 0x72, (byte) 0x0, (byte) 0x13, (byte) 0x6a, (byte) 0x61, (byte) 0x76, (byte) 0x61, (byte) 0x2e, (byte) 0x69, (byte) 0x6f, (byte) 0x2e, (byte) 0x49, (byte) 0x4f, (byte) 0x45, (byte) 0x78, (byte) 0x63, (byte) 0x65, (byte) 0x70, (byte) 0x74, (byte) 0x69, (byte) 0x6f, (byte) 0x6e, (byte) 0x6c,
+ (byte) 0x80, (byte) 0x73, (byte) 0x64, (byte) 0x65, (byte) 0x25, (byte) 0xf0, (byte) 0xab, (byte) 0x2, (byte) 0x0, (byte) 0x0, (byte) 0x78, (byte) 0x72, (byte) 0x0, (byte) 0x13, (byte) 0x6a, (byte) 0x61, (byte) 0x76, (byte) 0x61, (byte) 0x2e, (byte) 0x6c, (byte) 0x61, (byte) 0x6e, (byte) 0x67, (byte) 0x2e, (byte) 0x45, (byte) 0x78, (byte) 0x63, (byte) 0x65, (byte) 0x70, (byte) 0x74, (byte) 0x69, (byte) 0x6f,
+ (byte) 0x6e, (byte) 0xd0, (byte) 0xfd, (byte) 0x1f, (byte) 0x3e, (byte) 0x1a, (byte) 0x3b, (byte) 0x1c, (byte) 0xc4, (byte) 0x2, (byte) 0x0, (byte) 0x0, (byte) 0x78, (byte) 0x72, (byte) 0x0, (byte) 0x13, (byte) 0x6a, (byte) 0x61, (byte) 0x76, (byte) 0x61, (byte) 0x2e, (byte) 0x6c, (byte) 0x61, (byte) 0x6e, (byte) 0x67, (byte) 0x2e, (byte) 0x54, (byte) 0x68, (byte) 0x72, (byte) 0x6f, (byte) 0x77, (byte) 0x61,
+ (byte) 0x62, (byte) 0x6c, (byte) 0x65, (byte) 0xd5, (byte) 0xc6, (byte) 0x35, (byte) 0x27, (byte) 0x39, (byte) 0x77, (byte) 0xb8, (byte) 0xcb, (byte) 0x3, (byte) 0x0, (byte) 0x4, (byte) 0x4c, (byte) 0x0, (byte) 0x5, (byte) 0x63, (byte) 0x61, (byte) 0x75, (byte) 0x73, (byte) 0x65, (byte) 0x71, (byte) 0x0, (byte) 0x7e, (byte) 0x0, (byte) 0x2, (byte) 0x4c, (byte) 0x0, (byte) 0xd, (byte) 0x64, (byte) 0x65,
+ (byte) 0x74, (byte) 0x61, (byte) 0x69, (byte) 0x6c, (byte) 0x4d, (byte) 0x65, (byte) 0x73, (byte) 0x73, (byte) 0x61, (byte) 0x67, (byte) 0x65, (byte) 0x74, (byte) 0x0, (byte) 0x12, (byte) 0x4c, (byte) 0x6a, (byte) 0x61, (byte) 0x76, (byte) 0x61, (byte) 0x2f, (byte) 0x6c, (byte) 0x61, (byte) 0x6e, (byte) 0x67, (byte) 0x2f, (byte) 0x53, (byte) 0x74, (byte) 0x72, (byte) 0x69, (byte) 0x6e, (byte) 0x67, (byte) 0x3b,
+ (byte) 0x5b, (byte) 0x0, (byte) 0xa, (byte) 0x73, (byte) 0x74, (byte) 0x61, (byte) 0x63, (byte) 0x6b, (byte) 0x54, (byte) 0x72, (byte) 0x61, (byte) 0x63, (byte) 0x65, (byte) 0x74, (byte) 0x0, (byte) 0x1e, (byte) 0x5b, (byte) 0x4c, (byte) 0x6a, (byte) 0x61, (byte) 0x76, (byte) 0x61, (byte) 0x2f, (byte) 0x6c, (byte) 0x61, (byte) 0x6e, (byte) 0x67, (byte) 0x2f, (byte) 0x53, (byte) 0x74, (byte) 0x61, (byte) 0x63,
+ (byte) 0x6b, (byte) 0x54, (byte) 0x72, (byte) 0x61, (byte) 0x63, (byte) 0x65, (byte) 0x45, (byte) 0x6c, (byte) 0x65, (byte) 0x6d, (byte) 0x65, (byte) 0x6e, (byte) 0x74, (byte) 0x3b, (byte) 0x4c, (byte) 0x0, (byte) 0x14, (byte) 0x73, (byte) 0x75, (byte) 0x70, (byte) 0x70, (byte) 0x72, (byte) 0x65, (byte) 0x73, (byte) 0x73, (byte) 0x65, (byte) 0x64, (byte) 0x45, (byte) 0x78, (byte) 0x63, (byte) 0x65, (byte) 0x70,
+ (byte) 0x74, (byte) 0x69, (byte) 0x6f, (byte) 0x6e, (byte) 0x73, (byte) 0x74, (byte) 0x0, (byte) 0x10, (byte) 0x4c, (byte) 0x6a, (byte) 0x61, (byte) 0x76, (byte) 0x61, (byte) 0x2f, (byte) 0x75, (byte) 0x74, (byte) 0x69, (byte) 0x6c, (byte) 0x2f, (byte) 0x4c, (byte) 0x69, (byte) 0x73, (byte) 0x74, (byte) 0x3b, (byte) 0x78, (byte) 0x70, (byte) 0x70, (byte) 0x74, (byte) 0x0, (byte) 0x6, (byte) 0x72, (byte) 0x65,
+ (byte) 0x61, (byte) 0x73, (byte) 0x6f, (byte) 0x6e, (byte) 0x75, (byte) 0x72, (byte) 0x0, (byte) 0x1e, (byte) 0x5b, (byte) 0x4c, (byte) 0x6a, (byte) 0x61, (byte) 0x76, (byte) 0x61, (byte) 0x2e, (byte) 0x6c, (byte) 0x61, (byte) 0x6e, (byte) 0x67, (byte) 0x2e, (byte) 0x53, (byte) 0x74, (byte) 0x61, (byte) 0x63, (byte) 0x6b, (byte) 0x54, (byte) 0x72, (byte) 0x61, (byte) 0x63, (byte) 0x65, (byte) 0x45, (byte) 0x6c,
+ (byte) 0x65, (byte) 0x6d, (byte) 0x65, (byte) 0x6e, (byte) 0x74, (byte) 0x3b, (byte) 0x2, (byte) 0x46, (byte) 0x2a, (byte) 0x3c, (byte) 0x3c, (byte) 0xfd, (byte) 0x22, (byte) 0x39, (byte) 0x2, (byte) 0x0, (byte) 0x0, (byte) 0x78, (byte) 0x70, (byte) 0x0, (byte) 0x0, (byte) 0x0, (byte) 0x2, (byte) 0x73, (byte) 0x72, (byte) 0x0, (byte) 0x1b, (byte) 0x6a, (byte) 0x61, (byte) 0x76, (byte) 0x61, (byte) 0x2e,
+ (byte) 0x6c, (byte) 0x61, (byte) 0x6e, (byte) 0x67, (byte) 0x2e, (byte) 0x53, (byte) 0x74, (byte) 0x61, (byte) 0x63, (byte) 0x6b, (byte) 0x54, (byte) 0x72, (byte) 0x61, (byte) 0x63, (byte) 0x65, (byte) 0x45, (byte) 0x6c, (byte) 0x65, (byte) 0x6d, (byte) 0x65, (byte) 0x6e, (byte) 0x74, (byte) 0x61, (byte) 0x9, (byte) 0xc5, (byte) 0x9a, (byte) 0x26, (byte) 0x36, (byte) 0xdd, (byte) 0x85, (byte) 0x2, (byte) 0x0,
+ (byte) 0x4, (byte) 0x49, (byte) 0x0, (byte) 0xa, (byte) 0x6c, (byte) 0x69, (byte) 0x6e, (byte) 0x65, (byte) 0x4e, (byte) 0x75, (byte) 0x6d, (byte) 0x62, (byte) 0x65, (byte) 0x72, (byte) 0x4c, (byte) 0x0, (byte) 0xe, (byte) 0x64, (byte) 0x65, (byte) 0x63, (byte) 0x6c, (byte) 0x61, (byte) 0x72, (byte) 0x69, (byte) 0x6e, (byte) 0x67, (byte) 0x43, (byte) 0x6c, (byte) 0x61, (byte) 0x73, (byte) 0x73, (byte) 0x71,
+ (byte) 0x0, (byte) 0x7e, (byte) 0x0, (byte) 0x6, (byte) 0x4c, (byte) 0x0, (byte) 0x8, (byte) 0x66, (byte) 0x69, (byte) 0x6c, (byte) 0x65, (byte) 0x4e, (byte) 0x61, (byte) 0x6d, (byte) 0x65, (byte) 0x71, (byte) 0x0, (byte) 0x7e, (byte) 0x0, (byte) 0x6, (byte) 0x4c, (byte) 0x0, (byte) 0xa, (byte) 0x6d, (byte) 0x65, (byte) 0x74, (byte) 0x68, (byte) 0x6f, (byte) 0x64, (byte) 0x4e, (byte) 0x61, (byte) 0x6d,
+ (byte) 0x65, (byte) 0x71, (byte) 0x0, (byte) 0x7e, (byte) 0x0, (byte) 0x6, (byte) 0x78, (byte) 0x70, (byte) 0x0, (byte) 0x0, (byte) 0x0, (byte) 0x3a, (byte) 0x74, (byte) 0x0, (byte) 0x10, (byte) 0x57, (byte) 0x72, (byte) 0x69, (byte) 0x74, (byte) 0x65, (byte) 0x53, (byte) 0x65, (byte) 0x72, (byte) 0x69, (byte) 0x61, (byte) 0x6c, (byte) 0x44, (byte) 0x61, (byte) 0x74, (byte) 0x61, (byte) 0x31, (byte) 0x74,
+ (byte) 0x0, (byte) 0x15, (byte) 0x57, (byte) 0x72, (byte) 0x69, (byte) 0x74, (byte) 0x65, (byte) 0x53, (byte) 0x65, (byte) 0x72, (byte) 0x69, (byte) 0x61, (byte) 0x6c, (byte) 0x44, (byte) 0x61, (byte) 0x74, (byte) 0x61, (byte) 0x31, (byte) 0x2e, (byte) 0x6a, (byte) 0x61, (byte) 0x76, (byte) 0x61, (byte) 0x74, (byte) 0x0, (byte) 0x3, (byte) 0x72, (byte) 0x75, (byte) 0x6e, (byte) 0x73, (byte) 0x71, (byte) 0x0,
+ (byte) 0x7e, (byte) 0x0, (byte) 0xd, (byte) 0x0, (byte) 0x0, (byte) 0x0, (byte) 0x24, (byte) 0x71, (byte) 0x0, (byte) 0x7e, (byte) 0x0, (byte) 0xf, (byte) 0x71, (byte) 0x0, (byte) 0x7e, (byte) 0x0, (byte) 0x10, (byte) 0x74, (byte) 0x0, (byte) 0x4, (byte) 0x6d, (byte) 0x61, (byte) 0x69, (byte) 0x6e, (byte) 0x73, (byte) 0x72, (byte) 0x0, (byte) 0x26, (byte) 0x6a, (byte) 0x61, (byte) 0x76, (byte) 0x61,
+ (byte) 0x2e, (byte) 0x75, (byte) 0x74, (byte) 0x69, (byte) 0x6c, (byte) 0x2e, (byte) 0x43, (byte) 0x6f, (byte) 0x6c, (byte) 0x6c, (byte) 0x65, (byte) 0x63, (byte) 0x74, (byte) 0x69, (byte) 0x6f, (byte) 0x6e, (byte) 0x73, (byte) 0x24, (byte) 0x55, (byte) 0x6e, (byte) 0x6d, (byte) 0x6f, (byte) 0x64, (byte) 0x69, (byte) 0x66, (byte) 0x69, (byte) 0x61, (byte) 0x62, (byte) 0x6c, (byte) 0x65, (byte) 0x4c, (byte) 0x69,
+ (byte) 0x73, (byte) 0x74, (byte) 0xfc, (byte) 0xf, (byte) 0x25, (byte) 0x31, (byte) 0xb5, (byte) 0xec, (byte) 0x8e, (byte) 0x10, (byte) 0x2, (byte) 0x0, (byte) 0x1, (byte) 0x4c, (byte) 0x0, (byte) 0x4, (byte) 0x6c, (byte) 0x69, (byte) 0x73, (byte) 0x74, (byte) 0x71, (byte) 0x0, (byte) 0x7e, (byte) 0x0, (byte) 0x8, (byte) 0x78, (byte) 0x72, (byte) 0x0, (byte) 0x2c, (byte) 0x6a, (byte) 0x61, (byte) 0x76,
+ (byte) 0x61, (byte) 0x2e, (byte) 0x75, (byte) 0x74, (byte) 0x69, (byte) 0x6c, (byte) 0x2e, (byte) 0x43, (byte) 0x6f, (byte) 0x6c, (byte) 0x6c, (byte) 0x65, (byte) 0x63, (byte) 0x74, (byte) 0x69, (byte) 0x6f, (byte) 0x6e, (byte) 0x73, (byte) 0x24, (byte) 0x55, (byte) 0x6e, (byte) 0x6d, (byte) 0x6f, (byte) 0x64, (byte) 0x69, (byte) 0x66, (byte) 0x69, (byte) 0x61, (byte) 0x62, (byte) 0x6c, (byte) 0x65, (byte) 0x43,
+ (byte) 0x6f, (byte) 0x6c, (byte) 0x6c, (byte) 0x65, (byte) 0x63, (byte) 0x74, (byte) 0x69, (byte) 0x6f, (byte) 0x6e, (byte) 0x19, (byte) 0x42, (byte) 0x0, (byte) 0x80, (byte) 0xcb, (byte) 0x5e, (byte) 0xf7, (byte) 0x1e, (byte) 0x2, (byte) 0x0, (byte) 0x1, (byte) 0x4c, (byte) 0x0, (byte) 0x1, (byte) 0x63, (byte) 0x74, (byte) 0x0, (byte) 0x16, (byte) 0x4c, (byte) 0x6a, (byte) 0x61, (byte) 0x76, (byte) 0x61,
+ (byte) 0x2f, (byte) 0x75, (byte) 0x74, (byte) 0x69, (byte) 0x6c, (byte) 0x2f, (byte) 0x43, (byte) 0x6f, (byte) 0x6c, (byte) 0x6c, (byte) 0x65, (byte) 0x63, (byte) 0x74, (byte) 0x69, (byte) 0x6f, (byte) 0x6e, (byte) 0x3b, (byte) 0x78, (byte) 0x70, (byte) 0x73, (byte) 0x72, (byte) 0x0, (byte) 0x13, (byte) 0x6a, (byte) 0x61, (byte) 0x76, (byte) 0x61, (byte) 0x2e, (byte) 0x75, (byte) 0x74, (byte) 0x69, (byte) 0x6c,
+ (byte) 0x2e, (byte) 0x41, (byte) 0x72, (byte) 0x72, (byte) 0x61, (byte) 0x79, (byte) 0x4c, (byte) 0x69, (byte) 0x73, (byte) 0x74, (byte) 0x78, (byte) 0x81, (byte) 0xd2, (byte) 0x1d, (byte) 0x99, (byte) 0xc7, (byte) 0x61, (byte) 0x9d, (byte) 0x3, (byte) 0x0, (byte) 0x1, (byte) 0x49, (byte) 0x0, (byte) 0x4, (byte) 0x73, (byte) 0x69, (byte) 0x7a, (byte) 0x65, (byte) 0x78, (byte) 0x70, (byte) 0x0, (byte) 0x0,
+ (byte) 0x0, (byte) 0x0, (byte) 0x77, (byte) 0x4, (byte) 0x0, (byte) 0x0, (byte) 0x0, (byte) 0x0, (byte) 0x78, (byte) 0x71, (byte) 0x0, (byte) 0x7e, (byte) 0x0, (byte) 0x19, (byte) 0x78, (byte) 0x70
+ };
+
+ /**
+ * Serialized TransactionRequiredException from JDK 8 with the following
+ * values:
+ * reason = "This was the error msg"
+ * cause = null
+ */
+ public static byte[] TRE_DATA = {
+ (byte) 0xac, (byte) 0xed, (byte) 0x0, (byte) 0x5, (byte) 0x73, (byte) 0x72, (byte) 0x0, (byte) 0x2e, (byte) 0x6a, (byte) 0x61, (byte) 0x76, (byte) 0x61, (byte) 0x78, (byte) 0x2e, (byte) 0x74, (byte) 0x72, (byte) 0x61, (byte) 0x6e, (byte) 0x73, (byte) 0x61, (byte) 0x63, (byte) 0x74, (byte) 0x69, (byte) 0x6f, (byte) 0x6e, (byte) 0x2e, (byte) 0x54, (byte) 0x72, (byte) 0x61, (byte) 0x6e, (byte) 0x73, (byte) 0x61,
+ (byte) 0x63, (byte) 0x74, (byte) 0x69, (byte) 0x6f, (byte) 0x6e, (byte) 0x52, (byte) 0x65, (byte) 0x71, (byte) 0x75, (byte) 0x69, (byte) 0x72, (byte) 0x65, (byte) 0x64, (byte) 0x45, (byte) 0x78, (byte) 0x63, (byte) 0x65, (byte) 0x70, (byte) 0x74, (byte) 0x69, (byte) 0x6f, (byte) 0x6e, (byte) 0xe5, (byte) 0xa6, (byte) 0x15, (byte) 0x9f, (byte) 0x12, (byte) 0x65, (byte) 0xb5, (byte) 0xd9, (byte) 0x2, (byte) 0x0,
+ (byte) 0x0, (byte) 0x78, (byte) 0x72, (byte) 0x0, (byte) 0x18, (byte) 0x6a, (byte) 0x61, (byte) 0x76, (byte) 0x61, (byte) 0x2e, (byte) 0x72, (byte) 0x6d, (byte) 0x69, (byte) 0x2e, (byte) 0x52, (byte) 0x65, (byte) 0x6d, (byte) 0x6f, (byte) 0x74, (byte) 0x65, (byte) 0x45, (byte) 0x78, (byte) 0x63, (byte) 0x65, (byte) 0x70, (byte) 0x74, (byte) 0x69, (byte) 0x6f, (byte) 0x6e, (byte) 0xb8, (byte) 0x8c, (byte) 0x9d,
+ (byte) 0x4e, (byte) 0xde, (byte) 0xe4, (byte) 0x7a, (byte) 0x22, (byte) 0x2, (byte) 0x0, (byte) 0x1, (byte) 0x4c, (byte) 0x0, (byte) 0x6, (byte) 0x64, (byte) 0x65, (byte) 0x74, (byte) 0x61, (byte) 0x69, (byte) 0x6c, (byte) 0x74, (byte) 0x0, (byte) 0x15, (byte) 0x4c, (byte) 0x6a, (byte) 0x61, (byte) 0x76, (byte) 0x61, (byte) 0x2f, (byte) 0x6c, (byte) 0x61, (byte) 0x6e, (byte) 0x67, (byte) 0x2f, (byte) 0x54,
+ (byte) 0x68, (byte) 0x72, (byte) 0x6f, (byte) 0x77, (byte) 0x61, (byte) 0x62, (byte) 0x6c, (byte) 0x65, (byte) 0x3b, (byte) 0x78, (byte) 0x72, (byte) 0x0, (byte) 0x13, (byte) 0x6a, (byte) 0x61, (byte) 0x76, (byte) 0x61, (byte) 0x2e, (byte) 0x69, (byte) 0x6f, (byte) 0x2e, (byte) 0x49, (byte) 0x4f, (byte) 0x45, (byte) 0x78, (byte) 0x63, (byte) 0x65, (byte) 0x70, (byte) 0x74, (byte) 0x69, (byte) 0x6f, (byte) 0x6e,
+ (byte) 0x6c, (byte) 0x80, (byte) 0x73, (byte) 0x64, (byte) 0x65, (byte) 0x25, (byte) 0xf0, (byte) 0xab, (byte) 0x2, (byte) 0x0, (byte) 0x0, (byte) 0x78, (byte) 0x72, (byte) 0x0, (byte) 0x13, (byte) 0x6a, (byte) 0x61, (byte) 0x76, (byte) 0x61, (byte) 0x2e, (byte) 0x6c, (byte) 0x61, (byte) 0x6e, (byte) 0x67, (byte) 0x2e, (byte) 0x45, (byte) 0x78, (byte) 0x63, (byte) 0x65, (byte) 0x70, (byte) 0x74, (byte) 0x69,
+ (byte) 0x6f, (byte) 0x6e, (byte) 0xd0, (byte) 0xfd, (byte) 0x1f, (byte) 0x3e, (byte) 0x1a, (byte) 0x3b, (byte) 0x1c, (byte) 0xc4, (byte) 0x2, (byte) 0x0, (byte) 0x0, (byte) 0x78, (byte) 0x72, (byte) 0x0, (byte) 0x13, (byte) 0x6a, (byte) 0x61, (byte) 0x76, (byte) 0x61, (byte) 0x2e, (byte) 0x6c, (byte) 0x61, (byte) 0x6e, (byte) 0x67, (byte) 0x2e, (byte) 0x54, (byte) 0x68, (byte) 0x72, (byte) 0x6f, (byte) 0x77,
+ (byte) 0x61, (byte) 0x62, (byte) 0x6c, (byte) 0x65, (byte) 0xd5, (byte) 0xc6, (byte) 0x35, (byte) 0x27, (byte) 0x39, (byte) 0x77, (byte) 0xb8, (byte) 0xcb, (byte) 0x3, (byte) 0x0, (byte) 0x4, (byte) 0x4c, (byte) 0x0, (byte) 0x5, (byte) 0x63, (byte) 0x61, (byte) 0x75, (byte) 0x73, (byte) 0x65, (byte) 0x71, (byte) 0x0, (byte) 0x7e, (byte) 0x0, (byte) 0x2, (byte) 0x4c, (byte) 0x0, (byte) 0xd, (byte) 0x64,
+ (byte) 0x65, (byte) 0x74, (byte) 0x61, (byte) 0x69, (byte) 0x6c, (byte) 0x4d, (byte) 0x65, (byte) 0x73, (byte) 0x73, (byte) 0x61, (byte) 0x67, (byte) 0x65, (byte) 0x74, (byte) 0x0, (byte) 0x12, (byte) 0x4c, (byte) 0x6a, (byte) 0x61, (byte) 0x76, (byte) 0x61, (byte) 0x2f, (byte) 0x6c, (byte) 0x61, (byte) 0x6e, (byte) 0x67, (byte) 0x2f, (byte) 0x53, (byte) 0x74, (byte) 0x72, (byte) 0x69, (byte) 0x6e, (byte) 0x67,
+ (byte) 0x3b, (byte) 0x5b, (byte) 0x0, (byte) 0xa, (byte) 0x73, (byte) 0x74, (byte) 0x61, (byte) 0x63, (byte) 0x6b, (byte) 0x54, (byte) 0x72, (byte) 0x61, (byte) 0x63, (byte) 0x65, (byte) 0x74, (byte) 0x0, (byte) 0x1e, (byte) 0x5b, (byte) 0x4c, (byte) 0x6a, (byte) 0x61, (byte) 0x76, (byte) 0x61, (byte) 0x2f, (byte) 0x6c, (byte) 0x61, (byte) 0x6e, (byte) 0x67, (byte) 0x2f, (byte) 0x53, (byte) 0x74, (byte) 0x61,
+ (byte) 0x63, (byte) 0x6b, (byte) 0x54, (byte) 0x72, (byte) 0x61, (byte) 0x63, (byte) 0x65, (byte) 0x45, (byte) 0x6c, (byte) 0x65, (byte) 0x6d, (byte) 0x65, (byte) 0x6e, (byte) 0x74, (byte) 0x3b, (byte) 0x4c, (byte) 0x0, (byte) 0x14, (byte) 0x73, (byte) 0x75, (byte) 0x70, (byte) 0x70, (byte) 0x72, (byte) 0x65, (byte) 0x73, (byte) 0x73, (byte) 0x65, (byte) 0x64, (byte) 0x45, (byte) 0x78, (byte) 0x63, (byte) 0x65,
+ (byte) 0x70, (byte) 0x74, (byte) 0x69, (byte) 0x6f, (byte) 0x6e, (byte) 0x73, (byte) 0x74, (byte) 0x0, (byte) 0x10, (byte) 0x4c, (byte) 0x6a, (byte) 0x61, (byte) 0x76, (byte) 0x61, (byte) 0x2f, (byte) 0x75, (byte) 0x74, (byte) 0x69, (byte) 0x6c, (byte) 0x2f, (byte) 0x4c, (byte) 0x69, (byte) 0x73, (byte) 0x74, (byte) 0x3b, (byte) 0x78, (byte) 0x70, (byte) 0x70, (byte) 0x74, (byte) 0x0, (byte) 0x6, (byte) 0x72,
+ (byte) 0x65, (byte) 0x61, (byte) 0x73, (byte) 0x6f, (byte) 0x6e, (byte) 0x75, (byte) 0x72, (byte) 0x0, (byte) 0x1e, (byte) 0x5b, (byte) 0x4c, (byte) 0x6a, (byte) 0x61, (byte) 0x76, (byte) 0x61, (byte) 0x2e, (byte) 0x6c, (byte) 0x61, (byte) 0x6e, (byte) 0x67, (byte) 0x2e, (byte) 0x53, (byte) 0x74, (byte) 0x61, (byte) 0x63, (byte) 0x6b, (byte) 0x54, (byte) 0x72, (byte) 0x61, (byte) 0x63, (byte) 0x65, (byte) 0x45,
+ (byte) 0x6c, (byte) 0x65, (byte) 0x6d, (byte) 0x65, (byte) 0x6e, (byte) 0x74, (byte) 0x3b, (byte) 0x2, (byte) 0x46, (byte) 0x2a, (byte) 0x3c, (byte) 0x3c, (byte) 0xfd, (byte) 0x22, (byte) 0x39, (byte) 0x2, (byte) 0x0, (byte) 0x0, (byte) 0x78, (byte) 0x70, (byte) 0x0, (byte) 0x0, (byte) 0x0, (byte) 0x2, (byte) 0x73, (byte) 0x72, (byte) 0x0, (byte) 0x1b, (byte) 0x6a, (byte) 0x61, (byte) 0x76, (byte) 0x61,
+ (byte) 0x2e, (byte) 0x6c, (byte) 0x61, (byte) 0x6e, (byte) 0x67, (byte) 0x2e, (byte) 0x53, (byte) 0x74, (byte) 0x61, (byte) 0x63, (byte) 0x6b, (byte) 0x54, (byte) 0x72, (byte) 0x61, (byte) 0x63, (byte) 0x65, (byte) 0x45, (byte) 0x6c, (byte) 0x65, (byte) 0x6d, (byte) 0x65, (byte) 0x6e, (byte) 0x74, (byte) 0x61, (byte) 0x9, (byte) 0xc5, (byte) 0x9a, (byte) 0x26, (byte) 0x36, (byte) 0xdd, (byte) 0x85, (byte) 0x2,
+ (byte) 0x0, (byte) 0x4, (byte) 0x49, (byte) 0x0, (byte) 0xa, (byte) 0x6c, (byte) 0x69, (byte) 0x6e, (byte) 0x65, (byte) 0x4e, (byte) 0x75, (byte) 0x6d, (byte) 0x62, (byte) 0x65, (byte) 0x72, (byte) 0x4c, (byte) 0x0, (byte) 0xe, (byte) 0x64, (byte) 0x65, (byte) 0x63, (byte) 0x6c, (byte) 0x61, (byte) 0x72, (byte) 0x69, (byte) 0x6e, (byte) 0x67, (byte) 0x43, (byte) 0x6c, (byte) 0x61, (byte) 0x73, (byte) 0x73,
+ (byte) 0x71, (byte) 0x0, (byte) 0x7e, (byte) 0x0, (byte) 0x6, (byte) 0x4c, (byte) 0x0, (byte) 0x8, (byte) 0x66, (byte) 0x69, (byte) 0x6c, (byte) 0x65, (byte) 0x4e, (byte) 0x61, (byte) 0x6d, (byte) 0x65, (byte) 0x71, (byte) 0x0, (byte) 0x7e, (byte) 0x0, (byte) 0x6, (byte) 0x4c, (byte) 0x0, (byte) 0xa, (byte) 0x6d, (byte) 0x65, (byte) 0x74, (byte) 0x68, (byte) 0x6f, (byte) 0x64, (byte) 0x4e, (byte) 0x61,
+ (byte) 0x6d, (byte) 0x65, (byte) 0x71, (byte) 0x0, (byte) 0x7e, (byte) 0x0, (byte) 0x6, (byte) 0x78, (byte) 0x70, (byte) 0x0, (byte) 0x0, (byte) 0x0, (byte) 0x3c, (byte) 0x74, (byte) 0x0, (byte) 0x10, (byte) 0x57, (byte) 0x72, (byte) 0x69, (byte) 0x74, (byte) 0x65, (byte) 0x53, (byte) 0x65, (byte) 0x72, (byte) 0x69, (byte) 0x61, (byte) 0x6c, (byte) 0x44, (byte) 0x61, (byte) 0x74, (byte) 0x61, (byte) 0x31,
+ (byte) 0x74, (byte) 0x0, (byte) 0x15, (byte) 0x57, (byte) 0x72, (byte) 0x69, (byte) 0x74, (byte) 0x65, (byte) 0x53, (byte) 0x65, (byte) 0x72, (byte) 0x69, (byte) 0x61, (byte) 0x6c, (byte) 0x44, (byte) 0x61, (byte) 0x74, (byte) 0x61, (byte) 0x31, (byte) 0x2e, (byte) 0x6a, (byte) 0x61, (byte) 0x76, (byte) 0x61, (byte) 0x74, (byte) 0x0, (byte) 0x3, (byte) 0x72, (byte) 0x75, (byte) 0x6e, (byte) 0x73, (byte) 0x71,
+ (byte) 0x0, (byte) 0x7e, (byte) 0x0, (byte) 0xd, (byte) 0x0, (byte) 0x0, (byte) 0x0, (byte) 0x24, (byte) 0x71, (byte) 0x0, (byte) 0x7e, (byte) 0x0, (byte) 0xf, (byte) 0x71, (byte) 0x0, (byte) 0x7e, (byte) 0x0, (byte) 0x10, (byte) 0x74, (byte) 0x0, (byte) 0x4, (byte) 0x6d, (byte) 0x61, (byte) 0x69, (byte) 0x6e, (byte) 0x73, (byte) 0x72, (byte) 0x0, (byte) 0x26, (byte) 0x6a, (byte) 0x61, (byte) 0x76,
+ (byte) 0x61, (byte) 0x2e, (byte) 0x75, (byte) 0x74, (byte) 0x69, (byte) 0x6c, (byte) 0x2e, (byte) 0x43, (byte) 0x6f, (byte) 0x6c, (byte) 0x6c, (byte) 0x65, (byte) 0x63, (byte) 0x74, (byte) 0x69, (byte) 0x6f, (byte) 0x6e, (byte) 0x73, (byte) 0x24, (byte) 0x55, (byte) 0x6e, (byte) 0x6d, (byte) 0x6f, (byte) 0x64, (byte) 0x69, (byte) 0x66, (byte) 0x69, (byte) 0x61, (byte) 0x62, (byte) 0x6c, (byte) 0x65, (byte) 0x4c,
+ (byte) 0x69, (byte) 0x73, (byte) 0x74, (byte) 0xfc, (byte) 0xf, (byte) 0x25, (byte) 0x31, (byte) 0xb5, (byte) 0xec, (byte) 0x8e, (byte) 0x10, (byte) 0x2, (byte) 0x0, (byte) 0x1, (byte) 0x4c, (byte) 0x0, (byte) 0x4, (byte) 0x6c, (byte) 0x69, (byte) 0x73, (byte) 0x74, (byte) 0x71, (byte) 0x0, (byte) 0x7e, (byte) 0x0, (byte) 0x8, (byte) 0x78, (byte) 0x72, (byte) 0x0, (byte) 0x2c, (byte) 0x6a, (byte) 0x61,
+ (byte) 0x76, (byte) 0x61, (byte) 0x2e, (byte) 0x75, (byte) 0x74, (byte) 0x69, (byte) 0x6c, (byte) 0x2e, (byte) 0x43, (byte) 0x6f, (byte) 0x6c, (byte) 0x6c, (byte) 0x65, (byte) 0x63, (byte) 0x74, (byte) 0x69, (byte) 0x6f, (byte) 0x6e, (byte) 0x73, (byte) 0x24, (byte) 0x55, (byte) 0x6e, (byte) 0x6d, (byte) 0x6f, (byte) 0x64, (byte) 0x69, (byte) 0x66, (byte) 0x69, (byte) 0x61, (byte) 0x62, (byte) 0x6c, (byte) 0x65,
+ (byte) 0x43, (byte) 0x6f, (byte) 0x6c, (byte) 0x6c, (byte) 0x65, (byte) 0x63, (byte) 0x74, (byte) 0x69, (byte) 0x6f, (byte) 0x6e, (byte) 0x19, (byte) 0x42, (byte) 0x0, (byte) 0x80, (byte) 0xcb, (byte) 0x5e, (byte) 0xf7, (byte) 0x1e, (byte) 0x2, (byte) 0x0, (byte) 0x1, (byte) 0x4c, (byte) 0x0, (byte) 0x1, (byte) 0x63, (byte) 0x74, (byte) 0x0, (byte) 0x16, (byte) 0x4c, (byte) 0x6a, (byte) 0x61, (byte) 0x76,
+ (byte) 0x61, (byte) 0x2f, (byte) 0x75, (byte) 0x74, (byte) 0x69, (byte) 0x6c, (byte) 0x2f, (byte) 0x43, (byte) 0x6f, (byte) 0x6c, (byte) 0x6c, (byte) 0x65, (byte) 0x63, (byte) 0x74, (byte) 0x69, (byte) 0x6f, (byte) 0x6e, (byte) 0x3b, (byte) 0x78, (byte) 0x70, (byte) 0x73, (byte) 0x72, (byte) 0x0, (byte) 0x13, (byte) 0x6a, (byte) 0x61, (byte) 0x76, (byte) 0x61, (byte) 0x2e, (byte) 0x75, (byte) 0x74, (byte) 0x69,
+ (byte) 0x6c, (byte) 0x2e, (byte) 0x41, (byte) 0x72, (byte) 0x72, (byte) 0x61, (byte) 0x79, (byte) 0x4c, (byte) 0x69, (byte) 0x73, (byte) 0x74, (byte) 0x78, (byte) 0x81, (byte) 0xd2, (byte) 0x1d, (byte) 0x99, (byte) 0xc7, (byte) 0x61, (byte) 0x9d, (byte) 0x3, (byte) 0x0, (byte) 0x1, (byte) 0x49, (byte) 0x0, (byte) 0x4, (byte) 0x73, (byte) 0x69, (byte) 0x7a, (byte) 0x65, (byte) 0x78, (byte) 0x70, (byte) 0x0,
+ (byte) 0x0, (byte) 0x0, (byte) 0x0, (byte) 0x77, (byte) 0x4, (byte) 0x0, (byte) 0x0, (byte) 0x0, (byte) 0x0, (byte) 0x78, (byte) 0x71, (byte) 0x0, (byte) 0x7e, (byte) 0x0, (byte) 0x19, (byte) 0x78, (byte) 0x70
+ };
+
+ /**
+ * Serialized TransactionRolledbackException from JDK 8 with the
+ * following values:
+ * reason = "This was the error msg"
+ * cause = null
+ */
+ public static byte[] TRBE_DATA = {
+ (byte) 0xac, (byte) 0xed, (byte) 0x0, (byte) 0x5, (byte) 0x73, (byte) 0x72, (byte) 0x0, (byte) 0x30, (byte) 0x6a, (byte) 0x61, (byte) 0x76, (byte) 0x61, (byte) 0x78, (byte) 0x2e, (byte) 0x74, (byte) 0x72, (byte) 0x61, (byte) 0x6e, (byte) 0x73, (byte) 0x61, (byte) 0x63, (byte) 0x74, (byte) 0x69, (byte) 0x6f, (byte) 0x6e, (byte) 0x2e, (byte) 0x54, (byte) 0x72, (byte) 0x61, (byte) 0x6e, (byte) 0x73, (byte) 0x61,
+ (byte) 0x63, (byte) 0x74, (byte) 0x69, (byte) 0x6f, (byte) 0x6e, (byte) 0x52, (byte) 0x6f, (byte) 0x6c, (byte) 0x6c, (byte) 0x65, (byte) 0x64, (byte) 0x62, (byte) 0x61, (byte) 0x63, (byte) 0x6b, (byte) 0x45, (byte) 0x78, (byte) 0x63, (byte) 0x65, (byte) 0x70, (byte) 0x74, (byte) 0x69, (byte) 0x6f, (byte) 0x6e, (byte) 0xd4, (byte) 0x62, (byte) 0x89, (byte) 0xbe, (byte) 0x47, (byte) 0x2, (byte) 0xe7, (byte) 0xdf,
+ (byte) 0x2, (byte) 0x0, (byte) 0x0, (byte) 0x78, (byte) 0x72, (byte) 0x0, (byte) 0x18, (byte) 0x6a, (byte) 0x61, (byte) 0x76, (byte) 0x61, (byte) 0x2e, (byte) 0x72, (byte) 0x6d, (byte) 0x69, (byte) 0x2e, (byte) 0x52, (byte) 0x65, (byte) 0x6d, (byte) 0x6f, (byte) 0x74, (byte) 0x65, (byte) 0x45, (byte) 0x78, (byte) 0x63, (byte) 0x65, (byte) 0x70, (byte) 0x74, (byte) 0x69, (byte) 0x6f, (byte) 0x6e, (byte) 0xb8,
+ (byte) 0x8c, (byte) 0x9d, (byte) 0x4e, (byte) 0xde, (byte) 0xe4, (byte) 0x7a, (byte) 0x22, (byte) 0x2, (byte) 0x0, (byte) 0x1, (byte) 0x4c, (byte) 0x0, (byte) 0x6, (byte) 0x64, (byte) 0x65, (byte) 0x74, (byte) 0x61, (byte) 0x69, (byte) 0x6c, (byte) 0x74, (byte) 0x0, (byte) 0x15, (byte) 0x4c, (byte) 0x6a, (byte) 0x61, (byte) 0x76, (byte) 0x61, (byte) 0x2f, (byte) 0x6c, (byte) 0x61, (byte) 0x6e, (byte) 0x67,
+ (byte) 0x2f, (byte) 0x54, (byte) 0x68, (byte) 0x72, (byte) 0x6f, (byte) 0x77, (byte) 0x61, (byte) 0x62, (byte) 0x6c, (byte) 0x65, (byte) 0x3b, (byte) 0x78, (byte) 0x72, (byte) 0x0, (byte) 0x13, (byte) 0x6a, (byte) 0x61, (byte) 0x76, (byte) 0x61, (byte) 0x2e, (byte) 0x69, (byte) 0x6f, (byte) 0x2e, (byte) 0x49, (byte) 0x4f, (byte) 0x45, (byte) 0x78, (byte) 0x63, (byte) 0x65, (byte) 0x70, (byte) 0x74, (byte) 0x69,
+ (byte) 0x6f, (byte) 0x6e, (byte) 0x6c, (byte) 0x80, (byte) 0x73, (byte) 0x64, (byte) 0x65, (byte) 0x25, (byte) 0xf0, (byte) 0xab, (byte) 0x2, (byte) 0x0, (byte) 0x0, (byte) 0x78, (byte) 0x72, (byte) 0x0, (byte) 0x13, (byte) 0x6a, (byte) 0x61, (byte) 0x76, (byte) 0x61, (byte) 0x2e, (byte) 0x6c, (byte) 0x61, (byte) 0x6e, (byte) 0x67, (byte) 0x2e, (byte) 0x45, (byte) 0x78, (byte) 0x63, (byte) 0x65, (byte) 0x70,
+ (byte) 0x74, (byte) 0x69, (byte) 0x6f, (byte) 0x6e, (byte) 0xd0, (byte) 0xfd, (byte) 0x1f, (byte) 0x3e, (byte) 0x1a, (byte) 0x3b, (byte) 0x1c, (byte) 0xc4, (byte) 0x2, (byte) 0x0, (byte) 0x0, (byte) 0x78, (byte) 0x72, (byte) 0x0, (byte) 0x13, (byte) 0x6a, (byte) 0x61, (byte) 0x76, (byte) 0x61, (byte) 0x2e, (byte) 0x6c, (byte) 0x61, (byte) 0x6e, (byte) 0x67, (byte) 0x2e, (byte) 0x54, (byte) 0x68, (byte) 0x72,
+ (byte) 0x6f, (byte) 0x77, (byte) 0x61, (byte) 0x62, (byte) 0x6c, (byte) 0x65, (byte) 0xd5, (byte) 0xc6, (byte) 0x35, (byte) 0x27, (byte) 0x39, (byte) 0x77, (byte) 0xb8, (byte) 0xcb, (byte) 0x3, (byte) 0x0, (byte) 0x4, (byte) 0x4c, (byte) 0x0, (byte) 0x5, (byte) 0x63, (byte) 0x61, (byte) 0x75, (byte) 0x73, (byte) 0x65, (byte) 0x71, (byte) 0x0, (byte) 0x7e, (byte) 0x0, (byte) 0x2, (byte) 0x4c, (byte) 0x0,
+ (byte) 0xd, (byte) 0x64, (byte) 0x65, (byte) 0x74, (byte) 0x61, (byte) 0x69, (byte) 0x6c, (byte) 0x4d, (byte) 0x65, (byte) 0x73, (byte) 0x73, (byte) 0x61, (byte) 0x67, (byte) 0x65, (byte) 0x74, (byte) 0x0, (byte) 0x12, (byte) 0x4c, (byte) 0x6a, (byte) 0x61, (byte) 0x76, (byte) 0x61, (byte) 0x2f, (byte) 0x6c, (byte) 0x61, (byte) 0x6e, (byte) 0x67, (byte) 0x2f, (byte) 0x53, (byte) 0x74, (byte) 0x72, (byte) 0x69,
+ (byte) 0x6e, (byte) 0x67, (byte) 0x3b, (byte) 0x5b, (byte) 0x0, (byte) 0xa, (byte) 0x73, (byte) 0x74, (byte) 0x61, (byte) 0x63, (byte) 0x6b, (byte) 0x54, (byte) 0x72, (byte) 0x61, (byte) 0x63, (byte) 0x65, (byte) 0x74, (byte) 0x0, (byte) 0x1e, (byte) 0x5b, (byte) 0x4c, (byte) 0x6a, (byte) 0x61, (byte) 0x76, (byte) 0x61, (byte) 0x2f, (byte) 0x6c, (byte) 0x61, (byte) 0x6e, (byte) 0x67, (byte) 0x2f, (byte) 0x53,
+ (byte) 0x74, (byte) 0x61, (byte) 0x63, (byte) 0x6b, (byte) 0x54, (byte) 0x72, (byte) 0x61, (byte) 0x63, (byte) 0x65, (byte) 0x45, (byte) 0x6c, (byte) 0x65, (byte) 0x6d, (byte) 0x65, (byte) 0x6e, (byte) 0x74, (byte) 0x3b, (byte) 0x4c, (byte) 0x0, (byte) 0x14, (byte) 0x73, (byte) 0x75, (byte) 0x70, (byte) 0x70, (byte) 0x72, (byte) 0x65, (byte) 0x73, (byte) 0x73, (byte) 0x65, (byte) 0x64, (byte) 0x45, (byte) 0x78,
+ (byte) 0x63, (byte) 0x65, (byte) 0x70, (byte) 0x74, (byte) 0x69, (byte) 0x6f, (byte) 0x6e, (byte) 0x73, (byte) 0x74, (byte) 0x0, (byte) 0x10, (byte) 0x4c, (byte) 0x6a, (byte) 0x61, (byte) 0x76, (byte) 0x61, (byte) 0x2f, (byte) 0x75, (byte) 0x74, (byte) 0x69, (byte) 0x6c, (byte) 0x2f, (byte) 0x4c, (byte) 0x69, (byte) 0x73, (byte) 0x74, (byte) 0x3b, (byte) 0x78, (byte) 0x70, (byte) 0x70, (byte) 0x74, (byte) 0x0,
+ (byte) 0x6, (byte) 0x72, (byte) 0x65, (byte) 0x61, (byte) 0x73, (byte) 0x6f, (byte) 0x6e, (byte) 0x75, (byte) 0x72, (byte) 0x0, (byte) 0x1e, (byte) 0x5b, (byte) 0x4c, (byte) 0x6a, (byte) 0x61, (byte) 0x76, (byte) 0x61, (byte) 0x2e, (byte) 0x6c, (byte) 0x61, (byte) 0x6e, (byte) 0x67, (byte) 0x2e, (byte) 0x53, (byte) 0x74, (byte) 0x61, (byte) 0x63, (byte) 0x6b, (byte) 0x54, (byte) 0x72, (byte) 0x61, (byte) 0x63,
+ (byte) 0x65, (byte) 0x45, (byte) 0x6c, (byte) 0x65, (byte) 0x6d, (byte) 0x65, (byte) 0x6e, (byte) 0x74, (byte) 0x3b, (byte) 0x2, (byte) 0x46, (byte) 0x2a, (byte) 0x3c, (byte) 0x3c, (byte) 0xfd, (byte) 0x22, (byte) 0x39, (byte) 0x2, (byte) 0x0, (byte) 0x0, (byte) 0x78, (byte) 0x70, (byte) 0x0, (byte) 0x0, (byte) 0x0, (byte) 0x2, (byte) 0x73, (byte) 0x72, (byte) 0x0, (byte) 0x1b, (byte) 0x6a, (byte) 0x61,
+ (byte) 0x76, (byte) 0x61, (byte) 0x2e, (byte) 0x6c, (byte) 0x61, (byte) 0x6e, (byte) 0x67, (byte) 0x2e, (byte) 0x53, (byte) 0x74, (byte) 0x61, (byte) 0x63, (byte) 0x6b, (byte) 0x54, (byte) 0x72, (byte) 0x61, (byte) 0x63, (byte) 0x65, (byte) 0x45, (byte) 0x6c, (byte) 0x65, (byte) 0x6d, (byte) 0x65, (byte) 0x6e, (byte) 0x74, (byte) 0x61, (byte) 0x9, (byte) 0xc5, (byte) 0x9a, (byte) 0x26, (byte) 0x36, (byte) 0xdd,
+ (byte) 0x85, (byte) 0x2, (byte) 0x0, (byte) 0x4, (byte) 0x49, (byte) 0x0, (byte) 0xa, (byte) 0x6c, (byte) 0x69, (byte) 0x6e, (byte) 0x65, (byte) 0x4e, (byte) 0x75, (byte) 0x6d, (byte) 0x62, (byte) 0x65, (byte) 0x72, (byte) 0x4c, (byte) 0x0, (byte) 0xe, (byte) 0x64, (byte) 0x65, (byte) 0x63, (byte) 0x6c, (byte) 0x61, (byte) 0x72, (byte) 0x69, (byte) 0x6e, (byte) 0x67, (byte) 0x43, (byte) 0x6c, (byte) 0x61,
+ (byte) 0x73, (byte) 0x73, (byte) 0x71, (byte) 0x0, (byte) 0x7e, (byte) 0x0, (byte) 0x6, (byte) 0x4c, (byte) 0x0, (byte) 0x8, (byte) 0x66, (byte) 0x69, (byte) 0x6c, (byte) 0x65, (byte) 0x4e, (byte) 0x61, (byte) 0x6d, (byte) 0x65, (byte) 0x71, (byte) 0x0, (byte) 0x7e, (byte) 0x0, (byte) 0x6, (byte) 0x4c, (byte) 0x0, (byte) 0xa, (byte) 0x6d, (byte) 0x65, (byte) 0x74, (byte) 0x68, (byte) 0x6f, (byte) 0x64,
+ (byte) 0x4e, (byte) 0x61, (byte) 0x6d, (byte) 0x65, (byte) 0x71, (byte) 0x0, (byte) 0x7e, (byte) 0x0, (byte) 0x6, (byte) 0x78, (byte) 0x70, (byte) 0x0, (byte) 0x0, (byte) 0x0, (byte) 0x3e, (byte) 0x74, (byte) 0x0, (byte) 0x10, (byte) 0x57, (byte) 0x72, (byte) 0x69, (byte) 0x74, (byte) 0x65, (byte) 0x53, (byte) 0x65, (byte) 0x72, (byte) 0x69, (byte) 0x61, (byte) 0x6c, (byte) 0x44, (byte) 0x61, (byte) 0x74,
+ (byte) 0x61, (byte) 0x31, (byte) 0x74, (byte) 0x0, (byte) 0x15, (byte) 0x57, (byte) 0x72, (byte) 0x69, (byte) 0x74, (byte) 0x65, (byte) 0x53, (byte) 0x65, (byte) 0x72, (byte) 0x69, (byte) 0x61, (byte) 0x6c, (byte) 0x44, (byte) 0x61, (byte) 0x74, (byte) 0x61, (byte) 0x31, (byte) 0x2e, (byte) 0x6a, (byte) 0x61, (byte) 0x76, (byte) 0x61, (byte) 0x74, (byte) 0x0, (byte) 0x3, (byte) 0x72, (byte) 0x75, (byte) 0x6e,
+ (byte) 0x73, (byte) 0x71, (byte) 0x0, (byte) 0x7e, (byte) 0x0, (byte) 0xd, (byte) 0x0, (byte) 0x0, (byte) 0x0, (byte) 0x24, (byte) 0x71, (byte) 0x0, (byte) 0x7e, (byte) 0x0, (byte) 0xf, (byte) 0x71, (byte) 0x0, (byte) 0x7e, (byte) 0x0, (byte) 0x10, (byte) 0x74, (byte) 0x0, (byte) 0x4, (byte) 0x6d, (byte) 0x61, (byte) 0x69, (byte) 0x6e, (byte) 0x73, (byte) 0x72, (byte) 0x0, (byte) 0x26, (byte) 0x6a,
+ (byte) 0x61, (byte) 0x76, (byte) 0x61, (byte) 0x2e, (byte) 0x75, (byte) 0x74, (byte) 0x69, (byte) 0x6c, (byte) 0x2e, (byte) 0x43, (byte) 0x6f, (byte) 0x6c, (byte) 0x6c, (byte) 0x65, (byte) 0x63, (byte) 0x74, (byte) 0x69, (byte) 0x6f, (byte) 0x6e, (byte) 0x73, (byte) 0x24, (byte) 0x55, (byte) 0x6e, (byte) 0x6d, (byte) 0x6f, (byte) 0x64, (byte) 0x69, (byte) 0x66, (byte) 0x69, (byte) 0x61, (byte) 0x62, (byte) 0x6c,
+ (byte) 0x65, (byte) 0x4c, (byte) 0x69, (byte) 0x73, (byte) 0x74, (byte) 0xfc, (byte) 0xf, (byte) 0x25, (byte) 0x31, (byte) 0xb5, (byte) 0xec, (byte) 0x8e, (byte) 0x10, (byte) 0x2, (byte) 0x0, (byte) 0x1, (byte) 0x4c, (byte) 0x0, (byte) 0x4, (byte) 0x6c, (byte) 0x69, (byte) 0x73, (byte) 0x74, (byte) 0x71, (byte) 0x0, (byte) 0x7e, (byte) 0x0, (byte) 0x8, (byte) 0x78, (byte) 0x72, (byte) 0x0, (byte) 0x2c,
+ (byte) 0x6a, (byte) 0x61, (byte) 0x76, (byte) 0x61, (byte) 0x2e, (byte) 0x75, (byte) 0x74, (byte) 0x69, (byte) 0x6c, (byte) 0x2e, (byte) 0x43, (byte) 0x6f, (byte) 0x6c, (byte) 0x6c, (byte) 0x65, (byte) 0x63, (byte) 0x74, (byte) 0x69, (byte) 0x6f, (byte) 0x6e, (byte) 0x73, (byte) 0x24, (byte) 0x55, (byte) 0x6e, (byte) 0x6d, (byte) 0x6f, (byte) 0x64, (byte) 0x69, (byte) 0x66, (byte) 0x69, (byte) 0x61, (byte) 0x62,
+ (byte) 0x6c, (byte) 0x65, (byte) 0x43, (byte) 0x6f, (byte) 0x6c, (byte) 0x6c, (byte) 0x65, (byte) 0x63, (byte) 0x74, (byte) 0x69, (byte) 0x6f, (byte) 0x6e, (byte) 0x19, (byte) 0x42, (byte) 0x0, (byte) 0x80, (byte) 0xcb, (byte) 0x5e, (byte) 0xf7, (byte) 0x1e, (byte) 0x2, (byte) 0x0, (byte) 0x1, (byte) 0x4c, (byte) 0x0, (byte) 0x1, (byte) 0x63, (byte) 0x74, (byte) 0x0, (byte) 0x16, (byte) 0x4c, (byte) 0x6a,
+ (byte) 0x61, (byte) 0x76, (byte) 0x61, (byte) 0x2f, (byte) 0x75, (byte) 0x74, (byte) 0x69, (byte) 0x6c, (byte) 0x2f, (byte) 0x43, (byte) 0x6f, (byte) 0x6c, (byte) 0x6c, (byte) 0x65, (byte) 0x63, (byte) 0x74, (byte) 0x69, (byte) 0x6f, (byte) 0x6e, (byte) 0x3b, (byte) 0x78, (byte) 0x70, (byte) 0x73, (byte) 0x72, (byte) 0x0, (byte) 0x13, (byte) 0x6a, (byte) 0x61, (byte) 0x76, (byte) 0x61, (byte) 0x2e, (byte) 0x75,
+ (byte) 0x74, (byte) 0x69, (byte) 0x6c, (byte) 0x2e, (byte) 0x41, (byte) 0x72, (byte) 0x72, (byte) 0x61, (byte) 0x79, (byte) 0x4c, (byte) 0x69, (byte) 0x73, (byte) 0x74, (byte) 0x78, (byte) 0x81, (byte) 0xd2, (byte) 0x1d, (byte) 0x99, (byte) 0xc7, (byte) 0x61, (byte) 0x9d, (byte) 0x3, (byte) 0x0, (byte) 0x1, (byte) 0x49, (byte) 0x0, (byte) 0x4, (byte) 0x73, (byte) 0x69, (byte) 0x7a, (byte) 0x65, (byte) 0x78,
+ (byte) 0x70, (byte) 0x0, (byte) 0x0, (byte) 0x0, (byte) 0x0, (byte) 0x77, (byte) 0x4, (byte) 0x0, (byte) 0x0, (byte) 0x0, (byte) 0x0, (byte) 0x78, (byte) 0x71, (byte) 0x0, (byte) 0x7e, (byte) 0x0, (byte) 0x19, (byte) 0x78, (byte) 0x70
+ };
+
+}
--- a/test/jdk/sanity/client/SwingSet/src/TextFieldDemoTest.java Thu Mar 01 16:35:36 2018 -0500
+++ b/test/jdk/sanity/client/SwingSet/src/TextFieldDemoTest.java Fri Mar 02 21:00:12 2018 +0100
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2010, 2016, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2010, 2018, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
@@ -101,6 +101,7 @@
JButtonOperator jbo = new JButtonOperator(containerOperator, GO);
JLabelOperator dowLabel = new JLabelOperator(containerOperator);
Calendar calendar = Calendar.getInstance(Locale.ENGLISH);
+ calendar.setTime((Date) getUIValue(jtfo, jtf -> ((JFormattedTextField)jtf).getValue()));
// Check default date Day of the Week
jbo.push();
--- a/test/jdk/sanity/client/lib/jemmy/src/org/netbeans/jemmy/ComponentChooser.java Thu Mar 01 16:35:36 2018 -0500
+++ b/test/jdk/sanity/client/lib/jemmy/src/org/netbeans/jemmy/ComponentChooser.java Fri Mar 02 21:00:12 2018 +0100
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 1997, 2016, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 1997, 2018, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
@@ -50,5 +50,7 @@
*
* @return a String representing the description value
*/
- public String getDescription();
+ public default String getDescription() {
+ return toString();
+ }
}
--- a/test/jdk/sanity/client/lib/jemmy/src/org/netbeans/jemmy/operators/Operator.java Thu Mar 01 16:35:36 2018 -0500
+++ b/test/jdk/sanity/client/lib/jemmy/src/org/netbeans/jemmy/operators/Operator.java Fri Mar 02 21:00:12 2018 +0100
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 1997, 2016, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 1997, 2018, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
@@ -718,6 +718,25 @@
}
}
+ /**
+ * Waits a state specified by a ComponentChooser instance on EDT queue.
+ *
+ * @param state a ComponentChooser defining the state criteria.
+ * @throws TimeoutExpiredException if the state has not achieved in a value
+ * defined by {@code "ComponentOperator.WaitStateTimeout"}
+ */
+ public void waitStateOnQueue(final ComponentChooser state) {
+ waitState((comp) -> {
+ return (boolean) (queueTool.invokeSmoothly(
+ new QueueTool.QueueAction<Object>("checkComponent") {
+ @Override
+ public final Object launch() throws Exception {
+ return state.checkComponent(comp);
+ }
+ }));
+ });
+ }
+
////////////////////////////////////////////////////////
//Mapping //
////////////////////////////////////////////////////////
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/test/jdk/sanity/releaseFile/CheckSource.java Fri Mar 02 21:00:12 2018 +0100
@@ -0,0 +1,120 @@
+
+/*
+ * Copyright (c) 2018, Oracle and/or its affiliates. All rights reserved.
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * This code is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU General Public License version 2 only, as
+ * published by the Free Software Foundation.
+ *
+ * This code is distributed in the hope that it will be useful, but WITHOUT
+ * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
+ * version 2 for more details (a copy is included in the LICENSE file that
+ * accompanied this code).
+ *
+ * You should have received a copy of the GNU General Public License version
+ * 2 along with this work; if not, write to the Free Software Foundation,
+ * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
+ *
+ * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
+ * or visit www.oracle.com if you need additional information or have any
+ * questions.
+ */
+
+/*
+ * @test
+ * @bug 8193660
+ * @summary Check SOURCE line in "release" file for closedjdk
+ * @run main CheckSource
+ */
+
+import java.io.BufferedReader;
+import java.io.File;
+import java.io.FileReader;
+import java.io.FileNotFoundException;
+import java.io.IOException;
+
+public class CheckSource {
+
+ CheckSource(String dataFile, boolean isOpenJDK) {
+ // Read data files
+ readFile(dataFile, isOpenJDK);
+ }
+
+ private void readFile(String fileName, boolean isOpenJDK) {
+ String fishForSOURCE = null;
+
+ File file = new File(fileName);
+
+ // open the stream to read in for Entries
+ try (BufferedReader buffRead =
+ new BufferedReader(new FileReader(fileName))) {
+
+ // this is the string read
+ String readIn;
+
+ // let's read some strings!
+ while ((readIn = buffRead.readLine()) != null) {
+ readIn = readIn.trim();
+
+ // throw out blank lines
+ if (readIn.length() == 0)
+ continue;
+
+ // grab SOURCE line
+ if (readIn.startsWith("SOURCE=")) {
+ fishForSOURCE = readIn;
+ break;
+ }
+ }
+ } catch (FileNotFoundException fileExcept) {
+ throw new RuntimeException("File " + fileName +
+ " not found reading data!", fileExcept);
+ } catch (IOException ioExcept) {
+ throw new RuntimeException("Unexpected problem reading data!",
+ ioExcept);
+ }
+
+ // was SOURCE even found?
+ if (fishForSOURCE == null) {
+ throw new RuntimeException("SOURCE line was not found!");
+ } else {
+ // OK it was found, did it have correct sources?
+ System.out.println("The source string found: " + fishForSOURCE);
+
+ // First it MUST have .: regardless of closed or openJDK
+ if (!fishForSOURCE.contains(".:")) {
+ throw new RuntimeException("The test failed, .: not found!");
+ }
+ // take out the .: source path
+ fishForSOURCE = fishForSOURCE.replace(".:", "");
+
+ // if its closedJDK it MUST have open:
+ if (!isOpenJDK && !fishForSOURCE.contains("open:")) {
+ throw new RuntimeException("The test failed, open: not found!");
+ }
+ // take out the open: source path
+ fishForSOURCE = fishForSOURCE.replace("open:", "");
+
+ // if any other source exists, that's an error
+ if (fishForSOURCE.contains(":")) {
+ throw new RuntimeException("The test failed, additional sources found!");
+ }
+ }
+
+ // Everything was fine
+ System.out.println("The test passed!");
+ }
+
+ public static void main(String args[]) {
+ String jdkPath = System.getProperty("test.jdk");
+ String runtime = System.getProperty("java.runtime.name");
+
+ System.out.println("JDK Path : " + jdkPath);
+ System.out.println("Runtime Name : " + runtime);
+
+ new CheckSource(jdkPath + "/release",
+ runtime.contains("OpenJDK"));
+ }
+}
--- a/test/jdk/sanity/releaseFile/NegativeSOURCETest.java Thu Mar 01 16:35:36 2018 -0500
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,106 +0,0 @@
-
-/*
- * Copyright (c) 2017, Oracle and/or its affiliates. All rights reserved.
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * This code is free software; you can redistribute it and/or modify it
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
- * or visit www.oracle.com if you need additional information or have any
- * questions.
- */
-
-/*
- * @test
- * @bug 8192837
- * @summary Test to verify release file does not contain closed repo info if it's open bundle
- * @run main NegativeSOURCETest
- */
-
-import java.io.BufferedReader;
-import java.io.File;
-import java.io.FileReader;
-import java.io.FileNotFoundException;
-import java.io.IOException;
-
-public class NegativeSOURCETest {
-
- NegativeSOURCETest(String dataFile) {
- // Read data files
- readFile(dataFile);
- }
-
- private void readFile(String fileName) {
- String fishForSOURCE = null;
-
- File file = new File(fileName);
-
- // open the stream to read in for Entries
- try (BufferedReader buffRead =
- new BufferedReader(new FileReader(fileName))) {
-
- // this is the string read
- String readIn;
-
- // let's read some strings!
- while ((readIn = buffRead.readLine()) != null) {
- readIn = readIn.trim();
-
- // throw out blank lines
- if (readIn.length() == 0)
- continue;
-
- // grab SOURCE line
- if (readIn.startsWith("SOURCE=")) {
- fishForSOURCE = readIn;
- break;
- }
- }
- } catch (FileNotFoundException fileExcept) {
- throw new RuntimeException("File " + fileName +
- " not found reading data!", fileExcept);
- } catch (IOException ioExcept) {
- throw new RuntimeException("Unexpected problem reading data!",
- ioExcept);
- }
-
- // was SOURCE even found?
- if (fishForSOURCE == null) {
- throw new RuntimeException("SOURCE line was not found!");
- } else {
- // OK it was found, did it have closed/open in it?
- if (fishForSOURCE.contains("closed") || fishForSOURCE.contains("open")) {
- System.out.println("The offending string: " + fishForSOURCE);
- throw new RuntimeException("The test failed, closed/open found!");
- }
- }
-
- // Everything was fine
- System.out.println("The test passed!");
- }
-
- public static void main(String args[]) {
- String jdkPath = System.getProperty("test.jdk");
- String runtime = System.getProperty("java.runtime.name");
-
- System.out.println("JDK Path : " + jdkPath);
- System.out.println("Runtime Name : " + runtime);
-
- if (runtime.contains("OpenJDK"))
- new NegativeSOURCETest(jdkPath + "/release");
- else
- System.out.println("Test skipped: not an OpenJDK build.");
- }
-}
--- a/test/jdk/sun/java2d/marlin/TextClipErrorTest.java Thu Mar 01 16:35:36 2018 -0500
+++ b/test/jdk/sun/java2d/marlin/TextClipErrorTest.java Fri Mar 02 21:00:12 2018 +0100
@@ -50,7 +50,8 @@
import javax.imageio.ImageIO;
/**
- * @test @bug 8144718
+ * @test
+ * @bug 8144718
* @summary Check the Stroker.drawBezApproxForArc() bug (stoke with round
* joins): if cosext2 > 0.5, it generates curves with NaN coordinates
* @run main TextClipErrorTest
--- a/test/jdk/sun/management/StackTraceElementCompositeData/CompatibilityTest.java Thu Mar 01 16:35:36 2018 -0500
+++ b/test/jdk/sun/management/StackTraceElementCompositeData/CompatibilityTest.java Fri Mar 02 21:00:12 2018 +0100
@@ -1,3 +1,25 @@
+/*
+ * Copyright (c) 2015, 2018, Oracle and/or its affiliates. All rights reserved.
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * This code is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU General Public License version 2 only, as
+ * published by the Free Software Foundation.
+ *
+ * This code is distributed in the hope that it will be useful, but WITHOUT
+ * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
+ * version 2 for more details (a copy is included in the LICENSE file that
+ * accompanied this code).
+ *
+ * You should have received a copy of the GNU General Public License version
+ * 2 along with this work; if not, write to the Free Software Foundation,
+ * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
+ *
+ * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
+ * or visit www.oracle.com if you need additional information or have any
+ * questions.
+ */
import java.util.HashMap;
import java.util.Map;
@@ -6,6 +28,7 @@
import javax.management.openmbean.CompositeType;
import javax.management.openmbean.OpenType;
import javax.management.openmbean.SimpleType;
+
import sun.management.StackTraceElementCompositeData;
import org.testng.annotations.*;
@@ -14,6 +37,7 @@
/*
* @test
* @bug 8139587
+ * @modules java.management/sun.management
* @summary Check backward compatibility of StackTraceElementCompositeData
* @author Jaroslav Bachorik
*
@@ -22,21 +46,33 @@
public class CompatibilityTest {
private static CompositeType compositeTypeV6;
- private static Map<String, Object> itemsV6;
- private static CompositeData compositeDataV6;
+ private static CompositeType compositeType;
+
+ // Attribute names
+ private static final String CLASS_LOADER_NAME = "classLoaderName";
+ private static final String MODULE_NAME = "moduleName";
+ private static final String MODULE_VERSION = "moduleVersion";
+ private static final String CLASS_NAME = "className";
+ private static final String METHOD_NAME = "methodName";
+ private static final String FILE_NAME = "fileName";
+ private static final String LINE_NUMBER = "lineNumber";
+ private static final String NATIVE_METHOD = "nativeMethod";
@BeforeClass
public static void setup() throws Exception {
+ String[] v6Names = {
+ CLASS_NAME, METHOD_NAME, FILE_NAME, NATIVE_METHOD, LINE_NUMBER
+ };
+ String[] names = {
+ CLASS_LOADER_NAME, MODULE_NAME, MODULE_VERSION,
+ CLASS_NAME, METHOD_NAME, FILE_NAME, NATIVE_METHOD, LINE_NUMBER
+ };
compositeTypeV6 = new CompositeType(
StackTraceElement.class.getName(),
"StackTraceElement",
- new String[]{
- "className", "methodName", "fileName", "nativeMethod", "lineNumber"
- },
- new String[]{
- "className", "methodName", "fileName", "nativeMethod", "lineNumber"
- },
- new OpenType[]{
+ v6Names,
+ v6Names,
+ new OpenType[] {
SimpleType.STRING,
SimpleType.STRING,
SimpleType.STRING,
@@ -44,20 +80,52 @@
SimpleType.INTEGER
}
);
+ compositeType = new CompositeType(
+ StackTraceElement.class.getName(),
+ "StackTraceElement",
+ names,
+ names,
+ new OpenType[] {
+ SimpleType.STRING,
+ SimpleType.STRING,
+ SimpleType.STRING,
+ SimpleType.STRING,
+ SimpleType.STRING,
+ SimpleType.STRING,
+ SimpleType.BOOLEAN,
+ SimpleType.INTEGER
+ }
+ );
+ }
- itemsV6 = new HashMap<>();
- itemsV6.put("className", "MyClass");
- itemsV6.put("methodName", "myMethod");
- itemsV6.put("fileName", "MyClass.java");
- itemsV6.put("nativeMethod", false);
- itemsV6.put("lineNumber", 123);
+ private static CompositeData makeCompositeDataV6() throws Exception {
+ Map<String, Object> itemsV6 = new HashMap<>();
+ itemsV6.put(CLASS_NAME, "MyClass");
+ itemsV6.put(METHOD_NAME, "myMethod");
+ itemsV6.put(FILE_NAME, "MyClass.java");
+ itemsV6.put(NATIVE_METHOD, false);
+ itemsV6.put(LINE_NUMBER, 123);
+
+ return new CompositeDataSupport(compositeTypeV6, itemsV6);
+ }
- compositeDataV6 = new CompositeDataSupport(compositeTypeV6, itemsV6);
+ private static CompositeData makeCompositeData() throws Exception {
+ Map<String, Object> items = new HashMap<>();
+ items.put(CLASS_LOADER_NAME, "app");
+ items.put(MODULE_NAME, "m");
+ items.put(MODULE_VERSION, "1.0");
+ items.put(CLASS_NAME, "MyClass");
+ items.put(METHOD_NAME, "myMethod");
+ items.put(FILE_NAME, "MyClass.java");
+ items.put(NATIVE_METHOD, false);
+ items.put(LINE_NUMBER, 123);
+
+ return new CompositeDataSupport(compositeType, items);
}
@Test
public void testV6Compatibility() throws Exception {
- StackTraceElement ste = StackTraceElementCompositeData.from(compositeDataV6);
+ StackTraceElement ste = StackTraceElementCompositeData.from(makeCompositeDataV6());
assertNotNull(ste);
assertEquals(ste.getClassName(), "MyClass");
@@ -69,5 +137,22 @@
assertNull(ste.getModuleName());
assertNull(ste.getModuleVersion());
}
+
+ @Test
+ public void test() throws Exception {
+ StackTraceElement ste = StackTraceElementCompositeData.from(makeCompositeData());
+
+ assertNotNull(ste);
+
+ assertEquals(ste.getModuleName(), "m");
+ assertEquals(ste.getModuleVersion(), "1.0");
+ assertEquals(ste.getClassLoaderName(), "app");
+
+ assertEquals(ste.getClassName(), "MyClass");
+ assertEquals(ste.getMethodName(), "myMethod");
+ assertEquals(ste.getFileName(), "MyClass.java");
+ assertEquals(ste.isNativeMethod(), false);
+ assertEquals(ste.getLineNumber(), 123);
+ }
}
--- a/test/jdk/sun/security/ssl/HandshakeHash/HandshakeHashCloneExhaustion.java Thu Mar 01 16:35:36 2018 -0500
+++ b/test/jdk/sun/security/ssl/HandshakeHash/HandshakeHashCloneExhaustion.java Fri Mar 02 21:00:12 2018 +0100
@@ -42,6 +42,7 @@
import java.io.InputStream;
import java.io.OutputStream;
+import java.security.MessageDigest;
import java.security.Security;
import javax.net.ssl.SSLSocket;
@@ -49,6 +50,7 @@
private static String[] protocol;
private static String[] ciphersuite;
+ private static String[] mds = { "SHA", "MD5", "SHA-256" };
/*
* ==================
@@ -57,6 +59,14 @@
public static void main(String[] args) throws Exception {
// Add in a non-cloneable MD5/SHA1/SHA-256 implementation
Security.insertProviderAt(new MyProvider(), 1);
+ // make sure our provider is functioning
+ for (String s : mds) {
+ MessageDigest md = MessageDigest.getInstance(s);
+ String p = md.getProvider().getName();
+ if (!p.equals("MyProvider")) {
+ throw new RuntimeException("Unexpected provider: " + p);
+ }
+ }
if (args.length != 2) {
throw new Exception(
--- a/test/jdk/sun/security/ssl/HandshakeHash/MyProvider.java Thu Mar 01 16:35:36 2018 -0500
+++ b/test/jdk/sun/security/ssl/HandshakeHash/MyProvider.java Fri Mar 02 21:00:12 2018 +0100
@@ -28,8 +28,8 @@
public MyProvider() {
super("MyProvider", "1.0",
"Test Provider: SHA1/MD5/SHA256 exhaustion testing");
- put("MessageDigest.SHA", "DigestBase.SHADigest");
- put("MessageDigest.MD5", "DigestBase.MD5Digest");
- put("MessageDigest.SHA-256", "DigestBase.SHA256Digest");
+ put("MessageDigest.SHA", "DigestBase$SHA");
+ put("MessageDigest.MD5", "DigestBase$MD5");
+ put("MessageDigest.SHA-256", "DigestBase$SHA256");
}
}
--- a/test/jdk/sun/security/tools/jarsigner/LineBrokenMultiByteCharacter.java Thu Mar 01 16:35:36 2018 -0500
+++ b/test/jdk/sun/security/tools/jarsigner/LineBrokenMultiByteCharacter.java Fri Mar 02 21:00:12 2018 +0100
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2017, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2017, 2018, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
@@ -58,7 +58,7 @@
* @see #verifyClassNameLineBroken(JarFile, String)
*/
static final String testClassName =
- "LineBrokenMultiByteCharacterA1234567890B1234567890C123456789D12\u00E9xyz.class";
+ "LineBrokenMultiByteCharacterA1234567890B1234567890C123456789D1234\u00E9xyz.class";
static final String anotherName =
"LineBrokenMultiByteCharacterA1234567890B1234567890C123456789D1234567890.class";
--- a/test/langtools/jdk/javadoc/doclet/AccessSkipNav/AccessSkipNav.java Thu Mar 01 16:35:36 2018 -0500
+++ b/test/langtools/jdk/javadoc/doclet/AccessSkipNav/AccessSkipNav.java Fri Mar 02 21:00:12 2018 +0100
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2002, 2016, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2002, 2018, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
@@ -23,7 +23,7 @@
/*
* @test
- * @bug 4638136 7198273 8025633 8081854
+ * @bug 4638136 7198273 8025633 8081854 8182765
* @summary Add ability to skip over nav bar for accessibility
* @author dkramer
* @library ../lib
@@ -46,21 +46,37 @@
"p1", "p2");
checkExit(Exit.OK);
- // Testing only for the presence of the <a href> and <a name>
+ // Testing only for the presence of the <a href> and <a id>
checkOutput("p1/C1.html", true,
// Top navbar <a href>
"<a href=\"#skip.navbar.top\" title=\"Skip navigation links\">Skip navigation links</a>",
// Top navbar <a name>
- "<a name=\"skip.navbar.top\">\n"
+ "<a id=\"skip.navbar.top\">\n"
+ "<!-- -->\n"
+ "</a>",
// Bottom navbar <a href>
"<a href=\"#skip.navbar.bottom\" title=\"Skip navigation links\">Skip navigation links</a>",
// Bottom navbar <a name>
+ "<a id=\"skip.navbar.bottom\">\n"
+ + "<!-- -->\n"
+ + "</a>");
+ }
+
+ @Test
+ void test_html4() {
+ javadoc("-d", "out-html4",
+ "-html4",
+ "-sourcepath", testSrc,
+ "p1", "p2");
+ checkExit(Exit.OK);
+
+ // Testing only for the presence of <a name>
+ checkOutput("p1/C1.html", true,
+ "<a name=\"skip.navbar.top\">\n"
+ + "<!-- -->\n"
+ + "</a>",
"<a name=\"skip.navbar.bottom\">\n"
+ "<!-- -->\n"
+ "</a>");
-
-
}
}
--- a/test/langtools/jdk/javadoc/doclet/AccessSummary/AccessSummary.java Thu Mar 01 16:35:36 2018 -0500
+++ b/test/langtools/jdk/javadoc/doclet/AccessSummary/AccessSummary.java Fri Mar 02 21:00:12 2018 +0100
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2002, 2017, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2002, 2018, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
@@ -23,7 +23,7 @@
/*
* @test
- * @bug 4637604 4775148 8183037
+ * @bug 4637604 4775148 8183037 8182765
* @summary Test the tables for summary attribute
* @author dkramer
* @library ../lib
@@ -47,15 +47,29 @@
void testAccessSummary() {
javadoc("-d", "out", "-sourcepath", testSrc, "p1", "p2");
checkExit(Exit.OK);
- checkOutput("overview-summary.html", true,
+ checkSummary(false);
+ }
+
+ @Test
+ void testAccessSummary_html4() {
+ javadoc("-d", "out-html4",
+ "-html4",
+ "-sourcepath", testSrc,
+ "p1", "p2");
+ checkExit(Exit.OK);
+ checkSummary(true);
+ }
+
+ void checkSummary(boolean found) {
+ checkOutput("overview-summary.html", found,
"summary=\"Package Summary table, listing packages, and an explanation\"");
- // Test that the summary attribute appears
- checkOutput("p1/C1.html", true,
+ // Test that the summary attribute appears or not
+ checkOutput("p1/C1.html", found,
"summary=\"Constructor Summary table, listing constructors, and an explanation\"");
- // Test that the summary attribute appears
- checkOutput("constant-values.html", true,
+ // Test that the summary attribute appears or not
+ checkOutput("constant-values.html", found,
"summary=\"Constant Field Values table, listing constant fields, and values\"");
}
}
--- a/test/langtools/jdk/javadoc/doclet/MetaTag/MetaTag.java Thu Mar 01 16:35:36 2018 -0500
+++ b/test/langtools/jdk/javadoc/doclet/MetaTag/MetaTag.java Fri Mar 02 21:00:12 2018 +0100
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2002, 2016, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2002, 2018, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
@@ -23,7 +23,7 @@
/*
* @test
- * @bug 4034096 4764726 6235799
+ * @bug 4034096 4764726 6235799 8182765
* @summary Add support for HTML keywords via META tag for
* class and member names to improve API search
* @author dkramer
@@ -58,23 +58,7 @@
checkExit(Exit.OK);
- checkOutput("p1/C1.html", true,
- "<meta name=\"keywords\" content=\"p1.C1 class\">",
- "<meta name=\"keywords\" content=\"field1\">",
- "<meta name=\"keywords\" content=\"field2\">",
- "<meta name=\"keywords\" content=\"method1()\">",
- "<meta name=\"keywords\" content=\"method2()\">");
-
- checkOutput("p1/package-summary.html", true,
- "<meta name=\"keywords\" content=\"p1 package\">");
-
- checkOutput("overview-summary.html", true,
- "<meta name=\"keywords\" content=\"Overview, Sample Packages\">");
-
- // NOTE: Hopefully, this regression test is not run at midnight. If the output
- // was generated yesterday and this test is run today, the test will fail.
- checkOutput("overview-summary.html", true,
- "<meta name=\"date\" content=\"" + date() + "\">");
+ checkMeta("dc.created", true);
}
@Test
@@ -87,24 +71,55 @@
checkExit(Exit.OK);
// No keywords when -keywords is not used.
- checkOutput("p1/C1.html", false,
- "<META NAME=\"keywords\" CONTENT=\"p1.C1 class\">",
- "<META NAME=\"keywords\" CONTENT=\"field1\">",
- "<META NAME=\"keywords\" CONTENT=\"field2\">",
- "<META NAME=\"keywords\" CONTENT=\"method1()\">",
- "<META NAME=\"keywords\" CONTENT=\"method2()\">");
+ checkMeta("dc.created", false);
+ }
+
+ @Test
+ void testStandard_html4() {
+ javadoc("-d", "out-1-html4",
+ "-html4",
+ "-sourcepath", testSrc,
+ "-keywords",
+ "-doctitle", "Sample Packages",
+ "p1", "p2");
+
+ checkExit(Exit.OK);
+
+ checkMeta("date", true);
+ }
- checkOutput("p1/package-summary.html", false,
- "<META NAME=\"keywords\" CONTENT=\"p1 package\">");
+ @Test
+ void testNoTimestamp_html4() {
+ javadoc("-d", "out-2-html4",
+ "-html4",
+ "-sourcepath", testSrc,
+ "-notimestamp",
+ "-doctitle", "Sample Packages",
+ "p1", "p2");
+ checkExit(Exit.OK);
+
+ // No keywords when -keywords is not used.
+ checkMeta("date", false);
+ }
- checkOutput("overview-summary.html", false,
- "<META NAME=\"keywords\" CONTENT=\"Overview Summary, Sample Packages\">");
+ void checkMeta(String metaNameDate, boolean found) {
+ checkOutput("p1/C1.html", found,
+ "<meta name=\"keywords\" content=\"p1.C1 class\">",
+ "<meta name=\"keywords\" content=\"field1\">",
+ "<meta name=\"keywords\" content=\"field2\">",
+ "<meta name=\"keywords\" content=\"method1()\">",
+ "<meta name=\"keywords\" content=\"method2()\">");
- // The date metatag should not show up when -notimestamp is used.
+ checkOutput("p1/package-summary.html", found,
+ "<meta name=\"keywords\" content=\"p1 package\">");
+
+ checkOutput("overview-summary.html", found,
+ "<meta name=\"keywords\" content=\"Overview, Sample Packages\">");
+
// NOTE: Hopefully, this regression test is not run at midnight. If the output
// was generated yesterday and this test is run today, the test will fail.
- checkOutput("overview-summary.html", false,
- "<META NAME=\"date\" CONTENT=\"" + date() + "\">");
+ checkOutput("overview-summary.html", found,
+ "<meta name=\"" + metaNameDate + "\" content=\"" + date() + "\">");
}
private static final SimpleDateFormat dateFormat = new SimpleDateFormat("yyyy-MM-dd");
--- a/test/langtools/jdk/javadoc/doclet/ValidHtml/ValidHtml.java Thu Mar 01 16:35:36 2018 -0500
+++ b/test/langtools/jdk/javadoc/doclet/ValidHtml/ValidHtml.java Fri Mar 02 21:00:12 2018 +0100
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2002, 2016, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2002, 2018, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
@@ -23,7 +23,7 @@
/*
* @test
- * @bug 4275630 4749453 4625400 4753048 4415270 8074521
+ * @bug 4275630 4749453 4625400 4753048 4415270 8074521 8182765
* @summary Generated HTML is invalid with frames.
* Displays unnecessary horizontal scroll bars.
* Missing whitespace in DOCTYPE declaration
@@ -53,26 +53,42 @@
"-sourcepath", testSrc,
"p1", "p2");
checkExit(Exit.OK);
-
- // Test the proper DOCTYPE element are present:
- checkOutput("index.html", true, LOOSE);
- checkOutput("overview-summary.html", true, LOOSE);
- checkOutput("p1/package-summary.html", true, LOOSE);
- checkOutput("p1/C.html", true, LOOSE);
- checkOutput("overview-frame.html", true, LOOSE);
- checkOutput("allclasses-frame.html", true, LOOSE);
- checkOutput("p1/package-frame.html", true, LOOSE);
-
// Test for IFRAME element:
checkOutput("index.html", true,
"<iframe");
-
// Test the table elements are in the correct order:
checkOutput("p1/package-use.html", true,
"</td>\n"
+ "</tr>");
+ String HTML5 = "<!DOCTYPE HTML>";
+ checkValidHTML(HTML5);
}
- private static final String LOOSE =
- "<!DOCTYPE HTML PUBLIC \"-//W3C//DTD HTML 4.01 Transitional//EN\" \"http://www.w3.org/TR/html4/loose.dtd\">";
+ @Test
+ void test_html4() {
+ // Test for all cases except the split index page
+ javadoc("-d", "out-html4",
+ "-html4",
+ "-doctitle", "Document Title",
+ "-windowtitle", "Window Title",
+ "-use",
+ "-overview", testSrc("overview.html"),
+ "-sourcepath", testSrc,
+ "p1", "p2");
+ checkExit(Exit.OK);
+ String HTML4 = "<!DOCTYPE HTML PUBLIC \"-//W3C//DTD HTML 4.01 Transitional//EN\" \"http://www.w3.org/TR/html4/loose.dtd\">";
+
+ checkValidHTML(HTML4);
}
+
+ void checkValidHTML(String doctype) {
+ // Test the proper DOCTYPE element are present:
+ checkOutput("index.html", true, doctype);
+ checkOutput("overview-summary.html", true, doctype);
+ checkOutput("p1/package-summary.html", true, doctype);
+ checkOutput("p1/C.html", true, doctype);
+ checkOutput("overview-frame.html", true, doctype);
+ checkOutput("allclasses-frame.html", true, doctype);
+ checkOutput("p1/package-frame.html", true, doctype);
+ }
+}
--- a/test/langtools/jdk/javadoc/doclet/testAnchorNames/TestAnchorNames.java Thu Mar 01 16:35:36 2018 -0500
+++ b/test/langtools/jdk/javadoc/doclet/testAnchorNames/TestAnchorNames.java Fri Mar 02 21:00:12 2018 +0100
@@ -23,7 +23,7 @@
/*
* @test
- * @bug 8025633 8025524 8081854 8187521
+ * @bug 8025633 8025524 8081854 8187521 8182765
* @summary Test for valid name attribute in HTML anchors.
* @author Bhavesh Patel
* @library /tools/lib ../lib
@@ -33,7 +33,6 @@
*/
import java.io.IOException;
-import java.nio.charset.Charset;
import java.nio.file.Path;
import java.nio.file.Paths;
@@ -54,6 +53,7 @@
@Test
void testHtml4(Path ignore) {
javadoc("-d", "out-html4",
+ "-html4",
"-sourcepath", testSrc,
"-source", "8", //so that '_' can be used as an identifier
"-use",
@@ -175,7 +175,6 @@
"-sourcepath", testSrc,
"-source", "8", //so that '_' can be used as an identifier
"-use",
- "-html5",
"pkg1");
checkExit(Exit.OK);
--- a/test/langtools/jdk/javadoc/doclet/testAnnotationOptional/TestAnnotationOptional.java Thu Mar 01 16:35:36 2018 -0500
+++ b/test/langtools/jdk/javadoc/doclet/testAnnotationOptional/TestAnnotationOptional.java Fri Mar 02 21:00:12 2018 +0100
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2009, 2016, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2009, 2018, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
@@ -23,7 +23,7 @@
/*
* @test
- * @bug 8025633 8081854
+ * @bug 8025633 8081854 8182765
* @summary Make sure that annotations types with optional elements have
* element headers
* @author Mahmood Ali
@@ -48,6 +48,18 @@
checkExit(Exit.OK);
checkOutput("pkg/AnnotationOptional.html", true,
+ "<a id=\"annotation.type.element.detail\">");
+ }
+
+ @Test
+ void test_html4() {
+ javadoc("-d", "out-html4",
+ "-html4",
+ "-sourcepath", testSrc,
+ "pkg");
+ checkExit(Exit.OK);
+
+ checkOutput("pkg/AnnotationOptional.html", true,
"<a name=\"annotation.type.element.detail\">");
}
}
--- a/test/langtools/jdk/javadoc/doclet/testAnnotationTypes/TestAnnotationTypes.java Thu Mar 01 16:35:36 2018 -0500
+++ b/test/langtools/jdk/javadoc/doclet/testAnnotationTypes/TestAnnotationTypes.java Fri Mar 02 21:00:12 2018 +0100
@@ -23,7 +23,7 @@
/*
* @test
- * @bug 4973609 8015249 8025633 8026567 6469561 8071982 8162363
+ * @bug 4973609 8015249 8025633 8026567 6469561 8071982 8162363 8182765
* @summary Make sure that annotation types with 0 members does not have
* extra HR tags.
* @author jamieh
@@ -72,11 +72,11 @@
checkOutput("pkg/AnnotationType.html", true,
"<!-- ============ ANNOTATION TYPE MEMBER DETAIL =========== -->",
"<ul class=\"blockList\">",
- "<li class=\"blockList\"><a name=\"annotation.type.element.detail\">",
+ "<li class=\"blockList\"><a id=\"annotation.type.element.detail\">",
"<!-- -->",
"</a>",
"<h3>Element Detail</h3>",
- "<a name=\"value--\">",
+ "<a id=\"value()\">",
"<!-- -->",
"</a>",
"<ul class=\"blockListLast\">",
@@ -89,7 +89,10 @@
+ "<P>\n\n"
+ "<P>"
+ "<!-- ========= END OF CLASS DATA ========= -->" + "<HR>");
+ }
+ @Test
+ void testLinkSource() {
javadoc("-d", "out-2",
"-linksource",
"-sourcepath", testSrc,
@@ -112,4 +115,16 @@
"public @interface <a href=\"../src-html/pkg/AnnotationTypeField.html#line.31"
+ "\">AnnotationTypeField</a></pre>");
}
+
+ @Test
+ void test_html4() {
+ javadoc("-d", "out-html4",
+ "-html4",
+ "-sourcepath", testSrc,
+ "pkg");
+ checkExit(Exit.OK);
+ checkOutput("pkg/AnnotationType.html", true,
+ "<li class=\"blockList\"><a name=\"annotation.type.element.detail\">",
+ "<a name=\"value--\">");
}
+}
--- a/test/langtools/jdk/javadoc/doclet/testClassCrossReferences/TestClassCrossReferences.java Thu Mar 01 16:35:36 2018 -0500
+++ b/test/langtools/jdk/javadoc/doclet/testClassCrossReferences/TestClassCrossReferences.java Fri Mar 02 21:00:12 2018 +0100
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2002, 2016, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2002, 2018, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
@@ -23,7 +23,7 @@
/*
* @test
- * @bug 4652655 4857717 8025633 8026567 8071982 8164407
+ * @bug 4652655 4857717 8025633 8026567 8071982 8164407 8182765
* @summary This test verifies that class cross references work properly.
* @author jamieh
* @library ../lib
@@ -35,6 +35,8 @@
public class TestClassCrossReferences extends JavadocTester {
+ static final String uri = "http://docs.oracle.com/javase/8/docs/api/";
+
public static void main(String... args) throws Exception {
TestClassCrossReferences tester = new TestClassCrossReferences();
tester.runTests();
@@ -42,8 +44,6 @@
@Test
void test() {
- final String uri = "http://docs.oracle.com/javase/8/docs/api/";
-
javadoc("-d", "out",
"-Xdoclint:none",
"-sourcepath", testSrc,
@@ -58,7 +58,7 @@
+ "title=\"class or interface in javax.swing.text\" class=\"externalLink\"><code>Link to AttributeContext innerclass</code></a>",
"<a href=\"" + uri + "java/math/BigDecimal.html?is-external=true\" "
+ "title=\"class or interface in java.math\" class=\"externalLink\"><code>Link to external class BigDecimal</code></a>",
- "<a href=\"" + uri + "java/math/BigInteger.html?is-external=true#gcd-java.math.BigInteger-\" "
+ "<a href=\"" + uri + "java/math/BigInteger.html?is-external=true#gcd(java.math.BigInteger)\" "
+ "title=\"class or interface in java.math\" class=\"externalLink\"><code>Link to external member gcd</code></a>",
"<a href=\"" + uri + "javax/tools/SimpleJavaFileObject.html?is-external=true#URI\" "
+ "title=\"class or interface in javax.tools\" class=\"externalLink\"><code>Link to external member URI</code></a>",
@@ -68,4 +68,18 @@
+ "</dl>");
}
+ @Test
+ void test_html4() {
+ javadoc("-d", "out-html4",
+ "-html4",
+ "-Xdoclint:none",
+ "-sourcepath", testSrc,
+ "-linkoffline", uri, testSrc,
+ testSrc("C.java"));
+ checkExit(Exit.OK);
+
+ checkOutput("C.html", true,
+ "<a href=\"" + uri + "java/math/BigInteger.html?is-external=true#gcd-java.math.BigInteger-\" "
+ + "title=\"class or interface in java.math\" class=\"externalLink\"><code>Link to external member gcd</code></a>");
}
+}
--- a/test/langtools/jdk/javadoc/doclet/testClassLinks/TestClassLinks.java Thu Mar 01 16:35:36 2018 -0500
+++ b/test/langtools/jdk/javadoc/doclet/testClassLinks/TestClassLinks.java Fri Mar 02 21:00:12 2018 +0100
@@ -23,7 +23,7 @@
/*
* @test
- * @bug 8163800 8175200 8186332
+ * @bug 8163800 8175200 8186332 8182765
* @summary The fix for JDK-8072052 shows up other minor incorrect use of styles
* @library ../lib
* @modules jdk.javadoc/jdk.javadoc.internal.tool
@@ -51,11 +51,11 @@
checkOutput("p/C1.html", true,
"<code><a href=\"C2.html\" title=\"class in p\">C2</a></code>",
- "<code><span class=\"memberNameLink\"><a href=\"#C1--\">C1</a></span>()</code>");
+ "<code><span class=\"memberNameLink\"><a href=\"#%3Cinit%3E()\">C1</a></span>()</code>");
checkOutput("p/C2.html", true,
"<code><a href=\"C3.html\" title=\"class in p\">C3</a></code>",
- "<code><span class=\"memberNameLink\"><a href=\"#C2--\">C2</a></span>()</code>");
+ "<code><span class=\"memberNameLink\"><a href=\"#%3Cinit%3E()\">C2</a></span>()</code>");
checkOutput("p/C3.html", true,
"<code><a href=\"I1.html\" title=\"interface in p\">I1</a></code>, "
@@ -63,7 +63,7 @@
+ "<code><a href=\"I2.html\" title=\"interface in p\">I2</a></code>, "
+ "<code><a href=\"IT1.html\" title=\"interface in p\">IT1</a><T></code>, "
+ "<code><a href=\"IT2.html\" title=\"interface in p\">IT2</a><java.lang.String></code>",
- "<code><span class=\"memberNameLink\"><a href=\"#C3--\">C3</a></span>()</code>");
+ "<code><span class=\"memberNameLink\"><a href=\"#%3Cinit%3E()\">C3</a></span>()</code>");
checkOutput("p/I1.html", true,
"<code><a href=\"C3.html\" title=\"class in p\">C3</a></code>",
@@ -82,7 +82,26 @@
checkOutput("p/IT2.html", true,
"code><a href=\"C3.html\" title=\"class in p\">C3</a></code>");
-
}
+ @Test
+ void test_html4() {
+
+ javadoc("-d", "out-html4",
+ "-html4",
+ "-Xdoclint:none",
+ "-sourcepath", testSrc,
+ "-package",
+ "p");
+ checkExit(Exit.OK);
+
+ checkOutput("p/C1.html", true,
+ "<code><span class=\"memberNameLink\"><a href=\"#C1--\">C1</a></span>()</code>");
+
+ checkOutput("p/C2.html", true,
+ "<code><span class=\"memberNameLink\"><a href=\"#C2--\">C2</a></span>()</code>");
+
+ checkOutput("p/C3.html", true,
+ "<code><span class=\"memberNameLink\"><a href=\"#C3--\">C3</a></span>()</code>");
}
+}
--- a/test/langtools/jdk/javadoc/doclet/testConstructors/TestConstructors.java Thu Mar 01 16:35:36 2018 -0500
+++ b/test/langtools/jdk/javadoc/doclet/testConstructors/TestConstructors.java Fri Mar 02 21:00:12 2018 +0100
@@ -23,7 +23,7 @@
/*
* @test
- * @bug 8025524 8031625 8081854 8175200 8186332
+ * @bug 8025524 8031625 8081854 8175200 8186332 8182765
* @summary Test for constructor name which should be a non-qualified name.
* @author Bhavesh Patel
* @library ../lib
@@ -48,6 +48,57 @@
checkOutput("pkg1/Outer.html", true,
"<dt><span class=\"seeLabel\">See Also:</span></dt>\n"
+ + "<dd><a href=\"Outer.Inner.html#%3Cinit%3E()\"><code>Inner()</code></a>, \n"
+ + "<a href=\"Outer.Inner.html#%3Cinit%3E(int)\"><code>Inner(int)</code></a>, \n"
+ + "<a href=\"Outer.Inner.NestedInner.html#%3Cinit%3E()\"><code>NestedInner()</code></a>, \n"
+ + "<a href=\"Outer.Inner.NestedInner.html#%3Cinit%3E(int)\"><code>NestedInner(int)</code></a>, \n"
+ + "<a href=\"#%3Cinit%3E()\"><code>Outer()</code></a>, \n"
+ + "<a href=\"#%3Cinit%3E(int)\"><code>Outer(int)</code></a></dd>",
+ "Link: <a href=\"Outer.Inner.html#%3Cinit%3E()\"><code>Inner()</code></a>, "
+ + "<a href=\"#%3Cinit%3E(int)\"><code>Outer(int)</code></a>, "
+ + "<a href=\"Outer.Inner.NestedInner.html#%3Cinit%3E(int)\"><code>NestedInner(int)</code></a>",
+ "<a href=\"#%3Cinit%3E()\">Outer</a></span>()",
+ "<a id=\"<init>(int)\">",
+ "<a href=\"#%3Cinit%3E(int)\">Outer</a></span>​(int i)",
+ "<a id=\"<init>(int)\">");
+
+ checkOutput("pkg1/Outer.Inner.html", true,
+ "<a href=\"#%3Cinit%3E()\">Inner</a></span>()",
+ "<a id=\"<init>()\">",
+ "<a href=\"#%3Cinit%3E(int)\">Inner</a></span>​(int i)",
+ "<a id=\"<init>(int)\">");
+
+ checkOutput("pkg1/Outer.Inner.NestedInner.html", true,
+ "<a href=\"#%3Cinit%3E()\">NestedInner</a></span>()",
+ "<a id=\"<init>()\">",
+ "<a href=\"#%3Cinit%3E(int)\">NestedInner</a></span>​(int i)",
+ "<a id=\"<init>(int)\">");
+
+ checkOutput("pkg1/Outer.Inner.html", false,
+ "Outer.Inner()",
+ "Outer.Inner(int)");
+
+ checkOutput("pkg1/Outer.Inner.NestedInner.html", false,
+ "Outer.Inner.NestedInner()",
+ "Outer.Inner.NestedInner(int)");
+
+ checkOutput("pkg1/Outer.html", false,
+ "<a href=\"Outer.Inner.html#Outer.Inner()\"><code>Outer.Inner()</code></a>",
+ "<a href=\"Outer.Inner.html#Outer.Inner(int)\"><code>Outer.Inner(int)</code></a>",
+ "<a href=\"Outer.Inner.NestedInner.html#Outer.Inner.NestedInner()\"><code>Outer.Inner.NestedInner()</code></a>",
+ "<a href=\"Outer.Inner.NestedInner.html#Outer.Inner.NestedInner(int)\"><code>Outer.Inner.NestedInner(int)</code></a>");
+ }
+
+ @Test
+ void test_html4() {
+ javadoc("-d", "out-html4",
+ "-html4",
+ "-sourcepath", testSrc,
+ "pkg1");
+ checkExit(Exit.OK);
+
+ checkOutput("pkg1/Outer.html", true,
+ "<dt><span class=\"seeLabel\">See Also:</span></dt>\n"
+ "<dd><a href=\"Outer.Inner.html#Inner--\"><code>Inner()</code></a>, \n"
+ "<a href=\"Outer.Inner.html#Inner-int-\"><code>Inner(int)</code></a>, \n"
+ "<a href=\"Outer.Inner.NestedInner.html#NestedInner--\"><code>NestedInner()</code></a>, \n"
--- a/test/langtools/jdk/javadoc/doclet/testDeprecatedDocs/TestDeprecatedDocs.java Thu Mar 01 16:35:36 2018 -0500
+++ b/test/langtools/jdk/javadoc/doclet/testDeprecatedDocs/TestDeprecatedDocs.java Fri Mar 02 21:00:12 2018 +0100
@@ -24,7 +24,7 @@
/*
* @test
* @bug 4927552 8026567 8071982 8162674 8175200 8175218 8183511 8186332
- * 8169819 8074407 8191030
+ * 8169819 8074407 8191030 8182765
* @summary test generated docs for deprecated items
* @author jamieh
* @library ../lib
@@ -209,6 +209,97 @@
+ "<li><a href=\"#enum.constant\">Enum Constants</a></li>\n"
+ "<li><a href=\"#annotation.type.member\">Annotation Type Elements</a></li>\n"
+ "</ul>",
+ "<a id=\"forRemoval\">",
+ "<table class=\"deprecatedSummary\">\n"
+ + "<caption><span>For Removal</span><span class=\"tabEnd\"> </span></caption>\n"
+ + "<tr>\n"
+ + "<th class=\"colFirst\" scope=\"col\">Element</th>\n"
+ + "<th class=\"colLast\" scope=\"col\">Description</th>\n"
+ + "</tr>",
+ "<table class=\"deprecatedSummary\">\n"
+ + "<caption><span>Enums</span><span class=\"tabEnd\"> </span></caption>\n"
+ + "<tr>\n"
+ + "<th class=\"colFirst\" scope=\"col\">Enum</th>\n"
+ + "<th class=\"colLast\" scope=\"col\">Description</th>\n"
+ + "</tr>\n"
+ + "<tbody>\n"
+ + "<tr class=\"altColor\">\n"
+ + "<th class=\"colDeprecatedItemName\" scope=\"row\"><a href=\"pkg/TestEnum.html\" title=\"enum in pkg\">pkg.TestEnum</a></th>\n"
+ + "<td class=\"colLast\">\n"
+ + "<div class=\"deprecationComment\">enum_test1 passes.</div>\n"
+ + "</td>\n"
+ + "</tr>\n"
+ + "</tbody>\n"
+ + "</table>",
+ "<table class=\"deprecatedSummary\">\n"
+ + "<caption><span>Exceptions</span><span class=\"tabEnd\"> </span></caption>\n"
+ + "<tr>\n"
+ + "<th class=\"colFirst\" scope=\"col\">Exceptions</th>\n"
+ + "<th class=\"colLast\" scope=\"col\">Description</th>\n"
+ + "</tr>\n"
+ + "<tbody>\n"
+ + "<tr class=\"altColor\">\n"
+ + "<th class=\"colDeprecatedItemName\" scope=\"row\"><a href=\"pkg/TestException.html\" title=\"class in pkg\">pkg.TestException</a></th>\n"
+ + "<td class=\"colLast\">\n"
+ + "<div class=\"deprecationComment\">exception_test1 passes.</div>\n"
+ + "</td>\n"
+ + "</tr>\n"
+ + "</tbody>\n"
+ + "</table>",
+ "<table class=\"deprecatedSummary\">\n"
+ + "<caption><span>Fields</span><span class=\"tabEnd\"> </span></caption>\n"
+ + "<tr>\n"
+ + "<th class=\"colFirst\" scope=\"col\">Field</th>\n"
+ + "<th class=\"colLast\" scope=\"col\">Description</th>\n"
+ + "</tr>\n"
+ + "<tbody>\n"
+ + "<tr class=\"altColor\">\n"
+ + "<th class=\"colDeprecatedItemName\" scope=\"row\"><a href=\"pkg/DeprecatedClassByAnnotation.html#field\">pkg.DeprecatedClassByAnnotation.field</a></th>\n"
+ + "<td class=\"colLast\"></td>\n"
+ + "</tr>\n"
+ + "<tr class=\"rowColor\">\n"
+ + "<th class=\"colDeprecatedItemName\" scope=\"row\"><a href=\"pkg/TestAnnotationType.html#field\">pkg.TestAnnotationType.field</a></th>\n"
+ + "<td class=\"colLast\">\n"
+ + "<div class=\"deprecationComment\">annotation_test4 passes.</div>\n"
+ + "</td>\n"
+ + "</tr>\n"
+ + "<tr class=\"altColor\">\n"
+ + "<th class=\"colDeprecatedItemName\" scope=\"row\"><a href=\"pkg/TestClass.html#field\">pkg.TestClass.field</a></th>\n"
+ + "<td class=\"colLast\">\n"
+ + "<div class=\"deprecationComment\">class_test2 passes. This is the second sentence of deprecated description for a field.</div>\n"
+ + "</td>\n"
+ + "</tr>\n"
+ + "<tr class=\"rowColor\">\n"
+ + "<th class=\"colDeprecatedItemName\" scope=\"row\"><a href=\"pkg/TestError.html#field\">pkg.TestError.field</a></th>\n"
+ + "<td class=\"colLast\">\n"
+ + "<div class=\"deprecationComment\">error_test2 passes.</div>\n"
+ + "</td>\n"
+ + "</tr>\n"
+ + "<tr class=\"altColor\">\n"
+ + "<th class=\"colDeprecatedItemName\" scope=\"row\"><a href=\"pkg/TestException.html#field\">pkg.TestException.field</a></th>\n"
+ + "<td class=\"colLast\">\n"
+ + "<div class=\"deprecationComment\">exception_test2 passes.</div>\n"
+ + "</td>\n"
+ + "</tr>\n"
+ + "<tr class=\"rowColor\">\n"
+ + "<th class=\"colDeprecatedItemName\" scope=\"row\"><a href=\"pkg/TestInterface.html#field\">pkg.TestInterface.field</a></th>\n"
+ + "<td class=\"colLast\">\n"
+ + "<div class=\"deprecationComment\">interface_test2 passes.</div>\n"
+ + "</td>\n"
+ + "</tr>\n"
+ + "</tbody>\n"
+ + "</table>");
+ }
+
+ @Test
+ void test_html4() {
+ javadoc("-d", "out-html4",
+ "-html4",
+ "-sourcepath", testSrc,
+ "pkg");
+ checkExit(Exit.OK);
+
+ checkOutput("deprecated-list.html", true,
"<a name=\"forRemoval\">",
"<table class=\"deprecatedSummary\" summary=\"For Removal table, listing for removal, and an explanation\">\n"
+ "<caption><span>For Removal</span><span class=\"tabEnd\"> </span></caption>\n"
--- a/test/langtools/jdk/javadoc/doclet/testExternalOverridenMethod/TestExternalOverridenMethod.java Thu Mar 01 16:35:36 2018 -0500
+++ b/test/langtools/jdk/javadoc/doclet/testExternalOverridenMethod/TestExternalOverridenMethod.java Fri Mar 02 21:00:12 2018 +0100
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2003, 2016, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2003, 2018, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
@@ -23,7 +23,7 @@
/*
* @test
- * @bug 4857717 8025633 8026567 8164407
+ * @bug 4857717 8025633 8026567 8164407 8182765
* @summary Test to make sure that externally overriden and implemented methods
* are documented properly. The method should still include "implements" or
* "overrides" documentation even though the method is external.
@@ -33,8 +33,9 @@
* @build JavadocTester TestExternalOverridenMethod
* @run main TestExternalOverridenMethod
*/
+public class TestExternalOverridenMethod extends JavadocTester {
-public class TestExternalOverridenMethod extends JavadocTester {
+ static final String uri = "http://java.sun.com/j2se/1.4.1/docs/api";
public static void main(String... args) throws Exception {
TestExternalOverridenMethod tester = new TestExternalOverridenMethod();
@@ -43,7 +44,6 @@
@Test
void test() {
- String uri = "http://java.sun.com/j2se/1.4.1/docs/api";
javadoc("-d", "out",
"-sourcepath", testSrc,
"-linkoffline", uri, testSrc,
@@ -52,6 +52,29 @@
checkOutput("pkg/XReader.html", true,
"<dt><span class=\"overrideSpecifyLabel\">Overrides:</span></dt>\n"
+ + "<dd><code><a href=\"" + uri + "/java/io/FilterReader.html?is-external=true#read()\" "
+ + "title=\"class or interface in java.io\" class=\"externalLink\">read</a></code> in class <code>"
+ + "<a href=\"" + uri + "/java/io/FilterReader.html?is-external=true\" "
+ + "title=\"class or interface in java.io\" class=\"externalLink\">FilterReader</a></code></dd>",
+ "<dt><span class=\"overrideSpecifyLabel\">Specified by:</span></dt>\n"
+ + "<dd><code><a href=\"" + uri + "/java/io/DataInput.html?is-external=true#readInt()\" "
+ + "title=\"class or interface in java.io\" class=\"externalLink\">readInt</a></code> in interface <code>"
+ + "<a href=\"" + uri + "/java/io/DataInput.html?is-external=true\" "
+ + "title=\"class or interface in java.io\" class=\"externalLink\">DataInput</a></code></dd>"
+ );
+ }
+
+ @Test
+ void test_html4() {
+ javadoc("-d", "out-html4",
+ "-html4",
+ "-sourcepath", testSrc,
+ "-linkoffline", uri, testSrc,
+ "pkg");
+ checkExit(Exit.OK);
+
+ checkOutput("pkg/XReader.html", true,
+ "<dt><span class=\"overrideSpecifyLabel\">Overrides:</span></dt>\n"
+ "<dd><code><a href=\"" + uri + "/java/io/FilterReader.html?is-external=true#read--\" "
+ "title=\"class or interface in java.io\" class=\"externalLink\">read</a></code> in class <code>"
+ "<a href=\"" + uri + "/java/io/FilterReader.html?is-external=true\" "
--- a/test/langtools/jdk/javadoc/doclet/testHiddenTag/TestHiddenTag.java Thu Mar 01 16:35:36 2018 -0500
+++ b/test/langtools/jdk/javadoc/doclet/testHiddenTag/TestHiddenTag.java Fri Mar 02 21:00:12 2018 +0100
@@ -23,7 +23,7 @@
/*
* @test
- * @bug 8073100
+ * @bug 8073100 8182765
* @summary ensure the hidden tag works as intended
* @library ../lib
* @modules jdk.javadoc/jdk.javadoc.internal.tool
@@ -38,7 +38,6 @@
tester.runTests();
}
-
/**
* Perform tests on @hidden tags
*/
@@ -51,20 +50,20 @@
checkExit(Exit.OK);
checkOutput("pkg1/A.html", true,
- "<a name=\"visibleField\">",
- "<a name=\"visibleMethod--\">",
+ "<a id=\"visibleField\">",
+ "<a id=\"visibleMethod()\">",
"<dt>Direct Known Subclasses:</dt>\n" +
"<dd><code><a href=\"A.VisibleInner.html\" title=\"class in pkg1\">" +
"A.VisibleInner</a></code>, <code><a href=\"A.VisibleInnerExtendsInvisibleInner.html\" " +
"title=\"class in pkg1\">A.VisibleInnerExtendsInvisibleInner</a></code></dd>");
checkOutput("pkg1/A.html", false,
- "<a name=\"inVisibleField\">",
- "<a name=\"inVisibleMethod--\">");
+ "<a id=\"inVisibleField\">",
+ "<a id=\"inVisibleMethod()\">");
checkOutput("pkg1/A.VisibleInner.html", true,
"<code><a href=\"A.html#visibleField\">visibleField</a></code>",
- "<code><a href=\"A.html#visibleMethod--\">visibleMethod</a></code>",
+ "<code><a href=\"A.html#visibleMethod()\">visibleMethod</a></code>",
"<h3>Nested classes/interfaces inherited from class pkg1." +
"<a href=\"A.html\" title=\"class in pkg1\">A</a></h3>\n" +
"<code><a href=\"A.VisibleInner.html\" title=\"class in pkg1\">" +
@@ -73,16 +72,16 @@
"</ul>");
checkOutput("pkg1/A.VisibleInner.html", false,
- "../pkg1/A.VisibleInner.html#VisibleInner--",
- "<a name=\"inVisibleField\">",
- "<a name=\"inVisibleMethod--\">");
+ "../pkg1/A.VisibleInner.html#VisibleInner()",
+ "<a id=\"inVisibleField\">",
+ "<a id=\"inVisibleMethod()\">");
checkOutput("pkg1/A.VisibleInnerExtendsInvisibleInner.html", true,
"<pre>public static class <span class=\"typeNameLabel\">" +
"A.VisibleInnerExtendsInvisibleInner</span>\n" +
"extends <a href=\"A.html\" title=\"class in pkg1\">A</a></pre>",
"<code><a href=\"A.html#visibleField\">visibleField</a></code></li>",
- "<code><a href=\"A.html#visibleMethod--\">visibleMethod</a></code>");
+ "<code><a href=\"A.html#visibleMethod()\">visibleMethod</a></code>");
checkOutput("pkg1/A.VisibleInnerExtendsInvisibleInner.html", false,
"invisibleField",
@@ -98,6 +97,33 @@
checkFiles(false,
"pkg1/A.InvisibleInner.html",
"pkg1/A.InvisibleInnerExtendsVisibleInner.html");
+ }
+ @Test
+ public void test1_html4() {
+ javadoc("-d", "out1-html4",
+ "-html4",
+ "-sourcepath", testSrc,
+ "-package",
+ "pkg1");
+ checkExit(Exit.OK);
+
+ checkOutput("pkg1/A.html", true,
+ "<a name=\"visibleField\">",
+ "<a name=\"visibleMethod--\">");
+
+ checkOutput("pkg1/A.VisibleInner.html", true,
+ "<code><a href=\"A.html#visibleMethod--\">visibleMethod</a></code>");
+
+ checkOutput("pkg1/A.VisibleInnerExtendsInvisibleInner.html", true,
+ "<code><a href=\"A.html#visibleMethod--\">visibleMethod</a></code>");
+
+ checkOutput("pkg1/A.html", false,
+ "<a name=\"inVisibleMethod--\">");
+
+ checkOutput("pkg1/A.VisibleInner.html", false,
+ "../pkg1/A.VisibleInner.html#VisibleInner--",
+ "<a name=\"inVisibleField\">",
+ "<a name=\"inVisibleMethod--\">");
}
}
--- a/test/langtools/jdk/javadoc/doclet/testHref/TestHref.java Thu Mar 01 16:35:36 2018 -0500
+++ b/test/langtools/jdk/javadoc/doclet/testHref/TestHref.java Fri Mar 02 21:00:12 2018 +0100
@@ -23,7 +23,7 @@
/*
* @test
- * @bug 4663254 8016328 8025633 8026567 8081854
+ * @bug 4663254 8016328 8025633 8026567 8081854 8182765
* @summary Verify that spaces do not appear in hrefs and anchors.
* @author jamieh
* @library ../lib
@@ -50,6 +50,49 @@
checkOutput("pkg/C1.html", true,
//External link.
+ "href=\"http://java.sun.com/j2se/1.4/docs/api/java/lang/Object.html?is-external=true#wait(long,int)\"",
+ //Member summary table link.
+ "href=\"#method(int,int,java.util.ArrayList)\"",
+ //Anchor test.
+ "<a id=\"method(int,int,java.util.ArrayList)\">\n"
+ + "<!-- -->\n"
+ + "</a>",
+ //Backward compatibility anchor test."pkg/C1.html",
+ "<a id=\"method(int,int,java.util.ArrayList)\">\n"
+ + "<!-- -->\n"
+ + "</a>");
+
+ checkOutput("pkg/C2.html", true,
+ //{@link} test.
+ "Link: <a href=\"C1.html#method(int,int,java.util.ArrayList)\">",
+ //@see test.
+ "See Also:</span></dt>\n"
+ + "<dd><a href=\"C1.html#method(int,int,java.util.ArrayList)\">"
+ );
+
+ checkOutput("pkg/C4.html", true,
+ //Header does not link to the page itself.
+ "Class C4<E extends C4<E>></h2>",
+ //Signature does not link to the page itself.
+ "public abstract class <span class=\"typeNameLabel\">C4<E extends C4<E>></span>"
+ );
+
+ checkOutput(Output.OUT, false,
+ "<a> tag is malformed");
+ }
+
+ @Test
+ void test_html4() {
+ javadoc("-Xdoclint:none",
+ "-d", "out-html4",
+ "-html4",
+ "-sourcepath", testSrc,
+ "-linkoffline", "http://java.sun.com/j2se/1.4/docs/api/", testSrc,
+ "pkg");
+ checkExit(Exit.OK);
+
+ checkOutput("pkg/C1.html", true,
+ //External link.
"href=\"http://java.sun.com/j2se/1.4/docs/api/java/lang/Object.html?is-external=true#wait-long-int-\"",
//Member summary table link.
"href=\"#method-int-int-java.util.ArrayList-\"",
@@ -69,15 +112,5 @@
"See Also:</span></dt>\n"
+ "<dd><a href=\"C1.html#method-int-int-java.util.ArrayList-\">"
);
-
- checkOutput("pkg/C4.html", true,
- //Header does not link to the page itself.
- "Class C4<E extends C4<E>></h2>",
- //Signature does not link to the page itself.
- "public abstract class <span class=\"typeNameLabel\">C4<E extends C4<E>></span>"
- );
-
- checkOutput(Output.OUT, false,
- "<a> tag is malformed");
}
}
--- a/test/langtools/jdk/javadoc/doclet/testHtmlDefinitionListTag/TestHtmlDefinitionListTag.java Thu Mar 01 16:35:36 2018 -0500
+++ b/test/langtools/jdk/javadoc/doclet/testHtmlDefinitionListTag/TestHtmlDefinitionListTag.java Fri Mar 02 21:00:12 2018 +0100
@@ -23,7 +23,7 @@
/*
* @test
- * @bug 6786690 6820360 8025633 8026567 8175200 8183511 8186332 8074407
+ * @bug 6786690 6820360 8025633 8026567 8175200 8183511 8186332 8074407 8182765
* @summary This test verifies the nesting of definition list tags.
* @author Bhavesh Patel
* @library ../lib
@@ -58,6 +58,17 @@
}
@Test
+ void test_Comment_Deprecated_html4() {
+ javadoc("-Xdoclint:none",
+ "-d", "out-1-html4",
+ "-html4",
+ "-sourcepath", testSrc,
+ "pkg1");
+ checkExit(Exit.OK);
+ checkCommentDeprecated_html4(true);
+ }
+
+ @Test
void test_NoComment_Deprecated() {
// tester.run(ARGS2, TEST_ALL, NEGATED_TEST_NO_C5);
// tester.runTestsOnHTML(NO_TEST, NEGATED_TEST_C5);
@@ -73,6 +84,18 @@
}
@Test
+ void test_NoComment_Deprecated_html4() {
+ javadoc("-Xdoclint:none",
+ "-d", "out-2-html4",
+ "-html4",
+ "-nocomment",
+ "-sourcepath", testSrc,
+ "pkg1");
+ checkExit(Exit.OK);
+ checkCommentDeprecated_html4(false);
+ }
+
+ @Test
void test_Comment_NoDeprecated() {
// tester.run(ARGS3, TEST_ALL, NEGATED_TEST_NO_C5);
// tester.runTestsOnHTML(TEST_NODEPR, TEST_NOCMNT_NODEPR);
@@ -88,6 +111,19 @@
}
@Test
+ void test_Comment_NoDeprecated_html4() {
+ javadoc("-Xdoclint:none",
+ "-d", "out-3-html4",
+ "-html4",
+ "-nodeprecated",
+ "-sourcepath", testSrc,
+ "pkg1");
+ checkExit(Exit.OK);
+ checkNoDeprecated_html4();
+ checkNoCommentNoDeprecated_html4(false);
+ }
+
+ @Test
void testNoCommentNoDeprecated() {
// tester.run(ARGS4, TEST_ALL, NEGATED_TEST_NO_C5);
// tester.runTestsOnHTML(TEST_NOCMNT_NODEPR, TEST_CMNT_DEPR);
@@ -103,6 +139,19 @@
checkCommentDeprecated(false);
}
+ @Test
+ void testNoCommentNoDeprecated_html4() {
+ javadoc("-Xdoclint:none",
+ "-d", "out-4-html4",
+ "-html4",
+ "-nocomment",
+ "-nodeprecated",
+ "-sourcepath", testSrc,
+ "pkg1");
+ checkNoCommentNoDeprecated_html4(true);
+ checkCommentDeprecated_html4(false);
+ }
+
void checkCommon(boolean checkC5) {
// Test common to all runs of javadoc. The class signature should print
// properly enclosed definition list tags and the Annotation Type
@@ -166,7 +215,7 @@
+ "<dt><span class=\"simpleTagLabel\">Since:</span></dt>\n"
+ "<dd>1.4</dd>\n"
+ "<dt><span class=\"seeLabel\">See Also:</span></dt>\n"
- + "<dd><a href=\"#setUndecorated-boolean-\">"
+ + "<dd><a href=\"#setUndecorated(boolean)\">"
+ "<code>setUndecorated(boolean)</code></a></dd>\n"
+ "</dl>",
"<dl>\n"
@@ -193,7 +242,7 @@
+ "<dd>1.4</dd>\n"
+ "<dt><span class=\"seeLabel\">See Also:</span></dt>\n"
+ "<dd>"
- + "<a href=\"#readObject--\"><code>readObject()"
+ + "<a href=\"#readObject()\"><code>readObject()"
+ "</code></a></dd>\n"
+ "</dl>",
"<dl>\n"
@@ -201,7 +250,7 @@
+ "<dd><code>java.io.IOException</code></dd>\n"
+ "<dt><span class=\"seeLabel\">See Also:"
+ "</span></dt>\n"
- + "<dd><a href=\"#setUndecorated-boolean-\">"
+ + "<dd><a href=\"#setUndecorated(boolean)\">"
+ "<code>setUndecorated(boolean)</code></a></dd>\n"
+ "</dl>");
@@ -223,6 +272,85 @@
+ "java.io.IOException</code></dd>\n"
+ "<dt><span class=\"seeLabel\">See Also:</span>"
+ "</dt>\n"
+ + "<dd><a href=\"pkg1/C1.html#setUndecorated(boolean)\">"
+ + "<code>C1.setUndecorated(boolean)</code></a></dd>\n"
+ + "</dl>",
+ "<span class=\"deprecatedLabel\">Deprecated.</span>\n"
+ + "<div class=\"deprecationComment\">As of JDK version 1.5, replaced by\n"
+ + " <a href=\"pkg1/C1.html#setUndecorated(boolean)\">"
+ + "<code>setUndecorated(boolean)</code></a>.</div>\n"
+ + "</div>\n"
+ + "<div class=\"block\">This field indicates whether the C1 is "
+ + "undecorated.</div>\n"
+ + " \n"
+ + "<dl>\n"
+ + "<dt><span class=\"simpleTagLabel\">Since:</span></dt>\n"
+ + "<dd>1.4</dd>\n"
+ + "<dt><span class=\"seeLabel\">See Also:</span>"
+ + "</dt>\n"
+ + "<dd><a href=\"pkg1/C1.html#setUndecorated(boolean)\">"
+ + "<code>C1.setUndecorated(boolean)</code></a></dd>\n"
+ + "</dl>",
+ "<span class=\"deprecatedLabel\">Deprecated.</span>\n"
+ + "<div class=\"deprecationComment\">As of JDK version 1.5, replaced by\n"
+ + " <a href=\"pkg1/C1.html#setUndecorated(boolean)\">"
+ + "<code>setUndecorated(boolean)</code></a>.</div>\n"
+ + "</div>\n"
+ + "<div class=\"block\">Reads the object stream.</div>\n"
+ + "<dl>\n"
+ + "<dt><span class=\"throwsLabel\">Throws:"
+ + "</span></dt>\n"
+ + "<dd><code>java.io.IOException</code></dd>\n"
+ + "</dl>",
+ "<span class=\"deprecatedLabel\">Deprecated.</span>"
+ + "</div>\n"
+ + "<div class=\"block\">The name for this class.</div>");
+ }
+
+ void checkCommentDeprecated_html4(boolean expectFound) {
+ // Test for normal run of javadoc in which various ClassDocs and
+ // serialized form should have properly nested definition list tags
+ // enclosing comments, tags and deprecated information.
+ checkOutput("pkg1/C1.html", expectFound,
+ "<dl>\n"
+ + "<dt><span class=\"simpleTagLabel\">Since:</span></dt>\n"
+ + "<dd>1.4</dd>\n"
+ + "<dt><span class=\"seeLabel\">See Also:</span></dt>\n"
+ + "<dd><a href=\"#setUndecorated-boolean-\">"
+ + "<code>setUndecorated(boolean)</code></a></dd>\n"
+ + "</dl>",
+ "<dl>\n"
+ + "<dt><span class=\"paramLabel\">Parameters:</span></dt>\n"
+ + "<dd><code>undecorated"
+ + "</code> - <code>true</code> if no decorations are\n"
+ + " to be enabled;\n"
+ + " <code>false</code> "
+ + "if decorations are to be enabled.</dd>\n"
+ + "<dt><span class=\"simpleTagLabel\">Since:"
+ + "</span></dt>\n"
+ + "<dd>1.4</dd>\n"
+ + "<dt><span class=\"seeLabel\">See Also:</span></dt>\n"
+ + "<dd>"
+ + "<a href=\"#readObject--\"><code>readObject()"
+ + "</code></a></dd>\n"
+ + "</dl>",
+ "<dl>\n"
+ + "<dt><span class=\"throwsLabel\">Throws:</span></dt>\n"
+ + "<dd><code>java.io.IOException</code></dd>\n"
+ + "<dt><span class=\"seeLabel\">See Also:"
+ + "</span></dt>\n"
+ + "<dd><a href=\"#setUndecorated-boolean-\">"
+ + "<code>setUndecorated(boolean)</code></a></dd>\n"
+ + "</dl>");
+
+ checkOutput("serialized-form.html", expectFound,
+ "<dl>\n"
+ + "<dt><span class=\"throwsLabel\">Throws:</span>"
+ + "</dt>\n"
+ + "<dd><code>"
+ + "java.io.IOException</code></dd>\n"
+ + "<dt><span class=\"seeLabel\">See Also:</span>"
+ + "</dt>\n"
+ "<dd><a href=\"pkg1/C1.html#setUndecorated-boolean-\">"
+ "<code>C1.setUndecorated(boolean)</code></a></dd>\n"
+ "</dl>",
@@ -252,10 +380,7 @@
+ "<dt><span class=\"throwsLabel\">Throws:"
+ "</span></dt>\n"
+ "<dd><code>java.io.IOException</code></dd>\n"
- + "</dl>",
- "<span class=\"deprecatedLabel\">Deprecated.</span>"
- + "</div>\n"
- + "<div class=\"block\">The name for this class.</div>");
+ + "</dl>");
}
void checkNoDeprecated() {
@@ -310,6 +435,81 @@
+ "<dt><span class=\"simpleTagLabel\">Since:</span></dt>\n"
+ "<dd>1.4</dd>\n"
+ "<dt><span class=\"seeLabel\">See Also:</span></dt>\n"
+ + "<dd><a href=\"#readObject()\">"
+ + "<code>readObject()</code></a></dd>\n"
+ + "</dl>",
+ "<dl>\n"
+ + "<dt><span class=\"throwsLabel\">Throws:</span>"
+ + "</dt>\n"
+ + "<dd><code>java.io.IOException</code></dd>\n"
+ + "<dt>"
+ + "<span class=\"seeLabel\">See Also:</span></dt>\n"
+ + "<dd><a href=\"#setUndecorated(boolean)\">"
+ + "<code>setUndecorated(boolean)</code></a></dd>\n"
+ + "</dl>");
+
+ checkOutput("serialized-form.html", true,
+ "<dl>\n"
+ + "<dt><span class=\"throwsLabel\">Throws:</span>"
+ + "</dt>\n"
+ + "<dd><code>"
+ + "java.io.IOException</code></dd>\n"
+ + "<dt><span class=\"seeLabel\">See Also:</span>"
+ + "</dt>\n"
+ + "<dd><a href=\"pkg1/C1.html#setUndecorated(boolean)\">"
+ + "<code>C1.setUndecorated(boolean)</code></a></dd>\n"
+ + "</dl>",
+ "<span class=\"deprecatedLabel\">Deprecated.</span>\n"
+ + "<div class=\"deprecationComment\">As of JDK version 1.5, replaced by\n"
+ + " <a href=\"pkg1/C1.html#setUndecorated(boolean)\">"
+ + "<code>setUndecorated(boolean)</code></a>.</div>\n"
+ + "</div>\n"
+ + "<div class=\"block\">This field indicates whether the C1 is "
+ + "undecorated.</div>\n"
+ + " \n"
+ + "<dl>\n"
+ + "<dt><span class=\"simpleTagLabel\">Since:</span></dt>\n"
+ + "<dd>1.4</dd>\n"
+ + "<dt><span class=\"seeLabel\">See Also:</span>"
+ + "</dt>\n"
+ + "<dd><a href=\"pkg1/C1.html#setUndecorated(boolean)\">"
+ + "<code>C1.setUndecorated(boolean)</code></a></dd>\n"
+ + "</dl>",
+ "<span class=\"deprecatedLabel\">Deprecated.</span>\n"
+ + "<div class=\"deprecationComment\">As of JDK version 1.5, replaced by\n"
+ + " <a href=\"pkg1/C1.html#setUndecorated(boolean)\">"
+ + "<code>setUndecorated(boolean)</code></a>.</div>\n"
+ + "</div>\n"
+ + "<div class=\"block\">Reads the object stream.</div>\n"
+ + "<dl>\n"
+ + "<dt><span class=\"throwsLabel\">Throws:"
+ + "</span></dt>\n"
+ + "<dd><code>java.io.IOException</code></dd>\n"
+ + "</dl>",
+ "<span class=\"deprecatedLabel\">Deprecated.</span>"
+ + "</div>\n"
+ + "<div class=\"block\">"
+ + "The name for this class.</div>");
+ }
+
+ void checkNoDeprecated_html4() {
+ // Test with -nodeprecated option. The ClassDocs should have properly nested
+ // definition list tags enclosing comments and tags. The ClassDocs should not
+ // display definition list for deprecated information. The serialized form
+ // should display properly nested definition list tags for comments, tags
+ // and deprecated information.
+ checkOutput("pkg1/C1.html", true,
+ "<dl>\n"
+ + "<dt><span class=\"paramLabel\">Parameters:"
+ + "</span></dt>\n"
+ + "<dd><code>undecorated</code> - <code>true</code>"
+ + " if no decorations are\n"
+ + " to be enabled;\n"
+ + " <code>false</code> if decorations are to be enabled."
+ + "</dd>\n"
+ + "<dt><span class=\"simpleTagLabel\">Since:</span></dt>\n"
+ + "<dd>1.4</dd>\n"
+ + "<dt><span class=\"seeLabel\">See Also:</span></dt>\n"
+ "<dd><a href=\"#readObject--\">"
+ "<code>readObject()</code></a></dd>\n"
+ "</dl>",
@@ -360,11 +560,7 @@
+ "<dt><span class=\"throwsLabel\">Throws:"
+ "</span></dt>\n"
+ "<dd><code>java.io.IOException</code></dd>\n"
- + "</dl>",
- "<span class=\"deprecatedLabel\">Deprecated.</span>"
- + "</div>\n"
- + "<div class=\"block\">"
- + "The name for this class.</div>");
+ + "</dl>");
}
void checkNoCommentNoDeprecated(boolean expectFound) {
@@ -392,6 +588,30 @@
"<div class=\"deprecationBlock\"><span class=\"deprecatedLabel\">" +
"Deprecated.</span>\n"
+ "<div class=\"deprecationComment\">As of JDK version 1.5, replaced by\n"
+ + " <a href=\"pkg1/C1.html#setUndecorated(boolean)\"><code>"
+ + "setUndecorated(boolean)</code></a>.</div>\n"
+ + "</div>\n"
+ +
+ "</li>",
+ "<span class=\"deprecatedLabel\">"
+ + "Deprecated.</span>\n"
+ + "<div class=\"deprecationComment\">As of JDK version"
+ + " 1.5, replaced by\n"
+ + " <a href=\"pkg1/C1.html#setUndecorated(boolean)\">"
+ + "<code>setUndecorated(boolean)</code></a>.</div>\n"
+ + "</div>\n"
+ + "</li>");
+ }
+
+ void checkNoCommentNoDeprecated_html4(boolean expectFound) {
+ // Test with -nocomment and -nodeprecated options. The ClassDocs whould
+ // not display definition lists for any member details.
+ checkOutput("serialized-form.html", expectFound,
+ "<pre>boolean " +
+ "undecorated</pre>\n" +
+ "<div class=\"deprecationBlock\"><span class=\"deprecatedLabel\">" +
+ "Deprecated.</span>\n"
+ + "<div class=\"deprecationComment\">As of JDK version 1.5, replaced by\n"
+ " <a href=\"pkg1/C1.html#setUndecorated-boolean-\"><code>"
+ "setUndecorated(boolean)</code></a>.</div>\n"
+ "</div>\n"
--- a/test/langtools/jdk/javadoc/doclet/testHtmlTableStyles/TestHtmlTableStyles.java Thu Mar 01 16:35:36 2018 -0500
+++ b/test/langtools/jdk/javadoc/doclet/testHtmlTableStyles/TestHtmlTableStyles.java Fri Mar 02 21:00:12 2018 +0100
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2013, 2017, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2013, 2018, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
@@ -23,7 +23,7 @@
/*
* @test
- * @bug 8008164 8169819 8183037
+ * @bug 8008164 8169819 8183037 8182765
* @summary Test styles on HTML tables generated by javadoc.
* @author Bhavesh Patel
* @library ../lib
@@ -45,6 +45,43 @@
"-sourcepath", testSrc,
"-use",
"pkg1", "pkg2");
+ checkExit(Exit.ERROR);
+ checkOutput(Output.OUT, true,
+ "attribute not supported in HTML5: summary",
+ "attribute border for table only accepts \"\" or \"1\", use CSS instead: BORDER",
+ "attribute not supported in HTML5: cellpadding",
+ "attribute not supported in HTML5: cellspacing",
+ "attribute not supported in HTML5: align");
+
+ checkOutput("pkg1/TestTable.html", true,
+ "<table summary=\"Summary\" border cellpadding=3 cellspacing=1>",
+ "<table class=\"memberSummary\">",
+ "<table class=\"memberSummary\">",
+ "<table class=\"memberSummary\">");
+
+ checkOutput("pkg1/package-summary.html", true,
+ "<table class=\"typeSummary\">");
+
+ checkOutput("pkg1/class-use/TestTable.html", true,
+ "<table class=\"useSummary\">");
+
+ checkOutput("overview-summary.html", true,
+ "<table class=\"overviewSummary\">");
+
+ checkOutput("deprecated-list.html", true,
+ "<table class=\"deprecatedSummary\">");
+
+ checkOutput("constant-values.html", true,
+ "<table class=\"constantsSummary\">");
+ }
+
+ @Test
+ void test_html4() {
+ javadoc("-d", "out-html4",
+ "-html4",
+ "-sourcepath", testSrc,
+ "-use",
+ "pkg1", "pkg2");
checkExit(Exit.OK);
checkOutput("pkg1/TestTable.html", true,
--- a/test/langtools/jdk/javadoc/doclet/testHtmlTableTags/TestHtmlTableTags.java Thu Mar 01 16:35:36 2018 -0500
+++ b/test/langtools/jdk/javadoc/doclet/testHtmlTableTags/TestHtmlTableTags.java Fri Mar 02 21:00:12 2018 +0100
@@ -23,7 +23,7 @@
/*
* @test
- * @bug 6786688 8008164 8162363 8169819 8183037
+ * @bug 6786688 8008164 8162363 8169819 8183037 8182765
* @summary HTML tables should have table summary, caption and table headers.
* @author Bhavesh Patel
* @library ../lib
@@ -53,11 +53,95 @@
"pkg1", "pkg2");
checkExit(Exit.OK);
- checkHtmlTableSummaries();
+ checkHtmlTableTag();
checkHtmlTableCaptions();
checkHtmlTableHeaders();
}
+ @Test
+ void test_html4() {
+ javadoc("-d", "out-html4",
+ "-html4",
+ "-sourcepath", testSrc,
+ "-use",
+ "pkg1", "pkg2");
+ checkExit(Exit.OK);
+
+ checkHtmlTableSummaries();
+ }
+
+ /*
+ * Tests for validating table tag for HTML tables
+ */
+ void checkHtmlTableTag() {
+ //Package summary
+ checkOutput("pkg1/package-summary.html", true,
+ "<table class=\"typeSummary\">",
+ "<table class=\"typeSummary\">");
+
+ checkOutput("pkg2/package-summary.html", true,
+ "<table class=\"typeSummary\">",
+ "<table class=\"typeSummary\">");
+
+ // Class documentation
+ checkOutput("pkg1/C1.html", true,
+ "<table class=\"memberSummary\">",
+ "<table class=\"memberSummary\">");
+
+ checkOutput("pkg2/C2.html", true,
+ "<table class=\"memberSummary\">",
+ "<table class=\"memberSummary\">");
+
+ checkOutput("pkg2/C2.ModalExclusionType.html", true,
+ "<table class=\"memberSummary\">");
+
+ checkOutput("pkg2/C3.html", true,
+ "<table class=\"memberSummary\">");
+
+ checkOutput("pkg2/C4.html", true,
+ "<table class=\"memberSummary\">");
+
+ // Class use documentation
+ checkOutput("pkg1/class-use/I1.html", true,
+ "<table class=\"useSummary\">");
+
+ checkOutput("pkg1/class-use/C1.html", true,
+ "<table class=\"useSummary\">",
+ "<table class=\"useSummary\">");
+
+ checkOutput("pkg2/class-use/C2.html", true,
+ "<table class=\"useSummary\">",
+ "<table class=\"useSummary\">");
+
+ checkOutput("pkg2/class-use/C2.ModalExclusionType.html", true,
+ "<table class=\"useSummary\">");
+
+ checkOutput("pkg2/class-use/C2.ModalExclusionType.html", true,
+ "<table class=\"useSummary\">");
+
+ // Package use documentation
+ checkOutput("pkg1/package-use.html", true,
+ "<table class=\"useSummary\">",
+ "<table class=\"useSummary\">");
+
+ checkOutput("pkg2/package-use.html", true,
+ "<table class=\"useSummary\">",
+ "<table class=\"useSummary\">");
+
+ // Deprecated
+ checkOutput("deprecated-list.html", true,
+ "<table class=\"deprecatedSummary\">",
+ "<table class=\"deprecatedSummary\">");
+
+ // Constant values
+ checkOutput("constant-values.html", true,
+ "<table class=\"constantsSummary\">");
+
+ // Overview Summary
+ checkOutput("overview-summary.html", true,
+ "<table class=\"overviewSummary\">");
+ }
+
/*
* Tests for validating summary for HTML tables
*/
--- a/test/langtools/jdk/javadoc/doclet/testHtmlTag/TestHtmlTag.java Thu Mar 01 16:35:36 2018 -0500
+++ b/test/langtools/jdk/javadoc/doclet/testHtmlTag/TestHtmlTag.java Fri Mar 02 21:00:12 2018 +0100
@@ -23,7 +23,7 @@
/*
* @test
- * @bug 6786682 4649116
+ * @bug 6786682 4649116 8182765
* @summary This test verifies the use of lang attribute by <HTML>.
* @author Bhavesh Patel
* @library ../lib
@@ -106,6 +106,104 @@
checkExit(Exit.OK);
checkOutput("pkg3/package-summary.html", true,
+ "<div class=\"contentContainer\">\n"
+ + "<section role=\"region\"><a id=\"package.description\">\n"
+ + "<!-- -->\n"
+ + "</a>\n"
+ + "<div class=\"block\"><p>This is the first line. Note the newlines before the <p> is relevant.</div>\n"
+ + "</section>");
+
+ checkOutput("pkg3/A.DatatypeFactory.html", true,
+ "<div class=\"block\"><p>\n"
+ + " Factory that creates new <code>javax.xml.datatype</code>\n"
+ + " <code>Object</code>s that map XML to/from Java <code>Object</code>s.</p>\n"
+ + "\n"
+ + " <p>\n"
+ + " A new instance of the <code>DatatypeFactory</code> is created through the\n"
+ + " <a href=\"#newInstance()\"><code>newInstance()</code></a> method that uses the following implementation\n"
+ + " resolution mechanisms to determine an implementation:</p>\n"
+ + " <ol>\n"
+ + " <li>\n"
+ + " If the system property specified by <a href=\"#DATATYPEFACTORY_PROPERTY\"><code>DATATYPEFACTORY_PROPERTY</code></a>,\n"
+ + " \"<code>javax.xml.datatype.DatatypeFactory</code>\", exists, a class with\n"
+ + " the name of the property value is instantiated. Any Exception thrown\n"
+ + " during the instantiation process is wrapped as a\n"
+ + " <code>IllegalStateException</code>.\n"
+ + " </li>\n"
+ + " <li>\n"
+ + " If the file ${JAVA_HOME}/lib/jaxp.properties exists, it is loaded in a\n"
+ + " <code>Properties</code> <code>Object</code>. The\n"
+ + " <code>Properties</code> <code>Object </code> is then queried for the\n"
+ + " property as documented in the prior step and processed as documented in\n"
+ + " the prior step.\n"
+ + " </li>\n"
+ + " <li>\n"
+ + " Uses the service-provider loading facilities, defined by the\n"
+ + " <code>ServiceLoader</code> class, to attempt to locate and load an\n"
+ + " implementation of the service using the default loading mechanism:\n"
+ + " the service-provider loading facility will use the current thread's context class loader\n"
+ + " to attempt to load the service. If the context class loader is null, the system class loader will be used.\n"
+ + " <br>\n"
+ + " In case of <code>service configuration error</code> a\n"
+ + " <code>DatatypeConfigurationException</code> will be thrown.\n"
+ + " </li>\n"
+ + " <li>\n"
+ + " The final mechanism is to attempt to instantiate the <code>Class</code>\n"
+ + " specified by <a href=\"#DATATYPEFACTORY_IMPLEMENTATION_CLASS\"><code>DATATYPEFACTORY_IMPLEMENTATION_CLASS</code></a>. Any Exception\n"
+ + " thrown during the instantiation process is wrapped as a\n"
+ + " <code>IllegalStateException</code>.\n"
+ + " </li>\n"
+ + " </ol></div>");
+
+ checkOutput("pkg3/A.ActivationDesc.html", true,
+ "<pre>public class <span class=\"typeNameLabel\">A.ActivationDesc</span>\n"
+ + "extends java.lang.Object\n"
+ + "implements java.io.Serializable</pre>\n"
+ + "<div class=\"block\">An activation descriptor contains the information necessary to activate\n"
+ + " an object: <ul>\n"
+ + " <li> the object's group identifier,\n"
+ + " <li> the object's fully-qualified class name,\n"
+ + " <li> the object's code location (the location of the class), a codebase\n"
+ + " URL path,\n"
+ + " <li> the object's restart \"mode\", and,\n"
+ + " <li> a \"marshalled\" object that can contain object specific\n"
+ + " initialization data. </ul>\n"
+ + "\n"
+ + " <p>\n"
+ + " A descriptor registered with the activation system can be used to\n"
+ + " recreate/activate the object specified by the descriptor. The\n"
+ + " <code>MarshalledObject</code> in the object's descriptor is passed as the\n"
+ + " second argument to the remote object's constructor for object to use\n"
+ + " during reinitialization/activation.</div>");
+
+ checkOutput("pkg3/A.ActivationGroupID.html", true,
+ "<pre>public class <span class=\"typeNameLabel\">A.ActivationGroupID</span>\n"
+ + "extends java.lang.Object\n"
+ + "implements java.io.Serializable</pre>\n"
+ + "<div class=\"block\">The identifier for a registered activation group serves several purposes:\n"
+ + " <ul>\n"
+ + " <li>identifies the group uniquely within the activation system, and\n"
+ + " <li>contains a reference to the group's activation system so that the\n"
+ + " group can contact its activation system when necessary.</ul><p>\n"
+ + "\n"
+ + " The <code>ActivationGroupID</code> is returned from the call to\n"
+ + " <code>ActivationSystem.registerGroup</code> and is used to identify the\n"
+ + " group within the activation system. This group id is passed as one of the\n"
+ + " arguments to the activation group's special constructor when an\n"
+ + " activation group is created/recreated.</div>\n"
+ + "<dl>");
+ }
+
+ @Test
+ void test_other_html4() {
+ javadoc("-locale", "en_US",
+ "-d", "out-other-html4",
+ "-html4",
+ "-sourcepath", testSrc,
+ "pkg3");
+ checkExit(Exit.OK);
+
+ checkOutput("pkg3/package-summary.html", true,
"<div class=\"contentContainer\"><a name=\"package.description\">\n"
+ "<!-- -->\n"
+ "</a>\n"
@@ -154,43 +252,5 @@
+ " <code>IllegalStateException</code>.\n"
+ " </li>\n"
+ " </ol></div>");
-
- checkOutput("pkg3/A.ActivationDesc.html", true,
- "<pre>public class <span class=\"typeNameLabel\">A.ActivationDesc</span>\n"
- + "extends java.lang.Object\n"
- + "implements java.io.Serializable</pre>\n"
- + "<div class=\"block\">An activation descriptor contains the information necessary to activate\n"
- + " an object: <ul>\n"
- + " <li> the object's group identifier,\n"
- + " <li> the object's fully-qualified class name,\n"
- + " <li> the object's code location (the location of the class), a codebase\n"
- + " URL path,\n"
- + " <li> the object's restart \"mode\", and,\n"
- + " <li> a \"marshalled\" object that can contain object specific\n"
- + " initialization data. </ul>\n"
- + "\n"
- + " <p>\n"
- + " A descriptor registered with the activation system can be used to\n"
- + " recreate/activate the object specified by the descriptor. The\n"
- + " <code>MarshalledObject</code> in the object's descriptor is passed as the\n"
- + " second argument to the remote object's constructor for object to use\n"
- + " during reinitialization/activation.</div>");
-
- checkOutput("pkg3/A.ActivationGroupID.html", true,
- "<pre>public class <span class=\"typeNameLabel\">A.ActivationGroupID</span>\n"
- + "extends java.lang.Object\n"
- + "implements java.io.Serializable</pre>\n"
- + "<div class=\"block\">The identifier for a registered activation group serves several purposes:\n"
- + " <ul>\n"
- + " <li>identifies the group uniquely within the activation system, and\n"
- + " <li>contains a reference to the group's activation system so that the\n"
- + " group can contact its activation system when necessary.</ul><p>\n"
- + "\n"
- + " The <code>ActivationGroupID</code> is returned from the call to\n"
- + " <code>ActivationSystem.registerGroup</code> and is used to identify the\n"
- + " group within the activation system. This group id is passed as one of the\n"
- + " arguments to the activation group's special constructor when an\n"
- + " activation group is created/recreated.</div>\n"
- + "<dl>");
}
}
--- a/test/langtools/jdk/javadoc/doclet/testHtmlVersion/TestHtmlVersion.java Thu Mar 01 16:35:36 2018 -0500
+++ b/test/langtools/jdk/javadoc/doclet/testHtmlVersion/TestHtmlVersion.java Fri Mar 02 21:00:12 2018 +0100
@@ -23,7 +23,7 @@
/*
* @test
- * @bug 8072945 8081854 8141492 8148985 8150188 4649116 8173707 8151743 8169819 8183037
+ * @bug 8072945 8081854 8141492 8148985 8150188 4649116 8173707 8151743 8169819 8183037 8182765
* @summary Test the version of HTML generated by the javadoc tool.
* @author bpatel
* @library ../lib
@@ -41,7 +41,9 @@
@Test
void test1() {
- javadoc("-d", "out-1", "-private", "-linksource", "-html5",
+ javadoc("-d", "out-1",
+ "-private",
+ "-linksource",
"-sourcepath", testSrc,
"-use",
"pkg", "pkg1", "pkg2", "pkg3");
@@ -53,7 +55,10 @@
@Test
void test2() {
- javadoc("-d", "out-2", "-private", "-linksource", "-html4",
+ javadoc("-d", "out-2",
+ "-html4",
+ "-private",
+ "-linksource",
"-sourcepath", testSrc,
"-use",
"pkg", "pkg1", "pkg2", "pkg3");
@@ -65,7 +70,10 @@
@Test
void test3() {
- javadoc("-d", "out-3", "-private", "-linksource",
+ javadoc("-d", "out-3",
+ "-html4",
+ "-private",
+ "-linksource",
"-sourcepath", testSrc,
"-use",
"pkg", "pkg1", "pkg2", "pkg3");
@@ -77,7 +85,9 @@
@Test
void test4() {
- javadoc("-d", "out-4", "-private", "-linksource", "-html5",
+ javadoc("-d", "out-4",
+ "-private",
+ "-linksource",
"-sourcepath", testSrc,
"-use",
"pkg3");
--- a/test/langtools/jdk/javadoc/doclet/testHtmlWarning/TestHtmlWarning.java Thu Mar 01 16:35:36 2018 -0500
+++ b/test/langtools/jdk/javadoc/doclet/testHtmlWarning/TestHtmlWarning.java Fri Mar 02 21:00:12 2018 +0100
@@ -23,7 +23,7 @@
/*
* @test
- * @bug 8194955
+ * @bug 8194955 8182765
* @summary Warn when default HTML version is used.
* @library ../lib
* @modules jdk.javadoc/jdk.javadoc.internal.tool
@@ -47,8 +47,11 @@
}
private static final Path testFile = Paths.get("C.java");
- private static final String warning =
- "javadoc: warning - You have not specified the version of HTML to use.";
+ private static final String warning
+ = "javadoc: warning - You have specified the HTML version as HTML 4.01 by using the -html4 option.\n"
+ + "The default is currently HTML5 and the support for HTML 4.01 will be removed\n"
+ + "in a future release. To suppress this warning, please ensure that any HTML constructs\n"
+ + "in your comments are valid in HTML5, and remove the -html4 option.";
@Test
void testHtml4() {
@@ -57,7 +60,7 @@
testFile.toString());
checkExit(Exit.OK);
- checkOutput(Output.OUT, false, warning);
+ checkOutput(Output.OUT, true, warning);
}
@Test
@@ -76,6 +79,6 @@
testFile.toString());
checkExit(Exit.OK);
- checkOutput(Output.OUT, true, warning);
+ checkOutput(Output.OUT, false, warning);
}
}
--- a/test/langtools/jdk/javadoc/doclet/testInterface/TestInterface.java Thu Mar 01 16:35:36 2018 -0500
+++ b/test/langtools/jdk/javadoc/doclet/testInterface/TestInterface.java Fri Mar 02 21:00:12 2018 +0100
@@ -24,7 +24,7 @@
/*
* @test
* @bug 4682448 4947464 5029946 8025633 8026567 8035473 8139101 8175200
- 8186332 8186703
+ 8186332 8186703 8182765
* @summary Verify that the public modifier does not show up in the
* documentation for public methods, as recommended by the JLS.
* If A implements I and B extends A, B should be in the list of
@@ -99,14 +99,14 @@
+ "</ul>",
//Make sure "Specified By" has substituted type parameters.
"<dt><span class=\"overrideSpecifyLabel\">Specified by:</span></dt>\n"
- + "<dd><code><a href=\"Interface.html#method--\">method</a>"
+ + "<dd><code><a href=\"Interface.html#method()\">method</a>"
+ "</code> in interface <code>"
+ "<a href=\"Interface.html\" title=\"interface in pkg\">"
+ "Interface</a><<a href=\"Child.html\" title=\"type parameter in Child\">"
+ "CE</a>></code></dd>",
//Make sure "Overrides" has substituted type parameters.
"<dt><span class=\"overrideSpecifyLabel\">Overrides:</span></dt>\n"
- + "<dd><code><a href=\"Parent.html#method--\">method</a>"
+ + "<dd><code><a href=\"Parent.html#method()\">method</a>"
+ "</code> in class <code><a href=\"Parent.html\" "
+ "title=\"class in pkg\">Parent</a><<a href=\"Child.html\" "
+ "title=\"type parameter in Child\">CE</a>></code></dd>");
@@ -120,7 +120,7 @@
+ "</dl>");
checkOutput("pkg/Interface.html", false,
- "public int method()",
+ "public int method--",
"public static final int field");
checkOutput("pkg/ClassWithStaticMembers.html", false,
@@ -135,6 +135,52 @@
"<td class=\"colFirst\"><code>static void</code></td>\n"
+ "<th class=\"colSecond\" scope=\"row\"><code><span class=\"memberNameLink\">"
+ + "<a href=\"#m()\">m</a></span>()</code></th>\n"
+ + "<td class=\"colLast\">\n"
+ + "<div class=\"block\">A hider method</div>\n"
+ + "</td>\n",
+
+ "<h4>staticMethod</h4>\n"
+ + "<pre>public static void staticMethod()</pre>\n"
+ + "<div class=\"block\"><span class=\"descfrmTypeLabel\">"
+ + "Description copied from interface: <code>"
+ + "<a href=\"InterfaceWithStaticMembers.html#staticMethod()\">"
+ + "InterfaceWithStaticMembers</a></code></span></div>\n"
+ + "<div class=\"block\">A static method</div>\n");
+
+ checkOutput("pkg/ClassWithStaticMembers.InnerClass.html", true,
+ "<pre>public static class <span class=\"typeNameLabel\">"
+ + "ClassWithStaticMembers.InnerClass</span>\n"
+ + "extends java.lang.Object</pre>\n"
+ + "<div class=\"block\">A hider inner class</div>");
+ }
+
+ @Test
+ void test_html4() {
+ javadoc("-d", "out-html4",
+ "-html4",
+ "-sourcepath", testSrc,
+ "pkg");
+ checkExit(Exit.OK);
+
+ checkOutput("pkg/Child.html", true,
+ //Make sure "Specified By" has substituted type parameters.
+ "<dt><span class=\"overrideSpecifyLabel\">Specified by:</span></dt>\n"
+ + "<dd><code><a href=\"Interface.html#method--\">method</a>"
+ + "</code> in interface <code>"
+ + "<a href=\"Interface.html\" title=\"interface in pkg\">"
+ + "Interface</a><<a href=\"Child.html\" title=\"type parameter in Child\">"
+ + "CE</a>></code></dd>",
+ //Make sure "Overrides" has substituted type parameters.
+ "<dt><span class=\"overrideSpecifyLabel\">Overrides:</span></dt>\n"
+ + "<dd><code><a href=\"Parent.html#method--\">method</a>"
+ + "</code> in class <code><a href=\"Parent.html\" "
+ + "title=\"class in pkg\">Parent</a><<a href=\"Child.html\" "
+ + "title=\"type parameter in Child\">CE</a>></code></dd>");
+
+ checkOutput("pkg/ClassWithStaticMembers.html", true,
+ "<td class=\"colFirst\"><code>static void</code></td>\n"
+ + "<th class=\"colSecond\" scope=\"row\"><code><span class=\"memberNameLink\">"
+ "<a href=\"#m--\">m</a></span>()</code></th>\n"
+ "<td class=\"colLast\">\n"
+ "<div class=\"block\">A hider method</div>\n"
@@ -148,11 +194,8 @@
+ "InterfaceWithStaticMembers</a></code></span></div>\n"
+ "<div class=\"block\">A static method</div>\n");
- checkOutput("pkg/ClassWithStaticMembers.InnerClass.html", true,
- "<pre>public static class <span class=\"typeNameLabel\">"
- + "ClassWithStaticMembers.InnerClass</span>\n"
- + "extends java.lang.Object</pre>\n"
- + "<div class=\"block\">A hider inner class</div>");
+ checkOutput("pkg/Interface.html", false,
+ "public int method()");
}
@Test
@@ -165,6 +208,23 @@
checkOutput("pkg1/Child.html", true,
// Ensure the correct Overrides in the inheritance hierarchy is reported
"<span class=\"overrideSpecifyLabel\">Overrides:</span></dt>\n" +
+ "<dd><code><a href=\"GrandParent.html#method1()\">method1</a></code>" +
+ " in class " +
+ "<code><a href=\"GrandParent.html\" title=\"class in pkg1\">GrandParent</a>" +
+ "<<a href=\"Child.html\" title=\"type parameter in Child\">CE</a>></code>");
+ }
+
+ @Test
+ void test1_html4() {
+ javadoc("-d", "out-1-html4",
+ "-html4",
+ "-sourcepath", testSrc,
+ "pkg1");
+ checkExit(Exit.OK);
+
+ checkOutput("pkg1/Child.html", true,
+ // Ensure the correct Overrides in the inheritance hierarchy is reported
+ "<span class=\"overrideSpecifyLabel\">Overrides:</span></dt>\n" +
"<dd><code><a href=\"GrandParent.html#method1--\">method1</a></code>" +
" in class " +
"<code><a href=\"GrandParent.html\" title=\"class in pkg1\">GrandParent</a>" +
--- a/test/langtools/jdk/javadoc/doclet/testJavaFX/TestJavaFX.java Thu Mar 01 16:35:36 2018 -0500
+++ b/test/langtools/jdk/javadoc/doclet/testJavaFX/TestJavaFX.java Fri Mar 02 21:00:12 2018 +0100
@@ -24,7 +24,7 @@
/*
* @test
* @bug 7112427 8012295 8025633 8026567 8061305 8081854 8150130 8162363
- * 8167967 8172528 8175200 8178830 8182257 8186332
+ * 8167967 8172528 8175200 8178830 8182257 8186332 8182765
* @summary Test of the JavaFX doclet features.
* @author jvalenta
* @library ../lib
@@ -51,9 +51,8 @@
checkOutput("pkg1/C.html", true,
"<dt><span class=\"seeLabel\">See Also:</span></dt>\n"
- + "<dd><a href=\"#getRate--\"><code>getRate()</code></a>, \n"
- + "<a href=\"#setRate-double-\">"
- + "<code>setRate(double)</code></a></dd>",
+ + "<dd><a href=\"#getRate()\"><code>getRate()</code></a>, \n"
+ + "<a href=\"#setRate(double)\"><code>setRate(double)</code></a></dd>",
"<pre>public final void setRate​(double value)</pre>\n"
+ "<div class=\"block\">Sets the value of the property rate.</div>\n"
+ "<dl>\n"
@@ -77,7 +76,7 @@
"<p>Gets the value of the property <code>Property</code>",
"<span class=\"simpleTagLabel\">Property description:</span>",
"<th class=\"colSecond\" scope=\"row\"><code><span class=\"memberNameLink\">"
- + "<a href=\"#setTestMethodProperty--\">"
+ + "<a href=\"#setTestMethodProperty()\">"
+ "setTestMethodProperty</a></span>()</code></th>",
"<th class=\"colSecond\" scope=\"row\"><code><span class=\"memberNameLink\">"
+ "<a href=\"#pausedProperty\">paused</a></span></code></th>\n"
@@ -135,7 +134,7 @@
+ "<dt><span class=\"simpleTagLabel\">Since:</span></dt>\n"
+ "<dd>JavaFX 8.0</dd>",
"<h3>Property Summary</h3>\n"
- + "<table class=\"memberSummary\" summary=\"Property Summary table, listing properties, and an explanation\">\n"
+ + "<table class=\"memberSummary\">\n"
+ "<caption><span>Properties</span><span class=\"tabEnd\"> </span></caption>",
"<tr class=\"altColor\">\n"
+ "<td class=\"colFirst\"><code><a href=\"C.BooleanProperty.html\" title=\"class in pkg1\">C.BooleanProperty</a></code></td>\n",
@@ -168,6 +167,30 @@
checkOutput("pkg1/D.html", false, "shouldNotAppear");
}
+
+ @Test
+ void test1_html4() {
+ javadoc("-d", "out1-html4",
+ "-html4",
+ "-sourcepath", testSrc,
+ "-javafx",
+ "-package",
+ "pkg1");
+ checkExit(Exit.OK);
+
+ checkOutput("pkg1/C.html", true,
+ "<dt><span class=\"seeLabel\">See Also:</span></dt>\n"
+ + "<dd><a href=\"#getRate--\"><code>getRate()</code></a>, \n"
+ + "<a href=\"#setRate-double-\">"
+ + "<code>setRate(double)</code></a></dd>",
+ "<th class=\"colSecond\" scope=\"row\"><code><span class=\"memberNameLink\">"
+ + "<a href=\"#setTestMethodProperty--\">"
+ + "setTestMethodProperty</a></span>()</code></th>",
+ "<h3>Property Summary</h3>\n"
+ + "<table class=\"memberSummary\" summary=\"Property Summary table, listing properties, and an explanation\">\n"
+ + "<caption><span>Properties</span><span class=\"tabEnd\"> </span></caption>");
+ }
+
/*
* Test with -javafx option enabled, to ensure property getters and setters
* are treated correctly.
@@ -182,6 +205,61 @@
checkExit(Exit.OK);
checkOutput("pkg2/Test.html", true,
"<h3>Property Detail</h3>\n"
+ + "<a id=\"betaProperty\">\n"
+ + "<!-- -->\n"
+ + "</a>\n"
+ + "<ul class=\"blockList\">\n"
+ + "<li class=\"blockList\">\n"
+ + "<h4>beta</h4>\n"
+ + "<pre>public java.lang.Object betaProperty</pre>\n"
+ + "</li>\n"
+ + "</ul>\n"
+ + "<a id=\"gammaProperty\">\n"
+ + "<!-- -->\n"
+ + "</a>\n"
+ + "<ul class=\"blockList\">\n"
+ + "<li class=\"blockList\">\n"
+ + "<h4>gamma</h4>\n"
+ + "<pre>public final java.util.List<java.lang.String> gammaProperty</pre>\n"
+ + "</li>\n"
+ + "</ul>\n"
+ + "<a id=\"deltaProperty\">\n"
+ + "<!-- -->\n"
+ + "</a>\n"
+ + "<ul class=\"blockListLast\">\n"
+ + "<li class=\"blockList\">\n"
+ + "<h4>delta</h4>\n"
+ + "<pre>public final java.util.List<"
+ + "java.util.Set<? super java.lang.Object>> deltaProperty</pre>\n"
+ + "</li>\n"
+ + "</ul>\n"
+ + "</li>\n"
+ + "</ul>",
+ "<h3>Property Summary</h3>\n"
+ + "<table class=\"memberSummary\">\n"
+ + "<caption><span>Properties</span><span class=\"tabEnd\"> </span></caption>");
+
+ checkOutput("pkg2/Test.html", false,
+ "<h3>Property Summary</h3>\n"
+ + "<table class=\"memberSummary\" summary=\"Property Summary table, listing properties, and an explanation\">\n"
+ + "<caption><span id=\"t0\" class=\"activeTableTab\"><span>All Methods</span><span class=\"tabEnd\"> </span>"
+ + "</span><span id=\"t2\" class=\"tableTab\"><span><a href=\"javascript:show(2);\">Instance Methods</a>"
+ + "</span><span class=\"tabEnd\"> </span></span><span id=\"t4\" class=\"tableTab\"><span>"
+ + "<a href=\"javascript:show(8);\">Concrete Methods</a></span><span class=\"tabEnd\"> </span></span>"
+ + "</caption>");
+ }
+
+ @Test
+ void test2_html4() {
+ javadoc("-d", "out2a-html4",
+ "-html4",
+ "-sourcepath", testSrc,
+ "-javafx",
+ "-package",
+ "pkg2");
+ checkExit(Exit.OK);
+ checkOutput("pkg2/Test.html", true,
+ "<h3>Property Detail</h3>\n"
+ "<a name=\"betaProperty\">\n"
+ "<!-- -->\n"
+ "</a>\n"
@@ -215,15 +293,6 @@
"<h3>Property Summary</h3>\n"
+ "<table class=\"memberSummary\" summary=\"Property Summary table, listing properties, and an explanation\">\n"
+ "<caption><span>Properties</span><span class=\"tabEnd\"> </span></caption>");
-
- checkOutput("pkg2/Test.html", false,
- "<h3>Property Summary</h3>\n"
- + "<table class=\"memberSummary\" summary=\"Property Summary table, listing properties, and an explanation\">\n"
- + "<caption><span id=\"t0\" class=\"activeTableTab\"><span>All Methods</span><span class=\"tabEnd\"> </span>"
- + "</span><span id=\"t2\" class=\"tableTab\"><span><a href=\"javascript:show(2);\">Instance Methods</a>"
- + "</span><span class=\"tabEnd\"> </span></span><span id=\"t4\" class=\"tableTab\"><span>"
- + "<a href=\"javascript:show(8);\">Concrete Methods</a></span><span class=\"tabEnd\"> </span></span>"
- + "</caption>");
}
/*
@@ -246,6 +315,47 @@
+ "<tr id=\"i0\" class=\"altColor\">\n"
+ "<td class=\"colFirst\"><code><T> java.lang.Object</code></td>\n"
+ "<th class=\"colSecond\" scope=\"row\"><code><span class=\"memberNameLink\">"
+ + "<a href=\"#alphaProperty(java.util.List)\">alphaProperty</a>"
+ + "</span>​(java.util.List<T> foo)</code></th>\n"
+ + "<td class=\"colLast\"> </td>\n"
+ + "</tr>\n"
+ + "<tr id=\"i1\" class=\"rowColor\">\n"
+ + "<td class=\"colFirst\"><code>java.lang.Object</code></td>\n"
+ + "<th class=\"colSecond\" scope=\"row\"><code><span class=\"memberNameLink\">"
+ + "<a href=\"#betaProperty()\">betaProperty</a></span>()</code></th>\n"
+ + "<td class=\"colLast\"> </td>\n"
+ + "</tr>\n"
+ + "<tr id=\"i2\" class=\"altColor\">\n"
+ + "<td class=\"colFirst\"><code>java.util.List<java.util.Set<? super java.lang.Object>>"
+ + "</code></td>\n"
+ + "<th class=\"colSecond\" scope=\"row\"><code><span class=\"memberNameLink\">"
+ + "<a href=\"#deltaProperty()\">deltaProperty</a></span>()</code></th>\n"
+ + "<td class=\"colLast\"> </td>\n"
+ + "</tr>\n"
+ + "<tr id=\"i3\" class=\"rowColor\">\n"
+ + "<td class=\"colFirst\"><code>java.util.List<java.lang.String></code></td>\n"
+ + "<th class=\"colSecond\" scope=\"row\"><code><span class=\"memberNameLink\">"
+ + "<a href=\"#gammaProperty()\">gammaProperty</a></span>()</code></th>\n"
+ + "<td class=\"colLast\"> </td>"
+ );
+ }
+
+ @Test
+ void test3_html4() {
+ javadoc("-d", "out2b-html4",
+ "-html4",
+ "-sourcepath", testSrc,
+ "-package",
+ "pkg2");
+ checkExit(Exit.OK);
+ checkOutput("pkg2/Test.html", true,
+ "<th class=\"colFirst\" scope=\"col\">Modifier and Type</th>\n"
+ + "<th class=\"colSecond\" scope=\"col\">Method</th>\n"
+ + "<th class=\"colLast\" scope=\"col\">Description</th>\n"
+ + "</tr>\n"
+ + "<tr id=\"i0\" class=\"altColor\">\n"
+ + "<td class=\"colFirst\"><code><T> java.lang.Object</code></td>\n"
+ + "<th class=\"colSecond\" scope=\"row\"><code><span class=\"memberNameLink\">"
+ "<a href=\"#alphaProperty-java.util.List-\">alphaProperty</a>"
+ "</span>​(java.util.List<T> foo)</code></th>\n"
+ "<td class=\"colLast\"> </td>\n"
--- a/test/langtools/jdk/javadoc/doclet/testLinkOption/TestLinkOption.java Thu Mar 01 16:35:36 2018 -0500
+++ b/test/langtools/jdk/javadoc/doclet/testLinkOption/TestLinkOption.java Fri Mar 02 21:00:12 2018 +0100
@@ -23,7 +23,7 @@
/*
* @test
- * @bug 4720957 5020118 8026567 8038976 8184969 8164407
+ * @bug 4720957 5020118 8026567 8038976 8184969 8164407 8182765
* @summary Test to make sure that -link and -linkoffline link to
* right files, and URLs with and without trailing slash are accepted.
* @author jamieh
@@ -66,7 +66,9 @@
"-linkoffline", url, testSrc + "/jdk",
"-package",
"pkg", "mylib.lang");
- checkExit(Exit.OK);
+ checkExit(Exit.ERROR);
+ checkOutput(Output.OUT, true,
+ "tag not supported in the generated HTML version: tt");
checkOutput("pkg/C.html", true,
"<a href=\"" + url + "java/lang/String.html?is-external=true\" "
@@ -82,11 +84,11 @@
checkOutput("pkg/B.html", true,
"<div class=\"block\">A method with html tag the method "
- + "<a href=\"" + url + "java/lang/ClassLoader.html?is-external=true#getSystemClassLoader--\""
+ + "<a href=\"" + url + "java/lang/ClassLoader.html?is-external=true#getSystemClassLoader()\""
+ " title=\"class or interface in java.lang\" class=\"externalLink\"><code><tt>getSystemClassLoader()</tt>"
+ "</code></a> as the parent class loader.</div>",
"<div class=\"block\">is equivalent to invoking <code>"
- + "<a href=\"#createTempFile-java.lang.String-java.lang.String-java.io.File-\">"
+ + "<a href=\"#createTempFile(java.lang.String,java.lang.String,java.io.File)\">"
+ "<code>createTempFile(prefix, suffix, null)</code></a></code>.</div>",
"<a href=\"" + url + "java/lang/String.html?is-external=true\" "
+ "title=\"class or interface in java.lang\" class=\"externalLink\">Link-Plain to String Class</a>",
@@ -109,6 +111,25 @@
+ "title=\"class or interface in java.lang\" class=\"externalLink\">Object</a></pre>"
);
+ String out1_html4 = "out1-html4";
+ javadoc("-d", out1_html4,
+ "-html4",
+ "-classpath", mylib,
+ "-sourcepath", testSrc,
+ "-linkoffline", url, testSrc + "/jdk",
+ "-package",
+ "pkg", "mylib.lang");
+ checkExit(Exit.OK);
+
+ checkOutput("pkg/B.html", true,
+ "<div class=\"block\">A method with html tag the method "
+ + "<a href=\"" + url + "java/lang/ClassLoader.html?is-external=true#getSystemClassLoader--\""
+ + " title=\"class or interface in java.lang\" class=\"externalLink\"><code><tt>getSystemClassLoader()</tt>"
+ + "</code></a> as the parent class loader.</div>",
+ "<div class=\"block\">is equivalent to invoking <code>"
+ + "<a href=\"#createTempFile-java.lang.String-java.lang.String-java.io.File-\">"
+ + "<code>createTempFile(prefix, suffix, null)</code></a></code>.</div>");
+
// Generate the documentation using -linkoffline and a relative path as the first parameter.
// We will try linking to the docs generated in test 1 with a relative path.
String out2 = "out2";
--- a/test/langtools/jdk/javadoc/doclet/testLinkTaglet/TestLinkTaglet.java Thu Mar 01 16:35:36 2018 -0500
+++ b/test/langtools/jdk/javadoc/doclet/testLinkTaglet/TestLinkTaglet.java Fri Mar 02 21:00:12 2018 +0100
@@ -23,7 +23,7 @@
/*
* @test
- * @bug 4732864 6280605 7064544 8014636 8016328 8025633 8071982
+ * @bug 4732864 6280605 7064544 8014636 8016328 8025633 8071982 8182765
* @summary Make sure that you can link from one member to another using
* non-qualified name, furthermore, ensure the right one is linked.
* @author jamieh
@@ -52,9 +52,9 @@
"Qualified Link: <a href=\"C.InnerC.html\" title=\"class in pkg\"><code>C.InnerC</code></a>.<br/>\n"
+ " Unqualified Link1: <a href=\"C.InnerC.html\" title=\"class in pkg\"><code>C.InnerC</code></a>.<br/>\n"
+ " Unqualified Link2: <a href=\"C.InnerC.html\" title=\"class in pkg\"><code>C.InnerC</code></a>.<br/>\n"
- + " Qualified Link: <a href=\"#method-pkg.C.InnerC-pkg.C.InnerC2-\"><code>method(pkg.C.InnerC, pkg.C.InnerC2)</code></a>.<br/>\n"
- + " Unqualified Link: <a href=\"#method-pkg.C.InnerC-pkg.C.InnerC2-\"><code>method(C.InnerC, C.InnerC2)</code></a>.<br/>\n"
- + " Unqualified Link: <a href=\"#method-pkg.C.InnerC-pkg.C.InnerC2-\"><code>method(InnerC, InnerC2)</code></a>.<br/>\n"
+ + " Qualified Link: <a href=\"#method(pkg.C.InnerC,pkg.C.InnerC2)\"><code>method(pkg.C.InnerC, pkg.C.InnerC2)</code></a>.<br/>\n"
+ + " Unqualified Link: <a href=\"#method(pkg.C.InnerC,pkg.C.InnerC2)\"><code>method(C.InnerC, C.InnerC2)</code></a>.<br/>\n"
+ + " Unqualified Link: <a href=\"#method(pkg.C.InnerC,pkg.C.InnerC2)\"><code>method(InnerC, InnerC2)</code></a>.<br/>\n"
+ " Package Link: <a href=\"package-summary.html\"><code>pkg</code></a>.<br/>");
checkOutput("pkg/C.InnerC.html", true,
@@ -73,4 +73,23 @@
checkFiles(false, "checkPkg/A.html");
}
+
+ @Test
+ void test_html4() {
+ javadoc("-Xdoclint:none",
+ "-d", "out-html4",
+ "-html4",
+ "-sourcepath", testSrc,
+ "pkg", testSrc("checkPkg/B.java"));
+ checkExit(Exit.OK);
+
+ checkOutput("pkg/C.html", true,
+ "Qualified Link: <a href=\"C.InnerC.html\" title=\"class in pkg\"><code>C.InnerC</code></a>.<br/>\n"
+ + " Unqualified Link1: <a href=\"C.InnerC.html\" title=\"class in pkg\"><code>C.InnerC</code></a>.<br/>\n"
+ + " Unqualified Link2: <a href=\"C.InnerC.html\" title=\"class in pkg\"><code>C.InnerC</code></a>.<br/>\n"
+ + " Qualified Link: <a href=\"#method-pkg.C.InnerC-pkg.C.InnerC2-\"><code>method(pkg.C.InnerC, pkg.C.InnerC2)</code></a>.<br/>\n"
+ + " Unqualified Link: <a href=\"#method-pkg.C.InnerC-pkg.C.InnerC2-\"><code>method(C.InnerC, C.InnerC2)</code></a>.<br/>\n"
+ + " Unqualified Link: <a href=\"#method-pkg.C.InnerC-pkg.C.InnerC2-\"><code>method(InnerC, InnerC2)</code></a>.<br/>\n"
+ + " Package Link: <a href=\"package-summary.html\"><code>pkg</code></a>.<br/>");
}
+}
--- a/test/langtools/jdk/javadoc/doclet/testLinkToSerialForm/TestLinkToSerialForm.java Thu Mar 01 16:35:36 2018 -0500
+++ b/test/langtools/jdk/javadoc/doclet/testLinkToSerialForm/TestLinkToSerialForm.java Fri Mar 02 21:00:12 2018 +0100
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2002, 2016, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2002, 2018, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
@@ -23,7 +23,7 @@
/*
* @test
- * @bug 4521661 8081854
+ * @bug 4521661 8081854 8182765
* @summary Test to make sure that there is a link with a proper anchor
* from a serializable class to serialized-form.html.
* @author jamieh
@@ -48,8 +48,20 @@
checkExit(Exit.OK);
checkOutput("serialized-form.html", true,
- "<a name=\"pkg.C\">");
+ "<a id=\"pkg.C\">");
checkOutput("pkg/C.html", true,
"<a href=\"../serialized-form.html#pkg.C\">");
}
+
+ @Test
+ void test_html4() {
+ javadoc("-d", "out-html4",
+ "-html4",
+ "-sourcepath", testSrc,
+ "pkg");
+ checkExit(Exit.OK);
+
+ checkOutput("serialized-form.html", true,
+ "<a name=\"pkg.C\">");
}
+}
--- a/test/langtools/jdk/javadoc/doclet/testMemberInheritance/TestMemberInheritance.java Thu Mar 01 16:35:36 2018 -0500
+++ b/test/langtools/jdk/javadoc/doclet/testMemberInheritance/TestMemberInheritance.java Fri Mar 02 21:00:12 2018 +0100
@@ -24,7 +24,7 @@
/*
* @test
* @bug 4638588 4635809 6256068 6270645 8025633 8026567 8162363 8175200
- * 8192850
+ * 8192850 8182765
* @summary Test to make sure that members are inherited properly in the Javadoc.
* Verify that inheritance labels are correct.
* @author jamieh
@@ -52,13 +52,13 @@
// Public field should be inherited
"<a href=\"BaseClass.html#pubField\">",
// Public method should be inherited
- "<a href=\"BaseClass.html#pubMethod--\">",
+ "<a href=\"BaseClass.html#pubMethod()\">",
// Public inner class should be inherited.
"<a href=\"BaseClass.pubInnerClass.html\" title=\"class in pkg\">",
// Protected field should be inherited
"<a href=\"BaseClass.html#proField\">",
// Protected method should be inherited
- "<a href=\"BaseClass.html#proMethod--\">",
+ "<a href=\"BaseClass.html#proMethod()\">",
// Protected inner class should be inherited.
"<a href=\"BaseClass.proInnerClass.html\" title=\"class in pkg\">",
// New labels as of 1.5.0
@@ -71,6 +71,57 @@
// Test overriding/implementing methods with generic parameters.
"<dl>\n"
+ "<dt><span class=\"overrideSpecifyLabel\">Specified by:</span></dt>\n"
+ + "<dd><code><a href=\"BaseInterface.html#getAnnotation(java.lang.Class)\">"
+ + "getAnnotation</a></code> in interface <code>"
+ + "<a href=\"BaseInterface.html\" title=\"interface in pkg\">"
+ + "BaseInterface</a></code></dd>\n"
+ + "</dl>");
+
+ checkOutput("diamond/Z.html", true,
+ // Test diamond inheritance member summary (6256068)
+ "<code><a href=\"A.html#aMethod()\">aMethod</a></code>");
+
+ checkOutput("inheritDist/C.html", true,
+ // Test that doc is inherited from closed parent (6270645)
+ "<div class=\"block\">m1-B</div>");
+
+ checkOutput("pkg/SubClass.html", false,
+ "<a href=\"BaseClass.html#staticMethod()\">staticMethod</a></code>");
+
+ checkOutput("pkg1/Implementer.html", true,
+ // ensure the method makes it
+ "<td class=\"colFirst\"><code>static java.time.Period</code></td>\n"
+ + "<th class=\"colSecond\" scope=\"row\"><code><span class=\"memberNameLink\">"
+ + "<a href=\"#between(java.time.LocalDate,java.time.LocalDate)\">"
+ + "between</a></span>​(java.time.LocalDate startDateInclusive,\n"
+ + " java.time.LocalDate endDateExclusive)</code></th>");
+
+ checkOutput("pkg1/Implementer.html", false,
+ "<h3>Methods inherited from interface pkg1.<a href=\"Interface.html\""
+ + " title=\"interface in pkg1\">Interface</a></h3>\n"
+ + "<code><a href=\"Interface.html#between(java.time.chrono.ChronoLocalDate"
+ + ",java.time.chrono.ChronoLocalDate)\">between</a></code>"
+ );
+ }
+
+ @Test
+ void test_html4() {
+ javadoc("-d", "out-html4",
+ "-html4",
+ "-sourcepath", testSrc,
+ "pkg", "diamond", "inheritDist", "pkg1");
+ checkExit(Exit.OK);
+
+ checkOutput("pkg/SubClass.html", true,
+ // Public method should be inherited
+ "<a href=\"BaseClass.html#pubMethod--\">",
+ // Protected method should be inherited
+ "<a href=\"BaseClass.html#proMethod--\">");
+
+ checkOutput("pkg/BaseClass.html", true,
+ // Test overriding/implementing methods with generic parameters.
+ "<dl>\n"
+ + "<dt><span class=\"overrideSpecifyLabel\">Specified by:</span></dt>\n"
+ "<dd><code><a href=\"BaseInterface.html#getAnnotation-java.lang.Class-\">"
+ "getAnnotation</a></code> in interface <code>"
+ "<a href=\"BaseInterface.html\" title=\"interface in pkg\">"
@@ -81,10 +132,6 @@
// Test diamond inheritance member summary (6256068)
"<code><a href=\"A.html#aMethod--\">aMethod</a></code>");
- checkOutput("inheritDist/C.html", true,
- // Test that doc is inherited from closed parent (6270645)
- "<div class=\"block\">m1-B</div>");
-
checkOutput("pkg/SubClass.html", false,
"<a href=\"BaseClass.html#staticMethod--\">staticMethod</a></code>");
--- a/test/langtools/jdk/javadoc/doclet/testMemberSummary/TestMemberSummary.java Thu Mar 01 16:35:36 2018 -0500
+++ b/test/langtools/jdk/javadoc/doclet/testMemberSummary/TestMemberSummary.java Fri Mar 02 21:00:12 2018 +0100
@@ -23,7 +23,7 @@
/*
* @test
- * @bug 4951228 6290760 8025633 8026567 8081854 8162363 8175200 8177417 8186332
+ * @bug 4951228 6290760 8025633 8026567 8081854 8162363 8175200 8177417 8186332 8182765
* @summary Test the case where the overriden method returns a different
* type than the method in the child class. Make sure the
* documentation is inherited but the return type isn't.
@@ -43,7 +43,43 @@
@Test
void test() {
- javadoc("-d", "out", "-private",
+ javadoc("-d", "out",
+ "-private",
+ "-sourcepath", testSrc,
+ "pkg","pkg2");
+ checkExit(Exit.OK);
+
+ checkOutput("pkg/PublicChild.html", true,
+ // Check return type in member summary.
+ "<code><a href=\"PublicChild.html\" title=\"class in pkg\">PublicChild</a></code></td>\n"
+ + "<th class=\"colSecond\" scope=\"row\"><code><span class=\"memberNameLink\"><a href=\"#returnTypeTest()\">"
+ + "returnTypeTest</a></span>()</code>",
+ // Check return type in member detail.
+ "<pre>public <a href=\"PublicChild.html\" title=\"class in pkg\">"
+ + "PublicChild</a> returnTypeTest()</pre>",
+ "<th class=\"colConstructorName\" scope=\"row\"><code><span class=\"memberNameLink\">"
+ + "<a href=\"#%3Cinit%3E()\">PublicChild</a></span>()</code></th>");
+
+ checkOutput("pkg/PrivateParent.html", true,
+ "<td class=\"colFirst\"><code>private </code></td>\n"
+ + "<th class=\"colConstructorName\" scope=\"row\"><code><span class=\"memberNameLink\">"
+ + "<a href=\"#%3Cinit%3E(int)\">PrivateParent</a></span>​(int i)</code>"
+ + "</th>");
+
+ // Legacy anchor dimensions (6290760)
+ checkOutput("pkg2/A.html", true,
+ "<a id=\"f(java.lang.Object[])\">\n"
+ + "<!-- -->\n"
+ + "</a><a id=\"f(T[])\">\n"
+ + "<!-- -->\n"
+ + "</a>");
+ }
+
+ @Test
+ void test_html4() {
+ javadoc("-d", "out-html4",
+ "-html4",
+ "-private",
"-sourcepath", testSrc,
"pkg","pkg2");
checkExit(Exit.OK);
@@ -53,9 +89,6 @@
"<code><a href=\"PublicChild.html\" title=\"class in pkg\">PublicChild</a></code></td>\n"
+ "<th class=\"colSecond\" scope=\"row\"><code><span class=\"memberNameLink\"><a href=\"#returnTypeTest--\">"
+ "returnTypeTest</a></span>()</code>",
- // Check return type in member detail.
- "<pre>public <a href=\"PublicChild.html\" title=\"class in pkg\">"
- + "PublicChild</a> returnTypeTest()</pre>",
"<th class=\"colConstructorName\" scope=\"row\"><code><span class=\"memberNameLink\">"
+ "<a href=\"#PublicChild--\">PublicChild</a></span>()</code></th>");
--- a/test/langtools/jdk/javadoc/doclet/testModules/TestIndirectExportsOpens.java Thu Mar 01 16:35:36 2018 -0500
+++ b/test/langtools/jdk/javadoc/doclet/testModules/TestIndirectExportsOpens.java Fri Mar 02 21:00:12 2018 +0100
@@ -23,7 +23,7 @@
/*
* @test
- * @bug 8178339
+ * @bug 8178339 8182765
* @summary Tests indirect exports and opens in the module summary page
* @modules jdk.javadoc/jdk.javadoc.internal.api
* jdk.javadoc/jdk.javadoc.internal.tool
@@ -72,6 +72,16 @@
checkExit(Exit.OK);
verifyIndirectExports(false);
verifyIndirectOpens(false);
+
+ javadoc("-d", base.resolve("out-api-html4").toString(),
+ "-html4",
+ "-quiet",
+ "--module-source-path", base.toString(),
+ "--expand-requires", "transitive",
+ "--module", "a");
+ checkExit(Exit.OK);
+ verifyIndirectExports_html4(false);
+ verifyIndirectOpens_html4(false);
}
@Test
@@ -98,6 +108,16 @@
checkExit(Exit.OK);
verifyIndirectExports(true);
verifyIndirectOpens(true);
+
+ javadoc("-d", base.resolve("out-api-html4").toString(),
+ "-html4",
+ "-quiet",
+ "--module-source-path", base.toString(),
+ "--expand-requires", "transitive",
+ "--module", "a");
+ checkExit(Exit.OK);
+ verifyIndirectExports_html4(true);
+ verifyIndirectOpens_html4(true);
}
@Test
@@ -125,6 +145,17 @@
checkExit(Exit.OK);
verifyIndirectExports(false);
verifyIndirectOpens(false);
+
+ javadoc("-d", base.resolve("out-api-html4").toString(),
+ "-html4",
+ "-quiet",
+ "--module-source-path", base.toString(),
+ "--expand-requires", "transitive",
+ "--module", "a");
+
+ checkExit(Exit.OK);
+ verifyIndirectExports_html4(false);
+ verifyIndirectOpens_html4(false);
}
@Test
@@ -157,13 +188,13 @@
// could be listed in the indirects section, so just
// check for minimal expected strings.
checkOutput("a/module-summary.html", true,
- "Indirect Exports table",
+ "Indirect Exports",
"<th class=\"colFirst\" scope=\"row\"><a href=\"../m/module-summary.html\">m</a></th>\n"
+ "<td class=\"colLast\"><a href=\"../m/exportsto/package-summary.html\">exportsto</a></td>\n"
+ "</tr>\n");
checkOutput("a/module-summary.html", true,
- "Indirect Opens table",
+ "Indirect Opens",
"<th class=\"colFirst\" scope=\"row\"><a href=\"../m/module-summary.html\">m</a></th>\n"
+ "<td class=\"colLast\">opensto</td>\n"
+ "</tr>\n");
@@ -188,6 +219,40 @@
}
checkOutput("a/module-summary.html", present,
+ "<table class=\"packagesSummary\">\n"
+ + "<caption><span>" + typeString + "</span><span class=\"tabEnd\"> </span></caption>\n"
+ + "<tr>\n"
+ + "<th class=\"colFirst\" scope=\"col\">From</th>\n"
+ + "<th class=\"colLast\" scope=\"col\">Packages</th>\n"
+ + "</tr>\n"
+ + "<tbody>\n"
+ + "<tr class=\"altColor\">\n"
+ + "<th class=\"colFirst\" scope=\"row\"><a href=\"../m/module-summary.html\">m</a></th>\n"
+ + "<td class=\"colLast\"><a href=\"../m/pm/package-summary.html\">pm</a></td>\n"
+ + "</tr>\n"
+ + "</tbody>\n"
+ + "</table>\n");
+ }
+
+ void verifyIndirectExports_html4(boolean present) {
+ verifyIndirects_html4(present, false);
+ }
+
+ void verifyIndirectOpens_html4(boolean present) {
+ verifyIndirects_html4(present, true);
+ }
+
+ void verifyIndirects_html4(boolean present, boolean opens) {
+
+ String typeString = opens ? "Indirect Opens" : "Indirect Exports";
+
+ // Avoid false positives, just check for primary string absence.
+ if (!present) {
+ checkOutput("a/module-summary.html", false, typeString);
+ return;
+ }
+
+ checkOutput("a/module-summary.html", present,
"<table class=\"packagesSummary\" summary=\"" + typeString + " table, listing modules, and packages\">\n"
+ "<caption><span>" + typeString + "</span><span class=\"tabEnd\"> </span></caption>\n"
+ "<tr>\n"
@@ -202,6 +267,4 @@
+ "</tbody>\n"
+ "</table>\n");
}
-
}
-
--- a/test/langtools/jdk/javadoc/doclet/testModules/TestModuleServices.java Thu Mar 01 16:35:36 2018 -0500
+++ b/test/langtools/jdk/javadoc/doclet/testModules/TestModuleServices.java Fri Mar 02 21:00:12 2018 +0100
@@ -23,7 +23,7 @@
/*
* @test
- * @bug 8178067 8192007
+ * @bug 8178067 8192007 8182765
* @summary tests the module's services, such as provides and uses
* @modules jdk.javadoc/jdk.javadoc.internal.api
* jdk.javadoc/jdk.javadoc.internal.tool
@@ -117,7 +117,8 @@
mb.write(src);
javadoc("-d", base.resolve("out").toString(),
- "-quiet", "-noindex",
+ "-quiet",
+ "-noindex",
"--module-source-path", src.toString(),
"--module", "moduleService,moduleServiceProvider,moduleServiceUser,moduleServiceUserNoDescription",
"pkgService", "moduleServiceProvider/pkgServiceProvider", "moduleServiceUser/pkgServiceUser",
@@ -194,6 +195,33 @@
"<h3>Services</h3>");
checkOutput("m/module-summary.html", true,
+ "<table class=\"usesSummary\">\n" +
+ "<caption><span>Uses</span><span class=\"tabEnd\"> </span></caption>\n" +
+ "<tr>\n" +
+ "<th class=\"colFirst\" scope=\"col\">Type</th>\n" +
+ "<th class=\"colLast\" scope=\"col\">Description</th>\n" +
+ "</tr>\n" +
+ "<tbody>\n" +
+ "<tr class=\"altColor\">\n" +
+ "<th class=\"colFirst\" scope=\"row\"><a href=\"p1/A.html\" title=\"class in p1\">A</a></th>\n" +
+ "<td class=\"colLast\"> </td>\n" +
+ "</tr>\n" +
+ "<tr class=\"rowColor\">\n" +
+ "<th class=\"colFirst\" scope=\"row\"><a href=\"p1/B.html\" title=\"class in p1\">B</a></th>\n" +
+ "<td class=\"colLast\"> </td>\n" +
+ "</tr>\n" +
+ "</tbody>\n" +
+ "</table>\n");
+
+ javadoc("-d", base.toString() + "/out-html4",
+ "-html4",
+ "-quiet",
+ "--show-module-contents", "all",
+ "--module-source-path", base.toString(),
+ "--module", "m");
+ checkExit(Exit.OK);
+
+ checkOutput("m/module-summary.html", true,
"<table class=\"usesSummary\" summary=\"Uses table, listing types, and an explanation\">\n" +
"<caption><span>Uses</span><span class=\"tabEnd\"> </span></caption>\n" +
"<tr>\n" +
@@ -234,6 +262,28 @@
"<h3>Services</h3>");
checkOutput("m/module-summary.html", true,
+ "<table class=\"usesSummary\">\n" +
+ "<caption><span>Uses</span><span class=\"tabEnd\"> </span></caption>\n" +
+ "<tr>\n" +
+ "<th class=\"colFirst\" scope=\"col\">Type</th>\n" +
+ "<th class=\"colLast\" scope=\"col\">Description</th>\n" +
+ "</tr>\n" +
+ "<tbody>\n" +
+ "<tr class=\"altColor\">\n" +
+ "<th class=\"colFirst\" scope=\"row\"><a href=\"p1/A.html\" title=\"class in p1\">A</a></th>\n" +
+ "<td class=\"colLast\"> </td>\n" +
+ "</tr>\n" +
+ "</tbody>\n" +
+ "</table>\n");
+
+ javadoc("-d", base.toString() + "/out-html4",
+ "-html4",
+ "-quiet",
+ "--module-source-path", base.toString(),
+ "--module", "m");
+ checkExit(Exit.OK);
+
+ checkOutput("m/module-summary.html", true,
"<table class=\"usesSummary\" summary=\"Uses table, listing types, and an explanation\">\n" +
"<caption><span>Uses</span><span class=\"tabEnd\"> </span></caption>\n" +
"<tr>\n" +
@@ -300,6 +350,33 @@
"<h3>Services</h3>");
checkOutput("m/module-summary.html", true,
+ "<table class=\"providesSummary\">\n" +
+ "<caption><span>Provides</span><span class=\"tabEnd\"> </span></caption>\n" +
+ "<tr>\n" +
+ "<th class=\"colFirst\" scope=\"col\">Type</th>\n" +
+ "<th class=\"colLast\" scope=\"col\">Description</th>\n" +
+ "</tr>\n" +
+ "<tbody>\n" +
+ "<tr class=\"altColor\">\n" +
+ "<th class=\"colFirst\" scope=\"row\"><a href=\"p1/A.html\" title=\"interface in p1\">A</a></th>\n" +
+ "<td class=\"colLast\"> <br>(<span class=\"implementationLabel\">Implementation(s):</span> <a href=\"p1/B.html\" title=\"class in p1\">B</a>)</td>\n" +
+ "</tr>\n" +
+ "<tr class=\"rowColor\">\n" +
+ "<th class=\"colFirst\" scope=\"row\"><a href=\"p2/A.html\" title=\"interface in p2\">A</a></th>\n" +
+ "<td class=\"colLast\"> <br>(<span class=\"implementationLabel\">Implementation(s):</span> <a href=\"p2/B.html\" title=\"class in p2\">B</a>)</td>\n" +
+ "</tr>\n" +
+ "</tbody>\n");
+
+ javadoc("-d", base.toString() + "/out-html4",
+ "-html4",
+ "-quiet",
+ "--show-module-contents", "all",
+ "--module-source-path", base.toString(),
+ "--module", "m");
+
+ checkExit(Exit.OK);
+
+ checkOutput("m/module-summary.html", true,
"<table class=\"providesSummary\" summary=\"Provides table, listing types, and an explanation\">\n" +
"<caption><span>Provides</span><span class=\"tabEnd\"> </span></caption>\n" +
"<tr>\n" +
@@ -343,6 +420,30 @@
"<h3>Services</h3>");
checkOutput("m/module-summary.html", true,
+ "<table class=\"providesSummary\">\n" +
+ "<caption><span>Provides</span><span class=\"tabEnd\"> </span></caption>\n" +
+ "<tr>\n" +
+ "<th class=\"colFirst\" scope=\"col\">Type</th>\n" +
+ "<th class=\"colLast\" scope=\"col\">Description</th>\n" +
+ "</tr>\n" +
+ "<tbody>\n" +
+ "<tr class=\"altColor\">\n" +
+ "<th class=\"colFirst\" scope=\"row\"><a href=\"p1/A.html\" title=\"interface in p1\">A</a></th>\n" +
+ "<td class=\"colLast\">\n" +
+ "<div class=\"block\">abc</div>\n</td>\n" +
+ "</tr>\n" +
+ "</tbody>\n" +
+ "</table>\n");
+
+ javadoc("-d", base.toString() + "/out-html4",
+ "-html4",
+ "-quiet",
+ "--module-source-path", base.toString(),
+ "--module", "m");
+
+ checkExit(Exit.OK);
+
+ checkOutput("m/module-summary.html", true,
"<table class=\"providesSummary\" summary=\"Provides table, listing types, and an explanation\">\n" +
"<caption><span>Provides</span><span class=\"tabEnd\"> </span></caption>\n" +
"<tr>\n" +
@@ -385,6 +486,44 @@
"<h3>Services</h3>");
checkOutput("m/module-summary.html", true,
+ "<table class=\"providesSummary\">\n" +
+ "<caption><span>Provides</span><span class=\"tabEnd\"> </span></caption>\n" +
+ "<tr>\n" +
+ "<th class=\"colFirst\" scope=\"col\">Type</th>\n" +
+ "<th class=\"colLast\" scope=\"col\">Description</th>\n" +
+ "</tr>\n" +
+ "<tbody>\n" +
+ "<tr class=\"altColor\">\n" +
+ "<th class=\"colFirst\" scope=\"row\"><a href=\"p1/A.html\" title=\"interface in p1\">A</a></th>\n" +
+ "<td class=\"colLast\">\n" +
+ "<div class=\"block\">abc</div>\n</td>\n" +
+ "</tr>\n" +
+ "</tbody>\n" +
+ "</table>",
+ "<table class=\"usesSummary\">\n" +
+ "<caption><span>Uses</span><span class=\"tabEnd\"> </span></caption>\n" +
+ "<tr>\n" +
+ "<th class=\"colFirst\" scope=\"col\">Type</th>\n" +
+ "<th class=\"colLast\" scope=\"col\">Description</th>\n" +
+ "</tr>\n" +
+ "<tbody>\n" +
+ "<tr class=\"altColor\">\n" +
+ "<th class=\"colFirst\" scope=\"row\"><a href=\"p2/B.html\" title=\"class in p2\">B</a></th>\n" +
+ "<td class=\"colLast\">\n" +
+ "<div class=\"block\">def</div>\n</td>\n" +
+ "</tr>\n" +
+ "</tbody>\n" +
+ "</table>\n");
+
+ javadoc("-d", base.toString() + "/out-html4",
+ "-html4",
+ "-quiet",
+ "--module-source-path", base.toString(),
+ "--module", "m");
+
+ checkExit(Exit.OK);
+
+ checkOutput("m/module-summary.html", true,
"<table class=\"providesSummary\" summary=\"Provides table, listing types, and an explanation\">\n" +
"<caption><span>Provides</span><span class=\"tabEnd\"> </span></caption>\n" +
"<tr>\n" +
--- a/test/langtools/jdk/javadoc/doclet/testModules/TestModules.java Thu Mar 01 16:35:36 2018 -0500
+++ b/test/langtools/jdk/javadoc/doclet/testModules/TestModules.java Fri Mar 02 21:00:12 2018 +0100
@@ -26,7 +26,7 @@
* @bug 8154119 8154262 8156077 8157987 8154261 8154817 8135291 8155995 8162363
* 8168766 8168688 8162674 8160196 8175799 8174974 8176778 8177562 8175218
* 8175823 8166306 8178043 8181622 8183511 8169819 8074407 8183037 8191464
- 8164407 8192007
+ 8164407 8192007 8182765
* @summary Test modules support in javadoc.
* @author bpatel
* @library ../lib
@@ -46,7 +46,10 @@
*/
@Test
void testHtml4() {
- javadoc("-d", "out", "-use", "-Xdoclint:none",
+ javadoc("-d", "out",
+ "-html4",
+ "-use",
+ "-Xdoclint:none",
"-overview", testSrc("overview.html"),
"--module-source-path", testSrc,
"--module", "moduleA,moduleB",
@@ -68,7 +71,9 @@
*/
@Test
void testHtml5() {
- javadoc("-d", "out-html5", "-html5", "-use", "-Xdoclint:none",
+ javadoc("-d", "out-html5",
+ "-use",
+ "-Xdoclint:none",
"-overview", testSrc("overview.html"),
"--module-source-path", testSrc,
"--module", "moduleA,moduleB",
@@ -90,7 +95,11 @@
*/
@Test
void testHtml4NoComment() {
- javadoc("-d", "out-nocomment", "-nocomment", "-use", "-Xdoclint:none",
+ javadoc("-d", "out-nocomment",
+ "-html4",
+ "-nocomment",
+ "-use",
+ "-Xdoclint:none",
"-overview", testSrc("overview.html"),
"--module-source-path", testSrc,
"--module", "moduleA,moduleB",
@@ -108,7 +117,10 @@
*/
@Test
void testHtml5NoComment() {
- javadoc("-d", "out-html5-nocomment", "-nocomment", "-html5", "-use", "-Xdoclint:none",
+ javadoc("-d", "out-html5-nocomment",
+ "-nocomment",
+ "-use",
+ "-Xdoclint:none",
"-overview", testSrc("overview.html"),
"--module-source-path", testSrc,
"--module", "moduleA,moduleB",
@@ -126,7 +138,9 @@
*/
@Test
void testHtml4UnnamedModule() {
- javadoc("-d", "out-nomodule", "-use",
+ javadoc("-d", "out-nomodule",
+ "-html4",
+ "-use",
"-overview", testSrc("overview.html"),
"-sourcepath", testSrc,
"testpkgnomodule", "testpkgnomodule1");
@@ -143,7 +157,8 @@
*/
@Test
void testHtml5UnnamedModule() {
- javadoc("-d", "out-html5-nomodule", "-html5", "-use",
+ javadoc("-d", "out-html5-nomodule",
+ "-use",
"-overview", testSrc("overview.html"),
"-sourcepath", testSrc,
"testpkgnomodule", "testpkgnomodule1");
@@ -159,7 +174,10 @@
*/
@Test
void testJDTagsInModules() {
- javadoc("-d", "out-mdltags", "-author", "-version", "-Xdoclint:none",
+ javadoc("-d", "out-mdltags",
+ "-author",
+ "-version",
+ "-Xdoclint:none",
"-tag", "regular:a:Regular Tag:",
"-tag", "moduletag:s:Module Tag:",
"--module-source-path", testSrc,
@@ -170,11 +188,32 @@
}
/**
+ * Test generated module pages with javadoc tags.
+ */
+ @Test
+ void testJDTagsInModules_html4() {
+ javadoc("-d", "out-mdltags-html4",
+ "-html4",
+ "-author",
+ "-version",
+ "-Xdoclint:none",
+ "-tag", "regular:a:Regular Tag:",
+ "-tag", "moduletag:s:Module Tag:",
+ "--module-source-path", testSrc,
+ "--module", "moduletags,moduleB",
+ "testpkgmdltags", "testpkgmdlB");
+ checkExit(Exit.OK);
+ checkModuleTags_html4();
+ }
+
+ /**
* Test generated module summary page.
*/
@Test
void testModuleSummary() {
- javadoc("-d", "out-moduleSummary", "-use", "-Xdoclint:none",
+ javadoc("-d", "out-moduleSummary",
+ "-use",
+ "-Xdoclint:none",
"--module-source-path", testSrc,
"--module", "moduleA,moduleB",
"testpkgmdlA", "testpkgmdlB", "moduleB/testpkg2mdlB");
@@ -184,11 +223,29 @@
}
/**
+ * Test generated module summary page.
+ */
+ @Test
+ void testModuleSummary_html4() {
+ javadoc("-d", "out-moduleSummary-html4",
+ "-html4",
+ "-use",
+ "-Xdoclint:none",
+ "--module-source-path", testSrc,
+ "--module", "moduleA,moduleB",
+ "testpkgmdlA", "testpkgmdlB", "moduleB/testpkg2mdlB");
+ checkExit(Exit.OK);
+ checkModuleSummary_html4();
+ checkNegatedModuleSummary_html4();
+ }
+
+ /**
* Test generated module summary page of an aggregating module.
*/
@Test
void testAggregatorModuleSummary() {
- javadoc("-d", "out-aggregatorModuleSummary", "-use",
+ javadoc("-d", "out-aggregatorModuleSummary",
+ "-use",
"--module-source-path", testSrc,
"--expand-requires", "transitive",
"--module", "moduleT");
@@ -201,7 +258,8 @@
*/
@Test
void testModuleFilesAndLinks() {
- javadoc("-d", "out-modulelinks", "-Xdoclint:none",
+ javadoc("-d", "out-modulelinks",
+ "-Xdoclint:none",
"--module-source-path", testSrc,
"--module", "moduleA,moduleB",
"testpkgmdlA", "testpkgmdlB");
@@ -215,7 +273,8 @@
*/
@Test
void testModuleDeprecation() {
- javadoc("-d", "out-moduledepr", "-Xdoclint:none",
+ javadoc("-d", "out-moduledepr",
+ "-Xdoclint:none",
"-tag", "regular:a:Regular Tag:",
"-tag", "moduletag:s:Module Tag:",
"--module-source-path", testSrc,
@@ -230,7 +289,8 @@
*/
@Test
void testModuleAnnotation() {
- javadoc("-d", "out-moduleanno", "-Xdoclint:none",
+ javadoc("-d", "out-moduleanno",
+ "-Xdoclint:none",
"--module-source-path", testSrc,
"--module", "moduleA,moduleB",
"testpkgmdlA", "testpkgmdlB");
@@ -239,11 +299,31 @@
}
/**
+ * Test annotations on modules.
+ */
+ @Test
+ void testModuleAnnotation_html4() {
+ javadoc("-d", "out-moduleanno-html4",
+ "-html4",
+ "-Xdoclint:none",
+ "--module-source-path", testSrc,
+ "--module", "moduleA,moduleB",
+ "testpkgmdlA", "testpkgmdlB");
+ checkExit(Exit.OK);
+ checkModuleAnnotation_html4();
+ }
+
+ /**
* Test module summary pages in "api" mode.
*/
@Test
void testApiMode() {
- javadoc("-d", "out-api", "-use", "--show-module-contents=api", "-author", "-version", "-Xdoclint:none",
+ javadoc("-d", "out-api",
+ "-use",
+ "--show-module-contents=api",
+ "-author",
+ "-version",
+ "-Xdoclint:none",
"-tag", "regular:a:Regular Tag:",
"-tag", "moduletag:s:Module Tag:",
"--module-source-path", testSrc,
@@ -262,7 +342,12 @@
*/
@Test
void testAllMode() {
- javadoc("-d", "out-all", "-use", "--show-module-contents=all", "-author", "-version", "-Xdoclint:none",
+ javadoc("-d", "out-all",
+ "-use",
+ "--show-module-contents=all",
+ "-author",
+ "-version",
+ "-Xdoclint:none",
"-tag", "regular:a:Regular Tag:",
"-tag", "moduletag:s:Module Tag:",
"--module-source-path", testSrc,
@@ -277,11 +362,35 @@
}
/**
+ * Test module summary pages in "all" mode.
+ */
+ @Test
+ void testAllModeHtml4() {
+ javadoc("-d", "out-all-html4",
+ "-html4",
+ "-use",
+ "--show-module-contents=all",
+ "-author",
+ "-version",
+ "-Xdoclint:none",
+ "-tag", "regular:a:Regular Tag:",
+ "-tag", "moduletag:s:Module Tag:",
+ "--module-source-path", testSrc,
+ "--module", "moduleA,moduleB,moduleC,moduletags",
+ "testpkgmdlA", "moduleA/concealedpkgmdlA", "testpkgmdlB", "testpkg2mdlB", "testpkgmdlC", "testpkgmdltags");
+ checkExit(Exit.OK);
+ checkModuleModeCommon_html4();
+ checkModuleModeApi_html4(false);
+ }
+
+ /**
* Test generated module summary page of a module with no exported package.
*/
@Test
void testModuleSummaryNoExportedPkgAll() {
- javadoc("-d", "out-ModuleSummaryNoExportedPkgAll", "-use", "--show-module-contents=all",
+ javadoc("-d", "out-ModuleSummaryNoExportedPkgAll",
+ "-use",
+ "--show-module-contents=all",
"-sourcepath", testSrc + "/moduleNoExport",
"--module", "moduleNoExport",
"testpkgmdlNoExport");
@@ -293,8 +402,25 @@
* Test generated module summary page of a module with no exported package.
*/
@Test
+ void testModuleSummaryNoExportedPkgAll_html4() {
+ javadoc("-d", "out-ModuleSummaryNoExportedPkgAll-html4",
+ "-html4",
+ "-use",
+ "--show-module-contents=all",
+ "-sourcepath", testSrc + "/moduleNoExport",
+ "--module", "moduleNoExport",
+ "testpkgmdlNoExport");
+ checkExit(Exit.OK);
+ checkModuleSummaryNoExported_html4(true);
+ }
+
+ /**
+ * Test generated module summary page of a module with no exported package.
+ */
+ @Test
void testModuleSummaryNoExportedPkgApi() {
- javadoc("-d", "out-ModuleSummaryNoExportedPkgApi", "-use",
+ javadoc("-d", "out-ModuleSummaryNoExportedPkgApi",
+ "-use",
"-sourcepath", testSrc + "/moduleNoExport",
"--module", "moduleNoExport",
"testpkgmdlNoExport");
@@ -303,6 +429,21 @@
}
/**
+ * Test generated module summary page of a module with no exported package.
+ */
+ @Test
+ void testModuleSummaryNoExportedPkgApi_html4() {
+ javadoc("-d", "out-ModuleSummaryNoExportedPkgApi-html4",
+ "-html4",
+ "-use",
+ "-sourcepath", testSrc + "/moduleNoExport",
+ "--module", "moduleNoExport",
+ "testpkgmdlNoExport");
+ checkExit(Exit.OK);
+ checkModuleSummaryNoExported_html4(false);
+ }
+
+ /**
* Test generated module pages for javadoc run for a single module having a single package.
*/
@Test
@@ -320,7 +461,9 @@
*/
@Test
void testSingleModuleMultiplePkg() {
- javadoc("-d", "out-singlemodmultiplepkg", "--show-module-contents=all", "-Xdoclint:none",
+ javadoc("-d", "out-singlemodmultiplepkg",
+ "--show-module-contents=all",
+ "-Xdoclint:none",
"--module-source-path", testSrc,
"--module", "moduleB",
"testpkg2mdlB", "testpkgmdlB");
@@ -333,7 +476,9 @@
*/
@Test
void testGroupOption() {
- javadoc("-d", "out-group", "--show-module-contents=all", "-Xdoclint:none",
+ javadoc("-d", "out-group",
+ "--show-module-contents=all",
+ "-Xdoclint:none",
"-tag", "regular:a:Regular Tag:",
"-tag", "moduletag:s:Module Tag:",
"--module-source-path", testSrc,
@@ -348,13 +493,37 @@
}
/**
+ * Test -group option for modules. The overview-summary.html page should group the modules accordingly.
+ */
+ @Test
+ void testGroupOption_html4() {
+ javadoc("-d", "out-group-html4",
+ "-html4",
+ "--show-module-contents=all",
+ "-Xdoclint:none",
+ "-tag", "regular:a:Regular Tag:",
+ "-tag", "moduletag:s:Module Tag:",
+ "--module-source-path", testSrc,
+ "-group", "Module Group A", "moduleA*",
+ "-group", "Module Group B & C", "moduleB*:moduleC*",
+ "-group", "Java SE Modules", "java*",
+ "--module", "moduleA,moduleB,moduleC,moduletags",
+ "moduleA/concealedpkgmdlA", "testpkgmdlA", "testpkg2mdlB", "testpkgmdlB", "testpkgmdlC",
+ "testpkgmdltags");
+ checkExit(Exit.OK);
+ checkGroupOption_html4();
+ }
+
+ /**
* Test -group option for modules and the ordering of module groups.
* The overview-summary.html page should group the modules accordingly and display the group tabs in
* the order it was provided on the command-line.
*/
@Test
void testGroupOptionOrdering() {
- javadoc("-d", "out-groupOrder", "--show-module-contents=all", "-Xdoclint:none",
+ javadoc("-d", "out-groupOrder",
+ "--show-module-contents=all",
+ "-Xdoclint:none",
"-tag", "regular:a:Regular Tag:",
"-tag", "moduletag:s:Module Tag:",
"--module-source-path", testSrc,
@@ -374,7 +543,9 @@
*/
@Test
void testUnnamedModuleGroupOption() {
- javadoc("-d", "out-groupnomodule", "-use", "-Xdoclint:none",
+ javadoc("-d", "out-groupnomodule",
+ "-use",
+ "-Xdoclint:none",
"-overview", testSrc("overview.html"),
"-sourcepath", testSrc,
"-group", "Package Group 0", "testpkgnomodule",
@@ -385,13 +556,33 @@
}
/**
+ * Test -group option for unnamed modules. The overview-summary.html page should group the packages accordingly.
+ */
+ @Test
+ void testUnnamedModuleGroupOption_html4() {
+ javadoc("-d", "out-groupnomodule-html4",
+ "-html4",
+ "-use",
+ "-Xdoclint:none",
+ "-overview", testSrc("overview.html"),
+ "-sourcepath", testSrc,
+ "-group", "Package Group 0", "testpkgnomodule",
+ "-group", "Package Group 1", "testpkgnomodule1",
+ "testpkgnomodule", "testpkgnomodule1");
+ checkExit(Exit.OK);
+ checkUnnamedModuleGroupOption_html4();
+ }
+
+ /**
* Test -group option for unnamed modules and the ordering of package groups.
* The overview-summary.html page should group the packages accordingly and display the group tabs in
* the order it was provided on the command-line.
*/
@Test
void testGroupOptionPackageOrdering() {
- javadoc("-d", "out-groupPkgOrder", "-use", "-Xdoclint:none",
+ javadoc("-d", "out-groupPkgOrder",
+ "-use",
+ "-Xdoclint:none",
"-overview", testSrc("overview.html"),
"-sourcepath", testSrc,
"-group", "Z Group", "testpkgnomodule",
@@ -406,7 +597,9 @@
*/
@Test
void testGroupOptionSingleModule() {
- javadoc("-d", "out-groupsinglemodule", "-use", "-Xdoclint:none",
+ javadoc("-d", "out-groupsinglemodule",
+ "-use",
+ "-Xdoclint:none",
"--module-source-path", testSrc,
"-group", "Module Group B", "moduleB*",
"--module", "moduleB",
@@ -419,8 +612,27 @@
* Test -group option for a single module.
*/
@Test
+ void testGroupOptionSingleModule_html4() {
+ javadoc("-d", "out-groupsinglemodule-html4",
+ "-html4",
+ "-use",
+ "-Xdoclint:none",
+ "--module-source-path", testSrc,
+ "-group", "Module Group B", "moduleB*",
+ "--module", "moduleB",
+ "testpkg2mdlB", "testpkgmdlB");
+ checkExit(Exit.OK);
+ checkGroupOptionSingleModule_html4();
+ }
+
+ /**
+ * Test -group option for a single module.
+ */
+ @Test
void testModuleName() {
- javadoc("-d", "out-modulename", "-use", "-Xdoclint:none",
+ javadoc("-d", "out-modulename",
+ "-use",
+ "-Xdoclint:none",
"--module-source-path", testSrc,
"--module", "moduleB,test.moduleFullName",
"testpkg2mdlB", "testpkgmdlB", "testpkgmdlfullname");
@@ -434,7 +646,10 @@
@Test
void testLinkOffline() {
String url = "https://docs.oracle.com/javase/9/docs/api/";
- javadoc("-d", "out-linkoffline", "-use", "--show-module-contents=all", "-Xdoclint:none",
+ javadoc("-d", "out-linkoffline",
+ "-use",
+ "--show-module-contents=all",
+ "-Xdoclint:none",
"--module-source-path", testSrc,
"--module", "moduleA,moduleB",
"-linkoffline", url, testSrc + "/jdk",
@@ -589,7 +804,7 @@
"Type Link: <a href=\"testpkgmdltags/TestClassInModuleTags.html\" title=\"class in "
+ "testpkgmdltags\"><code>TestClassInModuleTags</code></a>.",
"Member Link: <a href=\"testpkgmdltags/TestClassInModuleTags.html#"
- + "testMethod-java.lang.String-\"><code>testMethod(String)</code></a>.",
+ + "testMethod(java.lang.String)\"><code>testMethod(String)</code></a>.",
"Package Link: <a href=\"testpkgmdltags/package-summary.html\"><code>testpkgmdltags</code></a>.",
"<dt><span class=\"simpleTagLabel\">Since:</span></dt>\n"
+ "<dd>JDK 9</dd>",
@@ -610,6 +825,12 @@
+ "<dd>Just a simple module tag.</dd>");
}
+ void checkModuleTags_html4() {
+ checkOutput("moduletags/module-summary.html", true,
+ "Member Link: <a href=\"testpkgmdltags/TestClassInModuleTags.html#"
+ + "testMethod-java.lang.String-\"><code>testMethod(String)</code></a>.");
+ }
+
void checkOverviewSummaryModules() {
checkOutput("overview-summary.html", true,
"<table class=\"overviewSummary\" summary=\"Module Summary table, listing modules, and an explanation\">\n"
@@ -724,7 +945,7 @@
+ "Packages</a> | Services</li>\n"
+ "</ul>",
"<!-- ============ MODULES SUMMARY =========== -->\n"
- + "<a name=\"modules.summary\">\n"
+ + "<a id=\"modules.summary\">\n"
+ "<!-- -->\n"
+ "</a>",
"<tr class=\"altColor\" id=\"i0\">\n"
@@ -732,7 +953,7 @@
+ "<td class=\"colLast\"> </td>\n"
+ "</tr>",
"<!-- ============ PACKAGES SUMMARY =========== -->\n"
- + "<a name=\"packages.summary\">\n"
+ + "<a id=\"packages.summary\">\n"
+ "<!-- -->\n"
+ "</a>",
"<tr class=\"altColor\">\n"
@@ -747,7 +968,7 @@
+ "<a href=\"#packages.summary\">Packages</a> | <a href=\"#services.summary\">"
+ "Services</a></li>",
"<!-- ============ PACKAGES SUMMARY =========== -->\n"
- + "<a name=\"packages.summary\">\n"
+ + "<a id=\"packages.summary\">\n"
+ "<!-- -->\n"
+ "</a>",
"<tr class=\"altColor\" id=\"i0\">\n"
@@ -755,11 +976,11 @@
+ "<td class=\"colLast\"> </td>\n"
+ "</tr>",
"<!-- ============ PACKAGES SUMMARY =========== -->\n"
- + "<a name=\"packages.summary\">\n"
+ + "<a id=\"packages.summary\">\n"
+ "<!-- -->\n"
+ "</a>",
"<!-- ============ SERVICES SUMMARY =========== -->\n"
- + "<a name=\"services.summary\">\n"
+ + "<a id=\"services.summary\">\n"
+ "<!-- -->\n"
+ "</a>",
"<tr class=\"altColor\">\n"
@@ -784,6 +1005,31 @@
+ "</tr>");
}
+ void checkModuleSummary_html4() {
+ checkOutput("moduleA/module-summary.html", true,
+ "<!-- ============ MODULES SUMMARY =========== -->\n"
+ + "<a name=\"modules.summary\">\n"
+ + "<!-- -->\n"
+ + "</a>",
+ "<!-- ============ PACKAGES SUMMARY =========== -->\n"
+ + "<a name=\"packages.summary\">\n"
+ + "<!-- -->\n"
+ + "</a>");
+ checkOutput("moduleB/module-summary.html", true,
+ "<!-- ============ PACKAGES SUMMARY =========== -->\n"
+ + "<a name=\"packages.summary\">\n"
+ + "<!-- -->\n"
+ + "</a>",
+ "<!-- ============ PACKAGES SUMMARY =========== -->\n"
+ + "<a name=\"packages.summary\">\n"
+ + "<!-- -->\n"
+ + "</a>",
+ "<!-- ============ SERVICES SUMMARY =========== -->\n"
+ + "<a name=\"services.summary\">\n"
+ + "<!-- -->\n"
+ + "</a>");
+ }
+
void checkAggregatorModuleSummary() {
checkOutput("moduleT/module-summary.html", true,
"<div class=\"header\">\n"
@@ -814,6 +1060,14 @@
void checkNegatedModuleSummary() {
checkOutput("moduleA/module-summary.html", false,
"<!-- ============ SERVICES SUMMARY =========== -->\n"
+ + "<a id=\"services.summary\">\n"
+ + "<!-- -->\n"
+ + "</a>");
+ }
+
+ void checkNegatedModuleSummary_html4() {
+ checkOutput("moduleA/module-summary.html", false,
+ "<!-- ============ SERVICES SUMMARY =========== -->\n"
+ "<a name=\"services.summary\">\n"
+ "<!-- -->\n"
+ "</a>");
@@ -922,7 +1176,7 @@
+ "<td class=\"colLast\">\n"
+ "<div class=\"block\">This is a test description for the moduletags module.<br>\n"
+ " Type Link: <a href=\"moduletags/testpkgmdltags/TestClassInModuleTags.html\" title=\"class in testpkgmdltags\"><code>TestClassInModuleTags</code></a>.<br>\n"
- + " Member Link: <a href=\"moduletags/testpkgmdltags/TestClassInModuleTags.html#testMethod-java.lang.String-\"><code>testMethod(String)</code></a>.<br>\n"
+ + " Member Link: <a href=\"moduletags/testpkgmdltags/TestClassInModuleTags.html#testMethod(java.lang.String)\"><code>testMethod(String)</code></a>.<br>\n"
+ " Package Link: <a href=\"moduletags/testpkgmdltags/package-summary.html\"><code>testpkgmdltags</code></a>.<br></div>\n"
+ "</td>");
checkOutput("moduleA/module-summary.html", true,
@@ -937,14 +1191,14 @@
checkOutput("moduletags/module-summary.html", true,
"<li><a href=\"#module.description\">Description</a> | <a href=\"#modules.summary\">Modules"
+ "</a> | <a href=\"#packages.summary\">Packages</a> | Services</li>",
- "<table class=\"requiresSummary\" summary=\"Indirect Requires table, listing modules, and an explanation\">\n"
+ "<table class=\"requiresSummary\">\n"
+ "<caption><span>Indirect Requires</span><span class=\"tabEnd\"> </span></caption>",
"<td class=\"colFirst\">transitive</td>\n"
+ "<th class=\"colSecond\" scope=\"row\"><a href=\"../moduleB/module-summary.html\">moduleB</a></th>\n"
+ "<td class=\"colLast\">\n"
+ "<div class=\"block\">This is a test description for the moduleB module.</div>\n"
+ "</td>",
- "<table class=\"packagesSummary\" summary=\"Indirect Exports table, listing modules, and packages\">\n"
+ "<table class=\"packagesSummary\">\n"
+ "<caption><span>Indirect Exports</span><span class=\"tabEnd\"> </span></caption>",
"<td class=\"colFirst\">transitive static</td>\n"
+ "<th class=\"colSecond\" scope=\"row\"><a href=\"../moduleA/module-summary.html\">moduleA</a></th>\n"
@@ -952,6 +1206,42 @@
+ "<div class=\"block\">This is a test description for the moduleA module with a Search "
+ "phrase <a id=\"searchphrase\" class=\"searchTagResult\">search phrase</a>.</div>\n"
+ "</td>",
+ "<table class=\"requiresSummary\">\n"
+ + "<caption><span>Requires</span><span class=\"tabEnd\"> </span></caption>\n"
+ + "<tr>\n"
+ + "<th class=\"colFirst\" scope=\"col\">Modifier</th>\n"
+ + "<th class=\"colSecond\" scope=\"col\">Module</th>\n"
+ + "<th class=\"colLast\" scope=\"col\">Description</th>",
+ "<table class=\"requiresSummary\">\n"
+ + "<caption><span>Indirect Requires</span><span class=\"tabEnd\"> </span></caption>\n"
+ + "<tr>\n"
+ + "<th class=\"colFirst\" scope=\"col\">Modifier</th>\n"
+ + "<th class=\"colSecond\" scope=\"col\">Module</th>\n"
+ + "<th class=\"colLast\" scope=\"col\">Description</th>",
+ "<table class=\"packagesSummary\">\n"
+ + "<caption><span>Indirect Opens</span><span class=\"tabEnd\"> </span></caption>\n"
+ + "<tr>\n"
+ + "<th class=\"colFirst\" scope=\"col\">From</th>\n"
+ + "<th class=\"colLast\" scope=\"col\">Packages</th>\n"
+ + "</tr>\n",
+ "<th class=\"colFirst\" scope=\"row\"><a href=\"../moduleB/module-summary.html\">moduleB</a></th>\n"
+ + "<td class=\"colLast\"><a href=\"../moduleB/testpkgmdlB/package-summary.html\">testpkgmdlB</a></td>\n");
+ }
+
+ void checkModuleModeCommon_html4() {
+ checkOutput("overview-summary.html", true,
+ "<th class=\"colFirst\" scope=\"row\"><a href=\"moduletags/module-summary.html\">moduletags</a></th>\n"
+ + "<td class=\"colLast\">\n"
+ + "<div class=\"block\">This is a test description for the moduletags module.<br>\n"
+ + " Type Link: <a href=\"moduletags/testpkgmdltags/TestClassInModuleTags.html\" title=\"class in testpkgmdltags\"><code>TestClassInModuleTags</code></a>.<br>\n"
+ + " Member Link: <a href=\"moduletags/testpkgmdltags/TestClassInModuleTags.html#testMethod-java.lang.String-\"><code>testMethod(String)</code></a>.<br>\n"
+ + " Package Link: <a href=\"moduletags/testpkgmdltags/package-summary.html\"><code>testpkgmdltags</code></a>.<br></div>\n"
+ + "</td>");
+ checkOutput("moduletags/module-summary.html", true,
+ "<table class=\"requiresSummary\" summary=\"Indirect Requires table, listing modules, and an explanation\">\n"
+ + "<caption><span>Indirect Requires</span><span class=\"tabEnd\"> </span></caption>",
+ "<table class=\"packagesSummary\" summary=\"Indirect Exports table, listing modules, and packages\">\n"
+ + "<caption><span>Indirect Exports</span><span class=\"tabEnd\"> </span></caption>",
"<table class=\"requiresSummary\" summary=\"Requires table, listing modules, and an explanation\">\n"
+ "<caption><span>Requires</span><span class=\"tabEnd\"> </span></caption>\n"
+ "<tr>\n"
@@ -969,9 +1259,7 @@
+ "<tr>\n"
+ "<th class=\"colFirst\" scope=\"col\">From</th>\n"
+ "<th class=\"colLast\" scope=\"col\">Packages</th>\n"
- + "</tr>\n",
- "<th class=\"colFirst\" scope=\"row\"><a href=\"../moduleB/module-summary.html\">moduleB</a></th>\n"
- + "<td class=\"colLast\"><a href=\"../moduleB/testpkgmdlB/package-summary.html\">testpkgmdlB</a></td>\n");
+ + "</tr>\n");
}
void checkModuleModeApi(boolean found) {
@@ -983,7 +1271,7 @@
+ "<a href=\"#packages.summary\">Packages</a> | <a href=\"#services.summary\">Services</a></li>",
"<th class=\"colFirst\" scope=\"row\"><a href=\"testpkgmdlB/package-summary.html\">testpkgmdlB</a></th>\n"
+ "<td class=\"colLast\"> </td>",
- "<table class=\"packagesSummary\" summary=\"Packages table, listing packages, and an explanation\">\n"
+ "<table class=\"packagesSummary\">\n"
+ "<caption><span>Opens</span><span class=\"tabEnd\"> </span></caption>\n"
+ "<tr>\n"
+ "<th class=\"colFirst\" scope=\"col\">Package</th>\n"
@@ -1001,6 +1289,23 @@
+ "<td class=\"colLast\"> </td>");
}
+ void checkModuleModeApi_html4(boolean found) {
+ checkOutput("moduleB/module-summary.html", found,
+ "<table class=\"packagesSummary\" summary=\"Packages table, listing packages, and an explanation\">\n"
+ + "<caption><span>Opens</span><span class=\"tabEnd\"> </span></caption>\n"
+ + "<tr>\n"
+ + "<th class=\"colFirst\" scope=\"col\">Package</th>\n"
+ + "<th class=\"colLast\" scope=\"col\">Description</th>\n"
+ + "</tr>\n"
+ + "<tbody>\n"
+ + "<tr class=\"altColor\" id=\"i0\">\n"
+ + "<th class=\"colFirst\" scope=\"row\"><a href=\"testpkgmdlB/package-summary.html\">testpkgmdlB</a></th>\n"
+ + "<td class=\"colLast\"> </td>\n"
+ + "</tr>\n"
+ + "</tbody>\n"
+ + "</table>");
+ }
+
void checkModuleModeAll(boolean found) {
checkOutput("moduleA/module-summary.html", found,
"<td class=\"colFirst\"> </td>\n"
@@ -1084,11 +1389,18 @@
void checkModuleAnnotation() {
checkOutput("moduleB/module-summary.html", true,
+ "<p><a href=\"testpkgmdlB/AnnotationType.html\" title=\"annotation in testpkgmdlB\">@AnnotationType</a>(<a href=\"testpkgmdlB/AnnotationType.html#optional()\">optional</a>=\"Module Annotation\",\n"
+ + " <a href=\"testpkgmdlB/AnnotationType.html#required()\">required</a>=2016)\n"
+ + "</p>");
+ checkOutput("moduleB/module-summary.html", false,
+ "@AnnotationTypeUndocumented");
+ }
+
+ void checkModuleAnnotation_html4() {
+ checkOutput("moduleB/module-summary.html", true,
"<p><a href=\"testpkgmdlB/AnnotationType.html\" title=\"annotation in testpkgmdlB\">@AnnotationType</a>(<a href=\"testpkgmdlB/AnnotationType.html#optional--\">optional</a>=\"Module Annotation\",\n"
+ " <a href=\"testpkgmdlB/AnnotationType.html#required--\">required</a>=2016)\n"
+ "</p>");
- checkOutput("moduleB/module-summary.html", false,
- "@AnnotationTypeUndocumented");
}
void checkOverviewFrame(boolean found) {
@@ -1101,15 +1413,45 @@
void checkModuleSummaryNoExported(boolean found) {
checkOutput("moduleNoExport/module-summary.html", found,
"<!-- ============ PACKAGES SUMMARY =========== -->\n"
- + "<a name=\"packages.summary\">\n"
+ + "<a id=\"packages.summary\">\n"
+ "<!-- -->\n"
+ "</a>",
"<caption><span>Concealed</span><span class=\"tabEnd\"> </span></caption>");
}
+ void checkModuleSummaryNoExported_html4(boolean found) {
+ checkOutput("moduleNoExport/module-summary.html", found,
+ "<!-- ============ PACKAGES SUMMARY =========== -->\n"
+ + "<a name=\"packages.summary\">\n"
+ + "<!-- -->\n"
+ + "</a>");
+ }
+
void checkGroupOption() {
checkOutput("overview-summary.html", true,
"<div class=\"contentContainer\">\n"
+ + "<table class=\"overviewSummary\">\n"
+ + "<caption><span id=\"t0\" class=\"activeTableTab\"><span>All Modules</span><span class=\"tabEnd\"> "
+ + "</span></span><span id=\"t1\" class=\"tableTab\"><span><a href=\"javascript:showGroups(1);\">"
+ + "Module Group A</a></span><span class=\"tabEnd\"> </span></span><span id=\"t2\" class=\"tableTab\">"
+ + "<span><a href=\"javascript:showGroups(2);\">Module Group B & C</a></span><span class=\"tabEnd\">"
+ + " </span></span><span id=\"t4\" class=\"tableTab\"><span><a href=\"javascript:showGroups(4);\">"
+ + "Other Modules</a></span><span class=\"tabEnd\"> </span></span></caption>",
+ "var groups = {\"i0\":1,\"i1\":2,\"i2\":2,\"i3\":4};\n"
+ + "var tabs = {65535:[\"t0\",\"All Modules\"],1:[\"t1\",\"Module Group A\"],2:[\"t2\",\"Module Group B & C\"],4:[\"t4\",\"Other Modules\"]};\n"
+ + "var altColor = \"altColor\";\n"
+ + "var rowColor = \"rowColor\";\n"
+ + "var tableTab = \"tableTab\";\n"
+ + "var activeTableTab = \"activeTableTab\";");
+ checkOutput("overview-summary.html", false,
+ "<table class=\"overviewSummary\">\n"
+ + "<caption><span>Modules</span><span class=\"tabEnd\"> </span></caption>",
+ "Java SE Modules");
+ }
+
+ void checkGroupOption_html4() {
+ checkOutput("overview-summary.html", true,
+ "<div class=\"contentContainer\">\n"
+ "<table class=\"overviewSummary\" summary=\"Module Summary table, listing modules, and an explanation\">\n"
+ "<caption><span id=\"t0\" class=\"activeTableTab\"><span>All Modules</span><span class=\"tabEnd\"> "
+ "</span></span><span id=\"t1\" class=\"tableTab\"><span><a href=\"javascript:showGroups(1);\">"
@@ -1159,7 +1501,7 @@
+ "<div class=\"block\">The overview summary page header.</div>\n"
+ "</div>\n"
+ "<div class=\"contentContainer\">\n"
- + "<table class=\"overviewSummary\" summary=\"Package Summary table, listing packages, and an explanation\">\n"
+ + "<table class=\"overviewSummary\">\n"
+ "<caption><span id=\"t0\" class=\"activeTableTab\"><span>All Packages</span><span class=\"tabEnd\"> "
+ "</span></span><span id=\"t1\" class=\"tableTab\"><span><a href=\"javascript:showGroups(1);\">"
+ "Package Group 0</a></span><span class=\"tabEnd\"> </span></span><span id=\"t2\" "
@@ -1173,6 +1515,20 @@
+ "var activeTableTab = \"activeTableTab\";");
}
+ void checkUnnamedModuleGroupOption_html4() {
+ checkOutput("overview-summary.html", true,
+ "<div class=\"contentContainer\">\n"
+ + "<div class=\"block\">The overview summary page header.</div>\n"
+ + "</div>\n"
+ + "<div class=\"contentContainer\">\n"
+ + "<table class=\"overviewSummary\" summary=\"Package Summary table, listing packages, and an explanation\">\n"
+ + "<caption><span id=\"t0\" class=\"activeTableTab\"><span>All Packages</span><span class=\"tabEnd\"> "
+ + "</span></span><span id=\"t1\" class=\"tableTab\"><span><a href=\"javascript:showGroups(1);\">"
+ + "Package Group 0</a></span><span class=\"tabEnd\"> </span></span><span id=\"t2\" "
+ + "class=\"tableTab\"><span><a href=\"javascript:showGroups(2);\">Package Group 1</a></span>"
+ + "<span class=\"tabEnd\"> </span></span></caption>");
+ }
+
void checkGroupOptionPackageOrdering() {
checkOutput("overview-summary.html", true,
"<caption><span id=\"t0\" class=\"activeTableTab\"><span>All Packages</span><span "
@@ -1186,6 +1542,16 @@
void checkGroupOptionSingleModule() {
checkOutput("overview-summary.html", true,
"<div class=\"contentContainer\">\n"
+ + "<table class=\"overviewSummary\">\n"
+ + "<caption><span>Module Group B</span><span class=\"tabEnd\"> </span></caption>");
+ checkOutput("overview-summary.html", false,
+ "<table class=\"overviewSummary\">\n"
+ + "<caption><span>Modules</span><span class=\"tabEnd\"> </span></caption>");
+ }
+
+ void checkGroupOptionSingleModule_html4() {
+ checkOutput("overview-summary.html", true,
+ "<div class=\"contentContainer\">\n"
+ "<table class=\"overviewSummary\" summary=\"Module Summary table, listing modules, and an explanation\">\n"
+ "<caption><span>Module Group B</span><span class=\"tabEnd\"> </span></caption>");
checkOutput("overview-summary.html", false,
--- a/test/langtools/jdk/javadoc/doclet/testNavigation/TestNavigation.java Thu Mar 01 16:35:36 2018 -0500
+++ b/test/langtools/jdk/javadoc/doclet/testNavigation/TestNavigation.java Fri Mar 02 21:00:12 2018 +0100
@@ -23,7 +23,7 @@
/*
* @test
- * @bug 4131628 4664607 7025314 8023700 7198273 8025633 8026567 8081854 8150188 8151743 8196027
+ * @bug 4131628 4664607 7025314 8023700 7198273 8025633 8026567 8081854 8150188 8151743 8196027 8182765
* @summary Make sure the Next/Prev Class links iterate through all types.
* Make sure the navagation is 2 columns, not 3.
* @author jamieh
@@ -42,7 +42,8 @@
@Test
void test() {
- javadoc("-d", "out", "-overview", testSrc("overview.html"),
+ javadoc("-d", "out",
+ "-overview", testSrc("overview.html"),
"-sourcepath", testSrc,
"pkg");
checkExit(Exit.OK);
@@ -62,7 +63,7 @@
checkOutput("pkg/I.html", true,
// Test for 4664607
"<div class=\"skipNav\"><a href=\"#skip.navbar.top\" title=\"Skip navigation links\">Skip navigation links</a></div>\n"
- + "<a name=\"navbar.top.firstrow\">\n"
+ + "<a id=\"navbar.top.firstrow\">\n"
+ "<!-- -->\n"
+ "</a>",
"<li><a href=\"../overview-summary.html\">Overview</a></li>");
@@ -76,6 +77,49 @@
+ "$('.navPadding').css('padding-top', $('.fixedNav').css(\"height\"));\n"
+ "//-->\n"
+ "</script>\n"
+ + "</nav>\n"
+ + "</header>\n"
+ + "<!-- ======== START OF CLASS DATA ======== -->");
+
+ checkOutput("pkg/package-summary.html", true,
+ "<!-- ========= END OF TOP NAVBAR ========= -->\n"
+ + "</div>\n"
+ + "<div class=\"navPadding\"> </div>\n"
+ + "<script type=\"text/javascript\"><!--\n"
+ + "$('.navPadding').css('padding-top', $('.fixedNav').css(\"height\"));\n"
+ + "//-->\n"
+ + "</script>\n"
+ + "</nav>\n"
+ + "</header>\n"
+ + "<main role=\"main\">\n"
+ + "<div class=\"header\">");
+ }
+
+ @Test
+ void test_html4() {
+ javadoc("-d", "out-html4",
+ "-html4",
+ "-overview", testSrc("overview.html"),
+ "-sourcepath", testSrc,
+ "pkg");
+ checkExit(Exit.OK);
+
+ checkOutput("pkg/I.html", true,
+ // Test for 4664607
+ "<div class=\"skipNav\"><a href=\"#skip.navbar.top\" title=\"Skip navigation links\">Skip navigation links</a></div>\n"
+ + "<a name=\"navbar.top.firstrow\">\n"
+ + "<!-- -->\n"
+ + "</a>");
+
+ // Remaining tests check for additional padding to offset the fixed navigation bar.
+ checkOutput("pkg/A.html", true,
+ "<!-- ========= END OF TOP NAVBAR ========= -->\n"
+ + "</div>\n"
+ + "<div class=\"navPadding\"> </div>\n"
+ + "<script type=\"text/javascript\"><!--\n"
+ + "$('.navPadding').css('padding-top', $('.fixedNav').css(\"height\"));\n"
+ + "//-->\n"
+ + "</script>\n"
+ "<!-- ======== START OF CLASS DATA ======== -->");
checkOutput("pkg/package-summary.html", true,
@@ -92,7 +136,8 @@
// Test for checking additional padding to offset the fixed navigation bar in HTML5.
@Test
void test1() {
- javadoc("-d", "out-1", "-html5",
+ javadoc("-d", "out-1",
+ "-html5",
"-sourcepath", testSrc,
"pkg");
checkExit(Exit.OK);
@@ -123,7 +168,8 @@
// Test to make sure that no extra padding for nav bar gets generated if -nonavbar is specified for HTML4.
@Test
void test2() {
- javadoc("-d", "out-2", "-nonavbar",
+ javadoc("-d", "out-2",
+ "-nonavbar",
"-sourcepath", testSrc,
"pkg");
checkExit(Exit.OK);
@@ -152,7 +198,9 @@
// Test to make sure that no extra padding for nav bar gets generated if -nonavbar is specified for HTML5.
@Test
void test3() {
- javadoc("-d", "out-3", "-html5", "-nonavbar",
+ javadoc("-d", "out-3",
+ "-html5",
+ "-nonavbar",
"-sourcepath", testSrc,
"pkg");
checkExit(Exit.OK);
--- a/test/langtools/jdk/javadoc/doclet/testNestedGenerics/TestNestedGenerics.java Thu Mar 01 16:35:36 2018 -0500
+++ b/test/langtools/jdk/javadoc/doclet/testNestedGenerics/TestNestedGenerics.java Fri Mar 02 21:00:12 2018 +0100
@@ -23,7 +23,7 @@
/*
* @test
- * @bug 6758050 8025633
+ * @bug 6758050 8025633 8182765
* @summary Test HTML output for nested generic types.
* @author bpatel
* @library ../lib
@@ -48,6 +48,20 @@
checkOutput("pkg/NestedGenerics.html", true,
"<div class=\"block\">Contains <a " +
+ "href=\"#foo(java.util.Map)\"><code>foo" +
+ "(java.util.Map<A, java.util.Map<A, A>>)</code></a></div>");
+ }
+
+ @Test
+ void test_html4() {
+ javadoc("-d", "out-html4",
+ "-html4",
+ "-sourcepath", testSrc,
+ "pkg");
+ checkExit(Exit.OK);
+
+ checkOutput("pkg/NestedGenerics.html", true,
+ "<div class=\"block\">Contains <a " +
"href=\"#foo-java.util.Map-\"><code>foo" +
"(java.util.Map<A, java.util.Map<A, A>>)</code></a></div>");
}
--- a/test/langtools/jdk/javadoc/doclet/testNewLanguageFeatures/TestNewLanguageFeatures.java Thu Mar 01 16:35:36 2018 -0500
+++ b/test/langtools/jdk/javadoc/doclet/testNewLanguageFeatures/TestNewLanguageFeatures.java Fri Mar 02 21:00:12 2018 +0100
@@ -24,7 +24,7 @@
/*
* @test
* @bug 4789689 4905985 4927164 4827184 4993906 5004549 7025314 7010344 8025633 8026567 8162363
- * 8175200 8186332
+ * 8175200 8186332 8182765
* @summary Run Javadoc on a set of source files that demonstrate new
* language features. Check the output to ensure that the new
* language features are properly documented.
@@ -46,8 +46,8 @@
void test() {
javadoc("-Xdoclint:none",
"-d", "out",
- "-use", "-sourcepath",
- testSrc,
+ "-use",
+ "-sourcepath", testSrc,
"pkg", "pkg1", "pkg2");
checkExit(Exit.OK);
@@ -57,6 +57,21 @@
checkAnnotationTypeUsage();
}
+ @Test
+ void test_html4() {
+ javadoc("-Xdoclint:none",
+ "-d", "out-html4",
+ "-html4",
+ "-use",
+ "-sourcepath", testSrc,
+ "pkg", "pkg1", "pkg2");
+ checkExit(Exit.OK);
+
+ checkTypeParameters_html4();
+ checkVarArgs_html4();
+ checkAnnotationTypeUsage_html4();
+ }
+
//=================================
// ENUM TESTING
//=================================
@@ -136,7 +151,7 @@
"<td class=\"colFirst\"><code><a href=\"TypeParameters.html\" "
+ "title=\"type parameter in TypeParameters\">E</a>[]</code></td>\n"
+ "<th class=\"colSecond\" scope=\"row\"><code><span class=\"memberNameLink\">"
- + "<a href=\"#methodThatReturnsTypeParameterA-E:A-\">"
+ + "<a href=\"#methodThatReturnsTypeParameterA(E%5B%5D)\">"
+ "methodThatReturnsTypeParameterA</a></span>​(<a href=\"TypeParameters.html\" "
+ "title=\"type parameter in TypeParameters\">E</a>[] e)</code>",
"<pre>public <a href=\"TypeParameters.html\" "
@@ -146,7 +161,7 @@
"<td class=\"colFirst\"><code><T extends java.lang.Object & java.lang.Comparable<? super T>>"
+ "<br>T</code></td>\n"
+ "<th class=\"colSecond\" scope=\"row\"><code><span class=\"memberNameLink\">"
- + "<a href=\"#methodtThatReturnsTypeParametersB-java.util.Collection-\">"
+ + "<a href=\"#methodtThatReturnsTypeParametersB(java.util.Collection)\">"
+ "methodtThatReturnsTypeParametersB</a></span>​(java.util.Collection<? extends T> coll)</code>",
"<div class=\"block\">Returns TypeParameters</div>\n",
// Method takes a TypeVariable
@@ -154,7 +169,7 @@
+ "<a href=\"TypeParameters.html\" title=\"type parameter in TypeParameters\">E</a>"
+ "</code></td>\n"
+ "<th class=\"colSecond\" scope=\"row\"><code><span class=\"memberNameLink\">"
- + "<a href=\"#orElseThrow-java.util.function.Supplier-\">"
+ + "<a href=\"#orElseThrow(java.util.function.Supplier)\">"
+ "orElseThrow</a></span>​(java.util.function.Supplier<? extends X> exceptionSupplier)</code>"
);
@@ -231,7 +246,7 @@
+ "pkg2\">Foo</a></span><span class=\"tabEnd\"> </span></caption>",
"<th class=\"colSecond\" scope=\"row\"><span class=\"typeNameLabel\">ClassUseTest1."
+ "</span><code><span class=\"memberNameLink\"><a href=\"../"
- + "ClassUseTest1.html#method-T-\">method</a></span>"
+ + "ClassUseTest1.html#method(T)\">method</a></span>"
+ "​(T t)</code></th>",
"<caption><span>Fields in <a href=\"../"
+ "package-summary.html\">pkg2</a> with type parameters of "
@@ -272,7 +287,7 @@
+ "</span></caption>",
"<th class=\"colSecond\" scope=\"row\"><span class=\"typeNameLabel\">"
+ "ClassUseTest1.</span><code><span class=\"memberNameLink\"><a href=\"../"
- + "ClassUseTest1.html#method-T-\">method</a></span>"
+ + "ClassUseTest1.html#method(T)\">method</a></span>"
+ "​(T t)</code></th>"
);
@@ -295,7 +310,7 @@
+ " </span></caption>",
"<th class=\"colSecond\" scope=\"row\"><span class=\"typeNameLabel\">ClassUseTest2."
+ "</span><code><span class=\"memberNameLink\"><a href=\"../"
- + "ClassUseTest2.html#method-T-\">method</a></span>"
+ + "ClassUseTest2.html#method(T)\">method</a></span>"
+ "​(T t)</code></th>",
"<caption><span>Fields in <a href=\"../"
+ "package-summary.html\">pkg2</a> declared as <a href=\"../"
@@ -336,7 +351,7 @@
+ "</span></caption>",
"<th class=\"colSecond\" scope=\"row\"><span class=\"typeNameLabel\">ClassUseTest2."
+ "</span><code><span class=\"memberNameLink\"><a href=\"../"
- + "ClassUseTest2.html#method-T-\">method</a></span>"
+ + "ClassUseTest2.html#method(T)\">method</a></span>"
+ "​(T t)</code></th>",
"<caption><span>Methods in <a href=\"../"
+ "package-summary.html\">pkg2</a> that return types with "
@@ -371,7 +386,7 @@
+ " </span></caption>",
"<th class=\"colSecond\" scope=\"row\"><span class=\"typeNameLabel\">ClassUseTest3"
+ ".</span><code><span class=\"memberNameLink\"><a href=\"../ClassUseTest3."
- + "html#method-T-\">method</a></span>​(T t)</code></th>",
+ + "html#method(T)\">method</a></span>​(T t)</code></th>",
"<td class=\"colFirst\"><code><T extends <a href=\"../"
+ "ParamTest2.html\" title=\"class in pkg2\">"
+ "ParamTest2</a><java.util.List<? extends <a href=\".."
@@ -400,7 +415,7 @@
+ "pkg2\">Foo4</a></span><span class=\"tabEnd\"> </span></caption>",
"<th class=\"colSecond\" scope=\"row\"><span class=\"typeNameLabel\">ClassUseTest3."
+ "</span><code><span class=\"memberNameLink\"><a href=\"../ClassUseTest3."
- + "html#method-T-\">method</a></span>​(T t)</code>"
+ + "html#method(T)\">method</a></span>​(T t)</code>"
+ "</th>",
"<caption><span>Methods in <a href=\"../"
+ "package-summary.html\">pkg2</a> that return types with "
@@ -434,7 +449,7 @@
+ "<td class=\"colFirst\"><code>void</code></td>\n"
+ "<th class=\"colSecond\" scope=\"row\"><span class=\"typeNameLabel\">ClassUseTest3."
+ "</span><code><span class=\"memberNameLink\"><a href=\"../ClassUseTest3."
- + "html#method-java.util.Set-\">method</a></span>​(java."
+ + "html#method(java.util.Set)\">method</a></span>​(java."
+ "util.Set<<a href=\"../Foo4.html\" title=\""
+ "class in pkg2\">Foo4</a>> p)</code></th>",
"<caption><span>Constructor parameters in <a href=\"../"
@@ -448,6 +463,129 @@
// TYPE PARAMETER IN INDEX
//=================================
checkOutput("index-all.html", true,
+ "<span class=\"memberNameLink\"><a href=\"pkg2/Foo.html#method(java.util.Vector)\">"
+ + "method(Vector<Object>)</a></span>"
+ );
+
+ // TODO: duplicate of previous case; left in delibarately for now to simplify comparison testing
+ //=================================
+ // TYPE PARAMETER IN INDEX
+ //=================================
+ checkOutput("index-all.html", true,
+ "<span class=\"memberNameLink\"><a href=\"pkg2/Foo.html#method(java.util.Vector)\">"
+ + "method(Vector<Object>)</a></span>"
+ );
+
+ // No type parameters in class frame.
+ checkOutput("allclasses-frame.html", false,
+ "<a href=\"../pkg/TypeParameters.html\" title=\"class in pkg\">"
+ + "TypeParameters</a><<a href=\"../pkg/TypeParameters.html\" "
+ + "title=\"type parameter in TypeParameters\">E</a>>"
+ );
+
+ }
+
+ //=================================
+ // TYPE PARAMETER TESTING
+ //=================================
+
+ void checkTypeParameters_html4() {
+ checkOutput("pkg/TypeParameters.html", true,
+ // Make sure the header is correct.
+ "<td class=\"colFirst\"><code><a href=\"TypeParameters.html\" "
+ + "title=\"type parameter in TypeParameters\">E</a>[]</code></td>\n"
+ + "<th class=\"colSecond\" scope=\"row\"><code><span class=\"memberNameLink\">"
+ + "<a href=\"#methodThatReturnsTypeParameterA-E:A-\">"
+ + "methodThatReturnsTypeParameterA</a></span>​(<a href=\"TypeParameters.html\" "
+ + "title=\"type parameter in TypeParameters\">E</a>[] e)</code>",
+ "<td class=\"colFirst\"><code><T extends java.lang.Object & java.lang.Comparable<? super T>>"
+ + "<br>T</code></td>\n"
+ + "<th class=\"colSecond\" scope=\"row\"><code><span class=\"memberNameLink\">"
+ + "<a href=\"#methodtThatReturnsTypeParametersB-java.util.Collection-\">"
+ + "methodtThatReturnsTypeParametersB</a></span>​(java.util.Collection<? extends T> coll)</code>",
+ "<div class=\"block\">Returns TypeParameters</div>\n",
+ // Method takes a TypeVariable
+ "<td class=\"colFirst\"><code><X extends java.lang.Throwable><br>"
+ + "<a href=\"TypeParameters.html\" title=\"type parameter in TypeParameters\">E</a>"
+ + "</code></td>\n"
+ + "<th class=\"colSecond\" scope=\"row\"><code><span class=\"memberNameLink\">"
+ + "<a href=\"#orElseThrow-java.util.function.Supplier-\">"
+ + "orElseThrow</a></span>​(java.util.function.Supplier<? extends X> exceptionSupplier)</code>"
+ );
+
+ //==============================================================
+ // Test Class-Use Documentation for Type Parameters.
+ //==============================================================
+ // ClassUseTest1: <T extends Foo & Foo2>
+ checkOutput("pkg2/class-use/Foo.html", true,
+ "<th class=\"colSecond\" scope=\"row\"><span class=\"typeNameLabel\">ClassUseTest1."
+ + "</span><code><span class=\"memberNameLink\"><a href=\"../"
+ + "ClassUseTest1.html#method-T-\">method</a></span>"
+ + "​(T t)</code></th>"
+ );
+
+ checkOutput("pkg2/class-use/Foo2.html", true,
+ "<th class=\"colSecond\" scope=\"row\"><span class=\"typeNameLabel\">"
+ + "ClassUseTest1.</span><code><span class=\"memberNameLink\"><a href=\"../"
+ + "ClassUseTest1.html#method-T-\">method</a></span>"
+ + "​(T t)</code></th>"
+ );
+
+ // ClassUseTest2: <T extends ParamTest<Foo3>>
+ checkOutput("pkg2/class-use/ParamTest.html", true,
+ "<th class=\"colSecond\" scope=\"row\"><span class=\"typeNameLabel\">ClassUseTest2."
+ + "</span><code><span class=\"memberNameLink\"><a href=\"../"
+ + "ClassUseTest2.html#method-T-\">method</a></span>"
+ + "​(T t)</code></th>"
+ );
+
+ checkOutput("pkg2/class-use/Foo3.html", true,
+ "<th class=\"colSecond\" scope=\"row\"><span class=\"typeNameLabel\">ClassUseTest2."
+ + "</span><code><span class=\"memberNameLink\"><a href=\"../"
+ + "ClassUseTest2.html#method-T-\">method</a></span>"
+ + "​(T t)</code></th>"
+ );
+
+ // ClassUseTest3: <T extends ParamTest2<List<? extends Foo4>>>
+ checkOutput("pkg2/class-use/ParamTest2.html", true,
+ "<th class=\"colSecond\" scope=\"row\"><span class=\"typeNameLabel\">ClassUseTest3"
+ + ".</span><code><span class=\"memberNameLink\"><a href=\"../ClassUseTest3."
+ + "html#method-T-\">method</a></span>​(T t)</code></th>"
+ );
+
+ checkOutput("pkg2/class-use/Foo4.html", true,
+ "<th class=\"colSecond\" scope=\"row\"><span class=\"typeNameLabel\">ClassUseTest3."
+ + "</span><code><span class=\"memberNameLink\"><a href=\"../ClassUseTest3."
+ + "html#method-T-\">method</a></span>​(T t)</code>"
+ + "</th>"
+ );
+
+ // Type parameters in constructor and method args
+ checkOutput("pkg2/class-use/Foo4.html", true,
+ "<caption><span>Method parameters in <a href=\"../"
+ + "package-summary.html\">pkg2</a> with type arguments of "
+ + "type <a href=\"../Foo4.html\" title=\"class in "
+ + "pkg2\">Foo4</a></span><span class=\"tabEnd\"> "
+ + "</span></caption>\n"
+ + "<tr>\n"
+ + "<th class=\"colFirst\" scope=\"col\">Modifier and Type</th>\n"
+ + "<th class=\"colSecond\" scope=\"col\">Method</th>\n"
+ + "<th class=\"colLast\" scope=\"col\">Description</th>\n"
+ + "</tr>\n"
+ + "<tbody>\n"
+ + "<tr class=\"altColor\">\n"
+ + "<td class=\"colFirst\"><code>void</code></td>\n"
+ + "<th class=\"colSecond\" scope=\"row\"><span class=\"typeNameLabel\">ClassUseTest3."
+ + "</span><code><span class=\"memberNameLink\"><a href=\"../ClassUseTest3."
+ + "html#method-java.util.Set-\">method</a></span>​(java."
+ + "util.Set<<a href=\"../Foo4.html\" title=\""
+ + "class in pkg2\">Foo4</a>> p)</code></th>"
+ );
+
+ //=================================
+ // TYPE PARAMETER IN INDEX
+ //=================================
+ checkOutput("index-all.html", true,
"<span class=\"memberNameLink\"><a href=\"pkg2/Foo.html#method-java.util.Vector-\">"
+ "method(Vector<Object>)</a></span>"
);
@@ -461,13 +599,6 @@
+ "method(Vector<Object>)</a></span>"
);
- // No type parameters in class frame.
- checkOutput("allclasses-frame.html", false,
- "<a href=\"../pkg/TypeParameters.html\" title=\"class in pkg\">"
- + "TypeParameters</a><<a href=\"../pkg/TypeParameters.html\" "
- + "title=\"type parameter in TypeParameters\">E</a>>"
- );
-
}
//=================================
@@ -477,6 +608,18 @@
checkOutput("pkg/VarArgs.html", true,
"(int... i)",
"(int[][]... i)",
+ "(int[]...)",
+ "<a href=\"TypeParameters.html\" title=\"class in pkg\">"
+ + "TypeParameters</a>... t");
+ }
+
+ //=================================
+ // VAR ARG TESTING
+ //=================================
+ void checkVarArgs_html4() {
+ checkOutput("pkg/VarArgs.html", true,
+ "(int... i)",
+ "(int[][]... i)",
"-int:A...-",
"<a href=\"TypeParameters.html\" title=\"class in pkg\">"
+ "TypeParameters</a>... t");
@@ -520,16 +663,16 @@
void checkAnnotationTypeUsage() {
checkOutput("pkg/package-summary.html", true,
// PACKAGE
- "<a href=\"AnnotationType.html\" title=\"annotation in pkg\">@AnnotationType</a>(<a href=\"AnnotationType.html#optional--\">optional</a>=\"Package Annotation\",\n"
- + " <a href=\"AnnotationType.html#required--\">required</a>=1994)");
+ "<a href=\"AnnotationType.html\" title=\"annotation in pkg\">@AnnotationType</a>(<a href=\"AnnotationType.html#optional()\">optional</a>=\"Package Annotation\",\n"
+ + " <a href=\"AnnotationType.html#required()\">required</a>=1994)");
checkOutput("pkg/AnnotationTypeUsage.html", true,
// CLASS
"<pre><a href=\"AnnotationType.html\" "
+ "title=\"annotation in pkg\">@AnnotationType</a>("
- + "<a href=\"AnnotationType.html#optional--\">optional</a>"
+ + "<a href=\"AnnotationType.html#optional()\">optional</a>"
+ "=\"Class Annotation\",\n"
- + " <a href=\"AnnotationType.html#required--\">"
+ + " <a href=\"AnnotationType.html#required()\">"
+ "required</a>=1994)\n"
+ "public class <span class=\"typeNameLabel\">"
+ "AnnotationTypeUsage</span>\n"
@@ -537,41 +680,41 @@
// FIELD
"<pre><a href=\"AnnotationType.html\" "
+ "title=\"annotation in pkg\">@AnnotationType</a>("
- + "<a href=\"AnnotationType.html#optional--\">optional</a>"
+ + "<a href=\"AnnotationType.html#optional()\">optional</a>"
+ "=\"Field Annotation\",\n"
- + " <a href=\"AnnotationType.html#required--\">"
+ + " <a href=\"AnnotationType.html#required()\">"
+ "required</a>=1994)\n"
+ "public int field</pre>",
// CONSTRUCTOR
"<pre><a href=\"AnnotationType.html\" "
+ "title=\"annotation in pkg\">@AnnotationType</a>("
- + "<a href=\"AnnotationType.html#optional--\">optional</a>"
+ + "<a href=\"AnnotationType.html#optional()\">optional</a>"
+ "=\"Constructor Annotation\",\n"
- + " <a href=\"AnnotationType.html#required--\">"
+ + " <a href=\"AnnotationType.html#required()\">"
+ "required</a>=1994)\n"
+ "public AnnotationTypeUsage()</pre>",
// METHOD
"<pre><a href=\"AnnotationType.html\" "
+ "title=\"annotation in pkg\">@AnnotationType</a>("
- + "<a href=\"AnnotationType.html#optional--\">optional</a>"
+ + "<a href=\"AnnotationType.html#optional()\">optional</a>"
+ "=\"Method Annotation\",\n"
- + " <a href=\"AnnotationType.html#required--\">"
+ + " <a href=\"AnnotationType.html#required()\">"
+ "required</a>=1994)\n"
+ "public void method()</pre>",
// METHOD PARAMS
"<pre>public void methodWithParams​("
+ "<a href=\"AnnotationType.html\" title=\"annotation in pkg\">"
- + "@AnnotationType</a>(<a href=\"AnnotationType.html#optional--\">"
+ + "@AnnotationType</a>(<a href=\"AnnotationType.html#optional()\">"
+ "optional</a>=\"Parameter Annotation\",<a "
- + "href=\"AnnotationType.html#required--\">required</a>=1994)\n"
+ + "href=\"AnnotationType.html#required()\">required</a>=1994)\n"
+ " int documented,\n"
+ " int undocmented)</pre>",
// CONSTRUCTOR PARAMS
"<pre>public AnnotationTypeUsage​(<a "
+ "href=\"AnnotationType.html\" title=\"annotation in pkg\">"
- + "@AnnotationType</a>(<a href=\"AnnotationType.html#optional--\">"
+ + "@AnnotationType</a>(<a href=\"AnnotationType.html#optional()\">"
+ "optional</a>=\"Constructor Param Annotation\",<a "
- + "href=\"AnnotationType.html#required--\">required</a>=1994)\n"
+ + "href=\"AnnotationType.html#required()\">required</a>=1994)\n"
+ " int documented,\n"
+ " int undocmented)</pre>");
@@ -648,6 +791,101 @@
//=================================
checkOutput("pkg1/B.html", true,
// Integer
+ "<a href=\"A.html#d()\">d</a>=3.14,",
+ // Double
+ "<a href=\"A.html#d()\">d</a>=3.14,",
+ // Boolean
+ "<a href=\"A.html#b()\">b</a>=true,",
+ // String
+ "<a href=\"A.html#s()\">s</a>=\"sigh\",",
+ // Class
+ "<a href=\"A.html#c()\">c</a>=<a href=\"../pkg2/Foo.html\" title=\"class in pkg2\">Foo.class</a>,",
+ // Bounded Class
+ "<a href=\"A.html#w()\">w</a>=<a href=\"../pkg/TypeParameterSubClass.html\" title=\"class in pkg\">TypeParameterSubClass.class</a>,",
+ // Enum
+ "<a href=\"A.html#e()\">e</a>=<a href=\"../pkg/Coin.html#Penny\">Penny</a>,",
+ // Annotation Type
+ "<a href=\"A.html#a()\">a</a>=<a href=\"../pkg/AnnotationType.html\" title=\"annotation in pkg\">@AnnotationType</a>(<a href=\"../pkg/AnnotationType.html#optional()\">optional</a>=\"foo\",<a href=\"../pkg/AnnotationType.html#required()\">required</a>=1994),",
+ // String Array
+ "<a href=\"A.html#sa()\">sa</a>={\"up\",\"down\"},",
+ // Primitive
+ "<a href=\"A.html#primitiveClassTest()\">primitiveClassTest</a>=boolean.class,");
+
+ // XXX: Add array test case after this if fixed:
+ //5020899: Incorrect internal representation of class-valued annotation elements
+ // Make sure that annotations are surrounded by <pre> and </pre>
+ checkOutput("pkg1/B.html", true,
+ "<pre><a href=\"A.html\" title=\"annotation in pkg1\">@A</a>",
+ "public interface <span class=\"typeNameLabel\">B</span></pre>");
+
+ }
+
+ //=================================
+ // ANNOTATION TYPE USAGE TESTING
+ //=================================
+ void checkAnnotationTypeUsage_html4() {
+ checkOutput("pkg/package-summary.html", true,
+ // PACKAGE
+ "<a href=\"AnnotationType.html\" title=\"annotation in pkg\">@AnnotationType</a>(<a href=\"AnnotationType.html#optional--\">optional</a>=\"Package Annotation\",\n"
+ + " <a href=\"AnnotationType.html#required--\">required</a>=1994)");
+
+ checkOutput("pkg/AnnotationTypeUsage.html", true,
+ // CLASS
+ "<pre><a href=\"AnnotationType.html\" "
+ + "title=\"annotation in pkg\">@AnnotationType</a>("
+ + "<a href=\"AnnotationType.html#optional--\">optional</a>"
+ + "=\"Class Annotation\",\n"
+ + " <a href=\"AnnotationType.html#required--\">"
+ + "required</a>=1994)\n"
+ + "public class <span class=\"typeNameLabel\">"
+ + "AnnotationTypeUsage</span>\n"
+ + "extends java.lang.Object</pre>",
+ // FIELD
+ "<pre><a href=\"AnnotationType.html\" "
+ + "title=\"annotation in pkg\">@AnnotationType</a>("
+ + "<a href=\"AnnotationType.html#optional--\">optional</a>"
+ + "=\"Field Annotation\",\n"
+ + " <a href=\"AnnotationType.html#required--\">"
+ + "required</a>=1994)\n"
+ + "public int field</pre>",
+ // CONSTRUCTOR
+ "<pre><a href=\"AnnotationType.html\" "
+ + "title=\"annotation in pkg\">@AnnotationType</a>("
+ + "<a href=\"AnnotationType.html#optional--\">optional</a>"
+ + "=\"Constructor Annotation\",\n"
+ + " <a href=\"AnnotationType.html#required--\">"
+ + "required</a>=1994)\n"
+ + "public AnnotationTypeUsage()</pre>",
+ // METHOD
+ "<pre><a href=\"AnnotationType.html\" "
+ + "title=\"annotation in pkg\">@AnnotationType</a>("
+ + "<a href=\"AnnotationType.html#optional--\">optional</a>"
+ + "=\"Method Annotation\",\n"
+ + " <a href=\"AnnotationType.html#required--\">"
+ + "required</a>=1994)\n"
+ + "public void method()</pre>",
+ // METHOD PARAMS
+ "<pre>public void methodWithParams​("
+ + "<a href=\"AnnotationType.html\" title=\"annotation in pkg\">"
+ + "@AnnotationType</a>(<a href=\"AnnotationType.html#optional--\">"
+ + "optional</a>=\"Parameter Annotation\",<a "
+ + "href=\"AnnotationType.html#required--\">required</a>=1994)\n"
+ + " int documented,\n"
+ + " int undocmented)</pre>",
+ // CONSTRUCTOR PARAMS
+ "<pre>public AnnotationTypeUsage​(<a "
+ + "href=\"AnnotationType.html\" title=\"annotation in pkg\">"
+ + "@AnnotationType</a>(<a href=\"AnnotationType.html#optional--\">"
+ + "optional</a>=\"Constructor Param Annotation\",<a "
+ + "href=\"AnnotationType.html#required--\">required</a>=1994)\n"
+ + " int documented,\n"
+ + " int undocmented)</pre>");
+
+ //=================================
+ // ANNOTATION TYPE USAGE TESTING (All Different Types).
+ //=================================
+ checkOutput("pkg1/B.html", true,
+ // Integer
"<a href=\"A.html#d--\">d</a>=3.14,",
// Double
"<a href=\"A.html#d--\">d</a>=3.14,",
@@ -667,14 +905,5 @@
"<a href=\"A.html#sa--\">sa</a>={\"up\",\"down\"},",
// Primitive
"<a href=\"A.html#primitiveClassTest--\">primitiveClassTest</a>=boolean.class,");
-
- // XXX: Add array test case after this if fixed:
- //5020899: Incorrect internal representation of class-valued annotation elements
- // Make sure that annotations are surrounded by <pre> and </pre>
- checkOutput("pkg1/B.html", true,
- "<pre><a href=\"A.html\" title=\"annotation in pkg1\">@A</a>",
- "public interface <span class=\"typeNameLabel\">B</span></pre>");
-
}
-
}
--- a/test/langtools/jdk/javadoc/doclet/testNonInlineHtmlTagRemoval/TestNonInlineHtmlTagRemoval.java Thu Mar 01 16:35:36 2018 -0500
+++ b/test/langtools/jdk/javadoc/doclet/testNonInlineHtmlTagRemoval/TestNonInlineHtmlTagRemoval.java Fri Mar 02 21:00:12 2018 +0100
@@ -23,7 +23,7 @@
/*
* @test
- * @bug 8048628 8174715
+ * @bug 8048628 8174715 8182765
* @summary Verify html inline tags are removed correctly in the first sentence.
* @library ../lib
* @modules jdk.javadoc/jdk.javadoc.internal.tool
@@ -43,7 +43,11 @@
javadoc("-d", "out1",
"-sourcepath", testSrc,
testSrc("C.java"));
- checkExit(Exit.OK);
+ checkExit(Exit.ERROR);
+
+ checkOutput(Output.OUT, true,
+ "attribute not supported in HTML5: compact",
+ "attribute not supported in HTML5: type");
checkOutput("C.html", true,
"<div class=\"block\">case1 end of sentence.</div>",
@@ -60,6 +64,15 @@
}
@Test
+ void testPositive_html4() {
+ javadoc("-d", "out1-html4",
+ "-html4",
+ "-sourcepath", testSrc,
+ testSrc("C.java"));
+ checkExit(Exit.OK);
+ }
+
+ @Test
void testNegative() {
javadoc("-d", "out2",
"-sourcepath", testSrc,
--- a/test/langtools/jdk/javadoc/doclet/testOptions/TestOptions.java Thu Mar 01 16:35:36 2018 -0500
+++ b/test/langtools/jdk/javadoc/doclet/testOptions/TestOptions.java Fri Mar 02 21:00:12 2018 +0100
@@ -23,7 +23,7 @@
/*
* @test
- * @bug 4749567 8071982 8175200 8186332 8185371
+ * @bug 4749567 8071982 8175200 8186332 8185371 8182765
* @summary Test the output for -header, -footer, -nooverview, -nodeprecatedlist, -nonavbar, -notree,
* -stylesheetfile, --main-stylesheet, --add-stylesheet options.
* @author Bhavesh Patel
@@ -198,7 +198,7 @@
checkOutput("src-html/linksource/AnnotationTypeField.html", true,
"<title>Source code</title>",
- "<span class=\"sourceLineNo\">031</span><a name=\"line.31\">"
+ "<span class=\"sourceLineNo\">031</span><a id=\"line.31\">"
+ "@Documented public @interface AnnotationTypeField {</a>");
checkOutput("linksource/Properties.html", true,
@@ -211,7 +211,7 @@
checkOutput("src-html/linksource/Properties.html", true,
"<title>Source code</title>",
- "<span class=\"sourceLineNo\">031</span><a name=\"line.31\"> "
+ "<span class=\"sourceLineNo\">031</span><a id=\"line.31\"> "
+ "public Object someProperty() {</a>");
checkOutput("linksource/SomeClass.html", true,
@@ -226,13 +226,13 @@
checkOutput("src-html/linksource/SomeClass.html", true,
"<title>Source code</title>",
- "<span class=\"sourceLineNo\">029</span><a name=\"line.29\">"
+ "<span class=\"sourceLineNo\">029</span><a id=\"line.29\">"
+ "public class SomeClass {</a>",
- "<span class=\"sourceLineNo\">031</span><a name=\"line.31\"> "
+ "<span class=\"sourceLineNo\">031</span><a id=\"line.31\"> "
+ "public int field;</a>",
- "<span class=\"sourceLineNo\">033</span><a name=\"line.33\"> "
+ "<span class=\"sourceLineNo\">033</span><a id=\"line.33\"> "
+ "public SomeClass() {</a>",
- "<span class=\"sourceLineNo\">036</span><a name=\"line.36\"> "
+ "<span class=\"sourceLineNo\">036</span><a id=\"line.36\"> "
+ "public int method() {</a>");
checkOutput("linksource/SomeEnum.html", true,
@@ -244,6 +244,40 @@
+ "\"../src-html/linksource/SomeEnum.html#line.30\">VALUE2</a></pre>");
checkOutput("src-html/linksource/SomeEnum.html", true,
+ "<span class=\"sourceLineNo\">029</span><a id=\"line.29\"> VALUE1,</a>",
+ "<span class=\"sourceLineNo\">030</span><a id=\"line.30\"> VALUE2</a>");
+ }
+
+ @Test
+ void testLinkSource_html4() {
+ javadoc("-d", "out-9-html4",
+ "-html4",
+ "-linksource",
+ "-javafx",
+ "-sourcepath", testSrc,
+ "-package",
+ "linksource");
+ checkExit(Exit.OK);
+
+ checkOutput("src-html/linksource/AnnotationTypeField.html", true,
+ "<span class=\"sourceLineNo\">031</span><a name=\"line.31\">"
+ + "@Documented public @interface AnnotationTypeField {</a>");
+
+ checkOutput("src-html/linksource/Properties.html", true,
+ "<span class=\"sourceLineNo\">031</span><a name=\"line.31\"> "
+ + "public Object someProperty() {</a>");
+
+ checkOutput("src-html/linksource/SomeClass.html", true,
+ "<span class=\"sourceLineNo\">029</span><a name=\"line.29\">"
+ + "public class SomeClass {</a>",
+ "<span class=\"sourceLineNo\">031</span><a name=\"line.31\"> "
+ + "public int field;</a>",
+ "<span class=\"sourceLineNo\">033</span><a name=\"line.33\"> "
+ + "public SomeClass() {</a>",
+ "<span class=\"sourceLineNo\">036</span><a name=\"line.36\"> "
+ + "public int method() {</a>");
+
+ checkOutput("src-html/linksource/SomeEnum.html", true,
"<span class=\"sourceLineNo\">029</span><a name=\"line.29\"> VALUE1,</a>",
"<span class=\"sourceLineNo\">030</span><a name=\"line.30\"> VALUE2</a>");
}
--- a/test/langtools/jdk/javadoc/doclet/testOrdering/TestOrdering.java Thu Mar 01 16:35:36 2018 -0500
+++ b/test/langtools/jdk/javadoc/doclet/testOrdering/TestOrdering.java Fri Mar 02 21:00:12 2018 +0100
@@ -23,7 +23,7 @@
/*
* @test
- * @bug 8039410 8042601 8042829 8049393 8050031 8155061 8155995 8167967 8169813
+ * @bug 8039410 8042601 8042829 8049393 8050031 8155061 8155995 8167967 8169813 8182765
* @summary test to determine if members are ordered correctly
* @library ../lib/
* @modules jdk.javadoc/jdk.javadoc.internal.tool
@@ -93,9 +93,9 @@
String contents = tester.readFile(usePage);
// check constructors
tester.checking("constructors");
- int idx1 = contents.indexOf("C.html#C-UsedInC");
- int idx2 = contents.indexOf("C.html#C-UsedInC-int");
- int idx3 = contents.indexOf("C.html#C-UsedInC-java.lang.String");
+ int idx1 = contents.indexOf("C.html#%3Cinit%3E(UsedInC");
+ int idx2 = contents.indexOf("C.html#%3Cinit%3E(UsedInC,int");
+ int idx3 = contents.indexOf("C.html#%3Cinit%3E(UsedInC,java.lang.String");
if (idx1 == -1 || idx2 == -1 || idx3 == -1) {
tester.failed("ctor strings not found");
} else if (idx1 > idx2 || idx2 > idx3 || idx1 > idx3) {
@@ -106,8 +106,8 @@
// check methods
tester.checking("methods");
- idx1 = contents.indexOf("C.html#ymethod-int");
- idx2 = contents.indexOf("C.html#ymethod-java.lang.String");
+ idx1 = contents.indexOf("C.html#ymethod(int");
+ idx2 = contents.indexOf("C.html#ymethod(java.lang.String");
if (idx1 == -1 || idx2 == -1) {
tester.failed("#ymethod strings not found");
} else if (idx1 > idx2) {
@@ -135,42 +135,42 @@
checkClassUseOrdering("pkg1/class-use/UsedClass.html");
tester.checkOrder("pkg1/class-use/UsedClass.html",
- "../MethodOrder.html#m--",
- "../MethodOrder.html#m-byte:A-",
- "../MethodOrder.html#m-double-",
- "../MethodOrder.html#m-double-double-",
- "../MethodOrder.html#m-double-java.lang.Double-",
- "../MethodOrder.html#m-int-",
- "../MethodOrder.html#m-int-int-",
- "../MethodOrder.html#m-int-java.lang.Integer-",
- "../MethodOrder.html#m-long-",
- "../MethodOrder.html#m-long-long-",
- "../MethodOrder.html#m-long-java.lang.Long-",
- "../MethodOrder.html#m-long-java.lang.Long...-",
- "../MethodOrder.html#m-java.lang.Double-",
- "../MethodOrder.html#m-java.lang.Double-double-",
- "../MethodOrder.html#m-java.lang.Double-java.lang.Double-",
- "../MethodOrder.html#m-java.lang.Integer-",
- "../MethodOrder.html#m-java.lang.Integer-int-",
- "../MethodOrder.html#m-java.lang.Integer-java.lang.Integer-",
- "../MethodOrder.html#m-java.lang.Object:A-",
- "../MethodOrder.html#m-java.util.ArrayList-",
- "../MethodOrder.html#m-java.util.Collection-",
- "../MethodOrder.html#m-java.util.List-");
+ "../MethodOrder.html#m()",
+ "../MethodOrder.html#m(byte%5B%5D)",
+ "../MethodOrder.html#m(double)",
+ "../MethodOrder.html#m(double,double)",
+ "../MethodOrder.html#m(double,java.lang.Double)",
+ "../MethodOrder.html#m(int)",
+ "../MethodOrder.html#m(int,int)",
+ "../MethodOrder.html#m(int,java.lang.Integer)",
+ "../MethodOrder.html#m(long)",
+ "../MethodOrder.html#m(long,long)",
+ "../MethodOrder.html#m(long,java.lang.Long)",
+ "../MethodOrder.html#m(long,java.lang.Long...)",
+ "../MethodOrder.html#m(java.lang.Double)",
+ "../MethodOrder.html#m(java.lang.Double,double)",
+ "../MethodOrder.html#m(java.lang.Double,java.lang.Double)",
+ "../MethodOrder.html#m(java.lang.Integer)",
+ "../MethodOrder.html#m(java.lang.Integer,int)",
+ "../MethodOrder.html#m(java.lang.Integer,java.lang.Integer)",
+ "../MethodOrder.html#m(java.lang.Object%5B%5D)",
+ "../MethodOrder.html#m(java.util.ArrayList)",
+ "../MethodOrder.html#m(java.util.Collection)",
+ "../MethodOrder.html#m(java.util.List)");
tester.checkOrder("pkg1/class-use/UsedClass.html",
- "../MethodOrder.html#tpm-pkg1.UsedClass-",
- "../MethodOrder.html#tpm-pkg1.UsedClass-pkg1.UsedClass-",
- "../MethodOrder.html#tpm-pkg1.UsedClass-pkg1.UsedClass:A-",
- "../MethodOrder.html#tpm-pkg1.UsedClass-java.lang.String-");
+ "../MethodOrder.html#tpm(pkg1.UsedClass)",
+ "../MethodOrder.html#tpm(pkg1.UsedClass,pkg1.UsedClass)",
+ "../MethodOrder.html#tpm(pkg1.UsedClass,pkg1.UsedClass%5B%5D)",
+ "../MethodOrder.html#tpm(pkg1.UsedClass,java.lang.String)");
tester.checkOrder("pkg1/class-use/UsedClass.html",
- "../A.html#A-pkg1.UsedClass-",
- "../B.A.html#A-pkg1.UsedClass-",
- "../B.html#B-pkg1.UsedClass-",
- "../A.C.html#C-pkg1.UsedClass-java.lang.Object:A-",
- "../A.C.html#C-pkg1.UsedClass-java.util.Collection-",
- "../A.C.html#C-pkg1.UsedClass-java.util.List-");
+ "../A.html#%3Cinit%3E(pkg1.UsedClass)",
+ "../B.A.html#%3Cinit%3E(pkg1.UsedClass)",
+ "../B.html#%3Cinit%3E(pkg1.UsedClass)",
+ "../A.C.html#%3Cinit%3E(pkg1.UsedClass,java.lang.Object%5B%5D)",
+ "../A.C.html#%3Cinit%3E(pkg1.UsedClass,java.util.Collection)",
+ "../A.C.html#%3Cinit%3E(pkg1.UsedClass,java.util.List)");
tester.checkOrder("pkg1/ImplementsOrdering.html",
"<dd><code>close</code> in interface <code>java.lang.AutoCloseable</code></dd>",
@@ -213,7 +213,7 @@
void checkClassUseOrdering(String usePage) {
checkClassUseOrdering(usePage, "C#ITERATION#.html#zfield");
checkClassUseOrdering(usePage, "C#ITERATION#.html#fieldInC#ITERATION#");
- checkClassUseOrdering(usePage, "C#ITERATION#.html#zmethod-pkg1.UsedClass");
+ checkClassUseOrdering(usePage, "C#ITERATION#.html#zmethod(pkg1.UsedClass");
checkClassUseOrdering(usePage, "C#ITERATION#.html#methodInC#ITERATION#");
}
@@ -346,17 +346,17 @@
};
static String expectedMethodOrdering[] = {
- "Add.html#add--",
- "Add.html#add-double-",
- "Add.html#add-double-byte-",
- "Add.html#add-double-double-",
- "Add.html#add-double-java.lang.Double-",
- "Add.html#add-float-",
- "Add.html#add-float-int-",
- "Add.html#add-int-",
- "Add.html#add-int-float-",
- "Add.html#add-java.lang.Double-",
- "Add.html#add-java.lang.Integer-"
+ "Add.html#add()",
+ "Add.html#add(double)",
+ "Add.html#add(double,byte)",
+ "Add.html#add(double,double)",
+ "Add.html#add(double,java.lang.Double)",
+ "Add.html#add(float)",
+ "Add.html#add(float,int)",
+ "Add.html#add(int)",
+ "Add.html#add(int,float)",
+ "Add.html#add(java.lang.Double)",
+ "Add.html#add(java.lang.Integer)"
};
static String expectedPackageOrdering[] = {
@@ -593,10 +593,10 @@
tester.checkOrder("pkg5/AnnoOptionalTest.html",
"<h3>Optional Element Summary</h3>",
- "<a href=\"#four--\">four</a>",
- "<a href=\"#one--\">one</a>",
- "<a href=\"#three--\">three</a>",
- "<a href=\"#two--\">two</a>",
+ "<a href=\"#four()\">four</a>",
+ "<a href=\"#one()\">one</a>",
+ "<a href=\"#three()\">three</a>",
+ "<a href=\"#two()\">two</a>",
"<h3>Element Detail</h3>",
"<h4>one</h4>",
"<h4>two</h4>",
@@ -605,10 +605,10 @@
tester.checkOrder("pkg5/AnnoRequiredTest.html",
"<h3>Required Element Summary</h3>",
- "<a href=\"#four--\">four</a>",
- "<a href=\"#one--\">one</a>",
- "<a href=\"#three--\">three</a>",
- "<a href=\"#two--\">two</a>",
+ "<a href=\"#four()\">four</a>",
+ "<a href=\"#one()\">one</a>",
+ "<a href=\"#three()\">three</a>",
+ "<a href=\"#two()\">two</a>",
"<h3>Element Detail</h3>",
"<h4>one</h4>",
"<h4>two</h4>",
@@ -617,15 +617,15 @@
tester.checkOrder("pkg5/CtorTest.html",
"<h3>Constructor Summary</h3>",
- "<a href=\"#CtorTest-int-\"",
- "<a href=\"#CtorTest-int-int-\"",
- "<a href=\"#CtorTest-int-int-int-\"",
- "<a href=\"#CtorTest-int-int-int-int-\"",
+ "<a href=\"#%3Cinit%3E(int)\"",
+ "<a href=\"#%3Cinit%3E(int,int)\"",
+ "<a href=\"#%3Cinit%3E(int,int,int)\"",
+ "<a href=\"#%3Cinit%3E(int,int,int,int)\"",
"<h3>Constructor Detail</h3>",
- "<a name=\"CtorTest-int-int-int-int-\">",
- "<a name=\"CtorTest-int-int-int-\">",
- "<a name=\"CtorTest-int-int-\">",
- "<a name=\"CtorTest-int-\">");
+ "<a id=\"<init>(int,int,int,int)\">",
+ "<a id=\"<init>(int,int,int)\">",
+ "<a id=\"<init>(int,int)\">",
+ "<a id=\"<init>(int)\">");
tester.checkOrder("pkg5/EnumTest.html",
"<h3>Enum Constant Summary</h3>",
@@ -653,10 +653,10 @@
tester.checkOrder("pkg5/IntfTest.html",
"<h3>Method Summary</h3>",
- "<a href=\"#four--\">four</a>",
- "<a href=\"#one--\">one</a>",
- "<a href=\"#three--\">three</a>",
- "<a href=\"#two--\">two</a>",
+ "<a href=\"#four()\">four</a>",
+ "<a href=\"#one()\">one</a>",
+ "<a href=\"#three()\">three</a>",
+ "<a href=\"#two()\">two</a>",
"<h3>Method Detail</h3>",
"<h4>one</h4>",
"<h4>two</h4>",
@@ -665,10 +665,10 @@
tester.checkOrder("pkg5/MethodTest.html",
"<h3>Method Summary</h3>",
- "<a href=\"#four--\">four</a>",
- "<a href=\"#one--\">one</a>",
- "<a href=\"#three--\">three</a>",
- "<a href=\"#two--\">two</a>",
+ "<a href=\"#four()\">four</a>",
+ "<a href=\"#one()\">one</a>",
+ "<a href=\"#three()\">three</a>",
+ "<a href=\"#two()\">two</a>",
"<h3>Method Detail</h3>",
"<h4>one</h4>",
"<h4>two</h4>",
@@ -686,6 +686,25 @@
"<h4>twoProperty</h4>",
"<h4>threeProperty</h4>",
"<h4>fourProperty</h4>");
+
+ tester.javadoc("-d", "out-5-html4",
+ "-html4",
+ "-javafx",
+ "-sourcepath", tester.testSrc(new File(".").getPath()),
+ "pkg5"
+ );
+
+ tester.checkExit(Exit.OK);
+
+ tester.checkOrder("pkg5/CtorTest.html",
+ "<a href=\"#CtorTest-int-\"",
+ "<a href=\"#CtorTest-int-int-\"",
+ "<a href=\"#CtorTest-int-int-int-\"",
+ "<a href=\"#CtorTest-int-int-int-int-\"",
+ "<a name=\"CtorTest-int-int-int-int-\">",
+ "<a name=\"CtorTest-int-int-int-\">",
+ "<a name=\"CtorTest-int-int-\">",
+ "<a name=\"CtorTest-int-\">");
}
}
}
--- a/test/langtools/jdk/javadoc/doclet/testOverriddenMethods/TestOverriddenMethodDocCopy.java Thu Mar 01 16:35:36 2018 -0500
+++ b/test/langtools/jdk/javadoc/doclet/testOverriddenMethods/TestOverriddenMethodDocCopy.java Fri Mar 02 21:00:12 2018 +0100
@@ -23,7 +23,7 @@
/*
* @test
- * @bug 4368820 8025633 8026567
+ * @bug 4368820 8025633 8026567 8182765
* @summary Inherited comment should link directly to member, not just
* class
* @author jamieh
@@ -53,6 +53,20 @@
checkOutput("pkg1/SubClass.html", true,
"<span class=\"descfrmTypeLabel\">Description copied from class: <code>"
+ + "<a href=\"BaseClass.html#overridenMethodWithDocsToCopy()\">"
+ + "BaseClass</a></code></span>");
+ }
+
+ @Test
+ void test_html4() {
+ javadoc("-d", "out-html4",
+ "-html4",
+ "-sourcepath", testSrc,
+ "pkg1", "pkg2");
+ checkExit(Exit.OK);
+
+ checkOutput("pkg1/SubClass.html", true,
+ "<span class=\"descfrmTypeLabel\">Description copied from class: <code>"
+ "<a href=\"BaseClass.html#overridenMethodWithDocsToCopy--\">"
+ "BaseClass</a></code></span>");
}
--- a/test/langtools/jdk/javadoc/doclet/testOverriddenMethods/TestOverriddenPrivateMethodsWithPackageFlag.java Thu Mar 01 16:35:36 2018 -0500
+++ b/test/langtools/jdk/javadoc/doclet/testOverriddenMethods/TestOverriddenPrivateMethodsWithPackageFlag.java Fri Mar 02 21:00:12 2018 +0100
@@ -23,7 +23,7 @@
/*
* @test
- * @bug 4634891 8025633 8026567
+ * @bug 4634891 8025633 8026567 8182765
* @summary Determine if overridden methods are properly documented when
* -protected (default) visibility flag is used.
* @author jamieh
@@ -51,6 +51,54 @@
// The public method should be overridden
checkOutput("pkg1/SubClass.html", true,
"<dt><span class=\"overrideSpecifyLabel\">Overrides:</span></dt>\n"
+ + "<dd><code><a href=\"BaseClass.html#publicMethod()\">"
+ + "publicMethod</a></code> in class <code>"
+ + "<a href=\"BaseClass.html\" title=\"class in pkg1\">BaseClass</a></code></dd>");
+
+ // The public method in different package should be overridden
+ checkOutput("pkg2/SubClass.html", true,
+ "<dt><span class=\"overrideSpecifyLabel\">Overrides:</span></dt>\n"
+ + "<dd><code><a href=\"../pkg1/BaseClass.html#publicMethod()\">"
+ + "publicMethod</a></code> in class <code>"
+ + "<a href=\"../pkg1/BaseClass.html\" title=\"class in pkg1\">BaseClass</a></code></dd>");
+
+ // The package private method should be overridden since the base and sub class are in the same
+ // package.
+ checkOutput("pkg1/SubClass.html", true,
+ "<dt><span class=\"overrideSpecifyLabel\">Overrides:</span></dt>\n"
+ + "<dd><code><a href=\"BaseClass.html#packagePrivateMethod()\">"
+ + "packagePrivateMethod</a></code> in class <code>"
+ + "<a href=\"BaseClass.html\" title=\"class in pkg1\">BaseClass</a></code></dd>");
+
+ // The private method in should not be overridden
+ checkOutput("pkg1/SubClass.html", false,
+ "<dt><span class=\"overrideSpecifyLabel\">Overrides:</span></dt>\n"
+ + "<dd><code><a href=\"BaseClass.html#privateMethod--\">");
+
+ // The private method in different package should not be overridden
+ checkOutput("pkg2/SubClass.html", false,
+ "<dt><span class=\"overrideSpecifyLabel\">Overrides:</span></dt>\n"
+ + "<dd><code><a href=\"../pkg1/BaseClass.html#privateMethod--\">");
+
+ // The package private method should not be overridden since the base and sub class are in
+ // different packages.
+ checkOutput("pkg2/SubClass.html", false,
+ "<dt><span class=\"overrideSpecifyLabel\">Overrides:</span></dt>\n"
+ + "<dd><code><a href=\"../pkg1/BaseClass.html#packagePrivateMethod--\">");
+ }
+
+ @Test
+ void test_html4() {
+ javadoc("-d", "out-html4",
+ "-html4",
+ "-sourcepath", testSrc,
+ "-package",
+ "pkg1", "pkg2");
+ checkExit(Exit.OK);
+
+ // The public method should be overridden
+ checkOutput("pkg1/SubClass.html", true,
+ "<dt><span class=\"overrideSpecifyLabel\">Overrides:</span></dt>\n"
+ "<dd><code><a href=\"BaseClass.html#publicMethod--\">"
+ "publicMethod</a></code> in class <code>"
+ "<a href=\"BaseClass.html\" title=\"class in pkg1\">BaseClass</a></code></dd>");
--- a/test/langtools/jdk/javadoc/doclet/testOverriddenMethods/TestOverrideMethods.java Thu Mar 01 16:35:36 2018 -0500
+++ b/test/langtools/jdk/javadoc/doclet/testOverriddenMethods/TestOverrideMethods.java Fri Mar 02 21:00:12 2018 +0100
@@ -23,7 +23,7 @@
/*
* @test
- * @bug 8157000 8192850
+ * @bug 8157000 8192850 8182765
* @summary test the behavior of --override-methods option
* @library ../lib
* @modules jdk.javadoc/jdk.javadoc.internal.tool
@@ -94,11 +94,11 @@
// Check method summary
"Method Summary",
"void",
- "#m1--\">m1",
+ "#m1()\">m1",
"A modified method",
"void",
- "#m4-java.lang.String-java.lang.String-\">m4",
+ "#m4(java.lang.String,java.lang.String)\">m4",
"java.lang.String k,",
"java.lang.String",
" v)",
@@ -106,12 +106,12 @@
// Check footnotes
"Methods declared in class pkg5.<a href=\"Classes.GP.html",
"Classes.GP",
- "Classes.GP.html#m0--\">m0",
+ "Classes.GP.html#m0()\">m0",
// Check method details for override
"overrideSpecifyLabel",
"Overrides:",
- "Classes.GP.html#m7--\">m7",
+ "Classes.GP.html#m7()\">m7",
"in class",
"Classes.GP.html",
"Classes.GP"
@@ -120,47 +120,47 @@
checkOrder("pkg5/Classes.C.html",
// Check footnotes 2
"Methods declared in class pkg5.",
- "Classes.P.html#getRate--\">getRate",
- "Classes.P.html#m2--\">m2",
- "Classes.P.html#m3--\">m3",
- "Classes.P.html#m4-K-V-\">m4",
- "Classes.P.html#rateProperty--\">rateProperty",
- "Classes.P.html#setRate-double-\">setRate",
+ "Classes.P.html#getRate()\">getRate",
+ "Classes.P.html#m2()\">m2",
+ "Classes.P.html#m3()\">m3",
+ "Classes.P.html#m4(K,V)\">m4",
+ "Classes.P.html#rateProperty()\">rateProperty",
+ "Classes.P.html#setRate(double)\">setRate",
// Check @link
"A test of links to the methods in this class. <p>\n",
- "Classes.GP.html#m0--",
+ "Classes.GP.html#m0()",
"Classes.GP.m0()",
- "#m1--",
+ "#m1()",
"m1()",
- "Classes.P.html#m2--",
+ "Classes.P.html#m2()",
"Classes.P.m2()",
- "Classes.P.html#m3--",
+ "Classes.P.html#m3()",
"Classes.P.m3()",
"m4(java.lang.String,java.lang.String)",
- "Classes.P.html#m5--",
+ "Classes.P.html#m5()",
"Classes.P.m5()",
- "#m6--",
+ "#m6()",
"m6()",
- "#m7--",
+ "#m7()",
"m7()",
"End of links",
// Check @see
"See Also:",
- "Classes.GP.html#m0--",
+ "Classes.GP.html#m0()",
"Classes.GP.m0()",
- "#m1--",
+ "#m1()",
"m1()",
- "Classes.P.html#m2--",
+ "Classes.P.html#m2()",
"Classes.P.m2()",
- "Classes.P.html#m3--",
+ "Classes.P.html#m3()",
"Classes.P.m3()",
- "#m4-java.lang.String-java.lang.String-",
+ "#m4(java.lang.String,java.lang.String)",
"m4(String k, String v)",
- "Classes.P.html#m5--\"><code>Classes.P.m5()",
- "#m6--\"><code>m6()",
- "#m7--\"><code>m7()"
+ "Classes.P.html#m5()\"><code>Classes.P.m5()",
+ "#m6()\"><code>m6()",
+ "#m7()\"><code>m7()"
);
// Tests for interfaces
@@ -172,24 +172,24 @@
checkOrder("pkg5/Interfaces.D.html",
"Start of links <p>",
- "Interfaces.A.html#m0--\"><code>Interfaces.A.m0()",
- "Interfaces.A.html#m1--\"><code>Interfaces.A.m1()",
- "Interfaces.A.html#m2--\"><code>Interfaces.A.m2()",
- "Interfaces.A.html#m3--\"><code>Interfaces.A.m3()",
- "#m--\"><code>m()",
- "#n--\"><code>n()",
- "Interfaces.C.html#o--\"><code>Interfaces.C.o()",
+ "Interfaces.A.html#m0()\"><code>Interfaces.A.m0()",
+ "Interfaces.A.html#m1()\"><code>Interfaces.A.m1()",
+ "Interfaces.A.html#m2()\"><code>Interfaces.A.m2()",
+ "Interfaces.A.html#m3()\"><code>Interfaces.A.m3()",
+ "#m()\"><code>m()",
+ "#n()\"><code>n()",
+ "Interfaces.C.html#o()\"><code>Interfaces.C.o()",
"End of links",
// Check @see links
"See Also:",
- "Interfaces.A.html#m0--\"><code>Interfaces.A.m0()",
- "Interfaces.A.html#m1--\"><code>Interfaces.A.m1()",
- "Interfaces.A.html#m2--\"><code>Interfaces.A.m2()",
- "Interfaces.A.html#m3--\"><code>Interfaces.A.m3()",
- "#m--\"><code>m()",
- "#n--\"><code>n()",
- "Interfaces.C.html#o--\"><code>Interfaces.C.o()",
+ "Interfaces.A.html#m0()\"><code>Interfaces.A.m0()",
+ "Interfaces.A.html#m1()\"><code>Interfaces.A.m1()",
+ "Interfaces.A.html#m2()\"><code>Interfaces.A.m2()",
+ "Interfaces.A.html#m3()\"><code>Interfaces.A.m3()",
+ "#m()\"><code>m()",
+ "#n()\"><code>n()",
+ "Interfaces.C.html#o()\"><code>Interfaces.C.o()",
// Check properties
"Properties declared in interface pkg5.<a href=\"Interfaces.A.html\" "
@@ -209,24 +209,128 @@
// Check Method Summary
"Method Summary",
- "#m--\">m",
- "#n--\">n",
+ "#m()\">m",
+ "#n()\">n",
// Check footnotes
"Methods declared in interface pkg5.<a href=\"Interfaces.A.html",
+ "Interfaces.A.html#getRate()\">getRate",
+ "Interfaces.A.html#rateProperty()\">rateProperty",
+ "Interfaces.A.html#setRate(double)",
+ "Methods declared in interface pkg5.<a href=\"Interfaces.B.html",
+ "Interfaces.B.html#m1()\">m1",
+ "Interfaces.B.html#m3()\">m3",
+ "Methods declared in interface pkg5.<a href=\"Interfaces.C.html",
+ "<a href=\"Interfaces.C.html#o()\">o</a>"
+ );
+
+ // Test synthetic values and valuesof of an enum.
+ checkOrder("index-all.html",
+ "<h2 class=\"title\">M</h2>",
+ "<a href=\"pkg5/Interfaces.C.html#m()\">m()",
+ "<a href=\"pkg5/Interfaces.D.html#m()\">m()</a>",
+ "<a href=\"pkg5/Classes.GP.html#m0()\">m0()",
+ "<a href=\"pkg5/Interfaces.A.html#m0()\">m0()</a>",
+ "<a href=\"pkg5/Classes.C.html#m1()\">m1()</a>",
+ "<a href=\"pkg5/Classes.P.html#m1()\">m1()</a>",
+ "<a href=\"pkg5/Interfaces.A.html#m1()\">m1()</a>",
+ "<a href=\"pkg5/Interfaces.B.html#m1()\">m1()</a>",
+ "<a href=\"pkg5/Classes.P.html#m2()\">m2()</a>",
+ "<a href=\"pkg5/Interfaces.A.html#m2()\">m2()</a>",
+ "<a href=\"pkg5/Classes.P.html#m3()\">m3()</a>",
+ "<a href=\"pkg5/Interfaces.A.html#m3()\">m3()</a>",
+ "<a href=\"pkg5/Interfaces.B.html#m3()\">m3()</a>",
+ "<a href=\"pkg5/Classes.C.html#m4(java.lang.String,java.lang.String)\">m4(String, String)</a>",
+ "<a href=\"pkg5/Classes.P.html#m4(K,V)\">m4(K, V)</a>",
+ "<a href=\"pkg5/Classes.P.html#m5()\">m5()</a>",
+ "<a href=\"pkg5/Classes.C.html#m6()\">m6()</a>",
+ "<a href=\"pkg5/Classes.P.html#m6()\">m6()</a>",
+ "<a href=\"pkg5/Classes.C.html#m7()\">m7()</a>",
+ "<a href=\"pkg5/Classes.GP.html#m7()\">m7()</a>",
+ "Returns the enum constant of this type with the specified name.",
+ "Returns an array containing the constants of this enum type, in\n" +
+ "the order they are declared."
+ );
+ }
+
+ @Test
+ void testSummary_html4() {
+ javadoc("-d", "out-summary-html4",
+ "-html4",
+ "-sourcepath", testSrc,
+ "-javafx",
+ "--override-methods=summary",
+ "pkg5");
+
+ checkExit(Exit.OK);
+
+ checkOrder("pkg5/Classes.C.html",
+ "#m1--\">m1",
+ "#m4-java.lang.String-java.lang.String-\">m4",
+ "Classes.GP.html#m0--\">m0",
+ "Classes.GP.html#m7--\">m7"
+ );
+
+ checkOrder("pkg5/Classes.C.html",
+ // Check footnotes 2
+ "Classes.P.html#getRate--\">getRate",
+ "Classes.P.html#m2--\">m2",
+ "Classes.P.html#m3--\">m3",
+ "Classes.P.html#m4-K-V-\">m4",
+ "Classes.P.html#rateProperty--\">rateProperty",
+ "Classes.P.html#setRate-double-\">setRate",
+
+ // Check @link
+ "Classes.GP.html#m0--",
+ "#m1--",
+ "Classes.P.html#m2--",
+ "Classes.P.html#m3--",
+ "Classes.P.html#m5--",
+ "#m6--",
+ "#m7--",
+
+ // Check @see
+ "Classes.GP.html#m0--",
+ "#m1--",
+ "Classes.P.html#m2--",
+ "Classes.P.html#m3--",
+ "#m4-java.lang.String-java.lang.String-",
+ "Classes.P.html#m5--\"><code>Classes.P.m5()",
+ "#m6--\"><code>m6()",
+ "#m7--\"><code>m7()"
+ );
+
+ // Tests for interfaces
+
+ // Make sure the static methods in the super interface
+ // do not make it to this interface
+ checkOrder("pkg5/Interfaces.D.html",
+ "Interfaces.A.html#m0--\"><code>Interfaces.A.m0()",
+ "Interfaces.A.html#m1--\"><code>Interfaces.A.m1()",
+ "Interfaces.A.html#m2--\"><code>Interfaces.A.m2()",
+ "Interfaces.A.html#m3--\"><code>Interfaces.A.m3()",
+ "#m--\"><code>m()",
+ "#n--\"><code>n()",
+ "Interfaces.C.html#o--\"><code>Interfaces.C.o()",
+ "Interfaces.A.html#m0--\"><code>Interfaces.A.m0()",
+ "Interfaces.A.html#m1--\"><code>Interfaces.A.m1()",
+ "Interfaces.A.html#m2--\"><code>Interfaces.A.m2()",
+ "Interfaces.A.html#m3--\"><code>Interfaces.A.m3()",
+ "#m--\"><code>m()",
+ "#n--\"><code>n()",
+ "Interfaces.C.html#o--\"><code>Interfaces.C.o()",
+ "#m--\">m",
+ "#n--\">n",
"Interfaces.A.html#getRate--\">getRate",
"Interfaces.A.html#rateProperty--\">rateProperty",
"Interfaces.A.html#setRate-double-",
- "Methods declared in interface pkg5.<a href=\"Interfaces.B.html",
"Interfaces.B.html#m1--\">m1",
"Interfaces.B.html#m3--\">m3",
- "Methods declared in interface pkg5.<a href=\"Interfaces.C.html",
"<a href=\"Interfaces.C.html#o--\">o</a>"
);
// Test synthetic values and valuesof of an enum.
checkOrder("index-all.html",
- "<h2 class=\"title\">M</h2>",
"<a href=\"pkg5/Interfaces.C.html#m--\">m()",
"<a href=\"pkg5/Interfaces.D.html#m--\">m()</a>",
"<a href=\"pkg5/Classes.GP.html#m0--\">m0()",
@@ -246,10 +350,7 @@
"<a href=\"pkg5/Classes.C.html#m6--\">m6()</a>",
"<a href=\"pkg5/Classes.P.html#m6--\">m6()</a>",
"<a href=\"pkg5/Classes.C.html#m7--\">m7()</a>",
- "<a href=\"pkg5/Classes.GP.html#m7--\">m7()</a>",
- "Returns the enum constant of this type with the specified name.",
- "Returns an array containing the constants of this enum type, in\n" +
- "the order they are declared."
+ "<a href=\"pkg5/Classes.GP.html#m7--\">m7()</a>"
);
}
}
--- a/test/langtools/jdk/javadoc/doclet/testOverview/TestOverview.java Thu Mar 01 16:35:36 2018 -0500
+++ b/test/langtools/jdk/javadoc/doclet/testOverview/TestOverview.java Fri Mar 02 21:00:12 2018 +0100
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2017, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2017, 2018, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
@@ -23,7 +23,7 @@
/*
* @test
- * @bug 8173302
+ * @bug 8173302 8182765
* @summary make sure the overview-summary and module-summary pages don't
* don't have the See link, and the overview is copied correctly.
* @library ../lib
@@ -48,15 +48,20 @@
"-sourcepath", testSrc("src"),
"p1", "p2");
checkExit(Exit.OK);
- checkOutput("overview-summary.html", true,
- "<div class=\"header\">\n"
- + "<h1 class=\"title\">Document Title</h1>\n"
- + "</div>\n"
- + "<div class=\"contentContainer\">\n"
- + "<div class=\"block\">This is line1. This is line 2.</div>\n"
- + "</div>\n"
- + "<div class=\"contentContainer\">"
- );
+ checkOverview();
+ }
+
+ @Test
+ void test1_html4() {
+ javadoc("-d", "out-1-html4",
+ "-html4",
+ "-doctitle", "Document Title",
+ "-windowtitle", "Window Title",
+ "-overview", testSrc("overview.html"),
+ "-sourcepath", testSrc("src"),
+ "p1", "p2");
+ checkExit(Exit.OK);
+ checkOverview_html4();
}
@Test
@@ -68,6 +73,35 @@
"-sourcepath", testSrc("msrc"),
"p1", "p2");
checkExit(Exit.OK);
+ checkOverview();
+ }
+
+ @Test
+ void test2_html4() {
+ javadoc("-d", "out-2-html4",
+ "-html4",
+ "-doctitle", "Document Title",
+ "-windowtitle", "Window Title",
+ "-overview", testSrc("overview.html"),
+ "-sourcepath", testSrc("msrc"),
+ "p1", "p2");
+ checkExit(Exit.OK);
+ checkOverview_html4();
+ }
+
+ void checkOverview() {
+ checkOutput("overview-summary.html", true,
+ "<div class=\"header\">\n"
+ + "<h1 class=\"title\">Document Title</h1>\n"
+ + "</div>\n"
+ + "<main role=\"main\">\n"
+ + "<div class=\"contentContainer\">\n"
+ + "<div class=\"block\">This is line1. This is line 2.</div>\n"
+ + "</div>\n"
+ + "<div class=\"contentContainer\">");
+ }
+
+ void checkOverview_html4() {
checkOutput("overview-summary.html", true,
"<div class=\"header\">\n"
+ "<h1 class=\"title\">Document Title</h1>\n"
@@ -75,7 +109,6 @@
+ "<div class=\"contentContainer\">\n"
+ "<div class=\"block\">This is line1. This is line 2.</div>\n"
+ "</div>\n"
- + "<div class=\"contentContainer\">"
- );
+ + "<div class=\"contentContainer\">");
}
}
--- a/test/langtools/jdk/javadoc/doclet/testPackageDescription/TestPackageDescription.java Thu Mar 01 16:35:36 2018 -0500
+++ b/test/langtools/jdk/javadoc/doclet/testPackageDescription/TestPackageDescription.java Fri Mar 02 21:00:12 2018 +0100
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2017, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2017, 2018, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
@@ -23,7 +23,7 @@
/*
* @test
- * @bug 8185194
+ * @bug 8185194 8182765
* @summary Test anchor for package description in package summary page
* @library ../lib/
* @modules jdk.javadoc/jdk.javadoc.internal.tool
@@ -42,8 +42,7 @@
void test1() {
javadoc("-d", "out",
"-sourcepath", testSrc,
- "pkg",
- "-html5");
+ "pkg");
checkExit(Exit.OK);
checkOutput("pkg/package-summary.html", true,
@@ -56,6 +55,7 @@
@Test
void test2() {
javadoc("-d", "out-2",
+ "-html4",
"-sourcepath", testSrc,
"pkg");
checkExit(Exit.OK);
--- a/test/langtools/jdk/javadoc/doclet/testPrivateClasses/TestPrivateClasses.java Thu Mar 01 16:35:36 2018 -0500
+++ b/test/langtools/jdk/javadoc/doclet/testPrivateClasses/TestPrivateClasses.java Fri Mar 02 21:00:12 2018 +0100
@@ -23,7 +23,7 @@
/*
* @test
- * @bug 4780441 4874845 4978816 8014017 8016328 8025633 8026567 8175200
+ * @bug 4780441 4874845 4978816 8014017 8016328 8025633 8026567 8175200 8182765
* @summary Make sure that when the -private flag is not used, members
* inherited from package private class are documented in the child.
*
@@ -42,7 +42,6 @@
* @build JavadocTester
* @run main TestPrivateClasses
*/
-
public class TestPrivateClasses extends JavadocTester {
public static void main(String... args) throws Exception {
@@ -62,7 +61,7 @@
"<a href=\"#fieldInheritedFromParent\">"
+ "fieldInheritedFromParent</a>",
// Method inheritance from non-public superclass.
- "<a href=\"#methodInheritedFromParent-int-\">"
+ "<a href=\"#methodInheritedFromParent(int)\">"
+ "methodInheritedFromParent</a>",
// private class does not show up in tree
"<ul class=\"inheritance\">\n"
@@ -94,15 +93,15 @@
checkOutput("pkg/PublicChild.html", false,
// Should not document comments from private inherited interfaces
- "<td class=\"colLast\"><code><span class=\"memberNameLink\">" +
- "<a href=\"#methodInterface-int-\">" +
- "methodInterface</a></span>​(int p1)</code>\n" +
- "<div class=\"block\">Comment from interface.</div>\n</td>",
+ "<td class=\"colLast\"><code><span class=\"memberNameLink\">"
+ + "<a href=\"#methodInterface(int)\">"
+ + "methodInterface</a></span>​(int p1)</code>\n"
+ + "<div class=\"block\">Comment from interface.</div>\n</td>",
// and similarly one more
- "<td class=\"colLast\"><code><span class=\"memberNameLink\">" +
- "<a href=\"#methodInterface2-int-\">" +
- "methodInterface2</a></span>​(int p1)</code>\n" +
- "<div class=\"block\">Comment from interface.</div>\n</td>"
+ "<td class=\"colLast\"><code><span class=\"memberNameLink\">"
+ + "<a href=\"#methodInterface2(int)\">"
+ + "methodInterface2</a></span>​(int p1)</code>\n"
+ + "<div class=\"block\">Comment from interface.</div>\n</td>"
);
checkOutput("pkg/PublicInterface.html", true,
@@ -110,7 +109,7 @@
"<a href=\"#fieldInheritedFromInterface\">"
+ "fieldInheritedFromInterface</a>",
// Method inheritance from non-public superinterface.
- "<a href=\"#methodInterface-int-\">"
+ "<a href=\"#methodInterface(int)\">"
+ "methodInterface</a>",
//Make sure implemented interfaces from private superclass are inherited
"<dl>\n"
@@ -132,7 +131,7 @@
checkOutput("pkg2/C.html", false,
//Do not inherit private interface method with generic parameters.
//This method has been implemented.
- "<span class=\"memberNameLink\"><a href=\"I.html#hello-T-\">hello</a></span>");
+ "<span class=\"memberNameLink\"><a href=\"I.html#hello(T)\">hello</a></span>");
checkOutput("constant-values.html", false,
// Make inherited constant are documented correctly.
@@ -140,6 +139,42 @@
}
@Test
+ void testDefault_html4() {
+ javadoc("-d", "out-default-html4",
+ "-html4",
+ "-sourcepath", testSrc,
+ "pkg", "pkg2");
+ checkExit(Exit.OK);
+
+ checkOutput("pkg/PublicChild.html", true,
+ // Method inheritance from non-public superclass.
+ "<a href=\"#methodInheritedFromParent-int-\">");
+
+ checkOutput("pkg/PublicChild.html", false,
+ // Should not document comments from private inherited interfaces
+ "<td class=\"colLast\"><code><span class=\"memberNameLink\">"
+ + "<a href=\"#methodInterface-int-\">"
+ + "methodInterface</a></span>​(int p1)</code>\n"
+ + "<div class=\"block\">Comment from interface.</div>\n</td>",
+ // and similarly one more
+ "<td class=\"colLast\"><code><span class=\"memberNameLink\">"
+ + "<a href=\"#methodInterface2-int-\">"
+ + "methodInterface2</a></span>​(int p1)</code>\n"
+ + "<div class=\"block\">Comment from interface.</div>\n</td>"
+ );
+
+ checkOutput("pkg/PublicInterface.html", true,
+ // Method inheritance from non-public superinterface.
+ "<a href=\"#methodInterface-int-\">"
+ + "methodInterface</a>");
+
+ checkOutput("pkg2/C.html", false,
+ //Do not inherit private interface method with generic parameters.
+ //This method has been implemented.
+ "<span class=\"memberNameLink\"><a href=\"I.html#hello-T-\">hello</a></span>");
+ }
+
+ @Test
void testPrivate() {
javadoc("-d", "out-private",
"-sourcepath", testSrc,
@@ -158,17 +193,17 @@
"Methods inherited from class pkg."
+ "<a href=\"PrivateParent.html\" title=\"class in pkg\">"
+ "PrivateParent</a>",
- "<a href=\"PrivateParent.html#methodInheritedFromParent-int-\">"
+ "<a href=\"PrivateParent.html#methodInheritedFromParent(int)\">"
+ "methodInheritedFromParent</a>",
// Should document that a method overrides method from private class.
"<dt><span class=\"overrideSpecifyLabel\">Overrides:</span></dt>\n"
- + "<dd><code><a href=\"PrivateParent.html#methodOverridenFromParent-char:A-int-T-V-java.util.List-\">"
+ + "<dd><code><a href=\"PrivateParent.html#methodOverridenFromParent(char%5B%5D,int,T,V,java.util.List)\">"
+ "methodOverridenFromParent</a></code> in class <code>"
+ "<a href=\"PrivateParent.html\" title=\"class in pkg\">"
+ "PrivateParent</a></code></dd>",
// Should document that a method is specified by private interface.
"<dt><span class=\"overrideSpecifyLabel\">Specified by:</span></dt>\n"
- + "<dd><code><a href=\"PrivateInterface.html#methodInterface-int-\">"
+ + "<dd><code><a href=\"PrivateInterface.html#methodInterface(int)\">"
+ "methodInterface</a></code> in interface <code>"
+ "<a href=\"PrivateInterface.html\" title=\"interface in pkg\">"
+ "PrivateInterface</a></code></dd>",
@@ -209,6 +244,56 @@
+ "</dl>");
checkOutput("pkg/PrivateInterface.html", true,
+ "<a href=\"#methodInterface(int)\">"
+ + "methodInterface</a>"
+ );
+
+ checkOutput("pkg2/C.html", true,
+ //Since private flag is used, we can document that private interface method
+ //with generic parameters has been implemented.
+ "<span class=\"descfrmTypeLabel\">Description copied from interface: <code>"
+ + "<a href=\"I.html#hello(T)\">I</a></code></span>",
+ "<dt><span class=\"overrideSpecifyLabel\">Specified by:</span></dt>\n"
+ + "<dd><code><a href=\"I.html#hello(T)\">hello</a></code>"
+ + " in interface <code>"
+ + "<a href=\"I.html\" title=\"interface in pkg2\">I</a>"
+ + "<java.lang.String></code></dd>");
+
+ checkOutput("pkg/PrivateParent.html", true,
+ //Make sure when no modifier appear in the class signature, the
+ //signature is displayed correctly without extra space at the beginning.
+ "<pre>class <span class=\"typeNameLabel\">PrivateParent</span>");
+
+ checkOutput("pkg/PrivateParent.html", false,
+ "<pre> class <span class=\"typeNameLabel\">PrivateParent</span>");
+ }
+
+ @Test
+ void testPrivate_html4() {
+ javadoc("-d", "out-private-html4",
+ "-html4",
+ "-sourcepath", testSrc,
+ "-private",
+ "pkg", "pkg2");
+ checkExit(Exit.OK);
+
+ checkOutput("pkg/PublicChild.html", true,
+ "<a href=\"PrivateParent.html#methodInheritedFromParent-int-\">"
+ + "methodInheritedFromParent</a>",
+ // Should document that a method overrides method from private class.
+ "<dt><span class=\"overrideSpecifyLabel\">Overrides:</span></dt>\n"
+ + "<dd><code><a href=\"PrivateParent.html#methodOverridenFromParent-char:A-int-T-V-java.util.List-\">"
+ + "methodOverridenFromParent</a></code> in class <code>"
+ + "<a href=\"PrivateParent.html\" title=\"class in pkg\">"
+ + "PrivateParent</a></code></dd>",
+ // Should document that a method is specified by private interface.
+ "<dt><span class=\"overrideSpecifyLabel\">Specified by:</span></dt>\n"
+ + "<dd><code><a href=\"PrivateInterface.html#methodInterface-int-\">"
+ + "methodInterface</a></code> in interface <code>"
+ + "<a href=\"PrivateInterface.html\" title=\"interface in pkg\">"
+ + "PrivateInterface</a></code></dd>");
+
+ checkOutput("pkg/PrivateInterface.html", true,
"<a href=\"#methodInterface-int-\">"
+ "methodInterface</a>"
);
@@ -223,13 +308,5 @@
+ " in interface <code>"
+ "<a href=\"I.html\" title=\"interface in pkg2\">I</a>"
+ "<java.lang.String></code></dd>");
-
- checkOutput("pkg/PrivateParent.html", true,
- //Make sure when no modifier appear in the class signature, the
- //signature is displayed correctly without extra space at the beginning.
- "<pre>class <span class=\"typeNameLabel\">PrivateParent</span>");
-
- checkOutput("pkg/PrivateParent.html", false,
- "<pre> class <span class=\"typeNameLabel\">PrivateParent</span>");
}
}
--- a/test/langtools/jdk/javadoc/doclet/testProperty/TestProperty.java Thu Mar 01 16:35:36 2018 -0500
+++ b/test/langtools/jdk/javadoc/doclet/testProperty/TestProperty.java Fri Mar 02 21:00:12 2018 +0100
@@ -23,7 +23,7 @@
/*
* @test
- * @bug 8176231 8189843
+ * @bug 8176231 8189843 8182765
* @summary Test JavaFX property.
* @library ../lib/
* @modules jdk.javadoc/jdk.javadoc.internal.tool
@@ -55,6 +55,77 @@
+ "Object is a single Object.</div>\n"
+ "<dl>\n"
+ "<dt><span class=\"seeLabel\">See Also:</span></dt>\n"
+ + "<dd><a href=\"#getGood()\"><code>getGood()</code></a>, \n"
+ + "<a href=\"#setGood(pkg.MyObj)\">"
+ + "<code>setGood(MyObj)</code></a></dd>\n"
+ + "</dl>",
+
+ "<pre>public final <a href=\"ObjectProperty.html\" "
+ + "title=\"class in pkg\">ObjectProperty</a>"
+ + "<<a href=\"MyObj.html\" "
+ + "title=\"class in pkg\">MyObj</a>[]> badProperty</pre>\n"
+ + "<div class=\"block\">This is an Object property where the "
+ + "Object is an array.</div>\n"
+ + "<dl>\n"
+ + "<dt><span class=\"seeLabel\">See Also:</span></dt>\n"
+ + "<dd><a href=\"#getBad()\"><code>getBad()</code></a>, \n"
+ + "<a href=\"#setBad(pkg.MyObj%5B%5D)\">"
+ + "<code>setBad(MyObj[])</code></a></dd>\n"
+ + "</dl>",
+
+ // id should not be used in the property table
+ "<tr class=\"altColor\">\n"
+ + "<td class=\"colFirst\"><code><a href=\"ObjectProperty.html\" "
+ + "title=\"class in pkg\">ObjectProperty</a><<a href=\"MyObj.html\" "
+ + "title=\"class in pkg\">MyObj</a>[]></code></td>\n"
+ + "<th class=\"colSecond\" scope=\"row\"><code><span class=\"memberNameLink\">"
+ + "<a href=\"#badProperty\">bad</a></span></code></th>",
+
+ // id should be used in the method table
+ "<tr id=\"i0\" class=\"altColor\">\n"
+ + "<td class=\"colFirst\"><code><a href=\"ObjectProperty.html\" "
+ + "title=\"class in pkg\">ObjectProperty</a><<a href=\"MyObj.html\" "
+ + "title=\"class in pkg\">MyObj</a>[]></code></td>\n"
+ + "<th class=\"colSecond\" scope=\"row\"><code><span class=\"memberNameLink\">"
+ + "<a href=\"#badProperty()\">badProperty</a></span>()</code></th>"
+ );
+
+ checkOutput("pkg/MyClassT.html", true,
+ "<pre>public final <a href=\"ObjectProperty.html\" "
+ + "title=\"class in pkg\">ObjectProperty</a>"
+ + "<java.util.List<<a href=\"MyClassT.html\" "
+ + "title=\"type parameter in MyClassT\">T</a>>> "
+ + "listProperty</pre>\n"
+ + "<div class=\"block\">This is an Object property where the "
+ + "Object is a single <code>List<T></code>.</div>\n"
+ + "<dl>\n"
+ + "<dt><span class=\"seeLabel\">See Also:</span></dt>\n"
+ + "<dd><a href=\"#getList()\">"
+ + "<code>getList()</code></a>, \n"
+ + "<a href=\"#setList(java.util.List)\">"
+ + "<code>setList(List)</code></a></dd>\n"
+ + "</dl>"
+ );
+ }
+
+ @Test
+ void testArrays_html4() {
+ javadoc("-d", "out-html4",
+ "-html4",
+ "-javafx",
+ "-sourcepath", testSrc,
+ "pkg");
+ checkExit(Exit.OK);
+
+ checkOutput("pkg/MyClass.html", true,
+ "<pre>public final <a href=\"ObjectProperty.html\" "
+ + "title=\"class in pkg\">ObjectProperty</a>"
+ + "<<a href=\"MyObj.html\" "
+ + "title=\"class in pkg\">MyObj</a>> goodProperty</pre>\n"
+ + "<div class=\"block\">This is an Object property where the "
+ + "Object is a single Object.</div>\n"
+ + "<dl>\n"
+ + "<dt><span class=\"seeLabel\">See Also:</span></dt>\n"
+ "<dd><a href=\"#getGood--\"><code>getGood()</code></a>, \n"
+ "<a href=\"#setGood-pkg.MyObj-\">"
+ "<code>setGood(MyObj)</code></a></dd>\n"
@@ -73,14 +144,6 @@
+ "<code>setBad(MyObj[])</code></a></dd>\n"
+ "</dl>",
- // id should not be used in the property table
- "<tr class=\"altColor\">\n"
- + "<td class=\"colFirst\"><code><a href=\"ObjectProperty.html\" "
- + "title=\"class in pkg\">ObjectProperty</a><<a href=\"MyObj.html\" "
- + "title=\"class in pkg\">MyObj</a>[]></code></td>\n"
- + "<th class=\"colSecond\" scope=\"row\"><code><span class=\"memberNameLink\">"
- + "<a href=\"#badProperty\">bad</a></span></code></th>",
-
// id should be used in the method table
"<tr id=\"i0\" class=\"altColor\">\n"
+ "<td class=\"colFirst\"><code><a href=\"ObjectProperty.html\" "
--- a/test/langtools/jdk/javadoc/doclet/testRelativeLinks/TestRelativeLinks.java Thu Mar 01 16:35:36 2018 -0500
+++ b/test/langtools/jdk/javadoc/doclet/testRelativeLinks/TestRelativeLinks.java Fri Mar 02 21:00:12 2018 +0100
@@ -23,7 +23,7 @@
/*
* @test
- * @bug 4460354 8014636 8043186 8195805
+ * @bug 4460354 8014636 8043186 8195805 8182765
* @summary Test to make sure that relative paths are redirected in the
* output so that they are not broken.
* @author jamieh
@@ -46,7 +46,10 @@
"-use",
"-sourcepath", testSrc,
"pkg", "pkg2");
- checkExit(Exit.OK);
+ checkExit(Exit.ERROR);
+
+ checkOutput(Output.OUT, true,
+ "attribute not supported in HTML5: name");
// These relative paths should stay relative because they appear
// in the right places.
@@ -91,4 +94,14 @@
checkOutput("overview-summary.html", true,
"<a href=\"./pkg/relative-package-link.html\">relative package link</a>");
}
+
+ @Test
+ void test_html4() {
+ javadoc("-d", "out-html4",
+ "-html4",
+ "-use",
+ "-sourcepath", testSrc,
+ "pkg", "pkg2");
+ checkExit(Exit.OK);
}
+}
--- a/test/langtools/jdk/javadoc/doclet/testRepeatedAnnotations/TestRepeatedAnnotations.java Thu Mar 01 16:35:36 2018 -0500
+++ b/test/langtools/jdk/javadoc/doclet/testRepeatedAnnotations/TestRepeatedAnnotations.java Fri Mar 02 21:00:12 2018 +0100
@@ -23,7 +23,7 @@
/*
* @test
- * @bug 8005092 6469562
+ * @bug 8005092 6469562 8182765
* @summary Test repeated annotations output.
* @author bpatel
* @library ../lib
@@ -65,6 +65,86 @@
checkOutput("pkg/D.html", true,
"<a href=\"RegDoc.html\" title=\"annotation in pkg\">@RegDoc</a>"
+ + "(<a href=\"RegDoc.html#x()\">x</a>=1)",
+ "<a href=\"RegArryDoc.html\" title=\"annotation in pkg\">@RegArryDoc</a>"
+ + "(<a href=\"RegArryDoc.html#y()\">y</a>=1)",
+ "<a href=\"RegArryDoc.html\" title=\"annotation in pkg\">@RegArryDoc</a>"
+ + "(<a href=\"RegArryDoc.html#y()\">y</a>={1,2})",
+ "<a href=\"NonSynthDocContainer.html\" "
+ + "title=\"annotation in pkg\">@NonSynthDocContainer</a>"
+ + "("
+ + "<a href=\"RegArryDoc.html\" title=\"annotation in pkg\">@RegArryDoc</a>"
+ + "(<a href=\"RegArryDoc.html#y()\">y</a>=1))");
+
+ checkOutput("pkg1/C.html", true,
+ "<a href=\"RegContainerValDoc.html\" "
+ + "title=\"annotation in pkg1\">@RegContainerValDoc</a>"
+ + "(<a href=\"RegContainerValDoc.html#value()\">value</a>={"
+ + "<a href=\"RegContaineeNotDoc.html\" "
+ + "title=\"annotation in pkg1\">@RegContaineeNotDoc</a>,"
+ + "<a href=\"RegContaineeNotDoc.html\" "
+ + "title=\"annotation in pkg1\">@RegContaineeNotDoc</a>},"
+ + "<a href=\"RegContainerValDoc.html#y()\">y</a>=3)",
+ "<a href=\"ContainerValDoc.html\" "
+ + "title=\"annotation in pkg1\">@ContainerValDoc</a>"
+ + "(<a href=\"ContainerValDoc.html#value()\">value</a>={"
+ + "<a href=\"ContaineeNotDoc.html\" "
+ + "title=\"annotation in pkg1\">@ContaineeNotDoc</a>,"
+ + "<a href=\"ContaineeNotDoc.html\" "
+ + "title=\"annotation in pkg1\">@ContaineeNotDoc</a>},"
+ + "<a href=\"ContainerValDoc.html#x()\">x</a>=1)");
+
+ checkOutput("pkg/C.html", false,
+ "<a href=\"RegContaineeDoc.html\" "
+ + "title=\"annotation in pkg\">@RegContaineeDoc</a> "
+ + "<a href=\"RegContaineeDoc.html\" "
+ + "title=\"annotation in pkg\">@RegContaineeDoc</a>",
+ "<a href=\"RegContainerNotDoc.html\" "
+ + "title=\"annotation in pkg\">@RegContainerNotDoc</a>"
+ + "(<a href=\"RegContainerNotDoc.html#value()\">value</a>={"
+ + "<a href=\"RegContaineeNotDoc.html\" "
+ + "title=\"annotation in pkg\">@RegContaineeNotDoc</a>,"
+ + "<a href=\"RegContaineeNotDoc.html\" "
+ + "title=\"annotation in pkg\">@RegContaineeNotDoc</a>})");
+
+ checkOutput("pkg1/C.html", false,
+ "<a href=\"ContaineeSynthDoc.html\" "
+ + "title=\"annotation in pkg1\">@ContaineeSynthDoc</a> "
+ + "<a href=\"ContaineeSynthDoc.html\" "
+ + "title=\"annotation in pkg1\">@ContaineeSynthDoc</a>",
+ "<a href=\"RegContainerValNotDoc.html\" "
+ + "title=\"annotation in pkg1\">@RegContainerValNotDoc</a>"
+ + "(<a href=\"RegContainerValNotDoc.html#value()\">value</a>={"
+ + "<a href=\"RegContaineeDoc.html\" "
+ + "title=\"annotation in pkg1\">@RegContaineeDoc</a>,"
+ + "<a href=\"RegContaineeDoc.html\" "
+ + "title=\"annotation in pkg1\">@RegContaineeDoc</a>},"
+ + "<a href=\"RegContainerValNotDoc.html#y()\">y</a>=4)",
+ "<a href=\"ContainerValNotDoc.html\" "
+ + "title=\"annotation in pkg1\">@ContainerValNotDoc</a>"
+ + "(<a href=\"ContainerValNotDoc.html#value()\">value</a>={"
+ + "<a href=\"ContaineeNotDoc.html\" "
+ + "title=\"annotation in pkg1\">@ContaineeNotDoc</a>,"
+ + "<a href=\"ContaineeNotDoc.html\" "
+ + "title=\"annotation in pkg1\">@ContaineeNotDoc</a>},"
+ + "<a href=\"ContainerValNotDoc.html#x()\">x</a>=2)",
+ "<a href=\"ContainerSynthNotDoc.html\" "
+ + "title=\"annotation in pkg1\">@ContainerSynthNotDoc</a>("
+ + "<a href=\"ContainerSynthNotDoc.html#value()\">value</a>="
+ + "<a href=\"ContaineeSynthDoc.html\" "
+ + "title=\"annotation in pkg1\">@ContaineeSynthDoc</a>)");
+ }
+
+ @Test
+ void test_html4() {
+ javadoc("-d", "out-html4",
+ "-html4",
+ "-sourcepath", testSrc,
+ "pkg", "pkg1");
+ checkExit(Exit.OK);
+
+ checkOutput("pkg/D.html", true,
+ "<a href=\"RegDoc.html\" title=\"annotation in pkg\">@RegDoc</a>"
+ "(<a href=\"RegDoc.html#x--\">x</a>=1)",
"<a href=\"RegArryDoc.html\" title=\"annotation in pkg\">@RegArryDoc</a>"
+ "(<a href=\"RegArryDoc.html#y--\">y</a>=1)",
@@ -95,10 +175,6 @@
+ "<a href=\"ContainerValDoc.html#x--\">x</a>=1)");
checkOutput("pkg/C.html", false,
- "<a href=\"RegContaineeDoc.html\" "
- + "title=\"annotation in pkg\">@RegContaineeDoc</a> "
- + "<a href=\"RegContaineeDoc.html\" "
- + "title=\"annotation in pkg\">@RegContaineeDoc</a>",
"<a href=\"RegContainerNotDoc.html\" "
+ "title=\"annotation in pkg\">@RegContainerNotDoc</a>"
+ "(<a href=\"RegContainerNotDoc.html#value--\">value</a>={"
@@ -108,10 +184,6 @@
+ "title=\"annotation in pkg\">@RegContaineeNotDoc</a>})");
checkOutput("pkg1/C.html", false,
- "<a href=\"ContaineeSynthDoc.html\" "
- + "title=\"annotation in pkg1\">@ContaineeSynthDoc</a> "
- + "<a href=\"ContaineeSynthDoc.html\" "
- + "title=\"annotation in pkg1\">@ContaineeSynthDoc</a>",
"<a href=\"RegContainerValNotDoc.html\" "
+ "title=\"annotation in pkg1\">@RegContainerValNotDoc</a>"
+ "(<a href=\"RegContainerValNotDoc.html#value--\">value</a>={"
--- a/test/langtools/jdk/javadoc/doclet/testSearch/TestSearch.java Thu Mar 01 16:35:36 2018 -0500
+++ b/test/langtools/jdk/javadoc/doclet/testSearch/TestSearch.java Fri Mar 02 21:00:12 2018 +0100
@@ -24,7 +24,7 @@
/*
* @test
* @bug 8141492 8071982 8141636 8147890 8166175 8168965 8176794 8175218 8147881
- * 8181622 8182263 8074407 8187521 8198522
+ * 8181622 8182263 8074407 8187521 8198522 8182765
* @summary Test the search feature of javadoc.
* @author bpatel
* @library ../lib
@@ -41,7 +41,10 @@
@Test
void test1() {
- javadoc("-d", "out-1", "-sourcepath", "-use", testSrc("UnnamedPkgClass.java"));
+ javadoc("-d", "out-1",
+ "-sourcepath",
+ "-use",
+ testSrc("UnnamedPkgClass.java"));
checkExit(Exit.OK);
checkSearchOutput("UnnamedPkgClass.html", true, true);
checkJqueryAndImageFiles(true);
@@ -60,12 +63,15 @@
@Test
void test2() {
- javadoc("-d", "out-2", "-Xdoclint:none", "-sourcepath", testSrc,
- "-use", "pkg", "pkg1", "pkg2", "pkg3");
+ javadoc("-d", "out-2",
+ "-Xdoclint:none",
+ "-sourcepath", testSrc,
+ "-use",
+ "pkg", "pkg1", "pkg2", "pkg3");
checkExit(Exit.OK);
checkInvalidUsageIndexTag();
checkSearchOutput(true);
- checkSingleIndex(true, false);
+ checkSingleIndex(true, true);
checkSingleIndexSearchTagDuplication();
checkJqueryAndImageFiles(true);
checkSearchJS();
@@ -81,13 +87,28 @@
}
@Test
+ void test2_html4() {
+ javadoc("-d", "out-2-html4",
+ "-html4",
+ "-Xdoclint:none",
+ "-sourcepath", testSrc,
+ "-use",
+ "pkg", "pkg1", "pkg2", "pkg3");
+ checkExit(Exit.OK);
+ checkSingleIndex(true, false);
+ }
+
+ @Test
void test2a() {
- javadoc("-d", "out-2a", "-Xdoclint:all", "-sourcepath", testSrc,
- "-use", "pkg", "pkg1", "pkg2", "pkg3");
+ javadoc("-d", "out-2a",
+ "-Xdoclint:all",
+ "-sourcepath", testSrc,
+ "-use",
+ "pkg", "pkg1", "pkg2", "pkg3");
checkExit(Exit.ERROR);
checkDocLintErrors();
checkSearchOutput(true);
- checkSingleIndex(true, false);
+ checkSingleIndex(true, true);
checkSingleIndexSearchTagDuplication();
checkJqueryAndImageFiles(true);
checkSearchJS();
@@ -103,10 +124,24 @@
}
@Test
+ void test2a_html4() {
+ javadoc("-d", "out-2a-html4",
+ "-html4",
+ "-Xdoclint:all",
+ "-sourcepath", testSrc,
+ "-use",
+ "pkg", "pkg1", "pkg2", "pkg3");
+ checkSingleIndex(true, false);
+ }
+
+ @Test
void test3() {
- javadoc("-d", "out-3", "-noindex", "-Xdoclint:none",
+ javadoc("-d", "out-3",
+ "-noindex",
+ "-Xdoclint:none",
"-sourcepath", testSrc,
- "-use", "pkg", "pkg1", "pkg2", "pkg3");
+ "-use",
+ "pkg", "pkg1", "pkg2", "pkg3");
checkExit(Exit.OK);
checkSearchOutput(false);
checkJqueryAndImageFiles(false);
@@ -124,9 +159,12 @@
@Test
void test4() {
- javadoc("-d", "out-4", "-html5", "-Xdoclint:none",
+ javadoc("-d", "out-4",
+ "-html5",
+ "-Xdoclint:none",
"-sourcepath", testSrc,
- "-use", "pkg", "pkg1", "pkg2", "pkg3");
+ "-use",
+ "pkg", "pkg1", "pkg2", "pkg3");
checkExit(Exit.OK);
checkSearchOutput(true);
checkSingleIndex(true, true);
@@ -146,9 +184,13 @@
@Test
void test5() {
- javadoc("-d", "out-5", "-noindex", "-html5", "-Xdoclint:none",
+ javadoc("-d", "out-5",
+ "-html5",
+ "-noindex",
+ "-Xdoclint:none",
"-sourcepath", testSrc,
- "-use", "pkg", "pkg1", "pkg2", "pkg3");
+ "-use",
+ "pkg", "pkg1", "pkg2", "pkg3");
checkExit(Exit.OK);
checkSearchOutput(false);
checkJqueryAndImageFiles(false);
@@ -166,9 +208,12 @@
@Test
void test6() {
- javadoc("-d", "out-6", "-nocomment", "-Xdoclint:none",
+ javadoc("-d", "out-6",
+ "-nocomment",
+ "-Xdoclint:none",
"-sourcepath", testSrc,
- "-use", "pkg", "pkg1", "pkg2", "pkg3");
+ "-use",
+ "pkg", "pkg1", "pkg2", "pkg3");
checkExit(Exit.OK);
checkSearchOutput(true);
checkIndexNoComment();
@@ -187,9 +232,12 @@
@Test
void test7() {
- javadoc("-d", "out-7", "-nodeprecated", "-Xdoclint:none",
+ javadoc("-d", "out-7",
+ "-nodeprecated",
+ "-Xdoclint:none",
"-sourcepath", testSrc,
- "-use", "pkg", "pkg1", "pkg2", "pkg3");
+ "-use",
+ "pkg", "pkg1", "pkg2", "pkg3");
checkExit(Exit.OK);
checkSearchOutput(true);
checkIndexNoDeprecated();
@@ -208,8 +256,12 @@
@Test
void test8() {
- javadoc("-d", "out-8", "-splitindex", "-Xdoclint:none", "-sourcepath", testSrc,
- "-use", "pkg", "pkg1", "pkg2", "pkg3");
+ javadoc("-d", "out-8",
+ "-splitindex",
+ "-Xdoclint:none",
+ "-sourcepath", testSrc,
+ "-use",
+ "pkg", "pkg1", "pkg2", "pkg3");
checkExit(Exit.OK);
checkInvalidUsageIndexTag();
checkSearchOutput(true);
@@ -230,8 +282,12 @@
@Test
void test9() {
- javadoc("-d", "out-9", "-sourcepath", testSrc, "-javafx", "-package",
- "-use", "pkgfx", "pkg3");
+ javadoc("-d", "out-9",
+ "-sourcepath", testSrc,
+ "-javafx",
+ "-package",
+ "-use",
+ "pkgfx", "pkg3");
checkExit(Exit.OK);
checkSearchOutput(true);
checkJavaFXOutput();
@@ -386,7 +442,7 @@
+ "Search tag in pkg.AnotherClass.ModalExclusionType.NO_EXCLUDE</dt>");
checkOutput("index-files/index-5.html", true,
"<dt><span class=\"searchTagLink\"><a href=\"../pkg/AnotherClass.ModalExclusionType.html"
- + "#html-span-see-/span-\">html <span> see </span></a></span> - Search "
+ + "#html%3Cspan%3Esee%3C/span%3E\">html <span> see </span></a></span> - Search "
+ "tag in pkg.AnotherClass.ModalExclusionType.APPLICATION_EXCLUDE</dt>");
checkOutput("index-files/index-11.html", true,
"<dt><span class=\"searchTagLink\"><a href=\"../pkg/AnotherClass.html#quoted\">quoted</a>"
--- a/test/langtools/jdk/javadoc/doclet/testSeeTag/TestSeeTag.java Thu Mar 01 16:35:36 2018 -0500
+++ b/test/langtools/jdk/javadoc/doclet/testSeeTag/TestSeeTag.java Fri Mar 02 21:00:12 2018 +0100
@@ -23,7 +23,7 @@
/*
* @test
- * @bug 8017191
+ * @bug 8017191 8182765
* @summary Javadoc is confused by at-link to imported classes outside of the set of generated packages
* @author jjg
* @library ../lib
@@ -50,10 +50,10 @@
"<code>List</code>",
"<dl>\n"
+ "<dt><span class=\"seeLabel\">See Also:</span></dt>\n"
- + "<dd><a href=\"Test.InnerOne.html#foo--\"><code>Test.InnerOne.foo()</code></a>, \n"
- + "<a href=\"Test.InnerOne.html#bar-java.lang.Object-\"><code>Test.InnerOne.bar(Object)</code></a>, \n"
+ + "<dd><a href=\"Test.InnerOne.html#foo()\"><code>Test.InnerOne.foo()</code></a>, \n"
+ + "<a href=\"Test.InnerOne.html#bar(java.lang.Object)\"><code>Test.InnerOne.bar(Object)</code></a>, \n"
+ "<a href=\"http://docs.oracle.com/javase/7/docs/technotes/tools/windows/javadoc.html#see\">Javadoc</a>, \n"
- + "<a href=\"Test.InnerOne.html#baz-float-\"><code>something</code></a></dd>\n"
+ + "<a href=\"Test.InnerOne.html#baz(float)\"><code>something</code></a></dd>\n"
+ "</dl>");
checkOutput("pkg/Test.html", false,
@@ -65,4 +65,23 @@
checkOutput("pkg/Test2.html", false,
">Serialized Form<");
}
+
+ @Test
+ void test_html4() {
+ javadoc("-d", "out-html4",
+ "-html4",
+ "-sourcepath", testSrc,
+ "pkg");
+ checkExit(Exit.OK);
+
+ checkOutput("pkg/Test.html", true,
+ "<code>List</code>",
+ "<dl>\n"
+ + "<dt><span class=\"seeLabel\">See Also:</span></dt>\n"
+ + "<dd><a href=\"Test.InnerOne.html#foo--\"><code>Test.InnerOne.foo()</code></a>, \n"
+ + "<a href=\"Test.InnerOne.html#bar-java.lang.Object-\"><code>Test.InnerOne.bar(Object)</code></a>, \n"
+ + "<a href=\"http://docs.oracle.com/javase/7/docs/technotes/tools/windows/javadoc.html#see\">Javadoc</a>, \n"
+ + "<a href=\"Test.InnerOne.html#baz-float-\"><code>something</code></a></dd>\n"
+ + "</dl>");
}
+}
--- a/test/langtools/jdk/javadoc/doclet/testSerializedFormDeprecationInfo/TestSerializedFormDeprecationInfo.java Thu Mar 01 16:35:36 2018 -0500
+++ b/test/langtools/jdk/javadoc/doclet/testSerializedFormDeprecationInfo/TestSerializedFormDeprecationInfo.java Fri Mar 02 21:00:12 2018 +0100
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2009, 2017, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2009, 2018, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
@@ -23,7 +23,7 @@
/*
* @test
- * @bug 6802694 8025633 8026567 8183511 8074407
+ * @bug 6802694 8025633 8026567 8183511 8074407 8182765
* @summary This test verifies deprecation info in serialized-form.html.
* @author Bhavesh Patel
* @library ../lib
@@ -96,12 +96,12 @@
+ "java.io.IOException</code> - on error</dd>\n"
+ "<dt><span class=\"seeLabel\">See Also:</span>"
+ "</dt>\n"
- + "<dd><a href=\"pkg1/C1.html#setUndecorated-boolean-\">"
+ + "<dd><a href=\"pkg1/C1.html#setUndecorated(boolean)\">"
+ "<code>C1.setUndecorated(boolean)</code></a></dd>\n"
+ "</dl>",
"<span class=\"deprecatedLabel\">Deprecated.</span>\n"
+ "<div class=\"deprecationComment\">As of JDK version 1.5, replaced by\n"
- + " <a href=\"pkg1/C1.html#setUndecorated-boolean-\">"
+ + " <a href=\"pkg1/C1.html#setUndecorated(boolean)\">"
+ "<code>setUndecorated(boolean)</code></a>.</div>\n"
+ "</div>\n"
+ "<div class=\"block\">This field indicates whether the C1 "
@@ -112,12 +112,12 @@
+ "<dd>1.4</dd>\n"
+ "<dt><span class=\"seeLabel\">See Also:</span>"
+ "</dt>\n"
- + "<dd><a href=\"pkg1/C1.html#setUndecorated-boolean-\">"
+ + "<dd><a href=\"pkg1/C1.html#setUndecorated(boolean)\">"
+ "<code>C1.setUndecorated(boolean)</code></a></dd>\n"
+ "</dl>",
"<span class=\"deprecatedLabel\">Deprecated.</span>\n"
+ "<div class=\"deprecationComment\">As of JDK version 1.5, replaced by\n"
- + " <a href=\"pkg1/C1.html#setUndecorated-boolean-\">"
+ + " <a href=\"pkg1/C1.html#setUndecorated(boolean)\">"
+ "<code>setUndecorated(boolean)</code></a>.</div>\n"
+ "</div>\n"
+ "<div class=\"block\">Reads the object stream.</div>\n"
@@ -140,7 +140,7 @@
+ "<div class=\"deprecationBlock\"><span class=\"deprecatedLabel\">Deprecated.</span>\n"
+ "<div class=\"deprecationComment\">"
+ "As of JDK version 1.5, replaced by\n"
- + " <a href=\"pkg1/C1.html#setUndecorated-boolean-\"><code>"
+ + " <a href=\"pkg1/C1.html#setUndecorated(boolean)\"><code>"
+ "setUndecorated(boolean)</code></a>.</div>\n"
+ "</div>\n"
+ "</li>",
@@ -148,7 +148,7 @@
+ "Deprecated.</span>\n"
+ "<div class=\"deprecationComment\">As of JDK version"
+ " 1.5, replaced by\n"
- + " <a href=\"pkg1/C1.html#setUndecorated-boolean-\">"
+ + " <a href=\"pkg1/C1.html#setUndecorated(boolean)\">"
+ "<code>setUndecorated(boolean)</code></a>.</div>\n"
+ "</div>\n"
+ "</li>");
--- a/test/langtools/jdk/javadoc/doclet/testStylesheet/TestStylesheet.java Thu Mar 01 16:35:36 2018 -0500
+++ b/test/langtools/jdk/javadoc/doclet/testStylesheet/TestStylesheet.java Fri Mar 02 21:00:12 2018 +0100
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2005, 2017, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2005, 2018, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
@@ -24,7 +24,7 @@
/*
* @test
* @bug 4494033 7028815 7052425 8007338 8023608 8008164 8016549 8072461 8154261 8162363 8160196 8151743 8177417
- * 8175218 8176452 8181215 8182263 8183511 8169819 8183037 8185369
+ * 8175218 8176452 8181215 8182263 8183511 8169819 8183037 8185369 8182765
* @summary Run tests on doclet stylesheet.
* @author jamieh
* @library ../lib
@@ -45,7 +45,10 @@
javadoc("-d", "out",
"-sourcepath", testSrc,
"pkg");
- checkExit(Exit.OK);
+ checkExit(Exit.ERROR);
+
+ checkOutput(Output.OUT, true,
+ "attribute not supported in HTML5: name");
// TODO: most of this test seems a bit silly, since javadoc is simply
// copying in the stylesheet from the source directory
@@ -251,4 +254,13 @@
+ " font-weight:bold;\n"
+ "}");
}
+
+ @Test
+ void test_html4() {
+ javadoc("-d", "out-html4",
+ "-html4",
+ "-sourcepath", testSrc,
+ "pkg");
+ checkExit(Exit.OK);
}
+}
--- a/test/langtools/jdk/javadoc/doclet/testSummaryTag/TestSummaryTag.java Thu Mar 01 16:35:36 2018 -0500
+++ b/test/langtools/jdk/javadoc/doclet/testSummaryTag/TestSummaryTag.java Fri Mar 02 21:00:12 2018 +0100
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2017, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2017, 2018, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
@@ -25,7 +25,7 @@
/*
* @test
- * @bug 8173425 8186332
+ * @bug 8173425 8186332 8182765
* @summary tests for the summary tag behavior
* @library ../lib
* @modules jdk.javadoc/jdk.javadoc.internal.tool
@@ -49,6 +49,63 @@
checkOutput("index-all.html", true,
"<dl>\n"
+ + "<dt><span class=\"memberNameLink\"><a href=\"p1/A.html#m()\">m()"
+ + "</a></span> - Method in class p1.<a href=\"p1/A.html\" title=\"class in p1\">A</a></dt>\n"
+ + "<dd>\n"
+ + "<div class=\"block\">First sentence</div>\n"
+ + "</dd>\n"
+ + "<dt><span class=\"memberNameLink\"><a href=\"p1/B.html#m()\">m()"
+ + "</a></span> - Method in class p1.<a href=\"p1/B.html\" title=\"class in p1\">B</a></dt>\n"
+ + "<dd>\n"
+ + "<div class=\"block\">First sentence</div>\n"
+ + "</dd>\n"
+ + "<dt><span class=\"memberNameLink\"><a href=\"p1/A.html#m1()\">m1()"
+ + "</a></span> - Method in class p1.<a href=\"p1/A.html\" title=\"class in p1\">A</a></dt>\n"
+ + "<dd>\n"
+ + "<div class=\"block\"> First sentence </div>\n"
+ + "</dd>\n"
+ + "<dt><span class=\"memberNameLink\"><a href=\"p1/A.html#m2()\">m2()"
+ + "</a></span> - Method in class p1.<a href=\"p1/A.html\" title=\"class in p1\">A</a></dt>\n"
+ + "<dd>\n"
+ + "<div class=\"block\">Some html <foo> codes</div>\n"
+ + "</dd>\n"
+ + "<dt><span class=\"memberNameLink\"><a href=\"p1/A.html#m3()\">m3()"
+ + "</a></span> - Method in class p1.<a href=\"p1/A.html\" title=\"class in p1\">A</a></dt>\n"
+ + "<dd>\n"
+ + "<div class=\"block\">First sentence </div>\n"
+ + "</dd>\n"
+ + "<dt><span class=\"memberNameLink\"><a href=\"p1/A.html#m4()\">m4()"
+ + "</a></span> - Method in class p1.<a href=\"p1/A.html\" title=\"class in p1\">A</a></dt>\n"
+ + "<dd>\n"
+ + "<div class=\"block\">First sentence i.e. the first sentence</div>\n"
+ + "</dd>\n"
+ + "</dl>\n",
+ "<div class=\"block\">The first... line</div>\n"
+ );
+
+ // make sure the second @summary's content is displayed correctly
+ checkOutput("p1/A.html", true,
+ "<li class=\"blockList\">\n"
+ + "<h4>m3</h4>\n"
+ + "<pre>public void m3()</pre>\n"
+ + "<div class=\"block\">First sentence some text maybe second sentence.</div>\n"
+ + "</li>\n"
+ );
+
+ checkOutput("p1/package-summary.html", true,
+ "<div class=\"block\">The first... line second from ...</div>");
+ }
+
+ @Test
+ void test1_html4() {
+ javadoc("-d", "out1-html4",
+ "-html4",
+ "-sourcepath", testSrc,
+ "p1");
+ checkExit(Exit.OK);
+
+ checkOutput("index-all.html", true,
+ "<dl>\n"
+ "<dt><span class=\"memberNameLink\"><a href=\"p1/A.html#m--\">m()"
+ "</a></span> - Method in class p1.<a href=\"p1/A.html\" title=\"class in p1\">A</a></dt>\n"
+ "<dd>\n"
@@ -79,22 +136,10 @@
+ "<dd>\n"
+ "<div class=\"block\">First sentence i.e. the first sentence</div>\n"
+ "</dd>\n"
- + "</dl>\n",
- "<div class=\"block\">The first... line</div>\n"
+ + "</dl>\n"
);
+ }
- // make sure the second @summary's content is displayed correctly
- checkOutput("p1/A.html", true,
- "<li class=\"blockList\">\n"
- + "<h4>m3</h4>\n"
- + "<pre>public void m3()</pre>\n"
- + "<div class=\"block\">First sentence some text maybe second sentence.</div>\n"
- + "</li>\n"
- );
-
- checkOutput("p1/package-summary.html", true,
- "<div class=\"block\">The first... line second from ...</div>");
- }
@Test
void test2() {
javadoc("-d", "out2",
--- a/test/langtools/jdk/javadoc/doclet/testTypeAnnotations/TestTypeAnnotations.java Thu Mar 01 16:35:36 2018 -0500
+++ b/test/langtools/jdk/javadoc/doclet/testTypeAnnotations/TestTypeAnnotations.java Fri Mar 02 21:00:12 2018 +0100
@@ -23,7 +23,7 @@
/*
* @test
- * @bug 8005091 8009686 8025633 8026567 6469562 8071982 8071984 8162363 8175200 8186332
+ * @bug 8005091 8009686 8025633 8026567 6469562 8071982 8071984 8162363 8175200 8186332 8182765
* @summary Make sure that type annotations are displayed correctly
* @author Bhavesh Patel
* @library ../lib
@@ -438,16 +438,13 @@
);
checkOutput("typeannos/RepeatingOnConstructor.Inner.html", true,
- "<code><span class=\"memberNameLink\"><a href=\""
- + "#Inner-java.lang.String-java.lang.String...-\">Inner</a></span>"
- + "​(java.lang.String parameter,\n java.lang.String <a href="
- + "\"RepTypeUseA.html\" title=\"annotation in typeannos\">"
- + "@RepTypeUseA</a> <a href=\"RepTypeUseA.html\" title="
- + "\"annotation in typeannos\">@RepTypeUseA</a> <a href=\"RepTypeUseB.html"
- + "\" title=\"annotation in typeannos\">@RepTypeUseB</a> <a href="
- + "\"RepTypeUseB.html\" title=\"annotation in typeannos\">"
+ "<code><span class=\"memberNameLink\"><a href=\"#%3Cinit%3E(java.lang.String,"
+ + "java.lang.String...)\">Inner</a></span>​(java.lang.String parameter,\n"
+ + " java.lang.String <a href=\"RepTypeUseA.html\" title=\"annotation in typeannos\">"
+ + "@RepTypeUseA</a> <a href=\"RepTypeUseA.html\" title=\"annotation in typeannos\">"
+ + "@RepTypeUseA</a> <a href=\"RepTypeUseB.html\" title=\"annotation in typeannos\">"
+ + "@RepTypeUseB</a> <a href=\"RepTypeUseB.html\" title=\"annotation in typeannos\">"
+ "@RepTypeUseB</a> ... vararg)</code>",
-
"Inner​(<a href=\"RepTypeUseA.html\" title=\"annotation in typeannos\">"
+ "@RepTypeUseA</a> <a href=\"RepTypeUseA.html\" title="
+ "\"annotation in typeannos\">@RepTypeUseA</a> <a href=\"RepTypeUseB.html"
@@ -574,7 +571,7 @@
checkOutput("typeannos/RepeatingOnMethod.html", true,
"<code>(package private) java.lang.String</code></td>\n<th class=\"colSecond\" scope=\"row\">"
+ "<code><span class=\"memberNameLink\"><a href="
- + "\"#test1--\">test1</a></span>()</code>",
+ + "\"#test1()\">test1</a></span>()</code>",
"<code>(package private) <a href=\"RepTypeUseA.html\" "
+ "title=\"annotation in typeannos\">@RepTypeUseA</a> <a href="
@@ -583,7 +580,7 @@
+ "\"annotation in typeannos\">@RepTypeUseB</a> <a href=\"RepTypeUseB.html"
+ "\" title=\"annotation in typeannos\">@RepTypeUseB</a> java.lang.String</code>"
+ "</td>\n<th class=\"colSecond\" scope=\"row\"><code><span class=\"memberNameLink\">"
- + "<a href=\"#test2--\">test2</a>"
+ + "<a href=\"#test2()\">test2</a>"
+ "</span>()</code>",
"<code>(package private) <a href=\"RepTypeUseA.html\" "
@@ -593,7 +590,7 @@
+ "\"annotation in typeannos\">@RepTypeUseB</a> <a href=\"RepTypeUseB.html\" "
+ "title=\"annotation in typeannos\">@RepTypeUseB</a> java.lang.String</code>"
+ "</td>\n<th class=\"colSecond\" scope=\"row\"><code><span class=\"memberNameLink\">"
- + "<a href=\"#test3--\">test3</a>"
+ + "<a href=\"#test3()\">test3</a>"
+ "</span>()</code>",
"<code>(package private) <a href=\"RepAllContextsA.html\" "
@@ -604,10 +601,10 @@
+ "\"RepAllContextsB.html\" title=\"annotation in typeannos\">"
+ "@RepAllContextsB</a> java.lang.String</code></td>\n<th class=\"colSecond\" scope=\"row\">"
+ "<code><span class=\"memberNameLink\"><a href=\""
- + "#test4--\">test4</a></span>()</code>",
+ + "#test4()\">test4</a></span>()</code>",
"<code><span class=\"memberNameLink\"><a href=\""
- + "#test5-java.lang.String-java.lang.String...-\">test5</a></span>"
+ + "#test5(java.lang.String,java.lang.String...)\">test5</a></span>"
+ "​(java.lang.String parameter,\n java.lang.String <a href="
+ "\"RepTypeUseA.html\" title=\"annotation in typeannos\">"
+ "@RepTypeUseA</a> <a href=\"RepTypeUseA.html\" title="
@@ -684,12 +681,12 @@
"<code>(package private) <T> java.lang.String</code></td>\n"
+ "<th class=\"colSecond\" scope=\"row\"><code><span class=\"memberNameLink\"><a href="
+ "\"#"
- + "genericMethod-T-\">genericMethod</a></span>​(T t)</code>",
+ + "genericMethod(T)\">genericMethod</a></span>​(T t)</code>",
"<code>(package private) <T> java.lang.String</code></td>\n"
+ "<th class=\"colSecond\" scope=\"row\"><code><span class=\"memberNameLink\"><a href="
+ "\"#"
- + "genericMethod2-T-\">genericMethod2</a></span>​(<a href=\"RepTypeUseA.html"
+ + "genericMethod2(T)\">genericMethod2</a></span>​(<a href=\"RepTypeUseA.html"
+ "\" title=\"annotation in typeannos\">@RepTypeUseA</a> <a href=\"RepTypeUseA.html"
+ "\" title=\"annotation in typeannos\">@RepTypeUseA</a> <a href=\"RepTypeUseB.html"
+ "\" title=\"annotation in typeannos\">@RepTypeUseB</a> <a href=\"RepTypeUseB.html"
@@ -697,7 +694,7 @@
"<code>(package private) java.lang.String</code></td>\n<th class=\"colSecond\" scope=\"row\"><code>"
+ "<span class=\"memberNameLink\"><a href=\"#"
- + "test--\">test</a></span>()</code>",
+ + "test()\">test</a></span>()</code>",
"java.lang.String test​(<a href=\"RepTypeUseA.html\" "
+ "title=\"annotation in typeannos\">@RepTypeUseA</a> <a href="
@@ -720,4 +717,89 @@
+ "\"RepMethodB.html\" title=\"annotation in typeannos\">"
+ "@RepMethodB</a>\nvoid test()");
}
+
+ @Test
+ void test_html4() {
+ javadoc("-d", "out-html4",
+ "-html4",
+ "-sourcepath", testSrc,
+ "-private",
+ "typeannos");
+ checkExit(Exit.OK);
+
+ checkOutput("typeannos/RepeatingOnConstructor.Inner.html", true,
+ "<code><span class=\"memberNameLink\"><a href=\""
+ + "#Inner-java.lang.String-java.lang.String...-\">Inner</a></span>"
+ + "​(java.lang.String parameter,\n java.lang.String <a href="
+ + "\"RepTypeUseA.html\" title=\"annotation in typeannos\">"
+ + "@RepTypeUseA</a> <a href=\"RepTypeUseA.html\" title="
+ + "\"annotation in typeannos\">@RepTypeUseA</a> <a href=\"RepTypeUseB.html"
+ + "\" title=\"annotation in typeannos\">@RepTypeUseB</a> <a href="
+ + "\"RepTypeUseB.html\" title=\"annotation in typeannos\">"
+ + "@RepTypeUseB</a> ... vararg)</code>");
+
+ checkOutput("typeannos/RepeatingOnMethod.html", true,
+ "<code>(package private) java.lang.String</code></td>\n<th class=\"colSecond\" scope=\"row\">"
+ + "<code><span class=\"memberNameLink\"><a href="
+ + "\"#test1--\">test1</a></span>()</code>",
+
+ "<code>(package private) <a href=\"RepTypeUseA.html\" "
+ + "title=\"annotation in typeannos\">@RepTypeUseA</a> <a href="
+ + "\"RepTypeUseA.html\" title=\"annotation in typeannos\">"
+ + "@RepTypeUseA</a> <a href=\"RepTypeUseB.html\" title="
+ + "\"annotation in typeannos\">@RepTypeUseB</a> <a href=\"RepTypeUseB.html"
+ + "\" title=\"annotation in typeannos\">@RepTypeUseB</a> java.lang.String</code>"
+ + "</td>\n<th class=\"colSecond\" scope=\"row\"><code><span class=\"memberNameLink\">"
+ + "<a href=\"#test2--\">test2</a>"
+ + "</span>()</code>",
+
+ "<code>(package private) <a href=\"RepTypeUseA.html\" "
+ + "title=\"annotation in typeannos\">@RepTypeUseA</a> <a href="
+ + "\"RepTypeUseA.html\" title=\"annotation in typeannos\">"
+ + "@RepTypeUseA</a> <a href=\"RepTypeUseB.html\" title="
+ + "\"annotation in typeannos\">@RepTypeUseB</a> <a href=\"RepTypeUseB.html\" "
+ + "title=\"annotation in typeannos\">@RepTypeUseB</a> java.lang.String</code>"
+ + "</td>\n<th class=\"colSecond\" scope=\"row\"><code><span class=\"memberNameLink\">"
+ + "<a href=\"#test3--\">test3</a>"
+ + "</span>()</code>",
+
+ "<code>(package private) <a href=\"RepAllContextsA.html\" "
+ + "title=\"annotation in typeannos\">@RepAllContextsA</a> <a href="
+ + "\"RepAllContextsA.html\" title=\"annotation in typeannos\">"
+ + "@RepAllContextsA</a> <a href=\"RepAllContextsB.html\" "
+ + "title=\"annotation in typeannos\">@RepAllContextsB</a> <a href="
+ + "\"RepAllContextsB.html\" title=\"annotation in typeannos\">"
+ + "@RepAllContextsB</a> java.lang.String</code></td>\n<th class=\"colSecond\" scope=\"row\">"
+ + "<code><span class=\"memberNameLink\"><a href=\""
+ + "#test4--\">test4</a></span>()</code>",
+
+ "<code><span class=\"memberNameLink\"><a href=\""
+ + "#test5-java.lang.String-java.lang.String...-\">test5</a></span>"
+ + "​(java.lang.String parameter,\n java.lang.String <a href="
+ + "\"RepTypeUseA.html\" title=\"annotation in typeannos\">"
+ + "@RepTypeUseA</a> <a href=\"RepTypeUseA.html\" title="
+ + "\"annotation in typeannos\">@RepTypeUseA</a> <a href=\"RepTypeUseB.html"
+ + "\" title=\"annotation in typeannos\">@RepTypeUseB</a> <a href="
+ + "\"RepTypeUseB.html\" title=\"annotation in typeannos\">"
+ + "@RepTypeUseB</a> ... vararg)</code>");
+
+ checkOutput("typeannos/RepeatingOnTypeParametersBoundsTypeArgumentsOnMethod.html", true,
+ "<code>(package private) <T> java.lang.String</code></td>\n"
+ + "<th class=\"colSecond\" scope=\"row\"><code><span class=\"memberNameLink\"><a href="
+ + "\"#"
+ + "genericMethod-T-\">genericMethod</a></span>​(T t)</code>",
+
+ "<code>(package private) <T> java.lang.String</code></td>\n"
+ + "<th class=\"colSecond\" scope=\"row\"><code><span class=\"memberNameLink\"><a href="
+ + "\"#"
+ + "genericMethod2-T-\">genericMethod2</a></span>​(<a href=\"RepTypeUseA.html"
+ + "\" title=\"annotation in typeannos\">@RepTypeUseA</a> <a href=\"RepTypeUseA.html"
+ + "\" title=\"annotation in typeannos\">@RepTypeUseA</a> <a href=\"RepTypeUseB.html"
+ + "\" title=\"annotation in typeannos\">@RepTypeUseB</a> <a href=\"RepTypeUseB.html"
+ + "\" title=\"annotation in typeannos\">@RepTypeUseB</a> T t)</code>",
+
+ "<code>(package private) java.lang.String</code></td>\n<th class=\"colSecond\" scope=\"row\"><code>"
+ + "<span class=\"memberNameLink\"><a href=\"#"
+ + "test--\">test</a></span>()</code>");
}
+}
--- a/test/langtools/jdk/javadoc/doclet/testTypeParams/TestTypeParameters.java Thu Mar 01 16:35:36 2018 -0500
+++ b/test/langtools/jdk/javadoc/doclet/testTypeParams/TestTypeParameters.java Fri Mar 02 21:00:12 2018 +0100
@@ -23,7 +23,7 @@
/*
* @test
- * @bug 4927167 4974929 7010344 8025633 8081854
+ * @bug 4927167 4974929 7010344 8025633 8081854 8182765
* @summary When the type parameters are more than 10 characters in length,
* make sure there is a line break between type params and return type
* in member summary. Also, test for type parameter links in package-summary and
@@ -68,12 +68,27 @@
// Nested type parameters
checkOutput("pkg/C.html", true,
+ "<a id=\"formatDetails(java.util.Collection,java.util.Collection)\">\n"
+ + "<!-- -->\n"
+ + "</a>");
+ }
+
+ @Test
+ void test1_html4() {
+ javadoc("-d", "out-1-html4",
+ "-html4",
+ "-use",
+ "-sourcepath", testSrc,
+ "pkg");
+ checkExit(Exit.OK);
+
+ // Nested type parameters
+ checkOutput("pkg/C.html", true,
"<a name=\"formatDetails-java.util.Collection-java.util.Collection-\">\n"
+ "<!-- -->\n"
+ "</a>");
}
-
@Test
void test2() {
javadoc("-d", "out-2",
--- a/test/langtools/jdk/javadoc/doclet/testTypeVariableLinks/TestTypeVariableLinks.java Thu Mar 01 16:35:36 2018 -0500
+++ b/test/langtools/jdk/javadoc/doclet/testTypeVariableLinks/TestTypeVariableLinks.java Fri Mar 02 21:00:12 2018 +0100
@@ -23,7 +23,7 @@
/*
* @test
- * @bug 8174805
+ * @bug 8174805 8182765
* @summary JavacTrees should use Types.skipTypeVars() to get the upper bound of type variables
* @library ../lib
* @modules jdk.javadoc/jdk.javadoc.internal.tool
@@ -40,7 +40,10 @@
@Test
void test1() {
- javadoc("-d", "out", "-sourcepath", testSrc, "-package", "pkg1");
+ javadoc("-d", "out",
+ "-sourcepath", testSrc,
+ "-package",
+ "pkg1");
checkExit(Exit.OK);
checkOutput("pkg1/C.html", true,
@@ -48,6 +51,21 @@
checkOutput("pkg1/C.html", true,
"<div class=\"block\">Linking to List.clear() <code>List.clear()</code></div>");
checkOutput("pkg1/C.html", true,
+ "<div class=\"block\">Linking to Additional.doAction() <a href=\"Additional.html#doAction()\"><code>Additional.doAction()</code></a></div>");
+ checkOutput("pkg1/C.html", true,
+ "<div class=\"block\">Linking to I.abstractAction() <a href=\"I.html#abstractAction()\"><code>I.abstractAction()</code></a></div>");
+ }
+
+ @Test
+ void test1_html4() {
+ javadoc("-d", "out-html4",
+ "-html4",
+ "-sourcepath", testSrc,
+ "-package",
+ "pkg1");
+ checkExit(Exit.OK);
+
+ checkOutput("pkg1/C.html", true,
"<div class=\"block\">Linking to Additional.doAction() <a href=\"Additional.html#doAction--\"><code>Additional.doAction()</code></a></div>");
checkOutput("pkg1/C.html", true,
"<div class=\"block\">Linking to I.abstractAction() <a href=\"I.html#abstractAction--\"><code>I.abstractAction()</code></a></div>");
--- a/test/langtools/jdk/javadoc/doclet/testUseOption/TestUseOption.java Thu Mar 01 16:35:36 2018 -0500
+++ b/test/langtools/jdk/javadoc/doclet/testUseOption/TestUseOption.java Fri Mar 02 21:00:12 2018 +0100
@@ -24,6 +24,7 @@
/*
* @test
* @bug 4496290 4985072 7006178 7068595 8016328 8050031 8048351 8081854 8071982 8162363 8175200 8186332
+ * 8182765
* @summary A simple test to ensure class-use files are correct.
* @author jamieh
* @library ../lib
@@ -84,7 +85,7 @@
"that return types with arguments of type"
);
checkOutput("pkg1/class-use/UsedClass.html", true,
- "<a href=\"../C1.html#methodInC1ReturningType--\">methodInC1ReturningType</a>"
+ "<a href=\"../C1.html#methodInC1ReturningType()\">methodInC1ReturningType</a>"
);
checkOutput("pkg1/class-use/UsedInterface.html", true,
"Classes in <a href=\"../package-summary.html\">pkg1</a> that implement " +
@@ -101,16 +102,62 @@
"<a href=\"../AnAbstract.html\" title=\"class in pkg1\">AnAbstract</a>"
);
checkOutput("pkg1/class-use/UsedInterface.html", true,
+ "../C10.html#withReturningTypeParameters()"
+ );
+ checkOutput("pkg1/class-use/UsedInterface.html", true,
+ "../C10.html#withTypeParametersOfType(java.lang.Class)"
+ );
+ checkOutput("pkg1/class-use/UsedInterface.html", true,
+ "\"../package-summary.html\">pkg1</a> that return " +
+ "<a href=\"../UsedInterface.html\" title=\"interface in pkg1\""
+ );
+ checkOutput("pkg1/class-use/UsedInterface.html", true,
+ "<a href=\"../C10.html#addAll(pkg1.UsedInterface...)\">addAll</a>"
+ );
+ checkOutput("pkg1/class-use/UsedInterface.html", true,
+ "<a href=\"../C10.html#create(pkg1.UsedInterfaceA,pkg1." +
+ "UsedInterface,java.lang.String)\">"
+ );
+ checkOutput("pkg1/class-use/UsedInterface.html", true,
+ "<a href=\"../C10.html#withTypeParametersOfType(java.lang.Class)\">" +
+ "withTypeParametersOfType</a>"
+ );
+ checkOutput("pkg1/class-use/UsedInterface.html", true,
+ "Subinterfaces of <a href=\"../UsedInterface.html\" title=\"interface in pkg1\">"
+ + "UsedInterface</a> in <a href=\"../package-summary.html\">pkg1",
+ "<td class=\"colFirst\"><code>interface </code></td>\n<th class=\"colSecond\" scope=\"row\">"
+ + "<code><span class=\"memberNameLink\"><a href=\"../SubInterface.html\" "
+ + "title=\"interface in pkg1\">SubInterface</a><T></span></code></th>"
+ );
+ checkOutput("pkg1/class-use/UsedThrowable.html", true,
+ "Methods in <a href=\"../package-summary.html\">pkg1</a> that throw "
+ + "<a href=\"../UsedThrowable.html\" title=\"class in pkg1\">UsedThrowable</a>",
+ "<td class=\"colFirst\"><code>void</code></td>\n<th class=\"colSecond\" scope=\"row\"><span class="
+ + "\"typeNameLabel\">C1.</span><code><span class=\"memberNameLink\">"
+ + "<a href=\"../C1.html#methodInC1ThrowsThrowable()\">methodInC1ThrowsThrowable"
+ + "</a></span>()</code></th>"
+ );
+ }
+
+ @Test
+ void test1_html4() {
+ javadoc("-d", "out-1-html4",
+ "-html4",
+ "-sourcepath", testSrc,
+ "-use",
+ "pkg1", "pkg2");
+ checkExit(Exit.OK);
+
+ checkOutput("pkg1/class-use/UsedClass.html", true,
+ "<a href=\"../C1.html#methodInC1ReturningType--\">methodInC1ReturningType</a>"
+ );
+ checkOutput("pkg1/class-use/UsedInterface.html", true,
"../C10.html#withReturningTypeParameters--"
);
checkOutput("pkg1/class-use/UsedInterface.html", true,
"../C10.html#withTypeParametersOfType-java.lang.Class-"
);
checkOutput("pkg1/class-use/UsedInterface.html", true,
- "\"../package-summary.html\">pkg1</a> that return " +
- "<a href=\"../UsedInterface.html\" title=\"interface in pkg1\""
- );
- checkOutput("pkg1/class-use/UsedInterface.html", true,
"<a href=\"../C10.html#addAll-pkg1.UsedInterface...-\">addAll</a>"
);
checkOutput("pkg1/class-use/UsedInterface.html", true,
@@ -121,13 +168,6 @@
"<a href=\"../C10.html#withTypeParametersOfType-java.lang.Class-\">" +
"withTypeParametersOfType</a>"
);
- checkOutput("pkg1/class-use/UsedInterface.html", true,
- "Subinterfaces of <a href=\"../UsedInterface.html\" title=\"interface in pkg1\">"
- + "UsedInterface</a> in <a href=\"../package-summary.html\">pkg1",
- "<td class=\"colFirst\"><code>interface </code></td>\n<th class=\"colSecond\" scope=\"row\">"
- + "<code><span class=\"memberNameLink\"><a href=\"../SubInterface.html\" "
- + "title=\"interface in pkg1\">SubInterface</a><T></span></code></th>"
- );
checkOutput("pkg1/class-use/UsedThrowable.html", true,
"Methods in <a href=\"../package-summary.html\">pkg1</a> that throw "
+ "<a href=\"../UsedThrowable.html\" title=\"class in pkg1\">UsedThrowable</a>",
@@ -151,11 +191,30 @@
+ "UsedInC</a> in <a href=\"../package-summary.html\"><Unnamed></a>"
);
checkOutput("class-use/UsedInC.html", true,
- "<li class=\"blockList\"><a name=\"unnamed.package\">"
+ "<li class=\"blockList\">\n"
+ + "<section role=\"region\"><a id=\"unnamed.package\">"
);
checkOutput("package-use.html", true,
"<th class=\"colFirst\" scope=\"row\">"
+ "<a href=\"class-use/UsedInC.html#unnamed.package\">UsedInC</a></th>",
+ "<th class=\"colFirst\" scope=\"row\"><a href=\"#%3CUnnamed%3E\"><Unnamed></a></th>\n"
+ + "<td class=\"colLast\"> </td>"
+ );
+ }
+
+ @Test
+ void test2_html4() {
+ javadoc("-d", "out-2-html4",
+ "-html4",
+ "-sourcepath", testSrc,
+ "-use",
+ testSrc("C.java"), testSrc("UsedInC.java"), "pkg3");
+ checkExit(Exit.OK);
+
+ checkOutput("class-use/UsedInC.html", true,
+ "<li class=\"blockList\"><a name=\"unnamed.package\">"
+ );
+ checkOutput("package-use.html", true,
"<th class=\"colFirst\" scope=\"row\"><a href=\"#-Unnamed-\"><Unnamed></a></th>\n"
+ "<td class=\"colLast\"> </td>"
);
@@ -169,6 +228,21 @@
"-package", "unique");
checkExit(Exit.OK);
checkUnique("unique/class-use/UseMe.html",
+ "<a href=\"../C1.html#umethod1(unique.UseMe,unique.UseMe%5B%5D)\">",
+ "<a href=\"../C1.html#umethod2(unique.UseMe,unique.UseMe)\">",
+ "<a href=\"../C1.html#umethod3(unique.UseMe,unique.UseMe)\">",
+ "<a href=\"../C1.html#%3Cinit%3E(unique.UseMe,unique.UseMe)\">");
+ }
+
+ @Test
+ void test3_html4() {
+ javadoc("-d", "out-3-html4",
+ "-html4",
+ "-sourcepath", testSrc,
+ "-use",
+ "-package", "unique");
+ checkExit(Exit.OK);
+ checkUnique("unique/class-use/UseMe.html",
"<a href=\"../C1.html#umethod1-unique.UseMe-unique.UseMe:A-\">",
"<a href=\"../C1.html#umethod2-unique.UseMe-unique.UseMe-\">",
"<a href=\"../C1.html#umethod3-unique.UseMe-unique.UseMe-\">",
--- a/test/langtools/jdk/javadoc/doclet/testWarnings/TestWarnings.java Thu Mar 01 16:35:36 2018 -0500
+++ b/test/langtools/jdk/javadoc/doclet/testWarnings/TestWarnings.java Fri Mar 02 21:00:12 2018 +0100
@@ -23,7 +23,7 @@
/*
* @test
- * @bug 4515705 4804296 4702454 4697036 8025633
+ * @bug 4515705 4804296 4702454 4697036 8025633 8182765
* @summary Make sure that first sentence warning only appears once.
* Make sure that only warnings/errors are printed when quiet is used.
* Make sure that links to private/unincluded methods do not cause
@@ -78,8 +78,22 @@
checkExit(Exit.ERROR);
checkOutput("pkg/X.html", true,
- "<a href=\"#m--\"><code>m()</code></a><br/>",
- "<a href=\"#X--\"><code>X()</code></a><br/>",
+ "<a href=\"#m()\"><code>m()</code></a><br/>",
+ "<a href=\"#%3Cinit%3E()\"><code>X()</code></a><br/>",
"<a href=\"#f\"><code>f</code></a><br/>");
}
+
+ @Test
+ void testPrivate_html4() {
+ javadoc("-d", "out-private-html4",
+ "-html4",
+ "-private",
+ "-sourcepath", testSrc,
+ "pkg");
+ checkExit(Exit.ERROR);
+
+ checkOutput("pkg/X.html", true,
+ "<a href=\"#m--\"><code>m()</code></a><br/>",
+ "<a href=\"#X--\"><code>X()</code></a><br/>");
}
+}
--- a/test/langtools/jdk/javadoc/tool/6958836/Test.java Thu Mar 01 16:35:36 2018 -0500
+++ b/test/langtools/jdk/javadoc/tool/6958836/Test.java Fri Mar 02 21:00:12 2018 +0100
@@ -23,7 +23,7 @@
/*
* @test
- * @bug 6958836 8002168
+ * @bug 6958836 8002168 8182765
* @summary javadoc should support -Xmaxerrs and -Xmaxwarns
* @modules jdk.javadoc/jdk.javadoc.internal.tool
*/
@@ -63,7 +63,6 @@
// For some reason, this must be the first option when used.
opts.addAll(list("-locale", "en_US"));
opts.add("-Xdoclint:none");
- opts.add("-html4");
opts.addAll(list("-classpath", System.getProperty("test.src")));
opts.addAll(list("-d", testOutDir.getPath()));
opts.addAll(testOpts);
--- a/test/langtools/jdk/javadoc/tool/6964914/Test.java Thu Mar 01 16:35:36 2018 -0500
+++ b/test/langtools/jdk/javadoc/tool/6964914/Test.java Fri Mar 02 21:00:12 2018 +0100
@@ -23,7 +23,7 @@
/*
* @test
- * @bug 6964914
+ * @bug 6964914 8182765
* @summary javadoc does not output number of warnings using user written doclet
* @modules jdk.javadoc/jdk.javadoc.internal.tool
*/
@@ -47,7 +47,6 @@
File testSrc = new File(System.getProperty("test.src"));
String[] args = {
"-Xdoclint:none",
- "-html4",
"-source", "8",
"-classpath", ".",
"-package",
--- a/test/langtools/jdk/javadoc/tool/6964914/TestStdDoclet.java Thu Mar 01 16:35:36 2018 -0500
+++ b/test/langtools/jdk/javadoc/tool/6964914/TestStdDoclet.java Fri Mar 02 21:00:12 2018 +0100
@@ -58,7 +58,6 @@
cmdArgs.addAll(Arrays.asList(
"-classpath", ".", // insulates us from ambient classpath
"-Xdoclint:none",
- "-html4",
"-package",
new File(testSrc, thisClassName + ".java").getPath()
));
--- a/test/langtools/jdk/javadoc/tool/MaxWarns.java Thu Mar 01 16:35:36 2018 -0500
+++ b/test/langtools/jdk/javadoc/tool/MaxWarns.java Fri Mar 02 21:00:12 2018 +0100
@@ -23,7 +23,7 @@
/*
* @test
- * @bug 8005644
+ * @bug 8005644 8182765
* @summary set default max errs and max warns
* @modules jdk.javadoc/jdk.javadoc.internal.tool
*/
@@ -75,7 +75,7 @@
String javadoc(File f) {
StringWriter sw = new StringWriter();
PrintWriter pw = new PrintWriter(sw);
- String[] args = { "-Xdoclint:none", "-html4", "-d", "api", f.getPath() };
+ String[] args = { "-Xdoclint:none", "-d", "api", f.getPath() };
int rc = jdk.javadoc.internal.tool.Main.execute(args, pw);
pw.flush();
return sw.toString();
--- a/test/langtools/jdk/javadoc/tool/QuietOption.java Thu Mar 01 16:35:36 2018 -0500
+++ b/test/langtools/jdk/javadoc/tool/QuietOption.java Fri Mar 02 21:00:12 2018 +0100
@@ -23,7 +23,7 @@
/*
* @test
- * @bug 8035473
+ * @bug 8035473 8182765
* @summary make sure tool is quiet when told to, and chatty otherwise
*/
@@ -62,7 +62,6 @@
void run1() throws Exception {
List<String> output = doTest(javadoc.getPath(),
"-classpath", ".", // insulates us from ambient classpath
- "-html4",
"-quiet",
new File(testSrc, thisClassName + ".java").getPath());
--- a/test/langtools/jdk/javadoc/tool/doclint/DocLintTest.java Thu Mar 01 16:35:36 2018 -0500
+++ b/test/langtools/jdk/javadoc/tool/doclint/DocLintTest.java Fri Mar 02 21:00:12 2018 +0100
@@ -23,7 +23,7 @@
/*
* @test
- * @bug 8004834 8007610 8129909
+ * @bug 8004834 8007610 8129909 8182765
* @summary Add doclint support into javadoc
* @modules jdk.compiler/com.sun.tools.javac.main
*/
@@ -92,7 +92,7 @@
/* 05 */ "}\n";
private final String rawDiags = "-XDrawDiagnostics";
- private final String htmlVersion = "-html4";
+ private final String htmlVersion = "-html5";
private enum Message {
// doclint messages
--- a/test/langtools/jdk/jshell/ToolBasicTest.java Thu Mar 01 16:35:36 2018 -0500
+++ b/test/langtools/jdk/jshell/ToolBasicTest.java Fri Mar 02 21:00:12 2018 +0100
@@ -23,7 +23,7 @@
/*
* @test
- * @bug 8143037 8142447 8144095 8140265 8144906 8146138 8147887 8147886 8148316 8148317 8143955 8157953 8080347 8154714 8166649 8167643 8170162 8172102 8165405 8174796 8174797 8175304 8167554 8180508 8166232
+ * @bug 8143037 8142447 8144095 8140265 8144906 8146138 8147887 8147886 8148316 8148317 8143955 8157953 8080347 8154714 8166649 8167643 8170162 8172102 8165405 8174796 8174797 8175304 8167554 8180508 8166232 8196133
* @summary Tests for Basic tests for REPL tool
* @modules jdk.compiler/com.sun.tools.javac.api
* jdk.compiler/com.sun.tools.javac.main
@@ -350,6 +350,34 @@
);
}
+ private String makeBadSourceJar() {
+ Compiler compiler = new Compiler();
+ Path outDir = Paths.get("testClasspathJar");
+ Path src = compiler.getPath(outDir.resolve("pkg/A.java"));
+ compiler.writeToFile(src, "package pkg; /** \u0086 */public class A { public String toString() { return \"A\"; } }");
+ String jarName = "test.jar";
+ compiler.jar(outDir, jarName, "pkg/A.java");
+ return compiler.getPath(outDir).resolve(jarName).toString();
+ }
+
+ public void testBadSourceJarClasspath() {
+ String jarPath = makeBadSourceJar();
+ test(
+ (a) -> assertCommand(a, "/env --class-path " + jarPath,
+ "| Setting new options and restoring state."),
+ (a) -> assertCommandOutputStartsWith(a, "new pkg.A();",
+ "| Error:\n"
+ + "| cannot find symbol\n"
+ + "| symbol: class A")
+ );
+ test(new String[]{"--class-path", jarPath},
+ (a) -> assertCommandOutputStartsWith(a, "new pkg.A();",
+ "| Error:\n"
+ + "| cannot find symbol\n"
+ + "| symbol: class A")
+ );
+ }
+
public void testModulePath() {
Compiler compiler = new Compiler();
Path modsDir = Paths.get("mods");
--- a/test/langtools/tools/javac/var_implicit_lambda/VarInImplicitLambdaNegTest01.java Thu Mar 01 16:35:36 2018 -0500
+++ b/test/langtools/tools/javac/var_implicit_lambda/VarInImplicitLambdaNegTest01.java Fri Mar 02 21:00:12 2018 +0100
@@ -1,6 +1,6 @@
/*
* @test /nodynamiccopyright/
- * @bug 8198512
+ * @bug 8198512 8199327
* @summary compiler support for local-variable syntax for lambda parameters
* @compile/fail/ref=VarInImplicitLambdaNegTest01.out -XDrawDiagnostics VarInImplicitLambdaNegTest01.java
*/
@@ -14,5 +14,8 @@
IntBinaryOperator f4 = (int x, y) -> x + y; // error explicit and implicit
BiFunction<String[], String, String> f5 = (var s1[], var s2) -> s2; // error var and array
+
+ // correct use
+ IntBinaryOperator f6 = (var x, var y) -> x + y; // ok
BiFunction<Function<String, String>, String, String> f = (Function<String, String> s1, String s2) -> s2; // ok
}
--- a/test/langtools/tools/javadoc/6964914/TestStdDoclet.java Thu Mar 01 16:35:36 2018 -0500
+++ b/test/langtools/tools/javadoc/6964914/TestStdDoclet.java Fri Mar 02 21:00:12 2018 +0100
@@ -23,7 +23,7 @@
/*
* @test
- * @bug 6964914
+ * @bug 6964914 8182765
* @summary javadoc does not output number of warnings using user written doclet
*/
@@ -57,7 +57,6 @@
cmdArgs.add(javadoc.getPath());
cmdArgs.addAll(Arrays.asList(
"-classpath", ".", // insulates us from ambient classpath
- "-html4",
"-Xdoclint:none",
"-package",
new File(testSrc, thisClassName + ".java").getPath()
--- a/test/langtools/tools/jdeps/modules/DotFileTest.java Thu Mar 01 16:35:36 2018 -0500
+++ b/test/langtools/tools/jdeps/modules/DotFileTest.java Fri Mar 02 21:00:12 2018 +0100
@@ -64,7 +64,9 @@
"java.xml -> java.base" )
},
{ "java.sql", Set.of("java.logging -> java.base",
+ "java.transaction.xa -> java.base",
"java.sql -> java.logging",
+ "java.sql -> java.transaction.xa",
"java.sql -> java.xml",
"java.xml -> java.base" )
}
@@ -79,7 +81,9 @@
"java.xml -> java.base")
},
{ "java.sql", Set.of("java.logging -> java.base",
+ "java.transaction.xa -> java.base",
"java.sql -> java.logging",
+ "java.sql -> java.transaction.xa",
"java.sql -> java.xml",
"java.xml -> java.base" )
}