This commit is contained in:
Jesper Wilhelmsson 2018-01-05 22:02:20 +01:00
commit 0d68fdfec3
575 changed files with 3802 additions and 2262 deletions

View file

@ -462,3 +462,4 @@ bbd692ad4fa300ecca7939ffbe3b1d5e52a28cc6 jdk-10+33
d8c634b016c628622c9abbdc6bf50509e5dedbec jdk-10+35
0ee20aad71c4f33c426372b4c8bcc1235ce2ec08 jdk-11+0
959f2f7cbaa6d2ee45d50029744efb219721576c jdk-10+36
4f830b447edf04fb4a52151a5ad44d9bb60723cd jdk-10+37

View file

@ -210,7 +210,6 @@ ifneq ($(OPENJDK_TARGET_OS), windows)
jarsigner.1 \
javac.1 \
javadoc.1 \
javah.1 \
javap.1 \
jconsole.1 \
jcmd.1 \

View file

@ -110,7 +110,6 @@ OPENJDK_BUILD_CPU_ENDIAN := $(OPENJDK_TARGET_CPU_ENDIAN)
# Java executable definitions
JAVA_CMD := $(BOOT_JDK)/bin/java
JAVAC_CMD := $(BOOT_JDK)/bin/javac
JAVAH_CMD := $(BOOT_JDK)/bin/javah
JAR_CMD := $(BOOT_JDK)/bin/jar
JLINK_CMD := $(JDK_OUTPUTDIR)/bin/jlink
JMOD_CMD := $(JDK_OUTPUTDIR)/bin/jmod
@ -120,7 +119,6 @@ JAVA := $(FIXPATH) $(JAVA_CMD) $(JAVA_FLAGS_BIG) $(JAVA_FLAGS)
JAVA_SMALL := $(FIXPATH) $(JAVA_CMD) $(JAVA_FLAGS_SMALL) $(JAVA_FLAGS)
JAVA_JAVAC := $(FIXPATH) $(JAVA_CMD) $(JAVA_FLAGS_SMALL) $(JAVA_FLAGS)
JAVAC := $(FIXPATH) $(JAVAC_CMD)
JAVAH := $(FIXPATH) $(JAVAH_CMD)
JAR := $(FIXPATH) $(JAR_CMD)
JLINK := $(FIXPATH) $(JLINK_CMD)
JMOD := $(FIXPATH) $(JMOD_CMD)

View file

@ -295,7 +295,6 @@ AC_DEFUN_ONCE([BOOTJDK_SETUP_BOOT_JDK],
# Setup tools from the Boot JDK.
BOOTJDK_CHECK_TOOL_IN_BOOTJDK(JAVA, java)
BOOTJDK_CHECK_TOOL_IN_BOOTJDK(JAVAC, javac)
BOOTJDK_CHECK_TOOL_IN_BOOTJDK(JAVAH, javah)
BOOTJDK_CHECK_TOOL_IN_BOOTJDK(JAVADOC, javadoc)
BOOTJDK_CHECK_TOOL_IN_BOOTJDK(JAR, jar)
BOOTJDK_CHECK_TOOL_IN_BOOTJDK(JARSIGNER, jarsigner)

View file

@ -1,5 +1,5 @@
#
# Copyright (c) 2011, 2016, Oracle and/or its affiliates. All rights reserved.
# Copyright (c) 2011, 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
@ -52,7 +52,6 @@ SJAVAC_SERVER_DIR:=$(patsubst $(OLD_OUTPUTDIR)%, $(OUTPUTDIR)%, $(SJAVAC_SERVER_
JAVA_CMD:=$(BOOT_JDK)/bin/java
JAVAC_CMD:=$(BOOT_JDK)/bin/javac
JAVAH_CMD:=$(BOOT_JDK)/bin/javah
JAR_CMD:=$(BOOT_JDK)/bin/jar
JARSIGNER_CMD:=$(BOOT_JDK)/bin/jarsigner
SJAVAC_SERVER_JAVA_CMD:=$(JAVA_CMD)

View file

@ -881,7 +881,6 @@ BOOT_JDK_SOURCETARGET
JARSIGNER
JAR
JAVADOC
JAVAH
JAVAC
JAVA
BOOT_JDK
@ -903,10 +902,10 @@ VERSION_PATCH
VERSION_UPDATE
VERSION_INTERIM
VERSION_FEATURE
COMPANY_NAME
MACOSX_BUNDLE_ID_BASE
MACOSX_BUNDLE_NAME_BASE
HOTSPOT_VM_DISTRO
COMPANY_NAME
JDK_RC_PLATFORM_NAME
PRODUCT_SUFFIX
PRODUCT_NAME
@ -1150,6 +1149,7 @@ with_build_number
with_version_major
with_version_minor
with_version_security
with_vendor_name
with_version_string
with_version_pre
with_version_opt
@ -1302,7 +1302,6 @@ SETFILE
PKG_CONFIG
JAVA
JAVAC
JAVAH
JAVADOC
JAR
JARSIGNER
@ -2075,6 +2074,7 @@ Optional Packages:
compatibility and is ignored
--with-version-security Deprecated. Option is kept for backwards
compatibility and is ignored
--with-vendor-name Set vendor name [not specified]
--with-version-string Set version string [calculated]
--with-version-pre Set the base part of the version 'PRE' field
(pre-release identifier) ['internal']
@ -2261,7 +2261,6 @@ Some influential environment variables:
PKG_CONFIG path to pkg-config utility
JAVA Override default value for JAVA
JAVAC Override default value for JAVAC
JAVAH Override default value for JAVAH
JAVADOC Override default value for JAVADOC
JAR Override default value for JAR
JARSIGNER Override default value for JARSIGNER
@ -5177,7 +5176,7 @@ VS_SDK_PLATFORM_NAME_2013=
#CUSTOM_AUTOCONF_INCLUDE
# Do not change or remove the following line, it is needed for consistency checks:
DATE_WHEN_GENERATED=1513362567
DATE_WHEN_GENERATED=1513805283
###############################################################################
#
@ -25063,6 +25062,21 @@ fi
# The vendor name, if any
# Check whether --with-vendor-name was given.
if test "${with_vendor_name+set}" = set; then :
withval=$with_vendor_name;
fi
if test "x$with_vendor_name" = xyes; then
as_fn_error $? "--with-vendor-name must have a value" "$LINENO" 5
elif ! [[ $with_vendor_name =~ ^[[:print:]]*$ ]] ; then
as_fn_error $? "--with--vendor-name contains non-printing characters: $with_vendor_name" "$LINENO" 5
else
COMPANY_NAME="$with_vendor_name"
fi
# Override version from arguments
@ -30918,144 +30932,6 @@ $as_echo "$tool_specified" >&6; }
# Use user overridden value if available, otherwise locate tool in the Boot JDK.
# Publish this variable in the help.
if [ -z "${JAVAH+x}" ]; then
# The variable is not set by user, try to locate tool using the code snippet
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for javah in Boot JDK" >&5
$as_echo_n "checking for javah in Boot JDK... " >&6; }
JAVAH=$BOOT_JDK/bin/javah
if test ! -x $JAVAH; then
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
$as_echo "not found" >&6; }
{ $as_echo "$as_me:${as_lineno-$LINENO}: Your Boot JDK seems broken. This might be fixed by explicitly setting --with-boot-jdk" >&5
$as_echo "$as_me: Your Boot JDK seems broken. This might be fixed by explicitly setting --with-boot-jdk" >&6;}
as_fn_error $? "Could not find javah in the Boot JDK" "$LINENO" 5
fi
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
$as_echo "ok" >&6; }
else
# The variable is set, but is it from the command line or the environment?
# Try to remove the string !JAVAH! from our list.
try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!JAVAH!/}
if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
# If it failed, the variable was not from the command line. Ignore it,
# but warn the user (except for BASH, which is always set by the calling BASH).
if test "xJAVAH" != xBASH; then
{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of JAVAH from the environment. Use command line variables instead." >&5
$as_echo "$as_me: WARNING: Ignoring value of JAVAH from the environment. Use command line variables instead." >&2;}
fi
# Try to locate tool using the code snippet
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for javah in Boot JDK" >&5
$as_echo_n "checking for javah in Boot JDK... " >&6; }
JAVAH=$BOOT_JDK/bin/javah
if test ! -x $JAVAH; then
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
$as_echo "not found" >&6; }
{ $as_echo "$as_me:${as_lineno-$LINENO}: Your Boot JDK seems broken. This might be fixed by explicitly setting --with-boot-jdk" >&5
$as_echo "$as_me: Your Boot JDK seems broken. This might be fixed by explicitly setting --with-boot-jdk" >&6;}
as_fn_error $? "Could not find javah in the Boot JDK" "$LINENO" 5
fi
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
$as_echo "ok" >&6; }
else
# If it succeeded, then it was overridden by the user. We will use it
# for the tool.
# First remove it from the list of overridden variables, so we can test
# for unknown variables in the end.
CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
# Check if we try to supply an empty value
if test "x$JAVAH" = x; then
{ $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool JAVAH= (no value)" >&5
$as_echo "$as_me: Setting user supplied tool JAVAH= (no value)" >&6;}
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for JAVAH" >&5
$as_echo_n "checking for JAVAH... " >&6; }
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
$as_echo "disabled" >&6; }
else
# Check if the provided tool contains a complete path.
tool_specified="$JAVAH"
tool_basename="${tool_specified##*/}"
if test "x$tool_basename" = "x$tool_specified"; then
# A command without a complete path is provided, search $PATH.
{ $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool JAVAH=$tool_basename" >&5
$as_echo "$as_me: Will search for user supplied tool JAVAH=$tool_basename" >&6;}
# Extract the first word of "$tool_basename", so it can be a program name with args.
set dummy $tool_basename; ac_word=$2
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
$as_echo_n "checking for $ac_word... " >&6; }
if ${ac_cv_path_JAVAH+:} false; then :
$as_echo_n "(cached) " >&6
else
case $JAVAH in
[\\/]* | ?:[\\/]*)
ac_cv_path_JAVAH="$JAVAH" # Let the user override the test with a path.
;;
*)
as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
for as_dir in $PATH
do
IFS=$as_save_IFS
test -z "$as_dir" && as_dir=.
for ac_exec_ext in '' $ac_executable_extensions; do
if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
ac_cv_path_JAVAH="$as_dir/$ac_word$ac_exec_ext"
$as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
break 2
fi
done
done
IFS=$as_save_IFS
;;
esac
fi
JAVAH=$ac_cv_path_JAVAH
if test -n "$JAVAH"; then
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $JAVAH" >&5
$as_echo "$JAVAH" >&6; }
else
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
$as_echo "no" >&6; }
fi
if test "x$JAVAH" = x; then
as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
fi
else
# Otherwise we believe it is a complete path. Use it as it is.
{ $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool JAVAH=$tool_specified" >&5
$as_echo "$as_me: Will use user supplied tool JAVAH=$tool_specified" >&6;}
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for JAVAH" >&5
$as_echo_n "checking for JAVAH... " >&6; }
if test ! -x "$tool_specified"; then
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
$as_echo "not found" >&6; }
as_fn_error $? "User supplied tool JAVAH=$tool_specified does not exist or is not executable" "$LINENO" 5
fi
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
$as_echo "$tool_specified" >&6; }
fi
fi
fi
fi
# Use user overridden value if available, otherwise locate tool in the Boot JDK.
# Publish this variable in the help.

View file

@ -74,11 +74,22 @@ AC_DEFUN_ONCE([JDKVER_SETUP_JDK_VERSION_NUMBERS],
AC_SUBST(PRODUCT_NAME)
AC_SUBST(PRODUCT_SUFFIX)
AC_SUBST(JDK_RC_PLATFORM_NAME)
AC_SUBST(COMPANY_NAME)
AC_SUBST(HOTSPOT_VM_DISTRO)
AC_SUBST(MACOSX_BUNDLE_NAME_BASE)
AC_SUBST(MACOSX_BUNDLE_ID_BASE)
# The vendor name, if any
AC_ARG_WITH(vendor-name, [AS_HELP_STRING([--with-vendor-name],
[Set vendor name @<:@not specified@:>@])])
if test "x$with_vendor_name" = xyes; then
AC_MSG_ERROR([--with-vendor-name must have a value])
elif [ ! [[ $with_vendor_name =~ ^[[:print:]]*$ ]] ]; then
AC_MSG_ERROR([--with--vendor-name contains non-printing characters: $with_vendor_name])
else
COMPANY_NAME="$with_vendor_name"
fi
AC_SUBST(COMPANY_NAME)
# Override version from arguments
# If --with-version-string is set, process it first. It is possible to

View file

@ -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
@ -549,7 +549,6 @@ SJAVAC_SERVER_JAVA_FLAGS:=@SJAVAC_SERVER_JAVA_FLAGS@
# versions of the variables directly.
JAVA_CMD:=@JAVA@
JAVAC_CMD:=@JAVAC@
JAVAH_CMD:=@JAVAH@
JAVADOC_CMD:=@JAVADOC@
JAR_CMD:=@JAR@
JLINK_CMD := @JLINK@
@ -562,7 +561,6 @@ JAVA=@FIXPATH@ $(JAVA_CMD) $(JAVA_FLAGS_BIG) $(JAVA_FLAGS)
JAVA_SMALL=@FIXPATH@ $(JAVA_CMD) $(JAVA_FLAGS_SMALL) $(JAVA_FLAGS)
JAVA_JAVAC=@FIXPATH@ $(JAVA_CMD) $(JAVA_FLAGS_JAVAC) $(JAVA_FLAGS)
JAVAC=@FIXPATH@ $(JAVAC_CMD)
JAVAH=@FIXPATH@ $(JAVAH_CMD)
JAVADOC=@FIXPATH@ $(JAVADOC_CMD)
JAR=@FIXPATH@ $(JAR_CMD)
JLINK = @FIXPATH@ $(JLINK_CMD) $(JAVA_TOOL_FLAGS_SMALL)
@ -587,6 +585,8 @@ INTERIM_LANGTOOLS_BASE_MODULES := java.compiler jdk.compiler jdk.javadoc
INTERIM_LANGTOOLS_MODULES := $(addsuffix .interim, $(INTERIM_LANGTOOLS_BASE_MODULES))
INTERIM_LANGTOOLS_ADD_EXPORTS := \
--add-exports java.base/sun.reflect.annotation=jdk.compiler.interim \
--add-exports java.base/jdk.internal.jmod=jdk.compiler.interim \
--add-exports java.base/jdk.internal.misc=jdk.compiler.interim \
#
INTERIM_LANGTOOLS_MODULES_COMMA := $(strip $(subst $(SPACE),$(COMMA),$(strip \
$(INTERIM_LANGTOOLS_MODULES))))
@ -726,7 +726,7 @@ INSTALL_PREFIX=@prefix@
# Directories containing architecture-dependent files should be relative to exec_prefix
INSTALL_EXECPREFIX=@exec_prefix@
# java,javac,javah,javap etc are installed here.
# java,javac,javap etc are installed here.
INSTALL_BINDIR=@bindir@
# Read only architecture-independent data

View file

@ -1,5 +1,5 @@
#
# Copyright (c) 2011, 2016, Oracle and/or its affiliates. All rights reserved.
# Copyright (c) 2011, 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
@ -46,7 +46,7 @@ include ZipArchive.gmk
# passed to SetupJavaCompilation. This name is used as variable prefix.
#
# Remaining parameters are named arguments. These include:
# JVM:=The jvm used to run the javac/javah command
# JVM:=The jvm used to run the javac command
# JAVAC:=The javac jar and bootstrap classpath changes, or just bin/javac if JVM is left out
# FLAGS:=Flags to be supplied to javac
# SERVER_DIR:=Use a javac server (-XDserver) and store the server related files here

View file

@ -829,7 +829,7 @@ var getJibProfilesDependencies = function (input, common) {
jtreg: {
server: "javare",
revision: "4.2",
build_number: "b10",
build_number: "b11",
checksum_file: "MD5_VALUES",
file: "jtreg_bin-4.2.zip",
environment_name: "JT_HOME",

View file

@ -1,5 +1,5 @@
#
# Copyright (c) 2014, Oracle and/or its affiliates. All rights reserved.
# Copyright (c) 2014, 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
@ -28,11 +28,8 @@ include GensrcCommonLangtools.gmk
$(eval $(call SetupVersionProperties,JAVAC_VERSION, \
com/sun/tools/javac/resources/version.properties))
$(eval $(call SetupVersionProperties,JAVAH_VERSION, \
com/sun/tools/javah/resources/version.properties))
$(eval $(call SetupCompileProperties,COMPILE_PROPERTIES, \
$(JAVAC_VERSION) $(JAVAH_VERSION)))
$(JAVAC_VERSION)))
$(eval $(call SetupParseProperties,PARSE_PROPERTIES, \
com/sun/tools/javac/resources/compiler.properties))

View file

@ -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

View file

@ -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

View file

@ -1,5 +1,5 @@
#
# Copyright (c) 2007, 2016, Oracle and/or its affiliates. All rights reserved.
# Copyright (c) 2007, 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
@ -60,7 +60,6 @@ full.version = ${release}+${build.number}
tool.javac.main.class=com.sun.tools.javac.Main
tool.javadoc.main.class=jdk.javadoc.internal.tool.Main
tool.javap.main.class=com.sun.tools.javap.Main
tool.javah.main.class=com.sun.tools.javah.Main
tool.sjavac.main.class=com.sun.tools.sjavac.Main
tool.jshell.main.class=jdk.internal.jshell.tool.JShellToolProvider

View file

@ -1,6 +1,6 @@
<?xml version="1.0" encoding="UTF-8"?>
<!--
~ Copyright (c) 2007, 2016, Oracle and/or its affiliates. All rights reserved.
~ Copyright (c) 2007, 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
@ -41,7 +41,7 @@
The output of the build is as follows:
build
|-bin (scripts to invoke various tools, javac, javah etc.)
|-bin (scripts to invoke various tools, javac etc.)
|-genrsc (generated sources - i.e. properties)
|-modules (compiled classes in a modular layout)
|-jtreg (test work/results)
@ -254,7 +254,6 @@
<build-tool name="javac"/>
<build-tool name="javadoc"/>
<build-tool name="javap"/>
<build-tool name="javah"/>
<build-tool name="jdeps"/>
<build-tool name="sjavac"/>
<build-tool name="jshell"/>

View file

@ -1,22 +0,0 @@
<component name="ProjectRunConfigurationManager">
<configuration default="false" name="javah" type="Application" factoryName="Application">
<extension name="coverage" enabled="false" merge="false" sample_coverage="true" runner="idea" />
<option name="MAIN_CLASS_NAME" value="com.sun.tools.javah.Main" />
<option name="VM_PARAMETERS" value='@XPATCH@ --add-exports=jdk.compiler/com.sun.tools.javah=ALL-UNNAMED' />
<option name="PROGRAM_PARAMETERS" value="" />
<option name="WORKING_DIRECTORY" value="file://$PROJECT_DIR$" />
<option name="ALTERNATIVE_JRE_PATH_ENABLED" value="true" />
<option name="ALTERNATIVE_JRE_PATH" value="@IDEA_TARGET_JDK@" />
<option name="ENABLE_SWING_INSPECTOR" value="false" />
<option name="ENV_VARIABLES" />
<option name="PASS_PARENT_ENVS" value="true" />
<module name="langtools" />
<envs />
<RunnerSettings RunnerId="Run" />
<ConfigurationWrapper RunnerId="Run" />
<method>
<option name="Make" enabled="false" />
<option name="AntTarget" enabled="true" antfile="file://$PROJECT_DIR$/.idea/build.xml" target="build-all-classes" />
</method>
</configuration>
</component>

View file

@ -7,7 +7,7 @@ edit, run, test and debug the tools in the OpenJDK langtools
repository.
The repository contains a number of tools:
javac, javadoc and its doclets, javah and javap.
javac, javadoc and its doclets, and javap.
Build Properties.

View file

@ -11,9 +11,4 @@ public class HelloWorld {
* @param args The parameters are ignored.
*/
public static void main(java.lang.String... args);
/**
* This declaration is for the benefit of javah tests.
*/
public native void test();
}

View file

@ -1,5 +1,5 @@
/*
* Copyright (c) 2007, Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 2007, 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
@ -37,9 +37,4 @@ public class HelloWorld
public static void main(String... args) {
System.out.println("Hello World!");
}
/**
* This declaration is for the benefit of javah tests.
*/
public native void test();
}

View file

@ -1,40 +0,0 @@
#!/bin/sh
#
# Copyright (c) 2002, 2007, Oracle and/or its affiliates. All rights reserved.
# 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 Verify the basic execution of the bootstrap javah tool.
TESTSRC=${TESTSRC:-.}
TOPDIR=${TESTSRC}/../../..
${TOPDIR}/dist/bootstrap/bin/javac -d . "${TESTSRC}"/../HelloWorld.java
${TOPDIR}/dist/bootstrap/bin/javah -classpath . -d . HelloWorld
if diff ${TESTSRC}/../HelloWorld.gold.h HelloWorld.h ; then
echo "Test passed."
else
echo "Test failed."
exit 1
fi

View file

@ -1,9 +1,7 @@
./bootstrap/bin/javac
./bootstrap/bin/javadoc
./bootstrap/bin/javah
./bootstrap/lib/doclets.jar
./bootstrap/lib/javac.jar
./bootstrap/lib/javadoc.jar
./bootstrap/lib/javah.jar
./lib/classes.jar
./lib/src.zip

View file

@ -1,9 +1,4 @@
META-INF/MANIFEST.MF
com/sun/tools/apt/Main.class
com/sun/tools/apt/main/Main.class
com/sun/tools/apt/resources/apt.class
com/sun/tools/apt/resources/apt_ja.class
com/sun/tools/apt/resources/apt_zh_CN.class
com/sun/tools/doclets/formats/html/resources/standard.class
com/sun/tools/doclets/formats/html/resources/standard_ja.class
com/sun/tools/doclets/formats/html/resources/standard_zh_CN.class
@ -26,13 +21,3 @@ com/sun/tools/javadoc/Main.class
com/sun/tools/javadoc/resources/javadoc.class
com/sun/tools/javadoc/resources/javadoc_ja.class
com/sun/tools/javadoc/resources/javadoc_zh_CN.class
com/sun/tools/javah/Main.class
com/sun/tools/javah/resources/Linux_ppc.class
com/sun/tools/javah/resources/Linux_sparc.class
com/sun/tools/javah/resources/SunOS_sparc.class
com/sun/tools/javah/resources/SunOS_sparcv9.class
com/sun/tools/javah/resources/l10n.class
com/sun/tools/javah/resources/l10n_ja.class
com/sun/tools/javah/resources/l10n_zh_CN.class
com/sun/tools/javah/resources/win32_x86.class
sun/tools/javap/Main.class

View file

@ -1,46 +0,0 @@
#!/bin/sh
#
# Copyright (c) 2002, 2007, Oracle and/or its affiliates. All rights reserved.
# 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 Verify the basic execution of the javah classes in classes.jar.
TESTSRC=${TESTSRC:-.}
TOPDIR=${TESTSRC}/../../..
TESTJAVAEXE="${TESTJAVA:+${TESTJAVA}/bin/}java"
"${TESTJAVAEXE}" -Xbootclasspath/p:${TOPDIR}/dist/lib/classes.jar \
com.sun.tools.javac.Main \
-d . "${TESTSRC}"/../HelloWorld.java
"${TESTJAVAEXE}" -Xbootclasspath/p:${TOPDIR}/dist/lib/classes.jar \
com.sun.tools.javah.Main \
-classpath . -d . HelloWorld
if diff ${TESTSRC}/../HelloWorld.gold.h HelloWorld.h ; then
echo "Test passed."
else
echo "Test failed."
exit 1
fi

View file

@ -29,15 +29,5 @@ com/sun/tools/javadoc/Main.java
com/sun/tools/javadoc/resources/javadoc.properties
com/sun/tools/javadoc/resources/javadoc_ja.properties
com/sun/tools/javadoc/resources/javadoc_zh_CN.properties
com/sun/tools/javah/Main.java
com/sun/tools/javah/resources/Linux_ppc.properties
com/sun/tools/javah/resources/Linux_sparc.properties
com/sun/tools/javah/resources/SunOS_sparc.properties
com/sun/tools/javah/resources/SunOS_sparcv9.properties
com/sun/tools/javah/resources/l10n.properties
com/sun/tools/javah/resources/l10n_ja.properties
com/sun/tools/javah/resources/l10n_zh_CN.properties
com/sun/tools/javah/resources/win32_x86.properties
javax/lang/model/overview.html
javax/tools/overview.html
sun/tools/javap/Main.java

View file

@ -1,5 +1,5 @@
/*
* Copyright (c) 2008, 2016, Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 2008, 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
@ -76,7 +76,6 @@ public class SelectToolTask extends Task {
NONE(""),
JAVAC("javac"),
JAVADOC("javadoc"),
JAVAH("javah"),
JAVAP("javap"),
JSHELL("jshell");

View file

@ -6670,18 +6670,6 @@
<in>examples.not-yet.txt</in>
</df>
</df>
<df name="javah">
<df name="6572945">
<df name="gold">
<df name="jni.dir.1">
<in>TestClass1.h</in>
<in>TestClass1_Inner1.h</in>
<in>TestClass1_Inner2.h</in>
<in>TestClass2.h</in>
</df>
</df>
</df>
</df>
<df name="jdeprscan">
<df name="tests">
<df name="jdk">
@ -40851,26 +40839,6 @@
tool="3"
flavor2="0">
</item>
<item path="../../test/langtools/tools/javah/6572945/gold/jni.dir.1/TestClass1.h"
ex="false"
tool="3"
flavor2="0">
</item>
<item path="../../test/langtools/tools/javah/6572945/gold/jni.dir.1/TestClass1_Inner1.h"
ex="false"
tool="3"
flavor2="0">
</item>
<item path="../../test/langtools/tools/javah/6572945/gold/jni.dir.1/TestClass1_Inner2.h"
ex="false"
tool="3"
flavor2="0">
</item>
<item path="../../test/langtools/tools/javah/6572945/gold/jni.dir.1/TestClass2.h"
ex="false"
tool="3"
flavor2="0">
</item>
<item path="../../test/langtools/tools/jdeprscan/tests/jdk/jdeprscan/TestScanExpected.txt"
ex="false"
tool="3"

View file

@ -1,6 +1,6 @@
#!/bin/bash
#
# Copyright (c) 2012, 2016, Oracle and/or its affiliates. All rights reserved.
# Copyright (c) 2012, 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
@ -63,7 +63,6 @@ if [ "$OPENJDK_TARGET_OS" = "linux" ]; then
./bin/java
./bin/javac
./bin/javadoc
./bin/javah
./bin/javap
./bin/jdeps
./bin/jcmd
@ -197,7 +196,6 @@ if [ "$OPENJDK_TARGET_OS" = "solaris" ] && [ "$OPENJDK_TARGET_CPU" = "x86_64" ];
./bin/java
./bin/javac
./bin/javadoc
./bin/javah
./bin/javap
./bin/jdeps
./bin/jcmd
@ -306,7 +304,6 @@ if [ "$OPENJDK_TARGET_OS" = "solaris" ] && [ "$OPENJDK_TARGET_CPU" = "sparcv9" ]
./bin/java
./bin/javac
./bin/javadoc
./bin/javah
./bin/javap
./bin/jdeps
./bin/jcmd
@ -394,7 +391,6 @@ if [ "$OPENJDK_TARGET_OS" = "windows" ]; then
./bin/java.exe
./bin/javac.exe
./bin/javadoc.exe
./bin/javah.exe
./bin/javap.exe
./bin/jdeps.exe
./bin/javaw.exe
@ -486,7 +482,6 @@ if [ "$OPENJDK_TARGET_OS" = "macosx" ]; then
./bin/java
./bin/javac
./bin/javadoc
./bin/javah
./bin/javap
./bin/javaws
./bin/jdeps

View file

@ -3722,7 +3722,6 @@ void TemplateTable::_new() {
Label slow_case;
Label done;
Label initialize_header;
Label initialize_object; // Including clearing the fields.
Label allocate_shared;
BLOCK_COMMENT("TemplateTable::_new {");
@ -3760,51 +3759,26 @@ void TemplateTable::_new() {
// Allocate the instance
// 1) Try to allocate in the TLAB.
// 2) If fail and the object is large allocate in the shared Eden.
// 3) If the above fails (or is not applicable), go to a slow case
// 2) If the above fails (or is not applicable), go to a slow case
// (creates a new TLAB, etc.).
// Always go the slow path. See comment above this template.
const bool allow_shared_alloc = false;
// Note: compared to other architectures, s390's implementation always goes
// to the slow path if TLAB is used and fails.
if (UseTLAB) {
Register RoldTopValue = RallocatedObject;
Register RnewTopValue = tmp;
__ z_lg(RoldTopValue, Address(Z_thread, JavaThread::tlab_top_offset()));
__ load_address(RnewTopValue, Address(RoldTopValue, Rsize));
__ z_cg(RnewTopValue, Address(Z_thread, JavaThread::tlab_end_offset()));
__ z_brh(allow_shared_alloc ? allocate_shared : slow_case);
__ z_brh(slow_case);
__ z_stg(RnewTopValue, Address(Z_thread, JavaThread::tlab_top_offset()));
if (ZeroTLAB) {
// The fields have been already cleared.
__ z_bru(initialize_header);
} else {
// Initialize both the header and fields.
if (allow_shared_alloc) {
__ z_bru(initialize_object);
} else {
// Fallthrough to initialize_object, but assert that it is on fall through path.
prev_instr_address = __ pc();
}
}
}
if (allow_shared_alloc) {
// Allocation in shared Eden not implemented, because sapjvm allocation trace does not allow it.
Unimplemented();
}
if (UseTLAB) {
Register RobjectFields = tmp;
Register Rzero = Z_R1_scratch;
assert(ZeroTLAB || prev_instr_address == __ pc(),
"must not omit jump to initialize_object above, as it is not on the fall through path");
__ clear_reg(Rzero, true /*whole reg*/, false); // Load 0L into Rzero. Don't set CC.
if (!ZeroTLAB) {
// The object is initialized before the header. If the object size is
// zero, go directly to the header initialization.
__ bind(initialize_object);
__ z_aghi(Rsize, (int)-sizeof(oopDesc)); // Subtract header size, set CC.
__ z_bre(initialize_header); // Jump if size of fields is zero.
@ -3819,6 +3793,7 @@ void TemplateTable::_new() {
// and fill the object with the padding value 0.
__ add2reg(RobjectFields, sizeof(oopDesc), RallocatedObject);
__ move_long_ext(RobjectFields, as_Register(Rzero->encoding() - 1), 0);
}
// Initialize object header only.
__ bind(initialize_header);

View file

@ -547,8 +547,12 @@ source %{
#define __ _masm.
static bool generate_vzeroupper(Compile* C) {
return (VM_Version::supports_vzeroupper() && (C->max_vector_size() > 16 || C->clear_upper_avx() == true)) ? true: false; // Generate vzeroupper
}
static int clear_avx_size() {
return (VM_Version::supports_vzeroupper()) ? 3: 0; // vzeroupper
return generate_vzeroupper(Compile::current()) ? 3: 0; // vzeroupper
}
// !!!!! Special hack to get all types of calls to specify the byte offset
@ -931,7 +935,7 @@ int MachPrologNode::reloc() const
void MachEpilogNode::format(PhaseRegAlloc* ra_, outputStream* st) const
{
Compile* C = ra_->C;
if (VM_Version::supports_vzeroupper()) {
if (generate_vzeroupper(C)) {
st->print("vzeroupper");
st->cr(); st->print("\t");
}
@ -971,9 +975,11 @@ void MachEpilogNode::emit(CodeBuffer& cbuf, PhaseRegAlloc* ra_) const
Compile* C = ra_->C;
MacroAssembler _masm(&cbuf);
if (generate_vzeroupper(C)) {
// Clear upper bits of YMM registers when current compiled code uses
// wide vectors to avoid AVX <-> SSE transition penalty during call.
__ vzeroupper();
}
int framesize = C->frame_size_in_bytes();
assert((framesize & (StackAlignmentInBytes-1)) == 0, "frame size not aligned");
@ -2112,11 +2118,13 @@ encode %{
enc_class clear_avx %{
debug_only(int off0 = cbuf.insts_size());
if (generate_vzeroupper(Compile::current())) {
// Clear upper bits of YMM registers to avoid AVX <-> SSE transition penalty
// Clear upper bits of YMM registers when current compiled code uses
// wide vectors to avoid AVX <-> SSE transition penalty during call.
MacroAssembler _masm(&cbuf);
__ vzeroupper();
}
debug_only(int off1 = cbuf.insts_size());
assert(off1 - off0 == clear_avx_size(), "correct size prediction");
%}

View file

@ -234,7 +234,9 @@ void ciField::initialize_from(fieldDescriptor* fd) {
// Get the flags, offset, and canonical holder of the field.
_flags = ciFlags(fd->access_flags());
_offset = fd->offset();
_holder = CURRENT_ENV->get_instance_klass(fd->field_holder());
Klass* field_holder = fd->field_holder();
assert(field_holder != NULL, "null field_holder");
_holder = CURRENT_ENV->get_instance_klass(field_holder);
// Check to see if the field is constant.
Klass* k = _holder->get_Klass();

View file

@ -831,9 +831,10 @@ void ClassLoaderData::free_deallocate_list() {
}
// This is distinct from free_deallocate_list. For class loader data that are
// unloading, this frees the C heap memory for constant pools on the list. If there
// were C heap memory allocated for methods, it would free that too. The C heap memory
// for InstanceKlasses on this list is freed in the ClassLoaderData destructor.
// unloading, this frees the C heap memory for items on the list, and unlinks
// scratch or error classes so that unloading events aren't triggered for these
// classes. The metadata is removed with the unloading metaspace.
// There isn't C heap memory allocated for methods, so nothing is done for them.
void ClassLoaderData::unload_deallocate_list() {
// Don't need lock, at safepoint
assert(SafepointSynchronize::is_at_safepoint(), "only called at safepoint");
@ -846,9 +847,15 @@ void ClassLoaderData::unload_deallocate_list() {
Metadata* m = _deallocate_list->at(i);
assert (!m->on_stack(), "wouldn't be unloading if this were so");
_deallocate_list->remove_at(i);
// Only constant pool entries have C heap memory to free.
if (m->is_constantPool()) {
((ConstantPool*)m)->release_C_heap_structures();
} else if (m->is_klass()) {
InstanceKlass* ik = (InstanceKlass*)m;
// also releases ik->constants() C heap memory
InstanceKlass::release_C_heap_structures(ik);
// Remove the class so unloading events aren't triggered for
// this class (scratch or error class) in do_unloading().
remove_class(ik);
}
}
}

View file

@ -1094,6 +1094,7 @@ void Compile::Init(int aliaslevel) {
_major_progress = true; // start out assuming good things will happen
set_has_unsafe_access(false);
set_max_vector_size(0);
set_clear_upper_avx(false); //false as default for clear upper bits of ymm registers
Copy::zero_to_bytes(_trap_hist, sizeof(_trap_hist));
set_decompile_count(0);

View file

@ -378,7 +378,8 @@ class Compile : public Phase {
bool _has_stringbuilder; // True StringBuffers or StringBuilders are allocated
bool _has_boxed_value; // True if a boxed object is allocated
bool _has_reserved_stack_access; // True if the method or an inlined method is annotated with ReservedStackAccess
int _max_vector_size; // Maximum size of generated vectors
uint _max_vector_size; // Maximum size of generated vectors
bool _clear_upper_avx; // Clear upper bits of ymm registers using vzeroupper
uint _trap_hist[trapHistLength]; // Cumulative traps
bool _trap_can_recompile; // Have we emitted a recompiling trap?
uint _decompile_count; // Cumulative decompilation counts.
@ -656,8 +657,10 @@ class Compile : public Phase {
void set_has_boxed_value(bool z) { _has_boxed_value = z; }
bool has_reserved_stack_access() const { return _has_reserved_stack_access; }
void set_has_reserved_stack_access(bool z) { _has_reserved_stack_access = z; }
int max_vector_size() const { return _max_vector_size; }
void set_max_vector_size(int s) { _max_vector_size = s; }
uint max_vector_size() const { return _max_vector_size; }
void set_max_vector_size(uint s) { _max_vector_size = s; }
bool clear_upper_avx() const { return _clear_upper_avx; }
void set_clear_upper_avx(bool s) { _clear_upper_avx = s; }
void set_trap_count(uint r, uint c) { assert(r < trapHistLength, "oob"); _trap_hist[r] = c; }
uint trap_count(uint r) const { assert(r < trapHistLength, "oob"); return _trap_hist[r]; }
bool trap_can_recompile() const { return _trap_can_recompile; }

View file

@ -328,6 +328,13 @@ class LibraryCallKit : public GraphKit {
bool inline_profileBoolean();
bool inline_isCompileConstant();
void clear_upper_avx() {
#ifdef X86
if (UseAVX >= 2) {
C->set_clear_upper_avx(true);
}
#endif
}
};
//---------------------------make_vm_intrinsic----------------------------
@ -1082,6 +1089,7 @@ Node* LibraryCallKit::make_string_method_node(int opcode, Node* str1_start, Node
// All these intrinsics have checks.
C->set_has_split_ifs(true); // Has chance for split-if optimization
clear_upper_avx();
return _gvn.transform(result);
}
@ -1156,6 +1164,8 @@ bool LibraryCallKit::inline_array_equals(StrIntrinsicNode::ArgEnc ae) {
const TypeAryPtr* mtype = (ae == StrIntrinsicNode::UU) ? TypeAryPtr::CHARS : TypeAryPtr::BYTES;
set_result(_gvn.transform(new AryEqNode(control(), memory(mtype), arg1, arg2, ae)));
clear_upper_avx();
return true;
}
@ -1227,6 +1237,7 @@ bool LibraryCallKit::inline_preconditions_checkIndex() {
result = _gvn.transform(result);
set_result(result);
replace_in_map(index, result);
clear_upper_avx();
return true;
}
@ -1325,6 +1336,7 @@ bool LibraryCallKit::inline_string_indexOfI(StrIntrinsicNode::ArgEnc ae) {
set_control(_gvn.transform(region));
record_for_igvn(region);
set_result(_gvn.transform(phi));
clear_upper_avx();
return true;
}
@ -1488,6 +1500,8 @@ bool LibraryCallKit::inline_string_copy(bool compress) {
if (compress) {
set_result(_gvn.transform(count));
}
clear_upper_avx();
return true;
}
@ -1585,6 +1599,8 @@ bool LibraryCallKit::inline_string_toBytesU() {
if (!stopped()) {
set_result(newcopy);
}
clear_upper_avx();
return true;
}
@ -5295,6 +5311,8 @@ bool LibraryCallKit::inline_arraycopy() {
assert(validated, "shouldn't transform if all arguments not validated");
set_all_memory(n);
}
clear_upper_avx();
return true;
}
@ -5415,6 +5433,8 @@ bool LibraryCallKit::inline_encodeISOArray() {
Node* res_mem = _gvn.transform(new SCMemProjNode(enc));
set_memory(res_mem, mtype);
set_result(enc);
clear_upper_avx();
return true;
}

View file

@ -2442,7 +2442,9 @@ void SuperWord::output() {
}
}//for (int i = 0; i < _block.length(); i++)
if (max_vlen_in_bytes > C->max_vector_size()) {
C->set_max_vector_size(max_vlen_in_bytes);
}
if (max_vlen_in_bytes > 0) {
cl->mark_loop_vectorized();
}

View file

@ -470,8 +470,12 @@ void NonTieredCompPolicy::trace_frequency_counter_overflow(const methodHandle& m
if (bci != InvocationEntryBci) {
MethodData* mdo = m->method_data();
if (mdo != NULL) {
int count = mdo->bci_to_data(branch_bci)->as_JumpData()->taken();
tty->print_cr("back branch count = %d", count);
ProfileData *pd = mdo->bci_to_data(branch_bci);
if (pd == NULL) {
tty->print_cr("back branch count = N/A (missing ProfileData)");
} else {
tty->print_cr("back branch count = %d", pd->as_JumpData()->taken());
}
}
}
}

View file

@ -2946,8 +2946,9 @@ void JavaThread::metadata_do(void f(Metadata*)) {
if (ct->env() != NULL) {
ct->env()->metadata_do(f);
}
if (ct->task() != NULL) {
ct->task()->metadata_do(f);
CompileTask* task = ct->task();
if (task != NULL) {
task->metadata_do(f);
}
}
}
@ -3001,10 +3002,10 @@ void JavaThread::print_on(outputStream *st) const {
_safepoint_state->print_on(st);
#endif // PRODUCT
if (is_Compiler_thread()) {
CompilerThread* ct = (CompilerThread*)this;
if (ct->task() != NULL) {
CompileTask *task = ((CompilerThread*)this)->task();
if (task != NULL) {
st->print(" Compiling: ");
ct->task()->print(st, NULL, true, false);
task->print(st, NULL, true, false);
} else {
st->print(" No compile task");
}
@ -4719,9 +4720,15 @@ void Threads::print_threads_compiling(outputStream* st, char* buf, int buflen) {
ALL_JAVA_THREADS(thread) {
if (thread->is_Compiler_thread()) {
CompilerThread* ct = (CompilerThread*) thread;
if (ct->task() != NULL) {
// Keep task in local variable for NULL check.
// ct->_task might be set to NULL by concurring compiler thread
// because it completed the compilation. The task is never freed,
// though, just returned to a free list.
CompileTask* task = ct->task();
if (task != NULL) {
thread->print_name_on_error(st, buf, buflen);
ct->task()->print(st, NULL, true, true);
task->print(st, NULL, true, true);
}
}
}

View file

@ -2066,7 +2066,7 @@ class CompilerThread : public JavaThread {
ciEnv* _env;
CompileLog* _log;
CompileTask* _task;
CompileTask* volatile _task; // print_threads_compiling can read this concurrently.
CompileQueue* _queue;
BufferBlob* _buffer_blob;

View file

@ -25,7 +25,9 @@
package java.io;
import java.util.ArrayList;
import java.util.Arrays;
import java.util.List;
import java.util.Objects;
/**
@ -229,30 +231,55 @@ public abstract class InputStream implements Closeable {
* @since 9
*/
public byte[] readAllBytes() throws IOException {
byte[] buf = new byte[DEFAULT_BUFFER_SIZE];
int capacity = buf.length;
int nread = 0;
List<byte[]> bufs = null;
byte[] result = null;
int total = 0;
int n;
for (;;) {
// read to EOF which may read more or less than initial buffer size
while ((n = read(buf, nread, capacity - nread)) > 0)
do {
byte[] buf = new byte[DEFAULT_BUFFER_SIZE];
int nread = 0;
// read to EOF which may read more or less than buffer size
while ((n = read(buf, nread, buf.length - nread)) > 0) {
nread += n;
}
// if the last call to read returned -1, then we're done
if (n < 0)
break;
// need to allocate a larger buffer
if (capacity <= MAX_BUFFER_SIZE - capacity) {
capacity = capacity << 1;
} else {
if (capacity == MAX_BUFFER_SIZE)
if (nread > 0) {
if (MAX_BUFFER_SIZE - total < nread) {
throw new OutOfMemoryError("Required array size too large");
capacity = MAX_BUFFER_SIZE;
}
buf = Arrays.copyOf(buf, capacity);
total += nread;
if (result == null) {
result = buf;
} else {
if (bufs == null) {
bufs = new ArrayList<>();
bufs.add(result);
}
return (capacity == nread) ? buf : Arrays.copyOf(buf, nread);
bufs.add(buf);
}
}
} while (n >= 0); // if the last call to read returned -1, then break
if (bufs == null) {
if (result == null) {
return new byte[0];
}
return result.length == total ?
result : Arrays.copyOf(result, total);
}
result = new byte[total];
int offset = 0;
int remaining = total;
for (byte[] b : bufs) {
int len = Math.min(b.length, remaining);
System.arraycopy(b, 0, result, offset, len);
offset += len;
remaining -= len;
}
return result;
}
/**

View file

@ -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

View file

@ -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

View file

@ -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

View file

@ -2521,7 +2521,7 @@ public class ModuleDescriptor
* the {@code packageFinder} throws an {@link UncheckedIOException} then
* {@link IOException} cause will be re-thrown. </p>
*
* <p> The module descriptor is read from the buffer stating at index
* <p> The module descriptor is read from the buffer starting at index
* {@code p}, where {@code p} is the buffer's {@link ByteBuffer#position()
* position} when this method is invoked. Upon return the buffer's position
* will be equal to {@code p + n} where {@code n} is the number of bytes

View file

@ -140,14 +140,6 @@ public abstract class Reference<T> {
}
}
/*
* system property to disable clearing before enqueuing.
*/
private static final class ClearBeforeEnqueue {
static final boolean DISABLE =
Boolean.getBoolean("jdk.lang.ref.disableClearBeforeEnqueue");
}
/*
* Atomically get and clear (set to null) the VM's pending list.
*/
@ -299,7 +291,6 @@ public abstract class Reference<T> {
* it was not registered with a queue when it was created
*/
public boolean enqueue() {
if (!ClearBeforeEnqueue.DISABLE)
this.referent = null;
return this.queue.enqueue(this);
}

View file

@ -204,58 +204,70 @@ import static sun.security.util.SecurityConstants.GET_CLASSLOADER_PERMISSION;
* known concrete subclasses {@code ListResourceBundle} and
* {@code PropertyResourceBundle} are thread-safe.
*
* <h3><a id="bundleprovider">Resource Bundles in Named Modules</a></h3>
* <h3><a id="resource-bundle-modules">Resource Bundles and Named Modules</a></h3>
*
* When resource bundles are deployed in named modules, the following
* module-specific requirements and restrictions are applied.
* Resource bundles can be deployed in modules in the following ways:
*
* <ul>
* <li>Code in a named module that calls {@link #getBundle(String, Locale)}
* will locate resource bundles in the caller's module (<em>caller module</em>).</li>
* <li>If resource bundles are deployed in named modules separate from
* the caller module, those resource bundles need to be loaded from service
* providers of {@link ResourceBundleProvider}. The caller module must declare
* "{@code uses}" and the service interface name is the concatenation of the
* package name of the base name, string "{@code .spi.}", the simple class
* name of the base name, and the string "{@code Provider}". The
* <em>bundle provider modules</em> containing resource bundles must
* declare "{@code provides}" with the service interface name and
* its implementation class name. For example, if the base name is
* "{@code com.example.app.MyResources}", the caller module must declare
* "{@code uses com.example.app.spi.MyResourcesProvider;}" and a module containing resource
* bundles must declare "{@code provides com.example.app.spi.MyResourcesProvider
* with com.example.app.internal.MyResourcesProviderImpl;}"
* where {@code com.example.app.internal.MyResourcesProviderImpl} is an
* implementation class of {@code com.example.app.spi.MyResourcesProvider}.</li>
* <li>If you want to use non-standard formats in named modules, such as XML,
* {@link ResourceBundleProvider} needs to be used.</li>
* <li>The {@code getBundle} method with a {@code ClassLoader} may not be able to
* find resource bundles using the given {@code ClassLoader} in named modules.
* The {@code getBundle} method with a {@code Module} can be used, instead.</li>
* <li>{@code ResourceBundle.Control} is <em>not</em> supported in named modules.
* If the {@code getBundle} method with a {@code ResourceBundle.Control} is called
* in a named module, the method will throw an {@code UnsupportedOperationException}.
* Any service providers of {@link ResourceBundleControlProvider} are ignored in
* named modules.
* </li>
* </ul>
* <h4>Resource bundles together with an application</h4>
*
* <h3><a id="RBP_support">ResourceBundleProvider Service Providers</a></h3>
* Resource bundles can be deployed together with an application in the same
* module. In that case, the resource bundles are loaded
* by code in the module by calling the {@link #getBundle(String)}
* or {@link #getBundle(String, Locale)} method.
*
* The {@code getBundle} factory methods load service providers of
* {@link ResourceBundleProvider}, if available, using {@link ServiceLoader}.
* The service type is designated by
* {@code <package name> + ".spi." + <simple name> + "Provider"}. For
* example, if the base name is "{@code com.example.app.MyResources}", the service
* type is {@code com.example.app.spi.MyResourcesProvider}.
* <p>
* In named modules, the loaded service providers for the given base name are
* used to load resource bundles. If no service provider is available, or if
* none of the service providers returns a resource bundle and the caller module
* doesn't have its own service provider, the {@code getBundle} factory method
* searches for resource bundles that are local in the caller module and that
* are visible to the class loader of the caller module. The resource bundle
* formats for local module searching are "java.class" and "java.properties".
* <h4><a id="service-providers">Resource bundles as service providers</a></h4>
*
* Resource bundles can be deployed in one or more <em>service provider modules</em>
* and they can be located using {@link ServiceLoader}.
* A {@linkplain ResourceBundleProvider service} interface or class must be
* defined. The caller module declares that it uses the service, the service
* provider modules declare that they provide implementations of the service.
* Refer to {@link ResourceBundleProvider} for developing resource bundle
* services and deploying resource bundle providers.
* The module obtaining the resource bundle can be a resource bundle
* provider itself; in which case this module only locates the resource bundle
* via service provider mechanism.
*
* <p>A {@linkplain ResourceBundleProvider resource bundle provider} can
* provide resource bundles in any format such XML which replaces the need
* of {@link Control ResourceBundle.Control}.
*
* <h4><a id="other-modules">Resource bundles in other modules and class path</a></h4>
*
* Resource bundles in a named module may be <em>encapsulated</em> so that
* it cannot be located by code in other modules. Resource bundles
* in unnamed modules and class path are open for any module to access.
* Resource bundle follows the resource encapsulation rules as specified
* in {@link Module#getResourceAsStream(String)}.
*
* <p>The {@code getBundle} factory methods with no {@code Control} parameter
* locate and load resource bundles from
* {@linkplain ResourceBundleProvider service providers}.
* It may continue the search as if calling {@link Module#getResourceAsStream(String)}
* to find the named resource from a given module and calling
* {@link ClassLoader#getResourceAsStream(String)}; refer to
* the specification of the {@code getBundle} method for details.
* Only non-encapsulated resource bundles of "{@code java.class}"
* or "{@code java.properties}" format are searched.
*
* <p>If the caller module is a
* <a href="{@docRoot}/java/util/spi/ResourceBundleProvider.html#obtain-resource-bundle">
* resource bundle provider</a>, it does not fall back to the
* class loader search.
*
* <h4>Resource bundles in automatic modules</h4>
*
* A common format of resource bundles is in {@linkplain PropertyResourceBundle
* .properties} file format. Typically {@code .properties} resource bundles
* are packaged in a JAR file. Resource bundle only JAR file can be readily
* deployed as an <a href="{@docRoot}/java/lang/module/ModuleFinder.html#automatic-modules">
* automatic module</a>. For example, if the JAR file contains the
* entry "{@code p/q/Foo_ja.properties}" and no {@code .class} entry,
* when resolved and defined as an automatic module, no package is derived
* for this module. This allows resource bundles in {@code .properties}
* format packaged in one or more JAR files that may contain entries
* in the same directory and can be resolved successfully as
* automatic modules.
*
* <h3>ResourceBundle.Control</h3>
*
@ -268,6 +280,14 @@ import static sun.security.util.SecurityConstants.GET_CLASSLOADER_PERMISSION;
* {@link #getBundle(String, Locale, ClassLoader, Control) getBundle}
* factory method for details.
*
* <p> {@link ResourceBundle.Control} is designed for an application deployed
* in an unnamed module, for example to support resource bundles in
* non-standard formats or package localized resources in a non-traditional
* convention. {@link ResourceBundleProvider} is the replacement for
* {@code ResourceBundle.Control} when migrating to modules.
* {@code UnsupportedOperationException} will be thrown when a factory
* method that takes the {@code ResourceBundle.Control} parameter is called.
*
* <p><a id="modify_default_behavior">For the {@code getBundle} factory</a>
* methods that take no {@link Control} instance, their <a
* href="#default_behavior"> default behavior</a> of resource bundle loading
@ -815,14 +835,10 @@ public abstract class ResourceBundle {
/**
* Gets a resource bundle using the specified base name, the default locale,
* and the caller's class loader. Calling this method is equivalent to calling
* and the caller module. Calling this method is equivalent to calling
* <blockquote>
* <code>getBundle(baseName, Locale.getDefault(), this.getClass().getClassLoader())</code>,
* <code>getBundle(baseName, Locale.getDefault(), callerModule)</code>,
* </blockquote>
* except that <code>getClassLoader()</code> is run with the security
* privileges of <code>ResourceBundle</code>.
* See {@link #getBundle(String, Locale, ClassLoader) getBundle}
* for a complete description of the search and instantiation strategy.
*
* @param baseName the base name of the resource bundle, a fully qualified class name
* @exception java.lang.NullPointerException
@ -830,6 +846,9 @@ public abstract class ResourceBundle {
* @exception MissingResourceException
* if no resource bundle for the specified base name can be found
* @return a resource bundle for the given base name and the default locale
*
* @see <a href="#default_behavior">Resource Bundle Search and Loading Strategy</a>
* @see <a href="#resource-bundle-modules">Resource Bundles and Named Modules</a>
*/
@CallerSensitive
public static final ResourceBundle getBundle(String baseName)
@ -887,14 +906,10 @@ public abstract class ResourceBundle {
/**
* Gets a resource bundle using the specified base name and locale,
* and the caller's class loader. Calling this method is equivalent to calling
* and the caller module. Calling this method is equivalent to calling
* <blockquote>
* <code>getBundle(baseName, locale, this.getClass().getClassLoader())</code>,
* <code>getBundle(baseName, locale, callerModule)</code>,
* </blockquote>
* except that <code>getClassLoader()</code> is run with the security
* privileges of <code>ResourceBundle</code>.
* See {@link #getBundle(String, Locale, ClassLoader) getBundle}
* for a complete description of the search and instantiation strategy.
*
* @param baseName
* the base name of the resource bundle, a fully qualified class name
@ -905,6 +920,9 @@ public abstract class ResourceBundle {
* @exception MissingResourceException
* if no resource bundle for the specified base name can be found
* @return a resource bundle for the given base name and locale
*
* @see <a href="#default_behavior">Resource Bundle Search and Loading Strategy</a>
* @see <a href="#resource-bundle-modules">Resource Bundles and Named Modules</a>
*/
@CallerSensitive
public static final ResourceBundle getBundle(String baseName,
@ -922,19 +940,6 @@ public abstract class ResourceBundle {
* <code>getBundle(baseName, Locale.getDefault(), module)</code>
* </blockquote>
*
* <p> Resource bundles in named modules may be encapsulated. When
* the resource bundle is loaded from a provider, the caller module
* must have an appropriate <i>uses</i> clause in its <i>module descriptor</i>
* to declare that the module uses implementations of
* {@code <package name> + ".spi." + <simple name> + "Provider"}.
* Otherwise, it will load the resource bundles that are local in the
* given module or that are visible to the class loader of the given module
* (refer to the <a href="#bundleprovider">Resource Bundles in Named Modules</a>
* section for details).
* When the resource bundle is loaded from the specified module, it is
* subject to the encapsulation rules specified by
* {@link Module#getResourceAsStream Module.getResourceAsStream}.
*
* @param baseName the base name of the resource bundle,
* a fully qualified class name
* @param module the module for which the resource bundle is searched
@ -950,6 +955,8 @@ public abstract class ResourceBundle {
* @since 9
* @spec JPMS
* @see ResourceBundleProvider
* @see <a href="#default_behavior">Resource Bundle Search and Loading Strategy</a>
* @see <a href="#resource-bundle-modules">Resource Bundles and Named Modules</a>
*/
@CallerSensitive
public static ResourceBundle getBundle(String baseName, Module module) {
@ -963,14 +970,15 @@ public abstract class ResourceBundle {
* on behalf of the specified module.
*
* <p> Resource bundles in named modules may be encapsulated. When
* the resource bundle is loaded from a provider, the caller module
* the resource bundle is loaded from a
* {@linkplain ResourceBundleProvider service provider}, the caller module
* must have an appropriate <i>uses</i> clause in its <i>module descriptor</i>
* to declare that the module uses implementations of
* {@code <package name> + ".spi." + <simple name> + "Provider"}.
* to declare that the module uses of {@link ResourceBundleProvider}
* for the named resource bundle.
* Otherwise, it will load the resource bundles that are local in the
* given module or that are visible to the class loader of the given module
* (refer to the <a href="#bundleprovider">Resource Bundles in Named Modules</a>
* section for details).
* given module as if calling {@link Module#getResourceAsStream(String)}
* or that are visible to the class loader of the given module
* as if calling {@link ClassLoader#getResourceAsStream(String)}.
* When the resource bundle is loaded from the specified module, it is
* subject to the encapsulation rules specified by
* {@link Module#getResourceAsStream Module.getResourceAsStream}.
@ -1000,6 +1008,8 @@ public abstract class ResourceBundle {
* @return a resource bundle for the given base name and locale in the module
* @since 9
* @spec JPMS
* @see <a href="#default_behavior">Resource Bundle Search and Loading Strategy</a>
* @see <a href="#resource-bundle-modules">Resource Bundles and Named Modules</a>
*/
@CallerSensitive
public static ResourceBundle getBundle(String baseName, Locale targetLocale, Module module) {
@ -1060,28 +1070,25 @@ public abstract class ResourceBundle {
* Gets a resource bundle using the specified base name, locale, and class
* loader.
*
* <p>This method behaves the same as calling
* {@link #getBundle(String, Locale, ClassLoader, Control)} passing a
* default instance of {@link Control} unless another {@link Control} is
* provided with the {@link ResourceBundleControlProvider} SPI. Refer to the
* description of <a href="#modify_default_behavior">modifying the default
* behavior</a>.
* <p>When this method is called from a named module and the given
* loader is the class loader of the caller module, this is equivalent
* to calling:
* <blockquote><pre>
* getBundle(baseName, targetLocale, callerModule)
* </pre></blockquote>
*
* <p><a id="default_behavior">The following describes the default
* behavior</a>.
* otherwise, this is equivalent to calling:
* <blockquote><pre>
* getBundle(baseName, targetLocale, loader, control)
* </pre></blockquote>
* where {@code control} is the default instance of {@link Control} unless
* a {@code Control} instance is provided by
* {@link ResourceBundleControlProvider} SPI. Refer to the
* description of <a href="#modify_default_behavior">modifying the default
* behavior</a>. The following describes the default behavior.
*
* <p>
* Resource bundles in a named module are private to that module. If
* the caller is in a named module, this method will find resource bundles
* from the service providers of {@link java.util.spi.ResourceBundleProvider}
* if any. Otherwise, it will load the resource bundles that are visible to
* the given {@code loader} (refer to the
* <a href="#bundleprovider">Resource Bundles in Named Modules</a> section
* for details).
* If the caller is in a named module and the given {@code loader} is
* different than the caller's class loader, or if the caller is not in
* a named module, this method will not find resource bundles from named
* modules.
* <b><a id="default_behavior">Resource Bundle Search and Loading Strategy</a></b>
*
* <p><code>getBundle</code> uses the base name, the specified locale, and
* the default locale (obtained from {@link java.util.Locale#getDefault()
@ -1201,7 +1208,7 @@ public abstract class ResourceBundle {
*
* <p><b>Note:</b>The <code>baseName</code> argument should be a fully
* qualified class name. However, for compatibility with earlier versions,
* Sun's Java SE Runtime Environments do not verify this, and so it is
* Java SE Runtime Environments do not verify this, and so it is
* possible to access <code>PropertyResourceBundle</code>s by specifying a
* path name (using "/") instead of a fully qualified class name (using
* ".").
@ -1248,7 +1255,7 @@ public abstract class ResourceBundle {
*
* @apiNote If the caller module is a named module and the given
* {@code loader} is the caller module's class loader, this method is
* equivalent to {@code getBundle(baseName, locale)}; otherwise, it will not
* equivalent to {@code getBundle(baseName, locale)}; otherwise, it may not
* find resource bundles from named modules.
* Use {@link #getBundle(String, Locale, Module)} to load resource bundles
* on behalf on a specific module instead.
@ -1264,6 +1271,7 @@ public abstract class ResourceBundle {
* @since 1.2
* @revised 9
* @spec JPMS
* @see <a href="#resource-bundle-modules">Resource Bundles and Named Modules</a>
*/
@CallerSensitive
public static ResourceBundle getBundle(String baseName, Locale locale,
@ -1278,9 +1286,9 @@ public abstract class ResourceBundle {
/**
* Returns a resource bundle using the specified base name, target
* locale, class loader and control. Unlike the {@linkplain
* #getBundle(String, Locale, ClassLoader) <code>getBundle</code>
* factory methods with no <code>control</code> argument}, the given
* locale, class loader and control. Unlike the {@link
* #getBundle(String, Locale, ClassLoader) getBundle}
* factory methods with no {@code control} argument, the given
* <code>control</code> specifies how to locate and instantiate resource
* bundles. Conceptually, the bundle loading process with the given
* <code>control</code> is performed in the following steps.
@ -2365,7 +2373,14 @@ public abstract class ResourceBundle {
* the callback methods provides the information necessary for the
* factory methods to perform the <a
* href="./ResourceBundle.html#default_behavior">default behavior</a>.
* <a href="#note">Note that this class is not supported in named modules.</a>
*
* <p> {@link ResourceBundle.Control} is designed for an application deployed
* in an unnamed module, for example to support resource bundles in
* non-standard formats or package localized resources in a non-traditional
* convention. {@link ResourceBundleProvider} is the replacement for
* {@code ResourceBundle.Control} when migrating to modules.
* {@code UnsupportedOperationException} will be thrown when a factory
* method that takes the {@code ResourceBundle.Control} parameter is called.
*
* <p>In addition to the callback methods, the {@link
* #toBundleName(String, Locale) toBundleName} and {@link
@ -2501,8 +2516,8 @@ public abstract class ResourceBundle {
* }
* </pre>
*
* @apiNote <a id="note">{@code ResourceBundle.Control} is not supported
* in named modules.</a> If the {@code ResourceBundle.getBundle} method with
* @apiNote {@code ResourceBundle.Control} is not supported
* in named modules. If the {@code ResourceBundle.getBundle} method with
* a {@code ResourceBundle.Control} is called in a named module, the method
* will throw an {@link UnsupportedOperationException}. Any service providers
* of {@link ResourceBundleControlProvider} are ignored in named modules.

View file

@ -45,42 +45,46 @@ import static sun.security.util.SecurityConstants.GET_CLASSLOADER_PERMISSION;
*
* <p>
* Resource bundles can be packaged in one or more
* named modules, <em>bundle modules</em>. The <em>consumer</em> of the
* named modules, <em>service provider modules</em>. The <em>consumer</em> of the
* resource bundle is the one calling {@link ResourceBundle#getBundle(String)}.
* In order for the consumer module to load a resource bundle
* "{@code com.example.app.MyResources}" provided by another module,
* it will use the {@linkplain java.util.ServiceLoader service loader}
* mechanism. A service interface named "{@code com.example.app.MyResourcesProvider}"
* must be defined and a <em>bundle provider module</em> will provide an
* implementation class of "{@code com.example.app.MyResourcesProvider}"
* mechanism. A service interface named "{@code com.example.app.spi.MyResourcesProvider}"
* must be defined and a <em>service provider module</em> will provide an
* implementation class of "{@code com.example.app.spi.MyResourcesProvider}"
* as follows:
*
* <pre><code>
* import com.example.app.MyResourcesProvider;
* <blockquote><pre>
* {@code import com.example.app.spi.MyResourcesProvider;
* class MyResourcesProviderImpl extends AbstractResourceBundleProvider
* implements MyResourcesProvider
* {
* public MyResourcesProviderImpl() {
* super("java.properties");
* }
* // this provider maps the resource bundle to per-language package
* protected String toBundleName(String baseName, Locale locale) {
* // return the bundle name per the naming of the resource bundle
* :
* return "p." + locale.getLanguage() + "." + baseName;
* }
*
* public ResourceBundle getBundle(String baseName, Locale locale) {
* // this module only provides bundles in french
* // this module only provides bundles in French
* if (locale.equals(Locale.FRENCH)) {
* return super.getBundle(baseName, locale);
* }
* // otherwise return null
* return null;
* }
* }</code></pre>
* }}</pre></blockquote>
*
* @see <a href="../ResourceBundle.html#bundleprovider">
* Resource Bundles in Named Modules</a>
* @see <a href="../ResourceBundle.html#RBP_support">
* ResourceBundleProvider Service Providers</a>
* Refer to {@link ResourceBundleProvider} for details.
*
* @see <a href="../ResourceBundle.html#resource-bundle-modules">
* Resource Bundles and Named Modules</a>
* @since 9
* @spec JPMS
*/
public abstract class AbstractResourceBundleProvider implements ResourceBundleProvider {
private static final JavaUtilResourceBundleAccess RB_ACCESS =

View file

@ -29,33 +29,117 @@ import java.util.Locale;
import java.util.ResourceBundle;
/**
* {@code ResourceBundleProvider} is a provider interface that is used for
* loading resource bundles for named modules. Implementation classes of
* this interface are loaded with {@link java.util.ServiceLoader ServiceLoader}
* during a call to the
* {@link ResourceBundle#getBundle(String, Locale, ClassLoader)
* ResourceBundle.getBundle} method. The provider service type is determined by
* {@code <package name> + ".spi." + <simple name> + "Provider"}.
* {@code ResourceBundleProvider} is a service provider interface for
* resource bundles. It is used by
* {@link ResourceBundle#getBundle(String) ResourceBundle.getBundle}
* factory methods to locate and load the service providers that are deployed as
* modules via {@link java.util.ServiceLoader ServiceLoader}.
*
* <p>
* For example, if the base name is "com.example.app.MyResources",
* {@code com.example.app.spi.MyResourcesProvider} will be the provider service type:
* <pre>{@code
* <h3>Developing resource bundle services</h3>
*
* A service for a resource bundle of a given <em>{@code baseName}</em> must have
* a fully-qualified class name of the form:
* <blockquote>
* {@code <package of baseName> + ".spi." + <simple name of baseName> + "Provider"}
* </blockquote>
*
* The service type is in a {@code spi} subpackage as it may be packaged in
* a module separate from the resource bundle providers.
* For example, the service for a resource bundle named
* {@code com.example.app.MyResources} must be
* {@code com.example.app.spi.MyResourcesProvider}:
*
* <blockquote><pre>
* {@code package com.example.app.spi;
* public interface MyResourcesProvider extends ResourceBundleProvider {
* }
* }</pre>
* }</pre></blockquote>
*
* <p>
* This providers's {@link #getBundle(String, Locale) getBundle} method is called
* through the resource bundle loading process instead of {@link
* java.util.ResourceBundle.Control#newBundle(String, Locale, String, ClassLoader, boolean)
* ResourceBundle.Control.newBundle()}. Refer to {@link ResourceBundle} for
* details.
* <h3>Deploying resource bundle service providers</h3>
*
* @see <a href="../ResourceBundle.html#bundleprovider">
* Resource Bundles in Named Modules</a>
* @see <a href="../ResourceBundle.html#RBP_support">
* ResourceBundleProvider Service Providers</a>
* Resource bundles can be deployed in one or more service providers
* in modules. For example, a provider for a service
* named "{@code com.example.app.spi.MyResourcesProvider}"
* has the following implementation class:
*
* <blockquote><pre>
* {@code import com.example.app.spi.MyResourcesProvider;
* class MyResourcesProviderImpl extends AbstractResourceBundleProvider
* implements MyResourcesProvider
* {
* public MyResourcesProviderImpl() {
* super("java.properties");
* }
* // this provider maps the resource bundle to per-language package
* protected String toBundleName(String baseName, Locale locale) {
* return "p." + locale.getLanguage() + "." + baseName;
* }
*
* public ResourceBundle getBundle(String baseName, Locale locale) {
* // this module only provides bundles in French
* if (locale.equals(Locale.FRENCH)) {
* return super.getBundle(baseName, locale);
* }
* // otherwise return null
* return null;
* }
* }}</pre></blockquote>
*
* This example provides "{@code com.example.app.MyResources}"
* resource bundle of the French locale. Traditionally resource bundles of
* all locales are packaged in the same package as the resource bundle base name.
* When deploying resource bundles in more than one modules and two modules
* containing a package of the same name, <em>split package</em>,
* is not supported, resource bundles in each module can be packaged in
* a different package as shown in this example where this provider packages
* the resource bundles in per-language package, i.e. {@code com.example.app.fr}
* for French locale.
*
* <p> A provider can provide more than one services, each of which is a service
* for a resource bundle of a different base name.
*
* <p>{@link AbstractResourceBundleProvider}
* provides the basic implementation for {@code ResourceBundleProvider}
* and a subclass can override the {@link
* AbstractResourceBundleProvider#toBundleName(String, Locale) toBundleName}
* method to return a provider-specific location of the resource to be loaded,
* for example, per-language package.
* A provider can override {@link #getBundle ResourceBundleProvider.getBundle}
* method for example to only search the known supported locales or
* return resource bundles in other formats such as XML.
*
* <p>The module declaration of this provider module specifies the following
* directive:
* <pre>
* provides com.example.app.spi.MyResourcesProvider with com.example.impl.MyResourcesProviderImpl;
* </pre>
*
* <h3><a id="obtain-resource-bundle">Obtaining resource bundles from providers</a></h3>
*
* The module declaration of the <em>consumer module</em> that calls one of the
* {@code ResourceBundle.getBundle} factory methods to obtain a resource
* bundle from service providers must specify the following directive:
* <pre>
* uses com.example.app.spi.MyResourcesProvider;
* </pre>
*
* {@link ResourceBundle#getBundle(String, Locale)
* ResourceBundle.getBundle("com.example.app.MyResource", locale)}
* locates and loads the providers for {@code com.example.app.spi.MyResourcesProvider}
* service and then invokes {@link #getBundle(String, Locale)
* ResourceBundleProvider.getBundle("com.example.app.MyResource", locale)} to
* find the resource bundle of the given base name and locale.
* If the consumer module is a resource bundle service provider for
* {@code com.example.app.spi.MyResourcesProvider}, {@code ResourceBundle.getBundle}
* will locate resource bundles only from service providers.
* Otherwise, {@code ResourceBundle.getBundle} may continue the search of
* the resource bundle in other modules and class path per the specification
* of the {@code ResourceBundle.getBundle} method being called.
*
* @see AbstractResourceBundleProvider
* @see <a href="../ResourceBundle.html#resource-bundle-modules">
* Resource Bundles and Named Modules</a>
* @see java.util.ServiceLoader
* @since 9
* @spec JPMS
*/

View file

@ -1,5 +1,5 @@
/*
* Copyright (c) 2015, Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 2015, 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
@ -95,7 +95,7 @@ final class WhileOps {
@Override
public void accept(T t) {
if (take = predicate.test(t)) {
if (take && (take = predicate.test(t))) {
downstream.accept(t);
}
}
@ -152,7 +152,7 @@ final class WhileOps {
@Override
public void accept(int t) {
if (take = predicate.test(t)) {
if (take && (take = predicate.test(t))) {
downstream.accept(t);
}
}
@ -209,7 +209,7 @@ final class WhileOps {
@Override
public void accept(long t) {
if (take = predicate.test(t)) {
if (take && (take = predicate.test(t))) {
downstream.accept(t);
}
}
@ -266,7 +266,7 @@ final class WhileOps {
@Override
public void accept(double t) {
if (take = predicate.test(t)) {
if (take && (take = predicate.test(t))) {
downstream.accept(t);
}
}

View file

@ -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

View file

@ -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

View file

@ -1,5 +1,5 @@
/*
* Copyright (c) 2014, 2017, 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
@ -142,7 +142,7 @@ module java.base {
java.instrument,
java.logging;
exports jdk.internal.jmod to
jdk.compiler, // reflective dependency
jdk.compiler,
jdk.jlink;
exports jdk.internal.logger to
java.logging;
@ -172,7 +172,7 @@ module java.base {
java.xml,
jdk.attach,
jdk.charsets,
jdk.compiler, // reflective dependency
jdk.compiler,
jdk.incubator.httpclient,
jdk.jdeps,
jdk.jlink,

View file

@ -1,11 +1,12 @@
/*
* Copyright (c) 2017, Red Hat, Inc. and/or its affiliates.
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
* under the terms of the GNU General Public License version 2 only, as
* published by the Free Software Foundation.
* published by the Free Software Foundation. Oracle designates this
* particular file as subject to the "Classpath" exception as provided
* by Oracle in the LICENSE file that accompanied this code.
*
* This code is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or

View file

@ -1,5 +1,5 @@
/*
* Copyright (c) 2002, 2016, Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 2002, 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
@ -108,7 +108,29 @@ final class HandshakeHash {
* a hash for the certificate verify message is required.
*/
HandshakeHash(boolean needCertificateVerify) {
clonesNeeded = needCertificateVerify ? 4 : 3;
// We may rework the code later, but for now we use hard-coded number
// of clones if the underlying MessageDigests are not cloneable.
//
// The number used here is based on the current handshake protocols and
// implementation. It may be changed if the handshake processe gets
// changed in the future, for example adding a new extension that
// requires handshake hash. Please be careful about the number of
// clones if additional handshak hash is required in the future.
//
// For the current implementation, the handshake hash is required for
// the following items:
// . CertificateVerify handshake message (optional)
// . client Finished handshake message
// . server Finished Handshake message
// . the extended Master Secret extension [RFC 7627]
//
// Note that a late call to server setNeedClientAuth dose not update
// the number of clones. We may address the issue later.
//
// Note for safety, we allocate one more clone for the current
// implementation. We may consider it more carefully in the future
// for the exact number or rework the code in a different way.
clonesNeeded = needCertificateVerify ? 5 : 4;
}
void reserve(ByteBuffer input) {
@ -335,7 +357,8 @@ final class HandshakeHash {
if (finMD != null) return;
try {
finMD = CloneableDigest.getDigest(normalizeAlgName(s), 2);
// See comment in the contructor.
finMD = CloneableDigest.getDigest(normalizeAlgName(s), 4);
} catch (NoSuchAlgorithmException e) {
throw new Error(e);
}

View file

@ -868,22 +868,7 @@ public abstract class SunToolkit extends Toolkit
java.security.Permission perm =
URLUtil.getConnectPermission(url);
if (perm != null) {
try {
sm.checkPermission(perm);
} catch (SecurityException se) {
// fallback to checkRead/checkConnect for pre 1.2
// security managers
if ((perm instanceof java.io.FilePermission) &&
perm.getActions().indexOf("read") != -1) {
sm.checkRead(perm.getName());
} else if ((perm instanceof
java.net.SocketPermission) &&
perm.getActions().indexOf("connect") != -1) {
sm.checkConnect(url.getHost(), url.getPort());
} else {
throw se;
}
}
}
} catch (java.io.IOException ioe) {
sm.checkConnect(url.getHost(), url.getPort());

View file

@ -46,22 +46,7 @@ public class URLImageSource extends InputStreamImageSource {
java.security.Permission perm =
URLUtil.getConnectPermission(u);
if (perm != null) {
try {
sm.checkPermission(perm);
} catch (SecurityException se) {
// fallback to checkRead/checkConnect for pre 1.2
// security managers
if ((perm instanceof java.io.FilePermission) &&
perm.getActions().indexOf("read") != -1) {
sm.checkRead(perm.getName());
} else if ((perm instanceof
java.net.SocketPermission) &&
perm.getActions().indexOf("connect") != -1) {
sm.checkConnect(u.getHost(), u.getPort());
} else {
throw se;
}
}
}
} catch (java.io.IOException ioe) {
sm.checkConnect(u.getHost(), u.getPort());

View file

@ -77,7 +77,13 @@ arabic_fallback_synthesize_lookup_single (const hb_ot_shape_plan_t *plan HB_UNUS
/* Bubble-sort or something equally good!
* May not be good-enough for presidential candidate interviews, but good-enough for us... */
#if defined(_AIX)
/* Workaround AIX xlC 12 compilation problems caused by the overloaded versions of 'cmp' in IntType */
hb_stable_sort (&glyphs[0], num_glyphs, (int(*)(const OT::GlyphID*, const OT::GlyphID *)) OT::GlyphID::cmp, &substitutes[0]);
#else
hb_stable_sort (&glyphs[0], num_glyphs, OT::GlyphID::cmp, &substitutes[0]);
#endif
OT::Supplier<OT::GlyphID> glyphs_supplier (glyphs, num_glyphs);
OT::Supplier<OT::GlyphID> substitutes_supplier (substitutes, num_glyphs);
@ -126,7 +132,13 @@ arabic_fallback_synthesize_lookup_ligature (const hb_ot_shape_plan_t *plan HB_UN
first_glyphs_indirection[num_first_glyphs] = first_glyph_idx;
num_first_glyphs++;
}
#if defined(_AIX)
/* Workaround AIX xlC 12 compilation problems caused by the overloaded versions of 'cmp' in IntType */
hb_stable_sort (&first_glyphs[0], num_first_glyphs, (int(*)(const OT::GlyphID *, const OT::GlyphID *)) OT::GlyphID::cmp, &first_glyphs_indirection[0]);
#else
hb_stable_sort (&first_glyphs[0], num_first_glyphs, OT::GlyphID::cmp, &first_glyphs_indirection[0]);
#endif
/* Now that the first-glyphs are sorted, walk again, populate ligatures. */
for (unsigned int i = 0; i < num_first_glyphs; i++)

View file

@ -1,25 +1,27 @@
/*
* Copyright (c) 2016, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
* under the terms of the GNU General Public License version 2 only, as
* published by the Free Software Foundation.
*
* This code is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
* version 2 for more details (a copy is included in the LICENSE file that
* accompanied this code).
*
* You should have received a copy of the GNU General Public License version
* 2 along with this work; if not, write to the Free Software Foundation,
* Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
*
* Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
* or visit www.oracle.com if you need additional information or have any
* questions.
*/
* Copyright (c) 2016, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
* under the terms of the GNU General Public License version 2 only, as
* published by the Free Software Foundation. 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.
*/
#include "systemScale.h"
#include "jni.h"

View file

@ -1,25 +1,27 @@
/*
* Copyright (c) 2016, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
* under the terms of the GNU General Public License version 2 only, as
* published by the Free Software Foundation.
*
* This code is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
* version 2 for more details (a copy is included in the LICENSE file that
* accompanied this code).
*
* You should have received a copy of the GNU General Public License version
* 2 along with this work; if not, write to the Free Software Foundation,
* Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
*
* Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
* or visit www.oracle.com if you need additional information or have any
* questions.
*/
* Copyright (c) 2016, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
* under the terms of the GNU General Public License version 2 only, as
* published by the Free Software Foundation. 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.
*/
#ifndef _AWT_SYSTEMSCALE_H
#define _AWT_SYSTEMSCALE_H

View file

@ -1,25 +1,27 @@
/*
* Copyright (c) 2016, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
* under the terms of the GNU General Public License version 2 only, as
* published by the Free Software Foundation.
*
* This code is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
* version 2 for more details (a copy is included in the LICENSE file that
* accompanied this code).
*
* You should have received a copy of the GNU General Public License version
* 2 along with this work; if not, write to the Free Software Foundation,
* Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
*
* Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
* or visit www.oracle.com if you need additional information or have any
* questions.
*/
* Copyright (c) 2016, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
* under the terms of the GNU General Public License version 2 only, as
* published by the Free Software Foundation. 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.
*/
#include "systemScale.h"
#include <d2d1.h>
#pragma comment(lib, "d2d1")

View file

@ -1,25 +1,27 @@
/*
* Copyright (c) 2016, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
* under the terms of the GNU General Public License version 2 only, as
* published by the Free Software Foundation.
*
* This code is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
* version 2 for more details (a copy is included in the LICENSE file that
* accompanied this code).
*
* You should have received a copy of the GNU General Public License version
* 2 along with this work; if not, write to the Free Software Foundation,
* Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
*
* Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
* or visit www.oracle.com if you need additional information or have any
* questions.
*/
* Copyright (c) 2016, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
* under the terms of the GNU General Public License version 2 only, as
* published by the Free Software Foundation. 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.
*/
#ifndef _AWT_SYSTEM_SCALE_H
#define _AWT_SYSTEM_SCALE_H
#include <windows.h>

View file

@ -1,6 +1,5 @@
/*
* Copyright (c) 2017, Oracle and/or its affiliates. All rights reserved.
* @LastModified: Oct 2017
*/
/*
* Licensed to the Apache Software Foundation (ASF) under one or more
@ -24,6 +23,7 @@ package com.sun.org.apache.bcel.internal;
/**
* Exception constants.
* @since 6.0 (intended to replace the InstructionConstant interface)
* @LastModified: Oct 2017
*/
public final class ExceptionConst {

View file

@ -1,6 +1,5 @@
/*
* Copyright (c) 2017, Oracle and/or its affiliates. All rights reserved.
* @LastModified: Oct 2017
*/
/*
* Licensed to the Apache Software Foundation (ASF) under one or more
@ -44,6 +43,7 @@ import com.sun.org.apache.bcel.internal.util.ByteSequence;
* Utility functions that do not really belong to any class in particular.
*
* @version $Id: Utility.java 1751107 2016-07-03 02:41:18Z dbrosius $
* @LastModified: Oct 2017
*/
// @since 6.0 methods are no longer final
public abstract class Utility {

View file

@ -1,6 +1,5 @@
/*
* Copyright (c) 2017, Oracle and/or its affiliates. All rights reserved.
* @LastModified: Oct 2017
*/
/*
* Licensed to the Apache Software Foundation (ASF) under one or more
@ -28,6 +27,7 @@ import com.sun.org.apache.bcel.internal.ExceptionConst;
* <PRE>Stack: ..., arrayref -&gt; ..., length</PRE>
*
* @version $Id: ARRAYLENGTH.java 1747278 2016-06-07 17:28:43Z britter $
* @LastModified: Oct 2017
*/
public class ARRAYLENGTH extends Instruction
implements ExceptionThrower, StackProducer, StackConsumer /* since 6.0 */ {

View file

@ -1,6 +1,5 @@
/*
* Copyright (c) 2017, Oracle and/or its affiliates. All rights reserved.
* @LastModified: Oct 2017
*/
/*
* Licensed to the Apache Software Foundation (ASF) under one or more
@ -28,6 +27,7 @@ import com.sun.org.apache.bcel.internal.ExceptionConst;
* <PRE>Stack: ..., objectref -&gt; objectref</PRE>
*
* @version $Id: ATHROW.java 1747278 2016-06-07 17:28:43Z britter $
* @LastModified: Oct 2017
*/
public class ATHROW extends Instruction implements UnconditionalBranch, ExceptionThrower {

View file

@ -1,6 +1,5 @@
/*
* Copyright (c) 2017, Oracle and/or its affiliates. All rights reserved.
* @LastModified: Oct 2017
*/
/*
* Licensed to the Apache Software Foundation (ASF) under one or more
@ -28,6 +27,7 @@ import com.sun.org.apache.bcel.internal.ExceptionConst;
* <PRE>Stack: ..., value1, value2 -&gt; result</PRE>
*
* @version $Id: IDIV.java 1747278 2016-06-07 17:28:43Z britter $
* @LastModified: Oct 2017
*/
public class IDIV extends ArithmeticInstruction implements ExceptionThrower {

View file

@ -1,6 +1,5 @@
/*
* Copyright (c) 2017, Oracle and/or its affiliates. All rights reserved.
* @LastModified: Oct 2017
*/
/*
* Licensed to the Apache Software Foundation (ASF) under one or more
@ -28,6 +27,7 @@ import com.sun.org.apache.bcel.internal.ExceptionConst;
* <PRE>Stack: ..., value1, value2 -&gt; result</PRE>
*
* @version $Id: IREM.java 1747278 2016-06-07 17:28:43Z britter $
* @LastModified: Oct 2017
*/
public class IREM extends ArithmeticInstruction implements ExceptionThrower {

View file

@ -1,6 +1,5 @@
/*
* Copyright (c) 2017, Oracle and/or its affiliates. All rights reserved.
* @LastModified: Oct 2017
*/
/*
* Licensed to the Apache Software Foundation (ASF) under one or more
@ -29,6 +28,7 @@ import com.sun.org.apache.bcel.internal.ExceptionConst;
* ..., result.word1, result.word2
*
* @version $Id: LDIV.java 1747278 2016-06-07 17:28:43Z britter $
* @LastModified: Oct 2017
*/
public class LDIV extends ArithmeticInstruction implements ExceptionThrower {

View file

@ -1,6 +1,5 @@
/*
* Copyright (c) 2017, Oracle and/or its affiliates. All rights reserved.
* @LastModified: Oct 2017
*/
/*
* Licensed to the Apache Software Foundation (ASF) under one or more
@ -28,6 +27,7 @@ import com.sun.org.apache.bcel.internal.ExceptionConst;
* <PRE>Stack: ..., value1, value2 -&gt; result</PRE>
*
* @version $Id: LREM.java 1747278 2016-06-07 17:28:43Z britter $
* @LastModified: Oct 2017
*/
public class LREM extends ArithmeticInstruction implements ExceptionThrower {

View file

@ -1,6 +1,5 @@
/*
* Copyright (c) 2017, Oracle and/or its affiliates. All rights reserved.
* @LastModified: Oct 2017
*/
/*
* Licensed to the Apache Software Foundation (ASF) under one or more
@ -28,6 +27,7 @@ import com.sun.org.apache.bcel.internal.ExceptionConst;
* <PRE>Stack: ..., objectref -&gt; ...</PRE>
*
* @version $Id: MONITORENTER.java 1747278 2016-06-07 17:28:43Z britter $
* @LastModified: Oct 2017
*/
public class MONITORENTER extends Instruction implements ExceptionThrower, StackConsumer {

View file

@ -1,6 +1,5 @@
/*
* Copyright (c) 2017, Oracle and/or its affiliates. All rights reserved.
* @LastModified: Oct 2017
*/
/*
* Licensed to the Apache Software Foundation (ASF) under one or more
@ -28,6 +27,7 @@ import com.sun.org.apache.bcel.internal.ExceptionConst;
* <PRE>Stack: ..., objectref -&gt; ...</PRE>
*
* @version $Id: MONITOREXIT.java 1747278 2016-06-07 17:28:43Z britter $
* @LastModified: Oct 2017
*/
public class MONITOREXIT extends Instruction implements ExceptionThrower, StackConsumer {

View file

@ -1,6 +1,5 @@
/*
* Copyright (c) 2013, 2017, Oracle and/or its affiliates. All rights reserved.
* @LastModified: Oct 2017
*/
/*
* Licensed to the Apache Software Foundation (ASF) under one or more
@ -59,6 +58,7 @@ import java.util.Stack;
* @version $Id: MethodGen.java 1749603 2016-06-21 20:50:19Z ggregory $
* @see InstructionList
* @see Method
* @LastModified: Oct 2017
*/
public class MethodGen extends FieldGenOrMethodGen {

View file

@ -1,6 +1,5 @@
/*
* Copyright (c) 2017, Oracle and/or its affiliates. All rights reserved.
* @LastModified: Oct 2017
*/
/*
* Licensed to the Apache Software Foundation (ASF) under one or more
@ -32,6 +31,7 @@ import java.io.IOException;
* type must be one of T_INT, T_SHORT, ...
*
* @version $Id: NEWARRAY.java 1747278 2016-06-07 17:28:43Z britter $
* @LastModified: Oct 2017
*/
public class NEWARRAY extends Instruction implements AllocationInstruction, ExceptionThrower,
StackProducer {

View file

@ -1,6 +1,5 @@
/*
* Copyright (c) 2017, Oracle and/or its affiliates. All rights reserved.
* @LastModified: Oct 2017
*/
/*
* Licensed to the Apache Software Foundation (ASF) under one or more
@ -28,6 +27,7 @@ import com.sun.org.apache.bcel.internal.ExceptionConst;
* Super class for the xRETURN family of instructions.
*
* @version $Id: ReturnInstruction.java 1747278 2016-06-07 17:28:43Z britter $
* @LastModified: Oct 2017
*/
public abstract class ReturnInstruction extends Instruction implements ExceptionThrower,
TypedInstruction, StackConsumer {

View file

@ -1,6 +1,5 @@
/*
* Copyright (c) 2017, Oracle and/or its affiliates. All rights reserved.
* @LastModified: Oct 2017
*/
/*
* Licensed to the Apache Software Foundation (ASF) under one or more
@ -66,6 +65,7 @@ import com.sun.org.apache.bcel.internal.generic.Type;
*
* @see BCELifier
* @version $Id: BCELFactory.java 1749603 2016-06-21 20:50:19Z ggregory $
* @LastModified: Oct 2017
*/
class BCELFactory extends EmptyVisitor {

View file

@ -1,6 +1,5 @@
/*
* Copyright (c) 2017, Oracle and/or its affiliates. All rights reserved.
* @LastModified: Oct 2017
*/
/*
* Licensed to the Apache Software Foundation (ASF) under one or more
@ -66,6 +65,7 @@ import java.util.regex.Pattern;
* @version $Id: InstructionFinder.java 1749603 2016-06-21 20:50:19Z ggregory $
* @see com.sun.org.apache.bcel.internal.generic.Instruction
* @see InstructionList
* @LastModified: Oct 2017
*/
public class InstructionFinder {

View file

@ -1,6 +1,5 @@
/*
* Copyright (c) 2017, Oracle and/or its affiliates. All rights reserved.
* @LastModified: Nov 2017
*/
/*
* Licensed to the Apache Software Foundation (ASF) under one or more
@ -45,6 +44,7 @@ import com.sun.org.apache.xpath.internal.objects.XObject;
*
* @see <a href="http://www.exslt.org/">EXSLT</a>
* @xsl.usage general
* @LastModified: Nov 2017
*/
public class ExsltDatetime

View file

@ -1,6 +1,5 @@
/*
* Copyright (c) 2017, Oracle and/or its affiliates. All rights reserved.
* @LastModified: Sep 2017
*/
/*
* Licensed to the Apache Software Foundation (ASF) under one or more
@ -30,6 +29,7 @@ import jdk.xml.internal.SecuritySupport;
* be called XalanMessages, or some such.
*
* @xsl.usage internal
* @LastModified: Sep 2017
*/
public class XSLMessages extends XPATHMessages {

View file

@ -1,6 +1,5 @@
/*
* Copyright (c) 2017, Oracle and/or its affiliates. All rights reserved.
* @LastModified: Oct 2017
*/
/*
* Licensed to the Apache Software Foundation (ASF) under one or more
@ -23,6 +22,8 @@ package com.sun.org.apache.xalan.internal.utils;
/**
* A configuration error. This was an internal class in ObjectFactory previously
*
* @LastModified: Oct 2017
*/
public final class ConfigurationError
extends Error {

View file

@ -1,6 +1,5 @@
/*
* Copyright (c) 2017, Oracle and/or its affiliates. All rights reserved.
* @LastModified: Oct 2017
*/
/*
* Licensed to the Apache Software Foundation (ASF) under one or more
@ -33,6 +32,7 @@ import jdk.xml.internal.SecuritySupport;
* class and modified to be used as a general utility for creating objects
* dynamically.
*
* @LastModified: Oct 2017
*/
public class ObjectFactory {

View file

@ -1,6 +1,5 @@
/*
* Copyright (c) 2017, Oracle and/or its affiliates. All rights reserved.
* @LastModified: Oct 2017
*/
/*
* Licensed to the Apache Software Foundation (ASF) under one or more
@ -27,6 +26,7 @@ import com.sun.org.apache.xml.internal.serializer.SerializationHandler;
/**
* @author Jacek Ambroziak
* @author Santiago Pericas-Geertsen
* @LastModified: Oct 2017
*/
public interface Translet {

View file

@ -1,6 +1,5 @@
/*
* Copyright (c) 2015, 2017, Oracle and/or its affiliates. All rights reserved.
* @LastModified: Oct 2017
*/
/*
* Licensed to the Apache Software Foundation (ASF) under one or more
@ -42,6 +41,7 @@ import java.util.List;
/**
* @author Jacek Ambroziak
* @author Santiago Pericas-Geertsen
* @LastModified: Oct 2017
*/
final class ApplyTemplates extends Instruction {
private Expression _select;

View file

@ -1,6 +1,5 @@
/*
* Copyright (c) 2015, 2017, Oracle and/or its affiliates. All rights reserved.
* @LastModified: Nov 2017
*/
/*
* Licensed to the Apache Software Foundation (ASF) under one or more
@ -43,6 +42,7 @@ import java.util.List;
* @author Jacek Ambroziak
* @author Santiago Pericas-Geertsen
* @author Morten Jorgensen
* @LastModified: Nov 2017
*/
final class AttributeSet extends TopLevelElement {

View file

@ -1,6 +1,5 @@
/*
* Copyright (c) 2015, 2017, Oracle and/or its affiliates. All rights reserved.
* @LastModified: Oct 2017
*/
/*
* Licensed to the Apache Software Foundation (ASF) under one or more
@ -43,6 +42,7 @@ import java.util.StringTokenizer;
/**
* @author Jacek Ambroziak
* @author Santiago Pericas-Geertsen
* @LastModified: Oct 2017
*/
final class AttributeValueTemplate extends AttributeValue {

View file

@ -1,6 +1,5 @@
/*
* Copyright (c) 2017, Oracle and/or its affiliates. All rights reserved.
* @LastModified: Nov 2017
*/
/*
* Licensed to the Apache Software Foundation (ASF) under one or more
@ -32,6 +31,7 @@ import com.sun.org.apache.xalan.internal.xsltc.compiler.util.TypeCheckError;
/**
* @author Jacek Ambroziak
* @author Santiago Pericas-Geertsen
* @LastModified: Nov 2017
*/
final class BinOpExpr extends Expression {
public static final int PLUS = 0;

View file

@ -1,6 +1,5 @@
/*
* Copyright (c) 2015, 2017, Oracle and/or its affiliates. All rights reserved.
* @LastModified: Oct 2017
*/
/*
* Licensed to the Apache Software Foundation (ASF) under one or more
@ -30,6 +29,7 @@ import java.util.List;
/**
* @author Jacek Ambroziak
* @author Santiago Pericas-Geertsen
* @LastModified: Oct 2017
*/
final class BooleanCall extends FunctionCall {

View file

@ -1,6 +1,5 @@
/*
* Copyright (c) 2016, 2017, Oracle and/or its affiliates. All rights reserved.
* @LastModified: Oct 2017
*/
/*
* Licensed to the Apache Software Foundation (ASF) under one or more
@ -37,6 +36,7 @@ import java.util.List;
* @author Jacek Ambroziak
* @author Santiago Pericas-Geertsen
* @author Erwin Bolwidt <ejb@klomp.org>
* @LastModified: Oct 2017
*/
final class CallTemplate extends Instruction {

View file

@ -1,6 +1,5 @@
/*
* Copyright (c) 2017, Oracle and/or its affiliates. All rights reserved.
* @LastModified: Oct 2017
*/
/*
* Licensed to the Apache Software Foundation (ASF) under one or more
@ -34,6 +33,7 @@ import java.util.List;
/**
* @author Santiago Pericas-Geertsen
* @LastModified: Oct 2017
*/
final class CastCall extends FunctionCall {

View file

@ -1,6 +1,5 @@
/*
* Copyright (c) 2015, 2017, Oracle and/or its affiliates. All rights reserved.
* @LastModified: Oct 2017
*/
/*
* Licensed to the Apache Software Foundation (ASF) under one or more
@ -31,6 +30,7 @@ import java.util.List;
/**
* @author Jacek Ambroziak
* @author Santiago Pericas-Geertsen
* @LastModified: Oct 2017
*/
final class CeilingCall extends FunctionCall {
public CeilingCall(QName fname, List<Expression> arguments) {

View file

@ -1,6 +1,5 @@
/*
* Copyright (c) 2015, 2017, Oracle and/or its affiliates. All rights reserved.
* @LastModified: Oct 2017
*/
/*
* Licensed to the Apache Software Foundation (ASF) under one or more
@ -45,6 +44,7 @@ import java.util.List;
* @author Jacek Ambroziak
* @author Santiago Pericas-Geertsen
* @author Morten Jorgensen
* @LastModified: Oct 2017
*/
final class Choose extends Instruction {

View file

@ -1,6 +1,5 @@
/*
* Copyright (c) 2017, Oracle and/or its affiliates. All rights reserved.
* @LastModified: Oct 2017
*/
/*
* Licensed to the Apache Software Foundation (ASF) under one or more
@ -37,6 +36,7 @@ import java.util.List;
/**
* @author Jacek Ambroziak
* @author Santiago Pericas-Geertsen
* @LastModified: Oct 2017
*/
final class ConcatCall extends FunctionCall {
public ConcatCall(QName fname, List<Expression> arguments) {

View file

@ -1,6 +1,5 @@
/*
* Copyright (c) 2017, Oracle and/or its affiliates. All rights reserved.
* @LastModified: Oct 2017
*/
/*
* Licensed to the Apache Software Foundation (ASF) under one or more
@ -36,6 +35,7 @@ import java.util.List;
* @author Jacek Ambroziak
* @author Santiago Pericas-Geertsen
* @author Morten Jorgensen
* @LastModified: Oct 2017
*/
final class ContainsCall extends FunctionCall {

View file

@ -1,6 +1,5 @@
/*
* Copyright (c) 2017, Oracle and/or its affiliates. All rights reserved.
* @LastModified: Oct 2017
*/
/*
* Licensed to the Apache Software Foundation (ASF) under one or more
@ -36,6 +35,7 @@ import java.util.List;
/**
* @author Jacek Ambroziak
* @author Morten Jorgensen
* @LastModified: Oct 2017
*/
final class DocumentCall extends FunctionCall {

View file

@ -1,6 +1,5 @@
/*
* Copyright (c) 2017, Oracle and/or its affiliates. All rights reserved.
* @LastModified: Oct 2017
*/
/*
* Licensed to the Apache Software Foundation (ASF) under one or more
@ -33,6 +32,7 @@ import java.util.List;
/**
* @author Jacek Ambroziak
* @author Santiago Pericas-Geertsen
* @LastModified: Oct 2017
*/
final class ElementAvailableCall extends FunctionCall {

View file

@ -1,6 +1,5 @@
/*
* Copyright (c) 2017, Oracle and/or its affiliates. All rights reserved.
* @LastModified: Oct 2017
*/
/*
* Licensed to the Apache Software Foundation (ASF) under one or more
@ -42,6 +41,7 @@ import java.util.List;
* @author Santiago Pericas-Geertsen
* @author Morten Jorgensen
* @author Erwin Bolwidt <ejb@klomp.org>
* @LastModified: Oct 2017
*/
abstract class Expression extends SyntaxTreeNode {
/**

View file

@ -1,6 +1,5 @@
/*
* Copyright (c) 2017, Oracle and/or its affiliates. All rights reserved.
* @LastModified: Nov 2017
*/
/*
* Licensed to the Apache Software Foundation (ASF) under one or more
@ -43,6 +42,7 @@ import java.util.List;
* @author Jacek Ambroziak
* @author Santiago Pericas-Geertsen
* @author Morten Jorgensen
* @LastModified: Nov 2017
*/
class FilterExpr extends Expression {

View file

@ -1,6 +1,5 @@
/*
* Copyright (c) 2017, Oracle and/or its affiliates. All rights reserved.
* @LastModified: Oct 2017
*/
/*
* Licensed to the Apache Software Foundation (ASF) under one or more
@ -29,6 +28,7 @@ import java.util.List;
/**
* @author Jacek Ambroziak
* @author Santiago Pericas-Geertsen
* @LastModified: Oct 2017
*/
final class FloorCall extends FunctionCall {
public FloorCall(QName fname, List<Expression> arguments) {

View file

@ -1,6 +1,5 @@
/*
* Copyright (c) 2017, Oracle and/or its affiliates. All rights reserved.
* @LastModified: Oct 2017
*/
/*
* Licensed to the Apache Software Foundation (ASF) under one or more
@ -31,6 +30,7 @@ import java.util.List;
/**
* @author Jacek Ambroziak
* @author Santiago Pericas-Geertsen
* @LastModified: Oct 2017
*/
public final class FlowList {
private List<InstructionHandle> _elements;

View file

@ -1,6 +1,5 @@
/*
* Copyright (c) 2015, 2017, Oracle and/or its affiliates. All rights reserved.
* @LastModified: Oct 2017
*/
/*
* Licensed to the Apache Software Foundation (ASF) under one or more
@ -48,6 +47,7 @@ import java.util.List;
* @author Jacek Ambroziak
* @author Santiago Pericas-Geertsen
* @author Morten Jorgensen
* @LastModified: Oct 2017
*/
final class ForEach extends Instruction {

View file

@ -1,6 +1,5 @@
/*
* Copyright (c) 2017, Oracle and/or its affiliates. All rights reserved.
* @LastModified: Oct 2017
*/
/*
* Licensed to the Apache Software Foundation (ASF) under one or more
@ -38,6 +37,7 @@ import java.util.List;
* @author Jacek Ambroziak
* @author Santiago Pericas-Geertsen
* @author Morten Jorgensen
* @LastModified: Oct 2017
*/
final class FormatNumberCall extends FunctionCall {
private Expression _value;

View file

@ -1,6 +1,5 @@
/*
* Copyright (c) 2017, Oracle and/or its affiliates. All rights reserved.
* @LastModified: Nov 2017
*/
/*
* Licensed to the Apache Software Foundation (ASF) under one or more
@ -37,6 +36,7 @@ import java.util.List;
/**
* @author G. Todd Miller
* @author Santiago Pericas-Geertsen
* @LastModified: Nov 2017
*/
final class FunctionAvailableCall extends FunctionCall {

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